[Scummvm-cvs-logs] SF.net SVN: scummvm: [28332] scummvm/trunk/engines/saga
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Jul 30 20:26:56 CEST 2007
Revision: 28332
http://scummvm.svn.sourceforge.net/scummvm/?rev=28332&view=rev
Author: thebluegr
Date: 2007-07-30 11:26:56 -0700 (Mon, 30 Jul 2007)
Log Message:
-----------
Music works now in the IHNM demo
Modified Paths:
--------------
scummvm/trunk/engines/saga/detection_tables.h
scummvm/trunk/engines/saga/ihnm_introproc.cpp
scummvm/trunk/engines/saga/music.cpp
scummvm/trunk/engines/saga/rscfile.cpp
Modified: scummvm/trunk/engines/saga/detection_tables.h
===================================================================
--- scummvm/trunk/engines/saga/detection_tables.h 2007-07-30 17:45:43 UTC (rev 28331)
+++ scummvm/trunk/engines/saga/detection_tables.h 2007-07-30 18:26:56 UTC (rev 28332)
@@ -713,6 +713,7 @@
"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},
Modified: scummvm/trunk/engines/saga/ihnm_introproc.cpp
===================================================================
--- scummvm/trunk/engines/saga/ihnm_introproc.cpp 2007-07-30 17:45:43 UTC (rev 28331)
+++ scummvm/trunk/engines/saga/ihnm_introproc.cpp 2007-07-30 18:26:56 UTC (rev 28332)
@@ -225,6 +225,16 @@
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 @@
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 @@
// 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 @@
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;
Modified: scummvm/trunk/engines/saga/music.cpp
===================================================================
--- scummvm/trunk/engines/saga/music.cpp 2007-07-30 17:45:43 UTC (rev 28331)
+++ scummvm/trunk/engines/saga/music.cpp 2007-07-30 18:26:56 UTC (rev 28332)
@@ -517,8 +517,10 @@
// 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);
Modified: scummvm/trunk/engines/saga/rscfile.cpp
===================================================================
--- scummvm/trunk/engines/saga/rscfile.cpp 2007-07-30 17:45:43 UTC (rev 28331)
+++ scummvm/trunk/engines/saga/rscfile.cpp 2007-07-30 18:26:56 UTC (rev 28332)
@@ -683,7 +683,7 @@
_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 @@
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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list