22 #ifndef CHAMBER_SCRIPT_H 23 #define CHAMBER_SCRIPT_H 25 #include "chamber/common.h" 26 #include "chamber/room.h" 34 kScrPool3_CurrentItem,
39 kScrPool8_CurrentPers,
59 volatile byte timer_ticks;
91 byte check_used_commands;
101 byte skulls_submitted;
106 byte aspirant_pers_ofs;
109 byte extreme_violence;
117 byte dirty_rect_kind;
121 byte skull_trader_status;
137 byte need_draw_spots;
169 uint16 zone_obj_cmds[15 * 5];
170 uint16 next_aspirant_cmd;
177 uint16 next_protozorqs_cmd;
181 extern void *script_vars[kScrPools_MAX];
186 #define ITEMFLG_DONTWANT 1 187 #define ITEMFLG_04 0x04 188 #define ITEMFLG_08 0x08 190 #define ITEMFLG_TRADER 0x10 192 #define ITEMFLG_ASPIR 0x20 194 #define ITEMFLG_ROOM 0x40 196 #define ITEMFLG_OWNED 0x80 199 #include "common/pack-start.h" 207 #include "common/pack-end.h" 209 #define MAX_INV_ITEMS 63 210 extern item_t inventory_items[MAX_INV_ITEMS];
213 extern pers_t pers_list[PERS_MAX];
215 extern byte *script_stack[5 * 2];
216 extern byte **script_stack_ptr;
220 #define SPECIAL_COMMANDS_MAX 20 221 extern uint16 menu_commands_12[SPECIAL_COMMANDS_MAX];
222 extern uint16 menu_commands_22[SPECIAL_COMMANDS_MAX];
223 extern uint16 menu_commands_24[SPECIAL_COMMANDS_MAX];
224 extern uint16 menu_commands_23[SPECIAL_COMMANDS_MAX];
226 extern uint16 fight_pers_ofs;
228 extern byte wait_delta;
230 extern byte rand_seed;
232 uint16 getRandW(
void);
234 extern uint16 the_command;
236 byte *getScriptSubroutine(uint16 index);
238 uint16 runCommand(
void);
239 uint16 runCommandKeepSp(
void);
241 uint16 Swap16(uint16 x);