diff options
author | Paul Gilbert | 2016-08-21 21:41:48 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-21 21:41:48 -0400 |
commit | e7d0047b5334bef6688a5f81c200630a58ff89c4 (patch) | |
tree | 62fb8f5e0a453d67674e304b4f8102d93d5cba02 /engines/titanic/game/games_console.cpp | |
parent | 9ebd75742eb3a4fac4f6ff3ae421ec67be1f28eb (diff) | |
download | scummvm-rg350-e7d0047b5334bef6688a5f81c200630a58ff89c4.tar.gz scummvm-rg350-e7d0047b5334bef6688a5f81c200630a58ff89c4.tar.bz2 scummvm-rg350-e7d0047b5334bef6688a5f81c200630a58ff89c4.zip |
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/game/games_console.cpp')
-rw-r--r-- | engines/titanic/game/games_console.cpp | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/engines/titanic/game/games_console.cpp b/engines/titanic/game/games_console.cpp index b7500f9dd9..40311f70ee 100644 --- a/engines/titanic/game/games_console.cpp +++ b/engines/titanic/game/games_console.cpp @@ -24,16 +24,42 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CGamesConsole, CBackground) + ON_MESSAGE(MouseButtonDownMsg) + ON_MESSAGE(LeaveViewMsg) +END_MESSAGE_MAP() + void CGamesConsole::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_fieldE0, indent); + file->writeNumberLine(_active, indent); CBackground::save(file, indent); } void CGamesConsole::load(SimpleFile *file) { file->readNumber(); - _fieldE0 = file->readNumber(); + _active = file->readNumber(); CBackground::load(file); } +bool CGamesConsole::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { + if (_active) { + playMovie(23, 44, 0); + _active = false; + } else { + playMovie(0, 23, 0); + _active = true; + } + + return true; +} + +bool CGamesConsole::LeaveViewMsg(CLeaveViewMsg *msg) { + if (_active) { + _active = false; + playMovie(23, 44, MOVIE_GAMESTATE); + } + + return true; +} + } // End of namespace Titanic |