summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gfx.c4
-rw-r--r--gfx.h4
-rw-r--r--openttd.c7
-rw-r--r--players.c2
-rw-r--r--train_cmd.c3
-rw-r--r--vehicle.h2
-rw-r--r--window.h2
7 files changed, 13 insertions, 11 deletions
diff --git a/gfx.c b/gfx.c
index 670e62c9f..d3c6e7015 100644
--- a/gfx.c
+++ b/gfx.c
@@ -430,7 +430,7 @@ static uint32 FormatStringLinebreaks(char *str, int maxw)
}
}
-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 DrawStringMultiCenter(int x, int y, uint16 str, int maxw)
}
}
-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 --git a/gfx.h b/gfx.h
index 1a2e436f1..e8bf5a704 100644
--- a/gfx.h
+++ b/gfx.h
@@ -68,8 +68,8 @@ uint16 GetDrawStringPlayerColor(PlayerID player);
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 --git a/openttd.c b/openttd.c
index ede882c11..783b58810 100644
--- a/openttd.c
+++ b/openttd.c
@@ -789,9 +789,9 @@ void SwitchMode(int new_mode)
}
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;
+
_opt_ptr = &_opt;
_local_player = OWNER_NONE;
@@ -1283,8 +1283,9 @@ bool AfterLoadGame(uint version)
}
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 --git a/players.c b/players.c
index a9629a716..2168eb264 100644
--- a/players.c
+++ b/players.c
@@ -619,7 +619,7 @@ void DeletePlayerWindows(PlayerID pi)
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 --git a/train_cmd.c b/train_cmd.c
index 24c696f0c..aed2c8ea8 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -1958,7 +1958,8 @@ static bool CheckTrainStayInDepot(Vehicle *v)
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 --git a/vehicle.h b/vehicle.h
index 4b6d3ce3f..ca8c4399f 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -240,7 +240,7 @@ struct Vehicle {
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 --git a/window.h b/window.h
index 5d06d636e..6c0a60793 100644
--- a/window.h
+++ b/window.h
@@ -56,7 +56,7 @@ typedef struct Widget {
byte color;
uint16 left, right, top, bottom;
uint16 unkA;
- uint16 tooltips;
+ StringID tooltips;
} Widget;
enum FrameFlags {