typedef struct xEnvAsset;
typedef struct xEntShadow;
typedef struct xBase;
typedef struct xVec2;
typedef struct RwObjectHasFrame;
typedef struct RpSector;
typedef struct RwTexCoords;
typedef struct RxPipelineNode;
typedef enum en_SM_WAVE_STAT;
typedef struct zNPCSpawner;
typedef struct zNPCCommon;
typedef struct xEnt;
typedef struct xAnimState;
typedef struct RxPipeline;
typedef struct xLightKitLight;
typedef struct xModelBucket;
typedef struct SMDepot;
typedef struct xPsyche;
typedef struct xQCData;
typedef struct RpMeshHeader;
typedef struct anim_coll_data;
typedef struct xFactoryInst;
typedef struct xModelInstance;
typedef struct xBBox;
typedef struct RwResEntry;
typedef struct xUpdateCullEnt;
typedef struct NPCConfig;
typedef struct rxHeapFreeBlock;
typedef struct xVec3;
typedef struct RwRaster;
typedef struct xEntDrive;
typedef struct xEntNPCAsset;
typedef struct RpWorldSector;
typedef struct RxPipelineNodeTopSortData;
typedef struct RwV2d;
typedef struct RpMorphTarget;
typedef enum _tagRumbleType;
typedef struct xGoal;
typedef struct xEntMechData;
typedef enum _zPlayerType;
typedef struct RxNodeDefinition;
typedef struct zMovePoint;
typedef struct xEntMotionSplineData;
typedef struct SMNPCStatus;
typedef struct RpLight;
typedef struct SMSPStatus;
typedef struct rxHeapSuperBlockDescriptor;
typedef struct zFragLightningAsset;
typedef struct xLightKit;
typedef struct iEnv;
typedef struct RxPipelineCluster;
typedef struct xCollis;
typedef struct analog_data;
typedef struct xAnimTransitionList;
typedef struct _tagEmitVolume;
typedef struct xParEmitter;
typedef struct RpWorld;
typedef struct RxPipelineNodeParam;
typedef struct zFragGroup;
typedef struct xAnimTable;
typedef struct xUpdateCullGroup;
typedef struct _zPortal;
typedef struct RxHeap;
typedef struct RwBBox;
typedef struct RwRGBA;
typedef struct zFragInfo;
typedef struct zFrag;
typedef struct xListItem_0;
typedef struct xParEmitterAsset;
typedef struct xAnimTransition;
typedef struct xSpline3;
typedef struct xQuat;
typedef struct xPortalAsset;
typedef struct xParGroup;
typedef struct xGridBound;
typedef struct RwV3d;
typedef struct xEntMotionMPData;
typedef enum en_SM_NPC_STATUS;
typedef struct NPCSndTrax;
typedef struct rxHeapBlockHeader;
typedef struct zCheckPoint;
typedef struct xEntERData;
typedef struct zPlayerGlobals;
typedef struct xParEmitterPropsAsset;
typedef struct xJSPHeader;
typedef struct zLightning;
typedef struct xGroup;
typedef enum en_trantype;
typedef struct RxPipelineRequiresCluster;
typedef struct RwMatrixTag;
typedef struct xMat4x3;
typedef struct RwFrame;
typedef struct RwLLLink;
typedef struct zPlayerCarryInfo;
typedef struct _tagEmitOffsetPoint;
typedef struct zFragParticle;
typedef struct xAnimMultiFileEntry;
typedef struct xQCControl;
typedef struct xAnimActiveEffect;
typedef struct zPlayerSettings;
typedef struct zFragSoundAsset;
typedef struct zEnt;
typedef struct zFragParticleAsset;
typedef struct xMovePoint;
typedef struct xEntCollis;
typedef struct _class_0;
typedef struct xSurface;
typedef struct RpAtomic;
typedef struct xAnimFile;
typedef struct tri_data_0;
typedef struct xCoef;
typedef struct xUpdateCullMgr;
typedef enum en_pendtype;
typedef struct xVec4;
typedef struct xAnimSingle;
typedef struct xMovePointAsset;
typedef struct _class_1;
typedef struct RpVertexNormal;
typedef struct RwSurfaceProperties;
typedef struct xEntMotionMechData;
typedef struct tri_data_1;
typedef struct xLinkAsset;
typedef struct rxReq;
typedef struct xListItem_1;
typedef struct xEntPenData;
typedef struct zShrapnelAsset;
typedef struct xCamera;
typedef struct xScene;
typedef enum RxClusterValidityReq;
typedef enum en_LASSO_STATUS;
typedef struct xModelAssetParam;
typedef struct xPEVCyl;
typedef struct zFragProjectile;
typedef struct RpInterpolator;
typedef struct xAnimMultiFileBase;
typedef struct RwCamera;
typedef struct zFragProjectileAsset;
typedef struct xAnimEffect;
typedef struct zNPCLassoInfo;
typedef struct _tagxRumble;
typedef struct xCoef3;
typedef struct xParInterp;
typedef struct xParSys;
typedef struct _tagxPad;
typedef struct zFragShockwaveAsset;
typedef struct xCurveAsset;
typedef struct xEntOrbitData;
typedef struct zJumpParam;
typedef enum RxNodeDefEditable;
typedef struct _tagLightningLine;
typedef struct xClumpCollBSPTree;
typedef enum RxClusterValid;
typedef struct RyzMemData;
typedef enum zFragLocType;
typedef struct RpPolygon;
typedef struct xRot;
typedef struct zEntHangable;
typedef struct zPlatFMRunTime;
typedef struct xAnimPlay;
typedef struct _class_2;
typedef struct RpMaterialList;
typedef enum en_SM_NOTICES;
typedef struct xFFX;
typedef struct xClumpCollBSPVertInfo;
typedef struct NPCSndQueue;
typedef struct xEntMotion;
typedef struct xClumpCollBSPBranchNode;
typedef struct xPlatformAsset;
typedef struct xPEEntBone;
typedef struct xBound;
typedef struct iFogParams;
typedef struct xPSYNote;
typedef struct xAnimMultiFile;
typedef enum rxEmbeddedPacketState;
typedef struct zCutsceneMgr;
typedef struct xSphere;
typedef struct RpMaterial;
typedef struct xEntMotionAsset;
typedef struct xClumpCollBSPTriangle;
typedef struct xEntAsset;
typedef struct xModelPool;
typedef struct xEntBoulder;
typedef enum _tagPadState;
typedef enum RwCameraProjection;
typedef enum RxClusterForcePresent;
typedef struct zScene;
typedef struct xCylinder;
typedef struct zAssetPickupTable;
typedef struct xGlobals;
typedef struct _tagLightningRot;
typedef struct RpClump;
typedef enum PSY_BRAIN_STATUS;
typedef struct zNPCSettings;
typedef struct RpGeometry;
typedef struct xBox;
typedef enum en_GOALSTATE;
typedef struct RxClusterDefinition;
typedef struct xEntSplineData;
typedef enum en_NPC_SOUND;
typedef struct xNPCBasic;
typedef struct zParEmitter;
typedef struct xPECircle;
typedef struct zFragLightning;
typedef struct xEntMotionPenData;
typedef struct RwSphere;
typedef struct zFragBone;
typedef struct xEntFrame;
typedef struct _class_3;
typedef struct _tagPadAnalog;
typedef struct _class_4;
typedef struct RwTexDictionary;
typedef struct RxOutputSpec;
typedef struct zFragAsset;
typedef struct zPlatform;
typedef struct xEntMPData;
typedef struct _tagLightningZeus;
typedef struct xMat3x3;
typedef struct xEnv;
typedef struct xMemPool;
typedef struct RxClusterRef;
typedef struct xGroupAsset;
typedef struct _tagiPad;
typedef struct xShadowSimplePoly;
typedef struct _tagEmitSphere;
typedef struct RwObject;
typedef struct zFragLocInfo;
typedef struct zLasso;
typedef struct RxIoSpec;
typedef struct RpTriangle;
typedef struct xEntMotionERData;
typedef struct xJSPNodeInfo;
typedef struct zFragSound;
typedef struct RwTexture;
typedef struct RxNodeMethods;
typedef struct xBaseAsset;
typedef struct RwFrustumPlane;
typedef enum en_npcbtyp;
typedef struct _tagEmitRect;
typedef struct xShadowSimpleCache;
typedef struct zGlobals;
typedef struct RwPlane;
typedef struct zFragLocation;
typedef struct xDynAsset;
typedef struct RxCluster;
typedef struct xParEmitterCustomSettings;
typedef struct zGlobalSettings;
typedef struct xModelTag;
typedef enum en_SM_WAVE_MODE;
typedef struct zFragShockwave;
typedef struct RxPacket;
typedef struct zPlayerLassoInfo;
typedef struct st_XORDEREDARRAY;
typedef struct xEntMotionOrbitData;
typedef enum RwFogType;
typedef enum RpWorldRenderOrder;
typedef struct zLedgeGrabParams;
typedef struct xPEEntBound;
typedef struct _zEnv;
typedef struct iColor_tag;
typedef enum zFragType;
typedef struct xParabola;
typedef struct RwRGBAReal;
typedef struct _tagEmitLine;
typedef enum en_dupowavmod;
typedef struct RwLinkList;
typedef enum _zPlayerWallJumpState;

typedef uint32(*type_0)(void*, void*);
typedef RwCamera*(*type_1)(RwCamera*);
typedef void(*type_3)(xAnimPlay*, xAnimState*);
typedef int32(*type_5)(RxPipelineNode*);
typedef RwCamera*(*type_7)(RwCamera*);
typedef void(*type_9)(xAnimState*, xAnimSingle*, void*);
typedef RwObjectHasFrame*(*type_11)(RwObjectHasFrame*);
typedef void(*type_12)(RxPipelineNode*);
typedef void(*type_13)(xAnimPlay*, xQuat*, xVec3*, int32);
typedef void(*type_15)(xEnt*, xVec3*);
typedef RpWorldSector*(*type_18)(RpWorldSector*);
typedef int32(*type_20)(RxPipelineNode*, RxPipeline*);
typedef void(*type_23)(xEnt*, xScene*, float32, xEntCollis*);
typedef uint32(*type_26)(xEnt*, xEnt*, xScene*, float32, xCollis*);
typedef int32(*type_27)(xGoal*, void*, float32, void*);
typedef uint32(*type_31)(RxPipelineNode*, uint32, uint32, void*);
typedef xBase*(*type_33)(uint32);
typedef int32(*type_35)(RxPipelineNode*, RxPipelineNodeParam*);
typedef void(*type_37)(xEnt*, xVec3*, xMat4x3*);
typedef int32(*type_38)(RxNodeDefinition*);
typedef int32(*type_40)(xGoal*, void*, en_trantype*, float32, void*);
typedef int8*(*type_42)(xBase*);
typedef void(*type_43)(RxNodeDefinition*);
typedef int8*(*type_44)(uint32);
typedef int32(*type_47)(xGoal*, void*, en_trantype*, float32, void*);
typedef void(*type_51)(zFrag*, float32);
typedef uint32(*type_52)(uint32, xAnimActiveEffect*, xAnimSingle*, void*);
typedef uint32(*type_66)(xAnimTransition*, xAnimSingle*, void*);
typedef void(*type_69)(void*);
typedef void(*type_77)(xEnt*);
typedef void(*type_84)(xEnt*);
typedef RpClump*(*type_93)(RpClump*, void*);
typedef void(*type_100)(int32*, en_trantype*);
typedef int32(*type_102)(xBase*, xBase*, uint32, float32*, xBase*);
typedef void(*type_107)(zFrag*, zFragAsset*);
typedef void(*type_116)(zShrapnelAsset*, xModelInstance*, xVec3*, void(*)(zFrag*, zFragAsset*));
typedef void(*type_119)(xEnt*, xScene*, float32);
typedef RpAtomic*(*type_121)(RpAtomic*);
typedef void(*type_122)(xEnt*, xScene*, float32, xEntFrame*);
typedef void(*type_123)(xEnt*);
typedef void(*type_125)(xMemPool*, void*);
typedef void(*type_133)(RwResEntry*);

typedef RwTexCoords* type_2[8];
typedef xVec3 type_4[60];
typedef xVec3 type_6[4];
typedef float32 type_8[4];
typedef float32 type_10[4];
typedef float32 type_14[4];
typedef float32 type_16[22];
typedef float32 type_17[22];
typedef SMSPStatus* type_19[16];
typedef xCollis type_21[18];
typedef uint32 type_22[15];
typedef uint32 type_24[15];
typedef zFrag* type_25[21];
typedef RwFrustumPlane type_28[6];
typedef uint32 type_29[2];
typedef uint32 type_30[15];
typedef uint8 type_32[3];
typedef RpLight* type_34[2];
typedef RwV3d type_36[8];
typedef analog_data type_39[2];
typedef RwFrame* type_41[2];
typedef uint8 type_45[3];
typedef xVec3 type_46[16];
typedef uint8 type_48[3];
typedef float32 type_49[4];
typedef xVec3 type_50[16];
typedef float32 type_53[2];
typedef float32 type_54[16];
typedef uint8 type_55[2];
typedef uint8 type_56[2];
typedef uint32 type_57[2];
typedef uint8 type_58[2];
typedef float32 type_59[6];
typedef NPCSndQueue type_60[4];
typedef float32 type_61[2];
typedef uint8 type_62[3];
typedef float32 type_63[2];
typedef xModelInstance* type_64[2];
typedef float32 type_65[3];
typedef float32 type_67[3];
typedef xModelTag type_68[2];
typedef xVec4 type_70[12];
typedef float32 type_71[4];
typedef float32 type_72[3];
typedef uint16 type_73[3];
typedef float32 type_74[12];
typedef uint8 type_75[2];
typedef float32 type_76[12];
typedef xAnimMultiFileEntry type_78[1];
typedef float32 type_79[12];
typedef xGoal* type_80[5];
typedef xEnt* type_81[111];
typedef float32 type_82[12];
typedef float32 type_83[4];
typedef float32 type_85[1];
typedef float32 type_86[16];
typedef float32 type_87[12];
typedef float32 type_88[1][5];
typedef float32 type_89[4];
typedef xModelTag type_90[20];
typedef float32 type_91[12];
typedef xVec3 type_92[9];
typedef uint32 type_94[4];
typedef int32 type_95[5];
typedef int8 type_96[128];
typedef int8 type_97[128][6];
typedef xVec3 type_98[5];
typedef uint8 type_99[2];
typedef xVec3 type_101[2];
typedef RwTexCoords* type_103[8];
typedef uint8 type_104[14];
typedef uint8 type_105[5];
typedef xModelTag type_106[4];
typedef int8 type_108[32];
typedef xModelInstance* type_109[14];
typedef uint8 type_110[4];
typedef int8 type_111[3];
typedef xParInterp type_112[1];
typedef float32 type_113[2];
typedef xVec3 type_114[3];
typedef float32 type_115[2];
typedef uint8 type_117[4];
typedef float32 type_118[2];
typedef uint16 type_120[3];
typedef uint8 type_124[22];
typedef int8 type_126[16];
typedef float32 type_127[16];
typedef xParInterp type_128[4];
typedef int8 type_129[32];
typedef uint8 type_130[22];
typedef int8 type_131[32];
typedef xParInterp type_132[4];
typedef SMSPStatus type_134[16];
typedef int8 type_135[16];
typedef uint32 type_136[72];
typedef int8 type_137[4];
typedef SMNPCStatus type_138[16];
typedef xBase* type_139[72];
typedef uint8 type_140[3];
typedef RxCluster type_141[1];

struct xEnvAsset : xBaseAsset
{
	uint32 bspAssetID;
	uint32 startCameraAssetID;
	uint32 climateFlags;
	float32 climateStrengthMin;
	float32 climateStrengthMax;
	uint32 bspLightKit;
	uint32 objectLightKit;
	float32 padF1;
	uint32 bspCollisionAssetID;
	uint32 bspFXAssetID;
	uint32 bspCameraAssetID;
	uint32 bspMapperID;
	uint32 bspMapperCollisionID;
	uint32 bspMapperFXID;
	float32 loldHeight;
};

struct xEntShadow
{
	xVec3 pos;
	xVec3 vec;
	RpAtomic* shadowModel;
	float32 dst_cast;
	float32 radius[2];
};

struct xBase
{
	uint32 id;
	uint8 baseType;
	uint8 linkCount;
	uint16 baseFlags;
	xLinkAsset* link;
	int32(*eventFunc)(xBase*, xBase*, uint32, float32*, xBase*);
};

struct xVec2
{
	float32 x;
	float32 y;
};

struct RwObjectHasFrame
{
	RwObject object;
	RwLLLink lFrame;
	RwObjectHasFrame*(*sync)(RwObjectHasFrame*);
};

struct RpSector
{
	int32 type;
};

struct RwTexCoords
{
	float32 u;
	float32 v;
};

struct RxPipelineNode
{
	RxNodeDefinition* nodeDef;
	uint32 numOutputs;
	uint32* outputs;
	RxPipelineCluster** slotClusterRefs;
	uint32* slotsContinue;
	void* privateData;
	uint32* inputToClusterSlot;
	RxPipelineNodeTopSortData* topSortData;
	void* initializationData;
	uint32 initializationDataSize;
};

enum en_SM_WAVE_STAT
{
	SM_STAT_BEGIN,
	SM_STAT_INPROG,
	SM_STAT_ABORT,
	SM_STAT_MARKTIME,
	SM_STAT_DONE,
	SM_STAT_NOMORE,
	SM_STAT_FORCE = 0x7fffffff
};

struct zNPCSpawner : RyzMemData
{
	int32 flg_spawner;
	zNPCCommon* npc_owner;
	float32 tym_delay;
	int32 max_spawn;
	en_SM_WAVE_MODE wavemode;
	en_SM_WAVE_STAT wavestat;
	float32 tmr_wave;
	int32 cnt_spawn;
	SMSPStatus sppool[16];
	SMNPCStatus npcpool[16];
	st_XORDEREDARRAY pendlist;
	st_XORDEREDARRAY actvlist;
	int32 cnt_cleanup;

	void ChildCleanup();
	int32 SpawnBeastie(SMNPCStatus* npcstat, SMSPStatus* spstat);
	SMNPCStatus* StatForNPC(zNPCCommon* npc);
	int32 IsSPLZClear(zMovePoint* sp);
	SMSPStatus* SelectSP(SMNPCStatus* npcstat);
	uint8 Receivable(en_SM_NOTICES note, void* data);
	void Notify(en_SM_NOTICES note, void* data);
	void UpdateContinuous();
	void UpdateDiscreet();
	void Timestep(float32 dt);
	void MapPreferred();
	void Reset();
	int32 AddSpawnNPC(zNPCCommon* npc);
	int32 AddSpawnPoint(zMovePoint* sp);
	void SetWaveMode(en_SM_WAVE_MODE mode, float32 delay, int32 lifemax);
	void Subscribe(zNPCCommon* owner);
};

struct zNPCCommon : xNPCBasic
{
	xEntAsset* entass;
	xEntNPCAsset* npcass;
	zNPCSettings* npcsetass;
	int32 flg_vuln;
	int32 flg_move;
	int32 flg_misc;
	int32 flg_able;
	NPCConfig* cfg_npc;
	zNPCSettings npcset;
	zMovePoint* nav_past;
	zMovePoint* nav_curr;
	zMovePoint* nav_dest;
	zMovePoint* nav_lead;
	xSpline3* spl_mvptspline;
	float32 len_mvptspline;
	float32 dst_curspline;
	xEntDrive* drv_data;
	xPsyche* psy_instinct;
	zNPCCommon* npc_duplodude;
	float32 spd_throttle;
	int32 flg_xtrarend;
	float32 tmr_fidget;
	float32 tmr_invuln;
	zShrapnelAsset* explosion;
	xModelAssetParam* parmdata;
	uint32 pdatsize;
	zNPCLassoInfo* lassdata;
	NPCSndQueue snd_queue[4];
};

struct xEnt : xBase
{
	xEntAsset* asset;
	uint16 idx;
	uint16 num_updates;
	uint8 flags;
	uint8 miscflags;
	uint8 subType;
	uint8 pflags;
	uint8 moreFlags;
	uint8 isCulled;
	uint8 driving_count;
	uint8 num_ffx;
	uint8 collType;
	uint8 collLev;
	uint8 chkby;
	uint8 penby;
	xModelInstance* model;
	xModelInstance* collModel;
	xModelInstance* camcollModel;
	xLightKit* lightKit;
	void(*update)(xEnt*, xScene*, float32);
	void(*endUpdate)(xEnt*, xScene*, float32);
	void(*bupdate)(xEnt*, xVec3*);
	void(*move)(xEnt*, xScene*, float32, xEntFrame*);
	void(*render)(xEnt*);
	xEntFrame* frame;
	xEntCollis* collis;
	xGridBound gridb;
	xBound bound;
	void(*transl)(xEnt*, xVec3*, xMat4x3*);
	xFFX* ffx;
	xEnt* driver;
	int32 driveMode;
	xShadowSimpleCache* simpShadow;
	xEntShadow* entShadow;
	anim_coll_data* anim_coll;
	void* user_data;
};

struct xAnimState
{
	xAnimState* Next;
	int8* Name;
	uint32 ID;
	uint32 Flags;
	uint32 UserFlags;
	float32 Speed;
	xAnimFile* Data;
	xAnimEffect* Effects;
	xAnimTransitionList* Default;
	xAnimTransitionList* List;
	float32* BoneBlend;
	float32* TimeSnap;
	float32 FadeRecip;
	uint16* FadeOffset;
	void* CallbackData;
	xAnimMultiFile* MultiFile;
	void(*BeforeEnter)(xAnimPlay*, xAnimState*);
	void(*StateCallback)(xAnimState*, xAnimSingle*, void*);
	void(*BeforeAnimMatrices)(xAnimPlay*, xQuat*, xVec3*, int32);
};

struct RxPipeline
{
	int32 locked;
	uint32 numNodes;
	RxPipelineNode* nodes;
	uint32 packetNumClusterSlots;
	rxEmbeddedPacketState embeddedPacketState;
	RxPacket* embeddedPacket;
	uint32 numInputRequirements;
	RxPipelineRequiresCluster* inputRequirements;
	void* superBlock;
	uint32 superBlockSize;
	uint32 entryPoint;
	uint32 pluginId;
	uint32 pluginData;
};

struct xLightKitLight
{
	uint32 type;
	RwRGBAReal color;
	float32 matrix[16];
	float32 radius;
	float32 angle;
	RpLight* platLight;
};

struct xModelBucket
{
	RpAtomic* Data;
	RpAtomic* OriginalData;
	xModelInstance* List;
	int32 ClipFlags;
	uint32 PipeFlags;
};

struct SMDepot
{
	st_XORDEREDARRAY spawners;
};

struct xPsyche : RyzMemData
{
	xBase* clt_owner;
	xPSYNote* cb_notice;
	int32 flg_psyche;
	xGoal* goallist;
	xGoal* goalstak[5];
	float32 tmr_stack[1][5];
	int32 staktop;
	xGoal* pendgoal;
	en_pendtype pendtype;
	int32 gid_safegoal;
	void(*fun_remap)(int32*, en_trantype*);
	void* userContext;
	int32 cnt_transLastTimestep;
	PSY_BRAIN_STATUS psystat;
	xBase fakebase;
};

struct xQCData
{
	int8 xmin;
	int8 ymin;
	int8 zmin;
	int8 zmin_dup;
	int8 xmax;
	int8 ymax;
	int8 zmax;
	int8 zmax_dup;
	xVec3 min;
	xVec3 max;
};

struct RpMeshHeader
{
	uint32 flags;
	uint16 numMeshes;
	uint16 serialNum;
	uint32 totalIndicesInMesh;
	uint32 firstMeshOffset;
};

struct anim_coll_data
{
};

struct xFactoryInst : RyzMemData
{
	int32 itemType;
	xFactoryInst* nextprod;
	xFactoryInst* prevprod;
};

struct xModelInstance
{
	xModelInstance* Next;
	xModelInstance* Parent;
	xModelPool* Pool;
	xAnimPlay* Anim;
	RpAtomic* Data;
	uint32 PipeFlags;
	float32 RedMultiplier;
	float32 GreenMultiplier;
	float32 BlueMultiplier;
	float32 Alpha;
	float32 FadeStart;
	float32 FadeEnd;
	xSurface* Surf;
	xModelBucket** Bucket;
	xModelInstance* BucketNext;
	xLightKit* LightKit;
	void* Object;
	uint16 Flags;
	uint8 BoneCount;
	uint8 BoneIndex;
	uint8* BoneRemap;
	RwMatrixTag* Mat;
	xVec3 Scale;
	uint32 modelID;
	uint32 shadowID;
	RpAtomic* shadowmapAtomic;
	_class_1 anim_coll;
};

struct xBBox
{
	xVec3 center;
	xBox box;
};

struct RwResEntry
{
	RwLLLink link;
	int32 size;
	void* owner;
	RwResEntry** ownerRef;
	void(*destroyNotify)(RwResEntry*);
};

struct xUpdateCullEnt
{
	uint16 index;
	int16 groupIndex;
	uint32(*cb)(void*, void*);
	void* cbdata;
	xUpdateCullEnt* nextInGroup;
};

struct NPCConfig : xListItem_0
{
	uint32 modelID;
	int32 flg_config;
	float32 spd_turnMax;
	float32 spd_moveMax;
	float32 fac_accelMax;
	float32 fac_driftMax;
	float32 fac_gravKnock;
	float32 fac_elastic;
	int32 pts_damage;
	int32 useBoxBound;
	xVec3 off_bound;
	xVec3 dim_bound;
	float32 npcMass;
	float32 npcMassInv;
	float32 rad_detect;
	float32 hyt_detect;
	float32 off_detect;
	float32 rad_attack;
	float32 fov_attack;
	xVec3 scl_model;
	float32 tym_attack;
	float32 tym_fidget;
	float32 tym_stun;
	float32 tym_alert;
	float32 dst_castShadow;
	float32 rad_shadowCache;
	float32 rad_shadowRaster;
	float32 rad_dmgSize;
	int32 flg_vert;
	xModelTag tag_vert[20];
	xVec3 animFrameRange[9];
	int32 cnt_esteem[5];
	float32 rad_sound;
	NPCSndTrax* snd_trax;
	NPCSndTrax* snd_traxShare;
	int32 test_count;
	uint8 talk_filter[4];
	uint8 talk_filter_size;
};

struct rxHeapFreeBlock
{
	uint32 size;
	rxHeapBlockHeader* ptr;
};

struct xVec3
{
	float32 x;
	float32 y;
	float32 z;
};

struct RwRaster
{
	RwRaster* parent;
	uint8* cpPixels;
	uint8* palette;
	int32 width;
	int32 height;
	int32 depth;
	int32 stride;
	int16 nOffsetX;
	int16 nOffsetY;
	uint8 cType;
	uint8 cFlags;
	uint8 privateFlags;
	uint8 cFormat;
	uint8* originalPixels;
	int32 originalWidth;
	int32 originalHeight;
	int32 originalStride;
};

struct xEntDrive
{
	uint32 flags;
	float32 otm;
	float32 otmr;
	float32 os;
	float32 tm;
	float32 tmr;
	float32 s;
	xEnt* odriver;
	xEnt* driver;
	xEnt* driven;
	xVec3 op;
	xVec3 p;
	xVec3 q;
	float32 yaw;
	xVec3 dloc;
	tri_data_0 tri;
};

struct xEntNPCAsset
{
	int32 npcFlags;
	int32 npcModel;
	int32 npcProps;
	uint32 movepoint;
	uint32 taskWidgetPrime;
	uint32 taskWidgetSecond;
};

