Fixed the music in some Mac versions of ITE and disabled some unused code for the original DOS demo of ITE

svn-id: r48139
This commit is contained in:
Filippos Karapetis 2010-02-26 22:24:48 +00:00
parent bd2e65a02f
commit 3f2471418d
3 changed files with 14 additions and 1 deletions

View File

@ -306,6 +306,13 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
if (!_digitalMusicContext->isCompressed()) {
byte musicFlags = Audio::FLAG_STEREO |
Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN;
if (_vm->isBigEndian())
musicFlags &= ~Audio::FLAG_LITTLE_ENDIAN;
if (_vm->getFeatures() & GF_MONO_MUSIC)
musicFlags &= ~Audio::FLAG_STEREO;
audioStream = Audio::makeRawStream(musicStream, 11025, musicFlags, DisposeAfterUse::YES);
} else {
// Read compressed header to determine compression type

View File

@ -145,7 +145,9 @@ enum GameFeatures {
GF_ITE_FLOPPY = 1 << 1,
GF_SCENE_SUBSTITUTES = 1 << 2,
GF_NON_INTERACTIVE = 1 << 3,
GF_OLD_ITE_DOS = 1 << 4,
#if 0
GF_OLD_ITE_DOS = 1 << 4, // Currently unused
#endif
GF_MONO_MUSIC = 1 << 5,
GF_EXTRA_ITE_CREDITS = 1 << 6,
GF_IHNM_DEMO = 1 << 7,

View File

@ -988,15 +988,19 @@ void Script::opSpeak(SCRIPTOP_PARAMS) {
// now data contains last string index
#if 0
if (_vm->getFeatures() & GF_OLD_ITE_DOS) { // special ITE dos
if ((_vm->_scene->currentSceneNumber() == ITE_DEFAULT_SCENE) &&
(iparam1 >= 288) && (iparam1 <= (RID_SCENE1_VOICE_END - RID_SCENE1_VOICE_START + 288))) {
sampleResourceId = RID_SCENE1_VOICE_START + iparam1 - 288;
}
} else {
#endif
if (thread->_voiceLUT->voicesCount > first)
sampleResourceId = thread->_voiceLUT->voices[first];
#if 0
}
#endif
if (sampleResourceId < 0 || sampleResourceId > 4000)
sampleResourceId = -1;