diff options
author | Paul Gilbert | 2016-04-11 20:08:49 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:10:56 -0400 |
commit | 7ac4f7c3aa26831f771418472472735cf73bade9 (patch) | |
tree | 721c918233240d79080585bef0f9862f9e0f8291 /engines/titanic/game/computer_screen.cpp | |
parent | 54b055bcf58e8cbcf472ea6838f3ed7ecf377e37 (diff) | |
download | scummvm-rg350-7ac4f7c3aa26831f771418472472735cf73bade9.tar.gz scummvm-rg350-7ac4f7c3aa26831f771418472472735cf73bade9.tar.bz2 scummvm-rg350-7ac4f7c3aa26831f771418472472735cf73bade9.zip |
TITANIC: Implementing CComputerScreen messages
Diffstat (limited to 'engines/titanic/game/computer_screen.cpp')
-rw-r--r-- | engines/titanic/game/computer_screen.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/engines/titanic/game/computer_screen.cpp b/engines/titanic/game/computer_screen.cpp index 04de5e50d8..f0fab26b61 100644 --- a/engines/titanic/game/computer_screen.cpp +++ b/engines/titanic/game/computer_screen.cpp @@ -24,6 +24,13 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CComputerScreen, CGameObject) + ON_MESSAGE(ActMsg) + ON_MESSAGE(MovieEndMsg) + ON_MESSAGE(EnterViewMsg) + ON_MESSAGE(TimerMsg) +END_MESSAGE_MAP() + CComputerScreen::CComputerScreen() : CGameObject() { } @@ -37,4 +44,35 @@ void CComputerScreen::load(SimpleFile *file) { CGameObject::load(file); } +bool CComputerScreen::ActMsg(CActMsg *msg) { + if (msg->_action == "newCD1" || msg->_action == "newCD2") { + playMovie(27, 53, 16); + playMovie(19, 26, 16); + } else if (msg->_action == "newSTCD") { + playMovie(0, 18, 20); + } + + return true; +} + +bool CComputerScreen::MovieEndMsg(CMovieEndMsg *msg) { + playSound("z#47.wav", 100, 0, 0); + addTimer(0, 3000, 0); + + for (int idx = 0; idx < 10; ++idx) + playMovie(0, 18, 0); + return true; +} + +bool CComputerScreen::EnterViewMsg(CEnterViewMsg *msg) { + loadFrame(26); + return true; +} + +bool CComputerScreen::TimerMsg(CTimerMsg *msg) { + // TODO + warning("TODO: CComputerScreen::TimerMsg"); + return true; +} + } // End of namespace Titanic |