[Scummvm-cvs-logs] CVS: scummvm/saga ihnm_introproc.cpp,1.21,1.22 music.cpp,1.32,1.33 music.h,1.14,1.15 saga.cpp,1.63,1.64 scene.h,1.16,1.17
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Sat Nov 20 09:20:01 CET 2004
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10888
Modified Files:
ihnm_introproc.cpp music.cpp music.h saga.cpp scene.h
Log Message:
I'm told that the FM music file sounds terrible with MT-32 and that the
MT-32 is perfectly capable of playing General MIDI. My new guess is that
the FM file is for Adlib instead. It certainly sounds better - but quite
different - than playing the GM track through Adlib.
Index: ihnm_introproc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/ihnm_introproc.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- ihnm_introproc.cpp 19 Nov 2004 07:41:59 -0000 1.21
+++ ihnm_introproc.cpp 20 Nov 2004 17:19:14 -0000 1.22
@@ -31,6 +31,7 @@
#include "saga/cvar_mod.h"
#include "saga/events.h"
#include "saga/rscfile_mod.h"
+#include "saga/music.h"
#include "saga/scene.h"
@@ -258,7 +259,7 @@
event.type = ONESHOT_EVENT;
event.code = SCENE_EVENT;
event.op = EVENT_END;
- event.time = IHNM_TITLE_TIME;
+ event.time = _vm->_music->hasAdlib() ? IHNM_TITLE_TIME_ADLIB : IHNM_TITLE_TIME_GM;
q_event = _vm->_events->chain(q_event, &event);
break;
Index: music.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/music.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- music.cpp 19 Nov 2004 07:41:59 -0000 1.32
+++ music.cpp 20 Nov 2004 17:19:15 -0000 1.33
@@ -296,7 +296,7 @@
}
}
-Music::Music(SoundMixer *mixer, MidiDriver *driver, int enabled) : _mixer(mixer), _enabled(enabled) {
+Music::Music(SoundMixer *mixer, MidiDriver *driver, int enabled) : _mixer(mixer), _enabled(enabled), _adlib(false) {
_player = new MusicPlayer(driver);
_musicInitialized = 1;
_mixer->setMusicVolume(ConfMan.getInt("music_volume"));
@@ -454,20 +454,18 @@
} else {
// Load MIDI/XMI resource data
- 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 {
+ // TODO: I'm not sure if this is right, but the FM file
+ // sounds better with Adlib than the AM file does. On
+ // the other hand, it doesn't sound like quite the same
+ // music, which is strange.
+
+ if (hasAdlib()) {
rsc_ctxt = GAME_GetFileContext(GAME_MUSICFILE_FM, 0);
+ } else {
+ rsc_ctxt = GAME_GetFileContext(GAME_MUSICFILE_GM, 0);
}
}
@@ -477,7 +475,7 @@
return FAILURE;
}
- _player->setGM(isGM);
+ _player->setGM(true);
parser = MidiParser::createParser_XMIDI();
}
Index: music.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/music.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- music.h 19 Nov 2004 07:41:59 -0000 1.14
+++ music.h 20 Nov 2004 17:19:15 -0000 1.15
@@ -108,6 +108,8 @@
~Music(void);
void setNativeMT32(bool b) { _player->setNativeMT32(b); }
bool hasNativeMT32() { return _player->hasNativeMT32(); }
+ void setAdlib(bool b) { _adlib = b; }
+ bool hasAdlib() { return _adlib; }
void setPassThrough(bool b) { _player->setPassThrough(b); }
int play(uint32 music_rn, uint16 flags = MUSIC_DEFAULT);
@@ -128,6 +130,7 @@
int _musicInitialized;
int _enabled;
bool _hasDigiMusic;
+ bool _adlib;
RSCFILE_CONTEXT *_musicContext;
const char *_musicFname;
Index: saga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- saga.cpp 19 Nov 2004 22:33:24 -0000 1.63
+++ saga.cpp 20 Nov 2004 17:19:15 -0000 1.64
@@ -193,14 +193,18 @@
int midiDriver = GameDetector::detectMusicDriver(MDT_NATIVE | MDT_ADLIB | MDT_PREFER_NATIVE);
bool native_mt32 = (ConfMan.getBool("native_mt32") || (midiDriver == MD_MT32));
+ bool adlib = false;
+
MidiDriver *driver = GameDetector::createMidi(midiDriver);
- if (!driver)
+ if (!driver) {
driver = MidiDriver_ADLIB_create(_mixer);
- else if (native_mt32)
+ adlib = true;
+ } else if (native_mt32)
driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
_music = new Music(_mixer, driver, _musicEnabled);
_music->setNativeMT32(native_mt32);
+ _music->setAdlib(adlib);
if (midiDriver == MD_MT32)
_music->setPassThrough(true);
Index: scene.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- scene.h 19 Nov 2004 07:41:59 -0000 1.16
+++ scene.h 20 Nov 2004 17:19:15 -0000 1.17
@@ -155,10 +155,11 @@
};
///// IHNM-specific stuff
-#define IHNM_PALFADE_TIME 1000
-#define IHNM_INTRO_FRAMETIME 80
-#define IHNM_DGLOGO_TIME 8000
-#define IHNM_TITLE_TIME 28750
+#define IHNM_PALFADE_TIME 1000
+#define IHNM_INTRO_FRAMETIME 80
+#define IHNM_DGLOGO_TIME 8000
+#define IHNM_TITLE_TIME_GM 28750
+#define IHNM_TITLE_TIME_ADLIB 20000
///// ITE-specific stuff
#define INTRO_STRMAX 256
More information about the Scummvm-git-logs
mailing list