aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/moves/move_player_to.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-25 20:46:33 -0400
committerPaul Gilbert2016-08-25 20:46:33 -0400
commit1f0b9cb68d02d956ec745bef16f0dbddaa743bec (patch)
tree1caba7007cc529982bd5932923d33b5cf8569853 /engines/titanic/moves/move_player_to.cpp
parentdb179c11bb7d8f82183e39e2778491ead55d875e (diff)
downloadscummvm-rg350-1f0b9cb68d02d956ec745bef16f0dbddaa743bec.tar.gz
scummvm-rg350-1f0b9cb68d02d956ec745bef16f0dbddaa743bec.tar.bz2
scummvm-rg350-1f0b9cb68d02d956ec745bef16f0dbddaa743bec.zip
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/moves/move_player_to.cpp')
-rw-r--r--engines/titanic/moves/move_player_to.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/titanic/moves/move_player_to.cpp b/engines/titanic/moves/move_player_to.cpp
index 9b6000c4f8..a91215b539 100644
--- a/engines/titanic/moves/move_player_to.cpp
+++ b/engines/titanic/moves/move_player_to.cpp
@@ -21,9 +21,15 @@
*/
#include "titanic/moves/move_player_to.h"
+#include "titanic/game_manager.h"
namespace Titanic {
+BEGIN_MESSAGE_MAP(CMovePlayerTo, CGameObject)
+ ON_MESSAGE(MouseButtonDownMsg)
+ ON_MESSAGE(ActMsg)
+END_MESSAGE_MAP()
+
CMovePlayerTo::CMovePlayerTo() : CGameObject() {
}
@@ -41,4 +47,17 @@ void CMovePlayerTo::load(SimpleFile *file) {
CGameObject::load(file);
}
+bool CMovePlayerTo::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
+ CGameManager *gameManager = getGameManager();
+ if (gameManager)
+ changeView(_destination);
+
+ return true;
+}
+
+bool CMovePlayerTo::ActMsg(CActMsg *msg) {
+ _destination = msg->_action;
+ return true;
+}
+
} // End of namespace Titanic