Skip to content

Commit

Permalink
Fix typos, misspellings, duplicate words
Browse files Browse the repository at this point in the history
  • Loading branch information
gunbei authored and SupSuper committed Jul 5, 2015
1 parent 5a972b0 commit e95bb31
Show file tree
Hide file tree
Showing 47 changed files with 91 additions and 91 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.txt
Expand Up @@ -242,7 +242,7 @@ New features:
- Game can now be completed, game over screens for winning and losing.
- Randomizer for "New Battle" mode.
- Your settings in "New Battle" mode will be saved for next time you play.
- New translations: Ukranian, Bulgarian, Portuguese (Portugal), Spanish (Latin American), Danish.
- New translations: Ukrainian, Bulgarian, Portuguese (Portugal), Spanish (Latin American), Danish.
- New soldier names: Italian, Hungarian.
- Aliens progress their equipment levels, races and aggression over time.
- Added "Alien Weapon Level" button in New Battle menu.
Expand Down Expand Up @@ -343,7 +343,7 @@ Bugfixes:
Battlescape:
- Battlescape buttons are now unavailable during alien turn.
- Fixed bug in map generator regarding nodes outside the map.
- Improved map generation of alien base assualt missions.
- Improved map generation of alien base assault missions.
- The player no longer reveals the tile an alien is standing on when they detect an alien on an unrevealed tile.
- The camera resets after non-reaction shots.
- Camera now correctly centers on explosions, and properly detects explosion visibility.
Expand Down
2 changes: 1 addition & 1 deletion src/Battlescape/AlienBAIState.cpp
Expand Up @@ -797,7 +797,7 @@ void AlienBAIState::setupEscape()
const int FIRE_PENALTY = 40;
const int BASE_SYSTEMATIC_SUCCESS = 100;
const int BASE_DESPERATE_SUCCESS = 110;
const int FAST_PASS_THRESHOLD = 100; // a score that's good engouh to quit the while loop early; it's subjective, hand-tuned and may need tweaking
const int FAST_PASS_THRESHOLD = 100; // a score that's good enough to quit the while loop early; it's subjective, hand-tuned and may need tweaking

std::vector<Position> randomTileSearch = _save->getTileSearch();
RNG::shuffle(randomTileSearch);
Expand Down
2 changes: 1 addition & 1 deletion src/Battlescape/BattlescapeGenerator.cpp
Expand Up @@ -2213,7 +2213,7 @@ void BattlescapeGenerator::attachNodeLinks()

/**
* Selects a position for a map block.
* @param rects the postions to select from, none meaning the whole map.
* @param rects the positions to select from, none meaning the whole map.
* @param X the x position for the block gets stored in this variable.
* @param Y the y position for the block gets stored in this variable.
* @param sizeX the x size of the block we want to add.
Expand Down
2 changes: 1 addition & 1 deletion src/Battlescape/BattlescapeState.cpp
Expand Up @@ -504,7 +504,7 @@ BattlescapeState::~BattlescapeState()
}

/**
* Initilizes the battlescapestate.
* Initializes the battlescapestate.
*/
void BattlescapeState::init()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Battlescape/BattlescapeState.h
Expand Up @@ -95,7 +95,7 @@ class BattlescapeState : public State
BattlescapeState();
/// Cleans up the Battlescape state.
~BattlescapeState();
/// Initilizes the battlescapestate.
/// Initializes the battlescapestate.
void init();
/// Runs the timers and handles popups.
void think();
Expand Down
2 changes: 1 addition & 1 deletion src/Battlescape/CivilianBAIState.cpp
Expand Up @@ -296,7 +296,7 @@ void CivilianBAIState::setupEscape()
const int FIRE_PENALTY = 40;
const int BASE_SYSTEMATIC_SUCCESS = 100;
const int BASE_DESPERATE_SUCCESS = 110;
const int FAST_PASS_THRESHOLD = 100; // a score that's good engouh to quit the while loop early; it's subjective, hand-tuned and may need tweaking
const int FAST_PASS_THRESHOLD = 100; // a score that's good enough to quit the while loop early; it's subjective, hand-tuned and may need tweaking

int tu = _unit->getTimeUnits() / 2;

Expand Down
2 changes: 1 addition & 1 deletion src/Battlescape/CivilianBAIState.h
Expand Up @@ -32,7 +32,7 @@ class Node;
struct BattleAction;

