22 #ifndef TWINE_RESOURCES_RESOURCES_H 23 #define TWINE_RESOURCES_RESOURCES_H 25 #include "common/hashmap.h" 26 #include "common/scummsys.h" 27 #include "twine/parser/anim3ds.h" 28 #include "twine/parser/body.h" 29 #include "twine/parser/holomap.h" 30 #include "twine/parser/sprite.h" 31 #include "twine/parser/text.h" 32 #include "twine/resources/hqr.h" 33 #include "twine/scene/gamestate.h" 34 #include "twine/scene/scene.h" 39 #define RESSHQR_MAINPAL 0 40 #define RESSHQR_LBAFONT 1 41 #define RESSHQR_BLANK 2 42 #define RESSHQR_SPRITEBOXDATA 3 43 #define RESSHQR_SPRITESHADOW 4 44 #define RESSHQR_HOLOPAL 5 // lba1 45 #define RESSHQR_HOLOSURFACE 6 // lba1 46 #define RESSHQR_HOLOIMG 7 // lba1 47 #define RESSHQR_HOLOARROWINFO 8 // lba1 48 #define RESSHQR_HOLOTWINMDL 9 // lba1 49 #define RESSHQR_HOLOARROWMDL 10 // lba1 50 #define RESSHQR_HOLOTWINARROWMDL 11 // lba1 52 #define RESSHQR_BLACKPAL 9 // lba2 53 #define RESSHQR_ECLAIRPAL 10 // lba2 54 #define RESSHQR_ARROWBIN 12 // lba2 55 #define SAMPLE_RAIN 13 57 #define RESSHQR_GAMEOVERMDL 21 59 #define RESSHQR_ALARMREDPAL 22 60 #define RESSHQR_FLAINFO 23 61 #define RESSHQR_DARKPAL 24 63 #define RESSHQR_HOLOPOINTMDL 29 64 #define RESSHQR_HOLOPOINTANIM 30 66 #define RESSHQR_PLASMAEFFECT 51 68 #define FLA_DRAGON3 "dragon3" 69 #define FLA_INTROD "introd" 70 #define FLA_THEEND "the_end" 71 #define FLA_BATEAU "bateau" 73 #define ACF_INTRO "INTRO" 75 #define FILE3DHQR_HERONORMAL 0 76 #define FILE3DHQR_HEROATHLETIC 1 77 #define FILE3DHQR_HEROAGGRESSIVE 2 78 #define FILE3DHQR_HERODISCRETE 3 79 #define FILE3DHQR_HEROPROTOPACK 4 82 #define SPRITEHQR_KASHES 3 83 #define SPRITEHQR_LIFEPOINTS 4 84 #define SPRITEHQR_MAGICPOINTS 5 85 #define SPRITEHQR_KEY 6 86 #define SPRITEHQR_CLOVERLEAF 7 87 #define SPRITEHQR_CLOVERLEAFBOX 41 89 #define SPRITEHQR_MAGICBALL_YELLOW 1 90 #define SPRITEHQR_MAGICBALL_FIRE 13 91 #define SPRITEHQR_MAGICBALL_GREEN 42 92 #define SPRITEHQR_MAGICBALL_RED 43 93 #define SPRITEHQR_MAGICBALL_YELLOW_TRANS 44 94 #define SPRITEHQR_EXPLOSION_FIRST_FRAME 97 // 7 frames 95 #define SPRITEHQR_FENCE_1 18 96 #define SPRITEHQR_FENCE_2 19 97 #define SPRITEHQR_FENCE_3 22 98 #define SPRITEHQR_FENCE_4 23 99 #define SPRITEHQR_FENCE_METAL 35 100 #define SPRITEHQR_FENCE_METAL_2 54 101 #define SPRITEHQR_FENCE_METAL_3 83 102 #define SPRITEHQR_MUSHROOM 92 103 #define SPRITEHQR_DOOR_WODDEN_1 31 104 #define SPRITEHQR_DOOR_WODDEN_2 32 105 #define SPRITEHQR_DOOR_PRISON_WODDEN 37 106 #define SPRITEHQR_DOOR_PADLOCK 58 107 #define SPRITEHQR_DOOR_BRICKED_UP 76 108 #define SPRITEHQR_DOOR_1 104 109 #define SPRITEHQR_DOOR_2 107 110 #define SPRITEHQR_DOOR_3 24 111 #define SPRITEHQR_DOOR_4 11 112 #define SPRITEHQR_DOOR_5 12 113 #define SPRITEHQR_DOOR_PRISON_GRID 15 114 #define SPRITEHQR_DOOR_PRISON_HARMED 16 115 #define SPRITEHQR_DOOR_PRISON_WITH_F_LETTER 17 116 #define SPRITEHQR_MAGICBALL_GREEN_TRANS 109 117 #define SPRITEHQR_MAGICBALL_RED_TRANS 110 119 #define SPRITEHQR_DIAG_BUBBLE_RIGHT 90 120 #define SPRITEHQR_DIAG_BUBBLE_LEFT 91 123 #define NUM_ANIMS 2083 // 600 for lba1 126 #define NUM_SAMPLES 895 // 243 for lba1 134 void preloadInventoryItems();
138 void preloadSprites();
141 void preloadAnimations();
142 void preloadAnim3DS();
143 void preloadSamples();
144 void loadMovieInfo();
181 uint8 *_fontPtr =
nullptr;
182 uint8 *_sjisFontPtr =
nullptr;
195 const Trajectory *giveTrajPtr(
int index)
const;
197 return _trajectories;
199 void loadEntityData(
EntityData &entityData, int32 &index);
201 const TextEntry *getText(TextBankId textBankId, TextId index)
const;
204 int findSmkMovieIndex(
const char *name)
const;
207 static constexpr
const char *HQR_RESS_FILE =
"ress.hqr";
209 static constexpr
const char *HQR_TEXT_FILE =
"text.hqr";
211 static constexpr
const char *HQR_SAMPLES_FILE =
"samples.hqr";
219 static constexpr
const char *HQR_LBA_BLL_FILE =
"lba_bll.hqr";
228 static constexpr
const char *HQR_SCENE_FILE =
"scene.hqr";
230 static constexpr
const char *HQR_SCREEN_FILE =
"screen.hqr";
232 static constexpr
const char *HQR_SPRITES_FILE =
"sprites.hqr";
239 static constexpr
const char *HQR_BODY_FILE =
"body.hqr";
241 static constexpr
const char *HQR_ANIM_FILE =
"anim.hqr";
242 static constexpr
const char *HQR_ANIM3DS_FILE =
"anim3ds.hqr";
244 static constexpr
const char *HQR_INVOBJ_FILE =
"invobj.hqr";
246 static constexpr
const char *HQR_HOLOMAP_FILE =
"holomap.hqr";
252 static constexpr
const char *HQR_FLASAMP_FILE =
"flasamp.hqr";
253 static constexpr
const char *HQR_MIDI_MI_DOS_FILE =
"midi_mi.hqr";
254 static constexpr
const char *HQR_MIDI_MI_WIN_FILE =
"midi_mi_win.hqr";
256 static constexpr
const char *HQR_VIDEO_FILE =
"video.hqr";
259 if (_engine->isLBA1()) {
260 return TwineImage(Resources::HQR_RESS_FILE, 27, 28);
262 return TwineImage(Resources::HQR_SCREEN_FILE, 0, 1);
266 if (_engine->isLBA1()) {
267 return TwineImage(Resources::HQR_RESS_FILE, 49, 50);
269 return TwineImage(Resources::HQR_SCREEN_FILE, 60, 61);
273 if (_engine->isLBA1()) {
274 return TwineImage(Resources::HQR_RESS_FILE, 52, 53);
276 return TwineImage(Resources::HQR_SCREEN_FILE, 74, 75);
280 assert(_engine->isLBA2());
281 return TwineImage(Resources::HQR_SCREEN_FILE, 72, 73);
285 assert(_engine->isLBA2());
286 return TwineImage(Resources::HQR_SCREEN_FILE, 76, 77);
290 assert(_engine->isLBA1());
291 return TwineImage(Resources::HQR_RESS_FILE, 12, 13);
295 if (_engine->isLBA1()) {
296 return TwineImage(Resources::HQR_RESS_FILE, 14, -1);
298 return TwineImage(Resources::HQR_SCREEN_FILE, 4, 5);
static constexpr const char * HQR_FLAGIF_FILE
Floppy version of the game uses gifs for replacing the videos.
Definition: resources.h:251
static constexpr const char * HQR_FILE3D_FILE
Definition: resources.h:237
BodyData _inventoryTable[NUM_INVENTORY_ITEMS]
Definition: resources.h:164
static constexpr const char * HQR_LBA_BRK_FILE
Definition: resources.h:226
uint8 * _spriteTable[NUM_SPRITES]
Definition: resources.h:167
uint32 _spriteSizeTable[NUM_SPRITES]
Definition: resources.h:169
int32 _fontBufSize
Definition: resources.h:180
uint8 * _samplesTable[895]
Definition: resources.h:175
Associate 3d models from body hqr with animations from anim.hqr for the game characters.
Definition: entity.h:83
Definition: achievements_tables.h:27
Definition: resources.h:130
const Common::Array< int32 > & getMovieInfo(const Common::String &name) const
static constexpr const char * HQR_LBA_GRI_FILE
Definition: resources.h:217
uint32 _samplesSizeTable[895]
Definition: resources.h:177