aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/sound
diff options
context:
space:
mode:
authorPaul Gilbert2016-03-12 12:35:41 -0500
committerPaul Gilbert2016-03-12 12:35:41 -0500
commitc269c770ac27cbc845c06dfec8c7ac99d4fe657d (patch)
tree42116363a655eacab4dee0e7d0b129dd2b7b1f7b /engines/titanic/sound
parent60e137c65121bd284b200d97cc930c4d1e15114c (diff)
downloadscummvm-rg350-c269c770ac27cbc845c06dfec8c7ac99d4fe657d.tar.gz
scummvm-rg350-c269c770ac27cbc845c06dfec8c7ac99d4fe657d.tar.bz2
scummvm-rg350-c269c770ac27cbc845c06dfec8c7ac99d4fe657d.zip
TITANIC: Implemented sound manager loading
Diffstat (limited to 'engines/titanic/sound')
-rw-r--r--engines/titanic/sound/sound.cpp4
-rw-r--r--engines/titanic/sound/sound.h4
-rw-r--r--engines/titanic/sound/sound_manager.cpp127
-rw-r--r--engines/titanic/sound/sound_manager.h118
4 files changed, 250 insertions, 3 deletions
diff --git a/engines/titanic/sound/sound.cpp b/engines/titanic/sound/sound.cpp
index cea377eef7..35c1c708a6 100644
--- a/engines/titanic/sound/sound.cpp
+++ b/engines/titanic/sound/sound.cpp
@@ -28,11 +28,11 @@ CSound::CSound(CGameManager *owner) : _gameManager(owner) {
}
void CSound::save(SimpleFile *file) const {
-
+ _soundManager.save(file);
}
void CSound::load(SimpleFile *file) {
-
+ _soundManager.load(file);
}
} // End of namespace Titanic z
diff --git a/engines/titanic/sound/sound.h b/engines/titanic/sound/sound.h
index 2d0ccecbc5..6ae4019557 100644
--- a/engines/titanic/sound/sound.h
+++ b/engines/titanic/sound/sound.h
@@ -24,14 +24,16 @@
#define TITANIC_SOUND_H
#include "titanic/simple_file.h"
+#include "titanic/sound/sound_manager.h"
namespace Titanic {
class CGameManager;
class CSound {
-public:
+private:
CGameManager *_gameManager;
+ QSoundManager _soundManager;
public:
CSound(CGameManager *owner);
diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp
new file mode 100644
index 0000000000..143dd8385f
--- /dev/null
+++ b/engines/titanic/sound/sound_manager.cpp
@@ -0,0 +1,127 @@
+/* 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/sound_manager.h"
+
+namespace Titanic {
+
+SoundManager::SoundManager() : _field4(0), _field8(0),
+ _fieldC(0), _field10(0), _field14(1) {
+}
+
+/*------------------------------------------------------------------------*/
+
+QSoundManager::QSoundManager() : _field18(0), _field1C(0) {
+ Common::fill(&_field4A0[0], &_field4A0[16], 0);
+}
+
+int QSoundManager::proc3() {
+ warning("TODO");
+ return 0;
+}
+
+int QSoundManager::proc4() {
+ warning("TODO");
+ return 0;
+}
+
+int QSoundManager::proc5() {
+ warning("TODO");
+ return 0;
+}
+
+void QSoundManager::proc6() {
+ warning("TODO");
+}
+
+void QSoundManager::proc7() {
+ warning("TODO");
+}
+
+void QSoundManager::proc8() {
+ warning("TODO");
+}
+
+void QSoundManager::proc9() {
+ warning("TODO");
+}
+
+void QSoundManager::proc10() {
+ warning("TODO");
+}
+
+void QSoundManager::proc11() {
+ warning("TODO");
+}
+
+void QSoundManager::proc12() {
+ warning("TODO");
+}
+
+void QSoundManager::proc13() {
+ warning("TODO");
+}
+
+void QSoundManager::proc14() {
+ warning("TODO");
+}
+
+int QSoundManager::proc15() {
+ warning("TODO");
+ return 0;
+}
+
+int QSoundManager::proc16() {
+ warning("TODO");
+ return 0;
+}
+
+void QSoundManager::WaveMixPump() {
+ warning("TODO");
+}
+
+int QSoundManager::proc18() const {
+ warning("TODO");
+ return 0;
+}
+
+void QSoundManager::proc19(int v) {
+ warning("TODO");
+}
+
+void QSoundManager::proc20(int v) {
+ warning("TODO");
+}
+
+void QSoundManager::proc21(int v) {
+ warning("TODO");
+}
+
+void QSoundManager::proc29() {
+ warning("TODO");
+}
+
+void QSoundManager::proc30() {
+ warning("TODO");
+}
+
+} // End of namespace Titanic z
diff --git a/engines/titanic/sound/sound_manager.h b/engines/titanic/sound/sound_manager.h
new file mode 100644
index 0000000000..4936625245
--- /dev/null
+++ b/engines/titanic/sound/sound_manager.h
@@ -0,0 +1,118 @@
+/* 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_SOUND_MANAGER_H
+#define TITANIC_SOUND_MANAGER_H
+
+#include "titanic/simple_file.h"
+
+namespace Titanic {
+
+class SoundManager {
+protected:
+ int _field4;
+ int _field8;
+ int _fieldC;
+ int _field10;
+ int _field14;
+public:
+ SoundManager();
+
+ virtual int proc3() const { return 0; }
+ virtual int proc4() const { return 0; }
+ virtual int proc5() const { return 0; }
+ virtual void proc6() = 0;
+ virtual void proc7() = 0;
+ virtual void proc8() = 0;
+ virtual void proc9() {}
+ virtual void proc10() = 0;
+ virtual void proc11() = 0;
+ virtual void proc12() {}
+ virtual void proc13() {}
+ virtual void proc14() = 0;
+ virtual int proc15() const { return 0; }
+ virtual int proc16() const { return 0; }
+ virtual void WaveMixPump() {}
+ virtual int proc18() const { return 0; }
+ virtual void proc19(int v) { _field4 = v; }
+ virtual void proc20(int v) { _field8 = v; }
+ virtual void proc21(int v) { _fieldC = v; }
+ virtual void proc22(int v) { _field10 = v; }
+ virtual void proc23() { proc10(); }
+
+ /**
+ * Load the data for the class from file
+ */
+ void load(SimpleFile *file) {}
+
+ virtual void proc25() {}
+ virtual void proc26() {}
+
+ /**
+ * Save the data for the class to file
+ */
+ void save(SimpleFile *file) const {}
+
+ /**
+ * Called after saving is complete
+ */
+ virtual void postSave() {}
+
+ virtual void proc29() {}
+};
+
+class QSoundManager : public SoundManager {
+public:
+ int _field18;
+ int _field1C;
+
+ int _field4A0[16];
+public:
+ QSoundManager();
+
+ virtual int proc3();
+ virtual int proc4();
+ virtual int proc5();
+ virtual void proc6();
+ virtual void proc7();
+ virtual void proc8();
+ virtual void proc9();
+ virtual void proc10();
+ virtual void proc11();
+ virtual void proc12();
+ virtual void proc13();
+ virtual void proc14();
+ virtual int proc15();
+ virtual int proc16();
+ virtual void WaveMixPump();
+ virtual int proc18() const;
+ virtual void proc19(int v);
+ virtual void proc20(int v);
+ virtual void proc21(int v);
+
+ virtual void proc29();
+ virtual void proc30();
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_QSOUND_MANAGER_H */