diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-11-20 10:50:00 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-11-20 10:50:00 +0000 |
commit | 5a7abdafdac8f6ddd7972cadbc7e20563a0a29fc (patch) | |
tree | 95684590a32266b28f046475cfa1926c99f67e52 /src/gui | |
parent | cf36850d2bdda67cb472d938ed58053a92fa6935 (diff) | |
download | mana-5a7abdafdac8f6ddd7972cadbc7e20563a0a29fc.tar.gz mana-5a7abdafdac8f6ddd7972cadbc7e20563a0a29fc.tar.bz2 mana-5a7abdafdac8f6ddd7972cadbc7e20563a0a29fc.tar.xz mana-5a7abdafdac8f6ddd7972cadbc7e20563a0a29fc.zip |
Merged revisions 3629-3630 via svnmerge from
https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/trunk
(but kept looks in Being class, since eAthena works that way)
........
r3629 | gmelquio | 2007-10-18 21:00:38 +0200 (Thu, 18 Oct 2007) | 1 line
Removed player looks from generic beings. Prevented client termination on missing sprites. Merged weapon-type and attack-type fields for items.
........
r3630 | gmelquio | 2007-10-18 21:30:57 +0200 (Thu, 18 Oct 2007) | 1 line
Fixed changelog message.
........
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/char_select.cpp | 10 | ||||
-rw-r--r-- | src/gui/char_select.h | 6 | ||||
-rw-r--r-- | src/gui/minimap.cpp | 14 | ||||
-rw-r--r-- | src/gui/viewport.cpp | 2 |
4 files changed, 17 insertions, 15 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index fe260561..90dd53be 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -76,9 +76,9 @@ void CharDeleteConfirm::action(const gcn::ActionEvent &event) CharSelectDialog::CharSelectDialog(Network *network, LockedArray<LocalPlayer*> *charInfo, - unsigned char sex): + unsigned char gender): Window("Select Character"), mNetwork(network), - mCharInfo(charInfo), mSex(sex), mCharSelected(false) + mCharInfo(charInfo), mGender(gender), mCharSelected(false) { mSelectButton = new Button("Ok", "ok", this); mCancelButton = new Button("Cancel", "cancel", this); @@ -153,7 +153,7 @@ void CharSelectDialog::action(const gcn::ActionEvent &event) { // Start new character dialog CharCreateDialog *charCreateDialog = - new CharCreateDialog(this, mCharInfo->getPos(), mNetwork, mSex); + new CharCreateDialog(this, mCharInfo->getPos(), mNetwork, mGender); charServerHandler.setCharCreateDialog(charCreateDialog); } else if (event.getId() == "delete") @@ -251,11 +251,11 @@ bool CharSelectDialog::selectByName(const std::string &name) } CharCreateDialog::CharCreateDialog(Window *parent, int slot, Network *network, - unsigned char sex): + unsigned char gender): Window("Create Character", true, parent), mNetwork(network), mSlot(slot) { mPlayer = new Player(0, 0, NULL); - mPlayer->setSex(sex); + mPlayer->setGender(gender); mPlayer->setHairStyle(rand() % NR_HAIR_STYLES + 1); mPlayer->setHairColor(rand() % NR_HAIR_COLORS + 1); diff --git a/src/gui/char_select.h b/src/gui/char_select.h index 00b1c51d..283ecf42 100644 --- a/src/gui/char_select.h +++ b/src/gui/char_select.h @@ -50,7 +50,7 @@ class CharSelectDialog : public Window, public gcn::ActionListener */ CharSelectDialog(Network *network, LockedArray<LocalPlayer*> *charInfo, - unsigned char sex); + unsigned char gender); void action(const gcn::ActionEvent &event); @@ -78,7 +78,7 @@ class CharSelectDialog : public Window, public gcn::ActionListener PlayerBox *mPlayerBox; - unsigned char mSex; + unsigned char mGender; bool mCharSelected; /** @@ -104,7 +104,7 @@ class CharCreateDialog : public Window, public gcn::ActionListener * Constructor. */ CharCreateDialog(Window *parent, int slot, Network *network, - unsigned char sex); + unsigned char gender); /** * Destructor. diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index 2720225d..08560b840 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -26,6 +26,7 @@ #include "../being.h" #include "../beingmanager.h" #include "../graphics.h" +#include "../localplayer.h" #include "../resources/image.h" @@ -82,15 +83,16 @@ void Minimap::draw(gcn::Graphics *graphics) for (bi = beings.begin(); bi != beings.end(); bi++) { Being *being = (*bi); - int dotSize = 1; + int dotSize = 2; switch (being->getType()) { - case Being::LOCALPLAYER: - dotSize = 3; - graphics->setColor(gcn::Color(209, 52, 61)); - break; - case Being::PLAYER: + if (being == player_node) + { + dotSize = 3; + graphics->setColor(gcn::Color(61, 209, 52)); + break; + } graphics->setColor(gcn::Color(61, 52, 209)); break; diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index a39db509..2c664176 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -369,7 +369,7 @@ Viewport::mousePressed(gcn::MouseEvent &event) FloorItem *floorItem; if ((being = beingManager->findBeing(tilex, tiley)) && - being->getType() != Being::LOCALPLAYER) + being != player_node) { mPopupMenu->showPopup(event.getX(), event.getY(), being); return; |