Changeset - r1109:6c0cc4a443a2
[Not reviewed]
master
0 16 0
tron - 19 years ago 2005-01-23 13:09:35
tron@openttd.org
(svn r1610) Remove trailing whitespace (last time ever, i hope)
16 files changed with 39 insertions and 39 deletions:
0 comments (0 inline, 0 general)
airport_gui.c
Show inline comments
 
@@ -203,7 +203,7 @@ static void BuildAirportPickerWndProc(Wi
 

	
 
		CheckRedrawStationCoverage(w);
 
	} break;
 
	
 

	
 
	case WE_DESTROY:
 
		ResetObjectToPlace();
 
		break;
console.c
Show inline comments
 
@@ -1089,7 +1089,7 @@ void IConsoleCmdExec(const char* cmdstr)
 
	uint c;
 
	uint i;
 
	uint l;
 
	
 

	
 
	if (strlen(cmdstr) == 0) // only execute if there is something typed obviously
 
		return;
 

	
dedicated.c
Show inline comments
 
@@ -105,7 +105,7 @@ void WINAPI CheckForConsoleInput(void)
 
void CreateWindowsConsoleThread(void)
 
{
 
	/* Create event to signal when console input is ready */
 
	hEvent = CreateEvent(NULL, false, false, "keyboard input");    
 
	hEvent = CreateEvent(NULL, false, false, "keyboard input");
 

	
 
	hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)CheckForConsoleInput, 0, 0, NULL);
 
	if (hThread == NULL)
 
@@ -151,7 +151,7 @@ static void DedicatedVideoStop(void)
 
#ifdef WIN32
 
	CloseWindowsConsoleThread();
 
#endif
 
	free(_dedicated_video_mem); 
 
	free(_dedicated_video_mem);
 
}
 

	
 
static void DedicatedVideoMakeDirty(int left, int top, int width, int height) {}
 
@@ -183,7 +183,7 @@ static bool InputWaiting(void)
 
{
 
	if (WaitForSingleObject(hEvent, 1) == WAIT_OBJECT_0)
 
		return true;
 
  
 

	
 
	return false;
 
}
 
#endif
fileio.c
Show inline comments
 
@@ -87,7 +87,7 @@ void FioReadBlock(void *ptr, uint size)
 
static inline void FioCloseFile(int slot)
 
{
 
	if (_fio.handles[slot] != NULL) {
 
		fclose(_fio.handles[slot]); 
 
		fclose(_fio.handles[slot]);
 
		_fio.handles[slot] = NULL;
 
	}
 
}
main_gui.c
Show inline comments
 
@@ -121,7 +121,7 @@ void HandleOnEditText(WindowEvent *e) {
 
 * @param cursor How should the cursor image change? E.g. cursor with depot image in it
 
 * @param mode Tile highlighting mode, e.g. drawing a rectangle or a dot on the ground
 
 * @param placeproc Procedure which will be called when someone clicks on the map
 
 
 

	
 
 * @return true if the button is clicked, false if it's unclicked
 
 */
 

	
namegen.c
Show inline comments
 
@@ -13,7 +13,7 @@ static inline int32 SeedChanceBias(int s
 
	return SeedChance(shift_by, max + bias, seed) - bias;
 
}
 

	
 
static void ReplaceWords(const char *org, const char *rep, char *buf) 
 
static void ReplaceWords(const char *org, const char *rep, char *buf)
 
{
 
	if (strncmp(buf, org, 4) == 0) strncpy(buf, rep, 4);
 
}
player_gui.c
Show inline comments
 
@@ -927,5 +927,5 @@ void ShowEndGameChart(void)
 
			w->window_number = _opt.diff_level;
 
			WP(w, highscore_d).rank = SaveHighScoreValue(p);
 
		}
 
	}		
 
	}
 
}
rail_cmd.c
Show inline comments
 
