diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-07-03 21:03:09 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-07-03 21:03:09 +0000 |
commit | b5ca1c7c4021d9ef04cabd6f6dbc6e1bc050ab73 (patch) | |
tree | ff35acbbf544331e88912a62558c560c88f329b0 | |
parent | de8b695c863576f10cfeb02c38b8980ec5dd019e (diff) | |
download | mana-b5ca1c7c4021d9ef04cabd6f6dbc6e1bc050ab73.tar.gz mana-b5ca1c7c4021d9ef04cabd6f6dbc6e1bc050ab73.tar.bz2 mana-b5ca1c7c4021d9ef04cabd6f6dbc6e1bc050ab73.tar.xz mana-b5ca1c7c4021d9ef04cabd6f6dbc6e1bc050ab73.zip |
- Fixed blue, red and yellow damage fonts to work in SDL mode
- Added two international characters to fixed font, fixed autotarget
- Fixed mouse autotarget (now default for left click)
- Cleaned up showing of empty right click menus
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | data/graphics/gui/Makefile.am | 6 | ||||
-rw-r--r-- | data/graphics/gui/fixedfont.png | bin | 1888 -> 1286 bytes | |||
-rw-r--r-- | data/graphics/gui/hits_blue.png | bin | 586 -> 431 bytes | |||
-rw-r--r-- | data/graphics/gui/hits_red.png | bin | 536 -> 429 bytes | |||
-rw-r--r-- | data/graphics/gui/hits_yellow.png | bin | 343 -> 275 bytes | |||
-rw-r--r-- | data/help/commands.txt | 1 | ||||
-rw-r--r-- | src/Makefile.am | 10 | ||||
-rw-r--r-- | src/being.cpp | 2 | ||||
-rw-r--r-- | src/game.cpp | 10 | ||||
-rw-r--r-- | src/gui/gui.cpp | 13 | ||||
-rw-r--r-- | src/gui/popupmenu.cpp | 34 | ||||
-rw-r--r-- | src/net/protocol.cpp | 6 |
13 files changed, 47 insertions, 36 deletions
@@ -41,7 +41,6 @@ over NPC's feet to talk to them or over a monster to attack it. Other keys: - F1 show the online help - F5 sit down / stand up - F6 toggle debug pathfinding feature -- F7 play test sound - G or Z pick up item - Enter focus chat window / send message - Alt + K show skills diff --git a/data/graphics/gui/Makefile.am b/data/graphics/gui/Makefile.am index 1651eebb..745a202b 100644 --- a/data/graphics/gui/Makefile.am +++ b/data/graphics/gui/Makefile.am @@ -10,9 +10,9 @@ gui_DATA = \ buttonpress.png \ checkbox.png \ fixedfont.png \ - hits_blue.png \ - hits_red.png \ - hits_yellow.png \ + hits_blue.png \ + hits_red.png \ + hits_yellow.png \ hscroll_left_default.png \ hscroll_left_highlight.png \ hscroll_left_pressed.png \ diff --git a/data/graphics/gui/fixedfont.png b/data/graphics/gui/fixedfont.png Binary files differindex 6c3f032c..227f0000 100644 --- a/data/graphics/gui/fixedfont.png +++ b/data/graphics/gui/fixedfont.png diff --git a/data/graphics/gui/hits_blue.png b/data/graphics/gui/hits_blue.png Binary files differindex 3d1491c7..fb8a8971 100644 --- a/data/graphics/gui/hits_blue.png +++ b/data/graphics/gui/hits_blue.png diff --git a/data/graphics/gui/hits_red.png b/data/graphics/gui/hits_red.png Binary files differindex 59a55e52..78476260 100644 --- a/data/graphics/gui/hits_red.png +++ b/data/graphics/gui/hits_red.png diff --git a/data/graphics/gui/hits_yellow.png b/data/graphics/gui/hits_yellow.png Binary files differindex b627d58e..89656ad3 100644 --- a/data/graphics/gui/hits_yellow.png +++ b/data/graphics/gui/hits_yellow.png diff --git a/data/help/commands.txt b/data/help/commands.txt index 64975bcc..7920beae 100644 --- a/data/help/commands.txt +++ b/data/help/commands.txt @@ -14,7 +14,6 @@ ##2F1##P show the in-game help ##2F5##P sit down / stand up ##2F6##P toggle debug pathfinding feature - ##2F7##P play test sound ##2G or Z##P pick up item ##2Enter##P focus chat window / send message ##2Alt + K##P show skills diff --git a/src/Makefile.am b/src/Makefile.am index b5292dd8..b1fe75c5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,8 +1,8 @@ bin_PROGRAMS = tmw tmw_SOURCES = graphic/spriteset.cpp \ graphic/spriteset.h \ - gui/browserbox.cpp \ - gui/browserbox.h \ + gui/browserbox.cpp \ + gui/browserbox.h \ gui/buddywindow.cpp \ gui/buddywindow.h \ gui/button.cpp \ @@ -39,7 +39,7 @@ tmw_SOURCES = graphic/spriteset.cpp \ gui/itemcontainer.h \ gui/item_amount.cpp \ gui/item_amount.h \ - gui/linkhandler.h \ + gui/linkhandler.h \ gui/listbox.cpp \ gui/listbox.h \ gui/login.cpp \ @@ -58,8 +58,8 @@ tmw_SOURCES = graphic/spriteset.cpp \ gui/passwordfield.h \ gui/playerbox.cpp \ gui/playerbox.h \ - gui/popupmenu.cpp \ - gui/popupmenu.h \ + gui/popupmenu.cpp \ + gui/popupmenu.h \ gui/progressbar.cpp \ gui/progressbar.h \ gui/radiobutton.cpp \ diff --git a/src/being.cpp b/src/being.cpp index 578d4be0..84ec6a58 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -346,7 +346,6 @@ void Being::drawSpeech(Graphics *graphics) gcn::Graphics::CENTER); } if (showDamage) { -#ifdef USE_OPENGL // Selecting the right color if (damage == "miss") { @@ -360,7 +359,6 @@ void Being::drawSpeech(Graphics *graphics) { graphics->setFont(hitRedFont); } -#endif int textX = 0; int textY = 0; diff --git a/src/game.cpp b/src/game.cpp index 181b7d6f..9e9b0da9 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -433,12 +433,12 @@ void do_input() if (target->action != MONSTER_DEAD && player_node->action==STAND) { - if (keys[SDLK_LSHIFT]) - { - autoTarget = target; - } attack(target); - + // Autotarget by default with mouse + //if (keys[SDLK_LSHIFT]) + //{ + autoTarget = target; + //} } } // Player default: trade diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index ec9a6adc..a6f9ad4b 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -84,8 +84,15 @@ Gui::Gui(Graphics *graphics) guiFont = new gcn::ImageFont( TMW_DATADIR "data/graphics/gui/fixedfont.png", " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567" - "89:@!\"$%&/=?^+*#[]{}()<>_;'.,\\|-~`" + "89:@!\"$%&/=?^+*#[]{}()<>_;'.,\\|-~`øå" ); + /* + guiFont = new gcn::ImageFont( + TMW_DATADIR "data/graphics/gui/rpgfont.png", + " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567" + "89_,!?-+/():;%&`'*#=[]\"" + ); + */ } catch (gcn::Exception e) { @@ -161,9 +168,9 @@ void Gui::mousePress(int mx, int my, int button) if (state == GAME && tiledMap->getWalk(tilex, tiley)) { walk(tilex, tiley, 0); player_node->setDestination(tilex, tiley); - } - autoTarget = NULL; + autoTarget = NULL; + } } } diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index c9b53324..4469eaaf 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -75,26 +75,34 @@ void PopupMenu::showPopup(int mx, int my) mY = my; browserBox->clearRows(); - if (being) + if (being && being->isNpc()) { - if (being->isNpc()) - { - browserBox->addRow("@@talk|Talk To NPC@@"); - } - else if (being->isPlayer()) - { - std::string name = being->name; - //browserBox->addRow("@@attack|Attack " + name + "@@"); - browserBox->addRow("@@trade|Trade With " + name + "@@"); - //browserBox->addRow("@@follow|Follow " + name + "@@"); - //browserBox->addRow("@@buddy|Add " + name + " to Buddy List@@"); - } + // NPCs can be talked to (single option, candidate for removal unless + // more options would be added) + browserBox->addRow("@@talk|Talk To NPC@@"); + } + else if (being && being->isPlayer()) + { + // Players can be traded with. Later also attack, follow and add as + // buddy will be options in this menu. + + std::string name = being->name; + //browserBox->addRow("@@attack|Attack " + name + "@@"); + browserBox->addRow("@@trade|Trade With " + name + "@@"); + //browserBox->addRow("@@follow|Follow " + name + "@@"); + //browserBox->addRow("@@buddy|Add " + name + " to Buddy List@@"); } else if (floorItem) { + // Floor item can be picked up (single option, candidate for removal) std::string name = itemDb->getItemInfo(floorItem->id)->getName(); browserBox->addRow("@@pickup|Pick Up " + name + "@@"); } + else + { + // If there is nothing of interest, don't display menu. + return; + } //browserBox->addRow("@@look|Look To@@"); browserBox->addRow("##3---"); diff --git a/src/net/protocol.cpp b/src/net/protocol.cpp index de41467e..eac679bc 100644 --- a/src/net/protocol.cpp +++ b/src/net/protocol.cpp @@ -243,9 +243,6 @@ Being* attack(unsigned short x, unsigned short y, unsigned char direction) return target; } - // Implement charging attacks here - char_info->lastAttackTime = 0; - return NULL; } @@ -269,6 +266,9 @@ void attack(Being *target) player_node->direction = WEST; } + // Implement charging attacks here + char_info->lastAttackTime = 0; + player_node->action = ATTACK; action(0, target->id); player_node->walk_time = tick_time; |