aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/saga/detection_tables.h1
-rw-r--r--engines/saga/ihnm_introproc.cpp16
-rw-r--r--engines/saga/music.cpp4
-rw-r--r--engines/saga/rscfile.cpp5
4 files changed, 20 insertions, 6 deletions
diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index b26a9b75d5..22e5ccdc50 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -713,6 +713,7 @@ static const SAGAGameDescription gameDescriptions[] = {
"ihnm",
"Demo",
{
+ {"music.res", GAME_MUSICFILE_FM, "0439083e3dfdc51b486071d45872ae52", -1},
{"scream.res", GAME_RESOURCEFILE, "46bbdc65d164ba7e89836a0935eec8e6", -1},
{"scripts.res", GAME_SCRIPTFILE, "9626bda8978094ff9b29198bc1ed5f9a", -1},
{"sfx.res", GAME_SOUNDFILE, "1c610d543f32ec8b525e3f652536f269", -1},
diff --git a/engines/saga/ihnm_introproc.cpp b/engines/saga/ihnm_introproc.cpp
index 33cfb57ce2..631da37e82 100644
--- a/engines/saga/ihnm_introproc.cpp
+++ b/engines/saga/ihnm_introproc.cpp
@@ -225,6 +225,16 @@ int Scene::IHNMIntroMovieProc1(int param) {
q_event = _vm->_events->chain(q_event, &event);
} else {
+ // Start playing the intro music for the demo version
+ event.type = kEvTOneshot;
+ event.code = kMusicEvent;
+ event.param = 1;
+ event.param2 = MUSIC_NORMAL;
+ event.op = kEventPlay;
+ event.time = 0;
+
+ q_event = _vm->_events->chain(q_event, &event);
+
// The IHNM demo doesn't have an animation at the
// Cyberdreans logo screen
@@ -232,7 +242,7 @@ int Scene::IHNMIntroMovieProc1(int param) {
event.type = kEvTOneshot;
event.code = kSceneEvent;
event.op = kEventEnd;
- event.time = 4000;
+ event.time = 8000;
q_event = _vm->_events->chain(q_event, &event);
}
@@ -360,8 +370,6 @@ int Scene::IHNMIntroMovieProc3(int param) {
// In the GM file, this music also appears as tracks 7, 13, 19,
// 25 and 31, but only track 1 sounds right with the FM music.
- // FIXME: MIDI music in the demo is problematic right now, so music is
- // disabled in this part
if (_vm->getGameId() != GID_IHNM_DEMO) {
event.type = kEvTOneshot;
event.code = kMusicEvent;
@@ -411,7 +419,7 @@ int Scene::IHNMIntroMovieProc3(int param) {
if (_vm->getGameId() != GID_IHNM_DEMO)
event.time = _vm->_music->hasAdlib() ? IHNM_TITLE_TIME_FM : IHNM_TITLE_TIME_GM;
else
- event.time = 10000;
+ event.time = 12000;
q_event = _vm->_events->chain(q_event, &event);
break;
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index 2e4868f412..24234864aa 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -517,8 +517,10 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
// Oddly enough, the intro music (song 1) is very
// different in the two files. I have no idea why.
+ // Note that the IHNM demo has only got one music file
+ // (music.rsc). It is assumed that it contains FM music
- if (hasAdlib()) {
+ if (hasAdlib() || _vm->getGameId() == GID_IHNM_DEMO) {
context = _vm->_resource->getContext(GAME_MUSICFILE_FM);
} else {
context = _vm->_resource->getContext(GAME_MUSICFILE_GM);
diff --git a/engines/saga/rscfile.cpp b/engines/saga/rscfile.cpp
index 3063e8a9a6..2db85cfc65 100644
--- a/engines/saga/rscfile.cpp
+++ b/engines/saga/rscfile.cpp
@@ -683,7 +683,7 @@ void Resource::loadGlobalResources(int chapter, int actorsEntrance) {
_vm->_anim->loadCutawayList(resourcePointer, resourceLength);
- if (_metaResource.songTableID > 0) {
+ if (_vm->getGameId() != GID_IHNM_DEMO) {
_vm->_resource->loadResource(resourceContext, _metaResource.songTableID, resourcePointer, resourceLength);
if (resourceLength == 0) {
@@ -700,6 +700,9 @@ void Resource::loadGlobalResources(int chapter, int actorsEntrance) {
for (i = 0; i < _vm->_music->_songTableLen; i++)
_vm->_music->_songTable[i] = songS.readSint32LE();
free(resourcePointer);
+ } else {
+ // The IHNM demo has a fixed music track and doesn't load a song table
+ _vm->_music->play(3, MUSIC_NORMAL);
}
int voiceLUTResourceID = 0;