aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/sound
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/sound')
-rw-r--r--engines/titanic/sound/sound.cpp4
-rw-r--r--engines/titanic/sound/sound.h6
-rw-r--r--engines/titanic/sound/sound_manager.cpp4
-rw-r--r--engines/titanic/sound/sound_manager.h8
-rw-r--r--engines/titanic/sound/wave_file.cpp27
-rw-r--r--engines/titanic/sound/wave_file.h54
6 files changed, 92 insertions, 11 deletions
diff --git a/engines/titanic/sound/sound.cpp b/engines/titanic/sound/sound.cpp
index 68fb3aeeb6..3e4f154c35 100644
--- a/engines/titanic/sound/sound.cpp
+++ b/engines/titanic/sound/sound.cpp
@@ -56,11 +56,11 @@ bool CSound::fn1(int val) {
return false;
}
-void CSound::fn2(int val) {
+void CSound::fn2(int handle) {
warning("TODO: CSound::fn3");
}
-void CSound::fn3(int val, int val2, int val3) {
+void CSound::fn3(int handle, int val2, int val3) {
warning("TODO: CSound::fn3");
}
diff --git a/engines/titanic/sound/sound.h b/engines/titanic/sound/sound.h
index 19a8edfc21..dfbee0a9dd 100644
--- a/engines/titanic/sound/sound.h
+++ b/engines/titanic/sound/sound.h
@@ -35,7 +35,7 @@ class CGameManager;
class CSoundItem : public ListItem {
public:
CString _name;
- uint _soundHandle;
+ int _soundHandle;
int _field1C;
int _field20;
int _field24;
@@ -113,8 +113,8 @@ public:
uint loadSound(const CString &name);
bool fn1(int val);
- void fn2(int val);
- void fn3(int val, int val2, int val3);
+ void fn2(int handle);
+ void fn3(int handle, int val2, int val3);
void managerProc8(int v) { _soundManager.proc8(v); }
};
diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp
index 5c26527e09..fa1e5fb166 100644
--- a/engines/titanic/sound/sound_manager.cpp
+++ b/engines/titanic/sound/sound_manager.cpp
@@ -34,7 +34,7 @@ QSoundManager::QSoundManager() : _field18(0), _field1C(0) {
Common::fill(&_field4A0[0], &_field4A0[16], 0);
}
-uint QSoundManager::loadSound(const CString &name) {
+int QSoundManager::loadSound(const CString &name) {
warning("TODO");
return 0;
}
@@ -86,7 +86,7 @@ bool QSoundManager::proc14() {
return false;
}
-bool QSoundManager::isActive(uint handle) const {
+bool QSoundManager::isActive(int handle) const {
warning("TODO");
return false;
}
diff --git a/engines/titanic/sound/sound_manager.h b/engines/titanic/sound/sound_manager.h
index 84d9aeb5bd..e9fd1faf0a 100644
--- a/engines/titanic/sound/sound_manager.h
+++ b/engines/titanic/sound/sound_manager.h
@@ -42,7 +42,7 @@ public:
* @param name Name of sound resource
* @returns Loaded sound handle
*/
- virtual uint loadSound(const CString &name) { return 0; }
+ virtual int loadSound(const CString &name) { return 0; }
virtual int proc4() const { return 0; }
virtual int proc5() const { return 0; }
@@ -55,7 +55,7 @@ public:
virtual void proc12() {}
virtual void proc13() {}
virtual bool proc14() = 0;
- virtual bool isActive(uint handle) const { return false; }
+ virtual bool isActive(int handle) const { return false; }
virtual int proc16() const { return 0; }
virtual void WaveMixPump() {}
virtual int proc18() const { return 0; }
@@ -111,7 +111,7 @@ public:
* @param name Name of sound resource
* @returns Loaded sound handle
*/
- virtual uint loadSound(const CString &name);
+ virtual int loadSound(const CString &name);
virtual int proc4();
virtual int proc5();
@@ -124,7 +124,7 @@ public:
virtual void proc12();
virtual void proc13();
virtual bool proc14();
- virtual bool isActive(uint handle) const;
+ virtual bool isActive(int handle) const;
virtual int proc16();
virtual void WaveMixPump();
virtual int proc18() const;
diff --git a/engines/titanic/sound/wave_file.cpp b/engines/titanic/sound/wave_file.cpp
new file mode 100644
index 0000000000..288f5f525d
--- /dev/null
+++ b/engines/titanic/sound/wave_file.cpp
@@ -0,0 +1,27 @@
+/* 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/wave_file.h"
+
+namespace Titanic {
+
+} // End of namespace Titanic z
diff --git a/engines/titanic/sound/wave_file.h b/engines/titanic/sound/wave_file.h
new file mode 100644
index 0000000000..0bb836ef74
--- /dev/null
+++ b/engines/titanic/sound/wave_file.h
@@ -0,0 +1,54 @@
+/* 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_WAVE_FILE_H
+#define TITANIC_WAVE_FILE_H
+
+#include "titanic/support/simple_file.h"
+
+namespace Titanic {
+
+class CSoundManager;
+
+class WaveFile {
+public:
+ int _field0;
+ int _field4;
+ int _field8;
+ uint _handle;
+ CSoundManager *_owner;
+ int _field14;
+ int _field18;
+ int _field1C;
+ int _field20;
+ int _field24;
+ int _field28;
+ int _field2C;
+public:
+ WaveFile() : _field0(2), _field4(0), _field8(0), _handle(0),
+ _owner(nullptr), _field14(1), _field18(0), _field1C(0),
+ _field20(0), _field24(0), _field28(0), _field2C(-1) {}
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_WAVE_FILE_H */