Skip to content

Commit ca36bc2

Browse files
committed
Qualify all the things
1 parent f826f93 commit ca36bc2

28 files changed

+373
-383
lines changed

GUILibrary/GUILibrary.cpp

Lines changed: 0 additions & 10 deletions
This file was deleted.

GUILibrary/Source/GUI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void SetRect(GUIRect *pRect, int left, int top, int right, int bottom);
2020

2121
//#include "RTETools.h"
2222

23-
#include "Interface.h"
23+
#include "GUIInterface.h"
2424
#include "GUIProperties.h"
2525
#include "GUIInput.h"
2626
#include "GUIFont.h"

GUILibrary/Source/GUIBanner.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
namespace RTE {
1818

19-
map<string, GUIBanner::FontChar *> GUIBanner::m_sFontCache;
20-
map<string, int> GUIBanner::m_sCharCapCache;
19+
std::map<std::string, GUIBanner::FontChar *> GUIBanner::m_sFontCache;
20+
std::map<std::string, int> GUIBanner::m_sCharCapCache;
2121

2222

2323
//////////////////////////////////////////////////////////////////////////////////////////
@@ -59,12 +59,12 @@ GUIBanner::GUIBanner()
5959
bool GUIBanner::Create(const std::string fontFilePath, const std::string fontBlurFilePath, int bitDepth)
6060
{
6161
// Package the font bitmap paths o they are more easily processed below
62-
string filePaths[2] = {fontFilePath, fontBlurFilePath};
62+
std::string filePaths[2] = {fontFilePath, fontBlurFilePath};
6363

6464
// Now process them and extract the character data from each
6565
ContentFile fontFile;
66-
map<string, FontChar *>::iterator fontItr;
67-
map<string, int>::iterator indexItr;
66+
std::map<std::string, FontChar *>::iterator fontItr;
67+
std::map<std::string, int>::iterator indexItr;
6868
int y, dotColor;
6969
for (int mode = REGULAR; mode < FONTMODECOUNT; ++mode)
7070
{
@@ -182,14 +182,14 @@ bool GUIBanner::Create(const std::string fontFilePath, const std::string fontBlu
182182

183183
// Add the calculated charIndexcap to the cache so we can use it in other banner instances
184184
// that use the same font bitmap files.
185-
m_sCharCapCache.insert(pair<string, int>(filePaths[mode], m_CharIndexCap));
185+
m_sCharCapCache.insert(std::pair<std::string, int>(filePaths[mode], m_CharIndexCap));
186186
// Also add the now calculated font char data to the cache
187187
// Allocate a dynamic array to throw into the map.. probably until app close
188188
FontChar *aNewCache = new FontChar[MAXBANNERFONTCHARS];
189189
// Copy the font data into the cache
190190
memcpy(aNewCache, m_aaFontChars[mode], sizeof(FontChar) * MAXBANNERFONTCHARS);
191191
// Now put it into the cache map
192-
m_sFontCache.insert(pair<string, FontChar *>(filePaths[mode], aNewCache));
192+
m_sFontCache.insert(std::pair<std::string, FontChar *>(filePaths[mode], aNewCache));
193193
}
194194

195195
return true;
@@ -228,7 +228,7 @@ int GUIBanner::SpaceBetween(const FlyingChar &first, FontMode firstMode, const F
228228
//////////////////////////////////////////////////////////////////////////////////////////
229229
// Description: Starts the display animation of a text string in this banner's font.
230230

231-
void GUIBanner::ShowText(const string text, AnimMode mode, long duration, Vector targetSize, float yOnTarget, int flySpeed, int flySpacing)
231+
void GUIBanner::ShowText(const std::string text, AnimMode mode, long duration, Vector targetSize, float yOnTarget, int flySpeed, int flySpacing)
232232
{
233233
m_BannerText = text;
234234
m_AnimMode = mode;
@@ -249,7 +249,7 @@ void GUIBanner::ShowText(const string text, AnimMode mode, long duration, Vector
249249
// The showing position for the first character
250250
int showPosX = (m_TargetSize.m_X / 2) - (CalculateWidth(text, REGULAR) / 2);
251251
int whichChar = 0;
252-
for (string::const_iterator tItr = text.begin(); tItr != text.end(); ++tItr)
252+
for (std::string::const_iterator tItr = text.begin(); tItr != text.end(); ++tItr)
253253
{
254254
whichChar++;
255255
// Create the flying character entry
@@ -323,8 +323,8 @@ void GUIBanner::Update()
323323
int flyDirection = m_AnimMode == FLYBYLEFTWARD ? -1 : 1;
324324
int whichChar = 0;
325325
// Go through every character, updating their positions and states
326-
list<FlyingChar>::iterator prevItr = m_BannerChars.end();
327-
for (list<FlyingChar>::iterator cItr = m_BannerChars.begin(); cItr != m_BannerChars.end(); ++cItr)
326+
std::list<FlyingChar>::iterator prevItr = m_BannerChars.end();
327+
for (std::list<FlyingChar>::iterator cItr = m_BannerChars.begin(); cItr != m_BannerChars.end(); ++cItr)
328328
{
329329
whichChar++;
330330
// Start off each character's motion at the appropriate order and timing
@@ -418,7 +418,7 @@ void GUIBanner::Draw(BITMAP *pTargetBitmap)
418418
// Go through every character in the banner, drawing the ones that are showing
419419
unsigned char c;
420420
int mode, charWidth, offX, offY;
421-
for (list<FlyingChar>::iterator cItr = m_BannerChars.begin(); cItr != m_BannerChars.end(); ++cItr)
421+
for (std::list<FlyingChar>::iterator cItr = m_BannerChars.begin(); cItr != m_BannerChars.end(); ++cItr)
422422
{
423423
// Only draw anything if the character is even visible
424424
if ((*cItr).m_MoveState >= SHOWING && (*cItr).m_MoveState <= HIDING)

GUILibrary/Source/GUIButton.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ void GUIButton::Create(const std::string Name, int X, int Y, int Width, int Heig
6464
m_Height = Height;
6565

6666
// Make sure the button isn't too small
67-
m_Width = MAX(m_Width, m_MinWidth);
68-
m_Height = MAX(m_Height, m_MinHeight);
67+
m_Width = std::max(m_Width, m_MinWidth);
68+
m_Height = std::max(m_Height, m_MinHeight);
6969
}
7070

7171

@@ -90,8 +90,8 @@ void GUIButton::Create(GUIProperties *Props)
9090
GUIPanel::LoadProperties(Props);
9191

9292
// Make sure the button isn't too small
93-
m_Width = MAX(m_Width, m_MinWidth);
94-
m_Height = MAX(m_Height, m_MinHeight);
93+
m_Width = std::max(m_Width, m_MinWidth);
94+
m_Height = std::max(m_Height, m_MinHeight);
9595

9696
// Load the values
9797
Props->GetValue("Text", &m_Text);
@@ -147,7 +147,7 @@ void GUIButton::BuildBitmap(void)
147147
m_DrawBitmap = m_Skin->CreateBitmap(m_Width, m_Height*3);
148148

149149
// Pre-cache the font
150-
string Filename;
150+
std::string Filename;
151151
m_Skin->GetValue("Button_Up", "Font", &Filename);
152152
m_Skin->GetValue("Button_Up", "FontColor", &m_FontColor);
153153
m_Skin->GetValue("Button_Up", "FontShadow", &m_FontShadow);
@@ -342,8 +342,8 @@ void GUIButton::Move(int X, int Y)
342342
void GUIButton::Resize(int Width, int Height)
343343
{
344344
// Make sure the button isn't too small
345-
Width = MAX(Width, m_MinWidth);
346-
Height = MAX(Height, m_MinHeight);
345+
Width = std::max(Width, m_MinWidth);
346+
Height = std::max(Height, m_MinHeight);
347347

348348
GUIPanel::SetSize(Width, Height);
349349

@@ -367,7 +367,7 @@ void GUIButton::StoreProperties(void)
367367
//////////////////////////////////////////////////////////////////////////////////////////
368368
// Description: Sets the text.
369369

370-
void GUIButton::SetText(const string Text)
370+
void GUIButton::SetText(const std::string Text)
371371
{
372372
m_Text = Text;
373373

@@ -380,7 +380,7 @@ void GUIButton::SetText(const string Text)
380380
//////////////////////////////////////////////////////////////////////////////////////////
381381
// Description: Gets the text.
382382

383-
string GUIButton::GetText(void)
383+
std::string GUIButton::GetText(void)
384384
{
385385
return m_Text;
386386
}

GUILibrary/Source/GUICheckbox.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ void GUICheckbox::Create(const std::string Name, int X, int Y, int Width, int He
6262
m_Height = Height;
6363

6464
// Make sure the button isn't too small
65-
m_Width = MAX(m_Width, m_MinWidth);
66-
m_Height = MAX(m_Height, m_MinHeight);
65+
m_Width = std::max(m_Width, m_MinWidth);
66+
m_Height = std::max(m_Height, m_MinHeight);
6767
}
6868

6969

@@ -88,17 +88,17 @@ void GUICheckbox::Create(GUIProperties *Props)
8888
GUIPanel::LoadProperties(Props);
8989

9090
// Make sure the button isn't too small
91-
m_Width = MAX(m_Width, m_MinWidth);
92-
m_Height = MAX(m_Height, m_MinHeight);
91+
m_Width = std::max(m_Width, m_MinWidth);
92+
m_Height = std::max(m_Height, m_MinHeight);
9393

9494

9595
// Grab the check value
9696
m_Check = Unchecked;
97-
string value;
97+
std::string value;
9898
Props->GetValue("Checked", &value);
99-
if (stricmp(value.c_str(), "Checked") == 0)
99+
if (_stricmp(value.c_str(), "Checked") == 0)
100100
m_Check = Checked;
101-
else if (stricmp(value.c_str(), "Greycheck") == 0)
101+
else if (_stricmp(value.c_str(), "Greycheck") == 0)
102102
m_Check = Greycheck;
103103

104104
Props->GetValue("Text", &m_Text);
@@ -136,7 +136,7 @@ void GUICheckbox::ChangeSkin(GUISkin *Skin)
136136

137137
void GUICheckbox::BuildBitmap(void)
138138
{
139-
string Filename;
139+
std::string Filename;
140140
unsigned long ColorIndex = 0;
141141
int Values[4];
142142

@@ -217,8 +217,8 @@ void GUICheckbox::Draw(GUIScreen *Screen)
217217
}
218218

219219
// Draw the text
220-
string Text;
221-
string space = " ";
220+
std::string Text;
221+
std::string space = " ";
222222
Text = space.append(m_Text);
223223

224224
if (m_Font) {
@@ -332,8 +332,8 @@ void GUICheckbox::Move(int X, int Y)
332332
void GUICheckbox::Resize(int Width, int Height)
333333
{
334334
// Make sure the control isn't too small
335-
Width = MAX(Width, m_MinWidth);
336-
Height = MAX(Height, m_MinHeight);
335+
Width = std::max(Width, m_MinWidth);
336+
Height = std::max(Height, m_MinHeight);
337337

338338
SetSize(Width, Height);
339339

@@ -375,7 +375,7 @@ void GUICheckbox::StoreProperties(void)
375375
//////////////////////////////////////////////////////////////////////////////////////////
376376
// Description: Sets the text.
377377

378-
void GUICheckbox::SetText(const string Text)
378+
void GUICheckbox::SetText(const std::string Text)
379379
{
380380
m_Text = Text;
381381
}
@@ -386,7 +386,7 @@ void GUICheckbox::SetText(const string Text)
386386
//////////////////////////////////////////////////////////////////////////////////////////
387387
// Description: Gets the text.
388388

389-
string GUICheckbox::GetText(void)
389+
std::string GUICheckbox::GetText(void)
390390
{
391391
return m_Text;
392392
}
@@ -424,11 +424,11 @@ void GUICheckbox::ApplyProperties(GUIProperties *Props)
424424
GUIControl::ApplyProperties(Props);
425425

426426
m_Check = Unchecked;
427-
string value;
427+
std::string value;
428428
m_Properties.GetValue("Checked", &value);
429-
if (stricmp(value.c_str(), "Checked") == 0)
429+
if (_stricmp(value.c_str(), "Checked") == 0)
430430
m_Check = Checked;
431-
else if (stricmp(value.c_str(), "Greycheck") == 0)
431+
else if (_stricmp(value.c_str(), "Greycheck") == 0)
432432
m_Check = Greycheck;
433433

434434
m_Properties.GetValue("Text", &m_Text);

GUILibrary/Source/GUICollectionBox.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ void GUICollectionBox::Create(const std::string Name, int X, int Y, int Width, i
6767
m_Height = Height;
6868

6969
// Make sure the box isn't too small
70-
m_Width = MAX(m_Width, m_MinWidth);
71-
m_Height = MAX(m_Height, m_MinHeight);
70+
m_Width = std::max(m_Width, m_MinWidth);
71+
m_Height = std::max(m_Height, m_MinHeight);
7272
}
7373

7474

@@ -93,18 +93,18 @@ void GUICollectionBox::Create(GUIProperties *Props)
9393
GUIPanel::LoadProperties(Props);
9494

9595
// Make sure the box isn't too small
96-
m_Width = MAX(m_Width, m_MinWidth);
97-
m_Height = MAX(m_Height, m_MinHeight);
96+
m_Width = std::max(m_Width, m_MinWidth);
97+
m_Height = std::max(m_Height, m_MinHeight);
9898

9999
// Get the values
100100
Props->GetValue("DrawBackground", &m_DrawBackground);
101-
string v;
101+
std::string v;
102102
Props->GetValue("DrawType", &v);
103-
if (stricmp(v.c_str(), "Color") == 0)
103+
if (_stricmp(v.c_str(), "Color") == 0)
104104
m_DrawType = Color;
105-
else if (stricmp(v.c_str(), "Image") == 0)
105+
else if (_stricmp(v.c_str(), "Image") == 0)
106106
m_DrawType = Image;
107-
else if (stricmp(v.c_str(), "Panel") == 0)
107+
else if (_stricmp(v.c_str(), "Panel") == 0)
108108
m_DrawType = Panel;
109109

110110
Props->GetValue("DrawColor", &m_DrawColor);
@@ -253,7 +253,7 @@ void GUICollectionBox::Move(int X, int Y)
253253
m_Y = Y;
254254

255255
// Go through all my children moving them
256-
vector<GUIControl *>::iterator it;
256+
std::vector<GUIControl *>::iterator it;
257257
for(it = m_ControlChildren.begin(); it != m_ControlChildren.end(); it++) {
258258
GUIControl *C = *it;
259259
int CX, CY, CW, CH;
@@ -278,7 +278,7 @@ void GUICollectionBox::Resize(int Width, int Height)
278278
m_Height = Height;
279279

280280
// Go through all my children moving them
281-
vector<GUIControl *>::iterator it;
281+
std::vector<GUIControl *>::iterator it;
282282
for(it = m_ControlChildren.begin(); it != m_ControlChildren.end(); it++) {
283283
GUIControl *C = *it;
284284
int CX, CY, CW, CH;
@@ -399,11 +399,11 @@ void GUICollectionBox::ApplyProperties(GUIProperties *Props)
399399

400400
// Get the values
401401
m_Properties.GetValue("DrawBackground", &m_DrawBackground);
402-
string v;
402+
std::string v;
403403
m_Properties.GetValue("DrawType", &v);
404-
if (stricmp(v.c_str(), "Color") == 0)
404+
if (_stricmp(v.c_str(), "Color") == 0)
405405
m_DrawType = Color;
406-
else if (stricmp(v.c_str(), "Image") == 0)
406+
else if (_stricmp(v.c_str(), "Image") == 0)
407407
m_DrawType = Image;
408408

409409
m_Properties.GetValue("DrawColor", &m_DrawColor);

0 commit comments

Comments
 (0)