struct RpWorldSector
{
	int32 type;
	RpPolygon* polygons;
	RwV3d* vertices;
	RpVertexNormal* normals;
	RwTexCoords* texCoords[8];
	RwRGBA* preLitLum;
	RwResEntry* repEntry;
	RwLinkList collAtomicsInWorldSector;
	RwLinkList noCollAtomicsInWorldSector;
	RwLinkList lightsInWorldSector;
	RwBBox boundingBox;
	RwBBox tightBoundingBox;
	RpMeshHeader* mesh;
	RxPipeline* pipeline;
	uint16 matListWindowBase;
	uint16 numVertices;
	uint16 numPolygons;
	uint16 pad;
};

struct RxPipelineNodeTopSortData
{
	uint32 numIns;
	uint32 numInsVisited;
	rxReq* req;
};

struct RwV2d
{
	float32 x;
	float32 y;
};

struct RpMorphTarget
{
	RpGeometry* parentGeom;
	RwSphere boundingSphere;
	RwV3d* verts;
	RwV3d* normals;
};

enum _tagRumbleType
{
	eRumble_Off,
	eRumble_Hi,
	eRumble_VeryLightHi,
	eRumble_VeryLight,
	eRumble_LightHi,
	eRumble_Light,
	eRumble_MediumHi,
	eRumble_Medium,
	eRumble_HeavyHi,
	eRumble_Heavy,
	eRumble_VeryHeavyHi,
	eRumble_VeryHeavy,
	eRumble_Total,
	eRumbleForceU32 = 0x7fffffff
};

struct xGoal : xListItem_1, xFactoryInst
{
	xPsyche* psyche;
	int32 goalID;
	en_GOALSTATE stat;
	int32 flg_able;
	int32(*fun_process)(xGoal*, void*, en_trantype*, float32, void*);
	int32(*fun_precalc)(xGoal*, void*, float32, void*);
	int32(*fun_chkRule)(xGoal*, void*, en_trantype*, float32, void*);
	void* cbdata;
};

struct xEntMechData
{
	xVec3 apos;
	xVec3 bpos;
	xVec3 dir;
	float32 arot;
	float32 brot;
	float32 ss;
	float32 sr;
	int32 state;
	float32 tsfd;
	float32 trfd;
	float32 tsbd;
	float32 trbd;
	float32* rotptr;
};

enum _zPlayerType
{
	ePlayer_SB,
	ePlayer_Patrick,
	ePlayer_Sandy,
	ePlayer_MAXTYPES
};

struct RxNodeDefinition
{
	int8* name;
	RxNodeMethods nodeMethods;
	RxIoSpec io;
	uint32 pipelineNodePrivateDataSize;
	RxNodeDefEditable editable;
	int32 InputPipesCnt;
};

struct zMovePoint : xMovePoint
{
};

struct xEntMotionSplineData
{
	int32 unknown;
};

struct SMNPCStatus
{
	zNPCCommon* npc;
	en_SM_NPC_STATUS status;
	zMovePoint* sp_prefer;
};

struct RpLight
{
	RwObjectHasFrame object;
	float32 radius;
	RwRGBAReal color;
	float32 minusCosAngle;
	RwLinkList WorldSectorsInLight;
	RwLLLink inWorld;
	uint16 lightFrame;
	uint16 pad;
};

struct SMSPStatus
{
	zMovePoint* sp;
	int32 flg_stat;
	zNPCCommon* npc_prefer;
};

struct rxHeapSuperBlockDescriptor
{
	void* start;
	uint32 size;
	rxHeapSuperBlockDescriptor* next;
};

struct zFragLightningAsset : zFragAsset
{
	zFragLocation start;
	zFragLocation end;
	uint32 startParentID;
	uint32 endParentID;
};

struct xLightKit
{
	uint32 tagID;
	uint32 groupID;
	uint32 lightCount;
	xLightKitLight* lightList;
};

struct iEnv
{
	RpWorld* world;
	RpWorld* collision;
	RpWorld* fx;
	RpWorld* camera;
	xJSPHeader* jsp;
	RpLight* light[2];
	RwFrame* light_frame[2];
	int32 memlvl;
};

struct RxPipelineCluster
{
	RxClusterDefinition* clusterRef;
	uint32 creationAttributes;
};

struct xCollis
{
	uint32 flags;
	uint32 oid;
	void* optr;
	xModelInstance* mptr;
	float32 dist;
	xVec3 norm;
	xVec3 tohit;
	xVec3 depen;
	xVec3 hdng;
	union
	{
		_class_2 tuv;
		tri_data_1 tri;
	};
};

struct analog_data
{
	xVec2 offset;
	xVec2 dir;
	float32 mag;
	float32 ang;
};

struct xAnimTransitionList
{
	xAnimTransitionList* Next;
	xAnimTransition* T;
};

struct _tagEmitVolume
{
	uint32 emit_volumeID;
};

struct xParEmitter : xBase
{
	xParEmitterAsset* tasset;
	xParGroup* group;
	xParEmitterPropsAsset* prop;
	uint8 rate_mode;
	float32 rate;
	float32 rate_time;
	float32 rate_fraction;
	float32 rate_fraction_cull;
	uint8 emit_flags;
	uint8 emit_pad[3];
	uint8 rot[3];
	xModelTag tag;
	float32 oocull_distance_sqr;
	float32 distance_to_cull_sqr;
	void* attachTo;
	xParSys* parSys;
	void* emit_volume;
	xVec3 last_attach_loc;
};

struct RpWorld
{
	RwObject object;
	uint32 flags;
	RpWorldRenderOrder renderOrder;
	RpMaterialList matList;
	RpSector* rootSector;
	int32 numTexCoordSets;
	int32 numClumpsInWorld;
	RwLLLink* currentClumpLink;
	RwLinkList clumpList;
	RwLinkList lightList;
	RwLinkList directionalLightList;
	RwV3d worldOrigin;
	RwBBox boundingBox;
	RpWorldSector*(*renderCallBack)(RpWorldSector*);
	RxPipeline* pipeline;
};

struct RxPipelineNodeParam
{
	void* dataParam;
	RxHeap* heap;
};

struct zFragGroup
{
	zFrag* list[21];
};

struct xAnimTable
{
	xAnimTable* Next;
	int8* Name;
	xAnimTransition* TransitionList;
	xAnimState* StateList;
	uint32 AnimIndex;
	uint32 MorphIndex;
	uint32 UserFlags;
};

struct xUpdateCullGroup
{
	uint32 active;
	uint16 startIndex;
	uint16 endIndex;
	xGroup* groupObject;
};

struct _zPortal : xBase
{
	xPortalAsset* passet;
};

struct RxHeap
{
	uint32 superBlockSize;
	rxHeapSuperBlockDescriptor* head;
	rxHeapBlockHeader* headBlock;
	rxHeapFreeBlock* freeBlocks;
	uint32 entriesAlloced;
	uint32 entriesUsed;
	int32 dirty;
};

struct RwBBox
{
	RwV3d sup;
	RwV3d inf;
};

struct RwRGBA
{
	uint8 red;
	uint8 green;
	uint8 blue;
	uint8 alpha;
};

struct zFragInfo
{
	union
	{
		zFragGroup group;
		zFragParticle particle;
		zFragProjectile projectile;
		zFragLightning lightning;
		zFragSound sound;
		zFragShockwave shockwave;
	};
};

struct zFrag
{
	zFragType type;
	zFragInfo info;
	float32 delay;
	float32 alivetime;
	float32 lifetime;
	void(*update)(zFrag*, float32);
	xModelInstance* parent[2];
	zFrag* prev;
	zFrag* next;
};

struct xListItem_0
{
	int32 flg_travFilter;
	NPCConfig* next;
	NPCConfig* prev;
};

struct xParEmitterAsset : xBaseAsset
{
	uint8 emit_flags;
	uint8 emit_type;
	uint16 pad;
	uint32 propID;
	union
	{
		xPECircle e_circle;
		_tagEmitSphere e_sphere;
		_tagEmitRect e_rect;
		_tagEmitLine e_line;
		_tagEmitVolume e_volume;
		_tagEmitOffsetPoint e_offsetp;
		xPEVCyl e_vcyl;
		xPEEntBone e_entbone;
		xPEEntBound e_entbound;
	};
	uint32 attachToID;
	xVec3 pos;
	xVec3 vel;
	float32 vel_angle_variation;
	uint32 cull_mode;
	float32 cull_dist_sqr;
};

struct xAnimTransition
{
	xAnimTransition* Next;
	xAnimState* Dest;
	uint32(*Conditional)(xAnimTransition*, xAnimSingle*, void*);
	uint32(*Callback)(xAnimTransition*, xAnimSingle*, void*);
	uint32 Flags;
	uint32 UserFlags;
	float32 SrcTime;
	float32 DestTime;
	uint16 Priority;
	uint16 QueuePriority;
	float32 BlendRecip;
	uint16* BlendOffset;
};

struct xSpline3
{
	uint16 type;
	uint16 flags;
	uint32 N;
	uint32 allocN;
	xVec3* points;
	float32* time;
	xVec3* p12;
	xVec3* bctrl;
	float32* knot;
	xCoef3* coef;
	uint32 arcSample;
	float32* arcLength;
};

struct xQuat
{
	xVec3 v;
	float32 s;
};

struct xPortalAsset : xBaseAsset
{
	uint32 assetCameraID;
	uint32 assetMarkerID;
	float32 ang;
	uint32 sceneID;
};

struct xParGroup
{
};

struct xGridBound
{
	void* data;
	uint16 gx;
	uint16 gz;
	uint8 ingrid;
	uint8 oversize;
	uint8 deleted;
	uint8 gpad;
	xGridBound** head;
	xGridBound* next;
};

struct RwV3d
{
	float32 x;
	float32 y;
	float32 z;
};

struct xEntMotionMPData
{
	uint32 flags;
	uint32 mp_id;
	float32 speed;
};

enum en_SM_NPC_STATUS
{
	SM_NPC_DEAD,
	SM_NPC_READY,
	SM_NPC_PENDING,
	SM_NPC_SPAWNED,
	SM_NPC_ACTIVE,
	SM_NPC_NOMORE,
	SM_NPC_FORCE = 0x7fffffff
};

struct NPCSndTrax
{
	en_NPC_SOUND typ_sound;
	int8* nam_sound;
	uint32 aid_sound;
};

struct rxHeapBlockHeader
{
	rxHeapBlockHeader* prev;
	rxHeapBlockHeader* next;
	uint32 size;
	rxHeapFreeBlock* freeEntry;
	uint32 pad[4];
};

struct zCheckPoint
{
	xVec3 pos;
	float32 rot;
	uint32 initCamID;
};

struct xEntERData
{
	xVec3 a;
	xVec3 b;
	xVec3 dir;
	float32 et;
	float32 wet;
	float32 rt;
	float32 wrt;
	float32 p;
	float32 brt;
	float32 ert;
	int32 state;
};

struct zPlayerGlobals
{
	zEnt ent;
	xEntShadow entShadow_embedded;
	xShadowSimpleCache simpShadow_embedded;
	zGlobalSettings g;
	zPlayerSettings* s;
	zPlayerSettings sb;
	zPlayerSettings patrick;
	zPlayerSettings sandy;
	xModelInstance* model_spongebob;
	xModelInstance* model_patrick;
	xModelInstance* model_sandy;
	uint32 Visible;
	uint32 Health;
	int32 Speed;
	float32 SpeedMult;
	int32 Sneak;
	int32 Teeter;
	float32 SlipFadeTimer;
	int32 Slide;
	float32 SlideTimer;
	int32 Stepping;
	int32 JumpState;
	int32 LastJumpState;
	float32 JumpTimer;
	float32 LookAroundTimer;
	uint32 LookAroundRand;
	uint32 LastProjectile;
	float32 DecelRun;
	float32 DecelRunSpeed;
	float32 HotsauceTimer;
	float32 LeanLerp;
	float32 ScareTimer;
	xBase* ScareSource;
	float32 CowerTimer;
	float32 DamageTimer;
	float32 SundaeTimer;
	float32 ControlOffTimer;
	float32 HelmetTimer;
	uint32 WorldDisguise;
	uint32 Bounced;
	float32 FallDeathTimer;
	float32 HeadbuttVel;
	float32 HeadbuttTimer;
	uint32 SpecialReceived;
	xEnt* MountChimney;
	float32 MountChimOldY;
	uint32 MaxHealth;
	uint32 DoMeleeCheck;
	float32 VictoryTimer;
	float32 BadGuyNearTimer;
	float32 ForceSlipperyTimer;
	float32 ForceSlipperyFriction;
	float32 ShockRadius;
	float32 ShockRadiusOld;
	float32 Face_ScareTimer;
	uint32 Face_ScareRandom;
	uint32 Face_Event;
	float32 Face_EventTimer;
	float32 Face_PantTimer;
	uint32 Face_AnimSpecific;
	uint32 IdleRand;
	float32 IdleMinorTimer;
	float32 IdleMajorTimer;
	float32 IdleSitTimer;
	int32 Transparent;
	zEnt* FireTarget;
	uint32 ControlOff;
	uint32 ControlOnEvent;
	uint32 AutoMoveSpeed;
	float32 AutoMoveDist;
	xVec3 AutoMoveTarget;
	xBase* AutoMoveObject;
	zEnt* Diggable;
	float32 DigTimer;
	zPlayerCarryInfo carry;
	zPlayerLassoInfo lassoInfo;
	xModelTag BubbleWandTag[2];
	xModelInstance* model_wand;
	xEntBoulder* bubblebowl;
	float32 bbowlInitVel;
	zEntHangable* HangFound;
	zEntHangable* HangEnt;
	zEntHangable* HangEntLast;
	xVec3 HangPivot;
	xVec3 HangVel;
	float32 HangLength;
	xVec3 HangStartPos;
	float32 HangStartLerp;
	xModelTag HangPawTag[4];
	float32 HangPawOffset;
	float32 HangElapsed;
	float32 Jump_CurrGravity;
	float32 Jump_HoldTimer;
	float32 Jump_ChangeTimer;
	int32 Jump_CanDouble;
	int32 Jump_CanFloat;
	int32 Jump_SpringboardStart;
	zPlatform* Jump_Springboard;
	int32 CanJump;
	int32 CanBubbleSpin;
	int32 CanBubbleBounce;
	int32 CanBubbleBash;
	int32 IsJumping;
	int32 IsDJumping;
	int32 IsBubbleSpinning;
	int32 IsBubbleBouncing;
	int32 IsBubbleBashing;
	int32 IsBubbleBowling;
	int32 WasDJumping;
	int32 IsCoptering;
	_zPlayerWallJumpState WallJumpState;
	int32 cheat_mode;
	uint32 Inv_Shiny;
	uint32 Inv_Spatula;
	uint32 Inv_PatsSock[15];
	uint32 Inv_PatsSock_Max[15];
	uint32 Inv_PatsSock_CurrentLevel;
	uint32 Inv_LevelPickups[15];
	uint32 Inv_LevelPickups_CurrentLevel;
	uint32 Inv_PatsSock_Total;
	xModelTag BubbleTag;
	xEntDrive drv;
	xSurface* floor_surf;
	xVec3 floor_norm;
	int32 slope;
	xCollis earc_coll;
	xSphere head_sph;
	xModelTag center_tag;
	xModelTag head_tag;
	uint32 TongueFlags[2];
	xVec3 RootUp;
	xVec3 RootUpTarget;
	zCheckPoint cp;
	uint32 SlideTrackSliding;
	uint32 SlideTrackCount;
	xEnt* SlideTrackEnt[111];
	uint32 SlideNotGroundedSinceSlide;
	xVec3 SlideTrackDir;
	xVec3 SlideTrackVel;
	float32 SlideTrackDecay;
	float32 SlideTrackLean;
	float32 SlideTrackLand;
	uint8 sb_model_indices[14];
	xModelInstance* sb_models[14];
	uint32 currentPlayer;
	xVec3 PredictRotate;
	xVec3 PredictTranslate;
	float32 PredictAngV;
	xVec3 PredictCurrDir;
	float32 PredictCurrVel;
	float32 KnockBackTimer;
	float32 KnockIntoAirTimer;
};

struct xParEmitterPropsAsset : xBaseAsset
{
	uint32 parSysID;
	union
	{
		xParInterp rate;
		xParInterp value[1];
	};
	xParInterp life;
	xParInterp size_birth;
	xParInterp size_death;
	xParInterp color_birth[4];
	xParInterp color_death[4];
	xParInterp vel_scale;
	xParInterp vel_angle;
	xVec3 vel;
	uint32 emit_limit;
	float32 emit_limit_reset_time;
};

struct xJSPHeader
{
	int8 idtag[4];
	uint32 version;
	uint32 jspNodeCount;
	RpClump* clump;
	xClumpCollBSPTree* colltree;
	xJSPNodeInfo* jspNodeList;
};

struct zLightning
{
	uint32 type;
	uint32 flags;
	union
	{
		_class_0 legacy;
		_class_3 func;
	};
	iColor_tag color;
	float32 time_left;
	float32 time_total;
};

struct xGroup : xBase
{
	xGroupAsset* asset;
	xBase** item;
	uint32 last_index;
	int32 flg_group;
};

enum en_trantype
{
	GOAL_TRAN_NONE,
	GOAL_TRAN_SET,
	GOAL_TRAN_PUSH,
	GOAL_TRAN_POP,
	GOAL_TRAN_POPTO,
	GOAL_TRAN_POPALL,
	GOAL_TRAN_POPBASE,
	GOAL_TRAN_POPSAFE,
	GOAL_TRAN_SWAP,
	GOAL_TRAN_NOMORE,
	GOAL_TRAN_FORCE = 0x7fffffff
};

struct RxPipelineRequiresCluster
{
	RxClusterDefinition* clusterDef;
	RxClusterValidityReq rqdOrOpt;
	uint32 slotIndex;
};

struct RwMatrixTag
{
	RwV3d right;
	uint32 flags;
	RwV3d up;
	uint32 pad1;
	RwV3d at;
	uint32 pad2;
	RwV3d pos;
	uint32 pad3;
};

struct xMat4x3 : xMat3x3
{
	xVec3 pos;
	uint32 pad3;
};

struct RwFrame
{
	RwObject object;
	RwLLLink inDirtyListLink;
	RwMatrixTag modelling;
	RwMatrixTag ltm;
	RwLinkList objectList;
	RwFrame* child;
	RwFrame* next;
	RwFrame* root;
};

struct RwLLLink
{
	RwLLLink* next;
	RwLLLink* prev;
};

struct zPlayerCarryInfo
{
	xEnt* grabbed;
	uint32 grabbedModelID;
	xMat4x3 spin;
	xEnt* throwTarget;
	xEnt* flyingToTarget;
	float32 minDist;
	float32 maxDist;
	float32 minHeight;
	float32 maxHeight;
	float32 maxCosAngle;
	float32 throwMinDist;
	float32 throwMaxDist;
	float32 throwMinHeight;
	float32 throwMaxHeight;
	float32 throwMaxStack;
	float32 throwMaxCosAngle;
	float32 throwTargetRotRate;
	float32 targetRot;
	uint32 grabTarget;
	xVec3 grabOffset;
	float32 grabLerpMin;
	float32 grabLerpMax;
	float32 grabLerpLast;
	uint32 grabYclear;
	float32 throwGravity;
	float32 throwHeight;
	float32 throwDistance;
	float32 fruitFloorDecayMin;
	float32 fruitFloorDecayMax;
	float32 fruitFloorBounce;
	float32 fruitFloorFriction;
	float32 fruitCeilingBounce;
	float32 fruitWallBounce;
	float32 fruitLifetime;
	xEnt* patLauncher;
};

struct _tagEmitOffsetPoint
{
	xVec3 offset;
};

struct zFragParticle
{
	zFragParticleAsset* fasset;
};

struct xAnimMultiFileEntry
{
	uint32 ID;
	xAnimFile* File;
};

struct xQCControl
{
	float32 world_xmin;
	float32 world_ymin;
	float32 world_zmin;
	float32 world_xmax;
	float32 world_ymax;
	float32 world_zmax;
	float32 world_xsz;
	float32 world_ysz;
	float32 world_zsz;
	float32 scale_x;
	float32 scale_y;
	float32 scale_z;
	float32 center_x;
	float32 center_y;
	float32 center_z;
};

struct xAnimActiveEffect
{
	xAnimEffect* Effect;
	uint32 Handle;
};

struct zPlayerSettings
{
	_zPlayerType pcType;
	float32 MoveSpeed[6];
	float32 AnimSneak[3];
	float32 AnimWalk[3];
	float32 AnimRun[3];
	float32 JumpGravity;
	float32 GravSmooth;
	float32 FloatSpeed;
	float32 ButtsmashSpeed;
	zJumpParam Jump;
	zJumpParam Bounce;
	zJumpParam Spring;
	zJumpParam Wall;
	zJumpParam Double;
	zJumpParam SlideDouble;
	zJumpParam SlideJump;
	float32 WallJumpVelocity;
	zLedgeGrabParams ledge;
	float32 spin_damp_xz;
	float32 spin_damp_y;
	uint8 talk_anims;
	uint8 talk_filter_size;
	uint8 talk_filter[4];
};

struct zFragSoundAsset : zFragAsset
{
	uint32 assetID;
	zFragLocation source;
	float32 volume;
	float32 innerRadius;
	float32 outerRadius;
};

struct zEnt : xEnt
{
	xAnimTable* atbl;
};

struct zFragParticleAsset : zFragAsset
{
	zFragLocation source;
	zFragLocation vel;
	xParEmitterCustomSettings emit;
	uint32 parEmitterID;
	zParEmitter* parEmitter;
};

struct xMovePoint : xBase
{
	xMovePointAsset* asset;
	xVec3* pos;
	xMovePoint** nodes;
	xMovePoint* prev;
	uint32 node_wt_sum;
	uint8 on;
	uint8 pad[2];
	float32 delay;
	xSpline3* spl;
};

struct xEntCollis
{
	uint8 chk;
	uint8 pen;
	uint8 env_sidx;
	uint8 env_eidx;
	uint8 npc_sidx;
	uint8 npc_eidx;
	uint8 dyn_sidx;
	uint8 dyn_eidx;
	uint8 stat_sidx;
	uint8 stat_eidx;
	uint8 idx;
	xCollis colls[18];
	void(*post)(xEnt*, xScene*, float32, xEntCollis*);
	uint32(*depenq)(xEnt*, xEnt*, xScene*, float32, xCollis*);
};

struct _class_0
{
	xVec3 base_point[16];
	xVec3 point[16];
	int16 total_points;
	int16 end_points;
	float32 arc_height;
	xVec3 arc_normal;
	float32 thickness[16];
	union
	{
		_tagLightningLine line;
		_tagLightningRot rot;
		_tagLightningZeus zeus;
	};
	float32 rand_radius;
};

struct xSurface : xBase
{
	uint32 idx;
	uint32 type;
	union
	{
		uint32 mat_idx;
		xEnt* ent;
		void* obj;
	};
	float32 friction;
	uint8 state;
	uint8 pad[3];
	void* moprops;
};

struct RpAtomic
{
	RwObjectHasFrame object;
	RwResEntry* repEntry;
	RpGeometry* geometry;
	RwSphere boundingSphere;
	RwSphere worldBoundingSphere;
	RpClump* clump;
	RwLLLink inClumpLink;
	RpAtomic*(*renderCallBack)(RpAtomic*);
	RpInterpolator interpolator;
	uint16 renderFrame;
	uint16 pad;
	RwLinkList llWorldSectorsInAtomic;
	RxPipeline* pipeline;
};

struct xAnimFile
{
	xAnimFile* Next;
	int8* Name;
	uint32 ID;
	uint32 FileFlags;
	float32 Duration;
	float32 TimeOffset;
	uint16 BoneCount;
	uint8 NumAnims[2];
	void** RawData;
};

struct tri_data_0 : tri_data_1
{
	xVec3 loc;
	float32 yaw;
	xCollis* coll;
};

struct xCoef
{
	float32 a[4];
};

struct xUpdateCullMgr
{
	uint32 entCount;
	uint32 entActive;
	void** ent;
	xUpdateCullEnt** mgr;
	uint32 mgrCount;
	uint32 mgrCurr;
	xUpdateCullEnt* mgrList;
	uint32 grpCount;
	xUpdateCullGroup* grpList;
	void(*activateCB)(void*);
	void(*deactivateCB)(void*);
};

enum en_pendtype
{
	PEND_TRAN_NONE,
	PEND_TRAN_SET,
	PEND_TRAN_PUSH,
	PEND_TRAN_POP,
	PEND_TRAN_POPTO,
	PEND_TRAN_POPALL,
	PEND_TRAN_SWAP,
	PEND_TRAN_INPROG,
	PEND_TRAN_NOMORE
};

struct xVec4
{
	float32 x;
	float32 y;
	float32 z;
	float32 w;
};

struct xAnimSingle
{
	uint32 SingleFlags;
	xAnimState* State;
	float32 Time;
	float32 CurrentSpeed;
	float32 BilinearLerp[2];
	xAnimEffect* Effect;
	uint32 ActiveCount;
	float32 LastTime;
	xAnimActiveEffect* ActiveList;
	xAnimPlay* Play;
	xAnimTransition* Sync;
	xAnimTransition* Tran;
	xAnimSingle* Blend;
	float32 BlendFactor;
	uint32 pad;
};

struct xMovePointAsset : xBaseAsset
{
	xVec3 pos;
	uint16 wt;
	uint8 on;
	uint8 bezIndex;
	uint8 flg_props;
	uint8 pad;
	uint16 numPoints;
	float32 delay;
	float32 zoneRadius;
	float32 arenaRadius;
};

struct _class_1
{
	xVec3* verts;
};

struct RpVertexNormal
{
	int8 x;
	int8 y;
	int8 z;
	uint8 pad;
};

struct RwSurfaceProperties
{
	float32 ambient;
	float32 specular;
	float32 diffuse;
};

struct xEntMotionMechData
{
	uint8 type;
	uint8 flags;
	uint8 sld_axis;
	uint8 rot_axis;
	float32 sld_dist;
	float32 sld_tm;
	float32 sld_acc_tm;
	float32 sld_dec_tm;
	float32 rot_dist;
	float32 rot_tm;
	float32 rot_acc_tm;
	float32 rot_dec_tm;
	float32 ret_delay;
	float32 post_ret_delay;
};

struct tri_data_1
{
	uint32 index;
	float32 r;
	float32 d;
};

struct xLinkAsset
{
	uint16 srcEvent;
	uint16 dstEvent;
	uint32 dstAssetID;
	float32 param[4];
	uint32 paramWidgetAssetID;
	uint32 chkAssetID;
};

struct rxReq
{
};

struct xListItem_1
{
	int32 flg_travFilter;
	xGoal* next;
	xGoal* prev;
};

struct xEntPenData
{
	xVec3 top;
	float32 w;
	xMat4x3 omat;
};

struct zShrapnelAsset
{
	int32 fassetCount;
	uint32 shrapnelID;
	void(*initCB)(zShrapnelAsset*, xModelInstance*, xVec3*, void(*)(zFrag*, zFragAsset*));
};

