Skip to content

Commit 080be60

Browse files
Finished correction orthograph in src/ directory.
1 parent 8e8266b commit 080be60

File tree

120 files changed

+1307
-1307
lines changed

Some content is hidden

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

120 files changed

+1307
-1307
lines changed

src/BasePlayer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ Uint32 BasePlayer::checkSum()
120120
//Uint32 netHost=SDL_SwapBE32(ip.host);
121121
//Uint32 netPort=(Uint32)SDL_SwapBE16(ip.port);
122122
//cs^=netHost;
123-
// IP adress can't stay in checksum, because:
124-
// We now support NAT or IP may simply be differents between computers
123+
// IP address can't stay in checksum, because:
124+
// We now support NAT or IP may simply be different between computers
125125
// And we uses checkSum in network.
126-
// (we could uses two differents check sums, but the framework would be heavier)
126+
// (we could uses two different check sums, but the framework would be heavier)
127127
//cs^=netPort;
128128

129129
for (unsigned i=0; i<name.size(); i++)

src/Brush.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,21 @@ void BrushTool::handleClick(int x, int y)
7070

7171

7272

73-
void BrushTool::drawBrush(int x, int y, int viewportX, int viewportY, int originalX, int originalY, bool onlines)
73+
void BrushTool::drawBrush(int x, int y, int viewportX, int viewportY, int originalX, int originalY, bool onLines)
7474
{
7575
/* We use 2/3 intensity to indicate removing areas. This was
7676
formerly 78% intensity, which was bright enough that it was hard
7777
to notice any difference, so the brightness has been lowered. */
7878
int i = ((mode == MODE_ADD) ? 255 : 170);
79-
drawBrush(x, y, Color(i,i,i), viewportX, viewportY, originalX, originalY, onlines);
79+
drawBrush(x, y, Color(i,i,i), viewportX, viewportY, originalX, originalY, onLines);
8080
}
8181

