aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/sound
diff options
context:
space:
mode:
authorPaul Gilbert2016-03-17 20:55:32 -0400
committerPaul Gilbert2016-03-17 20:55:32 -0400
commit12ae5e10f3a20b1b909a6ec40257e39e063b78c5 (patch)
tree936eff629cd96723faedf54b076006ec19b8c145 /engines/titanic/sound
parenta8d94d448ea977bdd5b1171e177de6dd714792a2 (diff)
downloadscummvm-rg350-12ae5e10f3a20b1b909a6ec40257e39e063b78c5.tar.gz
scummvm-rg350-12ae5e10f3a20b1b909a6ec40257e39e063b78c5.tar.bz2
scummvm-rg350-12ae5e10f3a20b1b909a6ec40257e39e063b78c5.zip
TITANIC: Added stubbed CEnterRoomMsg event handlers as needed
Diffstat (limited to 'engines/titanic/sound')
-rw-r--r--engines/titanic/sound/music_player.cpp5
-rw-r--r--engines/titanic/sound/music_player.h7
-rw-r--r--engines/titanic/sound/restricted_auto_music_player.cpp5
-rw-r--r--engines/titanic/sound/restricted_auto_music_player.h5
-rw-r--r--engines/titanic/sound/room_auto_sound_player.cpp5
-rw-r--r--engines/titanic/sound/room_auto_sound_player.h5
-rw-r--r--engines/titanic/sound/room_trigger_auto_music_player.cpp42
-rw-r--r--engines/titanic/sound/room_trigger_auto_music_player.h50
-rw-r--r--engines/titanic/sound/titania_speech.cpp5
-rw-r--r--engines/titanic/sound/titania_speech.h5
10 files changed, 129 insertions, 5 deletions
diff --git a/engines/titanic/sound/music_player.cpp b/engines/titanic/sound/music_player.cpp
index 6bab2d91dc..e2299e6297 100644
--- a/engines/titanic/sound/music_player.cpp
+++ b/engines/titanic/sound/music_player.cpp
@@ -44,4 +44,9 @@ void CMusicPlayer::load(SimpleFile *file) {
CGameObject::load(file);
}
+bool CMusicPlayer::handleEvent(const CEnterRoomMsg &msg) {
+ warning("TODO: CMusicPlayer::handleEvent");
+ return true;
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/sound/music_player.h b/engines/titanic/sound/music_player.h
index 0a750cc538..1796a25d4b 100644
--- a/engines/titanic/sound/music_player.h
+++ b/engines/titanic/sound/music_player.h
@@ -24,15 +24,18 @@
#define TITANIC_MUSIC_PLAYER_H
#include "titanic/core/game_object.h"
+#include "titanic/messages/messages.h"
namespace Titanic {
-class CMusicPlayer : public CGameObject {
-public:
+class CMusicPlayer : public CGameObject, CEnterRoomMsgTarget {
+protected:
int _fieldBC;
CString _string1;
int _fieldCC;
int _fieldD0;
+protected:
+ virtual bool handleEvent(const CEnterRoomMsg &msg);
public:
CLASSDEF
CMusicPlayer() : CGameObject(),
diff --git a/engines/titanic/sound/restricted_auto_music_player.cpp b/engines/titanic/sound/restricted_auto_music_player.cpp
index 442dc90ce2..a57769bf25 100644
--- a/engines/titanic/sound/restricted_auto_music_player.cpp
+++ b/engines/titanic/sound/restricted_auto_music_player.cpp
@@ -44,4 +44,9 @@ void CRestrictedAutoMusicPlayer::load(SimpleFile *file) {
CAutoMusicPlayer::load(file);
}
+bool CRestrictedAutoMusicPlayer::handleEvent(const CEnterRoomMsg &msg) {
+ warning("CRestrictedAutoMusicPlayer::handleEvent");
+ return true;
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/sound/restricted_auto_music_player.h b/engines/titanic/sound/restricted_auto_music_player.h
index cb6220cbc7..60dcc6809d 100644
--- a/engines/titanic/sound/restricted_auto_music_player.h
+++ b/engines/titanic/sound/restricted_auto_music_player.h
@@ -24,15 +24,18 @@
#define TITANIC_RESTRICTED_AUTO_MUSIC_PLAYER_H
#include "titanic/sound/auto_music_player.h"
+#include "titanic/messages/messages.h"
namespace Titanic {
-class CRestrictedAutoMusicPlayer : public CAutoMusicPlayer {
+class CRestrictedAutoMusicPlayer : public CAutoMusicPlayer, CEnterRoomMsgTarget {
private:
CString _string3;
CString _string4;
CString _string5;
CString _string6;
+protected:
+ virtual bool handleEvent(const CEnterRoomMsg &msg);
public:
CLASSDEF
diff --git a/engines/titanic/sound/room_auto_sound_player.cpp b/engines/titanic/sound/room_auto_sound_player.cpp
index 8c54726afc..b8557aaa81 100644
--- a/engines/titanic/sound/room_auto_sound_player.cpp
+++ b/engines/titanic/sound/room_auto_sound_player.cpp
@@ -34,4 +34,9 @@ void CRoomAutoSoundPlayer::load(SimpleFile *file) {
CAutoSoundPlayer::load(file);
}
+bool CRoomAutoSoundPlayer::handleEvent(const CEnterRoomMsg &msg) {
+ warning("CRoomAutoSoundPlayer::handleEvent");
+ return true;
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/sound/room_auto_sound_player.h b/engines/titanic/sound/room_auto_sound_player.h
index ebee0165f6..bda9727a0f 100644
--- a/engines/titanic/sound/room_auto_sound_player.h
+++ b/engines/titanic/sound/room_auto_sound_player.h
@@ -24,10 +24,13 @@
#define TITANIC_ROOM_AUTO_SOUND_PLAYER_H
#include "titanic/sound/auto_sound_player.h"
+#include "titanic/messages/messages.h"
namespace Titanic {
-class CRoomAutoSoundPlayer : public CAutoSoundPlayer {
+class CRoomAutoSoundPlayer : public CAutoSoundPlayer, CEnterRoomMsgTarget {
+protected:
+ virtual bool handleEvent(const CEnterRoomMsg &msg);
public:
CLASSDEF
diff --git a/engines/titanic/sound/room_trigger_auto_music_player.cpp b/engines/titanic/sound/room_trigger_auto_music_player.cpp
new file mode 100644
index 0000000000..9e4da684d9
--- /dev/null
+++ b/engines/titanic/sound/room_trigger_auto_music_player.cpp
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "titanic/sound/room_trigger_auto_music_player.h"
+
+namespace Titanic {
+
+void CRoomTriggerAutoMusicPlayer::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ CTriggerAutoMusicPlayer::save(file, indent);
+}
+
+void CRoomTriggerAutoMusicPlayer::load(SimpleFile *file) {
+ file->readNumber();
+ CTriggerAutoMusicPlayer::load(file);
+}
+
+bool CRoomTriggerAutoMusicPlayer::handleEvent(const CEnterRoomMsg &msg) {
+ warning("CRoomTriggerAutoMusicPlayer::handleEvent");
+ return true;
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/sound/room_trigger_auto_music_player.h b/engines/titanic/sound/room_trigger_auto_music_player.h
new file mode 100644
index 0000000000..1915f92de1
--- /dev/null
+++ b/engines/titanic/sound/room_trigger_auto_music_player.h
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef TITANIC_ROOM_TRIGGER_AUTO_MUSIC_PLAYER_H
+#define TITANIC_ROOM_TRIGGER_AUTO_MUSIC_PLAYER_H
+
+#include "titanic/sound/trigger_auto_music_player.h"
+#include "titanic/messages/messages.h"
+
+namespace Titanic {
+
+class CRoomTriggerAutoMusicPlayer : public CTriggerAutoMusicPlayer, CEnterRoomMsgTarget {
+protected:
+ virtual bool handleEvent(const CEnterRoomMsg &msg);
+public:
+ CLASSDEF
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent) const;
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_ROOM_TRIGGER_AUTO_MUSIC_PLAYER_H */
diff --git a/engines/titanic/sound/titania_speech.cpp b/engines/titanic/sound/titania_speech.cpp
index fac166901f..87ab18a2cb 100644
--- a/engines/titanic/sound/titania_speech.cpp
+++ b/engines/titanic/sound/titania_speech.cpp
@@ -40,4 +40,9 @@ void CTitaniaSpeech::load(SimpleFile *file) {
CGameObject::load(file);
}
+bool CTitaniaSpeech::handleEvent(const CEnterRoomMsg &msg) {
+ warning("CTitaniaSpeech::handleEvent");
+ return true;
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/sound/titania_speech.h b/engines/titanic/sound/titania_speech.h
index fc55c20af5..a981029c7d 100644
--- a/engines/titanic/sound/titania_speech.h
+++ b/engines/titanic/sound/titania_speech.h
@@ -24,12 +24,15 @@
#define TITANIC_TITANIA_SPEECH_H
#include "titanic/core/game_object.h"
+#include "titanic/messages/messages.h"
namespace Titanic {
class CTitaniaSpeech : public CGameObject {
-public:
+private:
int _value1, _value2;
+protected:
+ virtual bool handleEvent(const CEnterRoomMsg &msg);
public:
CLASSDEF
CTitaniaSpeech() : CGameObject(), _value1(1), _value2(0) {}