struct xCamera : xBase
{
	RwCamera* lo_cam;
	xMat4x3 mat;
	xMat4x3 omat;
	xMat3x3 mbasis;
	xBound bound;
	xMat4x3* tgt_mat;
	xMat4x3* tgt_omat;
	xBound* tgt_bound;
	xVec3 focus;
	xScene* sc;
	xVec3 tran_accum;
	float32 fov;
	uint32 flags;
	float32 tmr;
	float32 tm_acc;
	float32 tm_dec;
	float32 ltmr;
	float32 ltm_acc;
	float32 ltm_dec;
	float32 dmin;
	float32 dmax;
	float32 dcur;
	float32 dgoal;
	float32 hmin;
	float32 hmax;
	float32 hcur;
	float32 hgoal;
	float32 pmin;
	float32 pmax;
	float32 pcur;
	float32 pgoal;
	float32 depv;
	float32 hepv;
	float32 pepv;
	float32 orn_epv;
	float32 yaw_epv;
	float32 pitch_epv;
	float32 roll_epv;
	xQuat orn_cur;
	xQuat orn_goal;
	xQuat orn_diff;
	float32 yaw_cur;
	float32 yaw_goal;
	float32 pitch_cur;
	float32 pitch_goal;
	float32 roll_cur;
	float32 roll_goal;
	float32 dct;
	float32 dcd;
	float32 dccv;
	float32 dcsv;
	float32 hct;
	float32 hcd;
	float32 hccv;
	float32 hcsv;
	float32 pct;
	float32 pcd;
	float32 pccv;
	float32 pcsv;
	float32 orn_ct;
	float32 orn_cd;
	float32 orn_ccv;
	float32 orn_csv;
	float32 yaw_ct;
	float32 yaw_cd;
	float32 yaw_ccv;
	float32 yaw_csv;
	float32 pitch_ct;
	float32 pitch_cd;
	float32 pitch_ccv;
	float32 pitch_csv;
	float32 roll_ct;
	float32 roll_cd;
	float32 roll_ccv;
	float32 roll_csv;
	xVec4 frustplane[12];
};

struct xScene
{
	uint32 sceneID;
	uint16 flags;
	uint16 num_ents;
	uint16 num_trigs;
	uint16 num_stats;
	uint16 num_dyns;
	uint16 num_npcs;
	uint16 num_act_ents;
	uint16 num_nact_ents;
	float32 gravity;
	float32 drag;
	float32 friction;
	uint16 num_ents_allocd;
	uint16 num_trigs_allocd;
	uint16 num_stats_allocd;
	uint16 num_dyns_allocd;
	uint16 num_npcs_allocd;
	xEnt** trigs;
	xEnt** stats;
	xEnt** dyns;
	xEnt** npcs;
	xEnt** act_ents;
	xEnt** nact_ents;
	xEnv* env;
	xMemPool mempool;
	xBase*(*resolvID)(uint32);
	int8*(*base2Name)(xBase*);
	int8*(*id2Name)(uint32);
};

enum RxClusterValidityReq
{
	rxCLREQ_DONTWANT,
	rxCLREQ_REQUIRED,
	rxCLREQ_OPTIONAL,
	rxCLUSTERVALIDITYREQFORCEENUMSIZEINT = 0x7fffffff
};

enum en_LASSO_STATUS
{
	LASS_STAT_DONE,
	LASS_STAT_PENDING,
	LASS_STAT_GRABBING,
	LASS_STAT_TOSSING,
	LASS_STAT_NOMORE,
	LASS_STAT_FORCEINT = 0x7fffffff
};

struct xModelAssetParam
{
};

struct xPEVCyl
{
	float32 height;
	float32 radius;
	float32 deflection;
};

struct zFragProjectile
{
	zFragProjectileAsset* fasset;
	xModelInstance* model;
	xParabola path;
	float32 angVel;
	float32 t;
	float32 tColl;
	int32 numBounces;
	float32 scale;
	float32 parentScale;
	float32 alpha;
	xVec3 N;
	xVec3 axis;
};

struct RpInterpolator
{
	int32 flags;
	int16 startMorphTarget;
	int16 endMorphTarget;
	float32 time;
	float32 recipTime;
	float32 position;
};

struct xAnimMultiFileBase
{
	uint32 Count;
};

struct RwCamera
{
	RwObjectHasFrame object;
	RwCameraProjection projectionType;
	RwCamera*(*beginUpdate)(RwCamera*);
	RwCamera*(*endUpdate)(RwCamera*);
	RwMatrixTag viewMatrix;
	RwRaster* frameBuffer;
	RwRaster* zBuffer;
	RwV2d viewWindow;
	RwV2d recipViewWindow;
	RwV2d viewOffset;
	float32 nearPlane;
	float32 farPlane;
	float32 fogPlane;
	float32 zScale;
	float32 zShift;
	RwFrustumPlane frustumPlanes[6];
	RwBBox frustumBoundBox;
	RwV3d frustumCorners[8];
};

struct zFragProjectileAsset : zFragAsset
{
	uint32 modelInfoID;
	RpAtomic* modelFile;
	zFragLocation launch;
	zFragLocation vel;
	float32 bounce;
	int32 maxBounces;
	uint32 flags;
	uint32 childID;
	zShrapnelAsset* child;
	float32 minScale;
	float32 maxScale;
	uint32 scaleCurveID;
	xCurveAsset* scaleCurve;
	float32 gravity;
};

struct xAnimEffect
{
	xAnimEffect* Next;
	uint32 Flags;
	float32 StartTime;
	float32 EndTime;
	uint32(*Callback)(uint32, xAnimActiveEffect*, xAnimSingle*, void*);
};

struct zNPCLassoInfo
{
	en_LASSO_STATUS stage;
	xEnt* lassoee;
	xAnimState* holdGuideAnim;
	xModelInstance* holdGuideModel;
	xAnimState* grabGuideAnim;
	xModelInstance* grabGuideModel;
};

struct _tagxRumble
{
	_tagRumbleType type;
	float32 seconds;
	_tagxRumble* next;
	int16 active;
	uint16 fxflags;
};

struct xCoef3
{
	xCoef x;
	xCoef y;
	xCoef z;
};

struct xParInterp
{
	float32 val[2];
	uint32 interp;
	float32 freq;
	float32 oofreq;
};

struct xParSys
{
};

struct _tagxPad
{
	uint8 value[22];
	uint8 last_value[22];
	uint32 on;
	uint32 pressed;
	uint32 released;
	_tagPadAnalog analog1;
	_tagPadAnalog analog2;
	_tagPadState state;
	uint32 flags;
	_tagxRumble rumble_head;
	int16 port;
	int16 slot;
	_tagiPad context;
	float32 al2d_timer;
	float32 ar2d_timer;
	float32 d_timer;
	float32 up_tmr[22];
	float32 down_tmr[22];
	analog_data analog[2];
};

struct zFragShockwaveAsset : zFragAsset
{
	uint32 modelInfoID;
	float32 birthRadius;
	float32 deathRadius;
	float32 birthVelocity;
	float32 deathVelocity;
	float32 birthSpin;
	float32 deathSpin;
	float32 birthColor[4];
	float32 deathColor[4];
};

struct xCurveAsset
{
};

struct xEntOrbitData
{
	xVec3 orig;
	xVec3 c;
	float32 a;
	float32 b;
	float32 p;
	float32 w;
};

struct zJumpParam
{
	float32 PeakHeight;
	float32 TimeGravChange;
	float32 TimeHold;
	float32 ImpulseVel;
};

enum RxNodeDefEditable
{
	rxNODEDEFCONST,
	rxNODEDEFEDITABLE,
	rxNODEDEFEDITABLEFORCEENUMSIZEINT = 0x7fffffff
};

struct _tagLightningLine
{
	float32 unused;
};

struct xClumpCollBSPTree
{
	uint32 numBranchNodes;
	xClumpCollBSPBranchNode* branchNodes;
	uint32 numTriangles;
	xClumpCollBSPTriangle* triangles;
};

enum RxClusterValid
{
	rxCLVALID_NOCHANGE,
	rxCLVALID_VALID,
	rxCLVALID_INVALID,
	rxCLUSTERVALIDFORCEENUMSIZEINT = 0x7fffffff
};

struct RyzMemData
{
};

enum zFragLocType
{
	eFragLocBone,
	eFragLocBoneUpdated,
	eFragLocBoneLocal,
	eFragLocBoneLocalUpdated,
	eFragLocTag,
	eFragLocTagUpdated,
	eFragLocCount,
	eFragLocForceSize = 0x7fffffff
};

struct RpPolygon
{
	uint16 matIndex;
	uint16 vertIndex[3];
};

struct xRot
{
	xVec3 axis;
	float32 angle;
};

struct zEntHangable
{
};

struct zPlatFMRunTime
{
	uint32 flags;
	float32 tmrs[12];
	float32 ttms[12];
	float32 atms[12];
	float32 dtms[12];
	float32 vms[12];
	float32 dss[12];
};

struct xAnimPlay
{
	xAnimPlay* Next;
	uint16 NumSingle;
	uint16 BoneCount;
	xAnimSingle* Single;
	void* Object;
	xAnimTable* Table;
	xMemPool* Pool;
	xModelInstance* ModelInst;
	void(*BeforeAnimMatrices)(xAnimPlay*, xQuat*, xVec3*, int32);
};

struct _class_2
{
	float32 t;
	float32 u;
	float32 v;
};

struct RpMaterialList
{
	RpMaterial** materials;
	int32 numMaterials;
	int32 space;
};

enum en_SM_NOTICES
{
	SM_NOTE_NPCDIED,
	SM_NOTE_NPCSTANDBY,
	SM_NOTE_NPCALIVE,
	SM_NOTE_DUPPAUSE,
	SM_NOTE_DUPRESUME,
	SM_NOTE_DUPSETDELAY,
	SM_NOTE_DUPDEAD,
	SM_NOTE_KILLKIDS,
	SM_NOTE_NOMORE,
	SM_NOTE_FORCE = 0x7fffffff
};

struct xFFX
{
};

struct xClumpCollBSPVertInfo
{
	uint16 atomIndex;
	uint16 meshVertIndex;
};

struct NPCSndQueue
{
	uint32 sndDirect;
	en_NPC_SOUND sndtype;
	int32 flg_snd;
	float32 tmr_delay;
	float32 radius;
};

struct xEntMotion
{
	xEntMotionAsset* asset;
	uint8 type;
	uint8 pad;
	uint16 flags;
	float32 t;
	float32 tmr;
	float32 d;
	union
	{
		xEntERData er;
		xEntOrbitData orb;
		xEntSplineData spl;
		xEntMPData mp;
		xEntMechData mech;
		xEntPenData pen;
	};
	xEnt* owner;
	xEnt* target;
};

struct xClumpCollBSPBranchNode
{
	uint32 leftInfo;
	uint32 rightInfo;
	float32 leftValue;
	float32 rightValue;
};

struct xPlatformAsset
{
};

struct xPEEntBone
{
	uint8 flags;
	uint8 type;
	uint8 bone;
	uint8 pad1;
	xVec3 offset;
	float32 radius;
	float32 deflection;
};

struct xBound
{
	xQCData qcd;
	uint8 type;
	uint8 pad[3];
	union
	{
		xSphere sph;
		xBBox box;
		xCylinder cyl;
	};
	xMat4x3* mat;
};

struct iFogParams
{
	RwFogType type;
	float32 start;
	float32 stop;
	float32 density;
	RwRGBA fogcolor;
	RwRGBA bgcolor;
	uint8* table;
};

struct xPSYNote
{
};

struct xAnimMultiFile : xAnimMultiFileBase
{
	xAnimMultiFileEntry Files[1];
};

enum rxEmbeddedPacketState
{
	rxPKST_PACKETLESS,
	rxPKST_UNUSED,
	rxPKST_INUSE,
	rxPKST_PENDING,
	rxEMBEDDEDPACKETSTATEFORCEENUMSIZEINT = 0x7fffffff
};

struct zCutsceneMgr
{
};

struct xSphere
{
	xVec3 center;
	float32 r;
};

struct RpMaterial
{
	RwTexture* texture;
	RwRGBA color;
	RxPipeline* pipeline;
	RwSurfaceProperties surfaceProps;
	int16 refCount;
	int16 pad;
};

struct xEntMotionAsset
{
	uint8 type;
	uint8 use_banking;
	uint16 flags;
	union
	{
		xEntMotionERData er;
		xEntMotionOrbitData orb;
		xEntMotionSplineData spl;
		xEntMotionMPData mp;
		xEntMotionMechData mech;
		xEntMotionPenData pen;
	};
};

struct xClumpCollBSPTriangle
{
	_class_4 v;
	uint8 flags;
	uint8 platData;
	uint16 matIndex;
};

struct xEntAsset : xBaseAsset
{
	uint8 flags;
	uint8 subtype;
	uint8 pflags;
	uint8 moreFlags;
	uint8 pad;
	uint32 surfaceID;
	xVec3 ang;
	xVec3 pos;
	xVec3 scale;
	float32 redMult;
	float32 greenMult;
	float32 blueMult;
	float32 seeThru;
	float32 seeThruSpeed;
	uint32 modelInfoID;
	uint32 animListID;
};

struct xModelPool
{
	xModelPool* Next;
	uint32 NumMatrices;
	xModelInstance* List;
};

struct xEntBoulder
{
};

enum _tagPadState
{
	ePad_Disabled,
	ePad_DisabledError,
	ePad_Enabled,
	ePad_Missing,
	ePad_Total
};

enum RwCameraProjection
{
	rwNACAMERAPROJECTION,
	rwPERSPECTIVE,
	rwPARALLEL,
	rwCAMERAPROJECTIONFORCEENUMSIZEINT = 0x7fffffff
};

enum RxClusterForcePresent
{
	rxCLALLOWABSENT,
	rxCLFORCEPRESENT,
	rxCLUSTERFORCEPRESENTFORCEENUMSIZEINT = 0x7fffffff
};

struct zScene : xScene
{
	_zPortal* pendingPortal;
	union
	{
		uint32 num_ents;
		uint32 num_base;
	};
	union
	{
		xBase** base;
		zEnt** ents;
	};
	uint32 num_update_base;
	xBase** update_base;
	uint32 baseCount[72];
	xBase* baseList[72];
	_zEnv* zen;
};

struct xCylinder
{
	xVec3 center;
	float32 r;
	float32 h;
};

struct zAssetPickupTable
{
};

struct xGlobals
{
	xCamera camera;
	_tagxPad* pad0;
	_tagxPad* pad1;
	_tagxPad* pad2;
	_tagxPad* pad3;
	int32 profile;
	int8 profFunc[128][6];
	xUpdateCullMgr* updateMgr;
	int32 sceneFirst;
	int8 sceneStart[32];
	RpWorld* currWorld;
	iFogParams fog;
	iFogParams fogA;
	iFogParams fogB;
	long32 fog_t0;
	long32 fog_t1;
	int32 option_vibration;
	uint32 QuarterSpeed;
	float32 update_dt;
	int32 useHIPHOP;
	uint8 NoMusic;
	int8 currentActivePad;
	uint8 firstStartPressed;
	uint32 minVSyncCnt;
	uint8 dontShowPadMessageDuringLoadingOrCutScene;
	uint8 autoSaveFeature;
};

struct _tagLightningRot
{
	float32 deg[16];
	float32 degrees;
	float32 height;
};

struct RpClump
{
	RwObject object;
	RwLinkList atomicList;
	RwLinkList lightList;
	RwLinkList cameraList;
	RwLLLink inWorldLink;
	RpClump*(*callback)(RpClump*, void*);
};

enum PSY_BRAIN_STATUS
{
	PSY_STAT_BLANK,
	PSY_STAT_GROW,
	PSY_STAT_EXTEND,
	PSY_STAT_THINK,
	PSY_STAT_NOMORE,
	PSY_STAT_FORCE = 0x7fffffff
};

struct zNPCSettings : xDynAsset
{
	en_npcbtyp basisType;
	int8 allowDetect;
	int8 allowPatrol;
	int8 allowWander;
	int8 reduceCollide;
	int8 useNavSplines;
	int8 pad[3];
	int8 allowChase;
	int8 allowAttack;
	int8 assumeLOS;
	int8 assumeFOV;
	en_dupowavmod duploWaveMode;
	float32 duploSpawnDelay;
	int32 duploSpawnLifeMax;
};

struct RpGeometry
{
	RwObject object;
	uint32 flags;
	uint16 lockedSinceLastInst;
	int16 refCount;
	int32 numTriangles;
	int32 numVertices;
	int32 numMorphTargets;
	int32 numTexCoordSets;
	RpMaterialList matList;
	RpTriangle* triangles;
	RwRGBA* preLitLum;
	RwTexCoords* texCoords[8];
	RpMeshHeader* mesh;
	RwResEntry* repEntry;
	RpMorphTarget* morphTarget;
};

struct xBox
{
	xVec3 upper;
	xVec3 lower;
};

enum en_GOALSTATE
{
	GOAL_STAT_UNKNOWN,
	GOAL_STAT_PROCESS,
	GOAL_STAT_ENTER,
	GOAL_STAT_EXIT,
	GOAL_STAT_SUSPEND,
	GOAL_STAT_RESUME,
	GOAL_STAT_PAUSED,
	GOAL_STAT_DONE,
	GOAL_STAT_NOMORE,
	GOAL_STAT_FORCE = 0x7fffffff
};

struct RxClusterDefinition
{
	int8* name;
	uint32 defaultStride;
	uint32 defaultAttributes;
	int8* attributeSet;
};

struct xEntSplineData
{
	int32 unknown;
};

enum en_NPC_SOUND
{
	NPC_STYP_BOGUS = 0xfffffffe,
	NPC_STYP_LISTEND = 0,
	NPC_STYP_ENCOUNTER,
	NPC_STYP_CLANKING,
	NPC_STYP_EXCLAIM,
	NPC_STYP_OUCH,
	NPC_STYP_CHEERING,
	NPC_STYP_RESPAWN,
	NPC_STYP_ALERT,
	NPC_STYP_DIZZY,
	NPC_STYP_DANCE,
	NPC_STYP_LAUGH,
	NPC_STYP_ATTACK,
	NPC_STYP_PUNCH,
	NPC_STYP_WEPLAUNCH,
	NPC_STYP_LIGHTNING,
	NPC_STYP_WARNBANG,
	NPC_STYP_DEATH,
	NPC_STYP_DEATHJELLY,
	NPC_STYP_BONKED,
	NPC_STYP_UNBONKED,
	NPC_STYP_TIKISTACK,
	NPC_STYP_TIKIEXPLODE,
	NPC_STYP_TIKITHUNDER,
	NPC_STYP_XSFXTALK,
	NPC_STYP_ONELINER,
	NPC_STYP_ONELINERTOO,
	NPC_STYP_NOMORE,
	NPC_STYP_FORCE = 0x7fffffff
};

struct xNPCBasic : xEnt, xFactoryInst
{
	void(*f_setup)(xEnt*);
	void(*f_reset)(xEnt*);
	struct
	{
		int32 flg_basenpc : 16;
		int32 inUpdate : 8;
		int32 flg_upward : 8;
	};
	int32 colFreq;
	int32 colFreqReset;
	struct
	{
		uint32 flg_colCheck : 8;
		uint32 flg_penCheck : 8;
		uint32 flg_unused : 16;
	};
	int32 myNPCType;
	xEntShadow entShadow_embedded;
	xShadowSimpleCache simpShadow_embedded;
};

struct zParEmitter : xParEmitter
{
};

struct xPECircle
{
	float32 radius;
	float32 deflection;
	xVec3 dir;
};

struct zFragLightning
{
	zFragLightningAsset* fasset;
	xModelInstance* startParent;
	xModelInstance* endParent;
	zLightning* lightning;
};

struct xEntMotionPenData
{
	uint8 flags;
	uint8 plane;
	uint8 pad[2];
	float32 len;
	float32 range;
	float32 period;
	float32 phase;
};

struct RwSphere
{
	RwV3d center;
	float32 radius;
};

struct zFragBone
{
	int32 index;
	xVec3 offset;
};

struct xEntFrame
{
	xMat4x3 mat;
	xMat4x3 oldmat;
	xVec3 oldvel;
	xRot oldrot;
	xRot drot;
	xRot rot;
	xVec3 dpos;
	xVec3 dvel;
	xVec3 vel;
	uint32 mode;
};

struct _class_3
{
	xVec3 endPoint[2];
	xVec3 direction;
	float32 length;
	float32 scale;
	float32 width;
	float32 endParam[2];
	float32 endVel[2];
	float32 paramSpan[2];
	float32 arc_height;
	xVec3 arc_normal;
};

struct _tagPadAnalog
{
	int8 x;
	int8 y;
};

struct _class_4
{
	union
	{
		xClumpCollBSPVertInfo i;
		RwV3d* p;
	};
};

struct RwTexDictionary
{
	RwObject object;
	RwLinkList texturesInDict;
	RwLLLink lInInstance;
};

struct RxOutputSpec
{
	int8* name;
	RxClusterValid* outputClusters;
	RxClusterValid allOtherClusters;
};

struct zFragAsset
{
	zFragType type;
	uint32 id;
	uint32 parentID[2];
	float32 lifetime;
	float32 delay;
};

struct zPlatform : zEnt
{
	xPlatformAsset* passet;
	xEntMotion motion;
	uint16 state;
	uint16 plat_flags;
	float32 tmr;
	int32 ctr;
	xMovePoint* src;
	xModelInstance* am;
	xModelInstance* bm;
	int32 moving;
	xEntDrive drv;
	zPlatFMRunTime* fmrt;
	float32 pauseMult;
	float32 pauseDelta;
};

struct xEntMPData
{
	float32 curdist;
	float32 speed;
	xMovePoint* dest;
	xMovePoint* src;
	xSpline3* spl;
	float32 dist;
	uint32 padalign;
	xQuat aquat;
	xQuat bquat;
};

struct _tagLightningZeus
{
	float32 normal_offset;
	float32 back_offset;
	float32 side_offset;
};

struct xMat3x3
{
	xVec3 right;
	int32 flags;
	xVec3 up;
	uint32 pad1;
	xVec3 at;
	uint32 pad2;
};

struct xEnv
{
	iEnv* geom;
	iEnv ienv;
	xLightKit* lightKit;
};

struct xMemPool
{
	void* FreeList;
	uint16 NextOffset;
	uint16 Flags;
	void* UsedList;
	void(*InitCB)(xMemPool*, void*);
	void* Buffer;
	uint16 Size;
	uint16 NumRealloc;
	uint32 Total;
};

struct RxClusterRef
{
	RxClusterDefinition* clusterDef;
	RxClusterForcePresent forcePresent;
	uint32 reserved;
};

struct xGroupAsset : xBaseAsset
{
	uint16 itemCount;
	uint16 groupFlags;
};

struct _tagiPad
{
	int32 port;
};

struct xShadowSimplePoly
{
	xVec3 vert[3];
	xVec3 norm;
};

struct _tagEmitSphere
{
	float32 radius;
};

struct RwObject
{
	uint8 type;
	uint8 subType;
	uint8 flags;
	uint8 privateFlags;
	void* parent;
};

struct zFragLocInfo
{
	union
	{
		zFragBone bone;
		xModelTag tag;
	};
};

struct zLasso
{
	uint32 flags;
	float32 secsTotal;
	float32 secsLeft;
	float32 stRadius;
	float32 tgRadius;
	float32 crRadius;
	xVec3 stCenter;
	xVec3 tgCenter;
	xVec3 crCenter;
	xVec3 stNormal;
	xVec3 tgNormal;
	xVec3 crNormal;
	xVec3 honda;
	float32 stSlack;
	float32 stSlackDist;
	float32 tgSlack;
	float32 tgSlackDist;
	float32 crSlack;
	float32 currDist;
	float32 lastDist;
	xVec3 lastRefs[5];
	uint8 reindex[5];
	xVec3 anchor;
	xModelTag tag;
	xModelInstance* model;
};

struct RxIoSpec
{
	uint32 numClustersOfInterest;
	RxClusterRef* clustersOfInterest;
	RxClusterValidityReq* inputRequirements;
	uint32 numOutputs;
	RxOutputSpec* outputs;
};

struct RpTriangle
{
	uint16 vertIndex[3];
	int16 matIndex;
};

struct xEntMotionERData
{
	xVec3 ret_pos;
	xVec3 ext_dpos;
	float32 ext_tm;
	float32 ext_wait_tm;
	float32 ret_tm;
	float32 ret_wait_tm;
};

struct xJSPNodeInfo
{
	int32 originalMatIndex;
	int32 nodeFlags;
};

struct zFragSound
{
	zFragSoundAsset* fasset;
	xVec3 location;
	uint32 soundID;
};

struct RwTexture
{
	RwRaster* raster;
	RwTexDictionary* dict;
	RwLLLink lInDictionary;
	int8 name[32];
	int8 mask[32];
	uint32 filterAddressing;
	int32 refCount;
};

struct RxNodeMethods
{
	int32(*nodeBody)(RxPipelineNode*, RxPipelineNodeParam*);
	int32(*nodeInit)(RxNodeDefinition*);
	void(*nodeTerm)(RxNodeDefinition*);
	int32(*pipelineNodeInit)(RxPipelineNode*);
	void(*pipelineNodeTerm)(RxPipelineNode*);
	int32(*pipelineNodeConfig)(RxPipelineNode*, RxPipeline*);
	uint32(*configMsgHandler)(RxPipelineNode*, uint32, uint32, void*);
};

struct xBaseAsset
{
	uint32 id;
	uint8 baseType;
	uint8 linkCount;
	uint16 baseFlags;
};

struct RwFrustumPlane
{
	RwPlane plane;
	uint8 closestX;
	uint8 closestY;
	uint8 closestZ;
	uint8 pad;
};

enum en_npcbtyp
{
	NPCP_BASIS_NONE,
	NPCP_BASIS_EVILROBOT,
	NPCP_BASIS_FRIENDLYROBOT,
	NPCP_BASIS_LOVINGCITIZEN,
	NPCP_BASIS_GRUMPYCITIZEN,
	NPCP_BASIS_NOMORE,
	NPCP_BASIS_FORCE = 0x7fffffff
};

struct _tagEmitRect
{
	float32 x_len;
	float32 z_len;
};

struct xShadowSimpleCache
{
	uint16 flags;
	uint8 alpha;
	uint8 pad;
	uint32 collPriority;
	xVec3 pos;
	xVec3 at;
	xEnt* castOnEnt;
	xShadowSimplePoly poly;
	float32 envHeight;
	float32 shadowHeight;
	uint32 raster;
	float32 dydx;
	float32 dydz;
	xVec3 corner[4];
};

struct zGlobals : xGlobals
{
	zPlayerGlobals player;
	zAssetPickupTable* pickupTable;
	zCutsceneMgr* cmgr;
	zScene* sceneCur;
	zScene* scenePreload;
};

struct RwPlane
{
	RwV3d normal;
	float32 distance;
};

struct zFragLocation
{
	zFragLocType type;
	zFragLocInfo info;
};

struct xDynAsset : xBaseAsset
{
	uint32 type;
	uint16 version;
	uint16 handle;
};

struct RxCluster
{
	uint16 flags;
	uint16 stride;
	void* data;
	void* currentData;
	uint32 numAlloced;
	uint32 numUsed;
	RxPipelineCluster* clusterRef;
	uint32 attributes;
};

struct xParEmitterCustomSettings : xParEmitterPropsAsset
{
	uint32 custom_flags;
	uint32 attachToID;
	xVec3 pos;
	xVec3 vel;
	float32 vel_angle_variation;
	uint8 rot[3];
	uint8 padding;
	float32 radius;
	float32 emit_interval_current;
	void* emit_volume;
};

