From 8e6a911700de2875db95d254e5a5771e73ceedd7 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Sun, 18 Sep 2005 20:56:44 +0000 Subject: (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters - change a lot of byte player types to PlayerID - beautify header files, same "#endif /* filename */" ending --- tunnelbridge_cmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tunnelbridge_cmd.c') diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index fa451b330..4b2d84f27 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -956,7 +956,7 @@ static const byte _bridge_foundations[2][16] = { extern const byte _road_sloped_sprites[14]; -static void DrawBridgePillars(TileInfo *ti, int x, int y, int z) +static void DrawBridgePillars(const TileInfo *ti, int x, int y, int z) { const uint32 *b; uint32 image; @@ -1229,7 +1229,7 @@ static uint GetSlopeZ_TunnelBridge(TileInfo *ti) { // make sure that the slope is not inclined foundation if (IS_BYTE_INSIDE(f, 1, 15)) return z; - // change foundation type? + // change foundation type? XXX - should be const; accessor function! if (f) ti->tileh = _inclined_tileh[f - 15]; } @@ -1252,7 +1252,7 @@ static uint GetSlopeZ_TunnelBridge(TileInfo *ti) { return GetPartialZ(ti->x&0xF, ti->y&0xF, ti->tileh) + z; } -static uint GetSlopeTileh_TunnelBridge(TileInfo *ti) { +static uint GetSlopeTileh_TunnelBridge(const TileInfo *ti) { // not accurate, but good enough for slope graphics drawing return 0; } @@ -1397,7 +1397,7 @@ static uint32 GetTileTrackStatus_TunnelBridge(TileIndex tile, TransportType mode return 0; } -static void ChangeTileOwner_TunnelBridge(TileIndex tile, byte old_player, byte new_player) +static void ChangeTileOwner_TunnelBridge(TileIndex tile, PlayerID old_player, PlayerID new_player) { if (!IsTileOwner(tile, old_player)) return; -- cgit v1.2.3-54-g00ecf