summaryrefslogtreecommitdiff
path: root/town_cmd.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-09-18 20:56:44 +0000
committerDarkvater <darkvater@openttd.org>2005-09-18 20:56:44 +0000
commit8e6a911700de2875db95d254e5a5771e73ceedd7 (patch)
tree2e474d7261d3d1f3a5a381895f572bd5b78fe606 /town_cmd.c
parent3097ee24292dc0c9fc19e98078a0403b96654787 (diff)
downloadopenttd-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 'town_cmd.c')
-rw-r--r--town_cmd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/town_cmd.c b/town_cmd.c
index 2a4ca21e0..b95270c0a 100644
--- a/town_cmd.c
+++ b/town_cmd.c
@@ -76,12 +76,12 @@ typedef struct DrawTownTileStruct {
#include "table/town_land.h"
-static void TownDrawHouseLift(TileInfo *ti)
+static void TownDrawHouseLift(const TileInfo *ti)
{
AddChildSpriteScreen(0x5A3, 0xE, 0x3C - (_m[ti->tile].m1 & 0x7F));
}
-typedef void TownDrawTileProc(TileInfo *ti);
+typedef void TownDrawTileProc(const TileInfo *ti);
static TownDrawTileProc * const _town_draw_tile_procs[1] = {
TownDrawHouseLift
};
@@ -150,7 +150,7 @@ static uint GetSlopeZ_Town(TileInfo *ti)
return (uint16) z;
}
-static uint GetSlopeTileh_Town(TileInfo *ti)
+static uint GetSlopeTileh_Town(const TileInfo *ti)
{
return ti->tileh;
}
@@ -400,7 +400,7 @@ static uint32 GetTileTrackStatus_Town(TileIndex tile, TransportType mode)
return 0;
}
-static void ChangeTileOwner_Town(TileIndex tile, byte old_player, byte new_player)
+static void ChangeTileOwner_Town(TileIndex tile, PlayerID old_player, PlayerID new_player)
{
/* not used */
}
@@ -1155,7 +1155,7 @@ static bool CheckBuildHouseMode(Town *t1, TileIndex tile, uint tileh, int mode)
return DoCommandByTile(tile, 0, 0, DC_EXEC | DC_AUTO | DC_NO_WATER, CMD_LANDSCAPE_CLEAR) != CMD_ERROR;
}
-int GetTownRadiusGroup(Town *t, TileIndex tile)
+int GetTownRadiusGroup(const Town *t, TileIndex tile)
{
uint dist;
int i,smallest;
@@ -1165,7 +1165,7 @@ int GetTownRadiusGroup(Town *t, TileIndex tile)
return 4;
smallest = 0;
- for(i=0; i!=lengthof(t->radius); i++) {
+ for (i = 0; i != lengthof(t->radius); i++) {
if (dist < t->radius[i])
smallest = i;
}