Changeset - r915:dabba47e3ed1
[Not reviewed]
master
0 21 0
tron - 20 years ago 2005-01-06 18:45:28
tron@openttd.org
(svn r1402) Trim trailing whitespace
21 files changed with 61 insertions and 61 deletions:
0 comments (0 inline, 0 general)
dedicated.c
Show inline comments
 
@@ -32,7 +32,7 @@
 
#	define STDIN 0  /* file descriptor for standard input */
 
#endif
 
#ifdef __MORPHOS__
 
/*  voids the fork, option will be disabled for morphos build anyway, because MorphOS 
 
/*  voids the fork, option will be disabled for morphos build anyway, because MorphOS
 
 *  doesn't support forking (could only implemented with lots of code changes here).
 
 */
 
int morphos_dummy_fork() { return -1; }
engine.c
Show inline comments
 
@@ -119,7 +119,7 @@ void AddTypeToEngines()
 
{
 
	Engine *e;
 
	uint32 counter = 0;
 
	
 

	
 
	for(e=_engines; e != endof(_engines); e++, counter++) {
 

	
 
		e->type = VEH_Train;
 
@@ -187,7 +187,7 @@ void StartupEngines()
 
			e->flags |= ENGINE_AVAILABLE;
 
			e->player_avail = 0;
 
		}
 
		
 

	
 
		/* This sets up type for the engine
 
		   It is needed if you want to ask the engine what type it is
 
		   It should hopefully be the same as when you ask a vehicle what it is
fileio.c
Show inline comments
 
@@ -110,7 +110,7 @@ void FioOpenFile(int slot, const char *f
 
		for(s=buf + strlen(_path.data_dir) - 1; *s != 0; s++)
 
			*s = tolower(*s);
 
		f = fopen(buf, "rb");
 
		
 

	
 
#if defined SECOND_DATA_DIR
 
	// tries in the 2nd data directory
 
		if (f == NULL) {
gfx.c
Show inline comments
 
@@ -1507,7 +1507,7 @@ void DoPaletteAnimations()
 
	/* Amount of colors to be rotated.
 
	 * A few more for the DOS palette, because the water colors are
 
	 * 245-254 for DOS and 217-226 for Windows.  */
 
	int c = _use_dos_palette?38:28; 
 
	int c = _use_dos_palette?38:28;
 
	int j;
 
	int i;
 
	const ExtraPaletteValues *ev = &_extra_palette_values;
 
@@ -1594,7 +1594,7 @@ void DoPaletteAnimations()
 
			j+=3;
 
			if (j == 15) j = 0;
 
		}
 
	
 

	
 
		// Glittery water DOS
 
		s = ev->b;
 
		if (_opt.landscape == LT_CANDY) s = ev->bc;
md5.h
Show inline comments
 
@@ -71,7 +71,7 @@ typedef struct md5_state_s {
 
} md5_state_t;
 

	
 
#ifdef __cplusplus
 
extern "C" 
 
extern "C"
 