@@ -1140,7 +1140,7 @@ int32 CmdRemoveSignals(int x, int y, uin
 

	
 
	/* Do it? */
 
	if (flags & DC_EXEC) {
 
		
 

	
 
		_map3_lo[tile] &= ~c;
 

	
 
		/* removed last signal from tile? */
 
@@ -1149,7 +1149,7 @@ int32 CmdRemoveSignals(int x, int y, uin
 
			_map2[tile] &= ~0xF0;
 
			CLRBIT(_map3_hi[tile], 2); // remove any possible semaphores
 
		}
 
		
 

	
 
		SetSignalsOnBothDir(tile, track);
 

	
 
		MarkTileDirtyByTile(tile);
 
@@ -1289,7 +1289,7 @@ regular_track:;
 
				return CMD_ERROR;
 
			cost += ret;
 
		};
 
		
 

	
 
		m5 &= RAIL_BIT_MASK;
 
		if (flags & DC_EXEC)
 
			goto regular_track;
road_gui.c
Show inline comments
 
@@ -465,7 +465,7 @@ static void RoadStationPickerWndProc(Win
 

	
 
		CheckRedrawStationCoverage(w);
 
	} break;
 
	
 

	
 
	case WE_DESTROY:
 
		ResetObjectToPlace();
 
		break;
train_cmd.c
Show inline comments
 
@@ -367,7 +367,7 @@ int32 EstimateTrainCost(const RailVehicl
 
	return (rvi->base_cost * (_price.build_railvehicle >> 3)) >> 5;
 
}
 

	
 
void AddRearEngineToMultiheadedTrain(Vehicle *v, Vehicle *u, bool building) 
 
void AddRearEngineToMultiheadedTrain(Vehicle *v, Vehicle *u, bool building)
 
{
 
	u->direction = v->direction;
 
	u->owner = v->owner;
 
@@ -387,7 +387,7 @@ void AddRearEngineToMultiheadedTrain(Veh
 
	if (building) v->next = u;
 
	u->engine_type = v->engine_type;
 
	u->build_year = v->build_year;
 
	if (building) 
 
	if (building)
 
		v->value = u->value = v->value >> 1;
 
	else
 
		u->value = v->value;
 
@@ -2399,7 +2399,7 @@ static void HandleCrashedTrain(Vehicle *
 
		ChangeTrainDirRandomly(v);
 
	}
 

	
 
	if (state >= 4440 && !(v->tick_counter&0x1F))		
 
	if (state >= 4440 && !(v->tick_counter&0x1F))
 
		DeleteLastWagon(v);
 
}
 

	
ttd.c
Show inline comments
 
@@ -729,7 +729,7 @@ int ttd_main(int argc, char* argv[])
 
			LoadIntroGame();
 
			_switch_mode = SM_NONE;
 
			NetworkClientConnectGame(network_conn, rport);
 
		} 
 
		}
 
	}
 
#endif /* ENABLE_NETWORK */
 

	
tunnelbridge_cmd.c
Show inline comments
 
@@ -817,8 +817,8 @@ static int32 ClearTile_TunnelBridge(uint
 
			return_cmd_error(STR_5007_MUST_DEMOLISH_BRIDGE_FIRST);
 

	
 
		return DoClearBridge(tile, flags);
 
	} 
 
	
 
	}
 

	
 
	return CMD_ERROR;
 
}
 

	
vehicle.c
Show inline comments
 