82-
void BrushTool::drawBrush(int x, int y, GAGCore::Color c, int viewportX, int viewportY, int originalX, int originalY, bool onlines)
82+
void BrushTool::drawBrush(int x, int y, GAGCore::Color c, int viewportX, int viewportY, int originalX, int originalY, bool onLines)
8383
{
8484
/* It violates good abstraction practices that Brush.cpp knows
8585
this much about the visual layout of the GUI. */
86-
x = ((x+(onlines ? 16 : 0)) & ~0x1f) + (!onlines ? 16 : 0);
87-
y = ((y+(onlines ? 16 : 0)) & ~0x1f) + (!onlines ? 16 : 0);
86+
x = ((x+(onLines ? 16 : 0)) & ~0x1f) + (!onLines ? 16 : 0);
87+
y = ((y+(onLines ? 16 : 0)) & ~0x1f) + (!onLines ? 16 : 0);
8888
int w = getBrushWidth(figure);
8989
int h = getBrushHeight(figure);
9090
/* Move x and y from center of focus point to upper left of
@@ -96,18 +96,18 @@ void BrushTool::drawBrush(int x, int y, GAGCore::Color c, int viewportX, int vie
9696

9797
if(originalX == -1)
9898
originalX = viewportX + (x / cell_size);
99-
else if(onlines)
99+
else if(onLines)
100100
originalX+=1;
101101
if(originalY == -1)
102102
originalY = viewportY + (y / cell_size);
103-
else if(onlines)
103+
else if(onLines)
104104
originalY+=1;
105105

106106
for (int cx = 0; cx < w; cx++)
107107
{
108108
for (int cy = 0; cy < h; cy++)
109109
{
110-
// TODO: the brush is wrong, but without lookuping viewport in game gui, there is no way to know this
110+
// TODO: the brush is wrong, but without looking up viewport in game gui, there is no way to know this
111111
if (getBrushValue(figure, cx, cy, viewportX + (x / cell_size), viewportY + (y / cell_size), originalX, originalY))
112112
{
113113
globalContainer->gfx->drawRect(x + (cell_size * cx) + inset, y + (cell_size * cy) + inset, cell_size - inset, cell_size - inset, c);

src/Brush.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ class BrushTool
7171
void defaultSelection(void) { mode = MODE_ADD; }
7272

7373
//! Draw the actual brush (not the brush tool)
74-
void drawBrush(int x, int y, int viewportX, int viewportY, int originalX=-1, int originalY=-1, bool onlines=false);
75-
void drawBrush(int x, int y, GAGCore::Color c, int viewportX, int viewportY, int originalX=-1, int originalY=-1, bool onlines=false);
74+
void drawBrush(int x, int y, int viewportX, int viewportY, int originalX=-1, int originalY=-1, bool onLines=false);
75+
void drawBrush(int x, int y, GAGCore::Color c, int viewportX, int viewportY, int originalX=-1, int originalY=-1, bool onLines=false);
7676
//! Return the mode of the brush
7777
unsigned getType(void) { return static_cast<unsigned>(mode); }
7878
//! Set the mode of the brush

src/BuildingType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void BuildingType::loadFromConfigFile(const ConfigBlock *configBlock)
172172
}
173173
}
174174

175-
//! Return a chcksum of all parameter that could lead to a game desynchronization
175+
//! Return a checksum of all parameter that could lead to a game desynchronization
176176
Uint32 BuildingType::checkSum(void)
177177
{
178178
Uint32 cs = 0;

src/BuildingType.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_TYPE_H
21-
#define __BULDING_TYPE_H
20+
#ifndef __BUILDING_TYPE_H
21+
#define __BUILDING_TYPE_H
2222

2323
#include <vector>
2424

src/CampaignEditor.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,31 +71,31 @@ void CampaignEditor::onAction(Widget *source, Action action, int par1, int par2)
7171
else if (source == addMap)
7272
{
7373
ChooseMapScreen cms("campaigns", "map", false);
74-
int rcms=cms.execute(gfx, 40);
75-
if(rcms==ChooseMapScreen::OK)
74+
int rCms=cms.execute(gfx, 40);
75+
if(rCms==ChooseMapScreen::OK)
7676
{
7777
MapHeader& mapHeader = cms.getMapHeader();
7878
CampaignMapEntry cme(mapHeader.getMapName(), glob2NameToFilename("campaigns", mapHeader.getMapName(), "map"));
79-
CampaignMapEntryEditor cmee(campaign, cme);
80-
int rcmee = cmee.execute(gfx, 40);
81-
if(rcmee==CampaignMapEntryEditor::OK)
79+
CampaignMapEntryEditor mee(campaign, cme);
80+
int rMee = mee.execute(gfx, 40);
81+
if(rMee==CampaignMapEntryEditor::OK)
8282
{
8383
campaign.appendMap(cme);
8484
mapList->addText(mapHeader.getMapName());
8585
}
86-
else if(rcmee==CampaignMapEntryEditor::CANCEL)
86+
else if(rMee==CampaignMapEntryEditor::CANCEL)
8787
{
8888

8989
}
90-
else if(rcmee == -1)
90+
else if(rMee == -1)
9191
{
9292
endExecute(-1);
9393
}
9494
}
95-
else if(rcms==ChooseMapScreen::CANCEL)
95+
else if(rCms==ChooseMapScreen::CANCEL)
9696
{
9797
}
98-
else if(rcms==-1)
98+
else if(rCms==-1)
9999
{
100100
endExecute(-1);
101101
}
@@ -106,13 +106,13 @@ void CampaignEditor::onAction(Widget *source, Action action, int par1, int par2)
106106
{
107107
if(mapList->getSelectionIndex()!=-1 && campaign.getMap(i).getMapName()==mapList->get())
108108
{
109-
CampaignMapEntryEditor cmee(campaign, campaign.getMap(i));
110-
int rcmee = cmee.execute(gfx, 40);
111-
if(rcmee==CampaignMapEntryEditor::OK)
109+
CampaignMapEntryEditor mee(campaign, campaign.getMap(i));
110+
int rMee = mee.execute(gfx, 40);
111+
if(rMee==CampaignMapEntryEditor::OK)
112112
{
113113
mapList->setText(mapList->getSelectionIndex(), campaign.getMap(i).getMapName());
114114
}
115-
else if(rcmee==CampaignMapEntryEditor::CANCEL)
115+
else if(rMee==CampaignMapEntryEditor::CANCEL)
116116
{
117117
}
118118
}

src/CreditScreen.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ using namespace GAGCore;
3535
// New class for an auto-scrolling credit screen.
3636

3737
// INCLUDE part
38-
// #ifndef __SCROLLINGTEXT_H
39-
// #define __SCROLLINGTEXT_H
38+
// #ifndef __SCROLLING_TEXT_H
39+
// #define __SCROLLING_TEXT_H
4040
//
4141
// #include "GUIBase.h"
4242
// #include <string>
@@ -47,9 +47,9 @@ class ScrollingText:public RectangularWidget
4747
std::string filename;
4848
std::string font;
4949
std::vector<std::string> text;
50-
std::vector<int> xPos; // Pre-calculated postions for text centering
50+
std::vector<int> xPos; // Pre-calculated positions for text centering
5151
int offset;
52-
int imgid, imgid0;
52+
int imgId, imgId0;
5353

5454
// cache, recomputed on internalInit
5555
GAGCore::Font *fontPtr;
@@ -79,8 +79,8 @@ ScrollingText::ScrollingText(int x, int y, int w, int h, Uint32 hAlign, Uint32 v
7979
this->vAlignFlag = vAlign;
8080

8181
offset = 0;
82-
imgid = 0;
83-
imgid0 = 88;
82+
imgId = 0;
83+
imgId0 = 88;
8484

8585
assert(font.size());
8686
assert(filename.size());
@@ -112,7 +112,7 @@ void ScrollingText::internalInit(void)
112112
getScreenPos(&x, &y, &w, &h);
113113
offset = -h + 25;
114114

115-
// Measures all the length of all the lines of the file (usefull for centering)
115+
// Measures all the length of all the lines of the file (useful for centering)
116116
for (size_t i = 0; i < text.size(); i++)
117117
{
118118
std::string &s = text[i];
@@ -124,7 +124,7 @@ void ScrollingText::internalInit(void)
124124
// If we can find a "<" and a ">" in this line
125125
if ((f != std::string::npos) && (l != std::string::npos))
126126
{
127-
// Rips off the e-mail adresses
127+
// Rips off the e-mail addresses
128128
s.erase(f, l-f+1);
129129
}
130130
}
@@ -141,7 +141,7 @@ void ScrollingText::paint()
141141
assert(parent->getSurface());
142142

143143
int yPos = y;
144-
imgid = imgid0 + (offset & 0x7);
144+
imgId = imgId0 + (offset & 0x7);
145145

146146
for (size_t i = 0; i < text.size(); i++)
147147
{
@@ -159,9 +159,9 @@ void ScrollingText::paint()
159159

160160
Sprite *unitSprite=globalContainer->units;
161161
unitSprite->setBaseColor(128, 128, 128);
162-
int decX = (unitSprite->getW(imgid)-32)>>1;
163-
int decY = (unitSprite->getH(imgid)-32)>>1;
164-
globalContainer->gfx->drawSprite(px-decX, py-decY, unitSprite, imgid);
162+
int decX = (unitSprite->getW(imgId)-32)>>1;
163+
int decY = (unitSprite->getH(imgId)-32)>>1;
164+
globalContainer->gfx->drawSprite(px-decX, py-decY, unitSprite, imgId);
165165

166166
yPos += 20;
167167
}

src/CustomGameOtherOptions.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ CustomGameOtherOptions::CustomGameOtherOptions(GameHeader& gameHeader, MapHeader
7777
addWidget(allyTeamNumbers[i]);
7878
}
7979

80-
teamsFixed = new OnOffButton(300, 60, 21, 21, ALIGN_SCREEN_CENTERED, ALIGN_SCREEN_CENTERED, gameHeader.areAllyTeamsFixed(), TEAMSFIXED);
80+
teamsFixed = new OnOffButton(300, 60, 21, 21, ALIGN_SCREEN_CENTERED, ALIGN_SCREEN_CENTERED, gameHeader.areAllyTeamsFixed(), TEAMS_FIXED);
8181
addWidget(teamsFixed);
8282
teamsFixedText = new Text(325, 60, ALIGN_SCREEN_CENTERED, ALIGN_SCREEN_CENTERED, "standard", Toolkit::getStringTable()->getString("[Teams Fixed]"));
8383
addWidget(teamsFixedText);
8484
if(readOnly)
8585
teamsFixed->setClickable(false);
8686

8787
//These are for winning conditions
88-
prestigeWinEnabled = new OnOffButton(300, 90, 21, 21, ALIGN_SCREEN_CENTERED, ALIGN_SCREEN_CENTERED, true, PRESTIGEWINENABLED);
88+
prestigeWinEnabled = new OnOffButton(300, 90, 21, 21, ALIGN_SCREEN_CENTERED, ALIGN_SCREEN_CENTERED, true, PRESTIGE_WIN_ENABLED);
8989
addWidget(prestigeWinEnabled);
9090
prestigeWinEnabledText = new Text(325, 90, ALIGN_SCREEN_CENTERED, ALIGN_SCREEN_CENTERED, "standard", Toolkit::getStringTable()->getString("[Prestige Win Enabled]"));
9191
addWidget(prestigeWinEnabledText);
@@ -94,7 +94,7 @@ CustomGameOtherOptions::CustomGameOtherOptions(GameHeader& gameHeader, MapHeader
9494
prestigeWinEnabled->setClickable(false);
9595

9696
//Map discovered.
97-
mapDiscovered = new OnOffButton(300, 120, 21, 21, ALIGN_SCREEN_CENTERED, ALIGN_SCREEN_CENTERED, gameHeader.isMapDiscovered(), MAPDISCOVERED);
97+
mapDiscovered = new OnOffButton(300, 120, 21, 21, ALIGN_SCREEN_CENTERED, ALIGN_SCREEN_CENTERED, gameHeader.isMapDiscovered(), MAP_DISCOVERED);
9898
addWidget(mapDiscovered);
9999
mapDiscoveredText = new Text(325, 120, ALIGN_SCREEN_CENTERED, ALIGN_SCREEN_CENTERED, "standard", Toolkit::getStringTable()->getString("[Map Discovered]"));
100100
addWidget(mapDiscoveredText);
@@ -152,15 +152,15 @@ void CustomGameOtherOptions::onAction(Widget *source, Action action, int par1, i
152152
}
153153
gameHeader.setAllyTeamNumber(team, n);
154154
}
155-
else if(par1 == TEAMSFIXED)
155+
else if(par1 == TEAMS_FIXED)
156156
{
157157
gameHeader.setAllyTeamsFixed(teamsFixed->getState());
158158
}
159-
else if(par1 == PRESTIGEWINENABLED)
159+
else if(par1 == PRESTIGE_WIN_ENABLED)
160160
{
161161
updateGameHeaderWinningConditions();
162162
}
163-
else if(par1 == MAPDISCOVERED)
163+
else if(par1 == MAP_DISCOVERED)
164164
{
165165
gameHeader.setMapDiscovered(mapDiscovered->getState());
166166
}

src/CustomGameOtherOptions.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class CustomGameOtherOptions : public Glob2Screen
4747
CustomGameOtherOptions(GameHeader& gameHeader, MapHeader& mapHeader, bool readOnly);
4848
/// Destructor
4949
virtual ~CustomGameOtherOptions();
50-
///Recieves an action from a widget
50+
///Receives an action from a widget
5151
virtual void onAction(Widget *source, Action action, int par1, int par2);
5252

5353
///These are the end values for this screen
@@ -62,9 +62,9 @@ class CustomGameOtherOptions : public Glob2Screen
6262
{
6363
OK,
6464
CANCEL,
65-
TEAMSFIXED,
66-
PRESTIGEWINENABLED,
67-
MAPDISCOVERED,
65+
TEAMS_FIXED,
66+
PRESTIGE_WIN_ENABLED,
67+
MAP_DISCOVERED,
6868
};
6969

7070
///"Other Options" Title
@@ -78,7 +78,7 @@ class CustomGameOtherOptions : public Glob2Screen
7878
Text ** playerNames;
7979
//! Player colors
8080
ColorButton ** color;
81-
//! Player ally temas
81+
//! Player ally teams
8282
MultiTextButton ** allyTeamNumbers;
8383

8484
///Button fixing teams during the match

src/CustomGameScreen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class MapPreview;
3939

4040
const int NumberOfPlayerSelectors=12;
4141

42-
//! This screen is used to setup a custom game. AI can be set. Map choosing functionnalities are inherited from ChooseMapScreen
42+
//! This screen is used to setup a custom game. AI can be set. Map choosing functionalities are inherited from ChooseMapScreen
4343
class CustomGameScreen : public ChooseMapScreen
4444
{
4545

0 commit comments

Comments
 (0)