npcT / JUTGamePad work

This commit is contained in:
TakaRikka
2022-05-28 03:49:55 -07:00
parent 9bcbccbeb5
commit 36e62e0b80
52 changed files with 1245 additions and 1189 deletions
+10 -3
View File
@@ -19,7 +19,7 @@ public:
/* 80014E94 */ virtual bool getAnmTransform(u8);
/* 80014EA4 */ virtual void setWeight(u8, f32);
/* 80014EA8 */ virtual void getWeight(u8) const;
virtual void init(Vec const&, Mtx*) = 0;
virtual void init(Vec const& param_0, Mtx*) = 0;
virtual void calc() = 0;
static J3DMtxBuffer* getMtxBuffer() { return mMtxBuffer; }
@@ -34,8 +34,14 @@ public:
/* 8000FA8C */ virtual ~J3DMtxCalcNoAnmBase();
};
template <typename A, typename B>
class J3DMtxCalcNoAnm : public J3DMtxCalcNoAnmBase, public A, public B {};
template <class A, class B>
class J3DMtxCalcNoAnm : public J3DMtxCalcNoAnmBase, public A, public B {
public:
J3DMtxCalcNoAnm() {}
virtual ~J3DMtxCalcNoAnm() {}
virtual void init(Vec const& param_0, f32 const (&param_1)[3][4]);
virtual void calc();
};
class J3DJoint;
typedef int (*J3DJointCallBack)(J3DJoint*, int);
@@ -53,6 +59,7 @@ public:
J3DJoint* getYounger() { return mYounger; }
void setYounger(J3DJoint* pYounger) { mYounger = pYounger; }
void setCurrentMtxCalc(J3DMtxCalc* pMtxCalc) { mCurrentMtxCalc = pMtxCalc; }
J3DTransformInfo& getTransformInfo() { return mTransformInfo; }
static J3DMtxCalc* mCurrentMtxCalc;
@@ -15,10 +15,10 @@ class J3DMaterialTable {
public:
/* 8032F5A8 */ void clear();
/* 8032F5D0 */ J3DMaterialTable();
/* 8032F64C */ bool removeMatColorAnimator(J3DAnmColor*);
/* 8032F6F8 */ void removeTexNoAnimator(J3DAnmTexPattern*);
/* 8032F7B4 */ void removeTexMtxAnimator(J3DAnmTextureSRTKey*);
/* 8032F880 */ void removeTevRegAnimator(J3DAnmTevRegKey*);
/* 8032F64C */ int removeMatColorAnimator(J3DAnmColor*);
/* 8032F6F8 */ int removeTexNoAnimator(J3DAnmTexPattern*);
/* 8032F7B4 */ int removeTexMtxAnimator(J3DAnmTextureSRTKey*);
/* 8032F880 */ int removeTevRegAnimator(J3DAnmTevRegKey*);
/* 8032F9C0 */ void createTexMtxForAnimator(J3DAnmTextureSRTKey*);
/* 8032FAF4 */ void entryMatColorAnimator(J3DAnmColor*);
/* 8032FBC8 */ void entryTexNoAnimator(J3DAnmTexPattern*);
@@ -68,6 +68,7 @@ public:
Mtx33* getBumpMtxPtr(int idx) const { return mMtxBuffer->getBumpMtxPtr(idx); }
Mtx33* getNrmMtxPtr() const { return mMtxBuffer->getNrmMtxPtr(); }
void setBaseScale(const Vec& scale) { mBaseScale = scale; }
void setUserArea(u32 area) { mUserArea = area; }
// is there a better way to handle inlines with same name as non-inlines?
MtxP i_getAnmMtx(int p1) { return mMtxBuffer->getAnmMtx(p1); }
@@ -43,6 +43,10 @@ public:
bool checkFlag(u32 flag) const { return !!(mFlags & flag); }
bool checkBumpFlag() const { return mbHasBumpArray; }
bool checkBBoardFlag() const { return mbHasBillboard == 1; }
int removeTexNoAnimator(J3DAnmTexPattern* anm) { return mMaterialTable.removeTexNoAnimator(anm); }
int removeTexMtxAnimator(J3DAnmTextureSRTKey* anm) { return mMaterialTable.removeTexMtxAnimator(anm); }
int removeTevRegAnimator(J3DAnmTevRegKey* anm) { return mMaterialTable.removeTevRegAnimator(anm); }
int removeMatColorAnimator(J3DAnmColor* anm) { return mMaterialTable.removeMatColorAnimator(anm); }
private:
/* 0x04 */ void* mpRawData;
-2
View File
@@ -52,7 +52,6 @@ public:
class JSUPtrList {
public:
JSUPtrList() { this->initiate(); }
JSUPtrList(bool init);
~JSUPtrList();
@@ -80,7 +79,6 @@ template <typename T>
class JSUList : public JSUPtrList {
public:
JSUList() : JSUPtrList() {}
JSUList(bool init) : JSUPtrList(init) {}
~JSUList() {}
+69 -41
View File
@@ -29,26 +29,25 @@ enum {
extern bool struct_80451500;
extern bool struct_80451501; // sResetOccured
struct JUTGamePadRecordBase {
virtual void unk0() {}
virtual void unk1(PADStatus* pad) {}
virtual void unk2() {}
/* 0x4 */ bool mActive;
};
struct JUTGamePad : public JKRDisposer {
public:
// TODO: fix types
// static JSUList<JUTGamePad> mPadList;
static u8 mPadList[12];
static PADStatus mPadStatus[4];
static u8 mPadButton[192];
static u8 mPadMStick[64];
static u8 mPadSStick[64];
static u32 sStickMode;
static u32 sClampMode;
static u8 mPadAssign[4];
static u8 sSuppressPadReset[4];
static s32 sAnalogMode;
static u32 sRumbleSupported;
enum EStickMode {};
enum EWhichStick {};
enum EStickMode {
STICK_MODE_1 = 1,
};
enum EWhichStick {
WS_MAIN_STICK,
WS_SUB_STICK,
};
enum EPadPort {
Port_Unknown = -1, // used by JUTException
Port_Unknown = -1,
Port_1,
Port_2,
Port_3,
@@ -61,15 +60,15 @@ public:
void initList();
static s32 init();
void clear();
static void read();
static u32 read();
void assign();
void checkResetCallback(OSTime unk); // todo: weird arg
void checkResetCallback(OSTime unk);
void update();
void stopPatternedRumble() { mRumble.stopPatternedRumble(mPortNum); }
static void checkResetSwitch();
static void clearForReset();
static JUTGamePad* getGamePad(int pad_index);
static bool recalibrate(/*PADMask*/ u32 pad_mask);
static bool recalibrate(u32 pad_mask);
static void setAnalogMode(u32 mode) {
sAnalogMode = mode;
@@ -112,6 +111,12 @@ public:
u8 getAnalogR() const { return mButton.mAnalogR; }
s8 getErrorStatus() const { return mErrorStatus; }
s16 getPortNum() const { return mPortNum; }
JUTGamePadRecordBase* getPadReplay() const { return mPadReplay; }
JUTGamePadRecordBase* getPadRecord() const { return mPadRecord; }
u32 testTrigger(u32 button) const { return mButton.mTrigger & button; }
@@ -124,12 +129,14 @@ public:
return isPushingReset;
}
void stopMotorHard() { mRumble.stopMotorHard(mPortNum); }
static s8 getPortStatus(u32 port) { return mPadStatus[port].error; }
struct CButton {
CButton(); // inline
CButton() { clear(); }
void clear();
u32 update(PADStatus const*, u32 unk);
void update(PADStatus const*, u32 unk);
void setRepeat(u32 unk0, u32 unk1, u32 unk2);
/* 0x00 */ u32 mButton;
@@ -150,7 +157,8 @@ public:
}; // Size: 0x30
struct C3ButtonReset {
// TODO: fix types
C3ButtonReset() { mReset = false; }
static u32 sResetPattern;
static u32 sResetMaskPattern;
static callbackFn sCallback;
@@ -165,7 +173,7 @@ public:
static f32 sPressPoint;
static f32 sReleasePoint;
CStick(); // inline
CStick() { clear(); }
void clear();
void clear(JUTGamePad* pad);
u32 update(s8 unk0, s8 unk1, JUTGamePad::EStickMode mode, JUTGamePad::EWhichStick stick,
@@ -183,6 +191,8 @@ public:
void stopMotorWaveHard() { mRumble.stopPatternedRumble(mPortNum); }
struct CRumble {
CRumble(JUTGamePad* pad) { clear(pad); }
static PADMask sChannelMask[4];
static bool mStatus[4];
static PADMask mEnabled;
@@ -204,6 +214,11 @@ public:
void stopPatternedRumbleAtThePeriod();
static void setEnabled(u32 pad_mask);
void stopMotorHard(int portNo) { stopMotor(portNo, true); }
static bool isEnabled(u32 mask) { return mEnabled & mask; }
static bool isEnabledPort(int port) { return isEnabled(sChannelMask[port]); }
/* 0x00 */ u32 field_0x0;
/* 0x04 */ u32 field_0x4;
/* 0x08 */ u8* field_0x8;
@@ -218,32 +233,45 @@ public:
/* 0x7C */ s16 mPortNum;
/* 0x7E */ s8 mErrorStatus;
/* 0x80 */ JSULink<JUTGamePad> mLink;
/* 0x90 */ u32 mPadRecord;
/* 0x94 */ u32 mPadReplay;
/* 0x90 */ JUTGamePadRecordBase* mPadRecord;
/* 0x94 */ JUTGamePadRecordBase* mPadReplay;
/* 0x98 */ C3ButtonReset mButtonReset;
/* 0x9C */ u8 field_0x9c[4];
/* 0xA0 */ OSTime mResetTime;
/* 0xA8 */ u8 field_0xa8;
friend class CRumble;
static JSUList<JUTGamePad> mPadList;
static bool mListInitialized;
static PADStatus mPadStatus[4];
static CButton mPadButton[4];
static CStick mPadMStick[4];
static CStick mPadSStick[4];
static EStickMode sStickMode;
static u32 sClampMode;
static u8 mPadAssign[4];
static u32 sSuppressPadReset;
static s32 sAnalogMode;
static u32 sRumbleSupported;
};
struct JUTGamePadLongPress {
// TODO: fix type
// static JSUList<JUTGamePadLongPress> sPatternList;
static u8 sPatternList[12];
void checkCallback(int unk0, u32 unk2);
static JSUList<JUTGamePadLongPress> sPatternList;
void checkCallback(int port, u32 timer);
u8 unk0[17];
bool field_0x11; // bool?
u8 unk1[10];
u32 field_0x1c;
u8 unk2[28];
u8 field_0x3c;
u8 unk3[11];
bool field_0x48[4]; // bool[4]?
void (*callback)(s32, JUTGamePadLongPress*, s32);
s32 field_0x50;
u32 getMaskPattern() const { return mMaskPattern; }
u32 getPattern() const { return mPattern; }
/* 0x00 */ u8 field_0x0[0x10];
/* 0x10 */ bool mValid;
/* 0x11 */ bool field_0x11;
/* 0x14 */ u32 mPattern;
/* 0x18 */ u32 mMaskPattern;
/* 0x1C */ u32 field_0x1c;
/* 0x20 */ bool field_0x20[4];
/* 0x28 */ OSTime mTimer[4];
/* 0x48 */ bool field_0x48[4];
/* 0x4C */ void (*mCallback)(s32, JUTGamePadLongPress*, s32);
/* 0x50 */ s32 field_0x50;
};
#endif /* JUTGAMEPAD_H */
+4
View File
@@ -71,6 +71,10 @@ inline float sqrtf(float mag) {
}
}
inline float atan2f(float y, float x) {
return (f32)atan2(y, x);
}
#ifdef __cplusplus
};
#endif
+1
View File
@@ -276,6 +276,7 @@ public:
void SetWeight(u8 weight) { mWeight = weight; }
fopAc_ac_c* GetAc() { return mActor; }
void SetActor(void* ac) { mActor = (fopAc_ac_c*)ac; }
cXyz* GetCCMoveP() { return &mXyz; }
}; // Size = 0x1C
STATIC_ASSERT(0x1C == sizeof(cCcD_Stts));
+1 -1
View File
@@ -7,7 +7,7 @@
// Cylinder
struct cM3dGCylS {
/* 0x00 */ cXyz mCenter;
/* 0x00 */ Vec mCenter;
/* 0x0C */ f32 mRadius;
/* 0x10 */ f32 mHeight;
}; // Size = 0x14
+6
View File
@@ -118,6 +118,10 @@ struct Z2EnvSeMgr {
/* 0x188 */ u8 field_0x188;
/* 0x18C */ Z2Calc::FNoise1f field_0x18c;
/* 0x19C */ Z2Calc::FNoise1f field_0x19c;
/* 0x1AC */ f32 field_0x1ac;
/* 0x1B0 */ f32 field_0x1b0;
/* 0x1B4 */ f32 field_0x1b4;
/* 0x1B8 */ u8 field_0x1b8;
/* 0x1BC */ Z2MultiSeMgr field_0x1bc;
/* 0x1D8 */ Z2EnvSeBase field_0x1d8;
/* 0x1E0 */ u8 field_0x1e0;
@@ -156,4 +160,6 @@ struct Z2EnvSeMgr {
/* 0x308 */ f32 field_0x308;
}; // Size: 0x30C
STATIC_ASSERT(sizeof(Z2EnvSeMgr) == 0x30C);
#endif /* Z2ENVSEMGR_H */
+46 -26
View File
@@ -7,21 +7,30 @@
class daNpcT_MotionSeqMngr_c {
public:
struct sequenceStepData_c {};
class sequenceStepData_c {
public:
s16 field_0x0;
s8 field_0x2;
s8 field_0x3;
}; // Size: 0x4?
/* 80145898 */ void initialize();
/* 801458C0 */ void play(u16, int*, f32*);
/* 80145A24 */ void checkEndSequence();
/* 801458C0 */ int play(u16, int*, f32*);
/* 80145A24 */ s32 checkEndSequence();
bool checkEntryNewMotion() {
return mStepNo == 0 && field_0x14 == -1;
}
private:
/* 0x00 */ sequenceStepData_c* field_0x0;
/* 0x00 */ sequenceStepData_c* mpSeqData;
/* 0x04 */ int field_0x4;
/* 0x08 */ int mNo;
/* 0x0C */ int mOffset;
/* 0x10 */ int mStepNo;
/* 0x14 */ int field_0x14;
/* 0x18 */ f32 field_0x18;
/* 0x1C */ u8 field_0x1c;
/* 0x1C */ bool mEndSequence;
public:
/* 8014D0C0 */ virtual ~daNpcT_MotionSeqMngr_c();
@@ -35,14 +44,14 @@ public:
/* 801456D4 */ void initialize();
/* 801456E0 */ void entry(fopAc_ac_c*);
/* 801456FC */ void remove();
/* 80145708 */ void getActorP();
/* 80145708 */ fopAc_ac_c* getActorP();
/* 8014D108 */ virtual ~daNpcT_ActorMngr_c();
};
class daNpcT_JntAnm_c {
private:
/* 0x000 */ daNpcT_ActorMngr_c field_0x0;
/* 0x000 */ daNpcT_ActorMngr_c mActrMngr;
/* 0x008 */ cXyz field_0x8;
/* 0x014 */ cXyz field_0x14;
/* 0x020 */ cXyz* field_0x20;
@@ -77,6 +86,8 @@ public:
/* 80147C38 */ void calcJntRad(f32, f32, f32);
/* 8014D150 */ virtual ~daNpcT_JntAnm_c();
void clrDirectFlag() { mDirectFlag = 0; }
};
class daNpcT_DmgStagger_c {
@@ -98,7 +109,9 @@ struct daNpcT_faceMotionAnmData_c {};
struct daNpcT_pntData_c {};
struct daNpcT_motionAnmData_c {};
struct daNpcT_motionAnmData_c {
u8 data[8];
};
class mDoExt_McaMorfSO;
@@ -197,28 +210,31 @@ public:
/* 0xE32 */ u8 field_0xe32;
/* 0xE33 */ u8 field_0xe33;
/* 0xE34 */ u8 field_0xe34;
/* 0xE35 */ u8 field_0xe35[7];
/* 0xE35 */ u8 field_0xe35;
/* 0xE36 */ u8 field_0xe36;
/* 0xE37 */ u8 field_0xe37;
/* 0xE38 */ u8 field_0xe38;
/* 0xE3C vtable */
public:
/* 80147FA4 */ void tgHitCallBack(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*);
/* 80147FD4 */ void srchActor(void*, void*);
/* 80148058 */ void getTrnsfrmAnmP(char const*, int);
/* 80148094 */ void getTrnsfrmKeyAnmP(char const*, int);
/* 801480D0 */ void getTexPtrnAnmP(char const*, int);
/* 8014810C */ void getTexSRTKeyAnmP(char const*, int);
/* 80148148 */ void getTevRegKeyAnmP(char const*, int);
/* 80148184 */ void getColorAnmP(char const*, int);
/* 80147FD4 */ static int srchActor(void*, void*);
/* 80148058 */ J3DAnmTransform* getTrnsfrmAnmP(char const*, int);
/* 80148094 */ J3DAnmTransformKey* getTrnsfrmKeyAnmP(char const*, int);
/* 801480D0 */ J3DAnmTexPattern* getTexPtrnAnmP(char const*, int);
/* 8014810C */ J3DAnmTextureSRTKey* getTexSRTKeyAnmP(char const*, int);
/* 80148148 */ J3DAnmTevRegKey* getTevRegKeyAnmP(char const*, int);
/* 80148184 */ J3DAnmColor* getColorAnmP(char const*, int);
/* 801481C0 */ void setBckAnm(J3DAnmTransform*, f32, int, int, int, bool);
/* 80148204 */ void setMcaMorfAnm(J3DAnmTransformKey*, f32, f32, int, int, int);
/* 80148204 */ int setMcaMorfAnm(J3DAnmTransformKey*, f32, f32, int, int, int);
/* 801482F8 */ void setBtpAnm(J3DAnmTexPattern*, J3DModelData*, f32, int);
/* 80148338 */ void setBtkAnm(J3DAnmTextureSRTKey*, J3DModelData*, f32, int);
/* 80148378 */ void setBrkAnm(J3DAnmTevRegKey*, J3DModelData*, f32, int);
/* 801483B8 */ void setBpkAnm(J3DAnmColor*, J3DModelData*, f32, int);
/* 801483F8 */ void loadRes(s8 const*, char const**);
/* 801483F8 */ int loadRes(s8 const*, char const**);
/* 801484AC */ void deleteRes(s8 const*, char const**);
/* 8014852C */ void execute();
/* 8014886C */ void draw(int, int, f32, _GXColorS10*, f32, int, int, int);
/* 8014852C */ int execute();
/* 8014886C */ int draw(int, int, f32, _GXColorS10*, f32, int, int, int);
/* 80148C70 */ void setEnvTevColor();
/* 80148CCC */ void setRoomNo();
/* 80148D10 */ void checkEndAnm(f32);
@@ -233,7 +249,7 @@ public:
/* 8014A908 */ void setPos(cXyz);
/* 8014AA18 */ void setAngle(s16);
/* 8014A99C */ void setAngle(csXyz);
/* 8014AA40 */ void hitChk(dCcD_GObjInf*, u32);
/* 8014AA40 */ fopAc_ac_c* hitChk(dCcD_GObjInf*, u32);
/* 8014AAD0 */ void setDamage(int, int, int);
/* 8014ABD0 */ void chkActorInSight(fopAc_ac_c*, f32, s16);
/* 8014ACF0 */ void chkPointInArea(cXyz, cXyz, f32, f32, f32, s16);
@@ -275,7 +291,7 @@ public:
/* 8014CC70 */ virtual bool evtEndProc();
/* 8014CC68 */ virtual bool evtCutProc();
/* 8014CC64 */ virtual void setAfterTalkMotion();
/* 8014997C */ virtual void evtProc();
/* 8014997C */ virtual int evtProc();
/* 8014CC20 */ virtual void action();
/* 8014CC1C */ virtual void beforeMove();
/* 8014CC18 */ virtual void afterMoved();
@@ -289,7 +305,7 @@ public:
/* 8014A0B0 */ virtual void evtOrder();
/* 8014CBF4 */ virtual void decTmr();
/* 8014A324 */ virtual void clrParam();
/* 8014CC30 */ virtual bool drawDbgInfo();
/* 8014CC30 */ virtual int drawDbgInfo();
/* 8014CC28 */ virtual void drawOtherMdl();
/* 8014CC2C */ virtual void drawGhost();
/* 8014CCA0 */ virtual bool afterSetFaceMotionAnm(int, int, f32, int);
@@ -302,12 +318,16 @@ public:
/* 8014CCE8 */ virtual void changeBtk(int*, int*);
/* 8014A628 */ virtual void setMotionAnm(int, f32, int);
bool checkHide() {
return !field_0xe25 && (!dComIfGs_wolfeye_effect_check() && field_0xa89);
}
static u8 const mCcDObjData[48];
static u8 mCcDCyl[68];
static u8 mCcDSph[64];
static u8 mFindActorPtrs[200];
static u8 mSrchName[2 + 2 /* padding */];
static u8 mFindCount[4];
static fopAc_ac_c* mFindActorPtrs[50];
static s16 mSrchName;
static s32 mFindCount;
};
STATIC_ASSERT(sizeof(daNpcT_c) == 0xE40);
+3
View File
@@ -58,6 +58,8 @@ public:
/* 8008523C */ virtual ~dCcD_GStts() {}
void ClrTg() { mTg = 0; }
void SetAtApid(unsigned int id) { mAtApid = id; }
u8 GetRoomId() { return mRoomId; }
void SetRoomId(int id) { mRoomId = id; }
// private:
/* 0x04 */ u8 mAt;
@@ -213,6 +215,7 @@ public:
u8 GetAtSe() { return mGObjAt.GetSe(); }
s32 GetAtSpl() { return mGObjAt.GetSpl(); }
u8 GetAtMtrl() { return mGObjAt.GetMtrl(); }
fopAc_ac_c* GetTgHitAc() { return mGObjTg.GetAc(); }
static u32 const m_hitSeID[24];
+2
View File
@@ -650,6 +650,7 @@ void* dComIfG_getOldStageRes(char const* resName);
void dComIfG_get_timelayer(int* layer);
int dComIfG_resDelete(request_of_phase_process_class* i_phase, char const* resName);
int dComIfG_changeOpeningScene(scene_class* scene, s16 procName);
int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* arc_name);
inline void dComIfG_setBrightness(u8 brightness) {
g_dComIfG_gameInfo.mFadeBrightness = brightness;
@@ -755,6 +756,7 @@ void dComIfGs_offZoneSwitch(int param_0, int param_1);
void dComIfGs_offOneZoneSwitch(int param_0, int param_1);
s8 dComIfGp_getReverb(int roomNo);
void dComIfGs_gameStart();
int dComIfGs_wolfeye_effect_check();
inline void dComIfGs_onDungeonItemMap() {
g_dComIfG_gameInfo.info.getMemory().getBit().onDungeonItemMap();
-13
View File
@@ -14,19 +14,6 @@
#include "dolphin/mtx/mtxvec.h"
#include "dolphin/types.h"
struct mDoExt_3DlineMat_c {};
class mDoExt_3DlineMatSortPacket : public J3DPacket {
public:
mDoExt_3DlineMatSortPacket();
virtual void draw();
virtual ~mDoExt_3DlineMatSortPacket();
private:
/* 0x10 */ mDoExt_3DlineMat_c* mp3DlineMat;
};
class cM_rnd_c {
public:
/* 80053CDC */ void init(int, int, int);
+4 -1
View File
@@ -11,6 +11,8 @@
#include "dolphin/types.h"
#include "m_Do/m_Do_ext.h"
class cBgS_PolyInfo;
void dKankyo_DayProc();
void dKy_set_nexttime(f32);
void dKy_itudemo_se();
@@ -20,6 +22,7 @@ void dKy_FiveSenses_fullthrottle_dark();
s32 dKy_daynight_check();
void dKy_clear_game_init();
void dKy_setLight_init();
u8 dKy_pol_sound_get(cBgS_PolyInfo const* param_0);
struct LIGHT_INFLUENCE {
/* 800CFC7C */ ~LIGHT_INFLUENCE();
@@ -141,7 +144,7 @@ public:
/* 0x358 */ u16 field_0x358;
/* 0x35A */ u16 field_0x35a;
/* 0x35C */ u16 field_0x35c;
/* 0x35E */ u8 field_0x35e[2];
/* 0x35E */ u16 field_0x35e;
/* 0x360 */ u8 field_0x360;
/* 0x361 */ u8 field_0x361;
/* 0x362 */ u8 field_0x362;
+4
View File
@@ -158,6 +158,10 @@ inline BOOL fopAcM_IsActor(void* actor) {
return fopAc_IsActor(actor);
}
inline void fopAcM_SetRoomNo(fopAc_ac_c* actor, s8 roomNo) {
actor->mCurrent.mRoomNo = roomNo;
}
void* fopAcM_FastCreate(s16 pProcTypeID, FastCreateReqFunc param_2, void* param_3, void* pData);
void fopAcM_setStageLayer(void*);
int fopAcM_setRoomLayer(void*, int);
+185 -21
View File
@@ -6,6 +6,7 @@
#include "JSystem/JKernel/JKRAssertHeap.h"
#include "JSystem/JKernel/JKRExpHeap.h"
#include "JSystem/JKernel/JKRSolidHeap.h"
#include "m_Do/m_Do_audio.h"
#include "global.h"
class mDoExt_baseAnm {
@@ -32,7 +33,7 @@ private:
class mDoExt_btkAnm : public mDoExt_baseAnm {
public:
mDoExt_btkAnm(void) { mBtkAnm = 0; }
mDoExt_btkAnm() { mpAnm = 0; }
/* 8000D63C */ int init(J3DMaterialTable*, J3DAnmTextureSRTKey*, int, int, f32, s16, s16);
/* 8000D6D8 */ void entry(J3DMaterialTable*, f32);
@@ -43,15 +44,17 @@ public:
return init(&data->getMaterialTable(), key, param_2, param_3, param_4, param_5, param_6);
}
int remove(J3DModelData* data) { return data->removeTexMtxAnimator(mpAnm); }
private:
/* 0x14 */ u32 mBtkAnm;
/* 0x14 */ J3DAnmTextureSRTKey* mpAnm;
}; // Size: 0x18
STATIC_ASSERT(sizeof(mDoExt_btkAnm) == 0x18);
class mDoExt_brkAnm : public mDoExt_baseAnm {
public:
mDoExt_brkAnm(void) { mBrkAnm = 0; }
mDoExt_brkAnm() { mpAnm = 0; }
/* 8000D70C */ int init(J3DMaterialTable*, J3DAnmTevRegKey*, int, int, f32, s16, s16);
/* 8000D7A8 */ void entry(J3DMaterialTable*, f32);
@@ -63,15 +66,17 @@ public:
return init(&data->getMaterialTable(), anmKey, param_2, param_3, param_4, param_5, param_6);
}
int remove(J3DModelData* data) { return data->removeTevRegAnimator(mpAnm); }
private:
/* 0x14 */ u32 mBrkAnm;
/* 0x14 */ J3DAnmTevRegKey* mpAnm;
}; // Size: 0x18
STATIC_ASSERT(sizeof(mDoExt_brkAnm) == 0x18);
class mDoExt_bpkAnm : public mDoExt_baseAnm {
public:
mDoExt_bpkAnm(void) { mBpkAnm = 0; }
mDoExt_bpkAnm() { mpAnm = 0; }
/* 8000D47C */ int init(J3DMaterialTable*, J3DAnmColor*, int, int, f32, s16, s16);
/* 8000D518 */ void entry(J3DMaterialTable*, f32);
@@ -84,25 +89,29 @@ public:
param_6);
}
int remove(J3DModelData* data) { return data->removeMatColorAnimator(mpAnm); }
private:
/* 0x14 */ u32 mBpkAnm;
/* 0x14 */ J3DAnmColor* mpAnm;
}; // Size: 0x18
STATIC_ASSERT(sizeof(mDoExt_bpkAnm) == 0x18);
class mDoExt_bckAnm : public mDoExt_baseAnm {
public:
mDoExt_bckAnm(void) { mAnm = 0; }
/* 8000D7DC */ int init(J3DAnmTransform*, int, int, f32, s16, s16, bool);
mDoExt_bckAnm() { mpMtxCalc = NULL; }
/* 8000D7DC */ int init(J3DAnmTransform* i_bck, int i_play, int i_attr, f32 i_rate,
s16 i_startF, s16 i_endF, bool i_modify);
/* 8000D990 */ void changeBckOnly(J3DAnmTransform*);
/* 8000D9CC */ void entry(J3DModelData*, f32);
/* 8000D9E8 */ void entryJoint(J3DModelData*, u16, f32);
void entry(J3DModelData* data) { entry(data, getFrame()); }
J3DAnmTransform* getBckAnm() { return mpAnm; }
private:
/* 0x14 */ u32 mBckAnm;
/* 0x18 */ u32 mAnm;
/* 0x14 */ J3DAnmTransform* mpAnm;
/* 0x18 */ J3DMtxCalc* mpMtxCalc;
}; // Size: 0x1C
STATIC_ASSERT(sizeof(mDoExt_bckAnm) == 0x1C);
@@ -122,17 +131,22 @@ public:
param_6);
}
int remove(J3DModelData* data) { return data->removeTexNoAnimator(mpAnm); }
private:
/* 0x14 */ J3DAnmTexPattern* mpAnm;
};
class J3DTransformInfo;
class mDoExt_McaMorfCallBack1_c {
class mDoExt_blkAnm : public mDoExt_baseAnm {
public:
virtual void execute(u16, J3DTransformInfo*) = 0;
/* 8000DA08 */ void init(J3DDeformData*, J3DAnmCluster*, int, int, f32, s16, s16);
private:
/* 0x14 */ J3DAnmCluster* mpAnm;
};
class J3DTransformInfo;
class mDoExt_AnmRatioPack {
public:
/* 80140DF0 */ ~mDoExt_AnmRatioPack();
@@ -169,8 +183,18 @@ public:
/* 0x4 */ mDoExt_invJntPacket* field_0x4;
};
class mDoExt_morf_c
: public J3DMtxCalcNoAnm<J3DMtxCalcCalcTransformMaya, J3DMtxCalcJ3DSysInitMaya> {
class mDoExt_zelAnime : public Z2SoundObjAnime {};
class mDoExt_McaMorfCallBack1_c {
public:
virtual void execute(u16, J3DTransformInfo*) = 0;
};
class mDoExt_McaMorfCallBack2_c {};
class mDoExt_morf_c {
// : public J3DMtxCalcNoAnm<J3DMtxCalcCalcTransformMaya, J3DMtxCalcJ3DSysInitMaya>
// inheritance causing issues, fix later
public:
/* 8000F950 */ mDoExt_morf_c();
/* 8000FB7C */ void setMorf(f32);
@@ -178,12 +202,103 @@ public:
/* 8000FAE8 */ virtual ~mDoExt_morf_c();
private:
/* 0x04 */ u32 field_0x4;
/* 0x08 */ u32 mAnm;
/* 0x04 */ J3DModel* mpModel;
/* 0x08 */ J3DAnmTransform* mpAnm;
/* 0x0C */ J3DFrameCtrl mFrameCtrl;
/* 0x20 */ u32 field_0x20;
/* 0x24 */ u32 field_0x24;
/* 0x20 */ J3DTransformInfo** mpTransformInfo;
/* 0x24 */ Quaternion* mpQuat;
/* 0x28 */ f32 mCurMorf;
/* 0x2C */ f32 mPrevMorf;
/* 0x30 */ f32 mMorfStep;
/* 0x34 */ f32 field_0x34;
};
class mDoExt_McaMorfSO : public mDoExt_morf_c {
public:
/* 800107D0 */ mDoExt_McaMorfSO(J3DModelData*, mDoExt_McaMorfCallBack1_c*,
mDoExt_McaMorfCallBack2_c*, J3DAnmTransform*, int, f32, int,
int, Z2Creature*, u32, u32);
/* 800108F0 */ void create(J3DModelData*, mDoExt_McaMorfCallBack1_c*,
mDoExt_McaMorfCallBack2_c*, J3DAnmTransform*, int, f32, int, int,
Z2Creature*, u32, u32);
/* 80010E70 */ void setAnm(J3DAnmTransform*, int, f32, f32, f32, f32);
/* 800110B0 */ void play(u32, s8);
/* 80011154 */ void updateDL();
/* 800111C0 */ void entryDL();
/* 800111EC */ void modelCalc();
/* 80011250 */ void getTransform(u16, J3DTransformInfo*);
/* 80011310 */ void stopZelAnime();
/* 80010888 */ virtual ~mDoExt_McaMorfSO();
/* 80010B68 */ virtual void calc();
J3DModel* getModel() { return mpModel; }
void offMorfNone() { mMorfNone = false; }
void onMorfNone() { mMorfNone = true; }
private:
/* 0x38 */ mDoExt_McaMorfCallBack1_c* mpCallback1;
/* 0x3C */ mDoExt_McaMorfCallBack2_c* mpCallback2;
/* 0x40 */ cXyz mTranslateScale;
/* 0x4C */ Z2Creature* mpSound;
/* 0x50 */ void* mpBas;
/* 0x54 */ bool mTranslate;
/* 0x55 */ bool mMorfNone;
};
class mDoExt_McaMorf : public mDoExt_morf_c {
public:
/* 8000FC4C */ mDoExt_McaMorf(J3DModelData*, mDoExt_McaMorfCallBack1_c*,
mDoExt_McaMorfCallBack2_c*, J3DAnmTransform*, int, f32, int, int,
int, void*, u32, u32);
/* 8000FD94 */ void create(J3DModelData*, mDoExt_McaMorfCallBack1_c*,
mDoExt_McaMorfCallBack2_c*, J3DAnmTransform*, int, f32, int, int,
int, void*, u32, u32);
/* 8001037C */ void setAnm(J3DAnmTransform*, int, f32, f32, f32, f32, void*);
/* 800105C8 */ void play(Vec*, u32, s8);
/* 80010680 */ void entryDL();
/* 800106AC */ void modelCalc();
/* 80010710 */ void getTransform(u16, J3DTransformInfo*);
/* 8000FD10 */ virtual ~mDoExt_McaMorf();
/* 80010074 */ virtual void calc();
private:
/* 0x38 */ mDoExt_McaMorfCallBack1_c* mpCallback1;
/* 0x3C */ mDoExt_McaMorfCallBack2_c* mpCallback2;
/* 0x40 */ cXyz mTranslateScale;
/* 0x4C */ mDoExt_zelAnime* mpSound;
/* 0x50 */ bool field_0x50;
/* 0x51 */ bool field_0x51;
/* 0x52 */ bool field_0x52;
};
class mDoExt_McaMorf2 : public mDoExt_morf_c {
public:
/* 80011348 */ mDoExt_McaMorf2(J3DModelData*, mDoExt_McaMorfCallBack1_c*,
mDoExt_McaMorfCallBack2_c*, J3DAnmTransform*, J3DAnmTransform*,
int, f32, int, int, Z2Creature*, u32, u32);
/* 80011464 */ void create(J3DModelData*, mDoExt_McaMorfCallBack1_c*,
mDoExt_McaMorfCallBack2_c*, J3DAnmTransform*, J3DAnmTransform*, int,
f32, int, int, Z2Creature*, u32, u32);
/* 800116B4 */ void ERROR_EXIT();
/* 80011D70 */ void setAnm(J3DAnmTransform*, J3DAnmTransform*, f32, int, f32, f32, f32, f32);
/* 80011FCC */ void setAnmRate(f32);
/* 800120A0 */ void play(u32, s8);
/* 80012144 */ void entryDL();
/* 80012170 */ void modelCalc();
/* 800121E8 */ void stopZelAnime();
/* 800113FC */ virtual ~mDoExt_McaMorf2();
/* 800116F4 */ virtual void calc();
private:
/* 0x38 */ mDoExt_McaMorfCallBack1_c* mpCallback1;
/* 0x3C */ mDoExt_McaMorfCallBack2_c* mpCallback2;
/* 0x40 */ J3DAnmTransform* field_0x40;
/* 0x44 */ f32 field_0x44;
/* 0x48 */ Z2Creature* mpSound;
/* 0x4C */ void* mpBas;
};
class mDoExt_MtxCalcOldFrame {
@@ -204,6 +319,55 @@ private:
/* 0x20 */ Quaternion* mOldFrameQuaternion;
}; // Size: 0x24
struct mDoExt_MtxCalcAnmBlendTblOld {
/* 8000F4B0 */ void calc();
/* 80014EB0 */ ~mDoExt_MtxCalcAnmBlendTblOld();
};
struct mDoExt_MtxCalcAnmBlendTbl {
/* 8000F26C */ void calc();
/* 800D00BC */ void getAnm(int);
/* 80014F3C */ ~mDoExt_MtxCalcAnmBlendTbl();
};
struct mDoExt_3Dline_c {
/* 800123D0 */ void init(u16, int, int);
/* 800126BC */ mDoExt_3Dline_c();
};
struct mDoExt_3DlineMat_c {};
class mDoExt_3DlineMatSortPacket : public J3DPacket {
public:
mDoExt_3DlineMatSortPacket();
/* 80014738 */ void setMat(mDoExt_3DlineMat_c*);
virtual void draw();
virtual ~mDoExt_3DlineMatSortPacket();
private:
/* 0x10 */ mDoExt_3DlineMat_c* mp3DlineMat;
};
class dKy_tevstr_c;
struct mDoExt_3DlineMat1_c {
/* 80013360 */ void init(u16, u16, ResTIMG*, int);
/* 800134F8 */ void setMaterial();
/* 800135D0 */ void draw();
/* 80013FB0 */ void update(int, _GXColor&, dKy_tevstr_c*);
/* 8001373C */ void update(int, f32, _GXColor&, u16, dKy_tevstr_c*);
/* 80014E7C */ bool getMaterialID();
};
struct mDoExt_3DlineMat0_c {
/* 800125E0 */ void init(u16, u16, int);
/* 800126C0 */ void setMaterial();
/* 80012774 */ void draw();
/* 80012874 */ void update(int, f32, _GXColor&, u16, dKy_tevstr_c*);
/* 80012E3C */ void update(int, _GXColor&, dKy_tevstr_c*);
/* 80014E84 */ bool getMaterialID();
};
JKRSolidHeap* mDoExt_createSolidHeapFromGame(u32, u32);
void mDoExt_destroySolidHeap(JKRSolidHeap*);
u32 mDoExt_adjustSolidHeap(JKRSolidHeap*);
@@ -3,4 +3,66 @@
#include "dolphin/types.h"
struct cXyz;
struct fopAc_ac_c;
struct J3DJoint;
struct J3DModel;
struct daNPC_TK_c {
/* 80B01498 */ void setBck(int, u8, f32, f32);
/* 80B0153C */ void checkBck(int);
/* 80B01598 */ void draw();
/* 80B016D4 */ void checkBeforeBg();
/* 80B01878 */ void setActionMode(int);
/* 80B018F4 */ void setAddCalcSpeedXZ(cXyz&, cXyz const&, f32, f32, f32);
/* 80B01C84 */ void chaseTargetPos(cXyz, f32, f32, s16);
/* 80B01D84 */ void getMasterPointer();
/* 80B01DA0 */ void setMasterShoulder(cXyz*);
/* 80B01E48 */ void setAwayAction(int);
/* 80B01EF4 */ void setFlySE();
/* 80B02254 */ void executeFly();
/* 80B026F8 */ void initPerchDemo(int);
/* 80B02B5C */ void executePerchDemo(int);
/* 80B03658 */ void executePerch();
/* 80B03754 */ void executeHandOn();
/* 80B039A8 */ void checkWaterSurface(f32);
/* 80B03A70 */ void executeAttack();
/* 80B048BC */ void executeAway();
/* 80B04BF8 */ void setCarryActorMtx();
/* 80B04F64 */ void getTakePosY();
/* 80B04FA8 */ void getTakeOffPosY();
/* 80B04FEC */ void executeBack();
/* 80B05BD0 */ void getHanjoHandPos();
/* 80B05C7C */ void executeStayHanjo();
/* 80B05EC8 */ void executeAttackLink();
/* 80B0686C */ void executeBackHanjo();
/* 80B07114 */ void checkAttackDemo();
/* 80B072CC */ void executeAttackDemo();
/* 80B07610 */ void executeBackHanjoDemo();
/* 80B08168 */ void executeWolfEvent();
/* 80B08208 */ void calcWolfDemoCam();
/* 80B082A4 */ void calcWolfDemoCam2();
/* 80B0839C */ void executeWolfPerch();
/* 80B09A3C */ void executeResistanceDemo();
/* 80B0A444 */ void setHawkSideCamera(cXyz);
/* 80B0A500 */ void setHawkCamera(fopAc_ac_c*);
/* 80B0A568 */ void endHawkCamera();
/* 80B0A614 */ void calcDemoCamera();
/* 80B0B004 */ void checkActionSet();
/* 80B0B284 */ void action();
/* 80B0B5CC */ void mtx_set();
/* 80B0B6DC */ void cc_set();
/* 80B0B7CC */ void execute();
/* 80B0B918 */ void _delete();
/* 80B0B9AC */ void ctrlJoint(J3DJoint*, J3DModel*);
/* 80B0BB7C */ void JointCallBack(J3DJoint*, int);
/* 80B0BBC8 */ void CreateHeap();
/* 80B0BD24 */ void create();
void setBump() { mBump |= 4; }
u8 field_0x0[0x6BE];
u16 mBump;
};
#endif /* D_A_NPC_TK_H */