aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2004-01-25 05:03:35 +0000
committerTravis Howell2004-01-25 05:03:35 +0000
commitf4e26c9412b4edaf50602091f29a1c2362147107 (patch)
tree450c00adacc20eb9119e6e8825ebb966482f3164
parentd40d9b7f0d2145b231538227b08ba20d8ba890a7 (diff)
downloadscummvm-rg350-f4e26c9412b4edaf50602091f29a1c2362147107.tar.gz
scummvm-rg350-f4e26c9412b4edaf50602091f29a1c2362147107.tar.bz2
scummvm-rg350-f4e26c9412b4edaf50602091f29a1c2362147107.zip
Add support for music in fotaq demos
svn-id: r12585
-rw-r--r--queen/musicdata.cpp59
-rw-r--r--queen/sound.cpp12
-rw-r--r--queen/sound.h1
3 files changed, 69 insertions, 3 deletions
diff --git a/queen/musicdata.cpp b/queen/musicdata.cpp
index 280484b907..fbf148c37a 100644
--- a/queen/musicdata.cpp
+++ b/queen/musicdata.cpp
@@ -24,6 +24,65 @@
namespace Queen {
+const songData Sound::_songDemo[] = {
+ /* 1 - Hotel Gangsters */
+ { { 1, 0 }, 128, 180, 0, 1, 0 },
+
+ /* 2 - Arrive Hotel */
+ { { 42, 0 }, 128, 180, 0, 1, 0 },
+
+ /* 3 - Jungle */
+ { { 3, 4, 5, 6, 0 }, 128, 0, 0, 1, 0 },
+
+ /* 4 - Waterfall On */
+ { { 7, 0 }, 128, 0, 0, 0, 0 },
+
+ /* 5 - Vnormal */
+ { { 8, 0 }, 128, 0, 0, 2, 0 },
+
+ /* 6 - Bells? */
+ { { 9, 0 }, 120, 0, 0, 1, 0 },
+
+ /* 7 - Jetty Music */
+ { { 10, 0 }, 128, 0, 0, 1, 0 },
+
+ /* 8 - Ferry Music */
+ { { 11, 0 }, 128, 0, 0, 1, 0 },
+
+ /* 9 - Temple Upstairs */
+ { { 12, 0 }, 128, 0, 0, 1, 0 },
+
+ /* 10 - NULL */
+ { { 0, 0 }, 0, 0, 0, 0, 0 },
+
+ /* 11 - NULL */
+ { { 0, 0 }, 0, 0, 0, 0, 0 },
+
+ /* 12 - NULL */
+ { { 0, 0 }, 0, 0, 0, 0, 0 },
+
+ /* 13 - NULL */
+ { { 0, 0 }, 0, 0, 0, 0, 0 },
+
+ /* 14 - Unknown */
+ { { 17, 0 }, 120, 0, 0, 2, 0 },
+
+ /* 15 - Unknown */
+ { { 18, 0 }, 110, 0, 0, 2, 0 },
+
+ /* 16 - Floda Upstairs */
+ { { 19, 0 }, 110, 0, 0, 1, 0 },
+
+ /* 17 - Floda Lab */
+ { { 0, 0 }, 0, 0, 0, 0, 0 },
+
+ /* 18 - NULL */
+ { { 0, 0 }, 0, 0, 0, 0, 0 },
+
+ /* 19 - Hotel Lola */
+ { { 22, 0 }, 120, 180, 0, 1, 0 },
+};
+
const songData Sound::_song[] = {
/* 1 - Hotel Gangsters */
{ { 1, 0 }, 128, 180, 0, 1, 0 },
diff --git a/queen/sound.cpp b/queen/sound.cpp
index fa5c702e1f..51493e950e 100644
--- a/queen/sound.cpp
+++ b/queen/sound.cpp
@@ -99,7 +99,12 @@ void Sound::playSong(int16 songNum) {
return;
}
- int16 newTune = _song[songNum - 1].tuneList[0] - 1;
+ int16 newTune;
+ if (_vm->resource()->isDemo()) {
+ newTune = _songDemo[songNum - 1].tuneList[0] - 1;
+ } else {
+ newTune = _song[songNum - 1].tuneList[0] - 1;
+ }
if (_tune[newTune].sfx[0]) {
if (sfxOn())
@@ -107,10 +112,11 @@ void Sound::playSong(int16 songNum) {
return;
}
- if (!musicOn() || _vm->resource()->isDemo())
+ if (!musicOn())
return;
- switch (_song[songNum - 1].override) {
+ int override = (_vm->resource()->isDemo()) ? _songDemo[songNum - 1].override : _song[songNum - 1].override;
+ switch (override) {
// Override all songs
case 1:
break;
diff --git a/queen/sound.h b/queen/sound.h
index 6c657ffadc..99c84660de 100644
--- a/queen/sound.h
+++ b/queen/sound.h
@@ -78,6 +78,7 @@ public:
void saveState(byte *&ptr);
void loadState(uint32 ver, byte *&ptr);
+ static const songData _songDemo[];
static const songData _song[];
static const tuneData _tune[];
static const char *_sfxName[];