# HG changeset patch # User tron # Date 1131916594 0 # Node ID 16334e1a48624a54f03de643b3270f14b9601ee4 # Parent bf59ceb09a1aaf012de272b7fcac95def0444a06 (svn r3176) Use proper types, not some variants of int diff -r bf59ceb09a1a -r 16334e1a4862 gfx.c --- a/gfx.c Sun Nov 13 18:07:45 2005 +0000 +++ b/gfx.c Sun Nov 13 21:16:34 2005 +0000 @@ -430,7 +430,7 @@ } } -void DrawStringMultiCenter(int x, int y, uint16 str, int maxw) +void DrawStringMultiCenter(int x, int y, StringID str, int maxw) { char buffer[512]; uint32 tmp; @@ -476,7 +476,7 @@ } } -void DrawStringMultiLine(int x, int y, uint16 str, int maxw) +void DrawStringMultiLine(int x, int y, StringID str, int maxw) { char buffer[512]; uint32 tmp; diff -r bf59ceb09a1a -r 16334e1a4862 gfx.h --- a/gfx.h Sun Nov 13 18:07:45 2005 +0000 +++ b/gfx.h Sun Nov 13 21:16:34 2005 +0000 @@ -68,8 +68,8 @@ int GetStringWidth(const char *str); void LoadStringWidthTable(void); -void DrawStringMultiCenter(int x, int y, uint16 str, int maxw); -void DrawStringMultiLine(int x, int y, uint16 str, int maxw); +void DrawStringMultiCenter(int x, int y, StringID str, int maxw); +void DrawStringMultiLine(int x, int y, StringID str, int maxw); void DrawDirtyBlocks(void); void SetDirtyBlocks(int left, int top, int right, int bottom); void MarkWholeScreenDirty(void); diff -r bf59ceb09a1a -r 16334e1a4862 openttd.c --- a/openttd.c Sun Nov 13 18:07:45 2005 +0000 +++ b/openttd.c Sun Nov 13 21:16:34 2005 +0000 @@ -789,9 +789,9 @@ } case SM_LOAD_SCENARIO: { /* Load scenario from scenario editor */ - int i; + if (SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_EDITOR)) { + PlayerID i; - if (SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_EDITOR)) { _opt_ptr = &_opt; _local_player = OWNER_NONE; @@ -1283,8 +1283,9 @@ } if (version < 0x1000) { - int i; FOR_ALL_PLAYERS(p) { + EngineID i; + for (i = 0; i < TOTAL_NUM_ENGINES; i++) { p->engine_replacement[i] = INVALID_ENGINE; } diff -r bf59ceb09a1a -r 16334e1a4862 players.c --- a/players.c Sun Nov 13 18:07:45 2005 +0000 +++ b/players.c Sun Nov 13 21:16:34 2005 +0000 @@ -619,7 +619,7 @@ byte GetPlayerRailtypes(PlayerID p) { byte rt = 0; - uint i; + EngineID i; for (i = 0; i != TOTAL_NUM_ENGINES; i++) { const Engine* e = GetEngine(i); diff -r bf59ceb09a1a -r 16334e1a4862 train_cmd.c --- a/train_cmd.c Sun Nov 13 18:07:45 2005 +0000 +++ b/train_cmd.c Sun Nov 13 21:16:34 2005 +0000 @@ -1958,7 +1958,8 @@ return false; if (v->u.rail.force_proceed == 0) { - byte trackdir = GetVehicleTrackdir(v); + Trackdir trackdir = GetVehicleTrackdir(v); + if (++v->load_unload_time_rem < 37) { InvalidateWindowClasses(WC_TRAINS_LIST); return true; diff -r bf59ceb09a1a -r 16334e1a4862 vehicle.h --- a/vehicle.h Sun Nov 13 18:07:45 2005 +0000 +++ b/vehicle.h Sun Nov 13 21:16:34 2005 +0000 @@ -240,7 +240,7 @@ int32 top_coord; int32 right_coord; int32 bottom_coord; - uint16 next_hash; + VehicleID next_hash; // Related to age and service time uint16 age; // Age in days diff -r bf59ceb09a1a -r 16334e1a4862 window.h --- a/window.h Sun Nov 13 18:07:45 2005 +0000 +++ b/window.h Sun Nov 13 21:16:34 2005 +0000 @@ -56,7 +56,7 @@ byte color; uint16 left, right, top, bottom; uint16 unkA; - uint16 tooltips; + StringID tooltips; } Widget; enum FrameFlags {