Kytag09 and Kytag11 OK, work on d_a_bg_obj and d_kankyo (#1877)

* work on kankyo / d_a_bg_obj

* d_a_bg_obj work / kytag09 and kytag11 OK

* remove asm
This commit is contained in:
TakaRikka
2023-08-12 17:09:47 -07:00
committed by GitHub
parent c8bb857b13
commit 08fa2f03fc
75 changed files with 1831 additions and 4386 deletions
+4
View File
@@ -100,6 +100,10 @@ public:
STATIC_ASSERT(0x20 == sizeof(cCcD_ShapeAttr));
struct cCcD_SrcTriAttr {
cM3dGTriS mTri;
};
class cCcD_TriAttr : public cCcD_ShapeAttr, public cM3dGTri {
public:
/* 80263C04 */ virtual void CalcAabBox();
+6
View File
@@ -8,6 +8,12 @@
class cM3dGCyl;
struct cM3dGTriS {
Vec a;
Vec b;
Vec c;
};
class cM3dGTri : public cM3dGPla {
// private:
public:
+8 -1
View File
@@ -32,10 +32,17 @@ struct pkcdata {
/* 0x24 */ u32 field_0x24;
};
struct KCol_Header {
/* 0x0 */ u32 pos_data_offset;
/* 0x4 */ u32 nrm_data_offset;
/* 0x8 */ u32 prism_data_offset;
/* 0xC */ u32 block_data_offset;
};
class dBgWKCol : public dBgW_Base {
public:
/* 8007E6F4 */ dBgWKCol();
/* 8007E7D0 */ void initKCollision(void*);
/* 8007E7D0 */ static void initKCollision(void*);
/* 8007E804 */ void create(void* pprism, void* plc);
/* 8007E850 */ void getTriNrm(KC_PrismData*, Vec**) const;
/* 8007E8C0 */ cM3dGPla GetTriPla(int) const;
+2 -1
View File
@@ -85,7 +85,8 @@ struct dCcD_SrcSph {
struct dCcD_SrcTri {
/* 0x00 */ dCcD_SrcGObjInf mObjInf;
}; // Size: 0x30
/* 0x30 */ cCcD_SrcTriAttr mTriAttr;
}; // Size: 0x54
struct dCcD_SrcCyl {
/* 0x00 */ dCcD_SrcGObjInf mObjInf;
+1 -1
View File
@@ -279,7 +279,7 @@ public:
static dDemo_actor_c* getActor(u8 param_0) { return m_object->getActor(param_0); }
static u32 getFrameNoMsg() { return m_frameNoMsg; }
static s32 getMode() { return m_mode; }
static int getFrame() { return m_frame; }
static u32 getFrame() { return m_frame; }
static JStudio::stb::TControl* getControl() { return m_control; }
static bool isStatus(u32 status) { return m_status & status; }
static void onStatus(u32 status) { m_status |= status; }
+1
View File
@@ -49,6 +49,7 @@ public:
static u32 getHoldX(u32 pad) { return getHold(pad) & CButton::X; }
static f32 getStickX(u32 pad) { return getCpadInfo(pad).mMainStickPosX; }
static f32 getStickY(u32 pad) { return getCpadInfo(pad).mMainStickPosY; }
static f32 getStickX3D(u32 pad) { return getCpadInfo(pad).mMainStickPosX; }
static f32 getStickValue(u32 pad) { return getCpadInfo(pad).mMainStickValue; }
static s16 getStickAngle(u32 pad) { return getCpadInfo(pad).mMainStickAngle; }
static s16 getStickAngle3D(u32 pad) { return getCpadInfo(pad).mMainStickAngle; }
+3 -2
View File
@@ -76,7 +76,7 @@ public:
int remove(J3DModelData* i_modelData) { return i_modelData->removeTexMtxAnimator(mpAnm); }
void entryFrame() { entryFrame(getFrame()); }
void entryFrame(f32 frame) { setFrame(frame); }
void entryFrame(f32 frame) { mpAnm->setFrame(frame); }
J3DAnmTextureSRTKey* getBtkAnm() const { return mpAnm; }
@@ -106,7 +106,7 @@ public:
int remove(J3DModelData* i_modelData) { return i_modelData->removeTevRegAnimator(mpAnm); }
void entryFrame() { entryFrame(getFrame()); }
void entryFrame(f32 frame) { setFrame(frame); }
void entryFrame(f32 frame) { mpAnm->setFrame(frame); }
J3DAnmTevRegKey* getBrkAnm() const { return mpAnm; }
@@ -580,6 +580,7 @@ int mDoExt_resIDToIndex(JKRArchive* p_archive, u16 id);
void mDoExt_modelEntryDL(J3DModel* i_model);
void mDoExt_setupStageTexture(J3DModelData* i_modelData);
OSThread* mDoExt_GetCurrentRunningThread();
void mDoExt_setupShareTexture(J3DModelData* i_modelData, J3DModelData* i_shareModelData);
struct JUTFont;
JUTFont* mDoExt_getMesgFont();
+125 -1
View File
@@ -1,6 +1,130 @@
#ifndef D_A_BG_OBJ_H
#define D_A_BG_OBJ_H
#include "dolphin/types.h"
#include "d/bg/d_bg_s_movebg_actor.h"
#include "d/bg/d_bg_w.h"
#include "d/cc/d_cc_d.h"
#include "f_op/f_op_actor_mng.h"
class daBgObj_c;
typedef int (daBgObj_c::*createHeapFunc)();
typedef int (daBgObj_c::*createInitFunc)();
typedef int (daBgObj_c::*executeFunc)();
typedef void (daBgObj_c::*tgSetFunc)();
typedef int (daBgObj_c::*actionFunc)();
class daBgObj_c : public dBgS_MoveBgActor {
public:
class spec_data_c {
public:
/* 804597E8 */ u8* initParticleBlock(u8*);
/* 80459814 */ u8* initSoundBlock(u8*);
/* 80459840 */ u8* initTexShareBlock(u8*);
/* 804598F4 */ u8* initFarInfoBlock(u8*);
/* 80459904 */ bool Set(void*);
/* 0x00 */ u16 mSpecType;
/* 0x02 */ u8 field_0x02;
/* 0x03 */ u8 field_0x03;
/* 0x04 */ u32 mParticleNum;
/* 0x08 */ u8* mpParticleBlock;
/* 0x0C */ u32 mSoundNum;
/* 0x10 */ u8* mpSoundBlock;
/* 0x14 */ u8 field_0x14;
/* 0x15 */ u8 field_0x15;
/* 0x16 */ u8 field_0x16;
/* 0x18 */ u8* mpTexShareBlock;
/* 0x1C */ u8 mTexShareNum;
/* 0x20 */ f32 mpFarInfoBlock;
};
/* 80459B64 */ void release(dBgW*);
/* 80459BB4 */ void regist(dBgW*);
/* 80459BEC */ void initAtt();
/* 80459D0C */ void setAttentionInfo(fopAc_ac_c*);
/* 80459D3C */ void initBaseMtx();
/* 80459D94 */ void setBaseMtx();
/* 80459E04 */ void settingCullSizeBoxForCo(int);
/* 80459F14 */ void settingCullSizeBoxForCull(int);
/* 8045A0EC */ int CreateInitType0();
/* 8045A160 */ int CreateInitType1();
/* 8045A2F0 */ int CreateHeapType0();
/* 8045A574 */ int CreateHeapType1();
/* 8045A83C */ void doShareTexture();
/* 8045A9E8 */ int create1st();
/* 8045AAF0 */ void setColCommon();
/* 8045AB80 */ void set_tri_0();
/* 8045ACC0 */ void set_tri_1();
/* 8045AE00 */ void set_cyl_0();
/* 8045AE98 */ void set_tri_2();
/* 8045AFD4 */ void set_tri_3();
/* 8045B17C */ void setParticle();
/* 8045B3A0 */ void setSe();
/* 8045B44C */ BOOL checkDestroy();
/* 8045B534 */ BOOL checkHitAt(cCcD_Obj*);
/* 8045B5E0 */ void orderWait_tri();
/* 8045B7FC */ void orderWait_cyl();
/* 8045B9C4 */ void orderWait_spec();
/* 8045BB38 */ int actionOrderWait();
/* 8045BBE0 */ int actionOrder();
/* 8045BD50 */ int actionEvent();
/* 8045BDB0 */ int actionWait();
/* 8045BDB8 */ int ExecuteType0();
/* 8045BED0 */ int ExecuteType1();
/* 8045C25C */ void indirectProc(J3DModel*);
/* 8045A940 */ virtual int CreateHeap();
/* 8045A2B8 */ virtual int Create();
/* 8045BFBC */ virtual int Execute(f32 (**)[3][4]);
/* 8045C078 */ virtual int Draw();
/* 8045C2E8 */ virtual int Delete();
void setAction(u8 i_action) { mAction = i_action; }
static createHeapFunc mCreateHeapFunc[];
static createInitFunc mCreateInitFunc[];
static executeFunc mExecuteFunc[];
static tgSetFunc mTgSetFunc[];
/* 0x5A0 */ request_of_phase_process_class mPhase;
/* 0x5A8 */ J3DModel* field_0x5a8[2][2];
/* 0x5B8 */ mDoExt_btkAnm* field_0x5b8[2][2];
/* 0x5C8 */ mDoExt_brkAnm* field_0x5c8[2][2];
/* 0x5D8 */ dBgW* mpBgW;
/* 0x5DC */ dCcD_Stts mStts;
/* 0x618 */ dCcD_Tri mTris[4];
/* 0xB88 */ dCcD_Cyl mCyl;
/* 0xCC4 */ u8 field_0xcc4;
/* 0xCC5 */ u8 mAction;
/* 0xCC6 */ s16 mEventIdx;
/* 0xCC8 */ u8 field_0xcc8;
/* 0xCC9 */ u8 field_0xcc9;
/* 0xCCA */ u16 field_0xcca;
/* 0xCCC */ u16 field_0xccc;
/* 0xCD0 */ spec_data_c mSpecData;
/* 0xCF4 */ csXyz field_0xcf4;
/* 0xCFC */ u32 mAttnActorID;
/* 0xD00 */ u8 field_0xd00;
/* 0xD01 */ u8 field_0xd01;
/* 0xD02 */ u8 field_0xd02;
};
namespace daBgObj_prm {
inline u8 getEvId(daBgObj_c* i_this) {
return (fopAcM_GetParam(i_this) >> 0x15) & 0xFF;
}
inline u8 getSwBit(daBgObj_c* i_this) {
return i_this->field_0xccc & 0xFF;
}
inline u8 getSwBit2(daBgObj_c* i_this) {
return (i_this->field_0xccc >> 8) & 0xFF;
}
inline u8 getObjArg0(daBgObj_c* i_this) {
return i_this->field_0xcca & 0xFF;
}
}; // namespace daBgObj_prm
#endif /* D_A_BG_OBJ_H */
@@ -1,6 +1,19 @@
#ifndef D_A_KYTAG09_H
#define D_A_KYTAG09_H
#include "dolphin/types.h"
#include "f_op/f_op_actor_mng.h"
class kytag09_class : public fopAc_ac_c {
public:
/* 0x568 */ J3DModel* mpModel;
/* 0x56C */ J3DModel* mpModel2;
/* 0x570 */ u8 field_0x570[0x574 - 0x570];
/* 0x574 */ mDoExt_btkAnm mBtk_2;
/* 0x58C */ mDoExt_btkAnm mBtk;
/* 0x5A4 */ mDoExt_btkAnm unused_0x5a4;
/* 0x5BC */ request_of_phase_process_class mPhase;
/* 0x5C4 */ u8 field_0x5c4;
/* 0x5C5 */ u8 mType;
};
#endif /* D_A_KYTAG09_H */
@@ -1,6 +1,19 @@
#ifndef D_A_KYTAG11_H
#define D_A_KYTAG11_H
#include "dolphin/types.h"
#include "f_op/f_op_actor_mng.h"
class kytag11_class : public fopAc_ac_c {
public:
/* 0x568 */ u8 mNewTime;
/* 0x569 */ u8 mStopTime;
/* 0x56A */ u8 mEnvTime;
/* 0x56C */ u16 mOnEventID;
/* 0x56E */ u16 mOffEventID;
/* 0x570 */ u8 mChangeTime;
/* 0x571 */ u8 mInitTimeChange;
/* 0x572 */ u8 mOnSwitchNo;
/* 0x573 */ u8 mOffSwitchNo;
};
#endif /* D_A_KYTAG11_H */