mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-09 18:57:32 -04:00
use enums and inlines in more places
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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)));
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -47,14 +47,14 @@ dAttention_c::dAttention_c(fopAc_ac_c* player, u32 playerNo) {
|
||||
mLockOnState = 0;
|
||||
field_0x01a = 0;
|
||||
field_0x01b = 0;
|
||||
mLockOnTargetBsPcID = -1;
|
||||
mLockOnTargetBsPcID = fpcM_ERROR_PROCESS_ID_e;
|
||||
heap = mDoExt_createSolidHeapFromGameToCurrent(0x3600, 0);
|
||||
JUT_ASSERT(0xb9, heap != 0);
|
||||
|
||||
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("Always", ALWAYS_BDL_YAZIRUSHI_01);
|
||||
JUT_ASSERT(0xbe, modelData != 0);
|
||||
|
||||
s32 anmColNum = 0;
|
||||
int anmColNum = 0;
|
||||
for (u32 i = 0; i < 5; i++) {
|
||||
static u16 l_bpkIdx[] = {
|
||||
ALWAYS_BPK_YJ_IN, ALWAYS_BPK_YJ_OUT, ALWAYS_BPK_YJ_SCALE, ALWAYS_BPK_YJ_LOOP, ALWAYS_BPK_YJ_DELETE,
|
||||
@@ -496,15 +496,15 @@ int dAttHint_c::request(fopAc_ac_c* i_actor, int priority) {
|
||||
|
||||
/* 8009FB58-8009FB70 .text init__10dAttHint_cFv */
|
||||
void dAttHint_c::init() {
|
||||
mHintActorID = -1;
|
||||
field_0x8 = -1;
|
||||
mHintActorID = fpcM_ERROR_PROCESS_ID_e;
|
||||
field_0x8 = fpcM_ERROR_PROCESS_ID_e;
|
||||
mPriority = 0x200;
|
||||
}
|
||||
|
||||
/* 8009FB70-8009FB8C .text proc__10dAttHint_cFv */
|
||||
void dAttHint_c::proc() {
|
||||
field_0x8 = mHintActorID;
|
||||
mHintActorID = -1;
|
||||
mHintActorID = fpcM_ERROR_PROCESS_ID_e;
|
||||
mPriority = 0x200;
|
||||
}
|
||||
|
||||
@@ -516,8 +516,8 @@ fopAc_ac_c* dAttCatch_c::convPId(unsigned int i_procID) {
|
||||
/* 8009FBBC-8009FBDC .text init__11dAttCatch_cFv */
|
||||
void dAttCatch_c::init() {
|
||||
field_0xc = 0x56;
|
||||
field_0x0 = -1;
|
||||
mCatghTargetID = -1;
|
||||
field_0x0 = fpcM_ERROR_PROCESS_ID_e;
|
||||
mCatghTargetID = fpcM_ERROR_PROCESS_ID_e;
|
||||
field_0x4 = 3;
|
||||
}
|
||||
|
||||
@@ -525,7 +525,7 @@ void dAttCatch_c::init() {
|
||||
void dAttCatch_c::proc() {
|
||||
mCatghTargetID = field_0x0;
|
||||
mChangeItem = field_0xc;
|
||||
field_0x0 = -1;
|
||||
field_0x0 = fpcM_ERROR_PROCESS_ID_e;
|
||||
field_0x4 = 3;
|
||||
field_0xc = 0x56;
|
||||
}
|
||||
|
||||
+11
-11
@@ -33,10 +33,10 @@ dCcD_GStts::dCcD_GStts() {
|
||||
mTgSpl = 0;
|
||||
mRoomId = 0;
|
||||
mActorPerfTblId = -1;
|
||||
mAtApid = -1;
|
||||
mAtOldApid = -1;
|
||||
mTgApid = -1;
|
||||
mTgOldApid = -1;
|
||||
mAtApid = fpcM_ERROR_PROCESS_ID_e;
|
||||
mAtOldApid = fpcM_ERROR_PROCESS_ID_e;
|
||||
mTgApid = fpcM_ERROR_PROCESS_ID_e;
|
||||
mTgOldApid = fpcM_ERROR_PROCESS_ID_e;
|
||||
field_0x1C = 0;
|
||||
}
|
||||
|
||||
@@ -46,19 +46,19 @@ void dCcD_GStts::Ct() {
|
||||
mTgSpl = 0;
|
||||
mRoomId = 0;
|
||||
mActorPerfTblId = -1;
|
||||
mAtApid = -1;
|
||||
mAtOldApid = -1;
|
||||
mTgApid = -1;
|
||||
mTgOldApid = -1;
|
||||
mAtApid = fpcM_ERROR_PROCESS_ID_e;
|
||||
mAtOldApid = fpcM_ERROR_PROCESS_ID_e;
|
||||
mTgApid = fpcM_ERROR_PROCESS_ID_e;
|
||||
mTgOldApid = fpcM_ERROR_PROCESS_ID_e;
|
||||
field_0x1C = 0;
|
||||
}
|
||||
|
||||
/* 800AB3BC-800AB3DC .text Move__10dCcD_GSttsFv */
|
||||
void dCcD_GStts::Move() {
|
||||
mAtOldApid = mAtApid;
|
||||
mAtApid = NULL;
|
||||
mAtApid = 0;
|
||||
mTgOldApid = mTgApid;
|
||||
mTgApid = NULL;
|
||||
mTgApid = 0;
|
||||
}
|
||||
|
||||
/* 800AB3DC-800AB46C .text Init__9dCcD_SttsFiiP10fopAc_ac_c */
|
||||
@@ -108,7 +108,7 @@ void dCcD_GObjTg::Set(const dCcD_SrcGObjTg& src) {
|
||||
mHitMark = src.mHitMark;
|
||||
mSpl = src.mSpl;
|
||||
mHitPos = cXyz::Zero;
|
||||
mShieldFrontRangeYAngle = NULL;
|
||||
mpShieldFrontRangeYAngle = NULL;
|
||||
}
|
||||
|
||||
/* 800AB520-800AB63C .text __ct__12dCcD_GObjInfFv */
|
||||
|
||||
@@ -148,14 +148,14 @@ u32 daIball_c::m_ib_actor[5];
|
||||
/* 800568D0-800568F8 .text init__9daIball_cFv */
|
||||
void daIball_c::init() {
|
||||
for (int i = 0; i < ARRAY_SIZE(m_ib_actor); i++) {
|
||||
m_ib_actor[i] = -1;
|
||||
m_ib_actor[i] = fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
}
|
||||
|
||||
/* 800568F8-80056944 .text regist__9daIball_cFP10fopAc_ac_c */
|
||||
void daIball_c::regist(fopAc_ac_c* i_actor) {
|
||||
for (int i = 0; i < ARRAY_SIZE(m_ib_actor); i++) {
|
||||
if (m_ib_actor[i] == -1) {
|
||||
if (m_ib_actor[i] == fpcM_ERROR_PROCESS_ID_e) {
|
||||
m_ib_actor[i] = fopAcM_GetID(i_actor);
|
||||
break;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ void daIball_c::regist(fopAc_ac_c* i_actor) {
|
||||
void daIball_c::remove(fopAc_ac_c* i_actor) {
|
||||
for (int i = 0; i < ARRAY_SIZE(m_ib_actor); i++) {
|
||||
if (m_ib_actor[i] == fopAcM_GetID(i_actor)) {
|
||||
m_ib_actor[i] = -1;
|
||||
m_ib_actor[i] = fpcM_ERROR_PROCESS_ID_e;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -174,9 +174,9 @@ void daIball_c::remove(fopAc_ac_c* i_actor) {
|
||||
|
||||
/* 80056990-80056A18 .text remove_old__9daIball_cFv */
|
||||
void daIball_c::remove_old() {
|
||||
u32 iball_id = -1;
|
||||
u32 iball_id = fpcM_ERROR_PROCESS_ID_e;
|
||||
for (int i = 0; i < ARRAY_SIZE(m_ib_actor); i++) {
|
||||
if (m_ib_actor[i] == -1) {
|
||||
if (m_ib_actor[i] == fpcM_ERROR_PROCESS_ID_e) {
|
||||
return;
|
||||
}
|
||||
if (m_ib_actor[i] < iball_id) {
|
||||
|
||||
@@ -281,7 +281,7 @@ void dEvDtStaff_c::specialProcMessage() {
|
||||
specialProc_WaitStart(staffIdx);
|
||||
break;
|
||||
case 1: // CREATE_MSG
|
||||
l_msgId = -1;
|
||||
l_msgId = fpcM_ERROR_PROCESS_ID_e;
|
||||
l_msg = NULL;
|
||||
u32* idata = dComIfGp_evmng_getMyIntegerP(staffIdx, "msgNo");
|
||||
JUT_ASSERT(0x1D2, idata);
|
||||
@@ -322,7 +322,7 @@ void dEvDtStaff_c::specialProcMessage() {
|
||||
switch (mWipeDirection) {
|
||||
case 0:
|
||||
l_msgId = fopMsgM_messageSet(l_msgNo);
|
||||
if (l_msgId != -1) {
|
||||
if (l_msgId != fpcM_ERROR_PROCESS_ID_e) {
|
||||
mWipeDirection++;
|
||||
}
|
||||
break;
|
||||
@@ -349,7 +349,7 @@ void dEvDtStaff_c::specialProcMessage() {
|
||||
dComIfGp_evmng_cutEnd(staffIdx);
|
||||
} else if (l_msg->mMode == 0x12) {
|
||||
l_msg->mMode = 0x13;
|
||||
l_msgId = -1;
|
||||
l_msgId = fpcM_ERROR_PROCESS_ID_e;
|
||||
l_msg = NULL;
|
||||
dComIfGp_evmng_cutEnd(staffIdx);
|
||||
}
|
||||
|
||||
+3
-3
@@ -128,7 +128,7 @@ dScnPly_msg_HIO_c::dScnPly_msg_HIO_c() {
|
||||
field_0x09 = 0;
|
||||
mGroup = 0;
|
||||
mID = 1;
|
||||
field_0x10 = -1;
|
||||
field_0x10 = fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
|
||||
dScnPly_msg_HIO_c g_msgDHIO;
|
||||
@@ -228,7 +228,7 @@ void dScnPly_msg_HIO_c::dScnPly_msg_HIO_messageProc() {
|
||||
dScnPly_msg_HIO_padCheck();
|
||||
|
||||
if (field_0x06) {
|
||||
if (field_0x10 == 0xFFFFFFFF) {
|
||||
if (field_0x10 == fpcM_ERROR_PROCESS_ID_e) {
|
||||
u32 msg_num = (mGroup << 0x10) | mID;
|
||||
cXyz sp10(0.0f, 0.0f, 0.0f);
|
||||
|
||||
@@ -246,7 +246,7 @@ void dScnPly_msg_HIO_c::dScnPly_msg_HIO_messageProc() {
|
||||
msg_p->mMode = 16;
|
||||
} else if (msg_p->mMode == 18) {
|
||||
msg_p->mMode = 19;
|
||||
field_0x10 = -1;
|
||||
field_0x10 = fpcM_ERROR_PROCESS_ID_e;
|
||||
field_0x06 = 0;
|
||||
mID++;
|
||||
}
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
#include "d/d_snap.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
|
||||
void (dSnap_packet::*dSnap_packet::m_judge_tbl[])() = {
|
||||
NULL,
|
||||
@@ -33,7 +33,7 @@ void dSnap_GetFigRoomId(int) {
|
||||
|
||||
/* 800CD00C-800CD068 .text __ct__9dSnap_ObjFv */
|
||||
dSnap_Obj::dSnap_Obj() {
|
||||
mBsPcId = -1;
|
||||
mBsPcId = fpcM_ERROR_PROCESS_ID_e;
|
||||
field_0x18 = 0;
|
||||
field_0x19 = 4;
|
||||
field_0x1a = -1;
|
||||
|
||||
Reference in New Issue
Block a user