summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/char_server.cpp4
-rw-r--r--src/gui/gui.cpp3
-rw-r--r--src/gui/status.cpp15
3 files changed, 13 insertions, 9 deletions
diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp
index cb1d3659..c0f1c523 100644
--- a/src/gui/char_server.cpp
+++ b/src/gui/char_server.cpp
@@ -161,10 +161,10 @@ void server_char_server(int serverIndex) {
WFIFOB(16) = net_b_value(sex);
WFIFOSET(17);
- while ((in_size<4)||(out_size>0))flush();
+ while ((in_size < 4) || (out_size > 0))flush();
RFIFOSKIP(4);
- while (in_size<3)flush();
+ while (in_size < 3) flush();
if (RFIFOW(0) == 0x006b) {
while(in_size < RFIFOW(2))flush();
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index c9742b05..4b084da9 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -31,7 +31,8 @@ Graphics *guiGraphics; // Graphics driver
gcn::SDLInput *guiInput; // GUI input
WindowContainer *guiTop; // The top container
-Gui::Gui(Graphics *graphics)
+Gui::Gui(Graphics *graphics):
+ topHasMouse(false)
{
// Set graphics
guiGraphics = graphics;
diff --git a/src/gui/status.cpp b/src/gui/status.cpp
index 8465082f..70dbf083 100644
--- a/src/gui/status.cpp
+++ b/src/gui/status.cpp
@@ -99,21 +99,23 @@ void StatusWindow::update()
spValue->setCaption(tempstr);
spValue->adjustSize();
- sprintf(tempstr, "Exp: %d / %d", (int)char_info->xp, (int)char_info->xpForNextLevel);
+ sprintf(tempstr, "Exp: %d / %d",
+ (int)char_info->xp, (int)char_info->xpForNextLevel);
expLabel->setCaption(tempstr);
expLabel->adjustSize();
- sprintf(tempstr, "Job Exp: %d / %d", (int)char_info->job_xp, (int)char_info->jobXpForNextLevel);
+ sprintf(tempstr, "Job Exp: %d / %d",
+ (int)char_info->job_xp, (int)char_info->jobXpForNextLevel);
jobExpLabel->setCaption(tempstr);
jobExpLabel->adjustSize();
- if ( char_info->hp < int(char_info->max_hp / 3) )
+ if (char_info->hp < int(char_info->max_hp / 3))
{
healthBar->setColor(255, 0, 0); // Red
}
else
{
- if ( char_info->hp < int( (char_info->max_hp / 3)*2 ) )
+ if (char_info->hp < int((char_info->max_hp / 3) * 2))
{
healthBar->setColor(255, 181, 9); // orange
}
@@ -127,7 +129,8 @@ void StatusWindow::update()
healthBar->setProgress((float)char_info->hp / (float)char_info->max_hp);
xpBar->setProgress((float)char_info->xp / (float)char_info->xpForNextLevel);
- jobXpBar->setProgress((float)char_info->job_xp / (float)char_info->jobXpForNextLevel);
+ jobXpBar->setProgress(
+ (float)char_info->job_xp / (float)char_info->jobXpForNextLevel);
- delete tempstr;
+ delete[] tempstr;
}