mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(svn r3176) Use proper types, not some variants of int
This commit is contained in:
parent
eeade69786
commit
357aba7475
4
gfx.c
4
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];
|
char buffer[512];
|
||||||
uint32 tmp;
|
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];
|
char buffer[512];
|
||||||
uint32 tmp;
|
uint32 tmp;
|
||||||
|
4
gfx.h
4
gfx.h
@ -68,8 +68,8 @@ uint16 GetDrawStringPlayerColor(PlayerID player);
|
|||||||
|
|
||||||
int GetStringWidth(const char *str);
|
int GetStringWidth(const char *str);
|
||||||
void LoadStringWidthTable(void);
|
void LoadStringWidthTable(void);
|
||||||
void DrawStringMultiCenter(int x, int y, uint16 str, int maxw);
|
void DrawStringMultiCenter(int x, int y, StringID str, int maxw);
|
||||||
void DrawStringMultiLine(int x, int y, uint16 str, int maxw);
|
void DrawStringMultiLine(int x, int y, StringID str, int maxw);
|
||||||
void DrawDirtyBlocks(void);
|
void DrawDirtyBlocks(void);
|
||||||
void SetDirtyBlocks(int left, int top, int right, int bottom);
|
void SetDirtyBlocks(int left, int top, int right, int bottom);
|
||||||
void MarkWholeScreenDirty(void);
|
void MarkWholeScreenDirty(void);
|
||||||
|
@ -789,9 +789,9 @@ void SwitchMode(int new_mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case SM_LOAD_SCENARIO: { /* Load scenario from scenario editor */
|
case SM_LOAD_SCENARIO: { /* Load scenario from scenario editor */
|
||||||
int i;
|
|
||||||
|
|
||||||
if (SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_EDITOR)) {
|
if (SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_EDITOR)) {
|
||||||
|
PlayerID i;
|
||||||
|
|
||||||
_opt_ptr = &_opt;
|
_opt_ptr = &_opt;
|
||||||
|
|
||||||
_local_player = OWNER_NONE;
|
_local_player = OWNER_NONE;
|
||||||
@ -1283,8 +1283,9 @@ bool AfterLoadGame(uint version)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (version < 0x1000) {
|
if (version < 0x1000) {
|
||||||
int i;
|
|
||||||
FOR_ALL_PLAYERS(p) {
|
FOR_ALL_PLAYERS(p) {
|
||||||
|
EngineID i;
|
||||||
|
|
||||||
for (i = 0; i < TOTAL_NUM_ENGINES; i++) {
|
for (i = 0; i < TOTAL_NUM_ENGINES; i++) {
|
||||||
p->engine_replacement[i] = INVALID_ENGINE;
|
p->engine_replacement[i] = INVALID_ENGINE;
|
||||||
}
|
}
|
||||||
|
@ -619,7 +619,7 @@ void DeletePlayerWindows(PlayerID pi)
|
|||||||
byte GetPlayerRailtypes(PlayerID p)
|
byte GetPlayerRailtypes(PlayerID p)
|
||||||
{
|
{
|
||||||
byte rt = 0;
|
byte rt = 0;
|
||||||
uint i;
|
EngineID i;
|
||||||
|
|
||||||
for (i = 0; i != TOTAL_NUM_ENGINES; i++) {
|
for (i = 0; i != TOTAL_NUM_ENGINES; i++) {
|
||||||
const Engine* e = GetEngine(i);
|
const Engine* e = GetEngine(i);
|
||||||
|
@ -1958,7 +1958,8 @@ static bool CheckTrainStayInDepot(Vehicle *v)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (v->u.rail.force_proceed == 0) {
|
if (v->u.rail.force_proceed == 0) {
|
||||||
byte trackdir = GetVehicleTrackdir(v);
|
Trackdir trackdir = GetVehicleTrackdir(v);
|
||||||
|
|
||||||
if (++v->load_unload_time_rem < 37) {
|
if (++v->load_unload_time_rem < 37) {
|
||||||
InvalidateWindowClasses(WC_TRAINS_LIST);
|
InvalidateWindowClasses(WC_TRAINS_LIST);
|
||||||
return true;
|
return true;
|
||||||
|
@ -240,7 +240,7 @@ struct Vehicle {
|
|||||||
int32 top_coord;
|
int32 top_coord;
|
||||||
int32 right_coord;
|
int32 right_coord;
|
||||||
int32 bottom_coord;
|
int32 bottom_coord;
|
||||||
uint16 next_hash;
|
VehicleID next_hash;
|
||||||
|
|
||||||
// Related to age and service time
|
// Related to age and service time
|
||||||
uint16 age; // Age in days
|
uint16 age; // Age in days
|
||||||
|
Loading…
Reference in New Issue
Block a user