struct zGlobalSettings
{
	uint16 AnalogMin;
	uint16 AnalogMax;
	float32 SundaeTime;
	float32 SundaeMult;
	uint32 InitialShinyCount;
	uint32 InitialSpatulaCount;
	int32 ShinyValuePurple;
	int32 ShinyValueBlue;
	int32 ShinyValueGreen;
	int32 ShinyValueYellow;
	int32 ShinyValueRed;
	int32 ShinyValueCombo0;
	int32 ShinyValueCombo1;
	int32 ShinyValueCombo2;
	int32 ShinyValueCombo3;
	int32 ShinyValueCombo4;
	int32 ShinyValueCombo5;
	int32 ShinyValueCombo6;
	int32 ShinyValueCombo7;
	int32 ShinyValueCombo8;
	int32 ShinyValueCombo9;
	int32 ShinyValueCombo10;
	int32 ShinyValueCombo11;
	int32 ShinyValueCombo12;
	int32 ShinyValueCombo13;
	int32 ShinyValueCombo14;
	int32 ShinyValueCombo15;
	float32 ComboTimer;
	uint32 Initial_Specials;
	uint32 TakeDamage;
	float32 DamageTimeHit;
	float32 DamageTimeSurface;
	float32 DamageTimeEGen;
	float32 DamageSurfKnock;
	float32 DamageGiveHealthKnock;
	uint32 CheatSpongeball;
	uint32 CheatPlayerSwitch;
	uint32 CheatAlwaysPortal;
	uint32 CheatFlyToggle;
	uint32 DisableForceConversation;
	float32 StartSlideAngle;
	float32 StopSlideAngle;
	float32 RotMatchMaxAngle;
	float32 RotMatchMatchTime;
	float32 RotMatchRelaxTime;
	float32 Gravity;
	float32 BBashTime;
	float32 BBashHeight;
	float32 BBashDelay;
	float32 BBashCVTime;
	float32 BBounceSpeed;
	float32 BSpinMinFrame;
	float32 BSpinMaxFrame;
	float32 BSpinRadius;
	float32 SandyMeleeMinFrame;
	float32 SandyMeleeMaxFrame;
	float32 SandyMeleeRadius;
	float32 BubbleBowlTimeDelay;
	float32 BubbleBowlLaunchPosLeft;
	float32 BubbleBowlLaunchPosUp;
	float32 BubbleBowlLaunchPosAt;
	float32 BubbleBowlLaunchVelLeft;
	float32 BubbleBowlLaunchVelUp;
	float32 BubbleBowlLaunchVelAt;
	float32 BubbleBowlPercentIncrease;
	float32 BubbleBowlMinSpeed;
	float32 BubbleBowlMinRecoverTime;
	float32 SlideAccelVelMin;
	float32 SlideAccelVelMax;
	float32 SlideAccelStart;
	float32 SlideAccelEnd;
	float32 SlideAccelPlayerFwd;
	float32 SlideAccelPlayerBack;
	float32 SlideAccelPlayerSide;
	float32 SlideVelMaxStart;
	float32 SlideVelMaxEnd;
	float32 SlideVelMaxIncTime;
	float32 SlideVelMaxIncAccel;
	float32 SlideAirHoldTime;
	float32 SlideAirSlowTime;
	float32 SlideAirDblHoldTime;
	float32 SlideAirDblSlowTime;
	float32 SlideVelDblBoost;
	uint8 SlideApplyPhysics;
	uint8 PowerUp[2];
	uint8 InitialPowerUp[2];
};

struct xModelTag
{
	xVec3 v;
	uint32 matidx;
	float32 wt[4];
};

enum en_SM_WAVE_MODE
{
	SM_WAVE_CONTINUOUS,
	SM_WAVE_DISCREET,
	SM_WAVE_NOMORE,
	SM_WAVE_FORCE = 0x7fffffff
};

struct zFragShockwave
{
	zFragShockwaveAsset* fasset;
	float32 currSize;
	float32 currVelocity;
	float32 deltVelocity;
	float32 currSpin;
	float32 deltSpin;
	float32 currColor[4];
	float32 deltColor[4];
};

struct RxPacket
{
	uint16 flags;
	uint16 numClusters;
	RxPipeline* pipeline;
	uint32* inputToClusterSlot;
	uint32* slotsContinue;
	RxPipelineCluster** slotClusterRefs;
	RxCluster clusters[1];
};

struct zPlayerLassoInfo
{
	xEnt* target;
	float32 dist;
	uint8 destroy;
	uint8 targetGuide;
	float32 lassoRot;
	xEnt* swingTarget;
	xEnt* releasedSwing;
	float32 copterTime;
	int32 canCopter;
	zLasso lasso;
	xAnimState* zeroAnim;
};

struct st_XORDEREDARRAY
{
	void** list;
	int32 cnt;
	int32 max;
	int32 warnlvl;
};

struct xEntMotionOrbitData
{
	xVec3 center;
	float32 w;
	float32 h;
	float32 period;
};

enum RwFogType
{
	rwFOGTYPENAFOGTYPE,
	rwFOGTYPELINEAR,
	rwFOGTYPEEXPONENTIAL,
	rwFOGTYPEEXPONENTIAL2,
	rwFOGTYPEFORCEENUMSIZEINT = 0x7fffffff
};

enum RpWorldRenderOrder
{
	rpWORLDRENDERNARENDERORDER,
	rpWORLDRENDERFRONT2BACK,
	rpWORLDRENDERBACK2FRONT,
	rpWORLDRENDERORDERFORCEENUMSIZEINT = 0x7fffffff
};

struct zLedgeGrabParams
{
	float32 animGrab;
	float32 zdist;
	xVec3 tranTable[60];
	int32 tranCount;
	xEnt* optr;
	xMat4x3 omat;
	float32 y0det;
	float32 dydet;
	float32 r0det;
	float32 drdet;
	float32 thdet;
	float32 rtime;
	float32 ttime;
	float32 tmr;
	xVec3 spos;
	xVec3 epos;
	xVec3 tpos;
	int32 nrays;
	int32 rrand;
	float32 startrot;
	float32 endrot;
};

struct xPEEntBound
{
	uint8 flags;
	uint8 type;
	uint8 pad1;
	uint8 pad2;
	float32 expand;
	float32 deflection;
};

struct _zEnv : xBase
{
	xEnvAsset* easset;
};

struct iColor_tag
{
	uint8 r;
	uint8 g;
	uint8 b;
	uint8 a;
};

enum zFragType
{
	eFragInactive,
	eFragGroup,
	eFragShrapnel,
	eFragParticle,
	eFragProjectile,
	eFragLightning,
	eFragSound,
	eFragShockwave,
	eFragCount,
	eFragForceSize = 0x7fffffff
};

struct xParabola
{
	xVec3 initPos;
	xVec3 initVel;
	float32 gravity;
	float32 minTime;
	float32 maxTime;
};

struct RwRGBAReal
{
	float32 red;
	float32 green;
	float32 blue;
	float32 alpha;
};

struct _tagEmitLine
{
	xVec3 pos1;
	xVec3 pos2;
	float32 radius;
};

enum en_dupowavmod
{
	NPCP_DUPOWAVE_CONTINUOUS,
	NPCP_DUPOWAVE_DISCREET,
	NPCP_DUPOWAVE_NOMORE,
	NPCP_DUPOWAVE_FORCE = 0x7fffffff
};

struct RwLinkList
{
	RwLLLink link;
};

enum _zPlayerWallJumpState
{
	k_WALLJUMP_NOT,
	k_WALLJUMP_LAUNCH,
	k_WALLJUMP_FLIGHT,
	k_WALLJUMP_LAND
};

int8 buffer[16];
int8 buffer[16];
SMDepot g_smdepot;
int32 g_drawSpawnBounds;
zGlobals globals;
xQCControl xqc_def_ctrl;

void ChildCleanup();
int32 SpawnBeastie(SMNPCStatus* npcstat, SMSPStatus* spstat);
SMNPCStatus* StatForNPC(zNPCCommon* npc);
int32 IsNearbyMover(xBound* bnd, int32 usecyl, xCollis* caller_colrec);
int32 IsSPLZClear(zMovePoint* sp);
SMSPStatus* SelectSP(SMNPCStatus* npcstat);
uint8 Receivable(en_SM_NOTICES note, void* data);
void Notify(en_SM_NOTICES note, void* data);
void UpdateContinuous();
void UpdateDiscreet();
void Timestep(float32 dt);
void MapPreferred();
void Reset();
int32 AddSpawnNPC(zNPCCommon* npc);
int32 AddSpawnPoint(zMovePoint* sp);
void SetWaveMode(en_SM_WAVE_MODE mode, float32 delay, int32 lifemax);
void Subscribe(zNPCCommon* owner);
zNPCSpawner* zNPCSpawner_GetInstance();
void zNPCSpawner_SceneFinish();
void zNPCSpawner_ScenePrepare();
void zNPCSpawner_Shutdown();
void zNPCSpawner_Startup();

void zNPCSpawner::ChildCleanup()
{
	int32 i;
	SMNPCStatus* npc_stat;
	int32 cnt_know;
	int32 cnt_dead;

}

int32 zNPCSpawner::SpawnBeastie(SMNPCStatus* npcstat, SMSPStatus* spstat)
{
	zNPCCommon* npc;
	zMovePoint* sp;
	xVec3 pos_sp;
	zMovePoint* nav_dest;

}

SMNPCStatus* zNPCSpawner::StatForNPC(zNPCCommon* npc)
{
	SMNPCStatus* tmp_stat;
	SMNPCStatus* npc_stat;
	int32 i;

}

int32 zNPCSpawner::IsNearbyMover(xBound* bnd, int32 usecyl, xCollis* caller_colrec)
{
	int32 hitthing;
	zNPCCommon* npc;
	int32 i;
	xCollis local_colrec;
	xCollis* colrec;
	xVec3 delt;

}

int32 zNPCSpawner::IsSPLZClear(zMovePoint* sp)
{
	xVec3 pos_sp;
	int32 rc;
	xBound bnd;
	xVec3 delt;

}

SMSPStatus* zNPCSpawner::SelectSP(SMNPCStatus* npcstat)
{
	int32 rc;
	SMSPStatus* splist[16];
	int32 cnt;
	int32 i;
	SMSPStatus* tmp_stat;
	int32 rc;
	SMSPStatus* sp_stat;

}

uint8 zNPCSpawner::Receivable(en_SM_NOTICES note, void* data)
{

}

void zNPCSpawner::Notify(en_SM_NOTICES note, void* data)
{

}

void zNPCSpawner::UpdateContinuous()
{
	SMSPStatus* spstat;

}

void zNPCSpawner::UpdateDiscreet()
{
	SMSPStatus* spstat;

}

void zNPCSpawner::Timestep(float32 dt)
{

}

void zNPCSpawner::MapPreferred()
{
	int32 i;
	SMNPCStatus* npc_stat;
	zMovePoint* sp;

}

void zNPCSpawner::Reset()
{

}

int32 zNPCSpawner::AddSpawnNPC(zNPCCommon* npc)
{
	int32 ack;
	int32 i;
	SMNPCStatus* npc_stat;

}

int32 zNPCSpawner::AddSpawnPoint(zMovePoint* sp)
{
	SMSPStatus* sp_stat;
	int32 ack;
	int32 i;

}

void zNPCSpawner::SetWaveMode(en_SM_WAVE_MODE mode, float32 delay, int32 lifemax)
{

}

void zNPCSpawner::Subscribe(zNPCCommon* owner)
{

}

zNPCSpawner* zNPCSpawner_GetInstance()
{
	zNPCSpawner* sm;
	zNPCSpawner* sm_tmp;
	SMDepot* depot;
	int32 i;

}

void zNPCSpawner_SceneFinish()
{
	SMDepot* depot;
	int32 i;

}

void zNPCSpawner_ScenePrepare()
{
	SMDepot* depot;
	zNPCSpawner* sm;
	int32 i;

}

void zNPCSpawner_Shutdown()
{

}

void zNPCSpawner_Startup()
{

}
typedef struct xEnvAsset;
typedef struct xEntShadow;
typedef struct xBase;
typedef struct xVec2;
typedef struct RwObjectHasFrame;
typedef struct RpSector;
typedef struct RwTexCoords;
typedef struct RxPipelineNode;
typedef enum en_SM_WAVE_STAT;
typedef struct zNPCSpawner;
typedef struct zNPCCommon;
typedef struct xEnt;
typedef struct xAnimState;
typedef struct RxPipeline;
typedef struct xLightKitLight;
typedef struct xModelBucket;
typedef struct SMDepot;
typedef struct xPsyche;
typedef struct xQCData;
typedef struct RpMeshHeader;
typedef struct anim_coll_data;
typedef struct xFactoryInst;
typedef struct xModelInstance;
typedef struct xBBox;
typedef struct RwResEntry;
typedef struct xUpdateCullEnt;
typedef struct NPCConfig;
typedef struct rxHeapFreeBlock;
typedef struct xVec3;
typedef struct RwRaster;
typedef struct xEntDrive;
typedef struct xEntNPCAsset;
typedef struct RpWorldSector;
typedef struct RxPipelineNodeTopSortData;
typedef struct RwV2d;
typedef struct RpMorphTarget;
typedef enum _tagRumbleType;
typedef struct xGoal;
typedef struct xEntMechData;
typedef enum _zPlayerType;
typedef struct RxNodeDefinition;
typedef struct zMovePoint;
typedef struct xEntMotionSplineData;
typedef struct SMNPCStatus;
typedef struct RpLight;
typedef struct SMSPStatus;
typedef struct rxHeapSuperBlockDescriptor;
typedef struct zFragLightningAsset;
typedef struct xLightKit;
typedef struct iEnv;
typedef struct RxPipelineCluster;
typedef struct xCollis;
typedef struct analog_data;
typedef struct xAnimTransitionList;
typedef struct _tagEmitVolume;
typedef struct xParEmitter;
typedef struct RpWorld;
typedef struct RxPipelineNodeParam;
typedef struct zFragGroup;
typedef struct xAnimTable;
typedef struct xUpdateCullGroup;
typedef struct _zPortal;
typedef struct RxHeap;
typedef struct RwBBox;
typedef struct RwRGBA;
typedef struct zFragInfo;
typedef struct zFrag;
typedef struct xListItem_0;
typedef struct xParEmitterAsset;
typedef struct xAnimTransition;
typedef struct xSpline3;
typedef struct xQuat;
typedef struct xPortalAsset;
typedef struct xParGroup;
typedef struct xGridBound;
typedef struct RwV3d;
typedef struct xEntMotionMPData;
typedef enum en_SM_NPC_STATUS;
typedef struct NPCSndTrax;
typedef struct rxHeapBlockHeader;
typedef struct zCheckPoint;
typedef struct xEntERData;
typedef struct zPlayerGlobals;
typedef struct xParEmitterPropsAsset;
typedef struct xJSPHeader;
typedef struct zLightning;
typedef struct xGroup;
typedef enum en_trantype;
typedef struct RxPipelineRequiresCluster;
typedef struct RwMatrixTag;
typedef struct xMat4x3;
typedef struct RwFrame;
typedef struct RwLLLink;
typedef struct zPlayerCarryInfo;
typedef struct _tagEmitOffsetPoint;
typedef struct zFragParticle;
typedef struct xAnimMultiFileEntry;
typedef struct xQCControl;
typedef struct xAnimActiveEffect;
typedef struct zPlayerSettings;
typedef struct zFragSoundAsset;
typedef struct zEnt;
typedef struct zFragParticleAsset;
typedef struct xMovePoint;
typedef struct xEntCollis;
typedef struct _class_0;
typedef struct xSurface;
typedef struct RpAtomic;
typedef struct xAnimFile;
typedef struct tri_data_0;
typedef struct xCoef;
typedef struct xUpdateCullMgr;
typedef enum en_pendtype;
typedef struct xVec4;
typedef struct xAnimSingle;
typedef struct xMovePointAsset;
typedef struct _class_1;
typedef struct RpVertexNormal;
typedef struct RwSurfaceProperties;
typedef struct xEntMotionMechData;
typedef struct tri_data_1;
typedef struct xLinkAsset;
typedef struct rxReq;
typedef struct xListItem_1;
typedef struct xEntPenData;
typedef struct zShrapnelAsset;
typedef struct xCamera;
typedef struct xScene;
typedef enum RxClusterValidityReq;
typedef enum en_LASSO_STATUS;
typedef struct xModelAssetParam;
typedef struct xPEVCyl;
typedef struct zFragProjectile;
typedef struct RpInterpolator;
typedef struct xAnimMultiFileBase;
typedef struct RwCamera;
typedef struct zFragProjectileAsset;
typedef struct xAnimEffect;
typedef struct zNPCLassoInfo;
typedef struct _tagxRumble;
typedef struct xCoef3;
typedef struct xParInterp;
typedef struct xParSys;
typedef struct _tagxPad;
typedef struct zFragShockwaveAsset;
typedef struct xCurveAsset;
typedef struct xEntOrbitData;
typedef struct zJumpParam;
typedef enum RxNodeDefEditable;
typedef struct _tagLightningLine;
typedef struct xClumpCollBSPTree;
typedef enum RxClusterValid;
typedef struct RyzMemData;
typedef enum zFragLocType;
typedef struct RpPolygon;
typedef struct xRot;
typedef struct zEntHangable;
typedef struct zPlatFMRunTime;
typedef struct xAnimPlay;
typedef struct _class_2;
typedef struct RpMaterialList;
typedef enum en_SM_NOTICES;
typedef struct xFFX;
typedef struct xClumpCollBSPVertInfo;
typedef struct NPCSndQueue;
typedef struct xEntMotion;
typedef struct xClumpCollBSPBranchNode;
typedef struct xPlatformAsset;
typedef struct xPEEntBone;
typedef struct xBound;
typedef struct iFogParams;
typedef struct xPSYNote;
typedef struct xAnimMultiFile;
typedef enum rxEmbeddedPacketState;
typedef struct zCutsceneMgr;
typedef struct xSphere;
typedef struct RpMaterial;
typedef struct xEntMotionAsset;
typedef struct xClumpCollBSPTriangle;
typedef struct xEntAsset;
typedef struct xModelPool;
typedef struct xEntBoulder;
typedef enum _tagPadState;
typedef enum RwCameraProjection;
typedef enum RxClusterForcePresent;
typedef struct zScene;
typedef struct xCylinder;
typedef struct zAssetPickupTable;
typedef struct xGlobals;
typedef struct _tagLightningRot;
typedef struct RpClump;
typedef enum PSY_BRAIN_STATUS;
typedef struct zNPCSettings;
typedef struct RpGeometry;
typedef struct xBox;
typedef enum en_GOALSTATE;
typedef struct RxClusterDefinition;
typedef struct xEntSplineData;
typedef enum en_NPC_SOUND;
typedef struct xNPCBasic;
typedef struct zParEmitter;
typedef struct xPECircle;
typedef struct zFragLightning;
typedef struct xEntMotionPenData;
typedef struct RwSphere;
typedef struct zFragBone;
typedef struct xEntFrame;
typedef struct _class_3;
typedef struct _tagPadAnalog;
typedef struct _class_4;
typedef struct RwTexDictionary;
typedef struct RxOutputSpec;
typedef struct zFragAsset;
typedef struct zPlatform;
typedef struct xEntMPData;
typedef struct _tagLightningZeus;
typedef struct xMat3x3;
typedef struct xEnv;
typedef struct xMemPool;
typedef struct RxClusterRef;
typedef struct xGroupAsset;
typedef struct _tagiPad;
typedef struct xShadowSimplePoly;
typedef struct _tagEmitSphere;
typedef struct RwObject;
typedef struct zFragLocInfo;
typedef struct zLasso;
typedef struct RxIoSpec;
typedef struct RpTriangle;
typedef struct xEntMotionERData;
typedef struct xJSPNodeInfo;
typedef struct zFragSound;
typedef struct RwTexture;
typedef struct RxNodeMethods;
typedef struct xBaseAsset;
typedef struct RwFrustumPlane;
typedef enum en_npcbtyp;
typedef struct _tagEmitRect;
typedef struct xShadowSimpleCache;
typedef struct zGlobals;
typedef struct RwPlane;
typedef struct zFragLocation;
typedef struct xDynAsset;
typedef struct RxCluster;
typedef struct xParEmitterCustomSettings;
typedef struct zGlobalSettings;
typedef struct xModelTag;
typedef enum en_SM_WAVE_MODE;
typedef struct zFragShockwave;
typedef struct RxPacket;
typedef struct zPlayerLassoInfo;
typedef struct st_XORDEREDARRAY;
typedef struct xEntMotionOrbitData;
typedef enum RwFogType;
typedef enum RpWorldRenderOrder;
typedef struct zLedgeGrabParams;
typedef struct xPEEntBound;
typedef struct _zEnv;
typedef struct iColor_tag;
typedef enum zFragType;
typedef struct xParabola;
typedef struct RwRGBAReal;
typedef struct _tagEmitLine;
typedef enum en_dupowavmod;
typedef struct RwLinkList;
typedef enum _zPlayerWallJumpState;

typedef uint32(*type_0)(void*, void*);
typedef RwCamera*(*type_1)(RwCamera*);
typedef void(*type_3)(xAnimPlay*, xAnimState*);
typedef int32(*type_5)(RxPipelineNode*);
typedef RwCamera*(*type_7)(RwCamera*);
typedef void(*type_9)(xAnimState*, xAnimSingle*, void*);
typedef RwObjectHasFrame*(*type_11)(RwObjectHasFrame*);
typedef void(*type_12)(RxPipelineNode*);
typedef void(*type_13)(xAnimPlay*, xQuat*, xVec3*, int32);
typedef void(*type_15)(xEnt*, xVec3*);
typedef RpWorldSector*(*type_18)(RpWorldSector*);
typedef int32(*type_20)(RxPipelineNode*, RxPipeline*);
typedef void(*type_23)(xEnt*, xScene*, float32, xEntCollis*);
typedef uint32(*type_26)(xEnt*, xEnt*, xScene*, float32, xCollis*);
typedef int32(*type_27)(xGoal*, void*, float32, void*);
typedef uint32(*type_31)(RxPipelineNode*, uint32, uint32, void*);
typedef xBase*(*type_33)(uint32);
typedef int32(*type_35)(RxPipelineNode*, RxPipelineNodeParam*);
typedef void(*type_37)(xEnt*, xVec3*, xMat4x3*);
typedef int32(*type_38)(RxNodeDefinition*);
typedef int32(*type_40)(xGoal*, void*, en_trantype*, float32, void*);
typedef int8*(*type_42)(xBase*);
typedef void(*type_43)(RxNodeDefinition*);
typedef int8*(*type_44)(uint32);
typedef int32(*type_47)(xGoal*, void*, en_trantype*, float32, void*);
typedef void(*type_51)(zFrag*, float32);
typedef uint32(*type_52)(uint32, xAnimActiveEffect*, xAnimSingle*, void*);
typedef uint32(*type_66)(xAnimTransition*, xAnimSingle*, void*);
typedef void(*type_69)(void*);
typedef void(*type_77)(xEnt*);
typedef void(*type_84)(xEnt*);
typedef RpClump*(*type_93)(RpClump*, void*);
typedef void(*type_100)(int32*, en_trantype*);
typedef int32(*type_102)(xBase*, xBase*, uint32, float32*, xBase*);
typedef void(*type_107)(zFrag*, zFragAsset*);
typedef void(*type_116)(zShrapnelAsset*, xModelInstance*, xVec3*, void(*)(zFrag*, zFragAsset*));
typedef void(*type_119)(xEnt*, xScene*, float32);
typedef RpAtomic*(*type_121)(RpAtomic*);
typedef void(*type_122)(xEnt*, xScene*, float32, xEntFrame*);
typedef void(*type_123)(xEnt*);
typedef void(*type_125)(xMemPool*, void*);
typedef void(*type_133)(RwResEntry*);

typedef RwTexCoords* type_2[8];
typedef xVec3 type_4[60];
typedef xVec3 type_6[4];
typedef float32 type_8[4];
typedef float32 type_10[4];
typedef float32 type_14[4];
typedef float32 type_16[22];
typedef float32 type_17[22];
typedef SMSPStatus* type_19[16];
typedef xCollis type_21[18];
typedef uint32 type_22[15];
typedef uint32 type_24[15];
typedef zFrag* type_25[21];
typedef RwFrustumPlane type_28[6];
typedef uint32 type_29[2];
typedef uint32 type_30[15];
typedef uint8 type_32[3];
typedef RpLight* type_34[2];
typedef RwV3d type_36[8];
typedef analog_data type_39[2];
typedef RwFrame* type_41[2];
typedef uint8 type_45[3];
typedef xVec3 type_46[16];
typedef uint8 type_48[3];
typedef float32 type_49[4];
typedef xVec3 type_50[16];
typedef float32 type_53[2];
typedef float32 type_54[16];
typedef uint8 type_55[2];
typedef uint8 type_56[2];
typedef uint32 type_57[2];
typedef uint8 type_58[2];
typedef float32 type_59[6];
typedef NPCSndQueue type_60[4];
typedef float32 type_61[2];
typedef uint8 type_62[3];
typedef float32 type_63[2];
typedef xModelInstance* type_64[2];
typedef float32 type_65[3];
typedef float32 type_67[3];
typedef xModelTag type_68[2];
typedef xVec4 type_70[12];
typedef float32 type_71[4];
typedef float32 type_72[3];
typedef uint16 type_73[3];
typedef float32 type_74[12];
typedef uint8 type_75[2];
typedef float32 type_76[12];
typedef xAnimMultiFileEntry type_78[1];
typedef float32 type_79[12];
typedef xGoal* type_80[5];
typedef xEnt* type_81[111];
typedef float32 type_82[12];
typedef float32 type_83[4];
typedef float32 type_85[1];
typedef float32 type_86[16];
typedef float32 type_87[12];
typedef float32 type_88[1][5];
typedef float32 type_89[4];
typedef xModelTag type_90[20];
typedef float32 type_91[12];
typedef xVec3 type_92[9];
typedef uint32 type_94[4];
typedef int32 type_95[5];
typedef int8 type_96[128];
typedef int8 type_97[128][6];
typedef xVec3 type_98[5];
typedef uint8 type_99[2];
typedef xVec3 type_101[2];
typedef RwTexCoords* type_103[8];
typedef uint8 type_104[14];
typedef uint8 type_105[5];
typedef xModelTag type_106[4];
typedef int8 type_108[32];
typedef xModelInstance* type_109[14];
typedef uint8 type_110[4];
typedef int8 type_111[3];
typedef xParInterp type_112[1];
typedef float32 type_113[2];
typedef xVec3 type_114[3];
typedef float32 type_115[2];
typedef uint8 type_117[4];
typedef float32 type_118[2];
typedef uint16 type_120[3];
typedef uint8 type_124[22];
typedef int8 type_126[16];
typedef float32 type_127[16];
typedef xParInterp type_128[4];
typedef int8 type_129[32];
typedef uint8 type_130[22];
typedef int8 type_131[32];
typedef xParInterp type_132[4];
typedef SMSPStatus type_134[16];
typedef int8 type_135[16];
typedef uint32 type_136[72];
typedef int8 type_137[4];
typedef SMNPCStatus type_138[16];
typedef xBase* type_139[72];
typedef uint8 type_140[3];
typedef RxCluster type_141[1];

struct xEnvAsset : xBaseAsset
{
	uint32 bspAssetID;
	uint32 startCameraAssetID;
	uint32 climateFlags;
	float32 climateStrengthMin;
	float32 climateStrengthMax;
	uint32 bspLightKit;
	uint32 objectLightKit;
	float32 padF1;
	uint32 bspCollisionAssetID;
	uint32 bspFXAssetID;
	uint32 bspCameraAssetID;
	uint32 bspMapperID;
	uint32 bspMapperCollisionID;
	uint32 bspMapperFXID;
	float32 loldHeight;
};

