diff options
author | smatz <smatz@openttd.org> | 2009-06-25 20:08:59 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-06-25 20:08:59 +0000 |
commit | c0ac230e3ea48e2e640dc74bc257f6f22d37bca3 (patch) | |
tree | 8472f38421f3ceae22eb5ab827bbc0d45b2de08e /src/tile_cmd.h | |
parent | c30a87758fca7b0203b36b886aaa360f383f9278 (diff) | |
download | openttd-c0ac230e3ea48e2e640dc74bc257f6f22d37bca3.tar.xz |
(svn r16660) -Codechange: get rid of more dummy tile_type_procs
Diffstat (limited to 'src/tile_cmd.h')
-rw-r--r-- | src/tile_cmd.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/tile_cmd.h b/src/tile_cmd.h index 3f3673698..a1cd92fda 100644 --- a/src/tile_cmd.h +++ b/src/tile_cmd.h @@ -155,8 +155,6 @@ extern const TileTypeProcs * const _tile_type_procs[16]; TrackStatus GetTileTrackStatus(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side = INVALID_DIAGDIR); VehicleEnterTileStatus VehicleEnterTile(Vehicle *v, TileIndex tile, int x, int y); void ChangeTileOwner(TileIndex tile, Owner old_owner, Owner new_owner); -void AnimateTile(TileIndex tile); -bool ClickTile(TileIndex tile); void GetTileDesc(TileIndex tile, TileDesc *td); static inline void AddAcceptedCargo(TileIndex tile, AcceptedCargo ac) @@ -166,4 +164,18 @@ static inline void AddAcceptedCargo(TileIndex tile, AcceptedCargo ac) proc(tile, ac); } +static inline void AnimateTile(TileIndex tile) +{ + AnimateTileProc *proc = _tile_type_procs[GetTileType(tile)]->animate_tile_proc; + if (proc == NULL) return; + proc(tile); +} + +static inline bool ClickTile(TileIndex tile) +{ + ClickTileProc *proc = _tile_type_procs[GetTileType(tile)]->click_tile_proc; + if (proc == NULL) return false; + return proc(tile); +} + #endif /* TILE_CMD_H */ |