diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 9a2c4db..033f8c8 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -6354,7 +6354,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); diff --git a/src/newgrf.h b/src/newgrf.h index 70fa6ce..9058aea 100644 --- a/src/newgrf.h +++ b/src/newgrf.h @@ -167,7 +167,7 @@ struct GRFLoadedFeatures { }; /** - * Check for grf miscelaneous bits + * Check for grf miscellaneous bits * @param bit The bit to check. * @return Whether the bit is set. */ diff --git a/src/newgrf_airport.h b/src/newgrf_airport.h index a981bea..e9cf765 100644 --- a/src/newgrf_airport.h +++ b/src/newgrf_airport.h @@ -114,7 +114,7 @@ struct AirportSpec { TTDPAirportType ttd_airport_type; ///< ttdpatch airport type (Small/Large/Helipad/Oilrig) AirportClassID cls_id; ///< the class to which this airport type belongs SpriteID preview_sprite; ///< preview sprite for this airport - uint16 maintenance_cost; ///< maintenance cost mulltiplier + uint16 maintenance_cost; ///< maintenance cost multiplier /* Newgrf data */ bool enabled; ///< Entity still available (by default true). Newgrf can disable it, though. struct GRFFileProps grf_prop; ///< Properties related to the grf file. diff --git a/src/newgrf_airporttiles.cpp b/src/newgrf_airporttiles.cpp index 9829286..7877360 100644 --- a/src/newgrf_airporttiles.cpp +++ b/src/newgrf_airporttiles.cpp @@ -133,11 +133,11 @@ static uint32 GetAirportTileIDAtOffset(TileIndex tile, const Station *st, uint32 const AirportTileSpec *ats = AirportTileSpec::Get(gfx); if (gfx < NEW_AIRPORTTILE_OFFSET) { // Does it belongs to an old type? - /* It is an old tile. We have to see if it's been overriden */ + /* It is an old tile. We have to see if it's been overridden */ if (ats->grf_prop.override == INVALID_AIRPORTTILE) { // has it been overridden? return 0xFF << 8 | gfx; // no. Tag FF + the gfx id of that tile } - /* Overriden */ + /* Overridden */ const AirportTileSpec *tile_ovr = AirportTileSpec::Get(ats->grf_prop.override); if (tile_ovr->grf_prop.grffile->grfid == cur_grfid) { diff --git a/src/newgrf_airporttiles.h b/src/newgrf_airporttiles.h index 7fe5725..6c68682 100644 --- a/src/newgrf_airporttiles.h +++ b/src/newgrf_airporttiles.h @@ -47,7 +47,7 @@ struct AirportTileResolverObject : public ResolverObject { }; /** - * Defines the data structure of each indivudual tile of an airport. + * Defines the data structure of each individual tile of an airport. */ struct AirportTileSpec { AnimationInfo animation; ///< Information about the animation. diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index cb78267..679642f 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -95,7 +95,7 @@ void OverrideManagerBase::ResetOverride() /** * Return the ID (if ever available) of a previously inserted entity. - * @param grf_local_id ID of this enity withing the grfID + * @param grf_local_id ID of this entity within the grfID * @param grfid ID of the grf file * @return the ID of the candidate, of the Invalid flag item ID */ @@ -170,7 +170,7 @@ uint16 OverrideManagerBase::GetSubstituteID(uint16 entity_id) const /** * Install the specs into the HouseSpecs array - * It will find itself the proper slot onwhich it will go + * It will find itself the proper slot on which it will go * @param hs HouseSpec read from the grf file, ready for inclusion */ void HouseOverrideManager::SetEntitySpec(const HouseSpec *hs) @@ -198,7 +198,7 @@ void HouseOverrideManager::SetEntitySpec(const HouseSpec *hs) /** * Return the ID (if ever available) of a previously inserted entity. - * @param grf_local_id ID of this enity withing the grfID + * @param grf_local_id ID of this entity within the grfID * @param grfid ID of the grf file * @return the ID of the candidate, of the Invalid flag item ID */ @@ -226,7 +226,7 @@ uint16 IndustryOverrideManager::AddEntityID(byte grf_local_id, uint32 grfid, byt { /* This entity hasn't been defined before, so give it an ID now. */ for (uint16 id = 0; id < max_new_entities; id++) { - /* Skip overriden industries */ + /* Skip overridden industries */ if (id < max_offset && entity_overrides[id] != invalid_ID) continue; /* Get the real live industry */ @@ -234,7 +234,7 @@ uint16 IndustryOverrideManager::AddEntityID(byte grf_local_id, uint32 grfid, byt /* This industry must be one that is not available(enabled), mostly because of climate. * And it must not already be used by a grf (grffile == NULL). - * So reseve this slot here, as it is the chosen one */ + * So reserve this slot here, as it is the chosen one */ if (!inds->enabled && inds->grf_prop.grffile == NULL) { EntityIDMapping *map = &mapping_ID[id]; @@ -252,8 +252,8 @@ uint16 IndustryOverrideManager::AddEntityID(byte grf_local_id, uint32 grfid, byt } /** - * Method to install the new indistry data in its proper slot - * The slot assigment is internal of this method, since it requires + * Method to install the new industry data in its proper slot + * The slot assignment is internal of this method, since it requires * checking what is available * @param inds Industryspec that comes from the grf decoding process */ @@ -264,11 +264,11 @@ void IndustryOverrideManager::SetEntitySpec(IndustrySpec *inds) if (ind_id == invalid_ID) { /* Not found. - * Or it has already been overriden, so you've lost your place old boy. + * Or it has already been overridden, so you've lost your place old boy. * Or it is a simple substitute. * We need to find a free available slot */ ind_id = this->AddEntityID(inds->grf_prop.local_id, inds->grf_prop.grffile->grfid, inds->grf_prop.subst_id); - inds->grf_prop.override = invalid_ID; // make sure it will not be detected as overriden + inds->grf_prop.override = invalid_ID; // make sure it will not be detected as overridden } if (ind_id == invalid_ID) { @@ -308,7 +308,7 @@ void IndustryTileOverrideManager::SetEntitySpec(const IndustryTileSpec *its) /** * Method to install the new object data in its proper slot - * The slot assigment is internal of this method, since it requires + * The slot assignment is internal of this method, since it requires * checking what is available * @param spec ObjectSpec that comes from the grf decoding process */ @@ -319,7 +319,7 @@ void ObjectOverrideManager::SetEntitySpec(ObjectSpec *spec) if (type == invalid_ID) { /* Not found. - * Or it has already been overriden, so you've lost your place old boy. + * Or it has already been overridden, so you've lost your place old boy. * Or it is a simple substitute. * We need to find a free available slot */ type = this->AddEntityID(spec->grf_prop.local_id, spec->grf_prop.grffile->grfid, OBJECT_TRANSMITTER); diff --git a/src/newgrf_commons.h b/src/newgrf_commons.h index b352d11..de4d292 100644 --- a/src/newgrf_commons.h +++ b/src/newgrf_commons.h @@ -199,7 +199,7 @@ protected: uint16 max_offset; ///< what is the length of the original entity's array of specs uint16 max_new_entities; ///< what is the amount of entities, old and new summed - uint16 invalid_ID; ///< ID used to dected invalid entities; + uint16 invalid_ID; ///< ID used to detected invalid entities; virtual bool CheckValidNewID(uint16 testid) { return true; } public: diff --git a/src/newgrf_config.h b/src/newgrf_config.h index 52818c8..ed35c14 100644 --- a/src/newgrf_config.h +++ b/src/newgrf_config.h @@ -51,7 +51,7 @@ enum GRFBugs { /** Status of post-gameload GRF compatibility check */ enum GRFListCompatibility { GLC_ALL_GOOD, ///< All GRF needed by game are present - GLC_COMPATIBLE, ///< Compatible (eg. the same ID, but different chacksum) GRF found in at least one case + GLC_COMPATIBLE, ///< Compatible (eg. the same ID, but different checksum) GRF found in at least one case GLC_NOT_FOUND, ///< At least one GRF couldn't be found (higher priority than GLC_COMPATIBLE) }; diff --git a/src/newgrf_debug_gui.cpp b/src/newgrf_debug_gui.cpp index 244d2c0..b960011 100644 --- a/src/newgrf_debug_gui.cpp +++ b/src/newgrf_debug_gui.cpp @@ -68,7 +68,7 @@ static inline uint GetInspectWindowNumber(GrfSpecFeature feature, uint index) /** * The type of a property to show. This is used to - * provide an appropriate represenation in the GUI. + * provide an appropriate representation in the GUI. */ enum NIType { NIT_INT, ///< The property is a simple integer @@ -278,7 +278,7 @@ struct NewGRFInspectWindow : Window { /** GRFID of the caller of this window, 0 if it has no caller. */ uint32 caller_grfid; - /** The currently editted parameter, to update the right one. */ + /** The currently edited parameter, to update the right one. */ byte current_edit_param; Scrollbar *vscroll; @@ -776,7 +776,7 @@ struct SpriteAlignerWindow : Window { case WID_SA_LEFT: spr->x_offs -= ZOOM_LVL_BASE; break; case WID_SA_RIGHT: spr->x_offs += ZOOM_LVL_BASE; break; } - /* Ofcourse, we need to redraw the sprite, but where is it used? + /* Of course, we need to redraw the sprite, but where is it used? * Everywhere is a safe bet. */ MarkWholeScreenDirty(); break; diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index c9d489e..fbc6901 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -628,7 +628,7 @@ static uint32 VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *object, return v->GetCurrentMaxSpeed(); /* Variables which use the parameter */ - case 0x60: // Count consist's engine ID occurance + case 0x60: // Count consist's engine ID occurrence if (v->type != VEH_TRAIN) return v->GetEngine()->grf_prop.local_id == parameter ? 1 : 0; { @@ -1059,7 +1059,7 @@ bool UsesWagonOverride(const Vehicle *v) /** * Evaluate a newgrf callback for vehicles - * @param callback The callback to evalute + * @param callback The callback to evaluate * @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 @@ -1077,11 +1077,11 @@ uint16 GetVehicleCallback(CallbackID callback, uint32 param1, uint32 param2, Eng /** * Evaluate a newgrf callback for vehicles with a different vehicle for parent scope. - * @param callback The callback to evalute + * @param callback The callback to evaluate * @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 NULL if it doesnt exist yet + * @param v The vehicle to evaluate the callback for, or NULL if it doesn't exist yet * @param parent The vehicle to use for parent scope * @return The value the callback returned, or CALLBACK_FAILED if it failed */ @@ -1239,7 +1239,7 @@ void CommitVehicleListOrderChanges() } QSortT(ordering.Begin(), ordering.Length(), EnginePreSort); - /* Apply Insertion-Sort opeations */ + /* Apply Insertion-Sort operations */ const ListOrderChange *end = _list_order_changes.End(); for (const ListOrderChange *it = _list_order_changes.Begin(); it != end; ++it) { EngineID source = it->engine; diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index e052cc1..41016c1 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -1466,7 +1466,7 @@ private: #if defined(ENABLE_NETWORK) /** * Show the content list window with all missing grfs from the given list. - * @param list The list of grfs to check for missings / not exactly matching ones. + * @param list The list of grfs to check for missing / not exactly matching ones. */ void ShowMissingContentWindow(const GRFConfig *list) { @@ -1584,12 +1584,12 @@ public: uint avs_extra_width = min_list_width - min_avs_width; // Additional width needed for avs to reach min_list_width. uint acs_extra_width = min_list_width - min_acs_width; // Additional width needed for acs to reach min_list_width. - /* Use 2 or 3 colmuns? */ + /* Use 2 or 3 columns? */ uint min_three_columns = min_avs_width + min_acs_width + min_inf_width + 2 * INTER_COLUMN_SPACING; uint min_two_columns = min_list_width + min_inf_width + INTER_COLUMN_SPACING; bool use_three_columns = this->editable && (min_three_columns + MIN_EXTRA_FOR_3_COLUMNS <= given_width); - /* Info panel is a seperate column in both modes. Compute its width first. */ + /* Info panel is a separate column in both modes. Compute its width first. */ uint extra_width, inf_width; if (use_three_columns) { extra_width = given_width - min_three_columns; @@ -1619,11 +1619,11 @@ public: acs_width = ComputeMaxSize(min_acs_width, acs_width, this->acs->GetHorizontalStepSize(sizing)) - this->acs->padding_left - this->acs->padding_right; - /* Never use fill_y on these; the minimal size is choosen, so that the 3 column view looks nice */ + /* Never use fill_y on these; the minimal size is chosen, so that the 3 column view looks nice */ uint avs_height = ComputeMaxSize(this->avs->smallest_y, given_height, this->avs->resize_y); uint acs_height = ComputeMaxSize(this->acs->smallest_y, given_height, this->acs->resize_y); - /* Assign size and position to the childs. */ + /* Assign size and position to the children. */ if (rtl) { x += this->inf->padding_left; this->inf->AssignSizePosition(sizing, x, y + this->inf->padding_top, inf_width, inf_height, rtl); @@ -1662,7 +1662,7 @@ public: if (this->editable) extra_height -= avs_height - this->avs->smallest_y; uint acs_height = ComputeMaxSize(this->acs->smallest_y, this->acs->smallest_y + extra_height, this->acs->resize_y); - /* Assign size and position to the childs. */ + /* Assign size and position to the children. */ if (rtl) { x += this->inf->padding_left; this->inf->AssignSizePosition(sizing, x, y + this->inf->padding_top, inf_width, inf_height, rtl); diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 0f0cc31..d8cd3b7 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -32,7 +32,7 @@ HouseOverrideManager _house_mngr(NEW_HOUSE_OFFSET, HOUSE_MAX, INVALID_HOUSE_ID); /** * Constructor of a house scope resolver. * @param ro Surrounding resolver. - * @param house_id Houe type being queried. + * @param house_id House type being queried. * @param tile %Tile containing the house. * @param town %Town containing the house. * @param not_yet_constructed House is still under construction. diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index b1cb80b..dd8c81c 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -63,11 +63,11 @@ uint32 GetIndustryIDAtOffset(TileIndex tile, const Industry *i, uint32 cur_grfid const IndustryTileSpec *indtsp = GetIndustryTileSpec(gfx); if (gfx < NEW_INDUSTRYTILEOFFSET) { // Does it belongs to an old type? - /* It is an old tile. We have to see if it's been overriden */ + /* It is an old tile. We have to see if it's been overridden */ if (indtsp->grf_prop.override == INVALID_INDUSTRYTILE) { // has it been overridden? return 0xFF << 8 | gfx; // no. Tag FF + the gfx id of that tile } - /* Overriden */ + /* Overridden */ const IndustryTileSpec *tile_ovr = GetIndustryTileSpec(indtsp->grf_prop.override); if (tile_ovr->grf_prop.grffile->grfid == cur_grfid) { diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index d23a382..1d7ec08 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -236,7 +236,7 @@ extern bool IsSlopeRefused(Slope current, Slope refused); * @param initial_random_bits Random bits of industry after construction * @param founder Industry founder * @param creation_type The circumstances the industry is created under. - * @return Suceeded or failed command. + * @return Succeeded or failed command. */ CommandCost PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, uint itspec_index, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type) { diff --git a/src/newgrf_sound.cpp b/src/newgrf_sound.cpp index b82853a..dcc3416 100644 --- a/src/newgrf_sound.cpp +++ b/src/newgrf_sound.cpp @@ -195,7 +195,7 @@ bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event) } /** - * Play a NewGRF sound effect at the location of a specfic tile. + * Play a NewGRF sound effect at the location of a specific tile. * @param file NewGRF triggering the sound effect. * @param sound_id Sound effect the NewGRF wants to play. * @param tile Location of the effect. diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp index 0bbf467..7e60e82 100644 --- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -58,7 +58,7 @@ static inline uint32 GetVariable(const ResolverObject *object, ScopeResolver *sc if (object == NULL || object->grffile == NULL) return 0; return object->grffile->GetParam(parameter); - /* Not a common variable, so evalute the feature specific variables */ + /* Not a common variable, so evaluate the feature specific variables */ default: return scope->GetVariable(variable, parameter, available); } } @@ -117,7 +117,7 @@ ScopeResolver::~ScopeResolver() {} /** * Resolver constructor. - * @param grffile NewGRF file asscoiated with the object (or \c NULL if none). + * @param grffile NewGRF file associated with the object (or \c NULL if none). * @param callback Callback code being resolved (default value is #CBID_NO_CALLBACK). * @param callback_param1 First parameter (var 10) of the callback (only used when \a callback is also set). * @param callback_param2 Second parameter (var 18) of the callback (only used when \a callback is also set). diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h index 93e2e58..dc05fe4 100644 --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -161,8 +161,8 @@ enum DeterministicSpriteGroupAdjustOperation { DSGA_OP_RST, ///< return b DSGA_OP_STOP, ///< store a into persistent storage, indexed by b, return a DSGA_OP_ROR, ///< rotate a b positions to the right - DSGA_OP_SCMP, ///< (signed) comparision (a < b -> 0, a == b = 1, a > b = 2) - DSGA_OP_UCMP, ///< (unsigned) comparision (a < b -> 0, a == b = 1, a > b = 2) + DSGA_OP_SCMP, ///< (signed) comparison (a < b -> 0, a == b = 1, a > b = 2) + DSGA_OP_UCMP, ///< (unsigned) comparison (a < b -> 0, a == b = 1, a > b = 2) DSGA_OP_SHL, ///< a << b DSGA_OP_SHR, ///< (unsigned) a >> b DSGA_OP_SAR, ///< (signed) a >> b diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 8092a95..bf09f13 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -613,7 +613,7 @@ static const SpriteGroup *ResolveStation(StationResolverObject *object) * @param st Station (NULL in GUI) * @param tile Station tile being drawn (INVALID_TILE in GUI) * @param var10 Value to put in variable 10; normally 0; 1 when resolving the groundsprite and SSF_SEPARATE_GROUND is set. - * @return First sprite of the Action 1 spriteset ot use, minus an offset of 0x42D to accommodate for weird NewGRF specs. + * @return First sprite of the Action 1 spriteset to use, minus an offset of 0x42D to accommodate for weird NewGRF specs. */ SpriteID GetCustomStationRelocation(const StationSpec *statspec, BaseStation *st, TileIndex tile, uint32 var10) { @@ -704,7 +704,7 @@ int AllocateSpecToStation(const StationSpec *statspec, BaseStation *st, bool exe if (i == MAX_SPECLIST) { /* As final effort when the spec list is already full... * try to find the same spec and return that one. This might - * result in slighty "wrong" (as per specs) looking stations, + * result in slightly "wrong" (as per specs) looking stations, * but it's fairly unlikely that one reaches the limit anyways. */ for (i = 1; i < st->num_specs && i < MAX_SPECLIST; i++) { diff --git a/src/newgrf_station.h b/src/newgrf_station.h index a536687..111a4dd 100644 --- a/src/newgrf_station.h +++ b/src/newgrf_station.h @@ -108,12 +108,12 @@ struct StationSpec { /** * Bitmask of number of platforms available for the station. - * 0..6 correpsond to 1..7, while bit 7 corresponds to >7 platforms. + * 0..6 correspond to 1..7, while bit 7 corresponds to >7 platforms. */ byte disallowed_platforms; /** * Bitmask of platform lengths available for the station. - * 0..6 correpsond to 1..7, while bit 7 corresponds to >7 tiles long. + * 0..6 correspond to 1..7, while bit 7 corresponds to >7 tiles long. */ byte disallowed_lengths; diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp index be6c471..4b2f75f 100644 --- a/src/newgrf_text.cpp +++ b/src/newgrf_text.cpp @@ -182,7 +182,7 @@ private: GRFText(byte langid_, const char *text_, size_t len_) : next(NULL), len(len_), langid(langid_) { /* We need to use memcpy instead of strcpy due to - * the possibility of "choice lists" and therefor + * the possibility of "choice lists" and therefore * intermediate string terminators. */ memcpy(this->text, text_, len); } diff --git a/src/newgrf_townname.h b/src/newgrf_townname.h index e6b8ec2..0b1b389 100644 --- a/src/newgrf_townname.h +++ b/src/newgrf_townname.h @@ -18,7 +18,7 @@ #include "strings_type.h" struct NamePart { - byte prob; ///< The relative probablity of the following name to appear in the bottom 7 bits. + byte prob; ///< The relative probability of the following name to appear in the bottom 7 bits. union { char *text; ///< If probability bit 7 is clear byte id; ///< If probability bit 7 is set