Skip to content

Commit

Permalink
Fix various spelling errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JGRennison committed Feb 12, 2025
1 parent 3b82581 commit 4efebc6
Show file tree
Hide file tree
Showing 98 changed files with 143 additions and 143 deletions.
2 changes: 1 addition & 1 deletion src/blitter/40bpp_anim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ inline void Blitter_40bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
assert(VideoDriver::GetInstance()->GetAnimBuffer() != nullptr);
uint8_t *anim = VideoDriver::GetInstance()->GetAnimBuffer() + ((uint32_t *)bp->dst - (uint32_t *)_screen.dst_ptr) + bp->top * bp->pitch + bp->left;

/* store so we don't have to access it via bp everytime (compiler assumes pointer aliasing) */
/* store so we don't have to access it via bp every time (compiler assumes pointer aliasing) */
const uint8_t *remap = bp->remap;

for (int y = 0; y < bp->height; y++) {
Expand Down
2 changes: 1 addition & 1 deletion src/cargotype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ CargoID _cargo_id_passengers = INVALID_CARGO;
CargoID _cargo_id_mail = INVALID_CARGO;

/**
* Default cargo translation for upto version 7 NewGRFs.
* Default cargo translation for up to version 7 NewGRFs.
* This maps the original 12 cargo slots to their original label. If a climate dependent cargo is not present it will
* map to CT_INVALID. For default cargoes this ends up as a 1:1 mapping via climate slot -> label -> cargo ID.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/cargotype.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct CargoSpec {
bool is_freight; ///< Cargo type is considered to be freight (affects train freight multiplier).
TownAcceptanceEffect town_acceptance_effect; ///< The effect that delivering this cargo type has on towns. Also affects destination of subsidies.
TownProductionEffect town_production_effect = INVALID_TPE; ///< The effect on town cargo production.
uint16_t town_production_multiplier = TOWN_PRODUCTION_DIVISOR; ///< Town production multipler, if commanded by TownProductionEffect.
uint16_t town_production_multiplier = TOWN_PRODUCTION_DIVISOR; ///< Town production multiplier, if commanded by TownProductionEffect.
uint8_t callback_mask; ///< Bitmask of cargo callbacks that have to be called

StringID name; ///< Name of this type of cargo.
Expand Down
4 changes: 2 additions & 2 deletions src/company_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2467,7 +2467,7 @@ struct CompanyWindow : Window
}

if (y == r.top) {
/* No String was emited before, so there must be no vehicles at all. */
/* No String was emitted before, so there must be no vehicles at all. */
DrawString(r.left, r.right, y, STR_COMPANY_VIEW_VEHICLES_NONE);
}
}
Expand Down Expand Up @@ -2510,7 +2510,7 @@ struct CompanyWindow : Window
}

