From 1a984d8e7d1e8e4e6456c73004d2d0f6bfae10ee Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Thu, 19 Nov 2009 22:17:27 +0000 Subject: LOL: add support for pc speaker sfx svn-id: r45992 --- engines/kyra/lol.cpp | 2 +- engines/kyra/lol.h | 2 ++ engines/kyra/resource.h | 4 +--- engines/kyra/sound_lol.cpp | 2 ++ engines/kyra/staticres.cpp | 5 +++-- 5 files changed, 9 insertions(+), 6 deletions(-) (limited to 'engines/kyra') diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 7721f18cc8..6f122c890e 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -106,7 +106,7 @@ LoLEngine::LoLEngine(OSystem *system, const GameFlags &flags) : KyraEngine_v1(sy _healOverlay = 0; _swarmSpellStatus = 0; - _ingameMT32SoundIndex = _ingameGMSoundIndex = /*_ingameADLSoundIndex =*/ 0; + _ingameMT32SoundIndex = _ingameGMSoundIndex = _ingamePCSpeakerSoundIndex = 0; _charSelection = -1; _characters = 0; diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index 35560969b9..0f2bca21e0 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -503,6 +503,8 @@ private: int _ingameGMSoundIndexSize; const uint8 *_ingameMT32SoundIndex; int _ingameMT32SoundIndexSize; + const uint8 *_ingamePCSpeakerSoundIndex; + int _ingamePCSpeakerSoundIndexSize; AudioDataStruct _soundData[3]; diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index a5bfdfae03..f82985e331 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -226,7 +226,7 @@ enum KyraResources { kLolMusicTrackMap, kLolIngameGMSfxIndex, kLolIngameMT32SfxIndex, - //kLolIngameADLSfxIndex, + kLolIngamePcSpkSfxIndex, kLolSpellProperties, kLolGameShapeMap, kLolSceneItemOffs, @@ -235,7 +235,6 @@ enum KyraResources { kLolCharDefsMan, kLolCharDefsWoman, kLolCharDefsKieran, - //kLolCharDefsUnk, kLolCharDefsAkshel, kLolExpRequirements, kLolMonsterModifiers, @@ -293,7 +292,6 @@ enum KyraResources { kLolLegendData, kLolMapCursorOvl, kLolMapStringId, - //kLolMapPal, kLolSpellbookAnim, kLolSpellbookCoords, diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp index 41a3936172..328a0e02d0 100644 --- a/engines/kyra/sound_lol.cpp +++ b/engines/kyra/sound_lol.cpp @@ -189,6 +189,8 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) { track = (track < _ingameMT32SoundIndexSize) ? (_ingameMT32SoundIndex[track] - 1) : -1; else if (_sound->getSfxType() == Sound::kMidiGM) track = (track < _ingameGMSoundIndexSize) ? (_ingameGMSoundIndex[track] - 1) : -1; + else if (_sound->getSfxType() == Sound::kPCSpkr) + track = (track < _ingamePCSpeakerSoundIndexSize) ? (_ingamePCSpeakerSoundIndex[track] - 1) : -1; if (track == 168) track = 167; diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index f10aea9741..aead2ff48e 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -45,7 +45,7 @@ namespace Kyra { -#define RESFILE_VERSION 62 +#define RESFILE_VERSION 63 namespace { bool checkKyraDat(Common::SeekableReadStream *file) { @@ -397,6 +397,7 @@ bool StaticResource::init() { { kLolMusicTrackMap, kRawData, "MUSIC.MAP" }, { kLolIngameGMSfxIndex, kRawData, "SFX_GM.MAP" }, { kLolIngameMT32SfxIndex, kRawData, "SFX_MT32.MAP" }, + { kLolIngamePcSpkSfxIndex, kRawData, "SFX_PCS.MAP" }, { kLolSpellProperties, kLolSpellData, "SPELLS.DEF" }, { kLolGameShapeMap, kRawData, "GAMESHP.MAP" }, { kLolSceneItemOffs, kRawData, "ITEMOFFS.DEF" }, @@ -1867,7 +1868,7 @@ void LoLEngine::initStaticResource() { _musicTrackMap = _staticres->loadRawData(kLolMusicTrackMap, _musicTrackMapSize); _ingameGMSoundIndex = _staticres->loadRawData(kLolIngameGMSfxIndex, _ingameGMSoundIndexSize); _ingameMT32SoundIndex = _staticres->loadRawData(kLolIngameMT32SfxIndex, _ingameMT32SoundIndexSize); - //_ingameADLSoundIndex = _staticres->loadRawData(kLolIngameADLSfxIndex, _ingameADLSoundIndexSize); + _ingamePCSpeakerSoundIndex = _staticres->loadRawData(kLolIngamePcSpkSfxIndex, _ingamePCSpeakerSoundIndexSize); _spellProperties = _staticres->loadSpellData(kLolSpellProperties, _spellPropertiesSize); _gameShapeMap = (const int8 *)_staticres->loadRawData(kLolGameShapeMap, _gameShapeMapSize); _sceneItemOffs = (const int8 *)_staticres->loadRawData(kLolSceneItemOffs, _sceneItemOffsSize); -- cgit v1.2.3