aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/resource/staticres_eob.cpp
diff options
context:
space:
mode:
authorathrxx2019-04-01 00:55:17 +0200
committerathrxx2019-04-13 18:55:02 +0200
commit0ea6650837cce3007f0820acd17518f9809fd4a7 (patch)
tree507986e06df0d230cc2d1ee64b47efb87546b4e7 /engines/kyra/resource/staticres_eob.cpp
parent972f4e201ade5660723f6348480437e2a02fa6de (diff)
downloadscummvm-rg350-0ea6650837cce3007f0820acd17518f9809fd4a7.tar.gz
scummvm-rg350-0ea6650837cce3007f0820acd17518f9809fd4a7.tar.bz2
scummvm-rg350-0ea6650837cce3007f0820acd17518f9809fd4a7.zip
KYRA: (EOB2/Amiga) - implement proper sound file loading
(also fix some sound related bugs)
Diffstat (limited to 'engines/kyra/resource/staticres_eob.cpp')
-rw-r--r--engines/kyra/resource/staticres_eob.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/engines/kyra/resource/staticres_eob.cpp b/engines/kyra/resource/staticres_eob.cpp
index 90a8b904e4..c0ec2431b6 100644
--- a/engines/kyra/resource/staticres_eob.cpp
+++ b/engines/kyra/resource/staticres_eob.cpp
@@ -468,9 +468,18 @@ void EoBCoreEngine::initStaticResource() {
void *sndInfo_finale = 0;
if (_flags.platform == Common::kPlatformAmiga) {
- const char *const *files = _staticres->loadStrings(kEoBBaseSoundFilesIngame, temp);
const char *const *map = _staticres->loadStrings(kEoBBaseSoundMap, temp2);
- SoundResourceInfo_AmigaEoB ingame(files, temp, map, temp2);
+ _amigaSoundMap = new const char*[temp2];
+ for (int i = 0; i < temp2; ++i) {
+ assert(map[i]);
+ _amigaSoundMap[i] = map[i][0] ? map[i] : 0;
+ }
+
+ _amigaLevelSoundList1 = _staticres->loadStrings(kEoBBaseLevelSounds1, temp);
+ _amigaLevelSoundList2 = _staticres->loadStrings(kEoBBaseLevelSounds2, temp);
+
+ const char *const *files = _staticres->loadStrings(kEoBBaseSoundFilesIngame, temp);
+ SoundResourceInfo_AmigaEoB ingame(files, temp, _amigaSoundMap, temp2);
sndInfo_ingame = &ingame;
files = _staticres->loadStrings(kEoBBaseSoundFilesIntro, temp);
SoundResourceInfo_AmigaEoB intro(files, temp, 0, 0);
@@ -1356,6 +1365,11 @@ void DarkMoonEngine::initStaticResource() {
_monsterAcHitChanceTable1 = _monsterAcHitChanceTbl1;
_monsterAcHitChanceTable2 = _monsterAcHitChanceTbl2;
+ _amigaSoundMapExtra = _staticres->loadStrings(kEoB2SoundMapExtra, temp);
+ _amigaSoundFiles2 = _staticres->loadStrings(kEoB2SoundFilesIngame2, temp);
+ _amigaSoundIndex1 = (const int8*)_staticres->loadRawData(kEoB2SoundIndex1, temp);
+ _amigaSoundIndex2 = _staticres->loadRawData(kEoB2SoundIndex2, temp);
+
static const char *const errorSlotNoNameString[3] = {
" You must specify\r a name for your\r save game!",
" Spielst[nde m]ssen\r einen Namen haben!",