Changeset - r15594:ba7e42fbae24
src/ai/api/ai_company.hpp
Show inline comments
 
@@ -93,7 +93,7 @@ public:
 
	 * @param gender The new gender for your president.
 
	 * @pre GetPresidentGender(AICompany.COMPANY_SELF) != gender.
 
	 * @return True if the gender was changed.
 
	 * @note When succesfull a random face will be created.
 
	 * @note When successful a random face will be created.
 
	 */
 
	static bool SetPresidentGender(Gender gender);
 

	
src/ai/api/ai_error.hpp
Show inline comments
 
@@ -76,7 +76,7 @@ public:
 
	enum ErrorMessages {
 
		/** Initial error value */
 
		ERR_NONE = ERR_CAT_NONE << ERR_CAT_BIT_SIZE,  // []
 
		/** If an error occured and the error wasn't mapped */
 
		/** If an error occurred and the error wasn't mapped */
 
		ERR_UNKNOWN,                                  // []
 
		/** If a precondition is not met */
 
		ERR_PRECONDITION_FAILED,                      // []
src/ai/api/ai_group.hpp
Show inline comments
 
@@ -54,7 +54,7 @@ public:
 
	 *  given group will move to the GROUP_DEFAULT.
 
	 * @param group_id The group to delete.
 
	 * @pre IsValidGroup(group_id).
 
	 * @return True if and only if the group was succesfully deleted.
 
	 * @return True if and only if the group was successfully deleted.
 
	 */
 
	static bool DeleteGroup(GroupID group_id);
 

	
 
@@ -92,7 +92,7 @@ public:
 
	 * @param group_id The group to change the protection for.
 
	 * @param enable True if protection should be enabled.
 
	 * @pre IsValidGroup(group_id).
 
	 * @return True if and only if the protection was succesfully changed.
 
	 * @return True if and only if the protection was successfully changed.
 
	 */
 
	static bool EnableAutoReplaceProtection(GroupID group_id, bool enable);
 

	
 
@@ -119,7 +119,7 @@ public:
 
	 * @param vehicle_id The vehicle to move to the group.
 
	 * @pre IsValidGroup(group_id) || group_id == GROUP_DEFAULT.
 
	 * @pre AIVehicle::IsValidVehicle(vehicle_id).
 
	 * @return True if and only if the vehicle was succesfully moved to the group.
 
	 * @return True if and only if the vehicle was successfully moved to the group.
 
	 * @note A vehicle can be in only one group at the same time. To remove it from
 
	 *  a group, move it to another or to GROUP_DEFAULT. Moving the vehicle to the
 
	 *  given group means removing it from another group.
 
@@ -132,7 +132,7 @@ public:
 
	 *  If enabled, wagons are removed from the end of the vehicle until it
 
	 *  fits in the same number of tiles as it did before.
 
	 * @param keep_length If true, wagons will be removed if the a new engine is longer.
 
	 * @return True if and only if the value was succesfully changed.
 
	 * @return True if and only if the value was successfully changed.
 
	 */
 
	static bool EnableWagonRemoval(bool keep_length);
 

	
 
@@ -169,7 +169,7 @@ public:
 
	 * @param group_id The group to stop replacing the engine in.
 
	 * @param engine_id The engine id to stop replacing with another engine.
 
	 * @pre IsValidGroup(group_id) || group_id == GROUP_DEFAULT || group_id == GROUP_ALL.
 
	 * @return True if and if the replacing was succesfully stopped.
 
	 * @return True if and if the replacing was successfully stopped.
 
	 */
 
	static bool StopAutoReplace(GroupID group_id, EngineID engine_id);
 
};
src/ai/api/ai_industrytype.hpp
Show inline comments
 
@@ -114,7 +114,7 @@ public:
 
	 * @param industry_type The type of the industry to build.
 
	 * @param tile The tile to build the industry on.
 
	 * @pre CanBuildIndustry(industry_type).
 
	 * @return True if the industry was succesfully build.
 
	 * @return True if the industry was successfully build.
 
	 */
 
	static bool BuildIndustry(IndustryType industry_type, TileIndex tile);
 

	
 