@@ -1361,20 +1361,20 @@ int32 CmdReplaceVehicle(int x, int y, ui
 
	    settings, a vehicle can be replaced twice.. check if this is the situation here */
 
	if (old_engine_type == new_engine_type && v->age == 0)
 
		return CMD_ERROR;
 
		
 

	
 
	if ( v->type == VEH_Train ) {
 
		u = GetLastVehicleInChain(v);
 
		if ( RailVehInfo(new_engine_type)->flags & RVI_MULTIHEAD )
 
			build_cost = build_cost >> 1;   //multiheaded engines have EstimateTrainCost() for both engines
 
		
 

	
 
		if ( old_engine_type != new_engine_type ) {
 
		
 

	
 
			// prevent that the rear engine can get replaced to something else than the front engine
 
			if ( v->u.rail.first_engine != 0xffff && RailVehInfo(old_engine_type)->flags & RVI_MULTIHEAD && RailVehInfo(old_engine_type)->flags ) {
 
				Vehicle *first = GetFirstVehicleInChain(v);
 
				if ( first->engine_type != new_engine_type ) return CMD_ERROR;
 
			}
 
			
 

	
 
			// checks if the engine is the first one
 
			if ( v->u.rail.first_engine == 0xffff ) {
 
				if ( RailVehInfo(new_engine_type)->flags & RVI_MULTIHEAD ) {
 
@@ -1431,7 +1431,7 @@ int32 CmdReplaceVehicle(int x, int y, ui
 

	
 
		InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 

	
 
	
 

	
 
		if (v->engine_type != new_engine_type) {
 
			byte sprite = v->spritenum;
 
			byte cargo_type = v->cargo_type;
 
@@ -1471,7 +1471,7 @@ int32 CmdReplaceVehicle(int x, int y, ui
 
				} else {
 
					v->cargo_type = rvi->cargo_type;
 
				}
 
				
 

	
 
				if ( rvi2->flags & RVI_MULTIHEAD && !(rvi->flags & RVI_MULTIHEAD) &&  v->index == first->index) {
 
					if (old_engine_type == u->engine_type ) {
 
						Vehicle *w;
 
@@ -1482,11 +1482,11 @@ int32 CmdReplaceVehicle(int x, int y, ui
 
						DeleteVehicle(u);
 
					}
 
				}
 
				
 

	
 
				if ( rvi->flags & RVI_MULTIHEAD && rvi2->flags & RVI_MULTIHEAD &&  v->index == first->index ) {
 
					CmdReplaceVehicle(x, y, flags, u->index, p2);
 
				}
 
				
 

	
 
				if ( rvi->flags & RVI_MULTIHEAD && !(rvi2->flags & RVI_MULTIHEAD) &&  v->index == first->index ) {
 
					if ( old_engine_type != u->engine_type ) {
 
						Vehicle *w;
 
@@ -1496,7 +1496,7 @@ int32 CmdReplaceVehicle(int x, int y, ui
 
						}
 
					}
 
				}
 
				
 

	
 
				// updates the id of the front engine in the other units, since the front engine just got a new engine_id
 
				// this is needed for wagon override
 
				if ( v->u.rail.first_engine == 0xffff && v->next != NULL ) {
 
@@ -1505,7 +1505,7 @@ int32 CmdReplaceVehicle(int x, int y, ui
 
						veh->u.rail.first_engine = new_engine_type;
 
					} while ( (veh=veh->next) != NULL );
 
				}
 
				
 

	
 
				break;
 
				}
 
			case VEH_Road:
viewport.c
Show inline comments
 
@@ -689,7 +689,7 @@ static void DrawTileSelection(const Tile
 

	
 
				diffx = myabs(TileX(start)-TileX(ti->tile));
 
				diffy = myabs(TileY(start)-TileY(ti->tile));
 
				
 

	
 
				side = myabs( diffx-diffy );
 
				if(dir<2) side = 0;
 

	
 
@@ -697,7 +697,7 @@ static void DrawTileSelection(const Tile
 

	
 
				if (thd->make_square_red) image |= 0x3048000;
 
				DrawSelectionSprite(image, ti);
 
			} 
 
			}
 
		return;
 
	}
 

	
 
@@ -1963,7 +1963,7 @@ void VpStartPreSizing(void)
 
	_special_mouse_mode = WSM_PRESIZE;
 
}
 

	
 
/* returns information about the 2x1 piece to be build. 
 
/* returns information about the 2x1 piece to be build.
 
 * The lower bits (0-3) are the track type. */
 
static byte Check2x1AutoRail(int mode)
 
{
 
@@ -2025,7 +2025,7 @@ static void CalcRaildirsDrawstyle(TileHi
 
			b = (Check2x1AutoRail(3)) | HT_LINE;
 
		else if (dx==-16)
 
			b = (Check2x1AutoRail(2)) | HT_LINE;
 
		else 
 
		else
 
			b = HT_LINE | HT_DIR_X;
 
		y = thd->selstart.y;
 
	} else if (w == 16) { // Or Y direction?
 
@@ -2033,7 +2033,7 @@ static void CalcRaildirsDrawstyle(TileHi
 
			b = (Check2x1AutoRail(1)) | HT_LINE;
 
		else if (dy==-16) // 2x1 other direction
 
			b = (Check2x1AutoRail(0)) | HT_LINE;
 
		else 
 
		else
 
			b = HT_LINE | HT_DIR_Y;
 
		x = thd->selstart.x;
 
	} else if (w > h * 2) { // still count as x dir?
 
@@ -2131,7 +2131,7 @@ void VpSelectTilesWithMethod(int x, int 
 
	thd->selend.y = y;
 
}
 

	
 
// while dragging 
 
// while dragging
 
bool VpHandlePlaceSizingDrag(void)
 
{
 
	Window *w;
 
@@ -2160,7 +2160,7 @@ bool VpHandlePlaceSizingDrag(void)
 
	// mouse button released..
 
	// keep the selected tool, but reset it to the original mode.
 
	_special_mouse_mode = WSM_NONE;
 
	if (_thd.next_drawstyle == HT_RECT) 
 
	if (_thd.next_drawstyle == HT_RECT)
 
		_thd.place_mode = VHM_RECT;
 
	else if ((e.place.userdata & 0xF) == VPM_SIGNALDIRS) // some might call this a hack... -- Dominik
 
		_thd.place_mode = VHM_RECT;
viewport.h
Show inline comments
 
@@ -79,7 +79,7 @@ enum {
 
	HT_RAIL = 0x10, /* autorail (one piece)
 
									 * (uses lower bits to indicate direction) */
 

	
 
	/* lower bits (used with HT_LINE and HT_RAIL): 
 
	/* lower bits (used with HT_LINE and HT_RAIL):
 
	 * (see ASCII art in autorail.h for a visual interpretation) */
 
	HT_DIR_X = 0,  // X direction
 
	HT_DIR_Y = 1,  // Y direction
window.c
Show inline comments
 
@@ -52,8 +52,8 @@ void DispatchLeftClickEvent(Window *w, i
 
			if (e.click.widget == 0) { /* 'X' */
 
				DeleteWindow(w);
 
				return;
 
			} 
 
			
 
			}
 

	
 
			if (e.click.widget == 1) /* 'Title bar' */
 
				StartWindowDrag(w);
 
		}
0 comments (0 inline, 0 general)