mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
d_camera / m_Do_ext / d_particle + minor various wip (#210)
This commit is contained in:
@@ -59,8 +59,8 @@ public:
|
||||
struct actor_place {
|
||||
/* 807E2468 */ //void operator=(actor_place const&);
|
||||
|
||||
/* 0x00 */ cXyz mPosition;
|
||||
/* 0x0C */ csXyz mAngle;
|
||||
/* 0x00 */ cXyz pos;
|
||||
/* 0x0C */ csXyz angle;
|
||||
/* 0x12 */ s8 mRoomNo;
|
||||
/* 0x13 */ u8 field_0x13;
|
||||
};
|
||||
@@ -95,9 +95,9 @@ public:
|
||||
/* 0x49C */ u32 mStatus;
|
||||
/* 0x4A0 */ u32 mCondition;
|
||||
/* 0x4A4 */ u32 mParentPcId;
|
||||
/* 0x4A8 */ actor_place mOrig;
|
||||
/* 0x4BC */ actor_place mNext;
|
||||
/* 0x4D0 */ actor_place mCurrent;
|
||||
/* 0x4A8 */ actor_place orig;
|
||||
/* 0x4BC */ actor_place next;
|
||||
/* 0x4D0 */ actor_place current;
|
||||
/* 0x4E4 */ csXyz mCollisionRot;
|
||||
/* 0x4EC */ cXyz mScale;
|
||||
/* 0x4F8 */ cXyz mSpeed;
|
||||
@@ -129,9 +129,9 @@ public:
|
||||
|
||||
static u32 stopStatus;
|
||||
|
||||
const cXyz& getPosition() const { return mCurrent.mPosition; }
|
||||
const csXyz& getAngle() const { return mCurrent.mAngle; }
|
||||
s8 getRoomNo() const { return mCurrent.mRoomNo; }
|
||||
const cXyz& getPosition() const { return current.pos; }
|
||||
const csXyz& getAngle() const { return current.angle; }
|
||||
s8 getRoomNo() const { return current.mRoomNo; }
|
||||
}; // Size: 0x568
|
||||
|
||||
s32 fopAc_IsActor(void* actor);
|
||||
|
||||
@@ -105,7 +105,7 @@ struct DOUBLE_POS {
|
||||
};
|
||||
|
||||
inline s32 fopAcM_GetRoomNo(const fopAc_ac_c* pActor) {
|
||||
return (s8)pActor->mCurrent.mRoomNo;
|
||||
return (s8)pActor->current.mRoomNo;
|
||||
}
|
||||
|
||||
inline u32 fopAcM_GetID(const void* pActor) {
|
||||
@@ -165,11 +165,11 @@ inline fopAc_ac_c* fopAcM_SearchByID(unsigned int id) {
|
||||
}
|
||||
|
||||
inline cXyz& fopAcM_GetPosition_p(fopAc_ac_c* pActor) {
|
||||
return pActor->mCurrent.mPosition;
|
||||
return pActor->current.pos;
|
||||
}
|
||||
|
||||
inline cXyz& fopAcM_GetOldPosition_p(fopAc_ac_c* pActor) {
|
||||
return pActor->mNext.mPosition;
|
||||
return pActor->next.pos;
|
||||
}
|
||||
|
||||
inline cXyz& fopAcM_GetSpeed_p(fopAc_ac_c* pActor) {
|
||||
@@ -177,7 +177,7 @@ inline cXyz& fopAcM_GetSpeed_p(fopAc_ac_c* pActor) {
|
||||
}
|
||||
|
||||
inline csXyz& fopAcM_GetAngle_p(fopAc_ac_c* pActor) {
|
||||
return pActor->mCurrent.mAngle;
|
||||
return pActor->current.angle;
|
||||
}
|
||||
|
||||
inline csXyz& fopAcM_GetShapeAngle_p(fopAc_ac_c* pActor) {
|
||||
@@ -201,7 +201,7 @@ inline BOOL fopAcM_IsActor(void* actor) {
|
||||
}
|
||||
|
||||
inline void fopAcM_SetRoomNo(fopAc_ac_c* actor, s8 roomNo) {
|
||||
actor->mCurrent.mRoomNo = roomNo;
|
||||
actor->current.mRoomNo = roomNo;
|
||||
}
|
||||
|
||||
inline void fopAcM_setHookCarryNow(fopAc_ac_c* actor) {
|
||||
@@ -213,7 +213,7 @@ inline void fopAcM_cancelHookCarryNow(fopAc_ac_c* actor) {
|
||||
}
|
||||
|
||||
inline s8 fopAcM_GetHomeRoomNo(const fopAc_ac_c* pActor) {
|
||||
return pActor->mOrig.mRoomNo;
|
||||
return pActor->orig.mRoomNo;
|
||||
}
|
||||
|
||||
inline void fopAcM_SetGravity(fopAc_ac_c* actor, f32 gravity) {
|
||||
@@ -261,7 +261,7 @@ inline const cXyz& fopAcM_GetSpeed_p(const fopAc_ac_c* p_actor) {
|
||||
}
|
||||
|
||||
inline const cXyz& fopAcM_GetPosition_p(const fopAc_ac_c* p_actor) {
|
||||
return p_actor->mCurrent.mPosition;
|
||||
return p_actor->current.pos;
|
||||
}
|
||||
|
||||
inline void dComIfGs_onSwitch(int i_no, int i_roomNo);
|
||||
@@ -291,7 +291,7 @@ inline bool fopAcM_isItem(const fopAc_ac_c* item, int bitNo) {
|
||||
}
|
||||
|
||||
inline f32 fopAcM_searchActorDistanceY(const fopAc_ac_c* actorA, const fopAc_ac_c* actorB) {
|
||||
return actorB->mCurrent.mPosition.y - actorA->mCurrent.mPosition.y;
|
||||
return actorB->current.pos.y - actorA->current.pos.y;
|
||||
}
|
||||
|
||||
inline u16 fopAcM_GetSetId(const fopAc_ac_c* p_actor) {
|
||||
@@ -505,7 +505,7 @@ inline void make_prm_bokkuri(u32* pActorParams, csXyz* p_angle, u8 param_2, u8 p
|
||||
p_angle->z = (param_6 << 0xD) | (param_2 << 0x1) | param_5;
|
||||
}
|
||||
|
||||
inline void* dComIfGp_getPlayer(int);
|
||||
inline fopAc_ac_c* dComIfGp_getPlayer(int);
|
||||
|
||||
inline s16 fopAcM_searchPlayerAngleY(const fopAc_ac_c* actor) {
|
||||
return fopAcM_searchActorAngleY(actor, (fopAc_ac_c*)dComIfGp_getPlayer(0));
|
||||
@@ -527,7 +527,7 @@ s8 dComIfGp_getReverb(int roomNo);
|
||||
|
||||
inline void fopAcM_seStartCurrent(const fopAc_ac_c* actor, u32 sfxID, u32 param_2) {
|
||||
s8 roomNo = fopAcM_GetRoomNo(actor);
|
||||
mDoAud_seStart(sfxID, &actor->mCurrent.mPosition, param_2, dComIfGp_getReverb(roomNo));
|
||||
mDoAud_seStart(sfxID, &actor->current.pos, param_2, dComIfGp_getReverb(roomNo));
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
#include "f_op/f_op_draw_tag.h"
|
||||
#include "f_op/f_op_view.h"
|
||||
#include "f_pc/f_pc_leaf.h"
|
||||
#include "d/d_camera.h"
|
||||
|
||||
class camera_class : public view_class {
|
||||
class camera_process_class : public view_class {
|
||||
public:
|
||||
/* 0x170 */ Mtx field_0x170;
|
||||
/* 0x1A0 */ Mtx field_0x1a0;
|
||||
/* 0x1D0 */ u8 field_0x1d0[0x10];
|
||||
/* 0x1E0 */ Mtx field_0x1e0;
|
||||
/* 0x210 */ create_tag_class pCreateTag;
|
||||
/* 0x224 */ leafdraw_method_class* pMthd;
|
||||
/* 0x170 */ Mtx mInvViewMtx;
|
||||
/* 0x1A0 */ Mtx44 field_0x1a0;
|
||||
/* 0x1E0 */ Mtx mViewMtxNoTrans;
|
||||
/* 0x210 */ create_tag_class mCreateTag;
|
||||
/* 0x224 */ leafdraw_method_class* mpMtd;
|
||||
/* 0x228 */ u8 field_0x228[4];
|
||||
/* 0x22C */ s8 mPrm1;
|
||||
/* 0x22D */ s8 mPrm2;
|
||||
@@ -26,6 +26,13 @@ public:
|
||||
/* 0x238 */ int field_0x238;
|
||||
};
|
||||
|
||||
class camera_class : public camera_process_class {
|
||||
public:
|
||||
/* 0x23C */ int field_0x23c;
|
||||
/* 0x240 */ request_of_phase_process_class mPhaseReq;
|
||||
/* 0x248 */ dCamera_c mCamera;
|
||||
};
|
||||
|
||||
/* void fopCamM_SetNear(camera_class* cam, f32 near) {
|
||||
cam->mNear = near;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,16 @@ public:
|
||||
};
|
||||
|
||||
struct view_port_class {
|
||||
f32 field_0x0;
|
||||
/* 0x00 */ f32 mXOrig;
|
||||
/* 0x04 */ f32 mYOrig;
|
||||
/* 0x08 */ f32 mWidth;
|
||||
/* 0x0C */ f32 mHeight;
|
||||
/* 0x10 */ f32 mNearZ;
|
||||
/* 0x14 */ f32 mFarZ;
|
||||
/* 0x18 */ f32 mScissorXOrig;
|
||||
/* 0x1C */ f32 mScissorYOrig;
|
||||
/* 0x20 */ f32 mScissorWidth;
|
||||
/* 0x24 */ f32 mScissorHeight;
|
||||
};
|
||||
|
||||
struct view_class : public leafdraw_class {
|
||||
@@ -24,11 +33,10 @@ struct view_class : public leafdraw_class {
|
||||
/* 0x0CC */ f32 mFar;
|
||||
/* 0x0D0 */ f32 mFovy;
|
||||
/* 0x0D4 */ f32 mAspect;
|
||||
/* 0x0D8 */ lookat_class field_0xd8;
|
||||
/* 0x0D8 */ lookat_class mLookat;
|
||||
/* 0x0FC */ s16 mBank;
|
||||
/* 0x100 */ Mtx field_0x100;
|
||||
/* 0x130 */ u8 field_0x130[0x10];
|
||||
/* 0x140 */ Mtx field_0x140;
|
||||
/* 0x100 */ Mtx44 mProjMtx;
|
||||
/* 0x140 */ Mtx mViewMtx;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user