summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README1
-rw-r--r--data/graphics/gui/Makefile.am6
-rw-r--r--data/graphics/gui/fixedfont.pngbin1888 -> 1286 bytes
-rw-r--r--data/graphics/gui/hits_blue.pngbin586 -> 431 bytes
-rw-r--r--data/graphics/gui/hits_red.pngbin536 -> 429 bytes
-rw-r--r--data/graphics/gui/hits_yellow.pngbin343 -> 275 bytes
-rw-r--r--data/help/commands.txt1
-rw-r--r--src/Makefile.am10
-rw-r--r--src/being.cpp2
-rw-r--r--src/game.cpp10
-rw-r--r--src/gui/gui.cpp13
-rw-r--r--src/gui/popupmenu.cpp34
-rw-r--r--src/net/protocol.cpp6
13 files changed, 47 insertions, 36 deletions
diff --git a/README b/README
index 4e1726f8..a5d27296 100644
--- a/README
+++ b/README
@@ -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
index 6c3f032c..227f0000 100644
--- a/data/graphics/gui/fixedfont.png
+++ b/data/graphics/gui/fixedfont.png
Binary files differ
diff --git a/data/graphics/gui/hits_blue.png b/data/graphics/gui/hits_blue.png
index 3d1491c7..fb8a8971 100644
--- a/data/graphics/gui/hits_blue.png
+++ b/data/graphics/gui/hits_blue.png
Binary files differ
diff --git a/data/graphics/gui/hits_red.png b/data/graphics/gui/hits_red.png
index 59a55e52..78476260 100644
--- a/data/graphics/gui/hits_red.png
+++ b/data/graphics/gui/hits_red.png
Binary files differ
diff --git a/data/graphics/gui/hits_yellow.png b/data/graphics/gui/hits_yellow.png
index b627d58e..89656ad3 100644
--- a/data/graphics/gui/hits_yellow.png
+++ b/data/graphics/gui/hits_yellow.png
Binary files differ
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;