Skip to content

Commit

Permalink
Decompilation of TWatergun
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAzack9 committed Mar 2, 2025
1 parent cb8f337 commit e014016
Show file tree
Hide file tree
Showing 29 changed files with 1,049 additions and 1,865 deletions.
4 changes: 2 additions & 2 deletions include/JSystem/J3D/J3DGraphAnimator/J3DModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ class J3DModel {
/* 0x08 */ u32 unk8;
/* 0x0C */ J3DCalcCallBack unkC;
char pad1[0x4];
/* 0x14 */ Vec unk14;
/* 0x20 */ Mtx unk20;
/* 0x14 */ Vec mBaseScale;
/* 0x20 */ Mtx mBaseMtx;
/* 0x50 */ u8* mScaleFlagArr;
/* 0x54 */ u8* mEvlpScaleFlagArr;
/* 0x58 */ Mtx* mNodeMatrices;
Expand Down
12 changes: 2 additions & 10 deletions include/M3DUtil/M3UModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,10 @@
struct M3UMtxCalcSetInfo;
class J3DModel;
class J3DFrameCtrl;
class J3DAnmTexPattern;
class J3DTexNoAnm;

class M3UModelCommon {
public:
virtual void getMtxCalc(const M3UMtxCalcSetInfo&);

public:
/* 0x4 */ void* unk4; // TODO: what is this?
/* 0x8 */ J3DAnmTexPattern** unk8;
/* 0xC */ J3DTexNoAnm** unkC;
/* 0x10 */ char unk10[0x8];
};

class M3UModel {
Expand All @@ -37,11 +29,11 @@ class M3UModel {
void updateInMotion();

public:
/* 0x4 */ M3UModelCommon* unk4;
/* 0x4 */ u32 unk4;
/* 0x8 */ J3DModel* unk8;
/* 0xC */ J3DFrameCtrl* unkC;
/* 0x10 */ u16 unk10;
/* 0x14 */ void* unk14; // TODO: what is this?
/* 0x14 */ u32 unk14;
/* 0x18 */ u32 unk18;
/* 0x1C */ u8* unk1C;
};
Expand Down
163 changes: 74 additions & 89 deletions include/M3DUtil/MActor.hpp
Original file line number Diff line number Diff line change
@@ -1,108 +1,93 @@
#ifndef M3DUTIL_M_ACTOR_HPP
#define M3DUTIL_M_ACTOR_HPP

#include <JSystem/J3D/J3DGraphAnimator/J3DNode.hpp>
#include <JSystem/JDrama/JDRGraphics.hpp>

struct TBGCheckData;
class J3DNode;
class J3DModel;
class MActorAnmData;
class J3DFrameCtrl;
class J3DMtxCalc;

class MActorAnmBase;
class MActorAnmBck;
class MActorAnmBpk;
class MActorAnmBtp;
class MActorAnmBtk;
class MActorAnmBrk;
class MActorAnmBlk;

class MActor {
public:
MActor(MActorAnmData*);

void setMActorAnmData(MActorAnmData*);
void setModel(J3DModel*, u32);
bool isCurAnmAlreadyEnd(int);
bool curAnmEndsNext(int, char*);
void curSubAnmEndsNext(int);
void setAnimation(const char*, int);
void initDL();
void resetDL();
void initDLByIndex(unsigned short);
void unlockDLIfNeed();
void onMakeDL();
void offMakeDL();
void getCurAnmName(int) const;
void setJointCallback(int, J3DNodeCallBack);
void updateInSubBck();
void updateOutSubBck();
void calcAnm();
void calc();
void viewCalc();
void loadSetDeformData(const char*);
void setLightID(short);
void setLightData(const TBGCheckData*, const JGeometry::TVec3<f32>&);
void setLightType(int);
void update();
void entry();
void frameUpdate();
void matAnmFrameUpdate();
void perform(u32, JDrama::TGraphics*);
bool checkCurAnm(const char*, int);
bool checkCurAnmFromIndex(int, int);
bool checkAnmFileExist(const char*, int);
J3DFrameCtrl* getFrameCtrl(int);
bool checkBckPass(float);
int getCurAnmIdx(int) const;
void setFrameRate(float, int);
void setBck(const char*);
void setBckFromIndex(int);
void setSubBckFromIndex(int, int);
bool checkCurBckFromIndex(int);
void setSubBck(const char*, const char*);
void setBpk(const char*);
void setBpkFromIndex(int);
void setBtp(const char*);
void setBtpFromIndex(int);
void setBtk(const char*);
void setBtkFromIndex(int);
void setBlk(const char*);
void setBlkFromIndex(int);
void setBrk(const char*);
void setBrkFromIndex(int);
void updateIn();
void updateOut();
void entryIn();
void entryOut();
void updateMatAnm();
void dumpReport();
void updateMatAnm();
void entryOut();
void entryIn();
void updateOut();
void updateIn();
void setBrkFromIndex(int);
void setBrk(const char*);
void setBlkFromIndex(int);
void setBlk(const char*);
void setBtkFromIndex(int);
void setBtk(const char*);
void setBtpFromIndex(int);
void setBtp(const char*);
void setBpkFromIndex(int);
void setBpk(const char*);
void setSubBck(const char*, const char*);
void checkCurBckFromIndex(int);
void setSubBckFromIndex(int, int);
void setBckFromIndex(int);
void setBck(const char*);
void setFrameRate(float, int);
void getCurAnmIdx(int) const;
void checkBckPass(float);
void getFrameCtrl(int);
void checkAnmFileExist(const char*, int);
void checkCurAnmFromIndex(int, int);
void checkCurAnm(const char*, int);
void perform(u32, JDrama::TGraphics*);
void matAnmFrameUpdate();
void frameUpdate();
void entry();
void update();
void setLightType(int);
void setLightData(const TBGCheckData*, const JGeometry::TVec3<f32>&);
void setLightID(short);
void loadSetDeformData(const char*);
void viewCalc();
void calc();
void calcAnm();
void updateOutSubBck();
void updateInSubBck();
void setJointCallback(int, int (*)(J3DNode*, int));
void getCurAnmName(int) const;
void offMakeDL();
void onMakeDL();
void unlockDLIfNeed();
void initDLByIndex(unsigned short);
void resetDL();
void initDL();
void setAnimation(const char*, int);
void curSubAnmEndsNext(int);
void curAnmEndsNext(int, char*);
void isCurAnmAlreadyEnd(int);
void setModel(J3DModel*, u32);
void setMActorAnmData(MActorAnmData*);

// fabricated
MActorAnmBase* getUnk28(int i) { return unk28[i]; }

public:
/* 0x00 */ MActorAnmData* unk0;
/* 0x04 */ J3DModel* unk4;
/* 0x08 */ J3DMtxCalc* unk8;
/* 0x0C */ MActorAnmBck* unkC;
/* 0x10 */ MActorAnmBck** unk10;
/* 0x14 */ MActorAnmBpk* unk14;
/* 0x18 */ MActorAnmBtp* unk18;
/* 0x1C */ MActorAnmBtk* unk1C;
/* 0x20 */ MActorAnmBrk* unk20;
/* 0x24 */ MActorAnmBlk* unk24;
/* 0x28 */ MActorAnmBase** unk28;
/* 0x2C */ u16* unk2C;
/* 0x30 */ u16* unk30;
/* 0x34 */ int unk34;
/* 0x38 */ bool unk38;
/* 0x39 */ u8 unk39;
/* 0x3C */ int unk3C;
/* 0x40 */ u8 unk40;
/* 0x44 */ u32 unk44;
MActorAnmData *mAnmData;
J3DModel *mModel;
u32 _08;
void *mBckInfo;
size_t mNumParts; //?
void *mBpkInfo;
void *mBtpInfo;
void *mBtkInfo;
void *mBrkInfo;
void *mBlkInfo;
void **mAnmArray;
u16 *mPartsList;
u16 *mDisplayList;
size_t mDisplayListLen; //?
bool mUseDisplayList;
bool mIsVisible;
u32 mLightID; // _3C
u8 _40;
u32 mLightType; // _44
};

#endif
Loading

0 comments on commit e014016

Please sign in to comment.