@@ -123,7 +123,7 @@ public:
 
	 * an industry on a random place on the map.
 
	 * @param industry_type The type of the industry.
 
	 * @pre CanProspectIndustry(industry_type).
 
	 * @return True if no error occured while trying to prospect.
 
	 * @return True if no error occurred while trying to prospect.
 
	 * @note Even if true is returned there is no guarantee a new industry is build.
 
	 * @note If true is returned the money is paid, whether a new industry was build or not.
 
	 */
src/ai/api/ai_rail.hpp
Show inline comments
 
@@ -194,7 +194,7 @@ public:
 
	 * @pre AIMap::IsValidTile(end_tile).
 
	 * @pre IsRailTypeAvailable(convert_to).
 
	 * @exception AIRail::ERR_UNSUITABLE_TRACK
 
	 * @return Whether at least some rail has been converted succesfully.
 
	 * @return Whether at least some rail has been converted successfully.
 
	 */
 
	static bool ConvertRailType(TileIndex start_tile, TileIndex end_tile, AIRail::RailType convert_to);
 

	
src/ai/api/ai_tile.hpp
Show inline comments
 
@@ -398,7 +398,7 @@ public:
 
	 * @exception AIError::ERR_TOO_CLOSE_TO_EDGE
 
	 * @return True if one or more tiles were leveled.
 
	 * @note Even if leveling some part fails, some other part may have been
 
	 *  succesfully leveled already.
 
	 *  successfully leveled already.
 
	 * @note This function may return true in AITestMode, although it fails in
 
	 *  AIExecMode.
 
	 */
src/company_cmd.cpp
Show inline comments
 
@@ -77,7 +77,7 @@ void Company::PostDestructor(size_t inde
 
	InvalidateWindowData(WC_GRAPH_LEGEND, 0, (int)index);
 
	InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, (int)index);
 
	InvalidateWindowData(WC_COMPANY_LEAGUE, 0, 0);
 
	/* If the currently shown error message has this company in it, the close it. */
 
	/* If the currently shown error message has this company in it, then close it. */
 
	InvalidateWindowData(WC_ERRMSG, 0);
 
}
 

	
 
@@ -461,7 +461,7 @@ void ResetCompanyLivery(Company *c)
 
/**
 
 * Create a new company and sets all company variables default values
 
 *
 
 * @param is_ai is a ai company?
 
 * @param is_ai is an AI company?
 
 * @param company CompanyID to use for the new company
 
 * @return the company struct
 
 */
src/console_internal.h
Show inline comments
 
@@ -21,7 +21,7 @@ static const uint ICON_MAX_STREAMSIZE = 
 
enum ConsoleHookResult {
 
	CHR_ALLOW,    ///< Allow command execution.
 
	CHR_DISALLOW, ///< Disallow command execution.
 
	CHR_HIDE,     ///< Hide the existance of the command.
 
	CHR_HIDE,     ///< Hide the existence of the command.
 
};
 

	
 
/** --Commands--
src/core/bitmath_func.hpp
Show inline comments
 
@@ -178,7 +178,7 @@ static FORCEINLINE T ToggleBit(T &x, con
 
extern const uint8 _ffb_64[64];
 

	
 
/**
 
 * Returns the first occure of a bit in a 6-bit value (from right).
 
 * Returns the first non-zero bit in a 6-bit value (from right).
 
 *
 
 * Returns the position of the first bit that is not zero, counted from the
 
 * LSB. Ie, 110100 returns 2, 000001 returns 0, etc. When x == 0 returns
 
@@ -190,7 +190,7 @@ extern const uint8 _ffb_64[64];
 
#define FIND_FIRST_BIT(x) _ffb_64[(x)]
 

	
 
/**
 
 * Finds the position of the first bit in an integer.
 
 * Finds the position of the first non-zero bit in an integer.
 
 *
 
 * This function returns the position of the first bit set in the
 
 * integer. It does only check the bits of the bitmask
src/core/smallvec_type.hpp
Show inline comments
 
@@ -22,8 +22,8 @@
 
 *       to care about that you grab an item which is
 
 *       inside the list.
 
 *
 
 * @param T The type of the items stored
 
 * @param S The steps of allocation
 
 * @tparam T The type of the items stored
 
 * @tparam S The steps of allocation
 
 */
 
