summaryrefslogtreecommitdiff
path: root/src/tile_cmd.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-25 20:08:59 +0000
committersmatz <smatz@openttd.org>2009-06-25 20:08:59 +0000
commitc0ac230e3ea48e2e640dc74bc257f6f22d37bca3 (patch)
tree8472f38421f3ceae22eb5ab827bbc0d45b2de08e /src/tile_cmd.h
parentc30a87758fca7b0203b36b886aaa360f383f9278 (diff)
downloadopenttd-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.h16
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 */