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_LOW_DATA 0x0000ffff
36#define OP_DATA_SIGN 0x8000
37#define OP_DATA_VALUE 0x7fff
40#define FMT_LOCAL_SRC 1
41#define FMT_GLOBAL_SRC 2
47#define REG_SET_IDX 0x0fff
48#define REG_SET_IDX_REG 0x8000
49#define LOCAL_FMT 0x7000
50#define LOCAL_FMT_PARENT 0x0000
51#define LOCAL_FMT_REG 0x1000
52#define LOCAL_FMT_DATA 0x2000
65 Anim8 *myAnim8 =
nullptr;
69 Anim8 *backLayerAnim8;
70 Anim8 *frontLayerAnim8;
71 Anim8 *firstAnim8ToCrunch;
72 Anim8 *lastAnim8ToCrunch;
77 bool _cruncherInitialized =
false;
78 EOSreq *_EOSreqList =
nullptr;
79 int32 _memtypeEOS = -1;
82 uint32 *_stackBase =
nullptr;
83 uint32 *_stackTop =
nullptr;
84 uint32 *_stackLimit =
nullptr;
85 Anim8 *_crunchNext =
nullptr;
88 int16 *_myDepthTable =
nullptr;
97 bool _keepProcessing =
false, _terminated =
false, _mapTheCel =
false;
98 bool _bailOut =
false;
99 int32 _compareCCR = 0;
101 int32 _pcOffsetOld = 0;
104int32 *ws_GetDataFormats();
105bool ws_InitCruncher();
106void ws_KillCruncher();
108Anim8 *ws_AddAnim8ToCruncher(
machine *m, int32 sequHash);
120bool ws_PauseAnim8(
Anim8 *myAnim8);
121bool ws_ResumeAnim8(
Anim8 *myAnim8);
133void ws_CrunchAnim8s(int16 *depth_table);
134void ws_CrunchEOSreqs();
135bool ws_OnEndSeqRequest(
Anim8 *myAnim8, int32 pcOffset, int32 pcCount);
136void ws_CancelOnEndSeq(
Anim8 *myAnim8);
Definition: database.h:28
int32 ws_PreProcessPcode(uint32 **PC, Anim8 *myAnim8)
void ws_RemoveAnim8FromCruncher(Anim8 *myAnim8)
bool ws_ChangeAnim8Program(machine *m, int32 newSequHash)
intptr frac16
Definition: m4_types.h:45
Definition: ws_machine.h:118
Definition: ws_cruncher.h:62
Definition: ws_cruncher.h:75
Definition: ws_cruncher.h:68
Definition: ws_machine.h:156