From 02ecc7abb7ab53e88ae2edec332a38d8c85f1beb Mon Sep 17 00:00:00 2001 From: athrxx Date: Fri, 8 Mar 2019 15:02:01 +0100 Subject: KYRA: (EOB2/Amiga) - add static resources --- engines/kyra/resource/resource.h | 13 +++++++++++-- engines/kyra/resource/staticres.cpp | 2 +- engines/kyra/resource/staticres_eob.cpp | 21 ++++++++++++--------- 3 files changed, 24 insertions(+), 12 deletions(-) (limited to 'engines/kyra/resource') diff --git a/engines/kyra/resource/resource.h b/engines/kyra/resource/resource.h index 02415cf4ff..cbd442fcc1 100644 --- a/engines/kyra/resource/resource.h +++ b/engines/kyra/resource/resource.h @@ -492,9 +492,9 @@ enum KyraResources { kEoBBaseSoundFilesIntro, kEoBBaseSoundFilesIngame, kEoBBaseSoundFilesFinale, + kEoBBaseLevelSounds1, + kEoBBaseLevelSounds2, - kEoB1BaseLevelSounds1, - kEoB1BaseLevelSounds2, kEoB1MainMenuStrings, kEoB1BonusStrings, @@ -632,6 +632,9 @@ enum KyraResources { kEoB2IntroShapes01, kEoB2IntroShapes04, kEoB2IntroShapes07, + kEoB2IntroShapes13, + kEoB2IntroShapes14, + kEoB2IntroShapes15, kEoB2FinaleStrings, kEoB2CreditsData, @@ -930,6 +933,12 @@ enum KyraResources { kEoB2PcmSoundEffectsIntro, kEoB2PcmSoundEffectsFinale, + kEoB2SoundMapExtra, + kEoB2SoundIndex1, + kEoB2SoundIndex2, + kEoB2SoundFilesIngame2, + kEoB2MonsterSoundPatchData, + kLoLIngamePakFiles, kLoLCharacterDefs, kLoLIngameSfxFiles, diff --git a/engines/kyra/resource/staticres.cpp b/engines/kyra/resource/staticres.cpp index e569cf1479..fcf3158f5e 100644 --- a/engines/kyra/resource/staticres.cpp +++ b/engines/kyra/resource/staticres.cpp @@ -39,7 +39,7 @@ namespace Kyra { -#define RESFILE_VERSION 93 +#define RESFILE_VERSION 94 namespace { bool checkKyraDat(Common::SeekableReadStream *file) { diff --git a/engines/kyra/resource/staticres_eob.cpp b/engines/kyra/resource/staticres_eob.cpp index 7ff439d202..a75c464573 100644 --- a/engines/kyra/resource/staticres_eob.cpp +++ b/engines/kyra/resource/staticres_eob.cpp @@ -24,6 +24,8 @@ #include "kyra/resource/resource.h" #include "kyra/sound/sound_intern.h" +#include "common/memstream.h" + namespace Kyra { @@ -1390,18 +1392,19 @@ void DarkMoonEngine::initSpells() { EoBCoreEngine::initSpells(); int temp; - const uint8 *src = _staticres->loadRawData(kEoBBaseSpellProperties, temp); + const uint8 *data = _staticres->loadRawData(kEoBBaseSpellProperties, temp); + Common::MemoryReadStreamEndian *src = new Common::MemoryReadStreamEndian(data, temp, _flags.platform == Common::kPlatformAmiga); for (int i = 0; i < _numSpells; i++) { EoBSpell *s = &_spells[i]; - src += 8; - s->flags = READ_LE_UINT16(src); - src += 10; - s->sound = *src++; - s->effectFlags = READ_LE_UINT32(src); - src += 4; - s->damageFlags = READ_LE_UINT16(src); - src += 2; + src->skip(8); + s->flags = src->readUint16(); + src->skip(8); + s->sound = src->readByte(); + if (_flags.platform == Common::kPlatformAmiga) + src->skip(1); + s->effectFlags = src->readUint32(); + s->damageFlags = src->readUint16(); } } -- cgit v1.2.3