23 #ifndef M4_WSCRIPT_WS_CRUNCHER_H 24 #define M4_WSCRIPT_WS_CRUNCHER_H 26 #include "m4/m4_types.h" 27 #include "m4/wscript/ws_machine.h" 31 #define OP_INSTR 0xfe000000 32 #define OP_FORMAT1 0x01c00000 33 #define OP_FORMAT2 0x00380000 34 #define OP_FORMAT3 0x00070000 35 #define OP_HIGH_DATA 0xffff0000 36 #define OP_LOW_DATA 0x0000ffff 37 #define OP_DATA_SIGN 0x8000 38 #define OP_DATA_VALUE 0x7fff 41 #define FMT_LOCAL_SRC 1 42 #define FMT_GLOBAL_SRC 2 48 #define REG_SET_IDX 0x0fff 49 #define REG_SET_IDX_REG 0x8000 50 #define LOCAL_FMT 0x7000 51 #define LOCAL_FMT_PARENT 0x0000 52 #define LOCAL_FMT_REG 0x1000 53 #define LOCAL_FMT_DATA 0x2000 66 Anim8 *myAnim8 =
nullptr;
70 Anim8 *backLayerAnim8;
71 Anim8 *frontLayerAnim8;
72 Anim8 *firstAnim8ToCrunch;
73 Anim8 *lastAnim8ToCrunch;
78 bool _cruncherInitialized =
false;
79 EOSreq *_EOSreqList =
nullptr;
80 int32 _memtypeEOS = -1;
83 uint32 *_stackBase =
nullptr;
84 uint32 *_stackTop =
nullptr;
85 uint32 *_stackLimit =
nullptr;
86 Anim8 *_crunchNext =
nullptr;
89 int16 *_myDepthTable =
nullptr;
98 bool _keepProcessing =
false, _terminated =
false, _mapTheCel =
false;
99 bool _bailOut =
false;
100 int32 _compareCCR = 0;
102 int32 _pcOffsetOld = 0;
105 int32 *ws_GetDataFormats();
106 bool ws_InitCruncher();
107 void ws_KillCruncher();
109 Anim8 *ws_AddAnim8ToCruncher(
machine *m, int32 sequHash);
121 bool ws_PauseAnim8(
Anim8 *myAnim8);
122 bool ws_ResumeAnim8(
Anim8 *myAnim8);
134 void ws_CrunchAnim8s(int16 *depth_table);
135 void ws_CrunchEOSreqs();
136 bool ws_OnEndSeqRequest(
Anim8 *myAnim8, int32 pcOffset, int32 pcCount);
137 void ws_CancelOnEndSeq(
Anim8 *myAnim8);
Definition: ws_machine.h:153
Definition: ws_cruncher.h:69
int32 ws_PreProcessPcode(uint32 **PC, Anim8 *myAnim8)
Definition: ws_machine.h:115
intptr frac16
Definition: m4_types.h:46
Definition: database.h:28
void ws_RemoveAnim8FromCruncher(Anim8 *myAnim8)
Definition: ws_cruncher.h:63
Definition: ws_cruncher.h:76
bool ws_ChangeAnim8Program(machine *m, int32 newSequHash)