struct xEntShadow
{
	xVec3 pos;
	xVec3 vec;
	RpAtomic* shadowModel;
	float32 dst_cast;
	float32 radius[2];
};

struct xBase
{
	uint32 id;
	uint8 baseType;
	uint8 linkCount;
	uint16 baseFlags;
	xLinkAsset* link;
	int32(*eventFunc)(xBase*, xBase*, uint32, float32*, xBase*);
};

struct xVec2
{
	float32 x;
	float32 y;
};

struct RwObjectHasFrame
{
	RwObject object;
	RwLLLink lFrame;
	RwObjectHasFrame*(*sync)(RwObjectHasFrame*);
};

struct RpSector
{
	int32 type;
};

struct RwTexCoords
{
	float32 u;
	float32 v;
};

struct RxPipelineNode
{
	RxNodeDefinition* nodeDef;
	uint32 numOutputs;
	uint32* outputs;
	RxPipelineCluster** slotClusterRefs;
	uint32* slotsContinue;
	void* privateData;
	uint32* inputToClusterSlot;
	RxPipelineNodeTopSortData* topSortData;
	void* initializationData;
	uint32 initializationDataSize;
};

enum en_SM_WAVE_STAT
{
	SM_STAT_BEGIN,
	SM_STAT_INPROG,
	SM_STAT_ABORT,
	SM_STAT_MARKTIME,
	SM_STAT_DONE,
	SM_STAT_NOMORE,
	SM_STAT_FORCE = 0x7fffffff
};

struct zNPCSpawner : RyzMemData
{
	int32 flg_spawner;
	zNPCCommon* npc_owner;
	float32 tym_delay;
	int32 max_spawn;
	en_SM_WAVE_MODE wavemode;
	en_SM_WAVE_STAT wavestat;
	float32 tmr_wave;
	int32 cnt_spawn;
	SMSPStatus sppool[16];
	SMNPCStatus npcpool[16];
	st_XORDEREDARRAY pendlist;
	st_XORDEREDARRAY actvlist;
	int32 cnt_cleanup;

	void ChildCleanup();
	int32 SpawnBeastie(SMNPCStatus* npcstat, SMSPStatus* spstat);
	SMNPCStatus* StatForNPC(zNPCCommon* npc);
	int32 IsSPLZClear(zMovePoint* sp);
	SMSPStatus* SelectSP(SMNPCStatus* npcstat);
	uint8 Receivable(en_SM_NOTICES note, void* data);
	void Notify(en_SM_NOTICES note, void* data);
	void UpdateContinuous();
	void UpdateDiscreet();
	void Timestep(float32 dt);
	void MapPreferred();
	void Reset();
	int32 AddSpawnNPC(zNPCCommon* npc);
	int32 AddSpawnPoint(zMovePoint* sp);
	void SetWaveMode(en_SM_WAVE_MODE mode, float32 delay, int32 lifemax);
	void Subscribe(zNPCCommon* owner);
};

struct zNPCCommon : xNPCBasic
{
	xEntAsset* entass;
	xEntNPCAsset* npcass;
	zNPCSettings* npcsetass;
	int32 flg_vuln;
	int32 flg_move;
	int32 flg_misc;
	int32 flg_able;
	NPCConfig* cfg_npc;
	zNPCSettings npcset;
	zMovePoint* nav_past;
	zMovePoint* nav_curr;
	zMovePoint* nav_dest;
	zMovePoint* nav_lead;
	xSpline3* spl_mvptspline;
	float32 len_mvptspline;
	float32 dst_curspline;
	xEntDrive* drv_data;
	xPsyche* psy_instinct;
	zNPCCommon* npc_duplodude;
	float32 spd_throttle;
	int32 flg_xtrarend;
	float32 tmr_fidget;
	float32 tmr_invuln;
	zShrapnelAsset* explosion;
	xModelAssetParam* parmdata;
	uint32 pdatsize;
	zNPCLassoInfo* lassdata;
	NPCSndQueue snd_queue[4];
};

struct xEnt : xBase
{
	xEntAsset* asset;
	uint16 idx;
	uint16 num_updates;
	uint8 flags;
	uint8 miscflags;
	uint8 subType;
	uint8 pflags;
	uint8 moreFlags;
	uint8 isCulled;
	uint8 driving_count;
	uint8 num_ffx;
	uint8 collType;
	uint8 collLev;
	uint8 chkby;
	uint8 penby;
	xModelInstance* model;
	xModelInstance* collModel;
	xModelInstance* camcollModel;
	xLightKit* lightKit;
	void(*update)(xEnt*, xScene*, float32);
	void(*endUpdate)(xEnt*, xScene*, float32);
	void(*bupdate)(xEnt*, xVec3*);
	void(*move)(xEnt*, xScene*, float32, xEntFrame*);
	void(*render)(xEnt*);
	xEntFrame* frame;
	xEntCollis* collis;
	xGridBound gridb;
	xBound bound;
	void(*transl)(xEnt*, xVec3*, xMat4x3*);
	xFFX* ffx;
	xEnt* driver;
	int32 driveMode;
	xShadowSimpleCache* simpShadow;
	xEntShadow* entShadow;
	anim_coll_data* anim_coll;
	void* user_data;
};

struct xAnimState
{
	xAnimState* Next;
	int8* Name;
	uint32 ID;
	uint32 Flags;
	uint32 UserFlags;
	float32 Speed;
	xAnimFile* Data;
	xAnimEffect* Effects;
	xAnimTransitionList* Default;
	xAnimTransitionList* List;
	float32* BoneBlend;
	float32* TimeSnap;
	float32 FadeRecip;
	uint16* FadeOffset;
	void* CallbackData;
	xAnimMultiFile* MultiFile;
	void(*BeforeEnter)(xAnimPlay*, xAnimState*);
	void(*StateCallback)(xAnimState*, xAnimSingle*, void*);
	void(*BeforeAnimMatrices)(xAnimPlay*, xQuat*, xVec3*, int32);
};

struct RxPipeline
{
	int32 locked;
	uint32 numNodes;
	RxPipelineNode* nodes;
	uint32 packetNumClusterSlots;
	rxEmbeddedPacketState embeddedPacketState;
	RxPacket* embeddedPacket;
	uint32 numInputRequirements;
	RxPipelineRequiresCluster* inputRequirements;
	void* superBlock;
	uint32 superBlockSize;
	uint32 entryPoint;
	uint32 pluginId;
	uint32 pluginData;
};

struct xLightKitLight
{
	uint32 type;
	RwRGBAReal color;
	float32 matrix[16];
	float32 radius;
	float32 angle;
	RpLight* platLight;
};

struct xModelBucket
{
	RpAtomic* Data;
	RpAtomic* OriginalData;
	xModelInstance* List;
	int32 ClipFlags;
	uint32 PipeFlags;
};

struct SMDepot
{
	st_XORDEREDARRAY spawners;
};

struct xPsyche : RyzMemData
{
	xBase* clt_owner;
	xPSYNote* cb_notice;
	int32 flg_psyche;
	xGoal* goallist;
	xGoal* goalstak[5];
	float32 tmr_stack[1][5];
	int32 staktop;
	xGoal* pendgoal;
	en_pendtype pendtype;
	int32 gid_safegoal;
	void(*fun_remap)(int32*, en_trantype*);
	void* userContext;
	int32 cnt_transLastTimestep;
	PSY_BRAIN_STATUS psystat;
	xBase fakebase;
};

struct xQCData
{
	int8 xmin;
	int8 ymin;
	int8 zmin;
	int8 zmin_dup;
	int8 xmax;
	int8 ymax;
	int8 zmax;
	int8 zmax_dup;
	xVec3 min;
	xVec3 max;
};

struct RpMeshHeader
{
	uint32 flags;
	uint16 numMeshes;
	uint16 serialNum;
	uint32 totalIndicesInMesh;
	uint32 firstMeshOffset;
};

struct anim_coll_data
{
};

struct xFactoryInst : RyzMemData
{
	int32 itemType;
	xFactoryInst* nextprod;
	xFactoryInst* prevprod;
};

struct xModelInstance
{
	xModelInstance* Next;
	xModelInstance* Parent;
	xModelPool* Pool;
	xAnimPlay* Anim;
	RpAtomic* Data;
	uint32 PipeFlags;
	float32 RedMultiplier;
	float32 GreenMultiplier;
	float32 BlueMultiplier;
	float32 Alpha;
	float32 FadeStart;
	float32 FadeEnd;
	xSurface* Surf;
	xModelBucket** Bucket;
	xModelInstance* BucketNext;
	xLightKit* LightKit;
	void* Object;
	uint16 Flags;
	uint8 BoneCount;
	uint8 BoneIndex;
	uint8* BoneRemap;
	RwMatrixTag* Mat;
	xVec3 Scale;
	uint32 modelID;
	uint32 shadowID;
	RpAtomic* shadowmapAtomic;
	_class_1 anim_coll;
};

struct xBBox
{
	xVec3 center;
	xBox box;
};

struct RwResEntry
{
	RwLLLink link;
	int32 size;
	void* owner;
	RwResEntry** ownerRef;
	void(*destroyNotify)(RwResEntry*);
};

struct xUpdateCullEnt
{
	uint16 index;
	int16 groupIndex;
	uint32(*cb)(void*, void*);
	void* cbdata;
	xUpdateCullEnt* nextInGroup;
};

struct NPCConfig : xListItem_0
{
	uint32 modelID;
	int32 flg_config;
	float32 spd_turnMax;
	float32 spd_moveMax;
	float32 fac_accelMax;
	float32 fac_driftMax;
	float32 fac_gravKnock;
	float32 fac_elastic;
	int32 pts_damage;
	int32 useBoxBound;
	xVec3 off_bound;
	xVec3 dim_bound;
	float32 npcMass;
	float32 npcMassInv;
	float32 rad_detect;
	float32 hyt_detect;
	float32 off_detect;
	float32 rad_attack;
	float32 fov_attack;
	xVec3 scl_model;
	float32 tym_attack;
	float32 tym_fidget;
	float32 tym_stun;
	float32 tym_alert;
	float32 dst_castShadow;
	float32 rad_shadowCache;
	float32 rad_shadowRaster;
	float32 rad_dmgSize;
	int32 flg_vert;
	xModelTag tag_vert[20];
	xVec3 animFrameRange[9];
	int32 cnt_esteem[5];
	float32 rad_sound;
	NPCSndTrax* snd_trax;
	NPCSndTrax* snd_traxShare;
	int32 test_count;
	uint8 talk_filter[4];
	uint8 talk_filter_size;
};

struct rxHeapFreeBlock
{
	uint32 size;
	rxHeapBlockHeader* ptr;
};

struct xVec3
{
	float32 x;
	float32 y;
	float32 z;
};

struct RwRaster
{
	RwRaster* parent;
	uint8* cpPixels;
	uint8* palette;
	int32 width;
	int32 height;
	int32 depth;
	int32 stride;
	int16 nOffsetX;
	int16 nOffsetY;
	uint8 cType;
	uint8 cFlags;
	uint8 privateFlags;
	uint8 cFormat;
	uint8* originalPixels;
	int32 originalWidth;
	int32 originalHeight;
	int32 originalStride;
};

struct xEntDrive
{
	uint32 flags;
	float32 otm;
	float32 otmr;
	float32 os;
	float32 tm;
	float32 tmr;
	float32 s;
	xEnt* odriver;
	xEnt* driver;
	xEnt* driven;
	xVec3 op;
	xVec3 p;
	xVec3 q;
	float32 yaw;
	xVec3 dloc;
	tri_data_0 tri;
};

struct xEntNPCAsset
{
	int32 npcFlags;
	int32 npcModel;
	int32 npcProps;
	uint32 movepoint;
	uint32 taskWidgetPrime;
	uint32 taskWidgetSecond;
};

struct RpWorldSector
{
	int32 type;
	RpPolygon* polygons;
	RwV3d* vertices;
	RpVertexNormal* normals;
	RwTexCoords* texCoords[8];
	RwRGBA* preLitLum;
	RwResEntry* repEntry;
	RwLinkList collAtomicsInWorldSector;
	RwLinkList noCollAtomicsInWorldSector;
	RwLinkList lightsInWorldSector;
	RwBBox boundingBox;
	RwBBox tightBoundingBox;
	RpMeshHeader* mesh;
	RxPipeline* pipeline;
	uint16 matListWindowBase;
	uint16 numVertices;
	uint16 numPolygons;
	uint16 pad;
};

struct RxPipelineNodeTopSortData
{
	uint32 numIns;
	uint32 numInsVisited;
	rxReq* req;
};

struct RwV2d
{
	float32 x;
	float32 y;
};

struct RpMorphTarget
{
	RpGeometry* parentGeom;
	RwSphere boundingSphere;
	RwV3d* verts;
	RwV3d* normals;
};

enum _tagRumbleType
{
	eRumble_Off,
	eRumble_Hi,
	eRumble_VeryLightHi,
	eRumble_VeryLight,
	eRumble_LightHi,
	eRumble_Light,
	eRumble_MediumHi,
	eRumble_Medium,
	eRumble_HeavyHi,
	eRumble_Heavy,
	eRumble_VeryHeavyHi,
	eRumble_VeryHeavy,
	eRumble_Total,
	eRumbleForceU32 = 0x7fffffff
};

struct xGoal : xListItem_1, xFactoryInst
{
	xPsyche* psyche;
	int32 goalID;
	en_GOALSTATE stat;
	int32 flg_able;
	int32(*fun_process)(xGoal*, void*, en_trantype*, float32, void*);
	int32(*fun_precalc)(xGoal*, void*, float32, void*);
	int32(*fun_chkRule)(xGoal*, void*, en_trantype*, float32, void*);
	void* cbdata;
};

struct xEntMechData
{
	xVec3 apos;
	xVec3 bpos;
	xVec3 dir;
	float32 arot;
	float32 brot;
	float32 ss;
	float32 sr;
	int32 state;
	float32 tsfd;
	float32 trfd;
	float32 tsbd;
	float32 trbd;
	float32* rotptr;
};

enum _zPlayerType
{
	ePlayer_SB,
	ePlayer_Patrick,
	ePlayer_Sandy,
	ePlayer_MAXTYPES
};

struct RxNodeDefinition
{
	int8* name;
	RxNodeMethods nodeMethods;
	RxIoSpec io;
	uint32 pipelineNodePrivateDataSize;
	RxNodeDefEditable editable;
	int32 InputPipesCnt;
};

struct zMovePoint : xMovePoint
{
};

struct xEntMotionSplineData
{
	int32 unknown;
};

struct SMNPCStatus
{
	zNPCCommon* npc;
	en_SM_NPC_STATUS status;
	zMovePoint* sp_prefer;
};

struct RpLight
{
	RwObjectHasFrame object;
	float32 radius;
	RwRGBAReal color;
	float32 minusCosAngle;
	RwLinkList WorldSectorsInLight;
	RwLLLink inWorld;
	uint16 lightFrame;
	uint16 pad;
};

struct SMSPStatus
{
	zMovePoint* sp;
	int32 flg_stat;
	zNPCCommon* npc_prefer;
};

struct rxHeapSuperBlockDescriptor
{
	void* start;
	uint32 size;
	rxHeapSuperBlockDescriptor* next;
};

struct zFragLightningAsset : zFragAsset
{
	zFragLocation start;
	zFragLocation end;
	uint32 startParentID;
	uint32 endParentID;
};

struct xLightKit
{
	uint32 tagID;
	uint32 groupID;
	uint32 lightCount;
	xLightKitLight* lightList;
};

struct iEnv
{
	RpWorld* world;
	RpWorld* collision;
	RpWorld* fx;
	RpWorld* camera;
	xJSPHeader* jsp;
	RpLight* light[2];
	RwFrame* light_frame[2];
	int32 memlvl;
};

struct RxPipelineCluster
{
	RxClusterDefinition* clusterRef;
	uint32 creationAttributes;
};

struct xCollis
{
	uint32 flags;
	uint32 oid;
	void* optr;
	xModelInstance* mptr;
	float32 dist;
	xVec3 norm;
	xVec3 tohit;
	xVec3 depen;
	xVec3 hdng;
	union
	{
		_class_2 tuv;
		tri_data_1 tri;
	};
};

struct analog_data
{
	xVec2 offset;
	xVec2 dir;
	float32 mag;
	float32 ang;
};

struct xAnimTransitionList
{
	xAnimTransitionList* Next;
	xAnimTransition* T;
};

struct _tagEmitVolume
{
	uint32 emit_volumeID;
};

struct xParEmitter : xBase
{
	xParEmitterAsset* tasset;
	xParGroup* group;
	xParEmitterPropsAsset* prop;
	uint8 rate_mode;
	float32 rate;
	float32 rate_time;
	float32 rate_fraction;
	float32 rate_fraction_cull;
	uint8 emit_flags;
	uint8 emit_pad[3];
	uint8 rot[3];
	xModelTag tag;
	float32 oocull_distance_sqr;
	float32 distance_to_cull_sqr;
	void* attachTo;
	xParSys* parSys;
	void* emit_volume;
	xVec3 last_attach_loc;
};

struct RpWorld
{
	RwObject object;
	uint32 flags;
	RpWorldRenderOrder renderOrder;
	RpMaterialList matList;
	RpSector* rootSector;
	int32 numTexCoordSets;
	int32 numClumpsInWorld;
	RwLLLink* currentClumpLink;
	RwLinkList clumpList;
	RwLinkList lightList;
	RwLinkList directionalLightList;
	RwV3d worldOrigin;
	RwBBox boundingBox;
	RpWorldSector*(*renderCallBack)(RpWorldSector*);
	RxPipeline* pipeline;
};

struct RxPipelineNodeParam
{
	void* dataParam;
	RxHeap* heap;
};

struct zFragGroup
{
	zFrag* list[21];
};

struct xAnimTable
{
	xAnimTable* Next;
	int8* Name;
	xAnimTransition* TransitionList;
	xAnimState* StateList;
	uint32 AnimIndex;
	uint32 MorphIndex;
	uint32 UserFlags;
};

struct xUpdateCullGroup
{
	uint32 active;
	uint16 startIndex;
	uint16 endIndex;
	xGroup* groupObject;
};

struct _zPortal : xBase
{
	xPortalAsset* passet;
};

struct RxHeap
{
	uint32 superBlockSize;
	rxHeapSuperBlockDescriptor* head;
	rxHeapBlockHeader* headBlock;
	rxHeapFreeBlock* freeBlocks;
	uint32 entriesAlloced;
	uint32 entriesUsed;
	int32 dirty;
};

struct RwBBox
{
	RwV3d sup;
	RwV3d inf;
};

struct RwRGBA
{
	uint8 red;
	uint8 green;
	uint8 blue;
	uint8 alpha;
};

struct zFragInfo
{
	union
	{
		zFragGroup group;
		zFragParticle particle;
		zFragProjectile projectile;
		zFragLightning lightning;
		zFragSound sound;
		zFragShockwave shockwave;
	};
};

struct zFrag
{
	zFragType type;
	zFragInfo info;
	float32 delay;
	float32 alivetime;
	float32 lifetime;
	void(*update)(zFrag*, float32);
	xModelInstance* parent[2];
	zFrag* prev;
	zFrag* next;
};

struct xListItem_0
{
	int32 flg_travFilter;
	NPCConfig* next;
	NPCConfig* prev;
};

struct xParEmitterAsset : xBaseAsset
{
	uint8 emit_flags;
	uint8 emit_type;
	uint16 pad;
	uint32 propID;
	union
	{
		xPECircle e_circle;
		_tagEmitSphere e_sphere;
		_tagEmitRect e_rect;
		_tagEmitLine e_line;
		_tagEmitVolume e_volume;
		_tagEmitOffsetPoint e_offsetp;
		xPEVCyl e_vcyl;
		xPEEntBone e_entbone;
		xPEEntBound e_entbound;
	};
	uint32 attachToID;
	xVec3 pos;
	xVec3 vel;
	float32 vel_angle_variation;
	uint32 cull_mode;
	float32 cull_dist_sqr;
};

struct xAnimTransition
{
	xAnimTransition* Next;
	xAnimState* Dest;
	uint32(*Conditional)(xAnimTransition*, xAnimSingle*, void*);
	uint32(*Callback)(xAnimTransition*, xAnimSingle*, void*);
	uint32 Flags;
	uint32 UserFlags;
	float32 SrcTime;
	float32 DestTime;
	uint16 Priority;
	uint16 QueuePriority;
	float32 BlendRecip;
	uint16* BlendOffset;
};

struct xSpline3
{
	uint16 type;
	uint16 flags;
	uint32 N;
	uint32 allocN;
	xVec3* points;
	float32* time;
	xVec3* p12;
	xVec3* bctrl;
	float32* knot;
	xCoef3* coef;
	uint32 arcSample;
	float32* arcLength;
};

struct xQuat
{
	xVec3 v;
	float32 s;
};

struct xPortalAsset : xBaseAsset
{
	uint32 assetCameraID;
	uint32 assetMarkerID;
	float32 ang;
	uint32 sceneID;
};

struct xParGroup
{
};

struct xGridBound
{
	void* data;
	uint16 gx;
	uint16 gz;
	uint8 ingrid;
	uint8 oversize;
	uint8 deleted;
	uint8 gpad;
	xGridBound** head;
	xGridBound* next;
};

struct RwV3d
{
	float32 x;
	float32 y;
	float32 z;
};

struct xEntMotionMPData
{
	uint32 flags;
	uint32 mp_id;
	float32 speed;
};

enum en_SM_NPC_STATUS
{
	SM_NPC_DEAD,
	SM_NPC_READY,
	SM_NPC_PENDING,
	SM_NPC_SPAWNED,
	SM_NPC_ACTIVE,
	SM_NPC_NOMORE,
	SM_NPC_FORCE = 0x7fffffff
};

struct NPCSndTrax
{
	en_NPC_SOUND typ_sound;
	int8* nam_sound;
	uint32 aid_sound;
};

struct rxHeapBlockHeader
{
	rxHeapBlockHeader* prev;
	rxHeapBlockHeader* next;
	uint32 size;
	rxHeapFreeBlock* freeEntry;
	uint32 pad[4];
};

struct zCheckPoint
{
	xVec3 pos;
	float32 rot;
	uint32 initCamID;
};

struct xEntERData
{
	xVec3 a;
	xVec3 b;
	xVec3 dir;
	float32 et;
	float32 wet;
	float32 rt;
	float32 wrt;
	float32 p;
	float32 brt;
	float32 ert;
	int32 state;
};

struct zPlayerGlobals
{
	zEnt ent;
	xEntShadow entShadow_embedded;
	xShadowSimpleCache simpShadow_embedded;
	zGlobalSettings g;
	zPlayerSettings* s;
	zPlayerSettings sb;
	zPlayerSettings patrick;
	zPlayerSettings sandy;
	xModelInstance* model_spongebob;
	xModelInstance* model_patrick;
	xModelInstance* model_sandy;
	uint32 Visible;
	uint32 Health;
	int32 Speed;
	float32 SpeedMult;
	int32 Sneak;
	int32 Teeter;
	float32 SlipFadeTimer;
	int32 Slide;
	float32 SlideTimer;
	int32 Stepping;
	int32 JumpState;
	int32 LastJumpState;
	float32 JumpTimer;
	float32 LookAroundTimer;
	uint32 LookAroundRand;
	uint32 LastProjectile;
	float32 DecelRun;
	float32 DecelRunSpeed;
	float32 HotsauceTimer;
	float32 LeanLerp;
	float32 ScareTimer;
	xBase* ScareSource;
	float32 CowerTimer;
	float32 DamageTimer;
	float32 SundaeTimer;
	float32 ControlOffTimer;
	float32 HelmetTimer;
	uint32 WorldDisguise;
	uint32 Bounced;
	float32 FallDeathTimer;
	float32 HeadbuttVel;
	float32 HeadbuttTimer;
	uint32 SpecialReceived;
	xEnt* MountChimney;
	float32 MountChimOldY;
	uint32 MaxHealth;
	uint32 DoMeleeCheck;
	float32 VictoryTimer;
	float32 BadGuyNearTimer;
	float32 ForceSlipperyTimer;
	float32 ForceSlipperyFriction;
	float32 ShockRadius;
	float32 ShockRadiusOld;
	float32 Face_ScareTimer;
	uint32 Face_ScareRandom;
	uint32 Face_Event;
	float32 Face_EventTimer;
	float32 Face_PantTimer;
	uint32 Face_AnimSpecific;
	uint32 IdleRand;
	float32 IdleMinorTimer;
	float32 IdleMajorTimer;
	float32 IdleSitTimer;
	int32 Transparent;
	zEnt* FireTarget;
	uint32 ControlOff;
	uint32 ControlOnEvent;
	uint32 AutoMoveSpeed;
	float32 AutoMoveDist;
	xVec3 AutoMoveTarget;
	xBase* AutoMoveObject;
	zEnt* Diggable;
	float32 DigTimer;
	zPlayerCarryInfo carry;
	zPlayerLassoInfo lassoInfo;
	xModelTag BubbleWandTag[2];
	xModelInstance* model_wand;
	xEntBoulder* bubblebowl;
	float32 bbowlInitVel;
	zEntHangable* HangFound;
	zEntHangable* HangEnt;
	zEntHangable* HangEntLast;
	xVec3 HangPivot;
	xVec3 HangVel;
	float32 HangLength;
	xVec3 HangStartPos;
	float32 HangStartLerp;
	xModelTag HangPawTag[4];
	float32 HangPawOffset;
	float32 HangElapsed;
	float32 Jump_CurrGravity;
	float32 Jump_HoldTimer;
	float32 Jump_ChangeTimer;
	int32 Jump_CanDouble;
	int32 Jump_CanFloat;
	int32 Jump_SpringboardStart;
	zPlatform* Jump_Springboard;
	int32 CanJump;
	int32 CanBubbleSpin;
	int32 CanBubbleBounce;
	int32 CanBubbleBash;
	int32 IsJumping;
	int32 IsDJumping;
	int32 IsBubbleSpinning;
	int32 IsBubbleBouncing;
	int32 IsBubbleBashing;
	int32 IsBubbleBowling;
	int32 WasDJumping;
	int32 IsCoptering;
	_zPlayerWallJumpState WallJumpState;
	int32 cheat_mode;
	uint32 Inv_Shiny;
	uint32 Inv_Spatula;
	uint32 Inv_PatsSock[15];
	uint32 Inv_PatsSock_Max[15];
	uint32 Inv_PatsSock_CurrentLevel;
	uint32 Inv_LevelPickups[15];
	uint32 Inv_LevelPickups_CurrentLevel;
	uint32 Inv_PatsSock_Total;
	xModelTag BubbleTag;
	xEntDrive drv;
	xSurface* floor_surf;
	xVec3 floor_norm;
	int32 slope;
	xCollis earc_coll;
	xSphere head_sph;
	xModelTag center_tag;
	xModelTag head_tag;
	uint32 TongueFlags[2];
	xVec3 RootUp;
	xVec3 RootUpTarget;
	zCheckPoint cp;
	uint32 SlideTrackSliding;
	uint32 SlideTrackCount;
	xEnt* SlideTrackEnt[111];
	uint32 SlideNotGroundedSinceSlide;
	xVec3 SlideTrackDir;
	xVec3 SlideTrackVel;
	float32 SlideTrackDecay;
	float32 SlideTrackLean;
	float32 SlideTrackLand;
	uint8 sb_model_indices[14];
	xModelInstance* sb_models[14];
	uint32 currentPlayer;
	xVec3 PredictRotate;
	xVec3 PredictTranslate;
	float32 PredictAngV;
	xVec3 PredictCurrDir;
	float32 PredictCurrVel;
	float32 KnockBackTimer;
	float32 KnockIntoAirTimer;
};