if (y == r.top) {
/* No String was emited before, so there must be no infrastructure at all. */
/* No String was emitted before, so there must be no infrastructure at all. */
DrawString(r.left, r.right, y, STR_COMPANY_VIEW_INFRASTRUCTURE_NONE);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/console_cmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ DEF_CONSOLE_CMD(ConScrollToTile)
* Highlight a tile on the map.
* param x tile number or tile x coordinate.
* param y optional y coordinate.
* @note When only one argument is given it is intepreted as the tile number.
* @note When only one argument is given it is interpreted as the tile number.
* When two arguments are given, they are interpreted as the tile's x
* and y coordinates.
* @return True when either console help was shown or a proper amount of parameters given.
Expand Down Expand Up @@ -1204,7 +1204,7 @@ DEF_CONSOLE_CMD(ConMergeCompanies)
if (argc != 3) {
IConsolePrint(CC_HELP, "Merge two companies together. Usage: 'merge_companies <main-company-id> <to-merge-company-id>'");
IConsolePrint(CC_HELP, "The first company ID <main-company-id> will be left with the combined assets of both companies.");
IConsolePrint(CC_HELP, "The second company ID <to-merge-company-id> will be removed, with all assets transfered to the first company ID.");
IConsolePrint(CC_HELP, "The second company ID <to-merge-company-id> will be removed, with all assets transferred to the first company ID.");
IConsolePrint(CC_HELP, "For company-id's, see the list of companies from the dropdown menu. Company 1 is 1, etc.");
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/crashlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class CrashLog {
/** Pointer to the error message. */
static const char *message;

/** Whether a crash has already occured */
/** Whether a crash has already occurred */
static bool have_crashed;

protected:
Expand Down
2 changes: 1 addition & 1 deletion src/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void DebugIntl(DebugLevelID dbg, int8_t level, fmt::format_string<T...> msg, T&&
}

/**
* Ouptut a line of debugging information.
* Output a line of debugging information.
* @param name The category of debug information.
* @param level The maximum debug level this message should be shown at. When the debug level for this category is set lower, then the message will not be shown.
* @param format_string The formatting string of the message.
Expand Down
6 changes: 3 additions & 3 deletions src/departures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ static void GetDepartureCandidateOrderDatesFromVehicle(std::vector<OrderDate> &n
break;
}

/* If an order has a 0 travel time, and it's not explictly set, then stop. */
/* If an order has a 0 travel time, and it's not explicitly set, then stop. */
if (require_travel_time && order->GetTravelTime() == 0 && !order->IsTravelTimetabled() && !order->IsType(OT_IMPLICIT)) {
break;
}
Expand Down Expand Up @@ -1163,7 +1163,7 @@ static DepartureList MakeDepartureListLiveMode(DepartureOrderDestinationDetector
break;
}

/* If an order has a 0 travel time, and it's not explictly set, then stop. */
/* If an order has a 0 travel time, and it's not explicitly set, then stop. */
if (require_travel_time && order->GetTravelTime() == 0 && !order->IsTravelTimetabled() && !order->IsType(OT_IMPLICIT)) {
break;
}
Expand Down Expand Up @@ -1437,7 +1437,7 @@ void DepartureListScheduleModeSlotEvaluator::EvaluateSlotIndex(uint slot_index)
/* Loop through the vehicle's orders until we've found a suitable order or we've determined that no such order exists. */
/* We only need to consider each order at most once. */
for (int i = this->v->GetNumOrders(); i > 0; --i) {
/* If an order has a 0 travel time, and it's not explictly set, then stop. */
/* If an order has a 0 travel time, and it's not explicitly set, then stop. */
if (require_travel_time && order->GetTravelTime() == 0 && !order->IsTravelTimetabled() && !order->IsType(OT_IMPLICIT) && !order->IsType(OT_CONDITIONAL)) {
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/economy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ static void CompaniesGenStatistics()
}
cur_company.Restore();

/* Only run the economic statics and update company stats every 3rd month (1st of quarter). */
/* Only run the economic statistics and update company stats every 3rd month (1st of quarter). */
if ((EconTime::CurMonth() % 3) != 0) return;

for (Company *c : Company::Iterate()) {
Expand Down
2 changes: 1 addition & 1 deletion src/fileio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ bool TarScanner::AddFile(Subdirectory sd, const std::string &filename)
* header contains garbage and is malicious. So, we cannot rely on the string
* being properly terminated.
* As such, do not use strlen to determine the actual length (explicitly or
* implictly via the std::string constructor), but pass the buffer bounds
* implicitly via the std::string constructor), but pass the buffer bounds
* explicitly.
* @param buffer The buffer to read from.
* @return The string data.
Expand Down
2 changes: 1 addition & 1 deletion src/gamelog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void GamelogPrint(format_target &buffer)
break;

case GLCT_REVISION:
/* The game was loaded in a diffferent version than before. */
/* The game was loaded in a different version than before. */
buffer.format("Revision text changed to {}, savegame version {}, ",
lc->revision.text, lc->revision.slver);

Expand Down
2 changes: 1 addition & 1 deletion src/genworld.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static const uint CUSTOM_SEA_LEVEL_MIN_PERCENTAGE = 1; ///< Minimum percentag
static const uint CUSTOM_SEA_LEVEL_MAX_PERCENTAGE = 90; ///< Maximum percentage a user can specify for custom sea level.

static const uint MAP_HEIGHT_LIMIT_AUTO_MINIMUM = 30; ///< When map height limit is auto, make this the lowest possible map height limit.
static const uint MAP_HEIGHT_LIMIT_AUTO_CEILING_ROOM = 15; ///< When map height limit is auto, the map height limit will be the higest peak plus this value.
static const uint MAP_HEIGHT_LIMIT_AUTO_CEILING_ROOM = 15; ///< When map height limit is auto, the map height limit will be the highest peak plus this value.

typedef void GWDoneProc(); ///< Procedure called when the genworld process finishes
typedef void GWAbortProc(); ///< Called when genworld is aborted
Expand Down
2 changes: 1 addition & 1 deletion src/gfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2235,7 +2235,7 @@ void UpdateGUIZoom()

/**
* Resolve GUI zoom level and adjust GUI to new zoom, if auto-suggestion is requested.
* @param automatic Set if the change is occuring due to OS DPI scaling being changed.
* @param automatic Set if the change is occurring due to OS DPI scaling being changed.
* @returns true when the zoom level has changed, caller must call ReInitAllWindows(true)
* after resizing the application's window/buffer.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ground_vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ GroundVehicleAcceleration GroundVehicle<T, Type>::GetAcceleration()
}


/* Constructued from power, with need to multiply by 18 and assuming
/* Constructed from power, with need to multiply by 18 and assuming
* low speed, it needs to be a 64 bit integer too. */
int64_t force;
int64_t braking_force;
Expand Down
2 changes: 1 addition & 1 deletion src/industry_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type,
a.cargo = indspec->accepts_cargo[index];
}

/* Randomize inital production if non-original economy is used and there are no production related callbacks. */
/* Randomize initial production if non-original economy is used and there are no production related callbacks. */
if (!indspec->UsesOriginalEconomy()) {
for (auto &p : i->Produced()) {
p.rate = ClampTo<uint8_t>((RandomRange(256) + 128) * p.rate >> 8);
Expand Down
2 changes: 1 addition & 1 deletion src/industry_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ inline void SetIndustryConstructionCounter(TileIndex tile, uint8_t value)
/**
* Reset the construction stage counter of the industry,
* as well as the completion bit.
* In fact, it is the same as restarting construction frmo ground up
* In fact, it is the same as restarting construction from the ground up.
* @param tile the tile to query
* @pre IsTileType(tile, MP_INDUSTRY)
*/
Expand Down
2 changes: 1 addition & 1 deletion src/landscape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ static void CreateRivers()
* Calculate what height would be needed to cover N% of the landmass.
*
* The function allows both snow and desert/tropic line to be calculated. It
* tries to find the closests height which covers N% of the landmass; it can
* tries to find the closest height which covers N% of the landmass; it can
* be below or above it.
*
* Tropic has a mechanism where water and tropic tiles in mountains grow
Expand Down
2 changes: 1 addition & 1 deletion src/landscape_ppz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ uint GetPartialPixelZ(int x, int y, Slope corners)
case SLOPE_S: return x + y >= (int)TILE_SIZE ? (1 + x + y - TILE_SIZE) >> 1 : 0;
case SLOPE_W: return x >= y ? (x - y) >> 1 : 0;

/* Two corners next to eachother are up. */
/* Two corners next to each other are up. */
case SLOPE_NE: return (TILE_SIZE - x) >> 1;
case SLOPE_SE: return (y + 1) >> 1;
case SLOPE_SW: return (x + 1) >> 1;
Expand Down
2 changes: 1 addition & 1 deletion src/league_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class ScriptLeagueWindow : public Window {
uint score_width; ///< The width of the score text
uint header_height; ///< Height of the table header
int line_height; ///< Height of the text lines
Dimension icon_size; ///< Dimenion of the company icon.
Dimension icon_size; ///< Dimension of the company icon.
std::string title;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/linkgraph/linkgraphschedule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ void LinkGraphJobGroup::SpawnThread()
}
} else {
/* Of course this will hang a bit.
* On the other hand, if you want to play games which make this hang noticably
* On the other hand, if you want to play games which make this hang noticeably
* on a platform without threads then you'll probably get other problems first.
* OK:
* If someone comes and tells me that this hangs for them, I'll implement a
Expand Down
2 changes: 1 addition & 1 deletion src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ uint DistanceManhattan(TileIndex t0, TileIndex t1)
* Gets the 'Square' distance between the two given tiles.
* The 'Square' distance is the square of the shortest (straight line)
* distance between the two tiles.
* Also known as euclidian- or L2-Norm squared.
* Also known as Euclidean- or L2-Norm squared.
* @param t0 the start tile
* @param t1 the end tile
* @return the distance
Expand Down
2 changes: 1 addition & 1 deletion src/map_func.h
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ inline TileIndexDiffC TileIndexToTileIndexDiffC(TileIndex tile_a, TileIndex tile

/* Functions to calculate distances */
uint DistanceManhattan(TileIndex, TileIndex); ///< also known as L1-Norm. Is the shortest distance one could go over diagonal tracks (or roads)
uint64_t DistanceSquare64(TileIndex, TileIndex); ///< euclidian- or L2-Norm squared
uint64_t DistanceSquare64(TileIndex, TileIndex); ///< Euclidean- or L2-Norm squared
inline uint DistanceSquare(TileIndex t0, TileIndex t1) { return ClampTo<uint>(DistanceSquare64(t0, t1)); }
uint DistanceMax(TileIndex, TileIndex); ///< also known as L-Infinity-Norm
uint DistanceMaxPlusManhattan(TileIndex, TileIndex); ///< Max + Manhattan
Expand Down
2 changes: 1 addition & 1 deletion src/network/core/http_winhttp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void NetworkHTTPRequest::WinHttpCallback(DWORD code, void *info, DWORD length)
break;

default:
Debug(net, 0, "HTTP request failed: unexepected callback code 0x{:x}", code);
Debug(net, 0, "HTTP request failed: unexpected callback code 0x{:x}", code);
this->callback.OnFailure();
this->finished = true;
return;
Expand Down
2 changes: 1 addition & 1 deletion src/network/core/network_game_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ void DeserializeNetworkGameInfo(Packet &p, NetworkGameInfo &info, const GameInfo

case 4: {
/* Ensure that the maximum number of NewGRFs and the field in the network
* protocol are matched to eachother. If that is not the case anymore a
* protocol are matched to each other. If that is not the case anymore a
* check must be added to ensure the received data is still valid. */
static_assert(std::numeric_limits<uint8_t>::max() == NETWORK_MAX_GRF_COUNT);
uint num_grfs = p.Recv_uint8();
Expand Down
2 changes: 1 addition & 1 deletion src/network/core/packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ PacketType Packet::GetPacketType() const

/**
* Get the amount of bytes that are still available for the Transfer functions.
* @return The number of bytes that still have to be transfered.
* @return The number of bytes that still have to be transferred.
*/
size_t Packet::RemainingBytesToTransfer() const
{
Expand Down
2 changes: 1 addition & 1 deletion src/network/core/tcp_admin.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class NetworkAdminSocketHandler : public NetworkTCPSocketHandler {
* Send chat from the external source:
* string Name of the source this message came from.
* uint16_t TextColour to use for the message.
* string Name of the user who sent the messsage.
* string Name of the user who sent the message.
* string Message.
* @param p The packet that was just received.
* @return The state the network should have.
Expand Down
2 changes: 1 addition & 1 deletion src/network/core/tcp_content.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ bool NetworkContentSocketHandler::ReceivePackets()
* As a result, we simple handle an arbitrary number of packets in one cycle,
* and let the rest be handled in subsequent cycles. These are ran, almost,
* immediately after this cycle so in speed it does not matter much, except
* that the user inferface will appear better responding.
* that the user interface will appear better responding.
*
* What arbitrary number to choose is the ultimate question though.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/network/core/tcp_coordinator.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class NetworkCoordinatorSocketHandler : public NetworkTCPSocketHandler {
/**
* Game Coordinator requests the client/server to do a STUN request to the
* STUN server. Important is to remember the local port these STUN requests
* are sent from, as this will be needed for later conenctions too.
* are sent from, as this will be needed for later connections too.
* The client/server should do multiple STUN requests for every available
* interface that connects to the Internet (e.g., once for IPv4 and once
* for IPv6).
Expand Down
2 changes: 1 addition & 1 deletion src/network/core/tcp_game.h
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ class NetworkGameSocketHandler : public NetworkTCPSocketHandler {
* Sends a chat-packet for external source to the client:
* string Name of the source this message came from.
* uint16_t TextColour to use for the message.
* string Name of the user who sent the messsage.
* string Name of the user who sent the message.
* string Message (max NETWORK_CHAT_LENGTH).
* @param p The packet that was just received.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/network/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ bool NetworkClientConnectGame(const std::string &connection_string, CompanyID de
} else {
/* When already playing a game, first go back to the main menu. This
* disconnects the user from the current game, meaning we can safely
* load in the new. After all, there is little point in continueing to
* load in the new. After all, there is little point in continuing to
* play on a server if we are connecting to another one.
*/
_switch_mode = SM_JOIN_GAME;
Expand Down
2 changes: 1 addition & 1 deletion src/network/network_content_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ struct ContentListFilterData {

/** Filter criteria for NetworkContentListWindow. */
enum ContentListFilterCriteria {
CONTENT_FILTER_TEXT = 0, ///< Filter by query sting
CONTENT_FILTER_TEXT = 0, ///< Filter by query string
CONTENT_FILTER_TYPE_OR_SELECTED,///< Filter by being of displayed type or selected for download
};

Expand Down
2 changes: 1 addition & 1 deletion src/network/network_coordinator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ bool ClientNetworkCoordinatorSocketHandler::Receive_GC_LISTING(Packet &p)
ClearGRFConfigList(&item->info.grfconfig);
/* Copy the new NetworkGameInfo info. */
item->info = ngi;
/* Check for compatability with the client. */
/* Check for compatibility with the client. */
CheckGameCompatibility(item->info);
/* Mark server as online. */
item->status = NGLS_ONLINE;
Expand Down
4 changes: 2 additions & 2 deletions src/network/network_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ NetworkRecvStatus QueryNetworkGameSocketHandler::Receive_SERVER_GAME_INFO(Packet
ClearGRFConfigList(&item->info.grfconfig);
/* Retrieve the NetworkGameInfo from the packet. */
DeserializeNetworkGameInfo(p, item->info);
/* Check for compatability with the client. */
/* Check for compatibility with the client. */
CheckGameCompatibility(item->info);
/* Ensure we consider the server online. */
item->status = NGLS_ONLINE;
Expand All @@ -141,7 +141,7 @@ NetworkRecvStatus QueryNetworkGameSocketHandler::Receive_SERVER_GAME_INFO_EXTEND
ClearGRFConfigList(&item->info.grfconfig);
/* Retrieve the NetworkGameInfo from the packet. */
DeserializeNetworkGameInfoExtended(p, item->info);
/* Check for compatability with the client. */
/* Check for compatibility with the client. */
CheckGameCompatibility(item->info, true);
/* Ensure we consider the server online. */
item->status = NGLS_ONLINE;
Expand Down
4 changes: 2 additions & 2 deletions src/network/network_query.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "network_internal.h"
#include <vector>

/** Class for handling the client side of quering a game server. */
/** Class for handling the client side of querying a game server. */
class QueryNetworkGameSocketHandler : public ZeroedMemoryAllocator, public NetworkGameSocketHandler {
private:
static std::vector<std::unique_ptr<QueryNetworkGameSocketHandler>> queries; ///< Pending queries.
Expand All @@ -34,7 +34,7 @@ class QueryNetworkGameSocketHandler : public ZeroedMemoryAllocator, public Netwo

public:
/**
* Create a new socket for the client side of quering game server.
* Create a new socket for the client side of querying game server.
* @param s The socket to connect with.
* @param connection_string The connection string of the server.
*/
Expand Down
Loading

0 comments on commit 4efebc6

Please sign in to comment.