template <typename T, uint S>
 
class SmallVector {
src/economy.cpp
Show inline comments
 
@@ -698,7 +698,7 @@ static void CompaniesPayInterest()
 
		 * but... as that number is likely not dividable by 12 (pay each month),
 
		 * one needs to account for that in the monthly fee calculations.
 
		 * To easily calculate what one should pay "this" month, you calculate
 
		 * what (total) should have been paid up to this month and you substract
 
		 * what (total) should have been paid up to this month and you subtract
 
		 * whatever has been paid in the previous months. This will mean one month
 
		 * it'll be a bit more and the other it'll be a bit less than the average
 
		 * monthly fee, but on average it will be exact. */
 
@@ -1306,7 +1306,7 @@ static void LoadUnloadVehicle(Vehicle *v
 
		}
 
	}
 

	
 
	/* Only set completly_emptied, if we just unloaded all remaining cargo */
 
	/* Only set completely_emptied, if we just unloaded all remaining cargo */
 
	completely_emptied &= anything_unloaded;
 

	
 
	/* We update these variables here, so gradual loading still fills
 
@@ -1340,7 +1340,7 @@ static void LoadUnloadVehicle(Vehicle *v
 
				/* if the aircraft carries passengers and is NOT full, then
 
				 * continue loading, no matter how much mail is in */
 
				if ((v->type == VEH_AIRCRAFT && IsCargoInClass(v->cargo_type, CC_PASSENGERS) && v->cargo_cap > v->cargo.Count()) ||
 
						(cargo_not_full && (cargo_full & ~cargo_not_full) == 0)) { // There are stull non-full cargos
 
						(cargo_not_full && (cargo_full & ~cargo_not_full) == 0)) { // There are still non-full cargos
 
					finished_loading = false;
 
				}
 
			} else if (cargo_not_full != 0) {
src/fontcache.cpp
Show inline comments
 
@@ -534,7 +534,7 @@ bool SetFallbackFont(FreeTypeSettings *s
 
				ATSUSetAttributes(style, 1, &tag, &size, &val);
 
				offset += run_len;
 
			}
 
			/* Exit if the end of the string is reached or some other error occured. */
 
			/* Exit if the end of the string is reached or some other error occurred. */
 
		} while (os_err == kATSUFontsMatched && offset < (UniCharArrayOffset)str_len);
 

	
 
		if (os_err == noErr || os_err == kATSUFontsMatched) {
src/gfxinit.cpp
Show inline comments
 
@@ -114,7 +114,7 @@ void CheckExternalFiles()
 
	const char *last = lastof(error_msg);
 

	
 
	if (used_set->GetNumInvalid() != 0) {
 
		/* Not all files were loaded succesfully, see which ones */
 
		/* Not all files were loaded successfully, see which ones */
 
		add_pos += seprintf(add_pos, last, "Trying to load graphics set '%s', but it is incomplete. The game will probably not run correctly until you properly install this set or select another one. See section 4.1 of readme.txt.\n\nThe following files are corrupted or missing:\n", used_set->name);
 
		for (uint i = 0; i < GraphicsSet::NUM_FILES; i++) {
 
			MD5File::ChecksumResult res = used_set->files[i].CheckMD5(DATA_DIR);
src/group_gui.cpp
Show inline comments
 
@@ -506,7 +506,7 @@ public:
 
				this->SetDirty();
 
				break;
 

	
 
			case GRP_WIDGET_LIST_GROUP: { // Maxtrix group
 
			case GRP_WIDGET_LIST_GROUP: { // Matrix group
 
				const VehicleID vindex = this->vehicle_sel;
 
				this->vehicle_sel = INVALID_VEHICLE;
 
				this->SetDirty();
 
@@ -518,7 +518,7 @@ public:
 
				break;
 
			}
 

	
 
			case GRP_WIDGET_LIST_VEHICLE: { // Maxtrix vehicle
 
			case GRP_WIDGET_LIST_VEHICLE: { // Matrix vehicle
 
				const VehicleID vindex = this->vehicle_sel;
 
				this->vehicle_sel = INVALID_VEHICLE;
 
				this->SetDirty();
src/highscore.cpp
Show inline comments
 
@@ -116,7 +116,7 @@ int8 SaveHighScoreValueNetwork()
 
		}
 
	}
 

	
 
	/* Add top5 companys to highscore table */
 
	/* Add top5 companies to highscore table */
 
	return company;
 
}
 

	
src/industry_gui.cpp
Show inline comments
 
@@ -870,7 +870,7 @@ static void UpdateIndustryProduction(Ind
 
	}
 
}
 

	
 
/** Widget definition of the view industy gui */
 
/** Widget definition of the view industry gui */
 
static const NWidgetPart _nested_industry_view_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_CLOSEBOX, COLOUR_CREAM),
 
@@ -893,7 +893,7 @@ static const NWidgetPart _nested_industr
 
	EndContainer(),
 
};
 

	
 
