diff options
author | Darkvater <darkvater@openttd.org> | 2005-09-18 20:56:44 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2005-09-18 20:56:44 +0000 |
commit | 8e6a911700de2875db95d254e5a5771e73ceedd7 (patch) | |
tree | 2e474d7261d3d1f3a5a381895f572bd5b78fe606 /industry_cmd.c | |
parent | 3097ee24292dc0c9fc19e98078a0403b96654787 (diff) | |
download | openttd-8e6a911700de2875db95d254e5a5771e73ceedd7.tar.xz |
(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
Diffstat (limited to 'industry_cmd.c')
-rw-r--r-- | industry_cmd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/industry_cmd.c b/industry_cmd.c index 8a158b724..ea11fd1ee 100644 --- a/industry_cmd.c +++ b/industry_cmd.c @@ -255,7 +255,7 @@ static const StringID _industry_close_strings[] = { }; -static void IndustryDrawTileProc1(TileInfo *ti) +static void IndustryDrawTileProc1(const TileInfo *ti) { const DrawIndustrySpec1Struct *d; uint32 image; @@ -275,7 +275,7 @@ static void IndustryDrawTileProc1(TileInfo *ti) _drawtile_proc1_x[image-1], _drawtile_proc1_y[image-1]); } -static void IndustryDrawTileProc2(TileInfo *ti) +static void IndustryDrawTileProc2(const TileInfo *ti) { int x = 0; @@ -289,7 +289,7 @@ static void IndustryDrawTileProc2(TileInfo *ti) AddChildSpriteScreen(0x129E, 6, 0xE); } -static void IndustryDrawTileProc3(TileInfo *ti) +static void IndustryDrawTileProc3(const TileInfo *ti) { if (_m[ti->tile].m1 & 0x80) { AddChildSpriteScreen(0x128B, 5, @@ -298,7 +298,7 @@ static void IndustryDrawTileProc3(TileInfo *ti) AddChildSpriteScreen(4746, 3, 67); } -static void IndustryDrawTileProc4(TileInfo *ti) +static void IndustryDrawTileProc4(const TileInfo *ti) { const DrawIndustrySpec4Struct *d; @@ -316,7 +316,7 @@ static void IndustryDrawTileProc4(TileInfo *ti) AddChildSpriteScreen(0x126D, 0, 42); } -static void DrawCoalPlantSparkles(TileInfo *ti) +static void DrawCoalPlantSparkles(const TileInfo *ti) { int image = _m[ti->tile].m1; if (image & 0x80) { @@ -330,7 +330,7 @@ static void DrawCoalPlantSparkles(TileInfo *ti) } } -typedef void IndustryDrawTileProc(TileInfo *ti); +typedef void IndustryDrawTileProc(const TileInfo *ti); static IndustryDrawTileProc * const _industry_draw_tile_procs[5] = { IndustryDrawTileProc1, IndustryDrawTileProc2, @@ -402,7 +402,7 @@ static uint GetSlopeZ_Industry(TileInfo *ti) { return GetPartialZ(ti->x&0xF, ti->y&0xF, ti->tileh) + ti->z; } -static uint GetSlopeTileh_Industry(TileInfo *ti) { +static uint GetSlopeTileh_Industry(const TileInfo *ti) { return 0; } @@ -866,7 +866,7 @@ static void GetProducedCargo_Industry(TileIndex tile, byte *b) b[1] = i->produced_cargo[1]; } -static void ChangeTileOwner_Industry(TileIndex tile, byte old_player, byte new_player) +static void ChangeTileOwner_Industry(TileIndex tile, PlayerID old_player, PlayerID new_player) { /* not used */ } |