summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-26 00:04:45 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-26 00:04:45 +0000
commit8b0e30d3798cd5bdce2c3a34a3c384e90dceac99 (patch)
tree3fdca13a0cc138ed65b72de8cd3747cc79916818 /src/gui/gui.cpp
parenta31ba215a3043ebd62d415a7d855a531239fb630 (diff)
downloadmana-8b0e30d3798cd5bdce2c3a34a3c384e90dceac99.tar.gz
mana-8b0e30d3798cd5bdce2c3a34a3c384e90dceac99.tar.bz2
mana-8b0e30d3798cd5bdce2c3a34a3c384e90dceac99.tar.xz
mana-8b0e30d3798cd5bdce2c3a34a3c384e90dceac99.zip
Changed keyboard control to integrate better with mouse walk, changed location
of packet.list and chatlog.txt and removed name from player chat "balloon".
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 6a57f214..d9ab90bd 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -34,7 +34,8 @@ Graphics *guiGraphics; // Graphics driver
gcn::SDLInput *guiInput; // GUI input
WindowContainer *guiTop; // The top container
-Gui::Gui(Graphics *graphics)
+Gui::Gui(Graphics *graphics):
+ hostImageLoader(NULL)
{
// Set graphics
guiGraphics = graphics;
@@ -75,9 +76,9 @@ Gui::~Gui()
delete guiFont;
delete guiTop;
delete imageLoader;
-#ifdef USE_OPENGL
- delete hostImageLoader;
-#endif
+ if (hostImageLoader) {
+ delete hostImageLoader;
+ }
delete guiInput;
}
@@ -108,9 +109,7 @@ void Gui::mousePress(int mx, int my, int button)
if (state == GAME && tiledMap->getWalk(tilex, tiley)) {
walk(tilex, tiley, 0);
- player_node->setPath(tiledMap->findPath(
- player_node->x, player_node->y,
- tilex, tiley));
+ player_node->setDestination(tilex, tiley);
}
}
}