aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/gondolier
diff options
context:
space:
mode:
authorPaul Gilbert2016-03-17 19:58:59 -0400
committerPaul Gilbert2016-03-17 19:58:59 -0400
commita8d94d448ea977bdd5b1171e177de6dd714792a2 (patch)
treea9756367b569bcbba8f929c036ef943b48e483e0 /engines/titanic/game/gondolier
parente80a15170640a495b5c7861abeea71d0325684cd (diff)
downloadscummvm-rg350-a8d94d448ea977bdd5b1171e177de6dd714792a2.tar.gz
scummvm-rg350-a8d94d448ea977bdd5b1171e177de6dd714792a2.tar.bz2
scummvm-rg350-a8d94d448ea977bdd5b1171e177de6dd714792a2.zip
TITANIC: Fixes to make message handling const, adding CEnterRoomMsg handlers
Diffstat (limited to 'engines/titanic/game/gondolier')
-rw-r--r--engines/titanic/game/gondolier/gondolier_mixer.cpp8
-rw-r--r--engines/titanic/game/gondolier/gondolier_mixer.h5
2 files changed, 12 insertions, 1 deletions
diff --git a/engines/titanic/game/gondolier/gondolier_mixer.cpp b/engines/titanic/game/gondolier/gondolier_mixer.cpp
index e81ad34c87..391c513ccc 100644
--- a/engines/titanic/game/gondolier/gondolier_mixer.cpp
+++ b/engines/titanic/game/gondolier/gondolier_mixer.cpp
@@ -56,4 +56,12 @@ void CGondolierMixer::load(SimpleFile *file) {
CGondolierBase::load(file);
}
+bool CGondolierMixer::handleEvent(const CEnterRoomMsg &msg) {
+ CTreeItem *parent = getParent();
+ if (parent == msg._room)
+ msg.execute(parent);
+
+ return true;
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/game/gondolier/gondolier_mixer.h b/engines/titanic/game/gondolier/gondolier_mixer.h
index 173bcd8ac2..ce8959b77a 100644
--- a/engines/titanic/game/gondolier/gondolier_mixer.h
+++ b/engines/titanic/game/gondolier/gondolier_mixer.h
@@ -24,10 +24,11 @@
#define TITANIC_GONDOLIER_MIXER_H
#include "titanic/game/gondolier/gondolier_base.h"
+#include "titanic/messages/messages.h"
namespace Titanic {
-class CGondolierMixer : public CGondolierBase {
+class CGondolierMixer : public CGondolierBase, CEnterRoomMsgTarget {
private:
int _fieldBC;
int _fieldC0;
@@ -36,6 +37,8 @@ private:
CString _string1;
CString _string2;
int _fieldE4;
+protected:
+ virtual bool handleEvent(const CEnterRoomMsg &msg);
public:
CLASSDEF
CGondolierMixer();