diff options
author | Paul Gilbert | 2016-08-23 21:46:04 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-23 21:46:04 -0400 |
commit | 3a20dca0cb487e1c542b75f442eacb33eadd2e26 (patch) | |
tree | 3a6f77bd089ddf81c7ad9921fb96149c9193964d /engines/titanic/game/little_lift_button.cpp | |
parent | 3d558fe6ca0ad61558f5283f2ff4751b034fed5f (diff) | |
download | scummvm-rg350-3a20dca0cb487e1c542b75f442eacb33eadd2e26.tar.gz scummvm-rg350-3a20dca0cb487e1c542b75f442eacb33eadd2e26.tar.bz2 scummvm-rg350-3a20dca0cb487e1c542b75f442eacb33eadd2e26.zip |
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/game/little_lift_button.cpp')
-rw-r--r-- | engines/titanic/game/little_lift_button.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/engines/titanic/game/little_lift_button.cpp b/engines/titanic/game/little_lift_button.cpp index 5005cb1757..afda4cac1d 100644 --- a/engines/titanic/game/little_lift_button.cpp +++ b/engines/titanic/game/little_lift_button.cpp @@ -21,9 +21,15 @@ */ #include "titanic/game/little_lift_button.h" +#include "titanic/core/room_item.h" namespace Titanic { +BEGIN_MESSAGE_MAP(CLittleLiftButton, CBackground) + ON_MESSAGE(MouseButtonDownMsg) + ON_MESSAGE(MovieEndMsg) +END_MESSAGE_MAP() + void CLittleLiftButton::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeNumberLine(_value, indent); @@ -36,4 +42,23 @@ void CLittleLiftButton::load(SimpleFile *file) { CBackground::load(file); } +bool CLittleLiftButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { + playMovie(MOVIE_NOTIFY_OBJECT); + playSound("z#60.wav"); + return true; +} + +bool CLittleLiftButton::MovieEndMsg(CMovieEndMsg *msg) { + changeView("SecClassLittleLift.Node 1.N"); + + CRoomItem *room = getRoom(); + if (room) { + CStatusChangeMsg statusMsg; + statusMsg._newStatus = _value; + statusMsg.execute(room, nullptr, MSGFLAG_SCAN); + } + + return true; +} + } // End of namespace Titanic |