From 8b0e30d3798cd5bdce2c3a34a3c384e90dceac99 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 26 Apr 2005 00:04:45 +0000 Subject: Changed keyboard control to integrate better with mouse walk, changed location of packet.list and chatlog.txt and removed name from player chat "balloon". --- src/gui/gui.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/gui/gui.cpp') 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); } } } -- cgit v1.2.3-70-g09d2