diff options
author | Florian Kagerer | 2009-05-10 13:40:28 +0000 |
---|---|---|
committer | Florian Kagerer | 2009-05-10 13:40:28 +0000 |
commit | dd84aaf648b57220180b84a9aa0825d16bcea5bc (patch) | |
tree | 2be68b4e4892d1a4d19509a46ebe64206e83e3f4 /engines/kyra/staticres.cpp | |
parent | 3592801a5707f42c71971321b26e2cc1da775c25 (diff) | |
download | scummvm-rg350-dd84aaf648b57220180b84a9aa0825d16bcea5bc.tar.gz scummvm-rg350-dd84aaf648b57220180b84a9aa0825d16bcea5bc.tar.bz2 scummvm-rg350-dd84aaf648b57220180b84a9aa0825d16bcea5bc.zip |
LOL: - added some spell casting (spark, heal, swarm)
- fixed several bugs (not the one in the fighting system though)
- added several opcodes. there shouldn't be any real show stoppers in the draracle cave now.
- simplified wsa code (which required 4 lines of code for displaying a frame)
- added support for wsa animations that don't have a last frame (apparently kyra 2 and 3 don't have this type of wsa file)
svn-id: r40420
Diffstat (limited to 'engines/kyra/staticres.cpp')
-rw-r--r-- | engines/kyra/staticres.cpp | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 02c3c4316e..921402b582 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -44,7 +44,7 @@ namespace Kyra { -#define RESFILE_VERSION 45 +#define RESFILE_VERSION 46 namespace { bool checkKyraDat(Common::SeekableReadStream *file) { @@ -449,7 +449,9 @@ bool StaticResource::init() { { lolMapStringId, kLolRawDataBe16, "MAPSTRID.LST" }, //{ lolMapPal, kRawData, "MAP.PAL" }, - { lolHealShapeFrames, kRawData, "MHEAL.SHP" }, + { lolSpellbookAnim, kRawData, "MBOOKA.DEF" }, + { lolSpellbookCoords, kRawData, "MBOOKC.DEF" }, + { lolHealShapeFrames, kRawData, "MHEAL.SHP" }, { 0, 0, 0 } }; @@ -1047,8 +1049,12 @@ bool StaticResource::loadSpellData(const char *filename, void *&ptr, int &size) t->spellNameCode = file->readUint16LE(); for (int ii = 0; ii < 4; ii++) t->mpRequired[ii] = file->readUint16LE(); - for (int ii = 0; ii < 8; ii++) - t->unkArr[ii] = file->readUint16LE(); + t->field_a = file->readUint16LE(); + t->field_c = file->readUint16LE(); + for (int ii = 0; ii < 4; ii++) + t->hpRequired[ii] = file->readUint16LE(); + t->field_16 = file->readUint16LE(); + t->field_18 = file->readUint16LE(); t->flags = file->readUint16LE(); }; @@ -1849,6 +1855,8 @@ void LoLEngine::initStaticResource() { memcpy (_mapCursorOverlay, tmp, tmpSize); _staticres->unloadId(lolMapCursorOvl); + _updateSpellBookCoords = _staticres->loadRawData(lolSpellbookCoords, _updateSpellBookCoordsSize); + _updateSpellBookAnimData = _staticres->loadRawData(lolSpellbookAnim, _updateSpellBookAnimDataSize); _healShapeFrames = _staticres->loadRawData(lolHealShapeFrames, _healShapeFramesSize); // assign music data @@ -1962,11 +1970,11 @@ void LoLEngine::assignButtonCallback(Button *button, int index) { cb(clickedScroll), cb(clickedScroll), cb(clickedScroll), - cb(clickedUnk23), - cb(clickedUnk23), - cb(clickedUnk23), - cb(clickedUnk23), - cb(clickedUnk24), + cb(clickedSpellTargetCharacter), + cb(clickedSpellTargetCharacter), + cb(clickedSpellTargetCharacter), + cb(clickedSpellTargetCharacter), + cb(clickedSpellTargetScene), cb(clickedSceneThrowItem), cb(clickedSceneThrowItem), cb(clickedOptions), @@ -2950,6 +2958,11 @@ const ScreenDim Screen_LoL::_screenDimTable256C[] = { { 0x07, 0x19, 0x1A, 0x97, 0x00, 0x00, 0x00, 0x00 }, { 0x03, 0x1E, 0x22, 0x8C, 0x00, 0x00, 0x00, 0x00 }, { 0x02, 0x48, 0x24, 0x34, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x0E, 0x00, 0x16, 0x78, 0xFE, 0x01, 0x00, 0x00 }, + { 0x0D, 0xA2, 0x18, 0x0C, 0xFE, 0x01, 0x00, 0x00 }, + { 0x0F, 0x06, 0x14, 0x6E, 0x01, 0x00, 0x00, 0x00 }, + { 0x1A, 0xBE, 0x0A, 0x07, 0xFE, 0x01, 0x00, 0x00 }, { 0x0B, 0x8C, 0x10, 0x33, 0x3D, 0x01, 0x00, 0x00 }, // Main menu box (5 entries, CD version only) { 0x0B, 0x8C, 0x10, 0x23, 0x3D, 0x01, 0x00, 0x00 } // Main menu box (3 entries, floppy version only) }; @@ -2967,6 +2980,11 @@ const ScreenDim Screen_LoL::_screenDimTable16C[] = { { 0x07, 0x19, 0x1A, 0x97, 0x00, 0x00, 0x00, 0x00 }, { 0x03, 0x1E, 0x22, 0x8C, 0x00, 0x00, 0x00, 0x00 }, { 0x02, 0x48, 0x24, 0x34, 0x00, 0x00, 0x00, 0x00 }, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + { 0x0E, 0x00, 0x16, 0x78, 0x33, 0x44, 0x00, 0x00 }, + { 0x0D, 0xA2, 0x18, 0x0C, 0x33, 0x44, 0x00, 0x00 }, + { 0x0F, 0x06, 0x14, 0x6E, 0x44, 0x00, 0x00, 0x00 }, + { 0x1A, 0xBE, 0x0A, 0x07, 0x33, 0x44, 0x00, 0x00 }, { 0x0B, 0x8C, 0x10, 0x33, 0x33, 0x44, 0x00, 0x00 }, // Main menu box (5 entries, not used here) { 0x0B, 0x8C, 0x10, 0x23, 0x33, 0x44, 0x00, 0x00 } // Main menu box (3 entries) }; @@ -2986,7 +3004,7 @@ const LoLEngine::CharacterPrev LoLEngine::_charPreviews[] = { { "Conrad", 0x10F, 0x7F, { 0x0A, 0x0C, 0x0A } } }; -const uint8 LoLEngine::_chargenFrameTable[] = { +const uint8 LoLEngine::_chargenFrameTableTalkie[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x01, 0x02, 0x03, @@ -2995,6 +3013,12 @@ const uint8 LoLEngine::_chargenFrameTable[] = { 0x0E, 0x0F, 0x10, 0x11, 0x12 }; +const uint8 LoLEngine::_chargenFrameTableFloppy[] = { + 0, 1, 2, 3, 4, 5, 4, 3, 2, + 1, 0, 0, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15 +}; + const uint16 LoLEngine::_selectionPosTable[] = { 0x6F, 0x00, 0x8F, 0x00, 0xAF, 0x00, 0xCF, 0x00, 0xEF, 0x00, 0x6F, 0x20, 0x8F, 0x20, 0xAF, 0x20, |