summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/engine.cpp5
-rw-r--r--src/engine.h5
-rw-r--r--src/gui/viewport.h3
-rw-r--r--src/net/playerhandler.cpp4
5 files changed, 11 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 02d15933..3936e992 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/engine.h, src/gui/viewport.h, src/engine.cpp,
+ src/net/playerhandler.cpp: Removed unnecessary forwarding method.
+
2008-03-16 Eugenio Favalli <elvenprogrammer@themanaworld.org>
* The Mana World.dev: Updated Dev-C++ project file. Patch by peavey.
diff --git a/src/engine.cpp b/src/engine.cpp
index d84b8e00..d4033193 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -126,11 +126,6 @@ void Engine::changeMap(const std::string &mapPath)
outMsg.writeInt16(CMSG_MAP_LOADED);
}
-void Engine::scrollBy(float scrollX, float scrollY)
-{
- viewport->scrollBy(scrollX, scrollY);
-}
-
void Engine::logic()
{
beingManager->logic();
diff --git a/src/engine.h b/src/engine.h
index 06fa2e01..4575051e 100644
--- a/src/engine.h
+++ b/src/engine.h
@@ -57,11 +57,6 @@ class Engine
void changeMap(const std::string &mapName);
/**
- * Changes viewpoint by relative pixel coordinates.
- */
- void scrollBy(float scrollX, float scrollY);
-
- /**
* Performs engine logic.
*/
void logic();
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index 58ef7146..a91ab14d 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -128,6 +128,9 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
int
getCameraY() { return mTileViewY; }
+ /**
+ * Changes viewpoint by relative pixel coordinates.
+ */
void
scrollBy (float x, float y) { mPixelViewX += x; mPixelViewY += y; }
diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp
index 0ea404ed..b3355ef8 100644
--- a/src/net/playerhandler.cpp
+++ b/src/net/playerhandler.cpp
@@ -33,11 +33,13 @@
#include "../gui/buy.h"
#include "../gui/chat.h"
+#include "../gui/gui.h"
#include "../gui/npclistdialog.h"
#include "../gui/npc_text.h"
#include "../gui/ok_dialog.h"
#include "../gui/sell.h"
#include "../gui/skill.h"
+#include "../gui/viewport.h"
// TODO Move somewhere else
OkDialog *weightNotice = NULL;
@@ -136,7 +138,7 @@ void PlayerHandler::handleMessage(MessageIn *msg)
logger->log("Adjust scrolling by %d:%d", (int)scrollOffsetX, (int)scrollOffsetY);
- engine->scrollBy(scrollOffsetX, scrollOffsetY);
+ viewport->scrollBy(scrollOffsetX, scrollOffsetY);
}
break;