aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/belbot_get_light.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/game/belbot_get_light.cpp')
-rw-r--r--engines/titanic/game/belbot_get_light.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/engines/titanic/game/belbot_get_light.cpp b/engines/titanic/game/belbot_get_light.cpp
index 3e678a8a0c..2cc4c3ae19 100644
--- a/engines/titanic/game/belbot_get_light.cpp
+++ b/engines/titanic/game/belbot_get_light.cpp
@@ -24,6 +24,13 @@
namespace Titanic {
+BEGIN_MESSAGE_MAP(CBelbotGetLight, CGameObject)
+ ON_MESSAGE(ActMsg)
+ ON_MESSAGE(MovieEndMsg)
+ ON_MESSAGE(MovieFrameMsg)
+ ON_MESSAGE(EnterViewMsg)
+END_MESSAGE_MAP()
+
void CBelbotGetLight::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeQuotedLine(_value, indent);
@@ -36,4 +43,36 @@ void CBelbotGetLight::load(SimpleFile *file) {
CGameObject::load(file);
}
+bool CBelbotGetLight::ActMsg(CActMsg *msg) {
+ if (msg->_action == "BellbotGetLight") {
+ _value = getFullViewName();
+ lockMouse();
+ changeView("1stClassState.Node 11.N", "");
+ }
+
+ return true;
+}
+
+bool CBelbotGetLight::MovieEndMsg(CMovieEndMsg *msg) {
+ sleep(1000);
+ changeView(_value, "");
+ unlockMouse();
+ return true;
+}
+
+bool CBelbotGetLight::MovieFrameMsg(CMovieFrameMsg *msg) {
+ if (getMovieFrame() == 37) {
+ CActMsg actMsg("BellbotGetLight");
+ actMsg.execute("Eye1");
+ }
+
+ return true;
+}
+
+bool CBelbotGetLight::EnterViewMsg(CEnterViewMsg *msg) {
+ playMovie(MOVIE_NOTIFY_OBJECT);
+ movieEvent(37);
+ return true;
+}
+
} // End of namespace Titanic