/**
* This is the intial AI state of units, walking around and looking for intruders.
* This is the initial AI state of units, walking around and looking for intruders.
*/
class CivilianBAIState : public BattleAIState
{
Expand Down
2 changes: 1 addition & 1 deletion src/Battlescape/Map.cpp
Expand Up @@ -851,7 +851,7 @@ void Map::drawTerrain(Surface *surface)
if (unit->getBreathFrame() > 0)
{
tmpSurface = _res->getSurfaceSet("BREATH-1.PCK")->getFrame(unit->getBreathFrame() - 1);
// we enlarge the unit sprite when aiming to accomodate the weapon. so adjust as necessary.
// we enlarge the unit sprite when aiming to accommodate the weapon. so adjust as necessary.
if (unit->getStatus() == STATUS_AIMING)
{
offset.x = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/Battlescape/Pathfinding.cpp
Expand Up @@ -235,7 +235,7 @@ bool Pathfinding::aStarPath(const Position &startPosition, const Position &endPo
}
}
}
// Unble to reach the target
// Unable to reach the target
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Battlescape/Projectile.cpp
Expand Up @@ -457,7 +457,7 @@ Position Projectile::getTarget()

/**
* Is this projectile drawn back to front or front to back?
* @retun return if this is to be drawn in reverse order.
* @return return if this is to be drawn in reverse order.
*/
bool Projectile::isReversed() const
{
Expand Down
8 changes: 4 additions & 4 deletions src/Battlescape/TileEngine.cpp
Expand Up @@ -1584,7 +1584,7 @@ int TileEngine::horizontalBlockage(Tile *startTile, Tile *endTile, ItemDamageTyp
block = blockage(startTile, MapData::O_NORTHWALL, type);
break;
case 1: // north east
if (type == DT_NONE) //this is two-way diagonal visiblity check, used in original game
if (type == DT_NONE) //this is two-way diagonal visibility check, used in original game
{
block = blockage(startTile, MapData::O_NORTHWALL, type) + blockage(endTile, MapData::O_WESTWALL, type); //up+right
tmpTile = _save->getTile(startTile->getPosition() + oneTileNorth);
Expand Down Expand Up @@ -2249,7 +2249,7 @@ int TileEngine::calculateLine(const Position& origin, const Position& target, bo

/**
* Calculates a parabola trajectory, used for throwing items.
* @param origin Orign in voxelspace.
* @param origin Origin in voxelspace.
* @param target Target in voxelspace.
* @param storeTrajectory True will store the whole trajectory - otherwise it just stores the last position.
* @param trajectory A vector of positions in which the trajectory is stored.
Expand Down Expand Up @@ -2350,7 +2350,7 @@ bool TileEngine::isVoxelVisible(const Position& voxel)
{
int zstart = voxel.z+3; // slight Z adjust
if ((zstart/24)!=(voxel.z/24))
return true; // visble!
return true; // visible!
Position tmpVoxel = voxel;
int zend = (zstart/24)*24 +24;
for (int z = zstart; z<zend; z++)
Expand Down Expand Up @@ -2529,7 +2529,7 @@ Tile *TileEngine::applyGravity(Tile *t)
{
if (occupant->getMovementType() == MT_FLY)
{
// move to the position you're already in. this will unset the kneeling flag, set teh floating flag, etc.
// move to the position you're already in. this will unset the kneeling flag, set the floating flag, etc.
occupant->startWalking(occupant->getDirection(), occupant->getPosition(), _save->getTile(occupant->getPosition() + Position(0,0,-1)), true);
// and set our status to standing (rather than walking or flying) to avoid weirdness.
occupant->abortTurn();
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/Adlib/adlplayer.cpp
Expand Up @@ -697,7 +697,7 @@ int decode_op(int instrument, bool* another_loop)
}

// music initialization function, sets up subblock array,
// tempo, instrument addreses and samples
// tempo, instrument addresses and samples
void init_music_data(unsigned char* music_ptr,int length)
{
unsigned int i, to_add, j;
Expand Down
6 changes: 3 additions & 3 deletions src/Engine/Adlib/fmopl.cpp
Expand Up @@ -710,8 +710,8 @@ static void OPLCloseTable( void )
free(VIB_TABLE);
}

/* CSM Key Controll */
INLINE void CSMKeyControll(OPL_CH *CH)
/* CSM Key Control */
INLINE void CSMKeyControl(OPL_CH *CH)
{
OPL_SLOT *slot1 = &CH->SLOT[SLOT1];
OPL_SLOT *slot2 = &CH->SLOT[SLOT2];
Expand Down Expand Up @@ -1398,7 +1398,7 @@ int OPLTimerOver(FM_OPL *OPL,int c)
int ch;
if(OPL->UpdateHandler) OPL->UpdateHandler(OPL->UpdateParam,0);
for(ch=0;ch<9;ch++)
CSMKeyControll( &OPL->P_CH[ch] );
CSMKeyControl( &OPL->P_CH[ch] );
}
}
/* reload timer */
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/FileMap.cpp
Expand Up @@ -79,7 +79,7 @@ std::set<std::string> _filterFiles(const T &files, const std::string &ext)
for (typename T::const_iterator i = files.begin(); i != files.end(); ++i)
{
// less-than not less-than-or-equal since we should have at least
// one character in the filename that is not part of the extention
// one character in the filename that is not part of the extension
if (extLen < i->length() && 0 == _canonicalize(i->substr(i->length() - (extLen - 1))).compare(canonicalExt))
{
ret.insert(*i);
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/FileMap.h
Expand Up @@ -42,7 +42,7 @@ namespace FileMap
/// filesystem paths via getFilePath()
const std::set<std::string> &getVFolderContents(const std::string &relativePath);

/// Returns the subset of the given files that matches the given extention
/// Returns the subset of the given files that matches the given extension
std::set<std::string> filterFiles(const std::vector<std::string> &files, const std::string &ext);
std::set<std::string> filterFiles(const std::set<std::string> &files, const std::string &ext);

Expand Down
2 changes: 1 addition & 1 deletion src/Engine/Game.cpp
Expand Up @@ -281,7 +281,7 @@ void Game::run()

if (_init && _timeUntilNextFrame <= 0)
{
// make a note of when this frame update occured.
// make a note of when this frame update occurred.
_timeOfLastFrame = SDL_GetTicks();
_fpsCounter->addFrame();
_screen->clear();
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/Language.cpp
Expand Up @@ -433,7 +433,7 @@ void Language::load(ExtraStrings *extras)
}

/**
* Replaces all special string markers with the approriate characters
* Replaces all special string markers with the appropriate characters
* and converts the string encoding.
* @param string Original UTF-8 string.
* @return New widechar string.
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/LanguagePlurality.cpp
Expand Up @@ -81,7 +81,7 @@ const char *NoSingular::getSuffix(unsigned) const
}

/**
* Plurality rules for Cyrillic languages (Russian, Ukranian, etc.)
* Plurality rules for Cyrillic languages (Russian, Ukrainian, etc.)
* @note one = 1, 21, 31...; few = 2-4, 22-24, 32-34...; many = 0, 5-20, 25-30, 35-40...; other = ...
*/
class CyrillicPlurality : public LanguagePlurality
Expand Down
4 changes: 2 additions & 2 deletions src/Engine/LocalizedText.cpp
Expand Up @@ -25,7 +25,7 @@ namespace OpenXcom
/**
* Replace the next argument placeholder with @a val.
* @param val The value to place in the next placeholder's position.
* @return A translated string with all occurences of the marker replaced by @a val.
* @return A translated string with all occurrences of the marker replaced by @a val.
*/
LocalizedText LocalizedText::arg(const std::wstring &val) const
{
Expand All @@ -46,7 +46,7 @@ LocalizedText LocalizedText::arg(const std::wstring &val) const
/**
* Replace the next argument placeholder with @a val.
* @param val The value to place in the next placeholder's position.
* @return The translated string with all occurences of the marker replaced by @a val.
* @return The translated string with all occurrences of the marker replaced by @a val.
*/
LocalizedText &LocalizedText::arg(const std::wstring &val)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Engine/LocalizedText.h
Expand Up @@ -101,7 +101,7 @@ inline LocalizedText::operator std::wstring const&() const
* Replace the next argument placeholder with @a val.
* @tparam T The type of the replacement value. It should be streamable to std::owstringstream.
* @param val The value to place in the next placeholder's position.
* @return A translated string with all occurences of the marker replaced by @a val.
* @return A translated string with all occurrences of the marker replaced by @a val.
*/
template <typename T>
LocalizedText LocalizedText::arg(T val) const
Expand All @@ -127,7 +127,7 @@ LocalizedText LocalizedText::arg(T val) const
* Replace the next argument placeholder with @a val.
* @tparam T The type of the replacement value. It should be streamable to std::owstringstream.
* @param val The value to place in the next placeholder's position.
* @return The translated string with all occurences of the marker replaced by @a val.
* @return The translated string with all occurrences of the marker replaced by @a val.
*/
template <typename T>
LocalizedText &LocalizedText::arg(T val)
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/RNG.cpp
Expand Up @@ -142,7 +142,7 @@ double boxMuller(double m, double s)
}

/**
* Generates a random percent chance of an event occuring,
* Generates a random percent chance of an event occurring,
* and returns the result
* @param value Value percentage (0-100%)
* @return True if the chance succeeded.
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/Scalers/init.cpp
Expand Up @@ -24,7 +24,7 @@ uint32_t YUV1, YUV2;

HQX_API void HQX_CALLCONV hqxInit(void)
{
/* Initalize RGB to YUV lookup table */
/* Initialize RGB to YUV lookup table */
uint32_t c, r, g, b, y, u, v;
for (c = 0; c < 16777215; c++) {
r = (c & 0xFF0000) >> 16;
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/Scalers/scale2x.cpp
Expand Up @@ -1291,7 +1291,7 @@ static inline void scale2x_32_mmx_border(scale2x_uint32* dst, const scale2x_uint
* Scale by a factor of 2 a row of pixels of 8 bits.
* This is a very fast MMX implementation.
* The implementation uses a combination of cmp/and/not operations to
* completly remove the need of conditional jumps. This trick give the
* completely remove the need of conditional jumps. This trick give the
* major speed improvement.
* Also, using the 8 bytes MMX registers more than one pixel are computed
* at the same time.
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/Scalers/scalebit.cpp
Expand Up @@ -16,7 +16,7 @@

/*
* This file contains an example implementation of the Scale effect
* applyed to a generic bitmap.
* applied to a generic bitmap.
*
* You can find an high level description of the effect at :
*
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/Scalers/scalebit.h
Expand Up @@ -16,7 +16,7 @@

/*
* This file contains an example implementation of the Scale effect
* applyed to a generic bitmap.
* applied to a generic bitmap.
*
* You can find an high level description of the effect at :
*
Expand Down
22 changes: 11 additions & 11 deletions src/Engine/Scalers/xbrz.cpp
Expand Up @@ -321,7 +321,7 @@ double distHSL(uint32_t pix1, uint32_t pix2, double lightningWeight)
double l2 = 0;
rgbtoHsl(pix2, h2, s2, l2);
//HSL is in cylindric coordinatates where L represents height, S radius, H angle,
//HSL is in cylindric coordinates where L represents height, S radius, H angle,
//however we interpret the cylinder as a bi-conic solid with top/bottom radius 0, middle radius 1
assert(0 <= h1 && h1 <= 1);
assert(0 <= h2 && h2 <= 1);
Expand Down Expand Up @@ -379,7 +379,7 @@ double distYCbCr(uint32_t pix1, uint32_t pix2, double lumaWeight)
//YCbCr conversion is a matrix multiplication => take advantage of linearity by subtracting first!
const int r_diff = static_cast<int>(getRed (pix1)) - getRed (pix2); //we may delay division by 255 to after matrix multiplication
const int g_diff = static_cast<int>(getGreen(pix1)) - getGreen(pix2); //
const int b_diff = static_cast<int>(getBlue (pix1)) - getBlue (pix2); //substraction for int is noticeable faster than for double!
const int b_diff = static_cast<int>(getBlue (pix1)) - getBlue (pix2); //subtraction for int is noticeable faster than for double!

const double k_b = 0.0722; //ITU-R BT.709 conversion
const double k_r = 0.2126; //
Expand Down Expand Up @@ -484,7 +484,7 @@ input kernel area naming convention:
-----------------
| A | B | C | D |
----|---|---|---|
| E | F | G | H | //evalute the four corners between F, G, J, K
| E | F | G | H | //evaluate the four corners between F, G, J, K
----|---|---|---| //input pixel is at position F
| I | J | K | L |
----|---|---|---|
Expand Down Expand Up @@ -710,7 +710,7 @@ void scaleImage(const uint32_t* src, uint32_t* trg, int srcWidth, int srcHeight,
const int x_p1 = std::min(x + 1, srcWidth - 1);
const int x_p2 = std::min(x + 2, srcWidth - 1);

Kernel_4x4 ker = {}; //perf: initialization is negligable
Kernel_4x4 ker = {}; //perf: initialization is negligible
ker.a = s_m1[x_m1]; //read sequentially from memory as far as possible
ker.b = s_m1[x];
ker.c = s_m1[x_p1];
Expand All @@ -735,7 +735,7 @@ void scaleImage(const uint32_t* src, uint32_t* trg, int srcWidth, int srcHeight,
/*
preprocessing blend result:
---------
| F | G | //evalute corner between F, G, J, K
| F | G | //evaluate corner between F, G, J, K
----|---| //input pixel is at position F
| J | K |
---------
Expand Down Expand Up @@ -772,7 +772,7 @@ void scaleImage(const uint32_t* src, uint32_t* trg, int srcWidth, int srcHeight,
//evaluate the four corners on bottom-right of current pixel
unsigned char blend_xy = 0; //for current (x, y) position
{
Kernel_4x4 ker = {}; //perf: initialization is negligable
Kernel_4x4 ker = {}; //perf: initialization is negligible
ker.a = s_m1[x_m1]; //read sequentially from memory as far as possible
ker.b = s_m1[x];
ker.c = s_m1[x_p1];
Expand All @@ -797,7 +797,7 @@ void scaleImage(const uint32_t* src, uint32_t* trg, int srcWidth, int srcHeight,
/*
preprocessing blend result:
---------
| F | G | //evalute corner between F, G, J, K
| F | G | //evaluate corner between F, G, J, K
----|---| //current input pixel is at position F
| J | K |
---------
Expand All @@ -816,12 +816,12 @@ void scaleImage(const uint32_t* src, uint32_t* trg, int srcWidth, int srcHeight,
}

//fill block of size scale * scale with the given color
fillBlock(out, trgWidth * sizeof(uint32_t), s_0[x], Scaler::scale); //place *after* preprocessing step, to not overwrite the results while processing the the last pixel!
fillBlock(out, trgWidth * sizeof(uint32_t), s_0[x], Scaler::scale); //place *after* preprocessing step, to not overwrite the results while processing the last pixel!

//blend four corners of current pixel
if (blendingNeeded(blend_xy)) //good 20% perf-improvement
{
Kernel_3x3 ker = {}; //perf: initialization is negligable
Kernel_3x3 ker = {}; //perf: initialization is negligible

ker.a = s_m1[x_m1]; //read sequentially from memory as far as possible
ker.b = s_m1[x];
Expand Down Expand Up @@ -933,7 +933,7 @@ struct Scaler3x
{
//model a round corner
alphaBlend<45, 100>(out.template ref<2, 2>(), col); //exact: 0.4545939598
//alphaBlend<14, 1000>(out.template ref<2, 1>(), col); //0.01413008627 -> negligable
//alphaBlend<14, 1000>(out.template ref<2, 1>(), col); //0.01413008627 -> negligible
//alphaBlend<14, 1000>(out.template ref<1, 2>(), col); //0.01413008627
}
};
Expand Down Expand Up @@ -1077,7 +1077,7 @@ struct Scaler5x
alphaBlend<86, 100>(out.template ref<4, 4>(), col); //exact: 0.8631434088
alphaBlend<23, 100>(out.template ref<4, 3>(), col); //0.2306749731
alphaBlend<23, 100>(out.template ref<3, 4>(), col); //0.2306749731
//alphaBlend<8, 1000>(out.template ref<4, 2>(), col); //0.008384061834 -> negligable
//alphaBlend<8, 1000>(out.template ref<4, 2>(), col); //0.008384061834 -> negligible
//alphaBlend<8, 1000>(out.template ref<2, 4>(), col); //0.008384061834
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/Screen.cpp
Expand Up @@ -233,7 +233,7 @@ void Screen::setPalette(SDL_Color* colors, int firstcolor, int ncolors, bool imm
{
if (_numColors && (_numColors != ncolors) && (_firstColor != firstcolor))
{
// an initial palette setup has not been comitted to the screen yet
// an initial palette setup has not been committed to the screen yet
// just update it with whatever colors are being sent now
memmove(&(deferredPalette[firstcolor]), colors, sizeof(SDL_Color)*ncolors);
_numColors = 256; // all the use cases are just a full palette with 16-color follow-ups
Expand Down

0 comments on commit e95bb31

Please sign in to comment.