diff options
-rw-r--r-- | dists/engine-data/kyra.dat | bin | 253175 -> 253151 bytes | |||
-rw-r--r-- | engines/kyra/gui_lol.cpp | 10 | ||||
-rw-r--r-- | engines/kyra/lol.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/lol.h | 2 | ||||
-rw-r--r-- | engines/kyra/resource.h | 1 | ||||
-rw-r--r-- | engines/kyra/scene_lol.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 4 | ||||
-rw-r--r-- | tools/create_kyradat/create_kyradat.cpp | 3 | ||||
-rw-r--r-- | tools/create_kyradat/create_kyradat.h | 1 | ||||
-rw-r--r-- | tools/create_kyradat/lol_cd.h | 3 | ||||
-rw-r--r-- | tools/create_kyradat/misc.h | 2 |
11 files changed, 12 insertions, 20 deletions
diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat Binary files differindex d0601cdb6a..ac939430fd 100644 --- a/dists/engine-data/kyra.dat +++ b/dists/engine-data/kyra.dat diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp index 8497e2f561..6d7acc28e3 100644 --- a/engines/kyra/gui_lol.cpp +++ b/engines/kyra/gui_lol.cpp @@ -150,10 +150,12 @@ void LoLEngine::gui_drawCharPortraitWithStats(int charNum) { _screen->printText(getLangString(0x4254), 39, 1, 152, 0); int spellLevels = 0; - for (int i = 0; i < 4; i++) { - if (_spellProperties[_availableSpells[_selectedSpell]].mpRequired[i] <= _characters[charNum].magicPointsCur && - _spellProperties[_availableSpells[_selectedSpell] + 1].unkArr[i] <= _characters[charNum].hitPointsCur) - spellLevels++; + if (_availableSpells[_selectedSpell] != -1) { + for (int i = 0; i < 4; i++) { + if (_spellProperties[_availableSpells[_selectedSpell]].mpRequired[i] <= _characters[charNum].magicPointsCur && + _spellProperties[_availableSpells[_selectedSpell] + 1].unkArr[i] <= _characters[charNum].hitPointsCur) + spellLevels++; + } } if (_characters[charNum].flags & 0x10) { diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 23a3307142..0217be6d3f 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -137,7 +137,7 @@ LoLEngine::LoLEngine(OSystem *system, const GameFlags &flags) : KyraEngine_v1(sy _dscDoorShpIndex = 0; _dscDim1 = 0; _dscDim2 = 0; - _dscBlockMap = _dscDoor1 = _dscDoor2 = _dscShapeOvlIndex = 0; + _dscBlockMap = _dscDoor1 = _dscShapeOvlIndex = 0; _dscBlockIndex = 0; _dscDimMap = 0; _dscDoorX = _dscDoorY = 0; diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index 194d24ddf8..764363874b 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -575,8 +575,6 @@ private: int _dscBlockMapSize; const uint8 *_dscDimMap; int _dscDimMapSize; - const uint8 *_dscDoor2; - int _dscDoor2Size; const uint16 *_dscDoorScaleTable; int _dscDoorScaleTableSize; const uint16 *_dscDoor4; diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index 1f865e855f..b79a949e3f 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -237,7 +237,6 @@ enum kKyraResources { lolDscBlockMap, lolDscDimMap, lolDscDoor1, - lolDscDoor2, lolDscDoorScale, lolDscDoor4, lolDscDoorX, diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp index 0fa984b522..9a13073060 100644 --- a/engines/kyra/scene_lol.cpp +++ b/engines/kyra/scene_lol.cpp @@ -1209,7 +1209,7 @@ void LoLEngine::drawDecorations(int index) { uint16 scaleH = _dscShapeScaleH[s]; int8 ix = _dscShapeIndex[s]; uint8 shpIx = ABS(ix); - uint8 ovlIndex = _dscShapeOvlIndex[_dscDimMap[index] * 5] + 2; + uint8 ovlIndex = _dscShapeOvlIndex[4 + _dscDimMap[index] * 5] + 2; if (ovlIndex > 7) ovlIndex = 7; @@ -1290,7 +1290,7 @@ void LoLEngine::drawIceShapes(int index, int iceShapeIndex) { void LoLEngine::drawDoor(uint8 *shape, uint8 *table, int index, int unk2, int w, int h, int flags) { uint8 c = _dscDoor1[(_unkPara2 << 5) + unk2]; int r = (c / 5) + 5 * _dscDimMap[index]; - uint16 d = _dscDoor2[r]; + uint16 d = _dscShapeOvlIndex[r]; uint16 t = (index << 5) + c; _shpDoorY = _dscDoorY[t] + 120; diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 8882bed10c..45af54caea 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -43,7 +43,7 @@ namespace Kyra { -#define RESFILE_VERSION 33 +#define RESFILE_VERSION 34 namespace { bool checkKyraDat(Common::SeekableReadStream *file) { @@ -394,7 +394,6 @@ bool StaticResource::init() { { lolDscBlockMap, kRawData, "DSCBLOCK1.DEF" }, { lolDscDimMap, kRawData, "DSCDIM.DEF" }, { lolDscDoorScale, lolRawDataBe16, "DSCDOOR3.DEF" }, - { lolDscDoor2, kRawData, "DSCDOOR2.DEF" }, { lolDscDoor4, lolRawDataBe16, "DSCDOOR4.DEF" }, { lolDscOvlIndex, kRawData, "DSCBLOCK2.DEF" }, { lolDscBlockIndex, kRawData, "DSCBLOCKX.DEF" }, @@ -1652,7 +1651,6 @@ void LoLEngine::initStaticResource() { _dscBlockMap = _staticres->loadRawData(lolDscBlockMap, _dscBlockMapSize); _dscDimMap = _staticres->loadRawData(lolDscDimMap, _dscDimMapSize); _dscDoorScaleTable = (const uint16 *)_staticres->loadRawDataBe16(lolDscDoorScale, _dscDoorScaleTableSize); - _dscDoor2 = _staticres->loadRawData(lolDscDoor2, _dscDoor2Size); _dscShapeOvlIndex = _staticres->loadRawData(lolDscOvlIndex, _dscShapeOvlIndexSize); _dscDoor4 = (const uint16 *)_staticres->loadRawDataBe16(lolDscDoor4, _dscDoor4Size); _dscBlockIndex = (const int8 *)_staticres->loadRawData(lolDscBlockIndex, _dscBlockIndexSize); diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index 51524e57a0..6544d9c2cd 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -31,7 +31,7 @@ #include "md5.h" enum { - kKyraDatVersion = 33, + kKyraDatVersion = 34, kIndexSize = 12 }; @@ -289,7 +289,6 @@ const ExtractFilename extractFilenames[] = { { lolDscBlockMap, kTypeRawData, "DSCBLOCK1.DEF" }, { lolDscDimMap, kTypeRawData, "DSCDIM.DEF" }, { lolDscDoorScale, lolTypeRaw16, "DSCDOOR3.DEF" }, - { lolDscDoor2, k3TypeRaw16to8, "DSCDOOR2.DEF" }, { lolDscShapeOvlIndex, k3TypeRaw16to8, "DSCBLOCK2.DEF" }, { lolDscBlockIndex, kTypeRawData, "DSCBLOCKX.DEF" }, { lolDscDoor4, lolTypeRaw16, "DSCDOOR4.DEF" }, diff --git a/tools/create_kyradat/create_kyradat.h b/tools/create_kyradat/create_kyradat.h index 8c1fd3f84b..8ffdc40c5f 100644 --- a/tools/create_kyradat/create_kyradat.h +++ b/tools/create_kyradat/create_kyradat.h @@ -204,7 +204,6 @@ enum kExtractID { lolDscShapeOvlIndex, lolDscBlockIndex, lolDscDoor1, - lolDscDoor2, lolDscDoorScale, lolDscDoor4, lolDscDoorX, diff --git a/tools/create_kyradat/lol_cd.h b/tools/create_kyradat/lol_cd.h index 8380b9961e..bf57fa9f23 100644 --- a/tools/create_kyradat/lol_cd.h +++ b/tools/create_kyradat/lol_cd.h @@ -25,8 +25,7 @@ const ExtractEntry lolCDFile2[] = { { lolDscBlockMap, 0x00031B64, 0x00031B70 }, { lolDscDimMap, 0x00031B70, 0x00031B82 }, { lolDscDoorScale, 0x00031B82, 0x00031B92 }, - { lolDscDoor2, 0x00031B92, 0x00031B9A }, - { lolDscShapeOvlIndex, 0x00031B9A, 0x00031BBA }, + { lolDscShapeOvlIndex, 0x00031B92, 0x00031BBA }, { lolDscDoor4, 0x00031BBA, 0x00031BC2 }, { lolDscBlockIndex, 0x00033B53, 0x00033B9B }, { lolDscDoor1, 0x0002B550, 0x0002B5D0 }, diff --git a/tools/create_kyradat/misc.h b/tools/create_kyradat/misc.h index 91ee915319..36b5ebe1ce 100644 --- a/tools/create_kyradat/misc.h +++ b/tools/create_kyradat/misc.h @@ -506,11 +506,9 @@ const int lolCDFile2Need[] = { lolDscDimData2, lolDscBlockMap, lolDscDimMap, - lolDscDoor2, lolDscShapeOvlIndex, lolDscBlockIndex, lolDscDoor1, - lolDscDoor2, lolDscDoorScale, lolDscDoor4, lolDscDoorX, |