Fix typo thanks to codespell.

This commit is contained in:
joris 2013-07-25 14:31:34 +02:00
parent ef2aaa419e
commit 195cdbea03
39 changed files with 75 additions and 75 deletions

View file

@ -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;

View file

@ -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");

View file

@ -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.

View file

@ -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];

View file

@ -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]);

View file

@ -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;

View file

@ -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")) {

View file

@ -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();

View file

@ -33,7 +33,7 @@
//@{
/*----------------------------------------------------------------------------
-- Platform dependant IO-related Includes and Definitions
-- Platform dependent IO-related Includes and Definitions
----------------------------------------------------------------------------*/
#include <sys/types.h>

View file

@ -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);

View file

@ -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

View file

@ -271,7 +271,7 @@ enum PlayerRacesOld {
**
** #PlayerNobody
**
** This player is unused. Nobody controlls this player.
** This player is unused. Nobody controls this player.
**
** #PlayerComputer
**

View file

@ -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;

View file

@ -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...
**
*/

View file

@ -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)

View file

@ -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,

View file

@ -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.
**

View file

@ -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()
{

View file

@ -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)
{

View file

@ -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.

View file

@ -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

View file

@ -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) {

View file

@ -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()
{

View file

@ -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.

View file

@ -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()
{

View file

@ -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);

View file

@ -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.

View file

@ -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:

View file

@ -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
**

View file

@ -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)
{

View file

@ -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)

View file

@ -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)
{

View file

@ -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;
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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.

View file

@ -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.

View file

@ -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