diff options
Diffstat (limited to 'engines/titanic/moves/move_player_to.cpp')
-rw-r--r-- | engines/titanic/moves/move_player_to.cpp | 19 |
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 |