{
 
#endif
 

	
misc.c
Show inline comments
 
@@ -189,7 +189,7 @@ void InitializeGame()
 
		_autoreplace_array[i] = i;
 

	
 
	AddTypeToEngines(); // make sure all engines have a type
 
	
 

	
 
	SetObjectToPlace(1, 0, 0, 0);
 

	
 
	_pause = 0;
os2.c
Show inline comments
 
@@ -56,7 +56,7 @@ static DIR *my_opendir(char *path, char 
 
{
 
	char paths[MAX_PATH];
 

	
 
	append_path(paths, path, file);		
 
	append_path(paths, path, file);
 
	return opendir(paths);
 
}
 

	
 
@@ -179,7 +179,7 @@ FiosItem *FiosGetSavegameList(int *num, 
 
		{
 
			_dos_setdrive(disk, &total);
 
			_dos_getdrive(&disk2);
 
			
 

	
 
			if (disk == disk2)
 
			{
 
				fios = FiosAlloc();
 
@@ -299,7 +299,7 @@ FiosItem *FiosGetScenarioList(int *num, 
 
		{
 
			_dos_setdrive(disk, &total);
 
			_dos_getdrive(&disk2);
 
			
 

	
 
			if (disk == disk2)
 
			{
 
				fios = FiosAlloc();
 
@@ -384,7 +384,7 @@ StringID FiosGetDescText(const char **pa
 
{
 
	struct diskfree_t free;
 
	char drive;
 
	
 

	
 
	*path = _fios_path;
 
	drive = *path[0] - 'A'+1;
 

	
 
@@ -486,7 +486,7 @@ void ShowInfo(const char *str)
 
	HAB hab;
 
	HMQ hmq;
 
	ULONG rc;
 
   
 

	
 
	// init PM env.
 
	hmq = WinCreateMsgQueue((hab = WinInitialize(0)), 0);
 

	
 
@@ -503,7 +503,7 @@ void ShowOSErrorBox(const char *buf)
 
	HAB hab;
 
	HMQ hmq;
 
	ULONG rc;
 
   
 

	
 
	// init PM env.
 
	hmq = WinCreateMsgQueue((hab = WinInitialize(0)), 0);
 

	
 
@@ -579,7 +579,7 @@ void DeterminePaths()
 
	_path.gm_dir = str_fmt("%sgm\\", _path.game_data_dir);
 
	_path.data_dir = str_fmt("%sdata\\", _path.game_data_dir);
 
	_config_file = str_fmt("%sopenttd.cfg", _path.personal_dir);
 
	
 

	
 
#if defined CUSTOM_LANG_DIR
 
	// sets the search path for lng files to the custom one
 
	_path.lang_dir = malloc( MAX_PATH );
settings_gui.c
Show inline comments
 
@@ -68,7 +68,7 @@ static int GetCurRes()
 
static inline bool RoadVehiclesAreBuilt(void)
 
{
 
	Vehicle *v;
 
	FOR_ALL_VEHICLES(v) { 
 
	FOR_ALL_VEHICLES(v) {
 
		if (v->type == VEH_Road) return true;
 
	}
 
	return false;
ship_cmd.c
Show inline comments
 
@@ -996,7 +996,7 @@ int32 CmdRefitShip(int x, int y, uint32 
 
				v->u.ship.state != 0x80)
 
			return_cmd_error(STR_980B_SHIP_MUST_BE_STOPPED_IN);
 
		}
 
		
 

	
 
	cost = 0;
 
	if (IS_HUMAN_PLAYER(v->owner) && (byte)p2 != v->cargo_type) {
 
		cost = _price.ship_base >> 7;
 
@@ -1006,7 +1006,7 @@ int32 CmdRefitShip(int x, int y, uint32 
 
		//autorefitted ships wants to keep the cargo
 
		//it will be checked if the cargo is valid in CmdRenewVehicle
 
		if (!(SkipStoppedInDepotCheck))
 
			v->cargo_count = 0;	
 
			v->cargo_count = 0;
 
		v->cargo_type = (byte)p2;
 
		InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 
	}
sprite.h
Show inline comments
 
@@ -73,7 +73,7 @@ struct DeterministicSpriteGroup {
 
	} operation;
 
	byte add_val;
 
	byte divmod_val;
 
	
 

	
 
	// And apply it to this:
 
	byte num_ranges;
 
	struct DeterministicSpriteGroupRange *ranges; // Dynamically allocated
station.h
Show inline comments
 
@@ -82,9 +82,9 @@ enum {
 
	CA_AIR_SMALL = 4,
 
	CA_AIR_LARGE = 5,
 
	CA_DOCK = 5,
 
	CA_AIR_METRO = 6, 
 
	CA_AIR_METRO = 6,
 
	CA_AIR_INTER = 8,
 
}; 
 
};
 

	
 
void ModifyStationRatingAround(TileIndex tile, byte owner, int amount, uint radius);
 

	
stdafx.h
Show inline comments
 
@@ -37,7 +37,7 @@
 
#endif
 

	
 
#ifdef __MORPHOS__
 
// morphos defines certain amiga defines per default, we undefine them 
 
// morphos defines certain amiga defines per default, we undefine them
 
// here to make the rest of source less messy and more clear what is
 
// required for morphos and what for amigaos
 
#	ifdef amigaos
table/namegen.h
Show inline comments
 
@@ -37,14 +37,14 @@ static const char *name_original_english
 
	"W"
 
};
 

	
 
static const char *name_original_english_3[] = { 
 
	"ar", 
 
	"a", 
 
	"e", 
 
	"in", 
 
static const char *name_original_english_3[] = {
 
	"ar",
 
	"a",
 
	"e",
 
	"in",
 
	"on",
 
	"u",
 
	"un", 
 
	"un",
 
	"en"
 
};
 

	
 
@@ -107,7 +107,7 @@ static const char *name_additional_engli
 

	
 
static const char *name_additional_english_1a[] = {
 
	"Pen",
 
	"Lough", 
 
	"Lough",
 
	"Stam",
 
	"Aber",
 
	"Acc",
 
@@ -180,18 +180,18 @@ static const char *name_additional_engli
 
	"W"
 
};
 

	
 
static const char *name_additional_english_1b2[] = { 
 
	"ar", 
 
	"a", 
 
	"e", 
 
	"in", 
 
static const char *name_additional_english_1b2[] = {
 
	"ar",
 
	"a",
 
	"e",
 
	"in",
 
	"on",
 
	"u",
 
	"o",
 
	"ee",
 
	"es",
 
	"ea",
 
	"un", 
 
	"un",
 
	"en"
 
};
 

	
 
@@ -603,8 +603,8 @@ static const char *name_german_4_an_der[
 
	"Saale",
 
	"Elbe"
 
};
 
	
 
static const char *name_german_4_am[] = {	
 

	
 
static const char *name_german_4_am[] = {
 
	"Main"
 
};
 

	
table/station_land.h
Show inline comments
 
@@ -490,7 +490,7 @@ const DrawTileSeqStruct _station_display
 

	
 
// runway tiles
 
const DrawTileSeqStruct _station_display_datas_089[] = {
 
	{ 0,  0,  0, 16,  1,  6, 0x8A68 }, // fences	
 
	{ 0,  0,  0, 16,  1,  6, 0x8A68 }, // fences
 
	TILE_SEQ_END()
 
};
 

	
train_cmd.c
Show inline comments
 
@@ -1072,14 +1072,14 @@ int32 CmdRefitRailVehicle(int x, int y, 
 
	p2 = p2 & 0xFF;
 

	
 
	SET_EXPENSES_TYPE(EXPENSES_TRAIN_RUN);
 
	
 

	
 
	v = &_vehicles[p1];
 
	if (!CheckOwnership(v->owner) || ((CheckStoppedInDepot(v) < 0) && !(SkipStoppedInDepotCheck)))
 
		return CMD_ERROR;
 

	
 
	cost = 0;
 
	num = 0;
 
	
 

	
 
	do {
 
		/* XXX: We also refit all the attached wagons en-masse if they
 
		 * can be refitted. This is how TTDPatch does it.  TODO: Have
tree_cmd.c
Show inline comments
 
@@ -81,7 +81,7 @@ static void DoPlaceMoreTrees(uint tile)
 

	
 
		/* Only on tiles within 13 squares from tile,
 
		    on clear tiles, and NOT on farm-tiles or rocks */
 
		if (dist <= 13 && IS_TILETYPE(cur_tile, MP_CLEAR) && 
 
		if (dist <= 13 && IS_TILETYPE(cur_tile, MP_CLEAR) &&
 
			 (_map5[cur_tile] & 0x1F) != 0x0F && (_map5[cur_tile] & 0x1C) != 8) {
 
			PlaceTree(cur_tile, r, dist <= 6 ? 0xC0 : 0);
 
		}
unix.c
Show inline comments
 
@@ -25,7 +25,7 @@ ULONG __stack = (1024*1024)*2; // maybe 
 

	
 
#ifdef __AMIGA__
 
#warning add stack symbol to avoid that user needs to set stack manually (tokai)
 
// ULONG __stack = 
 
// ULONG __stack =
 
#endif
 

	
 
static char *_fios_path;
 
@@ -506,7 +506,7 @@ void DeterminePaths()
 
	_path.data_dir = str_fmt("%sdata/", _path.game_data_dir);
 
	_config_file = str_fmt("%sopenttd.cfg", _path.personal_dir);
 
	_log_file = str_fmt("%sopenttd.log", _path.personal_dir);
 
	
 

	
 
#if defined CUSTOM_LANG_DIR
 
	// sets the search path for lng files to the custom one
 
	_path.lang_dir = malloc( MAX_PATH );
vehicle.c
Show inline comments
 
@@ -1409,17 +1409,17 @@ int32 CmdReplaceVehicle(int x, int y, ui
 
	 This is a nice way to send 32 bit and only use 16 bit
 
	 the last 8 bit is the engine. The 8 bits in front of the engine is free so it have room for 16 bit engine entries */
 
	uint16 new_engine_type = (uint16)(p2 & 0xFFFF);
 
	uint32 autorefit_money = (p2  >> 16) * 100000; 
 
	uint32 autorefit_money = (p2  >> 16) * 100000;
 
	Vehicle *v = DEREF_VEHICLE(p1);
 
	int cost, build_cost;
 

	
 
	SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);
 
	
 
	
 

	
 

	
 
	// first we make sure that it's a valid type the user requested
 
	// check that it's an engine that is in the engine array
 
	if (new_engine_type >= TOTAL_NUM_ENGINES ) return CMD_ERROR;
 
	
 

	
 
	// check that the new vehicle type is the same as the original one
 
	if (v->type != DEREF_ENGINE(new_engine_type)->type) return CMD_ERROR;
 

	
 
@@ -1466,7 +1466,7 @@ int32 CmdReplaceVehicle(int x, int y, ui
 
	if (flags & DC_EXEC) {
 
		Engine *e;
 
		e = DEREF_ENGINE(new_engine_type);
 
		
 

	
 
		// TODO make it check if refit is possible before actually doing it
 

	
 
		/* We do not really buy a new vehicle, we upgrade the old one */
 
@@ -1474,7 +1474,7 @@ int32 CmdReplaceVehicle(int x, int y, ui
 
			byte cargo_type = v->cargo_type;
 
			v->engine_type = new_engine_type;
 
			v->max_age = e->lifelength * 366;
 
		
 

	
 
			/* Update limits of the vehicle (for when upgraded) */
 
			switch (v->type) {
 
			case VEH_Train:
 
@@ -1489,7 +1489,7 @@ int32 CmdReplaceVehicle(int x, int y, ui
 
				v->max_speed = rvi->max_speed;
 

	
 
				v->u.rail.railtype = e->railtype;
 
				
 

	
 
				// 0x0100 means that we skip the check for being stopped inside the depot
 
				// since we do not stop it for autorefitting
 
				if (v->cargo_type != cargo_type && capacity) {
 
@@ -1521,7 +1521,7 @@ int32 CmdReplaceVehicle(int x, int y, ui
 
				v->cargo_type = svi->cargo_type;
 
				v->cargo_cap = svi->capacity;
 
				v->max_speed = svi->max_speed;
 
				
 

	
 
				// 0x0100 means that we skip the check for being stopped inside the depot
 
				// since we do not stop it for autorefitting
 
				if (v->cargo_type != cargo_type)
 
@@ -1559,7 +1559,7 @@ int32 CmdReplaceVehicle(int x, int y, ui
 
					v->cargo_count = v->cargo_cap;
 
			}
 
		}
 
		
 

	
 
		v->reliability = e->reliability;
 
		v->reliability_spd_dec = e->reliability_spd_dec;
 
		v->age = 0;
 
@@ -1580,7 +1580,7 @@ int32 CmdReplaceVehicle(int x, int y, ui
 
void MaybeReplaceVehicle(Vehicle *v)
 
{
 
	uint32 new_engine_and_autoreplace_money;
 
	
 

	
 
	if (v->owner != _local_player)
 
		return;
 
	// uncomment next line if you want to see what engine type just entered a depot
 
@@ -1597,7 +1597,7 @@ void MaybeReplaceVehicle(Vehicle *v)
 
	}
 
	/* Now replace the vehicle */
 
	_current_player = v->owner;
 
	
 

	
 
	/* makes the variable to inform about how much money the player wants to have left after replacing
 
	 and which engine to replace with
 
	 the first 16 bit is the money. Since we know the last 5 digits is 0, they are thrown away.
 
@@ -1605,9 +1605,9 @@ void MaybeReplaceVehicle(Vehicle *v)
 
	 This is a nice way to send 32 bit and only use 16 bit
 
	 the last 8 bit is the engine. The 8 bits in front of the engine is free so it have room for 16 bit engine entries */
 
	new_engine_and_autoreplace_money = ((_patches.autorenew_money / 100000) << 16) + _autoreplace_array[v->engine_type];
 
	
 

	
 
	assert(v->type == DEREF_ENGINE(_autoreplace_array[v->engine_type])->type);
 
	
 

	
 
	if ( v->type != VEH_Train ) {
 
		DoCommandP(v->tile, v->index, new_engine_and_autoreplace_money, NULL, CMD_REPLACE_VEHICLE | CMD_SHOW_NO_ERROR);
 
	} else {
vehicle_gui.c
Show inline comments
 
@@ -364,7 +364,7 @@ static void SetupScrollStuffForReplaceWi
 

	
 
	sel[0] = WP(w,replaceveh_d).sel_index[0];
 
	sel[1] = WP(w,replaceveh_d).sel_index[1];
 
	
 

	
 
	switch (WP(w,replaceveh_d).vehicletype) {
 
		case VEH_Train: {
 
			railtype = WP(w,replaceveh_d).railtype;
 
@@ -510,10 +510,10 @@ static void DrawEngineArrayInReplaceWind
 

	
 
	sel[0] = sel1;
 
	sel[1] = sel2;
 
	
 

	
 
	selected_id[0] = selected_id1;
 
	selected_id[1] = selected_id2;
 
	
 

	
 
	switch (WP(w,replaceveh_d).vehicletype) {
 
		case VEH_Train: {
 
			byte railtype = WP(w,replaceveh_d).railtype;
widget.c
Show inline comments
 
@@ -408,7 +408,7 @@ void DrawWindowWidgets(Window *w)
 

	
 
		case WWT_RESIZEBOX: {
 
			assert(r.right - r.left == 11); // XXX - to ensure the same sizes are used everywhere!
 
			
 

	
 
			DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, 0);
 
			DrawSprite(SPR_WINDOW_RESIZE, r.left + 3, r.top + 3);
 
			break;
win32.c
Show inline comments
 
@@ -1461,7 +1461,7 @@ static void Win32InitializeExceptions()
 
}
 
#else
 
/* Get rid of unused variable warnings.. ShowOSErrorBox
 
 * is now used twice, once in MSVC, and once in all other Win 
 
 * is now used twice, once in MSVC, and once in all other Win
 
 * compilers (cygwin, mingw, etc.) */
 
void ShowOSErrorBox(const char *buf)
 
{
0 comments (0 inline, 0 general)