d_a_mirror done, d_a_ni 99% done (#2095)

* d_a_mirror done

* d_a_ni 99.9% done

* remove asm

* some d_a_ni doc

* progress
This commit is contained in:
TakaRikka
2024-03-13 23:28:01 -07:00
committed by GitHub
parent 42418393d5
commit e4d6e610f6
22 changed files with 3080 additions and 1866 deletions
+2 -2
View File
@@ -10,8 +10,8 @@ public:
virtual ~J3DUClipper() {}
/* 80273778 */ void init();
/* 8027378C */ void calcViewFrustum();
/* 802738FC */ u32 clip(f32 const (*)[4], Vec, f32) const;
/* 80273A44 */ u32 clip(f32 const (*)[4], Vec*, Vec*) const;
/* 802738FC */ int clip(f32 const (*)[4], Vec, f32) const;
/* 80273A44 */ int clip(f32 const (*)[4], Vec*, Vec*) const;
void setFovy(f32 fovy) { mFovY = fovy; }
void setAspect(f32 aspect) { mAspect = aspect; }
+1
View File
@@ -102,6 +102,7 @@ public:
u8 getGroupID() const { return mGroupID; }
u8 getDrawTimes() const { return mDrawTimes; }
void setRate(f32 rate) { mRate = rate; }
void setDirectionalSpeed(f32 i_speed) { mDirSpeed = i_speed; }
void setEmitterCallBackPtr(JPAEmitterCallBack* ptr) { mpEmtrCallBack = ptr; }
void setGlobalRTMatrix(const Mtx m) { JPASetRMtxTVecfromMtx(m, mGlobalRot, &mGlobalTrs); }
void setGlobalTranslation(f32 x, f32 y, f32 z) { mGlobalTrs.set(x, y, z); }
+7
View File
@@ -52,6 +52,13 @@ struct cXyz : Vec {
y -= f;
z -= f;
}
void operator*=(const Vec& other) {
x *= other.x;
y *= other.y;
z *= other.z;
}
void operator-=(const Vec& other) { VECSubtract(this, &other, this); }
void operator+=(const Vec& other) { VECAdd(this, &other, this); }
void operator*=(f32 scale) { VECScale(this, this, scale); }
+1
View File
@@ -30,5 +30,6 @@ struct dCcU_AtInfo {
};
fopAc_ac_c* cc_at_check(fopAc_ac_c*,dCcU_AtInfo*);
fopAc_ac_c* at_power_check(dCcU_AtInfo* i_AtInfo);
#endif /* D_CC_D_CC_UTY_H */
+2 -2
View File
@@ -489,7 +489,7 @@ public:
void clearPlayerStatus(int param_0, int i, u32 flag) { mPlayerStatus[i] &= ~flag; }
bool checkPlayerStatus(int param_0, int i, u32 flag) { return flag & mPlayerStatus[i]; }
s8 getPlayerCameraID(int i) { return mPlayerCameraID[i]; }
int getPlayerCameraID(int i) { return mPlayerCameraID[i]; }
void setCameraParamFileName(int i, char* name) { mCameraInfo[i].mCameraParamFileName = name; }
void setCamera(int i, camera_class* cam) { mCameraInfo[i].mCamera = cam; }
const char* getCameraParamFileName(int i) { return mCameraInfo[i].mCameraParamFileName; }
@@ -1982,7 +1982,7 @@ inline fopAc_ac_c* dComIfGp_getPlayer(int idx) {
return g_dComIfG_gameInfo.play.getPlayer(idx);
}
inline s8 i_dComIfGp_getPlayerCameraID(int idx) {
inline int i_dComIfGp_getPlayerCameraID(int idx) {
return g_dComIfG_gameInfo.play.getPlayerCameraID(idx);
}
+1
View File
@@ -160,6 +160,7 @@ enum fopAcM_CARRY {
/* 0x10 */ fopAcM_CARRY_LIGHT = 16, // guess based on context
/* 0x20 */ fopAcM_CARRY_ITEM = 32,
/* 0x30 */ fopAcM_CARRY_UNK_30 = 0x30,
/* 0x80 */ fopAcM_CARRY_CHICKEN = 0x80,
};
inline u32 fopAcM_CheckCarryType(fopAc_ac_c* actor, fopAcM_CARRY type) {
+1 -1
View File
@@ -339,7 +339,7 @@ public:
int, void*, u32, u32);
/* 8000FD94 */ int 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*);
/* 8001037C */ void setAnm(J3DAnmTransform* i_bck, int i_mode, f32 i_morf, f32 i_speed, f32 i_startF, f32 i_endF, void* i_bas);
/* 800105C8 */ u32 play(Vec*, u32, s8);
/* 80010680 */ void entryDL();
/* 800106AC */ void modelCalc();
+1 -1
View File
@@ -16,7 +16,7 @@ struct mDoLib_clipper {
mClipper.calcViewFrustum();
}
static u32 clip(const Mtx m, const Vec* param_1, const Vec* param_2) {
static int clip(const Mtx m, const Vec* param_1, const Vec* param_2) {
return mClipper.clip(m, (Vec*)param_1, (Vec*)param_2);
}
+16 -12
View File
@@ -3,7 +3,8 @@
#include "f_op/f_op_actor_mng.h"
struct dMirror_packet_c : public J3DPacket {
class dMirror_packet_c : public J3DPacket {
public:
/* 80870BD8 */ dMirror_packet_c();
/* 80870C94 */ void reset();
/* 80870CA0 */ void calcMinMax();
@@ -17,36 +18,39 @@ struct dMirror_packet_c : public J3DPacket {
GXTexObj& getTexObj() { return mTexObj; }
cXyz* getQuad() { return mQuad; }
/* 0x10 */ GXTexObj mTexObj;
/* 0x30 */ u8 mModelCount;
/* 0x31 */ u8 field_0x31[3];
/* 0x34 */ J3DModel* mModels[0x40];
/* 0x010 */ GXTexObj mTexObj;
/* 0x030 */ u8 mModelCount;
/* 0x034 */ J3DModel* mModels[0x40];
/* 0x134 */ cXyz mQuad[4];
/* 0x164 */ cXyz mMinVal;
/* 0x170 */ cXyz mMaxVal;
/* 0x17c */ cXyz mViewScale;
/* 0x17C */ cXyz mViewScale;
};
struct daMirror_c : public fopAc_ac_c {
class daMirror_c : public fopAc_ac_c, public request_of_phase_process_class {
public:
/* 80871E24 */ daMirror_c();
/* 80871F08 */ bool createHeap();
/* 80871F08 */ BOOL createHeap();
/* 80871F78 */ void setModelMtx();
/* 8087206C */ int create();
/* 8087206C */ inline int create();
/* 808723E4 */ int execute();
/* 80872560 */ int entryModel(J3DModel*);
/* 8003194C */ static int entry(J3DModel*);
/* 80031990 */ static int remove();
inline int Delete();
inline int draw();
s32 getType() { return fopAcM_GetParamBit(this, 0, 8); }
s32 getSw() { return fopAcM_GetParamBit(this, 8, 8); }
static u32 getMirrorRoomPrm() { return 0xff03; }
static u32 getMirrorRoomPrm() { return 0xFF03; }
typedef int (daMirror_c::*entryModelFunc)(J3DModel*);
static entryModelFunc m_entryModel;
static daMirror_c* m_myObj;
/* 0x568 */ request_of_phase_process_class mPhase;
/* 0x570 */ dMirror_packet_c mPacket;
/* 0x6f8 */ J3DModel* field_0x6f8;
/* 0x6f8 */ J3DModel* mpModel;
};
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef D_A_NI_H
#define D_A_NI_H
#include "dolphin/types.h"
#include "f_op/f_op_actor_mng.h"
#endif /* D_A_NI_H */