aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/games_console.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/game/games_console.cpp')
-rw-r--r--engines/titanic/game/games_console.cpp30
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