mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-04 17:09:45 -04:00
zl1 cleanup, inline cleanup
This commit is contained in:
+1
-1
@@ -1667,7 +1667,7 @@ config.libs = [
|
||||
ActorRel(NonMatching, "d_a_npc_ds1"),
|
||||
ActorRel(NonMatching, "d_a_npc_gk1"),
|
||||
ActorRel(NonMatching, "d_a_npc_gp1"),
|
||||
ActorRel(Matching, "d_a_npc_hi1"),
|
||||
ActorRel(Matching, "d_a_npc_hi1"),
|
||||
ActorRel(Matching, "d_a_npc_ho"),
|
||||
ActorRel(Matching, "d_a_npc_hr"),
|
||||
ActorRel(Matching, "d_a_npc_jb1"),
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
bool chkAttention();
|
||||
void setAttention(bool);
|
||||
fopAc_ac_c* searchByID(fpc_ProcID);
|
||||
bool partner_srch_sub(void* (*)(void*, void*));
|
||||
bool partner_srch_sub(fpcLyIt_JudgeFunc);
|
||||
void partner_srch();
|
||||
u32 bm_movPass(bool);
|
||||
void bm_setFlyAnm();
|
||||
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
bool chk_talk();
|
||||
bool chk_parts_notMov();
|
||||
fopAc_ac_c* searchByID(fpc_ProcID, int*);
|
||||
bool partner_search_sub(void* (*)(void*, void*));
|
||||
bool partner_search_sub(fpcLyIt_JudgeFunc);
|
||||
void partner_search();
|
||||
void setEyeCtrl();
|
||||
void clrEyeCtrl();
|
||||
|
||||
@@ -26,7 +26,6 @@ public:
|
||||
|
||||
class daNpc_Zl1_c : public fopNpc_npc_c {
|
||||
public:
|
||||
|
||||
typedef int (daNpc_Zl1_c::*ActionFunc)(void*);
|
||||
|
||||
struct anm_prm_c {
|
||||
@@ -37,7 +36,6 @@ public:
|
||||
int mLoopMode;
|
||||
};
|
||||
|
||||
daNpc_Zl1_c();
|
||||
void _nodeCB_Head(J3DNode*, J3DModel*);
|
||||
void _nodeCB_BackBone(J3DNode*, J3DModel*);
|
||||
BOOL set_startPos(int);
|
||||
@@ -81,8 +79,8 @@ public:
|
||||
void checkOrder();
|
||||
bool chk_talk();
|
||||
bool chk_parts_notMov();
|
||||
fopAc_ac_c* searchByID(fpc_ProcID, int*);
|
||||
bool partner_search_sub(void* (*)(void*, void*));
|
||||
fopAc_ac_c* searchByID(fpc_ProcID, BOOL*);
|
||||
bool partner_search_sub(fpcLyIt_JudgeFunc);
|
||||
void partner_search();
|
||||
void setEyeCtrl();
|
||||
void clrEyeCtrl();
|
||||
@@ -120,7 +118,9 @@ public:
|
||||
BOOL cut_move_JMP_OFF();
|
||||
void cut_init_OMAMORI_ONOFF(int);
|
||||
BOOL cut_move_OMAMORI_ONOFF();
|
||||
#if VERSION > VERSION_DEMO
|
||||
void cut_init_SURPRISED(int);
|
||||
#endif
|
||||
BOOL cut_move_SURPRISED();
|
||||
void privateCut(int);
|
||||
void endEvent();
|
||||
@@ -163,6 +163,7 @@ public:
|
||||
BOOL bodyCreateHeap();
|
||||
BOOL itemCreateHeap();
|
||||
BOOL CreateHeap();
|
||||
|
||||
public:
|
||||
/* 0x6C4 */ request_of_phase_process_class mPhs;
|
||||
/* 0x6CC */ s8 m_hed_jnt_num;
|
||||
|
||||
@@ -8,17 +8,13 @@
|
||||
|
||||
typedef struct base_process_class base_process_class;
|
||||
|
||||
base_process_class* fpcEx_Search(fpcLyIt_JudgeFunc pFunc, void* pUserData);
|
||||
base_process_class* fpcEx_SearchByID(fpc_ProcID id);
|
||||
BOOL fpcEx_IsExist(fpc_ProcID id);
|
||||
s32 fpcEx_ToLineQ(base_process_class* pProc);
|
||||
BOOL fpcEx_ExecuteQTo(base_process_class* pProc);
|
||||
BOOL fpcEx_Execute(base_process_class* pProc);
|
||||
BOOL fpcEx_ToExecuteQ(base_process_class* pProc);
|
||||
void fpcEx_Handler(fpcLnIt_QueueFunc pFunc);
|
||||
|
||||
inline base_process_class* fpcM_Search(fpcLyIt_JudgeFunc pFunc, void* pUserData) {
|
||||
return fpcEx_Search(pFunc, pUserData);
|
||||
}
|
||||
base_process_class* fpcEx_Search(fpcLyIt_JudgeFunc i_judgeFunc, void* i_data);
|
||||
base_process_class* fpcEx_SearchByID(fpc_ProcID i_id);
|
||||
BOOL fpcEx_IsExist(fpc_ProcID i_id);
|
||||
s32 fpcEx_ToLineQ(base_process_class* i_proc);
|
||||
BOOL fpcEx_ExecuteQTo(base_process_class* i_proc);
|
||||
BOOL fpcEx_Execute(base_process_class* i_proc);
|
||||
BOOL fpcEx_ToExecuteQ(base_process_class* i_proc);
|
||||
void fpcEx_Handler(fpcLnIt_QueueFunc i_queueFunc);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -76,6 +76,10 @@ inline void* fpcM_LyJudge(process_node_class* i_node, fpcLyIt_JudgeFunc i_func,
|
||||
return fpcLyIt_Judge(&i_node->mLayer, i_func, i_data);
|
||||
}
|
||||
|
||||
inline base_process_class* fpcM_Search(fpcLyIt_JudgeFunc i_func, void* i_data) {
|
||||
return fpcEx_Search(i_func, i_data);
|
||||
}
|
||||
|
||||
inline s8 fpcM_CreateResult(void* pProc) {
|
||||
return ((base_process_class*)pProc)->mCreateResult;
|
||||
}
|
||||
|
||||
@@ -1078,7 +1078,7 @@ static BOOL daBgn3_Execute(bgn3_class* i_this) {
|
||||
if (l_HIO.m06 != 0) {
|
||||
actor->health = l_HIO.m06;
|
||||
}
|
||||
esa = (esa_class*)fpcEx_Search(esa_s_sub, i_this);
|
||||
esa = (esa_class*)fpcM_Search(esa_s_sub, i_this);
|
||||
if (bgn->m02B5 != 2) {
|
||||
i_this->m0FD8A = 10;
|
||||
actor->current.pos.x = 0.0f;
|
||||
|
||||
@@ -849,7 +849,7 @@ void* s_a_b_sub(void* ac1, void* ac2) {
|
||||
|
||||
/* 00002A8C-00002AB8 .text search_aite__FP12bridge_class */
|
||||
bridge_class* search_aite(bridge_class* i_this) {
|
||||
return (bridge_class*)fpcEx_Search(s_a_b_sub, &i_this->actor);
|
||||
return (bridge_class*)fpcM_Search(s_a_b_sub, &i_this->actor);
|
||||
}
|
||||
|
||||
/* 00002AB8-00003C68 .text daBridge_Execute__FP12bridge_class */
|
||||
|
||||
@@ -1004,7 +1004,7 @@ static void beam_attack(bst_class* i_this) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
f32 dist = fopAcM_searchActorDistance(actor, dComIfGp_getPlayer(0));
|
||||
f32 dist = fopAcM_searchPlayerDistance(actor);
|
||||
if (dist < REG0_F(9) + 500.0f || bVar3) {
|
||||
i_this->mRoomState = 8;
|
||||
i_this->mActionType = bst_class::ACTION_FLY_e;
|
||||
@@ -1486,7 +1486,7 @@ static void damage_check(bst_class* i_this) {
|
||||
scale.x = scale.y = scale.z = 2.0f;
|
||||
csXyz angle;
|
||||
angle.x = angle.z = 0;
|
||||
angle.y = fopAcM_searchActorAngleY(actor, dComIfGp_getPlayer(0));
|
||||
angle.y = fopAcM_searchPlayerAngleY(actor);
|
||||
dComIfGp_particle_set(dPa_name::ID_AK_JN_OK, hit_pos, &angle, &scale);
|
||||
dKy_SordFlush_set(*hit_pos, 1);
|
||||
}
|
||||
@@ -1516,7 +1516,7 @@ static void damage_check(bst_class* i_this) {
|
||||
scale.x = 2.0f;
|
||||
csXyz angle;
|
||||
angle.x = angle.z = 0;
|
||||
angle.y = fopAcM_searchActorAngleY(actor, dComIfGp_getPlayer(0));
|
||||
angle.y = fopAcM_searchPlayerAngleY(actor);
|
||||
dComIfGp_particle_set(dPa_name::ID_AK_JN_OK, hit_pos, &angle, &scale);
|
||||
dKy_SordFlush_set(*hit_pos, 1);
|
||||
i_this->mActionType = bst_class::ACTION_DAMAGE_e;
|
||||
|
||||
@@ -879,7 +879,7 @@ void daDaiocta_c::modeHideInit() {
|
||||
|
||||
/* 00001EB8-00001F34 .text modeHide__11daDaiocta_cFv */
|
||||
void daDaiocta_c::modeHide() {
|
||||
f32 dist_xz = fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0));
|
||||
f32 dist_xz = fopAcM_searchPlayerDistanceXZ(this);
|
||||
if ((dist_xz < mAppearRadius || dist_xz < l_HIO.mMinAppearRadius) &&
|
||||
dComIfGp_checkPlayerStatus0(0, daPyStts0_SHIP_RIDE_e)) {
|
||||
modeProc(PROC_INIT_e, MODE_APPEAR);
|
||||
@@ -967,7 +967,7 @@ void daDaiocta_c::modeAppear() {
|
||||
if (dist <= 0.1) {
|
||||
modeProc(PROC_INIT_e, MODE_WAIT);
|
||||
} else {
|
||||
s16 target = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0));
|
||||
s16 target = fopAcM_searchPlayerAngleY(this);
|
||||
cLib_addCalcAngleS2(&shape_angle.y, target, 4, l_HIO.m010);
|
||||
}
|
||||
}
|
||||
@@ -1400,8 +1400,8 @@ bool daDaiocta_c::_execute() {
|
||||
mBrkAnm2.play();
|
||||
mBtkAnm.play();
|
||||
#endif
|
||||
f32 dist = fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0));
|
||||
s16 angle_y = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0));
|
||||
f32 dist = fopAcM_searchPlayerDistanceXZ(this);
|
||||
s16 angle_y = fopAcM_searchPlayerAngleY(this);
|
||||
s32 dist_angle_s = cLib_distanceAngleS(shape_angle.y + l_HIO.m014, angle_y);
|
||||
if (dist < l_HIO.m084 &&
|
||||
mMode != MODE_DEMO &&
|
||||
|
||||
@@ -104,7 +104,7 @@ static void move(fgmahou_class* i_this) {
|
||||
|
||||
if(i_this->mAtSph.ChkAtHit()) {
|
||||
i_this->mAtSph.GetAtHitObj();
|
||||
fganon_class* fganon = (fganon_class*)fpcEx_Search(boss_s_sub, i_this);
|
||||
fganon_class* fganon = (fganon_class*)fpcM_Search(boss_s_sub, i_this);
|
||||
if(fganon != NULL) {
|
||||
fganon->m68B = 1;
|
||||
|
||||
@@ -123,7 +123,7 @@ static void move(fgmahou_class* i_this) {
|
||||
|
||||
i_this->mState = 5;
|
||||
case 5:
|
||||
fganon2 = (fganon_class*)fpcEx_Search(boss_s_sub, i_this);
|
||||
fganon2 = (fganon_class*)fpcM_Search(boss_s_sub, i_this);
|
||||
if(fganon2 == NULL) {
|
||||
i_this->field_0x780 = 0x32;
|
||||
break;
|
||||
|
||||
+10
-10
@@ -575,8 +575,8 @@ fopAc_ac_c* daFm_c::searchNearOtherActor(fopAc_ac_c* i_actor) {
|
||||
} else if(fopAcM_GetName(i_actor) == fpcNm_TSUBO_e) {
|
||||
daPy_lk_c* pLink = daPy_getPlayerLinkActorClass();
|
||||
|
||||
f32 dist2 = fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0));
|
||||
f32 dist3 = fopAcM_searchActorDistanceXZ(i_actor, dComIfGp_getPlayer(0));
|
||||
f32 dist2 = fopAcM_searchPlayerDistanceXZ(this);
|
||||
f32 dist3 = fopAcM_searchPlayerDistanceXZ(i_actor);
|
||||
|
||||
if(dist2 < l_HIO.field_0x0E8) {
|
||||
if(dist3 > REG12_F(0) + 80.0f || fopAcM_GetID(i_actor) == pLink->getGrabActorID()) {
|
||||
@@ -652,7 +652,7 @@ void daFm_c::moveRndBack() {
|
||||
|
||||
/* 00001384-000015F8 .text moveRndEscape__6daFm_cFv */
|
||||
void daFm_c::moveRndEscape() {
|
||||
f32 dist = fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0));
|
||||
f32 dist = fopAcM_searchPlayerDistanceXZ(this);
|
||||
|
||||
if(cLib_calcTimer(&field_0x648) == 0 || field_0xAE4 == 0 || mObjAcch.ChkWallHit()) {
|
||||
if(dist < l_HIO.field_0x0B4) {
|
||||
@@ -1392,7 +1392,7 @@ void daFm_c::modeDisappear() {
|
||||
if(field_0x2E4 != 0 || field_0x2E5) {
|
||||
modeProc(PROC_INIT_e, 0x12);
|
||||
} else {
|
||||
fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0));
|
||||
fopAcM_searchPlayerDistanceXZ(this);
|
||||
if(isGrabFoot() && !dComIfGp_event_runCheck()) {
|
||||
modeProc(PROC_INIT_e, 0xf);
|
||||
} else {
|
||||
@@ -1589,7 +1589,7 @@ void daFm_c::modeAttack() {
|
||||
}
|
||||
modeProcInit(0xD);
|
||||
} else {
|
||||
f32 temp3 = fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0));
|
||||
f32 temp3 = fopAcM_searchPlayerDistanceXZ(this);
|
||||
daPy_lk_c* pLink = (daPy_lk_c*)daPy_getPlayerLinkActorClass();
|
||||
|
||||
if ((temp3 > l_HIO.field_0x0BC ||
|
||||
@@ -1772,7 +1772,7 @@ void daFm_c::modeGrabFootDemo() {
|
||||
pLink->changeOriginalDemo();
|
||||
|
||||
if(mAnmPrmIdx != 10) {
|
||||
if(fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0)) < 3.0f) {
|
||||
if(fopAcM_searchPlayerDistanceXZ(this) < 3.0f) {
|
||||
setAnm(10, false);
|
||||
} else {
|
||||
cLib_addCalcPosXZ2(&field_0x630, current.pos, 0.3f, 10.0f);
|
||||
@@ -1907,16 +1907,16 @@ void daFm_c::modeGrab() {
|
||||
cLib_addCalcAngleS2(&shape_angle.y, angle, 4, l_HIO.field_0x096);
|
||||
}
|
||||
} else {
|
||||
dist = fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0));
|
||||
dist = fopAcM_searchPlayerDistanceXZ(this);
|
||||
if (field_0x2D0 == 2 && isNpc(mpActorTarget) && dist < l_HIO.field_0x0C4) {
|
||||
fopAcM_Search(searchNearFm_CB, this);
|
||||
if (field_0x3E4.absXZ() != 0.0f) {
|
||||
angle = cLib_targetAngleY(¤t.pos, &field_0x3E4);
|
||||
} else {
|
||||
angle = (s16)fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0));
|
||||
angle = (s16)fopAcM_searchPlayerAngleY(this);
|
||||
}
|
||||
} else {
|
||||
angle = (s16)fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0));
|
||||
angle = (s16)fopAcM_searchPlayerAngleY(this);
|
||||
}
|
||||
cLib_addCalcAngleS2(&shape_angle.y, angle, 4, 0x800);
|
||||
}
|
||||
@@ -1960,7 +1960,7 @@ void daFm_c::modeGrab() {
|
||||
modeProcInit(0x10);
|
||||
}
|
||||
} else {
|
||||
dist = fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0));
|
||||
dist = fopAcM_searchPlayerDistanceXZ(this);
|
||||
if (dist < l_HIO.field_0x0B4 && field_0x2D0 == 2) {
|
||||
angle = cLib_targetAngleY(¤t.pos, &field_0x3E4);
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ static BOOL useHeapInit(fopAc_ac_c* a_this) {
|
||||
0,
|
||||
-1,
|
||||
0x1,
|
||||
(void*)dComIfG_getObjectRes("Kamome", dRes_INDEX_KAMOME_BAS_KA_WAIT1_e),
|
||||
dComIfG_getObjectRes("Kamome", dRes_INDEX_KAMOME_BAS_KA_WAIT1_e),
|
||||
0x80000,
|
||||
0x11000002
|
||||
);
|
||||
|
||||
@@ -126,7 +126,7 @@ void* item_tag_search(void* param_1, void* param_2) {
|
||||
|
||||
/* 00000B60-00000B9C .text search_get_esa__FP8kb_class */
|
||||
void* search_get_esa(kb_class* i_this) {
|
||||
void* pProc = fpcEx_Search(esa_search_sub, i_this);
|
||||
void* pProc = fpcM_Search(esa_search_sub, i_this);
|
||||
if(pProc) {
|
||||
return pProc;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ void* search_get_esa(kb_class* i_this) {
|
||||
|
||||
/* 00000B9C-00000BD8 .text search_get_item__FP8kb_class */
|
||||
daTagKbItem_c* search_get_item(kb_class* i_this) {
|
||||
void* pProc = fpcEx_Search(item_tag_search, i_this);
|
||||
void* pProc = fpcM_Search(item_tag_search, i_this);
|
||||
if(pProc) {
|
||||
return (daTagKbItem_c*)pProc;
|
||||
}
|
||||
|
||||
@@ -1205,7 +1205,7 @@ void action_tubo_search(ks_class* i_this) {
|
||||
case 50: {
|
||||
i_this->mKsID = fpcM_ERROR_PROCESS_ID_e;
|
||||
|
||||
fpcEx_Search(tsubo_search, actor);
|
||||
fpcM_Search(tsubo_search, actor);
|
||||
|
||||
if (i_this->mKsID == fpcM_ERROR_PROCESS_ID_e) {
|
||||
fopAcM_delete(actor);
|
||||
|
||||
@@ -213,7 +213,7 @@ static BOOL createHeapCallBack(fopAc_ac_c* i_ac) {
|
||||
|
||||
/* 00000A58-00000B4C .text execCreateWait__9daLodbg_cFv */
|
||||
BOOL daLodbg_c::execCreateWait() {
|
||||
f32 dist = fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0));
|
||||
f32 dist = fopAcM_searchPlayerDistanceXZ(this);
|
||||
if (dist > scale.x)
|
||||
return TRUE;
|
||||
|
||||
@@ -271,7 +271,7 @@ BOOL daLodbg_c::execReadWait() {
|
||||
BOOL daLodbg_c::execDeleteWait() {
|
||||
if (heap != NULL) {
|
||||
#if VERSION != VERSION_PAL
|
||||
f32 dist = fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0));
|
||||
f32 dist = fopAcM_searchPlayerDistanceXZ(this);
|
||||
#else
|
||||
// TODO: inline for this?
|
||||
cXyz delta = g_dComIfG_gameInfo.play.mCurrentView->mLookat.mEye - current.pos;
|
||||
|
||||
@@ -1881,7 +1881,7 @@ fopAc_ac_c* daNpc_Bm1_c::searchByID(fpc_ProcID i_procID) {
|
||||
}
|
||||
|
||||
/* 00003664-00003714 .text partner_srch_sub__11daNpc_Bm1_cFPFPvPv_Pv */
|
||||
bool daNpc_Bm1_c::partner_srch_sub(void* (*i_searchFunc)(void*, void*)) {
|
||||
bool daNpc_Bm1_c::partner_srch_sub(fpcLyIt_JudgeFunc i_searchFunc) {
|
||||
bool o_retval = false;
|
||||
mPartnerProcID = -1;
|
||||
l_check_wrk = 0;
|
||||
|
||||
@@ -1269,7 +1269,7 @@ void daNpc_Cb1_c::evInitOffsetLink(int staffIdx) {
|
||||
cLib_offsetPos(¤t.pos, &pLink->current.pos, pPlayer->shape_angle.y, pFrom);
|
||||
}
|
||||
|
||||
current.angle.y = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0));
|
||||
current.angle.y = fopAcM_searchPlayerAngleY(this);
|
||||
shape_angle.y = current.angle.y;
|
||||
}
|
||||
|
||||
@@ -1355,7 +1355,7 @@ BOOL daNpc_Cb1_c::evActWalk(int staffIdx) {
|
||||
void daNpc_Cb1_c::evInitToLink(int) {
|
||||
setAnm(ANM_01);
|
||||
speedF = 0.0f;
|
||||
current.angle.y = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0));
|
||||
current.angle.y = fopAcM_searchPlayerAngleY(this);
|
||||
shape_angle.y = current.angle.y;
|
||||
}
|
||||
|
||||
@@ -1366,14 +1366,14 @@ BOOL daNpc_Cb1_c::evActToLink(int staffIdx) {
|
||||
|
||||
JUT_ASSERT(VERSION_SELECT(2131, 2144, 2149, 2149), speed_p != NULL && dist_p != NULL);
|
||||
|
||||
if(fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0)) < *dist_p) {
|
||||
if(fopAcM_searchPlayerDistanceXZ(this) < *dist_p) {
|
||||
setAnm(ANM_00);
|
||||
speedF = 0.0f;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
walkAction(*speed_p, l_HIO.mForwardAccel, fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0)));
|
||||
walkAction(*speed_p, l_HIO.mForwardAccel, fopAcM_searchPlayerAngleY(this));
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -1729,7 +1729,7 @@ BOOL daNpc_Cb1_c::waitNpcAction(void* param_1) {
|
||||
cLib_offBit<u32>(attention_info.flags, fopAc_Attn_ACTION_SPEAK_e | fopAc_Attn_LOCKON_TALK_e);
|
||||
}
|
||||
|
||||
f32 dist_sq = fopAcM_searchActorDistance2(this, dComIfGp_getPlayer(0));
|
||||
f32 dist_sq = fopAcM_searchPlayerDistance2(this);
|
||||
|
||||
if(!checkNpcCallCommand()) {
|
||||
if(dComIfGs_isEventBit(dSv_event_flag_c::UNK_1610) && dist_sq < SQUARE(l_HIO.field_0xC0)) {
|
||||
|
||||
@@ -604,7 +604,7 @@ void daNpc_Fa1_c::init_hover_move() {
|
||||
void daNpc_Fa1_c::hover_move() {
|
||||
position_move(l_HIO.m78.prm.m10, l_HIO.m78.prm.m08);
|
||||
BGCheck();
|
||||
s16 target = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0));
|
||||
s16 target = fopAcM_searchPlayerAngleY(this);
|
||||
cLib_addCalcAngleS(¤t.angle.y, target, 8, 0x2000, 0x400);
|
||||
}
|
||||
|
||||
|
||||
@@ -3278,7 +3278,7 @@ void daNpc_Ji1_c::battleSubActionWaitInit() {
|
||||
/* 0000A430-0000A564 .text battleSubActionWait__11daNpc_Ji1_cFv */
|
||||
BOOL daNpc_Ji1_c::battleSubActionWait() {
|
||||
if(--field_0xC30 < 0) {
|
||||
f32 dist = fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0));
|
||||
f32 dist = fopAcM_searchPlayerDistanceXZ(this);
|
||||
f32 rnd = cM_rndF(10.0f);
|
||||
|
||||
if(rnd > 3.3f || dist > 100.0f) {
|
||||
|
||||
@@ -1266,7 +1266,7 @@ fopAc_ac_c* daNpc_Ls1_c::searchByID(fpc_ProcID i_PID, int* param_2) {
|
||||
}
|
||||
|
||||
/* 000020A4-00002154 .text partner_search_sub__11daNpc_Ls1_cFPFPvPv_Pv */
|
||||
bool daNpc_Ls1_c::partner_search_sub(void* (*i_funcP)(void*, void*)) {
|
||||
bool daNpc_Ls1_c::partner_search_sub(fpcLyIt_JudgeFunc i_judgeFunc) {
|
||||
bool result = false;
|
||||
mBm1ProcID = fpcM_ERROR_PROCESS_ID_e;
|
||||
|
||||
@@ -1275,7 +1275,7 @@ bool daNpc_Ls1_c::partner_search_sub(void* (*i_funcP)(void*, void*)) {
|
||||
l_check_inf[i] = NULL;
|
||||
}
|
||||
|
||||
fpcEx_Search(i_funcP, this);
|
||||
fpcM_Search(i_judgeFunc, this);
|
||||
|
||||
if (l_check_wrk != 0) {
|
||||
mBm1ProcID = fpcM_GetID(l_check_inf[0]);
|
||||
@@ -1695,7 +1695,7 @@ void daNpc_Ls1_c::setStt(s8 param_1) {
|
||||
mTelescopeScale = 1.0f;
|
||||
break;
|
||||
case 5:
|
||||
fpcEx_Search(searchActor_kamome_Set_NOSTOP_DEMO, this);
|
||||
fpcM_Search(searchActor_kamome_Set_NOSTOP_DEMO, this);
|
||||
m850 = 0;
|
||||
m84B = 0xFF;
|
||||
mMesgAnimeTag = 0xFF;
|
||||
@@ -2105,7 +2105,7 @@ BOOL daNpc_Ls1_c::talk_1() {
|
||||
eventInfo.mEventId = -1;
|
||||
break;
|
||||
}
|
||||
fpcEx_Search(searchActor_kamome_Clr_NOSTOP_DEMO, this);
|
||||
fpcM_Search(searchActor_kamome_Clr_NOSTOP_DEMO, this);
|
||||
mItemNo = 0xFF;
|
||||
m83F = false;
|
||||
setStt(m852);
|
||||
|
||||
+33
-32
@@ -7,7 +7,9 @@
|
||||
#include "d/actor/d_a_npc_zl1.h"
|
||||
#include "d/actor/d_a_ship.h"
|
||||
#include "d/actor/d_a_branch.h"
|
||||
#if VERSION > VERSION_DEMO
|
||||
#include "d/d_bg_s_func.h"
|
||||
#endif
|
||||
#include "d/d_bg_s_roof_chk.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
@@ -209,8 +211,8 @@ static BOOL CheckCreateHeap(fopAc_ac_c* ac) {
|
||||
}
|
||||
|
||||
/* 00000548-000005C0 .text searchActor_Branch__FPvPv */
|
||||
void* searchActor_Branch(void* i_param1, void*) {
|
||||
if(l_check_wrk < 20 && fopAcM_IsActor(i_param1) && fopAcM_GetName(i_param1) == fpcNm_BRANCH_e) {
|
||||
static void* searchActor_Branch(void* i_param1, void*) {
|
||||
if(l_check_wrk < ARRAY_SSIZE(l_check_inf) && fopAcM_IsActor(i_param1) && fopAcM_GetName(i_param1) == fpcNm_BRANCH_e) {
|
||||
l_check_inf[l_check_wrk] = (fopAc_ac_c*)i_param1;
|
||||
l_check_wrk++;
|
||||
}
|
||||
@@ -218,8 +220,8 @@ void* searchActor_Branch(void* i_param1, void*) {
|
||||
}
|
||||
|
||||
/* 000005C0-00000638 .text searchActor_Bm1__FPvPv */
|
||||
void* searchActor_Bm1(void* i_param1, void*) {
|
||||
if(l_check_wrk < 20 && fopAcM_IsActor(i_param1) && fopAcM_GetName(i_param1) == fpcNm_NPC_BM1_e) {
|
||||
static void* searchActor_Bm1(void* i_param1, void*) {
|
||||
if(l_check_wrk < ARRAY_SSIZE(l_check_inf) && fopAcM_IsActor(i_param1) && fopAcM_GetName(i_param1) == fpcNm_NPC_BM1_e) {
|
||||
l_check_inf[l_check_wrk] = (fopAc_ac_c*)i_param1;
|
||||
l_check_wrk++;
|
||||
}
|
||||
@@ -519,10 +521,7 @@ bool daNpc_Zl1_c::swoon_OnShip() {
|
||||
|
||||
/* 000011EC-000013A0 .text setMtx__11daNpc_Zl1_cFb */
|
||||
void daNpc_Zl1_c::setMtx(bool param_1) {
|
||||
|
||||
bool temp = false;
|
||||
int temp2;
|
||||
daBranch_c* actor;
|
||||
|
||||
mpMorf->getModel()->setBaseScale(scale);
|
||||
|
||||
@@ -530,23 +529,24 @@ void daNpc_Zl1_c::setMtx(bool param_1) {
|
||||
#if VERSION > VERSION_DEMO
|
||||
if(!fpcM_IsCreating(mProcId1)) {
|
||||
if(mProcId1 != fpcM_ERROR_PROCESS_ID_e) {
|
||||
fopAc_ac_c* actor;
|
||||
if(fopAcM_SearchByID(mProcId1, (fopAc_ac_c **)&actor) == 1) {
|
||||
if(actor != NULL) {
|
||||
daBranch_c* branch = (daBranch_c*)actor;
|
||||
temp = true;
|
||||
mDoMtx_stack_c::copy(actor->getJointMtx("wood2"));
|
||||
mDoMtx_stack_c::copy(branch->getJointMtx("wood2"));
|
||||
mDoMtx_stack_c::transM(120.28999f, -88.36f, -19.130001f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
actor = (daBranch_c*)searchByID(mProcId1, &temp2);
|
||||
if(actor != NULL) {
|
||||
if(temp2 == 0) {
|
||||
BOOL wasDeleted;
|
||||
daBranch_c* branch = (daBranch_c*)searchByID(mProcId1, &wasDeleted);
|
||||
if(branch != NULL && !wasDeleted) {
|
||||
temp = true;
|
||||
mDoMtx_stack_c::copy(actor->getJointMtx("wood2"));
|
||||
mDoMtx_stack_c::copy(branch->getJointMtx("wood2"));
|
||||
mDoMtx_stack_c::transM(120.28999f, -88.36f, -19.130001f);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else if(field_0x7CA) {
|
||||
@@ -1119,27 +1119,27 @@ bool daNpc_Zl1_c::chk_parts_notMov() {
|
||||
}
|
||||
|
||||
/* 00002358-000023AC .text searchByID__11daNpc_Zl1_cFUiPi */
|
||||
fopAc_ac_c* daNpc_Zl1_c::searchByID(fpc_ProcID pid, int* param_2) {
|
||||
fopAc_ac_c* daNpc_Zl1_c::searchByID(fpc_ProcID pid, BOOL* o_wasDeleted) {
|
||||
fopAc_ac_c* actor = NULL;
|
||||
*param_2 = 0;
|
||||
*o_wasDeleted = FALSE;
|
||||
|
||||
if(!fopAcM_SearchByID(pid, &actor)) {
|
||||
*param_2 = 1;
|
||||
*o_wasDeleted = TRUE;
|
||||
}
|
||||
return actor;
|
||||
}
|
||||
|
||||
/* 000023AC-0000245C .text partner_search_sub__11daNpc_Zl1_cFPFPvPv_Pv */
|
||||
bool daNpc_Zl1_c::partner_search_sub(void* (*param_1)(void*, void*)) {
|
||||
bool daNpc_Zl1_c::partner_search_sub(fpcLyIt_JudgeFunc i_judgeFunc) {
|
||||
bool ret = false;
|
||||
mProcId1 = fpcM_ERROR_PROCESS_ID_e;
|
||||
|
||||
l_check_wrk = 0;
|
||||
for (s32 i = 0; i < 0x14; i++) {
|
||||
for (s32 i = 0; i < ARRAY_SSIZE(l_check_inf); i++) {
|
||||
l_check_inf[i] = NULL;
|
||||
}
|
||||
|
||||
fpcEx_Search(param_1, this);
|
||||
fpcM_Search(i_judgeFunc, this);
|
||||
|
||||
if(l_check_wrk != 0) {
|
||||
mProcId1 = fopAcM_GetID(l_check_inf[0]);
|
||||
@@ -1195,8 +1195,6 @@ void daNpc_Zl1_c::clrEyeCtrl() {
|
||||
|
||||
/* 00002560-000027CC .text lookBack__11daNpc_Zl1_cFv */
|
||||
void daNpc_Zl1_c::lookBack() {
|
||||
s8 temp2;
|
||||
int temp6;
|
||||
cXyz temp3;
|
||||
|
||||
field_0x794.y = m_jnt.getHead_y();
|
||||
@@ -1210,6 +1208,7 @@ void daNpc_Zl1_c::lookBack() {
|
||||
|
||||
cXyz* temp4 = NULL;
|
||||
s16 targetY = current.angle.y;
|
||||
s8 temp2;
|
||||
bool temp5 = field_0x7D8;
|
||||
|
||||
temp2 = field_0x84D;
|
||||
@@ -1234,8 +1233,9 @@ void daNpc_Zl1_c::lookBack() {
|
||||
field_0x7D0 = false;
|
||||
break;
|
||||
case 4: {
|
||||
fopAc_ac_c* actor = searchByID(mProcId2, &temp6);
|
||||
if(actor != NULL && temp6 == 0) {
|
||||
BOOL wasDeleted;
|
||||
fopAc_ac_c* actor = searchByID(mProcId2, &wasDeleted);
|
||||
if(actor != NULL && !wasDeleted) {
|
||||
field_0x758.set(actor->current.pos);
|
||||
field_0x758.y = actor->eyePos.y;
|
||||
temp3.set(field_0x758);
|
||||
@@ -1453,8 +1453,8 @@ BOOL daNpc_Zl1_c::cut_move_LOK_PLYER() {
|
||||
void daNpc_Zl1_c::cut_init_LOK_PARTNER(int i_staffIdx) {
|
||||
int* pPrm0 = dComIfGp_evmng_getMyIntegerP(i_staffIdx, "prm_0");
|
||||
int temp = 0;
|
||||
int temp2;
|
||||
if(searchByID(mProcId1, &temp2) != NULL || temp2 == 0) {
|
||||
BOOL wasDeleted;
|
||||
if(searchByID(mProcId1, &wasDeleted) != NULL || !wasDeleted) {
|
||||
field_0x84D = 4;
|
||||
|
||||
mProcId2 = mProcId1;
|
||||
@@ -1496,10 +1496,10 @@ BOOL daNpc_Zl1_c::cut_move_CHG_ANM_ATR() {
|
||||
|
||||
/* 00002E90-00002F28 .text cut_init_PLYER_TRN_PARTNER__11daNpc_Zl1_cFi */
|
||||
void daNpc_Zl1_c::cut_init_PLYER_TRN_PARTNER(int) {
|
||||
int temp;
|
||||
BOOL wasDeleted;
|
||||
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
|
||||
fopAc_ac_c* pActor = searchByID(mProcId1, &temp);
|
||||
if(pActor != NULL || temp == 0) {
|
||||
fopAc_ac_c* pActor = searchByID(mProcId1, &wasDeleted);
|
||||
if(pActor != NULL || !wasDeleted) {
|
||||
dComIfGp_event_setItemPartner(pActor);
|
||||
dComIfGp_event_setTalkPartner(pActor);
|
||||
player->changeDemoMoveAngle(cLib_targetAngleY(&dComIfGp_getPlayer(0)->current.pos, &pActor->current.pos));
|
||||
@@ -1666,11 +1666,13 @@ BOOL daNpc_Zl1_c::cut_move_OMAMORI_ONOFF() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
/* 000034DC-0000356C .text cut_init_SURPRISED__11daNpc_Zl1_cFi */
|
||||
void daNpc_Zl1_c::cut_init_SURPRISED(int) {
|
||||
mDoAud_seStart(JA_SE_ITM_OMAMORI_BLINK);
|
||||
dComIfGp_getVibration().StartShock(4, 1, cXyz(0.0f, 1.0f, 0.0f));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 0000356C-00003574 .text cut_move_SURPRISED__11daNpc_Zl1_cFv */
|
||||
BOOL daNpc_Zl1_c::cut_move_SURPRISED() {
|
||||
@@ -2267,7 +2269,7 @@ BOOL daNpc_Zl1_c::demo_4() {
|
||||
/* 00005718-00005954 .text optn_1__11daNpc_Zl1_cFv */
|
||||
BOOL daNpc_Zl1_c::optn_1() {
|
||||
f32 temp = l_HIO.mPrmTbl.field_34 + 100.0f;
|
||||
f32 actorDist = fopAcM_searchActorDistance2(this, dComIfGp_getPlayer(0));
|
||||
f32 actorDist = fopAcM_searchPlayerDistance2(this);
|
||||
if(field_0x7D7) {
|
||||
if(chk_talk()) {
|
||||
setStt(2);
|
||||
@@ -2331,7 +2333,7 @@ BOOL daNpc_Zl1_c::optn_2() {
|
||||
}
|
||||
|
||||
|
||||
f32 actorDist = fopAcM_searchActorDistance2(this, dComIfGp_getPlayer(0));
|
||||
f32 actorDist = fopAcM_searchPlayerDistance2(this);
|
||||
|
||||
f32 temp = actorDist - (l_HIO.mPrmTbl.field_34 * l_HIO.mPrmTbl.field_34);
|
||||
f32 temp2 = 0.0f;
|
||||
@@ -2342,7 +2344,7 @@ BOOL daNpc_Zl1_c::optn_2() {
|
||||
temp2 = cLib_maxLimit(temp2, l_HIO.mPrmTbl.field_3C);
|
||||
}
|
||||
|
||||
s16 angle = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0));
|
||||
s16 angle = fopAcM_searchPlayerAngleY(this);
|
||||
cLib_addCalcAngleS(¤t.angle.y, angle, 4, 0x800, 0x80);
|
||||
cLib_chaseF(&speedF, temp2, l_HIO.mPrmTbl.field_44);
|
||||
if((int)temp2 == 0 && (int)speedF == 0) {
|
||||
@@ -2911,7 +2913,6 @@ cPhs_State daNpc_Zl1_c::_create() {
|
||||
}
|
||||
return state;
|
||||
}
|
||||
daNpc_Zl1_c::daNpc_Zl1_c() {}
|
||||
|
||||
/* 000073EC-000077C8 .text bodyCreateHeap__11daNpc_Zl1_cFv */
|
||||
BOOL daNpc_Zl1_c::bodyCreateHeap() {
|
||||
|
||||
@@ -68,8 +68,8 @@ void nzg_00_move(nzg_class* i_this) {
|
||||
parameters |= 0x100;
|
||||
}
|
||||
|
||||
if (parameters & 0x100 || fopAcM_searchActorDistance(actor, dComIfGp_getPlayer(0)) < i_this->m2CC * 0.5f) {
|
||||
if (fopAcM_searchActorDistance(actor, dComIfGp_getPlayer(0)) > i_this->m2D0 * 0.5f) {
|
||||
if (parameters & 0x100 || fopAcM_searchPlayerDistance(actor) < i_this->m2CC * 0.5f) {
|
||||
if (fopAcM_searchPlayerDistance(actor) > i_this->m2D0 * 0.5f) {
|
||||
parameters |= 1;
|
||||
csXyz child_angle = actor->current.angle;
|
||||
|
||||
|
||||
@@ -415,7 +415,7 @@ bool daObjPirateship::Act_c::_execute() {
|
||||
|
||||
if (!demo_move()) {
|
||||
if (l_HIO.m05 == 0 && m4A8 != NULL) {
|
||||
dLib_pathMove(¤t.pos, &m4A4, m4A8, 3.0f, path_move_call_back, (void*)this);
|
||||
dLib_pathMove(¤t.pos, &m4A4, m4A8, 3.0f, path_move_call_back, this);
|
||||
if (m32E > 0x4000 || m32E < -0x4000) {
|
||||
cLib_addCalcAngleS2(&m330, l_HIO.m12, 0x10, 0x300);
|
||||
} else {
|
||||
|
||||
@@ -233,7 +233,7 @@ void daObjVmc::Act_c::daObjVmc_base_main() {
|
||||
#endif
|
||||
cLib_offBit<u32>(attention_info.flags, fopAc_Attn_UNK10000000_e);
|
||||
mState = STATE_TREE_DEMO_WAIT;
|
||||
shape_angle.y = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0)) + 0x1800;
|
||||
shape_angle.y = fopAcM_searchPlayerAngleY(this) + 0x1800;
|
||||
mTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ void daObj_Warpt_c::_ride(fopAc_ac_c* arg1) {
|
||||
if (fpcM_GetName(arg1) == fpcNm_PLAYER_e) {
|
||||
daPy_py_c* player = (daPy_py_c*)arg1;
|
||||
|
||||
fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0));
|
||||
fopAcM_searchPlayerAngleY(this);
|
||||
dLib_checkPlayerInCircle(m830, 1.0f, 20.0f);
|
||||
|
||||
if (l_HIO.m06 == 0) {
|
||||
|
||||
@@ -202,7 +202,7 @@ bool daOship_c::lineCheck(cXyz* param_1, cXyz* param_2) {
|
||||
|
||||
/* 000008F8-00000990 .text changeModeByRange__9daOship_cFv */
|
||||
void daOship_c::changeModeByRange() {
|
||||
f32 search_ac_dist = fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0));
|
||||
f32 search_ac_dist = fopAcM_searchPlayerDistanceXZ(this);
|
||||
Mode_e proc_no;
|
||||
|
||||
if (search_ac_dist < l_HIO.mDistRangeA) {
|
||||
@@ -470,7 +470,7 @@ void daOship_c::setMtx() {
|
||||
dLib_waveRot(¤t.pos, sway, &mWave);
|
||||
|
||||
s16 temp_r30 = f32(mAttackSwayAmount * (REG12_S(5) + 10)) * cM_ssin(mAttackSwayTimer);
|
||||
s16 temp_r0 = shape_angle.y + fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0));
|
||||
s16 temp_r0 = shape_angle.y + fopAcM_searchPlayerAngleY(this);
|
||||
s16 temp_r4 = f32(temp_r30) * cM_scos(temp_r0);
|
||||
s16 temp_r3 = f32(temp_r30) * cM_ssin(temp_r0);
|
||||
|
||||
@@ -655,7 +655,7 @@ void daOship_c::modeAttackInit() {
|
||||
target_dist = 0.0f;
|
||||
}
|
||||
|
||||
s16 angle = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0));
|
||||
s16 angle = fopAcM_searchPlayerAngleY(this);
|
||||
|
||||
mTargetPos.x -= target_dist * cM_ssin(angle);
|
||||
mTargetPos.z -= target_dist * cM_scos(angle);
|
||||
@@ -855,11 +855,11 @@ bool daOship_c::_execute() {
|
||||
|
||||
if (fopAcM_GetSpeedF(this) <= 2.0f ||
|
||||
cull_box_check ||
|
||||
fopAcM_searchActorDistanceXZ(this, dComIfGp_getPlayer(0)) > 18000.0f) {
|
||||
fopAcM_searchPlayerDistanceXZ(this) > 18000.0f) {
|
||||
mWaveCallback2.remove();
|
||||
mWaveCallback1.remove();
|
||||
mSplashCallback.remove();
|
||||
mTrackCallback.stop();
|
||||
mTrackCallback.stop();
|
||||
} else {
|
||||
setWave();
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ void* findObjectCallBack(fopAc_ac_c* actor, void* v_this) {
|
||||
|
||||
/* 00000C78-00000CAC .text moveBoxCheck__12daTag_Hint_cFv */
|
||||
BOOL daTag_Hint_c::moveBoxCheck() {
|
||||
if (fopAcM_Search((void* (*)(void*, void*))findObjectCallBack, (void*)this) != NULL) {
|
||||
if (fopAcM_Search((fpcLyIt_JudgeFunc)findObjectCallBack, this) != NULL) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
||||
@@ -68,7 +68,7 @@ void dMagma_ballBoss_c::setup(f32 param_1, u8 param_2, int param_3) {
|
||||
|
||||
mBaseY = REG0_F(6) + -150.0f - 20.0f + param_1 + 90.0f;
|
||||
|
||||
btd = (btd_class*)fpcEx_Search(b_a_sub, NULL);
|
||||
btd = (btd_class*)fpcM_Search(b_a_sub, NULL);
|
||||
|
||||
if (btd != NULL) {
|
||||
if (btd->m6E88 == 1) {
|
||||
|
||||
@@ -52,7 +52,7 @@ BOOL fopAcM_SearchByID(fpc_ProcID actorID, fopAc_ac_c** pDstActor) {
|
||||
if (fpcM_IsCreating(actorID)) {
|
||||
*pDstActor = NULL;
|
||||
} else {
|
||||
fopAc_ac_c *pActor = fopAcM_Search((fopAcIt_JudgeFunc)fpcSch_JudgeByID, &actorID);
|
||||
fopAc_ac_c *pActor = fopAcM_Search(fpcSch_JudgeByID, &actorID);
|
||||
*pDstActor = pActor;
|
||||
if (*pDstActor == NULL)
|
||||
return FALSE;
|
||||
@@ -63,7 +63,7 @@ BOOL fopAcM_SearchByID(fpc_ProcID actorID, fopAc_ac_c** pDstActor) {
|
||||
|
||||
/* 80024230-800242AC .text fopAcM_SearchByName__FsPP10fopAc_ac_c */
|
||||
BOOL fopAcM_SearchByName(s16 procName, fopAc_ac_c** pDstActor) {
|
||||
*pDstActor = fopAcM_Search((fopAcIt_JudgeFunc)fpcSch_JudgeForPName, &procName);
|
||||
*pDstActor = fopAcM_Search(fpcSch_JudgeForPName, &procName);
|
||||
if (*pDstActor == NULL) {
|
||||
return FALSE;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user