mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-24 03:56:43 +00:00
Cleanup: Correct various spelling errors
This commit is contained in:
committed by
rubidium42
parent
4a7cbf29f0
commit
bbe5dbf230
Vendored
+1
-1
@@ -152,7 +152,7 @@ UBool ScriptRun::next()
|
||||
// if it's an open character, push it onto the stack.
|
||||
// if it's a close character, find the matching open on the
|
||||
// stack, and use that script code. Any non-matching open
|
||||
// characters above it on the stack will be poped.
|
||||
// characters above it on the stack will be popped.
|
||||
if (pairIndex >= 0) {
|
||||
if ((pairIndex & 1) == 0) {
|
||||
parenStack[++parenSP].pairIndex = pairIndex;
|
||||
|
||||
+3
-3
@@ -472,7 +472,7 @@ SQRESULT sq_setroottable(HSQUIRRELVM v)
|
||||
v->Pop();
|
||||
return SQ_OK;
|
||||
}
|
||||
return sq_throwerror(v, "ivalid type");
|
||||
return sq_throwerror(v, "invalid type");
|
||||
}
|
||||
|
||||
SQRESULT sq_setconsttable(HSQUIRRELVM v)
|
||||
@@ -483,7 +483,7 @@ SQRESULT sq_setconsttable(HSQUIRRELVM v)
|
||||
v->Pop();
|
||||
return SQ_OK;
|
||||
}
|
||||
return sq_throwerror(v, "ivalid type, expected table");
|
||||
return sq_throwerror(v, "invalid type, expected table");
|
||||
}
|
||||
|
||||
void sq_setforeignptr(HSQUIRRELVM v,SQUserPointer p)
|
||||
@@ -796,7 +796,7 @@ SQRESULT sq_setdelegate(HSQUIRRELVM v,SQInteger idx)
|
||||
switch(type) {
|
||||
case OT_TABLE:
|
||||
if(type(mt) == OT_TABLE) {
|
||||
if(!_table(self)->SetDelegate(_table(mt))) return sq_throwerror(v, "delagate cycle");
|
||||
if(!_table(self)->SetDelegate(_table(mt))) return sq_throwerror(v, "delegate cycle");
|
||||
v->Pop();}
|
||||
else if(type(mt)==OT_NULL) {
|
||||
_table(self)->SetDelegate(nullptr); v->Pop(); }
|
||||
|
||||
+1
-1
@@ -554,7 +554,7 @@ bool _hsort_sift_down(HSQUIRRELVM v,SQArray *arr, SQInteger root, SQInteger bott
|
||||
if (ret < 0) {
|
||||
if (root == maxChild) {
|
||||
v->Raise_Error("inconsistent compare function");
|
||||
return false; // We'd be swapping ourselve. The compare function is incorrect
|
||||
return false; // We'd be swapping ourself. The compare function is incorrect
|
||||
}
|
||||
_Swap(arr->_values[root],arr->_values[maxChild]);
|
||||
root = maxChild;
|
||||
|
||||
+1
-1
@@ -245,7 +245,7 @@ bool SafeWrite(HSQUIRRELVM v,SQWRITEFUNC write,SQUserPointer up,SQUserPointer de
|
||||
bool SafeRead(HSQUIRRELVM v,SQWRITEFUNC read,SQUserPointer up,SQUserPointer dest,SQInteger size)
|
||||
{
|
||||
if(size && read(up,dest,size) != size) {
|
||||
v->Raise_Error("io error, read function failure, the origin stream could be corrupted/trucated");
|
||||
v->Raise_Error("io error, read function failure, the origin stream could be corrupted/truncated");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
+2
-2
@@ -193,7 +193,7 @@ SQSharedState::~SQSharedState()
|
||||
t = nx;
|
||||
}
|
||||
}
|
||||
// assert(_gc_chain==nullptr); //just to proove a theory
|
||||
// assert(_gc_chain==nullptr); //just to prove a theory
|
||||
while(_gc_chain){
|
||||
_gc_chain->_uiRef--;
|
||||
_gc_chain->Release();
|
||||
@@ -227,7 +227,7 @@ SQInteger SQSharedState::GetMetaMethodIdxByName(const SQObjectPtr &name)
|
||||
* This is done internally by a vector onto which the to be freed instances are pushed. When
|
||||
* this is called when not already processing, this method will actually call the FinalFree
|
||||
* function which might cause more elements to end up in the queue which this method then
|
||||
* picks up continueing until it has processed all instances in that queue.
|
||||
* picks up continuing until it has processed all instances in that queue.
|
||||
* @param collectable The collectable to (eventually) free.
|
||||
*/
|
||||
void SQSharedState::DelayFinalFree(SQCollectable *collectable)
|
||||
|
||||
+1
-1
@@ -424,7 +424,7 @@ bool SQVM::Return(SQInteger _arg0, SQInteger _arg1, SQObjectPtr &retval)
|
||||
else retval = _null_;
|
||||
}
|
||||
else {
|
||||
if(target != -1) { //-1 is when a class contructor ret value has to be ignored
|
||||
if(target != -1) { //-1 is when a class constructor ret value has to be ignored
|
||||
if (_arg0 != MAX_FUNC_STACKSIZE)
|
||||
STK(target) = _stack._vals[oldstackbase+_arg1];
|
||||
else
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#ifndef BLITTER_32BPP_SSE_FUNC_HPP
|
||||
#define BLITTER_32BPP_SSE_FUNC_HPP
|
||||
|
||||
/** Prefix all things in this file wiht this specifier to make them linked internally only. */
|
||||
/** Prefix all things in this file with this specifier to make them linked internally only. */
|
||||
#define INTERNAL_LINKAGE static
|
||||
|
||||
#ifdef WITH_SSE
|
||||
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
|
||||
/**
|
||||
* Does this blitter require a separate animation buffer from the video backend?
|
||||
* @return \c true when the backend usees a separate buffer for animation.
|
||||
* @return \c true when the backend uses a separate buffer for animation.
|
||||
*/
|
||||
virtual bool NeedsAnimationBuffer()
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ inline int CentreBounds(int min, int max, int size)
|
||||
return (min + max - size + 1) / 2;
|
||||
}
|
||||
|
||||
/** A coordinate with two dimensons. */
|
||||
/** A coordinate with two dimensions. */
|
||||
template <typename T>
|
||||
struct Coord2D {
|
||||
T x = 0; ///< X coordinate.
|
||||
@@ -264,7 +264,7 @@ struct Rect {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new Rect, replacing the left and right coordiates.
|
||||
* Create a new Rect, replacing the left and right coordinates.
|
||||
* @param new_left New left coordinate.
|
||||
* @param new_right New right coordinate.
|
||||
* @return The new Rect.
|
||||
@@ -272,7 +272,7 @@ struct Rect {
|
||||
[[nodiscard]] inline Rect WithX(int new_left, int new_right) const { return {new_left, this->top, new_right, this->bottom}; }
|
||||
|
||||
/**
|
||||
* Create a new Rect, replacing the top and bottom coordiates.
|
||||
* Create a new Rect, replacing the top and bottom coordinates.
|
||||
* @param new_top New top coordinate.
|
||||
* @param new_bottom New bottom coordinate.
|
||||
* @return The new Rect.
|
||||
@@ -280,14 +280,14 @@ struct Rect {
|
||||
[[nodiscard]] inline Rect WithY(int new_top, int new_bottom) const { return {this->left, new_top, this->right, new_bottom}; }
|
||||
|
||||
/**
|
||||
* Create a new Rect, replacing the left and right coordiates.
|
||||
* Create a new Rect, replacing the left and right coordinates.
|
||||
* @param other Rect containing the new left and right coordinates.
|
||||
* @return The new Rect.
|
||||
*/
|
||||
[[nodiscard]] inline Rect WithX(const Rect &other) const { return this->WithX(other.left, other.right); }
|
||||
|
||||
/**
|
||||
* Create a new Rect, replacing the top and bottom coordiates.
|
||||
* Create a new Rect, replacing the top and bottom coordinates.
|
||||
* @param other Rect containing the new top and bottom coordinates.
|
||||
* @return The new Rect.
|
||||
*/
|
||||
|
||||
+2
-2
@@ -335,7 +335,7 @@ class Kdtree {
|
||||
* Debugging function, counts number of occurrences of an element regardless of its correct position in the tree.
|
||||
* @param element The element to look for.
|
||||
* @param node_idx The root to start searching from.
|
||||
* @return The number of occurences.
|
||||
* @return The number of occurrences.
|
||||
*/
|
||||
size_t CountValue(const T &element, size_t node_idx) const
|
||||
{
|
||||
@@ -447,7 +447,7 @@ public:
|
||||
* Insert a single element in the tree.
|
||||
* Repeatedly inserting single elements may cause the tree to become unbalanced.
|
||||
* Undefined behaviour if the element already exists in the tree.
|
||||
* @param element The elemnt to add.
|
||||
* @param element The element to add.
|
||||
*/
|
||||
void Insert(const T &element)
|
||||
{
|
||||
|
||||
+4
-4
@@ -63,10 +63,10 @@ enum class ScoreID : uint8_t {
|
||||
Vehicles = ScoreID::Begin, ///< Number of vehicles that turned profit last year.
|
||||
Stations, ///< Number of recently-serviced stations.
|
||||
MinProfit, ///< The profit of the vehicle with the lowest income.
|
||||
MinIncome, ///< Income in the quater with the lowest profit of the last 12 quaters.
|
||||
MaxIncome, ///< Income in the quater with the highest profit of the last 12 quaters.
|
||||
Delivered, ///< Units of cargo delivered in the last four quaters.
|
||||
Cargo, ///< Number of types of cargo delivered in the last four quaters.
|
||||
MinIncome, ///< Income in the quarter with the lowest profit of the last 12 quarters.
|
||||
MaxIncome, ///< Income in the quarter with the highest profit of the last 12 quarters.
|
||||
Delivered, ///< Units of cargo delivered in the last four quarter.
|
||||
Cargo, ///< Number of types of cargo delivered in the last four quarter.
|
||||
Money, ///< Amount of money company has in the bank.
|
||||
Loan, ///< The amount of money company can take as a loan.
|
||||
Total, ///< Total points out of possible points ,must always be the last entry.
|
||||
|
||||
+1
-1
@@ -669,7 +669,7 @@ bool ExtractTar(const std::string &tar_filename, Subdirectory subdir)
|
||||
*/
|
||||
extern void DetermineBasePaths(std::string_view exe);
|
||||
|
||||
/** Mimicks the getcwd from POSIX for Windows. */
|
||||
/** Mimics the getcwd from POSIX for Windows. */
|
||||
char *getcwd(char *buf, size_t size);
|
||||
#else /* defined(_WIN32) */
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ struct GSConfigWindow : public Window {
|
||||
bool closing_dropdown = false; ///< True, if the dropdown list is currently closing.
|
||||
int clicked_row = 0; ///< The clicked row of settings.
|
||||
Scrollbar *vscroll = nullptr; ///< Cache of the vertical scrollbar.
|
||||
typedef std::vector<const ScriptConfigItem *> VisibleSettingsList; ///< typdef for a vector of script settings
|
||||
typedef std::vector<const ScriptConfigItem *> VisibleSettingsList; ///< typedef for a vector of script settings
|
||||
VisibleSettingsList visible_settings{}; ///< List of visible GS settings
|
||||
|
||||
GSConfigWindow() : Window(_gs_config_desc)
|
||||
|
||||
+1
-1
@@ -257,7 +257,7 @@ HotkeyList::HotkeyList(const std::string &ini_group, const std::vector<Hotkey> &
|
||||
_hotkey_lists->push_back(this);
|
||||
}
|
||||
|
||||
/** Remove outselves from the global hotkey list. */
|
||||
/** Remove ourselves from the global hotkey list. */
|
||||
HotkeyList::~HotkeyList()
|
||||
{
|
||||
_hotkey_lists->erase(std::ranges::find(*_hotkey_lists, this));
|
||||
|
||||
+2
-2
@@ -1141,7 +1141,7 @@ static void MakeWetlands(TileIndex centre, uint height, uint river_length)
|
||||
* Try to end a river at a tile which is not the sea.
|
||||
* @param tile The tile to try ending the river at.
|
||||
* @param begin The starting tile of the river.
|
||||
* @return Whether we succesfully ended the river on the given tile.
|
||||
* @return Whether we successfully ended the river on the given tile.
|
||||
*/
|
||||
static bool TryMakeRiverTerminus(TileIndex tile, TileIndex begin)
|
||||
{
|
||||
@@ -1364,7 +1364,7 @@ static bool CountConnectedSeaTiles(TileIndex tile, std::unordered_set<TileIndex>
|
||||
* Count this tile but don't check its neighbors. */
|
||||
if (sea.size() > limit) return false;
|
||||
|
||||
/* Count adjacent tiles using recusion. */
|
||||
/* Count adjacent tiles using recursion. */
|
||||
for (DiagDirection d = DIAGDIR_BEGIN; d < DIAGDIR_END; d++) {
|
||||
TileIndex t = tile + TileOffsByDiagDir(d);
|
||||
if (IsValidTile(t) && !sea.contains(t)) {
|
||||
|
||||
@@ -388,7 +388,7 @@ protected:
|
||||
/** @} */
|
||||
|
||||
uint distance = 0; ///< Sum(distance of all legs up to this one).
|
||||
uint capacity = 0; ///< This capacity is min(capacity) fom all edges.
|
||||
uint capacity = 0; ///< This capacity is min(capacity) of all edges.
|
||||
int free_capacity = 0; ///< This capacity is min(edge.capacity - edge.flow) for the current run of Dijkstra.
|
||||
uint flow = 0; ///< Flow the current run of the mcf solver assigns.
|
||||
NodeID node = INVALID_NODE; ///< Link graph node this leg passes.
|
||||
|
||||
@@ -27,7 +27,7 @@ typedef uint8_t PacketType; ///< Identifier for the packet
|
||||
* identifier is unique for each stream of packets, which are separate enumerations.
|
||||
* This trait allows us to only allow one of these PacketType enumerations when
|
||||
* creating the packet, but not any other enumeration. It is up to the developer to
|
||||
* enusre that the right enumeration is used for a socket handler.
|
||||
* ensure that the right enumeration is used for a socket handler.
|
||||
*/
|
||||
template <typename enum_type>
|
||||
struct IsEnumPacketType {
|
||||
|
||||
+1
-1
@@ -448,7 +448,7 @@ void ResetNewGRFData()
|
||||
/* Reset price base data */
|
||||
ResetPriceBaseMultipliers();
|
||||
|
||||
/* Reset the curencies array */
|
||||
/* Reset the currencies array */
|
||||
ResetCurrencies();
|
||||
|
||||
/* Reset the house array */
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ DECLARE_INCREMENT_DECREMENT_OPERATORS(GrfLoadingStage)
|
||||
enum class GrfMiscBit : uint8_t {
|
||||
DesertTreesFields = 0, ///< Unsupported: allow trees and fields in desert climate.
|
||||
DesertPavedRoads = 1, ///< Show pavement and lights in desert towns
|
||||
FieldBoundingBox = 2, ///< Unsupported: fiels have a height.
|
||||
FieldBoundingBox = 2, ///< Unsupported: fields have a height.
|
||||
TrainWidth32Pixels = 3, ///< Use 32 pixels per train vehicle in depot gui and vehicle details. Never set in the global variable; @see GRFFile::traininfo_vehicle_width
|
||||
AmbientSoundCallback = 4, ///< Enable ambient sound effect callback 144.
|
||||
CatenaryOn3rdTrack = 5, ///< Unsupported: enable catenaries over third track type.
|
||||
|
||||
@@ -529,7 +529,7 @@ static ChangeInfoResult IndustriesChangeInfo(uint first, uint last, int prop, By
|
||||
indsp->accepts_cargo[j] = GetCargoTranslation(buf.ReadByte(), _cur_gps.grffile);
|
||||
indsp->accepts_cargo_label[j] = CT_INVALID;
|
||||
}
|
||||
buf.ReadByte(); // Unnused, eat it up
|
||||
buf.ReadByte(); // Unused, eat it up
|
||||
break;
|
||||
|
||||
case 0x12: // Production multipliers
|
||||
|
||||
@@ -379,7 +379,7 @@ unhandled:
|
||||
/**
|
||||
* Constructor of the object resolver.
|
||||
* @param obj Object being resolved.
|
||||
* @param spec Specifiction of the object's type.
|
||||
* @param spec Specification of the object's type.
|
||||
* @param tile %Tile of the object.
|
||||
* @param view View of the object.
|
||||
* @param callback Callback ID.
|
||||
|
||||
@@ -184,7 +184,7 @@ static TimeoutTimer<TimerGameTick> _profiling_finish_timeout({ TimerGameTick::Pr
|
||||
|
||||
/**
|
||||
* Start the timeout timer that will finish all profiling sessions.
|
||||
* @param ticks The timemout in game ticks.
|
||||
* @param ticks The timeout in game ticks.
|
||||
*/
|
||||
/* static */ void NewGRFProfiler::StartTimer(uint64_t ticks)
|
||||
{
|
||||
|
||||
@@ -494,7 +494,7 @@ struct SpecializedResolverObject : public ResolverObject {
|
||||
/**
|
||||
* Set waiting triggers for rerandomisation.
|
||||
* This is scope independent, even though this is broken-by-design in most cases.
|
||||
* @param triggers The triggers to set wating.
|
||||
* @param triggers The triggers to set waiting.
|
||||
*/
|
||||
void SetWaitingRandomTriggers(RandomTriggers triggers)
|
||||
{
|
||||
|
||||
@@ -905,7 +905,7 @@ const StationSpec *GetStationSpec(TileIndex t)
|
||||
* @param param1 The first parameter of the NewGRF callback.
|
||||
* @param param2 The second parameter of the NewGRF callback.
|
||||
* @param statspec The specification to run the callback on.
|
||||
* @param st The station for the calback.
|
||||
* @param st The station for the callback.
|
||||
* @param tile The tile the station is at.
|
||||
* @return The NewGRF result of the callback.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -539,7 +539,7 @@ void AddGRFTextToList(GRFTextWrapper &list, std::string_view text_to_add)
|
||||
* @param allow_newlines Whether newlines are allowed in the string.
|
||||
* @param text_to_add The actual text of the string.
|
||||
* @param def_string The fallback string if a translation for this string isn't available.
|
||||
* @return The OpenTTD internal string identifer.
|
||||
* @return The OpenTTD internal string identifier.
|
||||
*/
|
||||
StringID AddGRFString(uint32_t grfid, GRFStringID stringid, uint8_t langid_to_add, bool new_scheme, bool allow_newlines, std::string_view text_to_add, StringID def_string)
|
||||
{
|
||||
|
||||
+2
-2
@@ -300,7 +300,7 @@ public:
|
||||
inline uint16_t GetTravelTime() const { return this->travel_time; }
|
||||
|
||||
/**
|
||||
* Get the maxmimum speed in km-ish/h a vehicle is allowed to reach on the way to the
|
||||
* Get the maximum speed in km-ish/h a vehicle is allowed to reach on the way to the
|
||||
* destination.
|
||||
* @return maximum speed.
|
||||
*/
|
||||
@@ -331,7 +331,7 @@ public:
|
||||
inline void SetTravelTime(uint16_t time) { this->travel_time = time; }
|
||||
|
||||
/**
|
||||
* Set the maxmimum speed in km-ish/h a vehicle is allowed to reach on the way to the
|
||||
* Set the maximum speed in km-ish/h a vehicle is allowed to reach on the way to the
|
||||
* destination.
|
||||
* @param speed Speed to be set.
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
|
||||
*/
|
||||
|
||||
/** @file macos_objective_c.h Includes of mac os specific headers wich contain objective c. */
|
||||
/** @file macos_objective_c.h Includes of mac os specific headers which contain objective c. */
|
||||
|
||||
#ifndef MACOS_OBJECTIVE_C_H
|
||||
#define MACOS_OBJECTIVE_C_H
|
||||
|
||||
+1
-1
@@ -1718,7 +1718,7 @@ static void CheckIfRoadVehNeedsService(RoadVehicle *v)
|
||||
SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
|
||||
}
|
||||
|
||||
/** Calander day handler */
|
||||
/** Calender day handler */
|
||||
void RoadVehicle::OnNewCalendarDay()
|
||||
{
|
||||
if (!this->IsFrontEngine()) return;
|
||||
|
||||
@@ -295,7 +295,7 @@ struct ScriptSettingsWindow : public Window {
|
||||
int clicked_row = 0; ///< The clicked row of settings.
|
||||
int line_height = 0; ///< Height of a row in the matrix widget.
|
||||
Scrollbar *vscroll = nullptr; ///< Cache of the vertical scrollbar.
|
||||
typedef std::vector<const ScriptConfigItem *> VisibleSettingsList; ///< typdef for a vector of script settings
|
||||
typedef std::vector<const ScriptConfigItem *> VisibleSettingsList; ///< typedef for a vector of script settings
|
||||
VisibleSettingsList visible_settings{}; ///< List of visible AI settings
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ struct Filtering {
|
||||
/**
|
||||
* List template of 'things' \p T to sort in a GUI.
|
||||
* @tparam T Type of data stored in the list to represent each item.
|
||||
* @tparam P Tyoe of data passed as additional parameter to the sort function.
|
||||
* @tparam P Type of data passed as additional parameter to the sort function.
|
||||
* @tparam F Type of data fed as additional value to the filter function. @see FilterFunction
|
||||
*/
|
||||
template <typename T, typename P = std::nullptr_t, typename F = std::string_view>
|
||||
|
||||
@@ -1578,7 +1578,7 @@ static const IndustryTileSpec _origin_industry_tile_specs[NEW_INDUSTRYTILEOFFSET
|
||||
MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false),
|
||||
MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false),
|
||||
|
||||
/* Oil Wells artic, temperate and sub-tropical */
|
||||
/* Oil Wells arctic, temperate and sub-tropical */
|
||||
MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false),
|
||||
MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, true ),
|
||||
MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, true ),
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
|
||||
/** Trigger reasons for the timer based triggers. */
|
||||
enum class Trigger : uint8_t {
|
||||
Day, ///< Triggeres daily.
|
||||
Day, ///< Triggers daily.
|
||||
Week, ///< Triggers every Tuesday.
|
||||
Month, ///< Triggered at the first of the month.
|
||||
Quarter, ///< Triggered every first of January, April, July and October.
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ RoadType _last_built_tramtype;
|
||||
|
||||
/** Toolbar modes */
|
||||
enum class ToolbarMode : uint8_t {
|
||||
Normal, ///< Toolbar is in normal mode, in wich all 30 buttons are accessible.
|
||||
Normal, ///< Toolbar is in normal mode, in which all 30 buttons are accessible.
|
||||
Upper, ///< Toolbar is in split mode and the first part is selected.
|
||||
Lower, ///< Toolbar is in split mode and the second part is selected.
|
||||
};
|
||||
|
||||
+1
-1
@@ -3828,7 +3828,7 @@ static void UpdateTownRating(Town *t)
|
||||
|
||||
/**
|
||||
* Updates town grow counter after growth rate change.
|
||||
* Preserves relative house builting progress whenever it can.
|
||||
* Preserves relative house building progress whenever it can.
|
||||
* @param t The town to calculate grow counter for
|
||||
* @param prev_growth_rate Town growth rate before it changed (one that was used with grow counter to be updated)
|
||||
*/
|
||||
|
||||
+1
-1
@@ -2586,7 +2586,7 @@ static PBSTileInfo ExtendTrainReservation(const Train *v, TrackBits *new_tracks,
|
||||
* On finding a possible target, we need to stop and let the pathfinder handle the
|
||||
* remaining path. This is because we don't know if this target is in one of our
|
||||
* orders, so we might cause pathfinding to fail later on if we find a choice.
|
||||
* This failure would cause a bogous call to TryReserveSafePath which might reserve
|
||||
* This failure would cause a bogus call to TryReserveSafePath which might reserve
|
||||
* a wrong path not leading to our next destination. */
|
||||
if (HasReservedTracks(ft.new_tile, TrackdirBitsToTrackBits(TrackdirReachesTrackdirs(ft.old_td)))) break;
|
||||
|
||||
|
||||
+1
-1
@@ -440,7 +440,7 @@ static std::tuple<CommandCost, uint, uint16_t, CargoArray> RefitVehicle(Vehicle
|
||||
CommandCost refit_cost = GetRefitCost(v, v->engine_type, new_cargo_type, actual_subtype, &auto_refit_allowed);
|
||||
if (auto_refit && !flags.Test(DoCommandFlag::QueryCost) && !auto_refit_allowed) {
|
||||
/* Sorry, auto-refitting not allowed, subtract the cargo amount again from the total.
|
||||
* When querrying cost/capacity (for example in order refit GUI), we always assume 'allowed'.
|
||||
* When querying cost/capacity (for example in order refit GUI), we always assume 'allowed'.
|
||||
* It is not predictable. */
|
||||
total_capacity -= amount;
|
||||
total_mail_capacity -= mail_capacity;
|
||||
|
||||
+1
-1
@@ -3413,7 +3413,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/** Selects apropriate plane for current state of the shown vehicle. */
|
||||
/** Selects appropriate plane for current state of the shown vehicle. */
|
||||
void UpdatePlanes()
|
||||
{
|
||||
const Vehicle *v = Vehicle::Get(this->window_number);
|
||||
|
||||
@@ -117,7 +117,7 @@ std::optional<std::string_view> VideoDriver_Cocoa::Initialize()
|
||||
|
||||
/**
|
||||
* Set dirty a rectangle managed by a cocoa video subdriver.
|
||||
* @param left Left x cooordinate of the dirty rectangle.
|
||||
* @param left Left x coordinate of the dirty rectangle.
|
||||
* @param top Upper y coordinate of the dirty rectangle.
|
||||
* @param width Width of the dirty rectangle.
|
||||
* @param height Height of the dirty rectangle.
|
||||
|
||||
+1
-1
@@ -1945,7 +1945,7 @@ static inline void ClampViewportToMap(const Viewport &vp, int *scroll_x, int *sc
|
||||
}
|
||||
|
||||
/**
|
||||
* Clamp the smooth scroll to a maxmimum speed and distance based on time elapsed.
|
||||
* Clamp the smooth scroll to a maximum speed and distance based on time elapsed.
|
||||
*
|
||||
* Every 30ms, we move 1/4th of the distance, to give a smooth movement experience.
|
||||
* But we never go over the max_scroll speed.
|
||||
|
||||
Reference in New Issue
Block a user