diff --git a/config/GQPE78/config.yml b/config/GQPE78/config.yml index 1846d3137..993bb7879 100644 --- a/config/GQPE78/config.yml +++ b/config/GQPE78/config.yml @@ -5,4 +5,4 @@ symbols: config/GQPE78/symbols.txt splits: config/GQPE78/splits.txt symbols_known: true fill_gaps: false -ldscript_template: config/GQPE78/ldscript.tpl \ No newline at end of file +ldscript_template: config/GQPE78/ldscript.tpl diff --git a/dwarf/SB/Core/p2/iModel.cpp b/dwarf/SB/Core/p2/iModel.cpp index 40af56676..13531b5b2 100644 --- a/dwarf/SB/Core/p2/iModel.cpp +++ b/dwarf/SB/Core/p2/iModel.cpp @@ -6,127 +6,140 @@ char buffer[16]; // size: 0x10, address: 0x0 char buffer[16]; // size: 0x10, address: 0x0 static unsigned int gLastAtomicCount; // size: 0x4, address: 0x50F7F8 -static class RpAtomic * gLastAtomicList[256]; // size: 0x400, address: 0x532C30 -static class RpLight * sEmptyDirectionalLight[4]; // size: 0x10, address: 0x533030 -static class RpLight * sEmptyAmbientLight; // size: 0x4, address: 0x50F7FC +static class RpAtomic* gLastAtomicList[256]; // size: 0x400, address: 0x532C30 +static class RpLight* sEmptyDirectionalLight[4]; // size: 0x10, address: 0x533030 +static class RpLight* sEmptyAmbientLight; // size: 0x4, address: 0x50F7FC static class RwRGBA sMaterialColor[16]; // size: 0x40, address: 0x533040 -static class RwTexture * sMaterialTexture[16]; // size: 0x40, address: 0x533080 +static class RwTexture* sMaterialTexture[16]; // size: 0x40, address: 0x533080 static unsigned char sMaterialAlpha[16]; // size: 0x10, address: 0x5330C0 static unsigned int sMaterialIdx; // size: 0x4, address: 0x50F800 static unsigned int sMaterialFlags; // size: 0x4, address: 0x50F804 -static class RpAtomic * sLastMaterial; // size: 0x4, address: 0x50F808 -class RpMaterial * iModelMaterialMulCB(class RpMaterial *, void *); // size: 0x0, address: 0x1ACD30 -class RpMaterial * iModelSetMaterialTextureCB(class RpMaterial *, void *); // size: 0x0, address: 0x1AD060 -unsigned char * giAnimScratch; // size: 0x4, address: 0x50E80C +static class RpAtomic* sLastMaterial; // size: 0x4, address: 0x50F808 +class RpMaterial* iModelMaterialMulCB(class RpMaterial*, void*); // size: 0x0, address: 0x1ACD30 +class RpMaterial* iModelSetMaterialTextureCB(class RpMaterial*, + void*); // size: 0x0, address: 0x1AD060 +unsigned char* giAnimScratch; // size: 0x4, address: 0x50E80C unsigned int ourGlobals[4096]; // size: 0x4000, address: 0x5BB928 class zGlobals globals; // size: 0x2050, address: 0x52C8F0 signed int iModelHack_DisablePrelight; // size: 0x4, address: 0x50FFD0 -class RwFrame * GetChildFrameHierarchy(class RwFrame *, void *); // size: 0x0, address: 0x1AF3C0 -class RpAtomic * NextAtomicCallback(class RpAtomic *, void *); // size: 0x0, address: 0x1AEEC0 -class RpAtomic * FindAtomicCallback(class RpAtomic *, void *); // size: 0x0, address: 0x1AF1D0 -class RwV3d { +class RwFrame* GetChildFrameHierarchy(class RwFrame*, void*); // size: 0x0, address: 0x1AF3C0 +class RpAtomic* NextAtomicCallback(class RpAtomic*, void*); // size: 0x0, address: 0x1AEEC0 +class RpAtomic* FindAtomicCallback(class RpAtomic*, void*); // size: 0x0, address: 0x1AF1D0 +class RwV3d +{ // total size: 0xC public: float x; // offset 0x0, size 0x4 float y; // offset 0x4, size 0x4 float z; // offset 0x8, size 0x4 }; -class RpMaterial { +class RpMaterial +{ // total size: 0x1C public: - class RwTexture * texture; // offset 0x0, size 0x4 + class RwTexture* texture; // offset 0x0, size 0x4 class RwRGBA color; // offset 0x4, size 0x4 - class RxPipeline * pipeline; // offset 0x8, size 0x4 + class RxPipeline* pipeline; // offset 0x8, size 0x4 class RwSurfaceProperties surfaceProps; // offset 0xC, size 0xC signed short refCount; // offset 0x18, size 0x2 signed short pad; // offset 0x1A, size 0x2 }; -class RpAtomic { +class RpAtomic +{ // total size: 0x70 public: class RwObjectHasFrame object; // offset 0x0, size 0x14 - class RwResEntry * repEntry; // offset 0x14, size 0x4 - class RpGeometry * geometry; // offset 0x18, size 0x4 + class RwResEntry* repEntry; // offset 0x14, size 0x4 + class RpGeometry* geometry; // offset 0x18, size 0x4 class RwSphere boundingSphere; // offset 0x1C, size 0x10 class RwSphere worldBoundingSphere; // offset 0x2C, size 0x10 - class RpClump * clump; // offset 0x3C, size 0x4 + class RpClump* clump; // offset 0x3C, size 0x4 class RwLLLink inClumpLink; // offset 0x40, size 0x8 - class RpAtomic * (* renderCallBack)(class RpAtomic *); // offset 0x48, size 0x4 + class RpAtomic* (*renderCallBack)(class RpAtomic*); // offset 0x48, size 0x4 class RpInterpolator interpolator; // offset 0x4C, size 0x14 unsigned short renderFrame; // offset 0x60, size 0x2 unsigned short pad; // offset 0x62, size 0x2 class RwLinkList llWorldSectorsInAtomic; // offset 0x64, size 0x8 - class RxPipeline * pipeline; // offset 0x6C, size 0x4 + class RxPipeline* pipeline; // offset 0x6C, size 0x4 }; -class xAnimState { +class xAnimState +{ // total size: 0x4C public: - class xAnimState * Next; // offset 0x0, size 0x4 - char * Name; // offset 0x4, size 0x4 + class xAnimState* Next; // offset 0x0, size 0x4 + char* Name; // offset 0x4, size 0x4 unsigned int ID; // offset 0x8, size 0x4 unsigned int Flags; // offset 0xC, size 0x4 unsigned int UserFlags; // offset 0x10, size 0x4 float Speed; // offset 0x14, size 0x4 - class xAnimFile * Data; // offset 0x18, size 0x4 - class xAnimEffect * Effects; // offset 0x1C, size 0x4 - class xAnimTransitionList * Default; // offset 0x20, size 0x4 - class xAnimTransitionList * List; // offset 0x24, size 0x4 - float * BoneBlend; // offset 0x28, size 0x4 - float * TimeSnap; // offset 0x2C, size 0x4 + class xAnimFile* Data; // offset 0x18, size 0x4 + class xAnimEffect* Effects; // offset 0x1C, size 0x4 + class xAnimTransitionList* Default; // offset 0x20, size 0x4 + class xAnimTransitionList* List; // offset 0x24, size 0x4 + float* BoneBlend; // offset 0x28, size 0x4 + float* TimeSnap; // offset 0x2C, size 0x4 float FadeRecip; // offset 0x30, size 0x4 - unsigned short * FadeOffset; // offset 0x34, size 0x4 - void * CallbackData; // offset 0x38, size 0x4 - class xAnimMultiFile * MultiFile; // offset 0x3C, size 0x4 - void (* BeforeEnter)(class xAnimPlay *, class xAnimState *); // offset 0x40, size 0x4 - void (* StateCallback)(class xAnimState *, class xAnimSingle *, void *); // offset 0x44, size 0x4 - void (* BeforeAnimMatrices)(class xAnimPlay *, class xQuat *, class xVec3 *, signed int); // offset 0x48, size 0x4 -}; -class RpHAnimHierarchy { + unsigned short* FadeOffset; // offset 0x34, size 0x4 + void* CallbackData; // offset 0x38, size 0x4 + class xAnimMultiFile* MultiFile; // offset 0x3C, size 0x4 + void (*BeforeEnter)(class xAnimPlay*, class xAnimState*); // offset 0x40, size 0x4 + void (*StateCallback)(class xAnimState*, class xAnimSingle*, void*); // offset 0x44, size 0x4 + void (*BeforeAnimMatrices)(class xAnimPlay*, class xQuat*, class xVec3*, + signed int); // offset 0x48, size 0x4 +}; +class RpHAnimHierarchy +{ // total size: 0x24 public: signed int flags; // offset 0x0, size 0x4 signed int numNodes; // offset 0x4, size 0x4 - class RwMatrixTag * pMatrixArray; // offset 0x8, size 0x4 - void * pMatrixArrayUnaligned; // offset 0xC, size 0x4 - class RpHAnimNodeInfo * pNodeInfo; // offset 0x10, size 0x4 - class RwFrame * parentFrame; // offset 0x14, size 0x4 - class RpHAnimHierarchy * parentHierarchy; // offset 0x18, size 0x4 + class RwMatrixTag* pMatrixArray; // offset 0x8, size 0x4 + void* pMatrixArrayUnaligned; // offset 0xC, size 0x4 + class RpHAnimNodeInfo* pNodeInfo; // offset 0x10, size 0x4 + class RwFrame* parentFrame; // offset 0x14, size 0x4 + class RpHAnimHierarchy* parentHierarchy; // offset 0x18, size 0x4 signed int rootParentOffset; // offset 0x1C, size 0x4 - class RtAnimInterpolator * currentAnim; // offset 0x20, size 0x4 + class RtAnimInterpolator* currentAnim; // offset 0x20, size 0x4 }; -class RxHeap { +class RxHeap +{ // total size: 0x1C public: unsigned int superBlockSize; // offset 0x0, size 0x4 - class rxHeapSuperBlockDescriptor * head; // offset 0x4, size 0x4 - class rxHeapBlockHeader * headBlock; // offset 0x8, size 0x4 - class rxHeapFreeBlock * freeBlocks; // offset 0xC, size 0x4 + class rxHeapSuperBlockDescriptor* head; // offset 0x4, size 0x4 + class rxHeapBlockHeader* headBlock; // offset 0x8, size 0x4 + class rxHeapFreeBlock* freeBlocks; // offset 0xC, size 0x4 unsigned int entriesAlloced; // offset 0x10, size 0x4 unsigned int entriesUsed; // offset 0x14, size 0x4 signed int dirty; // offset 0x18, size 0x4 }; -class xBase { +class xBase +{ // total size: 0x10 public: unsigned int id; // offset 0x0, size 0x4 unsigned char baseType; // offset 0x4, size 0x1 unsigned char linkCount; // offset 0x5, size 0x1 unsigned short baseFlags; // offset 0x6, size 0x2 - class xLinkAsset * link; // offset 0x8, size 0x4 - signed int (* eventFunc)(class xBase *, class xBase *, unsigned int, float *, class xBase *); // offset 0xC, size 0x4 + class xLinkAsset* link; // offset 0x8, size 0x4 + signed int (*eventFunc)(class xBase*, class xBase*, unsigned int, float*, + class xBase*); // offset 0xC, size 0x4 }; -class RpSector { +class RpSector +{ // total size: 0x4 public: signed int type; // offset 0x0, size 0x4 }; -class RwTexCoords { +class RwTexCoords +{ // total size: 0x8 public: float u; // offset 0x0, size 0x4 float v; // offset 0x4, size 0x4 }; -class RwMatrixTag { +class RwMatrixTag +{ // total size: 0x40 public: class RwV3d right; // offset 0x0, size 0xC @@ -138,13 +151,15 @@ class RwMatrixTag { class RwV3d pos; // offset 0x30, size 0xC unsigned int pad3; // offset 0x3C, size 0x4 }; -class RwBBox { +class RwBBox +{ // total size: 0x18 public: class RwV3d sup; // offset 0x0, size 0xC class RwV3d inf; // offset 0xC, size 0xC }; -class RwRGBA { +class RwRGBA +{ // total size: 0x4 public: unsigned char red; // offset 0x0, size 0x1 @@ -152,29 +167,31 @@ class RwRGBA { unsigned char blue; // offset 0x2, size 0x1 unsigned char alpha; // offset 0x3, size 0x1 }; -class RpWorld { +class RpWorld +{ // total size: 0x70 public: class RwObject object; // offset 0x0, size 0x8 unsigned int flags; // offset 0x8, size 0x4 enum RpWorldRenderOrder renderOrder; // offset 0xC, size 0x4 class RpMaterialList matList; // offset 0x10, size 0xC - class RpSector * rootSector; // offset 0x1C, size 0x4 + class RpSector* rootSector; // offset 0x1C, size 0x4 signed int numTexCoordSets; // offset 0x20, size 0x4 signed int numClumpsInWorld; // offset 0x24, size 0x4 - class RwLLLink * currentClumpLink; // offset 0x28, size 0x4 + class RwLLLink* currentClumpLink; // offset 0x28, size 0x4 class RwLinkList clumpList; // offset 0x2C, size 0x8 class RwLinkList lightList; // offset 0x34, size 0x8 class RwLinkList directionalLightList; // offset 0x3C, size 0x8 class RwV3d worldOrigin; // offset 0x44, size 0xC class RwBBox boundingBox; // offset 0x50, size 0x18 - class RpWorldSector * (* renderCallBack)(class RpWorldSector *); // offset 0x68, size 0x4 - class RxPipeline * pipeline; // offset 0x6C, size 0x4 + class RpWorldSector* (*renderCallBack)(class RpWorldSector*); // offset 0x68, size 0x4 + class RxPipeline* pipeline; // offset 0x6C, size 0x4 }; -class xEnt : public xBase { +class xEnt : public xBase +{ // total size: 0xD0 public: - class xEntAsset * asset; // offset 0x10, size 0x4 + class xEntAsset* asset; // offset 0x10, size 0x4 unsigned short idx; // offset 0x14, size 0x2 unsigned short num_updates; // offset 0x16, size 0x2 unsigned char flags; // offset 0x18, size 0x1 @@ -189,59 +206,63 @@ class xEnt : public xBase { unsigned char collLev; // offset 0x21, size 0x1 unsigned char chkby; // offset 0x22, size 0x1 unsigned char penby; // offset 0x23, size 0x1 - class xModelInstance * model; // offset 0x24, size 0x4 - class xModelInstance * collModel; // offset 0x28, size 0x4 - class xModelInstance * camcollModel; // offset 0x2C, size 0x4 - class xLightKit * lightKit; // offset 0x30, size 0x4 - void (* update)(class xEnt *, class xScene *, float); // offset 0x34, size 0x4 - void (* endUpdate)(class xEnt *, class xScene *, float); // offset 0x38, size 0x4 - void (* bupdate)(class xEnt *, class xVec3 *); // offset 0x3C, size 0x4 - void (* move)(class xEnt *, class xScene *, float, class xEntFrame *); // offset 0x40, size 0x4 - void (* render)(class xEnt *); // offset 0x44, size 0x4 - class xEntFrame * frame; // offset 0x48, size 0x4 - class xEntCollis * collis; // offset 0x4C, size 0x4 + class xModelInstance* model; // offset 0x24, size 0x4 + class xModelInstance* collModel; // offset 0x28, size 0x4 + class xModelInstance* camcollModel; // offset 0x2C, size 0x4 + class xLightKit* lightKit; // offset 0x30, size 0x4 + void (*update)(class xEnt*, class xScene*, float); // offset 0x34, size 0x4 + void (*endUpdate)(class xEnt*, class xScene*, float); // offset 0x38, size 0x4 + void (*bupdate)(class xEnt*, class xVec3*); // offset 0x3C, size 0x4 + void (*move)(class xEnt*, class xScene*, float, class xEntFrame*); // offset 0x40, size 0x4 + void (*render)(class xEnt*); // offset 0x44, size 0x4 + class xEntFrame* frame; // offset 0x48, size 0x4 + class xEntCollis* collis; // offset 0x4C, size 0x4 class xGridBound gridb; // offset 0x50, size 0x14 class xBound bound; // offset 0x64, size 0x4C - void (* transl)(class xEnt *, class xVec3 *, class xMat4x3 *); // offset 0xB0, size 0x4 - class xFFX * ffx; // offset 0xB4, size 0x4 - class xEnt * driver; // offset 0xB8, size 0x4 + void (*transl)(class xEnt*, class xVec3*, class xMat4x3*); // offset 0xB0, size 0x4 + class xFFX* ffx; // offset 0xB4, size 0x4 + class xEnt* driver; // offset 0xB8, size 0x4 signed int driveMode; // offset 0xBC, size 0x4 - class xShadowSimpleCache * simpShadow; // offset 0xC0, size 0x4 - class xEntShadow * entShadow; // offset 0xC4, size 0x4 - class anim_coll_data * anim_coll; // offset 0xC8, size 0x4 - void * user_data; // offset 0xCC, size 0x4 + class xShadowSimpleCache* simpShadow; // offset 0xC0, size 0x4 + class xEntShadow* entShadow; // offset 0xC4, size 0x4 + class anim_coll_data* anim_coll; // offset 0xC8, size 0x4 + void* user_data; // offset 0xCC, size 0x4 }; -class RxPipeline { +class RxPipeline +{ // total size: 0x34 public: signed int locked; // offset 0x0, size 0x4 unsigned int numNodes; // offset 0x4, size 0x4 - class RxPipelineNode * nodes; // offset 0x8, size 0x4 + class RxPipelineNode* nodes; // offset 0x8, size 0x4 unsigned int packetNumClusterSlots; // offset 0xC, size 0x4 enum rxEmbeddedPacketState embeddedPacketState; // offset 0x10, size 0x4 - class RxPacket * embeddedPacket; // offset 0x14, size 0x4 + class RxPacket* embeddedPacket; // offset 0x14, size 0x4 unsigned int numInputRequirements; // offset 0x18, size 0x4 - class RxPipelineRequiresCluster * inputRequirements; // offset 0x1C, size 0x4 - void * superBlock; // offset 0x20, size 0x4 + class RxPipelineRequiresCluster* inputRequirements; // offset 0x1C, size 0x4 + void* superBlock; // offset 0x20, size 0x4 unsigned int superBlockSize; // offset 0x24, size 0x4 unsigned int entryPoint; // offset 0x28, size 0x4 unsigned int pluginId; // offset 0x2C, size 0x4 unsigned int pluginData; // offset 0x30, size 0x4 }; -class xCollis { +class xCollis +{ // total size: 0x50 public: unsigned int flags; // offset 0x0, size 0x4 unsigned int oid; // offset 0x4, size 0x4 - void * optr; // offset 0x8, size 0x4 - class xModelInstance * mptr; // offset 0xC, size 0x4 + void* optr; // offset 0x8, size 0x4 + class xModelInstance* mptr; // offset 0xC, size 0x4 float dist; // offset 0x10, size 0x4 class xVec3 norm; // offset 0x14, size 0xC class xVec3 tohit; // offset 0x20, size 0xC class xVec3 depen; // offset 0x2C, size 0xC class xVec3 hdng; // offset 0x38, size 0xC - union { // inferred - class /* @class */ { + union + { // inferred + class /* @class */ + { // total size: 0xC public: float t; // offset 0x0, size 0x4 @@ -251,14 +272,15 @@ class xCollis { class tri_data tri; // offset 0x44, size 0xC }; }; -class xModelInstance { +class xModelInstance +{ // total size: 0x6C public: - class xModelInstance * Next; // offset 0x0, size 0x4 - class xModelInstance * Parent; // offset 0x4, size 0x4 - class xModelPool * Pool; // offset 0x8, size 0x4 - class xAnimPlay * Anim; // offset 0xC, size 0x4 - class RpAtomic * Data; // offset 0x10, size 0x4 + class xModelInstance* Next; // offset 0x0, size 0x4 + class xModelInstance* Parent; // offset 0x4, size 0x4 + class xModelPool* Pool; // offset 0x8, size 0x4 + class xAnimPlay* Anim; // offset 0xC, size 0x4 + class RpAtomic* Data; // offset 0x10, size 0x4 unsigned int PipeFlags; // offset 0x14, size 0x4 float RedMultiplier; // offset 0x18, size 0x4 float GreenMultiplier; // offset 0x1C, size 0x4 @@ -266,66 +288,71 @@ class xModelInstance { float Alpha; // offset 0x24, size 0x4 float FadeStart; // offset 0x28, size 0x4 float FadeEnd; // offset 0x2C, size 0x4 - class xSurface * Surf; // offset 0x30, size 0x4 - class xModelBucket * * Bucket; // offset 0x34, size 0x4 - class xModelInstance * BucketNext; // offset 0x38, size 0x4 - class xLightKit * LightKit; // offset 0x3C, size 0x4 - void * Object; // offset 0x40, size 0x4 + class xSurface* Surf; // offset 0x30, size 0x4 + class xModelBucket** Bucket; // offset 0x34, size 0x4 + class xModelInstance* BucketNext; // offset 0x38, size 0x4 + class xLightKit* LightKit; // offset 0x3C, size 0x4 + void* Object; // offset 0x40, size 0x4 unsigned short Flags; // offset 0x44, size 0x2 unsigned char BoneCount; // offset 0x46, size 0x1 unsigned char BoneIndex; // offset 0x47, size 0x1 - unsigned char * BoneRemap; // offset 0x48, size 0x4 - class RwMatrixTag * Mat; // offset 0x4C, size 0x4 + unsigned char* BoneRemap; // offset 0x48, size 0x4 + class RwMatrixTag* Mat; // offset 0x4C, size 0x4 class xVec3 Scale; // offset 0x50, size 0xC unsigned int modelID; // offset 0x5C, size 0x4 unsigned int shadowID; // offset 0x60, size 0x4 - class RpAtomic * shadowmapAtomic; // offset 0x64, size 0x4 - class /* @class */ { + class RpAtomic* shadowmapAtomic; // offset 0x64, size 0x4 + class /* @class */ + { // total size: 0x4 public: - class xVec3 * verts; // offset 0x0, size 0x4 + class xVec3* verts; // offset 0x0, size 0x4 } anim_coll; // offset 0x68, size 0x4 }; -class RxPipelineNode { +class RxPipelineNode +{ // total size: 0x28 public: - class RxNodeDefinition * nodeDef; // offset 0x0, size 0x4 + class RxNodeDefinition* nodeDef; // offset 0x0, size 0x4 unsigned int numOutputs; // offset 0x4, size 0x4 - unsigned int * outputs; // offset 0x8, size 0x4 - class RxPipelineCluster * * slotClusterRefs; // offset 0xC, size 0x4 - unsigned int * slotsContinue; // offset 0x10, size 0x4 - void * privateData; // offset 0x14, size 0x4 - unsigned int * inputToClusterSlot; // offset 0x18, size 0x4 - class RxPipelineNodeTopSortData * topSortData; // offset 0x1C, size 0x4 - void * initializationData; // offset 0x20, size 0x4 + unsigned int* outputs; // offset 0x8, size 0x4 + class RxPipelineCluster** slotClusterRefs; // offset 0xC, size 0x4 + unsigned int* slotsContinue; // offset 0x10, size 0x4 + void* privateData; // offset 0x14, size 0x4 + unsigned int* inputToClusterSlot; // offset 0x18, size 0x4 + class RxPipelineNodeTopSortData* topSortData; // offset 0x1C, size 0x4 + void* initializationData; // offset 0x20, size 0x4 unsigned int initializationDataSize; // offset 0x24, size 0x4 }; -class RtAnimAnimation { +class RtAnimAnimation +{ // total size: 0x18 public: - class RtAnimInterpolatorInfo * interpInfo; // offset 0x0, size 0x4 + class RtAnimInterpolatorInfo* interpInfo; // offset 0x0, size 0x4 signed int numFrames; // offset 0x4, size 0x4 signed int flags; // offset 0x8, size 0x4 float duration; // offset 0xC, size 0x4 - void * pFrames; // offset 0x10, size 0x4 - void * customData; // offset 0x14, size 0x4 + void* pFrames; // offset 0x10, size 0x4 + void* customData; // offset 0x14, size 0x4 }; -class xQuat { +class xQuat +{ // total size: 0x10 public: class xVec3 v; // offset 0x0, size 0xC float s; // offset 0xC, size 0x4 }; -class RwCamera { +class RwCamera +{ // total size: 0x190 public: class RwObjectHasFrame object; // offset 0x0, size 0x14 enum RwCameraProjection projectionType; // offset 0x14, size 0x4 - class RwCamera * (* beginUpdate)(class RwCamera *); // offset 0x18, size 0x4 - class RwCamera * (* endUpdate)(class RwCamera *); // offset 0x1C, size 0x4 + class RwCamera* (*beginUpdate)(class RwCamera*); // offset 0x18, size 0x4 + class RwCamera* (*endUpdate)(class RwCamera*); // offset 0x1C, size 0x4 class RwMatrixTag viewMatrix; // offset 0x20, size 0x40 - class RwRaster * frameBuffer; // offset 0x60, size 0x4 - class RwRaster * zBuffer; // offset 0x64, size 0x4 + class RwRaster* frameBuffer; // offset 0x60, size 0x4 + class RwRaster* zBuffer; // offset 0x64, size 0x4 class RwV2d viewWindow; // offset 0x68, size 0x8 class RwV2d recipViewWindow; // offset 0x70, size 0x8 class RwV2d viewOffset; // offset 0x78, size 0x8 @@ -338,7 +365,8 @@ class RwCamera { class RwBBox frustumBoundBox; // offset 0x10C, size 0x18 class RwV3d frustumCorners[8]; // offset 0x124, size 0x60 }; -class xScene { +class xScene +{ // total size: 0x70 public: unsigned int sceneID; // offset 0x0, size 0x4 @@ -358,28 +386,31 @@ class xScene { unsigned short num_stats_allocd; // offset 0x24, size 0x2 unsigned short num_dyns_allocd; // offset 0x26, size 0x2 unsigned short num_npcs_allocd; // offset 0x28, size 0x2 - class xEnt * * trigs; // offset 0x2C, size 0x4 - class xEnt * * stats; // offset 0x30, size 0x4 - class xEnt * * dyns; // offset 0x34, size 0x4 - class xEnt * * npcs; // offset 0x38, size 0x4 - class xEnt * * act_ents; // offset 0x3C, size 0x4 - class xEnt * * nact_ents; // offset 0x40, size 0x4 - class xEnv * env; // offset 0x44, size 0x4 + class xEnt** trigs; // offset 0x2C, size 0x4 + class xEnt** stats; // offset 0x30, size 0x4 + class xEnt** dyns; // offset 0x34, size 0x4 + class xEnt** npcs; // offset 0x38, size 0x4 + class xEnt** act_ents; // offset 0x3C, size 0x4 + class xEnt** nact_ents; // offset 0x40, size 0x4 + class xEnv* env; // offset 0x44, size 0x4 class xMemPool mempool; // offset 0x48, size 0x1C - class xBase * (* resolvID)(unsigned int); // offset 0x64, size 0x4 - char * (* base2Name)(class xBase *); // offset 0x68, size 0x4 - char * (* id2Name)(unsigned int); // offset 0x6C, size 0x4 + class xBase* (*resolvID)(unsigned int); // offset 0x64, size 0x4 + char* (*base2Name)(class xBase*); // offset 0x68, size 0x4 + char* (*id2Name)(unsigned int); // offset 0x6C, size 0x4 }; -class xAnimEffect { +class xAnimEffect +{ // total size: 0x14 public: - class xAnimEffect * Next; // offset 0x0, size 0x4 + class xAnimEffect* Next; // offset 0x0, size 0x4 unsigned int Flags; // offset 0x4, size 0x4 float StartTime; // offset 0x8, size 0x4 float EndTime; // offset 0xC, size 0x4 - unsigned int (* Callback)(unsigned int, class xAnimActiveEffect *, class xAnimSingle *, void *); // offset 0x10, size 0x4 + unsigned int (*Callback)(unsigned int, class xAnimActiveEffect*, class xAnimSingle*, + void*); // offset 0x10, size 0x4 }; -class RpMeshHeader { +class RpMeshHeader +{ // total size: 0x10 public: unsigned int flags; // offset 0x0, size 0x4 @@ -388,7 +419,8 @@ class RpMeshHeader { unsigned int totalIndicesInMesh; // offset 0x8, size 0x4 unsigned int firstMeshOffset; // offset 0xC, size 0x4 }; -class xEntFrame { +class xEntFrame +{ // total size: 0xF0 public: class xMat4x3 mat; // offset 0x0, size 0x40 @@ -402,31 +434,35 @@ class xEntFrame { class xVec3 vel; // offset 0xD4, size 0xC unsigned int mode; // offset 0xE0, size 0x4 }; -class xVec3 { +class xVec3 +{ // total size: 0xC public: float x; // offset 0x0, size 0x4 float y; // offset 0x4, size 0x4 float z; // offset 0x8, size 0x4 }; -class xClumpCollBSPTree { +class xClumpCollBSPTree +{ // total size: 0x10 public: unsigned int numBranchNodes; // offset 0x0, size 0x4 - class xClumpCollBSPBranchNode * branchNodes; // offset 0x4, size 0x4 + class xClumpCollBSPBranchNode* branchNodes; // offset 0x4, size 0x4 unsigned int numTriangles; // offset 0x8, size 0x4 - class xClumpCollBSPTriangle * triangles; // offset 0xC, size 0x4 + class xClumpCollBSPTriangle* triangles; // offset 0xC, size 0x4 }; -class RwResEntry { +class RwResEntry +{ // total size: 0x18 public: class RwLLLink link; // offset 0x0, size 0x8 signed int size; // offset 0x8, size 0x4 - void * owner; // offset 0xC, size 0x4 - class RwResEntry * * ownerRef; // offset 0x10, size 0x4 - void (* destroyNotify)(class RwResEntry *); // offset 0x14, size 0x4 + void* owner; // offset 0xC, size 0x4 + class RwResEntry** ownerRef; // offset 0x10, size 0x4 + void (*destroyNotify)(class RwResEntry*); // offset 0x14, size 0x4 }; -class xEntCollis { +class xEntCollis +{ // total size: 0x5B4 public: unsigned char chk; // offset 0x0, size 0x1 @@ -441,75 +477,84 @@ class xEntCollis { unsigned char stat_eidx; // offset 0x9, size 0x1 unsigned char idx; // offset 0xA, size 0x1 class xCollis colls[18]; // offset 0xC, size 0x5A0 - void (* post)(class xEnt *, class xScene *, float, class xEntCollis *); // offset 0x5AC, size 0x4 - unsigned int (* depenq)(class xEnt *, class xEnt *, class xScene *, float, class xCollis *); // offset 0x5B0, size 0x4 + void (*post)(class xEnt*, class xScene*, float, class xEntCollis*); // offset 0x5AC, size 0x4 + unsigned int (*depenq)(class xEnt*, class xEnt*, class xScene*, float, + class xCollis*); // offset 0x5B0, size 0x4 }; -class RxPipelineNodeTopSortData { +class RxPipelineNodeTopSortData +{ // total size: 0xC public: unsigned int numIns; // offset 0x0, size 0x4 unsigned int numInsVisited; // offset 0x4, size 0x4 - class rxReq * req; // offset 0x8, size 0x4 + class rxReq* req; // offset 0x8, size 0x4 }; -class RpSkin { +class RpSkin +{ // total size: 0x0 }; -class rxHeapBlockHeader { +class rxHeapBlockHeader +{ // total size: 0x20 public: - class rxHeapBlockHeader * prev; // offset 0x0, size 0x4 - class rxHeapBlockHeader * next; // offset 0x4, size 0x4 + class rxHeapBlockHeader* prev; // offset 0x0, size 0x4 + class rxHeapBlockHeader* next; // offset 0x4, size 0x4 unsigned int size; // offset 0x8, size 0x4 - class rxHeapFreeBlock * freeEntry; // offset 0xC, size 0x4 + class rxHeapFreeBlock* freeEntry; // offset 0xC, size 0x4 unsigned int pad[4]; // offset 0x10, size 0x10 }; -class RwStreamCustom { +class RwStreamCustom +{ // total size: 0x14 public: - signed int (* sfnclose)(void *); // offset 0x0, size 0x4 - unsigned int (* sfnread)(void *, void *, unsigned int); // offset 0x4, size 0x4 - signed int (* sfnwrite)(void *, void *, unsigned int); // offset 0x8, size 0x4 - signed int (* sfnskip)(void *, unsigned int); // offset 0xC, size 0x4 - void * data; // offset 0x10, size 0x4 + signed int (*sfnclose)(void*); // offset 0x0, size 0x4 + unsigned int (*sfnread)(void*, void*, unsigned int); // offset 0x4, size 0x4 + signed int (*sfnwrite)(void*, void*, unsigned int); // offset 0x8, size 0x4 + signed int (*sfnskip)(void*, unsigned int); // offset 0xC, size 0x4 + void* data; // offset 0x10, size 0x4 }; -class RpWorldSector { +class RpWorldSector +{ // total size: 0x90 public: signed int type; // offset 0x0, size 0x4 - class RpPolygon * polygons; // offset 0x4, size 0x4 - class RwV3d * vertices; // offset 0x8, size 0x4 - class RpVertexNormal * normals; // offset 0xC, size 0x4 - class RwTexCoords * texCoords[8]; // offset 0x10, size 0x20 - class RwRGBA * preLitLum; // offset 0x30, size 0x4 - class RwResEntry * repEntry; // offset 0x34, size 0x4 + class RpPolygon* polygons; // offset 0x4, size 0x4 + class RwV3d* vertices; // offset 0x8, size 0x4 + class RpVertexNormal* normals; // offset 0xC, size 0x4 + class RwTexCoords* texCoords[8]; // offset 0x10, size 0x20 + class RwRGBA* preLitLum; // offset 0x30, size 0x4 + class RwResEntry* repEntry; // offset 0x34, size 0x4 class RwLinkList collAtomicsInWorldSector; // offset 0x38, size 0x8 class RwLinkList noCollAtomicsInWorldSector; // offset 0x40, size 0x8 class RwLinkList lightsInWorldSector; // offset 0x48, size 0x8 class RwBBox boundingBox; // offset 0x50, size 0x18 class RwBBox tightBoundingBox; // offset 0x68, size 0x18 - class RpMeshHeader * mesh; // offset 0x80, size 0x4 - class RxPipeline * pipeline; // offset 0x84, size 0x4 + class RpMeshHeader* mesh; // offset 0x80, size 0x4 + class RxPipeline* pipeline; // offset 0x84, size 0x4 unsigned short matListWindowBase; // offset 0x88, size 0x2 unsigned short numVertices; // offset 0x8A, size 0x2 unsigned short numPolygons; // offset 0x8C, size 0x2 unsigned short pad; // offset 0x8E, size 0x2 }; -class /* @class */ { +class /* @class */ +{ // total size: 0xC public: float t; // offset 0x0, size 0x4 float u; // offset 0x4, size 0x4 float v; // offset 0x8, size 0x4 }; -class RpMorphTarget { +class RpMorphTarget +{ // total size: 0x1C public: - class RpGeometry * parentGeom; // offset 0x0, size 0x4 + class RpGeometry* parentGeom; // offset 0x0, size 0x4 class RwSphere boundingSphere; // offset 0x4, size 0x10 - class RwV3d * verts; // offset 0x14, size 0x4 - class RwV3d * normals; // offset 0x18, size 0x4 + class RwV3d* verts; // offset 0x14, size 0x4 + class RwV3d* normals; // offset 0x18, size 0x4 }; -class RpGeometry { +class RpGeometry +{ // total size: 0x60 public: class RwObject object; // offset 0x0, size 0x8 @@ -521,30 +566,34 @@ class RpGeometry { signed int numMorphTargets; // offset 0x18, size 0x4 signed int numTexCoordSets; // offset 0x1C, size 0x4 class RpMaterialList matList; // offset 0x20, size 0xC - class RpTriangle * triangles; // offset 0x2C, size 0x4 - class RwRGBA * preLitLum; // offset 0x30, size 0x4 - class RwTexCoords * texCoords[8]; // offset 0x34, size 0x20 - class RpMeshHeader * mesh; // offset 0x54, size 0x4 - class RwResEntry * repEntry; // offset 0x58, size 0x4 - class RpMorphTarget * morphTarget; // offset 0x5C, size 0x4 -}; -class RtAnimInterpolatorInfo { + class RpTriangle* triangles; // offset 0x2C, size 0x4 + class RwRGBA* preLitLum; // offset 0x30, size 0x4 + class RwTexCoords* texCoords[8]; // offset 0x34, size 0x20 + class RpMeshHeader* mesh; // offset 0x54, size 0x4 + class RwResEntry* repEntry; // offset 0x58, size 0x4 + class RpMorphTarget* morphTarget; // offset 0x5C, size 0x4 +}; +class RtAnimInterpolatorInfo +{ // total size: 0x30 public: signed int typeID; // offset 0x0, size 0x4 signed int interpKeyFrameSize; // offset 0x4, size 0x4 signed int animKeyFrameSize; // offset 0x8, size 0x4 - void (* keyFrameApplyCB)(void *, void *); // offset 0xC, size 0x4 - void (* keyFrameBlendCB)(void *, void *, void *, float); // offset 0x10, size 0x4 - void (* keyFrameInterpolateCB)(void *, void *, void *, float, void *); // offset 0x14, size 0x4 - void (* keyFrameAddCB)(void *, void *, void *); // offset 0x18, size 0x4 - void (* keyFrameMulRecipCB)(void *, void *); // offset 0x1C, size 0x4 - class RtAnimAnimation * (* keyFrameStreamReadCB)(class RwStream *, class RtAnimAnimation *); // offset 0x20, size 0x4 - signed int (* keyFrameStreamWriteCB)(class RtAnimAnimation *, class RwStream *); // offset 0x24, size 0x4 - signed int (* keyFrameStreamGetSizeCB)(class RtAnimAnimation *); // offset 0x28, size 0x4 + void (*keyFrameApplyCB)(void*, void*); // offset 0xC, size 0x4 + void (*keyFrameBlendCB)(void*, void*, void*, float); // offset 0x10, size 0x4 + void (*keyFrameInterpolateCB)(void*, void*, void*, float, void*); // offset 0x14, size 0x4 + void (*keyFrameAddCB)(void*, void*, void*); // offset 0x18, size 0x4 + void (*keyFrameMulRecipCB)(void*, void*); // offset 0x1C, size 0x4 + class RtAnimAnimation* (*keyFrameStreamReadCB)(class RwStream*, + class RtAnimAnimation*); // offset 0x20, size 0x4 + signed int (*keyFrameStreamWriteCB)(class RtAnimAnimation*, + class RwStream*); // offset 0x24, size 0x4 + signed int (*keyFrameStreamGetSizeCB)(class RtAnimAnimation*); // offset 0x28, size 0x4 signed int customDataSize; // offset 0x2C, size 0x4 }; -class RpLight { +class RpLight +{ // total size: 0x40 public: class RwObjectHasFrame object; // offset 0x0, size 0x14 @@ -556,41 +605,46 @@ class RpLight { unsigned short lightFrame; // offset 0x3C, size 0x2 unsigned short pad; // offset 0x3E, size 0x2 }; -class xClumpCollBSPVertInfo { +class xClumpCollBSPVertInfo +{ // total size: 0x4 public: unsigned short atomIndex; // offset 0x0, size 0x2 unsigned short meshVertIndex; // offset 0x2, size 0x2 }; -class xAnimFile { +class xAnimFile +{ // total size: 0x20 public: - class xAnimFile * Next; // offset 0x0, size 0x4 - char * Name; // offset 0x4, size 0x4 + class xAnimFile* Next; // offset 0x0, size 0x4 + char* Name; // offset 0x4, size 0x4 unsigned int ID; // offset 0x8, size 0x4 unsigned int FileFlags; // offset 0xC, size 0x4 float Duration; // offset 0x10, size 0x4 float TimeOffset; // offset 0x14, size 0x4 unsigned short BoneCount; // offset 0x18, size 0x2 unsigned char NumAnims[2]; // offset 0x1A, size 0x2 - void * * RawData; // offset 0x1C, size 0x4 + void** RawData; // offset 0x1C, size 0x4 }; -class RxPipelineRequiresCluster { +class RxPipelineRequiresCluster +{ // total size: 0xC public: - class RxClusterDefinition * clusterDef; // offset 0x0, size 0x4 + class RxClusterDefinition* clusterDef; // offset 0x0, size 0x4 enum RxClusterValidityReq rqdOrOpt; // offset 0x4, size 0x4 unsigned int slotIndex; // offset 0x8, size 0x4 }; -class RpHAnimNodeInfo { +class RpHAnimNodeInfo +{ // total size: 0x10 public: signed int nodeID; // offset 0x0, size 0x4 signed int nodeIndex; // offset 0x4, size 0x4 signed int flags; // offset 0x8, size 0x4 - class RwFrame * pFrame; // offset 0xC, size 0x4 + class RwFrame* pFrame; // offset 0xC, size 0x4 }; -class xClumpCollBSPBranchNode { +class xClumpCollBSPBranchNode +{ // total size: 0x10 public: unsigned int leftInfo; // offset 0x0, size 0x4 @@ -598,7 +652,8 @@ class xClumpCollBSPBranchNode { float leftValue; // offset 0x8, size 0x4 float rightValue; // offset 0xC, size 0x4 }; -class _tagxPad { +class _tagxPad +{ // total size: 0x148 public: unsigned char value[22]; // offset 0x0, size 0x16 @@ -621,45 +676,54 @@ class _tagxPad { float down_tmr[22]; // offset 0xC0, size 0x58 class analog_data analog[2]; // offset 0x118, size 0x30 }; -class xModelTag { +class xModelTag +{ // total size: 0x20 public: class xVec3 v; // offset 0x0, size 0xC unsigned int matidx; // offset 0xC, size 0x4 float wt[4]; // offset 0x10, size 0x10 }; -class xClumpCollBSPTriangle { +class xClumpCollBSPTriangle +{ // total size: 0x8 public: - class /* @class */ { + class /* @class */ + { // total size: 0x4 public: - union { // inferred + union + { // inferred class xClumpCollBSPVertInfo i; // offset 0x0, size 0x4 - class RwV3d * p; // offset 0x0, size 0x4 + class RwV3d* p; // offset 0x0, size 0x4 }; } v; // offset 0x0, size 0x4 unsigned char flags; // offset 0x4, size 0x1 unsigned char platData; // offset 0x5, size 0x1 unsigned short matIndex; // offset 0x6, size 0x2 }; -class xModelPool { +class xModelPool +{ // total size: 0xC public: - class xModelPool * Next; // offset 0x0, size 0x4 + class xModelPool* Next; // offset 0x0, size 0x4 unsigned int NumMatrices; // offset 0x4, size 0x4 - class xModelInstance * List; // offset 0x8, size 0x4 + class xModelInstance* List; // offset 0x8, size 0x4 }; -class xFFX { +class xFFX +{ // total size: 0x0 }; -class xAnimTransition { +class xAnimTransition +{ // total size: 0x2C public: - class xAnimTransition * Next; // offset 0x0, size 0x4 - class xAnimState * Dest; // offset 0x4, size 0x4 - unsigned int (* Conditional)(class xAnimTransition *, class xAnimSingle *, void *); // offset 0x8, size 0x4 - unsigned int (* Callback)(class xAnimTransition *, class xAnimSingle *, void *); // offset 0xC, size 0x4 + class xAnimTransition* Next; // offset 0x0, size 0x4 + class xAnimState* Dest; // offset 0x4, size 0x4 + unsigned int (*Conditional)(class xAnimTransition*, class xAnimSingle*, + void*); // offset 0x8, size 0x4 + unsigned int (*Callback)(class xAnimTransition*, class xAnimSingle*, + void*); // offset 0xC, size 0x4 unsigned int Flags; // offset 0x10, size 0x4 unsigned int UserFlags; // offset 0x14, size 0x4 float SrcTime; // offset 0x18, size 0x4 @@ -667,15 +731,17 @@ class xAnimTransition { unsigned short Priority; // offset 0x20, size 0x2 unsigned short QueuePriority; // offset 0x22, size 0x2 float BlendRecip; // offset 0x24, size 0x4 - unsigned short * BlendOffset; // offset 0x28, size 0x4 + unsigned short* BlendOffset; // offset 0x28, size 0x4 }; -class xAnimTransitionList { +class xAnimTransitionList +{ // total size: 0x8 public: - class xAnimTransitionList * Next; // offset 0x0, size 0x4 - class xAnimTransition * T; // offset 0x4, size 0x4 + class xAnimTransitionList* Next; // offset 0x0, size 0x4 + class xAnimTransition* T; // offset 0x4, size 0x4 }; -class xQCData { +class xQCData +{ // total size: 0x20 public: signed char xmin; // offset 0x0, size 0x1 @@ -689,7 +755,8 @@ class xQCData { class xVec3 min; // offset 0x8, size 0xC class xVec3 max; // offset 0x14, size 0xC }; -class zLasso { +class zLasso +{ // total size: 0xFC public: unsigned int flags; // offset 0x0, size 0x4 @@ -716,20 +783,23 @@ class zLasso { unsigned char reindex[5]; // offset 0xC4, size 0x5 class xVec3 anchor; // offset 0xCC, size 0xC class xModelTag tag; // offset 0xD8, size 0x20 - class xModelInstance * model; // offset 0xF8, size 0x4 + class xModelInstance* model; // offset 0xF8, size 0x4 }; -class zPlatform { +class zPlatform +{ // total size: 0x0 }; -class RpUserDataArray { +class RpUserDataArray +{ // total size: 0x10 public: - char * name; // offset 0x0, size 0x4 + char* name; // offset 0x0, size 0x4 enum RpUserDataFormat format; // offset 0x4, size 0x4 signed int numElements; // offset 0x8, size 0x4 - void * data; // offset 0xC, size 0x4 + void* data; // offset 0xC, size 0x4 }; -class xEnvAsset : public xBaseAsset { +class xEnvAsset : public xBaseAsset +{ // total size: 0x44 public: unsigned int bspAssetID; // offset 0x8, size 0x4 @@ -748,38 +818,43 @@ class xEnvAsset : public xBaseAsset { unsigned int bspMapperFXID; // offset 0x3C, size 0x4 float loldHeight; // offset 0x40, size 0x4 }; -class _tagxRumble { +class _tagxRumble +{ // total size: 0x10 public: enum _tagRumbleType type; // offset 0x0, size 0x4 float seconds; // offset 0x4, size 0x4 - class _tagxRumble * next; // offset 0x8, size 0x4 + class _tagxRumble* next; // offset 0x8, size 0x4 signed short active; // offset 0xC, size 0x2 unsigned short fxflags; // offset 0xE, size 0x2 }; -class xAnimPlay { +class xAnimPlay +{ // total size: 0x20 public: - class xAnimPlay * Next; // offset 0x0, size 0x4 + class xAnimPlay* Next; // offset 0x0, size 0x4 unsigned short NumSingle; // offset 0x4, size 0x2 unsigned short BoneCount; // offset 0x6, size 0x2 - class xAnimSingle * Single; // offset 0x8, size 0x4 - void * Object; // offset 0xC, size 0x4 - class xAnimTable * Table; // offset 0x10, size 0x4 - class xMemPool * Pool; // offset 0x14, size 0x4 - class xModelInstance * ModelInst; // offset 0x18, size 0x4 - void (* BeforeAnimMatrices)(class xAnimPlay *, class xQuat *, class xVec3 *, signed int); // offset 0x1C, size 0x4 -}; -class zGlobals : public xGlobals { + class xAnimSingle* Single; // offset 0x8, size 0x4 + void* Object; // offset 0xC, size 0x4 + class xAnimTable* Table; // offset 0x10, size 0x4 + class xMemPool* Pool; // offset 0x14, size 0x4 + class xModelInstance* ModelInst; // offset 0x18, size 0x4 + void (*BeforeAnimMatrices)(class xAnimPlay*, class xQuat*, class xVec3*, + signed int); // offset 0x1C, size 0x4 +}; +class zGlobals : public xGlobals +{ // total size: 0x2050 public: class zPlayerGlobals player; // offset 0x700, size 0x1940 - class zAssetPickupTable * pickupTable; // offset 0x2040, size 0x4 - class zCutsceneMgr * cmgr; // offset 0x2044, size 0x4 - class zScene * sceneCur; // offset 0x2048, size 0x4 - class zScene * scenePreload; // offset 0x204C, size 0x4 + class zAssetPickupTable* pickupTable; // offset 0x2040, size 0x4 + class zCutsceneMgr* cmgr; // offset 0x2044, size 0x4 + class zScene* sceneCur; // offset 0x2048, size 0x4 + class zScene* scenePreload; // offset 0x204C, size 0x4 }; -class RwFrame { +class RwFrame +{ // total size: 0xB0 public: class RwObject object; // offset 0x0, size 0x8 @@ -787,11 +862,12 @@ class RwFrame { class RwMatrixTag modelling; // offset 0x10, size 0x40 class RwMatrixTag ltm; // offset 0x50, size 0x40 class RwLinkList objectList; // offset 0x90, size 0x8 - class RwFrame * child; // offset 0x98, size 0x4 - class RwFrame * next; // offset 0x9C, size 0x4 - class RwFrame * root; // offset 0xA0, size 0x4 + class RwFrame* child; // offset 0x98, size 0x4 + class RwFrame* next; // offset 0x9C, size 0x4 + class RwFrame* root; // offset 0xA0, size 0x4 }; -class xVec4 { +class xVec4 +{ // total size: 0x10 public: float x; // offset 0x0, size 0x4 @@ -799,7 +875,8 @@ class xVec4 { float z; // offset 0x8, size 0x4 float w; // offset 0xC, size 0x4 }; -class xShadowSimpleCache { +class xShadowSimpleCache +{ // total size: 0x98 public: unsigned short flags; // offset 0x0, size 0x2 @@ -808,7 +885,7 @@ class xShadowSimpleCache { unsigned int collPriority; // offset 0x4, size 0x4 class xVec3 pos; // offset 0x8, size 0xC class xVec3 at; // offset 0x14, size 0xC - class xEnt * castOnEnt; // offset 0x20, size 0x4 + class xEnt* castOnEnt; // offset 0x20, size 0x4 class xShadowSimplePoly poly; // offset 0x24, size 0x30 float envHeight; // offset 0x54, size 0x4 float shadowHeight; // offset 0x58, size 0x4 @@ -817,37 +894,42 @@ class xShadowSimpleCache { float dydz; // offset 0x64, size 0x4 class xVec3 corner[4]; // offset 0x68, size 0x30 }; -class RtAnimInterpolator { +class RtAnimInterpolator +{ // total size: 0x4C public: - class RtAnimAnimation * pCurrentAnim; // offset 0x0, size 0x4 + class RtAnimAnimation* pCurrentAnim; // offset 0x0, size 0x4 float currentTime; // offset 0x4, size 0x4 - void * pNextFrame; // offset 0x8, size 0x4 - class RtAnimInterpolator * (* pAnimCallBack)(class RtAnimInterpolator *, void *); // offset 0xC, size 0x4 - void * pAnimCallBackData; // offset 0x10, size 0x4 + void* pNextFrame; // offset 0x8, size 0x4 + class RtAnimInterpolator* (*pAnimCallBack)(class RtAnimInterpolator*, + void*); // offset 0xC, size 0x4 + void* pAnimCallBackData; // offset 0x10, size 0x4 float animCallBackTime; // offset 0x14, size 0x4 - class RtAnimInterpolator * (* pAnimLoopCallBack)(class RtAnimInterpolator *, void *); // offset 0x18, size 0x4 - void * pAnimLoopCallBackData; // offset 0x1C, size 0x4 + class RtAnimInterpolator* (*pAnimLoopCallBack)(class RtAnimInterpolator*, + void*); // offset 0x18, size 0x4 + void* pAnimLoopCallBackData; // offset 0x1C, size 0x4 signed int maxInterpKeyFrameSize; // offset 0x20, size 0x4 signed int currentInterpKeyFrameSize; // offset 0x24, size 0x4 signed int currentAnimKeyFrameSize; // offset 0x28, size 0x4 signed int numNodes; // offset 0x2C, size 0x4 signed int isSubInterpolator; // offset 0x30, size 0x4 signed int offsetInParent; // offset 0x34, size 0x4 - class RtAnimInterpolator * parentAnimation; // offset 0x38, size 0x4 - void (* keyFrameApplyCB)(void *, void *); // offset 0x3C, size 0x4 - void (* keyFrameBlendCB)(void *, void *, void *, float); // offset 0x40, size 0x4 - void (* keyFrameInterpolateCB)(void *, void *, void *, float, void *); // offset 0x44, size 0x4 - void (* keyFrameAddCB)(void *, void *, void *); // offset 0x48, size 0x4 -}; -class RwSurfaceProperties { + class RtAnimInterpolator* parentAnimation; // offset 0x38, size 0x4 + void (*keyFrameApplyCB)(void*, void*); // offset 0x3C, size 0x4 + void (*keyFrameBlendCB)(void*, void*, void*, float); // offset 0x40, size 0x4 + void (*keyFrameInterpolateCB)(void*, void*, void*, float, void*); // offset 0x44, size 0x4 + void (*keyFrameAddCB)(void*, void*, void*); // offset 0x48, size 0x4 +}; +class RwSurfaceProperties +{ // total size: 0xC public: float ambient; // offset 0x0, size 0x4 float specular; // offset 0x4, size 0x4 float diffuse; // offset 0x8, size 0x4 }; -class zGlobalSettings { +class zGlobalSettings +{ // total size: 0x150 public: unsigned short AnalogMin; // offset 0x0, size 0x2 @@ -937,7 +1019,8 @@ class zGlobalSettings { unsigned char PowerUp[2]; // offset 0x149, size 0x2 unsigned char InitialPowerUp[2]; // offset 0x14B, size 0x2 }; -class xLinkAsset { +class xLinkAsset +{ // total size: 0x20 public: unsigned short srcEvent; // offset 0x0, size 0x2 @@ -947,36 +1030,41 @@ class xLinkAsset { unsigned int paramWidgetAssetID; // offset 0x18, size 0x4 unsigned int chkAssetID; // offset 0x1C, size 0x4 }; -class rxHeapSuperBlockDescriptor { +class rxHeapSuperBlockDescriptor +{ // total size: 0xC public: - void * start; // offset 0x0, size 0x4 + void* start; // offset 0x0, size 0x4 unsigned int size; // offset 0x4, size 0x4 - class rxHeapSuperBlockDescriptor * next; // offset 0x8, size 0x4 + class rxHeapSuperBlockDescriptor* next; // offset 0x8, size 0x4 }; -class xEntShadow { +class xEntShadow +{ // total size: 0x28 public: class xVec3 pos; // offset 0x0, size 0xC class xVec3 vec; // offset 0xC, size 0xC - class RpAtomic * shadowModel; // offset 0x18, size 0x4 + class RpAtomic* shadowModel; // offset 0x18, size 0x4 float dst_cast; // offset 0x1C, size 0x4 float radius[2]; // offset 0x20, size 0x8 }; -class _zPortal : public xBase { +class _zPortal : public xBase +{ // total size: 0x14 public: - class xPortalAsset * passet; // offset 0x10, size 0x4 + class xPortalAsset* passet; // offset 0x10, size 0x4 }; -class xGroup : public xBase { +class xGroup : public xBase +{ // total size: 0x20 public: - class xGroupAsset * asset; // offset 0x10, size 0x4 - class xBase * * item; // offset 0x14, size 0x4 + class xGroupAsset* asset; // offset 0x10, size 0x4 + class xBase** item; // offset 0x14, size 0x4 unsigned int last_index; // offset 0x18, size 0x4 signed int flg_group; // offset 0x1C, size 0x4 }; -class RpClump { +class RpClump +{ // total size: 0x2C public: class RwObject object; // offset 0x0, size 0x8 @@ -984,29 +1072,33 @@ class RpClump { class RwLinkList lightList; // offset 0x10, size 0x8 class RwLinkList cameraList; // offset 0x18, size 0x8 class RwLLLink inWorldLink; // offset 0x20, size 0x8 - class RpClump * (* callback)(class RpClump *, void *); // offset 0x28, size 0x4 + class RpClump* (*callback)(class RpClump*, void*); // offset 0x28, size 0x4 }; -class zAssetPickupTable { +class zAssetPickupTable +{ // total size: 0x0 }; -class rxReq { +class rxReq +{ // total size: 0x0 }; -class xUpdateCullEnt { +class xUpdateCullEnt +{ // total size: 0x10 public: unsigned short index; // offset 0x0, size 0x2 signed short groupIndex; // offset 0x2, size 0x2 - unsigned int (* cb)(void *, void *); // offset 0x4, size 0x4 - void * cbdata; // offset 0x8, size 0x4 - class xUpdateCullEnt * nextInGroup; // offset 0xC, size 0x4 + unsigned int (*cb)(void*, void*); // offset 0x4, size 0x4 + void* cbdata; // offset 0x8, size 0x4 + class xUpdateCullEnt* nextInGroup; // offset 0xC, size 0x4 }; -class RwRaster { +class RwRaster +{ // total size: 0x34 public: - class RwRaster * parent; // offset 0x0, size 0x4 - unsigned char * cpPixels; // offset 0x4, size 0x4 - unsigned char * palette; // offset 0x8, size 0x4 + class RwRaster* parent; // offset 0x0, size 0x4 + unsigned char* cpPixels; // offset 0x4, size 0x4 + unsigned char* palette; // offset 0x8, size 0x4 signed int width; // offset 0xC, size 0x4 signed int height; // offset 0x10, size 0x4 signed int depth; // offset 0x14, size 0x4 @@ -1017,91 +1109,104 @@ class RwRaster { unsigned char cFlags; // offset 0x21, size 0x1 unsigned char privateFlags; // offset 0x22, size 0x1 unsigned char cFormat; // offset 0x23, size 0x1 - unsigned char * originalPixels; // offset 0x24, size 0x4 + unsigned char* originalPixels; // offset 0x24, size 0x4 signed int originalWidth; // offset 0x28, size 0x4 signed int originalHeight; // offset 0x2C, size 0x4 signed int originalStride; // offset 0x30, size 0x4 }; -class zCutsceneMgr { +class zCutsceneMgr +{ // total size: 0x0 }; -class zPlayerLassoInfo { +class zPlayerLassoInfo +{ // total size: 0x120 public: - class xEnt * target; // offset 0x0, size 0x4 + class xEnt* target; // offset 0x0, size 0x4 float dist; // offset 0x4, size 0x4 unsigned char destroy; // offset 0x8, size 0x1 unsigned char targetGuide; // offset 0x9, size 0x1 float lassoRot; // offset 0xC, size 0x4 - class xEnt * swingTarget; // offset 0x10, size 0x4 - class xEnt * releasedSwing; // offset 0x14, size 0x4 + class xEnt* swingTarget; // offset 0x10, size 0x4 + class xEnt* releasedSwing; // offset 0x14, size 0x4 float copterTime; // offset 0x18, size 0x4 signed int canCopter; // offset 0x1C, size 0x4 class zLasso lasso; // offset 0x20, size 0xFC - class xAnimState * zeroAnim; // offset 0x11C, size 0x4 + class xAnimState* zeroAnim; // offset 0x11C, size 0x4 }; -class anim_coll_data { +class anim_coll_data +{ // total size: 0x0 }; -class xGroupAsset : public xBaseAsset { +class xGroupAsset : public xBaseAsset +{ // total size: 0xC public: unsigned short itemCount; // offset 0x8, size 0x2 unsigned short groupFlags; // offset 0xA, size 0x2 }; -enum RxClusterValidityReq { +enum RxClusterValidityReq +{ rxCLREQ_DONTWANT = 0, rxCLREQ_REQUIRED = 1, rxCLREQ_OPTIONAL = 2, rxCLUSTERVALIDITYREQFORCEENUMSIZEINT = 2147483647, }; -class zScene : public xScene { +class zScene : public xScene +{ // total size: 0x2C8 public: - class _zPortal * pendingPortal; // offset 0x70, size 0x4 - union { // inferred + class _zPortal* pendingPortal; // offset 0x70, size 0x4 + union + { // inferred unsigned int num_ents; // offset 0x74, size 0x4 unsigned int num_base; // offset 0x74, size 0x4 }; - union { // inferred - class xBase * * base; // offset 0x78, size 0x4 - class zEnt * * ents; // offset 0x78, size 0x4 + union + { // inferred + class xBase** base; // offset 0x78, size 0x4 + class zEnt** ents; // offset 0x78, size 0x4 }; unsigned int num_update_base; // offset 0x7C, size 0x4 - class xBase * * update_base; // offset 0x80, size 0x4 + class xBase** update_base; // offset 0x80, size 0x4 unsigned int baseCount[72]; // offset 0x84, size 0x120 - class xBase * baseList[72]; // offset 0x1A4, size 0x120 - class _zEnv * zen; // offset 0x2C4, size 0x4 + class xBase* baseList[72]; // offset 0x1A4, size 0x120 + class _zEnv* zen; // offset 0x2C4, size 0x4 }; -class xSphere { +class xSphere +{ // total size: 0x10 public: class xVec3 center; // offset 0x0, size 0xC float r; // offset 0xC, size 0x4 }; -class RwLLLink { +class RwLLLink +{ // total size: 0x8 public: - class RwLLLink * next; // offset 0x0, size 0x4 - class RwLLLink * prev; // offset 0x4, size 0x4 + class RwLLLink* next; // offset 0x0, size 0x4 + class RwLLLink* prev; // offset 0x4, size 0x4 }; -class RwStreamUnion { +class RwStreamUnion +{ // total size: 0x14 public: - union { // inferred + union + { // inferred class RwStreamMemory memory; // offset 0x0, size 0xC class RwStreamFile file; // offset 0x0, size 0x4 class RwStreamCustom custom; // offset 0x0, size 0x14 }; }; -class zLedgeGrabParams { +class zLedgeGrabParams +{ // total size: 0x380 public: float animGrab; // offset 0x0, size 0x4 float zdist; // offset 0x4, size 0x4 class xVec3 tranTable[60]; // offset 0x8, size 0x2D0 signed int tranCount; // offset 0x2D8, size 0x4 - class xEnt * optr; // offset 0x2DC, size 0x4 + class xEnt* optr; // offset 0x2DC, size 0x4 class xMat4x3 omat; // offset 0x2E0, size 0x40 float y0det; // offset 0x320, size 0x4 float dydet; // offset 0x324, size 0x4 @@ -1119,49 +1224,58 @@ class zLedgeGrabParams { float startrot; // offset 0x36C, size 0x4 float endrot; // offset 0x370, size 0x4 }; -class xAnimMultiFile : public xAnimMultiFileBase { +class xAnimMultiFile : public xAnimMultiFileBase +{ // total size: 0xC public: class xAnimMultiFileEntry Files[1]; // offset 0x4, size 0x8 }; -class /* @class */ { +class /* @class */ +{ // total size: 0x4 public: - union { // inferred + union + { // inferred class xClumpCollBSPVertInfo i; // offset 0x0, size 0x4 - class RwV3d * p; // offset 0x0, size 0x4 + class RwV3d* p; // offset 0x0, size 0x4 }; }; -class xMat4x3 : public xMat3x3 { +class xMat4x3 : public xMat3x3 +{ // total size: 0x40 public: class xVec3 pos; // offset 0x30, size 0xC unsigned int pad3; // offset 0x3C, size 0x4 }; -class xVec2 { +class xVec2 +{ // total size: 0x8 public: float x; // offset 0x0, size 0x4 float y; // offset 0x4, size 0x4 }; -enum RxNodeDefEditable { +enum RxNodeDefEditable +{ rxNODEDEFCONST = 0, rxNODEDEFEDITABLE = 1, rxNODEDEFEDITABLEFORCEENUMSIZEINT = 2147483647, }; -enum RxClusterValid { +enum RxClusterValid +{ rxCLVALID_NOCHANGE = 0, rxCLVALID_VALID = 1, rxCLVALID_INVALID = 2, rxCLUSTERVALIDFORCEENUMSIZEINT = 2147483647, }; -enum _zPlayerWallJumpState { +enum _zPlayerWallJumpState +{ k_WALLJUMP_NOT = 0, k_WALLJUMP_LAUNCH = 1, k_WALLJUMP_FLIGHT = 2, k_WALLJUMP_LAND = 3, }; -enum RwStreamType { +enum RwStreamType +{ rwNASTREAM = 0, rwSTREAMFILE = 1, rwSTREAMFILENAME = 2, @@ -1169,7 +1283,8 @@ enum RwStreamType { rwSTREAMCUSTOM = 4, rwSTREAMTYPEFORCEENUMSIZEINT = 2147483647, }; -class xBaseAsset { +class xBaseAsset +{ // total size: 0x8 public: unsigned int id; // offset 0x0, size 0x4 @@ -1177,7 +1292,8 @@ class xBaseAsset { unsigned char linkCount; // offset 0x5, size 0x1 unsigned short baseFlags; // offset 0x6, size 0x2 }; -class RpVertexNormal { +class RpVertexNormal +{ // total size: 0x4 public: signed char x; // offset 0x0, size 0x1 @@ -1185,79 +1301,90 @@ class RpVertexNormal { signed char z; // offset 0x2, size 0x1 unsigned char pad; // offset 0x3, size 0x1 }; -class xSurface { +class xSurface +{ // total size: 0x0 }; -class xAnimTable { +class xAnimTable +{ // total size: 0x1C public: - class xAnimTable * Next; // offset 0x0, size 0x4 - char * Name; // offset 0x4, size 0x4 - class xAnimTransition * TransitionList; // offset 0x8, size 0x4 - class xAnimState * StateList; // offset 0xC, size 0x4 + class xAnimTable* Next; // offset 0x0, size 0x4 + char* Name; // offset 0x4, size 0x4 + class xAnimTransition* TransitionList; // offset 0x8, size 0x4 + class xAnimState* StateList; // offset 0xC, size 0x4 unsigned int AnimIndex; // offset 0x10, size 0x4 unsigned int MorphIndex; // offset 0x14, size 0x4 unsigned int UserFlags; // offset 0x18, size 0x4 }; -class rxHeapFreeBlock { +class rxHeapFreeBlock +{ // total size: 0x8 public: unsigned int size; // offset 0x0, size 0x4 - class rxHeapBlockHeader * ptr; // offset 0x4, size 0x4 + class rxHeapBlockHeader* ptr; // offset 0x4, size 0x4 }; -class xRot { +class xRot +{ // total size: 0x10 public: class xVec3 axis; // offset 0x0, size 0xC float angle; // offset 0xC, size 0x4 }; -class xModelTagWithNormal : public xModelTag { +class xModelTagWithNormal : public xModelTag +{ // total size: 0x2C public: class xVec3 normal; // offset 0x20, size 0xC }; -class xBound { +class xBound +{ // total size: 0x4C public: class xQCData qcd; // offset 0x0, size 0x20 unsigned char type; // offset 0x20, size 0x1 unsigned char pad[3]; // offset 0x21, size 0x3 - union { // inferred + union + { // inferred class xSphere sph; // offset 0x24, size 0x10 class xBBox box; // offset 0x24, size 0x24 class xCylinder cyl; // offset 0x24, size 0x14 }; - class xMat4x3 * mat; // offset 0x48, size 0x4 + class xMat4x3* mat; // offset 0x48, size 0x4 }; -class iEnv { +class iEnv +{ // total size: 0x30 public: - class RpWorld * world; // offset 0x0, size 0x4 - class RpWorld * collision; // offset 0x4, size 0x4 - class RpWorld * fx; // offset 0x8, size 0x4 - class RpWorld * camera; // offset 0xC, size 0x4 - class xJSPHeader * jsp; // offset 0x10, size 0x4 - class RpLight * light[2]; // offset 0x14, size 0x8 - class RwFrame * light_frame[2]; // offset 0x1C, size 0x8 + class RpWorld* world; // offset 0x0, size 0x4 + class RpWorld* collision; // offset 0x4, size 0x4 + class RpWorld* fx; // offset 0x8, size 0x4 + class RpWorld* camera; // offset 0xC, size 0x4 + class xJSPHeader* jsp; // offset 0x10, size 0x4 + class RpLight* light[2]; // offset 0x14, size 0x8 + class RwFrame* light_frame[2]; // offset 0x1C, size 0x8 signed int memlvl; // offset 0x24, size 0x4 }; -enum rxEmbeddedPacketState { +enum rxEmbeddedPacketState +{ rxPKST_PACKETLESS = 0, rxPKST_UNUSED = 1, rxPKST_INUSE = 2, rxPKST_PENDING = 3, rxEMBEDDEDPACKETSTATEFORCEENUMSIZEINT = 2147483647, }; -class xModelBucket { +class xModelBucket +{ // total size: 0x14 public: - class RpAtomic * Data; // offset 0x0, size 0x4 - class RpAtomic * OriginalData; // offset 0x4, size 0x4 - class xModelInstance * List; // offset 0x8, size 0x4 + class RpAtomic* Data; // offset 0x0, size 0x4 + class RpAtomic* OriginalData; // offset 0x4, size 0x4 + class xModelInstance* List; // offset 0x8, size 0x4 signed int ClipFlags; // offset 0xC, size 0x4 unsigned int PipeFlags; // offset 0x10, size 0x4 }; -enum _tagRumbleType { +enum _tagRumbleType +{ eRumble_Off = 0, eRumble_Hi = 1, eRumble_VeryLightHi = 2, @@ -1273,7 +1400,8 @@ enum _tagRumbleType { eRumble_Total = 12, eRumbleForceU32 = 2147483647, }; -class RpInterpolator { +class RpInterpolator +{ // total size: 0x14 public: signed int flags; // offset 0x0, size 0x4 @@ -1283,7 +1411,8 @@ class RpInterpolator { float recipTime; // offset 0xC, size 0x4 float position; // offset 0x10, size 0x4 }; -class RwFrustumPlane { +class RwFrustumPlane +{ // total size: 0x14 public: class RwPlane plane; // offset 0x0, size 0x10 @@ -1292,45 +1421,52 @@ class RwFrustumPlane { unsigned char closestZ; // offset 0x12, size 0x1 unsigned char pad; // offset 0x13, size 0x1 }; -enum _zPlayerType { +enum _zPlayerType +{ ePlayer_SB = 0, ePlayer_Patrick = 1, ePlayer_Sandy = 2, ePlayer_MAXTYPES = 3, }; -class xUpdateCullGroup { +class xUpdateCullGroup +{ // total size: 0xC public: unsigned int active; // offset 0x0, size 0x4 unsigned short startIndex; // offset 0x4, size 0x2 unsigned short endIndex; // offset 0x6, size 0x2 - class xGroup * groupObject; // offset 0x8, size 0x4 + class xGroup* groupObject; // offset 0x8, size 0x4 }; -class xLightKit { +class xLightKit +{ // total size: 0x10 public: unsigned int tagID; // offset 0x0, size 0x4 unsigned int groupID; // offset 0x4, size 0x4 unsigned int lightCount; // offset 0x8, size 0x4 - class xLightKitLight * lightList; // offset 0xC, size 0x4 + class xLightKitLight* lightList; // offset 0xC, size 0x4 }; -enum RwCameraProjection { +enum RwCameraProjection +{ rwNACAMERAPROJECTION = 0, rwPERSPECTIVE = 1, rwPARALLEL = 2, rwCAMERAPROJECTIONFORCEENUMSIZEINT = 2147483647, }; -class zEnt : public xEnt { +class zEnt : public xEnt +{ // total size: 0xD4 public: - class xAnimTable * atbl; // offset 0xD0, size 0x4 + class xAnimTable* atbl; // offset 0xD0, size 0x4 }; -enum RxClusterForcePresent { +enum RxClusterForcePresent +{ rxCLALLOWABSENT = 0, rxCLFORCEPRESENT = 1, rxCLUSTERFORCEPRESENTFORCEENUMSIZEINT = 2147483647, }; -class RwStream { +class RwStream +{ // total size: 0x24 public: enum RwStreamType type; // offset 0x0, size 0x4 @@ -1339,26 +1475,30 @@ class RwStream { class RwStreamUnion Type; // offset 0xC, size 0x14 signed int rwOwned; // offset 0x20, size 0x4 }; -class xCylinder { +class xCylinder +{ // total size: 0x14 public: class xVec3 center; // offset 0x0, size 0xC float r; // offset 0xC, size 0x4 float h; // offset 0x10, size 0x4 }; -class xJSPNodeInfo { +class xJSPNodeInfo +{ // total size: 0x8 public: signed int originalMatIndex; // offset 0x0, size 0x4 signed int nodeFlags; // offset 0x4, size 0x4 }; -class xBBox { +class xBBox +{ // total size: 0x24 public: class xVec3 center; // offset 0x0, size 0xC class xBox box; // offset 0xC, size 0x18 }; -class analog_data { +class analog_data +{ // total size: 0x18 public: class xVec2 offset; // offset 0x0, size 0x8 @@ -1366,54 +1506,60 @@ class analog_data { float mag; // offset 0x10, size 0x4 float ang; // offset 0x14, size 0x4 }; -class xBox { +class xBox +{ // total size: 0x18 public: class xVec3 upper; // offset 0x0, size 0xC class xVec3 lower; // offset 0xC, size 0xC }; -class RxClusterDefinition { +class RxClusterDefinition +{ // total size: 0x10 public: - char * name; // offset 0x0, size 0x4 + char* name; // offset 0x0, size 0x4 unsigned int defaultStride; // offset 0x4, size 0x4 unsigned int defaultAttributes; // offset 0x8, size 0x4 - char * attributeSet; // offset 0xC, size 0x4 + char* attributeSet; // offset 0xC, size 0x4 }; -class RpPolygon { +class RpPolygon +{ // total size: 0x8 public: unsigned short matIndex; // offset 0x0, size 0x2 unsigned short vertIndex[3]; // offset 0x2, size 0x6 }; -enum RwStreamAccessType { +enum RwStreamAccessType +{ rwNASTREAMACCESS = 0, rwSTREAMREAD = 1, rwSTREAMWRITE = 2, rwSTREAMAPPEND = 3, rwSTREAMACCESSTYPEFORCEENUMSIZEINT = 2147483647, }; -class RpMaterialList { +class RpMaterialList +{ // total size: 0xC public: - class RpMaterial * * materials; // offset 0x0, size 0x4 + class RpMaterial** materials; // offset 0x0, size 0x4 signed int numMaterials; // offset 0x4, size 0x4 signed int space; // offset 0x8, size 0x4 }; -class zPlayerGlobals { +class zPlayerGlobals +{ // total size: 0x1940 public: class zEnt ent; // offset 0x0, size 0xD4 class xEntShadow entShadow_embedded; // offset 0xD4, size 0x28 class xShadowSimpleCache simpShadow_embedded; // offset 0xFC, size 0x98 class zGlobalSettings g; // offset 0x194, size 0x150 - class zPlayerSettings * s; // offset 0x2E4, size 0x4 + class zPlayerSettings* s; // offset 0x2E4, size 0x4 class zPlayerSettings sb; // offset 0x2F0, size 0x460 class zPlayerSettings patrick; // offset 0x750, size 0x460 class zPlayerSettings sandy; // offset 0xBB0, size 0x460 - class xModelInstance * model_spongebob; // offset 0x1010, size 0x4 - class xModelInstance * model_patrick; // offset 0x1014, size 0x4 - class xModelInstance * model_sandy; // offset 0x1018, size 0x4 + class xModelInstance* model_spongebob; // offset 0x1010, size 0x4 + class xModelInstance* model_patrick; // offset 0x1014, size 0x4 + class xModelInstance* model_sandy; // offset 0x1018, size 0x4 unsigned int Visible; // offset 0x101C, size 0x4 unsigned int Health; // offset 0x1020, size 0x4 signed int Speed; // offset 0x1024, size 0x4 @@ -1435,7 +1581,7 @@ class zPlayerGlobals { float HotsauceTimer; // offset 0x1064, size 0x4 float LeanLerp; // offset 0x1068, size 0x4 float ScareTimer; // offset 0x106C, size 0x4 - class xBase * ScareSource; // offset 0x1070, size 0x4 + class xBase* ScareSource; // offset 0x1070, size 0x4 float CowerTimer; // offset 0x1074, size 0x4 float DamageTimer; // offset 0x1078, size 0x4 float SundaeTimer; // offset 0x107C, size 0x4 @@ -1447,7 +1593,7 @@ class zPlayerGlobals { float HeadbuttVel; // offset 0x1094, size 0x4 float HeadbuttTimer; // offset 0x1098, size 0x4 unsigned int SpecialReceived; // offset 0x109C, size 0x4 - class xEnt * MountChimney; // offset 0x10A0, size 0x4 + class xEnt* MountChimney; // offset 0x10A0, size 0x4 float MountChimOldY; // offset 0x10A4, size 0x4 unsigned int MaxHealth; // offset 0x10A8, size 0x4 unsigned int DoMeleeCheck; // offset 0x10AC, size 0x4 @@ -1468,24 +1614,24 @@ class zPlayerGlobals { float IdleMajorTimer; // offset 0x10E8, size 0x4 float IdleSitTimer; // offset 0x10EC, size 0x4 signed int Transparent; // offset 0x10F0, size 0x4 - class zEnt * FireTarget; // offset 0x10F4, size 0x4 + class zEnt* FireTarget; // offset 0x10F4, size 0x4 unsigned int ControlOff; // offset 0x10F8, size 0x4 unsigned int ControlOnEvent; // offset 0x10FC, size 0x4 unsigned int AutoMoveSpeed; // offset 0x1100, size 0x4 float AutoMoveDist; // offset 0x1104, size 0x4 class xVec3 AutoMoveTarget; // offset 0x1108, size 0xC - class xBase * AutoMoveObject; // offset 0x1114, size 0x4 - class zEnt * Diggable; // offset 0x1118, size 0x4 + class xBase* AutoMoveObject; // offset 0x1114, size 0x4 + class zEnt* Diggable; // offset 0x1118, size 0x4 float DigTimer; // offset 0x111C, size 0x4 class zPlayerCarryInfo carry; // offset 0x1120, size 0xE0 class zPlayerLassoInfo lassoInfo; // offset 0x1200, size 0x120 class xModelTag BubbleWandTag[2]; // offset 0x1320, size 0x40 - class xModelInstance * model_wand; // offset 0x1360, size 0x4 - class xEntBoulder * bubblebowl; // offset 0x1364, size 0x4 + class xModelInstance* model_wand; // offset 0x1360, size 0x4 + class xEntBoulder* bubblebowl; // offset 0x1364, size 0x4 float bbowlInitVel; // offset 0x1368, size 0x4 - class zEntHangable * HangFound; // offset 0x136C, size 0x4 - class zEntHangable * HangEnt; // offset 0x1370, size 0x4 - class zEntHangable * HangEntLast; // offset 0x1374, size 0x4 + class zEntHangable* HangFound; // offset 0x136C, size 0x4 + class zEntHangable* HangEnt; // offset 0x1370, size 0x4 + class zEntHangable* HangEntLast; // offset 0x1374, size 0x4 class xVec3 HangPivot; // offset 0x1378, size 0xC class xVec3 HangVel; // offset 0x1384, size 0xC float HangLength; // offset 0x1390, size 0x4 @@ -1500,7 +1646,7 @@ class zPlayerGlobals { signed int Jump_CanDouble; // offset 0x1438, size 0x4 signed int Jump_CanFloat; // offset 0x143C, size 0x4 signed int Jump_SpringboardStart; // offset 0x1440, size 0x4 - class zPlatform * Jump_Springboard; // offset 0x1444, size 0x4 + class zPlatform* Jump_Springboard; // offset 0x1444, size 0x4 signed int CanJump; // offset 0x1448, size 0x4 signed int CanBubbleSpin; // offset 0x144C, size 0x4 signed int CanBubbleBounce; // offset 0x1450, size 0x4 @@ -1525,7 +1671,7 @@ class zPlayerGlobals { unsigned int Inv_PatsSock_Total; // offset 0x1544, size 0x4 class xModelTag BubbleTag; // offset 0x1548, size 0x20 class xEntDrive drv; // offset 0x1568, size 0x7C - class xSurface * floor_surf; // offset 0x15E4, size 0x4 + class xSurface* floor_surf; // offset 0x15E4, size 0x4 class xVec3 floor_norm; // offset 0x15E8, size 0xC signed int slope; // offset 0x15F4, size 0x4 class xCollis earc_coll; // offset 0x15F8, size 0x50 @@ -1538,7 +1684,7 @@ class zPlayerGlobals { class zCheckPoint cp; // offset 0x16B8, size 0x14 unsigned int SlideTrackSliding; // offset 0x16CC, size 0x4 unsigned int SlideTrackCount; // offset 0x16D0, size 0x4 - class xEnt * SlideTrackEnt[111]; // offset 0x16D4, size 0x1BC + class xEnt* SlideTrackEnt[111]; // offset 0x16D4, size 0x1BC unsigned int SlideNotGroundedSinceSlide; // offset 0x1890, size 0x4 class xVec3 SlideTrackDir; // offset 0x1894, size 0xC class xVec3 SlideTrackVel; // offset 0x18A0, size 0xC @@ -1546,7 +1692,7 @@ class zPlayerGlobals { float SlideTrackLean; // offset 0x18B0, size 0x4 float SlideTrackLand; // offset 0x18B4, size 0x4 unsigned char sb_model_indices[14]; // offset 0x18B8, size 0xE - class xModelInstance * sb_models[14]; // offset 0x18C8, size 0x38 + class xModelInstance* sb_models[14]; // offset 0x18C8, size 0x38 unsigned int currentPlayer; // offset 0x1900, size 0x4 class xVec3 PredictRotate; // offset 0x1904, size 0xC class xVec3 PredictTranslate; // offset 0x1910, size 0xC @@ -1556,56 +1702,64 @@ class zPlayerGlobals { float KnockBackTimer; // offset 0x1930, size 0x4 float KnockIntoAirTimer; // offset 0x1934, size 0x4 }; -class zCheckPoint { +class zCheckPoint +{ // total size: 0x14 public: class xVec3 pos; // offset 0x0, size 0xC float rot; // offset 0xC, size 0x4 unsigned int initCamID; // offset 0x10, size 0x4 }; -class RwSphere { +class RwSphere +{ // total size: 0x10 public: class RwV3d center; // offset 0x0, size 0xC float radius; // offset 0xC, size 0x4 }; -class xAnimMultiFileEntry { +class xAnimMultiFileEntry +{ // total size: 0x8 public: unsigned int ID; // offset 0x0, size 0x4 - class xAnimFile * File; // offset 0x4, size 0x4 + class xAnimFile* File; // offset 0x4, size 0x4 }; -class xAnimActiveEffect { +class xAnimActiveEffect +{ // total size: 0x8 public: - class xAnimEffect * Effect; // offset 0x0, size 0x4 + class xAnimEffect* Effect; // offset 0x0, size 0x4 unsigned int Handle; // offset 0x4, size 0x4 }; -class xJSPHeader { +class xJSPHeader +{ // total size: 0x18 public: char idtag[4]; // offset 0x0, size 0x4 unsigned int version; // offset 0x4, size 0x4 unsigned int jspNodeCount; // offset 0x8, size 0x4 - class RpClump * clump; // offset 0xC, size 0x4 - class xClumpCollBSPTree * colltree; // offset 0x10, size 0x4 - class xJSPNodeInfo * jspNodeList; // offset 0x14, size 0x4 + class RpClump* clump; // offset 0xC, size 0x4 + class xClumpCollBSPTree* colltree; // offset 0x10, size 0x4 + class xJSPNodeInfo* jspNodeList; // offset 0x14, size 0x4 }; -class RwTexDictionary { +class RwTexDictionary +{ // total size: 0x18 public: class RwObject object; // offset 0x0, size 0x8 class RwLinkList texturesInDict; // offset 0x8, size 0x8 class RwLLLink lInInstance; // offset 0x10, size 0x8 }; -enum RpUserDataFormat { +enum RpUserDataFormat +{ rpNAUSERDATAFORMAT = 0, rpINTUSERDATA = 1, rpREALUSERDATA = 2, rpSTRINGUSERDATA = 3, rpUSERDATAFORCEENUMSIZEINT = 2147483647, }; -class xPortalAsset : public xBaseAsset { +class xPortalAsset : public xBaseAsset +{ // total size: 0x18 public: unsigned int assetCameraID; // offset 0x8, size 0x4 @@ -1613,27 +1767,29 @@ class xPortalAsset : public xBaseAsset { float ang; // offset 0x10, size 0x4 unsigned int sceneID; // offset 0x14, size 0x4 }; -class xGridBound { +class xGridBound +{ // total size: 0x14 public: - void * data; // offset 0x0, size 0x4 + void* data; // offset 0x0, size 0x4 unsigned short gx; // offset 0x4, size 0x2 unsigned short gz; // offset 0x6, size 0x2 unsigned char ingrid; // offset 0x8, size 0x1 unsigned char oversize; // offset 0x9, size 0x1 unsigned char deleted; // offset 0xA, size 0x1 unsigned char gpad; // offset 0xB, size 0x1 - class xGridBound * * head; // offset 0xC, size 0x4 - class xGridBound * next; // offset 0x10, size 0x4 + class xGridBound** head; // offset 0xC, size 0x4 + class xGridBound* next; // offset 0x10, size 0x4 }; -class zPlayerCarryInfo { +class zPlayerCarryInfo +{ // total size: 0xE0 public: - class xEnt * grabbed; // offset 0x0, size 0x4 + class xEnt* grabbed; // offset 0x0, size 0x4 unsigned int grabbedModelID; // offset 0x4, size 0x4 class xMat4x3 spin; // offset 0x10, size 0x40 - class xEnt * throwTarget; // offset 0x50, size 0x4 - class xEnt * flyingToTarget; // offset 0x54, size 0x4 + class xEnt* throwTarget; // offset 0x50, size 0x4 + class xEnt* flyingToTarget; // offset 0x54, size 0x4 float minDist; // offset 0x58, size 0x4 float maxDist; // offset 0x5C, size 0x4 float minHeight; // offset 0x60, size 0x4 @@ -1663,37 +1819,41 @@ class zPlayerCarryInfo { float fruitCeilingBounce; // offset 0xC8, size 0x4 float fruitWallBounce; // offset 0xCC, size 0x4 float fruitLifetime; // offset 0xD0, size 0x4 - class xEnt * patLauncher; // offset 0xD4, size 0x4 + class xEnt* patLauncher; // offset 0xD4, size 0x4 }; -class RxOutputSpec { +class RxOutputSpec +{ // total size: 0xC public: - char * name; // offset 0x0, size 0x4 - enum RxClusterValid * outputClusters; // offset 0x4, size 0x4 + char* name; // offset 0x0, size 0x4 + enum RxClusterValid* outputClusters; // offset 0x4, size 0x4 enum RxClusterValid allOtherClusters; // offset 0x8, size 0x4 }; -class xUpdateCullMgr { +class xUpdateCullMgr +{ // total size: 0x2C public: unsigned int entCount; // offset 0x0, size 0x4 unsigned int entActive; // offset 0x4, size 0x4 - void * * ent; // offset 0x8, size 0x4 - class xUpdateCullEnt * * mgr; // offset 0xC, size 0x4 + void** ent; // offset 0x8, size 0x4 + class xUpdateCullEnt** mgr; // offset 0xC, size 0x4 unsigned int mgrCount; // offset 0x10, size 0x4 unsigned int mgrCurr; // offset 0x14, size 0x4 - class xUpdateCullEnt * mgrList; // offset 0x18, size 0x4 + class xUpdateCullEnt* mgrList; // offset 0x18, size 0x4 unsigned int grpCount; // offset 0x1C, size 0x4 - class xUpdateCullGroup * grpList; // offset 0x20, size 0x4 - void (* activateCB)(void *); // offset 0x24, size 0x4 - void (* deactivateCB)(void *); // offset 0x28, size 0x4 + class xUpdateCullGroup* grpList; // offset 0x20, size 0x4 + void (*activateCB)(void*); // offset 0x24, size 0x4 + void (*deactivateCB)(void*); // offset 0x28, size 0x4 }; -class RwMemory { +class RwMemory +{ // total size: 0x8 public: - unsigned char * start; // offset 0x0, size 0x4 + unsigned char* start; // offset 0x0, size 0x4 unsigned int length; // offset 0x4, size 0x4 }; -class zPlayerSettings { +class zPlayerSettings +{ // total size: 0x460 public: enum _zPlayerType pcType; // offset 0x0, size 0x4 @@ -1720,26 +1880,28 @@ class zPlayerSettings { unsigned char talk_filter_size; // offset 0x459, size 0x1 unsigned char talk_filter[4]; // offset 0x45A, size 0x4 }; -class xAnimSingle { +class xAnimSingle +{ // total size: 0x40 public: unsigned int SingleFlags; // offset 0x0, size 0x4 - class xAnimState * State; // offset 0x4, size 0x4 + class xAnimState* State; // offset 0x4, size 0x4 float Time; // offset 0x8, size 0x4 float CurrentSpeed; // offset 0xC, size 0x4 float BilinearLerp[2]; // offset 0x10, size 0x8 - class xAnimEffect * Effect; // offset 0x18, size 0x4 + class xAnimEffect* Effect; // offset 0x18, size 0x4 unsigned int ActiveCount; // offset 0x1C, size 0x4 float LastTime; // offset 0x20, size 0x4 - class xAnimActiveEffect * ActiveList; // offset 0x24, size 0x4 - class xAnimPlay * Play; // offset 0x28, size 0x4 - class xAnimTransition * Sync; // offset 0x2C, size 0x4 - class xAnimTransition * Tran; // offset 0x30, size 0x4 - class xAnimSingle * Blend; // offset 0x34, size 0x4 + class xAnimActiveEffect* ActiveList; // offset 0x24, size 0x4 + class xAnimPlay* Play; // offset 0x28, size 0x4 + class xAnimTransition* Sync; // offset 0x2C, size 0x4 + class xAnimTransition* Tran; // offset 0x30, size 0x4 + class xAnimSingle* Blend; // offset 0x34, size 0x4 float BlendFactor; // offset 0x38, size 0x4 unsigned int pad; // offset 0x3C, size 0x4 }; -class xLightKitLight { +class xLightKitLight +{ // total size: 0x60 public: unsigned int type; // offset 0x0, size 0x4 @@ -1747,9 +1909,10 @@ class xLightKitLight { float matrix[16]; // offset 0x14, size 0x40 float radius; // offset 0x54, size 0x4 float angle; // offset 0x58, size 0x4 - class RpLight * platLight; // offset 0x5C, size 0x4 + class RpLight* platLight; // offset 0x5C, size 0x4 }; -class xMat3x3 { +class xMat3x3 +{ // total size: 0x30 public: class xVec3 right; // offset 0x0, size 0xC @@ -1759,19 +1922,20 @@ class xMat3x3 { class xVec3 at; // offset 0x20, size 0xC unsigned int pad2; // offset 0x2C, size 0x4 }; -class xCamera : public xBase { +class xCamera : public xBase +{ // total size: 0x330 public: - class RwCamera * lo_cam; // offset 0x10, size 0x4 + class RwCamera* lo_cam; // offset 0x10, size 0x4 class xMat4x3 mat; // offset 0x20, size 0x40 class xMat4x3 omat; // offset 0x60, size 0x40 class xMat3x3 mbasis; // offset 0xA0, size 0x30 class xBound bound; // offset 0xD0, size 0x4C - class xMat4x3 * tgt_mat; // offset 0x11C, size 0x4 - class xMat4x3 * tgt_omat; // offset 0x120, size 0x4 - class xBound * tgt_bound; // offset 0x124, size 0x4 + class xMat4x3* tgt_mat; // offset 0x11C, size 0x4 + class xMat4x3* tgt_omat; // offset 0x120, size 0x4 + class xBound* tgt_bound; // offset 0x124, size 0x4 class xVec3 focus; // offset 0x128, size 0xC - class xScene * sc; // offset 0x134, size 0x4 + class xScene* sc; // offset 0x134, size 0x4 class xVec3 tran_accum; // offset 0x138, size 0xC float fov; // offset 0x144, size 0x4 unsigned int flags; // offset 0x148, size 0x4 @@ -1839,35 +2003,40 @@ class xCamera : public xBase { float roll_csv; // offset 0x264, size 0x4 class xVec4 frustplane[12]; // offset 0x270, size 0xC0 }; -class RwStreamMemory { +class RwStreamMemory +{ // total size: 0xC public: unsigned int position; // offset 0x0, size 0x4 unsigned int nSize; // offset 0x4, size 0x4 - unsigned char * memBlock; // offset 0x8, size 0x4 + unsigned char* memBlock; // offset 0x8, size 0x4 }; -class RxClusterRef { +class RxClusterRef +{ // total size: 0xC public: - class RxClusterDefinition * clusterDef; // offset 0x0, size 0x4 + class RxClusterDefinition* clusterDef; // offset 0x0, size 0x4 enum RxClusterForcePresent forcePresent; // offset 0x4, size 0x4 unsigned int reserved; // offset 0x8, size 0x4 }; -class _zEnv : public xBase { +class _zEnv : public xBase +{ // total size: 0x14 public: - class xEnvAsset * easset; // offset 0x10, size 0x4 + class xEnvAsset* easset; // offset 0x10, size 0x4 }; -class RwObject { +class RwObject +{ // total size: 0x8 public: unsigned char type; // offset 0x0, size 0x1 unsigned char subType; // offset 0x1, size 0x1 unsigned char flags; // offset 0x2, size 0x1 unsigned char privateFlags; // offset 0x3, size 0x1 - void * parent; // offset 0x4, size 0x4 + void* parent; // offset 0x4, size 0x4 }; -class RwMatrixWeights { +class RwMatrixWeights +{ // total size: 0x10 public: float w0; // offset 0x0, size 0x4 @@ -1875,67 +2044,78 @@ class RwMatrixWeights { float w2; // offset 0x8, size 0x4 float w3; // offset 0xC, size 0x4 }; -class RxIoSpec { +class RxIoSpec +{ // total size: 0x14 public: unsigned int numClustersOfInterest; // offset 0x0, size 0x4 - class RxClusterRef * clustersOfInterest; // offset 0x4, size 0x4 - enum RxClusterValidityReq * inputRequirements; // offset 0x8, size 0x4 + class RxClusterRef* clustersOfInterest; // offset 0x4, size 0x4 + enum RxClusterValidityReq* inputRequirements; // offset 0x8, size 0x4 unsigned int numOutputs; // offset 0xC, size 0x4 - class RxOutputSpec * outputs; // offset 0x10, size 0x4 + class RxOutputSpec* outputs; // offset 0x10, size 0x4 }; -class xAnimMultiFileBase { +class xAnimMultiFileBase +{ // total size: 0x4 public: unsigned int Count; // offset 0x0, size 0x4 }; -class /* @class */ { +class /* @class */ +{ // total size: 0x4 public: - class xVec3 * verts; // offset 0x0, size 0x4 + class xVec3* verts; // offset 0x0, size 0x4 }; -class xMemPool { +class xMemPool +{ // total size: 0x1C public: - void * FreeList; // offset 0x0, size 0x4 + void* FreeList; // offset 0x0, size 0x4 unsigned short NextOffset; // offset 0x4, size 0x2 unsigned short Flags; // offset 0x6, size 0x2 - void * UsedList; // offset 0x8, size 0x4 - void (* InitCB)(class xMemPool *, void *); // offset 0xC, size 0x4 - void * Buffer; // offset 0x10, size 0x4 + void* UsedList; // offset 0x8, size 0x4 + void (*InitCB)(class xMemPool*, void*); // offset 0xC, size 0x4 + void* Buffer; // offset 0x10, size 0x4 unsigned short Size; // offset 0x14, size 0x2 unsigned short NumRealloc; // offset 0x16, size 0x2 unsigned int Total; // offset 0x18, size 0x4 }; -class RwTexture { +class RwTexture +{ // total size: 0x58 public: - class RwRaster * raster; // offset 0x0, size 0x4 - class RwTexDictionary * dict; // offset 0x4, size 0x4 + class RwRaster* raster; // offset 0x0, size 0x4 + class RwTexDictionary* dict; // offset 0x4, size 0x4 class RwLLLink lInDictionary; // offset 0x8, size 0x8 char name[32]; // offset 0x10, size 0x20 char mask[32]; // offset 0x30, size 0x20 unsigned int filterAddressing; // offset 0x50, size 0x4 signed int refCount; // offset 0x54, size 0x4 }; -class RxNodeMethods { +class RxNodeMethods +{ // total size: 0x1C public: - signed int (* nodeBody)(class RxPipelineNode *, class RxPipelineNodeParam *); // offset 0x0, size 0x4 - signed int (* nodeInit)(class RxNodeDefinition *); // offset 0x4, size 0x4 - void (* nodeTerm)(class RxNodeDefinition *); // offset 0x8, size 0x4 - signed int (* pipelineNodeInit)(class RxPipelineNode *); // offset 0xC, size 0x4 - void (* pipelineNodeTerm)(class RxPipelineNode *); // offset 0x10, size 0x4 - signed int (* pipelineNodeConfig)(class RxPipelineNode *, class RxPipeline *); // offset 0x14, size 0x4 - unsigned int (* configMsgHandler)(class RxPipelineNode *, unsigned int, unsigned int, void *); // offset 0x18, size 0x4 -}; -class RxPipelineCluster { + signed int (*nodeBody)(class RxPipelineNode*, + class RxPipelineNodeParam*); // offset 0x0, size 0x4 + signed int (*nodeInit)(class RxNodeDefinition*); // offset 0x4, size 0x4 + void (*nodeTerm)(class RxNodeDefinition*); // offset 0x8, size 0x4 + signed int (*pipelineNodeInit)(class RxPipelineNode*); // offset 0xC, size 0x4 + void (*pipelineNodeTerm)(class RxPipelineNode*); // offset 0x10, size 0x4 + signed int (*pipelineNodeConfig)(class RxPipelineNode*, + class RxPipeline*); // offset 0x14, size 0x4 + unsigned int (*configMsgHandler)(class RxPipelineNode*, unsigned int, unsigned int, + void*); // offset 0x18, size 0x4 +}; +class RxPipelineCluster +{ // total size: 0x8 public: - class RxClusterDefinition * clusterRef; // offset 0x0, size 0x4 + class RxClusterDefinition* clusterRef; // offset 0x0, size 0x4 unsigned int creationAttributes; // offset 0x4, size 0x4 }; -class xEntDrive { +class xEntDrive +{ // total size: 0x7C public: unsigned int flags; // offset 0x0, size 0x4 @@ -1945,9 +2125,9 @@ class xEntDrive { float tm; // offset 0x10, size 0x4 float tmr; // offset 0x14, size 0x4 float s; // offset 0x18, size 0x4 - class xEnt * odriver; // offset 0x1C, size 0x4 - class xEnt * driver; // offset 0x20, size 0x4 - class xEnt * driven; // offset 0x24, size 0x4 + class xEnt* odriver; // offset 0x1C, size 0x4 + class xEnt* driver; // offset 0x20, size 0x4 + class xEnt* driven; // offset 0x24, size 0x4 class xVec3 op; // offset 0x28, size 0xC class xVec3 p; // offset 0x34, size 0xC class xVec3 q; // offset 0x40, size 0xC @@ -1955,7 +2135,8 @@ class xEntDrive { class xVec3 dloc; // offset 0x50, size 0xC class tri_data tri; // offset 0x5C, size 0x20 }; -class xEntAsset : public xBaseAsset { +class xEntAsset : public xBaseAsset +{ // total size: 0x54 public: unsigned char flags; // offset 0x8, size 0x1 @@ -1975,7 +2156,8 @@ class xEntAsset : public xBaseAsset { unsigned int modelInfoID; // offset 0x4C, size 0x4 unsigned int animListID; // offset 0x50, size 0x4 }; -class iFogParams { +class iFogParams +{ // total size: 0x1C public: enum RwFogType type; // offset 0x0, size 0x4 @@ -1984,57 +2166,65 @@ class iFogParams { float density; // offset 0xC, size 0x4 class RwRGBA fogcolor; // offset 0x10, size 0x4 class RwRGBA bgcolor; // offset 0x14, size 0x4 - unsigned char * table; // offset 0x18, size 0x4 + unsigned char* table; // offset 0x18, size 0x4 }; -class RxNodeDefinition { +class RxNodeDefinition +{ // total size: 0x40 public: - char * name; // offset 0x0, size 0x4 + char* name; // offset 0x0, size 0x4 class RxNodeMethods nodeMethods; // offset 0x4, size 0x1C class RxIoSpec io; // offset 0x20, size 0x14 unsigned int pipelineNodePrivateDataSize; // offset 0x34, size 0x4 enum RxNodeDefEditable editable; // offset 0x38, size 0x4 signed int InputPipesCnt; // offset 0x3C, size 0x4 }; -class RwStreamFile { +class RwStreamFile +{ // total size: 0x4 public: - union { // inferred - void * fpFile; // offset 0x0, size 0x4 - void * constfpFile; // offset 0x0, size 0x4 + union + { // inferred + void* fpFile; // offset 0x0, size 0x4 + void* constfpFile; // offset 0x0, size 0x4 }; }; -class RwPlane { +class RwPlane +{ // total size: 0x10 public: class RwV3d normal; // offset 0x0, size 0xC float distance; // offset 0xC, size 0x4 }; -class RxCluster { +class RxCluster +{ // total size: 0x1C public: unsigned short flags; // offset 0x0, size 0x2 unsigned short stride; // offset 0x2, size 0x2 - void * data; // offset 0x4, size 0x4 - void * currentData; // offset 0x8, size 0x4 + void* data; // offset 0x4, size 0x4 + void* currentData; // offset 0x8, size 0x4 unsigned int numAlloced; // offset 0xC, size 0x4 unsigned int numUsed; // offset 0x10, size 0x4 - class RxPipelineCluster * clusterRef; // offset 0x14, size 0x4 + class RxPipelineCluster* clusterRef; // offset 0x14, size 0x4 unsigned int attributes; // offset 0x18, size 0x4 }; -class RpTriangle { +class RpTriangle +{ // total size: 0x8 public: unsigned short vertIndex[3]; // offset 0x0, size 0x6 signed short matIndex; // offset 0x6, size 0x2 }; -class RxPipelineNodeParam { +class RxPipelineNodeParam +{ // total size: 0x8 public: - void * dataParam; // offset 0x0, size 0x4 - class RxHeap * heap; // offset 0x4, size 0x4 + void* dataParam; // offset 0x0, size 0x4 + class RxHeap* heap; // offset 0x4, size 0x4 }; -class zJumpParam { +class zJumpParam +{ // total size: 0x10 public: float PeakHeight; // offset 0x0, size 0x4 @@ -2042,51 +2232,57 @@ class zJumpParam { float TimeHold; // offset 0x8, size 0x4 float ImpulseVel; // offset 0xC, size 0x4 }; -class RxPacket { +class RxPacket +{ // total size: 0x30 public: unsigned short flags; // offset 0x0, size 0x2 unsigned short numClusters; // offset 0x2, size 0x2 - class RxPipeline * pipeline; // offset 0x4, size 0x4 - unsigned int * inputToClusterSlot; // offset 0x8, size 0x4 - unsigned int * slotsContinue; // offset 0xC, size 0x4 - class RxPipelineCluster * * slotClusterRefs; // offset 0x10, size 0x4 + class RxPipeline* pipeline; // offset 0x4, size 0x4 + unsigned int* inputToClusterSlot; // offset 0x8, size 0x4 + unsigned int* slotsContinue; // offset 0xC, size 0x4 + class RxPipelineCluster** slotClusterRefs; // offset 0x10, size 0x4 class RxCluster clusters[1]; // offset 0x14, size 0x1C }; -class xEntBoulder { +class xEntBoulder +{ // total size: 0x0 }; -enum _tagPadState { +enum _tagPadState +{ ePad_Disabled = 0, ePad_DisabledError = 1, ePad_Enabled = 2, ePad_Missing = 3, ePad_Total = 4, }; -class zEntHangable { +class zEntHangable +{ // total size: 0x0 }; -enum RwFogType { +enum RwFogType +{ rwFOGTYPENAFOGTYPE = 0, rwFOGTYPELINEAR = 1, rwFOGTYPEEXPONENTIAL = 2, rwFOGTYPEEXPONENTIAL2 = 3, rwFOGTYPEFORCEENUMSIZEINT = 2147483647, }; -class xGlobals { +class xGlobals +{ // total size: 0x700 public: class xCamera camera; // offset 0x0, size 0x330 - class _tagxPad * pad0; // offset 0x330, size 0x4 - class _tagxPad * pad1; // offset 0x334, size 0x4 - class _tagxPad * pad2; // offset 0x338, size 0x4 - class _tagxPad * pad3; // offset 0x33C, size 0x4 + class _tagxPad* pad0; // offset 0x330, size 0x4 + class _tagxPad* pad1; // offset 0x334, size 0x4 + class _tagxPad* pad2; // offset 0x338, size 0x4 + class _tagxPad* pad3; // offset 0x33C, size 0x4 signed int profile; // offset 0x340, size 0x4 char profFunc[6][128]; // offset 0x344, size 0x300 - class xUpdateCullMgr * updateMgr; // offset 0x644, size 0x4 + class xUpdateCullMgr* updateMgr; // offset 0x644, size 0x4 signed int sceneFirst; // offset 0x648, size 0x4 char sceneStart[32]; // offset 0x64C, size 0x20 - class RpWorld * currWorld; // offset 0x66C, size 0x4 + class RpWorld* currWorld; // offset 0x66C, size 0x4 class iFogParams fog; // offset 0x670, size 0x1C class iFogParams fogA; // offset 0x68C, size 0x1C class iFogParams fogB; // offset 0x6A8, size 0x1C @@ -2103,7 +2299,8 @@ class xGlobals { unsigned char dontShowPadMessageDuringLoadingOrCutScene; // offset 0x6F0, size 0x1 unsigned char autoSaveFeature; // offset 0x6F1, size 0x1 }; -class RwRGBAReal { +class RwRGBAReal +{ // total size: 0x10 public: float red; // offset 0x0, size 0x4 @@ -2111,64 +2308,74 @@ class RwRGBAReal { float blue; // offset 0x8, size 0x4 float alpha; // offset 0xC, size 0x4 }; -class RwObjectHasFrame { +class RwObjectHasFrame +{ // total size: 0x14 public: class RwObject object; // offset 0x0, size 0x8 class RwLLLink lFrame; // offset 0x8, size 0x8 - class RwObjectHasFrame * (* sync)(class RwObjectHasFrame *); // offset 0x10, size 0x4 + class RwObjectHasFrame* (*sync)(class RwObjectHasFrame*); // offset 0x10, size 0x4 }; -class xEnv { +class xEnv +{ // total size: 0x50 public: - class iEnv * geom; // offset 0x0, size 0x4 + class iEnv* geom; // offset 0x0, size 0x4 class iEnv ienv; // offset 0x10, size 0x30 - class xLightKit * lightKit; // offset 0x40, size 0x4 + class xLightKit* lightKit; // offset 0x40, size 0x4 }; -class xShadowSimplePoly { +class xShadowSimplePoly +{ // total size: 0x30 public: class xVec3 vert[3]; // offset 0x0, size 0x24 class xVec3 norm; // offset 0x24, size 0xC }; -class RwLinkList { +class RwLinkList +{ // total size: 0x8 public: class RwLLLink link; // offset 0x0, size 0x8 }; -class tri_data : public tri_data { +class tri_data : public tri_data +{ // total size: 0x20 public: class xVec3 loc; // offset 0xC, size 0xC float yaw; // offset 0x18, size 0x4 - class xCollis * coll; // offset 0x1C, size 0x4 + class xCollis* coll; // offset 0x1C, size 0x4 }; -class tri_data { +class tri_data +{ // total size: 0xC public: unsigned int index; // offset 0x0, size 0x4 float r; // offset 0x4, size 0x4 float d; // offset 0x8, size 0x4 }; -class RwV2d { +class RwV2d +{ // total size: 0x8 public: float x; // offset 0x0, size 0x4 float y; // offset 0x4, size 0x4 }; -class _tagPadAnalog { +class _tagPadAnalog +{ // total size: 0x2 public: signed char x; // offset 0x0, size 0x1 signed char y; // offset 0x1, size 0x1 }; -enum RpWorldRenderOrder { +enum RpWorldRenderOrder +{ rpWORLDRENDERNARENDERORDER = 0, rpWORLDRENDERFRONT2BACK = 1, rpWORLDRENDERBACK2FRONT = 2, rpWORLDRENDERORDERFORCEENUMSIZEINT = 2147483647, }; -class _tagiPad { +class _tagiPad +{ // total size: 0x4 public: signed int port; // offset 0x0, size 0x4 @@ -2181,11 +2388,13 @@ class _tagiPad { Code range: 0x001ACCC0 -> 0x001ACD2C */ // Range: 0x1ACCC0 -> 0x1ACD2C -void iModelMaterialMul(class RpAtomic * model /* r16 */, float rm /* r29+0x30 */, float gm /* r29+0x30 */, float bm /* r29+0x30 */) { +void iModelMaterialMul(class RpAtomic* model /* r16 */, float rm /* r29+0x30 */, + float gm /* r29+0x30 */, float bm /* r29+0x30 */) +{ // Blocks /* anonymous block */ { // Range: 0x1ACCC0 -> 0x1ACD2C - class RpGeometry * geom; // r2 + class RpGeometry* geom; // r2 float cols[3]; // r29+0x20 } } @@ -2197,14 +2406,16 @@ void iModelMaterialMul(class RpAtomic * model /* r16 */, float rm /* r29+0x30 */ Code range: 0x001ACD30 -> 0x001ACFF8 */ // Range: 0x1ACD30 -> 0x1ACFF8 -static class RpMaterial * iModelMaterialMulCB(class RpMaterial * material /* r2 */, void * data /* r2 */) { +static class RpMaterial* iModelMaterialMulCB(class RpMaterial* material /* r2 */, + void* data /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1ACD30 -> 0x1ACFF8 - class RwRGBA * rw_col; // r2 + class RwRGBA* rw_col; // r2 class RwRGBA col; // r29+0xC float tmp; // r1 - float * mods; // r2 + float* mods; // r2 } } @@ -2215,11 +2426,12 @@ static class RpMaterial * iModelMaterialMulCB(class RpMaterial * material /* r2 Code range: 0x001AD000 -> 0x001AD054 */ // Range: 0x1AD000 -> 0x1AD054 -void iModelSetMaterialTexture(class RpAtomic * model /* r16 */, void * texture /* r2 */) { +void iModelSetMaterialTexture(class RpAtomic* model /* r16 */, void* texture /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AD000 -> 0x1AD054 - class RpGeometry * geom; // r2 + class RpGeometry* geom; // r2 } } @@ -2230,7 +2442,9 @@ void iModelSetMaterialTexture(class RpAtomic * model /* r16 */, void * texture / Code range: 0x001AD060 -> 0x001AD0B0 */ // Range: 0x1AD060 -> 0x1AD0B0 -static class RpMaterial * iModelSetMaterialTextureCB(class RpMaterial * material /* r16 */, void * data /* r2 */) { +static class RpMaterial* iModelSetMaterialTextureCB(class RpMaterial* material /* r16 */, + void* data /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AD060 -> 0x1AD0B0 @@ -2244,13 +2458,14 @@ static class RpMaterial * iModelSetMaterialTextureCB(class RpMaterial * material Code range: 0x001AD0B0 -> 0x001AD2DC */ // Range: 0x1AD0B0 -> 0x1AD2DC -void iModelResetMaterial(class RpAtomic * model /* r2 */) { +void iModelResetMaterial(class RpAtomic* model /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AD0B0 -> 0x1AD2DC unsigned int i; // r20 - class RpGeometry * geom; // r21 - class RpMaterial * material; // r2 + class RpGeometry* geom; // r21 + class RpMaterial* material; // r2 class RwRGBA newColor; // r29+0xAC class RwRGBA newColor; // r29+0xA8 class RwRGBA newColor; // r29+0xA4 @@ -2264,14 +2479,15 @@ void iModelResetMaterial(class RpAtomic * model /* r2 */) { Code range: 0x001AD2E0 -> 0x001AD3C0 */ // Range: 0x1AD2E0 -> 0x1AD3C0 -void iModelSetMaterialAlpha(class RpAtomic * model /* r2 */, unsigned char alpha /* r2 */) { +void iModelSetMaterialAlpha(class RpAtomic* model /* r2 */, unsigned char alpha /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AD2E0 -> 0x1AD3C0 unsigned int i; // r11 - class RpGeometry * geom; // r10 - class RpMaterial * material; // r25 - class RwRGBA * col; // r2 + class RpGeometry* geom; // r10 + class RpMaterial* material; // r25 + class RwRGBA* col; // r2 class RwRGBA new_col; // r29+0xC } } @@ -2283,12 +2499,15 @@ void iModelSetMaterialAlpha(class RpAtomic * model /* r2 */, unsigned char alpha Code range: 0x001AD3C0 -> 0x001AD680 */ // Range: 0x1AD3C0 -> 0x1AD680 -void iModelTagEval(class RpAtomic * model /* r19 */, class xModelTagWithNormal * tag /* r18 */, class RwMatrixTag * mat /* r17 */, class xVec3 * dest /* r2 */, class xVec3 * normal /* r16 */) { +void iModelTagEval(class RpAtomic* model /* r19 */, class xModelTagWithNormal* tag /* r18 */, + class RwMatrixTag* mat /* r17 */, class xVec3* dest /* r2 */, + class xVec3* normal /* r16 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AD3C0 -> 0x1AD680 - class RpSkin * skin; // r2 - class RwMatrixTag * skinmat; // r29+0xC0 + class RpSkin* skin; // r2 + class RwMatrixTag* skinmat; // r29+0xC0 } } @@ -2299,13 +2518,15 @@ void iModelTagEval(class RpAtomic * model /* r19 */, class xModelTagWithNormal * Code range: 0x001AD680 -> 0x001AD960 */ // Range: 0x1AD680 -> 0x1AD960 -void iModelTagEval(class RpAtomic * model /* r2 */, class xModelTag * tag /* r19 */, class RwMatrixTag * mat /* r18 */, class xVec3 * dest /* r17 */) { +void iModelTagEval(class RpAtomic* model /* r2 */, class xModelTag* tag /* r19 */, + class RwMatrixTag* mat /* r18 */, class xVec3* dest /* r17 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AD680 -> 0x1AD960 - class RpGeometry * geom; // r2 - class RpSkin * skin; // r2 - class RwMatrixTag * skinmat; // r29+0xA0 + class RpGeometry* geom; // r2 + class RpSkin* skin; // r2 + class RwMatrixTag* skinmat; // r29+0xA0 } } @@ -2316,12 +2537,15 @@ void iModelTagEval(class RpAtomic * model /* r2 */, class xModelTag * tag /* r19 Code range: 0x001AD960 -> 0x001AD9C8 */ // Range: 0x1AD960 -> 0x1AD9C8 -unsigned int iModelTagSetup(class xModelTagWithNormal * tag /* r16 */, class RpAtomic * model /* r17 */, float x /* r29+0x30 */, float y /* r29+0x30 */, float z /* r29+0x30 */) { +unsigned int iModelTagSetup(class xModelTagWithNormal* tag /* r16 */, + class RpAtomic* model /* r17 */, float x /* r29+0x30 */, + float y /* r29+0x30 */, float z /* r29+0x30 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AD960 -> 0x1AD9C8 unsigned int index; // r2 - class xVec3 * normals; // r3 + class xVec3* normals; // r3 } } @@ -2332,7 +2556,9 @@ unsigned int iModelTagSetup(class xModelTagWithNormal * tag /* r16 */, class RpA Code range: 0x001AD9D0 -> 0x001AD9D8 */ // Range: 0x1AD9D0 -> 0x1AD9D8 -unsigned int iModelTagSetup(class xModelTag * tag /* r2 */, class RpAtomic * model /* r2 */, float x /* r29 */, float y /* r29 */, float z /* r29 */) { +unsigned int iModelTagSetup(class xModelTag* tag /* r2 */, class RpAtomic* model /* r2 */, + float x /* r29 */, float y /* r29 */, float z /* r29 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AD9D0 -> 0x1AD9D8 @@ -2346,18 +2572,22 @@ unsigned int iModelTagSetup(class xModelTag * tag /* r2 */, class RpAtomic * mod Code range: 0x001AD9E0 -> 0x001ADB88 */ // Range: 0x1AD9E0 -> 0x1ADB88 -static unsigned int iModelTagInternal(class xModelTag * tag /* r17 */, class RpAtomic * model /* r2 */, float x /* r29+0x40 */, float y /* r29+0x40 */, float z /* r29+0x40 */, signed int closeV /* r16 */) { +static unsigned int iModelTagInternal(class xModelTag* tag /* r17 */, + class RpAtomic* model /* r2 */, float x /* r29+0x40 */, + float y /* r29+0x40 */, float z /* r29+0x40 */, + signed int closeV /* r16 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AD9E0 -> 0x1ADB88 - class RpGeometry * geom; // r3 - class RwV3d * vert; // r7 + class RpGeometry* geom; // r3 + class RwV3d* vert; // r7 signed int v; // r4 signed int numV; // r3 float distSqr; // r29+0x40 float closeDistSqr; // r3 - class RpSkin * skin; // r18 - class RwMatrixWeights * wt; // r18 + class RpSkin* skin; // r18 + class RwMatrixWeights* wt; // r18 } } @@ -2368,19 +2598,23 @@ static unsigned int iModelTagInternal(class xModelTag * tag /* r17 */, class RpA Code range: 0x001ADB90 -> 0x001ADDC4 */ // Range: 0x1ADB90 -> 0x1ADDC4 -static unsigned int iModelTagUserData(class xModelTag * tag /* r21 */, class RpAtomic * model /* r20 */, float x /* r22 */, float y /* r21 */, float z /* r20 */, signed int closeV /* r19 */) { +static unsigned int iModelTagUserData(class xModelTag* tag /* r21 */, + class RpAtomic* model /* r20 */, float x /* r22 */, + float y /* r21 */, float z /* r20 */, + signed int closeV /* r19 */) +{ // Blocks /* anonymous block */ { // Range: 0x1ADB90 -> 0x1ADDC4 signed int i; // r18 signed int count; // r17 - class RpUserDataArray * array; // r16 - class RpUserDataArray * testarray; // r22 + class RpUserDataArray* array; // r16 + class RpUserDataArray* testarray; // r22 float distSqr; // r29+0x90 float closeDistSqr; // r3 signed int numTags; // r6 signed int t; // r5 - class xModelTag * tagList; // r4 + class xModelTag* tagList; // r4 } } @@ -2391,16 +2625,19 @@ static unsigned int iModelTagUserData(class xModelTag * tag /* r21 */, class RpA Code range: 0x001ADDD0 -> 0x001AE158 */ // Range: 0x1ADDD0 -> 0x1AE158 -unsigned int iModelNormalEval(class xVec3 * out /* r18 */, class RpAtomic & m /* r2 */, class RwMatrixTag * mat /* r29+0xF0 */, unsigned int index /* r16 */, signed int size /* r29+0xE0 */, class xVec3 * in /* r22 */) { +unsigned int iModelNormalEval(class xVec3* out /* r18 */, class RpAtomic& m /* r2 */, + class RwMatrixTag* mat /* r29+0xF0 */, unsigned int index /* r16 */, + signed int size /* r29+0xE0 */, class xVec3* in /* r22 */) +{ // Blocks /* anonymous block */ { // Range: 0x1ADDD0 -> 0x1AE158 - class RpGeometry * geom; // r2 + class RpGeometry* geom; // r2 signed int max_size; // r3 - class RpSkin * skin; // r17 - class RwMatrixTag * skin_mats; // r29+0xD0 - float * bone_weights; // r29+0xC0 - unsigned int * bone_indices; // r23 + class RpSkin* skin; // r17 + class RwMatrixTag* skin_mats; // r29+0xD0 + float* bone_weights; // r29+0xC0 + unsigned int* bone_indices; // r23 class xMat4x3 nmat; // r29+0x100 } } @@ -2412,13 +2649,16 @@ unsigned int iModelNormalEval(class xVec3 * out /* r18 */, class RpAtomic & m /* Code range: 0x001AE160 -> 0x001AE4E0 */ // Range: 0x1AE160 -> 0x1AE4E0 -unsigned int iModelVertEval(class RpAtomic * model /* r2 */, unsigned int index /* r16 */, unsigned int count /* r20 */, class RwMatrixTag * mat /* r19 */, class xVec3 * vert /* r18 */, class xVec3 * dest /* r17 */) { +unsigned int iModelVertEval(class RpAtomic* model /* r2 */, unsigned int index /* r16 */, + unsigned int count /* r20 */, class RwMatrixTag* mat /* r19 */, + class xVec3* vert /* r18 */, class xVec3* dest /* r17 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AE160 -> 0x1AE4E0 - class RpGeometry * geom; // r3 + class RpGeometry* geom; // r3 unsigned int numV; // r2 - class RpSkin * skin; // r21 + class RpSkin* skin; // r21 } } @@ -2429,12 +2669,13 @@ unsigned int iModelVertEval(class RpAtomic * model /* r2 */, unsigned int index Code range: 0x001AE4E0 -> 0x001AE664 */ // Range: 0x1AE4E0 -> 0x1AE664 -void iModel_SetLightKit(class xLightKit * lightKit /* r2 */) { +void iModel_SetLightKit(class xLightKit* lightKit /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AE4E0 -> 0x1AE664 - class RpLight * amb; // r10 - class RpLight * dir[4]; // r29+0x30 + class RpLight* amb; // r10 + class RpLight* dir[4]; // r29+0x30 signed int lightTypes[5]; // r29+0x10 unsigned int i; // r7 } @@ -2447,7 +2688,8 @@ void iModel_SetLightKit(class xLightKit * lightKit /* r2 */) { Code range: 0x001AE670 -> 0x001AE67C */ // Range: 0x1AE670 -> 0x1AE67C -unsigned int iModelVertCount(class RpAtomic * model /* r2 */) { +unsigned int iModelVertCount(class RpAtomic* model /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AE670 -> 0x1AE67C @@ -2461,18 +2703,21 @@ unsigned int iModelVertCount(class RpAtomic * model /* r2 */) { Code range: 0x001AE680 -> 0x001AE8F0 */ // Range: 0x1AE680 -> 0x1AE8F0 -signed int iModelCullPlusShadow(class RpAtomic * model /* r18 */, class RwMatrixTag * mat /* r20 */, class xVec3 * shadowVec /* r17 */, signed int * shadowOutside /* r16 */) { +signed int iModelCullPlusShadow(class RpAtomic* model /* r18 */, class RwMatrixTag* mat /* r20 */, + class xVec3* shadowVec /* r17 */, + signed int* shadowOutside /* r16 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AE680 -> 0x1AE8F0 float xScale2; // r8 float yScale2; // r5 float zScale2; // r1 - class RwV3d * up; // r2 - class RwV3d * at; // r2 - class RwCamera * cam; // r19 + class RwV3d* up; // r2 + class RwV3d* at; // r2 + class RwCamera* cam; // r19 class RwSphere worldsph; // r29+0x60 - class RwFrustumPlane * frustumPlane; // r6 + class RwFrustumPlane* frustumPlane; // r6 signed int numPlanes; // r5 float nDot; // r29+0x70 float nDot; // r2 @@ -2487,7 +2732,8 @@ signed int iModelCullPlusShadow(class RpAtomic * model /* r18 */, class RwMatrix Code range: 0x001AE8F0 -> 0x001AE91C */ // Range: 0x1AE8F0 -> 0x1AE91C -signed int iModelSphereCull(class xSphere * sphere /* r2 */) { +signed int iModelSphereCull(class xSphere* sphere /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AE8F0 -> 0x1AE91C @@ -2501,7 +2747,8 @@ signed int iModelSphereCull(class xSphere * sphere /* r2 */) { Code range: 0x001AE920 -> 0x001AEA40 */ // Range: 0x1AE920 -> 0x1AEA40 -signed int iModelCull(class RpAtomic * model /* r2 */, class RwMatrixTag * mat /* r2 */) { +signed int iModelCull(class RpAtomic* model /* r2 */, class RwMatrixTag* mat /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AE920 -> 0x1AEA40 @@ -2515,12 +2762,13 @@ signed int iModelCull(class RpAtomic * model /* r2 */, class RwMatrixTag * mat / Code range: 0x001AEA40 -> 0x001AEBD0 */ // Range: 0x1AEA40 -> 0x1AEBD0 -void iModelRender(class RpAtomic * model /* r20 */, class RwMatrixTag * mat /* r19 */) { +void iModelRender(class RpAtomic* model /* r20 */, class RwMatrixTag* mat /* r19 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AEA40 -> 0x1AEBD0 - class RwMatrixTag * pAnimOldMatrix; // r18 - class RwFrame * frame; // r3 + class RwMatrixTag* pAnimOldMatrix; // r18 + class RwFrame* frame; // r3 } } @@ -2531,18 +2779,20 @@ void iModelRender(class RpAtomic * model /* r20 */, class RwMatrixTag * mat /* r Code range: 0x001AEBD0 -> 0x001AEDEC */ // Range: 0x1AEBD0 -> 0x1AEDEC -void iModelAnimMatrices(class RpAtomic * model /* r2 */, class xQuat * quat /* r18 */, class xVec3 * tran /* r17 */, class RwMatrixTag * mat /* r16 */) { +void iModelAnimMatrices(class RpAtomic* model /* r2 */, class xQuat* quat /* r18 */, + class xVec3* tran /* r17 */, class RwMatrixTag* mat /* r16 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AEBD0 -> 0x1AEDEC - class RpHAnimHierarchy * pHierarchy; // r3 + class RpHAnimHierarchy* pHierarchy; // r3 class RwMatrixTag matrixStack[32]; // r29+0x50 - class RwMatrixTag * pMatrixStackTop; // r11 - class RpHAnimNodeInfo * pCurrentFrame; // r7 + class RwMatrixTag* pMatrixStackTop; // r11 + class RpHAnimNodeInfo* pCurrentFrame; // r7 signed int pCurrentFrameFlags; // r6 signed int i; // r5 signed int numFrames; // r4 - class RwMatrixTag * pMatrixArray; // r2 + class RwMatrixTag* pMatrixArray; // r2 } } @@ -2553,7 +2803,8 @@ void iModelAnimMatrices(class RpAtomic * model /* r2 */, class xQuat * quat /* r Code range: 0x001AEDF0 -> 0x001AEE68 */ // Range: 0x1AEDF0 -> 0x1AEE68 -unsigned int iModelNumBones(class RpAtomic * model /* r2 */) { +unsigned int iModelNumBones(class RpAtomic* model /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AEDF0 -> 0x1AEE68 @@ -2567,12 +2818,13 @@ unsigned int iModelNumBones(class RpAtomic * model /* r2 */) { Code range: 0x001AEE70 -> 0x001AEEB4 */ // Range: 0x1AEE70 -> 0x1AEEB4 -class RpAtomic * iModelFile_RWMultiAtomic(class RpAtomic * model /* r2 */) { +class RpAtomic* iModelFile_RWMultiAtomic(class RpAtomic* model /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AEE70 -> 0x1AEEB4 - class RpClump * clump; // r2 - class RpAtomic * nextModel; // r29+0x1C + class RpClump* clump; // r2 + class RpAtomic* nextModel; // r29+0x1C } } @@ -2583,11 +2835,12 @@ class RpAtomic * iModelFile_RWMultiAtomic(class RpAtomic * model /* r2 */) { Code range: 0x001AEEC0 -> 0x001AEEF0 */ // Range: 0x1AEEC0 -> 0x1AEEF0 -static class RpAtomic * NextAtomicCallback(class RpAtomic * atomic /* r2 */, void * data /* r2 */) { +static class RpAtomic* NextAtomicCallback(class RpAtomic* atomic /* r2 */, void* data /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AEEC0 -> 0x1AEEF0 - class RpAtomic * * nextModel; // r2 + class RpAtomic** nextModel; // r2 } } @@ -2598,13 +2851,14 @@ static class RpAtomic * NextAtomicCallback(class RpAtomic * atomic /* r2 */, voi Code range: 0x001AEEF0 -> 0x001AEF5C */ // Range: 0x1AEEF0 -> 0x1AEF5C -void iModelUnload(class RpAtomic * userdata /* r2 */) { +void iModelUnload(class RpAtomic* userdata /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AEEF0 -> 0x1AEF5C - class RpClump * clump; // r17 - class RwFrame * frame; // r16 - class RwFrame * root; // r2 + class RpClump* clump; // r17 + class RwFrame* frame; // r16 + class RwFrame* root; // r2 } } @@ -2615,7 +2869,8 @@ void iModelUnload(class RpAtomic * userdata /* r2 */) { Code range: 0x001AEF60 -> 0x001AEF94 */ // Range: 0x1AEF60 -> 0x1AEF94 -class RpAtomic * iModelFileNew(void * buffer /* r2 */, unsigned int size /* r2 */) { +class RpAtomic* iModelFileNew(void* buffer /* r2 */, unsigned int size /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AEF60 -> 0x1AEF94 @@ -2630,11 +2885,12 @@ class RpAtomic * iModelFileNew(void * buffer /* r2 */, unsigned int size /* r2 * Code range: 0x001AEFA0 -> 0x001AF1C4 */ // Range: 0x1AEFA0 -> 0x1AF1C4 -static class RpAtomic * iModelStreamRead(class RwStream * stream /* r17 */) { +static class RpAtomic* iModelStreamRead(class RwStream* stream /* r17 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AEFA0 -> 0x1AF1C4 - class RpClump * clump; // r16 + class RpClump* clump; // r16 unsigned int i; // r5 unsigned int maxIndex; // r2 float maxRadius; // r7 @@ -2649,12 +2905,13 @@ static class RpAtomic * iModelStreamRead(class RwStream * stream /* r17 */) { Code range: 0x001AF1D0 -> 0x001AF2F8 */ // Range: 0x1AF1D0 -> 0x1AF2F8 -static class RpAtomic * FindAtomicCallback(class RpAtomic * atomic /* r17 */) { +static class RpAtomic* FindAtomicCallback(class RpAtomic* atomic /* r17 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AF1D0 -> 0x1AF2F8 - class RpHAnimHierarchy * pHier; // r19 - class RpSkin * pSkin; // r18 + class RpHAnimHierarchy* pHier; // r19 + class RpSkin* pSkin; // r18 } } @@ -2665,11 +2922,12 @@ static class RpAtomic * FindAtomicCallback(class RpAtomic * atomic /* r17 */) { Code range: 0x001AF300 -> 0x001AF3BC */ // Range: 0x1AF300 -> 0x1AF3BC -void iModelInit() { +void iModelInit() +{ // Blocks /* anonymous block */ { // Range: 0x1AF300 -> 0x1AF3BC - class RwFrame * frame; // r2 + class RwFrame* frame; // r2 class RwRGBAReal black; // r29+0x30 signed int i; // r17 } @@ -2682,11 +2940,11 @@ void iModelInit() { Code range: 0x001AF3C0 -> 0x001AF41C */ // Range: 0x1AF3C0 -> 0x1AF41C -static class RwFrame * GetChildFrameHierarchy(class RwFrame * frame /* r17 */, void * data /* r16 */) { +static class RwFrame* GetChildFrameHierarchy(class RwFrame* frame /* r17 */, void* data /* r16 */) +{ // Blocks /* anonymous block */ { // Range: 0x1AF3C0 -> 0x1AF41C - class RpHAnimHierarchy * hierarchy; // r2 + class RpHAnimHierarchy* hierarchy; // r2 } } - diff --git a/dwarf/SB/Core/x/xParSys.cpp b/dwarf/SB/Core/x/xParSys.cpp index 15fa17e5e..5ce9597dc 100644 --- a/dwarf/SB/Core/x/xParSys.cpp +++ b/dwarf/SB/Core/x/xParSys.cpp @@ -11,39 +11,44 @@ static class xVec3 par_offset_up; // size: 0xC, address: 0x5CE8A0 static class xParSysInfo sParSysInfo[7]; // size: 0x38, address: 0x4DF990 class zGlobals globals; // size: 0x2050, address: 0x52C8F0 unsigned int gActiveHeap; // size: 0x4, address: 0x50FA44 -signed int xParSysEventCB(class xBase *, class xBase *, unsigned int, float *, class xBase *); // size: 0x0, address: 0x2FBE00 +signed int xParSysEventCB(class xBase*, class xBase*, unsigned int, float*, + class xBase*); // size: 0x0, address: 0x2FBE00 signed int _rpPTankAtomicDataOffset; // size: 0x4, address: 0x50F128 -class xAnimFile { +class xAnimFile +{ // total size: 0x20 public: - class xAnimFile * Next; // offset 0x0, size 0x4 - char * Name; // offset 0x4, size 0x4 + class xAnimFile* Next; // offset 0x0, size 0x4 + char* Name; // offset 0x4, size 0x4 unsigned int ID; // offset 0x8, size 0x4 unsigned int FileFlags; // offset 0xC, size 0x4 float Duration; // offset 0x10, size 0x4 float TimeOffset; // offset 0x14, size 0x4 unsigned short BoneCount; // offset 0x18, size 0x2 unsigned char NumAnims[2]; // offset 0x1A, size 0x2 - void * * RawData; // offset 0x1C, size 0x4 + void** RawData; // offset 0x1C, size 0x4 }; -class xBase { +class xBase +{ // total size: 0x10 public: unsigned int id; // offset 0x0, size 0x4 unsigned char baseType; // offset 0x4, size 0x1 unsigned char linkCount; // offset 0x5, size 0x1 unsigned short baseFlags; // offset 0x6, size 0x2 - class xLinkAsset * link; // offset 0x8, size 0x4 - signed int (* eventFunc)(class xBase *, class xBase *, unsigned int, float *, class xBase *); // offset 0xC, size 0x4 + class xLinkAsset* link; // offset 0x8, size 0x4 + signed int (*eventFunc)(class xBase*, class xBase*, unsigned int, float*, + class xBase*); // offset 0xC, size 0x4 }; -class zLedgeGrabParams { +class zLedgeGrabParams +{ // total size: 0x380 public: float animGrab; // offset 0x0, size 0x4 float zdist; // offset 0x4, size 0x4 class xVec3 tranTable[60]; // offset 0x8, size 0x2D0 signed int tranCount; // offset 0x2D8, size 0x4 - class xEnt * optr; // offset 0x2DC, size 0x4 + class xEnt* optr; // offset 0x2DC, size 0x4 class xMat4x3 omat; // offset 0x2E0, size 0x40 float y0det; // offset 0x320, size 0x4 float dydet; // offset 0x324, size 0x4 @@ -61,32 +66,37 @@ class zLedgeGrabParams { float startrot; // offset 0x36C, size 0x4 float endrot; // offset 0x370, size 0x4 }; -class RwV3d { +class RwV3d +{ // total size: 0xC public: float x; // offset 0x0, size 0x4 float y; // offset 0x4, size 0x4 float z; // offset 0x8, size 0x4 }; -class zScene : public xScene { +class zScene : public xScene +{ // total size: 0x2C8 public: - class _zPortal * pendingPortal; // offset 0x70, size 0x4 - union { // inferred + class _zPortal* pendingPortal; // offset 0x70, size 0x4 + union + { // inferred unsigned int num_ents; // offset 0x74, size 0x4 unsigned int num_base; // offset 0x74, size 0x4 }; - union { // inferred - class xBase * * base; // offset 0x78, size 0x4 - class zEnt * * ents; // offset 0x78, size 0x4 + union + { // inferred + class xBase** base; // offset 0x78, size 0x4 + class zEnt** ents; // offset 0x78, size 0x4 }; unsigned int num_update_base; // offset 0x7C, size 0x4 - class xBase * * update_base; // offset 0x80, size 0x4 + class xBase** update_base; // offset 0x80, size 0x4 unsigned int baseCount[72]; // offset 0x84, size 0x120 - class xBase * baseList[72]; // offset 0x1A4, size 0x120 - class _zEnv * zen; // offset 0x2C4, size 0x4 + class xBase* baseList[72]; // offset 0x1A4, size 0x120 + class _zEnv* zen; // offset 0x2C4, size 0x4 }; -class xLightKitLight { +class xLightKitLight +{ // total size: 0x60 public: unsigned int type; // offset 0x0, size 0x4 @@ -94,13 +104,14 @@ class xLightKitLight { float matrix[16]; // offset 0x14, size 0x40 float radius; // offset 0x54, size 0x4 float angle; // offset 0x58, size 0x4 - class RpLight * platLight; // offset 0x5C, size 0x4 + class RpLight* platLight; // offset 0x5C, size 0x4 }; -class xParGroup { +class xParGroup +{ // total size: 0x24 public: - class xPar * m_root; // offset 0x0, size 0x4 - class xPar * m_dead; // offset 0x4, size 0x4 + class xPar* m_root; // offset 0x0, size 0x4 + class xPar* m_dead; // offset 0x4, size 0x4 signed int m_num_of_particles; // offset 0x8, size 0x4 unsigned char m_alive; // offset 0xC, size 0x1 unsigned char m_killWhenDead; // offset 0xD, size 0x1 @@ -110,38 +121,43 @@ class xParGroup { unsigned char m_priority; // offset 0x11, size 0x1 unsigned char m_flags; // offset 0x12, size 0x1 unsigned char m_regidx; // offset 0x13, size 0x1 - class xParGroup * m_next; // offset 0x14, size 0x4 - class xParGroup * m_prev; // offset 0x18, size 0x4 - void (* draw)(void *, class xParGroup *); // offset 0x1C, size 0x4 - class xParCmdTex * m_cmdTex; // offset 0x20, size 0x4 + class xParGroup* m_next; // offset 0x14, size 0x4 + class xParGroup* m_prev; // offset 0x18, size 0x4 + void (*draw)(void*, class xParGroup*); // offset 0x1C, size 0x4 + class xParCmdTex* m_cmdTex; // offset 0x20, size 0x4 }; -class RxPipelineNode { +class RxPipelineNode +{ // total size: 0x28 public: - class RxNodeDefinition * nodeDef; // offset 0x0, size 0x4 + class RxNodeDefinition* nodeDef; // offset 0x0, size 0x4 unsigned int numOutputs; // offset 0x4, size 0x4 - unsigned int * outputs; // offset 0x8, size 0x4 - class RxPipelineCluster * * slotClusterRefs; // offset 0xC, size 0x4 - unsigned int * slotsContinue; // offset 0x10, size 0x4 - void * privateData; // offset 0x14, size 0x4 - unsigned int * inputToClusterSlot; // offset 0x18, size 0x4 - class RxPipelineNodeTopSortData * topSortData; // offset 0x1C, size 0x4 - void * initializationData; // offset 0x20, size 0x4 + unsigned int* outputs; // offset 0x8, size 0x4 + class RxPipelineCluster** slotClusterRefs; // offset 0xC, size 0x4 + unsigned int* slotsContinue; // offset 0x10, size 0x4 + void* privateData; // offset 0x14, size 0x4 + unsigned int* inputToClusterSlot; // offset 0x18, size 0x4 + class RxPipelineNodeTopSortData* topSortData; // offset 0x1C, size 0x4 + void* initializationData; // offset 0x20, size 0x4 unsigned int initializationDataSize; // offset 0x24, size 0x4 }; -class rxHeapFreeBlock { +class rxHeapFreeBlock +{ // total size: 0x8 public: unsigned int size; // offset 0x0, size 0x4 - class rxHeapBlockHeader * ptr; // offset 0x4, size 0x4 + class rxHeapBlockHeader* ptr; // offset 0x4, size 0x4 }; -class xAnimTransition { +class xAnimTransition +{ // total size: 0x2C public: - class xAnimTransition * Next; // offset 0x0, size 0x4 - class xAnimState * Dest; // offset 0x4, size 0x4 - unsigned int (* Conditional)(class xAnimTransition *, class xAnimSingle *, void *); // offset 0x8, size 0x4 - unsigned int (* Callback)(class xAnimTransition *, class xAnimSingle *, void *); // offset 0xC, size 0x4 + class xAnimTransition* Next; // offset 0x0, size 0x4 + class xAnimState* Dest; // offset 0x4, size 0x4 + unsigned int (*Conditional)(class xAnimTransition*, class xAnimSingle*, + void*); // offset 0x8, size 0x4 + unsigned int (*Callback)(class xAnimTransition*, class xAnimSingle*, + void*); // offset 0xC, size 0x4 unsigned int Flags; // offset 0x10, size 0x4 unsigned int UserFlags; // offset 0x14, size 0x4 float SrcTime; // offset 0x18, size 0x4 @@ -149,21 +165,23 @@ class xAnimTransition { unsigned short Priority; // offset 0x20, size 0x2 unsigned short QueuePriority; // offset 0x22, size 0x2 float BlendRecip; // offset 0x24, size 0x4 - unsigned short * BlendOffset; // offset 0x28, size 0x4 + unsigned short* BlendOffset; // offset 0x28, size 0x4 }; -class /* @class */ { +class /* @class */ +{ // total size: 0xC public: float t; // offset 0x0, size 0x4 float u; // offset 0x4, size 0x4 float v; // offset 0x8, size 0x4 }; -class RwRaster { +class RwRaster +{ // total size: 0x34 public: - class RwRaster * parent; // offset 0x0, size 0x4 - unsigned char * cpPixels; // offset 0x4, size 0x4 - unsigned char * palette; // offset 0x8, size 0x4 + class RwRaster* parent; // offset 0x0, size 0x4 + unsigned char* cpPixels; // offset 0x4, size 0x4 + unsigned char* palette; // offset 0x8, size 0x4 signed int width; // offset 0xC, size 0x4 signed int height; // offset 0x10, size 0x4 signed int depth; // offset 0x14, size 0x4 @@ -174,50 +192,55 @@ class RwRaster { unsigned char cFlags; // offset 0x21, size 0x1 unsigned char privateFlags; // offset 0x22, size 0x1 unsigned char cFormat; // offset 0x23, size 0x1 - unsigned char * originalPixels; // offset 0x24, size 0x4 + unsigned char* originalPixels; // offset 0x24, size 0x4 signed int originalWidth; // offset 0x28, size 0x4 signed int originalHeight; // offset 0x2C, size 0x4 signed int originalStride; // offset 0x30, size 0x4 }; -class RxPipelineNodeTopSortData { +class RxPipelineNodeTopSortData +{ // total size: 0xC public: unsigned int numIns; // offset 0x0, size 0x4 unsigned int numInsVisited; // offset 0x4, size 0x4 - class rxReq * req; // offset 0x8, size 0x4 + class rxReq* req; // offset 0x8, size 0x4 }; -class xAnimSingle { +class xAnimSingle +{ // total size: 0x40 public: unsigned int SingleFlags; // offset 0x0, size 0x4 - class xAnimState * State; // offset 0x4, size 0x4 + class xAnimState* State; // offset 0x4, size 0x4 float Time; // offset 0x8, size 0x4 float CurrentSpeed; // offset 0xC, size 0x4 float BilinearLerp[2]; // offset 0x10, size 0x8 - class xAnimEffect * Effect; // offset 0x18, size 0x4 + class xAnimEffect* Effect; // offset 0x18, size 0x4 unsigned int ActiveCount; // offset 0x1C, size 0x4 float LastTime; // offset 0x20, size 0x4 - class xAnimActiveEffect * ActiveList; // offset 0x24, size 0x4 - class xAnimPlay * Play; // offset 0x28, size 0x4 - class xAnimTransition * Sync; // offset 0x2C, size 0x4 - class xAnimTransition * Tran; // offset 0x30, size 0x4 - class xAnimSingle * Blend; // offset 0x34, size 0x4 + class xAnimActiveEffect* ActiveList; // offset 0x24, size 0x4 + class xAnimPlay* Play; // offset 0x28, size 0x4 + class xAnimTransition* Sync; // offset 0x2C, size 0x4 + class xAnimTransition* Tran; // offset 0x30, size 0x4 + class xAnimSingle* Blend; // offset 0x34, size 0x4 float BlendFactor; // offset 0x38, size 0x4 unsigned int pad; // offset 0x3C, size 0x4 }; -class RpPolygon { +class RpPolygon +{ // total size: 0x8 public: unsigned short matIndex; // offset 0x0, size 0x2 unsigned short vertIndex[3]; // offset 0x2, size 0x6 }; -class RwV2d { +class RwV2d +{ // total size: 0x8 public: float x; // offset 0x0, size 0x4 float y; // offset 0x4, size 0x4 }; -class xShadowSimpleCache { +class xShadowSimpleCache +{ // total size: 0x98 public: unsigned short flags; // offset 0x0, size 0x2 @@ -226,7 +249,7 @@ class xShadowSimpleCache { unsigned int collPriority; // offset 0x4, size 0x4 class xVec3 pos; // offset 0x8, size 0xC class xVec3 at; // offset 0x14, size 0xC - class xEnt * castOnEnt; // offset 0x20, size 0x4 + class xEnt* castOnEnt; // offset 0x20, size 0x4 class xShadowSimplePoly poly; // offset 0x24, size 0x30 float envHeight; // offset 0x54, size 0x4 float shadowHeight; // offset 0x58, size 0x4 @@ -235,32 +258,36 @@ class xShadowSimpleCache { float dydz; // offset 0x64, size 0x4 class xVec3 corner[4]; // offset 0x68, size 0x30 }; -class xUpdateCullEnt { +class xUpdateCullEnt +{ // total size: 0x10 public: unsigned short index; // offset 0x0, size 0x2 signed short groupIndex; // offset 0x2, size 0x2 - unsigned int (* cb)(void *, void *); // offset 0x4, size 0x4 - void * cbdata; // offset 0x8, size 0x4 - class xUpdateCullEnt * nextInGroup; // offset 0xC, size 0x4 + unsigned int (*cb)(void*, void*); // offset 0x4, size 0x4 + void* cbdata; // offset 0x8, size 0x4 + class xUpdateCullEnt* nextInGroup; // offset 0xC, size 0x4 }; -class xAnimActiveEffect { +class xAnimActiveEffect +{ // total size: 0x8 public: - class xAnimEffect * Effect; // offset 0x0, size 0x4 + class xAnimEffect* Effect; // offset 0x0, size 0x4 unsigned int Handle; // offset 0x4, size 0x4 }; -class RxNodeDefinition { +class RxNodeDefinition +{ // total size: 0x40 public: - char * name; // offset 0x0, size 0x4 + char* name; // offset 0x0, size 0x4 class RxNodeMethods nodeMethods; // offset 0x4, size 0x1C class RxIoSpec io; // offset 0x20, size 0x14 unsigned int pipelineNodePrivateDataSize; // offset 0x34, size 0x4 enum RxNodeDefEditable editable; // offset 0x38, size 0x4 signed int InputPipesCnt; // offset 0x3C, size 0x4 }; -class xParCmdTex : public xParCmdAsset { +class xParCmdTex : public xParCmdAsset +{ // total size: 0x24 public: float x1; // offset 0x8, size 0x4 @@ -274,81 +301,90 @@ class xParCmdTex : public xParCmdAsset { float unit_width; // offset 0x1C, size 0x4 float unit_height; // offset 0x20, size 0x4 }; -class ptank_pool__pos_color_size_uv2 : public ptank_pool { +class ptank_pool__pos_color_size_uv2 : public ptank_pool +{ // total size: 0x38 public: - class xVec3 * pos; // offset 0x24, size 0x4 - class iColor_tag * color; // offset 0x28, size 0x4 - class xVec2 * size; // offset 0x2C, size 0x4 - class xVec2 * uv; // offset 0x30, size 0x4 + class xVec3* pos; // offset 0x24, size 0x4 + class iColor_tag* color; // offset 0x28, size 0x4 + class xVec2* size; // offset 0x2C, size 0x4 + class xVec2* uv; // offset 0x30, size 0x4 signed int stride; // offset 0x34, size 0x4 }; -class xEntShadow { +class xEntShadow +{ // total size: 0x28 public: class xVec3 pos; // offset 0x0, size 0xC class xVec3 vec; // offset 0xC, size 0xC - class RpAtomic * shadowModel; // offset 0x18, size 0x4 + class RpAtomic* shadowModel; // offset 0x18, size 0x4 float dst_cast; // offset 0x1C, size 0x4 float radius[2]; // offset 0x20, size 0x8 }; -class RpMaterialList { +class RpMaterialList +{ // total size: 0xC public: - class RpMaterial * * materials; // offset 0x0, size 0x4 + class RpMaterial** materials; // offset 0x0, size 0x4 signed int numMaterials; // offset 0x4, size 0x4 signed int space; // offset 0x8, size 0x4 }; -enum _zPlayerWallJumpState { +enum _zPlayerWallJumpState +{ k_WALLJUMP_NOT = 0, k_WALLJUMP_LAUNCH = 1, k_WALLJUMP_FLIGHT = 2, k_WALLJUMP_LAND = 3, }; -class xParCmd { +class xParCmd +{ // total size: 0x8 public: unsigned int flag; // offset 0x0, size 0x4 - class xParCmdAsset * tasset; // offset 0x4, size 0x4 + class xParCmdAsset* tasset; // offset 0x4, size 0x4 }; -class RpAtomic { +class RpAtomic +{ // total size: 0x70 public: class RwObjectHasFrame object; // offset 0x0, size 0x14 - class RwResEntry * repEntry; // offset 0x14, size 0x4 - class RpGeometry * geometry; // offset 0x18, size 0x4 + class RwResEntry* repEntry; // offset 0x14, size 0x4 + class RpGeometry* geometry; // offset 0x18, size 0x4 class RwSphere boundingSphere; // offset 0x1C, size 0x10 class RwSphere worldBoundingSphere; // offset 0x2C, size 0x10 - class RpClump * clump; // offset 0x3C, size 0x4 + class RpClump* clump; // offset 0x3C, size 0x4 class RwLLLink inClumpLink; // offset 0x40, size 0x8 - class RpAtomic * (* renderCallBack)(class RpAtomic *); // offset 0x48, size 0x4 + class RpAtomic* (*renderCallBack)(class RpAtomic*); // offset 0x48, size 0x4 class RpInterpolator interpolator; // offset 0x4C, size 0x14 unsigned short renderFrame; // offset 0x60, size 0x2 unsigned short pad; // offset 0x62, size 0x2 class RwLinkList llWorldSectorsInAtomic; // offset 0x64, size 0x8 - class RxPipeline * pipeline; // offset 0x6C, size 0x4 + class RxPipeline* pipeline; // offset 0x6C, size 0x4 }; -class xAnimPlay { +class xAnimPlay +{ // total size: 0x20 public: - class xAnimPlay * Next; // offset 0x0, size 0x4 + class xAnimPlay* Next; // offset 0x0, size 0x4 unsigned short NumSingle; // offset 0x4, size 0x2 unsigned short BoneCount; // offset 0x6, size 0x2 - class xAnimSingle * Single; // offset 0x8, size 0x4 - void * Object; // offset 0xC, size 0x4 - class xAnimTable * Table; // offset 0x10, size 0x4 - class xMemPool * Pool; // offset 0x14, size 0x4 - class xModelInstance * ModelInst; // offset 0x18, size 0x4 - void (* BeforeAnimMatrices)(class xAnimPlay *, class xQuat *, class xVec3 *, signed int); // offset 0x1C, size 0x4 -}; -class xModelInstance { + class xAnimSingle* Single; // offset 0x8, size 0x4 + void* Object; // offset 0xC, size 0x4 + class xAnimTable* Table; // offset 0x10, size 0x4 + class xMemPool* Pool; // offset 0x14, size 0x4 + class xModelInstance* ModelInst; // offset 0x18, size 0x4 + void (*BeforeAnimMatrices)(class xAnimPlay*, class xQuat*, class xVec3*, + signed int); // offset 0x1C, size 0x4 +}; +class xModelInstance +{ // total size: 0x6C public: - class xModelInstance * Next; // offset 0x0, size 0x4 - class xModelInstance * Parent; // offset 0x4, size 0x4 - class xModelPool * Pool; // offset 0x8, size 0x4 - class xAnimPlay * Anim; // offset 0xC, size 0x4 - class RpAtomic * Data; // offset 0x10, size 0x4 + class xModelInstance* Next; // offset 0x0, size 0x4 + class xModelInstance* Parent; // offset 0x4, size 0x4 + class xModelPool* Pool; // offset 0x8, size 0x4 + class xAnimPlay* Anim; // offset 0xC, size 0x4 + class RpAtomic* Data; // offset 0x10, size 0x4 unsigned int PipeFlags; // offset 0x14, size 0x4 float RedMultiplier; // offset 0x18, size 0x4 float GreenMultiplier; // offset 0x1C, size 0x4 @@ -356,30 +392,32 @@ class xModelInstance { float Alpha; // offset 0x24, size 0x4 float FadeStart; // offset 0x28, size 0x4 float FadeEnd; // offset 0x2C, size 0x4 - class xSurface * Surf; // offset 0x30, size 0x4 - class xModelBucket * * Bucket; // offset 0x34, size 0x4 - class xModelInstance * BucketNext; // offset 0x38, size 0x4 - class xLightKit * LightKit; // offset 0x3C, size 0x4 - void * Object; // offset 0x40, size 0x4 + class xSurface* Surf; // offset 0x30, size 0x4 + class xModelBucket** Bucket; // offset 0x34, size 0x4 + class xModelInstance* BucketNext; // offset 0x38, size 0x4 + class xLightKit* LightKit; // offset 0x3C, size 0x4 + void* Object; // offset 0x40, size 0x4 unsigned short Flags; // offset 0x44, size 0x2 unsigned char BoneCount; // offset 0x46, size 0x1 unsigned char BoneIndex; // offset 0x47, size 0x1 - unsigned char * BoneRemap; // offset 0x48, size 0x4 - class RwMatrixTag * Mat; // offset 0x4C, size 0x4 + unsigned char* BoneRemap; // offset 0x48, size 0x4 + class RwMatrixTag* Mat; // offset 0x4C, size 0x4 class xVec3 Scale; // offset 0x50, size 0xC unsigned int modelID; // offset 0x5C, size 0x4 unsigned int shadowID; // offset 0x60, size 0x4 - class RpAtomic * shadowmapAtomic; // offset 0x64, size 0x4 - class /* @class */ { + class RpAtomic* shadowmapAtomic; // offset 0x64, size 0x4 + class /* @class */ + { // total size: 0x4 public: - class xVec3 * verts; // offset 0x0, size 0x4 + class xVec3* verts; // offset 0x0, size 0x4 } anim_coll; // offset 0x68, size 0x4 }; -class xEnt : public xBase { +class xEnt : public xBase +{ // total size: 0xD0 public: - class xEntAsset * asset; // offset 0x10, size 0x4 + class xEntAsset* asset; // offset 0x10, size 0x4 unsigned short idx; // offset 0x14, size 0x2 unsigned short num_updates; // offset 0x16, size 0x2 unsigned char flags; // offset 0x18, size 0x1 @@ -394,166 +432,184 @@ class xEnt : public xBase { unsigned char collLev; // offset 0x21, size 0x1 unsigned char chkby; // offset 0x22, size 0x1 unsigned char penby; // offset 0x23, size 0x1 - class xModelInstance * model; // offset 0x24, size 0x4 - class xModelInstance * collModel; // offset 0x28, size 0x4 - class xModelInstance * camcollModel; // offset 0x2C, size 0x4 - class xLightKit * lightKit; // offset 0x30, size 0x4 - void (* update)(class xEnt *, class xScene *, float); // offset 0x34, size 0x4 - void (* endUpdate)(class xEnt *, class xScene *, float); // offset 0x38, size 0x4 - void (* bupdate)(class xEnt *, class xVec3 *); // offset 0x3C, size 0x4 - void (* move)(class xEnt *, class xScene *, float, class xEntFrame *); // offset 0x40, size 0x4 - void (* render)(class xEnt *); // offset 0x44, size 0x4 - class xEntFrame * frame; // offset 0x48, size 0x4 - class xEntCollis * collis; // offset 0x4C, size 0x4 + class xModelInstance* model; // offset 0x24, size 0x4 + class xModelInstance* collModel; // offset 0x28, size 0x4 + class xModelInstance* camcollModel; // offset 0x2C, size 0x4 + class xLightKit* lightKit; // offset 0x30, size 0x4 + void (*update)(class xEnt*, class xScene*, float); // offset 0x34, size 0x4 + void (*endUpdate)(class xEnt*, class xScene*, float); // offset 0x38, size 0x4 + void (*bupdate)(class xEnt*, class xVec3*); // offset 0x3C, size 0x4 + void (*move)(class xEnt*, class xScene*, float, class xEntFrame*); // offset 0x40, size 0x4 + void (*render)(class xEnt*); // offset 0x44, size 0x4 + class xEntFrame* frame; // offset 0x48, size 0x4 + class xEntCollis* collis; // offset 0x4C, size 0x4 class xGridBound gridb; // offset 0x50, size 0x14 class xBound bound; // offset 0x64, size 0x4C - void (* transl)(class xEnt *, class xVec3 *, class xMat4x3 *); // offset 0xB0, size 0x4 - class xFFX * ffx; // offset 0xB4, size 0x4 - class xEnt * driver; // offset 0xB8, size 0x4 + void (*transl)(class xEnt*, class xVec3*, class xMat4x3*); // offset 0xB0, size 0x4 + class xFFX* ffx; // offset 0xB4, size 0x4 + class xEnt* driver; // offset 0xB8, size 0x4 signed int driveMode; // offset 0xBC, size 0x4 - class xShadowSimpleCache * simpShadow; // offset 0xC0, size 0x4 - class xEntShadow * entShadow; // offset 0xC4, size 0x4 - class anim_coll_data * anim_coll; // offset 0xC8, size 0x4 - void * user_data; // offset 0xCC, size 0x4 + class xShadowSimpleCache* simpShadow; // offset 0xC0, size 0x4 + class xEntShadow* entShadow; // offset 0xC4, size 0x4 + class anim_coll_data* anim_coll; // offset 0xC8, size 0x4 + void* user_data; // offset 0xCC, size 0x4 }; -class rxHeapSuperBlockDescriptor { +class rxHeapSuperBlockDescriptor +{ // total size: 0xC public: - void * start; // offset 0x0, size 0x4 + void* start; // offset 0x0, size 0x4 unsigned int size; // offset 0x4, size 0x4 - class rxHeapSuperBlockDescriptor * next; // offset 0x8, size 0x4 + class rxHeapSuperBlockDescriptor* next; // offset 0x8, size 0x4 }; -class xVec3 { +class xVec3 +{ // total size: 0xC public: float x; // offset 0x0, size 0x4 float y; // offset 0x4, size 0x4 float z; // offset 0x8, size 0x4 }; -class iEnv { +class iEnv +{ // total size: 0x30 public: - class RpWorld * world; // offset 0x0, size 0x4 - class RpWorld * collision; // offset 0x4, size 0x4 - class RpWorld * fx; // offset 0x8, size 0x4 - class RpWorld * camera; // offset 0xC, size 0x4 - class xJSPHeader * jsp; // offset 0x10, size 0x4 - class RpLight * light[2]; // offset 0x14, size 0x8 - class RwFrame * light_frame[2]; // offset 0x1C, size 0x8 + class RpWorld* world; // offset 0x0, size 0x4 + class RpWorld* collision; // offset 0x4, size 0x4 + class RpWorld* fx; // offset 0x8, size 0x4 + class RpWorld* camera; // offset 0xC, size 0x4 + class xJSPHeader* jsp; // offset 0x10, size 0x4 + class RpLight* light[2]; // offset 0x14, size 0x8 + class RwFrame* light_frame[2]; // offset 0x1C, size 0x8 signed int memlvl; // offset 0x24, size 0x4 }; -class RxPipeline { +class RxPipeline +{ // total size: 0x34 public: signed int locked; // offset 0x0, size 0x4 unsigned int numNodes; // offset 0x4, size 0x4 - class RxPipelineNode * nodes; // offset 0x8, size 0x4 + class RxPipelineNode* nodes; // offset 0x8, size 0x4 unsigned int packetNumClusterSlots; // offset 0xC, size 0x4 enum rxEmbeddedPacketState embeddedPacketState; // offset 0x10, size 0x4 - class RxPacket * embeddedPacket; // offset 0x14, size 0x4 + class RxPacket* embeddedPacket; // offset 0x14, size 0x4 unsigned int numInputRequirements; // offset 0x18, size 0x4 - class RxPipelineRequiresCluster * inputRequirements; // offset 0x1C, size 0x4 - void * superBlock; // offset 0x20, size 0x4 + class RxPipelineRequiresCluster* inputRequirements; // offset 0x1C, size 0x4 + void* superBlock; // offset 0x20, size 0x4 unsigned int superBlockSize; // offset 0x24, size 0x4 unsigned int entryPoint; // offset 0x28, size 0x4 unsigned int pluginId; // offset 0x2C, size 0x4 unsigned int pluginData; // offset 0x30, size 0x4 }; -class RxPipelineCluster { +class RxPipelineCluster +{ // total size: 0x8 public: - class RxClusterDefinition * clusterRef; // offset 0x0, size 0x4 + class RxClusterDefinition* clusterRef; // offset 0x0, size 0x4 unsigned int creationAttributes; // offset 0x4, size 0x4 }; -class anim_coll_data { +class anim_coll_data +{ // total size: 0x0 }; -class RpMaterial { +class RpMaterial +{ // total size: 0x1C public: - class RwTexture * texture; // offset 0x0, size 0x4 + class RwTexture* texture; // offset 0x0, size 0x4 class RwRGBA color; // offset 0x4, size 0x4 - class RxPipeline * pipeline; // offset 0x8, size 0x4 + class RxPipeline* pipeline; // offset 0x8, size 0x4 class RwSurfaceProperties surfaceProps; // offset 0xC, size 0xC signed short refCount; // offset 0x18, size 0x2 signed short pad; // offset 0x1A, size 0x2 }; -class render_state { +class render_state +{ // total size: 0x10 public: - class RwTexture * texture; // offset 0x0, size 0x4 + class RwTexture* texture; // offset 0x0, size 0x4 unsigned int src_blend; // offset 0x4, size 0x4 unsigned int dst_blend; // offset 0x8, size 0x4 unsigned int flags; // offset 0xC, size 0x4 }; -class _tagEmitSphere { +class _tagEmitSphere +{ // total size: 0x4 public: float radius; // offset 0x0, size 0x4 }; -class xAnimState { +class xAnimState +{ // total size: 0x4C public: - class xAnimState * Next; // offset 0x0, size 0x4 - char * Name; // offset 0x4, size 0x4 + class xAnimState* Next; // offset 0x0, size 0x4 + char* Name; // offset 0x4, size 0x4 unsigned int ID; // offset 0x8, size 0x4 unsigned int Flags; // offset 0xC, size 0x4 unsigned int UserFlags; // offset 0x10, size 0x4 float Speed; // offset 0x14, size 0x4 - class xAnimFile * Data; // offset 0x18, size 0x4 - class xAnimEffect * Effects; // offset 0x1C, size 0x4 - class xAnimTransitionList * Default; // offset 0x20, size 0x4 - class xAnimTransitionList * List; // offset 0x24, size 0x4 - float * BoneBlend; // offset 0x28, size 0x4 - float * TimeSnap; // offset 0x2C, size 0x4 + class xAnimFile* Data; // offset 0x18, size 0x4 + class xAnimEffect* Effects; // offset 0x1C, size 0x4 + class xAnimTransitionList* Default; // offset 0x20, size 0x4 + class xAnimTransitionList* List; // offset 0x24, size 0x4 + float* BoneBlend; // offset 0x28, size 0x4 + float* TimeSnap; // offset 0x2C, size 0x4 float FadeRecip; // offset 0x30, size 0x4 - unsigned short * FadeOffset; // offset 0x34, size 0x4 - void * CallbackData; // offset 0x38, size 0x4 - class xAnimMultiFile * MultiFile; // offset 0x3C, size 0x4 - void (* BeforeEnter)(class xAnimPlay *, class xAnimState *); // offset 0x40, size 0x4 - void (* StateCallback)(class xAnimState *, class xAnimSingle *, void *); // offset 0x44, size 0x4 - void (* BeforeAnimMatrices)(class xAnimPlay *, class xQuat *, class xVec3 *, signed int); // offset 0x48, size 0x4 -}; -class xModelPool { + unsigned short* FadeOffset; // offset 0x34, size 0x4 + void* CallbackData; // offset 0x38, size 0x4 + class xAnimMultiFile* MultiFile; // offset 0x3C, size 0x4 + void (*BeforeEnter)(class xAnimPlay*, class xAnimState*); // offset 0x40, size 0x4 + void (*StateCallback)(class xAnimState*, class xAnimSingle*, void*); // offset 0x44, size 0x4 + void (*BeforeAnimMatrices)(class xAnimPlay*, class xQuat*, class xVec3*, + signed int); // offset 0x48, size 0x4 +}; +class xModelPool +{ // total size: 0xC public: - class xModelPool * Next; // offset 0x0, size 0x4 + class xModelPool* Next; // offset 0x0, size 0x4 unsigned int NumMatrices; // offset 0x4, size 0x4 - class xModelInstance * List; // offset 0x8, size 0x4 + class xModelInstance* List; // offset 0x8, size 0x4 }; -class xAnimMultiFile : public xAnimMultiFileBase { +class xAnimMultiFile : public xAnimMultiFileBase +{ // total size: 0xC public: class xAnimMultiFileEntry Files[1]; // offset 0x4, size 0x8 }; -class ptank_pool { +class ptank_pool +{ // total size: 0x24 public: class render_state rs; // offset 0x0, size 0x10 unsigned int used; // offset 0x10, size 0x4 - class RpAtomic * ptank; // offset 0x14, size 0x4 - class /* @class */ { + class RpAtomic* ptank; // offset 0x14, size 0x4 + class /* @class */ + { // total size: 0xC public: - unsigned char * data; // offset 0x0, size 0x4 + unsigned char* data; // offset 0x0, size 0x4 signed int stride; // offset 0x4, size 0x4 unsigned int size; // offset 0x8, size 0x4 } hide; // offset 0x18, size 0xC }; -class RxPipelineNodeParam { +class RxPipelineNodeParam +{ // total size: 0x8 public: - void * dataParam; // offset 0x0, size 0x4 - class RxHeap * heap; // offset 0x4, size 0x4 + void* dataParam; // offset 0x0, size 0x4 + class RxHeap* heap; // offset 0x4, size 0x4 }; -class xParEmitterAsset : public xBaseAsset { +class xParEmitterAsset : public xBaseAsset +{ // total size: 0x54 public: unsigned char emit_flags; // offset 0x8, size 0x1 unsigned char emit_type; // offset 0x9, size 0x1 unsigned short pad; // offset 0xA, size 0x2 unsigned int propID; // offset 0xC, size 0x4 - union { // inferred + union + { // inferred class xPECircle e_circle; // offset 0x10, size 0x14 class _tagEmitSphere e_sphere; // offset 0x10, size 0x4 class _tagEmitRect e_rect; // offset 0x10, size 0x8 @@ -571,48 +627,54 @@ class xParEmitterAsset : public xBaseAsset { unsigned int cull_mode; // offset 0x4C, size 0x4 float cull_dist_sqr; // offset 0x50, size 0x4 }; -class zEnt : public xEnt { +class zEnt : public xEnt +{ // total size: 0xD4 public: - class xAnimTable * atbl; // offset 0xD0, size 0x4 + class xAnimTable* atbl; // offset 0xD0, size 0x4 }; -class xLightKit { +class xLightKit +{ // total size: 0x10 public: unsigned int tagID; // offset 0x0, size 0x4 unsigned int groupID; // offset 0x4, size 0x4 unsigned int lightCount; // offset 0x8, size 0x4 - class xLightKitLight * lightList; // offset 0xC, size 0x4 + class xLightKitLight* lightList; // offset 0xC, size 0x4 }; -class RwTexture { +class RwTexture +{ // total size: 0x58 public: - class RwRaster * raster; // offset 0x0, size 0x4 - class RwTexDictionary * dict; // offset 0x4, size 0x4 + class RwRaster* raster; // offset 0x0, size 0x4 + class RwTexDictionary* dict; // offset 0x4, size 0x4 class RwLLLink lInDictionary; // offset 0x8, size 0x8 char name[32]; // offset 0x10, size 0x20 char mask[32]; // offset 0x30, size 0x20 unsigned int filterAddressing; // offset 0x50, size 0x4 signed int refCount; // offset 0x54, size 0x4 }; -class RxHeap { +class RxHeap +{ // total size: 0x1C public: unsigned int superBlockSize; // offset 0x0, size 0x4 - class rxHeapSuperBlockDescriptor * head; // offset 0x4, size 0x4 - class rxHeapBlockHeader * headBlock; // offset 0x8, size 0x4 - class rxHeapFreeBlock * freeBlocks; // offset 0xC, size 0x4 + class rxHeapSuperBlockDescriptor* head; // offset 0x4, size 0x4 + class rxHeapBlockHeader* headBlock; // offset 0x8, size 0x4 + class rxHeapFreeBlock* freeBlocks; // offset 0xC, size 0x4 unsigned int entriesAlloced; // offset 0x10, size 0x4 unsigned int entriesUsed; // offset 0x14, size 0x4 signed int dirty; // offset 0x18, size 0x4 }; -class xJSPNodeInfo { +class xJSPNodeInfo +{ // total size: 0x8 public: signed int originalMatIndex; // offset 0x0, size 0x4 signed int nodeFlags; // offset 0x4, size 0x4 }; -class RwRGBA { +class RwRGBA +{ // total size: 0x4 public: unsigned char red; // offset 0x0, size 0x1 @@ -620,13 +682,15 @@ class RwRGBA { unsigned char blue; // offset 0x2, size 0x1 unsigned char alpha; // offset 0x3, size 0x1 }; -class RwBBox { +class RwBBox +{ // total size: 0x18 public: class RwV3d sup; // offset 0x0, size 0xC class RwV3d inf; // offset 0xC, size 0xC }; -enum _tagRumbleType { +enum _tagRumbleType +{ eRumble_Off = 0, eRumble_Hi = 1, eRumble_VeryLightHi = 2, @@ -642,7 +706,8 @@ enum _tagRumbleType { eRumble_Total = 12, eRumbleForceU32 = 2147483647, }; -class xLinkAsset { +class xLinkAsset +{ // total size: 0x20 public: unsigned short srcEvent; // offset 0x0, size 0x2 @@ -652,21 +717,24 @@ class xLinkAsset { unsigned int paramWidgetAssetID; // offset 0x18, size 0x4 unsigned int chkAssetID; // offset 0x1C, size 0x4 }; -enum _zPlayerType { +enum _zPlayerType +{ ePlayer_SB = 0, ePlayer_Patrick = 1, ePlayer_Sandy = 2, ePlayer_MAXTYPES = 3, }; -class xUpdateCullGroup { +class xUpdateCullGroup +{ // total size: 0xC public: unsigned int active; // offset 0x0, size 0x4 unsigned short startIndex; // offset 0x4, size 0x2 unsigned short endIndex; // offset 0x6, size 0x2 - class xGroup * groupObject; // offset 0x8, size 0x4 + class xGroup* groupObject; // offset 0x8, size 0x4 }; -class RpClump { +class RpClump +{ // total size: 0x2C public: class RwObject object; // offset 0x0, size 0x8 @@ -674,15 +742,17 @@ class RpClump { class RwLinkList lightList; // offset 0x10, size 0x8 class RwLinkList cameraList; // offset 0x18, size 0x8 class RwLLLink inWorldLink; // offset 0x20, size 0x8 - class RpClump * (* callback)(class RpClump *, void *); // offset 0x28, size 0x4 + class RpClump* (*callback)(class RpClump*, void*); // offset 0x28, size 0x4 }; -class xQuat { +class xQuat +{ // total size: 0x10 public: class xVec3 v; // offset 0x0, size 0xC float s; // offset 0xC, size 0x4 }; -class xParSysAsset : public xBaseAsset { +class xParSysAsset : public xBaseAsset +{ // total size: 0x20 public: unsigned int type; // offset 0x8, size 0x4 @@ -697,13 +767,15 @@ class xParSysAsset : public xBaseAsset { unsigned char cmdCount; // offset 0x1B, size 0x1 unsigned int cmdSize; // offset 0x1C, size 0x4 }; -class RwTexCoords { +class RwTexCoords +{ // total size: 0x8 public: float u; // offset 0x0, size 0x4 float v; // offset 0x4, size 0x4 }; -class RpGeometry { +class RpGeometry +{ // total size: 0x60 public: class RwObject object; // offset 0x0, size 0x8 @@ -715,45 +787,48 @@ class RpGeometry { signed int numMorphTargets; // offset 0x18, size 0x4 signed int numTexCoordSets; // offset 0x1C, size 0x4 class RpMaterialList matList; // offset 0x20, size 0xC - class RpTriangle * triangles; // offset 0x2C, size 0x4 - class RwRGBA * preLitLum; // offset 0x30, size 0x4 - class RwTexCoords * texCoords[8]; // offset 0x34, size 0x20 - class RpMeshHeader * mesh; // offset 0x54, size 0x4 - class RwResEntry * repEntry; // offset 0x58, size 0x4 - class RpMorphTarget * morphTarget; // offset 0x5C, size 0x4 -}; -class RpWorldSector { + class RpTriangle* triangles; // offset 0x2C, size 0x4 + class RwRGBA* preLitLum; // offset 0x30, size 0x4 + class RwTexCoords* texCoords[8]; // offset 0x34, size 0x20 + class RpMeshHeader* mesh; // offset 0x54, size 0x4 + class RwResEntry* repEntry; // offset 0x58, size 0x4 + class RpMorphTarget* morphTarget; // offset 0x5C, size 0x4 +}; +class RpWorldSector +{ // total size: 0x90 public: signed int type; // offset 0x0, size 0x4 - class RpPolygon * polygons; // offset 0x4, size 0x4 - class RwV3d * vertices; // offset 0x8, size 0x4 - class RpVertexNormal * normals; // offset 0xC, size 0x4 - class RwTexCoords * texCoords[8]; // offset 0x10, size 0x20 - class RwRGBA * preLitLum; // offset 0x30, size 0x4 - class RwResEntry * repEntry; // offset 0x34, size 0x4 + class RpPolygon* polygons; // offset 0x4, size 0x4 + class RwV3d* vertices; // offset 0x8, size 0x4 + class RpVertexNormal* normals; // offset 0xC, size 0x4 + class RwTexCoords* texCoords[8]; // offset 0x10, size 0x20 + class RwRGBA* preLitLum; // offset 0x30, size 0x4 + class RwResEntry* repEntry; // offset 0x34, size 0x4 class RwLinkList collAtomicsInWorldSector; // offset 0x38, size 0x8 class RwLinkList noCollAtomicsInWorldSector; // offset 0x40, size 0x8 class RwLinkList lightsInWorldSector; // offset 0x48, size 0x8 class RwBBox boundingBox; // offset 0x50, size 0x18 class RwBBox tightBoundingBox; // offset 0x68, size 0x18 - class RpMeshHeader * mesh; // offset 0x80, size 0x4 - class RxPipeline * pipeline; // offset 0x84, size 0x4 + class RpMeshHeader* mesh; // offset 0x80, size 0x4 + class RxPipeline* pipeline; // offset 0x84, size 0x4 unsigned short matListWindowBase; // offset 0x88, size 0x2 unsigned short numVertices; // offset 0x8A, size 0x2 unsigned short numPolygons; // offset 0x8C, size 0x2 unsigned short pad; // offset 0x8E, size 0x2 }; -class rxHeapBlockHeader { +class rxHeapBlockHeader +{ // total size: 0x20 public: - class rxHeapBlockHeader * prev; // offset 0x0, size 0x4 - class rxHeapBlockHeader * next; // offset 0x4, size 0x4 + class rxHeapBlockHeader* prev; // offset 0x0, size 0x4 + class rxHeapBlockHeader* next; // offset 0x4, size 0x4 unsigned int size; // offset 0x8, size 0x4 - class rxHeapFreeBlock * freeEntry; // offset 0xC, size 0x4 + class rxHeapFreeBlock* freeEntry; // offset 0xC, size 0x4 unsigned int pad[4]; // offset 0x10, size 0x10 }; -class analog_data { +class analog_data +{ // total size: 0x18 public: class xVec2 offset; // offset 0x0, size 0x8 @@ -761,36 +836,40 @@ class analog_data { float mag; // offset 0x10, size 0x4 float ang; // offset 0x14, size 0x4 }; -class xAnimTable { +class xAnimTable +{ // total size: 0x1C public: - class xAnimTable * Next; // offset 0x0, size 0x4 - char * Name; // offset 0x4, size 0x4 - class xAnimTransition * TransitionList; // offset 0x8, size 0x4 - class xAnimState * StateList; // offset 0xC, size 0x4 + class xAnimTable* Next; // offset 0x0, size 0x4 + char* Name; // offset 0x4, size 0x4 + class xAnimTransition* TransitionList; // offset 0x8, size 0x4 + class xAnimState* StateList; // offset 0xC, size 0x4 unsigned int AnimIndex; // offset 0x10, size 0x4 unsigned int MorphIndex; // offset 0x14, size 0x4 unsigned int UserFlags; // offset 0x18, size 0x4 }; -class xParSys : public xBase { +class xParSys : public xBase +{ // total size: 0x2C public: - class xParSysAsset * tasset; // offset 0x10, size 0x4 + class xParSysAsset* tasset; // offset 0x10, size 0x4 unsigned int cmdCount; // offset 0x14, size 0x4 - class xParCmd * cmd; // offset 0x18, size 0x4 - class xParSys * parent; // offset 0x1C, size 0x4 - class xParGroup * group; // offset 0x20, size 0x4 + class xParCmd* cmd; // offset 0x18, size 0x4 + class xParSys* parent; // offset 0x1C, size 0x4 + class xParGroup* group; // offset 0x20, size 0x4 unsigned char visible; // offset 0x24, size 0x1 - class RwTexture * txtr_particle; // offset 0x28, size 0x4 + class RwTexture* txtr_particle; // offset 0x28, size 0x4 }; -class RxPipelineRequiresCluster { +class RxPipelineRequiresCluster +{ // total size: 0xC public: - class RxClusterDefinition * clusterDef; // offset 0x0, size 0x4 + class RxClusterDefinition* clusterDef; // offset 0x0, size 0x4 enum RxClusterValidityReq rqdOrOpt; // offset 0x4, size 0x4 unsigned int slotIndex; // offset 0x8, size 0x4 }; -class xClumpCollBSPBranchNode { +class xClumpCollBSPBranchNode +{ // total size: 0x10 public: unsigned int leftInfo; // offset 0x0, size 0x4 @@ -798,33 +877,37 @@ class xClumpCollBSPBranchNode { float leftValue; // offset 0x8, size 0x4 float rightValue; // offset 0xC, size 0x4 }; -class RpMorphTarget { +class RpMorphTarget +{ // total size: 0x1C public: - class RpGeometry * parentGeom; // offset 0x0, size 0x4 + class RpGeometry* parentGeom; // offset 0x0, size 0x4 class RwSphere boundingSphere; // offset 0x4, size 0x10 - class RwV3d * verts; // offset 0x14, size 0x4 - class RwV3d * normals; // offset 0x18, size 0x4 + class RwV3d* verts; // offset 0x14, size 0x4 + class RwV3d* normals; // offset 0x18, size 0x4 }; -class xGroup : public xBase { +class xGroup : public xBase +{ // total size: 0x20 public: - class xGroupAsset * asset; // offset 0x10, size 0x4 - class xBase * * item; // offset 0x14, size 0x4 + class xGroupAsset* asset; // offset 0x10, size 0x4 + class xBase** item; // offset 0x14, size 0x4 unsigned int last_index; // offset 0x18, size 0x4 signed int flg_group; // offset 0x1C, size 0x4 }; -class _tagEmitRect { +class _tagEmitRect +{ // total size: 0x8 public: float x_len; // offset 0x0, size 0x4 float z_len; // offset 0x4, size 0x4 }; -class xPar { +class xPar +{ // total size: 0x60 public: - class xPar * m_next; // offset 0x0, size 0x4 - class xPar * m_prev; // offset 0x4, size 0x4 + class xPar* m_next; // offset 0x0, size 0x4 + class xPar* m_prev; // offset 0x4, size 0x4 float m_lifetime; // offset 0x8, size 0x4 unsigned char m_c[4]; // offset 0xC, size 0x4 class xVec3 m_pos; // offset 0x10, size 0xC @@ -837,20 +920,23 @@ class xPar { unsigned char m_rotdeg[3]; // offset 0x34, size 0x3 unsigned char pad8; // offset 0x37, size 0x1 float totalLifespan; // offset 0x38, size 0x4 - class xParEmitterAsset * m_asset; // offset 0x3C, size 0x4 + class xParEmitterAsset* m_asset; // offset 0x3C, size 0x4 float m_cvel[4]; // offset 0x40, size 0x10 float m_cfl[4]; // offset 0x50, size 0x10 }; -class xAnimEffect { +class xAnimEffect +{ // total size: 0x14 public: - class xAnimEffect * Next; // offset 0x0, size 0x4 + class xAnimEffect* Next; // offset 0x0, size 0x4 unsigned int Flags; // offset 0x4, size 0x4 float StartTime; // offset 0x8, size 0x4 float EndTime; // offset 0xC, size 0x4 - unsigned int (* Callback)(unsigned int, class xAnimActiveEffect *, class xAnimSingle *, void *); // offset 0x10, size 0x4 + unsigned int (*Callback)(unsigned int, class xAnimActiveEffect*, class xAnimSingle*, + void*); // offset 0x10, size 0x4 }; -class RpVertexNormal { +class RpVertexNormal +{ // total size: 0x4 public: signed char x; // offset 0x0, size 0x1 @@ -858,36 +944,41 @@ class RpVertexNormal { signed char z; // offset 0x2, size 0x1 unsigned char pad; // offset 0x3, size 0x1 }; -class xBound { +class xBound +{ // total size: 0x4C public: class xQCData qcd; // offset 0x0, size 0x20 unsigned char type; // offset 0x20, size 0x1 unsigned char pad[3]; // offset 0x21, size 0x3 - union { // inferred + union + { // inferred class xSphere sph; // offset 0x24, size 0x10 class xBBox box; // offset 0x24, size 0x24 class xCylinder cyl; // offset 0x24, size 0x14 }; - class xMat4x3 * mat; // offset 0x48, size 0x4 + class xMat4x3* mat; // offset 0x48, size 0x4 }; -class xJSPHeader { +class xJSPHeader +{ // total size: 0x18 public: char idtag[4]; // offset 0x0, size 0x4 unsigned int version; // offset 0x4, size 0x4 unsigned int jspNodeCount; // offset 0x8, size 0x4 - class RpClump * clump; // offset 0xC, size 0x4 - class xClumpCollBSPTree * colltree; // offset 0x10, size 0x4 - class xJSPNodeInfo * jspNodeList; // offset 0x14, size 0x4 + class RpClump* clump; // offset 0xC, size 0x4 + class xClumpCollBSPTree* colltree; // offset 0x10, size 0x4 + class xJSPNodeInfo* jspNodeList; // offset 0x14, size 0x4 }; -class xVec2 { +class xVec2 +{ // total size: 0x8 public: float x; // offset 0x0, size 0x4 float y; // offset 0x4, size 0x4 }; -class xBaseAsset { +class xBaseAsset +{ // total size: 0x8 public: unsigned int id; // offset 0x0, size 0x4 @@ -895,33 +986,36 @@ class xBaseAsset { unsigned char linkCount; // offset 0x5, size 0x1 unsigned short baseFlags; // offset 0x6, size 0x2 }; -class zCheckPoint { +class zCheckPoint +{ // total size: 0x14 public: class xVec3 pos; // offset 0x0, size 0xC float rot; // offset 0xC, size 0x4 unsigned int initCamID; // offset 0x10, size 0x4 }; -class xMat4x3 : public xMat3x3 { +class xMat4x3 : public xMat3x3 +{ // total size: 0x40 public: class xVec3 pos; // offset 0x30, size 0xC unsigned int pad3; // offset 0x3C, size 0x4 }; -class zPlayerGlobals { +class zPlayerGlobals +{ // total size: 0x1940 public: class zEnt ent; // offset 0x0, size 0xD4 class xEntShadow entShadow_embedded; // offset 0xD4, size 0x28 class xShadowSimpleCache simpShadow_embedded; // offset 0xFC, size 0x98 class zGlobalSettings g; // offset 0x194, size 0x150 - class zPlayerSettings * s; // offset 0x2E4, size 0x4 + class zPlayerSettings* s; // offset 0x2E4, size 0x4 class zPlayerSettings sb; // offset 0x2F0, size 0x460 class zPlayerSettings patrick; // offset 0x750, size 0x460 class zPlayerSettings sandy; // offset 0xBB0, size 0x460 - class xModelInstance * model_spongebob; // offset 0x1010, size 0x4 - class xModelInstance * model_patrick; // offset 0x1014, size 0x4 - class xModelInstance * model_sandy; // offset 0x1018, size 0x4 + class xModelInstance* model_spongebob; // offset 0x1010, size 0x4 + class xModelInstance* model_patrick; // offset 0x1014, size 0x4 + class xModelInstance* model_sandy; // offset 0x1018, size 0x4 unsigned int Visible; // offset 0x101C, size 0x4 unsigned int Health; // offset 0x1020, size 0x4 signed int Speed; // offset 0x1024, size 0x4 @@ -943,7 +1037,7 @@ class zPlayerGlobals { float HotsauceTimer; // offset 0x1064, size 0x4 float LeanLerp; // offset 0x1068, size 0x4 float ScareTimer; // offset 0x106C, size 0x4 - class xBase * ScareSource; // offset 0x1070, size 0x4 + class xBase* ScareSource; // offset 0x1070, size 0x4 float CowerTimer; // offset 0x1074, size 0x4 float DamageTimer; // offset 0x1078, size 0x4 float SundaeTimer; // offset 0x107C, size 0x4 @@ -955,7 +1049,7 @@ class zPlayerGlobals { float HeadbuttVel; // offset 0x1094, size 0x4 float HeadbuttTimer; // offset 0x1098, size 0x4 unsigned int SpecialReceived; // offset 0x109C, size 0x4 - class xEnt * MountChimney; // offset 0x10A0, size 0x4 + class xEnt* MountChimney; // offset 0x10A0, size 0x4 float MountChimOldY; // offset 0x10A4, size 0x4 unsigned int MaxHealth; // offset 0x10A8, size 0x4 unsigned int DoMeleeCheck; // offset 0x10AC, size 0x4 @@ -976,24 +1070,24 @@ class zPlayerGlobals { float IdleMajorTimer; // offset 0x10E8, size 0x4 float IdleSitTimer; // offset 0x10EC, size 0x4 signed int Transparent; // offset 0x10F0, size 0x4 - class zEnt * FireTarget; // offset 0x10F4, size 0x4 + class zEnt* FireTarget; // offset 0x10F4, size 0x4 unsigned int ControlOff; // offset 0x10F8, size 0x4 unsigned int ControlOnEvent; // offset 0x10FC, size 0x4 unsigned int AutoMoveSpeed; // offset 0x1100, size 0x4 float AutoMoveDist; // offset 0x1104, size 0x4 class xVec3 AutoMoveTarget; // offset 0x1108, size 0xC - class xBase * AutoMoveObject; // offset 0x1114, size 0x4 - class zEnt * Diggable; // offset 0x1118, size 0x4 + class xBase* AutoMoveObject; // offset 0x1114, size 0x4 + class zEnt* Diggable; // offset 0x1118, size 0x4 float DigTimer; // offset 0x111C, size 0x4 class zPlayerCarryInfo carry; // offset 0x1120, size 0xE0 class zPlayerLassoInfo lassoInfo; // offset 0x1200, size 0x120 class xModelTag BubbleWandTag[2]; // offset 0x1320, size 0x40 - class xModelInstance * model_wand; // offset 0x1360, size 0x4 - class xEntBoulder * bubblebowl; // offset 0x1364, size 0x4 + class xModelInstance* model_wand; // offset 0x1360, size 0x4 + class xEntBoulder* bubblebowl; // offset 0x1364, size 0x4 float bbowlInitVel; // offset 0x1368, size 0x4 - class zEntHangable * HangFound; // offset 0x136C, size 0x4 - class zEntHangable * HangEnt; // offset 0x1370, size 0x4 - class zEntHangable * HangEntLast; // offset 0x1374, size 0x4 + class zEntHangable* HangFound; // offset 0x136C, size 0x4 + class zEntHangable* HangEnt; // offset 0x1370, size 0x4 + class zEntHangable* HangEntLast; // offset 0x1374, size 0x4 class xVec3 HangPivot; // offset 0x1378, size 0xC class xVec3 HangVel; // offset 0x1384, size 0xC float HangLength; // offset 0x1390, size 0x4 @@ -1008,7 +1102,7 @@ class zPlayerGlobals { signed int Jump_CanDouble; // offset 0x1438, size 0x4 signed int Jump_CanFloat; // offset 0x143C, size 0x4 signed int Jump_SpringboardStart; // offset 0x1440, size 0x4 - class zPlatform * Jump_Springboard; // offset 0x1444, size 0x4 + class zPlatform* Jump_Springboard; // offset 0x1444, size 0x4 signed int CanJump; // offset 0x1448, size 0x4 signed int CanBubbleSpin; // offset 0x144C, size 0x4 signed int CanBubbleBounce; // offset 0x1450, size 0x4 @@ -1033,7 +1127,7 @@ class zPlayerGlobals { unsigned int Inv_PatsSock_Total; // offset 0x1544, size 0x4 class xModelTag BubbleTag; // offset 0x1548, size 0x20 class xEntDrive drv; // offset 0x1568, size 0x7C - class xSurface * floor_surf; // offset 0x15E4, size 0x4 + class xSurface* floor_surf; // offset 0x15E4, size 0x4 class xVec3 floor_norm; // offset 0x15E8, size 0xC signed int slope; // offset 0x15F4, size 0x4 class xCollis earc_coll; // offset 0x15F8, size 0x50 @@ -1046,7 +1140,7 @@ class zPlayerGlobals { class zCheckPoint cp; // offset 0x16B8, size 0x14 unsigned int SlideTrackSliding; // offset 0x16CC, size 0x4 unsigned int SlideTrackCount; // offset 0x16D0, size 0x4 - class xEnt * SlideTrackEnt[111]; // offset 0x16D4, size 0x1BC + class xEnt* SlideTrackEnt[111]; // offset 0x16D4, size 0x1BC unsigned int SlideNotGroundedSinceSlide; // offset 0x1890, size 0x4 class xVec3 SlideTrackDir; // offset 0x1894, size 0xC class xVec3 SlideTrackVel; // offset 0x18A0, size 0xC @@ -1054,7 +1148,7 @@ class zPlayerGlobals { float SlideTrackLean; // offset 0x18B0, size 0x4 float SlideTrackLand; // offset 0x18B4, size 0x4 unsigned char sb_model_indices[14]; // offset 0x18B8, size 0xE - class xModelInstance * sb_models[14]; // offset 0x18C8, size 0x38 + class xModelInstance* sb_models[14]; // offset 0x18C8, size 0x38 unsigned int currentPlayer; // offset 0x1900, size 0x4 class xVec3 PredictRotate; // offset 0x1904, size 0xC class xVec3 PredictTranslate; // offset 0x1910, size 0xC @@ -1064,7 +1158,8 @@ class zPlayerGlobals { float KnockBackTimer; // offset 0x1930, size 0x4 float KnockIntoAirTimer; // offset 0x1934, size 0x4 }; -class xVec4 { +class xVec4 +{ // total size: 0x10 public: float x; // offset 0x0, size 0x4 @@ -1072,20 +1167,23 @@ class xVec4 { float z; // offset 0x8, size 0x4 float w; // offset 0xC, size 0x4 }; -class RwSurfaceProperties { +class RwSurfaceProperties +{ // total size: 0xC public: float ambient; // offset 0x0, size 0x4 float specular; // offset 0x4, size 0x4 float diffuse; // offset 0x8, size 0x4 }; -class xBBox { +class xBBox +{ // total size: 0x24 public: class xVec3 center; // offset 0x0, size 0xC class xBox box; // offset 0xC, size 0x18 }; -class RwMatrixTag { +class RwMatrixTag +{ // total size: 0x40 public: class RwV3d right; // offset 0x0, size 0xC @@ -1097,7 +1195,8 @@ class RwMatrixTag { class RwV3d pos; // offset 0x30, size 0xC unsigned int pad3; // offset 0x3C, size 0x4 }; -class RpMeshHeader { +class RpMeshHeader +{ // total size: 0x10 public: unsigned int flags; // offset 0x0, size 0x4 @@ -1106,22 +1205,24 @@ class RpMeshHeader { unsigned int totalIndicesInMesh; // offset 0x8, size 0x4 unsigned int firstMeshOffset; // offset 0xC, size 0x4 }; -class xUpdateCullMgr { +class xUpdateCullMgr +{ // total size: 0x2C public: unsigned int entCount; // offset 0x0, size 0x4 unsigned int entActive; // offset 0x4, size 0x4 - void * * ent; // offset 0x8, size 0x4 - class xUpdateCullEnt * * mgr; // offset 0xC, size 0x4 + void** ent; // offset 0x8, size 0x4 + class xUpdateCullEnt** mgr; // offset 0xC, size 0x4 unsigned int mgrCount; // offset 0x10, size 0x4 unsigned int mgrCurr; // offset 0x14, size 0x4 - class xUpdateCullEnt * mgrList; // offset 0x18, size 0x4 + class xUpdateCullEnt* mgrList; // offset 0x18, size 0x4 unsigned int grpCount; // offset 0x1C, size 0x4 - class xUpdateCullGroup * grpList; // offset 0x20, size 0x4 - void (* activateCB)(void *); // offset 0x24, size 0x4 - void (* deactivateCB)(void *); // offset 0x28, size 0x4 + class xUpdateCullGroup* grpList; // offset 0x20, size 0x4 + void (*activateCB)(void*); // offset 0x24, size 0x4 + void (*deactivateCB)(void*); // offset 0x28, size 0x4 }; -class xParCmdAsset { +class xParCmdAsset +{ // total size: 0x8 public: unsigned int type; // offset 0x0, size 0x4 @@ -1129,14 +1230,15 @@ class xParCmdAsset { unsigned char mode; // offset 0x5, size 0x1 unsigned char pad[2]; // offset 0x6, size 0x2 }; -class zPlayerCarryInfo { +class zPlayerCarryInfo +{ // total size: 0xE0 public: - class xEnt * grabbed; // offset 0x0, size 0x4 + class xEnt* grabbed; // offset 0x0, size 0x4 unsigned int grabbedModelID; // offset 0x4, size 0x4 class xMat4x3 spin; // offset 0x10, size 0x40 - class xEnt * throwTarget; // offset 0x50, size 0x4 - class xEnt * flyingToTarget; // offset 0x54, size 0x4 + class xEnt* throwTarget; // offset 0x50, size 0x4 + class xEnt* flyingToTarget; // offset 0x54, size 0x4 float minDist; // offset 0x58, size 0x4 float maxDist; // offset 0x5C, size 0x4 float minHeight; // offset 0x60, size 0x4 @@ -1166,41 +1268,46 @@ class zPlayerCarryInfo { float fruitCeilingBounce; // offset 0xC8, size 0x4 float fruitWallBounce; // offset 0xCC, size 0x4 float fruitLifetime; // offset 0xD0, size 0x4 - class xEnt * patLauncher; // offset 0xD4, size 0x4 + class xEnt* patLauncher; // offset 0xD4, size 0x4 }; -class RwResEntry { +class RwResEntry +{ // total size: 0x18 public: class RwLLLink link; // offset 0x0, size 0x8 signed int size; // offset 0x8, size 0x4 - void * owner; // offset 0xC, size 0x4 - class RwResEntry * * ownerRef; // offset 0x10, size 0x4 - void (* destroyNotify)(class RwResEntry *); // offset 0x14, size 0x4 + void* owner; // offset 0xC, size 0x4 + class RwResEntry** ownerRef; // offset 0x10, size 0x4 + void (*destroyNotify)(class RwResEntry*); // offset 0x14, size 0x4 }; -class xSerial { +class xSerial +{ // total size: 0x0 }; -class _zEnv : public xBase { +class _zEnv : public xBase +{ // total size: 0x14 public: - class xEnvAsset * easset; // offset 0x10, size 0x4 + class xEnvAsset* easset; // offset 0x10, size 0x4 }; -class rxReq { +class rxReq +{ // total size: 0x0 }; -class xCamera : public xBase { +class xCamera : public xBase +{ // total size: 0x330 public: - class RwCamera * lo_cam; // offset 0x10, size 0x4 + class RwCamera* lo_cam; // offset 0x10, size 0x4 class xMat4x3 mat; // offset 0x20, size 0x40 class xMat4x3 omat; // offset 0x60, size 0x40 class xMat3x3 mbasis; // offset 0xA0, size 0x30 class xBound bound; // offset 0xD0, size 0x4C - class xMat4x3 * tgt_mat; // offset 0x11C, size 0x4 - class xMat4x3 * tgt_omat; // offset 0x120, size 0x4 - class xBound * tgt_bound; // offset 0x124, size 0x4 + class xMat4x3* tgt_mat; // offset 0x11C, size 0x4 + class xMat4x3* tgt_omat; // offset 0x120, size 0x4 + class xBound* tgt_bound; // offset 0x124, size 0x4 class xVec3 focus; // offset 0x128, size 0xC - class xScene * sc; // offset 0x134, size 0x4 + class xScene* sc; // offset 0x134, size 0x4 class xVec3 tran_accum; // offset 0x138, size 0xC float fov; // offset 0x144, size 0x4 unsigned int flags; // offset 0x148, size 0x4 @@ -1268,20 +1375,22 @@ class xCamera : public xBase { float roll_csv; // offset 0x264, size 0x4 class xVec4 frustplane[12]; // offset 0x270, size 0xC0 }; -class xMemPool { +class xMemPool +{ // total size: 0x1C public: - void * FreeList; // offset 0x0, size 0x4 + void* FreeList; // offset 0x0, size 0x4 unsigned short NextOffset; // offset 0x4, size 0x2 unsigned short Flags; // offset 0x6, size 0x2 - void * UsedList; // offset 0x8, size 0x4 - void (* InitCB)(class xMemPool *, void *); // offset 0xC, size 0x4 - void * Buffer; // offset 0x10, size 0x4 + void* UsedList; // offset 0x8, size 0x4 + void (*InitCB)(class xMemPool*, void*); // offset 0xC, size 0x4 + void* Buffer; // offset 0x10, size 0x4 unsigned short Size; // offset 0x14, size 0x2 unsigned short NumRealloc; // offset 0x16, size 0x2 unsigned int Total; // offset 0x18, size 0x4 }; -class xPEEntBound { +class xPEEntBound +{ // total size: 0xC public: unsigned char flags; // offset 0x0, size 0x1 @@ -1291,7 +1400,8 @@ class xPEEntBound { float expand; // offset 0x4, size 0x4 float deflection; // offset 0x8, size 0x4 }; -class zPlayerSettings { +class zPlayerSettings +{ // total size: 0x460 public: enum _zPlayerType pcType; // offset 0x0, size 0x4 @@ -1318,30 +1428,33 @@ class zPlayerSettings { unsigned char talk_filter_size; // offset 0x459, size 0x1 unsigned char talk_filter[4]; // offset 0x45A, size 0x4 }; -enum RxClusterValidityReq { +enum RxClusterValidityReq +{ rxCLREQ_DONTWANT = 0, rxCLREQ_REQUIRED = 1, rxCLREQ_OPTIONAL = 2, rxCLUSTERVALIDITYREQFORCEENUMSIZEINT = 2147483647, }; -class xClumpCollBSPTree { +class xClumpCollBSPTree +{ // total size: 0x10 public: unsigned int numBranchNodes; // offset 0x0, size 0x4 - class xClumpCollBSPBranchNode * branchNodes; // offset 0x4, size 0x4 + class xClumpCollBSPBranchNode* branchNodes; // offset 0x4, size 0x4 unsigned int numTriangles; // offset 0x8, size 0x4 - class xClumpCollBSPTriangle * triangles; // offset 0xC, size 0x4 + class xClumpCollBSPTriangle* triangles; // offset 0xC, size 0x4 }; -class RwCamera { +class RwCamera +{ // total size: 0x190 public: class RwObjectHasFrame object; // offset 0x0, size 0x14 enum RwCameraProjection projectionType; // offset 0x14, size 0x4 - class RwCamera * (* beginUpdate)(class RwCamera *); // offset 0x18, size 0x4 - class RwCamera * (* endUpdate)(class RwCamera *); // offset 0x1C, size 0x4 + class RwCamera* (*beginUpdate)(class RwCamera*); // offset 0x18, size 0x4 + class RwCamera* (*endUpdate)(class RwCamera*); // offset 0x1C, size 0x4 class RwMatrixTag viewMatrix; // offset 0x20, size 0x40 - class RwRaster * frameBuffer; // offset 0x60, size 0x4 - class RwRaster * zBuffer; // offset 0x64, size 0x4 + class RwRaster* frameBuffer; // offset 0x60, size 0x4 + class RwRaster* zBuffer; // offset 0x64, size 0x4 class RwV2d viewWindow; // offset 0x68, size 0x8 class RwV2d recipViewWindow; // offset 0x70, size 0x8 class RwV2d viewOffset; // offset 0x78, size 0x8 @@ -1354,23 +1467,27 @@ class RwCamera { class RwBBox frustumBoundBox; // offset 0x10C, size 0x18 class RwV3d frustumCorners[8]; // offset 0x124, size 0x60 }; -class _tagEmitLine { +class _tagEmitLine +{ // total size: 0x1C public: class xVec3 pos1; // offset 0x0, size 0xC class xVec3 pos2; // offset 0xC, size 0xC float radius; // offset 0x18, size 0x4 }; -class xParSysInfo { +class xParSysInfo +{ // total size: 0x8 public: signed int type; // offset 0x0, size 0x4 - void (* func)(void *, class xParGroup *); // offset 0x4, size 0x4 + void (*func)(void*, class xParGroup*); // offset 0x4, size 0x4 }; -class xSurface { +class xSurface +{ // total size: 0x0 }; -class xEnvAsset : public xBaseAsset { +class xEnvAsset : public xBaseAsset +{ // total size: 0x44 public: unsigned int bspAssetID; // offset 0x8, size 0x4 @@ -1389,24 +1506,28 @@ class xEnvAsset : public xBaseAsset { unsigned int bspMapperFXID; // offset 0x3C, size 0x4 float loldHeight; // offset 0x40, size 0x4 }; -class RpTriangle { +class RpTriangle +{ // total size: 0x8 public: unsigned short vertIndex[3]; // offset 0x0, size 0x6 signed short matIndex; // offset 0x6, size 0x2 }; -enum RxNodeDefEditable { +enum RxNodeDefEditable +{ rxNODEDEFCONST = 0, rxNODEDEFEDITABLE = 1, rxNODEDEFEDITABLEFORCEENUMSIZEINT = 2147483647, }; -enum RxClusterValid { +enum RxClusterValid +{ rxCLVALID_NOCHANGE = 0, rxCLVALID_VALID = 1, rxCLVALID_INVALID = 2, rxCLUSTERVALIDFORCEENUMSIZEINT = 2147483647, }; -class xPortalAsset : public xBaseAsset { +class xPortalAsset : public xBaseAsset +{ // total size: 0x18 public: unsigned int assetCameraID; // offset 0x8, size 0x4 @@ -1414,26 +1535,29 @@ class xPortalAsset : public xBaseAsset { float ang; // offset 0x10, size 0x4 unsigned int sceneID; // offset 0x14, size 0x4 }; -class xGridBound { +class xGridBound +{ // total size: 0x14 public: - void * data; // offset 0x0, size 0x4 + void* data; // offset 0x0, size 0x4 unsigned short gx; // offset 0x4, size 0x2 unsigned short gz; // offset 0x6, size 0x2 unsigned char ingrid; // offset 0x8, size 0x1 unsigned char oversize; // offset 0x9, size 0x1 unsigned char deleted; // offset 0xA, size 0x1 unsigned char gpad; // offset 0xB, size 0x1 - class xGridBound * * head; // offset 0xC, size 0x4 - class xGridBound * next; // offset 0x10, size 0x4 + class xGridBound** head; // offset 0xC, size 0x4 + class xGridBound* next; // offset 0x10, size 0x4 }; -class xRot { +class xRot +{ // total size: 0x10 public: class xVec3 axis; // offset 0x0, size 0xC float angle; // offset 0xC, size 0x4 }; -class iFogParams { +class iFogParams +{ // total size: 0x1C public: enum RwFogType type; // offset 0x0, size 0x4 @@ -1442,18 +1566,20 @@ class iFogParams { float density; // offset 0xC, size 0x4 class RwRGBA fogcolor; // offset 0x10, size 0x4 class RwRGBA bgcolor; // offset 0x14, size 0x4 - unsigned char * table; // offset 0x18, size 0x4 + unsigned char* table; // offset 0x18, size 0x4 }; -class _tagxRumble { +class _tagxRumble +{ // total size: 0x10 public: enum _tagRumbleType type; // offset 0x0, size 0x4 float seconds; // offset 0x4, size 0x4 - class _tagxRumble * next; // offset 0x8, size 0x4 + class _tagxRumble* next; // offset 0x8, size 0x4 signed short active; // offset 0xC, size 0x2 unsigned short fxflags; // offset 0xE, size 0x2 }; -class xEntAsset : public xBaseAsset { +class xEntAsset : public xBaseAsset +{ // total size: 0x54 public: unsigned char flags; // offset 0x8, size 0x1 @@ -1473,20 +1599,23 @@ class xEntAsset : public xBaseAsset { unsigned int modelInfoID; // offset 0x4C, size 0x4 unsigned int animListID; // offset 0x50, size 0x4 }; -enum rxEmbeddedPacketState { +enum rxEmbeddedPacketState +{ rxPKST_PACKETLESS = 0, rxPKST_UNUSED = 1, rxPKST_INUSE = 2, rxPKST_PENDING = 3, rxEMBEDDEDPACKETSTATEFORCEENUMSIZEINT = 2147483647, }; -class xSphere { +class xSphere +{ // total size: 0x10 public: class xVec3 center; // offset 0x0, size 0xC float r; // offset 0xC, size 0x4 }; -class xScene { +class xScene +{ // total size: 0x70 public: unsigned int sceneID; // offset 0x0, size 0x4 @@ -1506,81 +1635,90 @@ class xScene { unsigned short num_stats_allocd; // offset 0x24, size 0x2 unsigned short num_dyns_allocd; // offset 0x26, size 0x2 unsigned short num_npcs_allocd; // offset 0x28, size 0x2 - class xEnt * * trigs; // offset 0x2C, size 0x4 - class xEnt * * stats; // offset 0x30, size 0x4 - class xEnt * * dyns; // offset 0x34, size 0x4 - class xEnt * * npcs; // offset 0x38, size 0x4 - class xEnt * * act_ents; // offset 0x3C, size 0x4 - class xEnt * * nact_ents; // offset 0x40, size 0x4 - class xEnv * env; // offset 0x44, size 0x4 + class xEnt** trigs; // offset 0x2C, size 0x4 + class xEnt** stats; // offset 0x30, size 0x4 + class xEnt** dyns; // offset 0x34, size 0x4 + class xEnt** npcs; // offset 0x38, size 0x4 + class xEnt** act_ents; // offset 0x3C, size 0x4 + class xEnt** nact_ents; // offset 0x40, size 0x4 + class xEnv* env; // offset 0x44, size 0x4 class xMemPool mempool; // offset 0x48, size 0x1C - class xBase * (* resolvID)(unsigned int); // offset 0x64, size 0x4 - char * (* base2Name)(class xBase *); // offset 0x68, size 0x4 - char * (* id2Name)(unsigned int); // offset 0x6C, size 0x4 + class xBase* (*resolvID)(unsigned int); // offset 0x64, size 0x4 + char* (*base2Name)(class xBase*); // offset 0x68, size 0x4 + char* (*id2Name)(unsigned int); // offset 0x6C, size 0x4 }; -class xAnimTransitionList { +class xAnimTransitionList +{ // total size: 0x8 public: - class xAnimTransitionList * Next; // offset 0x0, size 0x4 - class xAnimTransition * T; // offset 0x4, size 0x4 + class xAnimTransitionList* Next; // offset 0x0, size 0x4 + class xAnimTransition* T; // offset 0x4, size 0x4 }; -class RpWorld { +class RpWorld +{ // total size: 0x70 public: class RwObject object; // offset 0x0, size 0x8 unsigned int flags; // offset 0x8, size 0x4 enum RpWorldRenderOrder renderOrder; // offset 0xC, size 0x4 class RpMaterialList matList; // offset 0x10, size 0xC - class RpSector * rootSector; // offset 0x1C, size 0x4 + class RpSector* rootSector; // offset 0x1C, size 0x4 signed int numTexCoordSets; // offset 0x20, size 0x4 signed int numClumpsInWorld; // offset 0x24, size 0x4 - class RwLLLink * currentClumpLink; // offset 0x28, size 0x4 + class RwLLLink* currentClumpLink; // offset 0x28, size 0x4 class RwLinkList clumpList; // offset 0x2C, size 0x8 class RwLinkList lightList; // offset 0x34, size 0x8 class RwLinkList directionalLightList; // offset 0x3C, size 0x8 class RwV3d worldOrigin; // offset 0x44, size 0xC class RwBBox boundingBox; // offset 0x50, size 0x18 - class RpWorldSector * (* renderCallBack)(class RpWorldSector *); // offset 0x68, size 0x4 - class RxPipeline * pipeline; // offset 0x6C, size 0x4 + class RpWorldSector* (*renderCallBack)(class RpWorldSector*); // offset 0x68, size 0x4 + class RxPipeline* pipeline; // offset 0x6C, size 0x4 }; -class _tagEmitVolume { +class _tagEmitVolume +{ // total size: 0x4 public: unsigned int emit_volumeID; // offset 0x0, size 0x4 }; -enum RwCameraProjection { +enum RwCameraProjection +{ rwNACAMERAPROJECTION = 0, rwPERSPECTIVE = 1, rwPARALLEL = 2, rwCAMERAPROJECTIONFORCEENUMSIZEINT = 2147483647, }; -enum RxClusterForcePresent { +enum RxClusterForcePresent +{ rxCLALLOWABSENT = 0, rxCLFORCEPRESENT = 1, rxCLUSTERFORCEPRESENTFORCEENUMSIZEINT = 2147483647, }; -class xModelTag { +class xModelTag +{ // total size: 0x20 public: class xVec3 v; // offset 0x0, size 0xC unsigned int matidx; // offset 0xC, size 0x4 float wt[4]; // offset 0x10, size 0x10 }; -class xCylinder { +class xCylinder +{ // total size: 0x14 public: class xVec3 center; // offset 0x0, size 0xC float r; // offset 0xC, size 0x4 float h; // offset 0x10, size 0x4 }; -class xEnv { +class xEnv +{ // total size: 0x50 public: - class iEnv * geom; // offset 0x0, size 0x4 + class iEnv* geom; // offset 0x0, size 0x4 class iEnv ienv; // offset 0x10, size 0x30 - class xLightKit * lightKit; // offset 0x40, size 0x4 + class xLightKit* lightKit; // offset 0x40, size 0x4 }; -class xEntDrive { +class xEntDrive +{ // total size: 0x7C public: unsigned int flags; // offset 0x0, size 0x4 @@ -1590,9 +1728,9 @@ class xEntDrive { float tm; // offset 0x10, size 0x4 float tmr; // offset 0x14, size 0x4 float s; // offset 0x18, size 0x4 - class xEnt * odriver; // offset 0x1C, size 0x4 - class xEnt * driver; // offset 0x20, size 0x4 - class xEnt * driven; // offset 0x24, size 0x4 + class xEnt* odriver; // offset 0x1C, size 0x4 + class xEnt* driver; // offset 0x20, size 0x4 + class xEnt* driven; // offset 0x24, size 0x4 class xVec3 op; // offset 0x28, size 0xC class xVec3 p; // offset 0x34, size 0xC class xVec3 q; // offset 0x40, size 0xC @@ -1600,21 +1738,24 @@ class xEntDrive { class xVec3 dloc; // offset 0x50, size 0xC class tri_data tri; // offset 0x5C, size 0x20 }; -class xBox { +class xBox +{ // total size: 0x18 public: class xVec3 upper; // offset 0x0, size 0xC class xVec3 lower; // offset 0xC, size 0xC }; -class RxClusterDefinition { +class RxClusterDefinition +{ // total size: 0x10 public: - char * name; // offset 0x0, size 0x4 + char* name; // offset 0x0, size 0x4 unsigned int defaultStride; // offset 0x4, size 0x4 unsigned int defaultAttributes; // offset 0x8, size 0x4 - char * attributeSet; // offset 0xC, size 0x4 + char* attributeSet; // offset 0xC, size 0x4 }; -class zJumpParam { +class zJumpParam +{ // total size: 0x10 public: float PeakHeight; // offset 0x0, size 0x4 @@ -1622,13 +1763,15 @@ class zJumpParam { float TimeHold; // offset 0x8, size 0x4 float ImpulseVel; // offset 0xC, size 0x4 }; -enum RpWorldRenderOrder { +enum RpWorldRenderOrder +{ rpWORLDRENDERNARENDERORDER = 0, rpWORLDRENDERFRONT2BACK = 1, rpWORLDRENDERBACK2FRONT = 2, rpWORLDRENDERORDERFORCEENUMSIZEINT = 2147483647, }; -class RpLight { +class RpLight +{ // total size: 0x40 public: class RwObjectHasFrame object; // offset 0x0, size 0x14 @@ -1640,20 +1783,24 @@ class RpLight { unsigned short lightFrame; // offset 0x3C, size 0x2 unsigned short pad; // offset 0x3E, size 0x2 }; -enum _tagPadState { +enum _tagPadState +{ ePad_Disabled = 0, ePad_DisabledError = 1, ePad_Enabled = 2, ePad_Missing = 3, ePad_Total = 4, }; -class xEntBoulder { +class xEntBoulder +{ // total size: 0x0 }; -class zEntHangable { +class zEntHangable +{ // total size: 0x0 }; -class RwFrame { +class RwFrame +{ // total size: 0xB0 public: class RwObject object; // offset 0x0, size 0x8 @@ -1661,30 +1808,32 @@ class RwFrame { class RwMatrixTag modelling; // offset 0x10, size 0x40 class RwMatrixTag ltm; // offset 0x50, size 0x40 class RwLinkList objectList; // offset 0x90, size 0x8 - class RwFrame * child; // offset 0x98, size 0x4 - class RwFrame * next; // offset 0x9C, size 0x4 - class RwFrame * root; // offset 0xA0, size 0x4 + class RwFrame* child; // offset 0x98, size 0x4 + class RwFrame* next; // offset 0x9C, size 0x4 + class RwFrame* root; // offset 0xA0, size 0x4 }; -class RwSphere { +class RwSphere +{ // total size: 0x10 public: class RwV3d center; // offset 0x0, size 0xC float radius; // offset 0xC, size 0x4 }; -class xGlobals { +class xGlobals +{ // total size: 0x700 public: class xCamera camera; // offset 0x0, size 0x330 - class _tagxPad * pad0; // offset 0x330, size 0x4 - class _tagxPad * pad1; // offset 0x334, size 0x4 - class _tagxPad * pad2; // offset 0x338, size 0x4 - class _tagxPad * pad3; // offset 0x33C, size 0x4 + class _tagxPad* pad0; // offset 0x330, size 0x4 + class _tagxPad* pad1; // offset 0x334, size 0x4 + class _tagxPad* pad2; // offset 0x338, size 0x4 + class _tagxPad* pad3; // offset 0x33C, size 0x4 signed int profile; // offset 0x340, size 0x4 char profFunc[6][128]; // offset 0x344, size 0x300 - class xUpdateCullMgr * updateMgr; // offset 0x644, size 0x4 + class xUpdateCullMgr* updateMgr; // offset 0x644, size 0x4 signed int sceneFirst; // offset 0x648, size 0x4 char sceneStart[32]; // offset 0x64C, size 0x20 - class RpWorld * currWorld; // offset 0x66C, size 0x4 + class RpWorld* currWorld; // offset 0x66C, size 0x4 class iFogParams fog; // offset 0x670, size 0x1C class iFogParams fogA; // offset 0x68C, size 0x1C class iFogParams fogB; // offset 0x6A8, size 0x1C @@ -1701,7 +1850,8 @@ class xGlobals { unsigned char dontShowPadMessageDuringLoadingOrCutScene; // offset 0x6F0, size 0x1 unsigned char autoSaveFeature; // offset 0x6F1, size 0x1 }; -class iColor_tag { +class iColor_tag +{ // total size: 0x4 public: unsigned char r; // offset 0x0, size 0x1 @@ -1709,36 +1859,42 @@ class iColor_tag { unsigned char b; // offset 0x2, size 0x1 unsigned char a; // offset 0x3, size 0x1 }; -class _tagEmitOffsetPoint { +class _tagEmitOffsetPoint +{ // total size: 0xC public: class xVec3 offset; // offset 0x0, size 0xC }; -class RpSector { +class RpSector +{ // total size: 0x4 public: signed int type; // offset 0x0, size 0x4 }; -class zPlatform { +class zPlatform +{ // total size: 0x0 }; -class xModelBucket { +class xModelBucket +{ // total size: 0x14 public: - class RpAtomic * Data; // offset 0x0, size 0x4 - class RpAtomic * OriginalData; // offset 0x4, size 0x4 - class xModelInstance * List; // offset 0x8, size 0x4 + class RpAtomic* Data; // offset 0x0, size 0x4 + class RpAtomic* OriginalData; // offset 0x4, size 0x4 + class xModelInstance* List; // offset 0x8, size 0x4 signed int ClipFlags; // offset 0xC, size 0x4 unsigned int PipeFlags; // offset 0x10, size 0x4 }; -class RwTexDictionary { +class RwTexDictionary +{ // total size: 0x18 public: class RwObject object; // offset 0x0, size 0x8 class RwLinkList texturesInDict; // offset 0x8, size 0x8 class RwLLLink lInInstance; // offset 0x10, size 0x8 }; -class _tagxPad { +class _tagxPad +{ // total size: 0x148 public: unsigned char value[22]; // offset 0x0, size 0x16 @@ -1761,19 +1917,22 @@ class _tagxPad { float down_tmr[22]; // offset 0xC0, size 0x58 class analog_data analog[2]; // offset 0x118, size 0x30 }; -class _zPortal : public xBase { +class _zPortal : public xBase +{ // total size: 0x14 public: - class xPortalAsset * passet; // offset 0x10, size 0x4 + class xPortalAsset* passet; // offset 0x10, size 0x4 }; -class RxOutputSpec { +class RxOutputSpec +{ // total size: 0xC public: - char * name; // offset 0x0, size 0x4 - enum RxClusterValid * outputClusters; // offset 0x4, size 0x4 + char* name; // offset 0x0, size 0x4 + enum RxClusterValid* outputClusters; // offset 0x4, size 0x4 enum RxClusterValid allOtherClusters; // offset 0x8, size 0x4 }; -class xEntFrame { +class xEntFrame +{ // total size: 0xF0 public: class xMat4x3 mat; // offset 0x0, size 0x40 @@ -1787,10 +1946,12 @@ class xEntFrame { class xVec3 vel; // offset 0xD4, size 0xC unsigned int mode; // offset 0xE0, size 0x4 }; -class zCutsceneMgr { +class zCutsceneMgr +{ // total size: 0x0 }; -class xEntCollis { +class xEntCollis +{ // total size: 0x5B4 public: unsigned char chk; // offset 0x0, size 0x1 @@ -1805,10 +1966,12 @@ class xEntCollis { unsigned char stat_eidx; // offset 0x9, size 0x1 unsigned char idx; // offset 0xA, size 0x1 class xCollis colls[18]; // offset 0xC, size 0x5A0 - void (* post)(class xEnt *, class xScene *, float, class xEntCollis *); // offset 0x5AC, size 0x4 - unsigned int (* depenq)(class xEnt *, class xEnt *, class xScene *, float, class xCollis *); // offset 0x5B0, size 0x4 + void (*post)(class xEnt*, class xScene*, float, class xEntCollis*); // offset 0x5AC, size 0x4 + unsigned int (*depenq)(class xEnt*, class xEnt*, class xScene*, float, + class xCollis*); // offset 0x5B0, size 0x4 }; -class xMat3x3 { +class xMat3x3 +{ // total size: 0x30 public: class xVec3 right; // offset 0x0, size 0xC @@ -1818,107 +1981,124 @@ class xMat3x3 { class xVec3 at; // offset 0x20, size 0xC unsigned int pad2; // offset 0x2C, size 0x4 }; -class RxClusterRef { +class RxClusterRef +{ // total size: 0xC public: - class RxClusterDefinition * clusterDef; // offset 0x0, size 0x4 + class RxClusterDefinition* clusterDef; // offset 0x0, size 0x4 enum RxClusterForcePresent forcePresent; // offset 0x4, size 0x4 unsigned int reserved; // offset 0x8, size 0x4 }; -class xGroupAsset : public xBaseAsset { +class xGroupAsset : public xBaseAsset +{ // total size: 0xC public: unsigned short itemCount; // offset 0x8, size 0x2 unsigned short groupFlags; // offset 0xA, size 0x2 }; -class _tagPadAnalog { +class _tagPadAnalog +{ // total size: 0x2 public: signed char x; // offset 0x0, size 0x1 signed char y; // offset 0x1, size 0x1 }; -class zAssetPickupTable { +class zAssetPickupTable +{ // total size: 0x0 }; -class RwObject { +class RwObject +{ // total size: 0x8 public: unsigned char type; // offset 0x0, size 0x1 unsigned char subType; // offset 0x1, size 0x1 unsigned char flags; // offset 0x2, size 0x1 unsigned char privateFlags; // offset 0x3, size 0x1 - void * parent; // offset 0x4, size 0x4 + void* parent; // offset 0x4, size 0x4 }; -class RwLLLink { +class RwLLLink +{ // total size: 0x8 public: - class RwLLLink * next; // offset 0x0, size 0x4 - class RwLLLink * prev; // offset 0x4, size 0x4 + class RwLLLink* next; // offset 0x0, size 0x4 + class RwLLLink* prev; // offset 0x4, size 0x4 }; -class RpPTankLockStruct { +class RpPTankLockStruct +{ // total size: 0x8 public: - unsigned char * data; // offset 0x0, size 0x4 + unsigned char* data; // offset 0x0, size 0x4 signed int stride; // offset 0x4, size 0x4 }; -class xShadowSimplePoly { +class xShadowSimplePoly +{ // total size: 0x30 public: class xVec3 vert[3]; // offset 0x0, size 0x24 class xVec3 norm; // offset 0x24, size 0xC }; -class _tagiPad { +class _tagiPad +{ // total size: 0x4 public: signed int port; // offset 0x0, size 0x4 }; -class xPEVCyl { +class xPEVCyl +{ // total size: 0xC public: float height; // offset 0x0, size 0x4 float radius; // offset 0x4, size 0x4 float deflection; // offset 0x8, size 0x4 }; -class RxIoSpec { +class RxIoSpec +{ // total size: 0x14 public: unsigned int numClustersOfInterest; // offset 0x0, size 0x4 - class RxClusterRef * clustersOfInterest; // offset 0x4, size 0x4 - enum RxClusterValidityReq * inputRequirements; // offset 0x8, size 0x4 + class RxClusterRef* clustersOfInterest; // offset 0x4, size 0x4 + enum RxClusterValidityReq* inputRequirements; // offset 0x8, size 0x4 unsigned int numOutputs; // offset 0xC, size 0x4 - class RxOutputSpec * outputs; // offset 0x10, size 0x4 + class RxOutputSpec* outputs; // offset 0x10, size 0x4 }; -class xFFX { +class xFFX +{ // total size: 0x0 }; -class tri_data : public tri_data { +class tri_data : public tri_data +{ // total size: 0x20 public: class xVec3 loc; // offset 0xC, size 0xC float yaw; // offset 0x18, size 0x4 - class xCollis * coll; // offset 0x1C, size 0x4 + class xCollis* coll; // offset 0x1C, size 0x4 }; -class /* @class */ { +class /* @class */ +{ // total size: 0xC public: - unsigned char * data; // offset 0x0, size 0x4 + unsigned char* data; // offset 0x0, size 0x4 signed int stride; // offset 0x4, size 0x4 unsigned int size; // offset 0x8, size 0x4 }; -class xCollis { +class xCollis +{ // total size: 0x50 public: unsigned int flags; // offset 0x0, size 0x4 unsigned int oid; // offset 0x4, size 0x4 - void * optr; // offset 0x8, size 0x4 - class xModelInstance * mptr; // offset 0xC, size 0x4 + void* optr; // offset 0x8, size 0x4 + class xModelInstance* mptr; // offset 0xC, size 0x4 float dist; // offset 0x10, size 0x4 class xVec3 norm; // offset 0x14, size 0xC class xVec3 tohit; // offset 0x20, size 0xC class xVec3 depen; // offset 0x2C, size 0xC class xVec3 hdng; // offset 0x38, size 0xC - union { // inferred - class /* @class */ { + union + { // inferred + class /* @class */ + { // total size: 0xC public: float t; // offset 0x0, size 0x4 @@ -1928,24 +2108,30 @@ class xCollis { class tri_data tri; // offset 0x44, size 0xC }; }; -class RxNodeMethods { +class RxNodeMethods +{ // total size: 0x1C public: - signed int (* nodeBody)(class RxPipelineNode *, class RxPipelineNodeParam *); // offset 0x0, size 0x4 - signed int (* nodeInit)(class RxNodeDefinition *); // offset 0x4, size 0x4 - void (* nodeTerm)(class RxNodeDefinition *); // offset 0x8, size 0x4 - signed int (* pipelineNodeInit)(class RxPipelineNode *); // offset 0xC, size 0x4 - void (* pipelineNodeTerm)(class RxPipelineNode *); // offset 0x10, size 0x4 - signed int (* pipelineNodeConfig)(class RxPipelineNode *, class RxPipeline *); // offset 0x14, size 0x4 - unsigned int (* configMsgHandler)(class RxPipelineNode *, unsigned int, unsigned int, void *); // offset 0x18, size 0x4 -}; -class xClumpCollBSPVertInfo { + signed int (*nodeBody)(class RxPipelineNode*, + class RxPipelineNodeParam*); // offset 0x0, size 0x4 + signed int (*nodeInit)(class RxNodeDefinition*); // offset 0x4, size 0x4 + void (*nodeTerm)(class RxNodeDefinition*); // offset 0x8, size 0x4 + signed int (*pipelineNodeInit)(class RxPipelineNode*); // offset 0xC, size 0x4 + void (*pipelineNodeTerm)(class RxPipelineNode*); // offset 0x10, size 0x4 + signed int (*pipelineNodeConfig)(class RxPipelineNode*, + class RxPipeline*); // offset 0x14, size 0x4 + unsigned int (*configMsgHandler)(class RxPipelineNode*, unsigned int, unsigned int, + void*); // offset 0x18, size 0x4 +}; +class xClumpCollBSPVertInfo +{ // total size: 0x4 public: unsigned short atomIndex; // offset 0x0, size 0x2 unsigned short meshVertIndex; // offset 0x2, size 0x2 }; -class RwFrustumPlane { +class RwFrustumPlane +{ // total size: 0x14 public: class RwPlane plane; // offset 0x0, size 0x10 @@ -1954,28 +2140,33 @@ class RwFrustumPlane { unsigned char closestZ; // offset 0x12, size 0x1 unsigned char pad; // offset 0x13, size 0x1 }; -class RwPlane { +class RwPlane +{ // total size: 0x10 public: class RwV3d normal; // offset 0x0, size 0xC float distance; // offset 0xC, size 0x4 }; -class xClumpCollBSPTriangle { +class xClumpCollBSPTriangle +{ // total size: 0x8 public: - class /* @class */ { + class /* @class */ + { // total size: 0x4 public: - union { // inferred + union + { // inferred class xClumpCollBSPVertInfo i; // offset 0x0, size 0x4 - class RwV3d * p; // offset 0x0, size 0x4 + class RwV3d* p; // offset 0x0, size 0x4 }; } v; // offset 0x0, size 0x4 unsigned char flags; // offset 0x4, size 0x1 unsigned char platData; // offset 0x5, size 0x1 unsigned short matIndex; // offset 0x6, size 0x2 }; -class xQCData { +class xQCData +{ // total size: 0x20 public: signed char xmin; // offset 0x0, size 0x1 @@ -1989,7 +2180,8 @@ class xQCData { class xVec3 min; // offset 0x8, size 0xC class xVec3 max; // offset 0x14, size 0xC }; -class xPEEntBone { +class xPEEntBone +{ // total size: 0x18 public: unsigned char flags; // offset 0x0, size 0x1 @@ -2000,48 +2192,54 @@ class xPEEntBone { float radius; // offset 0x10, size 0x4 float deflection; // offset 0x14, size 0x4 }; -class RxCluster { +class RxCluster +{ // total size: 0x1C public: unsigned short flags; // offset 0x0, size 0x2 unsigned short stride; // offset 0x2, size 0x2 - void * data; // offset 0x4, size 0x4 - void * currentData; // offset 0x8, size 0x4 + void* data; // offset 0x4, size 0x4 + void* currentData; // offset 0x8, size 0x4 unsigned int numAlloced; // offset 0xC, size 0x4 unsigned int numUsed; // offset 0x10, size 0x4 - class RxPipelineCluster * clusterRef; // offset 0x14, size 0x4 + class RxPipelineCluster* clusterRef; // offset 0x14, size 0x4 unsigned int attributes; // offset 0x18, size 0x4 }; -class xAnimMultiFileEntry { +class xAnimMultiFileEntry +{ // total size: 0x8 public: unsigned int ID; // offset 0x0, size 0x4 - class xAnimFile * File; // offset 0x4, size 0x4 + class xAnimFile* File; // offset 0x4, size 0x4 }; -class tri_data { +class tri_data +{ // total size: 0xC public: unsigned int index; // offset 0x0, size 0x4 float r; // offset 0x4, size 0x4 float d; // offset 0x8, size 0x4 }; -class RxPacket { +class RxPacket +{ // total size: 0x30 public: unsigned short flags; // offset 0x0, size 0x2 unsigned short numClusters; // offset 0x2, size 0x2 - class RxPipeline * pipeline; // offset 0x4, size 0x4 - unsigned int * inputToClusterSlot; // offset 0x8, size 0x4 - unsigned int * slotsContinue; // offset 0xC, size 0x4 - class RxPipelineCluster * * slotClusterRefs; // offset 0x10, size 0x4 + class RxPipeline* pipeline; // offset 0x4, size 0x4 + unsigned int* inputToClusterSlot; // offset 0x8, size 0x4 + unsigned int* slotsContinue; // offset 0xC, size 0x4 + class RxPipelineCluster** slotClusterRefs; // offset 0x10, size 0x4 class RxCluster clusters[1]; // offset 0x14, size 0x1C }; -class /* @class */ { +class /* @class */ +{ // total size: 0x4 public: - class xVec3 * verts; // offset 0x0, size 0x4 + class xVec3* verts; // offset 0x0, size 0x4 }; -class zLasso { +class zLasso +{ // total size: 0xFC public: unsigned int flags; // offset 0x0, size 0x4 @@ -2068,25 +2266,28 @@ class zLasso { unsigned char reindex[5]; // offset 0xC4, size 0x5 class xVec3 anchor; // offset 0xCC, size 0xC class xModelTag tag; // offset 0xD8, size 0x20 - class xModelInstance * model; // offset 0xF8, size 0x4 + class xModelInstance* model; // offset 0xF8, size 0x4 }; -class zGlobals : public xGlobals { +class zGlobals : public xGlobals +{ // total size: 0x2050 public: class zPlayerGlobals player; // offset 0x700, size 0x1940 - class zAssetPickupTable * pickupTable; // offset 0x2040, size 0x4 - class zCutsceneMgr * cmgr; // offset 0x2044, size 0x4 - class zScene * sceneCur; // offset 0x2048, size 0x4 - class zScene * scenePreload; // offset 0x204C, size 0x4 + class zAssetPickupTable* pickupTable; // offset 0x2040, size 0x4 + class zCutsceneMgr* cmgr; // offset 0x2044, size 0x4 + class zScene* sceneCur; // offset 0x2048, size 0x4 + class zScene* scenePreload; // offset 0x204C, size 0x4 }; -enum RwFogType { +enum RwFogType +{ rwFOGTYPENAFOGTYPE = 0, rwFOGTYPELINEAR = 1, rwFOGTYPEEXPONENTIAL = 2, rwFOGTYPEEXPONENTIAL2 = 3, rwFOGTYPEFORCEENUMSIZEINT = 2147483647, }; -class zGlobalSettings { +class zGlobalSettings +{ // total size: 0x150 public: unsigned short AnalogMin; // offset 0x0, size 0x2 @@ -2176,7 +2377,8 @@ class zGlobalSettings { unsigned char PowerUp[2]; // offset 0x149, size 0x2 unsigned char InitialPowerUp[2]; // offset 0x14B, size 0x2 }; -class RwRGBAReal { +class RwRGBAReal +{ // total size: 0x10 public: float red; // offset 0x0, size 0x4 @@ -2184,14 +2386,16 @@ class RwRGBAReal { float blue; // offset 0x8, size 0x4 float alpha; // offset 0xC, size 0x4 }; -class RwObjectHasFrame { +class RwObjectHasFrame +{ // total size: 0x14 public: class RwObject object; // offset 0x0, size 0x8 class RwLLLink lFrame; // offset 0x8, size 0x8 - class RwObjectHasFrame * (* sync)(class RwObjectHasFrame *); // offset 0x10, size 0x4 + class RwObjectHasFrame* (*sync)(class RwObjectHasFrame*); // offset 0x10, size 0x4 }; -class RpInterpolator { +class RpInterpolator +{ // total size: 0x14 public: signed int flags; // offset 0x0, size 0x4 @@ -2201,44 +2405,50 @@ class RpInterpolator { float recipTime; // offset 0xC, size 0x4 float position; // offset 0x10, size 0x4 }; -class xPECircle { +class xPECircle +{ // total size: 0x14 public: float radius; // offset 0x0, size 0x4 float deflection; // offset 0x4, size 0x4 class xVec3 dir; // offset 0x8, size 0xC }; -class RwLinkList { +class RwLinkList +{ // total size: 0x8 public: class RwLLLink link; // offset 0x0, size 0x8 }; -class xAnimMultiFileBase { +class xAnimMultiFileBase +{ // total size: 0x4 public: unsigned int Count; // offset 0x0, size 0x4 }; -class zPlayerLassoInfo { +class zPlayerLassoInfo +{ // total size: 0x120 public: - class xEnt * target; // offset 0x0, size 0x4 + class xEnt* target; // offset 0x0, size 0x4 float dist; // offset 0x4, size 0x4 unsigned char destroy; // offset 0x8, size 0x1 unsigned char targetGuide; // offset 0x9, size 0x1 float lassoRot; // offset 0xC, size 0x4 - class xEnt * swingTarget; // offset 0x10, size 0x4 - class xEnt * releasedSwing; // offset 0x14, size 0x4 + class xEnt* swingTarget; // offset 0x10, size 0x4 + class xEnt* releasedSwing; // offset 0x14, size 0x4 float copterTime; // offset 0x18, size 0x4 signed int canCopter; // offset 0x1C, size 0x4 class zLasso lasso; // offset 0x20, size 0xFC - class xAnimState * zeroAnim; // offset 0x11C, size 0x4 + class xAnimState* zeroAnim; // offset 0x11C, size 0x4 }; -class /* @class */ { +class /* @class */ +{ // total size: 0x4 public: - union { // inferred + union + { // inferred class xClumpCollBSPVertInfo i; // offset 0x0, size 0x4 - class RwV3d * p; // offset 0x0, size 0x4 + class RwV3d* p; // offset 0x0, size 0x4 }; }; @@ -2249,12 +2459,13 @@ class /* @class */ { Code range: 0x002FBA10 -> 0x002FBACC */ // Range: 0x2FBA10 -> 0x2FBACC -void xParSysRender(class xBase * b /* r2 */) { +void xParSysRender(class xBase* b /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x2FBA10 -> 0x2FBACC - class xParGroup * g; // r17 - class xParSys * s; // r16 + class xParGroup* g; // r17 + class xParSys* s; // r16 } } @@ -2265,13 +2476,15 @@ void xParSysRender(class xBase * b /* r2 */) { Code range: 0x002FBAD0 -> 0x002FBBAC */ // Range: 0x2FBAD0 -> 0x2FBBAC -static void xParGroupUpdateR(class xParSys * s /* r19 */, class xParGroup * g /* r18 */, float dt /* r20 */) { +static void xParGroupUpdateR(class xParSys* s /* r19 */, class xParGroup* g /* r18 */, + float dt /* r20 */) +{ // Blocks /* anonymous block */ { // Range: 0x2FBAD0 -> 0x2FBBAC unsigned int i; // r17 - class xParCmd * cmd; // r20 - void (* func)(class xParCmd *, class xParGroup *, float); // r2 + class xParCmd* cmd; // r20 + void (*func)(class xParCmd*, class xParGroup*, float); // r2 } } @@ -2282,13 +2495,14 @@ static void xParGroupUpdateR(class xParSys * s /* r19 */, class xParGroup * g /* Code range: 0x002FBBB0 -> 0x002FBE00 */ // Range: 0x2FBBB0 -> 0x2FBE00 -void xParSysUpdate(class xBase * to /* r2 */, float dt /* r20 */) { +void xParSysUpdate(class xBase* to /* r2 */, float dt /* r20 */) +{ // Blocks /* anonymous block */ { // Range: 0x2FBBB0 -> 0x2FBE00 - class xParSys * s; // r20 - class xParSys * parent; // r19 - class xParGroup * g; // r18 + class xParSys* s; // r20 + class xParSys* parent; // r19 + class xParGroup* g; // r18 } } @@ -2299,11 +2513,12 @@ void xParSysUpdate(class xBase * to /* r2 */, float dt /* r20 */) { Code range: 0x002FBE00 -> 0x002FBF5C */ // Range: 0x2FBE00 -> 0x2FBF5C -signed int xParSysEventCB(class xBase * to /* r2 */, unsigned int toEvent /* r2 */) { +signed int xParSysEventCB(class xBase* to /* r2 */, unsigned int toEvent /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x2FBE00 -> 0x2FBF5C - class xParSys * t; // r16 + class xParSys* t; // r16 } } @@ -2314,7 +2529,8 @@ signed int xParSysEventCB(class xBase * to /* r2 */, unsigned int toEvent /* r2 Code range: 0x002FBF60 -> 0x002FBFA0 */ // Range: 0x2FBF60 -> 0x2FBFA0 -void xParSysExit(class xParSys * t /* r16 */) { +void xParSysExit(class xParSys* t /* r16 */) +{ // Blocks /* anonymous block */ { // Range: 0x2FBF60 -> 0x2FBFA0 @@ -2328,7 +2544,8 @@ void xParSysExit(class xParSys * t /* r16 */) { Code range: 0x002FBFA0 -> 0x002FC004 */ // Range: 0x2FBFA0 -> 0x2FC004 -void xParSysSetup(class xParSys * t /* r16 */) { +void xParSysSetup(class xParSys* t /* r16 */) +{ // Blocks /* anonymous block */ { // Range: 0x2FBFA0 -> 0x2FC004 @@ -2342,13 +2559,14 @@ void xParSysSetup(class xParSys * t /* r16 */) { Code range: 0x002FC010 -> 0x002FC2DC */ // Range: 0x2FC010 -> 0x2FC2DC -void xParSysInit(class xBase * b /* r20 */, class xParSysAsset * tasset /* r19 */) { +void xParSysInit(class xBase* b /* r20 */, class xParSysAsset* tasset /* r19 */) +{ // Blocks /* anonymous block */ { // Range: 0x2FC010 -> 0x2FC2DC - class xParSys * t; // r2 + class xParSys* t; // r2 unsigned int i; // r18 - unsigned char * cmdPtr; // r17 + unsigned char* cmdPtr; // r17 } } @@ -2359,7 +2577,8 @@ void xParSysInit(class xBase * b /* r20 */, class xParSysAsset * tasset /* r19 * Code range: 0x002FC2E0 -> 0x002FC2E8 */ // Range: 0x2FC2E0 -> 0x2FC2E8 -void xParSysInit(void * b /* r2 */, void * tasset /* r2 */) { +void xParSysInit(void* b /* r2 */, void* tasset /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x2FC2E0 -> 0x2FC2E8 @@ -2373,7 +2592,8 @@ void xParSysInit(void * b /* r2 */, void * tasset /* r2 */) { Code range: 0x002FC2F0 -> 0x002FC324 */ // Range: 0x2FC2F0 -> 0x2FC324 -static void render_par_sprite(void * data /* r2 */, class xParGroup * ps /* r2 */) { +static void render_par_sprite(void* data /* r2 */, class xParGroup* ps /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x2FC2F0 -> 0x2FC324 @@ -2387,7 +2607,8 @@ static void render_par_sprite(void * data /* r2 */, class xParGroup * ps /* r2 * Code range: 0x002FC330 -> 0x002FC95C */ // Range: 0x2FC330 -> 0x2FC95C -static void par_sprite_update(class xParSys & sys /* r2 */, class xParGroup & group /* r2 */) { +static void par_sprite_update(class xParSys& sys /* r2 */, class xParGroup& group /* r2 */) +{ // Blocks /* anonymous block */ { // Range: 0x2FC330 -> 0x2FC95C @@ -2395,11 +2616,10 @@ static void par_sprite_update(class xParSys & sys /* r2 */, class xParGroup & gr class xVec3 offset_right; // r29+0x100 class xVec3 offset_up; // r29+0xF0 class ptank_pool__pos_color_size_uv2 pool; // r29+0x30 - class xParCmdTex * tex; // r17 - class xPar * p; // r16 - class xVec4 * _loc; // r2 + class xParCmdTex* tex; // r17 + class xPar* p; // r16 + class xVec4* _loc; // r2 float par_dist; // r1 - class xVec3 & loc; // r9 + class xVec3& loc; // r9 } } - diff --git a/src/SB/Core/gc/iModel.cpp b/src/SB/Core/gc/iModel.cpp index 30ae5ac10..34de7e50a 100644 --- a/src/SB/Core/gc/iModel.cpp +++ b/src/SB/Core/gc/iModel.cpp @@ -1,8 +1,7 @@ #include "iModel.h" #include - - +#include "zAssetTypes.h" RwFrame* GetChildFrameHierarchy(RwFrame* frame, void* data) { @@ -23,45 +22,55 @@ void* GetHierarchy(RpAtomic* frame) { void* unk_0[2]; unk_0[0] = 0; - GetChildFrameHierarchy((RwFrame*)frame, unk_0); + GetChildFrameHierarchy((RwFrame*)frame->object.object.parent, unk_0); return unk_0[0]; } - RpAtomic* iModelFileNew(void* buffer, U32 size) { - RwStream* rwmem; - S32 unk_0 = (S32)buffer; - RwStreamType type; - RwStreamAccessType accessType; - - type = (RwStreamType)3; - accessType = (RwStreamAccessType)1; + RwMemory rwmem; - rwmem = RwStreamOpen(type, accessType, buffer); - return iModelStreamRead(rwmem); + return iModelStreamRead(RwStreamOpen(rwSTREAMMEMORY, rwSTREAMREAD, &buffer)); } void iModelUnload(RpAtomic* userdata) { + // Not really a hard function. + // Don't know why frame and root exist RpClump* clump; - RwFrame* frame = 0; + RwFrame* frame; RwFrame* root; - clump = (RpClump*)userdata + 0x3c; - if ((RpClump*)userdata != 0) + clump = userdata->clump; + if (clump->object.parent != 0) { - RwFrameGetRoot((RwFrame*)userdata); - RwFrameDestroyHierarchy(frame); - userdata = 0; - + RwFrameGetRoot((RwFrame*)userdata->object.object.parent); + RwFrameDestroyHierarchy((RwFrame*)clump); + userdata->object.object.parent = 0; } - if (clump != 0) + if (&clump->object != 0) { RpClumpDestroy(clump); } } +static RpAtomic* NextAtomicCallback(RpAtomic* atomic, void* data) +{ + RpAtomic** nextModel; + + if (data == atomic) + { + data = 0; + return (RpAtomic*)data; + } + if (data == 0) + { + return atomic; + } + data = atomic; + return atomic; +} + void iModelCacheAtomic(RpAtomic*) { } diff --git a/src/SB/Core/gc/iParMgr.h b/src/SB/Core/gc/iParMgr.h index 3f2e89afd..e82711aef 100644 --- a/src/SB/Core/gc/iParMgr.h +++ b/src/SB/Core/gc/iParMgr.h @@ -20,7 +20,7 @@ struct tagiRenderInput // total size: 0x80 public: U16* m_index; // offset 0x0, size 0x4 - RxObjSpace3DVertex * m_vertex; // offset 0x4, size 0x4 + RxObjSpace3DVertex* m_vertex; // offset 0x4, size 0x4 F32* m_vertexTZ; // offset 0x8, size 0x4 U32 m_mode; // offset 0xC, size 0x4 S32 m_vertexType; // offset 0x10, size 0x4 @@ -38,8 +38,10 @@ void iParMgrRender(); void iRenderInit(); void iRenderSetCameraViewMatrix(xMat4x3* m); void iRenderFlush(); -void iRenderTrianglesImmediate(S32 vertType, S32 vertTypeSize, void* data, S32 dataSize, U16* index, S32 indexSize); +void iRenderTrianglesImmediate(S32 vertType, S32 vertTypeSize, void* data, S32 dataSize, U16* index, + S32 indexSize); void iParMgrRenderParSys_QuadStreak(void* data, xParGroup* ps); void iParMgrRenderParSys_Flat(void* data, xParGroup* ps); +void iParMgrRenderParSys_Sprite(void* data, xParGroup* ps); #endif diff --git a/src/SB/Core/x/containers.h b/src/SB/Core/x/containers.h index befdffb6f..eabeb8b45 100644 --- a/src/SB/Core/x/containers.h +++ b/src/SB/Core/x/containers.h @@ -41,6 +41,7 @@ template struct static_queue U32 _max_size_mask; T* _buffer; void clear(); + void init(unsigned long); }; template struct fixed_queue diff --git a/src/SB/Core/x/xBehaveMgr.cpp b/src/SB/Core/x/xBehaveMgr.cpp index 653488fff..a489eaca1 100644 --- a/src/SB/Core/x/xBehaveMgr.cpp +++ b/src/SB/Core/x/xBehaveMgr.cpp @@ -5,12 +5,12 @@ #include "xBehaveGoalSimple.h" #include "xutil.h" -extern S32 g_modinit_xBehaveMgr; -extern xBehaveMgr* g_behavmgr; +static S32 g_modinit; +static xBehaveMgr* g_behavmgr; void xBehaveMgr_Startup() { - if (g_modinit_xBehaveMgr++ == 0) + if (g_modinit++ == 0) { g_behavmgr = new ('BMGR', NULL) xBehaveMgr(); g_behavmgr->Startup(0xfa, 0xfa); @@ -19,8 +19,8 @@ void xBehaveMgr_Startup() void xBehaveMgr_Shutdown() { - g_modinit_xBehaveMgr--; - if (g_modinit_xBehaveMgr == 0) + g_modinit--; + if (g_modinit == 0) { if (g_behavmgr != NULL) { @@ -93,6 +93,16 @@ void xBehaveMgr::SceneReset() } } +void xBehaveMgr::Startup(S32 size, S32 tmpAlloc) +{ + goalFactory = new ('BMGR', NULL) xFactory(tmpAlloc); + + RegBuiltIn(); + XOrdInit(&psylist, size, 0); + psypool = (xPsyche*)xMemAlloc(gActiveHeap, size * 0x68, 0); + memset(psypool, 0, size * 0x68); +} + void xPsyche::BrainBegin() { xFactory* factory = xBehaveMgr_GoalFactory(); @@ -208,3 +218,23 @@ void xPsyche::Amnesia(S32 i) } } } + +S32 xPsyche::IndexInStack(S32 gid) const +{ + // This kinda sucks + S32 da_idx; + S32 i; + S32 temp; + S32 temp2; + + da_idx = staktop; + + i = 0; + while ((temp = -1, i <= da_idx && (temp2 = goallist->GetID(), temp = i, gid != temp2))) + { + da_idx = da_idx + 4; + i++; + } + + return da_idx; +} diff --git a/src/SB/Core/x/xBehaviour.h b/src/SB/Core/x/xBehaviour.h index 0db2b7249..49e714b06 100644 --- a/src/SB/Core/x/xBehaviour.h +++ b/src/SB/Core/x/xBehaviour.h @@ -134,6 +134,7 @@ struct xPsyche : RyzMemData gid_safegoal = goalID; } void Amnesia(S32); + S32 IndexInStack(S32) const; void SetNotify(xPSYNote* notice) { cb_notice = notice; diff --git a/src/SB/Core/x/xFX.cpp b/src/SB/Core/x/xFX.cpp index 3a6e713e4..c35df84ab 100644 --- a/src/SB/Core/x/xFX.cpp +++ b/src/SB/Core/x/xFX.cpp @@ -1,9 +1,11 @@ #include "xFX.h" +#include "xDebug.h" #include "xstransvc.h" #include "xScrFx.h" #include "iMath.h" +#include "zEntPickup.h" #include "zParEmitter.h" #include "zSurface.h" #include "zFX.h" @@ -29,6 +31,8 @@ static U32 num_fx_atomics = 0; static U32 xfx_initted = 0; +xFXStreak sStreakList[10]; + static void LightResetFrame(RpLight* light); void xFXInit() @@ -365,9 +369,14 @@ static RpAtomic* AtomicSetShininess(RpAtomic* atomic, void* data) return atomic; } -void AtomicSetEnvMap(RpAtomic*, void*) +static RpAtomic* AtomicSetEnvMap(RpAtomic* atomic, void* data) { - + RpMatFXAtomicEnableEffects(atomic); + if (atomic->geometry != 0) + { + RpGeometryForAllMaterials(atomic->geometry, MaterialSetEnvMap2, data); + } + return atomic; } RpAtomic* xFXAtomicEnvMapSetup(RpAtomic* atomic, U32 aid, F32 shininess) @@ -651,8 +660,10 @@ void xFXShineInit() { } -void xFXShineStart(const xVec3*, F32, F32, F32, F32, U32, const iColor_tag*, const iColor_tag*, F32, S32) +U32 xFXShineStart(const xVec3*, F32, F32, F32, F32, U32, const iColor_tag*, const iColor_tag*, F32, + S32) { + return 2; } void xFXShineUpdate(F32) @@ -663,11 +674,67 @@ void xFXShineRender() { } +static void RenderRotatedBillboard(xVec3* pos, _xFXAuraAngle* rot, U32 count, F32 width, F32 height, + iColor_tag tint, U32 flipUV) +{ +} + void xFXAuraRender() { + // TODO: Fix function + // Honestly the closest I can get this function. + // fogstate is in the dwarf but currently isn't used in the function. + + S32 fogstate; + _xFXAura* ap; + _xFXAuraAngle* auraAng; + + if (gAuraTex != NULL) + { + RwRenderStateSet(rwRENDERSTATETEXTURERASTER, (void*)gAuraTex->raster); + RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)0x1); + RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)0x5); + RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)0x2); + RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)0x1); + RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)0x0); + RwRenderStateGet(rwRENDERSTATEFOGTYPE, (void*)0x1); + RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)0x0); + + ap = sAura; + + for (S32 i = 0; i < 32; i++) + { + if (ap->frame == gFrameCount) + { + auraAng = &sAuraAngle[0]; + RenderRotatedBillboard(&ap->pos, auraAng, 1, 0, 0, ap->color, 0); + auraAng = &sAuraAngle[1]; + RenderRotatedBillboard(&ap->pos, auraAng, 1, 0, 0, ap->color, 1); + } + ap = (_xFXAura*)ap->dangle; + } + + RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)0x5); + RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)0x6); + RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)0x1); + RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)0x1); + RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)0x10); + + ap = sAura; + + for (S32 i = 0; i < 32; i++) + { + if (ap->frame == gFrameCount && ap->parent != 0) + { + zEntPickup_RenderOne((xEnt*)ap->parent); + } + ap = (_xFXAura*)ap->dangle; + } + } } -void xFXFireworksInit(const char* trailEmit, const char* emit1, const char* emit2, const char* mainSound, const char* launchSound) +void xFXFireworksInit(const char* trailEmit, const char* emit1, const char* emit2, + const char* mainSound, const char* launchSound) { sFireworkTrailEmit = zParEmitterFind(trailEmit); sFirework1Emit = zParEmitterFind(emit1); @@ -721,15 +788,14 @@ void xFXFireworksUpdate(F32 dt) if (sFireworkLaunchSoundID != 0) { xSndPlay3D(sFireworkLaunchSoundID, - 0.308f, // Volume - 0.0f, // Pitch - 0x80, // Priority - 0, // Flags - &sFirework[i].pos, - 20.0f, // Radius - 5.0f, - SND_CAT_GAME, - 0.0f); // Delay + 0.308f, // Volume + 0.0f, // Pitch + 0x80, // Priority + 0, // Flags + &sFirework[i].pos, + 20.0f, // Radius + 5.0f, SND_CAT_GAME, + 0.0f); // Delay } } } @@ -769,7 +835,8 @@ void xFXFireworksUpdate(F32 dt) settings2.color_birth[1].set(127.0f * xurand() + 128.0f, 75.0f, 0.0f, 0); settings2.color_birth[2].set(127.0f * xurand() + 128.0f, 75.0f, 0.0f, 0); settings2.color_birth[3].set(255.0f, 0.0f, 1.0f, 0); - memcpy(settings2.color_death, &settings2.color_birth, sizeof(settings2.color_birth)); + memcpy(settings2.color_death, &settings2.color_birth, + sizeof(settings2.color_birth)); settings2.color_death[3].set(0.0f, 0.0f, 1.0f, 0); xParEmitterEmitCustom(emit, dt, &settings2); } @@ -785,21 +852,20 @@ void xFXFireworksUpdate(F32 dt) xVec3 diff; xVec3Sub(&diff, xEntGetPos(&globals.player.ent), &sFirework[i].pos); - zRumbleStartDistance(globals.currentActivePad, diff.x * diff.x + diff.z * diff.z, 48.0f, - eRumble_Medium, 0.35f); + zRumbleStartDistance(globals.currentActivePad, diff.x * diff.x + diff.z * diff.z, + 48.0f, eRumble_Medium, 0.35f); sFirework[i].pos.y = xEntGetPos(&globals.player.ent)->y; if (sFireworkSoundID != 0) { xSndPlay3D(sFireworkSoundID, - 0.77f, // Volume - 0.0f, // Pitch - 0x80, // Priority - 0, // Flags - &sFirework[i].pos, - 20.0f, // Radius - 5.0f, - SND_CAT_GAME, - 0.0f); // Delay + 0.77f, // Volume + 0.0f, // Pitch + 0x80, // Priority + 0, // Flags + &sFirework[i].pos, + 20.0f, // Radius + 5.0f, SND_CAT_GAME, + 0.0f); // Delay } } } @@ -808,7 +874,25 @@ void xFXFireworksUpdate(F32 dt) RpMaterial* MaterialSetBumpMap(RpMaterial* material, void* data) { - return NULL; + RwFrame* frame; + if (data == NULL) + { + return NULL; + } + else if (material->texture) + { + if (data) + { + frame = (RwFrame*)MainLight->object.object.parent; + RpMatFXMaterialSetEffects(material, rpMATFXEFFECTBUMPMAP); + RpMatFXMaterialSetupBumpMap(material, (RwTexture*)data, frame, 1.0f); + } + else + { + RpMatFXMaterialSetEffects(material, rpMATFXEFFECTNULL); + } + } + return material; } RpMaterial* MaterialSetEnvMap(RpMaterial* material, void* data) @@ -868,7 +952,8 @@ RpMaterial* MaterialSetEnvMap2(RpMaterial* material, void* data) return material; } -RpMaterial* MaterialSetBumpEnvMap(RpMaterial* material, RwTexture* envMap, F32 envCooef, RwTexture* bumpMap, F32 bumpCooef) +RpMaterial* MaterialSetBumpEnvMap(RpMaterial* material, RwTexture* envMap, F32 envCooef, + RwTexture* bumpMap, F32 bumpCooef) { if (envMap == NULL || bumpMap == NULL) { @@ -876,7 +961,7 @@ RpMaterial* MaterialSetBumpEnvMap(RpMaterial* material, RwTexture* envMap, F32 e } else { - RwFrame *frame; + RwFrame* frame; RpMatFXMaterialSetEffects(material, rpMATFXEFFECTBUMPENVMAP); if ((gFXSurfaceFlags & 0x10) != 0) { @@ -887,7 +972,8 @@ RpMaterial* MaterialSetBumpEnvMap(RpMaterial* material, RwTexture* envMap, F32 e frame = (RwFrame*)MainLight->object.object.parent; } RpMatFXMaterialSetupEnvMap(material, envMap, frame, TRUE, envCooef); - RpMatFXMaterialSetupBumpMap(material, bumpMap, (RwFrame*)MainLight->object.object.parent, bumpCooef); + RpMatFXMaterialSetupBumpMap(material, bumpMap, (RwFrame*)MainLight->object.object.parent, + bumpCooef); } return material; } @@ -909,22 +995,105 @@ void xFXanimUV2PSetTranslation(const xVec3*) { } -RpAtomic* xFXShinyRender(RpAtomic* atom) +RpAtomic* xFXShinyRender(RpAtomic* atomic) { - return NULL; + RwCullMode cmode; + + if (sTweaked == 0) + { + sEnvMap = xStrHash("default_env_map.RW3"); + sFresnelMap = xStrHash("gloss_edge"); + sTweaked = 1; + } + + RwRenderStateGet(rwRENDERSTATECULLMODE, NULL); + RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLBACK); + iDrawSetFBMSK(-1); + iModelSetMaterialAlpha(atomic, rwCULLMODEFORCEENUMSIZEINT); + AtomicDisableMatFX(atomic); + (*gAtomicRenderCallBack)(atomic); + iDrawSetFBMSK(0); + iModelSetMaterialAlpha(atomic, 0); + gFXSurfaceFlags = 0x10; + xFXAtomicEnvMapSetup(atomic, sFresnelMap, 1.0f); + gFXSurfaceFlags = 0; + (*gAtomicRenderCallBack)(atomic); + iModelSetMaterialAlpha(atomic, 0xff); + AtomicDisableMatFX(atomic); + gFXSurfaceFlags = 0x10; + xFXAtomicEnvMapSetup(atomic, sEnvMap, 1.0f); + gFXSurfaceFlags = 0; + (*gAtomicRenderCallBack)(atomic); + RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)0x8); // TODO: Fix Magic Number + + return atomic; } -RpAtomic* xFXBubbleRender(RpAtomic* atom) +RpAtomic* xFXBubbleRender(RpAtomic* atomic) { - return NULL; + RwCullMode cmode; + xFXBubbleParams* bp; + + bp = BFX + bfx_curr * 1; // Why multiply by 1? Probably needs rewritten differently + + RwRenderStateGet(rwRENDERSTATECULLMODE, NULL); + RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLBACK); + iDrawSetFBMSK(bp->pass1_fbmsk); + iModelSetMaterialAlpha(atomic, bp->pass1_alpha); + + if (((char)bp->pass1)) + { + AtomicDisableMatFX(atomic); + (*gAtomicRenderCallBack)(atomic); + } + + iDrawSetFBMSK(0); + iModelSetMaterialAlpha(atomic, bp->pass2_alpha); + + if (((char)bp->pass2) != 0) + { + gFXSurfaceFlags = 0x10; + xFXAtomicEnvMapSetup(atomic, bp->fresnel_map, bp->fresnel_map_coeff); + gFXSurfaceFlags = 0; + (*gAtomicRenderCallBack)(atomic); + } + + iModelSetMaterialAlpha(atomic, bp->pass3_alpha); + + if (((char)bp->pass3) != 0) + { + AtomicDisableMatFX(atomic); + gFXSurfaceFlags = 0x10; + xFXAtomicEnvMapSetup(atomic, bp->env_map, bp->env_map_coeff); + gFXSurfaceFlags = 0; + (*gAtomicRenderCallBack)(atomic); + } + + RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)0x8); + + return atomic; } void xFXRibbonRender() { + xFXRibbon* prev; + U32 i; + xFXRibbon* ribbon; + + RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)0x0); + RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)0x1); + RwRenderStateSet(rwRENDERSTATESHADEMODE, (void*)0x2); + RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)0x1); + + ribbon = 0x0; } void xFXStreakInit() { + for (S32 i = 0; i < 10; i++) + { + memset(&sStreakList[i], 0, sizeof(xFXStreak)); + } } void xFXStreakRender() @@ -978,6 +1147,13 @@ void xFXRibbon::set_texture(U32) { } +void xFXRibbon::start_render() +{ + RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)cfg.blend_src); + RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)cfg.blend_dst); + RwRenderStateSet(rwRENDERSTATETEXTURERASTER, (void*)raster); +} + void xFXRibbon::insert(const xVec3&, const xVec3&, F32, F32, U32) { } diff --git a/src/SB/Core/x/xFX.h b/src/SB/Core/x/xFX.h index c681a9496..60e50f0ed 100644 --- a/src/SB/Core/x/xFX.h +++ b/src/SB/Core/x/xFX.h @@ -4,6 +4,8 @@ #include "xMath3.h" #include "containers.h" #include "iColor.h" +#include "iDraw.h" +#include "iModel.h" #include #include @@ -69,6 +71,7 @@ struct xFXRibbon U32 mlife; void init(const char*, const char*); + void init(S32, const char*); void set_texture(const char* name); void set_texture(U32); void set_texture(RwTexture* texture); @@ -81,6 +84,30 @@ struct xFXRibbon void debug_update(F32); void insert(const xVec3&, const xVec3&, F32, F32, unsigned int); void insert(const xVec3&, F32, F32, F32, U32); + void start_render(); +}; + +class xFXStreakElem +{ + U32 flag; + xVec3 p[2]; + F32 a; +}; + +class xFXStreak +{ + U32 flags; + F32 frequency; + F32 alphaFadeRate; + F32 alphaStart; + F32 elapsed; + F32 lifetime; + U32 head; + iColor_tag color_a; + iColor_tag color_b; + RwTexture* texturePtr; + RwRaster* textureRasterPtr; + xFXStreakElem elem[50]; }; #define RING_COUNT 8 @@ -100,6 +127,7 @@ void xFXPreAllocMatFX(RpClump* clump); RpAtomic* xFXBubbleRender(RpAtomic* atomic); RpAtomic* xFXShinyRender(RpAtomic* atomic); +RpMaterial* MaterialSetEnvMap2(RpMaterial* material, void* data); void xFXanimUV2PSetTexture(RwTexture* texture); void xFXanimUVSetTranslation(const xVec3* trans); diff --git a/src/SB/Core/x/xModel.h b/src/SB/Core/x/xModel.h index 9ff8f9dcd..885667b0a 100644 --- a/src/SB/Core/x/xModel.h +++ b/src/SB/Core/x/xModel.h @@ -54,7 +54,7 @@ struct xModelInstance RwMatrix* Mat; // 0x4C // Offset: 0x50 - xVec3 Scale; + xVec3 Scale; // 0x704 in globals U32 modelID; U32 shadowID; RpAtomic* shadowmapAtomic; diff --git a/src/SB/Core/x/xParEmitter.h b/src/SB/Core/x/xParEmitter.h index 7a208a44b..aacadcfbe 100644 --- a/src/SB/Core/x/xParEmitter.h +++ b/src/SB/Core/x/xParEmitter.h @@ -15,6 +15,7 @@ struct xParInterp F32 oofreq; void set(F32, F32, F32, U32); + void set(F32); // Used in zNPCDutchman }; // Size 0x138 diff --git a/src/SB/Core/x/xParSys.cpp b/src/SB/Core/x/xParSys.cpp index f53a8f3d9..5c106bec9 100644 --- a/src/SB/Core/x/xParSys.cpp +++ b/src/SB/Core/x/xParSys.cpp @@ -1,3 +1,49 @@ #include "xParSys.h" #include +#include "zScene.h" + +static xVec3 par_offset_right; +static xVec3 par_offset_up; + +static xParSysInfo sParSysInfo[7]; + +static S32 sBlendTable[11] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + +static void par_sprite_begin() +{ +} + +static void render_par_sprite(void* data, xParGroup* ps) +{ + if (using_ptank_render((*(xParSysAsset*)&ps->m_culled)) == 0) + { + iParMgrRenderParSys_Sprite(data, ps); + } +} + +void xParCmdTexInit(xParCmdTex* tex) +{ + tex->unit_count = tex->rows * tex->cols; + tex->unit_width = (tex->x2 - tex->x1) / tex->cols; + tex->unit_height = (tex->y2 - tex->y1) / tex->rows; +} + +void xParSysInit(void* b, void* tasset) +{ + xParSysInit((xBase*)b, (xParSysAsset*)tasset); +} + +void xParSysInit(xBase* b, xParSysAsset* tasset) +{ +} + +void xParSysSetup(xParSys* t) +{ + if (t != 0 && t->link != 0 && t->link->param[1]) + { + t->parent = (xParSys*)zSceneFindObject(t->cmd->flag); + } + t->parent = (xParSys*)xSTFindAsset(t->cmd->flag, 0); + t->parent = t->parent; +} diff --git a/src/SB/Core/x/xParSys.h b/src/SB/Core/x/xParSys.h index 2b94a8f31..4ee1b7ee7 100644 --- a/src/SB/Core/x/xParSys.h +++ b/src/SB/Core/x/xParSys.h @@ -4,6 +4,8 @@ #include "xBase.h" #include "xParCmd.h" #include "xParGroup.h" +#include "iParMgr.h" +#include "xstransvc.h" #include @@ -35,10 +37,21 @@ struct xParSys : xBase RwTexture* txtr_particle; }; +struct xParSysInfo +{ + S32 type; + void (*func)(void*, class xParGroup*); +}; + +void xParCmdTexInit(xParCmdTex* tex); void xParSysInit(void* b, void* tasset); +void xParSysInit(xBase* b, xParSysAsset* tasset); void xParSysSetup(xParSys* t); void xParSysExit(xParSys* t); void xParSysRender(xBase* b); +S32 xParSysEventCB(xBase*, xBase*, U32, F32*, xBase*); void xParSysUpdate(xBase* to, xScene*, F32 dt); +U8 using_ptank_render(const xParSysAsset&); + #endif diff --git a/src/SB/Game/zDiscoFloor.cpp b/src/SB/Game/zDiscoFloor.cpp index 09fa33956..81a4e343c 100644 --- a/src/SB/Game/zDiscoFloor.cpp +++ b/src/SB/Game/zDiscoFloor.cpp @@ -63,13 +63,14 @@ namespace // non-matching: scheduling glow_light.kit.tagID = 'TIKL'; + glow_light.kit.lightCount = 1; glow_light.kit.lightList = glow_light.light; glow_light.light[0].type = 0x1; - glow_light.light[0].color.red = _710_2; - glow_light.light[0].color.green = _710_2; - glow_light.light[0].color.blue = _710_2; - glow_light.light[0].color.alpha = _710_2; + glow_light.light[0].color.red = 1.0; + glow_light.light[0].color.green = 1.0; + glow_light.light[0].color.blue = 1.0; + glow_light.light[0].color.alpha = 1.0; xLightKit_Prepare(&glow_light.kit); } diff --git a/src/SB/Game/zEntPlayer.cpp b/src/SB/Game/zEntPlayer.cpp index 6a6333026..50d60ab82 100644 --- a/src/SB/Game/zEntPlayer.cpp +++ b/src/SB/Game/zEntPlayer.cpp @@ -79,6 +79,7 @@ static S32 sPlayerAttackInAir; #define MAX_DELAYED_SOUNDS 8 static zDelayedStreamSound sDelayedSound[MAX_DELAYED_SOUNDS]; static zPlayerSndTimer sPlayerStreamSndTimer[ePlayerStreamSnd_Total] = {}; +static PlayerStreakInfo sStreakInfo[3][4] = {}; F32 startJump; F32 startDouble; @@ -3698,6 +3699,21 @@ void zEntPlayer_Load(xEnt* ent, xSerial* serial) return; } +static void zEntPlayer_StreakFX(xEnt* ent, F32) +{ + S32 i; + S32 p; + S32 cp; + + for (S32 i = 0; i < 6; i++) + { + for (S32 p = 0; p < 2; p++) + { + //sStreakInfo[i][p] = 0; + } + } +} + void zEntPlayer_PatrickLaunch(xEnt* patLauncher) { globals.player.carry.patLauncher = patLauncher; diff --git a/src/SB/Game/zEntPlayer.h b/src/SB/Game/zEntPlayer.h index 00ce06680..8c5e91dfa 100644 --- a/src/SB/Game/zEntPlayer.h +++ b/src/SB/Game/zEntPlayer.h @@ -6,6 +6,7 @@ #include "xAnim.h" #include "zEnt.h" #include "zLasso.h" +#include "xColor.h" enum zControlOwner { @@ -367,6 +368,20 @@ struct zPlayerLassoInfo xAnimState* zeroAnim; }; +class PlayerStreakInfo +{ + U32 activated; + U32 streakID; + xModelTag* tagA; + xModelTag* tagB; + F32 alphaStart; + S32 streakTaper; + iColor_tag colA; + iColor_tag colB; + xVec3 a; + xVec3 b; +}; + #define SHINY_MAX 99999 extern _CurrentPlayer gCurrentPlayer; diff --git a/src/SB/Game/zMain.cpp b/src/SB/Game/zMain.cpp index a69f9d97d..9eff01b5e 100644 --- a/src/SB/Game/zMain.cpp +++ b/src/SB/Game/zMain.cpp @@ -596,7 +596,6 @@ void zMainMemLvlChkCB() void zLedgeAdjust(zLedgeGrabParams* params) { params->animGrab *= (1.0f / 30); - params->animGrab *= (1.0f / 30); } void zMainShowProgressBar() @@ -740,6 +739,13 @@ void zMainReadINI() void* buf; U32 size; xIniFile* ini; + U32 local_18[2]; + + str = (char*)iFileLoad("SB.INI", 0, (U32*)local_18); + if (str = NULL) + { + xIniGetString(xIniParse(0, 0), "patrick.MoveSpeed", 0); + } } void zMainFirstScreen(int) diff --git a/src/SB/Game/zNPCMessenger.cpp b/src/SB/Game/zNPCMessenger.cpp index 7e8a686c6..ad72306f5 100644 --- a/src/SB/Game/zNPCMessenger.cpp +++ b/src/SB/Game/zNPCMessenger.cpp @@ -4,6 +4,8 @@ #include static NPCPSData g_postoffice; +static NPCMsg g_msgdata; +static S32 g_lockarea; NPCPSData* NPCPS_postOffice() { @@ -23,12 +25,23 @@ void zNPCMsg_SceneFinish() return zNPCMsg_SceneReset(); } -void zNPCMsg_SendMsg(en_NPC_MSG_ID, U8) +void zNPCMsg_SendMsg(en_NPC_MSG_ID msgevent, U32 unk0) { + static NPCMsg msg; + memset(&msg, 0, sizeof(NPCMsg)); + msg.msgid = msgevent; + msg.sendto = unk0; + zNPCMsg_SendMsg(&msg, -1.0f, 0); } -void zNPCMsg_SendMsg(en_NPC_MSG_ID, zNPCCommon*) +void zNPCMsg_SendMsg(en_NPC_MSG_ID msgevent, zNPCCommon* npc) { + static NPCMsg msg; + + memset(&msg, 0, sizeof(NPCMsg)); + msg.msgid = msgevent; + msg.sendto = npc->id; + zNPCMsg_SendMsg(&msg, -1.0f, npc); } void zNPCMsg_SendMsg(NPCMsg*, zNPCCommon*) @@ -43,34 +56,44 @@ void NPCPS_copyMsgInfo(NPCMsg*, NPCMsg*, float) { } -void NPCPS_queMessage(NPCMsg*) +void NPCPS_queMessage(NPCMsg* msg) { - // LW - 50% match - // probably a simple fix - NPCPSData* tempQue; + NPCPSData* npc; - tempQue = NPCPS_postOffice(); + npc = NPCPS_postOffice(); - XOrdAppend(((st_XORDEREDARRAY*)tempQue + 0x2), NULL); + XOrdAppend(&npc->quelist, msg); } S32 NPCPS_flagForMID(en_NPC_MSG_ID) { - return 7; + return NPC_MID_DTRON_NPCAVAIL; } -F32 NPCPS_MsgPoolInit(NPCPSData*, int) +void NPCPS_MsgPoolInit(NPCPSData* npc, S32 unk) { - return 0; + XOrdInit(&npc->quelist, unk, 0); + npc->msgblob = (NPCMsg*)xMemAlloc(gActiveHeap, unk * sizeof(NPCMsg), 0); + memset(npc->msgblob, 0, unk * sizeof(NPCMsg)); + NPCPS_MsgPoolReset(npc); } -void NPCPS_MsgPoolReset(NPCPSData*) +void NPCPS_MsgPoolReset(NPCPSData* npc) { + S32 iVar11 = npc->quelist.max; + npc->quelist.cnt = 0; + memset(npc->msgblob, 0, npc->quelist.max * sizeof(NPCMsg)); + if (0 < iVar11) + { + } } -F32 NPCPS_CltPoolInit(NPCPSData*, int) +void NPCPS_CltPoolInit(NPCPSData* npc, S32 unk) { - return 0; + XOrdInit(&npc->cltlist, unk, 0); + npc->cltblob = (NPCPSClt*)xMemAlloc(gActiveHeap, unk * 16, 0); + memset(npc->cltblob, 0, unk * 16); + NPCPS_CltPoolReset(npc); } void NPCPS_CltPoolReset(NPCPSData*) @@ -79,12 +102,78 @@ void NPCPS_CltPoolReset(NPCPSData*) void NPCPS_grabMsg() { + NPCPSData* npc = NPCPS_postOffice(); + + if (npc->msgfree == 0) + { + npc->msgfree = 0; + } } void NPCPS_freeMsg(NPCMsg*) { } +void zNPCMsg_AreaNotify(zNPCCommon* sender, en_NPC_MSG_ID msgid, F32 rad, S32 filter, + en_NPCTYPES* toNPCType) +{ + // TODO: Honestly, I dont know how to finish this. + + if (g_lockarea == 0) + { + g_lockarea = 1; + + memset(&g_msgdata, 0, sizeof(NPCMsg)); + + if (sender != NULL) + { + g_msgdata.from = NPC_MID_NONE; + } + else + { + msgid = (en_NPC_MSG_ID)'FAKE'; + } + + g_msgdata.from = 0; + g_msgdata.msgid = msgid; + g_msgdata.sendto = 0; + g_msgdata.infotype = NPC_MDAT_BLANK; + + zNPCMsg_AreaNotify(sender, &g_msgdata, rad, filter, toNPCType); + g_lockarea = 0; + } +} + +void zNPCMsg_AreaNotify(zNPCCommon* sender, en_NPC_MSG_ID msgid, F32 rad, S32 filter, + en_NPCTYPES toNPCType) +{ + // TODO: Honestly, I dont know how to finish this. + + if (g_lockarea == 0) + { + g_lockarea = 1; + + memset(&g_msgdata, 0, sizeof(NPCMsg)); + + if (sender != NULL) + { + g_msgdata.from = NPC_MID_NONE; + } + else + { + msgid = (en_NPC_MSG_ID)'FAKE'; + } + + g_msgdata.from = 0; + g_msgdata.msgid = msgid; + g_msgdata.sendto = 0; + g_msgdata.infotype = NPC_MDAT_BLANK; + + zNPCMsg_AreaNotify(sender, &g_msgdata, rad, filter, &toNPCType); + g_lockarea = 0; + } +} + void zNPCMsg_Startup() { NPCPSData* tempStartup; diff --git a/src/SB/Game/zNPCMessenger.h b/src/SB/Game/zNPCMessenger.h index 0d3d80f36..c35430124 100644 --- a/src/SB/Game/zNPCMessenger.h +++ b/src/SB/Game/zNPCMessenger.h @@ -4,14 +4,6 @@ #include "zNPCTypeCommon.h" #include "zNPCTypes.h" -void zNPCMsg_SceneReset(); -void zNPCMsg_ScenePrepare(); -void zNPCMsg_Startup(); -void zNPCMsg_Shutdown(); -// void zNPCMsg_AreaNotify(zNPCCommon* sender, en_NPC_MSG_ID msgid, F32 rad, S32 filter, -// en_NPCTYPES toNPCType); -void zNPCMsg_Timestep(xScene* xscn, F32 dt); - struct NPCMsg; struct NPCPSClt @@ -34,4 +26,13 @@ struct NPCPSData st_XORDEREDARRAY quelist; // offset 0x20, size 0x10 }; +void zNPCMsg_SceneReset(); +void zNPCMsg_ScenePrepare(); +void zNPCMsg_Startup(); +void zNPCMsg_Shutdown(); + +void zNPCMsg_Timestep(xScene* xscn, F32 dt); +void NPCPS_MsgPoolReset(NPCPSData* npc); +void NPCPS_CltPoolReset(NPCPSData* npc); + #endif diff --git a/src/SB/Game/zNPCTypeBossSB2.cpp b/src/SB/Game/zNPCTypeBossSB2.cpp index 5df7f7e10..00fd2fefc 100644 --- a/src/SB/Game/zNPCTypeBossSB2.cpp +++ b/src/SB/Game/zNPCTypeBossSB2.cpp @@ -988,110 +988,86 @@ namespace xAnimTable* ZNPC_AnimTable_BossSB2() { // clang-format off - // S32 anim_list[27] = { - - // ANIM_Idle01, - // ANIM_Idle02, - // ANIM_Taunt01, - // ANIM_Hit01, - // ANIM_Hit02, - // ANIM_SmashHitLeft, - // ANIM_SmashHitRight, - // ANIM_SmackLeft01, - // ANIM_SmackRight01, - // ANIM_ChopLeftBegin, - // ANIM_ChopLeftLoop, - // ANIM_ChopLeftEnd, - // ANIM_ChopRightBegin, No longer needed? - // ANIM_ChopRightLoop, Was used instead of "ANIM_xxxxx;" right before new state - // ANIM_ChopRightEnd, - // ANIM_SwipeLeftBegin, - // ANIM_SwipeLeftLoop, - // ANIM_SwipeLeftEnd, - // ANIM_SwipeRightBegin, - // ANIM_SwipeRightLoop, - // ANIM_SwipeRightEnd, - // ANIM_ReturnIdle01, - // ANIM_KarateStart, - // ANIM_KarateLoop, - // ANIM_KarateEnd, - // ANIM_Dizzy01, - // }; + S32 anim_list[27] = { + + ANIM_Idle01, + ANIM_Idle02, + ANIM_Taunt01, + ANIM_Hit01, + ANIM_Hit02, + ANIM_SmashHitLeft, + ANIM_SmashHitRight, + ANIM_SmackLeft01, + ANIM_SmackRight01, + ANIM_ChopLeftBegin, + ANIM_ChopLeftLoop, + ANIM_ChopLeftEnd, + ANIM_ChopRightBegin, + ANIM_ChopRightLoop, + ANIM_ChopRightEnd, + ANIM_SwipeLeftBegin, + ANIM_SwipeLeftLoop, + ANIM_SwipeLeftEnd, + ANIM_SwipeRightBegin, + ANIM_SwipeRightLoop, + ANIM_SwipeRightEnd, + ANIM_ReturnIdle01, + ANIM_KarateStart, + ANIM_KarateLoop, + ANIM_KarateEnd, + ANIM_Dizzy01, + }; xAnimTable* table = xAnimTableNew("zNPCB_SB2_Karate", NULL, 0); //24 new state //15 new transition - ANIM_Idle01; xAnimTableNewState(table, g_strz_bossanim[ANIM_Idle01], 0x10, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_Idle02; xAnimTableNewState(table, g_strz_bossanim[ANIM_Idle02], 0, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_Taunt01; xAnimTableNewState(table, g_strz_bossanim[ANIM_Taunt01], 0, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_SmackLeft01; xAnimTableNewState(table, g_strz_bossanim[ANIM_SmackLeft01], 0x20, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_SmackRight01; xAnimTableNewState(table, g_strz_bossanim[ANIM_SmackRight01], 0x20, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_ChopLeftBegin; xAnimTableNewState(table, g_strz_bossanim[ANIM_ChopLeftBegin], 0x20, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_ChopLeftLoop; xAnimTableNewState(table, g_strz_bossanim[ANIM_ChopLeftLoop], 0, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_ChopLeftEnd; xAnimTableNewState(table, g_strz_bossanim[ANIM_ChopLeftEnd], 0x20, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_ChopRightBegin; xAnimTableNewState(table, g_strz_bossanim[ANIM_ChopRightBegin], 0x20, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_ChopRightLoop; xAnimTableNewState(table, g_strz_bossanim[ANIM_ChopRightLoop], 0, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_ChopRightEnd; xAnimTableNewState(table, g_strz_bossanim[ANIM_ChopRightEnd], 0x20, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_SwipeLeftBegin; xAnimTableNewState(table, g_strz_bossanim[ANIM_SwipeLeftBegin], 0x20, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_SwipeLeftLoop; xAnimTableNewState(table, g_strz_bossanim[ANIM_SwipeLeftLoop], 0x10, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_SwipeLeftEnd; xAnimTableNewState(table, g_strz_bossanim[ANIM_SwipeLeftEnd], 0x20, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_SwipeRightBegin; xAnimTableNewState(table, g_strz_bossanim[ANIM_SwipeRightBegin], 0x20, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_SwipeRightLoop; xAnimTableNewState(table, g_strz_bossanim[ANIM_SwipeRightLoop], 0x10, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_SwipeRightEnd; xAnimTableNewState(table, g_strz_bossanim[ANIM_SwipeRightEnd], 0x20, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_Dizzy01; xAnimTableNewState(table, g_strz_bossanim[ANIM_Dizzy01], 0x10, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_Hit01; xAnimTableNewState(table, g_strz_bossanim[ANIM_Hit01], 0, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_Hit02; xAnimTableNewState(table, g_strz_bossanim[ANIM_Hit02], 0, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_ReturnIdle01; xAnimTableNewState(table, g_strz_bossanim[ANIM_ReturnIdle01], 0x20, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_KarateStart; xAnimTableNewState(table, g_strz_bossanim[ANIM_KarateStart], 0x20, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_KarateLoop; xAnimTableNewState(table, g_strz_bossanim[ANIM_KarateLoop], 0x10, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - ANIM_KarateEnd; xAnimTableNewState(table, g_strz_bossanim[ANIM_KarateEnd], 0x20, 0, 1, NULL, NULL, 0, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); diff --git a/src/SB/Game/zNPCTypeBossSandy.cpp b/src/SB/Game/zNPCTypeBossSandy.cpp index 423289e89..26952ec99 100644 --- a/src/SB/Game/zNPCTypeBossSandy.cpp +++ b/src/SB/Game/zNPCTypeBossSandy.cpp @@ -62,7 +62,7 @@ static U8 sPCWasBubbleBouncing; static F32 sRadiusOfRing; static F32 sElbowDropTimer; static F32 sChaseTimer; -static F32 sNumAttacks; +static S32 sNumAttacks; static F32 sDidClothesline; static F32 sElbowDropThreshold; static zNPCBSandy* sSandyPtr; @@ -145,8 +145,7 @@ void on_change_shockwave(const tweak_info& tweak) xAnimTable* ZNPC_AnimTable_BossSandy() { // clang-format off - S32 ourAnims[28] = { - Unknown, + S32 ourAnims[25] = { Idle01, Idle02, Taunt01, @@ -172,13 +171,12 @@ xAnimTable* ZNPC_AnimTable_BossSandy() NoHeadGetUp01, NoHeadShotUp01, NoHeadShock01, - NoHeadReplace01, - NoHeadHit01, }; // clang-format on - //Missing like 2 logic lines or something, too tired to figure it out - xAnimTable* table = xAnimTableNew("zNPCBSandy", NULL, 0); + xAnimTransition* tList; + xAnimTable* table; + table = xAnimTableNew("zNPCBSandy", NULL, 0); xAnimTableNewState(table, g_strz_bossanim[Unknown], 0x10, 0x40, 1.0f, NULL, NULL, 0.0f, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); @@ -229,7 +227,7 @@ xAnimTable* ZNPC_AnimTable_BossSandy() NPCC_BuildStandardAnimTran(table, g_strz_bossanim, ourAnims, 1, 0.2f); - xAnimTransition* tList = table->TransitionList; + tList = table->TransitionList; while (tList != NULL) { tList->BlendRecip = 3.3333333f; @@ -259,7 +257,6 @@ U32 HeadNotShocked(xAnimTransition*, xAnimSingle*, void*) return !(sSandyPtr->bossFlags & 0x100); } - xAnimTable* ZNPC_AnimTable_BossSandyHead() { xAnimTable* table; @@ -273,14 +270,14 @@ xAnimTable* ZNPC_AnimTable_BossSandyHead() xAnimTableNewState(table, "Shocked01", 0x10, 0, 1.0f, NULL, NULL, 0.0f, NULL, NULL, xAnimDefaultBeforeEnter, NULL, NULL); - xAnimTableNewTransition(table, "Idle01", "Carried01", HeadIsCarried, NULL, 0, 0, 0.0f, 0.0f, - 0, 0, 0.25f, NULL); - xAnimTableNewTransition(table, "Carried01", "Idle01", HeadNotCarried, NULL, 0, 0, 0.0f, - 0.0f, 0, 0, 0.25f, NULL); - xAnimTableNewTransition(table, "Idle01", "Shocked01", HeadIsShocked, NULL, 0, 0, 0.0f, 0.0f, - 0, 0, 0.25f, NULL); - xAnimTableNewTransition(table, "Shocked01", "Idle01", HeadNotShocked, NULL, 0, 0, 0.0f, - 0.0f, 0, 0, 0.25f, NULL); + xAnimTableNewTransition(table, "Idle01", "Carried01", HeadIsCarried, NULL, 0, 0, 0.0f, 0.0f, 0, + 0, 0.25f, NULL); + xAnimTableNewTransition(table, "Carried01", "Idle01", HeadNotCarried, NULL, 0, 0, 0.0f, 0.0f, 0, + 0, 0.25f, NULL); + xAnimTableNewTransition(table, "Idle01", "Shocked01", HeadIsShocked, NULL, 0, 0, 0.0f, 0.0f, 0, + 0, 0.25f, NULL); + xAnimTableNewTransition(table, "Shocked01", "Idle01", HeadNotShocked, NULL, 0, 0, 0.0f, 0.0f, 0, + 0, 0.25f, NULL); return table; } @@ -1471,6 +1468,48 @@ S32 zNPCGoalBossSandyNoHead::Process(en_trantype* trantype, F32 dt, void* updCtx return zNPCGoalCommon::Process(trantype, dt, updCtxt, xscn); } +S32 zNPCGoalBossSandyElbowDrop::Enter(F32 dt, void* updCtxt) +{ + zNPCBSandy* sandy = (zNPCBSandy*)psyche->clt_owner; + + timeInGoal = 0; + sandy->bossFlags &= 0xfffffffd; + sNumAttacks++; + + xVec3Init(&sandy->frame->vel, 0.0f, 0.0f, 0.0f); + + xSndPlay3D(xStrHash("B101_SC_drop"), 0.77f, 0.0f, 0x0, 0x0, sandy, 30.0f, SND_CAT_GAME, 0.65f); + xSndPlay3D(xStrHash("B101_SC_drop"), 0.77f, 0.0f, 0x0, 0x0, sandy, 30.0f, SND_CAT_GAME, 1.3f); + xSndPlay3D(xStrHash("B101_SC_hitring"), 0.77f, 0.0f, 0x0, 0x0, sandy, 30.0f, SND_CAT_GAME, + 2.25f); + elbowFlags = 0; + return zNPCGoalCommon::Enter(dt, updCtxt); +} + +// This function is certified not cool +S32 zNPCGoalBossSandyElbowDrop::Process(en_trantype* trantype, F32 dt, void* updCtxt, xScene* xscn) +{ + zNPCBSandy* sandy = (zNPCBSandy*)psyche->clt_owner; + xVec3 newAt; + + if (timeInGoal > 0.75f) + { + for (S32 i = 0; i < 13; i++) + { + sandy->boundFlags[i] |= 0x1; + } + } + + if (timeInGoal <= sandy->edropTurnMinTime) + { + if (sandy->shockwaveMaxRadius < timeInGoal) + { + } + } + + return xGoal::Process(trantype, dt, updCtxt, xscn); +} + void xBinaryCamera::add_tweaks(char const*) { } diff --git a/src/SB/Game/zNPCTypeBossSandy.h b/src/SB/Game/zNPCTypeBossSandy.h index cbd5280fb..2904b6647 100644 --- a/src/SB/Game/zNPCTypeBossSandy.h +++ b/src/SB/Game/zNPCTypeBossSandy.h @@ -24,7 +24,7 @@ struct zNPCBSandy : zNPCBoss xEnt** boundList; // 0x2B4 U32* boundFlags; F32* boundEmitTimer; - U32 bossFlags; + U32 bossFlags; // 0x2c0 xVec3 currDir; F32 currVel; S32 hitPoints; // 0x2D4 diff --git a/src/SB/Game/zNPCTypeCommon.h b/src/SB/Game/zNPCTypeCommon.h index 80233c0ce..b2ed0f2b3 100644 --- a/src/SB/Game/zNPCTypeCommon.h +++ b/src/SB/Game/zNPCTypeCommon.h @@ -704,7 +704,10 @@ U32 xSndIsPlaying(U32 assetID, U32 parid); void zNPCMsg_AreaNotify(zNPCCommon* sender, en_NPC_MSG_ID msgid, F32 rad, S32 filter, en_NPCTYPES toNPCType); +void zNPCMsg_AreaNotify(zNPCCommon*, en_NPC_MSG_ID, F32, S32, en_NPCTYPES*); +void zNPCMsg_AreaNotify(zNPCCommon*, NPCMsg*, F32, S32, en_NPCTYPES*); +void zNPCMsg_SendMsg(NPCMsg, F32, zNPCCommon*); void zNPCMsg_SendMsg(en_NPC_MSG_ID msgevent, zNPCCommon* npc_sendto); void zNPCMsg_SendMsg(NPCMsg* inmsg, zNPCCommon* npc_sendto); void zNPCMsg_SendMsg(NPCMsg* inmsg, F32 delay, zNPCCommon* npc_sendto); diff --git a/src/SB/Game/zNPCTypeDutchman.cpp b/src/SB/Game/zNPCTypeDutchman.cpp index 321bb0747..0dd9152cd 100644 --- a/src/SB/Game/zNPCTypeDutchman.cpp +++ b/src/SB/Game/zNPCTypeDutchman.cpp @@ -1,6 +1,7 @@ #include "xVec3.h" #include "xMath3.h" #include "xDebug.h" +#include "zGlobals.h" #include "zNPCTypeDutchman.h" #include @@ -36,10 +37,6 @@ static U32 dutchman_count; namespace { - void kill_sound(S32 a, U32 b) - { - } - struct sound_property { F32 volume; @@ -164,6 +161,72 @@ namespace void register_tweaks(bool init, xModelAssetParam* ap, U32 apsize, const char*); }; + struct sound_data_type + { + U32 id; + U32 handle; + }; + + struct sound_asset + { + char* name; + U32 priority; + U32 flags; + }; + + class curve_node + { + F32 time; + iColor_tag color; + F32 scale; + }; + + static sound_data_type sound_data[6]; + static sound_asset sound_assets[6]; + static xBinaryCamera boss_cam; + static xFXRibbon eye_scorch[2]; + static curve_node burn_ribbon_curve[7]; + static zParEmitter* plasma_emitter; + static xParEmitterCustomSettings plasma_emitter_settings; + static zParEmitter* spark_emitter; + static xParEmitterCustomSettings spark_emitter_settings; + static zParEmitter* light_emitter; + static xParEmitterCustomSettings light_emitter_settings; + static zParEmitter* eyeglow_emitter[2]; + static zParEmitter* death_emitter; + static zParEmitter* dissolve_emitter; + static zParEmitter* fadeout_emitter; + static zParEmitter* fadein_emitter; + static zParEmitter* flame_emitter[3]; + static xParEmitterCustomSettings flame_emitter_settings; + static zParEmitter* snot_emitter; + static xParEmitterCustomSettings snot_emitter_settings; + static zParEmitter* slime_emitter; + static xParEmitterCustomSettings slime_emitter_settings; + static zParEmitter* hand_trail_emitter; + static zParEmitter* blob_emitter; + + static void init_sound() + { + U32 total; + + memset(&sound_data, 0, 0x30); + + for (U32 i = 0; i < 6; i++) + { + xStrHash((const char*)&sound_assets[i]); + } + } + + U32 play_sound(S32, const xVec3*, F32) + { + return 0; + } + + void kill_sound(S32 a, U32 b) + { + } + static tweak_group tweak; static void set_volume(S32 which, U32, F32 new_vol) @@ -976,22 +1039,242 @@ xAnimTable* ZNPC_AnimTable_Dutchman() return table; } +void zNPCDutchman::Init(xEntAsset* asset) +{ + // Function is at 60% + // Laser_texture and m both need to be used? + + char* scorch_name[2]; + S32 i; + RwTexture* laser_texture; + S32 model_index; + xModelInstance* m = model; + xFXRibbon* ribbon; + + dutchman_count = dutchman_count + 1; + boss_cam.init(); + zNPCCommon::Init(asset); + flg_move = 1; + ribbon = eye_scorch; + flg_vuln = 1; + + for (i = 0; i < 2; i++) + { + ribbon->init((S32)eye_scorch, (const char*)0x1ff); + ribbon->set_default_config(); + ribbon->set_curve(ribbon->curve, 0x7); + ribbon->set_texture("fx_streak1"); + ribbon->cfg.life_time = 5.0; + ribbon->refresh_config(); + } + + laser_raster = (RwRaster*)xSTFindAsset((U32)xStrHash("laser_beam_white_blue"), 0x0); + + waves.init(0xf); + slime.slices.init(0x3f); +} + void zNPCDutchman::Setup() { zNPCSubBoss::Setup(); } +void zNPCDutchman::Reset() +{ + // Best I can get it + // xFXRibbon::clear doenst make much sense + zNPCCommon::Reset(); + memset((void*)flag.face_player, 0, 16); + decompose(); + life = 3; + round = 0; + stage = -1; + alpha = 1.0f; + update_round(); + face_player(); + flg_vuln = 1; + reset_speed(); + move.vel = 0.0f; + move.dest = get_center(); + flag.move = MOVE_FOLLOW; + flames.imax_dist = 1.0f / tweak.ground_radius; + reset_blob_mat(); + waves.clear(); + slime.slices.clear(); + //eye_scorch->joints.clear(); + //eye_scorch->joints.clear(); + fade.sound_handle = 0; + vanish(); + refresh_reticle(); + flag.fighting = 0; + plasma_emitter = zParEmitterFind("PAREMIT_DUTCHMAN_PLASMA"); + plasma_emitter_settings.custom_flags = 0x100; + plasma_emitter_settings.pos = g_O3; + spark_emitter = zParEmitterFind("PAREMIT_DUTCHMAN_SPARKS"); + spark_emitter_settings.custom_flags = 0x100; + spark_emitter_settings.pos = g_O3; + light_emitter = zParEmitterFind("PAREMIT_DUTCHMAN_LIGHT"); + light_emitter_settings.custom_flags = 0x110; + light_emitter_settings.pos = g_O3; + light_emitter->prop->life.set((119.99999f * tweak.beam.light_rate)); + eyeglow_emitter[0] = zParEmitterFind("PAREMIT_DUTCHMAN_EYEGLOW0"); + eyeglow_emitter[1] = zParEmitterFind("PAREMIT_DUTCHMAN_EYEGLOW1"); + death_emitter = zParEmitterFind("PAREMIT_DUTCHMAN_DEATH"); + dissolve_emitter = zParEmitterFind("PAREMIT_DUTCHMAN_DISSOLVE"); + fadeout_emitter = zParEmitterFind("PAREMIT_DUTCHMAN_FADEOUT"); + fadein_emitter = zParEmitterFind("PAREMIT_DUTCHMAN_FADEIN"); + flame_emitter[0] = zParEmitterFind("PAREMIT_DUTCHMAN_FLAME_LIGHT"); + flame_emitter[1] = zParEmitterFind("PAREMIT_DUTCHMAN_FLAME_NORMAL"); + flame_emitter[2] = zParEmitterFind("PAREMIT_DUTCHMAN_FLAME_SPRAY"); + flame_emitter_settings.custom_flags = 0x110; + flame_emitter_settings.pos = g_O3; + light_emitter->prop->life.set((59.999996f)); + snot_emitter = zParEmitterFind("PAREMIT_DUTCHMAN_FLAME_SNOT"); + snot_emitter_settings.custom_flags = 0x300; + slime_emitter = zParEmitterFind("PAREMIT_DUTCHMAN_SLIME_TRAIL"); + slime_emitter_settings.custom_flags = 0x100; + hand_trail_emitter = zParEmitterFind("PAREMIT_DUTCHMAN_HAND_TRAIL"); + blob_emitter = zParEmitterFind("PAREMIT_DUTCHMAN_BLOB"); + psy_instinct->GoalSet('NGM=', 1); +} + void zNPCDutchman::Destroy() { zNPCCommon::Destroy(); dutchman_count--; } +void zNPCDutchman::Process(xScene* xscn, F32 dt) +{ + xVec3 player_loc; + + if (flag.fighting == 0) + { + zNPCCommon::Process(xscn, dt); + } + else + { + delay = delay + dt; + psy_instinct->Timestep(dt, NULL); + if (flag.fighting == 0) + { + zNPCCommon::Process(xscn, dt); + } + else + { + if (flag.face_player != 0) + { + player_loc = globals.player.ent.model->Scale; + get_center(); + } + update_turn(dt); + update_move(dt); + update_animation(dt); + update_flames(dt); + update_eye_glow(dt); + update_hand_trail(dt); + update_fade(dt); + update_slime(dt); + + if ((check_player_damage() & 0xff) != 0) + { + zEntPlayer_Damage((xBase*)this, 1); + } + update_camera(dt); + refresh_reticle(); + flg_xtrarend = flg_xtrarend | 1; + zNPCCommon::Process(xscn, dt); + } + } +} + +S32 zNPCDutchman::SysEvent(xBase* from, xBase* to, U32 toEvent, const F32* toParam, + xBase* toParamWidget, S32* handled) +{ + // Was going to try this function, but literally can't find 0x1d9 + if (toEvent == 0x1d9) + { + psy_instinct->GoalSet('NGM=', 1); + } + else + { + if ((0x1d8 < toEvent) || (toEvent != 0x1b5)) + { + handled = 0; + return zNPCCommon::SysEvent(from, to, toEvent, toParam, toParamWidget, handled); + } + start_fight(); + } + return 1; +} + void zNPCDutchman::Render() { zNPCDutchman::render_debug(); } +void zNPCDutchman::RenderExtra() +{ + S32 oldzwrite; + S32 oldztest; + U32 oldsrcblend; + U32 olddestblend; + U8 oldcmp; + xModelInstance* m; + U8 haloing; + + RwRenderStateGet(rwRENDERSTATEFOGENABLE, (void*)&oldcmp); + RwRenderStateGet(rwRENDERSTATESRCBLEND, (void*)&oldcmp); + RwRenderStateGet(rwRENDERSTATEDESTBLEND, (void*)&oldcmp); + RwRenderStateGet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)&oldcmp); + RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)&oldcmp); + RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)&oldcmp); + RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)&oldcmp); + RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)&oldcmp); + iDrawSetFBMSK(-1); + + for (m = model; m != 0; m = m) + { + xModelRenderSingle(m); + } + + iDrawSetFBMSK(0); + + for (m = model; m != 0; m = m) + { + xModelRenderSingle(m); + } + + oldcmp = FALSE; + + if (flag.beaming != 0) + { + if (beam->segments != 0) + { + oldcmp = TRUE; + } + render_beam(); + // if (*(int*)(this + 0x430) + *(int*)(this + 0x54c) != 0) + // { + // bVar1 = true; + // } + } + // 0x2c0 + oldzwrite = flag.fade; + if (oldcmp) + { + render_beam(); + } + if ((2U - oldzwrite | oldzwrite - 2U) < 0) + { + render_halo(); + } + RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)&oldcmp); + RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)&oldcmp); + RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)&oldcmp); + RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)&oldcmp); +} + void zNPCDutchman::SelfSetup() { xBehaveMgr* bmgr = xBehaveMgr_GetSelf(); @@ -1110,6 +1393,19 @@ void zNPCDutchman::update_round() stage = -1; } +void zNPCDutchman::decompose() +{ + if (flag.fighting != 0) + { + flag.fighting = 0; + disable_emitter(*dissolve_emitter); + disable_emitter(*fadein_emitter); + disable_emitter(*fadeout_emitter); + zCameraEnableTracking(CO_BOSS); + boss_cam.stop; + } +} + void zNPCDutchman::render_debug() { } @@ -1151,6 +1447,42 @@ void zNPCDutchman::stop_hand_trail() flag.hand_trail = false; } +void zNPCDutchman::dissolve(F32 delay) +{ + F32 volume; + if (delay == 0.0f) + { + flag.fade = FADE_TELEPORT; + disable_emitter(*fadeout_emitter); + set_alpha(0.0f); + vanish(); + volume = 1.0f; + } + else + { + flag.fade = FADE_DISSOLVE; + fade.time = 0.0f; + fade.duration = delay; + fade.iduration = 1.0f / fade.duration; + enable_emitter(*fadeout_emitter); + set_alpha(1.0f); + reappear(); + volume = 0.0f; + } + enable_emitter(*dissolve_emitter); + start_eye_glow(); + start_hand_trail(); + + if (fade.sound_handle == 0) + { + fade.sound_handle = play_sound(2, (const xVec3*)&bound.pad[3], volume); + } + else + { + set_volume(2, 0, 0.0f); + } +} + void zNPCDutchman::reset_lasso_anim() { xAnimPlaySetState(0, lassdata->holdGuideAnim, 0); diff --git a/src/SB/Game/zNPCTypeDutchman.h b/src/SB/Game/zNPCTypeDutchman.h index c96a1a964..a2de6e5ae 100644 --- a/src/SB/Game/zNPCTypeDutchman.h +++ b/src/SB/Game/zNPCTypeDutchman.h @@ -7,6 +7,9 @@ #include "xBehaviour.h" #include "zNPCTypeCommon.h" #include "zNPCGoals.h" +#include "xCamera.h" +#include "zCamera.h" +#include "xMath3.h" namespace auto_tweak { @@ -169,26 +172,45 @@ struct zNPCDutchman : zNPCSubBoss RwRaster* laser_raster; zNPCDutchman(S32 myType); + void Init(xEntAsset* asset); void Setup(); + void Reset(); void Destroy(); + void Process(xScene*, F32); + S32 SysEvent(xBase* from, xBase* to, U32 toEvent, const F32* toParam, xBase* toParamWidget, + S32* handled); void Render(); + void RenderExtra(); void SelfSetup(); void render_debug(); - void update_animation(float); + void update_turn(F32); + void update_move(F32); + void update_animation(F32); + void update_camera(F32); void kill_wave(zNPCDutchman::wave_data&); - void add_splash(const xVec3&, float); + void add_splash(const xVec3&, F32); void vanish(); void reappear(); void turn_to_face(const xVec3&); void face_player(); + void update_flames(F32); + void start_fight(); + void set_life(S32); void start_beam(); void stop_beam(); + void set_alpha(F32); void start_flames(); void stop_flames(); + U8 check_player_damage(); void get_hand_loc(S32) const; void start_hand_trail(); void stop_hand_trail(); + void refresh_reticle(); + void update_hand_trail(F32); + void dissolve(F32); void reset_lasso_anim(); + void update_fade(F32); + void update_slime(F32); void reset_speed(); void Damage(en_NPC_DAMAGE_TYPE, xBase*, const xVec3*); U32 AnimPick(S32 rawgoal, en_NPC_GOAL_SPOT gspot, xGoal* goal); @@ -200,7 +222,15 @@ struct zNPCDutchman : zNPCSubBoss void goal_delay(); void start_eye_glow(); void stop_eye_glow(); + void update_eye_glow(F32); void get_orbit() const; //Weak + xVec3 get_center() const; //Weak + void reset_blob_mat(); + void render_beam(); + void render_halo(); + + void enable_emitter(zParEmitter&) const; + void disable_emitter(zParEmitter&) const; U8 PhysicsFlags() const; U8 ColPenByFlags() const; U8 ColChkByFlags() const; diff --git a/src/SB/Game/zNPCTypeKingJelly.cpp b/src/SB/Game/zNPCTypeKingJelly.cpp index 523fc762c..be33f2c00 100644 --- a/src/SB/Game/zNPCTypeKingJelly.cpp +++ b/src/SB/Game/zNPCTypeKingJelly.cpp @@ -12,7 +12,7 @@ #define ANIM_Unknown 0 // 0x0 #define ANIM_Idle01 1 // 0x04 -#define ANIM_Idle02 2 // 0x08 +#define ANIM_Idle02 2 // 0x08 #define ANIM_Idle03 3 // 0xC #define ANIM_Fidget01 4 // #define ANIM_Fidget02 5 @@ -1294,6 +1294,11 @@ void zNPCKingJelly::Setup() zNPCSubBoss::Setup(); } +void zNPCKingJelly::Reset() +{ + // u32 i +} + void zNPCKingJelly::Destroy() { decompose(); @@ -1314,6 +1319,37 @@ void zNPCKingJelly::BUpdate(xVec3* pos) zNPCCommon::BUpdate(pos); } +S32 zNPCKingJelly::SysEvent(xBase* from, xBase* to, U32 toEvent, const F32* toParam, + xBase* toParamWidget, S32* handled) +{ + U32 ret; + + if (toEvent == 0x1b9) + { + ret = 1; + } + else + { + if (toEvent < 0x1b9) + { + if (toEvent == 0x1b5) + { + start_fight(); + return 1; + } + } + else if (toEvent == 0x1d9) + { + xPsyche* psy = this->psy_instinct; + psy->GoalSet(0x4e474d37, 1); + return 1; + } + handled = 0; + ret = zNPCCommon::SysEvent(from, to, toEvent, toParam, toParamWidget, handled); + } + return ret; +} + void zNPCKingJelly::RenderExtra() { zNPCKingJelly::render_debug(); diff --git a/src/SB/Game/zNPCTypeKingJelly.h b/src/SB/Game/zNPCTypeKingJelly.h index 33690b305..a3136aa02 100644 --- a/src/SB/Game/zNPCTypeKingJelly.h +++ b/src/SB/Game/zNPCTypeKingJelly.h @@ -10,7 +10,6 @@ #include "zNPCTypeAmbient.h" #include "xCamera.h" - namespace auto_tweak { template @@ -172,10 +171,13 @@ struct zNPCKingJelly : zNPCSubBoss zNPCKingJelly(S32 myType); void Setup(); + void Reset(); void Destroy(); U32 AnimPick(S32 rawgoal, en_NPC_GOAL_SPOT gspot, xGoal* goal); void Init(xEntAsset*); void BUpdate(xVec3*); + S32 SysEvent(xBase* from, xBase* to, U32 toEvent, const F32* toParam, xBase* toParamWidget, + S32* handled); void RenderExtra(); void ParseINI(); void SelfSetup(); @@ -183,6 +185,7 @@ struct zNPCKingJelly : zNPCSubBoss void init_child(zNPCKingJelly::child_data&, zNPCCommon&, int); void disable_child(zNPCKingJelly::child_data&); void enable_child(zNPCKingJelly::child_data& child); + void start_fight(); void spawn_children(int, int); S32 max_strikes(); void load_model(); diff --git a/src/dolphin/src/si/SIBios.c b/src/dolphin/src/si/SIBios.c index 030b026e3..28fae2837 100644 --- a/src/dolphin/src/si/SIBios.c +++ b/src/dolphin/src/si/SIBios.c @@ -899,4 +899,4 @@ char* SIGetTypeString(u32 type) case SI_GC_STEERING: return "Steering"; } -} \ No newline at end of file +}