25 #include "common/str.h" 26 #include "common/str-array.h" 27 #include "chewy/resource.h" 28 #include "chewy/text.h" 32 #define ATDS_VOC_OFFSET 20 34 #define AAD_MAX_PERSON 10 36 #define AAD_STR_START 0 40 #define DIALOG_CLOSEUP_DATA 2 // ADS_DATA 41 #define INV_USE_DATA 4 42 #define INV_ATS_DATA 6 48 #define MAX_STR_SPLIT 10 50 #define SPLIT_CENTER 1 53 #define ATDS_END_LINE 0 54 #define ATDS_END_BLOCK 0x0b 55 #define ATDS_END_ENTRY 0x0c 56 #define ATDS_END_TEXT 0x0d 58 #define BLOCKENDE 0x0f 60 #define MAX_ATS_ROOM 100 62 #define ATS_ACTIVE_BIT 1 63 #define ATS_COUNT_BIT 2 64 #define ATS_RESET_BIT 4 65 #define ATS_ACTION_BIT 8 67 #define MAX_ATS_STATUS 3 69 #define TXT_MARK_NAME 0 70 #define TXT_MARK_LOOK 1 71 #define TXT_MARK_USE 2 72 #define TXT_MARK_WALK 3 73 #define TXT_MARK_TALK 4 75 #define CONTROL_BYTE 0xff 77 #define DIALOG_CLOSEUP_MAX 6 78 #define DIALOG_CLOSEUP_STACK_SIZE 50 80 #define ADS_EXIT_BIT 1 81 #define ADS_SHOW_BIT 2 82 #define ADS_RESTART_BIT 4 92 bool _eventsEnabled =
false;
95 void (*aad_str)(int16 diaNr, int16 strNr, int16 personNr, int16 mode) =
nullptr;
103 #define IUID_PLAYER 5 104 #define INV_USE_DEF 16 111 AadInfo() : _x(0), _y(0), _color(0) {}
113 static constexpr
int SIZE() {
return 6; }
118 void load(
const void *data,
size_t count);
133 bool load(
const void *src);
134 static constexpr
int SIZE() {
return 8; }
172 static constexpr
int SIZE() {
return 8; }
214 void set_delay(int16 *delay, int16 silent);
215 void set_split_win(int16 nr, int16 x, int16 y);
218 void str_null2leer(
char *strStart,
char *strEnd);
219 void load_atds(int16 chunkNr, int16 mode);
221 void set_handle(int16 mode, int16 chunkStart, int16 chunkNr);
222 bool start_ats(int16 txtNr, int16 txtMode, int16 color, int16 mode, int16 *vocNr);
224 bool atsShown() {
return _atsv.shown; }
225 void print_ats(int16 x, int16 y, int16 scrX, int16 scrY);
226 int16 getControlBit(int16 txtNr, int16 bitIdx);
227 void setControlBit(int16 txtNr, int16 bitIdx);
228 void delControlBit(int16 txtNr, int16 bitIdx);
229 void set_ats_str(int16 txtNr, int16 txtMode, int16 strNr, int16 mode);
230 void set_all_ats_str(int16 txtNr, int16 strNr, int16 mode);
231 int16 start_aad(int16 diaNr,
bool continueWhenSpeechEnds =
false);
233 void print_aad(int16 scrX, int16 scrY);
234 int16 aadGetStatus();
235 void set_string_end_func(
void (*strFunc)(int16 diaNr, int16 strNr, int16 personNr, int16 mode));
236 void aad_search_dia(int16 diaNr,
char **ptr);
237 int16 aadGetTxtLen(
char *str);
239 bool startDialogCloseup(int16 diaNr);
240 void stopDialogCloseup();
241 char **dialogCloseupItemPtr(uint16 dialogNum, int16 blockNr, int16 *retNr);
244 int16 getDialogCloseupStatus();
245 void hideDialogCloseupItem(int16 diaNr, int16 blockNr, int16 itemNr);
246 void showDialogCloseupItem(int16 diaNr, int16 blockNr, int16 itemNr);
247 int16 getDialogCloseupBlock(uint16 dialogNum);
248 void dialogCloseupSearchBlock(int16 blockNr,
char **ptr);
249 void dialogCloseupSearchItem(int16 itemNr,
char **blkAdr);
250 int16 startAutoDialogCloseup(
char *itemAdr);
252 int16 calc_inv_no_use(int16 curInv, int16 testNr);
253 int8 getStereoPos(int16 x);
254 void enableEvents(
bool nr) {
255 _atdsv._eventsEnabled = nr;
260 uint32 getAtdsStreamSize()
const;
262 Common::StringArray getTextArray(uint dialogNum, uint entryNum,
int type,
int subEntry = -1);
263 Common::String getTextEntry(uint dialogNum, uint entryNum,
int type,
int subEntry = -1);
264 int16 getLastSpeechId();
268 int16 get_delay(int16 txt_len);
269 void initItemUseWith();
271 char *_atdsMem[MAX_HANDLE] = {
nullptr };
272 int16 _atdsPoolOff[MAX_HANDLE] = { 0 };
277 char *_ePtr[DIALOG_CLOSEUP_MAX] = {
nullptr };
278 int16 _eNr[DIALOG_CLOSEUP_MAX] = { 0 };
280 uint8 _dialogCloseupStack[DIALOG_CLOSEUP_STACK_SIZE] = { 0 };
281 int16 _dialogCloseupStackPtr;
282 bool _continueWhenSpeechEnds =
false;
297 char *_splitPtr[MAX_STR_SPLIT] = {
nullptr };
298 int16 _splitX[MAX_STR_SPLIT] = { 0 };
300 int16 _mousePush = 0;
301 int _printDelayCount1 = 0;
Definition: resource.h:204