From 04f659e768486da4fc73a97a633f140d9733bf78 Mon Sep 17 00:00:00 2001 From: JMcKiern Date: Sun, 29 Sep 2019 21:27:32 +0100 Subject: Fix: Some typos found using codespell --- src/aircraft_cmd.cpp | 2 +- src/autoreplace_cmd.cpp | 2 +- src/blitter/32bpp_anim.cpp | 2 +- src/blitter/32bpp_optimized.cpp | 4 ++-- src/bmp.h | 2 +- src/cargoaction.cpp | 2 +- src/cargopacket.cpp | 2 +- src/cargopacket.h | 2 +- src/command.cpp | 2 +- src/console_cmds.cpp | 2 +- src/console_gui.cpp | 2 +- src/core/pool_type.hpp | 2 +- src/debug.h | 2 +- src/depend/depend.cpp | 2 +- src/economy.cpp | 2 +- src/fontcache.cpp | 2 +- src/fontdetection.cpp | 2 +- src/framerate_gui.cpp | 2 +- src/gfx.cpp | 4 ++-- src/gfx_func.h | 2 +- src/ground_vehicle.cpp | 2 +- src/landscape.cpp | 4 ++-- src/linkgraph/demands.h | 2 +- src/linkgraph/init.h | 2 +- src/linkgraph/linkgraphjob.cpp | 2 +- src/linkgraph/linkgraphjob.h | 2 +- src/linkgraph/refresh.cpp | 2 +- src/misc/blob.hpp | 4 ++-- src/misc/countedptr.hpp | 2 +- src/misc/str.hpp | 8 ++++---- src/misc_cmd.cpp | 2 +- src/music/cocoa_m.cpp | 2 +- src/music/dmusic.cpp | 14 +++++++------- src/music/qtmidi.cpp | 4 ++-- src/network/network_content.cpp | 4 ++-- src/network/network_content_gui.cpp | 2 +- src/network/network_gui.cpp | 2 +- src/network/network_server.cpp | 2 +- src/newgrf.cpp | 18 +++++++++--------- src/newgrf.h | 2 +- src/newgrf_airport.cpp | 2 +- src/newgrf_commons.cpp | 2 +- src/newgrf_engine.cpp | 4 ++-- src/newgrf_text.cpp | 2 +- src/news_gui.cpp | 4 ++-- src/news_type.h | 4 ++-- src/object_cmd.cpp | 2 +- src/order_cmd.cpp | 2 +- src/os/macosx/osx_stdafx.h | 2 +- src/osk_gui.cpp | 2 +- src/pathfinder/npf/npf.cpp | 2 +- src/querystring_gui.h | 2 +- src/road.cpp | 6 +++--- src/road_gui.cpp | 2 +- src/saveload/afterload.cpp | 2 +- src/saveload/saveload.cpp | 2 +- src/saveload/saveload.h | 4 ++-- src/saveload/strings_sl.cpp | 2 +- src/script/api/ai_changelog.hpp | 2 +- src/script/api/script_cargo.hpp | 2 +- src/script/api/script_event_types.hpp | 4 ++-- src/script/api/script_goal.cpp | 2 +- src/script/api/script_road.hpp | 6 +++--- src/script/api/script_story_page.hpp | 4 ++-- src/settings.cpp | 2 +- src/settings_type.h | 2 +- src/ship_cmd.cpp | 4 ++-- src/sound/allegro_s.h | 2 +- src/sound/sdl_s.h | 2 +- src/station_cmd.cpp | 2 +- src/story.cpp | 2 +- src/story_gui.cpp | 4 ++-- src/table/elrail_data.h | 2 +- src/table/gameopt_settings.ini | 2 +- src/table/settings.h.preamble | 2 +- src/table/settings.ini | 4 ++-- src/table/sprites.h | 4 ++-- src/tile_map.cpp | 4 ++-- src/tile_map.h | 8 ++++---- src/town.h | 2 +- src/townname.cpp | 2 +- src/track_func.h | 6 +++--- src/train_cmd.cpp | 2 +- src/tree_map.h | 6 +++--- src/tunnelbridge_cmd.cpp | 6 +++--- src/vehicle.cpp | 2 +- src/vehicle_type.h | 2 +- src/video/cocoa/cocoa_keys.h | 2 +- src/viewport_type.h | 2 +- src/void_cmd.cpp | 2 +- src/water_map.h | 4 ++-- src/widget_type.h | 2 +- src/window.cpp | 4 ++-- 93 files changed, 142 insertions(+), 142 deletions(-) (limited to 'src') diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 5cb350404..aa830fa14 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1815,7 +1815,7 @@ static bool AirportHasBlock(Aircraft *v, const AirportFTA *current_pos, const Ai * "reserve" a block for the plane * @param v airplane that requires the operation * @param current_pos of the vehicle in the list of blocks - * @param apc airport on which block is requsted to be set + * @param apc airport on which block is requested to be set * @returns true on success. Eg, next block was free and we have occupied it */ static bool AirportSetBlocks(Aircraft *v, const AirportFTA *current_pos, const AirportFTAClass *apc) diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 99f14f218..7c43f9e7a 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -582,7 +582,7 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon if ((flags & DC_EXEC) != 0) TransferCargo(w, new_head, true); /* Sell the vehicle. - * Note: This might temporarly construct new trains, so use DC_AUTOREPLACE to prevent + * Note: This might temporarily construct new trains, so use DC_AUTOREPLACE to prevent * it from failing due to engine limits. */ cost.AddCost(DoCommand(0, w->index, 0, flags | DC_AUTOREPLACE, GetCmdSellVeh(w))); if ((flags & DC_EXEC) != 0) { diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp index 293ebb173..af2755cd7 100644 --- a/src/blitter/32bpp_anim.cpp +++ b/src/blitter/32bpp_anim.cpp @@ -42,7 +42,7 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel Colour *dst = (Colour *)bp->dst + bp->top * bp->pitch + bp->left; uint16 *anim = this->anim_buf + this->ScreenToAnimOffset((uint32 *)bp->dst) + bp->top * this->anim_buf_pitch + bp->left; - const byte *remap = bp->remap; // store so we don't have to access it via bp everytime + const byte *remap = bp->remap; // store so we don't have to access it via bp every time for (int y = 0; y < bp->height; y++) { Colour *dst_ln = dst + bp->pitch; diff --git a/src/blitter/32bpp_optimized.cpp b/src/blitter/32bpp_optimized.cpp index cc056f5b5..c6fa762e5 100644 --- a/src/blitter/32bpp_optimized.cpp +++ b/src/blitter/32bpp_optimized.cpp @@ -48,7 +48,7 @@ inline void Blitter_32bppOptimized::Draw(const Blitter::BlitterParams *bp, ZoomL /* skip lines in dst */ Colour *dst = (Colour *)bp->dst + 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 byte *remap = bp->remap; for (int y = 0; y < bp->height; y++) { @@ -66,7 +66,7 @@ inline void Blitter_32bppOptimized::Draw(const Blitter::BlitterParams *bp, ZoomL /* we will end this line when we reach this point */ Colour *dst_end = dst + bp->skip_left; - /* number of pixels with the same aplha channel class */ + /* number of pixels with the same alpha channel class */ uint n; while (dst < dst_end) { diff --git a/src/bmp.h b/src/bmp.h index cf2b538f3..adfbfa5fe 100644 --- a/src/bmp.h +++ b/src/bmp.h @@ -15,7 +15,7 @@ #include "gfx_type.h" struct BmpInfo { - uint32 offset; ///< offset of bitmap data from .bmp file begining + uint32 offset; ///< offset of bitmap data from .bmp file beginning uint32 width; ///< bitmap width uint32 height; ///< bitmap height bool os2_bmp; ///< true if OS/2 1.x or windows 2.x bitmap diff --git a/src/cargoaction.cpp b/src/cargoaction.cpp index afc1b0fff..73908d339 100644 --- a/src/cargoaction.cpp +++ b/src/cargoaction.cpp @@ -162,7 +162,7 @@ bool CargoReturn::operator()(CargoPacket *cp) /** * Transfers some cargo from a vehicle to a station. - * @param cp Packet to be transfered. + * @param cp Packet to be transferred. * @return True if the packet was completely reserved, false if part of it was. */ bool CargoTransfer::operator()(CargoPacket *cp) diff --git a/src/cargopacket.cpp b/src/cargopacket.cpp index 2147783c8..846af4680 100644 --- a/src/cargopacket.cpp +++ b/src/cargopacket.cpp @@ -395,7 +395,7 @@ void VehicleCargoList::AgeCargo() } /** - * Sets loaded_at_xy to the current station for all cargo to be transfered. + * Sets loaded_at_xy to the current station for all cargo to be transferred. * This is done when stopping or skipping while the vehicle is unloading. In * that case the vehicle will get part of its transfer credits early and it may * get more transfer credits than it's entitled to. diff --git a/src/cargopacket.h b/src/cargopacket.h index 0e2a1bc97..4eda6a79a 100644 --- a/src/cargopacket.h +++ b/src/cargopacket.h @@ -286,7 +286,7 @@ protected: typedef CargoList Parent; Money feeder_share; ///< Cache for the feeder share. - uint action_counts[NUM_MOVE_TO_ACTION]; ///< Counts of cargo to be transfered, delivered, kept and loaded. + uint action_counts[NUM_MOVE_TO_ACTION]; ///< Counts of cargo to be transferred, delivered, kept and loaded. template void ShiftCargo(Taction action); diff --git a/src/command.cpp b/src/command.cpp index c4d3fa7ce..66509cf30 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -554,7 +554,7 @@ bool DoCommandP(const CommandContainer *container, bool my_cmd) bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, bool my_cmd) { /* Cost estimation is generally only done when the - * local user presses shift while doing somthing. + * local user presses shift while doing something. * However, in case of incoming network commands, * map generation or the pause button we do want * to execute. */ diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 13784178f..cdc6c10e0 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -249,7 +249,7 @@ DEF_CONSOLE_CMD(ConResetTile) * Scroll to 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. diff --git a/src/console_gui.cpp b/src/console_gui.cpp index 2cb02ff56..916a2ec74 100644 --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -281,7 +281,7 @@ struct IConsoleWindow : Window case WKC_RETURN: case WKC_NUM_ENTER: { /* We always want the ] at the left side; we always force these strings to be left - * aligned anyway. So enforce this in all cases by addding a left-to-right marker, + * aligned anyway. So enforce this in all cases by adding a left-to-right marker, * otherwise it will be drawn at the wrong side with right-to-left texts. */ IConsolePrintF(CC_COMMAND, LRM "] %s", _iconsole_cmdline.buf); const char *cmd = IConsoleHistoryAdd(_iconsole_cmdline.buf); diff --git a/src/core/pool_type.hpp b/src/core/pool_type.hpp index 61dd29213..8102d580c 100644 --- a/src/core/pool_type.hpp +++ b/src/core/pool_type.hpp @@ -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 . */ -/** @file pool_type.hpp Defintion of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle, Town, and other indexed items. */ +/** @file pool_type.hpp Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle, Town, and other indexed items. */ #ifndef POOL_TYPE_HPP #define POOL_TYPE_HPP diff --git a/src/debug.h b/src/debug.h index 3faefffaf..337fe8639 100644 --- a/src/debug.h +++ b/src/debug.h @@ -85,7 +85,7 @@ const char *GetDebugString(); * TIC() / TOC() creates its own block, so make sure not the mangle * it with another block. * - * The output is counted in CPU cycles, and not comparable accross + * The output is counted in CPU cycles, and not comparable across * machines. Mainly useful for local optimisations. **/ #define TIC() {\ diff --git a/src/depend/depend.cpp b/src/depend/depend.cpp index 5f95ffc42..9321e573b 100644 --- a/src/depend/depend.cpp +++ b/src/depend/depend.cpp @@ -292,7 +292,7 @@ public: } /** - * Read the currenty processed string. + * Read the currently processed string. * @return the string, can be nullptr. */ const char *GetString() const diff --git a/src/economy.cpp b/src/economy.cpp index b6778f9e5..e8fbea094 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1706,7 +1706,7 @@ static void LoadUnloadVehicle(Vehicle *front) dirty_station = true; if (!ge->HasRating()) { - /* Upon transfering cargo, make sure the station has a rating. Fake a pickup for the + /* Upon transferring cargo, make sure the station has a rating. Fake a pickup for the * first unload to prevent the cargo from quickly decaying after the initial drop. */ ge->time_since_pickup = 0; SetBit(ge->status, GoodsEntry::GES_RATING); diff --git a/src/fontcache.cpp b/src/fontcache.cpp index c29c868e5..d63b90e86 100644 --- a/src/fontcache.cpp +++ b/src/fontcache.cpp @@ -978,7 +978,7 @@ static void LoadWin32Font(FontSize fs) if (AddFontResourceEx(fontPath, FR_PRIVATE, 0) != 0) { /* Try a nice little undocumented function first for getting the internal font name. - * Some documentation is fount at: http://www.undocprint.org/winspool/getfontresourceinfo */ + * Some documentation is found at: http://www.undocprint.org/winspool/getfontresourceinfo */ typedef BOOL(WINAPI * PFNGETFONTRESOURCEINFO)(LPCTSTR, LPDWORD, LPVOID, DWORD); #ifdef UNICODE static PFNGETFONTRESOURCEINFO GetFontResourceInfo = (PFNGETFONTRESOURCEINFO)GetProcAddress(GetModuleHandle(_T("Gdi32")), "GetFontResourceInfoW"); diff --git a/src/fontdetection.cpp b/src/fontdetection.cpp index 7b2a6756c..75806c8fe 100644 --- a/src/fontdetection.cpp +++ b/src/fontdetection.cpp @@ -399,7 +399,7 @@ FT_Error GetFontByFaceName(const char *font_name, FT_Face *face) #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) if (MacOSVersionIsAtLeast(10, 6, 0)) { /* Simply creating the font using CTFontCreateWithNameAndSize will *always* return - * something, no matter the name. As such, we can't use it to check for existance. + * something, no matter the name. As such, we can't use it to check for existence. * We instead query the list of all font descriptors that match the given name which * does not do this stupid name fallback. */ CTFontDescriptorRef name_desc = CTFontDescriptorCreateWithNameAndSize(name, 0.0); diff --git a/src/framerate_gui.cpp b/src/framerate_gui.cpp index 10014b4f4..5c54eed5b 100644 --- a/src/framerate_gui.cpp +++ b/src/framerate_gui.cpp @@ -918,7 +918,7 @@ struct FrametimeGraphWindow : Window { } } } - /* Draw divison lines and labels for the horizontal axis */ + /* Draw division lines and labels for the horizontal axis */ for (uint division = horz_divisions; division > 0; division--) { int x = Scinterlate(x_zero, x_max, 0, (int)horz_divisions, (int)horz_divisions - (int)division); GfxDrawLine(x, y_max, x, y_zero, c_grid); diff --git a/src/gfx.cpp b/src/gfx.cpp index 4fd705b9f..6814165d4 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -212,7 +212,7 @@ static inline void GfxDoDrawLine(void *video, int x, int y, int x2, int y2, int * work the blitter has to do by shortening the effective line segment. * However, in order to get that right and prevent the flickering effects * of rounding errors so much additional code has to be run here that in - * the general case the effect is not noticable. */ + * the general case the effect is not noticeable. */ blitter->DrawLine(video, x, y, x2, y2, screen_width, screen_height, colour, width, dash); } @@ -1669,7 +1669,7 @@ bool CursorVars::UpdateCursorPosition(int x, int y, bool queued_warp) if (this->delta.x != 0 || this->delta.y != 0) { /* Trigger warp. * Note: We also trigger warping again, if there is already a pending warp. - * This makes it more tolerant about the OS or other software inbetween + * This makes it more tolerant about the OS or other software in between * botchering the warp. */ this->queued_warp = queued_warp; need_warp = true; diff --git a/src/gfx_func.h b/src/gfx_func.h index 1724a931f..7b6529564 100644 --- a/src/gfx_func.h +++ b/src/gfx_func.h @@ -31,7 +31,7 @@ * VideoDriver::MakeDirty and it is truncated back to an empty rectangle. At some * later point (which is uninteresting, too) the video driver * repaints all these saved rectangle instead of the whole screen and drop the - * rectangle informations. Then a new round begins by marking objects "dirty". + * rectangle information. Then a new round begins by marking objects "dirty". * * @see VideoDriver::MakeDirty * @see _invalid_rect diff --git a/src/ground_vehicle.cpp b/src/ground_vehicle.cpp index c269aeb79..a7869d958 100644 --- a/src/ground_vehicle.cpp +++ b/src/ground_vehicle.cpp @@ -116,7 +116,7 @@ int GroundVehicle::GetAcceleration() const /* Power is stored in HP, we need it in watts. * Each vehicle can have U16 power, 128 vehicles, HP -> watt - * and km/h to m/s conversion below result in a maxium of + * and km/h to m/s conversion below result in a maximum of * about 1.1E11, way more than 4.3E9 of int32. */ int64 power = this->gcache.cached_power * 746ll; diff --git a/src/landscape.cpp b/src/landscape.cpp index 66be73bd6..0d5df5f87 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -352,8 +352,8 @@ int GetSlopePixelZ(int x, int y) * Return world \c z coordinate of a given point of a tile, * also for tiles outside the map (virtual "black" tiles). * - * @param x World X coordinate in tile "units", may be ouside the map. - * @param y World Y coordinate in tile "units", may be ouside the map. + * @param x World X coordinate in tile "units", may be outside the map. + * @param y World Y coordinate in tile "units", may be outside the map. * @return World Z coordinate at tile ground level, including slopes and foundations. */ int GetSlopePixelZOutsideMap(int x, int y) diff --git a/src/linkgraph/demands.h b/src/linkgraph/demands.h index 8a639b8b1..6fe376834 100644 --- a/src/linkgraph/demands.h +++ b/src/linkgraph/demands.h @@ -23,7 +23,7 @@ private: }; /** - * Stateless, thread safe demand hander. Doesn't do anything but call DemandCalculator. + * Stateless, thread safe demand handler. Doesn't do anything but call DemandCalculator. */ class DemandHandler : public ComponentHandler { public: diff --git a/src/linkgraph/init.h b/src/linkgraph/init.h index a39a0f820..377c88631 100644 --- a/src/linkgraph/init.h +++ b/src/linkgraph/init.h @@ -6,7 +6,7 @@ #include "linkgraphjob_base.h" /** - * Stateless, thread safe initialization hander. Initializes node and edge + * Stateless, thread safe initialization handler. Initializes node and edge * annotations. */ class InitHandler : public ComponentHandler { diff --git a/src/linkgraph/linkgraphjob.cpp b/src/linkgraph/linkgraphjob.cpp index cf180a3ae..cd358f37f 100644 --- a/src/linkgraph/linkgraphjob.cpp +++ b/src/linkgraph/linkgraphjob.cpp @@ -62,7 +62,7 @@ void LinkGraphJob::SpawnThread() { if (!StartNewThread(&this->thread, "ottd:linkgraph", &(LinkGraphSchedule::Run), this)) { /* 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 him/her, I'll implement a diff --git a/src/linkgraph/linkgraphjob.h b/src/linkgraph/linkgraphjob.h index a20a2025c..fa6ca618a 100644 --- a/src/linkgraph/linkgraphjob.h +++ b/src/linkgraph/linkgraphjob.h @@ -415,7 +415,7 @@ public: protected: /** - * Some boundaries to clamp agains in order to avoid integer overflows. + * Some boundaries to clamp against in order to avoid integer overflows. */ enum PathCapacityBoundaries { PATH_CAP_MULTIPLIER = 16, diff --git a/src/linkgraph/refresh.cpp b/src/linkgraph/refresh.cpp index b749d2718..ef10de6fe 100644 --- a/src/linkgraph/refresh.cpp +++ b/src/linkgraph/refresh.cpp @@ -250,7 +250,7 @@ void LinkRefresher::RefreshStats(const Order *cur, const Order *next) /** * Iterate over orders starting at \a cur and \a next and refresh links * associated with them. \a cur and \a next can be equal. If they're not they - * must be "neigbours" in their order list, which means \a next must be directly + * must be "neighbours" in their order list, which means \a next must be directly * reachable from \a cur without passing any further OT_GOTO_STATION or * OT_IMPLICIT orders in between. * @param cur Current order being evaluated. diff --git a/src/misc/blob.hpp b/src/misc/blob.hpp index e725ccd27..fafeb8078 100644 --- a/src/misc/blob.hpp +++ b/src/misc/blob.hpp @@ -154,13 +154,13 @@ protected: header = &src[1]; } - /** blob header accessor - use it rather than using the pointer arithmetics directly - non-const version */ + /** blob header accessor - use it rather than using the pointer arithmetic directly - non-const version */ inline BlobHeader& Hdr() { return *(header - 1); } - /** blob header accessor - use it rather than using the pointer arithmetics directly - const version */ + /** blob header accessor - use it rather than using the pointer arithmetic directly - const version */ inline const BlobHeader& Hdr() const { return *(header - 1); diff --git a/src/misc/countedptr.hpp b/src/misc/countedptr.hpp index 83d0e036d..1364197dc 100644 --- a/src/misc/countedptr.hpp +++ b/src/misc/countedptr.hpp @@ -53,7 +53,7 @@ public: } protected: - /** add one ref to the underlaying object */ + /** add one ref to the underlying object */ inline void AddRef() { if (m_pT != nullptr) m_pT->AddRef(); diff --git a/src/misc/str.hpp b/src/misc/str.hpp index 1d9802288..42e463158 100644 --- a/src/misc/str.hpp +++ b/src/misc/str.hpp @@ -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 . */ -/** @file str.hpp String formating? */ +/** @file str.hpp String formatting? */ #ifndef STR_HPP #define STR_HPP @@ -91,7 +91,7 @@ struct CStrA : public CBlobT return strcmp(base::Data(), other.Data()) < 0; } - /** Add formated string (like vsprintf) at the end of existing contents. */ + /** Add formatted string (like vsprintf) at the end of existing contents. */ int AddFormatL(const char *format, va_list args) { size_t addSize = max(strlen(format), 16); @@ -126,7 +126,7 @@ struct CStrA : public CBlobT return ret; } - /** Add formated string (like sprintf) at the end of existing contents. */ + /** Add formatted string (like sprintf) at the end of existing contents. */ int CDECL WARN_FORMAT(2, 3) AddFormat(const char *format, ...) { va_list args; @@ -136,7 +136,7 @@ struct CStrA : public CBlobT return ret; } - /** Assign formated string (like sprintf). */ + /** Assign formatted string (like sprintf). */ int CDECL WARN_FORMAT(2, 3) Format(const char *format, ...) { base::Free(); diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp index 4271f5758..e00ad9d9c 100644 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -228,7 +228,7 @@ CommandCost CmdChangeBankBalance(TileIndex tile, DoCommandFlag flags, uint32 p1, cur_company.Restore(); } - /* This command doesn't cost anyting for deity. */ + /* This command doesn't cost anything for deity. */ CommandCost zero_cost(expenses_type, 0); return zero_cost; } diff --git a/src/music/cocoa_m.cpp b/src/music/cocoa_m.cpp index c27a0a092..fd3ff295e 100644 --- a/src/music/cocoa_m.cpp +++ b/src/music/cocoa_m.cpp @@ -114,7 +114,7 @@ const char *MusicDriver_Cocoa::Start(const char * const *parm) /** - * Checks wether the player is active. + * Checks whether the player is active. */ bool MusicDriver_Cocoa::IsSongPlaying() { diff --git a/src/music/dmusic.cpp b/src/music/dmusic.cpp index 7236e89f7..c175b0727 100644 --- a/src/music/dmusic.cpp +++ b/src/music/dmusic.cpp @@ -234,7 +234,7 @@ bool DLSFile::ReadDLSRegion(FILE *f, DWORD list_length, std::vector & break; default: - DEBUG(driver, 7, "DLS: Ignoring unkown chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); + DEBUG(driver, 7, "DLS: Ignoring unknown chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); fseek(f, chunk.length, SEEK_CUR); break; } @@ -257,7 +257,7 @@ bool DLSFile::ReadDLSRegionList(FILE *f, DWORD list_length, DLSInstrument &instr if (list_type == FOURCC_RGN) { this->ReadDLSRegion(f, chunk.length - sizeof(list_type), instrument.regions); } else { - DEBUG(driver, 7, "DLS: Ignoring unkown list chunk of type %c%c%c%c", (char)(list_type & 0xFF), (char)((list_type >> 8) & 0xFF), (char)((list_type >> 16) & 0xFF), (char)((list_type >> 24) & 0xFF)); + DEBUG(driver, 7, "DLS: Ignoring unknown list chunk of type %c%c%c%c", (char)(list_type & 0xFF), (char)((list_type >> 8) & 0xFF), (char)((list_type >> 16) & 0xFF), (char)((list_type >> 24) & 0xFF)); fseek(f, chunk.length - sizeof(list_type), SEEK_CUR); } } else { @@ -304,7 +304,7 @@ bool DLSFile::ReadDLSInstrument(FILE *f, DWORD list_length) break; default: - DEBUG(driver, 7, "DLS: Ignoring unkown chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); + DEBUG(driver, 7, "DLS: Ignoring unknown chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); fseek(f, chunk.length, SEEK_CUR); break; } @@ -329,7 +329,7 @@ bool DLSFile::ReadDLSInstrumentList(FILE *f, DWORD list_length) if (!this->ReadDLSInstrument(f, chunk.length - sizeof(list_type))) return false; } else { - DEBUG(driver, 7, "DLS: Ignoring unkown list chunk of type %c%c%c%c", (char)(list_type & 0xFF), (char)((list_type >> 8) & 0xFF), (char)((list_type >> 16) & 0xFF), (char)((list_type >> 24) & 0xFF)); + DEBUG(driver, 7, "DLS: Ignoring unknown list chunk of type %c%c%c%c", (char)(list_type & 0xFF), (char)((list_type >> 8) & 0xFF), (char)((list_type >> 16) & 0xFF), (char)((list_type >> 24) & 0xFF)); fseek(f, chunk.length - sizeof(list_type), SEEK_CUR); } } else { @@ -392,7 +392,7 @@ bool DLSFile::ReadDLSWave(FILE *f, DWORD list_length, long offset) break; default: - DEBUG(driver, 7, "DLS: Ignoring unkown chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); + DEBUG(driver, 7, "DLS: Ignoring unknown chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); fseek(f, chunk.length, SEEK_CUR); break; } @@ -421,7 +421,7 @@ bool DLSFile::ReadDLSWaveList(FILE *f, DWORD list_length) if (!this->ReadDLSWave(f, chunk.length - sizeof(list_type), chunk_offset - base_offset)) return false; } else { - DEBUG(driver, 7, "DLS: Ignoring unkown list chunk of type %c%c%c%c", (char)(list_type & 0xFF), (char)((list_type >> 8) & 0xFF), (char)((list_type >> 16) & 0xFF), (char)((list_type >> 24) & 0xFF)); + DEBUG(driver, 7, "DLS: Ignoring unknown list chunk of type %c%c%c%c", (char)(list_type & 0xFF), (char)((list_type >> 8) & 0xFF), (char)((list_type >> 16) & 0xFF), (char)((list_type >> 24) & 0xFF)); fseek(f, chunk.length - sizeof(list_type), SEEK_CUR); } } else { @@ -500,7 +500,7 @@ bool DLSFile::LoadFile(const TCHAR *file) break; default: - DEBUG(driver, 7, "DLS: Ignoring unkown chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); + DEBUG(driver, 7, "DLS: Ignoring unknown chunk %c%c%c%c", (char)(chunk.type & 0xFF), (char)((chunk.type >> 8) & 0xFF), (char)((chunk.type >> 16) & 0xFF), (char)((chunk.type >> 24) & 0xFF)); fseek(f, chunk.length, SEEK_CUR); break; } diff --git a/src/music/qtmidi.cpp b/src/music/qtmidi.cpp index eb032e950..e612604ed 100644 --- a/src/music/qtmidi.cpp +++ b/src/music/qtmidi.cpp @@ -156,7 +156,7 @@ static void InitQuickTimeIfNeeded() if (_quicktime_started) return; DEBUG(driver, 2, "qtmidi: initializing Quicktime"); - /* Be polite: check wether QuickTime is available and initialize it. */ + /* Be polite: check whether QuickTime is available and initialize it. */ _quicktime_started = (noErr == Gestalt(gestaltQuickTime, &dummy)) && (noErr == EnterMovies()); @@ -215,7 +215,7 @@ bool MusicDriver_QtMidi::IsSongPlaying() case QT_STATE_PLAY: MoviesTask(_quicktime_movie, 0); - /* Check wether movie ended. */ + /* Check whether movie ended. */ if (IsMovieDone(_quicktime_movie) || (GetMovieTime(_quicktime_movie, nullptr) >= GetMovieDuration(_quicktime_movie))) { diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index 762a8c308..b6d32620b 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -133,7 +133,7 @@ bool ClientNetworkContentSocketHandler::Receive_SERVER_INFO(Packet *p) ci->state = ContentInfo::UNSELECTED; } - /* Something we don't have and has filesize 0 does not exist in te system */ + /* Something we don't have and has filesize 0 does not exist in the system */ if (ci->state == ContentInfo::UNSELECTED && ci->filesize == 0) ci->state = ContentInfo::DOES_NOT_EXIST; /* Do we already have a stub for this? */ @@ -774,7 +774,7 @@ void ClientNetworkContentSocketHandler::SendReceive() if (this->CanSendReceive()) { if (this->ReceivePackets()) { - /* Only update activity once a packet is received, instead of everytime we try it. */ + /* Only update activity once a packet is received, instead of every time we try it. */ this->lastActivity = _realtime_tick; } } diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 875a5b77c..9c58564e7 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -289,7 +289,7 @@ struct ContentListFilterData { std::bitset types; ///< Content types displayed }; -/** Filter criterias for NetworkContentListWindow. */ +/** Filter criteria for NetworkContentListWindow. */ enum ContentListFilterCriteria { CONTENT_FILTER_TEXT = 0, ///< Filter by query sting CONTENT_FILTER_TYPE_OR_SELECTED,///< Filter by being of displayed type or selected for download diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 6486f4531..e14bc36cc 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -238,7 +238,7 @@ protected: int lock_offset; ///< Left offset for lock icon. int blot_offset; ///< Left offset for green/yellow/red compatibility icon. - int flag_offset; ///< Left offset for langauge flag icon. + int flag_offset; ///< Left offset for language flag icon. /** * (Re)build the GUI network game list (a.k.a. this->servers) as some diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 24b91e89b..6d9dcc3d8 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -1206,7 +1206,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_ACK(Packet *p) /* The client is trying to catch up with the server */ if (this->status == STATUS_PRE_ACTIVE) { - /* The client is not yet catched up? */ + /* The client is not yet caught up? */ if (frame + DAY_TICKS < _frame_counter) return NETWORK_RECV_STATUS_OKAY; /* Now he is! Unpause the game */ diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 82279ab99..1f7167b35 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -104,7 +104,7 @@ public: byte grf_container_ver; ///< Container format of the current GRF file. /* Kind of return values when processing certain actions */ - int skip_sprites; ///< Number of psuedo sprites to skip before processing the next one. (-1 to skip to end of file) + int skip_sprites; ///< Number of pseudo sprites to skip before processing the next one. (-1 to skip to end of file) /* Currently referenceable spritegroups */ SpriteGroup *spritegroups[MAX_SPRITEGROUP + 1]; @@ -550,7 +550,7 @@ StringID MapGRFStringID(uint32 grfid, StringID str) { if (IsInsideMM(str, 0xD800, 0xE000)) { /* General text provided by NewGRF. - * In the specs this is called the 0xDCxx range (misc presistent texts), + * In the specs this is called the 0xDCxx range (misc persistent texts), * but we meanwhile extended the range to 0xD800-0xDFFF. * Note: We are not involved in the "persistent" business, since we do not store * any NewGRF strings in savegames. */ @@ -843,7 +843,7 @@ static void ReadSpriteLayoutRegisters(ByteReader *buf, TileLayoutFlags flags, bo * @param num_building_sprites Number of building sprites to read * @param use_cur_spritesets Whether to use currently referenceable action 1 sets. * @param feature GrfSpecFeature to use spritesets from. - * @param allow_var10 Whether the spritelayout may specifiy var10 values for resolving multiple action-1-2-3 chains + * @param allow_var10 Whether the spritelayout may specify var10 values for resolving multiple action-1-2-3 chains * @param no_z_position Whether bounding boxes have no Z offset * @param dts Layout container to output into * @return True on error (GRF was disabled). @@ -3460,7 +3460,7 @@ static ChangeInfoResult IndustriesChangeInfo(uint indid, int numinfo, int prop, indsp->grf_prop.local_id = indid + i; indsp->grf_prop.subst_id = subs_id; indsp->grf_prop.grffile = _cur.grffile; - /* If the grf industry needs to check its surounding upon creation, it should + /* If the grf industry needs to check its surrounding upon creation, it should * rely on callbacks, not on the original placement functions */ indsp->check_proc = CHECK_NOTHING; } @@ -6205,7 +6205,7 @@ static void GraphicsNew(ByteReader *buf) return; } - /* Load at most max_sprites sprites. Skip remaining sprites. (for compatibility with TTDP and future extentions) */ + /* Load at most max_sprites sprites. Skip remaining sprites. (for compatibility with TTDP and future extensions) */ uint16 skip_num = SanitizeSpriteOffset(num, offset, action5_type->max_sprites, action5_type->name); SpriteID replace = action5_type->sprite_base + offset; @@ -6825,7 +6825,7 @@ static void GRFLoadError(ByteReader *buf) { /* <0B> [ 00] [] 00 [] * - * B severity 00: notice, contine loading grf file + * B severity 00: notice, continue loading grf file * 01: warning, continue loading grf file * 02: error, but continue loading grf file, and attempt * loading grf again when loading or starting next game @@ -7004,7 +7004,7 @@ static uint32 GetPatchVariable(uint8 param) */ case 0x13: { byte map_bits = 0; - byte log_X = MapLogX() - 6; // substraction is required to make the minimal size (64) zero based + byte log_X = MapLogX() - 6; // subtraction is required to make the minimal size (64) zero based byte log_Y = MapLogY() - 6; byte max_edge = max(log_X, log_Y); @@ -7297,7 +7297,7 @@ static void ParamSet(ByteReader *buf) } break; - case 0x0A: // Signed divison + case 0x0A: // Signed division if (src2 == 0) { res = src1; } else { @@ -9800,7 +9800,7 @@ void LoadNewGRF(uint load_index, uint file_index, uint num_baseset) /* * Reset the status of all files, so we can 'retry' to load them. * This is needed when one for example rearranges the NewGRFs in-game - * and a previously disabled NewGRF becomes useable. If it would not + * and a previously disabled NewGRF becomes usable. If it would not * be reset, the NewGRF would remain disabled even though it should * have been enabled. */ diff --git a/src/newgrf.h b/src/newgrf.h index 5d76a3364..4adcae9b8 100644 --- a/src/newgrf.h +++ b/src/newgrf.h @@ -141,7 +141,7 @@ struct GRFFile : ZeroedMemoryAllocator { struct LanguageMap *language_map; ///< Mappings related to the languages. - int traininfo_vehicle_pitch; ///< Vertical offset for draing train images in depot GUI and vehicle details + int traininfo_vehicle_pitch; ///< Vertical offset for drawing train images in depot GUI and vehicle details uint traininfo_vehicle_width; ///< Width (in pixels) of a 8/8 train vehicle in depot GUI and vehicle details uint32 grf_features; ///< Bitset of GrfSpecFeature the grf uses diff --git a/src/newgrf_airport.cpp b/src/newgrf_airport.cpp index 8ec390a4f..e654dcc78 100644 --- a/src/newgrf_airport.cpp +++ b/src/newgrf_airport.cpp @@ -132,7 +132,7 @@ bool AirportSpec::IsAvailable() const /** * Check if the airport would be within the map bounds at the given tile. - * @param table Selected layout table. This affects airport rotation, and therefore dimenions. + * @param table Selected layout table. This affects airport rotation, and therefore dimensions. * @param tile Top corner of the airport. * @return true iff the airport would be within the map bounds at the given tile. */ diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index c80f0e350..6a6b4f015 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -650,7 +650,7 @@ void NewGRFSpriteLayout::AllocateRegisters() /** * Prepares a sprite layout before resolving action-1-2-3 chains. * Integrates offsets into the layout and determines which chains to resolve. - * @note The function uses statically allocated temporary storage, which is reused everytime when calling the function. + * @note The function uses statically allocated temporary storage, which is reused every time when calling the function. * That means, you have to use the sprite layout before calling #PrepareLayout() the next time. * @param orig_offset Offset to apply to non-action-1 sprites. * @param newgrf_ground_offset Offset to apply to action-1 ground sprites. diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index 955e4ac31..184cb1947 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -248,7 +248,7 @@ static byte MapAircraftMovementState(const Aircraft *v) return AMS_TTDP_TO_INWAY; case HELILANDING: - case HELIENDLANDING: // Helicoptor is decending. + case HELIENDLANDING: // Helicoptor is descending. if (amdflag & AMED_HELI_LOWER) { return afc->delta_z == 0 ? AMS_TTDP_HELI_LAND_AIRPORT : AMS_TTDP_HELI_LAND_HELIPORT; @@ -1072,7 +1072,7 @@ bool UsesWagonOverride(const Vehicle *v) * @param param1 First parameter of the callback * @param param2 Second parameter of the callback * @param engine Engine type of the vehicle to evaluate the callback for - * @param v The vehicle to evaluate the callback for, or nullptr if it doesnt exist yet + * @param v The vehicle to evaluate the callback for, or nullptr if it doesn't exist yet * @return The value the callback returned, or CALLBACK_FAILED if it failed */ uint16 GetVehicleCallback(CallbackID callback, uint32 param1, uint32 param2, EngineID engine, const Vehicle *v) diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp index 5387d6767..55a1301b1 100644 --- a/src/newgrf_text.cpp +++ b/src/newgrf_text.cpp @@ -14,7 +14,7 @@ * holding everything that the newgrf action 04 will send over to OpenTTD. * One of the biggest problems is that Dynamic lang Array uses ISO codes * as way to identifying current user lang, while newgrf uses bit shift codes - * not related to ISO. So equivalence functionnality had to be set. + * not related to ISO. So equivalence functionality had to be set. */ #include "stdafx.h" diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 8f3dfaca2..0cf9e9e2a 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -688,9 +688,9 @@ static void MoveToNextNewsItem() * @param type news category * @param flags display flags for the news * @param reftype1 Type of ref1 - * @param ref1 Reference 1 to some object: Used for a possible viewport, scrolling after clicking on the news, and for deleteing the news when the object is deleted. + * @param ref1 Reference 1 to some object: Used for a possible viewport, scrolling after clicking on the news, and for deleting the news when the object is deleted. * @param reftype2 Type of ref2 - * @param ref2 Reference 2 to some object: Used for scrolling after clicking on the news, and for deleteing the news when the object is deleted. + * @param ref2 Reference 2 to some object: Used for scrolling after clicking on the news, and for deleting the news when the object is deleted. * @param free_data Pointer to data that must be freed once the news message is cleared * * @see NewsSubtype diff --git a/src/news_type.h b/src/news_type.h index e91b4be3a..0038d0f90 100644 --- a/src/news_type.h +++ b/src/news_type.h @@ -128,8 +128,8 @@ struct NewsItem { NewsReferenceType reftype1; ///< Type of ref1 NewsReferenceType reftype2; ///< Type of ref2 - uint32 ref1; ///< Reference 1 to some object: Used for a possible viewport, scrolling after clicking on the news, and for deleteing the news when the object is deleted. - uint32 ref2; ///< Reference 2 to some object: Used for scrolling after clicking on the news, and for deleteing the news when the object is deleted. + uint32 ref1; ///< Reference 1 to some object: Used for a possible viewport, scrolling after clicking on the news, and for deleting the news when the object is deleted. + uint32 ref2; ///< Reference 2 to some object: Used for scrolling after clicking on the news, and for deleting the news when the object is deleted. void *free_data; ///< Data to be freed when the news item has reached its end. diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index c6cee00a5..48b6f1f25 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -789,7 +789,7 @@ static void ChangeTileOwner_Object(TileIndex tile, Owner old_owner, Owner new_ow if (do_clear) { ReallyClearObjectTile(Object::GetByTile(tile)); - /* When clearing objects, they may turn into canal, which may require transfering ownership. */ + /* When clearing objects, they may turn into canal, which may require transferring ownership. */ ChangeTileOwner(tile, old_owner, new_owner); } } diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 42311a5cd..2c3e4f9a0 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -397,7 +397,7 @@ const Order *OrderList::GetNextDecisionNode(const Order *next, uint hops) const * @param v The vehicle we're looking at. * @param first Order to start searching at or nullptr to start at cur_implicit_order_index + 1. * @param hops Number of orders we have already looked at. - * @return Next stoppping station or INVALID_STATION. + * @return Next stopping station or INVALID_STATION. * @pre The vehicle is currently loading and v->last_station_visited is meaningful. * @note This function may draw a random number. Don't use it from the GUI. */ diff --git a/src/os/macosx/osx_stdafx.h b/src/os/macosx/osx_stdafx.h index 70dc8030c..c3a86092e 100644 --- a/src/os/macosx/osx_stdafx.h +++ b/src/os/macosx/osx_stdafx.h @@ -24,7 +24,7 @@ #define HAVE_OSX_1011_SDK #endif -/* It would seem that to ensure backward compability we have to ensure that we have defined MAC_OS_X_VERSION_10_x everywhere */ +/* It would seem that to ensure backward compatibility we have to ensure that we have defined MAC_OS_X_VERSION_10_x everywhere */ #ifndef MAC_OS_X_VERSION_10_3 #define MAC_OS_X_VERSION_10_3 1030 #endif diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp index a706a9160..380b1b033 100644 --- a/src/osk_gui.cpp +++ b/src/osk_gui.cpp @@ -421,7 +421,7 @@ void ShowOnScreenKeyboard(Window *parent, int button) * Updates the original text of the OSK so when the 'parent' changes the * original and you press on cancel you won't get the 'old' original text * but the updated one. - * @param parent window that just updated its orignal text + * @param parent window that just updated its original text * @param button widget number of parent's textbox to update */ void UpdateOSKOriginalText(const Window *parent, int button) diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp index f10e4cd9e..1c39a30a0 100644 --- a/src/pathfinder/npf/npf.cpp +++ b/src/pathfinder/npf/npf.cpp @@ -998,7 +998,7 @@ static void NPFFollowTrack(AyStar *aystar, OpenListNode *current) * When we are looking for one specific target (optionally multiple tiles), we * should use a good heuristic to perform aystar search. When we search for * multiple targets that are spread around, we should perform a breadth first - * search by specifiying CalcZero as our heuristic. + * search by specifying CalcZero as our heuristic. */ static NPFFoundTargetData NPFRouteInternal(AyStarNode *start1, bool ignore_start_tile1, AyStarNode *start2, bool ignore_start_tile2, NPFFindStationOrTileData *target, AyStar_EndNodeCheck target_proc, AyStar_CalculateH heuristic_proc, AyStarUserData *user, uint reverse_penalty, bool ignore_reserved = false, int max_penalty = 0) { diff --git a/src/querystring_gui.h b/src/querystring_gui.h index f67809b78..6764a6c91 100644 --- a/src/querystring_gui.h +++ b/src/querystring_gui.h @@ -79,7 +79,7 @@ public: /** * Get the currently marked text. * @param[out] length Length of the marked text. - * @return Begining of the marked area or nullptr if no text is marked. + * @return Beginning of the marked area or nullptr if no text is marked. */ const char *GetMarkedText(size_t *length) const { diff --git a/src/road.cpp b/src/road.cpp index 8c9591ff1..d76d6901c 100644 --- a/src/road.cpp +++ b/src/road.cpp @@ -41,9 +41,9 @@ static bool IsPossibleCrossing(const TileIndex tile, Axis ax) } /** - * Clean up unnecessary RoadBits of a planed tile. + * Clean up unnecessary RoadBits of a planned tile. * @param tile current tile - * @param org_rb planed RoadBits + * @param org_rb planned RoadBits * @return optimised RoadBits */ RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb) @@ -96,7 +96,7 @@ RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb) } } - /* If the neighbor tile is inconnective, remove the planed road connection to it */ + /* If the neighbor tile is inconnective, remove the planned road connection to it */ if (!connective) org_rb ^= target_rb; } } diff --git a/src/road_gui.cpp b/src/road_gui.cpp index b215d519f..9a35147e5 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -271,7 +271,7 @@ static bool RoadToolbar_CtrlChanged(Window *w) /** Road toolbar window handler. */ struct BuildRoadToolbarWindow : Window { RoadType roadtype; ///< Road type to build. - const RoadTypeInfo *rti; ///< Informations about current road type + const RoadTypeInfo *rti; ///< Information about current road type int last_started_action; ///< Last started user action. BuildRoadToolbarWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc) diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 770237d53..553aab75c 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -231,7 +231,7 @@ void UpdateAllVirtCoords() * This is not done directly in AfterLoadGame because these * functions require that all saveload conversions have been * done. As people tend to add savegame conversion stuff after - * the intialization of the windows and caches quite some bugs + * the initialization of the windows and caches quite some bugs * had been made. * Moving this out of there is both cleaner and less bug-prone. */ diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 83685b46b..aa8acddf1 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -1513,7 +1513,7 @@ bool SlObjectMember(void *ptr, const SaveLoad *sld) break; /* SL_WRITEBYTE writes a value to the savegame to identify the type of an object. - * When loading, the value is read explictly with SlReadByte() to determine which + * When loading, the value is read explicitly with SlReadByte() to determine which * object description to use. */ case SL_WRITEBYTE: switch (_sl.action) { diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index 323662f3f..4473a1a82 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -267,7 +267,7 @@ enum SaveLoadVersion : uint16 { SLV_186, ///< 186 25833 Objects storage SLV_187, ///< 187 25899 Linkgraph - restricted flows SLV_188, ///< 188 26169 v1.4 FS#5831 Unify RV travel time - SLV_189, ///< 189 26450 Heirarchical vehicle subgroups + SLV_189, ///< 189 26450 Hierarchical vehicle subgroups SLV_190, ///< 190 26547 Separate order travel and wait times SLV_191, ///< 191 26636 FS#6026 Fix disaster vehicle storage (No bump) @@ -283,7 +283,7 @@ enum SaveLoadVersion : uint16 { SLV_EXTEND_CARGOTYPES, ///< 199 PR#6802 Extend cargotypes to 64 SLV_EXTEND_RAILTYPES, ///< 200 PR#6805 Extend railtypes to 64, adding uint16 to map array. - SLV_EXTEND_PERSISTENT_STORAGE, ///< 201 PR#6885 Extend NewGRF persistant storages. + SLV_EXTEND_PERSISTENT_STORAGE, ///< 201 PR#6885 Extend NewGRF persistent storages. SLV_EXTEND_INDUSTRY_CARGO_SLOTS, ///< 202 PR#6867 Increase industry cargo slots to 16 in, 16 out SLV_SHIP_PATH_CACHE, ///< 203 PR#7072 Add path cache for ships SLV_SHIP_ROTATION, ///< 204 PR#7065 Add extra rotation stages for ships. diff --git a/src/saveload/strings_sl.cpp b/src/saveload/strings_sl.cpp index 9e0351ae0..9c3f838a8 100644 --- a/src/saveload/strings_sl.cpp +++ b/src/saveload/strings_sl.cpp @@ -82,7 +82,7 @@ char *CopyFromOldName(StringID id) case 0xB8: c = 0x017E; break; // z with caron case 0xBC: c = 0x0152; break; // OE ligature case 0xBD: c = 0x0153; break; // oe ligature - case 0xBE: c = 0x0178; break; // Y with diaresis + case 0xBE: c = 0x0178; break; // Y with diaeresis default: break; } diff --git a/src/script/api/ai_changelog.hpp b/src/script/api/ai_changelog.hpp index 7258cf74e..06ea54803 100644 --- a/src/script/api/ai_changelog.hpp +++ b/src/script/api/ai_changelog.hpp @@ -313,7 +313,7 @@ * destination it its catchment area. One industry tile or one town house * is enough as long as station accepts the cargo. Awarded subsidies are no * longer bound to stations used for first delivery, any station can be - * used for loading and unloading as long as cargo is transfered from + * used for loading and unloading as long as cargo is transferred from * source to destination. * \li Make AIEngine:CanRefitCargo() not report refittability to mail by * default for aircraft. It is not necessarily true. This means that even diff --git a/src/script/api/script_cargo.hpp b/src/script/api/script_cargo.hpp index d1bfdd1fc..e977031a1 100644 --- a/src/script/api/script_cargo.hpp +++ b/src/script/api/script_cargo.hpp @@ -36,7 +36,7 @@ public: CC_LIQUID = ::CC_LIQUID, ///< Liquids (Oil, Water, Rubber) CC_REFRIGERATED = ::CC_REFRIGERATED, ///< Refrigerated cargo (Food, Fruit) CC_HAZARDOUS = ::CC_HAZARDOUS, ///< Hazardous cargo (Nuclear Fuel, Explosives, etc.) - CC_COVERED = ::CC_COVERED, ///< Covered/Sheltered Freight (Transporation in Box Vans, Silo Wagons, etc.) + CC_COVERED = ::CC_COVERED, ///< Covered/Sheltered Freight (Transportation in Box Vans, Silo Wagons, etc.) }; /** diff --git a/src/script/api/script_event_types.hpp b/src/script/api/script_event_types.hpp index f13e588ee..f9b2fb87f 100644 --- a/src/script/api/script_event_types.hpp +++ b/src/script/api/script_event_types.hpp @@ -799,8 +799,8 @@ private: /** * Event AircraftDestTooFar, indicating the next destination of an aircraft is too far away. - * This event can be trigger when the current oder of an aircraft changes, usually either when - * loading is done or when switch manually. + * This event can be triggered when the current order of an aircraft changes, usually either when + * loading is done or when switched manually. * @api ai */ class ScriptEventAircraftDestTooFar : public ScriptEvent { diff --git a/src/script/api/script_goal.cpp b/src/script/api/script_goal.cpp index 461911d3c..4c0f5eb35 100644 --- a/src/script/api/script_goal.cpp +++ b/src/script/api/script_goal.cpp @@ -84,7 +84,7 @@ EnforcePrecondition(false, IsValidGoal(goal_id)); EnforcePrecondition(false, ScriptObject::GetCompany() == OWNER_DEITY); - /* Ensure null as used for emtpy string. */ + /* Ensure null as used for empty string. */ if (progress != nullptr && StrEmpty(progress->GetEncodedText())) { progress = nullptr; } diff --git a/src/script/api/script_road.hpp b/src/script/api/script_road.hpp index 39cf0420b..bc230bda3 100644 --- a/src/script/api/script_road.hpp +++ b/src/script/api/script_road.hpp @@ -219,7 +219,7 @@ public: static bool AreRoadTilesConnected(TileIndex tile_from, TileIndex tile_to); /** - * Lookup function for building road parts independend on whether the + * Lookup function for building road parts independent of whether the * "building on slopes" setting is enabled or not. * This implementation can be used for abstract reasoning about a tile as * it needs the slope and existing road parts of the tile as information. @@ -250,10 +250,10 @@ public: static int32 CanBuildConnectedRoadParts(ScriptTile::Slope slope, struct Array *existing, TileIndex start, TileIndex end); /** - * Lookup function for building road parts independend on whether the + * Lookup function for building road parts independent of whether the * "building on slopes" setting is enabled or not. * This implementation can be used for reasoning about an existing tile. - * @param tile The the tile to examine. + * @param tile The tile to examine. * @param start The tile from where "tile" will be entered. * @param end The tile from where "tile" will be exited. * @pre start != end. diff --git a/src/script/api/script_story_page.hpp b/src/script/api/script_story_page.hpp index 772c16200..e806bb766 100644 --- a/src/script/api/script_story_page.hpp +++ b/src/script/api/script_story_page.hpp @@ -92,7 +92,7 @@ public: * Create a new story page element. * @param story_page_id The page id of the story page which the page element should be appended to. * @param type Which page element type to create. - * @param reference A reference value to the object that is refered to by some page element types. When type is SPET_GOAL, this is the goal ID. When type is SPET_LOCATION, this is the TileIndex. + * @param reference A reference value to the object that is referred to by some page element types. When type is SPET_GOAL, this is the goal ID. When type is SPET_LOCATION, this is the TileIndex. * @param text The body text of page elements that allow custom text. (SPET_TEXT and SPET_LOCATION) * @return The new StoryPageElementID, or STORY_PAGE_ELEMENT_INVALID if it failed. * @pre No ScriptCompanyMode may be in scope. @@ -107,7 +107,7 @@ public: /** * Update the content of a page element * @param story_page_element_id The page id of the story page which the page element should be appended to. - * @param reference A reference value to the object that is refered to by some page element types. See also NewElement. + * @param reference A reference value to the object that is referred to by some page element types. See also NewElement. * @param text The body text of page elements that allow custom text. See also NewElement. * @return True if the action succeeded. * @pre No ScriptCompanyMode may be in scope. diff --git a/src/settings.cpp b/src/settings.cpp index 88cd95b71..296b3abcf 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1741,7 +1741,7 @@ void LoadFromConfig(bool minimal) ValidateSettings(); - /* Display sheduled errors */ + /* Display scheduled errors */ extern void ScheduleErrorMessage(ErrorList &datas); ScheduleErrorMessage(_settings_error_list); if (FindWindowById(WC_ERRMSG, 0) == nullptr) ShowFirstError(); diff --git a/src/settings_type.h b/src/settings_type.h index 9315cdd96..45d32105b 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -182,7 +182,7 @@ struct SoundSettings { bool news_ticker; ///< Play a ticker sound when a news item is published. bool news_full; ///< Play sound effects associated to certain news types. bool new_year; ///< Play sound on new year, summarising the performance during the last year. - bool confirm; ///< Play sound effect on succesful constructions or other actions. + bool confirm; ///< Play sound effect on successful constructions or other actions. bool click_beep; ///< Beep on a random selection of buttons. bool disaster; ///< Play disaster and accident sounds. bool vehicle; ///< Play vehicle sound effects. diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index 7b6be3a41..4be95de76 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -704,7 +704,7 @@ static void ShipController(Ship *v) if (st->facilities & FACIL_DOCK) { // ugly, ugly workaround for problem with ships able to drop off cargo at wrong stations ShipArrivesAt(v, st); v->BeginLoading(); - } else { // leave stations without docks right aways + } else { // leave stations without docks right away v->current_order.MakeLeaveStation(); v->IncrementRealOrderIndex(); } @@ -774,7 +774,7 @@ static void ShipController(Ship *v) return; } - /* Ship is back on the bridge head, we need to comsume its path + /* Ship is back on the bridge head, we need to consume its path * cache entry here as we didn't have to choose a ship track. */ if (!v->path.empty()) v->path.pop_front(); } diff --git a/src/sound/allegro_s.h b/src/sound/allegro_s.h index 255be66c7..2ad371740 100644 --- a/src/sound/allegro_s.h +++ b/src/sound/allegro_s.h @@ -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 . */ -/** @file allegro_s.h Base fo playing sound via Allegro. */ +/** @file allegro_s.h Base for playing sound via Allegro. */ #ifndef SOUND_ALLEGRO_H #define SOUND_ALLEGRO_H diff --git a/src/sound/sdl_s.h b/src/sound/sdl_s.h index 2d36b4629..47352b517 100644 --- a/src/sound/sdl_s.h +++ b/src/sound/sdl_s.h @@ -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 . */ -/** @file sdl_s.h Base fo playing sound via SDL. */ +/** @file sdl_s.h Base for playing sound via SDL. */ #ifndef SOUND_SDL_H #define SOUND_SDL_H diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index b85c1e887..4519eba56 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -3101,7 +3101,7 @@ void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, Ro /* Drive-through stop */ uint sprite_offset = 5 - image; - /* Road underlay takes precendence over tram */ + /* Road underlay takes precedence over tram */ if (rti->UsesOverlay()) { SpriteID ground = GetCustomRoadSprite(rti, INVALID_TILE, ROTSG_GROUND); DrawSprite(ground + sprite_offset, PAL_NONE, x, y); diff --git a/src/story.cpp b/src/story.cpp index 4c7063cf0..d2a357b5f 100644 --- a/src/story.cpp +++ b/src/story.cpp @@ -45,7 +45,7 @@ INSTANTIATE_POOL_METHODS(StoryPage) * @param tile The tile parameter of the DoCommand proc * @param reference The reference parameter of the DoCommand proc (p2) * @param text The text parameter of the DoCommand proc - * @return true, if and only if the given parameters are valid for the given page elment type and page id. + * @return true, if and only if the given parameters are valid for the given page element type and page id. */ static bool VerifyElementContentParameters(StoryPageID page_id, StoryPageElementType type, TileIndex tile, uint32 reference, const char *text) { diff --git a/src/story_gui.cpp b/src/story_gui.cpp index 5ce77cc63..316e79ebb 100644 --- a/src/story_gui.cpp +++ b/src/story_gui.cpp @@ -263,7 +263,7 @@ protected: /** * Counts how many pixels of height that are used by Date and Title * (excluding marginal after Title, as each body element has - * an empty row before the elment). + * an empty row before the element). * @param max_width Available width to display content. * @return the height in pixels. */ @@ -412,7 +412,7 @@ public: this->vscroll = this->GetScrollbar(WID_SB_SCROLLBAR); this->vscroll->SetStepSize(FONT_HEIGHT_NORMAL); - /* Initalize page sort. */ + /* Initialize page sort. */ this->story_pages.SetSortFuncs(StoryBookWindow::page_sorter_funcs); this->story_pages.ForceRebuild(); this->BuildStoryPageList(); diff --git a/src/table/elrail_data.h b/src/table/elrail_data.h index 691536003..df5788fa8 100644 --- a/src/table/elrail_data.h +++ b/src/table/elrail_data.h @@ -412,7 +412,7 @@ static const SortableSpriteStruct RailCatenarySpriteData_Tunnel[] = { * Identifiers for Wires: *
  1. Direction of the wire
  2. *
  3. Slope of the tile for diagonals, placement inside the track for horiz/vertical pieces
  4. - *
  5. Place where a pylon shoule be
+ *
  • Place where a pylon should be
  • * Identifiers for Pylons: *
    1. Direction of the wire
    2. *
    3. Slope of the tile
    4. diff --git a/src/table/gameopt_settings.ini b/src/table/gameopt_settings.ini index 9bacb80c7..b18ed9d75 100644 --- a/src/table/gameopt_settings.ini +++ b/src/table/gameopt_settings.ini @@ -12,7 +12,7 @@ static uint16 _old_diff_custom[GAME_DIFFICULTY_NUM]; uint8 _old_diff_level; ///< Old difficulty level from old savegames uint8 _old_units; ///< Old units from old savegames -/* Most of these strings are used both for gameopt-backward compatability +/* Most of these strings are used both for gameopt-backward compatibility * and the settings tables. The rest is here for consistency. */ static const char *_locale_currencies = "GBP|USD|EUR|YEN|ATS|BEF|CHF|CZK|DEM|DKK|ESP|FIM|FRF|GRD|HUF|ISK|ITL|NLG|NOK|PLN|RON|RUR|SIT|SEK|YTL|SKK|BRL|EEK|custom"; static const char *_locale_units = "imperial|metric|si"; diff --git a/src/table/settings.h.preamble b/src/table/settings.h.preamble index 08380cbf1..65fc489fa 100644 --- a/src/table/settings.h.preamble +++ b/src/table/settings.h.preamble @@ -33,7 +33,7 @@ static size_t ConvertLandscape(const char *value); * Thse are for members in the struct described by the current * #SettingDesc list / .ini file. Here, 'base' specifies type of the * struct while 'var' points out the member of the struct (the actual - * struct to store it in is implicitely defined by the #SettingDesc + * struct to store it in is implicitly defined by the #SettingDesc * list / .ini file preamble the entry is in). * * The something part defines the type of variable to store. There are a diff --git a/src/table/settings.ini b/src/table/settings.ini index 800d6f79c..714a8c86c 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -95,7 +95,7 @@ cat = SC_ADVANCED ; Saved settings variables. -; Do not ADD or REMOVE something in this "difficulty.XXX" table or before it. It breaks savegame compatability. +; Do not ADD or REMOVE something in this "difficulty.XXX" table or before it. It breaks savegame compatibility. [SDT_VAR] base = GameSettings var = difficulty.max_no_competitors @@ -3947,7 +3947,7 @@ cat = SC_EXPERT ; Since the network code (CmdChangeSetting and friends) use the index in this array to decide ; which setting the server is talking about all conditional compilation of this array must be at the ; end. This isn't really the best solution, the settings the server can tell the client about should -; either use a seperate array or some other form of identifier. +; either use a separate array or some other form of identifier. ; ; We might need to emulate a right mouse button on mac diff --git a/src/table/sprites.h b/src/table/sprites.h index 5f5aa4705..a0e068f8f 100644 --- a/src/table/sprites.h +++ b/src/table/sprites.h @@ -27,10 +27,10 @@ * All sprites which are described here are referenced only one to a handful of times * throughout the code. When introducing new sprite enums, use meaningful names. * Don't be lazy and typing, and only use abbreviations when their meaning is clear or - * the length of the enum would get out of hand. In that case EXPLAIN THE ABBREVATION + * the length of the enum would get out of hand. In that case EXPLAIN THE ABBREVIATION * IN THIS FILE, and perhaps add some comments in the code where it is used. * Now, don't whine about this being too much typing work if the enums are like - * 30 characters in length. If your editor doen't help you simplifying your work, + * 30 characters in length. If your editor doesn't help you simplifying your work, * get a proper editor. If your Operating Systems don't have any decent editors, * get a proper Operating System. * diff --git a/src/tile_map.cpp b/src/tile_map.cpp index 5d85ef966..a30d1e442 100644 --- a/src/tile_map.cpp +++ b/src/tile_map.cpp @@ -76,8 +76,8 @@ Slope GetTileSlope(TileIndex tile, int *h) /** * Return the slope of a given tile, also for tiles outside the map (virtual "black" tiles). * - * @param x X coordinate of the tile to compute slope of, may be ouside the map. - * @param y Y coordinate of the tile to compute slope of, may be ouside the map. + * @param x X coordinate of the tile to compute slope of, may be outside the map. + * @param y Y coordinate of the tile to compute slope of, may be outside the map. * @param h If not \c nullptr, pointer to storage of z height. * @return Slope of the tile, except for the HALFTILE part. */ diff --git a/src/tile_map.h b/src/tile_map.h index 0cb28122d..89467c4d0 100644 --- a/src/tile_map.h +++ b/src/tile_map.h @@ -37,8 +37,8 @@ static inline uint TileHeight(TileIndex tile) /** * Returns the height of a tile, also for tiles outside the map (virtual "black" tiles). * - * @param x X coordinate of the tile, may be ouside the map. - * @param y Y coordinate of the tile, may be ouside the map. + * @param x X coordinate of the tile, may be outside the map. + * @param y Y coordinate of the tile, may be outside the map. * @return The height in the same unit as TileHeight. */ static inline uint TileHeightOutsideMap(int x, int y) @@ -79,8 +79,8 @@ static inline uint TilePixelHeight(TileIndex tile) /** * Returns the height of a tile in pixels, also for tiles outside the map (virtual "black" tiles). * - * @param x X coordinate of the tile, may be ouside the map. - * @param y Y coordinate of the tile, may be ouside the map. + * @param x X coordinate of the tile, may be outside the map. + * @param y Y coordinate of the tile, may be outside the map. * @return The height in pixels in the same unit as TilePixelHeight. */ static inline uint TilePixelHeightOutsideMap(int x, int y) diff --git a/src/town.h b/src/town.h index b0f4a5c72..ecf8a4f76 100644 --- a/src/town.h +++ b/src/town.h @@ -36,7 +36,7 @@ static const TownID INVALID_TOWN = 0xFFFF; static const uint TOWN_GROWTH_WINTER = 0xFFFFFFFE; ///< The town only needs this cargo in the winter (any amount) static const uint TOWN_GROWTH_DESERT = 0xFFFFFFFF; ///< The town needs the cargo for growth when on desert (any amount) static const uint16 TOWN_GROWTH_RATE_NONE = 0xFFFF; ///< Special value for Town::growth_rate to disable town growth. -static const uint16 MAX_TOWN_GROWTH_TICKS = 930; ///< Max amount of original town ticks that still fit into uint16, about equal to UINT16_MAX / TOWN_GROWTH_TICKS but sligtly less to simplify calculations +static const uint16 MAX_TOWN_GROWTH_TICKS = 930; ///< Max amount of original town ticks that still fit into uint16, about equal to UINT16_MAX / TOWN_GROWTH_TICKS but slightly less to simplify calculations typedef Pool TownPool; extern TownPool _town_pool; diff --git a/src/townname.cpp b/src/townname.cpp index d382adf34..6d3035886 100644 --- a/src/townname.cpp +++ b/src/townname.cpp @@ -124,7 +124,7 @@ bool GenerateTownName(uint32 *townnameparts, TownNames *town_names) TownNameParams par(_settings_game.game_creation.town_name); /* This function is called very often without entering the gameloop - * inbetween. So reset layout cache to prevent it from growing too big. */ + * in between. So reset layout cache to prevent it from growing too big. */ Layouter::ReduceLineCache(); /* Do not set i too low, since when we run out of names, we loop diff --git a/src/track_func.h b/src/track_func.h index a55d6d8f2..4171a808b 100644 --- a/src/track_func.h +++ b/src/track_func.h @@ -19,7 +19,7 @@ /** * Iterate through each set Track in a TrackBits value. - * For more informations see FOR_EACH_SET_BIT_EX. + * For more information see FOR_EACH_SET_BIT_EX. * * @param var Loop index variable that stores fallowing set track. Must be of type Track. * @param track_bits The value to iterate through (any expression). @@ -127,7 +127,7 @@ static inline TrackdirBits TrackdirToTrackdirBits(Trackdir trackdir) /** * Removes first Track from TrackBits and returns it * - * This function searchs for the first bit in the TrackBits, + * This function searches for the first bit in the TrackBits, * remove this bit from the parameter and returns the found * bit as Track value. It returns INVALID_TRACK if the * parameter was TRACK_BIT_NONE or INVALID_TRACK_BIT. This @@ -647,7 +647,7 @@ static inline bool IsDiagonalTrackdir(Trackdir trackdir) /** * Checks if the given tracks overlap, ie form a crossing. Basically this - * means when there is more than one track on the tile, exept when there are + * means when there is more than one track on the tile, except when there are * two parallel tracks. * @param bits The tracks present. * @return Whether the tracks present overlap in any way. diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 71b34d6ba..4a4334418 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -1280,7 +1280,7 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, u * b) the 'next' part is an engine that becomes a front engine. * c) there is no 'next' part, nothing else happens * 5) non front engine gets moved and becomes a new train, nothing else happens - * 6) non front engine gets moved within a train / to another train, nothing hapens + * 6) non front engine gets moved within a train / to another train, nothing happens * 7) wagon gets moved, nothing happens */ if (src == original_src_head && src->IsEngine() && !src->IsFrontEngine()) { diff --git a/src/tree_map.h b/src/tree_map.h index bd1567b54..f6315e971 100644 --- a/src/tree_map.h +++ b/src/tree_map.h @@ -100,8 +100,8 @@ static inline TreeGround GetTreeGround(TileIndex t) * that this value doesn't count the number of trees on a tile, use * #GetTreeCount instead. This function instead returns some kind of * groundtype of the tile. As the map-array is finite in size and - * the informations about the trees must be saved somehow other - * informations about a tile must be saved somewhere encoded in the + * the information about the trees must be saved somehow other + * information about a tile must be saved somewhere encoded in the * tile. So this function returns the density of a tile for sub arctic * and sub tropical games. This means for sub arctic the type of snowline * (0 to 3 for all 4 types of snowtiles) and for sub tropical the value @@ -264,7 +264,7 @@ static inline void SetTreeCounter(TileIndex t, uint c) /** * Make a tree-tile. * - * This functions change the tile to a tile with trees and all informations which belongs to it. + * This functions change the tile to a tile with trees and all information which belongs to it. * * @param t The tile to make a tree-tile from * @param type The type of the tree diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index fce0855d2..db3368050 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -1132,7 +1132,7 @@ static void DrawBridgeRoadBits(TileIndex head_tile, int x, int y, int z, int off static const SpriteID front_offsets[6] = { 97, 98, 103, 106, 104, 105 }; if (head || !IsInvisibilitySet(TO_BRIDGES)) { - /* Road underlay takes precendence over tram */ + /* Road underlay takes precedence over tram */ trans_back[0] = !head && IsTransparencySet(TO_BRIDGES); if (road_rti != nullptr) { if (road_rti->UsesOverlay()) { @@ -1166,7 +1166,7 @@ static void DrawBridgeRoadBits(TileIndex head_tile, int x, int y, int z, int off } } - /* Road catenary takes precendence over tram */ + /* Road catenary takes precedence over tram */ trans_back[3] = IsTransparencySet(TO_CATENARY); trans_front[0] = IsTransparencySet(TO_CATENARY); if (road_rti != nullptr && HasRoadCatenaryDrawn(road_rt)) { @@ -1289,7 +1289,7 @@ static void DrawTile_TunnelBridge(TileInfo *ti) DrawRoadOverlays(ti, PAL_NONE, road_rti, tram_rti, sprite_offset, sprite_offset); - /* Road catenary takes precendence over tram */ + /* Road catenary takes precedence over tram */ SpriteID catenary_sprite_base = 0; if (road_rti != nullptr && HasRoadCatenaryDrawn(road_rt)) { catenary_sprite_base = GetCustomRoadSprite(road_rti, ti->tile, ROTSG_CATENARY_FRONT); diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 6e26c7bfe..0bb4ed178 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2332,7 +2332,7 @@ CommandCost Vehicle::SendToDepot(DoCommandFlag flags, DepotCommand command) return CommandCost(); } - if (command & DEPOT_DONT_CANCEL) return CMD_ERROR; // Requested no cancelation of depot orders + if (command & DEPOT_DONT_CANCEL) return CMD_ERROR; // Requested no cancellation of depot orders if (flags & DC_EXEC) { /* If the orders to 'goto depot' are in the orders list (forced servicing), * then skip to the next order; effectively cancelling this forced service */ diff --git a/src/vehicle_type.h b/src/vehicle_type.h index 74bd5660d..29929fd8b 100644 --- a/src/vehicle_type.h +++ b/src/vehicle_type.h @@ -65,7 +65,7 @@ enum VehiclePathFinders { /** Flags to add to p1 for goto depot commands. */ enum DepotCommand { - DEPOT_SERVICE = (1U << 28), ///< The vehicle will leave the depot right after arrival (serivce only) + DEPOT_SERVICE = (1U << 28), ///< The vehicle will leave the depot right after arrival (service only) DEPOT_MASS_SEND = (1U << 29), ///< Tells that it's a mass send to depot command (type in VLW flag) DEPOT_DONT_CANCEL = (1U << 30), ///< Don't cancel current goto depot command if any DEPOT_LOCATE_HANGAR = (1U << 31), ///< Find another airport if the target one lacks a hangar diff --git a/src/video/cocoa/cocoa_keys.h b/src/video/cocoa/cocoa_keys.h index 426befd18..e2d5ee9fc 100644 --- a/src/video/cocoa/cocoa_keys.h +++ b/src/video/cocoa/cocoa_keys.h @@ -126,7 +126,7 @@ #define QZ_KP0 0x52 #define QZ_KP_PERIOD 0x41 -/* Wierd, these keys are on my iBook under MacOS X */ +/* Weird, these keys are on my iBook under MacOS X */ #define QZ_IBOOK_ENTER 0x34 #define QZ_IBOOK_LEFT 0x3B #define QZ_IBOOK_RIGHT 0x3C diff --git a/src/viewport_type.h b/src/viewport_type.h index f5544679a..1f61b2d70 100644 --- a/src/viewport_type.h +++ b/src/viewport_type.h @@ -22,7 +22,7 @@ class LinkGraphOverlay; * Data structure for viewport, display of a part of the world */ struct ViewPort { - int left; ///< Screen coordinate left egde of the viewport + int left; ///< Screen coordinate left edge of the viewport int top; ///< Screen coordinate top edge of the viewport int width; ///< Screen width of the viewport int height; ///< Screen height of the viewport diff --git a/src/void_cmd.cpp b/src/void_cmd.cpp index 9a0134f59..56e7cc526 100644 --- a/src/void_cmd.cpp +++ b/src/void_cmd.cpp @@ -28,7 +28,7 @@ static void DrawTile_Void(TileInfo *ti) static int GetSlopePixelZ_Void(TileIndex tile, uint x, uint y) { - /* This function may be called on tiles outside the map, don't asssume + /* This function may be called on tiles outside the map, don't assume * that 'tile' is a valid tile index. See GetSlopePixelZOutsideMap. */ int z; Slope tileh = GetTilePixelSlopeOutsideMap(x >> 4, y >> 4, &z); diff --git a/src/water_map.h b/src/water_map.h index 375c80e6c..05f49afb1 100644 --- a/src/water_map.h +++ b/src/water_map.h @@ -28,8 +28,8 @@ enum WaterTileTypeBitLayout { WBL_COAST_FLAG = 0, ///< Flag for coast. - WBL_LOCK_ORIENT_BEGIN = 0, ///< Start of lock orientiation bitfield. - WBL_LOCK_ORIENT_COUNT = 2, ///< Length of lock orientiation bitfield. + WBL_LOCK_ORIENT_BEGIN = 0, ///< Start of lock orientation bitfield. + WBL_LOCK_ORIENT_COUNT = 2, ///< Length of lock orientation bitfield. WBL_LOCK_PART_BEGIN = 2, ///< Start of lock part bitfield. WBL_LOCK_PART_COUNT = 2, ///< Length of lock part bitfield. diff --git a/src/widget_type.h b/src/widget_type.h index 6372ed799..261e3cdf3 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -247,7 +247,7 @@ public: uint min_y; ///< Minimal vertical size of only this widget. }; -/** Nested widget flags that affect display and interaction withe 'real' widgets. */ +/** Nested widget flags that affect display and interaction with 'real' widgets. */ enum NWidgetDisplay { /* Generic. */ NDB_LOWERED = 0, ///< Widget is lowered (pressed down) bit. diff --git a/src/window.cpp b/src/window.cpp index 9786459db..25e4eb95a 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -119,7 +119,7 @@ WindowDesc::~WindowDesc() /** * Determine default width of window. - * This is either a stored user preferred size, or the build-in default. + * This is either a stored user preferred size, or the built-in default. * @return Width in pixels. */ int16 WindowDesc::GetDefaultWidth() const @@ -129,7 +129,7 @@ int16 WindowDesc::GetDefaultWidth() const /** * Determine default height of window. - * This is either a stored user preferred size, or the build-in default. + * This is either a stored user preferred size, or the built-in default. * @return Height in pixels. */ int16 WindowDesc::GetDefaultHeight() const -- cgit v1.2.3-54-g00ecf