use enums and inlines in more places

This commit is contained in:
LagoLunatic
2023-12-30 15:08:24 -05:00
parent 82b429b72f
commit 69444ef01e
25 changed files with 70 additions and 74 deletions
+1 -1
View File
@@ -197,7 +197,7 @@ static BOOL medama_atari_check(am2_class* i_this) {
ret = true;
if (i_this->mCurrBckIdx == AM2_BCK_SLEEP) {
anm_init(i_this, AM2_BCK_WAIT, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1);
i_this->mAttentionInfo.mFlags = 4;
i_this->mAttentionInfo.mFlags = fopAc_Attn_LOCKON_ENEMY_e;
fopAcM_OnStatus(i_this, fopAcStts_SHOWMAP_e);
i_this->mNeedleCyl.OnAtSetBit();
i_this->mNeedleCyl.OnAtHitBit();
+1 -1
View File
@@ -71,7 +71,7 @@ void daArrow_Iceeff_c::CreateInit() {
}
fopAcM_setCullSizeBox(this, -100.0f, -100.0f, -100.0f, 100.0f, 100.0f, 100.0f);
mCullSizeFar = 1.0f;
fopAcM_setCullSizeFar(this, 1.0f);
set_mtx();
field_0xA30 = 0;
field_0xA34 = 0.0f;
+1 -1
View File
@@ -133,7 +133,7 @@ void daArrow_Lighteff_c::CreateInit() {
field_0x2A8.setall(1.0f);
fopAcM_setCullSizeBox(this, -100.0f, -100.0f, -100.0f, 100.0f, 100.0f, 100.0f);
mCullSizeFar = 1.0f;
fopAcM_setCullSizeFar(this, 1.0f);
set_mtx();
+1 -1
View File
@@ -378,7 +378,7 @@ namespace daBomb2 {
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
fopAcM_setCullSizeBox(this, -36.0f, 0.0f, -36.0f, 36.0f, 66.0f, 36.0f);
mCullSizeFar = 10.0f;
fopAcM_setCullSizeFar(this, 10.0f);
if(daObj::PrmAbstract(this, PRM_1_W, PRM_1_S)) {
off_carry();
+1 -1
View File
@@ -1422,7 +1422,7 @@ void daBomb_c::create_init() {
mCull.mBox.mMax.x = 36.0f;
mCull.mBox.mMax.y = 66.0f;
mCull.mBox.mMax.z = 36.0f;
mCullSizeFar = 10.0f;
fopAcM_setCullSizeFar(this, 10.0f);
init_mtx();
}
+2 -6
View File
@@ -31,12 +31,8 @@ static s32 daBossItem_Create(fopAc_ac_c* i_this) {
if (isStageBossDead && !dComIfGs_isStageLife(stageNo)) {
fopAcM_createItemForBoss(
&bItem->current.pos,
1,
bItem->current.roomNo,
&bItem->current.angle,
0,
1
&bItem->current.pos, 1, bItem->current.roomNo,
&bItem->current.angle, NULL, 1
);
}
+2 -2
View File
@@ -57,7 +57,7 @@ static dCcD_SrcCps l_cps_src = {
BOOL daFan_c::Delete() {
dComIfG_resDelete(&mPhs, m_arcname[mType]);
dComIfG_resDelete(&mWindPhs, m_arcname2);
if (mWindSePId != -1) {
if (mWindSePId != fpcM_ERROR_PROCESS_ID_e) {
dLevelSe_c* se = (dLevelSe_c*)fopKyM_SearchByID(mWindSePId);
if (se != NULL)
fopKyM_Delete(se);
@@ -225,7 +225,7 @@ int daFan_c::Execute(Mtx** mtxP) {
mWindBtkAnm1.setPlaySpeed(-1.0f);
}
if (mWindSePId != -1) {
if (mWindSePId != fpcM_ERROR_PROCESS_ID_e) {
dLevelSe_c* se = (dLevelSe_c*)fopKyM_SearchByID(mWindSePId);
if (se != NULL)
se->setReverb(len * 100.0f, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
+3 -3
View File
@@ -206,7 +206,7 @@ BOOL daHookshot_c::procWait_init(BOOL playSe) {
mCurrProcFunc = &daHookshot_c::procWait;
mChainCnt = 0;
current.pos = link->getHookshotRootPos();
mCarryActorID = -1;
mCarryActorID = fpcM_ERROR_PROCESS_ID_e;
m2B0 = 0;
if (playSe) {
mDoAud_seStart(JA_SE_LK_HS_WIND_UP_FIN, &link->current.pos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
@@ -315,11 +315,11 @@ static BOOL daHookshot_IsDelete(daHookshot_c* i_this) {
/* 800F2B7C-800F2BF0 .text hookshot_delete__12daHookshot_cFv */
BOOL daHookshot_c::hookshot_delete() {
if (mCarryActorID != -1) {
if (mCarryActorID != fpcM_ERROR_PROCESS_ID_e) {
fopAc_ac_c* hooked_actor = fopAcM_SearchByID(mCarryActorID);
if (hooked_actor && fopAcM_checkStatus(hooked_actor, fopAcStts_HOOK_CARRY_e)) {
fopAcM_cancelHookCarryNow(hooked_actor);
mCarryActorID = -1;
mCarryActorID = fpcM_ERROR_PROCESS_ID_e;
}
}
return TRUE;
+1 -1
View File
@@ -1445,7 +1445,7 @@ namespace daObjMovebox {
mChildPID = fopAcM_createChild(
PROC_Obj_Mkie, fopAcM_GetID(this),
mkieParams, &mkiePos,
fopAcM_GetRoomNo(this), &shape_angle, NULL, -1, NULL
fopAcM_GetRoomNo(this), &shape_angle
);
}
+1 -1
View File
@@ -37,7 +37,7 @@ BOOL daObjPbka_c::CreateHeap() {
void daObjPbka_c::CreateInit() {
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
fopAcM_setCullSizeBox(this, -300.0f, -300.0f, -300.0f, 300.0f, 300.0f, 300.0f);
mCullSizeFar = 1.0f;
fopAcM_setCullSizeFar(this, 1.0f);
set_mtx();
}
+1 -1
View File
@@ -919,7 +919,7 @@ void daObjTpost_c::createInit() {
fopAcM_SetMtx(this, mMorf->getModel()->getBaseTRMtx());
fopAcM_setCullSizeBox(this, -50.0f, 0.0f, -50.0f, 70.0f, 200.0f, 70.0f);
mCullSizeFar = 10.0f;
fopAcM_setCullSizeFar(this, 10.0f);
mStts.Init(0xFF, 0xFF, this);
mCyl.Set(m_cyl_src);
+1 -1
View File
@@ -4874,7 +4874,7 @@ int phase_1(daPy_lk_c* i_this) {
dComIfGp_setLinkPlayer(i_this);
fopAcM_setStageLayer(i_this);
i_this->mAttentionInfo.mFlags = 0xFFFFFFFF;
i_this->mAttentionInfo.mFlags = ~0;
i_this->mAttentionInfo.mPosition.x = i_this->current.pos.x;
i_this->mAttentionInfo.mPosition.y = i_this->current.pos.y + 125.0f;
+1 -1
View File
@@ -76,7 +76,7 @@ void daShopItem_c::CreateInit() {
fopAcM_SetMtx(this, field_0x64C);
fopAcM_setCullSizeBox(this, -100.0f, 0.0f, -100.0f, 100.0f, 200.0f, 100.0f);
if(mDoLib_clipper::mSystemFar > 1.0f) {
mCullSizeFar = 5000.0f / mDoLib_clipper::mSystemFar;
fopAcM_setCullSizeFar(this, 5000.0f / mDoLib_clipper::mSystemFar);
}
show();