From 44636803330e4cbb3fc278528dcf0b9b75c65909 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Tue, 16 Jan 2024 18:30:05 -0500 Subject: [PATCH] Rename actor orig->home and next->old --- include/d/actor/d_a_item.h | 2 +- include/d/actor/d_a_tbox.h | 2 +- include/f_op/f_op_actor.h | 6 +-- include/f_op/f_op_actor_mng.h | 6 +-- src/c/c_damagereaction.cpp | 2 +- src/d/actor/d_a_agb.cpp | 78 ++++++++++++++++---------------- src/d/actor/d_a_agbsw0.cpp | 44 +++++++++--------- src/d/actor/d_a_am.cpp | 4 +- src/d/actor/d_a_am2.cpp | 6 +-- src/d/actor/d_a_andsw0.cpp | 6 +-- src/d/actor/d_a_andsw2.cpp | 4 +- src/d/actor/d_a_arrow.cpp | 12 ++--- src/d/actor/d_a_bomb2.cpp | 6 +-- src/d/actor/d_a_bomb3.inc | 4 +- src/d/actor/d_a_demo_item.cpp | 2 +- src/d/actor/d_a_floor.cpp | 2 +- src/d/actor/d_a_ib.cpp | 4 +- src/d/actor/d_a_item.cpp | 6 +-- src/d/actor/d_a_kytag00.cpp | 2 +- src/d/actor/d_a_mbdoor.cpp | 8 ++-- src/d/actor/d_a_nh.cpp | 10 ++-- src/d/actor/d_a_npc_btsw2.cpp | 2 +- src/d/actor/d_a_npc_kamome.cpp | 18 ++++---- src/d/actor/d_a_npc_md.cpp | 2 +- src/d/actor/d_a_obj_hole.cpp | 4 +- src/d/actor/d_a_obj_movebox.cpp | 30 ++++++------ src/d/actor/d_a_obj_toripost.cpp | 2 +- src/d/actor/d_a_player_main.cpp | 6 +-- src/d/actor/d_a_player_npc.cpp | 52 ++++++++++----------- src/d/actor/d_a_race_item.cpp | 2 +- src/d/actor/d_a_shop_item.cpp | 2 +- src/d/actor/d_a_swhit0.cpp | 12 ++--- src/d/actor/d_a_switem.cpp | 2 +- src/d/actor/d_a_swtdoor.cpp | 8 ++-- src/d/actor/d_a_tag_kb_item.cpp | 10 ++-- src/d/actor/d_a_tag_msg.cpp | 6 +-- src/d/actor/d_a_tbox.cpp | 12 ++--- src/d/d_a_item_static.cpp | 2 +- src/d/d_a_ship_static.cpp | 11 ++--- src/d/d_com_static.cpp | 2 +- src/d/d_door.cpp | 8 ++-- src/d/d_event_manager.cpp | 6 +-- src/d/d_npc.cpp | 12 ++--- src/d/d_shop.cpp | 12 ++--- src/f_op/f_op_actor.cpp | 18 ++++---- 45 files changed, 225 insertions(+), 232 deletions(-) diff --git a/include/d/actor/d_a_item.h b/include/d/actor/d_a_item.h index 3d33a3204..efcf399c2 100644 --- a/include/d/actor/d_a_item.h +++ b/include/d/actor/d_a_item.h @@ -123,7 +123,7 @@ namespace daItem_prm { inline u32 getAction(daItem_c* item) { return (fopAcM_GetParam(item) & 0xFC000000) >> 0x1A; } inline u32 getItemNo(daItem_c* item) { return (fopAcM_GetParam(item) & 0x000000FF) >> 0x00; } inline u32 getItemBitNo(daItem_c* item) { return (fopAcM_GetParam(item) & 0x0000FF00) >> 0x08; } - inline u32 getSwitchNo(daItem_c* item) { return (item->orig.angle.z & 0x00FF) >> 0; } + inline u32 getSwitchNo(daItem_c* item) { return (item->home.angle.z & 0x00FF) >> 0; } inline u32 getSwitchNo2(daItem_c* item) { return (fopAcM_GetParam(item) & 0x00FF0000) >> 0x10; } }; diff --git a/include/d/actor/d_a_tbox.h b/include/d/actor/d_a_tbox.h index 648f7ae13..dc7ea445d 100644 --- a/include/d/actor/d_a_tbox.h +++ b/include/d/actor/d_a_tbox.h @@ -25,7 +25,7 @@ public: u8 getTboxNo() { return fopAcM_GetParam(this) >> 0x07 & 0x1F; } int getSwNo() { return fopAcM_GetParam(this) >> 0x0C & 0xFF; } - u8 getItemNo() { return orig.angle.z >> 8 & 0xFF; } + u8 getItemNo() { return home.angle.z >> 8 & 0xFF; } void flagOn(u16 flag) { mFlags |= flag; } void flagOff(u16 flag) { mFlags &= ~flag; } void flagClr() { mFlags = 0; } diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h index 62440b30f..4804230ad 100644 --- a/include/f_op/f_op_actor.h +++ b/include/f_op/f_op_actor.h @@ -196,8 +196,6 @@ public: }; // Size = 0x18 struct actor_place { - // void operator=(actor_place const&); - /* 0x00 */ cXyz pos; /* 0x0C */ csXyz angle; /* 0x12 */ s8 roomNo; @@ -261,8 +259,8 @@ public: /* 0x1C4 */ u32 mStatus; /* 0x1C8 */ u32 mCondition; /* 0x1CC */ u32 mParentPcId; - /* 0x1D0 */ actor_place orig; - /* 0x1E4 */ actor_place next; + /* 0x1D0 */ actor_place home; + /* 0x1E4 */ actor_place old; /* 0x1F8 */ actor_place current; /* 0x20C */ csXyz shape_angle; /* 0x214 */ cXyz mScale; diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index 0b7c4be1e..1d7b535ed 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -163,7 +163,7 @@ inline cXyz& fopAcM_GetPosition(fopAc_ac_c* pActor) { } inline cXyz& fopAcM_GetOldPosition_p(fopAc_ac_c* pActor) { - return pActor->next.pos; + return pActor->old.pos; } inline cXyz& fopAcM_GetSpeed_p(fopAc_ac_c* pActor) { @@ -207,11 +207,11 @@ inline void fopAcM_cancelHookCarryNow(fopAc_ac_c* actor) { } inline s8 fopAcM_GetHomeRoomNo(fopAc_ac_c* pActor) { - return pActor->orig.roomNo; + return pActor->home.roomNo; } inline void fopAcM_SetHomeRoomNo(fopAc_ac_c* pActor, s8 roomNo) { - pActor->orig.roomNo = roomNo; + pActor->home.roomNo = roomNo; } inline void fopAcM_SetGravity(fopAc_ac_c* actor, f32 gravity) { diff --git a/src/c/c_damagereaction.cpp b/src/c/c_damagereaction.cpp index 51fd3c0a4..b0ba43954 100644 --- a/src/c/c_damagereaction.cpp +++ b/src/c/c_damagereaction.cpp @@ -181,7 +181,7 @@ BOOL enemy_ice(enemyice* ei) { ei->mCyl.SetStts(&ei->mStts); ei->mCyl.SetR(ei->mWallRadius); ei->mCyl.SetH(ei->mCylHeight); - ei->mBgAcch.Set(&ac->current.pos, &ac->next.pos, ac, 1, &ei->mBgAcchCir, &ei->mSpeed); + ei->mBgAcch.Set(&ac->current.pos, &ac->old.pos, ac, 1, &ei->mBgAcchCir, &ei->mSpeed); ei->mBgAcchCir.SetWall(40.0f, ei->mWallRadius); if (ei->mParticleScale < 0.1f) { diff --git a/src/d/actor/d_a_agb.cpp b/src/d/actor/d_a_agb.cpp index 644dd9dd5..a28961005 100644 --- a/src/d/actor/d_a_agb.cpp +++ b/src/d/actor/d_a_agb.cpp @@ -522,10 +522,10 @@ void daAgb_c::resetCursor(bool param_0) { if (fopAcM_GetName(player_p) != PROC_NPC_KAM) { current.pos = player_p->current.pos; - orig.pos = player_p->current.pos; + home.pos = player_p->current.pos; } else { current.pos = daPy_getPlayerLinkActorClass()->current.pos; - orig.pos = daPy_getPlayerLinkActorClass()->current.pos; + home.pos = daPy_getPlayerLinkActorClass()->current.pos; } field_0x628 = 2.5f; @@ -1022,53 +1022,53 @@ void daAgb_c::CursorMove(fopAc_ac_c* actor, u32 stage_type) { !CPad_CHECK_HOLD_L(mDoGaC_getPortNo()) ) { if (CPad_CHECK_HOLD_LEFT(mDoGaC_getPortNo())) { - actor->orig.pos.x -= f31; + actor->home.pos.x -= f31; } else if (CPad_CHECK_HOLD_RIGHT(mDoGaC_getPortNo())) { - actor->orig.pos.x += f31; + actor->home.pos.x += f31; } if (CPad_CHECK_HOLD_UP(mDoGaC_getPortNo())) { - actor->orig.pos.z -= f31; + actor->home.pos.z -= f31; } else if (CPad_CHECK_HOLD_DOWN(mDoGaC_getPortNo())) { - actor->orig.pos.z += f31; + actor->home.pos.z += f31; } if (stage_type == dSv_save_c::STAGE_WT && field_0x67e == 0) { - if (actor->orig.pos.x < -350000.0f) { - actor->orig.pos.x = -350000.0f; - } else if (actor->orig.pos.x > 350000.0f) { - actor->orig.pos.x = 350000.0f; + if (actor->home.pos.x < -350000.0f) { + actor->home.pos.x = -350000.0f; + } else if (actor->home.pos.x > 350000.0f) { + actor->home.pos.x = 350000.0f; } - if (actor->orig.pos.z < -350000.0f) { - actor->orig.pos.z = -350000.0f; - } else if (actor->orig.pos.z > 350000.0f) { - actor->orig.pos.z = 350000.0f; + if (actor->home.pos.z < -350000.0f) { + actor->home.pos.z = -350000.0f; + } else if (actor->home.pos.z > 350000.0f) { + actor->home.pos.z = 350000.0f; } } else { int roomNo = dComIfGp_roomControl_getStayNo(); stage_map_info_class* mapInfo = dComIfGp_roomControl_getStatusRoomDt(roomNo)->getMapInfo(); if (mapInfo) { - if (actor->orig.pos.x < mapInfo->field_0x18) { - actor->orig.pos.x = mapInfo->field_0x18; - } else if (actor->orig.pos.x > mapInfo->field_0x20) { - actor->orig.pos.x = mapInfo->field_0x20; + if (actor->home.pos.x < mapInfo->field_0x18) { + actor->home.pos.x = mapInfo->field_0x18; + } else if (actor->home.pos.x > mapInfo->field_0x20) { + actor->home.pos.x = mapInfo->field_0x20; } - if (actor->orig.pos.z < mapInfo->field_0x1C) { - actor->orig.pos.z = mapInfo->field_0x1C; - } else if (actor->orig.pos.z > mapInfo->field_0x24) { - actor->orig.pos.z = mapInfo->field_0x24; + if (actor->home.pos.z < mapInfo->field_0x1C) { + actor->home.pos.z = mapInfo->field_0x1C; + } else if (actor->home.pos.z > mapInfo->field_0x24) { + actor->home.pos.z = mapInfo->field_0x24; } } } - cLib_chaseF(&actor->current.pos.x, actor->orig.pos.x, f31); - cLib_chaseF(&actor->current.pos.z, actor->orig.pos.z, f31); + cLib_chaseF(&actor->current.pos.x, actor->home.pos.x, f31); + cLib_chaseF(&actor->current.pos.z, actor->home.pos.z, f31); f32 playerDist = fopAcM_searchPlayerDistanceXZ(actor); if (playerDist > 212100.0f) { if (mIsFree || mFollowTarget == 0) { cXyz r1_50 = player->current.pos - actor->current.pos; - actor->orig.pos.x = player->current.pos.x - r1_50.x * 212100.0f / playerDist; - actor->orig.pos.z = player->current.pos.z - r1_50.z * 212100.0f / playerDist; + actor->home.pos.x = player->current.pos.x - r1_50.x * 212100.0f / playerDist; + actor->home.pos.z = player->current.pos.z - r1_50.z * 212100.0f / playerDist; } else { mIsFree = false; mFollowTarget = 0; @@ -1077,8 +1077,8 @@ void daAgb_c::CursorMove(fopAc_ac_c* actor, u32 stage_type) { } } - cXyz r1_44 = actor->next.pos; - cXyz r1_38 = actor->next.pos; + cXyz r1_44 = actor->old.pos; + cXyz r1_38 = actor->old.pos; r1_38.y += 171.0f; dBgS_LinkLinChk r1_11C; r1_11C.Set(&r1_44, &r1_38, actor); @@ -1097,14 +1097,14 @@ void daAgb_c::CursorMove(fopAc_ac_c* actor, u32 stage_type) { mAcch.CrrPos(*dComIfG_Bgsp()); { - cXyz r1_2C = actor->next.pos; + cXyz r1_2C = actor->old.pos; r1_2C.y += f31_2; cXyz r1_20 = actor->current.pos; r1_20.y += f31_2; dBgS_LinkLinChk r1_B0; r1_B0.Set(&r1_2C, &r1_20, actor); if (dComIfG_Bgsp()->LineCross(&r1_B0)) { - actor->current.pos = actor->next.pos; + actor->current.pos = actor->old.pos; } } @@ -1117,10 +1117,10 @@ void daAgb_c::CursorMove(fopAc_ac_c* actor, u32 stage_type) { field_0x679 = 1; if (mCrrPos.ChkXCrr()) { - actor->orig.pos.x = actor->current.pos.x; + actor->home.pos.x = actor->current.pos.x; } if (mCrrPos.ChkZCrr()) { - actor->orig.pos.z = actor->current.pos.z; + actor->home.pos.z = actor->current.pos.z; } cXyz r1_14; @@ -1144,9 +1144,9 @@ void daAgb_c::CursorMove(fopAc_ac_c* actor, u32 stage_type) { } } - cLib_chaseF(&actor->current.pos.y, actor->orig.pos.y, 25.0f); + cLib_chaseF(&actor->current.pos.y, actor->home.pos.y, 25.0f); if (f30 > actor->current.pos.y && f30 < actor->current.pos.y + 170.0f + 1.0f) { - actor->orig.pos.y = f30; + actor->home.pos.y = f30; } } @@ -1272,7 +1272,7 @@ void daAgb_c::modeMove() { if (r3) { if (fopAcM_CheckStatusMap(r3, 0) && !fopAcM_checkStatus(r3, fopAcStts_BOSS_e) && fopAcM_GetName(r3) != PROC_FGANON) { current.pos = r3->current.pos; - orig.pos = r3->current.pos; + home.pos = r3->current.pos; field_0x650 = attList->getPid(); mFollowTarget = 1; } @@ -1295,12 +1295,12 @@ void daAgb_c::modeMove() { onFree(); } else { current.pos = player->current.pos; - orig.pos = player->current.pos; + home.pos = player->current.pos; } } else { fopAc_ac_c* r3 = fopAcM_SearchByID(field_0x650); current.pos = r3->current.pos; - orig.pos = r3->current.pos; + home.pos = r3->current.pos; } shape_angle.setall(0); @@ -1397,8 +1397,8 @@ static int daAgb_Execute(daAgb_c* i_this) { if (mDoGaC_GbaLink()) { if (i_this->isFree()) { - if (i_this->current.pos.x != i_this->next.pos.x || - i_this->current.pos.z != i_this->next.pos.z) + if (i_this->current.pos.x != i_this->old.pos.x || + i_this->current.pos.z != i_this->old.pos.z) { daAgb_c::mFlags.field_0x5_3 = 1; } else { diff --git a/src/d/actor/d_a_agbsw0.cpp b/src/d/actor/d_a_agbsw0.cpp index 981e7b954..adb462f73 100644 --- a/src/d/actor/d_a_agbsw0.cpp +++ b/src/d/actor/d_a_agbsw0.cpp @@ -640,13 +640,13 @@ BOOL daAgbsw0_c::ExeSubF2() { f32 x = current.pos.x; agb->current.pos.x = x; - agb->orig.pos.x = x; + agb->home.pos.x = x; f32 y = current.pos.y + 50.0f; agb->current.pos.y = y; - agb->orig.pos.y = y; + agb->home.pos.y = y; f32 z = current.pos.z; agb->current.pos.z = z; - agb->orig.pos.z = z; + agb->home.pos.z = z; agb->shape_angle.x = 0x3FFF; agb->field_0x67f = 1; mOrigScaleX = mScale.x; @@ -1304,15 +1304,15 @@ BOOL daAgbsw0_c::ExeSubB() { f32 rad = mScale.x; if(xzDiff < rad - 100.0f) { if(agb->current.pos.y < current.pos.y + mScale.y / 2.0f) { - agb->orig.pos.y = current.pos.y - 6.0f; + agb->home.pos.y = current.pos.y - 6.0f; } else { - agb->orig.pos.y = current.pos.y + mScale.y + 6.0f; + agb->home.pos.y = current.pos.y + mScale.y + 6.0f; } } else { - agb->orig.pos.x = current.pos.x - (posDiff.x * (rad + 1.0f) / xzDiff); - agb->orig.pos.z = current.pos.z - (posDiff.z * (mScale.z + 1.0f) / xzDiff); + agb->home.pos.x = current.pos.x - (posDiff.x * (rad + 1.0f) / xzDiff); + agb->home.pos.z = current.pos.z - (posDiff.z * (mScale.z + 1.0f) / xzDiff); } } else { @@ -1324,30 +1324,30 @@ BOOL daAgbsw0_c::ExeSubB() { f32 z_diff = mScale.z - fabsf(rel.z); if(y_diff < x_diff && y_diff < z_diff) { if(agb->current.pos.y < current.pos.y + mScale.y / 2.0f) { - agb->orig.pos.y = current.pos.y - 6.0f; + agb->home.pos.y = current.pos.y - 6.0f; } else { - agb->orig.pos.y = current.pos.y + mScale.y + 6.0f; + agb->home.pos.y = current.pos.y + mScale.y + 6.0f; } } else { if(x_diff < z_diff) { if(rel.x >= 0.0f) { - agb->orig.pos.x = (current.pos.x - posDiff.x) + (x_diff + 1.0f) * cM_scos(shape_angle.y); - agb->orig.pos.z = (current.pos.z - posDiff.z) - (x_diff + 1.0f) * cM_ssin(shape_angle.y); + agb->home.pos.x = (current.pos.x - posDiff.x) + (x_diff + 1.0f) * cM_scos(shape_angle.y); + agb->home.pos.z = (current.pos.z - posDiff.z) - (x_diff + 1.0f) * cM_ssin(shape_angle.y); } else { - agb->orig.pos.x = (current.pos.x - posDiff.x) - (x_diff + 1.0f) * cM_scos(shape_angle.y); - agb->orig.pos.z = (current.pos.z - posDiff.z) + (x_diff + 1.0f) * cM_ssin(shape_angle.y); + agb->home.pos.x = (current.pos.x - posDiff.x) - (x_diff + 1.0f) * cM_scos(shape_angle.y); + agb->home.pos.z = (current.pos.z - posDiff.z) + (x_diff + 1.0f) * cM_ssin(shape_angle.y); } } else if(rel.z >= 0.0f) { - agb->orig.pos.x = (current.pos.x - posDiff.x) + (z_diff + 1.0f) * cM_ssin(shape_angle.y); - agb->orig.pos.z = (current.pos.z - posDiff.z) + (z_diff + 1.0f) * cM_scos(shape_angle.y); + agb->home.pos.x = (current.pos.x - posDiff.x) + (z_diff + 1.0f) * cM_ssin(shape_angle.y); + agb->home.pos.z = (current.pos.z - posDiff.z) + (z_diff + 1.0f) * cM_scos(shape_angle.y); } else { - agb->orig.pos.x = (current.pos.x - posDiff.x) - (z_diff + 1.0f) * cM_ssin(shape_angle.y); - agb->orig.pos.z = (current.pos.z - posDiff.z) - (z_diff + 1.0f) * cM_scos(shape_angle.y); + agb->home.pos.x = (current.pos.x - posDiff.x) - (z_diff + 1.0f) * cM_ssin(shape_angle.y); + agb->home.pos.z = (current.pos.z - posDiff.z) - (z_diff + 1.0f) * cM_scos(shape_angle.y); } } } @@ -1425,13 +1425,13 @@ BOOL daAgbsw0_c::ExeSubD() { f32 x = current.pos.x; agb->current.pos.x = x; - agb->orig.pos.x = x; + agb->home.pos.x = x; f32 y = current.pos.y; agb->current.pos.y = y; - agb->orig.pos.y = y; + agb->home.pos.y = y; f32 z = current.pos.z; agb->current.pos.z = z; - agb->orig.pos.z = z; + agb->home.pos.z = z; agb->shape_angle.x = -0x3FFF; agb->field_0x67f = 1; mOrigScaleX = mScale.x; @@ -1446,8 +1446,8 @@ BOOL daAgbsw0_c::ExeSubD() { MailSend(BigLittleChange(getMsgNo()) >> 0x10, 0xC, getSw1(), 0xFF, 0x1B); agb->shape_angle.x = 0x3FFF; - agb->orig.pos.y += 50.0f; - agb->current.pos.y = agb->orig.pos.y; + agb->home.pos.y += 50.0f; + agb->current.pos.y = agb->home.pos.y; agb->field_0x676 = 1; field_0x299 += 1; diff --git a/src/d/actor/d_a_am.cpp b/src/d/actor/d_a_am.cpp index 174a620af..3a9cb9777 100644 --- a/src/d/actor/d_a_am.cpp +++ b/src/d/actor/d_a_am.cpp @@ -455,10 +455,10 @@ static void BG_check(am_class* i_this) { i_this->mAcchCir.SetWall(halfHeight, radius); i_this->current.pos.y -= i_this->m02EC; - i_this->next.pos.y -= i_this->m02EC; + i_this->old.pos.y -= i_this->m02EC; i_this->mAcch.CrrPos(*dComIfG_Bgsp()); i_this->current.pos.y += i_this->m02EC; - i_this->next.pos.y += i_this->m02EC; + i_this->old.pos.y += i_this->m02EC; } /* 000011E4-00001504 .text Line_check__FP8am_class4cXyz */ diff --git a/src/d/actor/d_a_am2.cpp b/src/d/actor/d_a_am2.cpp index 9625408d6..e244406ca 100644 --- a/src/d/actor/d_a_am2.cpp +++ b/src/d/actor/d_a_am2.cpp @@ -390,10 +390,10 @@ static void BG_check(am2_class* i_this) { i_this->mAcchCir.SetWall(halfHeight, i_this->mAcchRadius); i_this->current.pos.y -= i_this->mCorrectionOffsetY; - i_this->next.pos.y -= i_this->mCorrectionOffsetY; + i_this->old.pos.y -= i_this->mCorrectionOffsetY; i_this->mAcch.CrrPos(*dComIfG_Bgsp()); i_this->current.pos.y += i_this->mCorrectionOffsetY; - i_this->next.pos.y += i_this->mCorrectionOffsetY; + i_this->old.pos.y += i_this->mCorrectionOffsetY; } /* 00000FF4-00001344 .text Line_check__FP9am2_class4cXyz */ @@ -718,7 +718,7 @@ static void action_mahi(am2_class* i_this) { break; case 0xD: actor->current.angle.y = player->shape_angle.y; - if (actor->orig.roomNo != actor->current.roomNo) { + if (actor->home.roomNo != actor->current.roomNo) { i_this->mbNotInHomeRoom = true; } if (i_this->mPickedUpYPos + 10.0f <= actor->current.pos.y) { diff --git a/src/d/actor/d_a_andsw0.cpp b/src/d/actor/d_a_andsw0.cpp index 136a5127d..131aa1cbb 100644 --- a/src/d/actor/d_a_andsw0.cpp +++ b/src/d/actor/d_a_andsw0.cpp @@ -78,7 +78,7 @@ static void daAndsw0_check(andsw0_class* i_this) { break; case ACT_TIMER: - i_this->mTimer = (i_this->orig.angle.z & 0xFF) * 15; + i_this->mTimer = (i_this->home.angle.z & 0xFF) * 15; if(fopAcM_isSwitch(i_this, i_this->mSwitchToSet)) { i_this->mAction = ACT_WAIT; } @@ -310,8 +310,8 @@ static s32 daAndsw0_Create(fopAc_ac_c* ac) { i_this->mBehaviorType = (fopAcM_GetParam(ac) >> 8) & 0xFF; i_this->mSwitchToSet = (fopAcM_GetParam(ac) >> 24) & 0xFF; i_this->mFirstSwitchToCheck = (fopAcM_GetParam(ac) >> 16) & 0xFF; - i_this->mTimer = (i_this->orig.angle.z & 0xFF) * 15; - i_this->mEventNo = i_this->orig.angle.x; + i_this->mTimer = (i_this->home.angle.z & 0xFF) * 15; + i_this->mEventNo = i_this->home.angle.x; i_this->mEventIdx = dComIfGp_evmng_getEventIdx(NULL, i_this->mEventNo); if (i_this->mBehaviorType == 2) i_this->mAction = ACT_TIMER; diff --git a/src/d/actor/d_a_andsw2.cpp b/src/d/actor/d_a_andsw2.cpp index 6f880e86b..20ae01773 100644 --- a/src/d/actor/d_a_andsw2.cpp +++ b/src/d/actor/d_a_andsw2.cpp @@ -25,7 +25,7 @@ enum Type { /* 00000078-00000084 .text getEventNo__10daAndsw2_cFv */ u8 daAndsw2_c::getEventNo() { - return (orig.angle.x & 0x00FF) >> 0; + return (home.angle.x & 0x00FF) >> 0; } /* 00000084-00000090 .text getSwbit__10daAndsw2_cFv */ @@ -47,7 +47,7 @@ u8 daAndsw2_c::getType() { /* 000000A8-000000B4 .text getTimer__10daAndsw2_cFv */ u8 daAndsw2_c::getTimer() { - return (orig.angle.z & 0x00FF) >> 0; + return (home.angle.z & 0x00FF) >> 0; } /* 000000B4-000000C0 .text getNum__10daAndsw2_cFv */ diff --git a/src/d/actor/d_a_arrow.cpp b/src/d/actor/d_a_arrow.cpp index 377f21053..9c49cb6ed 100644 --- a/src/d/actor/d_a_arrow.cpp +++ b/src/d/actor/d_a_arrow.cpp @@ -376,7 +376,7 @@ bool daArrow_c::check_water_in() { f32 waterY; fopAcM_getWaterY(¤t.pos, &waterY); - f32 deltaY = fabs(next.pos.y - current.pos.y); + f32 deltaY = fabs(old.pos.y - current.pos.y); f32 waterDist = fabs(waterY - current.pos.y); cXyz waterHitPos; if (deltaY < 1.0f) { @@ -386,7 +386,7 @@ bool daArrow_c::check_water_in() { if (weight > 1.0f) { weight = 1.0f; } - waterHitPos = (next.pos * weight) + (current.pos * (1.0f - weight)); + waterHitPos = (old.pos * weight) + (current.pos * (1.0f - weight)); } mCurrProcFunc = &daArrow_c::procWater; @@ -631,7 +631,7 @@ BOOL daArrow_c::procMove() { speedF = 100.0f; current.pos += speed; cXyz quarterStepPos = current.pos + speed*0.25f; - mLinChk.Set(&next.pos, &quarterStepPos, this); + mLinChk.Set(&old.pos, &quarterStepPos, this); field_0x6e6 = shape_angle; cMtx_copy(mpModel->getBaseTRMtx(), field_0x6b4); @@ -731,7 +731,7 @@ BOOL daArrow_c::procMove() { mCurrProcFunc = &daArrow_c::procReturn; speed *= -0.1f; speed.y += speed.absXZ(); - current.pos = next.pos; + current.pos = old.pos; field_0x69c = 0x2C00; mDoMtx_stack_c::transS(current.pos); mDoMtx_stack_c::ZXYrotM(shape_angle.x, shape_angle.y, 0); @@ -831,7 +831,7 @@ BOOL daArrow_c::procMove() { fopAcM_SetParam(this, 3); speed *= -0.1f; speed.y += speed.absXZ(); - current.pos = next.pos; + current.pos = old.pos; field_0x69c = 0x2C00; csXyz temp9; cM3d_CalcVecZAngle(triPla->mNormal, &temp9); @@ -893,7 +893,7 @@ BOOL daArrow_c::procReturn() { shape_angle.x += field_0x69c; cXyz quarterStepPos = current.pos + speed*0.25f; field_0x699 = daPy_lk_c::setItemWaterEffect(this, field_0x699, 1); - mLinChk.Set(&next.pos, &quarterStepPos, this); + mLinChk.Set(&old.pos, &quarterStepPos, this); setBlur(); if (dComIfG_Bgsp()->LineCross(&mLinChk)) { diff --git a/src/d/actor/d_a_bomb2.cpp b/src/d/actor/d_a_bomb2.cpp index ee7991826..ee335ef68 100644 --- a/src/d/actor/d_a_bomb2.cpp +++ b/src/d/actor/d_a_bomb2.cpp @@ -288,7 +288,7 @@ namespace daBomb2 { void Act_c::crr_init() { mCir.SetWall(30.0f, 30.0f); - mAcch.Set(¤t.pos, &next.pos, this, 1, &mCir, &speed, ¤t.angle, &shape_angle); + mAcch.Set(¤t.pos, &old.pos, this, 1, &mCir, &speed, ¤t.angle, &shape_angle); mAcch.ClrWaterNone(); mAcch.ClrRoofNone(); mAcch.m_roof_crr_height = 50.0f; @@ -392,7 +392,7 @@ namespace daBomb2 { bgCrrPos(); speed.y = 0.0f; speedF = 0.0f; - current.pos = orig.pos; + current.pos = home.pos; init_mtx(); field_0x738 = attr().field_0x8; @@ -524,7 +524,7 @@ namespace daBomb2 { /* 800DE8A8-800DE914 .text bgCrrPos_lava__Q27daBomb25Act_cFv */ void Act_c::bgCrrPos_lava() { - cXyz temp(current.pos.x, next.pos.y + 1.0f, current.pos.z); + cXyz temp(current.pos.x, old.pos.y + 1.0f, current.pos.z); mGndChk.SetPos(&temp); field_0x51C = dComIfG_Bgsp()->GroundCross(&mGndChk); diff --git a/src/d/actor/d_a_bomb3.inc b/src/d/actor/d_a_bomb3.inc index 0602f8e17..c4f99ac54 100644 --- a/src/d/actor/d_a_bomb3.inc +++ b/src/d/actor/d_a_bomb3.inc @@ -491,7 +491,7 @@ void daBomb_c::bgCrrPos() { } void daBomb_c::bgCrrPos_lava() { - cXyz temp(current.pos.x, next.pos.y + 1.0f, current.pos.z); + cXyz temp(current.pos.x, old.pos.y + 1.0f, current.pos.z); mGndChk.SetPos(&temp); field_0x554.x = dComIfG_Bgsp()->GroundCross(&mGndChk); @@ -1346,7 +1346,7 @@ static dCcD_SrcSph l_sph_src = { void daBomb_c::create_init() { mCir.SetWall(30.0f, 30.0f); - mAcch.Set(¤t.pos, &next.pos, this, 1, &mCir, &speed, ¤t.angle, &shape_angle); + mAcch.Set(¤t.pos, &old.pos, this, 1, &mCir, &speed, ¤t.angle, &shape_angle); mAcch.ClrWaterNone(); mAcch.ClrRoofNone(); mAcch.m_roof_crr_height = 50.0f; diff --git a/src/d/actor/d_a_demo_item.cpp b/src/d/actor/d_a_demo_item.cpp index a4d24f49d..e5baaf999 100644 --- a/src/d/actor/d_a_demo_item.cpp +++ b/src/d/actor/d_a_demo_item.cpp @@ -367,7 +367,7 @@ void daDitem_c::set_pos() { mDoMtx_stack_c::multVec(&offset, &offset); pos = dComIfGp_getPlayer(0)->current.pos; } else { - pos = orig.pos; + pos = home.pos; } pos += offset; diff --git a/src/d/actor/d_a_floor.cpp b/src/d/actor/d_a_floor.cpp index b5e992a48..596432da5 100644 --- a/src/d/actor/d_a_floor.cpp +++ b/src/d/actor/d_a_floor.cpp @@ -87,7 +87,7 @@ int daFloor_c::Execute(Mtx**) { } } - if ((dComIfGp_getPlayer(0)->current.pos - dComIfGp_getPlayer(0)->next.pos).absXZ() != 0.0f) + if ((dComIfGp_getPlayer(0)->current.pos - dComIfGp_getPlayer(0)->old.pos).absXZ() != 0.0f) field_0x2d9 = 0; return TRUE; diff --git a/src/d/actor/d_a_ib.cpp b/src/d/actor/d_a_ib.cpp index 6bd797851..af01898a8 100644 --- a/src/d/actor/d_a_ib.cpp +++ b/src/d/actor/d_a_ib.cpp @@ -204,7 +204,7 @@ void daIball_c::checkGeo() { (this->*mode_proc[mMode])(); dBgS_ObjGndChk_Yogan gnd_chk; - cXyz pos(current.pos.x, next.pos.y + 30.0f + m_data.mYOffset, current.pos.z); + cXyz pos(current.pos.x, old.pos.y + 30.0f + m_data.mYOffset, current.pos.z); gnd_chk.SetPos(&pos); f32 groundY = dComIfG_Bgsp()->GroundCross(&gnd_chk); f32 groundH = mAcch.GetGroundH(); @@ -360,7 +360,7 @@ void daIball_c::CreateInit() { mCyl.Set(m_cyl_src); mCyl.SetStts(&mStts); mAcchCir.SetWall(30.0f, 30.0f); - mAcch.Set(¤t.pos, &next.pos, this, 1, &mAcchCir, &speed); + mAcch.Set(¤t.pos, &old.pos, this, 1, &mAcchCir, &speed); mAcch.OnSeaCheckOn(); mAcch.OnSeaWaterHeight(); diff --git a/src/d/actor/d_a_item.cpp b/src/d/actor/d_a_item.cpp index 037f13b27..a912c4b76 100644 --- a/src/d/actor/d_a_item.cpp +++ b/src/d/actor/d_a_item.cpp @@ -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, &next.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()); @@ -193,7 +193,7 @@ void daItem_c::CreateInit() { mActivationSwitch = daItem_prm::getSwitchNo(this); current.angle.z = 0; - orig.angle.z = 0; + home.angle.z = 0; initAction(); switch (m_itemNo) { @@ -1304,7 +1304,7 @@ void daItem_c::mode_wait() { dBgS_ObjGndChk_Yogan gndChk; cXyz temp; - temp.set(next.pos.x, next.pos.y, next.pos.z); + temp.set(old.pos.x, old.pos.y, old.pos.z); gndChk.SetPos(&temp); f32 groundY = dComIfG_Bgsp()->GroundCross(&gndChk); if (groundY != -1000000000.0f && groundY > current.pos.y) { diff --git a/src/d/actor/d_a_kytag00.cpp b/src/d/actor/d_a_kytag00.cpp index a143e3e31..151c90693 100644 --- a/src/d/actor/d_a_kytag00.cpp +++ b/src/d/actor/d_a_kytag00.cpp @@ -243,7 +243,7 @@ void wether_tag_efect_move(kytag00_class* i_this) { g_env_light.mMoyaCount = 100.0f * blend; break; case 0x6: - if (i_this->orig.roomNo == dComIfGp_roomControl_getStayNo()) { + if (i_this->home.roomNo == dComIfGp_roomControl_getStayNo()) { g_env_light.mHousiCount = 300.0f * blend; } else { g_env_light.mHousiCount = 0; diff --git a/src/d/actor/d_a_mbdoor.cpp b/src/d/actor/d_a_mbdoor.cpp index 42822e69e..c5a3f8dc0 100644 --- a/src/d/actor/d_a_mbdoor.cpp +++ b/src/d/actor/d_a_mbdoor.cpp @@ -40,7 +40,7 @@ u8 daMbdoor_c::getSwbit() { /* 00000084-00000090 .text getType__10daMbdoor_cFv */ u8 daMbdoor_c::getType() { - return orig.angle.z & 0x3F; + return home.angle.z & 0x3F; } /* 00000090-0000009C .text getShapeType__10daMbdoor_cFv */ @@ -178,7 +178,7 @@ BOOL daMbdoor_c::CreateHeap() { void daMbdoor_c::calcMtx() { // Transform the door's frame. mDoMtx_stack_c::transS(current.pos); - mDoMtx_stack_c::YrotM(orig.angle.y); + mDoMtx_stack_c::YrotM(home.angle.y); mpFuModel->setBaseTRMtx(mDoMtx_stack_c::now); cXyz offset; @@ -214,7 +214,7 @@ void daMbdoor_c::calcMtx() { // Transform door's bar. mDoMtx_stack_c::transS(current.pos); - mDoMtx_stack_c::YrotM(orig.angle.y); + mDoMtx_stack_c::YrotM(home.angle.y); if (field_0x2b0) { mDoMtx_stack_c::transM(getToOffset(), 231.0f, 0.0f); mDoMtx_stack_c::ZrotM(field_0x2b0); @@ -405,7 +405,7 @@ void daMbdoor_c::demoProc() { /* 00000F78-000010CC .text checkArea__10daMbdoor_cFv */ BOOL daMbdoor_c::checkArea() { daPy_py_c* player = daPy_getPlayerActorClass(); - cXyz relPos1 = player->current.pos - orig.pos; + cXyz relPos1 = player->current.pos - home.pos; cXyz relPos2 = relPos1; relPos2.x = relPos1.z * cM_ssin(current.angle.y) - relPos1.x * cM_scos(current.angle.y); relPos2.z = relPos1.z * cM_scos(current.angle.y) + relPos1.x * cM_ssin(current.angle.y); diff --git a/src/d/actor/d_a_nh.cpp b/src/d/actor/d_a_nh.cpp index e3fe66733..0e014b937 100644 --- a/src/d/actor/d_a_nh.cpp +++ b/src/d/actor/d_a_nh.cpp @@ -222,7 +222,7 @@ BOOL daNh_c::searchPlayer() { } daPy_py_c* player = daPy_getPlayerActorClass(); - cXyz playerDelta = player->next.pos - player->current.pos; + cXyz playerDelta = player->old.pos - player->current.pos; f32 playerDist = fopAcM_searchPlayerDistance(this); f32 playerDistDelta = mPlayerDist - playerDist; mPlayerDist = playerDist; @@ -247,7 +247,7 @@ BOOL daNh_c::moveProc(f32 targetSpeed, f32 speedStep, s16 targetAngle) { /* 800FA19C-800FA260 .text getHomeDistance__6daNh_cFv */ f32 daNh_c::getHomeDistance() { - cXyz delta = orig.pos - current.pos; + cXyz delta = home.pos - current.pos; return cXyz(delta.x, 0.0f, delta.z).abs(); } @@ -306,7 +306,7 @@ BOOL daNh_c::waitAction(void*) { /* 800FA674-800FA78C .text checkEscapeEnd__6daNh_cFv */ BOOL daNh_c::checkEscapeEnd() { - cXyz homeDelta = orig.pos - current.pos; + cXyz homeDelta = home.pos - current.pos; if (!isTypeBottle()) { if (cLib_calcTimer(&mEscapeTimer) == 0) { setAction(&daNh_c::waitAction, NULL); @@ -354,8 +354,8 @@ BOOL daNh_c::returnAction(void*) { if (getHomeDistance() < 50.0f) { setAction(&daNh_c::waitAction, NULL); } else { - s16 targetAngle = cLib_targetAngleY(¤t.pos, &orig.pos); - cXyz homeDelta = orig.pos - current.pos; + s16 targetAngle = cLib_targetAngleY(¤t.pos, &home.pos); + cXyz homeDelta = home.pos - current.pos; if (homeDelta.abs2XZ() < l_HIO.prm.mMaxHomeDist*l_HIO.prm.mMaxHomeDist) { s16 angle = targetAngle - fopAcM_searchPlayerAngleY(this); if (abs(angle) < 0x1000) { diff --git a/src/d/actor/d_a_npc_btsw2.cpp b/src/d/actor/d_a_npc_btsw2.cpp index 9032cf615..c540d49e3 100644 --- a/src/d/actor/d_a_npc_btsw2.cpp +++ b/src/d/actor/d_a_npc_btsw2.cpp @@ -279,7 +279,7 @@ BOOL daNpc_Btsw2_c::CreateHeap() { modelData->getJointNodePointer(m_jnt.getBackboneJntNum())->setCallBack(nodeCallBack); mpMcaMorf->getModel()->setUserArea((u32)this); mAcchCir.SetWall(30.0f, 0.0f); - mObjAcch.Set(¤t.pos, &next.pos, this, 1, &mAcchCir, &speed); + mObjAcch.Set(¤t.pos, &old.pos, this, 1, &mAcchCir, &speed); return TRUE; } diff --git a/src/d/actor/d_a_npc_kamome.cpp b/src/d/actor/d_a_npc_kamome.cpp index 4c6b0ed10..bff376257 100644 --- a/src/d/actor/d_a_npc_kamome.cpp +++ b/src/d/actor/d_a_npc_kamome.cpp @@ -205,7 +205,7 @@ void daNpc_kam_c::setAttention(bool param_1, int param_2) { if (param_2) { mAttentionInfo.mPosition.set(current.pos.x, current.pos.y, current.pos.z); } else { - mAttentionInfo.mPosition.set(orig.pos.x, orig.pos.y, orig.pos.z); + mAttentionInfo.mPosition.set(home.pos.x, home.pos.y, home.pos.z); } } } @@ -408,8 +408,8 @@ BOOL daNpc_kam_c::init() { mEventState = -1; mCurrEventIdxIdx = -1; mScale *= 1000.0f; - mMaxY = orig.pos.y + mScale.y; - mMinY = orig.pos.y - mScale.y; + mMaxY = home.pos.y + mScale.y; + mMinY = home.pos.y - mScale.y; mTargetSpeedF = l_HIO.mHio1.mSpeedF; mAngVelY = l_HIO.mHio1.mGlidingAngVelY; @@ -421,7 +421,7 @@ BOOL daNpc_kam_c::init() { mAcchCirs[0].SetWall(20.0f, 50.0f); mAcchCirs[1].SetWall(-20.0f, 50.0f); - mAcch.Set(¤t.pos, &next.pos, this, ARRAY_SIZE(mAcchCirs), mAcchCirs, &speed); + mAcch.Set(¤t.pos, &old.pos, this, ARRAY_SIZE(mAcchCirs), mAcchCirs, &speed); mAcch.ClrRoofNone(); mAcch.SetRoofCrrHeight(20.0f); mAcch.OnLineCheck(); @@ -537,7 +537,7 @@ BOOL daNpc_kam_c::changeAreaCheck() { } } else { // For all other sectors, simple check if Link is within the Hyoi Seagull's moveable range. - delta = player->current.pos - orig.pos; + delta = player->current.pos - home.pos; if (delta.absXZ() < mScale.x) { offNpcNotChange(); return TRUE; @@ -549,7 +549,7 @@ BOOL daNpc_kam_c::changeAreaCheck() { /* 0000235C-00002450 .text areaOutCheck__11daNpc_kam_cFv */ BOOL daNpc_kam_c::areaOutCheck() { - cXyz delta = (current.pos - orig.pos); + cXyz delta = (current.pos - home.pos); return delta.absXZ() > mScale.x ? TRUE : FALSE; } @@ -680,7 +680,7 @@ int daNpc_kam_c::waitNpcAction(void*) { } } } else if (mActionStatus == ACTION_ONGOING_2) { - targetAngleY = cLib_targetAngleY(¤t.pos, &orig.pos); + targetAngleY = cLib_targetAngleY(¤t.pos, &home.pos); if (cLib_calcTimer(&mC08) == 0 && !areaOutCheck()) { mActionStatus = ACTION_ONGOING_1; setAnm(ANM_WAIT2); @@ -703,7 +703,7 @@ int daNpc_kam_c::waitNpcAction(void*) { fopAcM_seStart(this, JA_SE_CV_KAMOME, 0); } - if (current.pos.y < orig.pos.y) { + if (current.pos.y < home.pos.y) { targetAngleX = -l_HIO.mHio1.mGlidingAngVelX; } @@ -1089,7 +1089,7 @@ BOOL daNpc_kam_c::actionAreaOutTurn(int evtStaffId) { onNoBgCheck(); speedF = 0.0f; - s16 targetAngle = cLib_targetAngleY(¤t.pos, &orig.pos); + s16 targetAngle = cLib_targetAngleY(¤t.pos, &home.pos); s16 angleDiff = current.angle.y - targetAngle; if (abs(angleDiff) != 0) { cLib_addCalcAngleS(¤t.angle.y, targetAngle, 16, 0x2000, 0x400); diff --git a/src/d/actor/d_a_npc_md.cpp b/src/d/actor/d_a_npc_md.cpp index 5deccfa26..dff649509 100644 --- a/src/d/actor/d_a_npc_md.cpp +++ b/src/d/actor/d_a_npc_md.cpp @@ -892,7 +892,7 @@ BOOL daNpc_Md_c::createHeap() { mAcchCir[0].SetWall(20.0f, 20.0f); mAcchCir[1].SetWall(60.0f, 20.0f); - mAcch.Set(¤t.pos, &next.pos, this, ARRAY_SIZE(mAcchCir), mAcchCir, &speed); + mAcch.Set(¤t.pos, &old.pos, this, ARRAY_SIZE(mAcchCir), mAcchCir, &speed); mAcch.ClrRoofNone(); mAcch.SetRoofCrrHeight(120.0f); mAcch.OnLineCheck(); diff --git a/src/d/actor/d_a_obj_hole.cpp b/src/d/actor/d_a_obj_hole.cpp index c68e149db..ff1c0c3f7 100644 --- a/src/d/actor/d_a_obj_hole.cpp +++ b/src/d/actor/d_a_obj_hole.cpp @@ -213,7 +213,7 @@ void daObj_Hole_c::createInit() { fopAcM_setCullSizeFar(this, 10.0f); mAcchCir.SetWall(100.0f, 10.0f); - mAcch.Set(¤t.pos, &next.pos, this, 1, &mAcchCir, &speed); + mAcch.Set(¤t.pos, &old.pos, this, 1, &mAcchCir, &speed); mAcch.SetWallNone(); mAcch.SetRoofNone(); @@ -243,7 +243,7 @@ void daObj_Hole_c::getArg() { mExitIdx = param & 0xFF; mHasModel = param >> 8; - mScaleLocal = orig.angle.z; + mScaleLocal = home.angle.z; if (mScaleLocal == 0xFFFF) { mScaleLocal = 0; } diff --git a/src/d/actor/d_a_obj_movebox.cpp b/src/d/actor/d_a_obj_movebox.cpp index 254427337..45ded0b93 100644 --- a/src/d/actor/d_a_obj_movebox.cpp +++ b/src/d/actor/d_a_obj_movebox.cpp @@ -190,7 +190,7 @@ namespace daObjMovebox { f32 maxGroundY = -1000000000.0f; mDoMtx_stack_c::transS(movebox->current.pos); - mDoMtx_stack_c::YrotM(movebox->orig.angle.y); + mDoMtx_stack_c::YrotM(movebox->home.angle.y); mMaxGroundIdx = -1; for (int i = 0; i < bgcSrcCount; i++, bgcSrc++) { @@ -237,7 +237,7 @@ namespace daObjMovebox { cXyz temp_2c; cXyz temp_20; - angle = movebox->orig.angle.y + param_4; + angle = movebox->home.angle.y + param_4; mWallIdx = -1; mNearestWallDist = FLOAT_MAX; mDoMtx_stack_c::YrotS((s16)angle); @@ -328,7 +328,7 @@ namespace daObjMovebox { cXyz temp_20; cXyz direction; - s16 angle = movebox->orig.angle.y + param_3; + s16 angle = movebox->home.angle.y + param_3; mDoMtx_stack_c::YrotS((s16)angle); mDoMtx_stack_c::XrotM(0x4000); offset.set(bgcSrc->m0C, 0.0f, bgcSrc->m08); @@ -1104,10 +1104,10 @@ namespace daObjMovebox { // The appearing/disappearing type of box does not take pathId or swSave2 params. mPrmZ = 0xFFFF; } else { - mPrmZ = orig.angle.z; + mPrmZ = home.angle.z; } - orig.angle.z = 0; + home.angle.z = 0; current.angle.z = 0; shape_angle.z = 0; } @@ -1115,11 +1115,11 @@ namespace daObjMovebox { /* 00001380-000013B0 .text prmX_init__Q212daObjMovebox5Act_cFv */ void Act_c::prmX_init() { if (!mbPrmXInitialized) { - mPrmX = orig.angle.x; + mPrmX = home.angle.x; mbPrmXInitialized = true; } - orig.angle.x = 0; + home.angle.x = 0; current.angle.x = 0; shape_angle.x = 0; } @@ -1225,9 +1225,9 @@ namespace daObjMovebox { pntIdx += 2; } - mpPath = dPath_GetRoomPath(pathId, orig.roomNo); + mpPath = dPath_GetRoomPath(pathId, home.roomNo); dPath__Point* pnt = dPath_GetPnt(mpPath, pntIdx); - orig.pos = pnt->mPos; + home.pos = pnt->mPos; current.pos = pnt->mPos; } } @@ -1344,7 +1344,7 @@ namespace daObjMovebox { unk = orig_pp_label & dBgW::PP_UNK8_e; } if (unk) { - s16 angle = (s16)(pp_label & dBgW::PP_UNK2_e ? rot - 0x8000 : rot) - actor->orig.angle.y; + s16 angle = (s16)(pp_label & dBgW::PP_UNK2_e ? rot - 0x8000 : rot) - actor->home.angle.y; int pp_field = dBgW::PP_UNK1_e | dBgW::PP_UNK2_e; JUT_ASSERT(1813, pp_label != pp_field); @@ -1583,7 +1583,7 @@ namespace daObjMovebox { cXyz(0.5f, 0.0f, -0.5f) }; - s16 angle = orig.angle.y + M_dir_base[m634]; + s16 angle = home.angle.y + M_dir_base[m634]; f32 scale = i_attr()->mScaleXZ; mDoMtx_stack_c::transS(current.pos); @@ -1656,8 +1656,8 @@ namespace daObjMovebox { daObj::posMoveF_stream(this, NULL, &cXyz::Zero, i_attr()->m18, i_attr()->m1C); - mDoMtx_stack_c::transS(orig.pos); - mDoMtx_stack_c::YrotM(orig.angle.y); + mDoMtx_stack_c::transS(home.pos); + mDoMtx_stack_c::YrotM(home.angle.y); mDoMtx_stack_c::transM(m628 * i_attr()->m0C, 0.0f, m62C * i_attr()->m0C); cXyz pos; mDoMtx_stack_c::multVec(&cXyz::Zero, &pos); @@ -1698,8 +1698,8 @@ namespace daObjMovebox { bool r28 = --m644 <= 0; f32 temp = (cM_scos(m644 * m630) + 1.0f) * 0.5f; - mDoMtx_stack_c::transS(orig.pos); - mDoMtx_stack_c::YrotM(orig.angle.y); + mDoMtx_stack_c::transS(home.pos); + mDoMtx_stack_c::YrotM(home.angle.y); mDoMtx_stack_c::transM( (m628 + temp * dir_vec[m634].x) * i_attr()->m0C, 0.0f, diff --git a/src/d/actor/d_a_obj_toripost.cpp b/src/d/actor/d_a_obj_toripost.cpp index bba5528af..ffc409c9d 100644 --- a/src/d/actor/d_a_obj_toripost.cpp +++ b/src/d/actor/d_a_obj_toripost.cpp @@ -931,7 +931,7 @@ void daObjTpost_c::createInit() { modeProc(PROC_INIT, 0); mAcchCir.SetWall(30.0f, 30.0f); - mAcch.Set(¤t.pos, &next.pos, this, 1, &mAcchCir, &speed); + mAcch.Set(¤t.pos, &old.pos, this, 1, &mAcchCir, &speed); mAcch.SetRoofNone(); mGravity = -4.5f; diff --git a/src/d/actor/d_a_player_main.cpp b/src/d/actor/d_a_player_main.cpp index 3ffaee632..7c06be9d3 100644 --- a/src/d/actor/d_a_player_main.cpp +++ b/src/d/actor/d_a_player_main.cpp @@ -3176,10 +3176,10 @@ BOOL daPy_lk_c::execute() { dComIfG_Bgsp()->ChkMoveBG(mAcch.m_gnd) ) { dComIfG_Bgsp()->MoveBgCrrPos(mAcch.m_gnd, mAcch.ChkGroundHit(), ¤t.pos, ¤t.angle, &shape_angle); - dComIfG_Bgsp()->MoveBgCrrPos(mAcch.m_gnd, mAcch.ChkGroundHit(), &next.pos, NULL, NULL); + dComIfG_Bgsp()->MoveBgCrrPos(mAcch.m_gnd, mAcch.ChkGroundHit(), &old.pos, NULL, NULL); } - cXyz sp20 = next.pos; + cXyz sp20 = old.pos; m34DE = shape_angle.y; m35B4 = m35B0; m34EA = m34DC; @@ -4068,7 +4068,7 @@ void daPy_lk_c::playerInit() { m_anm_heap_upper[i].m_buffer = reinterpret_cast(buffer_start); } - mAcch.Set(¤t.pos, &next.pos, this, ARRAY_SIZE(mAcchCir), mAcchCir, &speed, ¤t.angle, &shape_angle); + mAcch.Set(¤t.pos, &old.pos, this, ARRAY_SIZE(mAcchCir), mAcchCir, &speed, ¤t.angle, &shape_angle); mAcch.ClrWaterNone(); mAcch.SetWaterCheckOffset(500.0f); mAcch.OnLineCheck(); diff --git a/src/d/actor/d_a_player_npc.cpp b/src/d/actor/d_a_player_npc.cpp index 4c5b31cac..208ca12a6 100644 --- a/src/d/actor/d_a_player_npc.cpp +++ b/src/d/actor/d_a_player_npc.cpp @@ -11,7 +11,7 @@ /* 8015A37C-8015A448 .text check_initialRoom__10daPy_npc_cFv */ int daPy_npc_c::check_initialRoom() { - if (orig.roomNo < 0) { + if (home.roomNo < 0) { mAcch.CrrPos(*dComIfG_Bgsp()); if (mAcch.GetGroundH() == -1000000000.0f || dComIfG_Bgsp()->GetGroundCode(mAcch.m_gnd) == 4) { return 0; @@ -35,8 +35,8 @@ BOOL daPy_npc_c::check_moveStop() { BOOL hasBgW = dComIfGp_roomControl_checkStatusFlag(roomNo, 0x10); if ((roomNo < 0 || !hasBgW)) { if (!hasBgW || m4E8 >= 30) { - current = orig; - shape_angle = orig.angle; + current = home; + shape_angle = home.angle; speedF = 0.0f; m4E8 = 0; } @@ -64,15 +64,15 @@ void daPy_npc_c::setRestart(s8 option) { void daPy_npc_c::unconditionalSetRestart(s8 option) { dComIfGs_setRestartOption(option); dComIfGs_setPlayerPriest(option, dComIfGs_getRestartOptionPos(), dComIfGs_getRestartOptionAngleY(), dComIfGs_getRestartOptionRoomNo()); - orig.pos = dComIfGs_getRestartOptionPos(); - orig.angle.y = dComIfGs_getRestartOptionAngleY(); - orig.roomNo = dComIfGs_getRestartOptionRoomNo(); + home.pos = dComIfGs_getRestartOptionPos(); + home.angle.y = dComIfGs_getRestartOptionAngleY(); + home.roomNo = dComIfGs_getRestartOptionRoomNo(); } /* 8015A624-8015A6A4 .text setOffsetHomePos__10daPy_npc_cFv */ void daPy_npc_c::setOffsetHomePos() { static cXyz l_offsetPos(100.0f, 0.0f, 0.0f); - cLib_offsetPos(&orig.pos, &orig.pos, orig.angle.y, &l_offsetPos); + cLib_offsetPos(&home.pos, &home.pos, home.angle.y, &l_offsetPos); } /* 8015A6A4-8015AA0C .text setPointRestart__10daPy_npc_cFsSc */ @@ -105,18 +105,18 @@ void daPy_npc_c::setPointRestart(s16 i_point, s8 option) { } JUT_ASSERT(174, i != dComIfGp_getStagePlayerNum()); - orig.pos = player_data->mSpawnPos; - orig.angle.y = player_data->mAngle.y; - orig.roomNo = -1; + home.pos = player_data->mSpawnPos; + home.angle.y = player_data->mAngle.y; + home.roomNo = -1; setOffsetHomePos(); - current = orig; - next = orig; - shape_angle = orig.angle; + current = home; + old = home; + shape_angle = home.angle; - rotY = orig.angle.y; + rotY = home.angle.y; roomNo = -1; - dComIfGs_setRestartOption(&orig.pos, rotY, roomNo, option); - dComIfGs_setPlayerPriest(option, orig.pos, rotY, roomNo); + dComIfGs_setRestartOption(&home.pos, rotY, roomNo, option); + dComIfGs_setPlayerPriest(option, home.pos, rotY, roomNo); dComIfGs_setPlayerPriest(option, dComIfGs_getRestartOptionPos(), dComIfGs_getRestartOptionAngleY(), dComIfGs_getRestartOptionRoomNo()); fopAcM_setStageLayer(this); } @@ -126,12 +126,12 @@ BOOL daPy_npc_c::checkRestart(s8 option) { if (option == dComIfGs_getRestartOption()) { s16 option_point = dComIfGs_getRestartOptionPoint(); if (option_point < 0) { - orig.pos = dComIfGs_getRestartOptionPos(); - orig.angle.y = dComIfGs_getRestartOptionAngleY(); - orig.roomNo = dComIfGs_getRestartOptionRoomNo(); - current = orig; - next = orig; - shape_angle = orig.angle; + home.pos = dComIfGs_getRestartOptionPos(); + home.angle.y = dComIfGs_getRestartOptionAngleY(); + home.roomNo = dComIfGs_getRestartOptionRoomNo(); + current = home; + old = home; + shape_angle = home.angle; } else { setPointRestart(option_point, 1); } @@ -148,9 +148,9 @@ BOOL daPy_npc_c::initialRestartOption(s8 option, int save) { if (save && option != dComIfGs_getRestartOption()) { s16 rotY; s8 roomNo = current.roomNo; - rotY = orig.angle.y; - dComIfGs_setRestartOption(&orig.pos, rotY, roomNo, option); - dComIfGs_setPlayerPriest(option, orig.pos, rotY, roomNo); + rotY = home.angle.y; + dComIfGs_setRestartOption(&home.pos, rotY, roomNo, option); + dComIfGs_setPlayerPriest(option, home.pos, rotY, roomNo); } return TRUE; } @@ -201,7 +201,7 @@ int daPy_npc_c::chkMoveBlock(cXyz* outBlockVel) { cXyz blockRelPos; fopAc_ac_c* block = daPy_npc_SearchAreaByName(this, PROC_Obj_Movebox, 300.0f, &blockRelPos); if (block) { - cXyz blockVel = block->current.pos - block->next.pos; + cXyz blockVel = block->current.pos - block->old.pos; if (blockVel.abs() > 0.001f) { if (outBlockVel) { *outBlockVel = blockVel; diff --git a/src/d/actor/d_a_race_item.cpp b/src/d/actor/d_a_race_item.cpp index 39c97bdf0..5dad661fa 100644 --- a/src/d/actor/d_a_race_item.cpp +++ b/src/d/actor/d_a_race_item.cpp @@ -94,7 +94,7 @@ BOOL daRaceItem_c::CreateInit() { mCyl.SetH(height); mAcchCir.SetWall(30.0f, 30.0f); - mAcch.Set(¤t.pos, &next.pos, this, 1, &mAcchCir, &speed); + mAcch.Set(¤t.pos, &old.pos, this, 1, &mAcchCir, &speed); mAcch.ClrWaterNone(); mAcch.ClrRoofNone(); diff --git a/src/d/actor/d_a_shop_item.cpp b/src/d/actor/d_a_shop_item.cpp index 7b362cc96..bb8e62197 100644 --- a/src/d/actor/d_a_shop_item.cpp +++ b/src/d/actor/d_a_shop_item.cpp @@ -81,7 +81,7 @@ void daShopItem_c::CreateInit() { show(); mScale = getData()[m_itemNo].mScale; - orig.pos = current.pos; + home.pos = current.pos; set_mtx(); if(isDaizaItem(m_itemNo)) { diff --git a/src/d/actor/d_a_swhit0.cpp b/src/d/actor/d_a_swhit0.cpp index 8456f9f9d..fc20d9567 100644 --- a/src/d/actor/d_a_swhit0.cpp +++ b/src/d/actor/d_a_swhit0.cpp @@ -97,7 +97,7 @@ s32 daSwhit0_c::getTimer() { /* 000000B8-000000C4 .text getSwNo2__10daSwhit0_cFv */ s32 daSwhit0_c::getSwNo2() { - return orig.angle.z & 0xFF; + return home.angle.z & 0xFF; } /* 000000C4-00000230 .text CreateHeap__10daSwhit0_cFv */ @@ -125,10 +125,10 @@ BOOL daSwhit0_c::CreateHeap() { /* 00000230-00000270 .text decisionRtType__10daSwhit0_cFv */ void daSwhit0_c::decisionRtType() { - if (orig.angle.x == 0) { + if (home.angle.x == 0) { mRetType = 0; } - else if (orig.angle.x < -0x4E20 || orig.angle.x > 0x4E20) { + else if (home.angle.x < -0x4E20 || home.angle.x > 0x4E20) { mRetType = 2; return; } @@ -145,9 +145,9 @@ s32 daSwhit0_c::CreateInit() { mColStatus.Init(0xFF, 0xFF, this); - mAttentionInfo.mPosition.x += cM_ssin(orig.angle.x) * 65.0f * cM_ssin(orig.angle.y); - mAttentionInfo.mPosition.y += cM_scos(orig.angle.x) * 65.0f; - mAttentionInfo.mPosition.z += cM_ssin(orig.angle.x) * 65.0f * cM_scos(orig.angle.y); + mAttentionInfo.mPosition.x += cM_ssin(home.angle.x) * 65.0f * cM_ssin(home.angle.y); + mAttentionInfo.mPosition.y += cM_scos(home.angle.x) * 65.0f; + mAttentionInfo.mPosition.z += cM_ssin(home.angle.x) * 65.0f * cM_scos(home.angle.y); mEyePos = mAttentionInfo.mPosition; diff --git a/src/d/actor/d_a_switem.cpp b/src/d/actor/d_a_switem.cpp index 20aee062a..71000a3d1 100644 --- a/src/d/actor/d_a_switem.cpp +++ b/src/d/actor/d_a_switem.cpp @@ -134,7 +134,7 @@ bool daSwItem_c::_execute() { itemBitNo = 0x7F; } - csXyz angle(0, orig.angle.y, 0); + csXyz angle(0, home.angle.y, 0); u32 itemProcId = fopAcM_createItemFromTable( ¤t.pos, itemTbl, itemBitNo, fopAcM_GetHomeRoomNo(this), 0, &angle, 1 diff --git a/src/d/actor/d_a_swtdoor.cpp b/src/d/actor/d_a_swtdoor.cpp index 03562cc15..0163fb788 100644 --- a/src/d/actor/d_a_swtdoor.cpp +++ b/src/d/actor/d_a_swtdoor.cpp @@ -24,10 +24,10 @@ static BOOL daSwtdoor_Draw(swtdoor_class* i_this) { /* 000000C4-000001BC .text daSwtdoor_Execute__FP13swtdoor_class */ static BOOL daSwtdoor_Execute(swtdoor_class* i_this) { g_env_light.settingTevStruct(TEV_TYPE_BG0, &i_this->current.pos, &i_this->mTevStr); - if (dComIfGs_isSwitch(i_this->mSwitchNo, fopAcM_GetRoomNo(i_this)) && i_this->orig.pos.y > -300.0f) - i_this->orig.pos.y -= 10.0f; + if (dComIfGs_isSwitch(i_this->mSwitchNo, fopAcM_GetRoomNo(i_this)) && i_this->home.pos.y > -300.0f) + i_this->home.pos.y -= 10.0f; - MtxTrans(i_this->current.pos.x, i_this->current.pos.y + i_this->orig.pos.y, i_this->current.pos.z, false); + MtxTrans(i_this->current.pos.x, i_this->current.pos.y + i_this->home.pos.y, i_this->current.pos.z, false); mDoMtx_YrotM(*calc_mtx, i_this->current.angle.y); mDoMtx_XrotM(*calc_mtx, i_this->current.angle.x); mDoMtx_ZrotM(*calc_mtx, i_this->current.angle.z); @@ -81,7 +81,7 @@ static s32 daSwtdoor_Create(fopAc_ac_c* i_ac) { fopAcM_SetMin(i_this, -2000.0f, -1000.0f, -2000.0f); fopAcM_SetMax(i_this, 2000.0f, 1000.0f, 2000.0f); fopAcM_SetMtx(i_this, i_this->model->getBaseTRMtx()); - i_this->orig.pos.y = 0.0f; + i_this->home.pos.y = 0.0f; return cPhs_COMPLEATE_e; } diff --git a/src/d/actor/d_a_tag_kb_item.cpp b/src/d/actor/d_a_tag_kb_item.cpp index eac802f27..80323cbf1 100644 --- a/src/d/actor/d_a_tag_kb_item.cpp +++ b/src/d/actor/d_a_tag_kb_item.cpp @@ -12,7 +12,7 @@ bool daTagKbItem_c::_delete() { #if VERSION != VERSION_JPN if (field_0x2a0 != 0xff && field_0x2a4 != 0xff) { - dComIfGs_offSwitch(field_0x2a4, orig.roomNo); + dComIfGs_offSwitch(field_0x2a4, home.roomNo); } #endif return 1; @@ -35,8 +35,8 @@ int daTagKbItem_c::_create() { fopAcM_SetupActor(this, daTagKbItem_c); CreateInit(); - if (field_0x29c != 0x1f && dComIfGs_isItem(field_0x29c, orig.roomNo) || - field_0x2a4 != 0xff && dComIfGs_isSwitch(field_0x2a4, orig.roomNo)) + if (field_0x29c != 0x1f && dComIfGs_isItem(field_0x29c, home.roomNo) || + field_0x2a4 != 0xff && dComIfGs_isSwitch(field_0x2a4, home.roomNo)) { return cPhs_ERROR_e; } @@ -46,8 +46,8 @@ int daTagKbItem_c::_create() { /* 000001BC-000001C4 .text _execute__13daTagKbItem_cFv */ bool daTagKbItem_c::_execute() { #if VERSION == VERSION_JPN - if (field_0x29c != 0x1f && dComIfGs_isItem(field_0x29c, orig.roomNo) || - field_0x2a4 != 0xff && dComIfGs_isSwitch(field_0x2a4, orig.roomNo)) + if (field_0x29c != 0x1f && dComIfGs_isItem(field_0x29c, home.roomNo) || + field_0x2a4 != 0xff && dComIfGs_isSwitch(field_0x2a4, home.roomNo)) { fopAcM_delete(this); } diff --git a/src/d/actor/d_a_tag_msg.cpp b/src/d/actor/d_a_tag_msg.cpp index caf4b2914..dee503fdf 100644 --- a/src/d/actor/d_a_tag_msg.cpp +++ b/src/d/actor/d_a_tag_msg.cpp @@ -63,11 +63,11 @@ const char* daTag_Msg_c::myDemoName() { } u16 daTag_Msg_c::getMessage() { - return orig.angle.x; + return home.angle.x; } u16 daTag_Msg_c::getEventFlag() { - return orig.angle.z; + return home.angle.z; } BOOL daTag_Msg_c::arrivalTerms() { @@ -113,7 +113,7 @@ BOOL daTag_Msg_c::otherCheck() { } JUT_ASSERT(0xC8, player); if (getMessage() == 0x1902) { - s16 diff = targetAngle - orig.angle.y; + s16 diff = targetAngle - home.angle.y; if (diff < 0) { diff = -diff; } diff --git a/src/d/actor/d_a_tbox.cpp b/src/d/actor/d_a_tbox.cpp index 46ff6cb55..3371162cf 100644 --- a/src/d/actor/d_a_tbox.cpp +++ b/src/d/actor/d_a_tbox.cpp @@ -331,7 +331,7 @@ s32 daTbox_c::bgCheckSet() { /* 00000BB0-00000C14 .text searchRoomNo__8daTbox_cFv */ void daTbox_c::searchRoomNo() { if (mRoomNo == -1) { - mRoomNo = orig.angle.x & 0x3F; + mRoomNo = home.angle.x & 0x3F; } if (flagCheck(0x02)) { @@ -600,7 +600,7 @@ void daTbox_c::CreateInit() { if (funcType == FUNC_TYPE_GRAVITY) { mAcchCir.SetWall(30.0f, 0.0f); - mObjAcch.Set(¤t.pos, &next.pos, this, 1, &mAcchCir, &speed); + mObjAcch.Set(¤t.pos, &old.pos, this, 1, &mAcchCir, &speed); mGravity = -2.5f; } @@ -611,7 +611,7 @@ void daTbox_c::CreateInit() { /* 00001560-00001624 .text boxCheck__8daTbox_cFv */ s32 daTbox_c::boxCheck() { fopAc_ac_c* player = dComIfGp_getPlayer(0); - cXyz playerChestDiff = player->current.pos - orig.pos; + cXyz playerChestDiff = player->current.pos - home.pos; if (playerChestDiff.abs2XZ() < 10000.0f) { if (fopAcM_seenActorAngleY(this, dComIfGp_getPlayer(0)) < 0x2000 && fopAcM_seenActorAngleY(player, this) < 0x2000) { @@ -910,7 +910,7 @@ void daTbox_c::OpenInit_com() { dComIfGs_onTbox(tboxNo); } - s32 openSwNo = orig.angle.z & 0xFF; + s32 openSwNo = home.angle.z & 0xFF; if (openSwNo != 0xFF) { dComIfGs_onSwitch(openSwNo, mRoomNo); @@ -1231,7 +1231,7 @@ BOOL daTbox_c::execute() { mAttentionInfo.mPosition = current.pos; mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z); - mDoMtx_stack_c::YrotM(orig.angle.y); + mDoMtx_stack_c::YrotM(home.angle.y); mpChestMdl->setBaseTRMtx(mDoMtx_stack_c::get()); mDoMtx_copy(mDoMtx_stack_c::get(), mMtx); @@ -1300,7 +1300,7 @@ static s32 daTbox_Create(fopAc_ac_c* i_actor) { result = dComIfG_resLoad(tbox->getPhase(), "Dalways"); if (result == cPhs_COMPLEATE_e) { - tbox->mRoomNo = tbox->orig.angle.x & 0x3F; + tbox->mRoomNo = tbox->home.angle.x & 0x3F; u32 shapeType = tbox->getShapeType(); u32 heapSize = heapsize_tbl[shapeType]; diff --git a/src/d/d_a_item_static.cpp b/src/d/d_a_item_static.cpp index 339eefb37..af1d3981e 100644 --- a/src/d/d_a_item_static.cpp +++ b/src/d/d_a_item_static.cpp @@ -66,7 +66,7 @@ BOOL daItem_c::releaseLock() { /* 800689A8-800689F0 .text checkActionNow__8daItem_cFv */ BOOL daItem_c::checkActionNow() { - if (fabsf(speedF) < 0.1f && fabsf(next.pos.y - current.pos.y) < 1.0f) { + if (fabsf(speedF) < 0.1f && fabsf(old.pos.y - current.pos.y) < 1.0f) { return FALSE; } return TRUE; diff --git a/src/d/d_a_ship_static.cpp b/src/d/d_a_ship_static.cpp index 399255bf8..755ed410d 100644 --- a/src/d/d_a_ship_static.cpp +++ b/src/d/d_a_ship_static.cpp @@ -4,20 +4,15 @@ #include "d/actor/d_a_ship.h" void daShip_c::initStartPos(const cXyz* pos, short rotY) { - current.pos.x = pos->x; - current.pos.y = pos->y; - current.pos.z = pos->z; - next.pos.x = pos->x; - next.pos.y = pos->y; - next.pos.z = pos->z; + current.pos = *pos; + old.pos = *pos; shape_angle.y = rotY; current.angle.y = shape_angle.y; - m0358 &= 0xffffffef; + m0358 &= ~0x10; mGravity = -2.5f; mWaveL.remove(); mWaveR.remove(); - mSplash.remove(); mTrack.remove(); m1970.end(); diff --git a/src/d/d_com_static.cpp b/src/d/d_com_static.cpp index 5ca7177af..730df43b4 100644 --- a/src/d/d_com_static.cpp +++ b/src/d/d_com_static.cpp @@ -252,7 +252,7 @@ void daTagKbItem_c::dig_main() { } if (field_0x2a1 != 0xFF) { - mpActor->orig.angle.z = field_0x2a1; + mpActor->home.angle.z = field_0x2a1; fopAcM_onSwitch(this, field_0x2a4); fopAcM_delete(this); r30 = true; diff --git a/src/d/d_door.cpp b/src/d/d_door.cpp index 3be373c86..6e66e91a8 100644 --- a/src/d/d_door.cpp +++ b/src/d/d_door.cpp @@ -37,22 +37,22 @@ u8 dDoor_info_c::getEventNo() { /* 8006B3F8-8006B404 .text getFRoomNo__12dDoor_info_cFv */ u8 dDoor_info_c::getFRoomNo() { - return orig.angle.x & 0x3F; + return home.angle.x & 0x3F; } /* 8006B404-8006B410 .text getBRoomNo__12dDoor_info_cFv */ u8 dDoor_info_c::getBRoomNo() { - return (orig.angle.x >> 0x06) & 0x3F; + return (home.angle.x >> 0x06) & 0x3F; } /* 8006B410-8006B41C .text getShipId__12dDoor_info_cFv */ u8 dDoor_info_c::getShipId() { - return orig.angle.z & 0x3F; + return home.angle.z & 0x3F; } /* 8006B41C-8006B428 .text getArg1__12dDoor_info_cFv */ u8 dDoor_info_c::getArg1() { - return (orig.angle.z >> 0x08) & 0xFF; + return (home.angle.z >> 0x08) & 0xFF; } /* 8006B428-8006B4C4 .text adjoinPlayer__12dDoor_info_cFv */ diff --git a/src/d/d_event_manager.cpp b/src/d/d_event_manager.cpp index 3a91dacf7..ad62c36da 100644 --- a/src/d/d_event_manager.cpp +++ b/src/d/d_event_manager.cpp @@ -646,7 +646,7 @@ static fopAc_ac_c* findShutterCallBack(fopAc_ac_c* actor, void* user) { if (param->profName != fopAcM_GetProfName(actor)) return NULL; - cXyz diff = actor->orig.pos - param->actor->orig.pos; + cXyz diff = actor->home.pos - param->actor->home.pos; if (diff.x < 10.0f && diff.x > -10.0f && diff.y < 10.0f && diff.y > -10.0f && diff.z < 10.0f && diff.z > -10.0f) return actor; @@ -664,8 +664,8 @@ fopAc_ac_c* dEvent_manager_c::specialCast_Shutter(s16 profName, int flag) { fopAc_ac_c* shutter = (fopAc_ac_c*)fopAcIt_Judge((fopAcIt_JudgeFunc)findShutterCallBack, ¶m); if (shutter != NULL && flag) { - cXyz goal = shutter->orig.pos; - s16 angle = param.actor->orig.angle.y + 0x8000; + cXyz goal = shutter->home.pos; + s16 angle = param.actor->home.angle.y + 0x8000; goal.x += cM_ssin(angle) * 100.0f; goal.z += cM_scos(angle) * 100.0f; dComIfGp_evmng_setGoal(&goal); diff --git a/src/d/d_npc.cpp b/src/d/d_npc.cpp index 6bc2e49f9..3fd1e8651 100644 --- a/src/d/d_npc.cpp +++ b/src/d/d_npc.cpp @@ -796,14 +796,14 @@ void dNpc_JntCtrl_c::turn_fromHead2Backbone(s16 param_1, s16* param_2, s16* para } } -s16 dNpc_JntCtrl_c::follow_current(s16* orig, s16 diff) { - s16 angle = *orig; - *orig -= diff; +s16 dNpc_JntCtrl_c::follow_current(s16* pAngle, s16 diff) { + s16 angle = *pAngle; + *pAngle -= diff; s16 ret = 0; - if((angle > 0 && *orig < 0) || (angle < 0 && *orig > 0)) { - ret = -*orig; - *orig = 0; + if((angle > 0 && *pAngle < 0) || (angle < 0 && *pAngle > 0)) { + ret = -*pAngle; + *pAngle = 0; } return ret; diff --git a/src/d/d_shop.cpp b/src/d/d_shop.cpp index 6c40ab88c..189506b0b 100644 --- a/src/d/d_shop.cpp +++ b/src/d/d_shop.cpp @@ -1068,7 +1068,7 @@ BOOL ShopItems_c::Item_Select(int idx) { if (item) { csXyz* pAngle = item->getRotateP(); cXyz* pPos = item->getPosP(); - cXyz temp2 = item->orig.pos; + cXyz temp2 = item->home.pos; cXyz temp = m30; temp -= item->getCenter(); if (m3C == 1) { @@ -1088,9 +1088,9 @@ BOOL ShopItems_c::Item_Select(int idx) { BOOL ShopItems_c::Item_Wait(int idx) { daShopItem_c* item = (daShopItem_c*)fopAcM_SearchByID(mItemActorProcessIds[idx]); if (item) { - cLib_addCalcAngleS(&item->getRotateP()->y, item->orig.angle.y, 0x4, 0x800, 0x80); + cLib_addCalcAngleS(&item->getRotateP()->y, item->home.angle.y, 0x4, 0x800, 0x80); cXyz* pPos = item->getPosP(); - cXyz targetPos = item->orig.pos; + cXyz targetPos = item->home.pos; cLib_addCalcPos2(pPos, targetPos, 0.5f, 20.0f); return TRUE; } @@ -1148,7 +1148,7 @@ cXyz ShopItems_c::getSelectItemBasePos() { } daShopItem_c* item = (daShopItem_c*)fopAcM_SearchByID(mItemActorProcessIds[mSelectedItemIdx]); if (item) { - return item->orig.pos + item->getCenter(); + return item->home.pos + item->getCenter(); } else { return cXyz::Zero; } @@ -1186,8 +1186,8 @@ void ShopItems_c::showItem() { daShopItem_c* item = (daShopItem_c*)fopAcM_SearchByID(mItemActorProcessIds[i]); if (item && m28[i] != 1) { item->show(); - item->current.pos = item->orig.pos; - item->getRotateP()->y = item->orig.angle.y; + item->current.pos = item->home.pos; + item->getRotateP()->y = item->home.angle.y; } } mbIsHide = 0; diff --git a/src/f_op/f_op_actor.cpp b/src/f_op/f_op_actor.cpp index 318ab76a6..f18e0e027 100644 --- a/src/f_op/f_op_actor.cpp +++ b/src/f_op/f_op_actor.cpp @@ -98,7 +98,7 @@ s32 fopAc_Execute(void* pProc) { ) ) { fopAcM_OffCondition(actor, fopAcCnd_NOEXEC_e); - actor->next = actor->current; + actor->old = actor->current; ret = fpcMtd_Execute((process_method_class*)actor->mSubMtd, actor); } else { fopAcM_OnCondition(actor, fopAcCnd_NOEXEC_e); @@ -157,20 +157,20 @@ s32 fopAc_Create(void* pProc) { fopAcM_prm_class* prm = fopAcM_GetAppend(actor); if (prm != NULL) { fopAcM_SetParam(actor, prm->mParameter); - actor->orig.pos = prm->mPos; - actor->orig.angle = prm->mAngle; + actor->home.pos = prm->mPos; + actor->home.angle = prm->mAngle; actor->shape_angle = prm->mAngle; actor->mParentPcId = prm->mParentPcId; actor->mSubtype = prm->mSubtype; actor->mGbaName = prm->mGbaName; actor->mScale.set(prm->mScale.x * 0.1f, prm->mScale.y * 0.1f, prm->mScale.z * 0.1f); actor->mSetId = prm->mSetId; - actor->orig.roomNo = prm->mRoomNo; + actor->home.roomNo = prm->mRoomNo; } - actor->next = actor->orig; - actor->current = actor->orig; - actor->mEyePos = actor->orig.pos; + actor->old = actor->home; + actor->current = actor->home; + actor->mEyePos = actor->home.pos; actor->mMaxFallSpeed = -100.0f; actor->mAttentionInfo.mDistances[0] = 1; actor->mAttentionInfo.mDistances[1] = 2; @@ -180,8 +180,8 @@ s32 fopAc_Create(void* pProc) { actor->mAttentionInfo.mDistances[7] = 15; actor->mAttentionInfo.mDistances[5] = 16; actor->mAttentionInfo.mDistances[6] = 16; - actor->mAttentionInfo.mPosition = actor->orig.pos; - dKy_tevstr_init(&actor->mTevStr, actor->orig.roomNo, 0xFF); + actor->mAttentionInfo.mPosition = actor->home.pos; + dKy_tevstr_init(&actor->mTevStr, actor->home.roomNo, 0xFF); } s32 status = fpcMtd_Create((process_method_class*)actor->mSubMtd, actor);