Changeset - r2634:a3ccca486bdf
[Not reviewed]
master
0 7 0
tron - 19 years ago 2005-11-13 21:16:34
tron@openttd.org
(svn r3176) Use proper types, not some variants of int
7 files changed with 13 insertions and 11 deletions:
0 comments (0 inline, 0 general)
gfx.c
Show inline comments
 
@@ -427,13 +427,13 @@ static uint32 FormatStringLinebreaks(cha
 

	
 
		num++;
 
		str[-1] = '\0';
 
	}
 
}
 

	
 
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;
 
	int num, w, mt;
 
	const char *src;
 
	byte c;
 
@@ -473,13 +473,13 @@ void DrawStringMultiCenter(int x, int y,
 
				src+=2;
 
			}
 
		}
 
	}
 
}
 

	
 
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;
 
	int num, w, mt;
 
	const char *src;
 
	byte c;
gfx.h
Show inline comments
 
@@ -65,14 +65,14 @@ void GfxFillRect(int left, int top, int 
 
void GfxDrawLine(int left, int top, int right, int bottom, int color);
 
void DrawFrameRect(int left, int top, int right, int bottom, int color, int flags);
 
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);
 

	
 
void GfxInitPalettes(void);
 

	
openttd.c
Show inline comments
 
@@ -786,15 +786,15 @@ void SwitchMode(int new_mode)
 
#endif /* ENABLE_NETWORK */
 
		}
 
		break;
 
	}
 

	
 
	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;
 
			_generating_world = true;
 
			// delete all players.
 
			for (i = 0; i != MAX_PLAYERS; i++) {
 
@@ -1280,14 +1280,15 @@ bool AfterLoadGame(uint version)
 
			if (IsTileType(tile, MP_RAILWAY) && !HASBIT(_m[tile].m5, 7))
 
				SB(_m[tile].m4, 4, 4, 0);
 
		} END_TILE_LOOP(tile, MapSizeX(), MapSizeY(), 0);
 
	}
 

	
 
	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;
 
			}
 
			p->engine_renew = false;
 
			p->engine_renew_months = -6;
 
			p->engine_renew_money = 100000;
players.c
Show inline comments
 
@@ -616,13 +616,13 @@ void DeletePlayerWindows(PlayerID pi)
 
	DeleteWindowById(WC_BUY_COMPANY, 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);
 

	
 
		if (e->type == VEH_Train &&
 
				HASBIT(e->player_avail, p) &&
train_cmd.c
Show inline comments
 
@@ -1955,13 +1955,14 @@ static bool CheckTrainStayInDepot(Vehicl
 
	// bail out if not all wagons are in the same depot or not in a depot at all
 
	for (u = v; u != NULL; u = u->next)
 
		if (u->u.rail.track != 0x80 || u->tile != v->tile)
 
			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;
 
		}
 

	
 
		v->load_unload_time_rem = 0;
vehicle.h
Show inline comments
 
@@ -237,13 +237,13 @@ struct Vehicle {
 
	// Boundaries for the current position in the world and a next hash link.
 
	// NOSAVE: All of those can be updated with VehiclePositionChanged()
 
	int32 left_coord;
 
	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
 
	uint16 max_age;		// Maximum age
 
	uint16 date_of_last_service;
 
	uint16 service_interval;
window.h
Show inline comments
 
@@ -53,13 +53,13 @@ enum {
 
typedef struct Widget {
 
	byte type;
 
	byte resize_flag;
 
	byte color;
 
	uint16 left, right, top, bottom;
 
	uint16 unkA;
 
	uint16 tooltips;
 
	StringID tooltips;
 
} Widget;
 

	
 
enum FrameFlags {
 
	FR_TRANSPARENT  = 0x01,  ///< Makes the background transparent if set
 
	FR_NOBORDER     = 0x08,  ///< Hide border (draws just a solid box)
 
	FR_BORDERONLY   = 0x10,  ///< Draw border only, no background
0 comments (0 inline, 0 general)