mirror of
https://github.com/zeldaret/tww.git
synced 2026-06-01 17:57:24 -04:00
clean up some inlines
This commit is contained in:
@@ -698,7 +698,6 @@ public:
|
||||
|
||||
virtual ~J3DAnmVtxColor();
|
||||
virtual void getColor(u8, u16, GXColor*) const {}
|
||||
inline J3DAnmVtxColorIndexData* getAnmVtxColorIndexData(u8 idx, u16 frame) { return &mAnmVtxColorIndexData[idx][frame]; }
|
||||
|
||||
protected:
|
||||
/* 0x10 */ u16 mAnmTableNum[2];
|
||||
|
||||
@@ -155,11 +155,11 @@ public:
|
||||
J3DMaterialAnm() { initialize(); }
|
||||
|
||||
void initialize();
|
||||
inline void setMatColorAnm(int i, J3DMatColorAnm* pAnm) { mMatColorAnm[i] = pAnm; }
|
||||
inline void setTexMtxAnm(int i, J3DTexMtxAnm* pAnm) { mTexMtxAnm[i] = pAnm; }
|
||||
inline void setTexNoAnm(int i, J3DTexNoAnm* pAnm) { mTexNoAnm[i] = pAnm; }
|
||||
inline void setTevColorAnm(int i, J3DTevColorAnm* pAnm) { mTevColorAnm[i] = pAnm; }
|
||||
inline void setTevKColorAnm(int i, J3DTevKColorAnm* pAnm) { mTevKColorAnm[i] = pAnm; }
|
||||
void setMatColorAnm(int i, J3DMatColorAnm* pAnm) { mMatColorAnm[i] = pAnm; }
|
||||
void setTexMtxAnm(int i, J3DTexMtxAnm* pAnm) { mTexMtxAnm[i] = pAnm; }
|
||||
void setTexNoAnm(int i, J3DTexNoAnm* pAnm) { mTexNoAnm[i] = pAnm; }
|
||||
void setTevColorAnm(int i, J3DTevColorAnm* pAnm) { mTevColorAnm[i] = pAnm; }
|
||||
void setTevKColorAnm(int i, J3DTevKColorAnm* pAnm) { mTevKColorAnm[i] = pAnm; }
|
||||
|
||||
virtual ~J3DMaterialAnm() {}
|
||||
virtual void calc(J3DMaterial*) const;
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
return isPushingReset;
|
||||
}
|
||||
|
||||
inline void stopMotorWave() { mRumble.stopPatternedRumbleAtThePeriod(); }
|
||||
void stopMotorWave() { mRumble.stopPatternedRumbleAtThePeriod(); }
|
||||
void stopMotor() { mRumble.stopMotor(mPortNum); }
|
||||
void stopMotorHard() { mRumble.stopMotorHard(mPortNum); }
|
||||
|
||||
|
||||
@@ -129,10 +129,22 @@ inline s16 fopAcM_GetProfName(void* pActor) {
|
||||
return fpcM_GetProfName(pActor);
|
||||
}
|
||||
|
||||
inline actor_process_profile_definition* fopAcM_GetProfile(void* pActor) {
|
||||
return (actor_process_profile_definition*)fpcM_GetProfile(pActor);
|
||||
}
|
||||
|
||||
inline void fopAcM_SetPriority(void* pActor, int priority) {
|
||||
fpcM_SetPriority(pActor, priority);
|
||||
}
|
||||
|
||||
inline u8 fopAcM_GetGroup(fopAc_ac_c* p_actor) {
|
||||
return p_actor->mGroup;
|
||||
}
|
||||
|
||||
inline void fopAcM_SetGroup(fopAc_ac_c* pActor, u8 group) {
|
||||
pActor->mGroup = group;
|
||||
}
|
||||
|
||||
inline void fopAcM_OnStatus(fopAc_ac_c* pActor, u32 flag) {
|
||||
pActor->mStatus |= flag;
|
||||
}
|
||||
@@ -154,28 +166,32 @@ inline fopAc_ac_c* fopAcM_Search(fopAcIt_JudgeFunc func, void* param) {
|
||||
return (fopAc_ac_c*)fopAcIt_Judge(func, param);
|
||||
}
|
||||
|
||||
inline cXyz& fopAcM_GetPosition_p(fopAc_ac_c* pActor) {
|
||||
return pActor->current.pos;
|
||||
inline cXyz* fopAcM_GetPosition_p(fopAc_ac_c* pActor) {
|
||||
return &pActor->current.pos;
|
||||
}
|
||||
|
||||
inline cXyz& fopAcM_GetPosition(fopAc_ac_c* pActor) {
|
||||
return pActor->current.pos;
|
||||
}
|
||||
|
||||
inline cXyz& fopAcM_GetOldPosition_p(fopAc_ac_c* pActor) {
|
||||
return pActor->old.pos;
|
||||
inline cXyz* fopAcM_GetOldPosition_p(fopAc_ac_c* pActor) {
|
||||
return &pActor->old.pos;
|
||||
}
|
||||
|
||||
inline cXyz& fopAcM_GetSpeed_p(fopAc_ac_c* pActor) {
|
||||
inline cXyz* fopAcM_GetSpeed_p(fopAc_ac_c* pActor) {
|
||||
return &pActor->speed;
|
||||
}
|
||||
|
||||
inline cXyz& fopAcM_GetSpeed(fopAc_ac_c* pActor) {
|
||||
return pActor->speed;
|
||||
}
|
||||
|
||||
inline csXyz& fopAcM_GetAngle_p(fopAc_ac_c* pActor) {
|
||||
return pActor->current.angle;
|
||||
inline csXyz* fopAcM_GetAngle_p(fopAc_ac_c* pActor) {
|
||||
return &pActor->current.angle;
|
||||
}
|
||||
|
||||
inline csXyz& fopAcM_GetShapeAngle_p(fopAc_ac_c* pActor) {
|
||||
return pActor->shape_angle;
|
||||
inline csXyz* fopAcM_GetShapeAngle_p(fopAc_ac_c* pActor) {
|
||||
return &pActor->shape_angle;
|
||||
}
|
||||
|
||||
inline bool fopAcM_CheckCondition(fopAc_ac_c* p_actor, u32 flag) {
|
||||
@@ -278,6 +294,10 @@ inline f32 fopAcM_getCullSizeFar(fopAc_ac_c* i_actor) {
|
||||
return i_actor->mCullSizeFar;
|
||||
}
|
||||
|
||||
inline void fopAcM_SetCullSize(fopAc_ac_c* i_actor, int i_culltype) {
|
||||
i_actor->mCullType = i_culltype;
|
||||
}
|
||||
|
||||
inline int fopAcM_GetCullSize(fopAc_ac_c* i_actor) {
|
||||
return i_actor->mCullType;
|
||||
}
|
||||
@@ -589,4 +609,10 @@ inline void fopAcM_offDraw(fopAc_ac_c* actor) {
|
||||
fopDwTg_DrawQTo(&actor->mDwTg);
|
||||
}
|
||||
|
||||
inline void fopAcM_getCullSizeBoxMax(fopAc_ac_c*) {}
|
||||
inline void fopAcM_getCullSizeBoxMin(fopAc_ac_c*) {}
|
||||
inline void fopAcM_monsSeStart(fopAc_ac_c*, unsigned long, Vec*, unsigned long) {}
|
||||
inline void fopAcM_getNameString(fopAc_ac_c*, char*) {}
|
||||
inline void fopAcM_orderOtherEvent(fopAc_ac_c*, char*, unsigned short) {}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -46,6 +46,10 @@ inline s32 fpcM_ChangeLayerID(void* proc, int layerID) {
|
||||
return fpcPi_Change(&((base_process_class*)proc)->mPi, layerID, fpcPi_CURRENT_e, fpcPi_CURRENT_e);
|
||||
}
|
||||
|
||||
inline void fpcM_SetPriority(void* proc, int priority) {
|
||||
fpcPi_Change(&((base_process_class*)proc)->mPi, fpcLy_CURRENT_e, priority, fpcPi_CURRENT_e);
|
||||
}
|
||||
|
||||
inline s32 fpcM_IsJustType(int type1, int type2) {
|
||||
return fpcBs_Is_JustOfType(type1, type2);
|
||||
}
|
||||
|
||||
@@ -1568,11 +1568,11 @@ static int daAgb_Create(fopAc_ac_c* i_this) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
a_this->mCrrPos.Set(&fopAcM_GetPosition_p(a_this), &fopAcM_GetOldPosition_p(a_this), (void*)NULL, NULL);
|
||||
a_this->mCrrPos.Set(fopAcM_GetPosition_p(a_this), fopAcM_GetOldPosition_p(a_this), (void*)NULL, NULL);
|
||||
a_this->mCrrPos.SetWall(171.0f, 50.0f);
|
||||
a_this->mCrrPos.SetGndUpY(170.0f);
|
||||
a_this->mCrrPos.ClrNoRoof();
|
||||
a_this->mAcch.Set(&fopAcM_GetPosition_p(a_this), &fopAcM_GetOldPosition_p(a_this), a_this, 1, &a_this->mAcchCir);
|
||||
a_this->mAcch.Set(fopAcM_GetPosition_p(a_this), fopAcM_GetOldPosition_p(a_this), a_this, 1, &a_this->mAcchCir);
|
||||
a_this->mAcch.OnLineCheck();
|
||||
a_this->mAcch.SetGrndNone();
|
||||
a_this->mAcchCir.SetWall(171.0f, 40.0f);
|
||||
|
||||
@@ -1241,8 +1241,8 @@ static s32 daAM_Create(fopAc_ac_c* i_actor) {
|
||||
i_this->mAttentionInfo.mFlags = 0;
|
||||
|
||||
i_this->mAcch.Set(
|
||||
&fopAcM_GetPosition_p(i_this), &fopAcM_GetOldPosition_p(i_this),
|
||||
i_this, 1, &i_this->mAcchCir, &fopAcM_GetSpeed_p(i_this)
|
||||
fopAcM_GetPosition_p(i_this), fopAcM_GetOldPosition_p(i_this),
|
||||
i_this, 1, &i_this->mAcchCir, fopAcM_GetSpeed_p(i_this)
|
||||
);
|
||||
i_this->mStts.Init(254, 1, i_this);
|
||||
|
||||
|
||||
@@ -1347,8 +1347,8 @@ static s32 daAM2_Create(fopAc_ac_c* i_actor) {
|
||||
i_this->mAttentionInfo.mFlags = 0;
|
||||
|
||||
i_this->mAcch.Set(
|
||||
&fopAcM_GetPosition_p(i_this), &fopAcM_GetOldPosition_p(i_this),
|
||||
i_this, 1, &i_this->mAcchCir, &fopAcM_GetSpeed_p(i_this)
|
||||
fopAcM_GetPosition_p(i_this), fopAcM_GetOldPosition_p(i_this),
|
||||
i_this, 1, &i_this->mAcchCir, fopAcM_GetSpeed_p(i_this)
|
||||
);
|
||||
i_this->mStts.Init(254, 1, i_this);
|
||||
|
||||
|
||||
@@ -809,9 +809,9 @@ static s32 daBk_Create(fopAc_ac_c* i_actor) {
|
||||
}
|
||||
|
||||
i_this->mDamageReaction.mAcch.Set(
|
||||
&fopAcM_GetPosition_p(i_this), &fopAcM_GetOldPosition_p(i_this),
|
||||
fopAcM_GetPosition_p(i_this), fopAcM_GetOldPosition_p(i_this),
|
||||
i_this, 1, &i_this->mDamageReaction.mAcchCir,
|
||||
&fopAcM_GetSpeed_p(i_this)
|
||||
fopAcM_GetSpeed_p(i_this)
|
||||
);
|
||||
i_this->mDamageReaction.mAcchCir.SetWall(40.0f, 40.0f);
|
||||
i_this->mDamageReaction.mAcch.ClrRoofNone();
|
||||
|
||||
@@ -217,7 +217,7 @@ void daGhostship_c::createInit() {
|
||||
}
|
||||
|
||||
mCir.SetWall(30.0f, 30.0f);
|
||||
mAcch.Set(&fopAcM_GetPosition_p(this), &fopAcM_GetOldPosition_p(this), this, 1, &mCir, &fopAcM_GetSpeed_p(this));
|
||||
mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mCir, fopAcM_GetSpeed_p(this));
|
||||
mAcch.SetWallNone();
|
||||
mAcch.SetRoofNone();
|
||||
dLib_waveRot(¤t.pos, 0.0f, &mWave);
|
||||
|
||||
@@ -134,7 +134,7 @@ void itemGetCallBack(fopAc_ac_c* item_actor, dCcD_GObjInf*, fopAc_ac_c* collided
|
||||
/* 800F5044-800F53EC .text CreateInit__8daItem_cFv */
|
||||
void daItem_c::CreateInit() {
|
||||
mAcchCir.SetWall(30.0f, 30.0f);
|
||||
mAcch.Set(¤t.pos, &old.pos, this, 1, &mAcchCir, &fopAcM_GetSpeed_p(this));
|
||||
mAcch.Set(¤t.pos, &old.pos, this, 1, &mAcchCir, fopAcM_GetSpeed_p(this));
|
||||
mAcch.m_flags &= ~0x400;
|
||||
mAcch.m_flags &= ~0x8;
|
||||
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
|
||||
@@ -157,7 +157,7 @@ void daItem_c::CreateInit() {
|
||||
|
||||
mDisappearTimer = getData()->mDuration;
|
||||
field_0x65a = getData()->field_0x18;
|
||||
field_0x650 = fopAcM_GetSpeed_p(this).y;
|
||||
field_0x650 = fopAcM_GetSpeed(this).y;
|
||||
mItemStatus = 0;
|
||||
|
||||
mType = daItem_prm::getType(this);
|
||||
|
||||
@@ -145,17 +145,17 @@ daNpc_Btsw2_HIO_c::daNpc_Btsw2_HIO_c() {
|
||||
const char daNpc_Btsw2_c::m_arc_name[] = "Btsw";
|
||||
|
||||
static const int l_bck_ix_tbl[] = {
|
||||
BTSW_INDEX_BCK_BN_WAIT01,
|
||||
BTSW_INDEX_BCK_BN_WAIT02,
|
||||
BTSW_INDEX_BCK_BN_TALK01,
|
||||
BTSW_INDEX_BCK_BN_TALK02,
|
||||
BTSW_INDEX_BCK_BN_ONEGAI,
|
||||
BTSW_INDEX_BCK_BN_SUGOI,
|
||||
BTSW_INDEX_BCK_BN_SUGOI,
|
||||
BTSW_INDEX_BCK_BN_WALK,
|
||||
BTSW_INDEX_BCK_BN_KASIGE,
|
||||
BTSW_INDEX_BCK_BN_SIWAKE01,
|
||||
BTSW_INDEX_BCK_BN_SIWAKE02,
|
||||
BTSW_INDEX_BCK_BN_WAIT01,
|
||||
BTSW_INDEX_BCK_BN_WAIT02,
|
||||
BTSW_INDEX_BCK_BN_TALK01,
|
||||
BTSW_INDEX_BCK_BN_TALK02,
|
||||
BTSW_INDEX_BCK_BN_ONEGAI,
|
||||
BTSW_INDEX_BCK_BN_SUGOI,
|
||||
BTSW_INDEX_BCK_BN_SUGOI,
|
||||
BTSW_INDEX_BCK_BN_WALK,
|
||||
BTSW_INDEX_BCK_BN_KASIGE,
|
||||
BTSW_INDEX_BCK_BN_SIWAKE01,
|
||||
BTSW_INDEX_BCK_BN_SIWAKE02,
|
||||
};
|
||||
|
||||
static const int l_btp_ix_tbl[] = {
|
||||
|
||||
@@ -27,7 +27,7 @@ void daPy_lk_c::setSwordModel(BOOL r28) {
|
||||
/* 0x0E */ u16 tipStabBrk;
|
||||
};
|
||||
static const sword_model_tbl_s sword_model_tbl[] = {
|
||||
{
|
||||
{
|
||||
LINK_BDL_SWA,
|
||||
LINK_BDL_YHSLS00,
|
||||
LKANM_BTK_YHSLS00,
|
||||
@@ -37,7 +37,7 @@ void daPy_lk_c::setSwordModel(BOOL r28) {
|
||||
LKANM_BTK_CUTFH,
|
||||
LKANM_BRK_CUTFH
|
||||
},
|
||||
{
|
||||
{
|
||||
LINK_BDL_SWMS,
|
||||
LINK_BDL_YMSLI00,
|
||||
LKANM_BTK_YMSLI00,
|
||||
|
||||
@@ -839,7 +839,7 @@ void daRd_c::modeDeath() {
|
||||
fopAcM_onActor(this);
|
||||
|
||||
// Do not consider the ReDead to be a living enemy while its death animation is playing out.
|
||||
mGroup = fopAc_ENV_e;
|
||||
fopAcM_SetGroup(this, fopAc_ENV_e);
|
||||
|
||||
if (cLib_calcTimer(&mTimer1) == 0) {
|
||||
fopAcM_createDisappear(this, ¤t.pos, 5);
|
||||
@@ -1773,7 +1773,7 @@ void daRd_c::createInit() {
|
||||
mCyl.Set(m_cyl_src);
|
||||
mCyl.SetStts(&mStts);
|
||||
mAcchCir.SetWall(30.0f, 30.0f);
|
||||
mAcch.Set(&fopAcM_GetPosition_p(this), &fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, &fopAcM_GetSpeed_p(this));
|
||||
mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, fopAcM_GetSpeed_p(this));
|
||||
mAcch.SetRoofNone();
|
||||
J3DModelData* modelData = mpMorf->getModel()->getModelData();
|
||||
mJntCtrl.setHeadJntNum(0x0A); // ree_kubi_1
|
||||
|
||||
@@ -490,16 +490,16 @@ f32 fopAcM_searchActorDistance2(fopAc_ac_c* i_this, fopAc_ac_c* i_other) {
|
||||
|
||||
/* 800253C0-80025470 .text fopAcM_searchActorDistanceXZ__FP10fopAc_ac_cP10fopAc_ac_c */
|
||||
f32 fopAcM_searchActorDistanceXZ(fopAc_ac_c* i_this, fopAc_ac_c* i_other) {
|
||||
cXyz& this_pos = fopAcM_GetPosition_p(i_this);
|
||||
cXyz& other_pos = fopAcM_GetPosition_p(i_other);
|
||||
return (other_pos - this_pos).absXZ();
|
||||
cXyz* this_pos = fopAcM_GetPosition_p(i_this);
|
||||
cXyz* other_pos = fopAcM_GetPosition_p(i_other);
|
||||
return (*other_pos - *this_pos).absXZ();
|
||||
}
|
||||
|
||||
/* 80025470-800254BC .text fopAcM_searchActorDistanceXZ2__FP10fopAc_ac_cP10fopAc_ac_c */
|
||||
f32 fopAcM_searchActorDistanceXZ2(fopAc_ac_c* i_this, fopAc_ac_c* i_other) {
|
||||
cXyz& this_pos = fopAcM_GetPosition_p(i_this);
|
||||
cXyz& other_pos = fopAcM_GetPosition_p(i_other);
|
||||
return (other_pos - this_pos).abs2XZ();
|
||||
cXyz* this_pos = fopAcM_GetPosition_p(i_this);
|
||||
cXyz* other_pos = fopAcM_GetPosition_p(i_other);
|
||||
return (*other_pos - *this_pos).abs2XZ();
|
||||
}
|
||||
|
||||
/* 800254BC-800255B4 .text fopAcM_rollPlayerCrash__FP10fopAc_ac_cfUl */
|
||||
|
||||
Reference in New Issue
Block a user