[Scummvm-cvs-logs] CVS: scummvm/saga game.cpp,1.25,1.26 game_mod.h,1.10,1.11 ihnm_introproc.cpp,1.20,1.21 music.cpp,1.31,1.32 music.h,1.13,1.14 saga.cpp,1.59,1.60 scene.h,1.15,1.16

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Thu Nov 18 23:43:01 CET 2004


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16316

Modified Files:
	game.cpp game_mod.h ihnm_introproc.cpp music.cpp music.h 
	saga.cpp scene.h 
Log Message:
Added music to the partial IHNM intro. I think I picked the correct tune,
but I can't be absolutely sure.

I'm also not sure if I'm using the correct music data. I'm fairly sure that
the MUSICGM.RES file is the appropriate choice for "General MIDI", but I
have no way of verifying that the MUSICFM.RES is really the right choice
for MT-32. (Is either of them a good choice for Adlib, or are they both
equally bad?)


Index: game.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/game.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- game.cpp	15 Nov 2004 03:03:46 -0000	1.25
+++ game.cpp	19 Nov 2004 07:41:59 -0000	1.26
@@ -129,8 +129,8 @@
 
 // I Have No Mouth and I Must Scream - Retail CD version
 GAME_FILEDESC IHNMCD_GameFiles[] = {
-	{"MUSICFM.RES", GAME_MUSICFILE},
-	{"MUSICGM.RES", GAME_MUSICFILE},
+	{"MUSICFM.RES", GAME_MUSICFILE_FM},
+	{"MUSICGM.RES", GAME_MUSICFILE_GM},
 	{"SCREAM.RES", GAME_RESOURCEFILE},
 	{"SCRIPTS.RES", GAME_SCRIPTFILE},
 	{"SFX.RES", GAME_SOUNDFILE},

Index: game_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/game_mod.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- game_mod.h	15 Nov 2004 03:03:47 -0000	1.10
+++ game_mod.h	19 Nov 2004 07:41:59 -0000	1.11
@@ -45,7 +45,9 @@
 	GAME_SOUNDFILE = 0x04,
 	GAME_VOICEFILE = 0x08,
 	GAME_DEMOFILE = 0x10,
-	GAME_MUSICFILE = 0x20
+	GAME_MUSICFILE = 0x20,
+	GAME_MUSICFILE_GM = 0x40,
+	GAME_MUSICFILE_FM = 0x80
 };
 
 enum GAME_SOUNDINFO_TYPES {

Index: ihnm_introproc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/ihnm_introproc.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- ihnm_introproc.cpp	18 Nov 2004 17:34:51 -0000	1.20
+++ ihnm_introproc.cpp	19 Nov 2004 07:41:59 -0000	1.21
@@ -217,6 +217,16 @@
 
 		q_event = _vm->_events->queue(&event);
 
+		// Music, maestro
+		event.type = ONESHOT_EVENT;
+		event.code = MUSIC_EVENT;
+		event.param = 1;
+		event.param2 = 0;
+		event.op = EVENT_PLAY;
+		event.time = 0;
+
+		q_event = _vm->_events->queue(&event);
+
 		// Background for intro scene is the first frame of the
 		// intro animation; display it but don't set palette
 		event.type = ONESHOT_EVENT;
@@ -242,6 +252,9 @@
 		_vm->_anim->play(0, 0);
 
 		// Queue end of scene after a while
+		// TODO: I've increased the delay so the speech won't start
+		// until the music has ended. Could someone verify if that's
+		// the correct behaviour?
 		event.type = ONESHOT_EVENT;
 		event.code = SCENE_EVENT;
 		event.op = EVENT_END;

Index: music.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/music.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- music.cpp	15 Nov 2004 03:03:47 -0000	1.31
+++ music.cpp	19 Nov 2004 07:41:59 -0000	1.32
@@ -452,9 +452,24 @@
 		_player->setGM(true);
 		parser = MidiParser::createParser_SMF();
 	} else {
-		// Load XMI resource data
+		// Load MIDI/XMI resource data
 
-		rsc_ctxt = GAME_GetFileContext(GAME_RESOURCEFILE, 0);
+		bool isGM = false;
+
+		if (GAME_GetGameType() == GID_ITE) {
+			rsc_ctxt = GAME_GetFileContext(GAME_RESOURCEFILE, 0);
+		} else {
+			// TODO: Someone else will have to verify that the "FM"
+			// music is really the appropriate choice for MT-32. Is
+			// either of them the best choice for Adlib, or will
+			// they both sound equally wimpy?
+			if (!hasNativeMT32()) {
+				isGM = true;
+				rsc_ctxt = GAME_GetFileContext(GAME_MUSICFILE_GM, 0);
+			} else {
+				rsc_ctxt = GAME_GetFileContext(GAME_MUSICFILE_FM, 0);
+			}
+		}
 
 		if (RSC_LoadResource(rsc_ctxt, music_rn, &resource_data, 
 				&resource_size) != SUCCESS ) {
@@ -462,7 +477,7 @@
 			return FAILURE;
 		}
 
-		_player->setGM(false);
+		_player->setGM(isGM);
 		parser = MidiParser::createParser_XMIDI();
 	}
 

Index: music.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/music.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- music.h	15 Nov 2004 03:03:47 -0000	1.13
+++ music.h	19 Nov 2004 07:41:59 -0000	1.14
@@ -55,7 +55,8 @@
 	void setVolume(int volume);
 	int getVolume() { return _masterVolume; }
 
-	void hasNativeMT32(bool b) { _nativeMT32 = b; }
+	void setNativeMT32(bool b) { _nativeMT32 = b; }
+	bool hasNativeMT32() { return _nativeMT32; }
 	void playMusic();
 	void stopMusic();
 	void setLoop(bool loop) { _looping = loop; }
@@ -105,8 +106,9 @@
 
 	Music(SoundMixer *mixer, MidiDriver *driver, int enabled);
 	~Music(void);
-	void hasNativeMT32(bool b)		{ _player->hasNativeMT32(b); }
-	void setPassThrough(bool b)		{ _player->setPassThrough(b); }
+	void setNativeMT32(bool b)	{ _player->setNativeMT32(b); }
+	bool hasNativeMT32()		{ return _player->hasNativeMT32(); }
+	void setPassThrough(bool b)	{ _player->setPassThrough(b); }
 
 	int play(uint32 music_rn, uint16 flags = MUSIC_DEFAULT);
 	int pause(void);

Index: saga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- saga.cpp	18 Nov 2004 22:54:15 -0000	1.59
+++ saga.cpp	19 Nov 2004 07:41:59 -0000	1.60
@@ -197,7 +197,7 @@
 		driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
 
 	_music = new Music(_mixer, driver, _musicEnabled);
-	_music->hasNativeMT32(native_mt32);
+	_music->setNativeMT32(native_mt32);
 
 	if (midiDriver == MD_MT32)
 		_music->setPassThrough(true);

Index: scene.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- scene.h	27 Oct 2004 22:17:10 -0000	1.15
+++ scene.h	19 Nov 2004 07:41:59 -0000	1.16
@@ -158,7 +158,7 @@
 #define IHNM_PALFADE_TIME    1000
 #define IHNM_INTRO_FRAMETIME 80
 #define IHNM_DGLOGO_TIME     8000
-#define IHNM_TITLE_TIME      16000
+#define IHNM_TITLE_TIME      28750
 
 ///// ITE-specific stuff
 #define INTRO_STRMAX 256





More information about the Scummvm-git-logs mailing list