aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Kagerer2009-11-19 22:17:27 +0000
committerFlorian Kagerer2009-11-19 22:17:27 +0000
commit1a984d8e7d1e8e4e6456c73004d2d0f6bfae10ee (patch)
treedda60dead3d319c432290a9733a3452649cd4321
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
-rw-r--r--dists/engine-data/kyra.datbin336375 -> 336918 bytes
-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
-rw-r--r--tools/create_kyradat/create_kyradat.cpp6
-rw-r--r--tools/create_kyradat/create_kyradat.h4
-rw-r--r--tools/create_kyradat/games.cpp2
-rw-r--r--tools/create_kyradat/tables.cpp7
10 files changed, 23 insertions, 11 deletions
diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat
index 9e65c581cc..d6bcca3fb4 100644
--- a/dists/engine-data/kyra.dat
+++ b/dists/engine-data/kyra.dat
Binary files differ
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);
diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp
index 99ce7a3817..dc20400acd 100644
--- a/tools/create_kyradat/create_kyradat.cpp
+++ b/tools/create_kyradat/create_kyradat.cpp
@@ -37,7 +37,7 @@
#include "md5.h"
enum {
- kKyraDatVersion = 62,
+ kKyraDatVersion = 63,
kIndexSize = 12
};
@@ -218,7 +218,7 @@ const ExtractFilename extractFilenames[] = {
{ kLolMusicTrackMap, kTypeRawData, "MUSIC.MAP" },
{ kLolGMSfxIndex, kTypeRawData, "SFX_GM.MAP" },
{ kLolMT32SfxIndex, kTypeRawData, "SFX_MT32.MAP" },
- //{ kLolADLSfxIndex, kTypeRawData, "SFX_ADL.MAP" },
+ { kLolPcSpkSfxIndex, kTypeRawData, "SFX_PCS.MAP" },
{ kLolSpellProperties, kTypeRawData, "SPELLS.DEF" },
{ kLolGameShapeMap, kTypeRawData, "GAMESHP.MAP" },
{ kLolSceneItemOffs, kTypeRawData, "ITEMOFFS.DEF" },
@@ -881,6 +881,8 @@ const char *getIdString(const int id) {
return "kLolGMSfxIndex";
case kLolMT32SfxIndex:
return "kLolMT32SfxIndex";
+ case kLolPcSpkSfxIndex:
+ return "kLolPcSpkSfxIndex";
case kLolSpellProperties:
return "kLolSpellProperties";
case kLolGameShapeMap:
diff --git a/tools/create_kyradat/create_kyradat.h b/tools/create_kyradat/create_kyradat.h
index ea877414bc..c7a560cff5 100644
--- a/tools/create_kyradat/create_kyradat.h
+++ b/tools/create_kyradat/create_kyradat.h
@@ -197,7 +197,7 @@ enum kExtractID {
kLolMusicTrackMap,
kLolGMSfxIndex,
kLolMT32SfxIndex,
- //lolADLSfxIndex,
+ kLolPcSpkSfxIndex,
kLolSpellProperties,
kLolGameShapeMap,
kLolSceneItemOffs,
@@ -206,7 +206,6 @@ enum kExtractID {
kLolCharDefsMan,
kLolCharDefsWoman,
kLolCharDefsKieran,
- //lolCharDefsUnk,
kLolCharDefsAkshel,
kLolExpRequirements,
kLolMonsterModifiers,
@@ -264,7 +263,6 @@ enum kExtractID {
kLolLegendData,
kLolMapCursorOvl,
kLolMapStringId,
- //lolMapPal,
kLolSpellbookAnim,
kLolSpellbookCoords,
diff --git a/tools/create_kyradat/games.cpp b/tools/create_kyradat/games.cpp
index aa84e4f7ee..a3c8ac0e2c 100644
--- a/tools/create_kyradat/games.cpp
+++ b/tools/create_kyradat/games.cpp
@@ -683,6 +683,7 @@ const int lolFloppyNeed[] = {
kLolMusicTrackMap,
kLolGMSfxIndex,
kLolMT32SfxIndex,
+ kLolPcSpkSfxIndex,
kLolSpellProperties,
kLolGameShapeMap,
kLolSceneItemOffs,
@@ -854,6 +855,7 @@ const int lolCDFile2Need[] = {
kLolMusicTrackMap,
kLolGMSfxIndex,
kLolMT32SfxIndex,
+ kLolPcSpkSfxIndex,
kLolSpellProperties,
kLolGameShapeMap,
kLolSceneItemOffs,
diff --git a/tools/create_kyradat/tables.cpp b/tools/create_kyradat/tables.cpp
index 0204e78edf..e0d1497a3f 100644
--- a/tools/create_kyradat/tables.cpp
+++ b/tools/create_kyradat/tables.cpp
@@ -1308,6 +1308,12 @@ const ExtractEntrySearchData kLolMT32SfxIndexProvider[] = {
EXTRACT_END_ENTRY
};
+const ExtractEntrySearchData kLolPcSpkSfxIndexProvider[] = {
+ { UNK_LANG, kPlatformPC, { 0x000000FA, 0x00005EFC, { { 0xA3, 0x5C, 0x69, 0xED, 0x13, 0xEC, 0x08, 0x0E, 0xFA, 0x72, 0x83, 0x0D, 0xD7, 0x8D, 0x9C, 0x70 } } } },
+
+ EXTRACT_END_ENTRY
+};
+
const ExtractEntrySearchData kLolSpellPropertiesProvider[] = {
{ UNK_LANG, kPlatformPC, { 0x00000118, 0x00000B06, { { 0x27, 0x69, 0x53, 0x01, 0xA0, 0xE3, 0x76, 0xAA, 0x33, 0xA4, 0x52, 0x11, 0x52, 0xB1, 0x0E, 0xDA } } } },
@@ -1857,6 +1863,7 @@ const ExtractEntry extractProviders[] = {
{ kLolMusicTrackMap, kLolMusicTrackMapProvider },
{ kLolGMSfxIndex, kLolGMSfxIndexProvider },
{ kLolMT32SfxIndex, kLolMT32SfxIndexProvider },
+ { kLolPcSpkSfxIndex, kLolPcSpkSfxIndexProvider },
{ kLolSpellProperties, kLolSpellPropertiesProvider },
{ kLolGameShapeMap, kLolGameShapeMapProvider },
{ kLolSceneItemOffs, kLolSceneItemOffsProvider },