struct xParEmitterPropsAsset : xBaseAsset
{
	uint32 parSysID;
	union
	{
		xParInterp rate;
		xParInterp value[1];
	};
	xParInterp life;
	xParInterp size_birth;
	xParInterp size_death;
	xParInterp color_birth[4];
	xParInterp color_death[4];
	xParInterp vel_scale;
	xParInterp vel_angle;
	xVec3 vel;
	uint32 emit_limit;
	float32 emit_limit_reset_time;
};

struct xJSPHeader
{
	int8 idtag[4];
	uint32 version;
	uint32 jspNodeCount;
	RpClump* clump;
	xClumpCollBSPTree* colltree;
	xJSPNodeInfo* jspNodeList;
};

struct zLightning
{
	uint32 type;
	uint32 flags;
	union
	{
		_class_0 legacy;
		_class_3 func;
	};
	iColor_tag color;
	float32 time_left;
	float32 time_total;
};

struct xGroup : xBase
{
	xGroupAsset* asset;
	xBase** item;
	uint32 last_index;
	int32 flg_group;
};

enum en_trantype
{
	GOAL_TRAN_NONE,
	GOAL_TRAN_SET,
	GOAL_TRAN_PUSH,
	GOAL_TRAN_POP,
	GOAL_TRAN_POPTO,
	GOAL_TRAN_POPALL,
	GOAL_TRAN_POPBASE,
	GOAL_TRAN_POPSAFE,
	GOAL_TRAN_SWAP,
	GOAL_TRAN_NOMORE,
	GOAL_TRAN_FORCE = 0x7fffffff
};

struct RxPipelineRequiresCluster
{
	RxClusterDefinition* clusterDef;
	RxClusterValidityReq rqdOrOpt;
	uint32 slotIndex;
};

struct RwMatrixTag
{
	RwV3d right;
	uint32 flags;
	RwV3d up;
	uint32 pad1;
	RwV3d at;
	uint32 pad2;
	RwV3d pos;
	uint32 pad3;
};

struct xMat4x3 : xMat3x3
{
	xVec3 pos;
	uint32 pad3;
};

struct RwFrame
{
	RwObject object;
	RwLLLink inDirtyListLink;
	RwMatrixTag modelling;
	RwMatrixTag ltm;
	RwLinkList objectList;
	RwFrame* child;
	RwFrame* next;
	RwFrame* root;
};

struct RwLLLink
{
	RwLLLink* next;
	RwLLLink* prev;
};

struct zPlayerCarryInfo
{
	xEnt* grabbed;
	uint32 grabbedModelID;
	xMat4x3 spin;
	xEnt* throwTarget;
	xEnt* flyingToTarget;
	float32 minDist;
	float32 maxDist;
	float32 minHeight;
	float32 maxHeight;
	float32 maxCosAngle;
	float32 throwMinDist;
	float32 throwMaxDist;
	float32 throwMinHeight;
	float32 throwMaxHeight;
	float32 throwMaxStack;
	float32 throwMaxCosAngle;
	float32 throwTargetRotRate;
	float32 targetRot;
	uint32 grabTarget;
	xVec3 grabOffset;
	float32 grabLerpMin;
	float32 grabLerpMax;
	float32 grabLerpLast;
	uint32 grabYclear;
	float32 throwGravity;
	float32 throwHeight;
	float32 throwDistance;
	float32 fruitFloorDecayMin;
	float32 fruitFloorDecayMax;
	float32 fruitFloorBounce;
	float32 fruitFloorFriction;
	float32 fruitCeilingBounce;
	float32 fruitWallBounce;
	float32 fruitLifetime;
	xEnt* patLauncher;
};

struct _tagEmitOffsetPoint
{
	xVec3 offset;
};

struct zFragParticle
{
	zFragParticleAsset* fasset;
};

struct xAnimMultiFileEntry
{
	uint32 ID;
	xAnimFile* File;
};

struct xQCControl
{
	float32 world_xmin;
	float32 world_ymin;
	float32 world_zmin;
	float32 world_xmax;
	float32 world_ymax;
	float32 world_zmax;
	float32 world_xsz;
	float32 world_ysz;
	float32 world_zsz;
	float32 scale_x;
	float32 scale_y;
	float32 scale_z;
	float32 center_x;
	float32 center_y;
	float32 center_z;
};

struct xAnimActiveEffect
{
	xAnimEffect* Effect;
	uint32 Handle;
};

struct zPlayerSettings
{
	_zPlayerType pcType;
	float32 MoveSpeed[6];
	float32 AnimSneak[3];
	float32 AnimWalk[3];
	float32 AnimRun[3];
	float32 JumpGravity;
	float32 GravSmooth;
	float32 FloatSpeed;
	float32 ButtsmashSpeed;
	zJumpParam Jump;
	zJumpParam Bounce;
	zJumpParam Spring;
	zJumpParam Wall;
	zJumpParam Double;
	zJumpParam SlideDouble;
	zJumpParam SlideJump;
	float32 WallJumpVelocity;
	zLedgeGrabParams ledge;
	float32 spin_damp_xz;
	float32 spin_damp_y;
	uint8 talk_anims;
	uint8 talk_filter_size;
	uint8 talk_filter[4];
};

struct zFragSoundAsset : zFragAsset
{
	uint32 assetID;
	zFragLocation source;
	float32 volume;
	float32 innerRadius;
	float32 outerRadius;
};

struct zEnt : xEnt
{
	xAnimTable* atbl;
};

struct zFragParticleAsset : zFragAsset
{
	zFragLocation source;
	zFragLocation vel;
	xParEmitterCustomSettings emit;
	uint32 parEmitterID;
	zParEmitter* parEmitter;
};

struct xMovePoint : xBase
{
	xMovePointAsset* asset;
	xVec3* pos;
	xMovePoint** nodes;
	xMovePoint* prev;
	uint32 node_wt_sum;
	uint8 on;
	uint8 pad[2];
	float32 delay;
	xSpline3* spl;
};

struct xEntCollis
{
	uint8 chk;
	uint8 pen;
	uint8 env_sidx;
	uint8 env_eidx;
	uint8 npc_sidx;
	uint8 npc_eidx;
	uint8 dyn_sidx;
	uint8 dyn_eidx;
	uint8 stat_sidx;
	uint8 stat_eidx;
	uint8 idx;
	xCollis colls[18];
	void(*post)(xEnt*, xScene*, float32, xEntCollis*);
	uint32(*depenq)(xEnt*, xEnt*, xScene*, float32, xCollis*);
};

struct _class_0
{
	xVec3 base_point[16];
	xVec3 point[16];
	int16 total_points;
	int16 end_points;
	float32 arc_height;
	xVec3 arc_normal;
	float32 thickness[16];
	union
	{
		_tagLightningLine line;
		_tagLightningRot rot;
		_tagLightningZeus zeus;
	};
	float32 rand_radius;
};

struct xSurface : xBase
{
	uint32 idx;
	uint32 type;
	union
	{
		uint32 mat_idx;
		xEnt* ent;
		void* obj;
	};
	float32 friction;
	uint8 state;
	uint8 pad[3];
	void* moprops;
};

struct RpAtomic
{
	RwObjectHasFrame object;
	RwResEntry* repEntry;
	RpGeometry* geometry;
	RwSphere boundingSphere;
	RwSphere worldBoundingSphere;
	RpClump* clump;
	RwLLLink inClumpLink;
	RpAtomic*(*renderCallBack)(RpAtomic*);
	RpInterpolator interpolator;
	uint16 renderFrame;
	uint16 pad;
	RwLinkList llWorldSectorsInAtomic;
	RxPipeline* pipeline;
};

struct xAnimFile
{
	xAnimFile* Next;
	int8* Name;
	uint32 ID;
	uint32 FileFlags;
	float32 Duration;
	float32 TimeOffset;
	uint16 BoneCount;
	uint8 NumAnims[2];
	void** RawData;
};

struct tri_data_0 : tri_data_1
{
	xVec3 loc;
	float32 yaw;
	xCollis* coll;
};

struct xCoef
{
	float32 a[4];
};

struct xUpdateCullMgr
{
	uint32 entCount;
	uint32 entActive;
	void** ent;
	xUpdateCullEnt** mgr;
	uint32 mgrCount;
	uint32 mgrCurr;
	xUpdateCullEnt* mgrList;
	uint32 grpCount;
	xUpdateCullGroup* grpList;
	void(*activateCB)(void*);
	void(*deactivateCB)(void*);
};

enum en_pendtype
{
	PEND_TRAN_NONE,
	PEND_TRAN_SET,
	PEND_TRAN_PUSH,
	PEND_TRAN_POP,
	PEND_TRAN_POPTO,
	PEND_TRAN_POPALL,
	PEND_TRAN_SWAP,
	PEND_TRAN_INPROG,
	PEND_TRAN_NOMORE
};

struct xVec4
{
	float32 x;
	float32 y;
	float32 z;
	float32 w;
};

struct xAnimSingle
{
	uint32 SingleFlags;
	xAnimState* State;
	float32 Time;
	float32 CurrentSpeed;
	float32 BilinearLerp[2];
	xAnimEffect* Effect;
	uint32 ActiveCount;
	float32 LastTime;
	xAnimActiveEffect* ActiveList;
	xAnimPlay* Play;
	xAnimTransition* Sync;
	xAnimTransition* Tran;
	xAnimSingle* Blend;
	float32 BlendFactor;
	uint32 pad;
};

struct xMovePointAsset : xBaseAsset
{
	xVec3 pos;
	uint16 wt;
	uint8 on;
	uint8 bezIndex;
	uint8 flg_props;
	uint8 pad;
	uint16 numPoints;
	float32 delay;
	float32 zoneRadius;
	float32 arenaRadius;
};

struct _class_1
{
	xVec3* verts;
};

struct RpVertexNormal
{
	int8 x;
	int8 y;
	int8 z;
	uint8 pad;
};

struct RwSurfaceProperties
{
	float32 ambient;
	float32 specular;
	float32 diffuse;
};

struct xEntMotionMechData
{
	uint8 type;
	uint8 flags;
	uint8 sld_axis;
	uint8 rot_axis;
	float32 sld_dist;
	float32 sld_tm;
	float32 sld_acc_tm;
	float32 sld_dec_tm;
	float32 rot_dist;
	float32 rot_tm;
	float32 rot_acc_tm;
	float32 rot_dec_tm;
	float32 ret_delay;
	float32 post_ret_delay;
};

struct tri_data_1
{
	uint32 index;
	float32 r;
	float32 d;
};

struct xLinkAsset
{
	uint16 srcEvent;
	uint16 dstEvent;
	uint32 dstAssetID;
	float32 param[4];
	uint32 paramWidgetAssetID;
	uint32 chkAssetID;
};

struct rxReq
{
};

struct xListItem_1
{
	int32 flg_travFilter;
	xGoal* next;
	xGoal* prev;
};

struct xEntPenData
{
	xVec3 top;
	float32 w;
	xMat4x3 omat;
};

struct zShrapnelAsset
{
	int32 fassetCount;
	uint32 shrapnelID;
	void(*initCB)(zShrapnelAsset*, xModelInstance*, xVec3*, void(*)(zFrag*, zFragAsset*));
};

struct xCamera : xBase
{
	RwCamera* lo_cam;
	xMat4x3 mat;
	xMat4x3 omat;
	xMat3x3 mbasis;
	xBound bound;
	xMat4x3* tgt_mat;
	xMat4x3* tgt_omat;
	xBound* tgt_bound;
	xVec3 focus;
	xScene* sc;
	xVec3 tran_accum;
	float32 fov;
	uint32 flags;
	float32 tmr;
	float32 tm_acc;
	float32 tm_dec;
	float32 ltmr;
	float32 ltm_acc;
	float32 ltm_dec;
	float32 dmin;
	float32 dmax;
	float32 dcur;
	float32 dgoal;
	float32 hmin;
	float32 hmax;
	float32 hcur;
	float32 hgoal;
	float32 pmin;
	float32 pmax;
	float32 pcur;
	float32 pgoal;
	float32 depv;
	float32 hepv;
	float32 pepv;
	float32 orn_epv;
	float32 yaw_epv;
	float32 pitch_epv;
	float32 roll_epv;
	xQuat orn_cur;
	xQuat orn_goal;
	xQuat orn_diff;
	float32 yaw_cur;
	float32 yaw_goal;
	float32 pitch_cur;
	float32 pitch_goal;
	float32 roll_cur;
	float32 roll_goal;
	float32 dct;
	float32 dcd;
	float32 dccv;
	float32 dcsv;
	float32 hct;
	float32 hcd;
	float32 hccv;
	float32 hcsv;
	float32 pct;
	float32 pcd;
	float32 pccv;
	float32 pcsv;
	float32 orn_ct;
	float32 orn_cd;
	float32 orn_ccv;
	float32 orn_csv;
	float32 yaw_ct;
	float32 yaw_cd;
	float32 yaw_ccv;
	float32 yaw_csv;
	float32 pitch_ct;
	float32 pitch_cd;
	float32 pitch_ccv;
	float32 pitch_csv;
	float32 roll_ct;
	float32 roll_cd;
	float32 roll_ccv;
	float32 roll_csv;
	xVec4 frustplane[12];
};

struct xScene
{
	uint32 sceneID;
	uint16 flags;
	uint16 num_ents;
	uint16 num_trigs;
	uint16 num_stats;
	uint16 num_dyns;
	uint16 num_npcs;
	uint16 num_act_ents;
	uint16 num_nact_ents;
	float32 gravity;
	float32 drag;
	float32 friction;
	uint16 num_ents_allocd;
	uint16 num_trigs_allocd;
	uint16 num_stats_allocd;
	uint16 num_dyns_allocd;
	uint16 num_npcs_allocd;
	xEnt** trigs;
	xEnt** stats;
	xEnt** dyns;
	xEnt** npcs;
	xEnt** act_ents;
	xEnt** nact_ents;
	xEnv* env;
	xMemPool mempool;
	xBase*(*resolvID)(uint32);
	int8*(*base2Name)(xBase*);
	int8*(*id2Name)(uint32);
};

enum RxClusterValidityReq
{
	rxCLREQ_DONTWANT,
	rxCLREQ_REQUIRED,
	rxCLREQ_OPTIONAL,
	rxCLUSTERVALIDITYREQFORCEENUMSIZEINT = 0x7fffffff
};

enum en_LASSO_STATUS
{
	LASS_STAT_DONE,
	LASS_STAT_PENDING,
	LASS_STAT_GRABBING,
	LASS_STAT_TOSSING,
	LASS_STAT_NOMORE,
	LASS_STAT_FORCEINT = 0x7fffffff
};

struct xModelAssetParam
{
};

struct xPEVCyl
{
	float32 height;
	float32 radius;
	float32 deflection;
};

struct zFragProjectile
{
	zFragProjectileAsset* fasset;
	xModelInstance* model;
	xParabola path;
	float32 angVel;
	float32 t;
	float32 tColl;
	int32 numBounces;
	float32 scale;
	float32 parentScale;
	float32 alpha;
	xVec3 N;
	xVec3 axis;
};

struct RpInterpolator
{
	int32 flags;
	int16 startMorphTarget;
	int16 endMorphTarget;
	float32 time;
	float32 recipTime;
	float32 position;
};

struct xAnimMultiFileBase
{
	uint32 Count;
};

struct RwCamera
{
	RwObjectHasFrame object;
	RwCameraProjection projectionType;
	RwCamera*(*beginUpdate)(RwCamera*);
	RwCamera*(*endUpdate)(RwCamera*);
	RwMatrixTag viewMatrix;
	RwRaster* frameBuffer;
	RwRaster* zBuffer;
	RwV2d viewWindow;
	RwV2d recipViewWindow;
	RwV2d viewOffset;
	float32 nearPlane;
	float32 farPlane;
	float32 fogPlane;
	float32 zScale;
	float32 zShift;
	RwFrustumPlane frustumPlanes[6];
	RwBBox frustumBoundBox;
	RwV3d frustumCorners[8];
};

struct zFragProjectileAsset : zFragAsset
{
	uint32 modelInfoID;
	RpAtomic* modelFile;
	zFragLocation launch;
	zFragLocation vel;
	float32 bounce;
	int32 maxBounces;
	uint32 flags;
	uint32 childID;
	zShrapnelAsset* child;
	float32 minScale;
	float32 maxScale;
	uint32 scaleCurveID;
	xCurveAsset* scaleCurve;
	float32 gravity;
};

struct xAnimEffect
{
	xAnimEffect* Next;
	uint32 Flags;
	float32 StartTime;
	float32 EndTime;
	uint32(*Callback)(uint32, xAnimActiveEffect*, xAnimSingle*, void*);
};

struct zNPCLassoInfo
{
	en_LASSO_STATUS stage;
	xEnt* lassoee;
	xAnimState* holdGuideAnim;
	xModelInstance* holdGuideModel;
	xAnimState* grabGuideAnim;
	xModelInstance* grabGuideModel;
};

struct _tagxRumble
{
	_tagRumbleType type;
	float32 seconds;
	_tagxRumble* next;
	int16 active;
	uint16 fxflags;
};

struct xCoef3
{
	xCoef x;
	xCoef y;
	xCoef z;
};

struct xParInterp
{
	float32 val[2];
	uint32 interp;
	float32 freq;
	float32 oofreq;
};

struct xParSys
{
};

struct _tagxPad
{
	uint8 value[22];
	uint8 last_value[22];
	uint32 on;
	uint32 pressed;
	uint32 released;
	_tagPadAnalog analog1;
	_tagPadAnalog analog2;
	_tagPadState state;
	uint32 flags;
	_tagxRumble rumble_head;
	int16 port;
	int16 slot;
	_tagiPad context;
	float32 al2d_timer;
	float32 ar2d_timer;
	float32 d_timer;
	float32 up_tmr[22];
	float32 down_tmr[22];
	analog_data analog[2];
};

struct zFragShockwaveAsset : zFragAsset
{
	uint32 modelInfoID;
	float32 birthRadius;
	float32 deathRadius;
	float32 birthVelocity;
	float32 deathVelocity;
	float32 birthSpin;
	float32 deathSpin;
	float32 birthColor[4];
	float32 deathColor[4];
};

struct xCurveAsset
{
};

struct xEntOrbitData
{
	xVec3 orig;
	xVec3 c;
	float32 a;
	float32 b;
	float32 p;
	float32 w;
};

struct zJumpParam
{
	float32 PeakHeight;
	float32 TimeGravChange;
	float32 TimeHold;
	float32 ImpulseVel;
};

enum RxNodeDefEditable
{
	rxNODEDEFCONST,
	rxNODEDEFEDITABLE,
	rxNODEDEFEDITABLEFORCEENUMSIZEINT = 0x7fffffff
};

struct _tagLightningLine
{
	float32 unused;
};

struct xClumpCollBSPTree
{
	uint32 numBranchNodes;
	xClumpCollBSPBranchNode* branchNodes;
	uint32 numTriangles;
	xClumpCollBSPTriangle* triangles;
};

enum RxClusterValid
{
	rxCLVALID_NOCHANGE,
	rxCLVALID_VALID,
	rxCLVALID_INVALID,
	rxCLUSTERVALIDFORCEENUMSIZEINT = 0x7fffffff
};

struct RyzMemData
{
};

enum zFragLocType
{
	eFragLocBone,
	eFragLocBoneUpdated,
	eFragLocBoneLocal,
	eFragLocBoneLocalUpdated,
	eFragLocTag,
	eFragLocTagUpdated,
	eFragLocCount,
	eFragLocForceSize = 0x7fffffff
};

struct RpPolygon
{
	uint16 matIndex;
	uint16 vertIndex[3];
};

struct xRot
{
	xVec3 axis;
	float32 angle;
};

struct zEntHangable
{
};

struct zPlatFMRunTime
{
	uint32 flags;
	float32 tmrs[12];
	float32 ttms[12];
	float32 atms[12];
	float32 dtms[12];
	float32 vms[12];
	float32 dss[12];
};

struct xAnimPlay
{
	xAnimPlay* Next;
	uint16 NumSingle;
	uint16 BoneCount;
	xAnimSingle* Single;
	void* Object;
	xAnimTable* Table;
	xMemPool* Pool;
	xModelInstance* ModelInst;
	void(*BeforeAnimMatrices)(xAnimPlay*, xQuat*, xVec3*, int32);
};

struct _class_2
{
	float32 t;
	float32 u;
	float32 v;
};

struct RpMaterialList
{
	RpMaterial** materials;
	int32 numMaterials;
	int32 space;
};

enum en_SM_NOTICES
{
	SM_NOTE_NPCDIED,
	SM_NOTE_NPCSTANDBY,
	SM_NOTE_NPCALIVE,
	SM_NOTE_DUPPAUSE,
	SM_NOTE_DUPRESUME,
	SM_NOTE_DUPSETDELAY,
	SM_NOTE_DUPDEAD,
	SM_NOTE_KILLKIDS,
	SM_NOTE_NOMORE,
	SM_NOTE_FORCE = 0x7fffffff
};

struct xFFX
{
};

struct xClumpCollBSPVertInfo
{
	uint16 atomIndex;
	uint16 meshVertIndex;
};

struct NPCSndQueue
{
	uint32 sndDirect;
	en_NPC_SOUND sndtype;
	int32 flg_snd;
	float32 tmr_delay;
	float32 radius;
};

struct xEntMotion
{
	xEntMotionAsset* asset;
	uint8 type;
	uint8 pad;
	uint16 flags;
	float32 t;
	float32 tmr;
	float32 d;
	union
	{
		xEntERData er;
		xEntOrbitData orb;
		xEntSplineData spl;
		xEntMPData mp;
		xEntMechData mech;
		xEntPenData pen;
	};
	xEnt* owner;
	xEnt* target;
};

struct xClumpCollBSPBranchNode
{
	uint32 leftInfo;
	uint32 rightInfo;
	float32 leftValue;
	float32 rightValue;
};

struct xPlatformAsset
{
};

struct xPEEntBone
{
	uint8 flags;
	uint8 type;
	uint8 bone;
	uint8 pad1;
	xVec3 offset;
	float32 radius;
	float32 deflection;
};

struct xBound
{
	xQCData qcd;
	uint8 type;
	uint8 pad[3];
	union
	{
		xSphere sph;
		xBBox box;
		xCylinder cyl;
	};
	xMat4x3* mat;
};

struct iFogParams
{
	RwFogType type;
	float32 start;
	float32 stop;
	float32 density;
	RwRGBA fogcolor;
	RwRGBA bgcolor;
	uint8* table;
};

struct xPSYNote
{
};

struct xAnimMultiFile : xAnimMultiFileBase
{
	xAnimMultiFileEntry Files[1];
};

enum rxEmbeddedPacketState
{
	rxPKST_PACKETLESS,
	rxPKST_UNUSED,
	rxPKST_INUSE,
	rxPKST_PENDING,
	rxEMBEDDEDPACKETSTATEFORCEENUMSIZEINT = 0x7fffffff
};

struct zCutsceneMgr
{
};

struct xSphere
{
	xVec3 center;
	float32 r;
};

struct RpMaterial
{
	RwTexture* texture;
	RwRGBA color;
	RxPipeline* pipeline;
	RwSurfaceProperties surfaceProps;
	int16 refCount;
	int16 pad;
};

struct xEntMotionAsset
{
	uint8 type;
	uint8 use_banking;
	uint16 flags;
	union
	{
		xEntMotionERData er;
		xEntMotionOrbitData orb;
		xEntMotionSplineData spl;
		xEntMotionMPData mp;
		xEntMotionMechData mech;
		xEntMotionPenData pen;
	};
};

struct xClumpCollBSPTriangle
{
	_class_4 v;
	uint8 flags;
	uint8 platData;
	uint16 matIndex;
};

struct xEntAsset : xBaseAsset
{
	uint8 flags;
	uint8 subtype;
	uint8 pflags;
	uint8 moreFlags;
	uint8 pad;
	uint32 surfaceID;
	xVec3 ang;
	xVec3 pos;
	xVec3 scale;
	float32 redMult;
	float32 greenMult;
	float32 blueMult;
	float32 seeThru;
	float32 seeThruSpeed;
	uint32 modelInfoID;
	uint32 animListID;
};

struct xModelPool
{
	xModelPool* Next;
	uint32 NumMatrices;
	xModelInstance* List;
};

struct xEntBoulder
{
};

enum _tagPadState
{
	ePad_Disabled,
	ePad_DisabledError,
	ePad_Enabled,
	ePad_Missing,
	ePad_Total
};

enum RwCameraProjection
{
	rwNACAMERAPROJECTION,
	rwPERSPECTIVE,
	rwPARALLEL,
	rwCAMERAPROJECTIONFORCEENUMSIZEINT = 0x7fffffff
};

enum RxClusterForcePresent
{
	rxCLALLOWABSENT,
	rxCLFORCEPRESENT,
	rxCLUSTERFORCEPRESENTFORCEENUMSIZEINT = 0x7fffffff
};

struct zScene : xScene
{
	_zPortal* pendingPortal;
	union
	{
		uint32 num_ents;
		uint32 num_base;
	};
	union
	{
		xBase** base;
		zEnt** ents;
	};
	uint32 num_update_base;
	xBase** update_base;
	uint32 baseCount[72];
	xBase* baseList[72];
	_zEnv* zen;
};

struct xCylinder
{
	xVec3 center;
	float32 r;
	float32 h;
};

struct zAssetPickupTable
{
};

struct xGlobals
{
	xCamera camera;
	_tagxPad* pad0;
	_tagxPad* pad1;
	_tagxPad* pad2;
	_tagxPad* pad3;
	int32 profile;
	int8 profFunc[128][6];
	xUpdateCullMgr* updateMgr;
	int32 sceneFirst;
	int8 sceneStart[32];
	RpWorld* currWorld;
	iFogParams fog;
	iFogParams fogA;
	iFogParams fogB;
	long32 fog_t0;
	long32 fog_t1;
	int32 option_vibration;
	uint32 QuarterSpeed;
	float32 update_dt;
	int32 useHIPHOP;
	uint8 NoMusic;
	int8 currentActivePad;
	uint8 firstStartPressed;
	uint32 minVSyncCnt;
	uint8 dontShowPadMessageDuringLoadingOrCutScene;
	uint8 autoSaveFeature;
};

struct _tagLightningRot
{
	float32 deg[16];
	float32 degrees;
	float32 height;
};

struct RpClump
{
	RwObject object;
	RwLinkList atomicList;
	RwLinkList lightList;
	RwLinkList cameraList;
	RwLLLink inWorldLink;
	RpClump*(*callback)(RpClump*, void*);
};

enum PSY_BRAIN_STATUS
{
	PSY_STAT_BLANK,
	PSY_STAT_GROW,
	PSY_STAT_EXTEND,
	PSY_STAT_THINK,
	PSY_STAT_NOMORE,
	PSY_STAT_FORCE = 0x7fffffff
};

struct zNPCSettings : xDynAsset
{
	en_npcbtyp basisType;
	int8 allowDetect;
	int8 allowPatrol;
	int8 allowWander;
	int8 reduceCollide;
	int8 useNavSplines;
	int8 pad[3];
	int8 allowChase;
	int8 allowAttack;
	int8 assumeLOS;
	int8 assumeFOV;
	en_dupowavmod duploWaveMode;
	float32 duploSpawnDelay;
	int32 duploSpawnLifeMax;
};

