ScummVM API documentation
resource.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef KYRA_RESOURCE_H
23 #define KYRA_RESOURCE_H
24 
25 
26 #include "common/scummsys.h"
27 #include "common/str.h"
28 #include "common/file.h"
29 #include "common/list.h"
30 #include "common/hash-str.h"
31 #include "common/hashmap.h"
32 #include "common/macresman.h"
33 #include "common/stream.h"
34 #include "common/ptr.h"
35 #include "common/archive.h"
36 
37 #include "kyra/kyra_v1.h"
38 #include "kyra/engine/darkmoon.h"
39 #include "kyra/engine/lol.h"
40 #include "kyra/engine/kyra_hof.h"
41 
42 namespace Kyra {
43 
44 class Resource;
45 
46 class ResArchiveLoader;
47 
48 class Resource {
49 public:
51  ~Resource();
52 
53  bool reset();
54 
55  bool loadPakFile(const Common::Path &filename);
56  bool loadPakFile(const Common::String &name, Common::ArchiveMemberPtr file);
57 
58  void unloadPakFile(const Common::String &name, bool remFromCache = false);
59  void unloadPakFile(const char *name, bool remFromCache = false) { unloadPakFile(Common::String(name), remFromCache); }
60  void unloadPakFile(const Common::Path &name, bool remFromCache = false) { unloadPakFile(name.toString('/'), remFromCache); }
61 
62  bool isInPakList(const Common::String &name);
63 
64  bool isInCacheList(const Common::String &name);
65 
66  bool loadFileList(const Common::Path &filedata);
67  bool loadFileList(const char *const *filelist, uint32 numFiles);
68 
69  // This unloads *all* pakfiles, even kyra.dat and protected ones.
70  // It does not remove files from cache though!
71  void unloadAllPakFiles();
72 
73  void listFiles(const Common::Path &pattern, Common::ArchiveMemberList &list);
74 
75  bool exists(const Common::Path &file, bool errorOutOnFail=false);
76  uint32 getFileSize(const Common::Path &file);
77  uint8 *fileData(const Common::Path &file, uint32 *size);
78  Common::SeekableReadStream *createReadStream(const Common::Path &file);
79 
80  enum Endianness {
81  kPlatformEndianness = 0,
82  kForceLE,
83  kForceBE
84  };
85 
86  Common::SeekableReadStreamEndian *createEndianAwareReadStream(const Common::Path &file, int endianness = kPlatformEndianness);
87 
88  bool loadFileToBuf(const Common::Path &file, void *buf, uint32 maxSize);
89 
90  Common::Archive *getCachedArchive(const Common::String &file) const;
91 
92 protected:
94  ArchiveMap _archiveCache;
95 
96  Common::SearchSet _files;
97  Common::SearchSet _archiveFiles;
98  Common::SearchSet _protectedFiles;
99 
100  Common::Archive *loadArchive(const Common::String &name, Common::ArchiveMemberPtr member);
101  Common::Archive *loadInstallerArchive(const Common::Path &file, const Common::String &ext, const uint8 offset);
102  Common::Archive *loadStuffItArchive(const Common::Path &file, const Common::String &canonicalName);
103  Common::Archive *loadStuffItArchive(Common::SeekableReadStream *stream, const Common::String &canonicalName, const Common::String &debugName);
104  Common::Archive *loadKyra1MacInstaller();
105 
106  bool loadProtectedFiles(const char *const * list);
107 
108  void initializeLoaders();
109 
111  LoaderList _loaders;
112 
113  const bool _bigEndianPlatForm;
114  KyraEngine_v1 *_vm;
115 };
116 
117 enum KyraResources {
118  kLoadAll = -1,
119 
120  // This list has to match orderwise (and thus value wise) the static data list of "devtools/create_kyradat/create_kyradat.h"!
121  k1ForestSeq = 1,
122  k1KallakWritingSeq,
123  k1KyrandiaLogoSeq,
124  k1KallakMalcolmSeq,
125  k1MalcolmTreeSeq,
126  k1WestwoodLogoSeq,
127 
128  k1Demo1Seq,
129  k1Demo2Seq,
130  k1Demo3Seq,
131  k1Demo4Seq,
132 
133  k1AmuleteAnimSeq,
134 
135  k1OutroReunionSeq,
136 
137  k1IntroCPSStrings,
138  k1IntroCOLStrings,
139  k1IntroWSAStrings,
140  k1IntroStrings,
141 
142  k1OutroHomeString,
143 
144  k1RoomFilenames,
145  k1RoomList,
146 
147  k1CharacterImageFilenames,
148 
149  k1ItemNames,
150  k1TakenStrings,
151  k1PlacedStrings,
152  k1DroppedStrings,
153  k1NoDropStrings,
154 
155  k1PutDownString,
156  k1WaitAmuletString,
157  k1BlackJewelString,
158  k1PoisonGoneString,
159  k1HealingTipString,
160  k1WispJewelStrings,
161  k1MagicJewelStrings,
162 
163  k1ThePoisonStrings,
164  k1FluteStrings,
165 
166  k1FlaskFullString,
167  k1FullFlaskString,
168 
169  k1VeryCleverString,
170  k1NewGameString,
171 
172  k1DefaultShapes,
173  k1Healing1Shapes,
174  k1Healing2Shapes,
175  k1PoisonDeathShapes,
176  k1FluteShapes,
177  k1Winter1Shapes,
178  k1Winter2Shapes,
179  k1Winter3Shapes,
180  k1DrinkShapes,
181  k1WispShapes,
182  k1MagicAnimShapes,
183  k1BranStoneShapes,
184 
185  k1SpecialPalette1,
186  k1SpecialPalette2,
187  k1SpecialPalette3,
188  k1SpecialPalette4,
189  k1SpecialPalette5,
190  k1SpecialPalette6,
191  k1SpecialPalette7,
192  k1SpecialPalette8,
193  k1SpecialPalette9,
194  k1SpecialPalette10,
195  k1SpecialPalette11,
196  k1SpecialPalette12,
197  k1SpecialPalette13,
198  k1SpecialPalette14,
199  k1SpecialPalette15,
200  k1SpecialPalette16,
201  k1SpecialPalette17,
202  k1SpecialPalette18,
203  k1SpecialPalette19,
204  k1SpecialPalette20,
205  k1SpecialPalette21,
206  k1SpecialPalette22,
207  k1SpecialPalette23,
208  k1SpecialPalette24,
209  k1SpecialPalette25,
210  k1SpecialPalette26,
211  k1SpecialPalette27,
212  k1SpecialPalette28,
213  k1SpecialPalette29,
214  k1SpecialPalette30,
215  k1SpecialPalette31,
216  k1SpecialPalette32,
217  k1SpecialPalette33,
218 
219  k1GUIStrings,
220  k1ConfigStrings,
221  k1ConfigStrings2,
222 
223  k1AudioTracks,
224  k1AudioTracksIntro,
225 
226  k1CreditsStrings,
227 
228  k1TownsMusicFadeTable,
229  k1TownsSFXwdTable,
230  k1TownsSFXbtTable,
231  k1TownsCDATable,
232 
233  k1PC98StoryStrings,
234  k1PC98IntroSfx,
235 
236  k1AmigaIntroSFXTable,
237  k1AmigaGameSFXTable,
238 
239  k1TwoByteFontLookupTable,
240 
241  k2SeqplayPakFiles,
242  k2SeqplayCredits,
243  k2SeqplayCreditsSpecial,
244  k2SeqplayStrings,
245  k2SeqplaySfxFiles,
246  k2SeqplayTlkFiles,
247  k2SeqplaySeqData,
248  k2SeqplayIntroTracks,
249  k2SeqplayFinaleTracks,
250  k2SeqplayIntroCDA,
251  k2SeqplayFinaleCDA,
252  k2SeqplayShapeAnimData,
253 
254  k2IngamePakFiles,
255  k2IngameSfxFiles,
256  k2IngameSfxIndex,
257  k2IngameTracks,
258  k2IngameCDA,
259  k2IngameTalkObjIndex,
260  k2IngameTimJpStrings,
261  k2IngameShapeAnimData,
262  k2IngameTlkDemoStrings,
263  k2FontData,
264 
265  k3MainMenuStrings,
266  k3MusicFiles,
267  k3ScoreTable,
268  k3SfxFiles,
269  k3SfxMap,
270  k3ItemAnimData,
271  k3ItemMagicTable,
272  k3ItemStringMap,
273 
274  k3VqaSubtitlesIntro,
275  k3VqaSubtitlesBoat,
276 
277 #if defined(ENABLE_EOB) || defined(ENABLE_LOL)
278  kRpgCommonMoreStrings,
279  kRpgCommonDscShapeIndex,
280  kRpgCommonDscX,
281  kRpgCommonDscTileIndex,
282  kRpgCommonDscDoorShapeIndex,
283  kRpgCommonDscDimData1,
284  kRpgCommonDscDimData2,
285  kRpgCommonDscBlockMap,
286  kRpgCommonDscDimMap,
287  kRpgCommonDscDoorY2,
288  kRpgCommonDscDoorFrameY1,
289  kRpgCommonDscDoorFrameY2,
290  kRpgCommonDscDoorFrameIndex1,
291  kRpgCommonDscDoorFrameIndex2,
292  kRpgCommonDscDoorScaleOffs,
293  kRpgCommonDscBlockIndex,
294 
295  kEoBBaseChargenStrings1,
296  kEoBBaseChargenStrings2,
297  kEoBBaseChargenStartLevels,
298  kEoBBaseChargenStatStrings,
299  kEoBBaseChargenRaceSexStrings,
300  kEoBBaseChargenClassStrings,
301  kEoBBaseChargenAlignmentStrings,
302  kEoBBaseChargenEnterGameStrings,
303  kEoBBaseChargenClassMinStats,
304  kEoBBaseChargenRaceMinStats,
305  kEoBBaseChargenRaceMaxStats,
306 
307  kEoBBaseSaveThrowTable1,
308  kEoBBaseSaveThrowTable2,
309  kEoBBaseSaveThrowTable3,
310  kEoBBaseSaveThrowTable4,
311  kEoBBaseSaveThrwLvlIndex,
312  kEoBBaseSaveThrwModDiv,
313  kEoBBaseSaveThrwModExt,
314 
315  kEoBBasePryDoorStrings,
316  kEoBBaseWarningStrings,
317 
318  kEoBBaseItemSuffixStringsRings,
319  kEoBBaseItemSuffixStringsPotions,
320  kEoBBaseItemSuffixStringsWands,
321 
322  kEoBBaseRipItemStrings,
323  kEoBBaseCursedString,
324  kEoBBaseEnchantedString,
325  kEoBBaseMagicObjectStrings,
326  kEoBBaseMagicObjectString5,
327  kEoBBasePatternSuffix,
328  kEoBBasePatternGrFix1,
329  kEoBBasePatternGrFix2,
330  kEoBBaseValidateArmorString,
331  kEoBBaseValidateCursedString,
332  kEoBBaseValidateNoDropString,
333  kEoBBasePotionStrings,
334  kEoBBaseWandStrings,
335  kEoBBaseItemMisuseStrings,
336 
337  kEoBBaseTakenStrings,
338  kEoBBasePotionEffectStrings,
339 
340  kEoBBaseYesNoStrings,
341  kEoBBaseNpcMaxStrings,
342  kEoBBaseOkStrings,
343  kEoBBaseNpcJoinStrings,
344  kEoBBaseCancelStrings,
345  kEoBBaseAbortStrings,
346 
347  kEoBBaseMenuStringsMain,
348  kEoBBaseMenuStringsSaveLoad,
349  kEoBBaseMenuStringsOnOff,
350  kEoBBaseMenuStringsSpells,
351  kEoBBaseMenuStringsRest,
352  kEoBBaseMenuStringsDrop,
353  kEoBBaseMenuStringsExit,
354  kEoBBaseMenuStringsStarve,
355  kEoBBaseMenuStringsScribe,
356  kEoBBaseMenuStringsDrop2,
357  kEoBBaseMenuStringsHead,
358  kEoBBaseMenuStringsPoison,
359  kEoBBaseMenuStringsMgc,
360  kEoBBaseMenuStringsPrefs,
361  kEoBBaseMenuStringsRest2,
362  kEoBBaseMenuStringsRest3,
363  kEoBBaseMenuStringsRest4,
364  kEoBBaseMenuStringsDefeat,
365  kEoBBaseMenuStringsTransfer,
366  kEoBBaseMenuStringsSpec,
367  kEoBBaseMenuStringsSpellNo,
368  kEoBBaseMenuYesNoStrings,
369 
370  kEoBBaseSpellLevelsMage,
371  kEoBBaseSpellLevelsCleric,
372  kEoBBaseNumSpellsCleric,
373  kEoBBaseNumSpellsWisAdj,
374  kEoBBaseNumSpellsPal,
375  kEoBBaseNumSpellsMage,
376 
377  kEoBBaseCharGuiStringsHp,
378  kEoBBaseCharGuiStringsWp1,
379  kEoBBaseCharGuiStringsWp2,
380  kEoBBaseCharGuiStringsWr,
381  kEoBBaseCharGuiStringsSt1,
382  kEoBBaseCharGuiStringsSt2,
383  kEoBBaseCharGuiStringsIn,
384 
385  kEoBBaseCharStatusStrings7,
386  kEoBBaseCharStatusStrings81,
387  kEoBBaseCharStatusStrings82,
388  kEoBBaseCharStatusStrings9,
389  kEoBBaseCharStatusStrings12,
390  kEoBBaseCharStatusStrings131,
391  kEoBBaseCharStatusStrings132,
392 
393  kEoBBaseLevelGainStrings,
394  kEoBBaseExperienceTable0,
395  kEoBBaseExperienceTable1,
396  kEoBBaseExperienceTable2,
397  kEoBBaseExperienceTable3,
398  kEoBBaseExperienceTable4,
399 
400  kEoBBaseClassModifierFlags,
401 
402  kEoBBaseMonsterStepTable01,
403  kEoBBaseMonsterStepTable02,
404  kEoBBaseMonsterStepTable1,
405  kEoBBaseMonsterStepTable2,
406  kEoBBaseMonsterStepTable3,
407  kEoBBaseMonsterCloseAttPosTable1,
408  kEoBBaseMonsterCloseAttPosTable21,
409  kEoBBaseMonsterCloseAttPosTable22,
410  kEoBBaseMonsterCloseAttUnkTable,
411  kEoBBaseMonsterCloseAttChkTable1,
412  kEoBBaseMonsterCloseAttChkTable2,
413  kEoBBaseMonsterCloseAttDstTable1,
414  kEoBBaseMonsterCloseAttDstTable2,
415 
416  kEoBBaseMonsterProximityTable,
417  kEoBBaseFindBlockMonstersTable,
418  kEoBBaseMonsterDirChangeTable,
419  kEoBBaseMonsterDistAttStrings,
420 
421  kEoBBaseEncodeMonsterDefs,
422  kEoBBaseEncodeMonsterDefs00,
423  kEoBBaseEncodeMonsterDefs01,
424  kEoBBaseEncodeMonsterDefs02,
425  kEoBBaseEncodeMonsterDefs03,
426  kEoBBaseEncodeMonsterDefs04,
427  kEoBBaseEncodeMonsterDefs05,
428  kEoBBaseEncodeMonsterDefs06,
429  kEoBBaseEncodeMonsterDefs07,
430  kEoBBaseEncodeMonsterDefs08,
431  kEoBBaseEncodeMonsterDefs09,
432  kEoBBaseEncodeMonsterDefs10,
433  kEoBBaseEncodeMonsterDefs11,
434  kEoBBaseEncodeMonsterDefs12,
435  kEoBBaseEncodeMonsterDefs13,
436  kEoBBaseEncodeMonsterDefs14,
437  kEoBBaseEncodeMonsterDefs15,
438  kEoBBaseEncodeMonsterDefs16,
439  kEoBBaseEncodeMonsterDefs17,
440  kEoBBaseEncodeMonsterDefs18,
441  kEoBBaseEncodeMonsterDefs19,
442  kEoBBaseEncodeMonsterDefs20,
443  kEoBBaseEncodeMonsterDefs21,
444  kEoBBaseNpcPresets,
445  kEoBBaseNpcPresetsNames,
446 
447  kEoBBaseWllFlagPreset,
448  kEoBBaseDscShapeCoords,
449 
450  kEoBBaseDscDoorScaleMult1,
451  kEoBBaseDscDoorScaleMult2,
452  kEoBBaseDscDoorScaleMult3,
453  kEoBBaseDscDoorScaleMult4,
454  kEoBBaseDscDoorScaleMult5,
455  kEoBBaseDscDoorScaleMult6,
456  kEoBBaseDscDoorType5Offs,
457  kEoBBaseDscDoorXE,
458  kEoBBaseDscDoorY1,
459  kEoBBaseDscDoorY3,
460  kEoBBaseDscDoorY4,
461  kEoBBaseDscDoorY5,
462  kEoBBaseDscDoorY6,
463  kEoBBaseDscDoorY7,
464  kEoBBaseDscDoorCoordsExt,
465 
466  kEoBBaseDscItemPosIndex,
467  kEoBBaseDscItemShpX,
468  kEoBBaseDscItemScaleIndex,
469  kEoBBaseDscItemTileIndex,
470  kEoBBaseDscItemShapeMap,
471 
472  kEoBBaseDscMonsterFrmOffsTbl1,
473  kEoBBaseDscMonsterFrmOffsTbl2,
474 
475  kEoBBaseInvSlotX,
476  kEoBBaseInvSlotY,
477  kEoBBaseSlotValidationFlags,
478 
479  kEoBBaseProjectileWeaponTypes,
480  kEoBBaseWandTypes,
481 
482  kEoBBaseDrawObjPosIndex,
483  kEoBBaseFlightObjFlipIndex,
484  kEoBBaseFlightObjShpMap,
485  kEoBBaseFlightObjSclIndex,
486 
487  kEoBBaseDscTelptrShpCoords,
488 
489  kEoBBasePortalSeqData,
490  kEoBBaseManDef,
491  kEoBBaseManWord,
492  kEoBBaseManPrompt,
493 
494  kEoBBaseBookNumbers,
495  kEoBBaseMageSpellsList,
496  kEoBBaseClericSpellsList,
497  kEoBBaseMageSpellsList2,
498  kEoBBaseClericSpellsList2,
499  kEoBBaseSpellNames,
500  kEoBBaseMagicStrings1,
501  kEoBBaseMagicStrings2,
502  kEoBBaseMagicStrings3,
503  kEoBBaseMagicStrings4,
504  kEoBBaseMagicStrings6,
505  kEoBBaseMagicStrings7,
506  kEoBBaseMagicStrings8,
507  kEoBBaseMagicStrings9,
508 
509  kEoBBaseExpObjectTlMode,
510  kEoBBaseExpObjectTblIndex,
511  kEoBBaseExpObjectShpStart,
512  kEoBBaseExpObjectTbl1,
513  kEoBBaseExpObjectTbl2,
514  kEoBBaseExpObjectTbl3,
515  kEoBBaseExpObjectY,
516 
517  kEoBBaseSparkDefSteps,
518  kEoBBaseSparkDefSubSteps,
519  kEoBBaseSparkDefShift,
520  kEoBBaseSparkDefAdd,
521  kEoBBaseSparkDefX,
522  kEoBBaseSparkDefY,
523  kEoBBaseSparkOfFlags1,
524  kEoBBaseSparkOfFlags2,
525  kEoBBaseSparkOfShift,
526  kEoBBaseSparkOfX,
527  kEoBBaseSparkOfY,
528 
529  kEoBBaseSpellProperties,
530  kEoBBaseMagicFlightProps,
531  kEoBBaseTurnUndeadEffect,
532  kEoBBaseBurningHandsDest,
533  kEoBBaseConeOfColdDest1,
534  kEoBBaseConeOfColdDest2,
535  kEoBBaseConeOfColdDest3,
536  kEoBBaseConeOfColdDest4,
537  kEoBBaseConeOfColdGfxTbl,
538 
539  kEoBBaseSoundMap,
540  kEoBBaseSoundFilesIntro,
541  kEoBBaseSoundFilesIngame,
542  kEoBBaseSoundFilesFinale,
543  kEoBBaseLevelSounds1,
544  kEoBBaseLevelSounds2,
545 
546  kEoBBaseTextInputCharacterLines,
547  kEoBBaseTextInputSelectStrings,
548 
549  kEoBBaseSaveNamePatterns,
550 
551  kEoB1DefaultPartyStats,
552  kEoB1DefaultPartyNames,
553  kEoB1MainMenuStrings,
554  kEoB1BonusStrings,
555 
556  kEoB1IntroFilesOpening,
557  kEoB1IntroFilesTower,
558  kEoB1IntroFilesOrb,
559  kEoB1IntroFilesWdEntry,
560  kEoB1IntroFilesKing,
561  kEoB1IntroFilesHands,
562  kEoB1IntroFilesWdExit,
563  kEoB1IntroFilesTunnel,
564 
565  kEoB1IntroStringsTower,
566  kEoB1IntroStringsOrb,
567  kEoB1IntroStringsWdEntry,
568  kEoB1IntroStringsKing,
569  kEoB1IntroStringsHands,
570  kEoB1IntroStringsWdExit,
571  kEoB1IntroStringsTunnel,
572 
573  kEoB1FinaleStrings,
574 
575  kEoB1IntroOpeningFrmDelay,
576  kEoB1IntroWdEncodeX,
577  kEoB1IntroWdEncodeY,
578  kEoB1IntroWdEncodeWH,
579  kEoB1IntroWdDsX,
580  kEoB1IntroWdDsY,
581  kEoB1IntroTvlX1,
582  kEoB1IntroTvlY1,
583  kEoB1IntroTvlX2,
584  kEoB1IntroTvlY2,
585  kEoB1IntroTvlW,
586  kEoB1IntroTvlH,
587  kEoB1IntroOrbFadePal,
588 
589  kEoB1FinaleCouncilAnim1,
590  kEoB1FinaleCouncilAnim2,
591  kEoB1FinaleCouncilAnim3,
592  kEoB1FinaleCouncilAnim4,
593  kEoB1FinaleEyesAnim,
594  kEoB1FinaleHandsAnim,
595  kEoB1FinaleHandsAnim2,
596  kEoB1FinaleHandsAnim3,
597  kEoB1FinaleTextDuration,
598  kEoB1CreditsStrings,
599  kEoB1CreditsCharWdth,
600 
601  kEoB1CreditsStrings2,
602  kEoB1CreditsTileGrid,
603 
604  kEoB1DoorShapeDefs,
605  kEoB1DoorSwitchShapeDefs,
606  kEoB1DoorSwitchCoords,
607  kEoB1MonsterProperties,
608 
609  kEoB1EnemyMageSpellList,
610  kEoB1EnemyMageSfx,
611  kEoB1BeholderSpellList,
612  kEoB1BeholderSfx,
613  kEoB1TurnUndeadString,
614 
615  kEoB1CgaMappingDefault,
616  kEoB1CgaMappingAlt,
617  kEoB1CgaMappingInv,
618  kEoB1CgaMappingItemsL,
619  kEoB1CgaMappingItemsS,
620  kEoB1CgaMappingThrown,
621  kEoB1CgaMappingIcons,
622  kEoB1CgaMappingDeco,
623  kEoB1CgaLevelMappingIndex,
624  kEoB1CgaMappingLevel0,
625  kEoB1CgaMappingLevel1,
626  kEoB1CgaMappingLevel2,
627  kEoB1CgaMappingLevel3,
628  kEoB1CgaMappingLevel4,
629 
630  kEoB1Palettes16c,
631  kEoB1PalCycleData,
632  kEoB1PalCycleStyle1,
633  kEoB1PalCycleStyle2,
634  kEoB1PalettesSega,
635  kEoB1PatternTable0,
636  kEoB1PatternTable1,
637  kEoB1PatternTable2,
638  kEoB1PatternTable3,
639  kEoB1PatternTable4,
640  kEoB1PatternTable5,
641  kEoB1PatternAddTable1,
642  kEoB1PatternAddTable2,
643 
644  kEoB1MonsterAnimFrames00,
645  kEoB1MonsterAnimFrames01,
646  kEoB1MonsterAnimFrames02,
647  kEoB1MonsterAnimFrames03,
648  kEoB1MonsterAnimFrames04,
649  kEoB1MonsterAnimFrames05,
650  kEoB1MonsterAnimFrames06,
651  kEoB1MonsterAnimFrames07,
652  kEoB1MonsterAnimFrames08,
653  kEoB1MonsterAnimFrames09,
654  kEoB1MonsterAnimFrames10,
655  kEoB1MonsterAnimFrames11,
656  kEoB1MonsterAnimFrames12,
657  kEoB1MonsterAnimFrames13,
658  kEoB1MonsterAnimFrames14,
659  kEoB1MonsterAnimFrames15,
660  kEoB1MonsterAnimFrames16,
661  kEoB1MonsterAnimFrames17,
662  kEoB1MonsterAnimFrames18,
663  kEoB1MonsterAnimFrames19,
664  kEoB1MonsterAnimFrames20,
665  kEoB1MonsterAnimFrames21,
666  kEoB1MonsterAnimFrames22,
667  kEoB1MonsterAnimFrames23,
668  kEoB1MonsterAnimFrames24,
669  kEoB1MonsterAnimFrames25,
670  kEoB1MonsterAnimFrames26,
671  kEoB1MonsterAnimFrames27,
672  kEoB1MonsterAnimFrames28,
673  kEoB1MonsterAnimFrames29,
674  kEoB1MonsterAnimFrames30,
675  kEoB1MonsterAnimFrames31,
676  kEoB1MonsterAnimFrames32,
677  kEoB1MonsterAnimFrames33,
678  kEoB1MonsterAnimFrames34,
679  kEoB1MonsterAnimFrames35,
680  kEoB1MonsterAnimFrames36,
681  kEoB1MonsterAnimFrames37,
682  kEoB1MonsterAnimFrames38,
683  kEoB1MonsterAnimFrames39,
684  kEoB1MonsterAnimFrames40,
685  kEoB1MonsterAnimFrames41,
686  kEoB1MonsterAnimFrames42,
687  kEoB1MonsterAnimFrames43,
688  kEoB1MonsterAnimFrames44,
689  kEoB1MonsterAnimFrames45,
690  kEoB1MonsterAnimFrames46,
691  kEoB1MonsterAnimFrames47,
692  kEoB1MonsterAnimFrames48,
693  kEoB1MonsterAnimFrames49,
694  kEoB1MonsterAnimFrames50,
695  kEoB1MonsterAnimFrames51,
696  kEoB1MonsterAnimFrames52,
697  kEoB1MonsterAnimFrames53,
698  kEoB1MonsterAnimFrames54,
699  kEoB1MonsterAnimFrames55,
700  kEoB1MonsterAnimFrames56,
701  kEoB1MonsterAnimFrames57,
702  kEoB1MonsterAnimFrames58,
703  kEoB1MonsterAnimFrames59,
704  kEoB1MonsterAnimFrames60,
705  kEoB1MonsterAnimFrames61,
706  kEoB1MonsterAnimFrames62,
707  kEoB1MonsterAnimFrames63,
708  kEoB1MonsterAnimFrames64,
709  kEoB1MonsterAnimFrames65,
710  kEoB1MonsterAnimFrames66,
711  kEoB1MonsterAnimFrames67,
712  kEoB1MonsterAnimFrames68,
713  kEoB1MonsterAnimFrames69,
714  kEoB1MonsterAnimFrames70,
715  kEoB1MonsterAnimFrames71,
716  kEoB1MonsterAnimFrames72,
717  kEoB1MonsterAnimFrames73,
718  kEoB1MonsterAnimFrames74,
719  kEoB1MonsterAnimFrames75,
720  kEoB1MonsterAnimFrames76,
721  kEoB1MonsterAnimFrames77,
722  kEoB1MonsterAnimFrames78,
723  kEoB1MonsterAnimFrames79,
724  kEoB1MonsterAnimFrames80,
725  kEoB1MonsterAnimFrames81,
726  kEoB1MonsterAnimFrames82,
727  kEoB1MonsterAnimFrames83,
728  kEoB1MonsterAnimFrames84,
729  kEoB1MonsterAnimFrames85,
730  kEoB1MonsterAnimFrames86,
731  kEoB1MonsterAnimFrames87,
732  kEoB1MonsterAnimFrames88,
733  kEoB1MonsterAnimFrames89,
734  kEoB1MonsterAnimFrames90,
735  kEoB1MonsterAnimFrames91,
736  kEoB1MonsterAnimFrames92,
737  kEoB1MonsterAnimFrames93,
738  kEoB1MonsterAnimFrames94,
739  kEoB1MonsterAnimFrames95,
740  kEoB1MonsterAnimFrames96,
741  kEoB1MonsterAnimFrames97,
742  kEoB1MonsterAnimFrames98,
743  kEoB1MonsterAnimFrames99,
744  kEoB1MonsterAnimFrames100,
745  kEoB1MonsterAnimFrames101,
746  kEoB1MonsterAnimFrames102,
747  kEoB1MonsterAnimFrames103,
748  kEoB1MonsterAnimFrames104,
749  kEoB1MonsterAnimFrames105,
750  kEoB1MonsterAnimFrames106,
751  kEoB1MonsterAnimFrames107,
752  kEoB1MonsterAnimFrames108,
753  kEoB1MonsterAnimFrames109,
754 
755  kEoB1NpcShpData,
756  kEoB1NpcSubShpIndex1,
757  kEoB1NpcSubShpIndex2,
758  kEoB1NpcSubShpY,
759  kEoB1Npc0Strings,
760  kEoB1Npc11Strings,
761  kEoB1Npc12Strings,
762  kEoB1Npc21Strings,
763  kEoB1Npc22Strings,
764  kEoB1Npc31Strings,
765  kEoB1Npc32Strings,
766  kEoB1Npc4Strings,
767  kEoB1Npc5Strings,
768  kEoB1Npc6Strings,
769  kEoB1Npc7Strings,
770 
771  kEoB1ParchmentStrings,
772  kEoB1ItemNames,
773  kEoB1SpeechAnimData,
774  kEoB1WdAnimSprites,
775  kEoB1SequenceTrackMap,
776 
777  kEoB1MapStrings1,
778  kEoB1MapStrings2,
779  kEoB1MapStrings3,
780  kEoB1MapLevelData,
781 
782  kEoB1Ascii2SjisTable1,
783  kEoB1Ascii2SjisTable2,
784  kEoB1FontLookupTable,
785  kEoB1CharWidthTable1,
786  kEoB1CharWidthTable2,
787  kEoB1CharWidthTable3,
788  kEoB1CharTilesTable,
789 
790  kEoB2MainMenuStrings,
791  kEoB2MainMenuUtilStrings,
792 
793  kEoB2TransferPortraitFrames,
794  kEoB2TransferConvertTable,
795  kEoB2TransferItemTable,
796  kEoB2TransferExpTable,
797  kEoB2TransferStrings1,
798  kEoB2TransferStrings2,
799  kEoB2TransferLabels,
800 
801  kEoB2IntroStrings,
802  kEoB2IntroCPSFiles,
803  kEoB2IntroAnimData00,
804  kEoB2IntroAnimData01,
805  kEoB2IntroAnimData02,
806  kEoB2IntroAnimData03,
807  kEoB2IntroAnimData04,
808  kEoB2IntroAnimData05,
809  kEoB2IntroAnimData06,
810  kEoB2IntroAnimData07,
811  kEoB2IntroAnimData08,
812  kEoB2IntroAnimData09,
813  kEoB2IntroAnimData10,
814  kEoB2IntroAnimData11,
815  kEoB2IntroAnimData12,
816  kEoB2IntroAnimData13,
817  kEoB2IntroAnimData14,
818  kEoB2IntroAnimData15,
819  kEoB2IntroAnimData16,
820  kEoB2IntroAnimData17,
821  kEoB2IntroAnimData18,
822  kEoB2IntroAnimData19,
823  kEoB2IntroAnimData20,
824  kEoB2IntroAnimData21,
825  kEoB2IntroAnimData22,
826  kEoB2IntroAnimData23,
827  kEoB2IntroAnimData24,
828  kEoB2IntroAnimData25,
829  kEoB2IntroAnimData26,
830  kEoB2IntroAnimData27,
831  kEoB2IntroAnimData28,
832  kEoB2IntroAnimData29,
833  kEoB2IntroAnimData30,
834  kEoB2IntroAnimData31,
835  kEoB2IntroAnimData32,
836  kEoB2IntroAnimData33,
837  kEoB2IntroAnimData34,
838  kEoB2IntroAnimData35,
839  kEoB2IntroAnimData36,
840  kEoB2IntroAnimData37,
841  kEoB2IntroAnimData38,
842  kEoB2IntroAnimData39,
843  kEoB2IntroAnimData40,
844  kEoB2IntroAnimData41,
845  kEoB2IntroAnimData42,
846  kEoB2IntroAnimData43,
847 
848  // extra entries for PC-98
849  kEoB2IntroAnimData44,
850  kEoB2IntroAnimData45,
851  kEoB2IntroAnimData46,
852  kEoB2IntroAnimData47,
853 
854  kEoB2IntroShapes00,
855  kEoB2IntroShapes01,
856  kEoB2IntroShapes04,
857  kEoB2IntroShapes07,
858  kEoB2IntroShapes13,
859  kEoB2IntroShapes14,
860  kEoB2IntroShapes15,
861 
862  kEoB2FinaleStrings,
863  kEoB2CreditsData,
864  kEoB2FinaleCPSFiles,
865  kEoB2FinaleAnimData00,
866  kEoB2FinaleAnimData01,
867  kEoB2FinaleAnimData02,
868  kEoB2FinaleAnimData03,
869  kEoB2FinaleAnimData04,
870  kEoB2FinaleAnimData05,
871  kEoB2FinaleAnimData06,
872  kEoB2FinaleAnimData07,
873  kEoB2FinaleAnimData08,
874  kEoB2FinaleAnimData09,
875  kEoB2FinaleAnimData10,
876  kEoB2FinaleAnimData11,
877  kEoB2FinaleAnimData12,
878  kEoB2FinaleAnimData13,
879  kEoB2FinaleAnimData14,
880  kEoB2FinaleAnimData15,
881  kEoB2FinaleAnimData16,
882  kEoB2FinaleAnimData17,
883  kEoB2FinaleAnimData18,
884  kEoB2FinaleAnimData19,
885  kEoB2FinaleAnimData20,
886  kEoB2FinaleShapes00,
887  kEoB2FinaleShapes03,
888  kEoB2FinaleShapes07,
889  kEoB2FinaleShapes09,
890  kEoB2FinaleShapes10,
891 
892  kEoB2NpcShapeData,
893  kEoB2Npc1Strings,
894  kEoB2Npc2Strings,
895  kEoB2MonsterDustStrings,
896 
897  kEoB2DreamSteps,
898  kEoB2KheldranStrings,
899  kEoB2HornStrings,
900  kEoB2HornSounds,
901 
902  kEoB2WallOfForceDsX,
903  kEoB2WallOfForceDsY,
904  kEoB2WallOfForceNumW,
905  kEoB2WallOfForceNumH,
906  kEoB2WallOfForceShpId,
907 
908  kEoB2IntroCpsDataStreet1,
909  kEoB2IntroCpsDataStreet2,
910  kEoB2IntroCpsDataDoorway1,
911  kEoB2IntroCpsDataDoorway2,
912  kEoB2IntroCpsDataWestwood,
913  kEoB2IntroCpsDataWinding,
914  kEoB2IntroCpsDataKhelban2,
915  kEoB2IntroCpsDataKhelban1,
916  kEoB2IntroCpsDataKhelban3,
917  kEoB2IntroCpsDataKhelban4,
918  kEoB2IntroCpsDataCoin,
919  kEoB2IntroCpsDataKhelban5,
920  kEoB2IntroCpsDataKhelban6,
921 
922  kEoB2FinaleCpsDataDragon1,
923  kEoB2FinaleCpsDataDragon2,
924  kEoB2FinaleCpsDataHurry1,
925  kEoB2FinaleCpsDataHurry2,
926  kEoB2FinaleCpsDataDestroy0,
927  kEoB2FinaleCpsDataDestroy1,
928  kEoB2FinaleCpsDataDestroy2,
929  kEoB2FinaleCpsDataMagic,
930  kEoB2FinaleCpsDataDestroy3,
931  kEoB2FinaleCpsDataCredits2,
932  kEoB2FinaleCpsDataCredits3,
933  kEoB2FinaleCpsDataHeroes,
934  kEoB2FinaleCpsDataThanks,
935 
936  kEoB2ItemIconShapeData00,
937  kEoB2ItemIconShapeData01,
938  kEoB2ItemIconShapeData02,
939  kEoB2ItemIconShapeData03,
940  kEoB2ItemIconShapeData04,
941  kEoB2ItemIconShapeData05,
942  kEoB2ItemIconShapeData06,
943  kEoB2ItemIconShapeData07,
944  kEoB2ItemIconShapeData08,
945  kEoB2ItemIconShapeData09,
946  kEoB2ItemIconShapeData10,
947  kEoB2ItemIconShapeData11,
948  kEoB2ItemIconShapeData12,
949  kEoB2ItemIconShapeData13,
950  kEoB2ItemIconShapeData14,
951  kEoB2ItemIconShapeData15,
952  kEoB2ItemIconShapeData16,
953  kEoB2ItemIconShapeData17,
954  kEoB2ItemIconShapeData18,
955  kEoB2ItemIconShapeData19,
956  kEoB2ItemIconShapeData20,
957  kEoB2ItemIconShapeData21,
958  kEoB2ItemIconShapeData22,
959  kEoB2ItemIconShapeData23,
960  kEoB2ItemIconShapeData24,
961  kEoB2ItemIconShapeData25,
962  kEoB2ItemIconShapeData26,
963  kEoB2ItemIconShapeData27,
964  kEoB2ItemIconShapeData28,
965  kEoB2ItemIconShapeData29,
966  kEoB2ItemIconShapeData30,
967  kEoB2ItemIconShapeData31,
968  kEoB2ItemIconShapeData32,
969  kEoB2ItemIconShapeData33,
970  kEoB2ItemIconShapeData34,
971  kEoB2ItemIconShapeData35,
972  kEoB2ItemIconShapeData36,
973  kEoB2ItemIconShapeData37,
974  kEoB2ItemIconShapeData38,
975  kEoB2ItemIconShapeData39,
976  kEoB2ItemIconShapeData40,
977  kEoB2ItemIconShapeData41,
978  kEoB2ItemIconShapeData42,
979  kEoB2ItemIconShapeData43,
980  kEoB2ItemIconShapeData44,
981  kEoB2ItemIconShapeData45,
982  kEoB2ItemIconShapeData46,
983  kEoB2ItemIconShapeData47,
984  kEoB2ItemIconShapeData48,
985  kEoB2ItemIconShapeData49,
986  kEoB2ItemIconShapeData50,
987  kEoB2ItemIconShapeData51,
988  kEoB2ItemIconShapeData52,
989  kEoB2ItemIconShapeData53,
990  kEoB2ItemIconShapeData54,
991  kEoB2ItemIconShapeData55,
992  kEoB2ItemIconShapeData56,
993  kEoB2ItemIconShapeData57,
994  kEoB2ItemIconShapeData58,
995  kEoB2ItemIconShapeData59,
996  kEoB2ItemIconShapeData60,
997  kEoB2ItemIconShapeData61,
998  kEoB2ItemIconShapeData62,
999  kEoB2ItemIconShapeData63,
1000  kEoB2ItemIconShapeData64,
1001  kEoB2ItemIconShapeData65,
1002  kEoB2ItemIconShapeData66,
1003  kEoB2ItemIconShapeData67,
1004  kEoB2ItemIconShapeData68,
1005  kEoB2ItemIconShapeData69,
1006  kEoB2ItemIconShapeData70,
1007  kEoB2ItemIconShapeData71,
1008  kEoB2ItemIconShapeData72,
1009  kEoB2ItemIconShapeData73,
1010  kEoB2ItemIconShapeData74,
1011  kEoB2ItemIconShapeData75,
1012  kEoB2ItemIconShapeData76,
1013  kEoB2ItemIconShapeData77,
1014  kEoB2ItemIconShapeData78,
1015  kEoB2ItemIconShapeData79,
1016  kEoB2ItemIconShapeData80,
1017  kEoB2ItemIconShapeData81,
1018  kEoB2ItemIconShapeData82,
1019  kEoB2ItemIconShapeData83,
1020  kEoB2ItemIconShapeData84,
1021  kEoB2ItemIconShapeData85,
1022  kEoB2ItemIconShapeData86,
1023  kEoB2ItemIconShapeData87,
1024  kEoB2ItemIconShapeData88,
1025  kEoB2ItemIconShapeData89,
1026  kEoB2ItemIconShapeData90,
1027  kEoB2ItemIconShapeData91,
1028  kEoB2ItemIconShapeData92,
1029  kEoB2ItemIconShapeData93,
1030  kEoB2ItemIconShapeData94,
1031  kEoB2ItemIconShapeData95,
1032  kEoB2ItemIconShapeData96,
1033  kEoB2ItemIconShapeData97,
1034  kEoB2ItemIconShapeData98,
1035  kEoB2ItemIconShapeData99,
1036  kEoB2ItemIconShapeData100,
1037  kEoB2ItemIconShapeData101,
1038  kEoB2ItemIconShapeData102,
1039  kEoB2ItemIconShapeData103,
1040  kEoB2ItemIconShapeData104,
1041  kEoB2ItemIconShapeData105,
1042  kEoB2ItemIconShapeData106,
1043  kEoB2ItemIconShapeData107,
1044  kEoB2ItemIconShapeData108,
1045  kEoB2ItemIconShapeData109,
1046  kEoB2ItemIconShapeData110,
1047  kEoB2ItemIconShapeData111,
1048 
1049  kEoB2LargeItemsShapeData00,
1050  kEoB2LargeItemsShapeData01,
1051  kEoB2LargeItemsShapeData02,
1052  kEoB2LargeItemsShapeData03,
1053  kEoB2LargeItemsShapeData04,
1054  kEoB2LargeItemsShapeData05,
1055  kEoB2LargeItemsShapeData06,
1056  kEoB2LargeItemsShapeData07,
1057  kEoB2LargeItemsShapeData08,
1058  kEoB2LargeItemsShapeData09,
1059  kEoB2LargeItemsShapeData10,
1060 
1061  kEoB2SmallItemsShapeData00,
1062  kEoB2SmallItemsShapeData01,
1063  kEoB2SmallItemsShapeData02,
1064  kEoB2SmallItemsShapeData03,
1065  kEoB2SmallItemsShapeData04,
1066  kEoB2SmallItemsShapeData05,
1067  kEoB2SmallItemsShapeData06,
1068  kEoB2SmallItemsShapeData07,
1069  kEoB2SmallItemsShapeData08,
1070  kEoB2SmallItemsShapeData09,
1071  kEoB2SmallItemsShapeData10,
1072  kEoB2SmallItemsShapeData11,
1073  kEoB2SmallItemsShapeData12,
1074  kEoB2SmallItemsShapeData13,
1075  kEoB2SmallItemsShapeData14,
1076  kEoB2SmallItemsShapeData15,
1077  kEoB2SmallItemsShapeData16,
1078  kEoB2SmallItemsShapeData17,
1079  kEoB2SmallItemsShapeData18,
1080  kEoB2SmallItemsShapeData19,
1081  kEoB2SmallItemsShapeData20,
1082  kEoB2SmallItemsShapeData21,
1083  kEoB2SmallItemsShapeData22,
1084  kEoB2SmallItemsShapeData23,
1085  kEoB2SmallItemsShapeData24,
1086  kEoB2SmallItemsShapeData25,
1087 
1088  kEoB2ThrownShapeData00,
1089  kEoB2ThrownShapeData01,
1090  kEoB2ThrownShapeData02,
1091  kEoB2ThrownShapeData03,
1092  kEoB2ThrownShapeData04,
1093  kEoB2ThrownShapeData05,
1094  kEoB2ThrownShapeData06,
1095  kEoB2ThrownShapeData07,
1096  kEoB2ThrownShapeData08,
1097 
1098  kEoB2SpellShapeData00,
1099  kEoB2SpellShapeData01,
1100  kEoB2SpellShapeData02,
1101  kEoB2SpellShapeData03,
1102 
1103  kEoB2TeleporterShapeData00,
1104  kEoB2TeleporterShapeData01,
1105  kEoB2TeleporterShapeData02,
1106  kEoB2TeleporterShapeData03,
1107  kEoB2TeleporterShapeData04,
1108  kEoB2TeleporterShapeData05,
1109 
1110  kEoB2LightningColumnShapeData,
1111  kEoB2DeadCharShapeData,
1112  kEoB2DisabledCharGridShapeData,
1113  kEoB2WeaponSlotGridShapeData,
1114  kEoB2SmallGridShapeData,
1115  kEoB2WideGridShapeData,
1116  kEoB2RedSplatShapeData,
1117  kEoB2GreenSplatShapeData,
1118 
1119  kEoB2FirebeamShapeData00,
1120  kEoB2FirebeamShapeData01,
1121  kEoB2FirebeamShapeData02,
1122 
1123  kEoB2SparkShapeData00,
1124  kEoB2SparkShapeData01,
1125  kEoB2SparkShapeData02,
1126 
1127  kEoB2CompassShapeData00,
1128  kEoB2CompassShapeData01,
1129  kEoB2CompassShapeData02,
1130  kEoB2CompassShapeData03,
1131  kEoB2CompassShapeData04,
1132  kEoB2CompassShapeData05,
1133  kEoB2CompassShapeData06,
1134  kEoB2CompassShapeData07,
1135  kEoB2CompassShapeData08,
1136  kEoB2CompassShapeData09,
1137  kEoB2CompassShapeData10,
1138  kEoB2CompassShapeData11,
1139 
1140  kEoB2WallOfForceShapeData00,
1141  kEoB2WallOfForceShapeData01,
1142  kEoB2WallOfForceShapeData02,
1143  kEoB2WallOfForceShapeData03,
1144  kEoB2WallOfForceShapeData04,
1145  kEoB2WallOfForceShapeData05,
1146 
1147  kEoB2UtilMenuStrings,
1148  kEoB2Config2431Strings,
1149  kEoB2FontLookupTbl,
1150  kEoB2FontConvertTbl,
1151  kEoB2Ascii2SjisTables,
1152  kEoB2Ascii2SjisTables2,
1153  kEoB2PcmSoundEffectsIngame,
1154  kEoB2PcmSoundEffectsIntro,
1155  kEoB2PcmSoundEffectsFinale,
1156 
1157  kEoB2SoundMapExtra,
1158  kEoB2SoundIndex1,
1159  kEoB2SoundIndex2,
1160  kEoB2SoundFilesIngame2,
1161  kEoB2MonsterSoundPatchData,
1162 
1163  kLoLIngamePakFiles,
1164  kLoLCharacterDefs,
1165  kLoLIngameSfxFiles,
1166  kLoLIngameSfxIndex,
1167  kLoLMusicTrackMap,
1168  kLoLIngameGMSfxIndex,
1169  kLoLIngameMT32SfxIndex,
1170  kLoLIngamePcSpkSfxIndex,
1171  kLoLSpellProperties,
1172  kLoLGameShapeMap,
1173  kLoLSceneItemOffs,
1174  kLoLCharInvIndex,
1175  kLoLCharInvDefs,
1176  kLoLCharDefsMan,
1177  kLoLCharDefsWoman,
1178  kLoLCharDefsKieran,
1179  kLoLCharDefsAkshel,
1180  kLoLExpRequirements,
1181  kLoLMonsterModifiers1,
1182  kLoLMonsterModifiers2,
1183  kLoLMonsterModifiers3,
1184  kLoLMonsterModifiers4,
1185  kLoLMonsterShiftOffsets,
1186  kLoLMonsterDirFlags,
1187  kLoLMonsterScaleY,
1188  kLoLMonsterScaleX,
1189  kLoLMonsterScaleWH,
1190  kLoLFlyingObjectShp,
1191  kLoLInventoryDesc,
1192 
1193  kLoLLevelShpList,
1194  kLoLLevelDatList,
1195  kLoLCompassDefs,
1196  kLoLItemPrices,
1197  kLoLStashSetup,
1198 
1199  kLoLDscWalls,
1200  kLoLDscOvlMap,
1201  kLoLDscScaleWidthData,
1202  kLoLDscScaleHeightData,
1203  kLoLBaseDscY,
1204 
1205  kLoLDscDoorScale,
1206  kLoLDscDoor4,
1207  kLoLDscDoorX,
1208  kLoLDscDoorY,
1209  kLoLDscOvlIndex,
1210 
1211  kLoLScrollXTop,
1212  kLoLScrollYTop,
1213  kLoLScrollXBottom,
1214  kLoLScrollYBottom,
1215 
1216  kLoLButtonDefs,
1217  kLoLButtonList1,
1218  kLoLButtonList2,
1219  kLoLButtonList3,
1220  kLoLButtonList4,
1221  kLoLButtonList5,
1222  kLoLButtonList6,
1223  kLoLButtonList7,
1224  kLoLButtonList8,
1225 
1226  kLoLLegendData,
1227  kLoLMapCursorOvl,
1228  kLoLMapStringId,
1229 
1230  kLoLSpellbookAnim,
1231  kLoLSpellbookCoords,
1232  kLoLHealShapeFrames,
1233  kLoLLightningDefs,
1234  kLoLFireballCoords,
1235 
1236  kLoLCredits,
1237 
1238  kLoLHistory,
1239 #endif // ENABLE_EOB || ENABLE_LOL
1240 
1241  kMaxResIDs
1242 };
1243 
1244 struct Shape;
1245 struct Room;
1246 struct AmigaSfxTable;
1247 struct HoFSeqData;
1248 struct HoFSeqItemAnimData;
1249 
1251 public:
1252  static const Common::String staticDataFilename() { return "KYRA.DAT"; }
1253 
1254  StaticResource(KyraEngine_v1 *vm) : _vm(vm), _resList(), _fileLoader(0), _dataTable() {}
1255  ~StaticResource() { deinit(); }
1256 
1257  bool loadStaticResourceFile();
1258 
1259  bool init();
1260  void deinit();
1261 
1262  const char *const *loadStrings(int id, int &strings);
1263  const uint8 *loadRawData(int id, int &size);
1264  const Shape *loadShapeTable(int id, int &entries);
1265  const AmigaSfxTable *loadAmigaSfxTable(int id, int &entries);
1266  const Room *loadRoomTable(int id, int &entries);
1267  const HoFSeqData *loadHoFSequenceData(int id, int &entries);
1268  const HoFSeqItemAnimData *loadHoFSeqItemAnimData(int id, int &entries);
1269  const ItemAnimDefinition *loadItemAnimDefinition(int id, int &entries);
1270  const uint16 *loadRawDataBe16(int id, int &entries);
1271 #if defined(ENABLE_EOB) || defined(ENABLE_LOL)
1272  const uint32 *loadRawDataBe32(int id, int &entries);
1273 #endif // (ENABLE_EOB || ENABLE_LOL)
1274 #ifdef ENABLE_LOL
1275  const LoLCharacter *loadCharData(int id, int &entries);
1276  const SpellProperty *loadSpellData(int id, int &entries);
1277  const CompassDef *loadCompassData(int id, int &entries);
1278  const FlyingObjectShape *loadFlyingObjectData(int id, int &entries);
1279  const LoLButtonDef *loadButtonDefs(int id, int &entries);
1280 #endif // ENABLE_LOL
1281 #ifdef ENABLE_EOB
1282  const DarkMoonAnimCommand *loadEoB2SeqData(int id, int &entries);
1283  const DarkMoonShapeDef *loadEoB2ShapeData(int id, int &entries);
1284  const EoBCharacter *loadEoBNpcData(int id, int &entries);
1285 #endif // ENABLE_EOB
1286 
1287  // This sets up the internal resource mapping for the selected language. It should
1288  // usually called with id '-1' so as to map all resources for the game, because the
1289  // mapping is necessary to load a resource. Calling this will automatically unload
1290  // the resource (all of them for id '-1').
1291  bool setLanguage(Common::Language lang, int id = -1);
1292  // use '-1' to prefetch/unload all ids
1293  // prefetchId retruns false if only on of the resources
1294  // can't be loaded and it breaks then the first res
1295  // can't be loaded
1296  bool prefetchId(int id);
1297  void unloadId(int id);
1298 private:
1300 
1301  KyraEngine_v1 *_vm;
1302 
1303  struct FileType;
1304 
1305  bool checkResList(int id, int &type, const void *&ptr, int &size);
1306  const FileType *getFiletype(int type);
1307  const void *getData(int id, int requesttype, int &size);
1308 
1309  bool loadDummy(Common::SeekableReadStream &stream, void *&ptr, int &size);
1310  bool loadStringTable(Common::SeekableReadStream &stream, void *&ptr, int &size);
1311  bool loadRawData(Common::SeekableReadStream &stream, void *&ptr, int &size);
1312  bool loadShapeTable(Common::SeekableReadStream &stream, void *&ptr, int &size);
1313  bool loadAmigaSfxTable(Common::SeekableReadStream &stream, void *&ptr, int &size);
1314  bool loadRoomTable(Common::SeekableReadStream &stream, void *&ptr, int &size);
1315  bool loadHoFSequenceData(Common::SeekableReadStream &stream, void *&ptr, int &size);
1316  bool loadHoFSeqItemAnimData(Common::SeekableReadStream &stream, void *&ptr, int &size);
1317  bool loadItemAnimDefinition(Common::SeekableReadStream &stream, void *&ptr, int &size);
1318  bool loadRawDataBe16(Common::SeekableReadStream &stream, void *&ptr, int &size);
1319 #if defined(ENABLE_EOB) || defined(ENABLE_LOL)
1320  bool loadRawDataBe32(Common::SeekableReadStream &stream, void *&ptr, int &size);
1321 #endif // (ENABLE_LOL || ENABLE_EOB)
1322 #ifdef ENABLE_LOL
1323  bool loadCharData(Common::SeekableReadStream &stream, void *&ptr, int &size);
1324  bool loadSpellData(Common::SeekableReadStream &stream, void *&ptr, int &size);
1325  bool loadCompassData(Common::SeekableReadStream &stream, void *&ptr, int &size);
1326  bool loadFlyingObjectData(Common::SeekableReadStream &stream, void *&ptr, int &size);
1327  bool loadButtonDefs(Common::SeekableReadStream &stream, void *&ptr, int &size);
1328 #endif // ENABLE_LOL
1329 #ifdef ENABLE_EOB
1330  bool loadEoB2SeqData(Common::SeekableReadStream &stream, void *&ptr, int &size);
1331  bool loadEoB2ShapeData(Common::SeekableReadStream &stream, void *&ptr, int &size);
1332  bool loadEoBNpcData(Common::SeekableReadStream &stream, void *&ptr, int &size);
1333 #endif // ENABLE_EOB
1334 
1335  void freeDummy(void *&ptr, int &size);
1336  void freeRawData(void *&ptr, int &size);
1337  void freeStringTable(void *&ptr, int &size);
1338  void freeShapeTable(void *&ptr, int &size);
1339  void freeAmigaSfxTable(void *&ptr, int &size);
1340  void freeRoomTable(void *&ptr, int &size);
1341  void freeHoFSequenceData(void *&ptr, int &size);
1342  void freeHoFSeqItemAnimData(void *&ptr, int &size);
1343  void freeItemAnimDefinition(void *&ptr, int &size);
1344  void freeRawDataBe16(void *&ptr, int &size);
1345 #if defined(ENABLE_EOB) || defined(ENABLE_LOL)
1346  void freeRawDataBe32(void *&ptr, int &size);
1347 #endif // (ENABLE_EOB || ENABLE_LOL)
1348 #ifdef ENABLE_LOL
1349  void freeCharData(void *&ptr, int &size);
1350  void freeSpellData(void *&ptr, int &size);
1351  void freeCompassData(void *&ptr, int &size);
1352  void freeFlyingObjectData(void *&ptr, int &size);
1353  void freeButtonDefs(void *&ptr, int &size);
1354 #endif // ENABLE_LOL
1355 #ifdef ENABLE_EOB
1356  void freeEoB2SeqData(void *&ptr, int &size);
1357  void freeEoB2ShapeData(void *&ptr, int &size);
1358  void freeEoBNpcData(void *&ptr, int &size);
1359 #endif // ENABLE_EOB
1360 
1361  enum ResTypes {
1362  kStringList = 0,
1363  kRawData = 1,
1364  kRoomList = 2,
1365  kShapeList = 3,
1366  kAmigaSfxTable = 4,
1367 
1368  k2SeqData = 5,
1369  k2SeqItemAnimData = 6,
1370  k2ItemAnimDefinition = 7,
1371 
1372  kLoLCharData = 8,
1373  kLoLSpellData = 9,
1374  kLoLCompassData = 10,
1375  kLoLFlightShpData = 11,
1376  kLoLButtonData = 12,
1377  kRawDataBe16 = 13,
1378  kRawDataBe32 = 14,
1379 
1380  kEoB2SequenceData = 15,
1381  kEoB2ShapeData = 16,
1382  kEoBNpcData = 17
1383  };
1384 
1385  struct FileType {
1386  int type;
1387  typedef bool (StaticResource::*LoadFunc)(Common::SeekableReadStream &stream, void *&ptr, int &size);
1388  typedef void (StaticResource::*FreeFunc)(void *&ptr, int &size);
1389 
1390  LoadFunc load;
1391  FreeFunc free;
1392  };
1393 
1394  struct ResData {
1395  int id;
1396  int type;
1397  int size;
1398  void *data;
1399  };
1400 
1401  Common::List<ResData> _resList;
1402 
1403  const FileType *_fileLoader;
1404 
1405  struct DataDescriptor {
1406  DataDescriptor() : filename(0), type(0) {}
1407  DataDescriptor(uint32 f, uint8 t) : filename(f), type(t) {}
1408 
1409  uint32 filename;
1410  uint8 type;
1411  };
1413  DataMap _dataTable;
1414 };
1415 
1416 } // End of namespace Kyra
1417 
1418 #endif
Definition: resource.h:1250
Definition: str.h:59
Definition: resource.h:48
Definition: list.h:44
Definition: kyra_v1.h:126
Definition: kyra_lok.h:56
Definition: path.h:52
Definition: kyra_lok.h:50
Definition: stream.h:745
Definition: archive.h:141
Definition: sequences_hof.h:58
Definition: archive.h:312
String toString(char separator='/') const
Definition: detection.h:27
Definition: stream.h:944
Definition: sequences_hof.h:65
Definition: sound_intern.h:315
Definition: kyra_v2.h:40
Language
Definition: language.h:45