aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/game')
-rw-r--r--engines/titanic/game/cdrom.cpp1
-rw-r--r--engines/titanic/game/computer_screen.cpp38
-rw-r--r--engines/titanic/game/computer_screen.h5
3 files changed, 44 insertions, 0 deletions
diff --git a/engines/titanic/game/cdrom.cpp b/engines/titanic/game/cdrom.cpp
index 0d89319a86..0fd7eb5dbd 100644
--- a/engines/titanic/game/cdrom.cpp
+++ b/engines/titanic/game/cdrom.cpp
@@ -65,6 +65,7 @@ bool CCDROM::MouseDragEndMsg(CMouseDragEndMsg *msg) {
if (newTray->_state && newTray->_insertedCD == "None") {
CActMsg actMsg(getName());
actMsg.execute(newTray);
+ setVisible(false);
}
}
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
diff --git a/engines/titanic/game/computer_screen.h b/engines/titanic/game/computer_screen.h
index aa47482207..fa02ef5e1a 100644
--- a/engines/titanic/game/computer_screen.h
+++ b/engines/titanic/game/computer_screen.h
@@ -28,6 +28,11 @@
namespace Titanic {
class CComputerScreen : public CGameObject {
+ DECLARE_MESSAGE_MAP
+ bool ActMsg(CActMsg *msg);
+ bool MovieEndMsg(CMovieEndMsg *msg);
+ bool EnterViewMsg(CEnterViewMsg *msg);
+ bool TimerMsg(CTimerMsg *msg);
public:
CLASSDEF
CComputerScreen();