* Important: The old vehicle is still in the original vehicle chain (used for determining the cargo when the old vehicle did not carry anything, but the new one does)
* @param old_veh A single (articulated/multiheaded) vehicle that shall be replaced.
* @param new_vehicle Returns the newly build and refittet vehicle
* @param new_vehicle Returns the newly build and refitted vehicle
* @param part_of_chain The vehicle is part of a train
* @return cost or error
*/
src/autoreplace_gui.cpp
➞
Show inline comments
@@ -45,7 +45,7 @@ static int CDECL EngineNumberSorter(cons
* @param id_g The group the engine belongs to
* Note: this function only works if it is called either
* - when a new vehicle is build, but before it's counted in num_engines
* - when a vehicle is deleted and after it's substracted from num_engines
* - when a vehicle is deleted and after it's subtracted from num_engines
* - when not changing the count (used when changing replace orders)
*/
void InvalidateAutoreplaceWindow(EngineID e, GroupID id_g)
src/base_media_func.h
➞
Show inline comments
@@ -269,7 +269,7 @@ template <class Tbase_set>
if (missing == 0) {
p += seprintf(p, last, " (%i corrupt file%s)\n", invalid, invalid == 1 ? "" : "s");
} else {
p += seprintf(p, last, " (unuseable: %i missing file%s)\n", missing, missing == 1 ? "" : "s");
p += seprintf(p, last, " (unusable: %i missing file%s)\n", missing, missing == 1 ? "" : "s");
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file rev.h declaration of OTTD revision dependant variables */
/** @file rev.h declaration of OTTD revision dependent variables */
#ifndef REV_H
#define REV_H
src/road.cpp
➞
Show inline comments
@@ -23,7 +23,7 @@
/**
* Return if the tile is a valid tile for a crossing.
*
* @param tile the curent tile
* @param tile the current tile
* @param ax the axis of the road over the rail
* @return true if it is a valid tile
*/
@@ -36,7 +36,7 @@ static bool IsPossibleCrossing(const Til
* Removes all items with a value above start and below end.
* @param start the lower bound of the to be removed values (exclusive).
* @param end the upper bound of the to be removed valuens (exclusive).
* @param end the upper bound of the to be removed values (exclusive).
*/
void RemoveBetweenValue(int32 start, int32 end);
src/script/api/script_order.hpp
➞
Show inline comments
@@ -47,7 +47,7 @@ public:
/** Do not stop at the stations that are passed when going to the destination. Only for trains and road vehicles. */
OF_NON_STOP_INTERMEDIATE = 1 << 0,
/** Do not stop at the destionation station. Only for trains and road vehicles. */
/** Do not stop at the destination station. Only for trains and road vehicles. */
OF_NON_STOP_DESTINATION = 1 << 1,
/** Always unload the vehicle; only for stations. Cannot be set when OF_TRANSFER or OF_NO_UNLOAD is set. */
@@ -586,7 +586,7 @@ public:
/**
* Get the distance between two points for a vehicle type.
* Use this function to compute the distance between two tiles wrt. a vehicle type.
* These vehicle-type specific distances are indepenent from other map distances, you may
* These vehicle-type specific distances are independent from other map distances, you may
* use the result of this function to compare it with the result of
* ScriptEngine::GetMaximumOrderDistance or ScriptVehicle::GetMaximumOrderDistance.
* @param vehicle_type The vehicle type to get the distance for.
src/script/api/script_rail.hpp
➞
Show inline comments
@@ -314,7 +314,7 @@ public:
/**
* Remove all rail waypoint pieces within a rectangle on the map.
* @param tile One corner of the rectangle to clear.
* @param tile2 The oppposite corner.
* @param tile2 The opposite corner.
* @param keep_rail Whether to keep the rail after removal.
* @pre IsValidTile(tile).
* @pre IsValidTile(tile2).
@@ -326,7 +326,7 @@ public:
/**
* Remove all rail station platform pieces within a rectangle on the map.
* @param tile One corner of the rectangle to clear.
* @param tile2 The oppposite corner.
* @param tile2 The opposite corner.
* @param keep_rail Whether to keep the rail after removal.
* @pre IsValidTile(tile).
* @pre IsValidTile(tile2).
src/script/api/script_road.hpp
➞
Show inline comments
@@ -147,7 +147,7 @@ public:
/**
* Checks whether the given tiles are directly connected, i.e. whether
* a road vehicle can travel from the center of the first tile to the
* center of the second tile.
* center of the second tile.
* @param tile_from The source tile.
* @param tile_to The destination tile.
* @pre IsRoadTypeAvailable(GetCurrentRoadType()).
src/script/api/script_subsidy.hpp
➞
Show inline comments
@@ -26,7 +26,7 @@ public:
*/
enum SubsidyParticipantType {
/* Values are important, as they represent the internal state of the game.
* It is orignally named SourceType. ST_HEADQUARTERS is intentionally
* It is originally named SourceType. ST_HEADQUARTERS is intentionally
* left out, as it cannot be used for Subsidies. */
SPT_INDUSTRY = 0, ///< Subsidy participant is an industry
SPT_TOWN = 1, ///< Subsidy participant is a town
src/script/api/script_testmode.hpp
➞
Show inline comments
@@ -27,7 +27,7 @@
class ScriptTestMode : public ScriptObject {
private:
ScriptModeProc *last_mode; ///< The previous mode we were in.
ScriptObject *last_instance; ///< The previous instace of the mode.
ScriptObject *last_instance; ///< The previous instance of the mode.
protected:
/**
src/script/api/script_town.hpp
➞
Show inline comments
@@ -228,7 +228,7 @@ public:
/**
* Set the amount of days between town growth.
* @param town_id The index of the town.
* @param days_between_town_growth The amont of days between town growth.
* @param days_between_town_growth The amount of days between town growth.
* @pre IsValidTown(town_id).
* @return True if the action succeeded.
* @note If 'Fund Building' and 'economy.town_growth_rate' is active, the game will often set a new GrowthRate.
src/script/api/script_vehicle.hpp
➞
Show inline comments
@@ -370,7 +370,7 @@ public:
static bool MoveWagonChain(VehicleID source_vehicle_id, int source_wagon, int dest_vehicle_id, int dest_wagon);
/**
* Gets the capacity of the given vehicle when refited to the given cargo type.
* Gets the capacity of the given vehicle when refitted to the given cargo type.
* @param vehicle_id The vehicle to refit.
* @param cargo The cargo to refit to.
* @pre IsValidVehicle(vehicle_id).
@@ -549,7 +549,7 @@ public:
/**
* Get the maximum allowed distance between two orders for a vehicle.
* The distance returned is a vehicle-type specific distance indepenent from other
* The distance returned is a vehicle-type specific distance independent from other
* map distances, you may use the result of this function to compare it
* with the result of ScriptOrder::GetOrderDistance.
* @param vehicle_id The vehicle to get the distance for.
src/script/api/script_viewport.hpp
➞
Show inline comments
@@ -7,7 +7,7 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file script_viewport.hpp Everything to manipulate the users viewport. */
/** @file script_viewport.hpp Everything to manipulate the user's viewport. */
#ifndef SCRIPT_VIEWPORT_HPP
#define SCRIPT_VIEWPORT_HPP
@@ -15,7 +15,7 @@
#include "script_object.hpp"
/**
* Class that manipultes the users viewport.
* Class that manipulates the user's viewport.
* @api game
*/
class ScriptViewport : public ScriptObject {
src/script/api/script_window.hpp
➞
Show inline comments
@@ -908,7 +908,7 @@ public:
WID_RV_LEFT_MATRIX = ::WID_RV_LEFT_MATRIX, ///< The matrix on the left.
WID_RV_LEFT_SCROLLBAR = ::WID_RV_LEFT_SCROLLBAR, ///< The scrollbar for the matrix on the left.
WID_RV_RIGHT_MATRIX = ::WID_RV_RIGHT_MATRIX, ///< The matrix on the right.
WID_RV_RIGHT_SCROLLBAR = ::WID_RV_RIGHT_SCROLLBAR, ///< The scrollbar for the matrxi on the right.
WID_RV_RIGHT_SCROLLBAR = ::WID_RV_RIGHT_SCROLLBAR, ///< The scrollbar for the matrix on the right.
WID_RV_LEFT_DETAILS = ::WID_RV_LEFT_DETAILS, ///< Details of the entry on the left.
WID_RV_RIGHT_DETAILS = ::WID_RV_RIGHT_DETAILS, ///< Details of the entry on the right.
@@ -1997,10 +1997,10 @@ public:
/** Widgets of the #BuildRailDepotWindow class. */
enum BuildRailDepotWidgets {
/* Name starts with BRA instead of BR, because of collision with BuildRoadDepotWidgets */
WID_BRAD_DEPOT_NE = ::WID_BRAD_DEPOT_NE, ///< Build a depot with the entrace in the north east.
WID_BRAD_DEPOT_SE = ::WID_BRAD_DEPOT_SE, ///< Build a depot with the entrace in the south east.
WID_BRAD_DEPOT_SW = ::WID_BRAD_DEPOT_SW, ///< Build a depot with the entrace in the south west.
WID_BRAD_DEPOT_NW = ::WID_BRAD_DEPOT_NW, ///< Build a depot with the entrace in the north west.
WID_BRAD_DEPOT_NE = ::WID_BRAD_DEPOT_NE, ///< Build a depot with the entrance in the north east.
WID_BRAD_DEPOT_SE = ::WID_BRAD_DEPOT_SE, ///< Build a depot with the entrance in the south east.
WID_BRAD_DEPOT_SW = ::WID_BRAD_DEPOT_SW, ///< Build a depot with the entrance in the south west.
WID_BRAD_DEPOT_NW = ::WID_BRAD_DEPOT_NW, ///< Build a depot with the entrance in the north west.
};
/** Widgets of the #BuildRailWaypointWindow class. */
@@ -2097,8 +2097,8 @@ public:
WID_CC_RATE_DOWN = ::WID_CC_RATE_DOWN, ///< Down button.
WID_CC_RATE_UP = ::WID_CC_RATE_UP, ///< Up button.
WID_CC_RATE = ::WID_CC_RATE, ///< Rate of currency.
/* All attempts have failed. Display an error. As we do not want the string to be translated by
* the translators, we 'force' it into the binary and 'load' it via a BindCString. To do this
* properly we have to set the colour of the string, otherwise we end up with a lot of artefacts.
* properly we have to set the colour of the string, otherwise we end up with a lot of artifacts.
* The colour 'character' might change in the future, so for safety we just Utf8 Encode it into
* the string, which takes exactly three characters, so it replaces the "XXX" with the colour marker. */
static char *err_str = strdup("XXXThe current font is missing some of the characters used in the texts for this language. Read the readme to see how to solve this.");
* <li> #NWidgetHorizontal for organizing child widgets in a (horizontal) row. The row switches order depending on the language setting (thus supporting
* right-to-left languages),
* <li> #NWidgetHorizontalLTR for organizing child widgets in a (horizontal) row, always in the same order. All childs below this container will also
* <li> #NWidgetHorizontalLTR for organizing child widgets in a (horizontal) row, always in the same order. All children below this container will also
* never swap order.
* <li> #NWidgetVertical for organizing child widgets underneath each other.
* <li> #NWidgetMatrix for organizing child widgets in a matrix form.
this->StoreSizePosition(sizing, x, y, given_width, given_height);
/* In principle, the additional horizontal space is distributed evenly over the available resizable childs. Due to step sizes, this may not always be feasible.
* To make resizing work as good as possible, first childs with biggest step sizes are done. These may get less due to rounding down.
* This additional space is then given to childs with smaller step sizes. This will give a good result when resize steps of each child is a multiple
/* In principle, the additional horizontal space is distributed evenly over the available resizable children. Due to step sizes, this may not always be feasible.
* To make resizing work as good as possible, first children with biggest step sizes are done. These may get less due to rounding down.
* This additional space is then given to children with smaller step sizes. This will give a good result when resize steps of each child is a multiple
* of the child with the smallest non-zero stepsize.
*
* Since child sizes are computed out of order, positions cannot be calculated until all sizes are known. That means it is not possible to compute the child
/* First loop: Find biggest stepsize, find number of childs that want a piece of the pie, handle vertical size for all childs, handle horizontal size for non-resizing childs. */
int num_changing_childs = 0; // Number of childs that can change size.
/* First loop: Find biggest stepsize, find number of children that want a piece of the pie, handle vertical size for all children,
* handle horizontal size for non-resizing children.
*/
int num_changing_childs = 0; // Number of children that can change size.
this->StoreSizePosition(sizing, x, y, given_width, given_height);
/* Like the horizontal container, the vertical container also distributes additional height evenly, starting with the childs with the biggest resize steps.
/* Like the horizontal container, the vertical container also distributes additional height evenly, starting with the children with the biggest resize steps.
* It also stores computed widths and heights into current_x and current_y values of the child.
*/
/* First loop: Find biggest stepsize, find number of childs that want a piece of the pie, handle horizontal size for all childs, handle vertical size for non-resizing childs. */
int num_changing_childs = 0; // Number of childs that can change size.
/* First loop: Find biggest stepsize, find number of children that want a piece of the pie, handle horizontal size for all children, handle vertical size for non-resizing child. */
int num_changing_childs = 0; // Number of children that can change size.
@@ -830,7 +830,7 @@ static inline uint ComputeMaxSize(uint b
* the child widgets (it has no meaning for the compiler but it makes the widget parts easier to read).
* Below the last child widget, use an #EndContainer part. This part should be aligned with the #NWidget part that started the container.
*
* - Stacked widgets #NWidgetStacked map each of their childs onto the same space. It behaves like a container, except there is no pre/inter/post space,
* - Stacked widgets #NWidgetStacked map each of their children onto the same space. It behaves like a container, except there is no pre/inter/post space,
* so the widget does not support #SetPIP. #SetPadding is allowed though.
* Like the other container widgets, below the last child widgets, a #EndContainer part should be used to denote the end of the stacked widget.
*
@@ -1071,7 +1071,7 @@ static inline NWidgetPart SetPIP(uint8 p
/**
* Attach a scrollbar to a widget.
* The scrollbar is controlled when using the mousewheel on the widget.
* Multipe widgets can refer to the same scrollbar to make the mousewheel work in all of them.
* Multiple widgets can refer to the same scrollbar to make the mousewheel work in all of them.
* @param index Widget index of the scrollbar.
* @ingroup NestedWidgetParts
*/
src/widgets/ai_widget.h
➞
Show inline comments
@@ -60,7 +60,7 @@ enum AIDebugWidgets {
WID_AID_SCRIPT_GAME, ///< Game Script button.
WID_AID_RELOAD_TOGGLE, ///< Reload button.
WID_AID_LOG_PANEL, ///< Panel where the log is in.
WID_AID_SCROLLBAR, ///< Scrollbar of the log pannel.
WID_AID_SCROLLBAR, ///< Scrollbar of the log panel.
WID_AID_COMPANY_BUTTON_START, ///< Buttons in the VIEW.
WID_AID_COMPANY_BUTTON_END = WID_AID_COMPANY_BUTTON_START + MAX_COMPANIES - 1, ///< Last possible button in the VIEW.
WID_AID_BREAK_STRING_WIDGETS, ///< The panel to handle the breaking on string.
src/widgets/autoreplace_widget.h
➞
Show inline comments
@@ -20,7 +20,7 @@ enum ReplaceVehicleWidgets {
WID_RV_LEFT_MATRIX, ///< The matrix on the left.
WID_RV_LEFT_SCROLLBAR, ///< The scrollbar for the matrix on the left.
WID_RV_RIGHT_MATRIX, ///< The matrix on the right.
WID_RV_RIGHT_SCROLLBAR, ///< The scrollbar for the matrxi on the right.
WID_RV_RIGHT_SCROLLBAR, ///< The scrollbar for the matrix on the right.
WID_RV_LEFT_DETAILS, ///< Details of the entry on the left.
WID_RV_RIGHT_DETAILS, ///< Details of the entry on the right.