/** Window definition of the view industy gui */
 
/** Window definition of the view industry gui */
 
static const WindowDesc _industry_view_desc(
 
	WDP_AUTO, 260, 120,
 
	WC_INDUSTRY_VIEW, WC_NONE,
 
@@ -914,7 +914,7 @@ enum IndustryDirectoryWidgets {
 
	IDW_SCROLLBAR,
 
};
 

	
 
/** Widget definition of the industy directory gui */
 
/** Widget definition of the industry directory gui */
 
static const NWidgetPart _nested_industry_directory_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
 
@@ -1255,7 +1255,7 @@ const StringID IndustryDirectoryWindow::
 
};
 

	
 

	
 
/** Window definition of the industy directory gui */
 
/** Window definition of the industry directory gui */
 
static const WindowDesc _industry_directory_desc(
 
	WDP_AUTO, 428, 190,
 
	WC_INDUSTRY_DIRECTORY, WC_NONE,
src/misc/binaryheap.hpp
Show inline comments
 
@@ -23,7 +23,7 @@
 

	
 
/**
 
 * Binary Heap as C++ template.
 
 *  A carrier which keeps its items automaticaly holds the smallest item at
 
 *  A carrier which keeps its items automatically holds the smallest item at
 
 *  the first position. The order of items is maintained by using a binary tree.
 
 *  The implementation is used for priority queue's.
 
 *
 
@@ -36,7 +36,7 @@
 
 * are allocated elsewhere.
 
 *
 
 * @par Implementation notes:
 
 * Internaly the first item is never used, because that simplifies the
 
 * Internally the first item is never used, because that simplifies the
 
 * implementation.
 
 *
 
 * @par
src/network/core/tcp_http.cpp
Show inline comments
 
@@ -90,8 +90,8 @@ static const char * const LOCATION      
 
 * @return amount of data to continue downloading.
 
 *         > 0: we need to download N bytes.
 
 *         = 0: we're being redirected.
 
 *         < 0: an error occured. Downloading failed.
 
 * @note if an error occured the header might not be in its
 
 *         < 0: an error occurred. Downloading failed.
 
 * @note if an error occurred the header might not be in its
 
 *       original state. No effort is undertaken to bring
 
 *       the header in its original state.
 
 */
src/network/core/tcp_http.h
Show inline comments
 
@@ -21,7 +21,7 @@
 
/** Callback for when the HTTP handler has something to tell us. */
 
struct HTTPCallback {
 
	/**
 
	 * An error has occured and the connection has been closed.
 
	 * An error has occurred and the connection has been closed.
 
	 * @note HTTP socket handler is closed/freed.
 
	 */
 
	virtual void OnFailure() = 0;
src/newgrf.cpp
Show inline comments
 
@@ -223,7 +223,7 @@ typedef std::map<GRFLocation, byte*> GRF
 
static GRFLineToSpriteOverride _grf_line_to_action6_sprite_override;
 

	
 
/** DEBUG() function dedicated to newGRF debugging messages
 
 * Function is essentialy the same as DEBUG(grf, severity, ...) with the
 
 * Function is essentially the same as DEBUG(grf, severity, ...) with the
 
 * addition of file:line information when parsing grf files.
 
 * NOTE: for the above reason(s) grfmsg() should ONLY be used for
 
 * loading/parsing grf files, not for runtime debug messages as there
src/newgrf_config.cpp
Show inline comments
 
@@ -406,7 +406,7 @@ void ResetGRFConfig(bool defaults)
 
 * @param grfconfig GrfConfig to check
 
 * @return will return any of the following 3 values:<br>
 
 * <ul>
 
 * <li> GLC_ALL_GOOD: No problems occured, all GRF files were found and loaded
 
 * <li> GLC_ALL_GOOD: No problems occurred, all GRF files were found and loaded
 
 * <li> GLC_COMPATIBLE: For one or more GRF's no exact match was found, but a
 
 *     compatible GRF with the same grfid was found and used instead
 
 * <li> GLC_NOT_FOUND: For one or more GRF's no match was found at all
src/newgrf_house.cpp
Show inline comments
 
@@ -142,7 +142,7 @@ uint32 GetNearbyTileInformation(byte par
 

	
 
/** Structure with user-data for SearchNearbyHouseXXX - functions */
 
typedef struct {
 
	const HouseSpec *hs;  ///< Specs of the house, that startet the search
 
	const HouseSpec *hs;  ///< Specs of the house, that started the search
 
	TileIndex north_tile; ///< Northern tile of the house.
 
} SearchNearbyHouseData;
 

	
src/newgrf_station.cpp
Show inline comments
 
@@ -228,12 +228,12 @@ const StationSpec *GetCustomStationSpecB
 
}
 

	
 

	
 
/* Evaluate a tile's position within a station, and return the result a bitstuffed format.
 
 * if not centred: .TNLcCpP, if centred: .TNL..CP
 
 * T = Tile layout number (GetStationGfx), N = Number of platforms, L = Length of platforms
 
/* Evaluate a tile's position within a station, and return the result a bit-stuffed format.
 
 * if not centered: .TNLcCpP, if centered: .TNL..CP
 
 * T = Tile layout number (#GetStationGfx), N = Number of platforms, L = Length of platforms
 
 * C = Current platform number from start, c = from end
 
 * P = Position along platform from start, p = from end
 
 * if centred, C/P start from the centre and c/p are not available.
 
 * if centered, C/P start from the centre and c/p are not available.
 
 */
 
uint32 GetPlatformInfo(Axis axis, byte tile, int platforms, int length, int x, int y, bool centred)
 
{
src/os/macosx/crashlog_osx.cpp
Show inline comments
 
@@ -196,7 +196,7 @@ public:
 
	void DisplayCrashDialog() const
 
	{
 
		static const char crash_title[] =
 
			"A serious fault condition occured in the game. The game will shut down.";
 
			"A serious fault condition occurred in the game. The game will shut down.";
 

	
 
		char message[1024];
 
		seprintf(message, lastof(message),
 
@@ -225,14 +225,14 @@ void CDECL HandleCrash(int signum)
 
	}
 

	
 
	if (GamelogTestEmergency()) {
 
		ShowMacDialog("A serious fault condition occured in the game. The game will shut down.",
 
		ShowMacDialog("A serious fault condition occurred in the game. The game will shut down.",
 
				"As you loaded an emergency savegame no crash information will be generated.\n",
 
				"Quit");
 
		abort();
 
	}
 

	
 
	if (SaveloadCrashWithMissingNewGRFs()) {
 
		ShowMacDialog("A serious fault condition occured in the game. The game will shut down.",
 
		ShowMacDialog("A serious fault condition occurred in the game. The game will shut down.",
 
				"As you loaded an savegame for which you do not have the required NewGRFs no crash information will be generated.\n",
 
				"Quit");
 
		abort();
src/os/unix/crashlog_unix.cpp
Show inline comments
 
@@ -156,13 +156,13 @@ static void CDECL HandleCrash(int signum
 
	}
 

	
 
	if (GamelogTestEmergency()) {
 
		printf("A serious fault condition occured in the game. The game will shut down.\n");
 
		printf("A serious fault condition occurred in the game. The game will shut down.\n");
 
		printf("As you loaded an emergency savegame no crash information will be generated.\n");
 
		abort();
 
	}
 

	
 
	if (SaveloadCrashWithMissingNewGRFs()) {
 
		printf("A serious fault condition occured in the game. The game will shut down.\n");
 
		printf("A serious fault condition occurred in the game. The game will shut down.\n");
 
		printf("As you loaded an savegame for which you do not have the required NewGRFs\n");
 
		printf("no crash information will be generated.\n");
 
		abort();
src/os/windows/crashlog_win.cpp
Show inline comments
 
@@ -368,7 +368,7 @@ static LONG WINAPI ExceptionHandler(EXCE
 

	
 
	if (GamelogTestEmergency()) {
 
		static const TCHAR _emergency_crash[] =
 
			_T("A serious fault condition occured in the game. The game will shut down.\n")
 
			_T("A serious fault condition occurred in the game. The game will shut down.\n")
 
			_T("As you loaded an emergency savegame no crash information will be generated.\n");
 
		MessageBox(NULL, _emergency_crash, _T("Fatal Application Failure"), MB_ICONERROR);
 
		ExitProcess(3);
 
@@ -376,7 +376,7 @@ static LONG WINAPI ExceptionHandler(EXCE
 

	
 
	if (SaveloadCrashWithMissingNewGRFs()) {
 
		static const TCHAR _saveload_crash[] =
 
			_T("A serious fault condition occured in the game. The game will shut down.\n")
 
			_T("A serious fault condition occurred in the game. The game will shut down.\n")
 
			_T("As you loaded an savegame for which you do not have the required NewGRFs\n")
 
			_T("no crash information will be generated.\n");
 
		MessageBox(NULL, _saveload_crash, _T("Fatal Application Failure"), MB_ICONERROR);
 
@@ -445,7 +445,7 @@ static void CDECL CustomAbort(int signal
 
static bool _expanded;
 

	
 
static const TCHAR _crash_desc[] =
 
	_T("A serious fault condition occured in the game. The game will shut down.\n")
 
	_T("A serious fault condition occurred in the game. The game will shut down.\n")
 
	_T("Please send the crash information and the crash.dmp file (if any) to the developers.\n")
 
	_T("This will greatly help debugging. The correct place to do this is http://bugs.openttd.org. ")
 
	_T("The information contained in the report is displayed below.\n")
src/pathfinder/npf/npf.cpp
Show inline comments
 
@@ -523,7 +523,7 @@ static int32 NPFRailPathCost(AyStar *as,
 
	/* Check for reverse in depot */
 
	if (IsRailDepotTile(tile) && as->EndNodeCheck(as, &new_node) != AYSTAR_FOUND_END_NODE) {
 
		/* Penalise any depot tile that is not the last tile in the path. This
 
		 * _should_ penalise every occurence of reversing in a depot (and only
 
		 * _should_ penalise every occurrence of reversing in a depot (and only
 
		 * that) */
 
		cost += _settings_game.pf.npf.npf_rail_depot_reverse_penalty;
 
	}
src/road.cpp
Show inline comments
 
@@ -56,7 +56,7 @@ RoadBits CleanUpRoadBits(const TileIndex
 
					connective = true;
 
					break;
 

	
 
				/* The conditionaly connective ones */
 
				/* The conditionally connective ones */
 
				case MP_TUNNELBRIDGE:
 
				case MP_STATION:
 
				case MP_ROAD: {
src/saveload/oldloader_sl.cpp
Show inline comments
 
@@ -998,7 +998,7 @@ static bool LoadOldCompany(LoadgameState
 
			}
 
		} else {
 
			/* Beside some multiplayer maps (1 on 1), which we don't official support,
 
			 * all other companys are an AI.. mark them as such */
 
			 * all other companies are an AI.. mark them as such */
 
			c->is_ai = true;
 
		}
 

	
src/saveload/saveload.cpp
Show inline comments
 
@@ -2360,7 +2360,7 @@ SaveOrLoadResult SaveOrLoad(const char *
 
				GamelogStartAction(GLAT_LOAD);
 

	
 
				/* After loading fix up savegame for any internal changes that
 
				 * might've occured since then. If it fails, load back the old game */
 
				 * might have occurred since then. If it fails, load back the old game. */
 
				if (!AfterLoadGame()) {
 
					GamelogStopAction();
 
					return SL_REINIT;
src/screenshot.cpp
Show inline comments
 
@@ -630,14 +630,14 @@ static bool MakeWorldScreenshot()
 
 * Make an actual screenshot.
 
 * @param t    the type of screenshot to make.
 
 * @param name the name to give to the screenshot.
 
 * @return true iff the screenshow was made succesfully
 
 * @return true iff the screenshow was made successfully
 
 */
 
bool MakeScreenshot(ScreenshotType t, const char *name)
 
{
 
	if (t == SC_VIEWPORT) {
 
		/* First draw the dirty parts of the screen and only then change the name
 
		 * of the screenshot. This way the screenshot will always show the name
 
		 * of the previous screenshot in the 'succesful' message instead of the
 
		 * of the previous screenshot in the 'successful' message instead of the
 
		 * name of the new screenshot (or an empty name). */
 
		UndrawMouseCursor();
 
		DrawDirtyBlocks();
src/town_cmd.cpp
Show inline comments
 
@@ -2448,7 +2448,7 @@ static CommandCost TownActionFundBuildin
 

	
 
static CommandCost TownActionBuyRights(Town *t, DoCommandFlag flags)
 
{
 
	/* Check if it's allowed to by the rights */
 
	/* Check if it's allowed to buy the rights */
 
	if (!_settings_game.economy.exclusive_rights) return CMD_ERROR;
 

	
 
	if (flags & DC_EXEC) {
src/train_cmd.cpp
Show inline comments
 
@@ -1468,7 +1468,7 @@ static inline void SetLastSpeed(Train *v
 
static void MarkTrainAsStuck(Train *v)
 
{
 
	if (!HasBit(v->flags, VRF_TRAIN_STUCK)) {
 
		/* It is the first time the problem occured, set the "train stuck" flag. */
 
		/* It is the first time the problem occurred, set the "train stuck" flag. */
 
		SetBit(v->flags, VRF_TRAIN_STUCK);
 

	
 
		v->wait_counter = 0;
src/tree_map.h
Show inline comments
 
@@ -33,18 +33,17 @@ enum TreeType {
 
	TREE_INVALID      = 0xFF, ///< An invalid tree
 
};
 

	
 
/*
 
 * Counts the number of treetypes for each landscape.
 
/* Counts the number of tree types for each landscape.
 
 *
 
 * This list contains the counts of different treetypes for each landscape. This list contains
 
 * This list contains the counts of different tree types for each landscape. This list contains
 
 * 5 entries instead of 4 (as there are only 4 landscape types) as the sub tropic landscape
 
 * has two types of area, one for normal trees and one only for cacti.
 
 */
 
static const uint TREE_COUNT_TEMPERATE    = TREE_SUB_ARCTIC - TREE_TEMPERATE;    ///< number of treetypes on a temperate map
 
static const uint TREE_COUNT_SUB_ARCTIC   = TREE_RAINFOREST - TREE_SUB_ARCTIC;   ///< number of treetypes on a sub arctic map
 
static const uint TREE_COUNT_RAINFOREST   = TREE_CACTUS     - TREE_RAINFOREST;   ///< number of treetypes for the 'rainforest part' of a sub-tropic map
 
static const uint TREE_COUNT_SUB_TROPICAL = TREE_TOYLAND    - TREE_SUB_TROPICAL; ///< number of treetypes for the 'sub-tropic part' of a sub-tropic map
 
static const uint TREE_COUNT_TOYLAND      = 9;                                   ///< number of treetypes on a toyland map
 
static const uint TREE_COUNT_TEMPERATE    = TREE_SUB_ARCTIC - TREE_TEMPERATE;    ///< number of tree types on a temperate map.
 
static const uint TREE_COUNT_SUB_ARCTIC   = TREE_RAINFOREST - TREE_SUB_ARCTIC;   ///< number of tree types on a sub arctic map.
 
static const uint TREE_COUNT_RAINFOREST   = TREE_CACTUS     - TREE_RAINFOREST;   ///< number of tree types for the 'rainforest part' of a sub-tropic map.
 
static const uint TREE_COUNT_SUB_TROPICAL = TREE_TOYLAND    - TREE_SUB_TROPICAL; ///< number of tree types for the 'sub-tropic part' of a sub-tropic map.
 
static const uint TREE_COUNT_TOYLAND      = 9;                                   ///< number of tree types on a toyland map.
 

	
 
/**
 
 * Enumeration for ground types of tiles with trees.
src/window.cpp
Show inline comments
 
@@ -36,7 +36,7 @@
 
#include "table/sprites.h"
 

	
 
static Point _drag_delta; ///< delta between mouse cursor and upper left corner of dragged window
 
static Window *_mouseover_last_w = NULL; ///< Window of the last MOUSEOVER event
 
static Window *_mouseover_last_w = NULL; ///< Window of the last #MOUSEOVER event.
 

	
 
/** List of windows opened at the screen sorted from the front. */
 
Window *_z_front_window = NULL;
 
@@ -45,7 +45,7 @@ Window *_z_back_window  = NULL;
 

	
 
/*
 
 * Window that currently has focus. - The main purpose is to generate
 
 * FocusLost events, not to give next window in z-order focus when a
 
 * #FocusLost events, not to give next window in z-order focus when a
 
 * window is closed.
 
 */
 
Window *_focused_window;
 
@@ -2654,7 +2654,7 @@ void ChangeVehicleViewports(VehicleID fr
 
/**
 
 * Relocate all windows to fit the new size of the game application screen
 
 * @param neww New width of the game application screen
 
 * @param newh New height of the game appliction screen
 
 * @param newh New height of the game application screen.
 
 */
 
void RelocateAllWindows(int neww, int newh)
 
{
 
@@ -2672,8 +2672,8 @@ void RelocateAllWindows(int neww, int ne
 
			continue; // don't modify top,left
 
		}
 

	
 
		/* XXX - this probably needs something more sane. For example specying
 
		 * in a 'backup'-desc that the window should always be centred. */
 
		/* XXX - this probably needs something more sane. For example specifying
 
		 * in a 'backup'-desc that the window should always be centered. */
 
		switch (w->window_class) {
 
			case WC_MAIN_TOOLBAR:
 
				if (neww - w->width != 0) ResizeWindow(w, min(neww, 640) - w->width, 0);
0 comments (0 inline, 0 general)