struct RpGeometry
{
	RwObject object;
	uint32 flags;
	uint16 lockedSinceLastInst;
	int16 refCount;
	int32 numTriangles;
	int32 numVertices;
	int32 numMorphTargets;
	int32 numTexCoordSets;
	RpMaterialList matList;
	RpTriangle* triangles;
	RwRGBA* preLitLum;
	RwTexCoords* texCoords[8];
	RpMeshHeader* mesh;
	RwResEntry* repEntry;
	RpMorphTarget* morphTarget;
};

struct xBox
{
	xVec3 upper;
	xVec3 lower;
};

enum en_GOALSTATE
{
	GOAL_STAT_UNKNOWN,
	GOAL_STAT_PROCESS,
	GOAL_STAT_ENTER,
	GOAL_STAT_EXIT,
	GOAL_STAT_SUSPEND,
	GOAL_STAT_RESUME,
	GOAL_STAT_PAUSED,
	GOAL_STAT_DONE,
	GOAL_STAT_NOMORE,
	GOAL_STAT_FORCE = 0x7fffffff
};

struct RxClusterDefinition
{
	int8* name;
	uint32 defaultStride;
	uint32 defaultAttributes;
	int8* attributeSet;
};

struct xEntSplineData
{
	int32 unknown;
};

enum en_NPC_SOUND
{
	NPC_STYP_BOGUS = 0xfffffffe,
	NPC_STYP_LISTEND = 0,
	NPC_STYP_ENCOUNTER,
	NPC_STYP_CLANKING,
	NPC_STYP_EXCLAIM,
	NPC_STYP_OUCH,
	NPC_STYP_CHEERING,
	NPC_STYP_RESPAWN,
	NPC_STYP_ALERT,
	NPC_STYP_DIZZY,
	NPC_STYP_DANCE,
	NPC_STYP_LAUGH,
	NPC_STYP_ATTACK,
	NPC_STYP_PUNCH,
	NPC_STYP_WEPLAUNCH,
	NPC_STYP_LIGHTNING,
	NPC_STYP_WARNBANG,
	NPC_STYP_DEATH,
	NPC_STYP_DEATHJELLY,
	NPC_STYP_BONKED,
	NPC_STYP_UNBONKED,
	NPC_STYP_TIKISTACK,
	NPC_STYP_TIKIEXPLODE,
	NPC_STYP_TIKITHUNDER,
	NPC_STYP_XSFXTALK,
	NPC_STYP_ONELINER,
	NPC_STYP_ONELINERTOO,
	NPC_STYP_NOMORE,
	NPC_STYP_FORCE = 0x7fffffff
};

struct xNPCBasic : xEnt, xFactoryInst
{
	void(*f_setup)(xEnt*);
	void(*f_reset)(xEnt*);
	struct
	{
		int32 flg_basenpc : 16;
		int32 inUpdate : 8;
		int32 flg_upward : 8;
	};
	int32 colFreq;
	int32 colFreqReset;
	struct
	{
		uint32 flg_colCheck : 8;
		uint32 flg_penCheck : 8;
		uint32 flg_unused : 16;
	};
	int32 myNPCType;
	xEntShadow entShadow_embedded;
	xShadowSimpleCache simpShadow_embedded;
};

struct zParEmitter : xParEmitter
{
};

struct xPECircle
{
	float32 radius;
	float32 deflection;
	xVec3 dir;
};

struct zFragLightning
{
	zFragLightningAsset* fasset;
	xModelInstance* startParent;
	xModelInstance* endParent;
	zLightning* lightning;
};

struct xEntMotionPenData
{
	uint8 flags;
	uint8 plane;
	uint8 pad[2];
	float32 len;
	float32 range;
	float32 period;
	float32 phase;
};

struct RwSphere
{
	RwV3d center;
	float32 radius;
};

struct zFragBone
{
	int32 index;
	xVec3 offset;
};

struct xEntFrame
{
	xMat4x3 mat;
	xMat4x3 oldmat;
	xVec3 oldvel;
	xRot oldrot;
	xRot drot;
	xRot rot;
	xVec3 dpos;
	xVec3 dvel;
	xVec3 vel;
	uint32 mode;
};

struct _class_3
{
	xVec3 endPoint[2];
	xVec3 direction;
	float32 length;
	float32 scale;
	float32 width;
	float32 endParam[2];
	float32 endVel[2];
	float32 paramSpan[2];
	float32 arc_height;
	xVec3 arc_normal;
};

struct _tagPadAnalog
{
	int8 x;
	int8 y;
};

struct _class_4
{
	union
	{
		xClumpCollBSPVertInfo i;
		RwV3d* p;
	};
};

struct RwTexDictionary
{
	RwObject object;
	RwLinkList texturesInDict;
	RwLLLink lInInstance;
};

struct RxOutputSpec
{
	int8* name;
	RxClusterValid* outputClusters;
	RxClusterValid allOtherClusters;
};

struct zFragAsset
{
	zFragType type;
	uint32 id;
	uint32 parentID[2];
	float32 lifetime;
	float32 delay;
};

struct zPlatform : zEnt
{
	xPlatformAsset* passet;
	xEntMotion motion;
	uint16 state;
	uint16 plat_flags;
	float32 tmr;
	int32 ctr;
	xMovePoint* src;
	xModelInstance* am;
	xModelInstance* bm;
	int32 moving;
	xEntDrive drv;
	zPlatFMRunTime* fmrt;
	float32 pauseMult;
	float32 pauseDelta;
};

struct xEntMPData
{
	float32 curdist;
	float32 speed;
	xMovePoint* dest;
	xMovePoint* src;
	xSpline3* spl;
	float32 dist;
	uint32 padalign;
	xQuat aquat;
	xQuat bquat;
};

struct _tagLightningZeus
{
	float32 normal_offset;
	float32 back_offset;
	float32 side_offset;
};

struct xMat3x3
{
	xVec3 right;
	int32 flags;
	xVec3 up;
	uint32 pad1;
	xVec3 at;
	uint32 pad2;
};

struct xEnv
{
	iEnv* geom;
	iEnv ienv;
	xLightKit* lightKit;
};

struct xMemPool
{
	void* FreeList;
	uint16 NextOffset;
	uint16 Flags;
	void* UsedList;
	void(*InitCB)(xMemPool*, void*);
	void* Buffer;
	uint16 Size;
	uint16 NumRealloc;
	uint32 Total;
};

struct RxClusterRef
{
	RxClusterDefinition* clusterDef;
	RxClusterForcePresent forcePresent;
	uint32 reserved;
};

struct xGroupAsset : xBaseAsset
{
	uint16 itemCount;
	uint16 groupFlags;
};

struct _tagiPad
{
	int32 port;
};

struct xShadowSimplePoly
{
	xVec3 vert[3];
	xVec3 norm;
};

struct _tagEmitSphere
{
	float32 radius;
};

struct RwObject
{
	uint8 type;
	uint8 subType;
	uint8 flags;
	uint8 privateFlags;
	void* parent;
};

struct zFragLocInfo
{
	union
	{
		zFragBone bone;
		xModelTag tag;
	};
};

struct zLasso
{
	uint32 flags;
	float32 secsTotal;
	float32 secsLeft;
	float32 stRadius;
	float32 tgRadius;
	float32 crRadius;
	xVec3 stCenter;
	xVec3 tgCenter;
	xVec3 crCenter;
	xVec3 stNormal;
	xVec3 tgNormal;
	xVec3 crNormal;
	xVec3 honda;
	float32 stSlack;
	float32 stSlackDist;
	float32 tgSlack;
	float32 tgSlackDist;
	float32 crSlack;
	float32 currDist;
	float32 lastDist;
	xVec3 lastRefs[5];
	uint8 reindex[5];
	xVec3 anchor;
	xModelTag tag;
	xModelInstance* model;
};

struct RxIoSpec
{
	uint32 numClustersOfInterest;
	RxClusterRef* clustersOfInterest;
	RxClusterValidityReq* inputRequirements;
	uint32 numOutputs;
	RxOutputSpec* outputs;
};

struct RpTriangle
{
	uint16 vertIndex[3];
	int16 matIndex;
};

struct xEntMotionERData
{
	xVec3 ret_pos;
	xVec3 ext_dpos;
	float32 ext_tm;
	float32 ext_wait_tm;
	float32 ret_tm;
	float32 ret_wait_tm;
};

struct xJSPNodeInfo
{
	int32 originalMatIndex;
	int32 nodeFlags;
};

struct zFragSound
{
	zFragSoundAsset* fasset;
	xVec3 location;
	uint32 soundID;
};

struct RwTexture
{
	RwRaster* raster;
	RwTexDictionary* dict;
	RwLLLink lInDictionary;
	int8 name[32];
	int8 mask[32];
	uint32 filterAddressing;
	int32 refCount;
};

struct RxNodeMethods
{
	int32(*nodeBody)(RxPipelineNode*, RxPipelineNodeParam*);
	int32(*nodeInit)(RxNodeDefinition*);
	void(*nodeTerm)(RxNodeDefinition*);
	int32(*pipelineNodeInit)(RxPipelineNode*);
	void(*pipelineNodeTerm)(RxPipelineNode*);
	int32(*pipelineNodeConfig)(RxPipelineNode*, RxPipeline*);
	uint32(*configMsgHandler)(RxPipelineNode*, uint32, uint32, void*);
};

struct xBaseAsset
{
	uint32 id;
	uint8 baseType;
	uint8 linkCount;
	uint16 baseFlags;
};

struct RwFrustumPlane
{
	RwPlane plane;
	uint8 closestX;
	uint8 closestY;
	uint8 closestZ;
	uint8 pad;
};

enum en_npcbtyp
{
	NPCP_BASIS_NONE,
	NPCP_BASIS_EVILROBOT,
	NPCP_BASIS_FRIENDLYROBOT,
	NPCP_BASIS_LOVINGCITIZEN,
	NPCP_BASIS_GRUMPYCITIZEN,
	NPCP_BASIS_NOMORE,
	NPCP_BASIS_FORCE = 0x7fffffff
};

struct _tagEmitRect
{
	float32 x_len;
	float32 z_len;
};

struct xShadowSimpleCache
{
	uint16 flags;
	uint8 alpha;
	uint8 pad;
	uint32 collPriority;
	xVec3 pos;
	xVec3 at;
	xEnt* castOnEnt;
	xShadowSimplePoly poly;
	float32 envHeight;
	float32 shadowHeight;
	uint32 raster;
	float32 dydx;
	float32 dydz;
	xVec3 corner[4];
};

struct zGlobals : xGlobals
{
	zPlayerGlobals player;
	zAssetPickupTable* pickupTable;
	zCutsceneMgr* cmgr;
	zScene* sceneCur;
	zScene* scenePreload;
};

struct RwPlane
{
	RwV3d normal;
	float32 distance;
};

struct zFragLocation
{
	zFragLocType type;
	zFragLocInfo info;
};

struct xDynAsset : xBaseAsset
{
	uint32 type;
	uint16 version;
	uint16 handle;
};

struct RxCluster
{
	uint16 flags;
	uint16 stride;
	void* data;
	void* currentData;
	uint32 numAlloced;
	uint32 numUsed;
	RxPipelineCluster* clusterRef;
	uint32 attributes;
};

struct xParEmitterCustomSettings : xParEmitterPropsAsset
{
	uint32 custom_flags;
	uint32 attachToID;
	xVec3 pos;
	xVec3 vel;
	float32 vel_angle_variation;
	uint8 rot[3];
	uint8 padding;
	float32 radius;
	float32 emit_interval_current;
	void* emit_volume;
};

struct zGlobalSettings
{
	uint16 AnalogMin;
	uint16 AnalogMax;
	float32 SundaeTime;
	float32 SundaeMult;
	uint32 InitialShinyCount;
	uint32 InitialSpatulaCount;
	int32 ShinyValuePurple;
	int32 ShinyValueBlue;
	int32 ShinyValueGreen;
	int32 ShinyValueYellow;
	int32 ShinyValueRed;
	int32 ShinyValueCombo0;
	int32 ShinyValueCombo1;
	int32 ShinyValueCombo2;
	int32 ShinyValueCombo3;
	int32 ShinyValueCombo4;
	int32 ShinyValueCombo5;
	int32 ShinyValueCombo6;
	int32 ShinyValueCombo7;
	int32 ShinyValueCombo8;
	int32 ShinyValueCombo9;
	int32 ShinyValueCombo10;
	int32 ShinyValueCombo11;
	int32 ShinyValueCombo12;
	int32 ShinyValueCombo13;
	int32 ShinyValueCombo14;
	int32 ShinyValueCombo15;
	float32 ComboTimer;
	uint32 Initial_Specials;
	uint32 TakeDamage;
	float32 DamageTimeHit;
	float32 DamageTimeSurface;
	float32 DamageTimeEGen;
	float32 DamageSurfKnock;
	float32 DamageGiveHealthKnock;
	uint32 CheatSpongeball;
	uint32 CheatPlayerSwitch;
	uint32 CheatAlwaysPortal;
	uint32 CheatFlyToggle;
	uint32 DisableForceConversation;
	float32 StartSlideAngle;
	float32 StopSlideAngle;
	float32 RotMatchMaxAngle;
	float32 RotMatchMatchTime;
	float32 RotMatchRelaxTime;
	float32 Gravity;
	float32 BBashTime;
	float32 BBashHeight;
	float32 BBashDelay;
	float32 BBashCVTime;
	float32 BBounceSpeed;
	float32 BSpinMinFrame;
	float32 BSpinMaxFrame;
	float32 BSpinRadius;
	float32 SandyMeleeMinFrame;
	float32 SandyMeleeMaxFrame;
	float32 SandyMeleeRadius;
	float32 BubbleBowlTimeDelay;
	float32 BubbleBowlLaunchPosLeft;
	float32 BubbleBowlLaunchPosUp;
	float32 BubbleBowlLaunchPosAt;
	float32 BubbleBowlLaunchVelLeft;
	float32 BubbleBowlLaunchVelUp;
	float32 BubbleBowlLaunchVelAt;
	float32 BubbleBowlPercentIncrease;
	float32 BubbleBowlMinSpeed;
	float32 BubbleBowlMinRecoverTime;
	float32 SlideAccelVelMin;
	float32 SlideAccelVelMax;
	float32 SlideAccelStart;
	float32 SlideAccelEnd;
	float32 SlideAccelPlayerFwd;
	float32 SlideAccelPlayerBack;
	float32 SlideAccelPlayerSide;
	float32 SlideVelMaxStart;
	float32 SlideVelMaxEnd;
	float32 SlideVelMaxIncTime;
	float32 SlideVelMaxIncAccel;
	float32 SlideAirHoldTime;
	float32 SlideAirSlowTime;
	float32 SlideAirDblHoldTime;
	float32 SlideAirDblSlowTime;
	float32 SlideVelDblBoost;
	uint8 SlideApplyPhysics;
	uint8 PowerUp[2];
	uint8 InitialPowerUp[2];
};

struct xModelTag
{
	xVec3 v;
	uint32 matidx;
	float32 wt[4];
};

enum en_SM_WAVE_MODE
{
	SM_WAVE_CONTINUOUS,
	SM_WAVE_DISCREET,
	SM_WAVE_NOMORE,
	SM_WAVE_FORCE = 0x7fffffff
};

struct zFragShockwave
{
	zFragShockwaveAsset* fasset;
	float32 currSize;
	float32 currVelocity;
	float32 deltVelocity;
	float32 currSpin;
	float32 deltSpin;
	float32 currColor[4];
	float32 deltColor[4];
};

struct RxPacket
{
	uint16 flags;
	uint16 numClusters;
	RxPipeline* pipeline;
	uint32* inputToClusterSlot;
	uint32* slotsContinue;
	RxPipelineCluster** slotClusterRefs;
	RxCluster clusters[1];
};

struct zPlayerLassoInfo
{
	xEnt* target;
	float32 dist;
	uint8 destroy;
	uint8 targetGuide;
	float32 lassoRot;
	xEnt* swingTarget;
	xEnt* releasedSwing;
	float32 copterTime;
	int32 canCopter;
	zLasso lasso;
	xAnimState* zeroAnim;
};

struct st_XORDEREDARRAY
{
	void** list;
	int32 cnt;
	int32 max;
	int32 warnlvl;
};

struct xEntMotionOrbitData
{
	xVec3 center;
	float32 w;
	float32 h;
	float32 period;
};

enum RwFogType
{
	rwFOGTYPENAFOGTYPE,
	rwFOGTYPELINEAR,
	rwFOGTYPEEXPONENTIAL,
	rwFOGTYPEEXPONENTIAL2,
	rwFOGTYPEFORCEENUMSIZEINT = 0x7fffffff
};

enum RpWorldRenderOrder
{
	rpWORLDRENDERNARENDERORDER,
	rpWORLDRENDERFRONT2BACK,
	rpWORLDRENDERBACK2FRONT,
	rpWORLDRENDERORDERFORCEENUMSIZEINT = 0x7fffffff
};

struct zLedgeGrabParams
{
	float32 animGrab;
	float32 zdist;
	xVec3 tranTable[60];
	int32 tranCount;
	xEnt* optr;
	xMat4x3 omat;
	float32 y0det;
	float32 dydet;
	float32 r0det;
	float32 drdet;
	float32 thdet;
	float32 rtime;
	float32 ttime;
	float32 tmr;
	xVec3 spos;
	xVec3 epos;
	xVec3 tpos;
	int32 nrays;
	int32 rrand;
	float32 startrot;
	float32 endrot;
};

struct xPEEntBound
{
	uint8 flags;
	uint8 type;
	uint8 pad1;
	uint8 pad2;
	float32 expand;
	float32 deflection;
};

struct _zEnv : xBase
{
	xEnvAsset* easset;
};

struct iColor_tag
{
	uint8 r;
	uint8 g;
	uint8 b;
	uint8 a;
};

enum zFragType
{
	eFragInactive,
	eFragGroup,
	eFragShrapnel,
	eFragParticle,
	eFragProjectile,
	eFragLightning,
	eFragSound,
	eFragShockwave,
	eFragCount,
	eFragForceSize = 0x7fffffff
};

struct xParabola
{
	xVec3 initPos;
	xVec3 initVel;
	float32 gravity;
	float32 minTime;
	float32 maxTime;
};

struct RwRGBAReal
{
	float32 red;
	float32 green;
	float32 blue;
	float32 alpha;
};

struct _tagEmitLine
{
	xVec3 pos1;
	xVec3 pos2;
	float32 radius;
};

enum en_dupowavmod
{
	NPCP_DUPOWAVE_CONTINUOUS,
	NPCP_DUPOWAVE_DISCREET,
	NPCP_DUPOWAVE_NOMORE,
	NPCP_DUPOWAVE_FORCE = 0x7fffffff
};

struct RwLinkList
{
	RwLLLink link;
};

enum _zPlayerWallJumpState
{
	k_WALLJUMP_NOT,
	k_WALLJUMP_LAUNCH,
	k_WALLJUMP_FLIGHT,
	k_WALLJUMP_LAND
};

int8 buffer[16];
int8 buffer[16];
SMDepot g_smdepot;
int32 g_drawSpawnBounds;
zGlobals globals;
xQCControl xqc_def_ctrl;

void ChildCleanup();
int32 SpawnBeastie(SMNPCStatus* npcstat, SMSPStatus* spstat);
SMNPCStatus* StatForNPC(zNPCCommon* npc);
int32 IsNearbyMover(xBound* bnd, int32 usecyl, xCollis* caller_colrec);
int32 IsSPLZClear(zMovePoint* sp);
SMSPStatus* SelectSP(SMNPCStatus* npcstat);
uint8 Receivable(en_SM_NOTICES note, void* data);
void Notify(en_SM_NOTICES note, void* data);
void UpdateContinuous();
void UpdateDiscreet();
void Timestep(float32 dt);
void MapPreferred();
void Reset();
int32 AddSpawnNPC(zNPCCommon* npc);
int32 AddSpawnPoint(zMovePoint* sp);
void SetWaveMode(en_SM_WAVE_MODE mode, float32 delay, int32 lifemax);
void Subscribe(zNPCCommon* owner);
zNPCSpawner* zNPCSpawner_GetInstance();
void zNPCSpawner_SceneFinish();
void zNPCSpawner_ScenePrepare();
void zNPCSpawner_Shutdown();
void zNPCSpawner_Startup();

// ChildCleanup__11zNPCSpawnerFf
// Start address: 0x3165e0
void zNPCSpawner::ChildCleanup()
{
	int32 i;
	SMNPCStatus* npc_stat;
	int32 cnt_know;
	int32 cnt_dead;
	// Line 1123, Address: 0x3165e0, Func Offset: 0
	// Line 1153, Address: 0x3165e4, Func Offset: 0x4
	// Line 1123, Address: 0x3165e8, Func Offset: 0x8
	// Line 1153, Address: 0x316600, Func Offset: 0x20
	// Line 1166, Address: 0x316610, Func Offset: 0x30
	// Line 1173, Address: 0x316620, Func Offset: 0x40
	// Line 1174, Address: 0x316648, Func Offset: 0x68
	// Line 1177, Address: 0x316658, Func Offset: 0x78
	// Line 1183, Address: 0x316670, Func Offset: 0x90
	// Line 1185, Address: 0x316674, Func Offset: 0x94
	// Line 1187, Address: 0x316680, Func Offset: 0xa0
	// Line 1189, Address: 0x316694, Func Offset: 0xb4
	// Line 1191, Address: 0x3166a4, Func Offset: 0xc4
	// Line 1192, Address: 0x3166ac, Func Offset: 0xcc
	// Line 1202, Address: 0x3166c0, Func Offset: 0xe0
	// Line 1204, Address: 0x3166c8, Func Offset: 0xe8
	// Line 1210, Address: 0x3166d8, Func Offset: 0xf8
	// Line 1212, Address: 0x3166e4, Func Offset: 0x104
	// Line 1213, Address: 0x3166e8, Func Offset: 0x108
	// Func End, Address: 0x316700, Func Offset: 0x120
}

// SpawnBeastie__11zNPCSpawnerFP11SMNPCStatusP10SMSPStatus
// Start address: 0x316700
int32 zNPCSpawner::SpawnBeastie(SMNPCStatus* npcstat, SMSPStatus* spstat)
{
	zNPCCommon* npc;
	zMovePoint* sp;
	xVec3 pos_sp;
	zMovePoint* nav_dest;
	// Line 1044, Address: 0x316700, Func Offset: 0
	// Line 1047, Address: 0x316704, Func Offset: 0x4
	// Line 1044, Address: 0x316708, Func Offset: 0x8
	// Line 1047, Address: 0x31670c, Func Offset: 0xc
	// Line 1044, Address: 0x316710, Func Offset: 0x10
	// Line 1046, Address: 0x316724, Func Offset: 0x24
	// Line 1045, Address: 0x316728, Func Offset: 0x28
	// Line 1047, Address: 0x31672c, Func Offset: 0x2c
	// Line 1062, Address: 0x31674c, Func Offset: 0x4c
	// Line 1063, Address: 0x316764, Func Offset: 0x64
	// Line 1064, Address: 0x316778, Func Offset: 0x78
	// Line 1075, Address: 0x31677c, Func Offset: 0x7c
	// Line 1076, Address: 0x316780, Func Offset: 0x80
	// Line 1064, Address: 0x31678c, Func Offset: 0x8c
	// Line 1076, Address: 0x3167a4, Func Offset: 0xa4
	// Line 1077, Address: 0x3167ac, Func Offset: 0xac
	// Line 1079, Address: 0x3167b8, Func Offset: 0xb8
	// Line 1083, Address: 0x3167d4, Func Offset: 0xd4
	// Line 1086, Address: 0x3167e0, Func Offset: 0xe0
	// Line 1089, Address: 0x3167ec, Func Offset: 0xec
	// Line 1088, Address: 0x3167f0, Func Offset: 0xf0
	// Line 1089, Address: 0x3167f4, Func Offset: 0xf4
	// Func End, Address: 0x31680c, Func Offset: 0x10c
}

// StatForNPC__11zNPCSpawnerFP10zNPCCommon
// Start address: 0x316810
SMNPCStatus* zNPCSpawner::StatForNPC(zNPCCommon* npc)
{
	SMNPCStatus* tmp_stat;
	SMNPCStatus* npc_stat;
	int32 i;
	// Line 1006, Address: 0x316810, Func Offset: 0
	// Line 1011, Address: 0x316814, Func Offset: 0x4
	// Line 1012, Address: 0x316818, Func Offset: 0x8
	// Line 1013, Address: 0x31681c, Func Offset: 0xc
	// Line 1014, Address: 0x316824, Func Offset: 0x14
	// Line 1016, Address: 0x31682c, Func Offset: 0x1c
	// Line 1017, Address: 0x316834, Func Offset: 0x24
	// Line 1021, Address: 0x316848, Func Offset: 0x38
	// Func End, Address: 0x316850, Func Offset: 0x40
}

// IsNearbyMover__11zNPCSpawnerFP6xBoundiP7xCollis
// Start address: 0x316850
int32 zNPCSpawner::IsNearbyMover(xBound* bnd, int32 usecyl, xCollis* caller_colrec)
{
	int32 hitthing;
	zNPCCommon* npc;
	int32 i;
	xCollis local_colrec;
	xCollis* colrec;
	xVec3 delt;
	// Line 911, Address: 0x316850, Func Offset: 0
	// Line 916, Address: 0x316854, Func Offset: 0x4
	// Line 911, Address: 0x316858, Func Offset: 0x8
	// Line 916, Address: 0x31685c, Func Offset: 0xc
	// Line 911, Address: 0x316860, Func Offset: 0x10
	// Line 912, Address: 0x316880, Func Offset: 0x30
	// Line 911, Address: 0x316884, Func Offset: 0x34
	// Line 916, Address: 0x31688c, Func Offset: 0x3c
	// Line 920, Address: 0x3168ac, Func Offset: 0x5c
	// Line 925, Address: 0x3168c0, Func Offset: 0x70
	// Line 920, Address: 0x3168c4, Func Offset: 0x74
	// Line 925, Address: 0x3168c8, Func Offset: 0x78
	// Line 926, Address: 0x3168e8, Func Offset: 0x98
	// Line 928, Address: 0x3168f4, Func Offset: 0xa4
	// Line 930, Address: 0x316908, Func Offset: 0xb8
	// Line 931, Address: 0x316918, Func Offset: 0xc8
	// Line 934, Address: 0x316928, Func Offset: 0xd8
	// Line 935, Address: 0x316938, Func Offset: 0xe8
	// Line 936, Address: 0x316950, Func Offset: 0x100
	// Line 937, Address: 0x316958, Func Offset: 0x108
	// Line 938, Address: 0x316978, Func Offset: 0x128
	// Line 939, Address: 0x316984, Func Offset: 0x134
	// Line 940, Address: 0x3169b4, Func Offset: 0x164
	// Line 942, Address: 0x3169d8, Func Offset: 0x188
	// Line 943, Address: 0x3169e0, Func Offset: 0x190
	// Line 962, Address: 0x3169fc, Func Offset: 0x1ac
	// Line 964, Address: 0x316a00, Func Offset: 0x1b0
	// Line 965, Address: 0x316a04, Func Offset: 0x1b4
	// Func End, Address: 0x316a34, Func Offset: 0x1e4
}

