summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/sdlinput.cpp2
-rw-r--r--src/gui/sdlinput.h2
-rw-r--r--src/gui/widgets/inttextfield.cpp2
-rw-r--r--src/gui/widgets/textfield.cpp2
-rw-r--r--src/net/tmwa/charserverhandler.cpp2
-rw-r--r--src/net/tmwa/generalhandler.cpp13
-rw-r--r--src/net/tmwa/playerhandler.cpp50
-rw-r--r--src/net/tmwa/protocol.h12
8 files changed, 43 insertions, 42 deletions
diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp
index 19f64a16..7f753b49 100644
--- a/src/gui/sdlinput.cpp
+++ b/src/gui/sdlinput.cpp
@@ -274,7 +274,7 @@ int SDLInput::convertKeyCharacter(SDL_Event event)
value = Key::ESCAPE;
break;
case SDLK_DELETE:
- value = Key::DELETE;
+ value = Key::DELETE_KEY;
break;
case SDLK_INSERT:
value = Key::INSERT;
diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h
index b441380a..fe4ff4bb 100644
--- a/src/gui/sdlinput.h
+++ b/src/gui/sdlinput.h
@@ -88,7 +88,7 @@ namespace Key
INSERT,
HOME,
PAGE_UP,
- DELETE,
+ DELETE_KEY,
END,
PAGE_DOWN,
ESCAPE,
diff --git a/src/gui/widgets/inttextfield.cpp b/src/gui/widgets/inttextfield.cpp
index fb02eae3..9e2182bd 100644
--- a/src/gui/widgets/inttextfield.cpp
+++ b/src/gui/widgets/inttextfield.cpp
@@ -37,7 +37,7 @@ void IntTextField::keyPressed(gcn::KeyEvent &event)
const gcn::Key &key = event.getKey();
if (key.getValue() == Key::BACKSPACE ||
- key.getValue() == Key::DELETE)
+ key.getValue() == Key::DELETE_KEY)
{
setText(std::string());
event.consume();
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index d06df376..6da69a76 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -248,7 +248,7 @@ void TextField::keyPressed(gcn::KeyEvent &keyEvent)
}
} break;
- case Key::DELETE:
+ case Key::DELETE_KEY:
{
unsigned sz = mText.size();
while (mCaretPosition < sz)
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 1df84b84..2b7d5381 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -247,7 +247,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, Net::Character *char
character->dummy = tempPlayer;
for (int i = 0; i < 6; i++)
- character->data.mStats[i + STR].base = msg.readInt8();
+ character->data.mStats[i + STRENGTH].base = msg.readInt8();
character->slot = msg.readInt8(); // character slot
msg.readInt8(); // unknown
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index d8ce7955..aad9a5eb 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -227,12 +227,13 @@ void GeneralHandler::event(Event::Channel channel,
inventoryWindow->setSplitAllowed(false);
skillDialog->loadSkills();
- statusWindow->addAttribute(STR, _("Strength"), true, "");
- statusWindow->addAttribute(AGI, _("Agility"), true, "");
- statusWindow->addAttribute(VIT, _("Vitality"), true, "");
- statusWindow->addAttribute(INT, _("Intelligence"), true, "");
- statusWindow->addAttribute(DEX, _("Dexterity"), true, "");
- statusWindow->addAttribute(LUK, _("Luck"), true, "");
+ statusWindow->addAttribute(STRENGTH, _("Strength"), true, "");
+ statusWindow->addAttribute(AGILITY, _("Agility"), true, "");
+ statusWindow->addAttribute(VITALITY, _("Vitality"), true, "");
+ statusWindow->addAttribute(INTELLIGENCE, _("Intelligence"),
+ true, "");
+ statusWindow->addAttribute(DEXTERITY, _("Dexterity"), true, "");
+ statusWindow->addAttribute(LUCK, _("Luck"), true, "");
statusWindow->addAttribute(ATK, _("Attack"), false, "");
statusWindow->addAttribute(DEF, _("Defense"), false, "");
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index dd228f11..a6f80d0b 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -377,75 +377,75 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg)
{
int val = msg.readInt8();
- PlayerInfo::setStatBase(STR, val);
+ PlayerInfo::setStatBase(STRENGTH, val);
if (val >= 99)
{
- statusWindow->setPointsNeeded(STR, 0);
+ statusWindow->setPointsNeeded(STRENGTH, 0);
msg.readInt8();
}
else
{
- statusWindow->setPointsNeeded(STR, msg.readInt8());
+ statusWindow->setPointsNeeded(STRENGTH, msg.readInt8());
}
val = msg.readInt8();
- PlayerInfo::setStatBase(AGI, val);
+ PlayerInfo::setStatBase(AGILITY, val);
if (val >= 99)
{
- statusWindow->setPointsNeeded(AGI, 0);
+ statusWindow->setPointsNeeded(AGILITY, 0);
msg.readInt8();
}
else
{
- statusWindow->setPointsNeeded(AGI, msg.readInt8());
+ statusWindow->setPointsNeeded(AGILITY, msg.readInt8());
}
val = msg.readInt8();
- PlayerInfo::setStatBase(VIT, val);
+ PlayerInfo::setStatBase(VITALITY, val);
if (val >= 99)
{
- statusWindow->setPointsNeeded(VIT, 0);
+ statusWindow->setPointsNeeded(VITALITY, 0);
msg.readInt8();
}
else
{
- statusWindow->setPointsNeeded(VIT, msg.readInt8());
+ statusWindow->setPointsNeeded(VITALITY, msg.readInt8());
}
val = msg.readInt8();
- PlayerInfo::setStatBase(INT, val);
+ PlayerInfo::setStatBase(INTELLIGENCE, val);
if (val >= 99)
{
- statusWindow->setPointsNeeded(INT, 0);
+ statusWindow->setPointsNeeded(INTELLIGENCE, 0);
msg.readInt8();
}
else
{
- statusWindow->setPointsNeeded(INT, msg.readInt8());
+ statusWindow->setPointsNeeded(INTELLIGENCE, msg.readInt8());
}
val = msg.readInt8();
- PlayerInfo::setStatBase(DEX, val);
+ PlayerInfo::setStatBase(DEXTERITY, val);
if (val >= 99)
{
- statusWindow->setPointsNeeded(DEX, 0);
+ statusWindow->setPointsNeeded(DEXTERITY, 0);
msg.readInt8();
}
else
{
- statusWindow->setPointsNeeded(DEX, msg.readInt8());
+ statusWindow->setPointsNeeded(DEXTERITY, msg.readInt8());
}
val = msg.readInt8();
- PlayerInfo::setStatBase(LUK, val);
+ PlayerInfo::setStatBase(LUCK, val);
if (val >= 99)
{
- statusWindow->setPointsNeeded(LUK, 0);
+ statusWindow->setPointsNeeded(LUCK, 0);
msg.readInt8();
}
else
{
- statusWindow->setPointsNeeded(LUK, msg.readInt8());
+ statusWindow->setPointsNeeded(LUCK, msg.readInt8());
}
PlayerInfo::setStatBase(ATK, msg.readInt16(), false);
@@ -476,22 +476,22 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg)
switch (msg.readInt16())
{
case 0x0020:
- statusWindow->setPointsNeeded(STR, msg.readInt8());
+ statusWindow->setPointsNeeded(STRENGTH, msg.readInt8());
break;
case 0x0021:
- statusWindow->setPointsNeeded(AGI, msg.readInt8());
+ statusWindow->setPointsNeeded(AGILITY, msg.readInt8());
break;
case 0x0022:
- statusWindow->setPointsNeeded(VIT, msg.readInt8());
+ statusWindow->setPointsNeeded(VITALITY, msg.readInt8());
break;
case 0x0023:
- statusWindow->setPointsNeeded(INT, msg.readInt8());
+ statusWindow->setPointsNeeded(INTELLIGENCE, msg.readInt8());
break;
case 0x0024:
- statusWindow->setPointsNeeded(DEX, msg.readInt8());
+ statusWindow->setPointsNeeded(DEXTERITY, msg.readInt8());
break;
case 0x0025:
- statusWindow->setPointsNeeded(LUK, msg.readInt8());
+ statusWindow->setPointsNeeded(LUCK, msg.readInt8());
break;
}
break;
@@ -531,7 +531,7 @@ void PlayerHandler::emote(int emoteId)
void PlayerHandler::increaseAttribute(int attr)
{
- if (attr >= STR && attr <= LUK)
+ if (attr >= STRENGTH && attr <= LUCK)
{
MessageOut outMsg(CMSG_STAT_UPDATE_REQUEST);
outMsg.writeInt16(attr);
diff --git a/src/net/tmwa/protocol.h b/src/net/tmwa/protocol.h
index 0624ad2f..2714634b 100644
--- a/src/net/tmwa/protocol.h
+++ b/src/net/tmwa/protocol.h
@@ -25,12 +25,12 @@
enum {
JOB = 0xa,
- STR = 0xd,
- AGI,
- VIT,
- INT,
- DEX,
- LUK,
+ STRENGTH = 0xd,
+ AGILITY,
+ VITALITY,
+ INTELLIGENCE,
+ DEXTERITY,
+ LUCK,
ATK,
DEF,