diff options
author | Florian Kagerer | 2009-01-18 17:04:24 +0000 |
---|---|---|
committer | Florian Kagerer | 2009-01-18 17:04:24 +0000 |
commit | ff268e8fd5997b60a035147bb9adbf1ead100d49 (patch) | |
tree | 4e67c5c5f9d08f692b660f15a66df7b7133ae68e /tools | |
parent | bf08c82054bfab7f3fc613ea63a224d5fd75e45a (diff) | |
download | scummvm-rg350-ff268e8fd5997b60a035147bb9adbf1ead100d49.tar.gz scummvm-rg350-ff268e8fd5997b60a035147bb9adbf1ead100d49.tar.bz2 scummvm-rg350-ff268e8fd5997b60a035147bb9adbf1ead100d49.zip |
LOL: Some drawing code and some opcodes so that the first scene will show up. Playing is not possible. This is still somewhat messy since a lot of stuff hasn't been figured out yet.
svn-id: r35903
Diffstat (limited to 'tools')
-rw-r--r-- | tools/create_kyradat/create_kyradat.cpp | 60 | ||||
-rw-r--r-- | tools/create_kyradat/create_kyradat.h | 44 | ||||
-rw-r--r-- | tools/create_kyradat/lol_cd.h | 42 | ||||
-rw-r--r-- | tools/create_kyradat/lol_demo.h | 2 | ||||
-rw-r--r-- | tools/create_kyradat/misc.h | 44 |
5 files changed, 184 insertions, 8 deletions
diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index 456da29fa0..51524e57a0 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -31,7 +31,7 @@ #include "md5.h" enum { - kKyraDatVersion = 32, + kKyraDatVersion = 33, kIndexSize = 12 }; @@ -53,6 +53,7 @@ enum { #include "malcolm.h" +#include "lol_cd.h" #include "lol_demo.h" const Game kyra1FanTranslations[] = { @@ -72,6 +73,7 @@ bool extractStringsWoSuffix(PAKFile &out, const Game *g, const byte *data, const bool extractPaddedStrings(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); bool extractRaw16to8(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); bool extractMrShapeAnimData(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); +bool extractRaw16(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); int extractHofSeqData_checkString(const void *ptr, uint8 checkSize); int extractHofSeqData_isSequence(const void *ptr, const Game *g, uint32 maxCheckSize); @@ -96,6 +98,8 @@ const ExtractType extractTypeTable[] = { { k3TypeRaw16to8, extractRaw16to8, createFilename }, { k3TypeShpData, extractMrShapeAnimData, createFilename }, + { lolTypeRaw16, extractRaw16, createFilename }, + { -1, 0, 0} }; @@ -256,7 +260,42 @@ const ExtractFilename extractFilenames[] = { // LANDS OF LORE // Demo Sequence Player - { lSeqplayIntroTracks, k2TypeSoundList, "S_INTRO.TRA" }, + { lolSeqplayIntroTracks, k2TypeSoundList, "S_INTRO.TRA" }, + + // Ingame + { lolCharacterDefs, kTypeRawData, "CHARACTER.DEF" }, + { lolIngameSfxFiles, k2TypeSfxList, "SFXFILES.TRA" }, + { lolIngameSfxIndex, kTypeRawData, "SFXINDEX.MAP" }, + { lolGMSfxIndex, kTypeRawData, "SFX_GM.MAP" }, + { lolMT32SfxIndex, kTypeRawData, "SFX_MT32.MAP" }, + { lolSpellProperties, kTypeRawData, "SPELLS.DEF" }, + { lolGameShapeMap, kTypeRawData, "GAMESHP.MAP" }, + { lolLevelShpList, kTypeStringList, "SHPFILES.TXT" }, + { lolLevelDatList, kTypeStringList, "DATFILES.TXT" }, + { lolCompassDefs, k3TypeRaw16to8, "COMPASS.DEF" }, + + { lolDscUnk1, kTypeRawData, "DSCSHPU1.DEF" }, + { lolDscShapeIndex1, kTypeRawData, "DSCSHPI1.DEF" }, + { lolDscShapeIndex2, kTypeRawData, "DSCSHPI2.DEF" }, + { lolDscScaleWidthData, lolTypeRaw16, "DSCSHPW.DEF" }, + { lolDscScaleHeightData, lolTypeRaw16, "DSCSHPH.DEF" }, + { lolDscX, lolTypeRaw16, "DSCSHPX.DEF" }, + { lolDscY, kTypeRawData, "DSCSHPY.DEF" }, + { lolDscTileIndex, kTypeRawData, "DSCSHPT.DEF" }, + { lolDscUnk2, kTypeRawData, "DSCSHPU2.DEF" }, + { lolDscDoorShapeIndex, kTypeRawData, "DSCDOOR.DEF" }, + { lolDscDimData1, kTypeRawData, "DSCDIM1.DEF" }, + { lolDscDimData2, kTypeRawData, "DSCDIM2.DEF" }, + { 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" }, + { lolDscDoor1, kTypeRawData, "DSCDOOR1.DEF" }, + { lolDscDoorX, lolTypeRaw16, "DSCDOORX.DEF" }, + { lolDscDoorY, lolTypeRaw16, "DSCDOORY.DEF" }, { -1, 0, 0 } }; @@ -1012,6 +1051,20 @@ bool extractRaw16to8(PAKFile &out, const Game *g, const byte *data, const uint32 return out.addFile(filename, buffer, outsize); } +bool extractRaw16(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch) { + uint8 *buffer = new uint8[size]; + const uint8 *src = data; + uint8 *dst = buffer; + + for (int i = 0; i < (size >> 1); i++) { + WRITE_BE_UINT16(dst, READ_LE_UINT16(src)); + src += 2; + dst += 2; + } + + return out.addFile(filename, buffer, size); +} + bool extractMrShapeAnimData(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch) { int outsize = 1; uint8 *buffer = new uint8[size + 1]; @@ -1070,7 +1123,7 @@ enum { uint32 getFeatures(const Game *g) { uint32 features = 0; - if (g->special == kTalkieVersion || g->special == k2CDFile1E || g->special == k2CDFile1F || g->special == k2CDFile1G || g->special == k2CDFile1I || g->special == k2CDFile2E || g->special == k2CDFile2F || g->special == k2CDFile2G || g->game == kKyra3) + if (g->special == kTalkieVersion || g->special == k2CDFile1E || g->special == k2CDFile1F || g->special == k2CDFile1G || g->special == k2CDFile1I || g->special == k2CDFile2E || g->special == k2CDFile2F || g->special == k2CDFile2G || g->special == kLolCD || g->game == kKyra3) features |= GF_TALKIE; else if (g->special == kDemoVersion || g->special == k2DemoVersion || g->special == k2DemoLol) features |= GF_DEMO; @@ -1352,6 +1405,7 @@ const Game *gameDescs[] = { kyra3Games, lolDemos, + lolGames, 0 }; diff --git a/tools/create_kyradat/create_kyradat.h b/tools/create_kyradat/create_kyradat.h index 8e985f9031..8c1fd3f84b 100644 --- a/tools/create_kyradat/create_kyradat.h +++ b/tools/create_kyradat/create_kyradat.h @@ -174,7 +174,41 @@ enum kExtractID { k3ItemMagicTable, k3ItemStringMap, - lSeqplayIntroTracks, + lolSeqplayIntroTracks, + + lolCharacterDefs, + lolIngameSfxFiles, + lolIngameSfxIndex, + lolGMSfxIndex, + lolMT32SfxIndex, + lolSpellProperties, + lolGameShapeMap, + lolLevelShpList, + lolLevelDatList, + lolCompassDefs, + + lolDscUnk1, + lolDscShapeIndex1, + lolDscShapeIndex2, + lolDscScaleWidthData, + lolDscScaleHeightData, + lolDscX, + lolDscY, + lolDscTileIndex, + lolDscUnk2, + lolDscDoorShapeIndex, + lolDscDimData1, + lolDscDimData2, + lolDscBlockMap, + lolDscDimMap, + lolDscShapeOvlIndex, + lolDscBlockIndex, + lolDscDoor1, + lolDscDoor2, + lolDscDoorScale, + lolDscDoor4, + lolDscDoorX, + lolDscDoorY, kMaxResIDs }; @@ -219,7 +253,9 @@ enum kSpecial { k2DemoVersionTlkE = 19, k2DemoVersionTlkF = 20, k2DemoVersionTlkG = 21, - k2DemoLol = 22 + k2DemoLol = 22, + + kLolCD = 23 }; struct SpecialExtension { @@ -267,7 +303,9 @@ enum kExtractType { k2TypeSfxList, k3TypeRaw16to8, - k3TypeShpData + k3TypeShpData, + + lolTypeRaw16 }; struct ExtractType { diff --git a/tools/create_kyradat/lol_cd.h b/tools/create_kyradat/lol_cd.h new file mode 100644 index 0000000000..8380b9961e --- /dev/null +++ b/tools/create_kyradat/lol_cd.h @@ -0,0 +1,42 @@ +const ExtractEntry lolCDFile2[] = { + { lolCharacterDefs, 0x00029D60, 0x0002A1F2 }, + { lolIngameSfxFiles, 0x0002A330, 0x0002AC22 }, + { lolIngameSfxIndex, 0x0002AC22, 0x0002B00A }, + { lolGMSfxIndex, 0x0002B010, 0x0002B10A }, + { lolMT32SfxIndex, 0x0002B110, 0x0002B20A }, + { lolSpellProperties, 0x0002B5D0, 0x0002B6E8 }, + { lolGameShapeMap, 0x0002B35D, 0x0002B52C }, + { lolLevelShpList, 0x00032826, 0x000328A5 }, + { lolLevelDatList, 0x000328A5, 0x000329A4 }, + { lolCompassDefs, 0x000286C4, 0x000287C4 }, + + { lolDscUnk1, 0x00032017, 0x0003203B }, + { lolDscShapeIndex1, 0x0003203B, 0x0003205F }, + { lolDscShapeIndex2, 0x0003205F, 0x00032069 }, + { lolDscScaleWidthData, 0x00032069, 0x000320B1 }, + { lolDscScaleHeightData, 0x000320B1, 0x000320F9 }, + { lolDscX, 0x000320F9, 0x00032141 }, + { lolDscY, 0x00032141, 0x00032165 }, + { lolDscTileIndex, 0x00032165, 0x00032177 }, + { lolDscUnk2, 0x00032177, 0x0003218E }, + { lolDscDoorShapeIndex, 0x0003218E, 0x000321A5 }, + { lolDscDimData1, 0x00031C03, 0x00031D47 }, + { lolDscDimData2, 0x00031D47, 0x00031FD0 }, + { lolDscBlockMap, 0x00031B64, 0x00031B70 }, + { lolDscDimMap, 0x00031B70, 0x00031B82 }, + { lolDscDoorScale, 0x00031B82, 0x00031B92 }, + { lolDscDoor2, 0x00031B92, 0x00031B9A }, + { lolDscShapeOvlIndex, 0x00031B9A, 0x00031BBA }, + { lolDscDoor4, 0x00031BBA, 0x00031BC2 }, + { lolDscBlockIndex, 0x00033B53, 0x00033B9B }, + { lolDscDoor1, 0x0002B550, 0x0002B5D0 }, + { lolDscDoorX, 0x00027CC0, 0x00028140 }, + { lolDscDoorY, 0x00028140, 0x000285C0 }, + + { -1, 0, 0 } +}; + +const Game lolGames[] = { + { kLol, EN_ANY, kLolCD, "263998ec600afca1cc7b935c473df670", lolCDFile2}, + GAME_DUMMY_ENTRY +}; diff --git a/tools/create_kyradat/lol_demo.h b/tools/create_kyradat/lol_demo.h index ce114f4e73..378b8c5dce 100644 --- a/tools/create_kyradat/lol_demo.h +++ b/tools/create_kyradat/lol_demo.h @@ -3,7 +3,7 @@ const ExtractEntry lolDemo[] = { { k2SeqplayStrings, 0x0001B5EE, 0x0001B6F0 }, { k2SeqplaySfxFiles, 0x0001B6F0, 0x0001B7B5 }, { k2SeqplaySeqData, 0x0001B320, 0x0001B56C }, - { lSeqplayIntroTracks, 0x0001B7B5, 0x0001B7CF }, + { lolSeqplayIntroTracks, 0x0001B7B5, 0x0001B7CF }, { -1, 0, 0 } }; diff --git a/tools/create_kyradat/misc.h b/tools/create_kyradat/misc.h index c519418d37..91ee915319 100644 --- a/tools/create_kyradat/misc.h +++ b/tools/create_kyradat/misc.h @@ -481,12 +481,50 @@ const int kyra3Need[] = { -1 }; +const int lolCDFile2Need[] = { + lolCharacterDefs, + lolIngameSfxFiles, + lolIngameSfxIndex, + lolGMSfxIndex, + lolMT32SfxIndex, + lolSpellProperties, + lolGameShapeMap, + lolLevelShpList, + lolLevelDatList, + lolCompassDefs, + lolDscUnk1, + lolDscShapeIndex1, + lolDscShapeIndex2, + lolDscScaleWidthData, + lolDscScaleHeightData, + lolDscX, + lolDscY, + lolDscTileIndex, + lolDscUnk2, + lolDscDoorShapeIndex, + lolDscDimData1, + lolDscDimData2, + lolDscBlockMap, + lolDscDimMap, + lolDscDoor2, + lolDscShapeOvlIndex, + lolDscBlockIndex, + lolDscDoor1, + lolDscDoor2, + lolDscDoorScale, + lolDscDoor4, + lolDscDoorX, + lolDscDoorY, + + -1 +}; + const int lolDemoNeed[] = { k2SeqplayPakFiles, k2SeqplayStrings, k2SeqplaySeqData, k2SeqplaySfxFiles, - lSeqplayIntroTracks, + lolSeqplayIntroTracks, -1 }; @@ -519,6 +557,8 @@ const GameNeed gameNeedTable[] = { { kKyra3, -1, kyra3Need }, + { kLol, kLolCD, lolCDFile2Need }, + { -1, -1, 0 } }; @@ -544,6 +584,8 @@ const SpecialExtension specialTable[] = { { k2DemoVersion, "DEM" }, { k2DemoLol, "DEM" }, + { kLolCD, "CD" }, + { -1, 0 } }; |