22 #ifndef CHEWY_DETAIL_H 23 #define CHEWY_DETAIL_H 25 #include "common/path.h" 26 #include "common/scummsys.h" 27 #include "common/stream.h" 28 #include "chewy/ngstypes.h" 33 #define RESTORE_ROOM 1 36 #define MAX_AUTO_MOV 20 48 static constexpr
int SIZE() {
49 return 4 * 1 + 14 + 1 + 1;
60 static constexpr
int SIZE() {
66 #define MAX_M_ITEMS 50 69 byte *_image =
nullptr;
79 int16 sound_index[MAX_SOUNDS];
80 int16 sound_start[MAX_SOUNDS];
81 int16 channel[MAX_SOUNDS];
82 int16 volume[MAX_SOUNDS];
83 int16 repeats[MAX_SOUNDS];
84 int16 stereo[MAX_SOUNDS];
87 static constexpr
int SIZE() {
88 return 7 * 2 * MAX_SOUNDS;
112 static constexpr
int SIZE() {
113 return 2 + 2 + 1 + 1 + 2 * 8 + 1 + 1 +
114 SoundDefBlk::SIZE() + 2 + 2;
127 static constexpr
int SIZE() {
128 return 2 + 2 + 2 + 2 + 1 + 1;
133 int16 _staticDetailNr = 0;
134 int16 _aniDetailNr = 0;
138 int16 mvect[MAX_M_ITEMS * 4] = { 0 };
139 int16 mtxt[MAX_M_ITEMS] = { 0 };
142 int16 detailSfxIndex[MAXDETAILS * MAX_SOUNDS] = { 0 };
145 static constexpr
int SIZE() {
147 (AniDetailInfo::SIZE() * MAXDETAILS) +
148 (StaticDetailInfo::SIZE() * MAXDETAILS) +
149 (2 * MAX_M_ITEMS * 4) +
152 (RoomAutoMov::SIZE() * MAX_AUTO_MOV) +
153 (2 * MAXDETAILS * MAX_SOUNDS) +
154 (4 * MAXDETAILS * MAX_SOUNDS);
170 void load_rdi(
const char *fname, int16 room_nr);
172 void load_rdi_taf(
const char *fname, int16 load_flag);
174 void setStaticPos(int16 detNr, int16 x, int16 y,
bool hideFl,
bool correctionFlag);
175 void setDetailPos(int16 detNr, int16 x, int16 y);
176 void hideStaticSpr(int16 detNr);
177 void showStaticSpr(int16 detNr);
180 void getAniValues(int16 aniNr, int16 *start, int16 *end);
186 void set_static_ani(int16 ani_nr, int16 static_nr);
188 void del_static_ani(int16 ani_nr);
189 void startDetail(int16 nr, int16 rep, int16 reverse);
190 void stopDetail(int16 nr);
191 void playSound(int16 nr, int16 slot);
192 void stopSound(int16 slot);
193 void plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end,
194 int16 zoomx, int16 zoomy);
195 void plot_static_details(int16 scrx, int16 scry, int16 start, int16 end);
196 int16 maus_vector(int16 x, int16 y);
197 int16 get_ani_status(int16 det_nr);
199 SprInfo plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr,
200 int16 spr_nr, int16 mode);
202 void set_global_delay(int16 delay);
204 TafInfo *init_taf_tbl(
const char *fname);
208 void del_taf_tbl(int16 start, int16 nr,
TafInfo *Tt);
210 void load_taf_seq(int16 sprNr, int16 sprCount,
TafInfo *Tt);
211 void load_taf_tbl(
TafInfo *fti);
215 void calc_zoom_kor(int16 *kx, int16 *ky, int16 xzoom,
218 int16 mouse_on_detail(int16 mouse_x, int16 mouse_y,
219 int16 scrx, int16 scry);
221 void set_taf_ani_mem(byte *load_area);
224 void load_taf_ani_sprite(int16 nr);
230 int16 _globalDelay = 0;
231 bool _aniFreezeflag =
false;
232 bool _fullTaf =
false;
234 byte *_tafLoadBuffer =
nullptr;
235 int16 _directTafAni = 0;
Definition: ngstypes.h:29