src/openttd.h
changeset 6683 b88ae30866ce
parent 6643 f81bee57bc09
child 6943 1914f26aee04
equal deleted inserted replaced
6682:1d0d51df9eb3 6683:b88ae30866ce
   362 typedef void DrawTileProc(TileInfo *ti);
   362 typedef void DrawTileProc(TileInfo *ti);
   363 typedef uint GetSlopeZProc(TileIndex tile, uint x, uint y);
   363 typedef uint GetSlopeZProc(TileIndex tile, uint x, uint y);
   364 typedef int32 ClearTileProc(TileIndex tile, byte flags);
   364 typedef int32 ClearTileProc(TileIndex tile, byte flags);
   365 typedef void GetAcceptedCargoProc(TileIndex tile, AcceptedCargo res);
   365 typedef void GetAcceptedCargoProc(TileIndex tile, AcceptedCargo res);
   366 typedef void GetTileDescProc(TileIndex tile, TileDesc *td);
   366 typedef void GetTileDescProc(TileIndex tile, TileDesc *td);
   367 /* GetTileTrackStatusProcs return a value that contains the possible tracks
   367 /**
       
   368  * GetTileTrackStatusProcs return a value that contains the possible tracks
   368  * that can be taken on a given tile by a given transport. The return value is
   369  * that can be taken on a given tile by a given transport. The return value is
   369  * composed as follows: 0xaabbccdd. ccdd and aabb are bitmasks of trackdirs,
   370  * composed as follows: 0xaabbccdd. ccdd and aabb are bitmasks of trackdirs,
   370  * where bit n corresponds to trackdir n. ccdd are the trackdirs that are
   371  * where bit n corresponds to trackdir n. ccdd are the trackdirs that are
   371  * present in the tile (1==present, 0==not present), aabb is the signal
   372  * present in the tile (1==present, 0==not present), aabb is the signal
   372  * status, if applicable (0==green/no signal, 1==red, note that this is
   373  * status, if applicable (0==green/no signal, 1==red, note that this is
   380  *
   381  *
   381  * A trackdir is combination of a track and a dir, where the lower three bits
   382  * A trackdir is combination of a track and a dir, where the lower three bits
   382  * are a track, the fourth bit is the direction. these give 12 (or 14)
   383  * are a track, the fourth bit is the direction. these give 12 (or 14)
   383  * possible options: 0-5 and 8-13, so we need 14 bits for a trackdir bitmask
   384  * possible options: 0-5 and 8-13, so we need 14 bits for a trackdir bitmask
   384  * above.
   385  * above.
       
   386  * @param tile     the tile to get the track status from
       
   387  * @param mode     the mode of transportation
       
   388  * @param sub_mode used to differentiate between different kinds within the mode
       
   389  * @return the above mentions track status information
   385  */
   390  */
   386 typedef uint32 GetTileTrackStatusProc(TileIndex tile, TransportType mode);
   391 typedef uint32 GetTileTrackStatusProc(TileIndex tile, TransportType mode, uint sub_mode);
   387 typedef void GetProducedCargoProc(TileIndex tile, CargoID *b);
   392 typedef void GetProducedCargoProc(TileIndex tile, CargoID *b);
   388 typedef void ClickTileProc(TileIndex tile);
   393 typedef void ClickTileProc(TileIndex tile);
   389 typedef void AnimateTileProc(TileIndex tile);
   394 typedef void AnimateTileProc(TileIndex tile);
   390 typedef void TileLoopProc(TileIndex tile);
   395 typedef void TileLoopProc(TileIndex tile);
   391 typedef void ChangeTileOwnerProc(TileIndex tile, PlayerID old_player, PlayerID new_player);
   396 typedef void ChangeTileOwnerProc(TileIndex tile, PlayerID old_player, PlayerID new_player);