Skip to content

Commit 6569c18

Browse files
Correct orthograph of more classes.
1 parent e3e9bea commit 6569c18

File tree

109 files changed

+1217
-1217
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+1217
-1217
lines changed

libgag/include/SDLGraphicContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ namespace GAGCore
328328
std::string appIcon;
329329

330330
public:
331-
//! Constructor. Create a new window of size (w,h). If useGPU is true, use GPU for accelerated 2D (OpenGL or DX)
331+
//! Constructor. Create a new window of size (w,h). If useGpu is true, use GPU for accelerated 2D (OpenGL or DX)
332332
GraphicContext(int w, int h, Uint32 flags, const std::string title = "", const std::string icon = "");
333333
//! Destructor
334334
virtual ~GraphicContext(void);

src/BasePlayer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ BasePlayer::BasePlayer()
3030
init();
3131
};
3232

33-
BasePlayer::BasePlayer(Sint32 number, const std::string& nname, Sint32 teamNumber, PlayerType type)
33+
BasePlayer::BasePlayer(Sint32 number, const std::string& name, Sint32 teamNumber, PlayerType type)
3434
{
3535
init();
3636

3737
assert(number>=0);
3838
assert(number<Team::MAX_COUNT);
3939
assert(teamNumber>=0);
4040
assert(teamNumber<Team::MAX_COUNT);
41-
assert(nname.size());
41+
assert(name.size());
4242

4343
setNumber(number);
4444
setTeamNumber(teamNumber);
4545

46-
name=nname;
46+
this->name=name;
4747

4848
this->type=type;
4949
};

src/BasePlayer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ class BasePlayer
5151
P_AI=5
5252
};
5353
//TODO: Explain
54-
static AI::ImplementationID implementitionIdFromPlayerType(PlayerType type)
54+
static AI::ImplementationID implementationIdFromPlayerType(PlayerType type)
5555
{
5656
assert(type>=P_AI);
5757
return (AI::ImplementationID)((int)type-(int)P_AI);
5858
}
5959
//TODO: Explain
60-
static PlayerType playerTypeFromImplementitionID(AI::ImplementationID iid)
60+
static PlayerType playerTypeFromImplementationID(AI::ImplementationID iid)
6161
{
6262
return (PlayerType)((int)iid+(int)P_AI);
6363
}
@@ -93,10 +93,10 @@ class BasePlayer
9393
/**
9494
\param number
9595
\param name
96-
\param teamn
96+
\param teamNumber
9797
\param type
9898
*/
99-
BasePlayer(Sint32 number, const std::string& name, Sint32 teamn, PlayerType type);
99+
BasePlayer(Sint32 number, const std::string& name, Sint32 teamNumber, PlayerType type);
100100
//TODO: Explain
101101
void init();
102102
virtual ~BasePlayer(void);

src/BaseTeam.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ BaseTeam::BaseTeam()
4141

4242
bool BaseTeam::load(GAGCore::InputStream *stream, Sint32 versionMinor)
4343
{
44-
// loading baseteam
44+
// loading base team
4545
stream->readEnterSection("BaseTeam");
4646
type = (TeamType)stream->readUint32("type");
4747
teamNumber = stream->readSint32("teamNumber");
@@ -66,7 +66,7 @@ bool BaseTeam::load(GAGCore::InputStream *stream, Sint32 versionMinor)
6666

6767
void BaseTeam::save(GAGCore::OutputStream *stream) const
6868
{
69-
// saving baseteam
69+
// saving base team
7070
stream->writeEnterSection("BaseTeam");
7171
stream->writeUint32((Uint32)type, "type");
7272
stream->writeSint32(teamNumber, "teamNumber");

src/BaseTeam.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class BaseTeam
4545

4646
TeamType type;
4747
Sint32 teamNumber; // index of the current team in the game::teams[] array.
48-
Sint32 numberOfPlayer; // number of controling players
48+
Sint32 numberOfPlayer; // number of controlling players
4949
GAGCore::Color color;
5050
Uint32 playersMask;
5151

src/BitArray.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1818
*/
1919

20-
#ifndef __BITARRAY_H
21-
#define __BITARRAY_H
20+
#ifndef __BIT_ARRAY_H
21+
#define __BIT_ARRAY_H
2222

2323
#include <valarray>
2424

src/Building.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ void Building::saveCrossRef(GAGCore::OutputStream *stream)
507507
stream->writeSint32(maxUnitInside, "maxUnitInside");
508508
//TODO: std::list::size() is O(n). We should investigate
509509
//if our intense use of this has an impact on overall performance.
510-
//steph and nuage suggested to store and update size in a variable
510+
//Stephane and nuage suggested to store and update size in a variable
511511
//what is faster but also more error prone.
512512
stream->writeUint32(unitsWorking.size(), "nbWorking");
513513
fprintf(logFile, " nbWorking=%zd\n", unitsWorking.size());
@@ -2058,7 +2058,7 @@ void Building::turretStep(Uint32 stepCounter)
20582058
resources[STONE]--;
20592059
bullets += type->multiplierStoneToBullets;
20602060

2061-
// we need to be stone-feeded
2061+
// we need to be stone-fed
20622062
updateCallLists();
20632063
}
20642064

@@ -2085,16 +2085,16 @@ void Building::turretStep(Uint32 stepCounter)
20852085
assert(map);
20862086

20872087
// the type of target we have found
2088-
enum TargetType
2088+
enum class TargetType
20892089
{
2090-
TARGETTYPE_NONE,
2091-
TARGETTYPE_BUILDING,
2092-
TARGETTYPE_WORKER,
2093-
TARGETTYPE_WARRIOR,
2094-
TARGETTYPE_EXPLORER,
2090+
NONE,
2091+
BUILDING,
2092+
WORKER,
2093+
WARRIOR,
2094+
EXPLORER,
20952095
};
20962096
// The type of the best target we have found up to now
2097-
TargetType targetFound = TARGETTYPE_NONE;
2097+
TargetType targetFound = TargetType::NONE;
20982098
// The score of the best target we have found up to now
20992099
int bestScore = INT_MIN;
21002100
// The number of ticks before the unit may move away
@@ -2192,10 +2192,10 @@ void Building::turretStep(Uint32 stepCounter)
21922192
bestTicks = targetTicks;
21932193
bestTargetX = targetX;
21942194
bestTargetY = targetY;
2195-
targetFound = TARGETTYPE_WARRIOR;
2195+
targetFound = TargetType::WARRIOR;
21962196
}
21972197
}
2198-
else if ((targetFound != TARGETTYPE_WARRIOR) && (testUnit->typeNum == WORKER))
2198+
else if ((targetFound != TargetType::WARRIOR) && (testUnit->typeNum == WORKER))
21992199
{
22002200
// adjust score for range
22012201
int targetScore = - testUnit->hp;
@@ -2206,7 +2206,7 @@ void Building::turretStep(Uint32 stepCounter)
22062206
bestTicks = targetTicks;
22072207
bestTargetX = targetX;
22082208
bestTargetY = targetY;
2209-
targetFound = TARGETTYPE_WORKER;
2209+
targetFound = TargetType::WORKER;
22102210
}
22112211
}
22122212
}
@@ -2238,14 +2238,14 @@ void Building::turretStep(Uint32 stepCounter)
22382238
bestTicks = targetTicks;
22392239
bestTargetX = targetX;
22402240
bestTargetY = targetY;
2241-
targetFound = TARGETTYPE_EXPLORER;
2241+
targetFound = TargetType::EXPLORER;
22422242
}
22432243
}
22442244
}
22452245
}
22462246

