aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorFlorian Kagerer2009-11-19 22:17:27 +0000
committerFlorian Kagerer2009-11-19 22:17:27 +0000
commit1a984d8e7d1e8e4e6456c73004d2d0f6bfae10ee (patch)
treedda60dead3d319c432290a9733a3452649cd4321 /engines/kyra
parent34dd625228915141722af886d89722e928950abc (diff)
downloadscummvm-rg350-1a984d8e7d1e8e4e6456c73004d2d0f6bfae10ee.tar.gz
scummvm-rg350-1a984d8e7d1e8e4e6456c73004d2d0f6bfae10ee.tar.bz2
scummvm-rg350-1a984d8e7d1e8e4e6456c73004d2d0f6bfae10ee.zip
LOL: add support for pc speaker sfx
svn-id: r45992
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/lol.cpp2
-rw-r--r--engines/kyra/lol.h2
-rw-r--r--engines/kyra/resource.h4
-rw-r--r--engines/kyra/sound_lol.cpp2
-rw-r--r--engines/kyra/staticres.cpp5
5 files changed, 9 insertions, 6 deletions
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);