diff --git a/src/action/action_move.cpp b/src/action/action_move.cpp index 18fe8fb18..dfb2c3251 100644 --- a/src/action/action_move.cpp +++ b/src/action/action_move.cpp @@ -200,7 +200,7 @@ int DoActionMove(CUnit &unit) d = unit.pathFinderData->output.Length + 1; } - unit.pathFinderData->output.Cycles++;//reset have to be manualy controled by caller. + unit.pathFinderData->output.Cycles++;// reset have to be manualy controlled by caller. int move = UnitShowAnimationScaled(unit, unit.Type->Animations->Move, Map.Field(unit.Offset)->getCost()); unit.IX += posd.x * move; diff --git a/src/action/action_resource.cpp b/src/action/action_resource.cpp index 388c44f0e..5583f4133 100644 --- a/src/action/action_resource.cpp +++ b/src/action/action_resource.cpp @@ -461,7 +461,7 @@ int COrder_Resource::StartGathering(CUnit &unit) Assert(!unit.IY); if (resinfo.TerrainHarvester) { - // This shouldn't happend? + // This shouldn't happened? #if 0 if (!Map.IsTerrainResourceOnMap(unit.Orders->goalPos, this->CurrentResource)) { DebugPrint("Wood gone, just like that?\n"); diff --git a/src/action/action_unload.cpp b/src/action/action_unload.cpp index 248e1f85c..fe54a6bba 100644 --- a/src/action/action_unload.cpp +++ b/src/action/action_unload.cpp @@ -203,7 +203,7 @@ static int UnloadUnit(CUnit &transporter, CUnit &unit) } /** -** Return true is possition is a correct place to drop out units. +** Return true if position is a correct place to drop out units. ** ** @param transporter Transporter unit. ** @param pos position to drop out units. diff --git a/src/ai/ai_force.cpp b/src/ai/ai_force.cpp index 6cd69d8ab..d410dde60 100644 --- a/src/ai/ai_force.cpp +++ b/src/ai/ai_force.cpp @@ -185,7 +185,7 @@ public: /** ** Find All unittypes equivalent to a given one, and which are available -** UnitType are returned in the prefered order ( ie palladin >> knight... ) +** UnitType are returned in the preferred order (ie palladin >> knight...) ** ** @param unittype The unittype to find equivalence for ** @param usableTypes int array which will hold the result. (Size UnitTypeMax+1) @@ -479,7 +479,7 @@ int AiForceManager::GetForce(const CUnit &unit) { for (unsigned int i = 0; i < forces.size(); ++i) { AiForce &force = forces[i]; - + for (unsigned int j = 0; j < force.Units.size(); ++j) { CUnit &aiunit = *force.Units[j]; diff --git a/src/ai/ai_local.h b/src/ai/ai_local.h index ba8e9474f..388eea83d 100644 --- a/src/ai/ai_local.h +++ b/src/ai/ai_local.h @@ -164,7 +164,7 @@ public: private: void CountTypes(unsigned int *counter, const size_t len); bool IsBelongsTo(const CUnitType &type); - + void Update(); static void InternalRemoveUnit(CUnit *unit); @@ -400,7 +400,7 @@ extern void AiNewUnitTypeEquiv(const CUnitType &a, const CUnitType &b); extern void AiResetUnitTypeEquiv(); /// Finds all equivalents units to a given one extern int AiFindUnitTypeEquiv(const CUnitType &type, int *result); -/// Finds all available equivalents units to a given one, in the prefered order +/// Finds all available equivalents units to a given one, in the preferred order extern int AiFindAvailableUnitTypeEquiv(const CUnitType &type, int *result); extern int AiGetBuildRequestsCount(const PlayerAi &pai, int (&counter)[UnitTypeMax]); diff --git a/src/ai/ai_resource.cpp b/src/ai/ai_resource.cpp index fe73c3af0..2536f5958 100644 --- a/src/ai/ai_resource.cpp +++ b/src/ai/ai_resource.cpp @@ -842,7 +842,7 @@ void AiAddUpgradeToRequest(CUnitType &type) */ static void AiCheckingWork() { - // Suppy has the highest priority + // Supply has the highest priority if (AiPlayer->NeedSupply) { if (AiPlayer->UnitTypeBuilt.empty() || AiPlayer->UnitTypeBuilt[0].Type->Supply == 0) { AiPlayer->NeedSupply = false; diff --git a/src/ai/script_ai.cpp b/src/ai/script_ai.cpp index 313eb1d21..42241893a 100644 --- a/src/ai/script_ai.cpp +++ b/src/ai/script_ai.cpp @@ -319,7 +319,7 @@ static int CclDefineAiHelper(lua_State *l) || !strcmp(value, "unit-limit") || !strcmp(value, "repair")) { #ifdef DEBUG - fprintf(stderr, "DefineAiHelper: Relation is computed from buttons, you may remove safely the block begining with '\"%s\"'\n", value); + fprintf(stderr, "DefineAiHelper: Relation is computed from buttons, you may remove safely the block beginning with '\"%s\"'\n", value); #endif continue; } else if (!strcmp(value, "unit-equiv")) { diff --git a/src/game/game.cpp b/src/game/game.cpp index 193b2b1e9..7744b7d92 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -724,7 +724,7 @@ static void GameTypeManVsMachine() } /** -** Man vs Machine whith Humans on a Team +** Man vs Machine with Humans on a Team */ static void GameTypeManTeamVsMachine() { @@ -956,7 +956,7 @@ void CreateGame(const std::string &filename, CMap *map) UI.SelectedViewport->Center(Map.TilePosToMapPixelPos_Center(ThisPlayer->StartPos)); // - // Various hacks wich must be done after the map is loaded. + // Various hacks which must be done after the map is loaded. // // FIXME: must be done after map is loaded InitPathfinder(); diff --git a/src/include/iocompat.h b/src/include/iocompat.h index 33d50ca67..df1640d03 100644 --- a/src/include/iocompat.h +++ b/src/include/iocompat.h @@ -33,7 +33,7 @@ //@{ /*---------------------------------------------------------------------------- --- Platform dependant IO-related Includes and Definitions +-- Platform dependent IO-related Includes and Definitions ----------------------------------------------------------------------------*/ #include <sys/types.h> diff --git a/src/include/iolib.h b/src/include/iolib.h index a8a9f01de..94fc8815d 100644 --- a/src/include/iolib.h +++ b/src/include/iolib.h @@ -135,7 +135,7 @@ enum { -- Functions ----------------------------------------------------------------------------*/ -/// Build libary path name +/// Build library path name extern char *LibraryFileName(const char *file, char *buffer, size_t buffersize); extern bool CanAccessFile(const char *filename); diff --git a/src/include/missile.h b/src/include/missile.h index 2d9020def..834a07ffc 100644 --- a/src/include/missile.h +++ b/src/include/missile.h @@ -141,7 +141,7 @@ ** ** Determines the range in which a projectile will deal its damage. ** A range of 0 will mean that the damage will be limited to the -** targetted unit only. So if you shot a missile at a unit, it +** targeted unit only. So if you shot a missile at a unit, it ** would only damage that unit. A value of 1 only affects the ** field where the missile hits. A value of 2 would mean that ** the damage for that particular missile would be dealt for a range @@ -385,7 +385,7 @@ public: int TTL; /// missile time-to-live int Damage; /// missile damage (used for non-direct missiles, e.g. impacts) int ReduceFactor; /// Multiplier for reduce or increase damage dealt to the next unit - int SmokePrecision; /// How frequently the smoke missile will generate itself + int SmokePrecision; /// How frequently the smoke missile will generate itself int Range; /// missile damage range int SplashFactor; /// missile splash divisor @@ -393,7 +393,7 @@ public: MissileConfig Smoke; /// trailing missile LuaCallback *ImpactParticle; /// impact particle LuaCallback *SmokeParticle; /// smoke particle - LuaCallback *OnImpact; /// called when + LuaCallback *OnImpact; /// called when // --- FILLED UP --- CGraphic *G; /// missile graphic diff --git a/src/include/player.h b/src/include/player.h index 2ea8d70c3..1b0bcb3c8 100644 --- a/src/include/player.h +++ b/src/include/player.h @@ -271,7 +271,7 @@ enum PlayerRacesOld { ** ** #PlayerNobody ** -** This player is unused. Nobody controlls this player. +** This player is unused. Nobody controls this player. ** ** #PlayerComputer ** diff --git a/src/include/script.h b/src/include/script.h index 5cdd628bc..26264ffd2 100644 --- a/src/include/script.h +++ b/src/include/script.h @@ -232,7 +232,7 @@ struct _NumberDesc_ { struct _UnitDesc_ { EUnit e; /// which unit; union { - CUnit **AUnit; /// Adress of the unit. + CUnit **AUnit; /// Address of the unit. } D; }; @@ -264,7 +264,7 @@ struct _StringDesc_ { struct { StringDesc *String; /// Original string. NumberDesc *Line; /// Line number. - NumberDesc *MaxLen; /// Max lenght of line. + NumberDesc *MaxLen; /// Max length of line. CFont *Font; /// Font to consider (else (-1) consider just char). } Line; /// For specific line. ES_GameInfo GameInfoType; diff --git a/src/include/settings.h b/src/include/settings.h index 998f64431..92498952f 100644 --- a/src/include/settings.h +++ b/src/include/settings.h @@ -57,7 +57,7 @@ struct SettingsPresets { ** ** This structure one day should contain all common game settings, ** in-game, or pre-start, and the individual (per player) presets. -** This allows central maintainance, easy (network-)negotiation, +** This allows central maintenance, easy (network-)negotiation, ** simplifies load/save/reinitialization, etc... ** */ diff --git a/src/include/spells.h b/src/include/spells.h index 970477043..3891524c3 100644 --- a/src/include/spells.h +++ b/src/include/spells.h @@ -202,7 +202,7 @@ public: int Slot; /// Spell numeric identifier // Spell Specifications - TargetType Target; /// Targetting information. See TargetType. + TargetType Target; /// Targeting information. See TargetType. std::vector<SpellActionType *> Action; /// More arguments for spell (damage, delay, additional sounds...). int Range; /// Max range of the target. @@ -251,7 +251,7 @@ extern void InitSpells(); /// done spell tables extern void CleanSpells(); -/// return 1 if spell is availible, 0 if not (must upgrade) +/// return 1 if spell is available, 0 if not (must upgrade) extern bool SpellIsAvailable(const CPlayer &player, int SpellId); /// returns true if spell can be casted (enough mana, valid target) diff --git a/src/include/unittype.h b/src/include/unittype.h index e466a083d..b5cc55a79 100644 --- a/src/include/unittype.h +++ b/src/include/unittype.h @@ -134,7 +134,7 @@ public: char Enable; /// True if the unit doesn't have this variable. (f.e shield) }; -// Index for boolflag aready defined +// Index for boolflag already defined enum { COWARD_INDEX = 0, BUILDING_INDEX, diff --git a/src/missile/missile.cpp b/src/missile/missile.cpp index 2b74ac001..974c6aad5 100644 --- a/src/missile/missile.cpp +++ b/src/missile/missile.cpp @@ -785,7 +785,7 @@ static void MissileHitsWall(const Missile &missile, const Vec2i &tilePos, int sp } /** -** Check if missle has already pierced that unit +** Check if missile has already pierced that unit ** ** @param missile Current missile. ** @param unit Target unit. @@ -1103,7 +1103,7 @@ void MissileActions() } /** -** Calculate distance from view-point to missle. +** Calculate distance from view-point to missile. ** ** @param missile Missile pointer for distance. ** diff --git a/src/missile/missile_landmine.cpp b/src/missile/missile_landmine.cpp index 77ebafcc0..17476bdb9 100644 --- a/src/missile/missile_landmine.cpp +++ b/src/missile/missile_landmine.cpp @@ -59,7 +59,7 @@ struct LandMineTargetFinder { /** ** Land mine controller. ** @todo start-finish-start cyclic animation.(anim scripts!) -** @todo missile should dissapear for a while. +** @todo missile should disappear for a while. */ void MissileLandMine::Action() { diff --git a/src/network/network.cpp b/src/network/network.cpp index ddca3f570..eaf845d61 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -74,7 +74,7 @@ ** package 3 before package 1. Even a package can come duplicate. ** @li UDP is connectionless and therefore has problems with firewalls. ** -** I have choosen UDP. Additional support for the TCP protocol is welcome. +** I have chosen UDP. Additional support for the TCP protocol is welcome. ** ** @subsection sc_vs_p2p server/client vs. peer to peer ** @@ -90,7 +90,7 @@ ** p2p has the advantage of a smaller lag, but needs a higher bandwidth ** by the clients. ** -** p2p has been choosen for in-game. +** p2p has been chosen for in-game. ** s/c for the preparing room. ** ** @subsection bandwidth bandwidth @@ -137,7 +137,7 @@ ** Only user commands are send over the network to the other computers. ** To reduce network traffic, commands are sent/executed every gameCyclesPerUpdate ** gameCycles. The command needs some time to reach the other clients (lag), -** so the command is not executed immediatly on the local computer, +** so the command is not executed immediately on the local computer, ** but a delay (NetworkLag NetUpdates) later. Commands are stored ** in a circular array indexed by update time. Once each other players commands ** are received for a specified gameNetCycle, all commands of this gameNetCycle @@ -1038,7 +1038,7 @@ static void NetworkSendCommands(unsigned long gameNetCycle) } /** -** Network excecute commands. +** Network execute commands. */ static void NetworkExecCommands(unsigned long gameNetCycle) { diff --git a/src/sound/script_sound.cpp b/src/sound/script_sound.cpp index af8d739f7..4c27032bd 100644 --- a/src/sound/script_sound.cpp +++ b/src/sound/script_sound.cpp @@ -105,7 +105,7 @@ static CSound *CclGetSound(lua_State *l) ** Create a sound. ** ** Glue between c and scheme. This function asks the sound system to -** register a sound under a given name, wiht an associated list of files +** register a sound under a given name, with an associated list of files ** (the list can be replaced by only one file). ** ** @param l Lua state. diff --git a/src/sound/sound_server.cpp b/src/sound/sound_server.cpp index 849eca383..a9038d625 100644 --- a/src/sound/sound_server.cpp +++ b/src/sound/sound_server.cpp @@ -57,7 +57,7 @@ static int MusicVolume = 128; /// music volume static bool MusicEnabled = true; static bool EffectsEnabled = true; -/// Channels for sound effects and unit speach +/// Channels for sound effects and unit speech struct SoundChannel { CSample *Sample; /// sample to play Origin *Unit; /// pointer to unit, who plays the sound, if any diff --git a/src/spell/spell_adjustvital.cpp b/src/spell/spell_adjustvital.cpp index a041ebbe0..32031fda6 100644 --- a/src/spell/spell_adjustvital.cpp +++ b/src/spell/spell_adjustvital.cpp @@ -90,7 +90,7 @@ } // When harming cast again to send the hp to negative values. - // Carefull, a perfect 0 target hp kills too. + // Careful, a perfect 0 target hp kills too. // Avoid div by 0 errors too! int castcount = 1; if (hp) { diff --git a/src/stratagus/construct.cpp b/src/stratagus/construct.cpp index fc104fcd7..7fdf643af 100644 --- a/src/stratagus/construct.cpp +++ b/src/stratagus/construct.cpp @@ -123,7 +123,7 @@ void InitConstructions() ** Load the graphics for the constructions. ** ** HELPME: who make this better terrain depended and extendable -** HELPME: filename constuction. +** HELPME: filename construction. */ void LoadConstructions() { diff --git a/src/stratagus/iolib.cpp b/src/stratagus/iolib.cpp index 6cc8b8be7..db7179d52 100644 --- a/src/stratagus/iolib.cpp +++ b/src/stratagus/iolib.cpp @@ -501,7 +501,7 @@ long CFile::PImpl::tell() ** Find a file with its correct extension ("", ".gz" or ".bz2") ** ** @param file The string with the file path. Upon success, the string -** is replaced by the full filename witht he correct extension. +** is replaced by the full filename with the correct extension. ** @param filesize Size of the file buffer ** ** @return true if the file has been found. diff --git a/src/stratagus/luacallback.cpp b/src/stratagus/luacallback.cpp index 0ef1ce70b..91065c868 100644 --- a/src/stratagus/luacallback.cpp +++ b/src/stratagus/luacallback.cpp @@ -90,9 +90,9 @@ void LuaCallback::pushString(const std::string &s) /** -** Called when an action is recieved from a Widget. It is used -** to be able to recieve a notification that an action has -** occured. +** Called when an action is received from a Widget. It is used +** to be able to receive a notification that an action has +** occurred. */ void LuaCallback::run() { diff --git a/src/stratagus/mainloop.cpp b/src/stratagus/mainloop.cpp index 5f9037662..19139a2a4 100644 --- a/src/stratagus/mainloop.cpp +++ b/src/stratagus/mainloop.cpp @@ -96,7 +96,7 @@ void DoScrollArea(int state, bool fast) if (fast) { stepx = (int)(UI.MouseScrollSpeed * vp->MapWidth / 2 * PixelTileSize.x * FRAMES_PER_SECOND / 4); stepy = (int)(UI.MouseScrollSpeed * vp->MapHeight / 2 * PixelTileSize.y * FRAMES_PER_SECOND / 4); - } else {// dynamic: let these variables increase upto fast.. + } else {// dynamic: let these variables increase up to fast.. // FIXME: pixels per second should be configurable stepx = (int)(UI.MouseScrollSpeed * PixelTileSize.x * FRAMES_PER_SECOND / 4); stepy = (int)(UI.MouseScrollSpeed * PixelTileSize.y * FRAMES_PER_SECOND / 4); diff --git a/src/stratagus/player.cpp b/src/stratagus/player.cpp index 3126162f0..0e1e4c738 100644 --- a/src/stratagus/player.cpp +++ b/src/stratagus/player.cpp @@ -1069,7 +1069,7 @@ void CPlayer::SubCosts(const int *costs) } /** -** Substract the costs of new unit from resources +** Subtract the costs of new unit from resources ** ** @param type Type of unit. */ @@ -1079,7 +1079,7 @@ void CPlayer::SubUnitType(const CUnitType &type) } /** -** Substract a factor of costs from the resources +** Subtract a factor of costs from the resources ** ** @param costs How many costs. ** @param factor Factor of the costs to apply. diff --git a/src/stratagus/script.cpp b/src/stratagus/script.cpp index 44cad42c4..71176f8d3 100644 --- a/src/stratagus/script.cpp +++ b/src/stratagus/script.cpp @@ -63,7 +63,7 @@ static int NumberCounter = 0; /// Counter for lua function. static int StringCounter = 0; /// Counter for lua function. -/// Usefull for getComponent. +/// Useful for getComponent. typedef enum { USTRINT_STR, USTRINT_INT } UStrIntType; @@ -823,7 +823,7 @@ StringDesc *CclParseStringDesc(lua_State *l) lua_rawgeti(l, -1, 2); // String. res->D.Line.String = CclParseStringDesc(l); if (lua_rawlen(l, -1) >= 3) { - lua_rawgeti(l, -1, 3); // Lenght. + lua_rawgeti(l, -1, 3); // Length. res->D.Line.MaxLen = CclParseNumberDesc(l); } res->D.Line.Font = NULL; @@ -2079,7 +2079,7 @@ static bool LuaValueToString(lua_State *l, std::string &value) case LUA_TFUNCTION: // Could be done with string.dump(function) // and debug.getinfo(function).name (could be nil for anonymous function) - // But not usefull yet. + // But not useful yet. value = ""; return false; case LUA_TUSERDATA: diff --git a/src/stratagus/stratagus.cpp b/src/stratagus/stratagus.cpp index f56a130a9..dad2409eb 100644 --- a/src/stratagus/stratagus.cpp +++ b/src/stratagus/stratagus.cpp @@ -40,7 +40,7 @@ ** ** Any help to improve this documention is welcome. If you didn't ** understand something or you found an error or a wrong spelling -** or wrong grammer please write an email (including a patch :). +** or wrong grammar please write an email (including a patch :). ** ** @section Informations Informations ** diff --git a/src/stratagus/util.cpp b/src/stratagus/util.cpp index f7de96d53..6b9ca88f3 100644 --- a/src/stratagus/util.cpp +++ b/src/stratagus/util.cpp @@ -121,7 +121,7 @@ long isqrt(long num) // // Load the binary constant 01 00 00 ... 00, where the number // of zero bits to the right of the single one bit - // is even, and the one bit is as far left as is consistant + // is even, and the one bit is as far left as is consistent // with that condition.) // // This portable load replaces the loop that used to be @@ -239,7 +239,7 @@ errno_t strcat_s(char *dst, size_t dstsize, const char *src) ** @param a String to search in ** @param b Substring to search for ** -** @return Pointer to first occurence of b or NULL if not found. +** @return Pointer to first occurrence of b or NULL if not found. */ char *strcasestr(const char *a, const char *b) { diff --git a/src/ui/botpanel.cpp b/src/ui/botpanel.cpp index 5294ae056..0452533a4 100644 --- a/src/ui/botpanel.cpp +++ b/src/ui/botpanel.cpp @@ -842,7 +842,7 @@ void UpdateStatusLineForButton(const ButtonAction &button) ** ** @return 1 if button is allowed, 0 else. ** -** @todo FIXME: better check. (dependancy, resource, ...) +** @todo FIXME: better check. (dependency, resource, ...) ** @todo FIXME: make difference with impossible and not yet researched. */ bool IsButtonAllowed(const CUnit &unit, const ButtonAction &buttonaction) diff --git a/src/ui/mainscr.cpp b/src/ui/mainscr.cpp index f0f514c0e..33d08375c 100644 --- a/src/ui/mainscr.cpp +++ b/src/ui/mainscr.cpp @@ -128,8 +128,8 @@ void DrawUserDefinedButtons() ** Placed under icons on top-panel. ** ** @param unit Pointer to unit. -** @param x Screen X postion of icon -** @param y Screen Y postion of icon +** @param x Screen X position of icon +** @param y Screen Y position of icon */ static void UiDrawLifeBar(const CUnit &unit, int x, int y) { @@ -162,8 +162,8 @@ static void UiDrawLifeBar(const CUnit &unit, int x, int y) ** Placed under icons on top-panel. ** ** @param unit Pointer to unit. -** @param x Screen X postion of icon -** @param y Screen Y postion of icon +** @param x Screen X position of icon +** @param y Screen Y position of icon */ static void UiDrawManaBar(const CUnit &unit, int x, int y) { @@ -831,7 +831,7 @@ bool MessagesDisplay::CheckRepeatMessage(const char *msg) } /** -** Add a new message to display only if it differs from the preceeding one. +** Add a new message to display only if it differs from the preceding one. */ void MessagesDisplay::AddUniqueMessage(const char *s) { diff --git a/src/ui/mouse.cpp b/src/ui/mouse.cpp index 814765c00..481ad7b21 100644 --- a/src/ui/mouse.cpp +++ b/src/ui/mouse.cpp @@ -437,7 +437,7 @@ static bool DoRightButton_NewOrder(CUnit &unit, CUnit *dest, const Vec2i &pos, i static void DoRightButton_ForSelectedUnit(CUnit &unit, CUnit *dest, const Vec2i &pos, int &acknowledged) { - // don't self targetting. + // don't self targeting. if (dest == &unit) { return; } diff --git a/src/ui/widgets.cpp b/src/ui/widgets.cpp index 81a074424..9c0fa707b 100644 --- a/src/ui/widgets.cpp +++ b/src/ui/widgets.cpp @@ -198,9 +198,9 @@ LuaActionListener::LuaActionListener(lua_State *l, lua_Object f) : } /** -** Called when an action is recieved from a Widget. It is used -** to be able to recieve a notification that an action has -** occured. +** Called when an action is received from a Widget. It is used +** to be able to receive a notification that an action has +** occurred. ** ** @param eventId the identifier of the Widget */ @@ -1145,7 +1145,7 @@ void Windows::add(gcn::Widget *widget, int x, int y) ** @param y Y coordinate of the mouse relative to the widndow. ** ** @note Once dragged, without release the mouse, -** if you go virtualy outside the container then go back, +** if you go virtually outside the container then go back, ** you have to wait the virtual cursor are in the container. ** It is because x, y argument refer to a virtual cursor :( ** @note An another thing is strange @@ -1201,7 +1201,7 @@ void Windows::mouseMotion(int x, int y) setPosition(x, y); // Move the cursor. - // Usefull only when window reachs the limit. + // Useful only when window reachs the limit. getAbsolutePosition(absx, absy); CursorScreenPos.x = absx + mMouseXOffset; CursorScreenPos.y = absy + mMouseYOffset; diff --git a/src/unit/unit.cpp b/src/unit/unit.cpp index 98775a8d1..4eec57936 100644 --- a/src/unit/unit.cpp +++ b/src/unit/unit.cpp @@ -123,7 +123,7 @@ ** Pointer to the last unit added inside. Order doesn't really ** matter. All units inside are kept in a circular linked list. ** This is NULL if there are no units inside. Multiple levels -** of inclusion are allowed, though not very usefull right now +** of inclusion are allowed, though not very useful right now ** ** CUnit::NextContained, CUnit::PrevContained ** @@ -293,7 +293,7 @@ ** ** CUnit::Wait ** -** The unit is forced too wait for that many cycles. Be carefull, +** The unit is forced too wait for that many cycles. Be careful, ** setting this to 0 will lock the unit. ** ** CUnit::State @@ -685,7 +685,7 @@ void CUnit::AssignToPlayer(CPlayer &player) if (!type.Vanishes && CurrentAction() != UnitActionDie) { player.AddUnit(*this); if (!SaveGameLoading) { - // If unit is dieing, it's already been lost by all players + // If unit is dying, it's already been lost by all players // don't count again if (type.Building) { // FIXME: support more races @@ -700,7 +700,7 @@ void CUnit::AssignToPlayer(CPlayer &player) player.Demand += type.Demand; // food needed } - // Don't Add the building if it's dieing, used to load a save game + // Don't Add the building if it's dying, used to load a save game if (type.Building && CurrentAction() != UnitActionDie) { // FIXME: support more races if (!type.Wall && &type != UnitTypeOrcWall && &type != UnitTypeHumanWall) { @@ -1301,8 +1301,8 @@ void UpdateForNewUnit(const CUnit &unit, int upgrade) ** Find nearest point of unit. ** ** @param unit Pointer to unit. -** @param pos tile map postion. -** @param dpos Out: nearest point tile map postion to (tx,ty). +** @param pos tile map position. +** @param dpos Out: nearest point tile map position to (tx,ty). */ void NearestOfUnit(const CUnit &unit, const Vec2i &pos, Vec2i *dpos) { @@ -1430,7 +1430,7 @@ void UnitGoesUnderFog(CUnit &unit, const CPlayer &player) // configurations. // A unit does NOT get a reference when it goes under fog if it's // Destroyed. Furthermore, it shouldn't lose a reference if it was - // Seen destroyed. That only happend with complex shared vision, and + // Seen destroyed. That only happened with complex shared vision, and // it's sort of the whole point of this tracking. // if (unit.Destroyed) { @@ -2588,7 +2588,7 @@ static void HitUnit_AttackBack(CUnit &attacker, CUnit &target) } if (best && best != oldgoal && best->Player != target.Player && best->IsAllied(target) == false) { CommandAttack(target, best->tilePos, best, FlushCommands); - // Set threshold value only for agressive units + // Set threshold value only for aggressive units if (best->IsAgressive()) { target.Threshold = threshold; } diff --git a/src/unit/unit_draw.cpp b/src/unit/unit_draw.cpp index fb2f467a0..008f91c48 100644 --- a/src/unit/unit_draw.cpp +++ b/src/unit/unit_draw.cpp @@ -457,8 +457,8 @@ void CDecoVarSpriteBar::Draw(int x, int y, const CUnitType &/*type*/, const CVar Decoration &decosprite = DecoSprite.SpriteArray[(int)this->NSprite]; CGraphic &sprite = *decosprite.Sprite; - x += decosprite.HotPos.x; // in addition of OffsetX... Usefull ? - y += decosprite.HotPos.y; // in addition of OffsetY... Usefull ? + x += decosprite.HotPos.x; // in addition of OffsetX... Useful ? + y += decosprite.HotPos.y; // in addition of OffsetY... Useful ? int n = sprite.NumFrames - 1; // frame of the sprite to show. n -= (n * var.Value) / var.Max; @@ -486,8 +486,8 @@ void CDecoVarStaticSprite::Draw(int x, int y, const CUnitType &/*type*/, const C Decoration &decosprite = DecoSprite.SpriteArray[(int)this->NSprite]; CGraphic &sprite = *decosprite.Sprite; - x += decosprite.HotPos.x; // in addition of OffsetX... Usefull ? - y += decosprite.HotPos.y; // in addition of OffsetY... Usefull ? + x += decosprite.HotPos.x; // in addition of OffsetX... Useful ? + y += decosprite.HotPos.y; // in addition of OffsetY... Useful ? if (this->IsCenteredInX) { x -= sprite.Width / 2; } diff --git a/src/unit/unittype.cpp b/src/unit/unittype.cpp index 9f74572f8..77aab3c56 100644 --- a/src/unit/unittype.cpp +++ b/src/unit/unittype.cpp @@ -497,7 +497,7 @@ ** ** ResourceInfo::FinalResource ** -** The resource is converted to this at the depot. Usefull for +** The resource is converted to this at the depot. Useful for ** a fisherman who harvests fish, but it all turns to food at the ** depot. ** @@ -960,7 +960,7 @@ CUnitType *NewUnitTypeSlot(const std::string &ident) ** @param sprite Sprite to use for drawing ** @param player Player number for color substitution. ** @param frame Animation frame of unit-type. -** @param screenPos Screen pixel (top left) postion to draw unit-type. +** @param screenPos Screen pixel (top left) position to draw unit-type. ** ** @todo Do screen position caculation in high level. ** Better way to handle in x mirrored sprites. diff --git a/src/video/font.cpp b/src/video/font.cpp index 77ba75ea0..8f44d00f5 100644 --- a/src/video/font.cpp +++ b/src/video/font.cpp @@ -703,7 +703,7 @@ static int FormatNumber(int number, char *buf) } /** -** Return the index of first occurance of c in [s- s + maxlen] +** Return the index of first occurrence of c in [s- s + maxlen] ** ** @param s original string. ** @param c character to find. diff --git a/src/video/linedraw.cpp b/src/video/linedraw.cpp index cad286d63..8537ac386 100644 --- a/src/video/linedraw.cpp +++ b/src/video/linedraw.cpp @@ -45,7 +45,7 @@ ----------------------------------------------------------------------------*/ /** -** Bitmask, denoting a postion left/right/above/below clip rectangle +** Bitmask, denoting a position left/right/above/below clip rectangle ** (mainly used by VideoDrawLineClip) */ #define ClipCodeInside 0 /// Clipping inside rectangle