22472247
// shoot building only if no unit is found
2248-
if (targetFound == TARGETTYPE_NONE)
2248+
if (targetFound == TargetType::NONE)
22492249
{
22502250
Uint16 targetGBID = map->getBuilding(targetX, targetY);
22512251
if (targetGBID != NOGBID)
@@ -2263,18 +2263,18 @@ void Building::turretStep(Uint32 stepCounter)
22632263
bestTicks = 256;
22642264
bestTargetX = targetX;
22652265
bestTargetY = targetY;
2266-
targetFound = TARGETTYPE_BUILDING;
2266+
targetFound = TargetType::BUILDING;
22672267
}
22682268
}
22692269
}
22702270
}
22712271
}
22722272
}
2273-
if (targetFound == TARGETTYPE_EXPLORER)
2273+
if (targetFound == TargetType::EXPLORER)
22742274
break;//specifying explorers as high priority
22752275
}
22762276

2277-
if (targetFound != TARGETTYPE_NONE)
2277+
if (targetFound != TargetType::NONE)
22782278
{
22792279
shootingStep = 0;
22802280

src/BuildingsTypes.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ void BuildingsTypes::checkIntegrity(void)
4242
assert(bt);
4343

4444
//Need resource integrity:
45-
bool needRessource=false;
45+
bool needResource=false;
4646
for (unsigned j=0; j<MAX_RESOURCES; j++)
4747
if (bt->maxResource[j])
4848
{
49-
needRessource=true;
49+
needResource=true;
5050
break;
5151
}
52-
if (needRessource)
52+
if (needResource)
5353
assert(bt->fillable || bt->foodable);
5454

5555
//hpInc integrity:

src/BuildingsTypes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1818
*/
1919

20-
#ifndef __BULDING_TYPES_H
21-
#define __BULDING_TYPES_H
20+
#ifndef __BUILDING_TYPES_H
21+
#define __BUILDING_TYPES_H
2222

2323
#include "BuildingType.h"
2424

src/Campaign.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ bool CampaignMapEntry::isCompleted()
100100

101101

102102

103-
void CampaignMapEntry::setCompleted(bool ncompleted)
103+
void CampaignMapEntry::setCompleted(bool completed)
104104
{
105-
completed = ncompleted;
105+
this->completed = completed;
106106
}
107107

108108

@@ -114,9 +114,9 @@ const std::string& CampaignMapEntry::getDescription() const
114114

115115

116116

117-
void CampaignMapEntry::setDescription(const std::string& ndescription)
117+
void CampaignMapEntry::setDescription(const std::string& description)
118118
{
119-
description=ndescription;
119+
this->description=description;
120120
}
121121

122122

@@ -321,9 +321,9 @@ const std::string& Campaign::getPlayerName() const
321321
}
322322

323323

324-
void Campaign::setDescription(const std::string& ndescription)
324+
void Campaign::setDescription(const std::string& description)
325325
{
326-
description = ndescription;
326+
this->description = description;
327327
}
328328

329329

0 commit comments

Comments
 (0)