diff options
Diffstat (limited to 'engines/kyra/sound_towns.cpp')
-rw-r--r-- | engines/kyra/sound_towns.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index ee2ea6b6e4..af741a1ebe 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -174,8 +174,8 @@ void SoundTowns::playSoundEffect(uint8 track, uint8) { } } - uint8 *fileBody = _sfxFileData + 0x01b8; - int32 offset = (int32)READ_LE_UINT32(_sfxFileData + (track - 0x0b) * 4); + uint8 *fileBody = _sfxFileData + 0x01B8; + int32 offset = (int32)READ_LE_UINT32(_sfxFileData + (track - 0x0B) * 4); if (offset == -1) return; @@ -214,10 +214,10 @@ void SoundTowns::playSoundEffect(uint8 track, uint8) { sfx_WdTable_Number = READ_LE_UINT16(_sfxWDTable + sfx_WdTable_Offset); sfx_BtTable_Offset += (int16)READ_LE_UINT16(_sfxWDTable + sfx_WdTable_Offset + 2); - *tgt++ = _sfxBTTable[((sfx_BtTable_Offset >> 2) & 0xff)]; + *tgt++ = _sfxBTTable[((sfx_BtTable_Offset >> 2) & 0xFF)]; sfx_BtTable_Offset += (int16)READ_LE_UINT16(_sfxWDTable + sfx_WdTable_Offset + 4); - *tgt++ = _sfxBTTable[((sfx_BtTable_Offset >> 2) & 0xff)]; + *tgt++ = _sfxBTTable[((sfx_BtTable_Offset >> 2) & 0xFF)]; } } @@ -293,7 +293,7 @@ void SoundTowns::beginFadeOut() { for (int ii = 0; ii < 6; ii++) _driver->chanVolume(ii, fadeVolCur[ii]); for (int ii = 0x40; ii < 0x46; ii++) - _driver->chanVolume(ii, fadeVolCur[ii - 0x3a]); + _driver->chanVolume(ii, fadeVolCur[ii - 0x3A]); for (int ii = 0; ii < 6; ii++) { fadeVolCur[ii] -= fadeVolStep[ii]; @@ -525,7 +525,9 @@ bool SoundTownsPC98_v2::init() { TownsPC98_AudioDriver::kType86 : TownsPC98_AudioDriver::kTypeTowns); if (_vm->gameFlags().platform == Common::kPlatformFMTowns) { - _vm->checkCD(); + if (_resInfo[_currentResourceSet]) + if (_resInfo[_currentResourceSet]->cdaTableSize) + _vm->checkCD(); // FIXME: While checking for 'track1.XXX(X)' looks like // a good idea, we should definitely not be doing this // here. Basically our filenaming scheme could change @@ -694,7 +696,7 @@ int32 SoundTownsPC98_v2::voicePlay(const char *file, Audio::SoundHandle *handle, cmd = ~cmd; } else { cmd |= 0x80; - if (cmd == 0xff) + if (cmd == 0xFF) cmd--; } if (cmd < 0x80) |