// IsSPLZClear__11zNPCSpawnerFP10zMovePoint
// Start address: 0x316a40
int32 zNPCSpawner::IsSPLZClear(zMovePoint* sp)
{
	xVec3 pos_sp;
	int32 rc;
	xBound bnd;
	xVec3 delt;
	// Line 843, Address: 0x316a40, Func Offset: 0
	// Line 844, Address: 0x316a44, Func Offset: 0x4
	// Line 843, Address: 0x316a48, Func Offset: 0x8
	// Line 844, Address: 0x316a4c, Func Offset: 0xc
	// Line 843, Address: 0x316a50, Func Offset: 0x10
	// Line 844, Address: 0x316a64, Func Offset: 0x24
	// Line 848, Address: 0x316a84, Func Offset: 0x44
	// Line 853, Address: 0x316a98, Func Offset: 0x58
	// Line 863, Address: 0x316aa8, Func Offset: 0x68
	// Line 859, Address: 0x316ab0, Func Offset: 0x70
	// Line 860, Address: 0x316ab4, Func Offset: 0x74
	// Line 861, Address: 0x316ab8, Func Offset: 0x78
	// Line 863, Address: 0x316ac0, Func Offset: 0x80
	// Line 853, Address: 0x316ac8, Func Offset: 0x88
	// Line 859, Address: 0x316adc, Func Offset: 0x9c
	// Line 861, Address: 0x316ae0, Func Offset: 0xa0
	// Line 860, Address: 0x316ae4, Func Offset: 0xa4
	// Line 861, Address: 0x316ae8, Func Offset: 0xa8
	// Line 863, Address: 0x316af8, Func Offset: 0xb8
	// Line 867, Address: 0x316b00, Func Offset: 0xc0
	// Line 869, Address: 0x316b0c, Func Offset: 0xcc
	// Line 870, Address: 0x316b14, Func Offset: 0xd4
	// Line 873, Address: 0x316b18, Func Offset: 0xd8
	// Line 874, Address: 0x316b24, Func Offset: 0xe4
	// Line 878, Address: 0x316b2c, Func Offset: 0xec
	// Line 879, Address: 0x316b34, Func Offset: 0xf4
	// Line 889, Address: 0x316b38, Func Offset: 0xf8
	// Line 890, Address: 0x316b5c, Func Offset: 0x11c
	// Line 891, Address: 0x316b60, Func Offset: 0x120
	// Line 890, Address: 0x316b64, Func Offset: 0x124
	// Line 891, Address: 0x316b68, Func Offset: 0x128
	// Line 890, Address: 0x316b6c, Func Offset: 0x12c
	// Line 891, Address: 0x316ba4, Func Offset: 0x164
	// Line 892, Address: 0x316bc4, Func Offset: 0x184
	// Line 898, Address: 0x316bc8, Func Offset: 0x188
	// Line 903, Address: 0x316bdc, Func Offset: 0x19c
	// Line 907, Address: 0x316be8, Func Offset: 0x1a8
	// Func End, Address: 0x316c04, Func Offset: 0x1c4
}

// SelectSP__11zNPCSpawnerFPC11SMNPCStatus
// Start address: 0x316c10
SMSPStatus* zNPCSpawner::SelectSP(SMNPCStatus* npcstat)
{
	int32 rc;
	SMSPStatus* splist[16];
	int32 cnt;
	int32 i;
	SMSPStatus* tmp_stat;
	int32 rc;
	SMSPStatus* sp_stat;
	// Line 691, Address: 0x316c10, Func Offset: 0
	// Line 698, Address: 0x316c34, Func Offset: 0x24
	// Line 699, Address: 0x316c3c, Func Offset: 0x2c
	// Line 709, Address: 0x316c7c, Func Offset: 0x6c
	// Line 710, Address: 0x316c90, Func Offset: 0x80
	// Line 711, Address: 0x316c9c, Func Offset: 0x8c
	// Line 715, Address: 0x316ca4, Func Offset: 0x94
	// Line 723, Address: 0x316ca8, Func Offset: 0x98
	// Line 724, Address: 0x316ccc, Func Offset: 0xbc
	// Line 728, Address: 0x316cd0, Func Offset: 0xc0
	// Line 729, Address: 0x316ce0, Func Offset: 0xd0
	// Line 731, Address: 0x316ce4, Func Offset: 0xd4
	// Line 732, Address: 0x316cec, Func Offset: 0xdc
	// Line 733, Address: 0x316cf8, Func Offset: 0xe8
	// Line 736, Address: 0x316d04, Func Offset: 0xf4
	// Line 737, Address: 0x316d0c, Func Offset: 0xfc
	// Line 740, Address: 0x316d14, Func Offset: 0x104
	// Line 741, Address: 0x316d20, Func Offset: 0x110
	// Line 744, Address: 0x316d30, Func Offset: 0x120
	// Line 745, Address: 0x316da8, Func Offset: 0x198
	// Line 748, Address: 0x316db0, Func Offset: 0x1a0
	// Func End, Address: 0x316dd4, Func Offset: 0x1c4
}

// Receivable__11zNPCSpawnerCF13en_SM_NOTICESPv
// Start address: 0x316de0
uint8 zNPCSpawner::Receivable(en_SM_NOTICES note, void* data)
{
	// Line 661, Address: 0x316de0, Func Offset: 0
	// Line 666, Address: 0x316e04, Func Offset: 0x24
	// Line 667, Address: 0x316e08, Func Offset: 0x28
	// Line 676, Address: 0x316e48, Func Offset: 0x68
	// Line 680, Address: 0x316e50, Func Offset: 0x70
	// Line 682, Address: 0x316e58, Func Offset: 0x78
	// Func End, Address: 0x316e60, Func Offset: 0x80
}

// Notify__11zNPCSpawnerF13en_SM_NOTICESPv
// Start address: 0x316e60
void zNPCSpawner::Notify(en_SM_NOTICES note, void* data)
{
	// Line 570, Address: 0x316e60, Func Offset: 0
	// Line 572, Address: 0x316e64, Func Offset: 0x4
	// Line 570, Address: 0x316e68, Func Offset: 0x8
	// Line 572, Address: 0x316e78, Func Offset: 0x18
	// Line 575, Address: 0x316e9c, Func Offset: 0x3c
	// Line 578, Address: 0x316ea0, Func Offset: 0x40
	// Line 579, Address: 0x316ec4, Func Offset: 0x64
	// Line 580, Address: 0x316ed8, Func Offset: 0x78
	// Line 583, Address: 0x316ee0, Func Offset: 0x80
	// Line 584, Address: 0x316ef0, Func Offset: 0x90
	// Line 587, Address: 0x316ef8, Func Offset: 0x98
	// Line 588, Address: 0x316f08, Func Offset: 0xa8
	// Line 595, Address: 0x316f10, Func Offset: 0xb0
	// Line 596, Address: 0x316f18, Func Offset: 0xb8
	// Line 600, Address: 0x316f20, Func Offset: 0xc0
	// Line 603, Address: 0x316f30, Func Offset: 0xd0
	// Line 604, Address: 0x316f34, Func Offset: 0xd4
	// Line 606, Address: 0x316f3c, Func Offset: 0xdc
	// Line 610, Address: 0x316f40, Func Offset: 0xe0
	// Line 608, Address: 0x316f44, Func Offset: 0xe4
	// Line 610, Address: 0x316f48, Func Offset: 0xe8
	// Line 611, Address: 0x316f6c, Func Offset: 0x10c
	// Line 613, Address: 0x316f74, Func Offset: 0x114
	// Line 615, Address: 0x316f78, Func Offset: 0x118
	// Line 618, Address: 0x316f88, Func Offset: 0x128
	// Line 619, Address: 0x316fd0, Func Offset: 0x170
	// Line 625, Address: 0x316fd4, Func Offset: 0x174
	// Line 619, Address: 0x316fd8, Func Offset: 0x178
	// Line 625, Address: 0x316fe0, Func Offset: 0x180
	// Line 627, Address: 0x316ffc, Func Offset: 0x19c
	// Line 629, Address: 0x317008, Func Offset: 0x1a8
	// Line 637, Address: 0x317010, Func Offset: 0x1b0
	// Line 638, Address: 0x317058, Func Offset: 0x1f8
	// Line 639, Address: 0x317064, Func Offset: 0x204
	// Line 648, Address: 0x317070, Func Offset: 0x210
	// Func End, Address: 0x317084, Func Offset: 0x224
}

// UpdateContinuous__11zNPCSpawnerFf
// Start address: 0x317090
void zNPCSpawner::UpdateContinuous()
{
	SMSPStatus* spstat;
	// Line 448, Address: 0x317090, Func Offset: 0
	// Line 452, Address: 0x317094, Func Offset: 0x4
	// Line 448, Address: 0x317098, Func Offset: 0x8
	// Line 449, Address: 0x3170ac, Func Offset: 0x1c
	// Line 448, Address: 0x3170b0, Func Offset: 0x20
	// Line 452, Address: 0x3170b4, Func Offset: 0x24
	// Line 453, Address: 0x3170ec, Func Offset: 0x5c
	// Line 455, Address: 0x3170f0, Func Offset: 0x60
	// Line 456, Address: 0x317180, Func Offset: 0xf0
	// Line 457, Address: 0x31718c, Func Offset: 0xfc
	// Line 458, Address: 0x317194, Func Offset: 0x104
	// Line 459, Address: 0x3171a0, Func Offset: 0x110
	// Line 461, Address: 0x3171b0, Func Offset: 0x120
	// Line 462, Address: 0x3171b4, Func Offset: 0x124
	// Line 464, Address: 0x3171bc, Func Offset: 0x12c
	// Line 462, Address: 0x3171c0, Func Offset: 0x130
	// Line 465, Address: 0x3171c4, Func Offset: 0x134
	// Line 466, Address: 0x3171dc, Func Offset: 0x14c
	// Line 469, Address: 0x3171f4, Func Offset: 0x164
	// Line 470, Address: 0x3171fc, Func Offset: 0x16c
	// Line 472, Address: 0x317228, Func Offset: 0x198
	// Line 474, Address: 0x3172b8, Func Offset: 0x228
	// Line 475, Address: 0x3172d0, Func Offset: 0x240
	// Line 476, Address: 0x3172e8, Func Offset: 0x258
	// Line 478, Address: 0x317314, Func Offset: 0x284
	// Line 480, Address: 0x31731c, Func Offset: 0x28c
	// Line 483, Address: 0x317320, Func Offset: 0x290
	// Line 485, Address: 0x317330, Func Offset: 0x2a0
	// Line 486, Address: 0x31733c, Func Offset: 0x2ac
	// Line 489, Address: 0x317354, Func Offset: 0x2c4
	// Line 490, Address: 0x31735c, Func Offset: 0x2cc
	// Line 491, Address: 0x317388, Func Offset: 0x2f8
	// Line 492, Address: 0x31739c, Func Offset: 0x30c
	// Line 491, Address: 0x3173a0, Func Offset: 0x310
	// Line 492, Address: 0x3173bc, Func Offset: 0x32c
	// Line 493, Address: 0x317400, Func Offset: 0x370
	// Line 494, Address: 0x31740c, Func Offset: 0x37c
	// Line 495, Address: 0x317418, Func Offset: 0x388
	// Line 496, Address: 0x317424, Func Offset: 0x394
	// Line 498, Address: 0x31742c, Func Offset: 0x39c
	// Line 500, Address: 0x317430, Func Offset: 0x3a0
	// Line 501, Address: 0x317440, Func Offset: 0x3b0
	// Line 502, Address: 0x317488, Func Offset: 0x3f8
	// Line 506, Address: 0x317490, Func Offset: 0x400
	// Line 507, Address: 0x3174a0, Func Offset: 0x410
	// Line 508, Address: 0x3174ac, Func Offset: 0x41c
	// Line 507, Address: 0x3174b0, Func Offset: 0x420
	// Line 533, Address: 0x3174b4, Func Offset: 0x424
	// Line 536, Address: 0x3174cc, Func Offset: 0x43c
	// Line 537, Address: 0x3174dc, Func Offset: 0x44c
	// Line 538, Address: 0x3174e4, Func Offset: 0x454
	// Line 539, Address: 0x3174f0, Func Offset: 0x460
	// Line 542, Address: 0x3174fc, Func Offset: 0x46c
	// Line 543, Address: 0x31750c, Func Offset: 0x47c
	// Line 546, Address: 0x317518, Func Offset: 0x488
	// Line 548, Address: 0x317524, Func Offset: 0x494
	// Line 550, Address: 0x317530, Func Offset: 0x4a0
	// Line 551, Address: 0x317538, Func Offset: 0x4a8
	// Line 552, Address: 0x317540, Func Offset: 0x4b0
	// Line 553, Address: 0x31754c, Func Offset: 0x4bc
	// Line 567, Address: 0x317558, Func Offset: 0x4c8
	// Func End, Address: 0x317578, Func Offset: 0x4e8
}

// UpdateDiscreet__11zNPCSpawnerFf
// Start address: 0x317580
void zNPCSpawner::UpdateDiscreet()
{
	SMSPStatus* spstat;
	// Line 334, Address: 0x317580, Func Offset: 0
	// Line 338, Address: 0x317584, Func Offset: 0x4
	// Line 334, Address: 0x317588, Func Offset: 0x8
	// Line 338, Address: 0x3175a4, Func Offset: 0x24
	// Line 339, Address: 0x3175dc, Func Offset: 0x5c
	// Line 341, Address: 0x3175e0, Func Offset: 0x60
	// Line 342, Address: 0x317670, Func Offset: 0xf0
	// Line 343, Address: 0x31767c, Func Offset: 0xfc
	// Line 344, Address: 0x317684, Func Offset: 0x104
	// Line 345, Address: 0x317690, Func Offset: 0x110
	// Line 347, Address: 0x3176a0, Func Offset: 0x120
	// Line 348, Address: 0x3176a4, Func Offset: 0x124
	// Line 350, Address: 0x3176ac, Func Offset: 0x12c
	// Line 348, Address: 0x3176b0, Func Offset: 0x130
	// Line 351, Address: 0x3176b4, Func Offset: 0x134
	// Line 352, Address: 0x3176cc, Func Offset: 0x14c
	// Line 355, Address: 0x3176e4, Func Offset: 0x164
	// Line 356, Address: 0x3176ec, Func Offset: 0x16c
	// Line 358, Address: 0x317718, Func Offset: 0x198
	// Line 360, Address: 0x3177a8, Func Offset: 0x228
	// Line 361, Address: 0x3177c0, Func Offset: 0x240
	// Line 362, Address: 0x3177d8, Func Offset: 0x258
	// Line 364, Address: 0x317804, Func Offset: 0x284
	// Line 366, Address: 0x31780c, Func Offset: 0x28c
	// Line 367, Address: 0x317810, Func Offset: 0x290
	// Line 368, Address: 0x31782c, Func Offset: 0x2ac
	// Line 376, Address: 0x317844, Func Offset: 0x2c4
	// Line 378, Address: 0x31784c, Func Offset: 0x2cc
	// Line 380, Address: 0x317850, Func Offset: 0x2d0
	// Line 381, Address: 0x317860, Func Offset: 0x2e0
	// Line 382, Address: 0x3178a8, Func Offset: 0x328
	// Line 385, Address: 0x3178b0, Func Offset: 0x330
	// Line 386, Address: 0x3178c0, Func Offset: 0x340
	// Line 387, Address: 0x3178cc, Func Offset: 0x34c
	// Line 386, Address: 0x3178d0, Func Offset: 0x350
	// Line 404, Address: 0x3178d4, Func Offset: 0x354
	// Line 408, Address: 0x3178ec, Func Offset: 0x36c
	// Line 409, Address: 0x3178fc, Func Offset: 0x37c
	// Line 411, Address: 0x317904, Func Offset: 0x384
	// Line 412, Address: 0x317910, Func Offset: 0x390
	// Line 415, Address: 0x31791c, Func Offset: 0x39c
	// Line 416, Address: 0x31792c, Func Offset: 0x3ac
	// Line 419, Address: 0x317938, Func Offset: 0x3b8
	// Line 421, Address: 0x317944, Func Offset: 0x3c4
	// Line 423, Address: 0x317950, Func Offset: 0x3d0
	// Line 424, Address: 0x317958, Func Offset: 0x3d8
	// Line 425, Address: 0x317960, Func Offset: 0x3e0
	// Line 426, Address: 0x31796c, Func Offset: 0x3ec
	// Line 428, Address: 0x317978, Func Offset: 0x3f8
	// Line 433, Address: 0x317980, Func Offset: 0x400
	// Line 442, Address: 0x317984, Func Offset: 0x404
	// Line 445, Address: 0x317988, Func Offset: 0x408
	// Func End, Address: 0x3179a8, Func Offset: 0x428
}

// Timestep__11zNPCSpawnerFf
// Start address: 0x3179b0
void zNPCSpawner::Timestep(float32 dt)
{
	// Line 306, Address: 0x3179b0, Func Offset: 0
	// Line 312, Address: 0x3179c4, Func Offset: 0x14
	// Line 315, Address: 0x3179e0, Func Offset: 0x30
	// Line 317, Address: 0x3179f4, Func Offset: 0x44
	// Line 319, Address: 0x317a18, Func Offset: 0x68
	// Line 320, Address: 0x317a34, Func Offset: 0x84
	// Line 321, Address: 0x317a38, Func Offset: 0x88
	// Line 322, Address: 0x317a44, Func Offset: 0x94
	// Line 323, Address: 0x317a4c, Func Offset: 0x9c
	// Line 324, Address: 0x317a50, Func Offset: 0xa0
	// Line 328, Address: 0x317a5c, Func Offset: 0xac
	// Line 331, Address: 0x317a60, Func Offset: 0xb0
	// Func End, Address: 0x317a74, Func Offset: 0xc4
}

// MapPreferred__11zNPCSpawnerFv
// Start address: 0x317a80
void zNPCSpawner::MapPreferred()
{
	int32 i;
	SMNPCStatus* npc_stat;
	zMovePoint* sp;
	// Line 252, Address: 0x317a80, Func Offset: 0
	// Line 257, Address: 0x317a98, Func Offset: 0x18
	// Line 252, Address: 0x317a9c, Func Offset: 0x1c
	// Line 257, Address: 0x317aa4, Func Offset: 0x24
	// Line 259, Address: 0x317aa8, Func Offset: 0x28
	// Line 260, Address: 0x317aac, Func Offset: 0x2c
	// Line 263, Address: 0x317ab4, Func Offset: 0x34
	// Line 264, Address: 0x317abc, Func Offset: 0x3c
	// Line 267, Address: 0x317ac4, Func Offset: 0x44
	// Line 268, Address: 0x317b00, Func Offset: 0x80
	// Line 271, Address: 0x317b08, Func Offset: 0x88
	// Line 272, Address: 0x317b0c, Func Offset: 0x8c
	// Line 274, Address: 0x317b14, Func Offset: 0x94
	// Line 277, Address: 0x317b28, Func Offset: 0xa8
	// Func End, Address: 0x317b44, Func Offset: 0xc4
}

// Reset__11zNPCSpawnerFv
// Start address: 0x317b50
void zNPCSpawner::Reset()
{
	// Line 227, Address: 0x317b50, Func Offset: 0
	// Line 242, Address: 0x317b54, Func Offset: 0x4
	// Line 227, Address: 0x317b58, Func Offset: 0x8
	// Line 230, Address: 0x317b60, Func Offset: 0x10
	// Line 231, Address: 0x317b64, Func Offset: 0x14
	// Line 232, Address: 0x317b68, Func Offset: 0x18
	// Line 239, Address: 0x317b6c, Func Offset: 0x1c
	// Line 240, Address: 0x317b78, Func Offset: 0x28
	// Line 242, Address: 0x317b84, Func Offset: 0x34
	// Line 243, Address: 0x317bd0, Func Offset: 0x80
	// Line 246, Address: 0x317c20, Func Offset: 0xd0
	// Line 249, Address: 0x317c28, Func Offset: 0xd8
	// Func End, Address: 0x317c38, Func Offset: 0xe8
}

// AddSpawnNPC__11zNPCSpawnerFP10zNPCCommon
// Start address: 0x317c40
int32 zNPCSpawner::AddSpawnNPC(zNPCCommon* npc)
{
	int32 ack;
	int32 i;
	SMNPCStatus* npc_stat;
	// Line 195, Address: 0x317c40, Func Offset: 0
	// Line 204, Address: 0x317c4c, Func Offset: 0xc
	// Line 195, Address: 0x317c50, Func Offset: 0x10
	// Line 196, Address: 0x317c58, Func Offset: 0x18
	// Line 204, Address: 0x317c5c, Func Offset: 0x1c
	// Line 206, Address: 0x317c60, Func Offset: 0x20
	// Line 207, Address: 0x317c6c, Func Offset: 0x2c
	// Line 210, Address: 0x317c70, Func Offset: 0x30
	// Line 208, Address: 0x317c74, Func Offset: 0x34
	// Line 211, Address: 0x317c78, Func Offset: 0x38
	// Line 212, Address: 0x317c80, Func Offset: 0x40
	// Line 217, Address: 0x317c90, Func Offset: 0x50
	// Line 223, Address: 0x317ca4, Func Offset: 0x64
	// Line 224, Address: 0x317ca8, Func Offset: 0x68
	// Func End, Address: 0x317cb8, Func Offset: 0x78
}

// AddSpawnPoint__11zNPCSpawnerFP10zMovePoint
// Start address: 0x317cc0
int32 zNPCSpawner::AddSpawnPoint(zMovePoint* sp)
{
	SMSPStatus* sp_stat;
	int32 ack;
	int32 i;
	// Line 174, Address: 0x317cc0, Func Offset: 0
	// Line 178, Address: 0x317cc4, Func Offset: 0x4
	// Line 180, Address: 0x317cc8, Func Offset: 0x8
	// Line 179, Address: 0x317ccc, Func Offset: 0xc
	// Line 180, Address: 0x317cd0, Func Offset: 0x10
	// Line 181, Address: 0x317cd8, Func Offset: 0x18
	// Line 183, Address: 0x317cdc, Func Offset: 0x1c
	// Line 184, Address: 0x317ce0, Func Offset: 0x20
	// Line 185, Address: 0x317ce8, Func Offset: 0x28
	// Line 192, Address: 0x317cf8, Func Offset: 0x38
	// Func End, Address: 0x317d00, Func Offset: 0x40
}

// SetWaveMode__11zNPCSpawnerF15en_SM_WAVE_MODEfi
// Start address: 0x317d00
void zNPCSpawner::SetWaveMode(en_SM_WAVE_MODE mode, float32 delay, int32 lifemax)
{
	// Line 165, Address: 0x317d00, Func Offset: 0
	// Line 166, Address: 0x317d04, Func Offset: 0x4
	// Line 169, Address: 0x317d08, Func Offset: 0x8
	// Func End, Address: 0x317d10, Func Offset: 0x10
}

// Subscribe__11zNPCSpawnerFP10zNPCCommon
// Start address: 0x317d10
void zNPCSpawner::Subscribe(zNPCCommon* owner)
{
	// Line 135, Address: 0x317d10, Func Offset: 0
	// Line 141, Address: 0x317d14, Func Offset: 0x4
	// Line 135, Address: 0x317d18, Func Offset: 0x8
	// Line 145, Address: 0x317d1c, Func Offset: 0xc
	// Line 135, Address: 0x317d20, Func Offset: 0x10
	// Line 138, Address: 0x317d24, Func Offset: 0x14
	// Line 141, Address: 0x317d2c, Func Offset: 0x1c
	// Line 145, Address: 0x317d30, Func Offset: 0x20
	// Line 142, Address: 0x317d34, Func Offset: 0x24
	// Line 143, Address: 0x317d3c, Func Offset: 0x2c
	// Line 145, Address: 0x317d40, Func Offset: 0x30
	// Line 146, Address: 0x317d48, Func Offset: 0x38
	// Line 149, Address: 0x317d58, Func Offset: 0x48
	// Func End, Address: 0x317d68, Func Offset: 0x58
}

// zNPCSpawner_GetInstance__Fv
// Start address: 0x317d70
zNPCSpawner* zNPCSpawner_GetInstance()
{
	zNPCSpawner* sm;
	zNPCSpawner* sm_tmp;
	SMDepot* depot;
	int32 i;
	// Line 121, Address: 0x317d70, Func Offset: 0
	// Line 117, Address: 0x317d74, Func Offset: 0x4
	// Line 121, Address: 0x317d78, Func Offset: 0x8
	// Line 115, Address: 0x317d7c, Func Offset: 0xc
	// Line 117, Address: 0x317d80, Func Offset: 0x10
	// Line 121, Address: 0x317d84, Func Offset: 0x14
	// Line 122, Address: 0x317d98, Func Offset: 0x28
	// Line 123, Address: 0x317d9c, Func Offset: 0x2c
	// Line 124, Address: 0x317dac, Func Offset: 0x3c
	// Line 126, Address: 0x317db0, Func Offset: 0x40
	// Line 127, Address: 0x317db8, Func Offset: 0x48
	// Line 132, Address: 0x317dc8, Func Offset: 0x58
	// Func End, Address: 0x317dd0, Func Offset: 0x60
}

// zNPCSpawner_SceneFinish__Fv
// Start address: 0x317dd0
void zNPCSpawner_SceneFinish()
{
	SMDepot* depot;
	int32 i;
	// Line 91, Address: 0x317dd0, Func Offset: 0
	// Line 97, Address: 0x317dd4, Func Offset: 0x4
	// Line 91, Address: 0x317dd8, Func Offset: 0x8
	// Line 92, Address: 0x317de8, Func Offset: 0x18
	// Line 97, Address: 0x317dec, Func Offset: 0x1c
	// Line 92, Address: 0x317df0, Func Offset: 0x20
	// Line 97, Address: 0x317df4, Func Offset: 0x24
	// Line 100, Address: 0x317e08, Func Offset: 0x38
	// Line 101, Address: 0x317e18, Func Offset: 0x48
	// Line 104, Address: 0x317e30, Func Offset: 0x60
	// Line 106, Address: 0x317e3c, Func Offset: 0x6c
	// Func End, Address: 0x317e54, Func Offset: 0x84
}

// zNPCSpawner_ScenePrepare__Fv
// Start address: 0x317e60
void zNPCSpawner_ScenePrepare()
{
	SMDepot* depot;
	zNPCSpawner* sm;
	int32 i;
	// Line 73, Address: 0x317e60, Func Offset: 0
	// Line 79, Address: 0x317e64, Func Offset: 0x4
	// Line 73, Address: 0x317e68, Func Offset: 0x8
	// Line 79, Address: 0x317e6c, Func Offset: 0xc
	// Line 73, Address: 0x317e70, Func Offset: 0x10
	// Line 74, Address: 0x317e74, Func Offset: 0x14
	// Line 73, Address: 0x317e78, Func Offset: 0x18
	// Line 74, Address: 0x317e7c, Func Offset: 0x1c
	// Line 79, Address: 0x317e80, Func Offset: 0x20
	// Line 82, Address: 0x317e88, Func Offset: 0x28
	// Line 83, Address: 0x317e90, Func Offset: 0x30
	// Line 84, Address: 0x317ea4, Func Offset: 0x44
	// Line 85, Address: 0x317eb0, Func Offset: 0x50
	// Line 88, Address: 0x317ec0, Func Offset: 0x60
	// Func End, Address: 0x317ed4, Func Offset: 0x74
}

// zNPCSpawner_Shutdown__Fv
// Start address: 0x317ee0
void zNPCSpawner_Shutdown()
{
	// Line 70, Address: 0x317ee0, Func Offset: 0
	// Func End, Address: 0x317ee8, Func Offset: 0x8
}

// zNPCSpawner_Startup__Fv
// Start address: 0x317ef0
void zNPCSpawner_Startup()
{
	// Line 65, Address: 0x317ef0, Func Offset: 0
	// Func End, Address: 0x317ef8, Func Offset: 0x8
}

