# Todo List

Global Station::IsBuoy () const
  Ditch this encoding of buoys

Global AircraftController
  De-mystify the cur_speed values for helicopter rotors.

Global GetValidAirports
  set availability of airports by year, instead of airplane

Global CmdBuildRoadDepot
  When checking for the tile slope, distingush between "Flat land required" and "land sloped in wrong direction"

Global CmdBuildTrainDepot
  When checking for the tile slope, distingush between "Flat land required" and "land sloped in wrong direction"

Global CmdBuildTrainWaypoint
  When checking for the tile slope, distingush between "Flat land required" and "land sloped in wrong direction"

Global CmdBuyCompany
  currently this only works for AI companies

Global CmdCompanyCtrl
  In the case of p1=0, create new company, the clientID of the new client is in parameter p2. This parameter is passed in at function DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND) on the server itself. First of all this is unbelievably ugly; second of all, well, it IS ugly! Someone fix this up :) So where to fix?

Global CmdRestoreOrderIndex
  Unfortunately you cannot safely restore the unitnumber or the old vehicle as far as I can see. We can store it in BackuppedOrders, and restore it, but but we have no way of seeing it has been tampered with or not, as we have no legit way of knowing what that ID was.
  If we do want to backup/restore it, just add UnitID uid to BackuppedOrders, and restore it as parameter 'y' (ugly hack I know) for example. "v->unitnumber = y;"

Global QSortT
  replace the normal qsort with this one

Global RailVehicleChangeInfo
  Air drag for trains.

Global ShipVehicleChangeInfo
  Speed fractions for ships on oceans and canals

Global CanEnterTileOwnerCheck
  This function should be used in other places than just NPF, maybe moved to another file too.

Global NPFHash
  Think of a better hash.

Global SlError
  this was used to have a central place to handle errors, but it is pretty ugly, and seriously interferes with any multithreaded approaches

File sprites.h
  Split the "Sprites" enum into smaller chunks and document them

Global CommonRaiseLowerBigLand
  : Incorporate into game itself to allow for ingame raising/lowering of larger chunks at the same time OR remove altogether, as we have 'level land' ?

Global EditorTerraformClick_Dynamite
  Merge with terraform_gui.cpp (move there) after I have cooled down at its braindeadness and changed OnButtonClick to include the widget as well in the function declaration. Post 0.4.0 - Darkvater

File tunnelbridge_cmd.cpp
  seperate this file into two

Global SetDirtyBlocks
  The name of the function should be called like `AddDirtyBlock` as it neither set a dirty rect nor add several dirty rects although the function name is in plural. (Progman)