From f0a305316c716dfadc332eb8df4c95a5e6e6cdb6 Mon Sep 17 00:00:00 2001 From: athrxx Date: Sat, 26 Jan 2019 15:58:47 +0100 Subject: KYRA: (EOB1/Amiga) - add static resources --- engines/kyra/engine/eobcommon.cpp | 10 +++++++--- engines/kyra/engine/eobcommon.h | 1 + engines/kyra/engine/scene_rpg.cpp | 1 - engines/kyra/resource/resource.h | 17 +++++++++++++++++ engines/kyra/resource/staticres.cpp | 2 +- engines/kyra/resource/staticres_eob.cpp | 18 +++++++++++++----- 6 files changed, 39 insertions(+), 10 deletions(-) (limited to 'engines') diff --git a/engines/kyra/engine/eobcommon.cpp b/engines/kyra/engine/eobcommon.cpp index 58cc394abd..21677ac697 100644 --- a/engines/kyra/engine/eobcommon.cpp +++ b/engines/kyra/engine/eobcommon.cpp @@ -196,7 +196,7 @@ EoBCoreEngine::EoBCoreEngine(OSystem *system, const GameFlags &flags) _abortStrings = _saveLoadStrings = _mnWord = _mnPrompt = _bookNumbers = 0; _mageSpellList = _clericSpellList = _spellNames = _magicStrings1 = 0; _magicStrings2 = _magicStrings3 = _magicStrings4 = _magicStrings6 = 0; - _magicStrings7 = _magicStrings8 = _saveNamePatterns = 0; + _magicStrings7 = _magicStrings8 = _magicStrings9 = _saveNamePatterns = 0; _spellAnimBuffer = 0; _sparkEffectDefSteps = _sparkEffectDefSubSteps = _sparkEffectDefShift = 0; _sparkEffectDefAdd = _sparkEffectDefX = _sparkEffectDefY = _sparkEffectOfShift = 0; @@ -432,8 +432,12 @@ Common::Error EoBCoreEngine::init() { _debugger = new Debugger_EoB(this); assert(_debugger); - _screen->loadFont(Screen::FID_6_FNT, "FONT6.FNT"); - _screen->loadFont(Screen::FID_8_FNT, "FONT8.FNT"); + if (_flags.platform == Common::kPlatformAmiga) { + + } else { + _screen->loadFont(Screen::FID_6_FNT, "FONT6.FNT"); + _screen->loadFont(Screen::FID_8_FNT, "FONT8.FNT"); + } Common::Error err = KyraRpgEngine::init(); if (err.getCode() != Common::kNoError) diff --git a/engines/kyra/engine/eobcommon.h b/engines/kyra/engine/eobcommon.h index 9078e50409..c56a41b6a1 100644 --- a/engines/kyra/engine/eobcommon.h +++ b/engines/kyra/engine/eobcommon.h @@ -1096,6 +1096,7 @@ protected: const char *const *_magicStrings6; const char *const *_magicStrings7; const char *const *_magicStrings8; + const char *const *_magicStrings9; uint8 *_spellAnimBuffer; diff --git a/engines/kyra/engine/scene_rpg.cpp b/engines/kyra/engine/scene_rpg.cpp index 72922d4b53..0528df6db1 100644 --- a/engines/kyra/engine/scene_rpg.cpp +++ b/engines/kyra/engine/scene_rpg.cpp @@ -87,7 +87,6 @@ void KyraRpgEngine::setLevelShapesDim(int index, int16 &x1, int16 &x2, int dim) x1 += (_sceneXoffset >> 3); x2 += (_sceneXoffset >> 3); - _lvlShapeTop[index] = y1; _lvlShapeBottom[index] = y2; _lvlShapeLeftRight[index << 1] = x1; diff --git a/engines/kyra/resource/resource.h b/engines/kyra/resource/resource.h index 077b4eab7a..a1ff902a84 100644 --- a/engines/kyra/resource/resource.h +++ b/engines/kyra/resource/resource.h @@ -455,6 +455,7 @@ enum KyraResources { kEoBBaseMagicStrings6, kEoBBaseMagicStrings7, kEoBBaseMagicStrings8, + kEoBBaseMagicStrings9, kEoBBaseExpObjectTlMode, kEoBBaseExpObjectTblIndex, @@ -486,6 +487,13 @@ enum KyraResources { kEoBBaseConeOfColdDest4, kEoBBaseConeOfColdGfxTbl, + kEoBBaseSoundMap, + kEoBBaseSoundFilesIntro, + kEoBBaseSoundFilesIngame, + kEoBBaseSoundFilesFinale, + + kEoB1BaseLevelSounds1, + kEoB1BaseLevelSounds2, kEoB1MainMenuStrings, kEoB1BonusStrings, @@ -509,6 +517,15 @@ enum KyraResources { kEoB1IntroTvlY2, kEoB1IntroTvlW, kEoB1IntroTvlH, + kEoB1IntroOrbFadePal, + + kEoB1FinaleCouncilAnim1, + kEoB1FinaleCouncilAnim2, + kEoB1FinaleCouncilAnim3, + kEoB1FinaleCouncilAnim4, + kEoB1FinaleEyesAnim, + kEoB1FinaleHandsAnim, + kEoB1FinaleTextDuration, kEoB1DoorShapeDefs, kEoB1DoorSwitchShapeDefs, diff --git a/engines/kyra/resource/staticres.cpp b/engines/kyra/resource/staticres.cpp index fb6d14dd4b..e569cf1479 100644 --- a/engines/kyra/resource/staticres.cpp +++ b/engines/kyra/resource/staticres.cpp @@ -39,7 +39,7 @@ namespace Kyra { -#define RESFILE_VERSION 92 +#define RESFILE_VERSION 93 namespace { bool checkKyraDat(Common::SeekableReadStream *file) { diff --git a/engines/kyra/resource/staticres_eob.cpp b/engines/kyra/resource/staticres_eob.cpp index 4a94c8448a..23a5203a68 100644 --- a/engines/kyra/resource/staticres_eob.cpp +++ b/engines/kyra/resource/staticres_eob.cpp @@ -432,6 +432,7 @@ void EoBCoreEngine::initStaticResource() { _magicStrings6 = _staticres->loadStrings(kEoBBaseMagicStrings6, temp); _magicStrings7 = _staticres->loadStrings(kEoBBaseMagicStrings7, temp); _magicStrings8 = _staticres->loadStrings(kEoBBaseMagicStrings8, temp); + _magicStrings9 = _staticres->loadStrings(kEoBBaseMagicStrings9, temp); _expObjectTlMode = _staticres->loadRawData(kEoBBaseExpObjectTlMode, temp); _expObjectTblIndex = _staticres->loadRawData(kEoBBaseExpObjectTblIndex, temp); @@ -460,6 +461,13 @@ void EoBCoreEngine::initStaticResource() { _coneOfColdDest4 = (const int8 *)_staticres->loadRawData(kEoBBaseConeOfColdDest4, temp); _coneOfColdGfxTbl = _staticres->loadRawData(kEoBBaseConeOfColdGfxTbl, _coneOfColdGfxTblSize); + _staticres->loadStrings(kEoBBaseSoundMap, temp); + _staticres->loadStrings(kEoBBaseLevelSounds1, temp); + _staticres->loadStrings(kEoBBaseLevelSounds2, temp); + _staticres->loadStrings(kEoBBaseSoundFilesIntro, temp); + _staticres->loadStrings(kEoBBaseSoundFilesIngame, temp); + _staticres->loadStrings(kEoBBaseSoundFilesFinale, temp); + // Hard code the following strings, since EOB I doesn't have them in the original. // EOB I doesn't have load and save menus, because there is only one single // save slot. Instead of emulating this we provide a menu similiar to EOB II. @@ -1129,11 +1137,9 @@ void EoBEngine::initStaticResource() { p->dmgDc[2].base = (int8)*ps++; ps++; p->capsFlags = *ps++; - p->typeFlags = READ_LE_UINT16(ps); - ps += 2; - ps++; - ps++; - p->experience = READ_LE_UINT16(ps); + p->typeFlags = (_flags.platform == Common::kPlatformAmiga) ? READ_BE_UINT32(++ps) : READ_LE_UINT32(ps); + ps += 4; + p->experience = (_flags.platform == Common::kPlatformAmiga) ? READ_BE_UINT16(ps) : READ_LE_UINT16(ps); ps += 2; p->u30 = *ps++; p->sound1 = (int8)*ps++; @@ -1226,6 +1232,8 @@ void EoBEngine::initSpells() { for (int i = 0; i < _numSpells; i++) { EoBSpell *s = &_spells[i]; + if (_flags.platform == Common::kPlatformAmiga) + src++; src += 4; s->flags = flagTable[i].typeFlag; s->damageFlags = flagTable[i].damageFlag; -- cgit v1.2.3