Changeset - r8970:a7dc16677ffd
[Not reviewed]
master
0 13 0
rubidium - 16 years ago 2008-04-18 04:54:09
rubidium@openttd.org
(svn r12762) -Fix: tabs after the first non-tab character are generally not okay (or lines starting with a space and then tabs).
13 files changed with 58 insertions and 58 deletions:
0 comments (0 inline, 0 general)
src/ai/default/default.cpp
Show inline comments
 
@@ -3097,7 +3097,7 @@ do_some_terraform:
 
		Axis axis = (TileX(t1) == TileX(t2) ? AXIS_Y : AXIS_X);
 

	
 
		/* try to build a long road instead of bridge - CMD_BUILD_LONG_ROAD has to fail if it couldn't build at least one piece! */
 
 		CommandCost cost = DoCommand(t2, t1, (t2 < t1 ? 1 : 2) | (axis << 2) | (ROADTYPE_ROAD << 3), DC_AUTO | DC_NO_WATER, CMD_BUILD_LONG_ROAD);
 
		CommandCost cost = DoCommand(t2, t1, (t2 < t1 ? 1 : 2) | (axis << 2) | (ROADTYPE_ROAD << 3), DC_AUTO | DC_NO_WATER, CMD_BUILD_LONG_ROAD);
 

	
 
		if (CmdSucceeded(cost) && cost.GetCost() <= p->player_money) {
 
			DoCommand(t2, t1, (t2 < t1 ? 1 : 2) | (axis << 2) | (ROADTYPE_ROAD << 3), DC_AUTO | DC_EXEC | DC_NO_WATER, CMD_BUILD_LONG_ROAD);
src/group_gui.cpp
Show inline comments
 
@@ -206,7 +206,7 @@ static void CreateVehicleGroupWindow(Win
 
	w->widget[GRP_WIDGET_LIST_VEHICLE].data = (w->vscroll2.cap << 8) + 1;
 

	
 
	switch (gv->vehicle_type) {
 
		default: NOT_REACHED(); break;
 
		default: NOT_REACHED();
 
		case VEH_TRAIN:    gv->_sorting = &_sorting.train;    break;
 
		case VEH_ROAD:     gv->_sorting = &_sorting.roadveh;  break;
 
		case VEH_SHIP:     gv->_sorting = &_sorting.ship;     break;
 
@@ -217,11 +217,11 @@ static void CreateVehicleGroupWindow(Win
 
	gv->vehicle_type = (VehicleType)GB(w->window_number, 11, 5);
 
	gv->l.sort_type = gv->_sorting->criteria;
 
	gv->l.flags = VL_REBUILD | (gv->_sorting->order ? VL_DESC : VL_NONE);
 
	gv->l.resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;	// Set up resort timer
 
	gv->l.resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS; // Set up resort timer
 

	
 
	gl->sort_list = NULL;
 
	gl->l.flags = VL_REBUILD | VL_NONE;
 
	gl->l.resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;	// Set up resort timer
 
	gl->l.resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS; // Set up resort timer
 

	
 
	gv->group_sel = ALL_GROUP;
 
	gv->vehicle_sel = INVALID_VEHICLE;
 
@@ -398,7 +398,7 @@ static void GroupWndProc(Window *w, Wind
 
						w->widget[GRP_WIDGET_CAPTION].data =  STR_A009_AIRCRAFT;
 
						w->widget[GRP_WIDGET_REPLACE_PROTECTION].data = SPR_GROUP_REPLACE_OFF_AIRCRAFT;
 
						break;
 
					default: NOT_REACHED(); break;
 
					default: NOT_REACHED();
 
				}
 
			} else {
 
				const Group *g = GetGroup(gv->group_sel);
 
@@ -423,7 +423,7 @@ static void GroupWndProc(Window *w, Wind
 
						w->widget[GRP_WIDGET_CAPTION].data = STR_GROUP_AIRCRAFTS_CAPTION;
 
						w->widget[GRP_WIDGET_REPLACE_PROTECTION].data = (g->replace_protection) ? SPR_GROUP_REPLACE_ON_AIRCRAFT : SPR_GROUP_REPLACE_OFF_AIRCRAFT;
 
						break;
 
					default: NOT_REACHED(); break;
 
					default: NOT_REACHED();
 
				}
 
			}
 

	
 
@@ -453,7 +453,7 @@ static void GroupWndProc(Window *w, Wind
 
					str_all_veh = STR_GROUP_ALL_AIRCRAFTS;
 
					str_no_group_veh = STR_GROUP_DEFAULT_AIRCRAFTS;
 
					break;
 
				default: NOT_REACHED(); break;
 
				default: NOT_REACHED();
 
			}
 
			DrawString(10, y1, str_all_veh, IsAllGroupID(gv->group_sel) ? TC_WHITE : TC_BLACK);
 

	
 
@@ -600,7 +600,7 @@ static void GroupWndProc(Window *w, Wind
 

	
 
					SetDParam(0, g->index);
 
					ShowQueryString(STR_GROUP_NAME, STR_GROUP_RENAME_CAPTION, 31, 150, w, CS_ALPHANUMERAL);
 
				}	break;
 
				} break;
 

	
 

	
 
				case GRP_WIDGET_AVAILABLE_VEHICLES:
src/intro_gui.cpp
Show inline comments
 
@@ -106,7 +106,7 @@ static void SelectGameWndProc(Window *w,
 
					}
 
					break;
 

	
 
				case SGI_TEMPERATE_LANDSCAPE:	case SGI_ARCTIC_LANDSCAPE:
 
				case SGI_TEMPERATE_LANDSCAPE: case SGI_ARCTIC_LANDSCAPE:
 
				case SGI_TROPIC_LANDSCAPE: case SGI_TOYLAND_LANDSCAPE:
 
					w->RaiseWidget(_opt_newgame.landscape + SGI_TEMPERATE_LANDSCAPE);
 
					SetNewLandscapeType(e->we.click.widget - SGI_TEMPERATE_LANDSCAPE);
src/network/network_udp.cpp
Show inline comments
 
@@ -293,7 +293,7 @@ DEF_UDP_RECEIVE_COMMAND(Client, PACKET_U
 

	
 
		for (c = item->info.grfconfig; c != NULL; c = c->next) {
 
			if (c->status == GCS_NOT_FOUND) item->info.compatible = false;
 
 			if (c->status != GCS_NOT_FOUND || strcmp(c->name, UNKNOWN_GRF_NAME_PLACEHOLDER) != 0) continue;
 
			if (c->status != GCS_NOT_FOUND || strcmp(c->name, UNKNOWN_GRF_NAME_PLACEHOLDER) != 0) continue;
 
			in_request[in_request_count] = c;
 
			in_request_count++;
 
		}
src/newgrf_industries.cpp
Show inline comments
 
@@ -287,7 +287,7 @@ uint32 IndustryGetVariable(const Resolve
 
		/* Distance of nearest industry of given type */
 
		case 0x64: return GetClosestIndustry(tile, MapNewGRFIndustryType(parameter, indspec->grf_prop.grffile->grfid), industry);
 
		/* Get town zone and Manhattan distance of closest town */
 
 		case 0x65: return GetTownRadiusGroup(industry->town, tile) << 16 | min(DistanceManhattan(tile, industry->town->xy), 0xFFFF);
 
		case 0x65: return GetTownRadiusGroup(industry->town, tile) << 16 | min(DistanceManhattan(tile, industry->town->xy), 0xFFFF);
 
		/* Get square of Euclidian distance of closes town */
 
		case 0x66: return GetTownRadiusGroup(industry->town, tile) << 16 | min(DistanceSquare(tile, industry->town->xy), 0xFFFF);
 

	
src/news_gui.cpp
Show inline comments
 
@@ -402,20 +402,20 @@ static WindowDesc _news_type0_desc = {
 
};
 

	
 
static const SoundFx _news_sounds[NT_END] = {
 
	SND_1D_APPLAUSE,	///< NT_ARRIVAL_PLAYER
 
	SND_1D_APPLAUSE,	///< NT_ARRIVAL_OTHER
 
	SND_BEGIN,		///< NT_ACCIDENT
 
	SND_BEGIN,		///< NT_COMPANY_INFO
 
	SND_BEGIN,		///< NT_OPENCLOSE
 
	SND_BEGIN,		///< NT_ECONOMY
 
	SND_BEGIN,		///< NT_INDUSTRY_PLAYER
 
	SND_BEGIN,		///< NT_INDUSTRY_OTHER
 
	SND_BEGIN,		///< NT_INDUSTRY_NOBODY
 
	SND_BEGIN,		///< NT_ADVICE
 
	SND_1E_OOOOH,		///< NT_NEW_VEHICLES
 
	SND_BEGIN,		///< NT_ACCEPTANCE
 
	SND_BEGIN,		///< NT_SUBSIDIES
 
	SND_BEGIN,		///< NT_GENERAL
 
	SND_1D_APPLAUSE, ///< NT_ARRIVAL_PLAYER
 
	SND_1D_APPLAUSE, ///< NT_ARRIVAL_OTHER
 
	SND_BEGIN,       ///< NT_ACCIDENT
 
	SND_BEGIN,       ///< NT_COMPANY_INFO
 
	SND_BEGIN,       ///< NT_OPENCLOSE
 
	SND_BEGIN,       ///< NT_ECONOMY
 
	SND_BEGIN,       ///< NT_INDUSTRY_PLAYER
 
	SND_BEGIN,       ///< NT_INDUSTRY_OTHER
 
	SND_BEGIN,       ///< NT_INDUSTRY_NOBODY
 
	SND_BEGIN,       ///< NT_ADVICE
 
	SND_1E_OOOOH,    ///< NT_NEW_VEHICLES
 
	SND_BEGIN,       ///< NT_ACCEPTANCE
 
	SND_BEGIN,       ///< NT_SUBSIDIES
 
	SND_BEGIN,       ///< NT_GENERAL
 
};
 

	
 
const char *_news_display_name[NT_END] = {
src/signal.cpp
Show inline comments
 
@@ -422,11 +422,11 @@ static void UpdateSignalsAroundSegment(S
 
			/* train in the segment */
 
			newstate = SIGNAL_STATE_RED;
 
		} else {
 
 			/* is it a bidir combo? - then do not count its other signal direction as exit */
 
			/* is it a bidir combo? - then do not count its other signal direction as exit */
 
			if (sig == SIGTYPE_COMBO && HasSignalOnTrackdir(tile, ReverseTrackdir(trackdir))) {
 
				/* at least one more exit */
 
				if (flags & SF_EXIT2 &&
 
 						/* no green exit */
 
						/* no green exit */
 
						(!(flags & SF_GREEN) ||
 
						/* only one green exit, and it is this one - so all other exits are red */
 
						(!(flags & SF_GREEN2) && GetSignalStateByTrackdir(tile, ReverseTrackdir(trackdir)) == SIGNAL_STATE_GREEN))) {
 
@@ -507,7 +507,7 @@ static bool UpdateSignalsInBuffer(Owner 
 
			case MP_STATION:
 
			case MP_ROAD:
 
				if ((TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, 0)) & _enterdir_to_trackbits[dir]) != TRACK_BIT_NONE) {
 
 					/* only add to set when there is some 'interesting' track */
 
					/* only add to set when there is some 'interesting' track */
 
					_tbdset.Add(tile, dir);
 
					_tbdset.Add(tile + TileOffsByDiagDir(dir), ReverseDiagDir(dir));
 
					break;
src/station_cmd.cpp
Show inline comments
 
@@ -435,13 +435,13 @@ static void ShowRejectOrAcceptNews(const
 
}
 

	
 
/**
 
* Get a list of the cargo types being produced around the tile (in a rectangle).
 
* @param produced: Destination array of produced cargo
 
* @param tile: Center of the search area
 
* @param w: Width of the center
 
* @param h: Height of the center
 
* @param rad: Radius of the search area
 
*/
 
 * Get a list of the cargo types being produced around the tile (in a rectangle).
 
 * @param produced: Destination array of produced cargo
 
 * @param tile: Center of the search area
 
 * @param w: Width of the center
 
 * @param h: Height of the center
 
 * @param rad: Radius of the search area
 
 */
 
void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile,
 
	int w, int h, int rad)
 
{
 
@@ -484,13 +484,13 @@ void GetProductionAroundTiles(AcceptedCa
 
}
 

	
 
/**
 
* Get a list of the cargo types that are accepted around the tile.
 
* @param accepts: Destination array of accepted cargo
 
* @param tile: Center of the search area
 
* @param w: Width of the center
 
* @param h: Height of the center
 
* @param rad: Radius of the rectangular search area
 
*/
 
 * Get a list of the cargo types that are accepted around the tile.
 
 * @param accepts: Destination array of accepted cargo
 
 * @param tile: Center of the search area
 
 * @param w: Width of the center
 
 * @param h: Height of the center
 
 * @param rad: Radius of the rectangular search area
 
 */
 
void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile,
 
	int w, int h, int rad)
 
{
 
@@ -1188,7 +1188,7 @@ CommandCost CmdRemoveFromRailroadStation
 

	
 
		/* Do not allow removing from stations if non-uniform stations are not enabled
 
		 * The check must be here to give correct error message
 
 		 */
 
		 */
 
		if (!_patches.nonuniform_stations) return_cmd_error(STR_NONUNIFORM_STATIONS_DISALLOWED);
 

	
 
		/* If we reached here, the tile is valid so increase the quantity of tiles we will remove */
 
@@ -2770,10 +2770,10 @@ StationSet FindStationsAroundIndustryTil
 

	
 
uint MoveGoodsToStation(TileIndex tile, int w, int h, CargoID type, uint amount)
 
{
 
	Station *st1 = NULL;	// Station with best rating
 
	Station *st2 = NULL;	// Second best station
 
	uint best_rating1 = 0;	// rating of st1
 
	uint best_rating2 = 0;	// rating of st2
 
	Station *st1 = NULL;   // Station with best rating
 
	Station *st2 = NULL;   // Second best station
 
	uint best_rating1 = 0; // rating of st1
 
	uint best_rating2 = 0; // rating of st2
 

	
 
	StationSet all_stations = FindStationsAroundIndustryTile(tile, w, h);
 
	for (StationSet::iterator st_iter = all_stations.begin(); st_iter != all_stations.end(); ++st_iter) {
src/timetable_cmd.cpp
Show inline comments
 
@@ -160,15 +160,15 @@ void UpdateVehicleTimetable(Vehicle *v, 
 
	if (!_patches.timetabling) return;
 

	
 
	/* Make sure the timetable only starts when the vehicle reaches the first
 
 	 * order, not when travelling from the depot to the first station. */
 
 	if (v->cur_order_index == 0 && !HasBit(v->vehicle_flags, VF_TIMETABLE_STARTED)) {
 
 		SetBit(v->vehicle_flags, VF_TIMETABLE_STARTED);
 
 		return;
 
 	}
 
	 * order, not when travelling from the depot to the first station. */
 
	if (v->cur_order_index == 0 && !HasBit(v->vehicle_flags, VF_TIMETABLE_STARTED)) {
 
		SetBit(v->vehicle_flags, VF_TIMETABLE_STARTED);
 
		return;
 
	}
 

	
 
	if (!HasBit(v->vehicle_flags, VF_TIMETABLE_STARTED)) return;
 

	
 
 	if (HasBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE)) {
 
	if (HasBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE)) {
 
		if (timetabled == 0) {
 
			/* Round the time taken up to the nearest day, as this will avoid
 
			 * confusion for people who are timetabling in days, and can be
 
@@ -182,7 +182,7 @@ void UpdateVehicleTimetable(Vehicle *v, 
 
			 * assume that autofill is finished and turn it off again. */
 
			ClrBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE);
 
		}
 
 	}
 
	}
 

	
 
	/* Vehicles will wait at stations if they arrive early even if they are not
 
	 * timetabled to wait there, so make sure the lateness counter is updated
src/town_cmd.cpp
Show inline comments
 
@@ -1064,7 +1064,7 @@ static void GrowTownInTile(TileIndex *ti
 

	
 
			case TL_3X3_GRID:
 
			case TL_2X2_GRID:
 
			 	rcmd = GetTownRoadGridElement(t1, tile, target_dir);
 
				rcmd = GetTownRoadGridElement(t1, tile, target_dir);
 
				break;
 

	
 
			case TL_BETTER_ROADS:
src/vehicle.cpp
Show inline comments
 
@@ -2074,7 +2074,7 @@ uint GenerateVehicleSortList(const Vehic
 
			break;
 
		}
 

	
 
 		case VLW_GROUP_LIST:
 
		case VLW_GROUP_LIST:
 
			FOR_ALL_VEHICLES(v) {
 
				if (v->type == type && v->IsPrimaryVehicle() &&
 
						v->owner == owner && v->group_id == index) {
src/waypoint.cpp
Show inline comments
 
@@ -100,7 +100,7 @@ static void MakeDefaultWaypointName(Wayp
 
		Waypoint *lwp = GetWaypoint(cid);
 

	
 
		/* check only valid waypoints... */
 
 		if (lwp->IsValid() && wp != lwp) {
 
		if (lwp->IsValid() && wp != lwp) {
 
			/* only waypoints with 'generic' name within the same city */
 
			if (lwp->name == NULL && lwp->town_index == wp->town_index) {
 
				/* if lwp->town_cn < next, uint will overflow to '+inf' */
src/win32.cpp
Show inline comments
 
@@ -1021,7 +1021,7 @@ void GetCurrentDirectoryW(int length, wc
 
char *getcwd(char *buf, size_t size)
 
{
 
#if defined(WINCE)
 
 	TCHAR path[MAX_PATH];
 
	TCHAR path[MAX_PATH];
 
	GetModuleFileName(NULL, path, MAX_PATH);
 
	convert_from_fs(path, buf, size);
 
	/* GetModuleFileName returns dir with file, so remove everything behind latest '\\' */
0 comments (0 inline, 0 general)