summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarco_21 <144170194+carter-ktb21@users.noreply.github.com>2025-05-30 06:49:24 -0400
committerGitHub <noreply@github.com>2025-05-30 13:49:24 +0300
commitbc945599045ebcf8e8f88ea3560e89fb36ba3968 (patch)
tree5125e902f7c1fb8141589bc7eaed5bfd7b9fec6b /src
parent6fd5560738b856d59575f8d26f1d02b64def0d76 (diff)
d_a_npc_ks work (#2461)
* Initial work * Work on ori2 and others * Work on npc_ks_home * Work on npc_ks_demo_022 * Chugging through * Started on demo_camera * More demo_camera work * 51% equivalent * General cleanup * Fixed compile error in d_a_e_mk * Small d_a_e_mk fix * d_a_e_fs fix * PR cleanup * Started work on d_a_obj_sw
Diffstat (limited to 'src')
-rw-r--r--src/d/actor/d_a_e_fs.cpp5
-rw-r--r--src/d/actor/d_a_e_mk.cpp46
-rw-r--r--src/d/actor/d_a_npc_ks.cpp7043
-rw-r--r--src/d/actor/d_a_obj_sw.cpp350
4 files changed, 4133 insertions, 3311 deletions
diff --git a/src/d/actor/d_a_e_fs.cpp b/src/d/actor/d_a_e_fs.cpp
index 3cf593e4fa..41b10845a7 100644
--- a/src/d/actor/d_a_e_fs.cpp
+++ b/src/d/actor/d_a_e_fs.cpp
@@ -478,7 +478,6 @@ static bool checkViewArea(cXyz* i_pos) {
}
/* 806BCE5C-806BD0A8 00147C 024C+00 2/1 0/0 0/0 .text e_fs_demowait__FP10e_fs_class */
-// NONMATCHING regalloc
static void e_fs_demowait(e_fs_class* i_this) {
cXyz delta;
npc_ks_class* monkey = (npc_ks_class*)fopAcM_SearchByName(PROC_NPC_KS);
@@ -499,8 +498,8 @@ static void e_fs_demowait(e_fs_class* i_this) {
break;
case 2:
- delta.x = monkey->current.pos.x - i_this->current.pos.x;
- delta.z = monkey->current.pos.z - i_this->current.pos.z;
+ delta.x = monkey->actor.current.pos.x - i_this->current.pos.x;
+ delta.z = monkey->actor.current.pos.z - i_this->current.pos.z;
i_this->mTargetAngleY = cM_atan2s(delta.x, delta.z);
if (i_this->mAcch.ChkGroundHit()) {
i_this->mpMorf->setPlaySpeed(1.0f);
diff --git a/src/d/actor/d_a_e_mk.cpp b/src/d/actor/d_a_e_mk.cpp
index 5a062d1975..f13a81285b 100644
--- a/src/d/actor/d_a_e_mk.cpp
+++ b/src/d/actor/d_a_e_mk.cpp
@@ -1193,7 +1193,7 @@ static void cam_3d_morf(e_mk_class* i_this, f32 param_2) {
/* 807174E4-8071823C 0034A4 0D58+00 1/1 0/0 0/0 .text demo_camera_start__FP10e_mk_class */
static void demo_camera_start(e_mk_class* i_this) {
- // EQUIVALENT - REGALLOC
+ // NONMATCHING
fopAc_ac_c* a_this = &i_this->enemy;
fopAc_ac_c* actor1, * actor2, * actor3;
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
@@ -1908,9 +1908,9 @@ static void demo_camera_r04(e_mk_class* i_this) {
switch (i_this->mDemoMode) {
case 1:
- if (!i_actor->eventInfo.checkCommandDemoAccrpt()) {
- fopAcM_orderPotentialEvent(i_actor, 2, 0xffff, 0);
- i_actor->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ if (!i_actor->actor.eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(&i_actor->actor, 2, 0xffff, 0);
+ i_actor->actor.eventInfo.onCondition(dEvtCnd_CANDEMO_e);
return;
}
@@ -1953,13 +1953,13 @@ static void demo_camera_r04(e_mk_class* i_this) {
}
if (i_this->mDemoCamTimer == 260) {
- cMtx_YrotS(*calc_mtx, i_actor->shape_angle.y);
+ cMtx_YrotS(*calc_mtx, i_actor->actor.shape_angle.y);
sp2c.x = 200.0f;
sp2c.y = 300.0f;
sp2c.z = 300.0f;
MtxPosition(&sp2c, &i_this->mCamEye);
- i_this->mCamEye += i_actor->current.pos;
- i_this->mCamCenter = i_actor->current.pos;
+ i_this->mCamEye += i_actor->actor.current.pos;
+ i_this->mCamCenter = i_actor->actor.current.pos;
i_this->mCamCenter.y += 130.0f;
i_this->mDemoMode = 3;
i_this->mDemoCamTimer = 0;
@@ -1971,8 +1971,8 @@ static void demo_camera_r04(e_mk_class* i_this) {
case 3:
a_this->current.pos.y = a_this->home.pos.y + 10000.0f;
- cLib_addCalc2(&i_this->mCamCenter.z, i_actor->current.pos.z, 0.2f, 50.0f);
- cLib_addCalc2(&i_this->mCamCenter.y, i_actor->current.pos.y + 130.0f + cM_ssin(i_this->mDemoCamTimer * 0xA00) * 30.0f, 0.2f, 50.0f);
+ cLib_addCalc2(&i_this->mCamCenter.z, i_actor->actor.current.pos.z, 0.2f, 50.0f);
+ cLib_addCalc2(&i_this->mCamCenter.y, i_actor->actor.current.pos.y + 130.0f + cM_ssin(i_this->mDemoCamTimer * 0xA00) * 30.0f, 0.2f, 50.0f);
if (i_this->mDemoCamTimer != 93) {
return;
@@ -2004,22 +2004,22 @@ static void demo_camera_r04(e_mk_class* i_this) {
i_this->mDemoMode = 45;
i_this->mDemoCamTimer = 0;
- cMtx_YrotS(*calc_mtx, i_actor->shape_angle.y);
+ cMtx_YrotS(*calc_mtx, i_actor->actor.shape_angle.y);
sp2c.x = -300.0f;
sp2c.y = 200.0f;
sp2c.z = -100.0f;
MtxPosition(&sp2c, &i_this->mCamEye);
- i_this->mCamEye += i_actor->current.pos;
- i_this->mCamCenter = i_actor->current.pos;
+ i_this->mCamEye += i_actor->actor.current.pos;
+ i_this->mCamCenter = i_actor->actor.current.pos;
i_this->mCamCenter.y += 90.0f;
return;
case 45:
- cLib_addCalc2(&i_this->mCamCenter.z, i_actor->current.pos.z, 0.2f, 50.0f);
- cLib_addCalc2(&i_this->mCamCenter.y, i_actor->current.pos.y + 90.0f + 30.0f * cM_ssin(i_this->mDemoCamTimer * 0xA00), 0.2f, 50.0f);
+ cLib_addCalc2(&i_this->mCamCenter.z, i_actor->actor.current.pos.z, 0.2f, 50.0f);
+ cLib_addCalc2(&i_this->mCamCenter.y, i_actor->actor.current.pos.y + 90.0f + 30.0f * cM_ssin(i_this->mDemoCamTimer * 0xA00), 0.2f, 50.0f);
if (i_this->mDemoCamTimer == 10) {
- i_actor->field_0x567 = 1;
+ i_actor->actor.field_0x567 = 1;
}
if (i_this->mDemoCamTimer != 55) {
@@ -2055,8 +2055,8 @@ static void demo_camera_r04(e_mk_class* i_this) {
i_this->mCamEye.set(-477.0f, 3119.0f, 1643.0f);
if (i_this->mDemoCamTimer == 30) {
- i_actor->current.pos.z = 1600.0f;
- i_actor->current.pos.y = 3200.0f;
+ i_actor->actor.current.pos.z = 1600.0f;
+ i_actor->actor.current.pos.y = 3200.0f;
}
if (i_this->mDemoCamTimer != 69) {
@@ -2089,8 +2089,8 @@ static void demo_camera_r04(e_mk_class* i_this) {
i_this->mCamCenter.y += 190.0f;
// fallthrough
case 7:
- i_actor->speed.y = 0.0f;
- i_actor->current.pos.set(0.0f, 2500.0f, 3373.0f);
+ i_actor->actor.speed.y = 0.0f;
+ i_actor->actor.current.pos.set(0.0f, 2500.0f, 3373.0f);
if (i_this->mDemoCamTimer != 250) {
return;
@@ -2100,14 +2100,14 @@ static void demo_camera_r04(e_mk_class* i_this) {
i_this->mDemoCamTimer = 0;
i_actor->mMode++;
i_this->mCamEye.set(-282.0f, 2534.0f, 3147.0f);
- i_this->mCamCenter = i_actor->current.pos;
+ i_this->mCamCenter = i_actor->actor.current.pos;
// fallthrough
case 8:
- cLib_addCalc2(&i_this->mCamCenter.y, i_actor->current.pos.y, 0.2f, 50.0f);
+ cLib_addCalc2(&i_this->mCamCenter.y, i_actor->actor.current.pos.y, 0.2f, 50.0f);
fpcM_Search(s_brg_sub, i_this);
if (i_this->mDemoCamTimer == 65) {
- i_actor->current.pos.set(0.0f, 3310.0f, 3427.0f);
+ i_actor->actor.current.pos.set(0.0f, 3310.0f, 3427.0f);
i_actor->mMode++;
i_this->mDemoMode = 9;
i_this->mDemoCamTimer = 0;
@@ -2238,7 +2238,7 @@ static void demo_camera(e_mk_class* i_this) {
i_no = fopAcM_GetParam(i_actor) >> 24;
if (i_no != 0xFF) {
- dComIfGs_onSwitch(i_no, fopAcM_GetRoomNo(i_actor));
+ dComIfGs_onSwitch(i_no, fopAcM_GetRoomNo(&i_actor->actor));
}
dComIfGp_setNextStage("D_MN05", 0, 4, 0);
diff --git a/src/d/actor/d_a_npc_ks.cpp b/src/d/actor/d_a_npc_ks.cpp
index e4f90f35da..4342ffb55f 100644
--- a/src/d/actor/d_a_npc_ks.cpp
+++ b/src/d/actor/d_a_npc_ks.cpp
@@ -7,670 +7,87 @@
#include "d/d_cc_d.h"
#include "dol2asm.h"
#include "d/d_camera.h"
-
-
-//
-// Forward References:
-//
-
-extern "C" void __ct__14daNpc_Ks_HIO_cFv();
-extern "C" static void setPlayerPosAndAngle__FP4cXyzs();
-extern "C" static void checkDoorDemo__Fv();
-extern "C" static void otherBgCheck__FP10fopAc_ac_cP10fopAc_ac_c();
-extern "C" void __dt__4cXyzFv();
-extern "C" static void anm_init__FP12npc_ks_classifUcf();
-extern "C" static void nodeCallBack__FP8J3DJointi();
-extern "C" static void daNpc_Ks_Draw__FP12npc_ks_class();
-extern "C" static void s_resq_sub__FPvPv();
-extern "C" static void s_b_sub__FPvPv();
-extern "C" static void search_bomb__FP12npc_ks_classi();
-extern "C" static void bomb_view_check__FP12npc_ks_class();
-extern "C" static void bomb_check__FP12npc_ks_class();
-extern "C" static void s_e_sub__FPvPv();
-extern "C" static void search_enemy__FP12npc_ks_classif();
-extern "C" static void enemy_view_check__FP12npc_ks_classf();
-extern "C" static void enemy_check__FP12npc_ks_classf();
-extern "C" static void s_en_sub__FPvPv();
-extern "C" static void en_search_test__FP12npc_ks_class();
-extern "C" static void s_ori_sub__FPvPv();
-extern "C" static void npc_ks_pole_ori__FP12npc_ks_class();
-extern "C" static void npc_ks_ori__FP12npc_ks_class();
-extern "C" static void shot_bo_sub__FPvPv();
-extern "C" static void npc_ks_ori2__FP12npc_ks_class();
-extern "C" static void npc_ks_home__FP12npc_ks_class();
-extern "C" static void s_sw_sub__FPvPv();
-extern "C" static void s_ha_sub__FPvPv();
-extern "C" static void s_01_sub__FPvPv();
-extern "C" static void npc_ks_demo_02__FP12npc_ks_class();
-extern "C" static void s_dn_sub__FPvPv();
-extern "C" static void npc_ks_demo_022__FP12npc_ks_class();
-extern "C" static void npc_ks_demo_04__FP12npc_ks_class();
-extern "C" static void npc_ks_to_hang__FP12npc_ks_class();
-extern "C" static void s_next_do_sub__FPvPv();
-extern "C" static void s_next_get_sub__FPvPv();
-extern "C" static void order_set__Fi();
-extern "C" static void all_carry_finish__Fi();
-extern "C" static void hang_end_check__FP12npc_ks_class();
-extern "C" static void npc_ks_hang__FP12npc_ks_class();
-extern "C" static void npc_ks_hang_s__FP12npc_ks_class();
-extern "C" static void npc_ks_e_hang__FP12npc_ks_class();
-extern "C" static void all_move_check__Fii();
-extern "C" static void go_jump_check__Fi();
-extern "C" static void npc_ks_e_jump__FP12npc_ks_class();
-extern "C" static void get_move_saru__FP12npc_ks_classi();
-extern "C" static void all_hang_check__FP12npc_ks_classi();
-extern "C" static void cam_3d_morf__FP12npc_ks_classf();
-extern "C" static void s_fs_sub__FPvPv();
-extern "C" static void s_fsdown_sub__FPvPv();
-extern "C" static void demo_camera__FP12npc_ks_class();
-extern "C" static void saru_count_check__FP12npc_ks_class();
-extern "C" static void action_check__FP12npc_ks_class();
-extern "C" static void water_check__FP12npc_ks_class4cXyzf();
-extern "C" static void npc_ks_option__FP12npc_ks_class();
-extern "C" static void npc_ks_awaydoor__FP12npc_ks_class();
-extern "C" static void npc_ks_guide_00__FP12npc_ks_class();
-extern "C" static void npc_ks_guide_00_2__FP12npc_ks_class();
-extern "C" static void npc_ks_guide_00_3__FP12npc_ks_class();
-extern "C" static void npc_ks_guide_01__FP12npc_ks_class();
-extern "C" static void npc_ks_guide_02__FP12npc_ks_class();
-extern "C" static void npc_ks_guide_22__FP12npc_ks_class();
-extern "C" static void npc_ks_guide_09__FP12npc_ks_class();
-extern "C" static void npc_ks_demo_12__FP12npc_ks_class();
-extern "C" static void npc_ks_guide_0409__FP12npc_ks_class();
-extern "C" static void path_search__FP12npc_ks_class();
-extern "C" static void npc_ks_mori__FP12npc_ks_class();
-extern "C" static void npc_ks_fsdemo__FP12npc_ks_class();
-extern "C" static void npc_ks_kago__FP12npc_ks_class();
-extern "C" static void anm_se_set__FP12npc_ks_class();
-extern "C" static void action__FP12npc_ks_class();
-extern "C" static void s_kago_sub__FPvPv();
-extern "C" static void kantera_sub__FP12npc_ks_class();
-extern "C" static void daNpc_Ks_Execute__FP12npc_ks_class();
-extern "C" static bool daNpc_Ks_IsDelete__FP12npc_ks_class();
-extern "C" static void daNpc_Ks_Delete__FP12npc_ks_class();
-extern "C" static void useHeapInit__FP10fopAc_ac_c();
-extern "C" void __dt__12J3DFrameCtrlFv();
-extern "C" static void start_check__FP12npc_ks_class();
-extern "C" static void s_check_sub__FPvPv();
-extern "C" static void daNpc_Ks_Create__FP10fopAc_ac_c();
-extern "C" void __dt__8cM3dGCylFv();
-extern "C" void __dt__8cM3dGAabFv();
-extern "C" void __dt__10dCcD_GSttsFv();
-extern "C" void __dt__12dBgS_ObjAcchFv();
-extern "C" void __dt__12dBgS_AcchCirFv();
-extern "C" void __dt__10cCcD_GSttsFv();
-extern "C" void __dt__14daNpc_Ks_HIO_cFv();
-extern "C" void __sinit_d_a_npc_ks_cpp();
-extern "C" static void func_80A5DB30();
-extern "C" static void func_80A5DB38();
-extern "C" void cancelOriginalDemo__9daPy_py_cFv();
-extern "C" static void dComIfGp_event_reset__Fv();
-extern "C" void __ct__4cXyzFRC4cXyz();
-extern "C" static void dComIfGp_setItemOilCount__Fl();
-extern "C" static void dComIfGs_getMaxOil__Fv();
-extern "C" static void daPy_getPlayerActorClass__Fv();
-extern "C" static void dComIfGp_particle_set__FUsPC4cXyzPC5csXyzPC4cXyz();
-extern "C" void changeDemoPos0__9daPy_py_cFPC4cXyz();
-extern "C" void __apl__4cXyzFRC3Vec();
-extern "C" void fabsf__3stdFf();
-extern "C" void set__4cXyzFfff();
-extern "C" void __as__4cXyzFRC4cXyz();
-extern "C" void changeDemoParam0__9daPy_py_cFi(daPy_py_c*, int);
-extern "C" void changeDemoMode__9daPy_py_cFUliis();
-extern "C" void changeOriginalDemo__9daPy_py_cFv();
-extern "C" void onCondition__11dEvt_info_cFUs();
-extern "C" void checkCommandDemoAccrpt__11dEvt_info_cFv();
-extern "C" static void dComIfGp_getCamera__Fi();
-extern "C" static void dComIfGp_getPlayerCameraID__Fi();
-extern "C" static void dComIfGp_getPlayer__Fi();
-extern "C" void checkShadowReturnEnd__9daMidna_cCFv();
-extern "C" void changeDemoMode__9daMidna_cFUl(daMidna_c*, u32);
-extern "C" void changeOriginalDemo__9daMidna_cFv();
-extern "C" static void dComIfGp_getVibration__Fv();
-extern "C" void __ct__4cXyzFfff();
-extern "C" static void dMeter2Info_setOilGaugeBackUp__FUs();
-extern "C" static void dComIfGs_getOil__Fv();
-extern "C" static void dComIfGs_setItem__FiUc();
-extern "C" void __ct__10JAISoundIDFUl();
-extern "C" static void mDoAud_seStart__FUlPC3VecUlSc();
-extern "C" static void dComIfGs_onEventBit__FUs();
-extern "C" extern char const* const d_a_npc_ks__stringBase0;
-
-//
-// External References:
-//
-
-extern "C" void mDoMtx_XrotM__FPA4_fs();
-extern "C" void mDoMtx_YrotS__FPA4_fs();
-extern "C" void mDoMtx_YrotM__FPA4_fs();
-extern "C" void mDoMtx_ZrotM__FPA4_fs();
-extern "C" void transM__14mDoMtx_stack_cFfff();
-extern "C" void scaleM__14mDoMtx_stack_cFfff();
-extern "C" void play__14mDoExt_baseAnmFv();
-extern "C" void init__13mDoExt_btpAnmFP16J3DMaterialTableP16J3DAnmTexPatterniifss();
-extern "C" void entry__13mDoExt_btpAnmFP16J3DMaterialTables();
-extern "C" void mDoExt_modelUpdateDL__FP8J3DModel();
-extern "C" void
-__ct__16mDoExt_McaMorfSOFP12J3DModelDataP25mDoExt_McaMorfCallBack1_cP25mDoExt_McaMorfCallBack2_cP15J3DAnmTransformifiiP10Z2CreatureUlUl();
-extern "C" void setAnm__16mDoExt_McaMorfSOFP15J3DAnmTransformiffff();
-extern "C" void play__16mDoExt_McaMorfSOFUlSc();
-extern "C" void entryDL__16mDoExt_McaMorfSOFv();
-extern "C" void modelCalc__16mDoExt_McaMorfSOFv();
-extern "C" void stopZelAnime__16mDoExt_McaMorfSOFv();
-extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl();
-extern "C" void cDmrNowMidnaTalk__Fv();
-extern "C" void __ct__10fopAc_ac_cFv();
-extern "C" void fopAc_IsActor__FPv();
-extern "C" void fopAcIt_Judge__FPFPvPv_PvPv();
-extern "C" void fopAcM_setStageLayer__FPv();
-extern "C" void fopAcM_setRoomLayer__FPvi();
-extern "C" void fopAcM_delete__FP10fopAc_ac_c();
-extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl();
-extern "C" void fopAcM_SetMin__FP10fopAc_ac_cfff();
-extern "C" void fopAcM_SetMax__FP10fopAc_ac_cfff();
-extern "C" void fopAcM_searchActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c();
-extern "C" void fopAcM_searchActorDistance__FPC10fopAc_ac_cPC10fopAc_ac_c();
-extern "C" void fopAcM_searchActorDistanceXZ__FPC10fopAc_ac_cPC10fopAc_ac_c();
-extern "C" void fopAcM_orderPotentialEvent__FP10fopAc_ac_cUsUsUs();
-extern "C" void fopAcM_getTalkEventPartner__FPC10fopAc_ac_c();
-extern "C" void fopAcM_cancelCarryNow__FP10fopAc_ac_c();
-extern "C" void fopAcM_otoCheck__FPC10fopAc_ac_cf();
-extern "C" void fopAcM_otherBgCheck__FPC10fopAc_ac_cPC10fopAc_ac_c();
-extern "C" void fopAcM_effSmokeSet1__FPUlPUlPC4cXyzPC5csXyzfPC12dKy_tevstr_ci();
-extern "C" void fopAcM_effHamonSet__FPUlPC4cXyzff();
-extern "C" void fpcEx_Search__FPFPvPv_PvPv();
-extern "C" void fpcSch_JudgeForPName__FPvPv();
-extern "C" void fpcSch_JudgeByID__FPvPv();
-extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc();
-extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc();
-extern "C" void dComIfGp_getReverb__Fi();
-extern "C" void
-dComIfGd_setShadow__FUlScP8J3DModelP4cXyzffffR13cBgS_PolyInfoP12dKy_tevstr_csfP9_GXTexObj();
-extern "C" void dComIfGs_shake_kandelaar__Fv();
-extern "C" void dComIfGs_shake_kandelaar_check__Fv();
-extern "C" void setItem__17dSv_player_item_cFiUc();
-extern "C" void onTbox__12dSv_memBit_cFi();
-extern "C" void isDungeonItem__12dSv_memBit_cCFi();
-extern "C" void onEventBit__11dSv_event_cFUs();
-extern "C" void isEventBit__11dSv_event_cCFUs();
-extern "C" void onSwitch__10dSv_info_cFii();
-extern "C" void offSwitch__10dSv_info_cFii();
-extern "C" void isSwitch__10dSv_info_cCFii();
-extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci();
-extern "C" void reset__14dEvt_control_cFv();
-extern "C" void
-set__13dPa_control_cFUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf();
-extern "C" void
-set__13dPa_control_cFUlUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf();
-extern "C" void dPath_GetRoomPath__Fii();
-extern "C" void addReal__21dDlst_shadowControl_cFUlP8J3DModel();
-extern "C" void StartShock__12dVibration_cFii4cXyz();
-extern "C" void LockonTarget__12dAttention_cFl();
-extern "C" void LineCross__4cBgSFP11cBgS_LinChk();
-extern "C" void GroundCross__4cBgSFP11cBgS_GndChk();
-extern "C" void __ct__12dBgS_AcchCirFv();
-extern "C" void SetWall__12dBgS_AcchCirFff();
-extern "C" void __dt__9dBgS_AcchFv();
-extern "C" void __ct__9dBgS_AcchFv();
-extern "C" void Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz();
-extern "C" void CrrPos__9dBgS_AcchFR4dBgS();
-extern "C" void __ct__11dBgS_GndChkFv();
-extern "C" void __dt__11dBgS_GndChkFv();
-extern "C" void __ct__18dBgS_ObjGndChk_SplFv();
-extern "C" void __dt__18dBgS_ObjGndChk_SplFv();
-extern "C" void __ct__11dBgS_LinChkFv();
-extern "C" void __dt__11dBgS_LinChkFv();
-extern "C" void Set__11dBgS_LinChkFPC4cXyzPC4cXyzPC10fopAc_ac_c();
-extern "C" void SetObj__16dBgS_PolyPassChkFv();
-extern "C" void __ct__10dCcD_GSttsFv();
-extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c();
-extern "C" void __ct__12dCcD_GObjInfFv();
-extern "C" void Set__8dCcD_CylFRC11dCcD_SrcCyl();
-extern "C" void setLookPos__9daPy_py_cFP4cXyz();
-extern "C" void Start__9dCamera_cFv();
-extern "C" void Stop__9dCamera_cFv();
-extern "C" void SetTrimSize__9dCamera_cFl();
-extern "C" void Set__9dCamera_cF4cXyz4cXyzfs();
-extern "C" void Reset__9dCamera_cF4cXyz4cXyzfs();
-extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c();
-extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c();
-extern "C" void dKy_Sound_get__Fv();
-extern "C" void dKy_darkworld_check__Fv();
-extern "C" void __ct__10dMsgFlow_cFv();
-extern "C" void init__10dMsgFlow_cFP10fopAc_ac_ciiPP10fopAc_ac_c();
-extern "C" void doFlow__10dMsgFlow_cFP10fopAc_ac_cPP10fopAc_ac_ci();
-extern "C" void getNowMsgNo__10dMsgFlow_cFv();
-extern "C" void Set__4cCcSFP8cCcD_Obj();
-extern "C" void __pl__4cXyzCFRC3Vec();
-extern "C" void __mi__4cXyzCFRC3Vec();
-extern "C" void __ml__4cXyzCFf();
-extern "C" void cM_atan2s__Fff();
-extern "C" void cM_rndF__Ff();
-extern "C" void SetPos__11cBgS_GndChkFPC4cXyz();
-extern "C" void __dt__13cBgS_PolyInfoFv();
-extern "C" void __dt__8cM3dGCirFv();
-extern "C" void SetC__8cM3dGCylFRC4cXyz();
-extern "C" void SetH__8cM3dGCylFf();
-extern "C" void SetR__8cM3dGCylFf();
-extern "C" void cLib_addCalc2__FPffff();
-extern "C" void cLib_addCalc0__FPfff();
-extern "C" void cLib_addCalcAngleS2__FPssss();
-extern "C" void MtxPosition__FP4cXyzP4cXyz();
-extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc();
-extern "C" void setBattleBgmOff__8Z2SeqMgrFb();
-extern "C" void __ct__10Z2CreatureFv();
-extern "C" void init__10Z2CreatureFP3VecP3VecUcUc();
-extern "C" void* __nw__FUl();
-extern "C" void __dl__FPv();
-extern "C" void JUTReport__FiiPCce();
-extern "C" void init__12J3DFrameCtrlFs();
-extern "C" void checkPass__12J3DFrameCtrlFf();
-extern "C" void __cvt_fp2unsigned();
-extern "C" void _savegpr_19();
-extern "C" void _savegpr_22();
-extern "C" void _savegpr_23();
-extern "C" void _savegpr_25();
-extern "C" void _savegpr_26();
-extern "C" void _savegpr_27();
-extern "C" void _savegpr_28();
-extern "C" void _savegpr_29();
-extern "C" void _restgpr_19();
-extern "C" void _restgpr_22();
-extern "C" void _restgpr_23();
-extern "C" void _restgpr_25();
-extern "C" void _restgpr_26();
-extern "C" void _restgpr_27();
-extern "C" void _restgpr_28();
-extern "C" void _restgpr_29();
-extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */];
-extern "C" extern void* __vt__8dCcD_Cyl[36];
-extern "C" extern void* __vt__9dCcD_Stts[11];
-extern "C" extern void* __vt__12cCcD_CylAttr[25];
-extern "C" extern void* __vt__14cCcD_ShapeAttr[22];
-extern "C" extern void* __vt__9cCcD_Stts[8];
-extern "C" u8 m_cpadInfo__8mDoCPd_c[256];
-extern "C" u8 now__14mDoMtx_stack_c[48];
-extern "C" u8 mSimpleTexObj__21dDlst_shadowControl_c[32];
-extern "C" extern u8 g_meter2_info[248];
-extern "C" u8 mCurrentMtx__6J3DSys[48];
-extern "C" u8 sincosTable___5JMath[65536];
-extern "C" extern u8 struct_80450C98[4];
-extern "C" u8 m_midnaActor__9daPy_py_c[4];
-extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
-extern "C" void __register_global_object();
-
-//
-// Declarations:
-//
-
-/* ############################################################################################## */
-/* 80A5DEFC-80A5DF00 000000 0004+00 44/44 0/0 0/0 .rodata @4030 */
-SECTION_RODATA static f32 const lit_4030 = 4.0f / 5.0f;
-COMPILER_STRIP_GATE(0x80A5DEFC, &lit_4030);
-
-/* 80A5DF00-80A5DF04 000004 0004+00 0/10 0/0 0/0 .rodata @4031 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4031 = 200.0f;
-COMPILER_STRIP_GATE(0x80A5DF00, &lit_4031);
-#pragma pop
-
-/* 80A5DF04-80A5DF08 000008 0004+00 0/10 0/0 0/0 .rodata @4032 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4032 = 10.0f;
-COMPILER_STRIP_GATE(0x80A5DF04, &lit_4032);
-#pragma pop
-
-/* 80A5DF08-80A5DF0C 00000C 0004+00 0/3 0/0 0/0 .rodata @4033 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4033 = 25.0f;
-COMPILER_STRIP_GATE(0x80A5DF08, &lit_4033);
-#pragma pop
-
-/* 80A5DF0C-80A5DF10 000010 0004+00 0/12 0/0 0/0 .rodata @4034 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4034 = 20.0f;
-COMPILER_STRIP_GATE(0x80A5DF0C, &lit_4034);
-#pragma pop
-
-/* 80A5DF10-80A5DF14 000014 0004+00 0/12 0/0 0/0 .rodata @4035 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4035 = 300.0f;
-COMPILER_STRIP_GATE(0x80A5DF10, &lit_4035);
-#pragma pop
-
-/* 80A5DF14-80A5DF18 000018 0004+00 0/1 0/0 0/0 .rodata @4036 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4036 = 9.0f / 5.0f;
-COMPILER_STRIP_GATE(0x80A5DF14, &lit_4036);
-#pragma pop
-
-/* 80A5DF18-80A5DF1C 00001C 0004+00 0/6 0/0 0/0 .rodata @4037 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4037 = 600.0f;
-COMPILER_STRIP_GATE(0x80A5DF18, &lit_4037);
-#pragma pop
-
-/* 80A5E458-80A5E464 000000 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */
-SECTION_DATA static u8 cNullVec__6Z2Calc[12] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-/* 80A5E464-80A5E478 00000C 0004+10 0/0 0/0 0/0 .data @1787 */
-#pragma push
-#pragma force_active on
-SECTION_DATA static u32 lit_1787[1 + 4 /* padding */] = {
- 0x02000201,
- /* padding */
- 0x40080000,
- 0x00000000,
- 0x3FE00000,
- 0x00000000,
-};
-#pragma pop
+#include "d/d_com_inf_game.h"
+#include "d/d_bomb.h"
+#include "d/actor/d_a_obj_so.h"
+#include "d/actor/d_a_boomerang.h"
+#include "d/d_stage.h"
+#include "d/actor/d_a_obj_sw.h"
+#include "d/actor/d_a_obj_pillar.h"
+#include "m_Do/m_Do_controller_pad.h"
+#include "c/c_damagereaction.h"
+#include "d/actor/d_a_e_fs.h"
+#include "d/actor/d_a_obj_brg.h"
+#include "d/actor/d_a_midna.h"
+#include "JSystem/JUtility/JUTReport.h"
+#include "d/d_meter2_info.h"
+#include "cmath.h"
+#include "d/actor/d_a_e_oc.h"
+#include "Z2AudioLib/Z2Instances.h"
+
+UNK_REL_DATA;
/* 80A5E478-80A5E498 000020 0020+00 13/13 0/0 0/0 .data saru_p */
-SECTION_DATA static u8 saru_p[32] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-/* 80A5E498-80A5E4D0 -00001 0038+00 1/1 0/0 0/0 .data @4808 */
-SECTION_DATA static void* lit_4808[14] = {
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x48),
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x88),
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x174),
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x4A4),
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x4A4),
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x4A4),
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x4A4),
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x4A4),
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x4A4),
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x4A4),
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x1D8),
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x298),
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x31C),
- (void*)(((char*)npc_ks_ori__FP12npc_ks_class) + 0x470),
+static npc_ks_class* saru_p[8] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
/* 80A5E4D0-80A5E63C 000078 016C+00 1/1 0/0 0/0 .data guide_path_04 */
-SECTION_DATA static u8 guide_path_04[364] = {
- 0x00, 0x00, 0x00, 0x00, 0xC5, 0x8E, 0x50, 0x00, 0x45, 0x73, 0x50, 0x00, 0xC5, 0x14, 0x90, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xC5, 0x53, 0x30, 0x00, 0x45, 0x76, 0x80, 0x00,
- 0xC5, 0x10, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xC4, 0xEB, 0xE0, 0x00,
- 0x45, 0x76, 0x80, 0x00, 0xC5, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- 0xC4, 0x64, 0x00, 0x00, 0x45, 0x74, 0x30, 0x00, 0xC5, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x42, 0xC8, 0x00, 0x00, 0x45, 0x73, 0xC0, 0x00, 0xC5, 0x1E, 0x80, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x44, 0x01, 0xC0, 0x00, 0x45, 0x8F, 0x70, 0x00,
- 0xC5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-/* 80A5E63C-80A5E67C -00001 0040+00 1/1 0/0 0/0 .data @5080 */
-SECTION_DATA static void* lit_5080[16] = {
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0xAB4),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0x1AC),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0x2FC),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0x3D8),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0x4AC),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0x50C),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0x540),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0x640),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0xAB4),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0xAB4),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0x658),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0x688),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0x794),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0xAB4),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0xAB4),
- (void*)(((char*)npc_ks_ori2__FP12npc_ks_class) + 0xA3C),
+static f32 guide_path_04[91] = {
+ // 0, -4554.0f, 3893.0f, -2377.0f, 0, 0, 0
+ // 0, 0, 0, 0, 0, 0, 1,
+ // -3379.0f, 3944.0f, -2314.0f, 0, 0, 0, 0,
+ // 0, 0, 0, 0, 0, 1, -1887.0f,
+ // 3944.0f, -2184.0f, 0, 0, 0, 0, 0,
+ // 0, 0, 0, 0, 1, -912.0f, 3907.0f,
+ // -2243.0f, 0, 0, 0, 0, 0, 0,
+ // 0, 0, 0, 0, 100.0f, 3900.0f, -2536.0f,
+ // 0, 0, 0, 0, 0, 0, 0,
+ // 0, 0, 1, 519.0f, 4590.0f, -2889.0f, 0,
+ // 0, 0, 0, 0, 0, 0, 0,
+ // 0, -1, 0, 0, 0, 0, 0,
+ // 0, 0, 0, 0, 0, 0, 0,
+ 0x00000000, 0xC58E5000, 0x45735000, 0xC5149000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001,
+ 0xC5533000, 0x45768000, 0xC510A000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0xC4EBE000,
+ 0x45768000, 0xC5088000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0xC4640000, 0x45743000,
+ 0xC50C3000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x42C80000, 0x4573C000, 0xC51E8000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x4401C000, 0x458F7000, 0xC5349000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
};
/* 80A5E67C-80A5E780 000224 0104+00 1/1 0/0 0/0 .data move_path_02 */
-SECTION_DATA static u8 move_path_02[260] = {
- 0x00, 0x00, 0x00, 0x00, 0x46, 0x2A, 0x78, 0x00, 0x45, 0x6A, 0x40, 0x00, 0x45, 0x90, 0xB0, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x2B, 0xE8, 0x00, 0x45, 0x6A, 0x40, 0x00,
- 0x45, 0x7F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x33, 0x48, 0x00,
- 0x45, 0x6A, 0x40, 0x00, 0x45, 0x67, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x46, 0x3B, 0x9C, 0x00, 0x45, 0x67, 0x20, 0x00, 0x45, 0x5E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x46, 0x3D, 0x1C, 0x00, 0x45, 0x44, 0xC0, 0x00, 0x45, 0x94, 0xC0, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
-};
-
-/* 80A5E780-80A5E7D4 -00001 0054+00 1/1 0/0 0/0 .data @5572 */
-SECTION_DATA static void* lit_5572[21] = {
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0xD0),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0xF8),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0x144),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0xE78),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0xE78),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0xE78),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0xE78),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0xE78),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0xE78),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0xE78),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0x2F0),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0x340),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0x468),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0x644),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0x784),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0x864),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0x8B4),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0xA60),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0xCA4),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0xD94),
- (void*)(((char*)npc_ks_demo_02__FP12npc_ks_class) + 0xDEC),
-};
-
-/* 80A5E7D4-80A5E838 -00001 0064+00 1/1 0/0 0/0 .data @5678 */
-SECTION_DATA static void* lit_5678[25] = {
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x6C),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x94),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0xE4),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x114),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x1D4),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x454),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x254),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x26C),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x2B8),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x3B8),
- (void*)(((char*)npc_ks_demo_022__FP12npc_ks_class) + 0x430),
-};
-
-/* 80A5E838-80A5E894 -00001 005C+00 1/1 0/0 0/0 .data @5772 */
-SECTION_DATA static void* lit_5772[23] = {
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x5C),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x4BC),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x7C),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0xB8),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x18C),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x1F4),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x20C),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x228),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x270),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x298),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x304),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x368),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x3AC),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x4BC),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x4BC),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x4BC),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x4BC),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x4BC),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x4BC),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x4BC),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x3E0),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x3FC),
- (void*)(((char*)npc_ks_demo_04__FP12npc_ks_class) + 0x434),
-};
-
-/* 80A5E894-80A5E8C0 -00001 002C+00 1/1 0/0 0/0 .data @6229 */
-SECTION_DATA static void* lit_6229[11] = {
- (void*)(((char*)npc_ks_hang__FP12npc_ks_class) + 0x198),
- (void*)(((char*)npc_ks_hang__FP12npc_ks_class) + 0x1B0),
- (void*)(((char*)npc_ks_hang__FP12npc_ks_class) + 0x450),
- (void*)(((char*)npc_ks_hang__FP12npc_ks_class) + 0x460),
- (void*)(((char*)npc_ks_hang__FP12npc_ks_class) + 0x4F4),
- (void*)(((char*)npc_ks_hang__FP12npc_ks_class) + 0x65C),
- (void*)(((char*)npc_ks_hang__FP12npc_ks_class) + 0x6E4),
- (void*)(((char*)npc_ks_hang__FP12npc_ks_class) + 0x718),
- (void*)(((char*)npc_ks_hang__FP12npc_ks_class) + 0x718),
- (void*)(((char*)npc_ks_hang__FP12npc_ks_class) + 0x718),
- (void*)(((char*)npc_ks_hang__FP12npc_ks_class) + 0x718),
-};
-
-/* 80A5E8C0-80A5E914 -00001 0054+00 1/1 0/0 0/0 .data @6633 */
-SECTION_DATA static void* lit_6633[21] = {
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0x50),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0xFC),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0xB18),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0xB18),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0xB18),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0x17C),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0x20C),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0x24C),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0xB18),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0xB18),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0x54C),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0x658),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0x8B4),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0xB18),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0xB18),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0xB18),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0xB18),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0xB18),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0xB18),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0xB18),
- (void*)(((char*)npc_ks_e_jump__FP12npc_ks_class) + 0x930),
-};
-
-/* 80A5E914-80A5E948 -00001 0034+00 1/1 0/0 0/0 .data @7658 */
-SECTION_DATA static void* lit_7658[13] = {
- (void*)(((char*)action_check__FP12npc_ks_class) + 0x70),
- (void*)(((char*)action_check__FP12npc_ks_class) + 0x554),
- (void*)(((char*)action_check__FP12npc_ks_class) + 0x5F8),
- (void*)(((char*)action_check__FP12npc_ks_class) + 0xAEC),
- (void*)(((char*)action_check__FP12npc_ks_class) + 0x5F8),
- (void*)(((char*)action_check__FP12npc_ks_class) + 0xAEC),
- (void*)(((char*)action_check__FP12npc_ks_class) + 0xAEC),
- (void*)(((char*)action_check__FP12npc_ks_class) + 0xAEC),
- (void*)(((char*)action_check__FP12npc_ks_class) + 0xAEC),
- (void*)(((char*)action_check__FP12npc_ks_class) + 0x9D8),
- (void*)(((char*)action_check__FP12npc_ks_class) + 0xAEC),
- (void*)(((char*)action_check__FP12npc_ks_class) + 0xAEC),
- (void*)(((char*)action_check__FP12npc_ks_class) + 0xA98),
+static f32 move_path_02[65] = {
+ 0x00000000, 0x462A7800, 0x456A4000, 0x4590B000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x462BE800, 0x456A4000,
+ 0x457F5000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x46334800,
+ 0x456A4000, 0x4567D000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x463B9C00, 0x45672000, 0x455E1000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x463D1C00, 0x4544C000, 0x4594C000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000,
};
/* 80A5E948-80A5E94C 0004F0 0004+00 1/1 0/0 0/0 .data yuka_jump_x */
-SECTION_DATA static f32 yuka_jump_x = 80.0f;
-
-/* 80A5E94C-80A5E954 0004F4 0008+00 1/1 0/0 0/0 .data w_eff_id$7873 */
-SECTION_DATA static u8 w_eff_id[8] = {
- 0x01, 0xB8, 0x01, 0xB9, 0x01, 0xBA, 0x01, 0xBB,
-};
-
-/* 80A5E954-80A5EA24 -00001 00D0+00 1/1 0/0 0/0 .data @8135 */
-SECTION_DATA static void* lit_8135[52] = {
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x240),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x290),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x398),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x42C),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x4BC),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x4D8),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x4F8),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x5FC),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x62C),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x694),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x71C),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x758),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x784),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x7CC),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x824),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x878),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xD20),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0x930),
- (void*)(((char*)npc_ks_option__FP12npc_ks_class) + 0xAB0),
-};
+static f32 yuka_jump_x = 80.0f;
/* 80A5EA24-80A5EC2C 0005CC 0208+00 1/1 0/0 0/0 .data guide_path_00 */
-SECTION_DATA static u8 guide_path_00[520] = {
+static u8 guide_path_00[520] = {
0x00, 0x00, 0x00, 0x00, 0x42, 0x58, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, 0x45, 0xA6, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1000,60 +417,10 @@ SECTION_DATA static u8 guide_path_fs[364] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-/* 80A5FC04-80A5FCB0 -00001 00AC+00 1/1 0/0 0/0 .data @9872 */
-SECTION_DATA static void* lit_9872[43] = {
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x80),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x170),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x274),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x540),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x588),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x648),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x654),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x670),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x73C),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x894),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x75C),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x79C),
- (void*)(((char*)npc_ks_fsdemo__FP12npc_ks_class) + 0x880),
-};
-
/* 80A5FCB0-80A5FCBC 001858 000C+00 0/0 0/0 0/0 .data dx$11146 */
-#pragma push
-#pragma force_active on
-SECTION_DATA static u8 dx[12] = {
- 0x45, 0xE3, 0x20, 0x00, 0x45, 0xA1, 0x70, 0x00, 0x46, 0x10, 0x44, 0x00,
+static f32 dx[3] = {
+ 0x45E32000, 0x45A17000, 0x46104400,
};
-#pragma pop
/* 80A5FCBC-80A5FCC8 001864 000C+00 0/0 0/0 0/0 .data dy$11147 */
#pragma push
@@ -1071,33 +438,6 @@ SECTION_DATA static u8 dz[12] = {
};
#pragma pop
-/* 80A5FCD4-80A5FD30 -00001 005C+00 1/1 0/0 0/0 .data @11379 */
-SECTION_DATA static void* lit_11379[23] = {
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x148),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x274),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x3A0),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x490),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x580),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x770),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x7E0),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x850),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x960),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x960),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x8C0),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x960),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x960),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x960),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x960),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x960),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x960),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x960),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x960),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x960),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x8CC),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x8F0),
- (void*)(((char*)start_check__FP12npc_ks_class) + 0x928),
-};
-
/* 80A5FD30-80A5FD74 0018D8 0044+00 1/1 0/0 0/0 .data cc_cyl_src$11445 */
static dCcD_SrcCyl cc_cyl_src = {
{
@@ -1113,292 +453,207 @@ static dCcD_SrcCyl cc_cyl_src = {
} // mCyl
};
-/* 80A5FD74-80A5FD94 -00001 0020+00 1/0 0/0 0/0 .data l_daNpc_Ks_Method */
-static actor_method_class l_daNpc_Ks_Method = {
- (process_method_func)daNpc_Ks_Create__FP10fopAc_ac_c,
- (process_method_func)daNpc_Ks_Delete__FP12npc_ks_class,
- (process_method_func)daNpc_Ks_Execute__FP12npc_ks_class,
- (process_method_func)daNpc_Ks_IsDelete__FP12npc_ks_class,
- (process_method_func)daNpc_Ks_Draw__FP12npc_ks_class,
-};
-
-/* 80A5FD94-80A5FDC4 -00001 0030+00 0/0 0/0 1/0 .data g_profile_NPC_KS */
-extern actor_process_profile_definition g_profile_NPC_KS = {
- fpcLy_CURRENT_e, // mLayerID
- 3, // mListID
- fpcPi_CURRENT_e, // mListPrio
- PROC_NPC_KS, // mProcName
- &g_fpcLf_Method.base, // sub_method
- sizeof(npc_ks_class), // mSize
- 0, // mSizeOther
- 0, // mParameters
- &g_fopAc_Method.base, // sub_method
- 701, // mPriority
- &l_daNpc_Ks_Method, // sub_method
- 0x00044100, // mStatus
- fopAc_ACTOR_e, // mActorType
- fopAc_CULLBOX_CUSTOM_e, // cullType
-};
-
-/* 80A5FDC4-80A5FDD0 00196C 000C+00 1/1 0/0 0/0 .data __vt__12dBgS_AcchCir */
-SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__12dBgS_AcchCirFv,
-};
-
-/* 80A5FDD0-80A5FDDC 001978 000C+00 2/2 0/0 0/0 .data __vt__10cCcD_GStts */
-SECTION_DATA extern void* __vt__10cCcD_GStts[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__10cCcD_GSttsFv,
-};
-
-/* 80A5FDDC-80A5FDE8 001984 000C+00 1/1 0/0 0/0 .data __vt__10dCcD_GStts */
-SECTION_DATA extern void* __vt__10dCcD_GStts[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__10dCcD_GSttsFv,
-};
-
-/* 80A5FDE8-80A5FDF4 001990 000C+00 2/2 0/0 0/0 .data __vt__8cM3dGCyl */
-SECTION_DATA extern void* __vt__8cM3dGCyl[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__8cM3dGCylFv,
-};
-
-/* 80A5FDF4-80A5FE00 00199C 000C+00 2/2 0/0 0/0 .data __vt__8cM3dGAab */
-SECTION_DATA extern void* __vt__8cM3dGAab[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__8cM3dGAabFv,
-};
-
-/* 80A5FE00-80A5FE24 0019A8 0024+00 2/2 0/0 0/0 .data __vt__12dBgS_ObjAcch */
-SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__12dBgS_ObjAcchFv,
- (void*)NULL,
- (void*)NULL,
- (void*)func_80A5DB38,
- (void*)NULL,
- (void*)NULL,
- (void*)func_80A5DB30,
-};
-
-/* 80A5FE24-80A5FE30 0019CC 000C+00 2/2 0/0 0/0 .data __vt__12J3DFrameCtrl */
-SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__12J3DFrameCtrlFv,
-};
-
-/* 80A5FE30-80A5FE3C 0019D8 000C+00 2/2 0/0 0/0 .data __vt__14daNpc_Ks_HIO_c */
-SECTION_DATA extern void* __vt__14daNpc_Ks_HIO_c[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__14daNpc_Ks_HIO_cFv,
-};
-
/* 80A48F8C-80A49000 0000EC 0074+00 1/1 0/0 0/0 .text __ct__14daNpc_Ks_HIO_cFv */
daNpc_Ks_HIO_c::daNpc_Ks_HIO_c() {
- // NONMATCHING
+ field_0x4 = -1;
+ field_0x8 = 0.8f;
+ field_0xc = 200.0f;
+ field_0x10 = 10.0f;
+ field_0x14 = 25.0f;
+ field_0x18 = 20.0f;
+ field_0x1c = 25.0f;
+ field_0x20 = 10.0f;
+ field_0x30 = 300.0f;
+ field_0x34 = 1.8f;
+ field_0x24 = 600.0f;
+ field_0x28 = 1;
+ field_0x2c = 10.0f;
}
/* 80A49000-80A49054 000160 0054+00 2/2 0/0 0/0 .text setPlayerPosAndAngle__FP4cXyzs */
-static void setPlayerPosAndAngle(cXyz* param_0, s16 param_1) {
- // NONMATCHING
+static void setPlayerPosAndAngle(cXyz* i_pos, s16 i_angle) {
+ if (dComIfGp_checkPlayerStatus0(0, 0x100) == 0) {
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(i_pos, i_angle, 0);
+ }
}
/* 80A49054-80A49088 0001B4 0034+00 14/14 0/0 0/0 .text checkDoorDemo__Fv */
-static void checkDoorDemo() {
- // NONMATCHING
-}
-
-/* ############################################################################################## */
-/* 80A5DF1C-80A5DF20 000020 0004+00 1/18 0/0 0/0 .rodata @4096 */
-SECTION_RODATA static f32 const lit_4096 = 100.0f;
-COMPILER_STRIP_GATE(0x80A5DF1C, &lit_4096);
-
-/* 80A5DF20-80A5DF24 000024 0004+00 1/2 0/0 0/0 .rodata @4097 */
-SECTION_RODATA static f32 const lit_4097 = 120.0f;
-COMPILER_STRIP_GATE(0x80A5DF20, &lit_4097);
-
-/* 80A49088-80A49168 0001E8 00E0+00 1/1 0/0 0/0 .text otherBgCheck__FP10fopAc_ac_cP10fopAc_ac_c */
-static void otherBgCheck(fopAc_ac_c* param_0, fopAc_ac_c* param_1) {
- // NONMATCHING
-}
+static BOOL checkDoorDemo() {
+ if (daPy_getPlayerActorClass()->eventInfo.checkCommandDoor() && dComIfGp_event_chkEventFlag(4) == 0) {
+ return TRUE;
+ }
-/* 80A49168-80A491A4 0002C8 003C+00 3/3 0/0 0/0 .text __dt__4cXyzFv */
-// cXyz::~cXyz() {
-extern "C" void __dt__4cXyzFv() {
- // NONMATCHING
+ return FALSE;
}
-/* ############################################################################################## */
-/* 80A5DF24-80A5DF28 000028 0004+00 4/36 0/0 0/0 .rodata @4146 */
-SECTION_RODATA static f32 const lit_4146 = 1.0f;
-COMPILER_STRIP_GATE(0x80A5DF24, &lit_4146);
-
-/* 80A5DF28-80A5DF2C 00002C 0004+00 0/8 0/0 0/0 .rodata @4147 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4147 = 0.5f;
-COMPILER_STRIP_GATE(0x80A5DF28, &lit_4147);
-#pragma pop
+/* 80A49088-80A49168 0001E8 00E0+00 1/1 0/0 0/0 .text otherBgCheck__FP10fopAc_ac_cP10fopAc_ac_c */
+static BOOL otherBgCheck(fopAc_ac_c* p_actor, fopAc_ac_c* p_actor2) {
+ dBgS_LinChk p_line;
+ cXyz pi_start, pi_end;
+ pi_end = p_actor2->current.pos;
+ pi_end.y += 100.0f;
-/* 80A5DF2C-80A5DF30 000030 0004+00 1/38 0/0 0/0 .rodata @4148 */
-SECTION_RODATA static u8 const lit_4148[4] = {
- 0x00,
- 0x00,
- 0x00,
- 0x00,
-};
-COMPILER_STRIP_GATE(0x80A5DF2C, &lit_4148);
+ pi_start = p_actor->current.pos;
+ pi_start.y += 120.0f;
-/* 80A5DF30-80A5DF34 000034 0004+00 1/4 0/0 0/0 .rodata @4149 */
-SECTION_RODATA static f32 const lit_4149 = -1.0f;
-COMPILER_STRIP_GATE(0x80A5DF30, &lit_4149);
+ p_line.Set(&pi_start, &pi_end, p_actor);
-/* 80A491A4-80A4932C 000304 0188+00 29/29 0/0 0/0 .text anm_init__FP12npc_ks_classifUcf
- */
-static void anm_init(npc_ks_class* param_0, int param_1, f32 param_2, u8 param_3, f32 param_4) {
- // NONMATCHING
-}
+ if (dComIfG_Bgsp().LineCross(&p_line) != 0) {
+ return TRUE;
+ }
-/* 80A4932C-80A49660 00048C 0334+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */
-static void nodeCallBack(J3DJoint* param_0, int param_1) {
- // NONMATCHING
+ return FALSE;
}
-/* ############################################################################################## */
-/* 80A5DF34-80A5DF38 000038 0004+00 0/5 0/0 0/0 .rodata @4307 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4307 = 1000.0f;
-COMPILER_STRIP_GATE(0x80A5DF34, &lit_4307);
-#pragma pop
+/* 80A491A4-80A4932C 000304 0188+00 29/29 0/0 0/0 .text anm_init__FP12npc_ks_classifUcf */
+static void anm_init(npc_ks_class* i_this, int param_2, f32 i_morf, u8 i_attr, f32 i_rate) {
+ // NONMATCHING - REGALLOC
+ if (i_this->field_0x94c != 0 && (param_2 == 51 || param_2 == 53)) {
+ if (cM_rndF(1.0f) < 0.5f) {
+ param_2 = 11;
+ } else {
+ param_2 = 56;
+ }
+ }
-/* 80A5E438-80A5E438 00053C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
-#pragma push
-#pragma force_active on
-SECTION_DEAD static char const* const stringBase_80A5E438 = "Npc_kst";
-#pragma pop
+ int i_index = param_2;
+ if (i_this->field_0xc17 != 0) {
+ if (param_2 == 51) {
+ i_index = 52;
+ } else if (param_2 == 8) {
+ i_index = 9;
+ } else if (param_2 == 28) {
+ i_index = 29;
+ } else if (param_2 == 26) {
+ i_index = 27;
+ } else if (param_2 == 8) {
+ i_index = 9;
+ } else if (param_2 == 7) {
+ i_index = 10;
+ } else if (param_2 == 43) {
+ i_index = 40;
+ } else if (param_2 == 39) {
+ i_index = 42;
+ } else if (param_2 == 39) {
+ i_index = 42;
+ } else {
+ dComIfGs_shake_kandelaar();
+ }
+ }
-/* 80A49660-80A49848 0007C0 01E8+00 1/0 0/0 0/0 .text daNpc_Ks_Draw__FP12npc_ks_class */
-static void daNpc_Ks_Draw(npc_ks_class* param_0) {
- // NONMATCHING
+ i_this->mpModelMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes(i_this->mResName, i_index), i_attr, i_morf, i_rate, 0.0f, -1.0f);
+ i_this->field_0x5d0 = param_2;
}
-/* ############################################################################################## */
-/* 80A5DF38-80A5DF3C 00003C 0004+00 1/1 0/0 0/0 .rodata @4317 */
-SECTION_RODATA static f32 const lit_4317 = 220.0f;
-COMPILER_STRIP_GATE(0x80A5DF38, &lit_4317);
-
-/* 80A5DF3C-80A5DF40 000040 0004+00 1/10 0/0 0/0 .rodata @4318 */
-SECTION_RODATA static f32 const lit_4318 = 50.0f;
-COMPILER_STRIP_GATE(0x80A5DF3C, &lit_4318);
+/* 80A4932C-80A49660 00048C 0334+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */
+static int nodeCallBack(J3DJoint* i_joint, int param_2) {
+ if (param_2 == 0) {
+ int jointNo = i_joint->getJntNo();
+ J3DModel* model = j3dSys.getModel();
+ npc_ks_class* npc_ks_p = (npc_ks_class*)model->getUserArea();
+
+ if (npc_ks_p != NULL) {
+ if (npc_ks_p->field_0x5fc == 1 && jointNo == 3) {
+ MTXCopy(model->getAnmMtx(jointNo), *calc_mtx);
+ cMtx_YrotM(*calc_mtx, -npc_ks_p->field_0x5fe);
+ cMtx_XrotM(*calc_mtx, -(npc_ks_p->field_0x5fe / 2));
+ cMtx_ZrotM(*calc_mtx, npc_ks_p->field_0x600);
+ model->setAnmMtx(jointNo, *calc_mtx);
+ MTXCopy(*calc_mtx, J3DSys::mCurrentMtx);
+
+ } else if (npc_ks_p->field_0x5fc >= 2 && (jointNo == 3 || jointNo == 4)) {
+ MTXCopy(model->getAnmMtx(jointNo), *calc_mtx);
+ if (jointNo == 3) {
+ cMtx_YrotM(*calc_mtx, -(npc_ks_p->field_0x5fe / 2));
+ cMtx_XrotM(*calc_mtx, -(npc_ks_p->field_0x5fe / 2));
+ } else {
+ cMtx_YrotM(*calc_mtx, -npc_ks_p->field_0x5fe);
+ }
+
+ model->setAnmMtx(jointNo, *calc_mtx);
+ MTXCopy(*calc_mtx, J3DSys::mCurrentMtx);
+ }
+
+ if (npc_ks_p->field_0x5fc >= 2 && (jointNo == 1 || jointNo == 2)) {
+ MTXCopy(model->getAnmMtx(jointNo), *calc_mtx);
+ if (jointNo == 2) {
+ cMtx_YrotM(*calc_mtx, npc_ks_p->field_0x602 / 2);
+ } else {
+ cMtx_YrotM(*calc_mtx, npc_ks_p->field_0x602);
+ }
+
+ cMtx_XrotM(*calc_mtx, -npc_ks_p->field_0x5fe);
+ model->setAnmMtx(jointNo, *calc_mtx);
+ MTXCopy(*calc_mtx, J3DSys::mCurrentMtx);
+ }
+
+ if (jointNo == 15) {
+ MTXCopy(model->getAnmMtx(jointNo), *calc_mtx);
+ cMtx_ZrotM(*calc_mtx, npc_ks_p->field_0x606);
+ model->setAnmMtx(jointNo, *calc_mtx);
+ MTXCopy(*calc_mtx, J3DSys::mCurrentMtx);
+ }
+ }
+ }
-/* 80A49848-80A498B4 0009A8 006C+00 2/2 0/0 0/0 .text s_resq_sub__FPvPv */
-static void s_resq_sub(void* param_0, void* param_1) {
- // NONMATCHING
+ return 1;
}
-/* ############################################################################################## */
-/* 80A5FE48-80A5FE4C 000008 0001+03 9/9 0/0 0/0 .bss @1109 */
-static u8 lit_1109[1 + 3 /* padding */];
-
-/* 80A5FE4C-80A5FE50 00000C 0001+03 0/0 0/0 0/0 .bss @1107 */
-#pragma push
-#pragma force_active on
-static u8 lit_1107[1 + 3 /* padding */];
-#pragma pop
-
-/* 80A5FE50-80A5FE54 000010 0001+03 0/0 0/0 0/0 .bss @1105 */
-#pragma push
-#pragma force_active on
-static u8 lit_1105[1 + 3 /* padding */];
-#pragma pop
-
-/* 80A5FE54-80A5FE58 000014 0001+03 0/0 0/0 0/0 .bss @1104 */
-#pragma push
-#pragma force_active on
-static u8 lit_1104[1 + 3 /* padding */];
-#pragma pop
-
-/* 80A5FE58-80A5FE5C 000018 0001+03 0/0 0/0 0/0 .bss @1099 */
-#pragma push
-#pragma force_active on
-static u8 lit_1099[1 + 3 /* padding */];
-#pragma pop
-
-/* 80A5FE5C-80A5FE60 00001C 0001+03 0/0 0/0 0/0 .bss @1097 */
-#pragma push
-#pragma force_active on
-static u8 lit_1097[1 + 3 /* padding */];
-#pragma pop
-
-/* 80A5FE60-80A5FE64 000020 0001+03 0/0 0/0 0/0 .bss @1095 */
-#pragma push
-#pragma force_active on
-static u8 lit_1095[1 + 3 /* padding */];
-#pragma pop
+/* 80A49660-80A49848 0007C0 01E8+00 1/0 0/0 0/0 .text daNpc_Ks_Draw__FP12npc_ks_class */
+static int daNpc_Ks_Draw(npc_ks_class* npc_ks) {
+ fopAc_ac_c* a_this = &npc_ks->actor;
+ if (npc_ks->field_0xbd7 != 0) {
+ npc_ks->field_0xbd7 = 0;
+ return 1;
+ }
-/* 80A5FE64-80A5FE68 000024 0001+03 0/0 0/0 0/0 .bss @1094 */
-#pragma push
-#pragma force_active on
-static u8 lit_1094[1 + 3 /* padding */];
-#pragma pop
+ J3DModel* model = npc_ks->mpModelMorf->getModel();
+ if (npc_ks->mResName == "Npc_kst") {
+ g_env_light.settingTevStruct(4, &a_this->current.pos, &a_this->tevStr);
+ } else {
+ g_env_light.settingTevStruct(0, &a_this->current.pos, &a_this->tevStr);
+ }
-/* 80A5FE68-80A5FE6C 000028 0001+03 0/0 0/0 0/0 .bss @1057 */
-#pragma push
-#pragma force_active on
-static u8 lit_1057[1 + 3 /* padding */];
-#pragma pop
+ g_env_light.setLightTevColorType_MAJI(model, &a_this->tevStr);
-/* 80A5FE6C-80A5FE70 00002C 0001+03 0/0 0/0 0/0 .bss @1055 */
-#pragma push
-#pragma force_active on
-static u8 lit_1055[1 + 3 /* padding */];
-#pragma pop
+ if (npc_ks->field_0x5e4 != 0) {
+ npc_ks->mBtp2->entry(model->getModelData());
+ } else {
+ npc_ks->mBtp1->entry(model->getModelData());
+ }
+ npc_ks->mpModelMorf->entryDL();
-/* 80A5FE70-80A5FE74 000030 0001+03 0/0 0/0 0/0 .bss @1053 */
-#pragma push
-#pragma force_active on
-static u8 lit_1053[1 + 3 /* padding */];
-#pragma pop
+ if (npc_ks->field_0xc17 != 0) {
+ g_env_light.setLightTevColorType_MAJI(npc_ks->field_0xc00, &a_this->tevStr);
+ mDoExt_modelUpdateDL(npc_ks->field_0xc00);
+ }
-/* 80A5FE74-80A5FE78 000034 0001+03 0/0 0/0 0/0 .bss @1052 */
-#pragma push
-#pragma force_active on
-static u8 lit_1052[1 + 3 /* padding */];
-#pragma pop
+ if (npc_ks->field_0xbfc != NULL) {
+ g_env_light.setLightTevColorType_MAJI(npc_ks->field_0xbfc, &a_this->tevStr);
+ mDoExt_modelUpdateDL(npc_ks->field_0xbfc);
+ }
-/* 80A5FE78-80A5FE7C 000038 0001+03 0/0 0/0 0/0 .bss @1014 */
-#pragma push
-#pragma force_active on
-static u8 lit_1014[1 + 3 /* padding */];
-#pragma pop
+ cXyz sp28;
+ sp28.set(a_this->current.pos.x, a_this->current.pos.y + 100.0f, a_this->current.pos.z);
+ npc_ks->mShadowKey = dComIfGd_setShadow(npc_ks->mShadowKey, 1, model, &sp28, 1000.0f, 0.0f, a_this->current.pos.y,
+ npc_ks->mObjAcch.GetGroundH(), npc_ks->mObjAcch.m_gnd, &a_this->tevStr,
+ 0, 1.0f, dDlst_shadowControl_c::getSimpleTex());
+ if (npc_ks->field_0xc17 != 0) {
+ dComIfGd_addRealShadow(npc_ks->mShadowKey, npc_ks->field_0xc00);
+ }
-/* 80A5FE7C-80A5FE80 00003C 0001+03 0/0 0/0 0/0 .bss @1012 */
-#pragma push
-#pragma force_active on
-static u8 lit_1012[1 + 3 /* padding */];
-#pragma pop
+ return 1;
+}
-/* 80A5FE80-80A5FE84 000040 0001+03 0/0 0/0 0/0 .bss @1010 */
-#pragma push
-#pragma force_active on
-static u8 lit_1010[1 + 3 /* padding */];
-#pragma pop
+/* 80A49848-80A498B4 0009A8 006C+00 2/2 0/0 0/0 .text s_resq_sub__FPvPv */
+static void* s_resq_sub(void* i_actor, void* i_data) {
+ if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_NPC_KS) {
+ ((npc_ks_class*)i_actor)->field_0x94c = cM_rndF(50.0f) + 220.0f;
+ }
+ return NULL;
+}
-/* 80A5FE84-80A5FE88 000044 0001+03 0/0 0/0 0/0 .bss @1009 */
-#pragma push
-#pragma force_active on
-static u8 lit_1009[1 + 3 /* padding */];
-#pragma pop
+UNK_REL_BSS;
/* 80A5FE88-80A5FE94 000048 000C+00 0/1 0/0 0/0 .bss @4022 */
#pragma push
@@ -1407,10 +662,10 @@ static u8 lit_4022[12];
#pragma pop
/* 80A5FE94-80A5FEA0 000054 000C+00 1/5 0/0 0/0 .bss obj_pos */
-static u8 obj_pos[12];
+static cXyz obj_pos;
/* 80A5FEA0-80A5FEA4 000060 0004+00 4/9 0/0 0/0 .bss leader */
-static u8 leader[4];
+static npc_ks_class* leader;
/* 80A5FEA4-80A5FEA8 000064 0004+00 7/9 0/0 0/0 .bss call_pt */
static u8 call_pt[4];
@@ -1425,1967 +680,3799 @@ static u8 lit_4025[12];
#pragma pop
/* 80A5FEB8-80A5FEF0 000078 0038+00 16/22 0/0 0/0 .bss l_HIO */
-static u8 l_HIO[56];
+static daNpc_Ks_HIO_c l_HIO;
/* 80A5FEF0-80A5FF18 0000B0 0028+00 4/6 0/0 0/0 .bss target_info */
-static u8 target_info[40];
+static void* target_info[10];
/* 80A5FF18-80A5FF1C 0000D8 0004+00 4/6 0/0 0/0 .bss target_info_count */
-static u8 target_info_count[4];
+static int target_info_count;
/* 80A498B4-80A49930 000A14 007C+00 1/1 0/0 0/0 .text s_b_sub__FPvPv */
-static void s_b_sub(void* param_0, void* param_1) {
- // NONMATCHING
+static void* s_b_sub(void* i_actor, void* i_data) {
+ if (fopAcM_IsActor(i_actor) && dBomb_c::checkBombActor((fopAc_ac_c*)i_actor) &&
+ !((dBomb_c*)i_actor)->checkStateExplode() && target_info_count < 10) {
+ target_info[target_info_count] = i_actor;
+ target_info_count++;
+ }
+ return NULL;
}
-/* ############################################################################################## */
-/* 80A5DF40-80A5DF44 000044 0004+00 0/2 0/0 0/0 .rodata @4408 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4408 = 1500.0f;
-COMPILER_STRIP_GATE(0x80A5DF40, &lit_4408);
-#pragma pop
-
/* 80A5FF1C-80A5FF44 0000DC 0028+00 0/2 0/0 0/0 .bss target_bgc */
-#pragma push
-#pragma force_active on
-static u8 target_bgc[40];
-#pragma pop
+static int target_bgc[10];
/* 80A49930-80A49B48 000A90 0218+00 2/2 0/0 0/0 .text search_bomb__FP12npc_ks_classi */
-static void search_bomb(npc_ks_class* param_0, int param_1) {
+static fopAc_ac_c* search_bomb(npc_ks_class* i_this, int param_2) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ target_info_count = 0;
+ for (int i = 0; i < 10; i++) {
+ target_info[i] = NULL;
+ target_bgc[i] = 0;
+ }
+
+ fpcM_Search(s_b_sub, i_this);
+ f32 fVar1 = 50.0f;
+
+ if (target_info_count != 0) {
+ cXyz sp4c, sp58;
+ fopAc_ac_c* actor_p;
+ int i = 0;
+ while (i < target_info_count) {
+ actor_p = (fopAc_ac_c*)target_info[i];
+ sp4c.x = actor_p->current.pos.x - a_this->eyePos.x;
+ sp4c.y = (actor_p->current.pos.y + 50.0f) - a_this->eyePos.y;
+ sp4c.z = actor_p->current.pos.z - a_this->eyePos.z;
+ f32 fVar2 = JMAFastSqrt(sp4c.x * sp4c.x + sp4c.z * sp4c.z);
+ if (fVar2 < fVar1) {
+ if (param_2 == 0) {
+ return actor_p;
+ }
+
+ if (target_bgc[i] != 0 || fopAcM_otherBgCheck(a_this, actor_p)) {
+ target_bgc[i] = 1;
+ } else if (fabsf(sp4c.y) <= 300.0f) {
+ s16 sVar1 = a_this->shape_angle.y - cM_atan2s(sp4c.x, sp4c.z);
+ if (sVar1 < 0) {
+ sVar1 = -sVar1;
+ }
+
+ if ((u16)sVar1 < 20000) {
+ return actor_p;
+ }
+ }
+ }
+
+ i++;
+ if (i == target_info_count) {
+ i = 0;
+ fVar1 += 100.0f;
+ if (fVar1 > 1500.0f) {
+ return NULL;
+ }
+ }
+ }
+ } else {
+ return NULL;
+ }
+
+ return NULL;
}
-/* 80A49B48-80A49B6C 000CA8 0024+00 1/1 0/0 0/0 .text bomb_view_check__FP12npc_ks_class
- */
-static void bomb_view_check(npc_ks_class* param_0) {
- // NONMATCHING
+/* 80A49B48-80A49B6C 000CA8 0024+00 1/1 0/0 0/0 .text bomb_view_check__FP12npc_ks_class */
+static fopAc_ac_c* bomb_view_check(npc_ks_class* i_this) {
+ return search_bomb(i_this, 1);
}
/* 80A49B6C-80A49B90 000CCC 0024+00 1/1 0/0 0/0 .text bomb_check__FP12npc_ks_class */
-static void bomb_check(npc_ks_class* param_0) {
- // NONMATCHING
+static fopAc_ac_c* bomb_check(npc_ks_class* i_this) {
+ return search_bomb(i_this, 0);
}
/* 80A49B90-80A49C00 000CF0 0070+00 1/1 0/0 0/0 .text s_e_sub__FPvPv */
-static void s_e_sub(void* param_0, void* param_1) {
- // NONMATCHING
+static void* s_e_sub(void* i_actor, void* i_data) {
+ if (fopAcM_IsActor(i_actor) && ((npc_ks_class*)i_actor)->actor.field_0x566 != 0 && target_info_count < 10) {
+ target_info[target_info_count] = i_actor;
+ target_info_count++;
+ }
+ return NULL;
}
-/* ############################################################################################## */
-/* 80A5DF44-80A5DF4C 000048 0004+04 0/4 0/0 0/0 .rodata @4511 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4511[1 + 1 /* padding */] = {
- 800.0f,
- /* padding */
- 0.0f,
-};
-COMPILER_STRIP_GATE(0x80A5DF44, &lit_4511);
-#pragma pop
-
/* 80A49C00-80A49E78 000D60 0278+00 2/2 0/0 0/0 .text search_enemy__FP12npc_ks_classif */
-static void search_enemy(npc_ks_class* param_0, int param_1, f32 param_2) {
+static fopAc_ac_c* search_enemy(npc_ks_class* i_this, int param_2, f32 param_3) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ if (dComIfGp_event_runCheck()) {
+ daMidna_c* midnaActor = daPy_py_c::getMidnaActor();
+ if (fopAcM_getTalkEventPartner(daPy_getLinkPlayerActorClass()) != (fopAc_ac_c *)midnaActor) {
+ return NULL;
+ }
+ }
+
+ target_info_count = 0;
+ for (int i = 0; i < 10; i++) {
+ target_info[i] = NULL;
+ target_bgc[i] = 0;
+ }
+
+ fpcM_Search(s_e_sub, i_this);
+ f32 fVar1 = 50.0f;
+ f32 fVar2 = 300.0f;
+ if (fopAcM_GetRoomNo(a_this) == 1) {
+ fVar2 = 800.0f;
+ }
+
+ if (target_info_count != 0) {
+ cXyz sp68;
+ int i = 0;
+ while (i < target_info_count) {
+ fopAc_ac_c* pEnemy = (fopAc_ac_c*)target_info[i];
+ sp68.x = pEnemy->current.pos.x - a_this->eyePos.x;
+ sp68.y = (pEnemy->current.pos.y + 50.0f) - a_this->eyePos.y;
+ sp68.z = pEnemy->current.pos.z - a_this->eyePos.z;
+ f32 fVar3 = JMAFastSqrt(sp68.x * sp68.x + sp68.z * sp68.z);
+ if (fVar3 < fVar1) {
+ if (param_2 == 0) {
+ return pEnemy;
+ }
+
+ if (target_bgc[i] != 0 || fopAcM_otherBgCheck(a_this, pEnemy)) {
+ target_bgc[i] = 1;
+ } else if (fabsf(sp68.y) <= fVar2) {
+ s16 sVar1 = a_this->shape_angle.y - cM_atan2s(sp68.x, sp68.z);
+ if (sVar1 < 0) {
+ sVar1 = -sVar1;
+ }
+
+ if ((u16)sVar1 < 20000) {
+ return pEnemy;
+ }
+ }
+ }
+
+ i++;
+ if (i == target_info_count) {
+ i = 0;
+ fVar1 += 50.0f;
+ if (fVar1 > param_3) {
+ return NULL;
+ }
+ }
+ }
+ } else {
+ return NULL;
+ }
+
+ return NULL;
}
-/* 80A49E78-80A49E9C 000FD8 0024+00 7/7 0/0 0/0 .text enemy_view_check__FP12npc_ks_classf
- */
-static void enemy_view_check(npc_ks_class* param_0, f32 param_1) {
- // NONMATCHING
+/* 80A49E78-80A49E9C 000FD8 0024+00 7/7 0/0 0/0 .text enemy_view_check__FP12npc_ks_classf */
+static fopAc_ac_c* enemy_view_check(npc_ks_class* i_this, f32 param_2) {
+ return search_enemy(i_this, 1, param_2);
}
/* 80A49E9C-80A49EC0 000FFC 0024+00 8/8 0/0 0/0 .text enemy_check__FP12npc_ks_classf */
-static void enemy_check(npc_ks_class* param_0, f32 param_1) {
- // NONMATCHING
+static fopAc_ac_c* enemy_check(npc_ks_class* i_this, f32 param_2) {
+ return search_enemy(i_this, 0, param_2);
}
/* 80A49EC0-80A49F30 001020 0070+00 1/1 0/0 0/0 .text s_en_sub__FPvPv */
-static void s_en_sub(void* param_0, void* param_1) {
- // NONMATCHING
+static void* s_en_sub(void* i_actor, void* i_data) {
+ if (fopAcM_IsActor(i_actor) && ((npc_ks_class*)i_actor)->actor.field_0x560 != 0 && target_info_count < 10) {
+ target_info[target_info_count] = i_actor;
+ target_info_count++;
+ }
+ return NULL;
}
-/* ############################################################################################## */
-/* 80A5DF4C-80A5DF54 000050 0008+00 0/15 0/0 0/0 .rodata @4594 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const lit_4594[8] = {
- 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x80A5DF4C, &lit_4594);
-#pragma pop
-
-/* 80A5DF54-80A5DF5C 000058 0008+00 0/15 0/0 0/0 .rodata @4595 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const lit_4595[8] = {
- 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x80A5DF54, &lit_4595);
-#pragma pop
-
-/* 80A5DF5C-80A5DF64 000060 0008+00 0/15 0/0 0/0 .rodata @4596 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const lit_4596[8] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x80A5DF5C, &lit_4596);
-#pragma pop
+/* 80A49F30-80A4A164 001090 0234+00 1/1 0/0 0/0 .text en_search_test__FP12npc_ks_class */
+static fopAc_ac_c* en_search_test(npc_ks_class* i_this) {
+ fopAc_ac_c* a_this = &i_this->actor;
+ target_info_count = 0;
+ for (int i = 0; i < 10; i++) {
+ target_info[i] = NULL;
+ }
-/* 80A5DF64-80A5DF68 000068 0004+00 0/2 0/0 0/0 .rodata @4597 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4597 = 350.0f;
-COMPILER_STRIP_GATE(0x80A5DF64, &lit_4597);
-#pragma pop
+ fpcM_Search(s_en_sub, i_this);
+
+ f32 fVar1 = 50.0f;
+ if (target_info_count != 0) {
+ cXyz sp4c;
+ int i = 0;
+ while (i < target_info_count) {
+ fopAc_ac_c* actor_p = (fopAc_ac_c*)target_info[i];
+ sp4c = actor_p->current.pos - a_this->current.pos;
+ if (sp4c.abs() < fVar1) {
+ return actor_p;
+ }
+
+ i++;
+ if (i == target_info_count) {
+ i = 0;
+ fVar1 += 50.0f;
+ if (fVar1 > 350.0f) {
+ return NULL;
+ }
+ }
+ }
+ } else {
+ return NULL;
+ }
-/* 80A49F30-80A4A164 001090 0234+00 1/1 0/0 0/0 .text en_search_test__FP12npc_ks_class */
-static void en_search_test(npc_ks_class* param_0) {
- // NONMATCHING
+ return NULL;
}
/* 80A4A164-80A4A1B0 0012C4 004C+00 2/2 0/0 0/0 .text s_ori_sub__FPvPv */
-static void s_ori_sub(void* param_0, void* param_1) {
- // NONMATCHING
+static void* s_ori_sub(void* i_actor, void* i_data) {
+ if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_OBJ_SO) {
+ return i_actor;
+ }
+ return NULL;
}
-/* ############################################################################################## */
-/* 80A5DF68-80A5DF6C 00006C 0004+00 0/24 0/0 0/0 .rodata @4687 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4687 = 5.0f;
-COMPILER_STRIP_GATE(0x80A5DF68, &lit_4687);
-#pragma pop
-
-/* 80A5DF6C-80A5DF70 000070 0004+00 0/7 0/0 0/0 .rodata @4688 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4688 = 400.0f;
-COMPILER_STRIP_GATE(0x80A5DF6C, &lit_4688);
-#pragma pop
-
-/* 80A5DF70-80A5DF74 000074 0004+00 0/2 0/0 0/0 .rodata @4689 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4689 = 11497.0f;
-COMPILER_STRIP_GATE(0x80A5DF70, &lit_4689);
-#pragma pop
-
-/* 80A5DF74-80A5DF78 000078 0004+00 0/2 0/0 0/0 .rodata @4690 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4690 = 3764.0f;
-COMPILER_STRIP_GATE(0x80A5DF74, &lit_4690);
-#pragma pop
-
-/* 80A5DF78-80A5DF7C 00007C 0004+00 0/2 0/0 0/0 .rodata @4691 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4691 = 3810.0f;
-COMPILER_STRIP_GATE(0x80A5DF78, &lit_4691);
-#pragma pop
-
-/* 80A4A1B0-80A4A544 001310 0394+00 1/1 0/0 0/0 .text npc_ks_pole_ori__FP12npc_ks_class
- */
-static void npc_ks_pole_ori(npc_ks_class* param_0) {
+/* 80A4A1B0-80A4A544 001310 0394+00 1/1 0/0 0/0 .text npc_ks_pole_ori__FP12npc_ks_class */
+static void npc_ks_pole_ori(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ if (leader != NULL) {
+ if (i_this->mMode == 0) {
+ obj_so_class* cage_p = (obj_so_class*)fpcM_Search(s_ori_sub, i_this);
+ if (cage_p == NULL) {
+ return;
+ }
+
+ a_this->parentActorID = fopAcM_GetID(cage_p);
+ anm_init(i_this, 20, 5.0f, 2, 1.0f);
+ i_this->mMode++;
+ i_this->mMode = 1;
+ }
+
+ obj_so_class* cage_p = (obj_so_class*)fopAcM_SearchByID(a_this->parentActorID);
+ if (cage_p != NULL) {
+ if (cage_p->health == 0) {
+ i_this->mActionID = 201;
+ i_this->mMode = 10;
+ dComIfGs_onTbox(i_this->field_0x5bc);
+ } else {
+ if (i_this->mMode < 10 && cage_p->field_0xdae != 0) {
+ i_this->mMode = 10;
+ i_this->mpModelMorf->setPlaySpeed(0.0f);
+ }
+
+ if (((i_this->mMode != 10 && i_this->mMode < 10) && i_this->mMode == 1) &&
+ (i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(20.0f))) {
+ cage_p->field_0xdc8 += 400.0f;
+ cage_p->field_0xdac = 0;
+ i_this->mSound.startCreatureSound(Z2SE_OBJ_MONKEYJAIL_CREAK, 0, -1);
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_PRISONED, -1);
+ }
+
+ a_this->current.angle.y = cage_p->shape_angle.y;
+ a_this->current.angle.x = cage_p->shape_angle.x;
+ a_this->current.pos = cage_p->current.pos;
+
+ if (leader->field_0xb42 == 0) {
+ if (!dComIfGs_isSwitch(20, fopAcM_GetRoomNo(a_this))) {
+ cXyz sp2c(11497.0f, 3764.0f, 3810.0f);
+ sp2c -= dComIfGp_getPlayer(0)->current.pos;
+ sp2c.y = 0.0f;
+ if (sp2c.abs() < 300.0f) {
+ leader->field_0xb42 = 110;
+ }
+ }
+ }
+ }
+ }
+ }
}
/* 80A4A544-80A4AAC8 0016A4 0584+00 2/1 0/0 0/0 .text npc_ks_ori__FP12npc_ks_class */
-static void npc_ks_ori(npc_ks_class* param_0) {
+static int npc_ks_ori(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = (fopAc_ac_c*)i_this;
+ cXyz sp30, sp3c;
+ int rv = 0;
+ switch (i_this->mMode) {
+ case 0:
+ anm_init(i_this, 21, 10.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ i_this->mTimers[0] = cM_rndF(200.0f) + 100.0f;
+ break;
+
+ case 1:
+ if (i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(20.0f)) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_PRISONED, -1);
+ i_this->mSound.startCreatureSound(Z2SE_OBJ_MONKEYJAIL_CREAK, 0, -1);
+ }
+
+ if (i_this->mTimers[0] == 0 && i_this->mpModelMorf->checkFrame(99.0f)) {
+ i_this->mMode = 2;
+ anm_init(i_this, 7, 5.0f, 0, 1.0f);
+ i_this->mTimers[0] = cM_rndF(60.0f) + 40.0f;
+ }
+ break;
+
+ case 2:
+ if (i_this->mpModelMorf->isStop()) {
+ if (i_this->mTimers[0] == 0) {
+ i_this->mMode = 0;
+ } else {
+ anm_init(i_this, 7, 5.0f, 0, 1.0f);
+ }
+ }
+ break;
+
+ case 10:
+ cMtx_YrotS(*calc_mtx, a_this->current.angle.y);
+ sp30.x = 0.0f;
+ sp30.y = 0.0f;
+ sp30.z = a_this->speedF;
+ MtxPosition(&sp30, &sp3c);
+ a_this->current.pos += sp3c;
+
+ if (i_this->mTimers[1] == 1) {
+ a_this->speedF = 0.0f;
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ }
+
+ if (i_this->mTimers[0] == 0) {
+ a_this->health = 0;
+ i_this->mActionID = 100;
+ i_this->mTimers[0] = 20;
+ i_this->mMode = 11;
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ fopAcM_setStageLayer(i_this);
+ fpcM_Search(s_resq_sub, i_this);
+ }
+ break;
+
+ case 11:
+ rv = 1;
+ if (i_this->mTimers[1] != 0) {
+ a_this->speedF = -20.0f;
+ } else {
+ a_this->speedF = 0.0f;
+ }
+
+ if (i_this->mTimers[0] == 50) {
+ anm_init(i_this, 11, 3.0f, 2, 1.0f);
+ }
+
+ if (i_this->mTimers[0] == 0) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mTimers[0] = 15;
+ i_this->mMode++;
+ }
+ break;
+
+ case 12:
+ rv = 1;
+ if (i_this->mTimers[0] == 1) {
+ anm_init(i_this, 32, 2.0f, 0, 1.0f);
+ if (fopAcM_GetRoomNo(a_this) == 11) {
+ a_this->current.angle.y += 0x1600;
+ }
+ }
+
+ if (i_this->field_0x5d0 == 26) {
+ a_this->speedF = 20.0f;
+ }
+
+ if (i_this->field_0x5d0 == 32 && i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 33, 1.0f, 0, 1.0f);
+ a_this->speedF = 40.0f;
+ a_this->speed.y = 35.0f;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1);
+ i_this->field_0xbe0 = 1;
+ i_this->mMode++;
+ i_this->mTimers[0] = 50;
+ }
+ break;
+
+ case 13:
+ rv = 1;
+ a_this->gravity = -5.0f;
+ if (i_this->mTimers[0] == 0 || !dComIfGp_event_runCheck()) {
+ fopAcM_delete(a_this);
+ }
+ }
+
+ if (i_this->mMode < 10) {
+ int swBit = fopAcM_GetParam(a_this) >> 24;
+ if (swBit != 0xFF) {
+ if (dComIfGs_isSwitch(swBit, fopAcM_GetRoomNo(a_this))) {
+ dComIfGs_onTbox(i_this->field_0x5bc);
+ if (i_this->field_0x5b6 >= 5) {
+ i_this->mMode = 11;
+ i_this->mTimers[0] = 80;
+ anm_init(i_this, 51 ,5.0f, 2, 1.0f);
+ if (fopAcM_GetRoomNo(a_this) == 11) {
+ i_this->mTimers[1] = 10;
+ }
+ } else {
+ i_this->mMode = 10;
+ a_this->speedF = -10.0f;
+ i_this->mTimers[0] = 110;
+ i_this->mTimers[1] = 15;
+ }
+ }
+ }
+ } else {
+ i_this->field_0x5fc = 0;
+ }
+
+ return rv;
}
/* 80A4AAC8-80A4AC68 001C28 01A0+00 1/1 0/0 0/0 .text shot_bo_sub__FPvPv */
-static void shot_bo_sub(void* param_0, void* param_1) {
- // NONMATCHING
+static void* shot_bo_sub(void* i_actor, void* i_data) {
+ if (fopAc_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_BOOMERANG &&
+ dComIfGp_checkPlayerStatus0(0, 0x80000) == 0 && fopAcM_GetParam(i_actor) == 1) {
+ cXyz sp28(((daBoomerang_c*)i_actor)->current.pos - ((fopAc_ac_c*)i_data)->current.pos);
+ if (sp28.abs() < 1000.0f) {
+ return i_actor;
+ }
+ }
+ return NULL;
}
-/* ############################################################################################## */
-/* 80A5DF7C-80A5DF80 000080 0004+00 0/0 0/0 0/0 .rodata @4799 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4799 = 99.0f;
-COMPILER_STRIP_GATE(0x80A5DF7C, &lit_4799);
-#pragma pop
-
-/* 80A5DF80-80A5DF84 000084 0004+00 0/8 0/0 0/0 .rodata @4800 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4800 = 40.0f;
-COMPILER_STRIP_GATE(0x80A5DF80, &lit_4800);
-#pragma pop
-
-/* 80A5DF84-80A5DF88 000088 0004+00 0/3 0/0 0/0 .rodata @4801 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4801 = 60.0f;
-COMPILER_STRIP_GATE(0x80A5DF84, &lit_4801);
-#pragma pop
-
-/* 80A5DF88-80A5DF8C 00008C 0004+00 0/0 0/0 0/0 .rodata @4802 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4802 = -20.0f;
-COMPILER_STRIP_GATE(0x80A5DF88, &lit_4802);
-#pragma pop
-
-/* 80A5DF8C-80A5DF90 000090 0004+00 1/21 0/0 0/0 .rodata @4803 */
-SECTION_RODATA static f32 const lit_4803 = 3.0f;
-COMPILER_STRIP_GATE(0x80A5DF8C, &lit_4803);
-
-/* 80A5DF90-80A5DF94 000094 0004+00 0/8 0/0 0/0 .rodata @4804 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4804 = 2.0f;
-COMPILER_STRIP_GATE(0x80A5DF90, &lit_4804);
-#pragma pop
-
-/* 80A5DF94-80A5DF98 000098 0004+00 0/0 0/0 0/0 .rodata @4805 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4805 = 35.0f;
-COMPILER_STRIP_GATE(0x80A5DF94, &lit_4805);
-#pragma pop
-
-/* 80A5DF98-80A5DF9C 00009C 0004+00 0/1 0/0 0/0 .rodata @4806 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4806 = -5.0f;
-COMPILER_STRIP_GATE(0x80A5DF98, &lit_4806);
-#pragma pop
-
-/* 80A5DF9C-80A5DFA0 0000A0 0004+00 0/1 0/0 0/0 .rodata @4807 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4807 = -10.0f;
-COMPILER_STRIP_GATE(0x80A5DF9C, &lit_4807);
-#pragma pop
-
-/* 80A5DFA0-80A5DFA4 0000A4 0004+00 0/1 0/0 0/0 .rodata @5077 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5077 = 46.0f;
-COMPILER_STRIP_GATE(0x80A5DFA0, &lit_5077);
-#pragma pop
-
/* 80A4AC68-80A4B7BC 001DC8 0B54+00 2/1 0/0 0/0 .text npc_ks_ori2__FP12npc_ks_class */
-static void npc_ks_ori2(npc_ks_class* param_0) {
+static int npc_ks_ori2(npc_ks_class* i_this) {
// NONMATCHING
-}
+ fopAc_ac_c* a_this = &i_this->actor;
+ int rv = 1;
+ if (i_this->mMode == 0) {
+ fopAc_ac_c* actor_p = (fopAc_ac_c*)fpcM_Search(s_ori_sub, i_this);
+ if (actor_p != NULL) {
+ a_this->parentActorID = fopAcM_GetID(actor_p);
+ anm_init(i_this, 20, 5.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ a_this->home.angle.y = actor_p->shape_angle.y;
+ i_this->field_0xbde = i_this->field_0x5c8 - a_this->home.angle.y;
+ }
+
+ return rv;
+ }
-/* ############################################################################################## */
-/* 80A5DFA4-80A5DFA8 0000A8 0004+00 0/1 0/0 0/0 .rodata @5078 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5078 = -200.0f;
-COMPILER_STRIP_GATE(0x80A5DFA4, &lit_5078);
-#pragma pop
+ obj_so_class* cage_p = (obj_so_class*)fopAcM_SearchByID(a_this->parentActorID);
+ if (cage_p == NULL) {
+ return rv;
+ }
-/* 80A5DFA8-80A5DFAC 0000AC 0004+00 0/9 0/0 0/0 .rodata @5079 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5079 = 6.0f / 5.0f;
-COMPILER_STRIP_GATE(0x80A5DFA8, &lit_5079);
-#pragma pop
+ a_this->home.angle.y = cage_p->shape_angle.y;
+
+ if (i_this->mMode <= 2 && cage_p->field_0x1054 != 0) {
+ i_this->mMode = 3;
+ i_this->mTimers[0] = 90;
+ int swBit = fopAcM_GetParam(a_this) >> 24;
+ dComIfGs_onSwitch(swBit, fopAcM_GetRoomNo(a_this));
+ dComIfGs_onTbox(i_this->field_0x5bc);
+
+ s8 roomNo = fopAcM_GetRoomNo(a_this);
+ if (roomNo == 4) {
+ i_this->field_0xb42 = 70;
+ } else if (roomNo == 19) {
+ i_this->field_0xb42 = 75;
+ } else if (roomNo == 22) {
+ i_this->field_0xb42 = 72;
+ }
+
+ return 1;
+ }
+
+ cXyz sp40;
+ s16 sVar1 = i_this->field_0xbde + (a_this->home.angle.y - 1000);
+ // sVar1 += -1000;
+ f32 fVar1 = 0.0f;
+ switch (i_this->mMode) {
+ case 1:
+ if (i_this->mpModelMorf->checkFrame(46.0f)) {
+ i_this->field_0xbde = i_this->field_0x5c8 - a_this->home.angle.y & 0xE000;
+ }
+
+ if (i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(20.0f)) {
+ cage_p->field_0xdc8 += 100.0f;
+ cage_p->field_0xdac = 0;
+ i_this->mSound.startCreatureSound(Z2SE_OBJ_MONKEYJAIL_CREAK, 0, -1);
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_POINT, -1);
+ }
+
+ if (enemy_check(i_this, 400.0f) == NULL) {
+ if (daPy_getPlayerActorClass()->getCutAtFlg() == 0 && fpcM_Search(shot_bo_sub, i_this) == NULL) break;
+ }
+
+ anm_init(i_this, 41, 5.0f, 2, 1.0f);
+ i_this->mMode = 2;
+ i_this->mTimers[0] = cM_rndF(20.0f) + 40.0f;
+ break;
+
+ case 2:
+ sVar1 += -0x8000;
+ if (i_this->mTimers[0] == 0) {
+ if (cage_p->partBreak()) {
+ anm_init(i_this, 22, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 20, 5.0f, 2, 1.0f);
+ }
+
+ i_this->mMode = 1;
+ } else {
+ if (enemy_check(i_this, 400.0f) == NULL) {
+ if (daPy_getPlayerActorClass()->getCutAtFlg() == 0) break;
+ }
+
+ i_this->mTimers[0] = cM_rndF(20.0f) + 40.0f;
+ }
+ break;
+
+ case 3:
+ fVar1 = -20.0f;
+ if (i_this->mTimers[0] == 50) {
+ anm_init(i_this, 51, 3.0f, 2, 1.0f);
+ }
+
+ if (i_this->mTimers[0] < 50) {
+ cMtx_YrotS(*calc_mtx, a_this->shape_angle.y);
+ if (i_this->mTimers[0] < 25) {
+ sp40.x = 200.0f;
+ } else {
+ sp40.x = -200.0f;
+ }
+ sp40.y = 50.0f;
+ sp40.z = 50.0f;
+ MtxPosition(&sp40, &i_this->field_0x940);
+ i_this->field_0x940 += a_this->current.pos;
+ i_this->field_0x93c = 20;
+ }
+
+ if (i_this->mTimers[0] == 0) {
+ anm_init(i_this, 30, 5.0f, 2, 1.0f);
+ i_this->mMode = 4;
+ i_this->mTimers[0] = 60;
+ i_this->field_0x93c = 0;
+ }
+ break;
+
+ case 4:
+ fVar1 = -20.0f;
+ i_this->field_0x5fc = 0;
+ if (i_this->mTimers[0] == 0) {
+ if (fopAcM_GetRoomNo(a_this) == 22) {
+ i_this->mActionID = 116;
+ i_this->mMode = 0;
+ i_this->field_0xaec = 1;
+ } else if (fopAcM_GetRoomNo(a_this) == 4) {
+ i_this->mMode = 10;
+ } else {
+ i_this->mMode = 5;
+ }
+ }
+ break;
+
+ case 5:
+ i_this->field_0x5fc = 0;
+ fVar1 = -20.0f;
+ anm_init(i_this, 32, 2.0f, 0, 1.0f);
+ i_this->mMode++;
+ break;
+
+ case 6:
+ i_this->field_0x5fc = 0;
+ fVar1 = -20.0f;
+ sVar1 += 0x2000;
+ if (i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 33, 1.0f, 0, 1.0f);
+ a_this->speedF = 40.0f;
+ a_this->speed.y = 35.0f;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1);
+ i_this->field_0xbe0 = 1;
+ i_this->mMode++;
+ }
+ break;
+
+ case 7:
+ i_this->field_0x5fc = 0;
+ a_this->gravity = -5.0f;
+ sVar1 += 0x4000;
+ break;
+
+ case 10:
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 11;
+ i_this->field_0x904 = 0;
+ a_this->speedF = 0.0f;
+ // fallthrough
+ case 11:
+ if ((int)guide_path_04[i_this->field_0x904 * 13] != 0) {
+ i_this->field_0x8f0.x = guide_path_04[i_this->field_0x904 * 13 + 1];
+ i_this->field_0x8f0.y = guide_path_04[i_this->field_0x904 * 13 + 2];
+ i_this->field_0x8f0.z = guide_path_04[i_this->field_0x904 * 13 + 3];
+ i_this->field_0x910 = a_this->current.pos;
+ i_this->field_0x91c = i_this->field_0x8f0;
+ i_this->mMode = 12;
+ anm_init(i_this, 32, 2.0f, 0, 1.0f);
+ a_this->speedF = 0.0f;
+ } else {
+ i_this->field_0x8f0.x = guide_path_04[i_this->field_0x904 * 13 + 1];
+ i_this->field_0x8f0.z = guide_path_04[i_this->field_0x904 * 13 + 3];
+ i_this->mMode = 15;
+ a_this->speedF = l_HIO.field_0x1c;
+ if (i_this->field_0x5d0 != 26) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+ }
+ break;
+
+ case 12:
+ rv = 2;
+ if (i_this->field_0x5d0 == 32 && i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 33, 1.0f, 0, 1.0f);
+ a_this->speedF = 40.0f;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1);
+ i_this->field_0xbe0 = 1;
+ }
+
+ sp40 = i_this->field_0x8f0 - a_this->current.pos;
+ i_this->field_0x8fc.y = cM_atan2s(sp40.x, sp40.z);
+ i_this->field_0x8fc.x = -cM_atan2s(sp40.x, JMAFastSqrt(sp40.x * sp40.x + sp40.z * sp40.z));
+ if (sp40.abs() < (a_this->speedF * 1.2f)) {
+ a_this->current.pos = i_this->field_0x8f0;
+ i_this->mMode = 11;
+ i_this->field_0xbe0 = 1;
+ i_this->field_0x904++;
+ if ((int)guide_path_04[i_this->field_0x904 * 13] < 0) {
+ fopAcM_delete(a_this);
+ }
+ }
+ break;
+
+ case 15:
+ sp40.x = i_this->field_0x8f0.x - a_this->current.pos.x;
+ sp40.z = i_this->field_0x8f0.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp40.x, sp40.z);
+ if (JMAFastSqrt(sp40.x * sp40.x + sp40.z * sp40.z) < (a_this->speedF * 1.2f)) {
+ i_this->field_0x904++;
+ i_this->mMode = 11;
+ }
+ }
-/* 80A5DFAC-80A5DFB0 0000B0 0004+00 0/2 0/0 0/0 .rodata @5155 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5155 = -100.0f;
-COMPILER_STRIP_GATE(0x80A5DFAC, &lit_5155);
-#pragma pop
+ if (i_this->mMode >= 10) {
+ i_this->field_0x5fc = 0;
+ sVar1 = i_this->field_0x8fc.y;
+ if (a_this->speedF > 25.0f) {
+ i_this->field_0x90c = 1;
+ }
+ }
-/* 80A5DFB0-80A5DFB4 0000B4 0004+00 0/2 0/0 0/0 .rodata @5156 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5156 = -50.0f;
-COMPILER_STRIP_GATE(0x80A5DFB0, &lit_5156);
-#pragma pop
+ cLib_addCalcAngleS2(&a_this->current.angle.y, sVar1, 2, 0x2000);
+
+ if (i_this->mMode < 7) {
+ a_this->current.angle.x = cage_p->shape_angle.x;
+ a_this->current.pos = cage_p->current.pos;
+ a_this->current.pos.y += fVar1;
+ }
+
+ return rv;
+}
/* 80A4B7BC-80A4BA14 00291C 0258+00 1/1 0/0 0/0 .text npc_ks_home__FP12npc_ks_class */
-static void npc_ks_home(npc_ks_class* param_0) {
- // NONMATCHING
+static void npc_ks_home(npc_ks_class* i_this) {
+ fopAc_ac_c* a_this = (fopAc_ac_c*)i_this;
+ cXyz sp2c, sp38;
+ switch (i_this->mMode) {
+ case 0:
+ if (cM_rndF(1.0f) < 0.5f) {
+ anm_init(i_this, 30, 3.0f, 0, 1.0f);
+ } else {
+ anm_init(i_this, 5, 3.0f, 0, 1.0f);
+ }
+
+ i_this->mMode = 1;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_WAIT, -1);
+ break;
+
+ case 1:
+ if (i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 0;
+ }
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x5c8, 2, 0x800);
+ if (checkDoorDemo() != 0) {
+ s16 roomNo = fopAcM_GetRoomNo(a_this);
+ int nextStayNo = dStage_roomControl_c::getNextStayNo();
+ if (roomNo == 0 && nextStayNo == 4) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ i_this->field_0x904 = 0;
+ i_this->field_0xaec = 1;
+ if (fopAcM_CheckCondition(a_this, 4) != 0) {
+ camera_class* camera = dComIfGp_getCamera(0);
+ sp2c.x = camera->lookat.eye.x - camera->lookat.center.x;
+ sp2c.z = camera->lookat.eye.z - camera->lookat.center.z;
+ cMtx_YrotS(*calc_mtx, cM_atan2s(sp2c.x, sp2c.z));
+ if ((i_this->field_0x5b6 & 1) != 0) {
+ sp2c.x = 100.0f;
+ } else {
+ sp2c.x = -100.0f;
+ }
+ sp2c.y = -50.0f;
+ sp2c.z = 200.0f;
+ MtxPosition(&sp2c, &sp38);
+ a_this->current.pos = camera->lookat.eye + sp38;
+ a_this->old = a_this->current;
+ }
+ }
+ }
}
/* 80A4BA14-80A4BA90 002B74 007C+00 3/3 0/0 0/0 .text s_sw_sub__FPvPv */
-static void s_sw_sub(void* param_0, void* param_1) {
+static void* s_sw_sub(void* i_actor, void* i_data) {
// NONMATCHING
+ if ((fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_OBJ_SW) &&
+ (fopAcM_GetRoomNo((fopAc_ac_c*)i_data) == 0 && ((npc_ks_class*)i_data)->field_0x5b6 == ((obj_sw_class*)i_actor)->field_0x570)) {
+ return i_actor;
+ }
+ return NULL;
}
/* 80A4BA90-80A4BADC 002BF0 004C+00 1/1 0/0 0/0 .text s_ha_sub__FPvPv */
-static void s_ha_sub(void* param_0, void* param_1) {
- // NONMATCHING
+static void* s_ha_sub(void* i_actor, void* i_data) {
+ if (fopAc_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_Obj_Pillar) {
+ return i_actor;
+ }
+ return NULL;
}
/* 80A4BADC-80A4BB34 002C3C 0058+00 1/1 0/0 0/0 .text s_01_sub__FPvPv */
-static void s_01_sub(void* param_0, void* param_1) {
- // NONMATCHING
+static void* s_01_sub(void* i_actor, void* i_data) {
+ if (fopAc_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_NPC_KS && ((npc_ks_class*)i_actor)->mActionID == 4) {
+ return i_actor;
+ }
+ return NULL;
}
-/* ############################################################################################## */
-/* 80A5DFB4-80A5DFB8 0000B8 0004+00 0/0 0/0 0/0 .rodata @5565 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5565 = 90.0f;
-COMPILER_STRIP_GATE(0x80A5DFB4, &lit_5565);
-#pragma pop
-
-/* 80A5DFB8-80A5DFBC 0000BC 0004+00 0/1 0/0 0/0 .rodata @5566 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5566 = 55.0f;
-COMPILER_STRIP_GATE(0x80A5DFB8, &lit_5566);
-#pragma pop
-
-/* 80A5DFBC-80A5DFC0 0000C0 0004+00 0/13 0/0 0/0 .rodata @5567 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5567 = 30.0f;
-COMPILER_STRIP_GATE(0x80A5DFBC, &lit_5567);
-#pragma pop
-
-/* 80A5DFC0-80A5DFC4 0000C4 0004+00 0/0 0/0 0/0 .rodata @5568 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5568 = 17.0f / 10.0f;
-COMPILER_STRIP_GATE(0x80A5DFC0, &lit_5568);
-#pragma pop
+/* 80A4BB34-80A4CA70 002C94 0F3C+00 2/1 0/0 0/0 .text npc_ks_demo_02__FP12npc_ks_class */
+static int npc_ks_demo_02(npc_ks_class* i_this) {
+ // NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ cXyz sp3c, sp48;
+ f32 fVar1 = 0.0f;
+ int rv = 1;
+ int iVar1 = 0;
+
+ obj_so_class* cage_p = (obj_so_class*)fopAcM_SearchByName(PROC_OBJ_SO);
+ if (cage_p == NULL) {
+ return 0;
+ }
+
+ if (cage_p->field_0xdae != 0 && i_this->mMode < 17) {
+ i_this->mActionID = 201;
+ i_this->mMode = 0;
+ return 0;
+ }
+
+ daPillar_c* pillar_p = (daPillar_c*)fpcM_Search(s_ha_sub, i_this);
+ if (pillar_p == NULL) {
+ return 0;
+ }
-/* 80A5DFC4-80A5DFC8 0000C8 0004+00 0/0 0/0 0/0 .rodata @5569 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5569 = -15.0f;
-COMPILER_STRIP_GATE(0x80A5DFC4, &lit_5569);
-#pragma pop
+ f32 fVar3;
+ switch (i_this->mMode) {
+ case 0:
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ i_this->field_0x904 = 0;
+ // fallthrough
+ case 1:
+ i_this->field_0x8f0.x = move_path_02[i_this->field_0x904 * 13 + 1];
+ i_this->field_0x8f0.y = move_path_02[i_this->field_0x904 * 13 + 2];
+ i_this->field_0x8f0.z = move_path_02[i_this->field_0x904 * 13 + 3];
+ i_this->mMode = 2;
+ // fallthrough
+ case 2:
+ fVar1 = l_HIO.field_0x18;
+ sp3c = i_this->field_0x8f0 - a_this->current.pos;
+ i_this->field_0x8fc.y = cM_atan2s(sp3c.x, sp3c.z);
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 2, 0x1000);
+ sp3c.y = 0.0f;
+ if (sp3c.abs() <= a_this->speedF * 2.0f) {
+ i_this->field_0x904++;
+ if (i_this->field_0x904 < 5) {
+ i_this->mMode = 1;
+ } else {
+ i_this->mMode = 10;
+ anm_init(i_this, 25, 5.0f, 2, 1.0f);
+ i_this->mTimers[0] = 35;
+ }
+ }
+ break;
+
+ case 10:
+ cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->shape_angle.y + 0x8000, 2, 0x1000);
+ if (i_this->mTimers[0] == 0) {
+ i_this->mMode = 11;
+ anm_init(i_this, 26, 5.0f, 2, 1.0f);
+ }
+ break;
+
+ case 11:
+ rv = 0;
+ cMtx_YrotS(*calc_mtx, cage_p->shape_angle.y);
+ sp3c.x = 0.0f;
+ sp3c.y = 0.0f;
+ sp3c.z = cage_p->scale.x * 90.0f;
+ MtxPosition(&sp3c, &sp48);
+ sp48 += cage_p->current.pos;
+ cLib_addCalc2(&a_this->current.pos.x, sp48.x, 1.0f, a_this->speedF);
+ cLib_addCalc2(&a_this->current.pos.z, sp48.z, 1.0f, a_this->speedF);
+ sp3c.x = sp48.x - a_this->current.pos.x;
+ sp3c.z = sp48.z - a_this->current.pos.z;
+ sp3c.y = JMAFastSqrt(sp3c.x * sp3c.x + sp3c.z * sp3c.z);
+ if (sp3c.y < 55.0f && i_this->field_0x5d0 != 12) {
+ anm_init(i_this, 12, 3.0f, 2, 1.0f);
+ }
+
+ if (sp3c.y < 1.0f) {
+ i_this->mMode = 12;
+ a_this->current.angle.y = cage_p->shape_angle.y + 0x8000;
+ }
+ break;
+
+ case 12:
+ rv = 0;
+ iVar1 = 1;
+ cMtx_YrotS(*calc_mtx, cage_p->shape_angle.y);
+ sp3c.x = 0.0f;
+ sp3c.y = 0.0f;
+ sp3c.z = 90.0f;
+ MtxPosition(&sp3c, &sp48);
+ sp48 += cage_p->current.pos;
+ cLib_addCalc2(&a_this->current.pos.x, sp48.x, 1.0f, a_this->speedF);
+ cLib_addCalc2(&a_this->current.pos.y, sp48.y, 1.0f, a_this->speedF);
+ cLib_addCalc2(&a_this->current.pos.z, sp48.z, 1.0f, a_this->speedF);
+ sp3c = sp48 - a_this->current.pos;
+ if (sp3c.abs() < 1.0f) {
+ i_this->mMode = 13;
+ anm_init(i_this, 23, 2.0f, 2, 1.0f);
+ i_this->mTimers[0] = 60;
+ }
+ break;
+
+ case 13:
+ rv = 0;
+ iVar1 = 1;
+ cMtx_YrotS(*calc_mtx, cage_p->shape_angle.y);
+ sp3c.x = 0.0f;
+ sp3c.y = 0.0f;
+ sp3c.z = cage_p->scale.x * 90.0f;
+ MtxPosition(&sp3c, &sp48);
+ sp48 += cage_p->current.pos;
+ cLib_addCalc2(&a_this->current.pos.x, sp48.x, 1.0f, 10.0f);
+ cLib_addCalc2(&a_this->current.pos.z, sp48.z, 1.0f, 10.0f);
+
+ if (i_this->mpModelMorf->checkFrame(10.0f) || i_this->mpModelMorf->checkFrame(20.0f)) {
+ cage_p->field_0xdc8 += 200.0f;
+ i_this->mSound.startCreatureSound(Z2SE_OBJ_MONKEYJAIL_CREAK, 0, -1);
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_POINT, -1);
+ }
+
+ if (i_this->mTimers[0] == 0) {
+ i_this->mMode = 14;
+ anm_init(i_this, 15, 2.0f, 2, 1.0f);
+ }
+ break;
+
+ case 14:
+ rv = 0;
+ iVar1 = 1;
+ cMtx_YrotS(*calc_mtx, cage_p->shape_angle.y);
+ sp3c.x = 0.0f;
+ sp3c.y = 0.0f;
+ sp3c.z = 90.0f;
+ MtxPosition(&sp3c, &sp48);
+ sp48 += cage_p->current.pos;
+ cLib_addCalc2(&a_this->current.pos.x, sp48.x, 1.0f, 10.0f);
+ cLib_addCalc2(&a_this->current.pos.z, sp48.x, 1.0f, 10.0f);
+ cLib_addCalc2(&a_this->current.pos.y, i_this->mObjAcch.GetGroundH(), 1.0f, l_HIO.field_0x18);
+
+ if (fabsf(a_this->current.pos.y - i_this->mObjAcch.GetGroundH()) < 1.0f) {
+ anm_init(i_this, 26, 5.0f, 2, 1.0f);
+ a_this->speedF = 0.0f;
+ i_this->mTimers[0] = 20;
+ i_this->mMode = 15;
+ }
+ break;
+
+ case 15:
+ fVar1 = l_HIO.field_0x18;
+ cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->shape_angle.y, 2, 0x2000);
+ if (i_this->mTimers[0] == 0) {
+ i_this->mMode = 16;
+ anm_init(i_this, 25, 5.0f, 2, 1.0f);
+ }
+ break;
+
+ case 16:
+ i_this->field_0xaec = 2;
+ i_this->field_0x5fc = 1;
+ if (i_this->mTimers[0] == 0) {
+ if (i_this->field_0x5d0 != 25) {
+ anm_init(i_this, 25, 5.0f, 2, 1.0f);
+ i_this->mTimers[0] = 25;
+ } else {
+ anm_init(i_this, 50, 5.0f, 2, 1.0f);
+ i_this->mTimers[0] = cM_rndF(30.0f) + 30.0f;
+ }
+ }
+
+ cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->shape_angle.y + 0x8000, 2, 0x1000);
+ if (dComIfGp_checkPlayerStatus0(0, 0x40) != 0 || dComIfGp_checkPlayerStatus0(0, 0x2000) != 0) {
+ i_this->mTimers[2] = 20;
+ }
+
+ if (i_this->mTimers[2] == 0 && cage_p->field_0xdc4 == 0) {
+ fopAcM_OnStatus(a_this, 0);
+ cLib_onBit<u32>(a_this->attention_info.flags, 0x2000000A);
+ a_this->eventInfo.onCondition(dEvtCnd_CANTALK_e);
+ a_this->attention_info.distances[1] = 2;
+ a_this->attention_info.distances[3] = 2;
+ }
+
+ if (i_this == (npc_ks_class*)dComIfGp_getAttention().LockonTarget(0) && i_this->mTimers[2] == 0
+ && mDoCPd_c::getTrigA(PAD_1) != 0) {
+ i_this->mMode = 17;
+ anm_init(i_this, 25, 2.0f, 0, 1.0f);
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ a_this->speedF = 0.0f;
+ leader->field_0xb42 = 60;
+ }
+ break;
+
+ case 17:
+ rv = 0;
+ if (i_this->field_0x5d0 == 25) {
+ if (i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 49, 3.0f, 0, 1.0f);
+ }
+ } else {
+ fVar1 = 30.0f;
+ }
+
+ if (i_this->field_0x5d0 == 49 && i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 38, 1.0f, 2, 1.0f);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_ROLL, 0, -1);
+ }
+
+ sp3c = pillar_p->current.pos - a_this->current.pos;
+ a_this->current.angle.y = cM_atan2s(sp3c.x, sp3c.z);
+ cMtx_YrotS(*calc_mtx, a_this->current.angle.y);
+ sp3c.x = 0.0f;
+ sp3c.y = 0.0f;
+ sp3c.z = a_this->speedF;
+ MtxPosition(&sp3c, &sp48);
+ a_this->current.pos += sp48;
+ sp3c.x = pillar_p->current.pos.x - a_this->current.pos.x;
+ sp3c.z = pillar_p->current.pos.z - a_this->current.pos.z;
+ if (JMAFastSqrt(sp3c.x * sp3c.x + sp3c.z * sp3c.z) < 90.0f) {
+ pillar_p->setShake(daPillar_c::SHAKE_STRONG);
+ anm_init(i_this, 6, 5.0f, 0, 1.0f);
+ i_this->mMode = 18;
+ a_this->speedF = -20.0f;
+ a_this->speed.y = 30.0f;
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_ATTACK_POLL, 0, -1);
+ if (cage_p != NULL) {
+ cage_p->field_0xdc8 = 1500.0f;
+ i_this->mSound.startCreatureSound(Z2SE_OBJ_MONKEYJAIL_SHAKE, 0, -1);
+ }
+ }
+ break;
+
+ case 18:
+ fVar1 = -20.0f;
+ cLib_addCalcAngleS2(&a_this->current.angle.x, -0x3830, 1, 0x600);
+ if (a_this->speed.y <= 0.0f && i_this->mObjAcch.ChkGroundHit()) {
+ i_this->mMode = 19;
+ a_this->speed.y = 20.0f;
+ a_this->current.angle.x = -0x3830;
+ i_this->mTimers[0] = 40;
+ i_this->mTimers[1] = 10;
+ fopAcM_effSmokeSet1(&i_this->field_0x858, &i_this->field_0x85c, &a_this->eyePos, NULL, 1.7f, &a_this->tevStr, 1);
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_CRUSHED, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_FALL_GROUND, 0, -1);
+ anm_init(i_this, 13, 2.0f, 2, 1.0f);
+ }
+ break;
+
+ case 19:
+ if (i_this->mTimers[1] != 0) {
+ fVar1 = -15.0f;
+ a_this->speedF = fVar1;
+ } else {
+ fVar1 = 0.0f;
+ a_this->speedF = fVar1;
+ }
+
+ if (i_this->mTimers[0] == 0) {
+ anm_init(i_this, 35, 3.0f, 0, 1.0f);
+ i_this->mMode = 20;
+ }
+ break;
+
+ case 20:
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800);
+ if (i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 16;
+ anm_init(i_this, 25, 5.0f, 2, 1.0f);
+ if (leader->field_0xb42 != 0) {
+ leader->field_0xb42 = 100;
+ }
+ i_this->mTimers[2] = 30;
+ }
+ }
-/* 80A5DFC8-80A5DFCC 0000CC 0004+00 0/5 0/0 0/0 .rodata @5570 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5570 = 4.0f;
-COMPILER_STRIP_GATE(0x80A5DFC8, &lit_5570);
-#pragma pop
+ cLib_addCalc2(&a_this->speedF, fVar1, 1.0f, 4.0f);
+ if (checkDoorDemo() != 0) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ } else if (iVar1 != 0 && cage_p->shape_angle.x > 0x200) {
+ anm_init(i_this, 6, 5.0f, 0, 1.0f);
+ i_this->mMode = 18;
+ a_this->speedF = -8.0f;
+ a_this->speed.y = 10.0f;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_PRISONED, -1);
+ }
-/* 80A4BB34-80A4CA70 002C94 0F3C+00 2/1 0/0 0/0 .text npc_ks_demo_02__FP12npc_ks_class */
-static void npc_ks_demo_02(npc_ks_class* param_0) {
- // NONMATCHING
+ return rv;
}
/* 80A4CA70-80A4CABC 003BD0 004C+00 1/1 0/0 0/0 .text s_dn_sub__FPvPv */
-static void s_dn_sub(void* param_0, void* param_1) {
- // NONMATCHING
+static void* s_dn_sub(void* i_actor, void* i_data) {
+ if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_OC) {
+ return i_actor;
+ }
+ return NULL;
}
-/* 80A4CABC-80A4CF40 003C1C 0484+00 2/1 0/0 0/0 .text npc_ks_demo_022__FP12npc_ks_class
- */
-static void npc_ks_demo_022(npc_ks_class* param_0) {
+/* 80A4CABC-80A4CF40 003C1C 0484+00 2/1 0/0 0/0 .text npc_ks_demo_022__FP12npc_ks_class */
+static int npc_ks_demo_022(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ daE_OC_c* bokoblin_p = (daE_OC_c*)fpcM_Search(s_dn_sub, i_this);
+ int frame = i_this->mpModelMorf->getFrame();
+
+ switch(i_this->mMode) {
+ case 0:
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ i_this->mTimers[0] = 100;
+ // fallthrough
+ case 1:
+ i_this->field_0x5fc = 1;
+ if (i_this->mTimers[0] == 0) {
+ i_this->mMode = 20;
+ anm_init(i_this, 30, 3.0f, 2, 1.0f);
+ i_this->mTimers[0] = 90;
+ fpcM_Search(s_resq_sub, i_this);
+ }
+ break;
+
+ case 10:
+ anm_init(i_this, 13, 2.0f, 2, 1.0f);
+ i_this->mTimers[0] = 30;
+ i_this->mMode = 11;
+ a_this->current.angle.x = -0x3830;
+ // fallthrough
+ case 11:
+ if (i_this->mTimers[0] == 0) {
+ anm_init(i_this, 35, 3.0f, 0, 1.0f);
+ i_this->mMode = 12;
+ mDoAud_seStart(12, 0, 0, 0);
+ Z2GetAudioMgr()->muteSceneBgm(120, 0.0f);
+ Z2GetAudioMgr()->setBattleBgmOff(true);
+ }
+ break;
+
+ case 12:
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800);
+ if (i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 20;
+ anm_init(i_this, 30, 3.0f, 2, 1.0f);
+ i_this->mTimers[0] = 90;
+ fpcM_Search(s_resq_sub, i_this);
+ }
+ break;
+
+ case 20:
+ if (i_this->mTimers[0] == 0) {
+ i_this->mMode = 21;
+ }
+ break;
+
+ case 21:
+ anm_init(i_this, 39, 5.0f, 2, 1.0f);
+ i_this->mMode = 22;
+ i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f;
+ i_this->field_0xaec = 1;
+ break;
+
+ case 22:
+ if (((i_this->field_0x5d0 == 39 || i_this->field_0x5d0 == 43 && frame < 7) ||
+ (frame > 40 && frame < 48) || frame > 65)) {
+ i_this->field_0x5e0 = 4;
+ }
+
+ if ((i_this->mTimers[0] == 0) && (i_this->field_0x5d0 == 39)) {
+ anm_init(i_this, 43, 5.0f, 0, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 43) {
+ if (i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 21;
+ }
+ }
+
+ if (bokoblin_p == NULL) {
+ i_this->mTimers[0] = cM_rndF(10.0f) + 30.0f;
+ i_this->mMode = 23;
+ dComIfGs_onSwitch(fopAcM_GetParam(a_this) >> 24, fopAcM_GetRoomNo(a_this));
+ }
+ break;
+
+ case 23:
+ if (i_this->mTimers[0] == 0) {
+ if (i_this->field_0x5b6 == 0) {
+ anm_init(i_this, 56, 3.0f, 2, 1.0f);
+ }
+ else {
+ anm_init(i_this, 11, 3.0f, 2, 1.0f);
+ }
+ i_this->mTimers[0] = cM_rndF(25.0f) + 70.0f;
+ i_this->mMode = 24;
+ }
+ break;
+
+ case 24:
+ if (i_this->mTimers[0] == 0) {
+ i_this->mActionID = 114;
+ i_this->mMode = 0;
+ i_this->mTimers[2] = 60;
+ }
+ }
+
+ cLib_addCalc2(&a_this->speedF, 0.0f, 1.0f, 4.0f);
+ return 1;
}
/* 80A4CF40-80A4D438 0040A0 04F8+00 2/1 0/0 0/0 .text npc_ks_demo_04__FP12npc_ks_class */
-static void npc_ks_demo_04(npc_ks_class* param_0) {
+static void npc_ks_demo_04(npc_ks_class* i_this) {
// NONMATCHING
-}
-
-/* ############################################################################################## */
-/* 80A5DFCC-80A5DFD0 0000D0 0004+00 0/0 0/0 0/0 .rodata @5571 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5571 = -8.0f;
-COMPILER_STRIP_GATE(0x80A5DFCC, &lit_5571);
-#pragma pop
-
-/* 80A5DFD0-80A5DFD4 0000D4 0004+00 0/8 0/0 0/0 .rodata @5675 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5675 = 80.0f;
-COMPILER_STRIP_GATE(0x80A5DFD0, &lit_5675);
-#pragma pop
-
-/* 80A5DFD4-80A5DFDC 0000D8 0004+04 0/2 0/0 0/0 .rodata @5676 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5676[1 + 1 /* padding */] = {
- 70.0f,
- /* padding */
- 0.0f,
-};
-COMPILER_STRIP_GATE(0x80A5DFD4, &lit_5676);
-#pragma pop
-
-/* 80A5DFDC-80A5DFE4 0000E0 0008+00 0/0 0/0 0/0 .rodata @5679 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const lit_5679[8] = {
- 0x43, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x80A5DFDC, &lit_5679);
-#pragma pop
-
-/* 80A5DFE4-80A5DFE8 0000E8 0004+00 0/1 0/0 0/0 .rodata @5768 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5768 = 3300.0f;
-COMPILER_STRIP_GATE(0x80A5DFE4, &lit_5768);
-#pragma pop
-
-/* 80A5DFE8-80A5DFEC 0000EC 0004+00 0/0 0/0 0/0 .rodata @5769 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5769 = 4393.0f;
-COMPILER_STRIP_GATE(0x80A5DFE8, &lit_5769);
-#pragma pop
-
-/* 80A5DFEC-80A5DFF0 0000F0 0004+00 0/0 0/0 0/0 .rodata @5770 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5770 = 37.0f;
-COMPILER_STRIP_GATE(0x80A5DFEC, &lit_5770);
-#pragma pop
-
-/* 80A5DFF0-80A5DFF4 0000F4 0004+00 0/0 0/0 0/0 .rodata @5771 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5771 = -2.0f;
-COMPILER_STRIP_GATE(0x80A5DFF0, &lit_5771);
-#pragma pop
+ fopAc_ac_c* a_this = &i_this->actor;
+ f32 fVar1 = 0.0f;
+ f32 fVar2 = 10.0f;
+ switch(i_this->mMode) {
+ case 0:
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ break;
+
+ case 2:
+ a_this->current.pos.set(0.0f, 3300.0f, 4393.0f);
+ a_this->current.angle.y = -0x8000;
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 3;
+ break;
+
+ case 3:
+ fVar1 = l_HIO.field_0x18;
+ if (a_this->field_0x567 != 0) {
+ a_this->field_0x567 = 0;
+ anm_init(i_this, 45, 3.0f, 0, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 45) {
+ if (i_this->mpModelMorf->checkFrame(20.0f)) {
+ mDoAud_seStart(0x5001a, 0, 0, 0);
+ }
+
+ fVar1 = 0.0f;
+ fVar2 = 4.0f;
+ if (i_this->mpModelMorf->getFrame() >= 37.0f) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+ }
+
+ break;
+
+ case 4:
+ i_this->mMode = 5;
+ anm_init(i_this, 33, 5.0f, 0, 1.0f);
+ mDoAud_seStart(0x5001a, 0, 0, 0);
+ a_this->speed.y = 0.0f;
+ break;
+
+ case 5:
+ fVar1 = l_HIO.field_0x18;
+ a_this->gravity = -2.0f;
+ break;
+
+ case 6:
+ anm_init(i_this, 12, 3.0f, 2, 1.0f);
+ i_this->mMode = 7;
+ // fallthrough
+ case 7:
+ a_this->gravity = 0.0f;
+ a_this->speed.y = 10.0f;
+ if ((i_this->field_0x5e6 & 31) == 0) {
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_WAIT, -1);
+ }
+ break;
+
+ case 8:
+ anm_init(i_this, 26, 5.0f, 2, 1.0f);
+ i_this->mTimers[0] = 35;
+ i_this->mMode = 9;
+ break;
+
+ case 9:
+ fVar1 = l_HIO.field_0x18;
+ fVar2 = 4.0f;
+ if (i_this->mTimers[0] == 0) {
+ anm_init(i_this, 37, 3.0f, 0, 1.0f);
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_RELEIEF, -1);
+ i_this->field_0x5e4 = 1;
+ i_this->mMode = 10;
+ }
+ break;
+
+ case 10:
+ i_this->field_0x5fc = 1;
+ if (i_this->mpModelMorf->isStop()) {
+ i_this->field_0x5e4 = 0;
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 11;
+ i_this->mTimers[0] = 25;
+ }
+ break;
+
+ case 11:
+ fVar1 = l_HIO.field_0x18;
+ fVar2 = 4.0f;
+ if (i_this->mTimers[0] == 0) {
+ anm_init(i_this, 7, 5.0f, 2, 1.0f);
+ i_this->mTimers[0] = 120;
+ i_this->mMode = 12;
+ }
+ break;
+
+ case 12:
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x5c8, 2, 0x1000);
+ if (i_this->mTimers[0] == 0) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ }
+ break;
+
+ case 20:
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ i_this->mMode = 21;
+ // fallthrough
+ case 21:
+ if (a_this->field_0x567 != 0) {
+ a_this->field_0x567 = 0;
+ i_this->mMode = 22;
+ anm_init(i_this, 45, 3.0f, 0, 1.0f);
+ }
+ break;
+
+ case 22:
+ if (i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 26) {
+ cLib_addCalcAngleS2(&a_this->current.angle.y, 0, 2, 0x1000);
+ if (a_this->current.angle.y < 0x1000 && a_this->current.angle.y > -0x1000) {
+ fVar1 = l_HIO.field_0x18;
+ fVar2 = 10.0f;
+ }
+ }
+ }
-/* 80A5DFF4-80A5DFF8 0000F8 0004+00 0/1 0/0 0/0 .rodata @5956 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5956 = 11.0f / 10.0f;
-COMPILER_STRIP_GATE(0x80A5DFF4, &lit_5956);
-#pragma pop
+ cLib_addCalc2(&a_this->speedF, fVar1, 1.0f, fVar2);
+}
/* 80A4D438-80A4DBF8 004598 07C0+00 1/1 0/0 0/0 .text npc_ks_to_hang__FP12npc_ks_class */
-static void npc_ks_to_hang(npc_ks_class* param_0) {
- // NONMATCHING
+static void npc_ks_to_hang(npc_ks_class* i_this) {
+ fopAc_ac_c* a_this = &i_this->actor;
+ cXyz sp24, sp30;
+ cXyz sp3c(i_this->field_0xbc8);
+
+ switch (i_this->mMode) {
+ case 0:
+ i_this->field_0x8f0 = sp3c;
+ i_this->field_0x910 = a_this->current.pos;
+ i_this->field_0x91c = i_this->field_0x8f0;
+ anm_init(i_this, 32, 2.0f, 0, 1.0f);
+ a_this->speedF = 0.0f;
+ i_this->mMode++;
+ break;
+
+ case 1:
+ sp24 = i_this->field_0x8f0 - a_this->current.pos;
+ if (i_this->field_0x5d0 == 32) {
+ a_this->speedF = 0.0f;
+ if (i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 33, 1.0f, 0, 1.0f);
+ a_this->speedF = 40.0f;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1);
+ i_this->field_0xbe0 = 1;
+ }
+ }
+
+ i_this->field_0x8fc.y = cM_atan2s(sp24.x, sp24.z);
+ i_this->field_0x8fc.x = -cM_atan2s(sp24.y, JMAFastSqrt(sp24.x * sp24.x + sp24.z * sp24.z));
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x2000);
+ if (sp24.abs() <= a_this->speedF * 1.1f) {
+ i_this->mMode = 10;
+ obj_sw_class* sw_p = i_this->field_0x934;
+ if (sw_p != NULL) {
+ if (sw_p->field_0x91c == 1) {
+ i_this->field_0x630 = sw_p->field_0xd8c / 2;
+ } else {
+ i_this->field_0x630 = ((i_this->field_0x5b6 + 1) * (sw_p->field_0xd8c / (sw_p->field_0x91c + 1)) - 1);
+ }
+
+ a_this->parentActorID = fopAcM_GetID(sw_p);
+
+ a_this->current.pos = i_this->field_0x8f0;
+ i_this->field_0x910 = a_this->current.pos;
+ anm_init(i_this, 32, 2.0f, 0, 1.0f);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1);
+ }
+ }
+ break;
+
+ case 2:
+ if (i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 0;
+ }
+ break;
+
+ case 10:
+ obj_so_class* cage_p = (obj_so_class*)fopAcM_SearchByID(a_this->parentActorID);
+ i_this->field_0x8f0 = cage_p->field_0x920[i_this->field_0x630];
+ i_this->field_0x91c = i_this->field_0x8f0;
+ sp24 = i_this->field_0x8f0 - a_this->current.pos;
+ if (i_this->field_0x5d0 == 32) {
+ a_this->speedF = 0.0f;
+ if (i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 33, 1.0f, 0, 1.0f);
+ a_this->speedF = 30.0f;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1);
+ i_this->field_0xbe0 = 1;
+ }
+ }
+
+ i_this->field_0x8fc.y = cM_atan2s(sp24.x, sp24.z);
+ i_this->field_0x8fc.x = -cM_atan2s(sp24.y, JMAFastSqrt(sp24.x * sp24.x + sp24.z * sp24.z));
+ if (sp24.abs() <= a_this->speedF* 1.1f) {
+ a_this->current.pos = i_this->field_0x8f0;
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1);
+ if (i_this->field_0x934->field_0x91c == 1) {
+ i_this->mActionID = 11;
+ i_this->mMode = 0;
+ } else {
+ i_this->mActionID = 21;
+ i_this->mMode = 0;
+ i_this->mTimers[2] = 15;
+ }
+ }
+ }
+
+ if (a_this->speedF> 25.0f) {
+ i_this->field_0x90c= 1;
+ }
}
/* 80A4DBF8-80A4DC80 004D58 0088+00 1/1 0/0 0/0 .text s_next_do_sub__FPvPv */
-static void s_next_do_sub(void* param_0, void* param_1) {
+static void* s_next_do_sub(void* i_actor, void* i_data) {
// NONMATCHING
+ if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_NPC_KS && ((npc_ks_class*)i_actor)->field_0x5b5 == 0 &&
+ ((npc_ks_class*)i_data)->field_0x5b8 != ((npc_ks_class*)i_actor)->field_0x5b8 - 1) {
+ ((npc_ks_class*)i_actor)->mMode++;
+ } else {
+ return i_actor;
+ }
+ return NULL;
}
-/* ############################################################################################## */
-/* 80A5DFF8-80A5DFFC 0000FC 0004+00 0/2 0/0 0/0 .rodata @5986 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5986 = 1.0f / 10.0f;
-COMPILER_STRIP_GATE(0x80A5DFF8, &lit_5986);
-#pragma pop
-
/* 80A4DC80-80A4DD70 004DE0 00F0+00 1/1 0/0 0/0 .text s_next_get_sub__FPvPv */
-static void s_next_get_sub(void* param_0, void* param_1) {
+static void* s_next_get_sub(void* i_actor, void* i_data) {
// NONMATCHING
+ if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_NPC_KS && ((npc_ks_class*)i_actor)->field_0x5b5 != 0 &&
+ ((npc_ks_class*)i_actor)->field_0x5b8 != ((npc_ks_class*)i_data)->field_0x5b8 && ((npc_ks_class*)i_actor)->field_0x620 != 0) {
+ ((npc_ks_class*)i_actor)->field_0x620 = 0;
+ anm_init(((npc_ks_class*)i_actor), 24, 1.0f, 2, 1.0f);
+ ((npc_ks_class*)i_data)->field_0x620 = 1;
+ ((npc_ks_class*)i_data)->field_0x624 = ((npc_ks_class*)i_data)->field_0x614 - ((npc_ks_class*)i_actor)->field_0x614;
+ ((npc_ks_class*)i_data)->field_0x624 *= 0.1f;
+ ((npc_ks_class*)i_data)->field_0x634 = 10.0f;
+ return i_actor;
+ }
+ return NULL;
}
/* 80A4DD70-80A4DDF8 004ED0 0088+00 1/1 0/0 0/0 .text order_set__Fi */
-static void order_set(int param_0) {
+static void order_set(int param_1) {
// NONMATCHING
+ if (saru_p[param_1]->field_0x5c4 < saru_p[1]->field_0x5c4) {
+ for (int i = 0; i < param_1; i++) {
+ saru_p[i]->field_0x5b8 = i;
+ }
+ } else {
+ for (int i = 0; i < param_1; i++) {
+ saru_p[i]->field_0x5b8 = (param_1 - 1) - i;
+ }
+ }
}
/* 80A4DDF8-80A4DE34 004F58 003C+00 2/2 0/0 0/0 .text all_carry_finish__Fi */
-static void all_carry_finish(int param_0) {
- // NONMATCHING
+static void all_carry_finish(int param_1) {
+ for (int i = 0; i < param_1; i++) {
+ saru_p[i]->mActionID = 10;
+ saru_p[i]->mMode = 0;
+ }
}
-/* ############################################################################################## */
-/* 80A5DFFC-80A5E000 000100 0004+00 0/1 0/0 0/0 .rodata @6069 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6069 = 2500.0f;
-COMPILER_STRIP_GATE(0x80A5DFFC, &lit_6069);
-#pragma pop
-
/* 80A4DE34-80A4E000 004F94 01CC+00 2/2 0/0 0/0 .text hang_end_check__FP12npc_ks_class */
-static void hang_end_check(npc_ks_class* param_0) {
+static void hang_end_check(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ cXyz sp30, sp3c;
+ if (i_this->mRoomMonkeyID > 3 || !dComIfGs_isStageMiddleBoss()) {
+ if ((fopAcM_GetRoomNo(a_this) == 4 && player->current.pos.z < 2500.0f) || checkDoorDemo()) {
+ i_this->mActionID = 100;
+ i_this->mMode = 0;
+ i_this->field_0x904 = 0;
+ i_this->field_0xaec = 1;
+ a_this->current.angle.x = 0;
+ if (fopAcM_CheckCondition(a_this, 4) != 0) {
+ camera_class* camera = dComIfGp_getCamera(0);
+ if (checkDoorDemo()) {
+ cMtx_YrotS(*calc_mtx, player->shape_angle.y + 0x8000);
+ } else {
+ sp30.x = camera->lookat.eye.x - camera->lookat.center.x;
+ sp30.z = camera->lookat.eye.z - camera->lookat.center.z;
+ cMtx_YrotS(*calc_mtx, cM_atan2s(sp30.x, sp30.z));
+ }
+
+ if ((i_this->field_0x5b6 & 1) != 0) {
+ sp30.x = 100.0f;
+ } else {
+ sp30.x = -100.0f;
+ }
+ sp30.y = -50.0f;
+ sp30.z = 100.0f;
+ MtxPosition(&sp30, &sp3c);
+ a_this->current.pos = camera->lookat.eye + sp3c;
+ a_this->old = a_this->current;
+ }
+ }
+ }
}
-/* ############################################################################################## */
-/* 80A5E000-80A5E004 000104 0004+00 0/1 0/0 0/0 .rodata @6221 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6221 = 2800.0f;
-COMPILER_STRIP_GATE(0x80A5E000, &lit_6221);
-#pragma pop
+/* 80A4E000-80A4E800 005160 0800+00 2/1 0/0 0/0 .text npc_ks_hang__FP12npc_ks_class */
+static void npc_ks_hang(npc_ks_class* i_this) {
+ // NONMATCHING
+ static s16 start_pya;
-/* 80A5E004-80A5E008 000108 0004+00 0/4 0/0 0/0 .rodata @6222 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6222 = 550.0f;
-COMPILER_STRIP_GATE(0x80A5E004, &lit_6222);
-#pragma pop
+ fopAc_ac_c* a_this = &i_this->actor;
+ if (leader == NULL) {
+ return;
+ }
-/* 80A5E008-80A5E00C 00010C 0004+00 0/4 0/0 0/0 .rodata @6223 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6223 = 3.0f / 10.0f;
-COMPILER_STRIP_GATE(0x80A5E008, &lit_6223);
-#pragma pop
+ daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
-/* 80A5E00C-80A5E010 000110 0004+00 0/11 0/0 0/0 .rodata @6224 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6224 = 150.0f;
-COMPILER_STRIP_GATE(0x80A5E00C, &lit_6224);
-#pragma pop
+ if (fopAcM_GetRoomNo(a_this) == 4) {
+ for (int i = 0; i < 4; i++) {
+ if (saru_p[i] == NULL) {
+ return;
+ }
+ }
-/* 80A5E010-80A5E014 000114 0004+00 0/3 0/0 0/0 .rodata @6225 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6225 = -150.0f;
-COMPILER_STRIP_GATE(0x80A5E010, &lit_6225);
-#pragma pop
+ if (player->current.pos.y < 2800.0f) {
+ cDmr_SkipInfo = 4;
+ }
+ }
-/* 80A5E014-80A5E018 000118 0004+00 0/3 0/0 0/0 .rodata @6226 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6226 = -400.0f;
-COMPILER_STRIP_GATE(0x80A5E014, &lit_6226);
-#pragma pop
+ obj_sw_class* sw_p = (obj_sw_class*)fopAcM_SearchByID(a_this->parentActorID);
+ if (sw_p == NULL) {
+ sw_p = (obj_sw_class*)fpcM_Search(s_sw_sub, i_this);
+ if (sw_p == NULL) {
+ return;
+ }
-/* 80A5E018-80A5E01C 00011C 0004+00 0/2 0/0 0/0 .rodata @6227 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6227 = 3.0f / 40.0f;
-COMPILER_STRIP_GATE(0x80A5E018, &lit_6227);
-#pragma pop
+ a_this->parentActorID = fopAcM_GetID(sw_p);
+ i_this->field_0x934 = sw_p;
+ i_this->field_0x630 = (i_this->field_0x5b6 + 1) * (i_this->field_0x934->field_0xd8c / (i_this->field_0x934->field_0x91c + 1)) - 1;
+ }
+ sw_p->field_0x900 += 5.0f;
-/* 80A5E01C-80A5E020 000120 0004+00 0/3 0/0 0/0 .rodata @6228 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6228 = 8000.0f;
-COMPILER_STRIP_GATE(0x80A5E01C, &lit_6228);
-#pragma pop
+ cXyz sp2c, sp38;
+ int iVar1 = 0;
-/* 80A5FF44-80A5FF48 000104 0002+02 0/1 0/0 0/0 .bss start_pya$6091 */
-#pragma push
-#pragma force_active on
-static u8 start_pya[2 + 2 /* padding */];
-#pragma pop
+ cLib_addCalcAngleS2(&a_this->current.angle.y, a_this->home.angle.y + 0x4000, 2, 0x800);
+ if (!daPy_getPlayerActorClass()->checkAutoJumpStart()) {
+ start_pya = i_this->field_0x5c8;
+ }
-/* 80A4E000-80A4E800 005160 0800+00 2/1 0/0 0/0 .text npc_ks_hang__FP12npc_ks_class */
-static void npc_ks_hang(npc_ks_class* param_0) {
- // NONMATCHING
+ s16 sVar1;
+ switch (i_this->mMode) {
+ case 0:
+ i_this->mTimers[0] = 0;
+ i_this->mMode++;
+ i_this->field_0x604 = 0;
+ // fallthrough
+ case 1:
+ if (i_this->field_0x5b6 == 0 && leader->field_0xb42 == 0) {
+ order_set(sw_p->field_0x91c);
+ }
+
+ if (i_this->field_0x5b8 == 0 && i_this->field_0x5d0 != 16 && i_this->field_0x5c4 < 550.0f) {
+ anm_init(i_this, 16, 5.0f, 2, 1.0f);
+ i_this->mTimers[0] = cM_rndF(50.0f) + 200.0f;
+ }
+
+ if (i_this->mTimers[0] == 0) {
+ i_this->mTimers[0] = cM_rndF(30.0f) + 50.0f;
+ if (cM_rndF(1.0f) < 0.3f) {
+ anm_init(i_this, 17, 5.0f, 2, 1.0f);
+ } else if (cM_rndF(1.0f) < 0.3f) {
+ anm_init(i_this, 18, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 19, 5.0f, 2, 1.0f);
+ }
+ }
+
+ leader->field_0x92c = 0;
+ if (i_this->field_0x5b8 == 0 && !dComIfGp_event_runCheck() && i_this->field_0x94e == 0 && i_this->field_0x5c4 < 150.0f) {
+ leader->field_0xb42 = 1;
+ i_this->field_0x620 = 1;
+ i_this->field_0x610 = 0;
+ obj_pos = player->current.pos;
+ cMtx_YrotS(*calc_mtx, a_this->home.angle.y);
+ sp2c.x = 0.0f;
+ sp2c.y = -150.0f;
+ sp2c.z = -400.0f;
+ MtxPosition(&sp2c, &obj_pos);
+ obj_pos += a_this->current.pos;
+ i_this->field_0x624 = obj_pos - i_this->field_0x614;
+ i_this->field_0x624 *= 0.075f;
+ i_this->mMode = 4;
+ i_this->mTimers[0] = 17;
+ i_this->mTimers[1] = 25;
+ i_this->field_0x5fa = 0x4000;
+ i_this->field_0x60c = 8000.0f;
+ i_this->field_0x604 = 0;
+ anm_init(i_this, 24, 3.0f, 2, 1.0f);
+ }
+
+ sVar1 = start_pya - sw_p->actor.current.angle.y;
+ if (sVar1 < 0x4000 && sVar1 > -0x4000) {
+ a_this->home.angle.y = sVar1 + 0x8000;
+ } else {
+ a_this->home.angle.y = sVar1;
+ }
+ break;
+
+ case 2:
+ i_this->mMode++;
+ i_this->mTimers[0] = 10;
+ // fallthrough
+ case 3:
+ i_this->field_0x5fa = 0x4000;
+ i_this->field_0x60c = 8000.0f;
+ if (i_this->mTimers[0] == 8) {
+ fpcM_Search(s_next_get_sub, i_this);
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_THROW, -1);
+ }
+
+ if (i_this->mTimers[0] == 2) {
+ i_this->mTimers[2] = 15;
+ }
+
+ if (i_this->mTimers[0] == 0) {
+ i_this->mMode++;
+ i_this->mTimers[0] = 10;
+ i_this->mTimers[1] = 18;
+ }
+ break;
+
+ case 4:
+ if (i_this->mTimers[0] > 8) {
+ i_this->field_0x5fa = 0x4000;
+ i_this->field_0x60c = 8000.0f;
+ }
+
+ if (i_this->mTimers[0] == 8) {
+ anm_init(i_this, 48, 2.0f, 2, 1.0f);
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_CATCH, -1);
+ i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1);
+ sw_p->field_0x8fc = 20.0f;
+ // sw_p->field_0xd10[i_this->field_0x630] = 10;
+ }
+
+ if (mDoCPd_c::getTrigA(0) != 0) {
+ if (i_this->mTimers[1] <= 9 && i_this->field_0x604 < 0 && i_this->field_0x602 < 0) {
+ leader->field_0x92c = 1;
+ fpcM_Search(s_next_do_sub, i_this);
+ if (i_this->field_0x5b8 == sw_p->field_0x91c -1) {
+ i_this->mMode = 5;
+ } else {
+ i_this->mMode = 10;
+ anm_init(i_this, 24, 1.0f, 2, 1.0f);
+ }
+ } else {
+ leader->field_0xb42 = 100;
+ i_this->field_0x620 = 0;
+ iVar1 = 1;
+ i_this->field_0x94e = 20;
+ }
+ }
+ break;
+
+ case 5:
+ if (i_this->field_0x602 >= 0 || i_this->field_0x604 >= 0) break;
+
+ i_this->field_0x620 = 0;
+ i_this->mTimers[0] = 15;
+ i_this->mMode = 6;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_THROW, -1);
+ player->changeDemoMode(24, 0, 0, 0);
+ anm_init(i_this, 24, 1.0f, 2, 1.0f);
+ // fallthrough
+ case 6:
+ if (i_this->mTimers[0] == 8) {
+ leader->field_0xb42 = 3;
+ leader->field_0xb44 = 0;
+ }
+
+ if (i_this->mTimers[0] == 1) {
+ iVar1 = 1;
+ }
+ }
+
+ a_this->current.pos = sw_p->field_0x920[i_this->field_0x630];
+ s16 sVar2 = i_this->field_0x602;
+ cLib_addCalcAngleS2(&i_this->field_0x602, i_this->field_0x60c * cM_ssin(i_this->field_0x5fa), 4, 0x1000);
+ i_this->field_0x604 = i_this->field_0x602 - sVar2;
+ i_this->field_0x5fa += 0x800;
+ a_this->current.angle.z = -(i_this->field_0x602 / 2);
+
+ if (i_this->mMode != 4) {
+ cLib_addCalc0(&i_this->field_0x60c, 0.5f, 100.0f);
+ }
+
+ hang_end_check(i_this);
+ if (iVar1 != 0) {
+ i_this->field_0x620 = 0;
+ i_this->mMode = 0;
+ all_carry_finish(sw_p->field_0x91c);
+ }
}
/* 80A4E800-80A4EE18 005960 0618+00 1/1 0/0 0/0 .text npc_ks_hang_s__FP12npc_ks_class */
-static void npc_ks_hang_s(npc_ks_class* param_0) {
+static void npc_ks_hang_s(npc_ks_class* i_this) {
// NONMATCHING
-}
+ fopAc_ac_c* a_this = &i_this->actor;
+ obj_sw_class* sw_p = (obj_sw_class*)fopAcM_SearchByID(a_this->parentActorID);
+ if (sw_p == NULL) {
+ sw_p = (obj_sw_class*)fpcM_Search(s_sw_sub, i_this);
+ if (sw_p == NULL) {
+ return;
+ }
+
+ a_this->parentActorID = fopAcM_GetID(sw_p);
+ i_this->field_0x934 = sw_p;
+ }
-/* ############################################################################################## */
-/* 80A5E020-80A5E024 000124 0004+00 0/1 0/0 0/0 .rodata @6371 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6371 = 4000.0f;
-COMPILER_STRIP_GATE(0x80A5E020, &lit_6371);
-#pragma pop
+ daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
+ sw_p->field_0x900 += 5.0f;
+ cXyz sp34, sp40;
+ cLib_addCalcAngleS2(&a_this->current.angle.y, a_this->home.angle.y + 0x4000, 2, 0x800);
+
+ s16 sVar1;
+ switch (i_this->mMode) {
+ case 0:
+ i_this->mMode++;
+ i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1);
+ sw_p->field_0x8fc = 20.0f;
+ // sw_p->field_0xd10[i_this->field_0x630] = 10;
+ i_this->field_0x92c = 0;
+ break;
+
+ case 1:
+ if (i_this->field_0x5d0 != 16 && i_this->field_0x5c4 < 550.0f) {
+ anm_init(i_this, 16, 5.0f, 2, 1.0f);
+ i_this->mTimers[0] = cM_rndF(50.0f) + 200.0f;
+ }
+
+ if (i_this->mTimers[0] == 0) {
+ i_this->mTimers[0] = cM_rndF(30.0f) + 50.0f;
+ if (cM_rndF(1.0f) < 0.3f) {
+ anm_init(i_this, 17, 5.0f, 2, 1.0f);
+ } else if (cM_rndF(1.0f) < 0.3f) {
+ anm_init(i_this, 18, 5.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 19, 5.0f, 2, 1.0f);
+ }
+ }
+
+ if (i_this->field_0x94e == 0 && !dComIfGp_event_runCheck() && i_this->field_0x5c4 < 300.0f) {
+ leader->field_0xb42 = 1;
+ i_this->field_0x620 = 1;
+ i_this->field_0x610 = 0;
+ cMtx_YrotS(*calc_mtx, a_this->home.angle.y);
+ sp34.x = 0.0f;
+ sp34.y = -150.0f;
+ sp34.z = -400.0f;
+ MtxPosition(&sp34, &obj_pos);
+ obj_pos += a_this->current.pos;
+ i_this->field_0x624 = obj_pos - i_this->field_0x614;
+ i_this->field_0x624 *= 0.075f;
+
+ i_this->mMode = 2;
+ i_this->mTimers[0] = 17;
+ i_this->mTimers[1] = 25;
+ i_this->field_0x5fa = 0x4000;
+ i_this->field_0x60c = 8000.0f;
+ anm_init(i_this, 24, 3.0f, 2, 1.0f);
+ }
+
+ sVar1 = i_this->field_0x5c8 - sw_p->actor.current.angle.y;
+ if (sVar1 < 0x4000 && sVar1 > -0x4000) {
+ a_this->home.angle.y = sVar1 + 0x8000;
+ } else {
+ a_this->home.angle.y = sVar1;
+ }
+ break;
+
+ case 2:
+ if (i_this->mTimers[0] > 8) {
+ i_this->field_0x5fa = 0x4000;
+ i_this->field_0x60c = 8000.0f;
+ }
+
+ if (i_this->mTimers[0] == 8) {
+ anm_init(i_this, 48, 2.0f, 2, 1.0f);
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_CATCH, -1);
+ i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1);
+ sw_p->field_0x8fc = 20.0f;
+ // sw_p->field_0xd10[i_this->field_0x630] = 10;
+ }
+
+ if (mDoCPd_c::getTrigA(0) != 0) {
+ if (i_this->field_0x604 < 0 && i_this->field_0x602 < 0) {
+ i_this->field_0x92c = 1;
+ i_this->field_0x620 = 0;
+ i_this->mTimers[0] = 15;
+ i_this->mMode = 5;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_THROW, -1);
+ player->changeDemoMode(24, 0, 0, 0);
+ anm_init(i_this, 24, 1.0f, 2, 1.0f);
+ leader->field_0xb42 = 3;
+ } else {
+ leader->field_0xb42 = 100;
+ i_this->field_0x620 = 0;
+ i_this->mTimers[0] = 15;
+ i_this->mMode = 5;
+ i_this->field_0x94e = 20;
+ }
+ }
+ break;
+
+ case 5:
+ if (i_this->mTimers[0] == 1) {
+ leader->field_0xb42 = 100;
+ i_this->field_0x620 = 0;
+ i_this->mMode = 0;
+ }
+ }
-/* 80A5E024-80A5E028 000128 0004+00 0/1 0/0 0/0 .rodata @6372 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6372 = 7.0f;
-COMPILER_STRIP_GATE(0x80A5E024, &lit_6372);
-#pragma pop
+ a_this->current.pos = sw_p->field_0x920[i_this->field_0x630];
+ s16 sVar2 = i_this->field_0x602;
+ cLib_addCalcAngleS2(&i_this->field_0x602, i_this->field_0x60c * cM_ssin(i_this->field_0x5fa), 4, 0x1000);
+ i_this->field_0x604 = i_this->field_0x602 - sVar2;
+ i_this->field_0x5fa += 0x800;
+ a_this->current.angle.z = -(i_this->field_0x602 / 2);
+
+ if (i_this->field_0x620 != 2) {
+ cLib_addCalc0(&i_this->field_0x60c, 0.5f, 100.0f);
+ }
+
+ hang_end_check(i_this);
+}
/* 80A4EE18-80A4F170 005F78 0358+00 1/1 0/0 0/0 .text npc_ks_e_hang__FP12npc_ks_class */
-static void npc_ks_e_hang(npc_ks_class* param_0) {
+static void npc_ks_e_hang(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ obj_so_class* cage_p = (obj_so_class*)fopAcM_SearchByID(a_this->parentActorID);
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+
+ cage_p->field_0x900 += 5.0f;
+ cLib_addCalcAngleS2(&a_this->current.angle.y, a_this->home.angle.y + 0x4000, 2, 0x800);
+
+ switch (i_this->mMode) {
+ case 0:
+ i_this->mMode = 20;
+ i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1);
+ cage_p->field_0x8fc = 20.0f;
+ // cage_p->field_0xd10[i_this->field_0x630] = 10;
+ a_this->home.angle.y = cage_p->current.angle.y;
+ i_this->field_0x5fa = -0x4000;
+ i_this->field_0x60c = 4000.0f;
+
+ if (i_this->field_0x5b6 == 0) {
+ anm_init(i_this, 24, 2.0f, 2, 1.0f);
+ i_this->mTimers[0] = 10000;
+ i_this->mTimers[1] = 15;
+ }
+ break;
+
+ case 2:
+ anm_init(i_this, 48, 2.0f, 2, 1.0f);
+ i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1);
+ cage_p->field_0x8fc = 20.0f;
+ // cage_p->field_0xd10[i_this->field_0x630] = 10;
+ i_this->field_0x5fa = -0x8000;
+ i_this->field_0x60c = 8000.0f;
+ i_this->mMode++;
+ break;
+
+ case 3:
+ if (i_this->field_0x5fa == -0x3800) {
+ a_this->health = 10;
+ i_this->mMode = 20;
+ i_this->mTimers[0] = 0;
+ }
+ break;
+
+ case 20:
+ if (i_this->mTimers[0] == 0) {
+ if (cM_rndF(1.0f) < 0.3f) {
+ anm_init(i_this, 17, 10.0f, 2, 1.0f);
+ } else if (cM_rndF(1.0f) < 0.3f) {
+ anm_init(i_this, 18, 10.0f, 2, 1.0f);
+ } else {
+ anm_init(i_this, 19, 10.0f, 2, 1.0f);
+ }
+
+ i_this->mTimers[0] = 10000;
+ i_this->mTimers[1] = 35;
+ }
+
+ if (i_this->mTimers[1] == 1) {
+ anm_init(i_this, 24, 7.0f, 2, 1.0f);
+ } else if (i_this->mTimers[1] == 0) {
+ i_this->field_0x5fa = 0x4000;
+ i_this->field_0x60c = 8000.0f;
+ }
+ }
+
+ a_this->current.pos = cage_p->field_0x920[i_this->field_0x630];
+ cLib_addCalcAngleS2(&i_this->field_0x602, i_this->field_0x60c * cM_ssin(i_this->field_0x5fa), 4, 0x1000);
+ i_this->field_0x5fa += 0x800;
+ a_this->current.angle.z = -(i_this->field_0x602 / 2);
+ cLib_addCalc0(&i_this->field_0x60c, 0.5f, 100.0f);
}
/* 80A4F170-80A4F1D8 0062D0 0068+00 1/1 0/0 0/0 .text all_move_check__Fii */
-static void all_move_check(int param_0, int param_1) {
- // NONMATCHING
-}
+static int all_move_check(int param_1, int param_2) {
+ int iVar1 = 0;
+ while (param_2 > iVar1) {
+ if (saru_p[iVar1] == NULL) return 0;
-/* 80A4F1D8-80A4F228 006338 0050+00 1/1 0/0 0/0 .text go_jump_check__Fi */
-static void go_jump_check(int param_0) {
- // NONMATCHING
+ if (param_1 != saru_p[iVar1]->field_0x5b6 && (saru_p[iVar1]->mActionID != 21 || saru_p[iVar1]->mMode != 20)) {
+ return 0;
+ }
+
+ iVar1++;
+ }
+
+ return 1;
}
-/* ############################################################################################## */
-/* 80A5E028-80A5E02C 00012C 0004+00 0/1 0/0 0/0 .rodata @6629 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6629 = 180.0f;
-COMPILER_STRIP_GATE(0x80A5E028, &lit_6629);
-#pragma pop
+/* 80A4F1D8-80A4F228 006338 0050+00 1/1 0/0 0/0 .text go_jump_check__Fi */
+static int go_jump_check(int param_1) {
+ // FAKEMATCH???
+ param_1--;
+ while (param_1 >= 0) {
+ if (saru_p[param_1]->mActionID != 21 || saru_p[param_1]->mTimers[2] != 0) {
+ return 0;
+ }
+
+ param_1--;
+ }
-/* 80A5E02C-80A5E030 000130 0004+00 0/1 0/0 0/0 .rodata @6630 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6630 = -180.0f;
-COMPILER_STRIP_GATE(0x80A5E02C, &lit_6630);
-#pragma pop
+ return 1;
+}
/* 80A4F228-80A4FD7C 006388 0B54+00 2/1 0/0 0/0 .text npc_ks_e_jump__FP12npc_ks_class */
-static void npc_ks_e_jump(npc_ks_class* param_0) {
+static int npc_ks_e_jump(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ cXyz sp28;
+ obj_sw_class* sw_p2 = i_this->field_0x934;
+ npc_ks_class* ks_p = (npc_ks_class*)i_this->field_0x930;
+ int rv = 2;
+ switch(i_this->mMode) {
+ case 0:
+ i_this->field_0xaec = 1;
+ if (i_this->field_0x5c4 > l_HIO.field_0xc) {
+ anm_init(i_this, 28, 5.0f, 2, 1.0f);
+ i_this->mMode = 1;
+ i_this->mTimers[0] = 20;
+ } else {
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ i_this->mMode = 5;
+ a_this->speedF = 0.0f;
+ }
+
+ if (fopAcM_GetRoomNo(a_this) == 4) {
+ a_this->current.pos.y = 3300.0f;
+ if (a_this->current.pos.x > 180.0f) {
+ a_this->current.pos.x = 180.0f;
+ } else if (a_this->current.pos.x < -180.0f) {
+ a_this->current.pos.x = -180.0f;
+ }
+ }
+ break;
+
+ case 1:
+ a_this->speedF = l_HIO.field_0x14;
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x5c8, 1, 0x2000);
+ rv = 1;
+ if (i_this->mTimers[0] == 0 || i_this->field_0x5c4 < l_HIO.field_0xc - 20.0f) {
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ i_this->mMode = 5;
+ a_this->speedF = 0.0f;
+ }
+ break;
+
+ case 5:
+ i_this->field_0x5fd = 1;
+ sp28 = ks_p->field_0x614 - a_this->current.pos;
+ i_this->field_0x8fc.y = cM_atan2s(sp28.x, sp28.z);
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x2000);
+
+ if (go_jump_check(i_this->field_0x5b6) != 0) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mTimers[0] = 10;
+ i_this->mMode = 6;
+ i_this->field_0xaec = 0;
+ }
+ break;
+
+ case 6:
+ i_this->field_0x5fd = 1;
+ a_this->speedF = 20.0f;
+ rv = 1;
+ if (i_this->mTimers[0] == 0) {
+ anm_init(i_this, 32, 2.0f, 0, 1.0f);
+ i_this->mMode = 7;
+ }
+ break;
+
+ case 7:
+ // bVar1 = true;
+ i_this->field_0x5fd = 1;
+ if (i_this->field_0x5d0 == 32) {
+ a_this->speedF = 0.0f;
+ if (i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 33, 1.0f, 0, 1.0f);
+ a_this->speedF = 40.0f;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+
+ i_this->field_0x910 = a_this->current.pos;
+ i_this->field_0xbe0 = 1;
+ }
+ }
+
+ i_this->field_0x8f0 = ks_p->field_0x614;
+ i_this->field_0x91c = i_this->field_0x8f0;
+ sp28 = i_this->field_0x8f0 - a_this->current.pos;
+ i_this->field_0x8fc.y = cM_atan2s(sp28.x, sp28.z);
+ i_this->field_0x8fc.x = -cM_atan2s(sp28.y, JMAFastSqrt(sp28.x * sp28.x + sp28.z * sp28.z));
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x2000);
+
+ if (a_this->speedF >= 40.0f) {
+ i_this->field_0x90c = 1;
+ cLib_addCalc2(&i_this->field_0x928, -183.0f, 1.0f, 15.0f);
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0x1800, 4, 0x1800);
+ }
+
+ if (sp28.abs() <= a_this->speedF * 1.2f) {
+ a_this->speedF = 0.0f;
+ i_this->mMode = 10;
+ anm_init(i_this, 48, 2.0f, 2, 1.0f);
+ ks_p->mMode = 2;
+ }
+ break;
+
+ case 10:
+ a_this->home.angle.y = sw_p2->actor.current.angle.y;
+ a_this->current.angle.y = a_this->home.angle.y;
+ a_this->current.pos = ks_p->field_0x614;
+ a_this->current.angle.x = (s16)((int)ks_p->field_0x602 << 1);
+ if (ks_p->actor.health != 10) break;
+ ks_p->actor.health = 0;
+ i_this->field_0x910 = a_this->current.pos;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_THROW, -1);
+
+ if (fopAcM_GetRoomNo(a_this) == 2) {
+ a_this->speedF = 25.0f;
+ } else {
+ a_this->speedF = 40.0f;
+ }
+
+ if (ks_p->field_0x5b6 == i_this->field_0x5b6 - 1) {
+ i_this->mMode = 11;
+ } else {
+ i_this->mMode = 20;
+ i_this->field_0x930 = saru_p[ks_p->field_0x5b6 + 1];
+ }
+
+ anm_init(i_this, 33, 1.0f, 0, 1.0f);
+ i_this->field_0xbe0 = 1;
+ // fallthrough
+ case 11:
+ i_this->field_0x90c = 1;
+ i_this->field_0x630 = (i_this->field_0x5b6 + 1) * (sw_p2->field_0xd8c / (sw_p2->field_0x91c + 1)) - 1;
+ i_this->field_0x8f0 = sw_p2->field_0x920[i_this->field_0x630];
+
+ a_this->parentActorID = fopAcM_GetID(sw_p2);
+ i_this->field_0x91c = i_this->field_0x8f0;
+ sp28 = i_this->field_0x8f0 - a_this->current.pos;
+ i_this->field_0x8fc.y = cM_atan2s(sp28.x, sp28.z);
+ i_this->field_0x8fc.x = -cM_atan2s(sp28.y, JMAFastSqrt(sp28.x * sp28.x + sp28.z * sp28.z));
+
+ if (sp28.abs() <= a_this->speedF * 1.2f) {
+ a_this->speedF = 0.0f;
+ i_this->mMode = 12;
+ anm_init(i_this, 24, 2.0f, 2, 1.0f);
+ i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1);
+ sw_p2->field_0x8fc = 20.0f;
+ // sw_p2->field_0xd10[i_this->field_0x630] = 10;
+ }
+ // fallthrough
+ case 12:
+ cLib_addCalc0(&i_this->field_0x928, 1.0f, 15.0f);
+ cLib_addCalcAngleS2(&a_this->current.angle.x, -0x8000, 1, 0x700);
+ if (i_this->mMode == 12 && i_this->field_0x928 == 0.0f) {
+ if (all_move_check(i_this->field_0x5b6, sw_p2->field_0x91c) != 0) {
+ all_carry_finish(sw_p2->field_0x91c);
+ } else {
+ i_this->mActionID = 21;
+ i_this->mMode = 0;
+ i_this->mTimers[2] = 15;
+ }
+ }
+ break;
+
+ case 20:
+ i_this->field_0x90c = 1;
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0x1800, 4, 0x1800);
+ i_this->field_0x8f0 = ks_p->field_0x614;
+ i_this->field_0x91c = i_this->field_0x8f0;
+ sp28 = i_this->field_0x8f0 - a_this->current.pos;
+ i_this->field_0x8fc.y = cM_atan2s(sp28.x, sp28.z);
+ i_this->field_0x8fc.x = -cM_atan2s(sp28.y, JMAFastSqrt(sp28.x * sp28.x + sp28.z * sp28.z));
+
+ if (sp28.abs() <= a_this->speedF * 1.2f) {
+ a_this->speedF = 0.0f;
+ i_this->mMode = 10;
+ anm_init(i_this, 48, 2.0f, 2, 1.0f);
+ ks_p->mMode = 2;
+ }
+ }
+
+ if (i_this->mMode != 11 && i_this->mMode != 12) {
+ i_this->field_0x608 = (s16)((int)a_this->current.angle.x << 1);
+ }
+
+ return rv;
}
/* 80A4FD7C-80A4FE4C 006EDC 00D0+00 1/1 0/0 0/0 .text get_move_saru__FP12npc_ks_classi */
-static void get_move_saru(npc_ks_class* param_0, int param_1) {
- // NONMATCHING
+static npc_ks_class* get_move_saru(npc_ks_class* i_this, int param_2) {
+ fopAc_ac_c* a_this = &i_this->actor;
+ if (fopAcM_GetRoomNo(a_this) == 0) {
+ for (int i = 0; i < 2; i++) {
+ if (saru_p[i] != NULL && (saru_p[i]->mActionID == 20 || saru_p[i]->mActionID == 22) && i_this->field_0xb40 == saru_p[i]->field_0x934->field_0x570) {
+ return saru_p[i];
+ }
+ }
+ } else {
+ for (int i = 0; i < param_2; i++) {
+ if (i_this->field_0xb40 == saru_p[i]->field_0x934->field_0x570 && ((saru_p[i]->mActionID == 20 || saru_p[i]->mActionID == 22) || saru_p[i]->mTimers[2] != 0)) {
+ return saru_p[i];
+ }
+ }
+ }
+
+ return NULL;
}
-/* 80A4FE4C-80A4FEF0 006FAC 00A4+00 1/1 0/0 0/0 .text all_hang_check__FP12npc_ks_classi
- */
-static void all_hang_check(npc_ks_class* param_0, int param_1) {
- // NONMATCHING
+/* 80A4FE4C-80A4FEF0 006FAC 00A4+00 1/1 0/0 0/0 .text all_hang_check__FP12npc_ks_classi */
+static int all_hang_check(npc_ks_class* i_this, int param_2) {
+ fopAc_ac_c* a_this = &i_this->actor;
+ if (fopAcM_GetRoomNo(a_this) == 0) {
+ for (int i = 0; i < 2; i++) {
+ if (saru_p[i] != NULL && saru_p[i]->field_0x5b5 != 0 && i_this->field_0xb40 == saru_p[i]->field_0x934->field_0x570) {
+ return 1;
+ }
+ }
+
+ return 0;
+ }
+
+ for (int i = 0; i < param_2; i++) {
+ if (saru_p[i]->field_0x5b5 == 0) {
+ return 0;
+ }
+ }
+
+ return 1;
}
/* 80A4FEF0-80A4FFD4 007050 00E4+00 1/1 0/0 0/0 .text cam_3d_morf__FP12npc_ks_classf */
-static void cam_3d_morf(npc_ks_class* param_0, f32 param_1) {
- // NONMATCHING
+static void cam_3d_morf(npc_ks_class* i_this, f32 param_2) {
+ cLib_addCalc2(&i_this->field_0xb60.x, i_this->field_0xb6c.x, param_2, i_this->field_0xb84.x * i_this->field_0xbc4);
+ cLib_addCalc2(&i_this->field_0xb60.y, i_this->field_0xb6c.y, param_2, i_this->field_0xb84.y * i_this->field_0xbc4);
+ cLib_addCalc2(&i_this->field_0xb60.z, i_this->field_0xb6c.z, param_2, i_this->field_0xb84.z * i_this->field_0xbc4);
+ cLib_addCalc2(&i_this->field_0xb48.x, i_this->field_0xb54.x, param_2, i_this->field_0xb78.x * i_this->field_0xbc4);
+ cLib_addCalc2(&i_this->field_0xb48.y, i_this->field_0xb54.y, param_2, i_this->field_0xb78.y * i_this->field_0xbc4);
+ cLib_addCalc2(&i_this->field_0xb48.z, i_this->field_0xb54.z, param_2, i_this->field_0xb78.z * i_this->field_0xbc4);
}
/* 80A4FFD4-80A50028 007134 0054+00 1/1 0/0 0/0 .text s_fs_sub__FPvPv */
-static void s_fs_sub(void* param_0, void* param_1) {
- // NONMATCHING
+static void* s_fs_sub(void* i_actor, void* i_data) {
+ if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_FS) {
+ ((e_fs_class*)i_actor)->mAction = 10;
+ ((e_fs_class*)i_actor)->mMode = 0;
+ }
+ return NULL;
}
/* 80A50028-80A50094 007188 006C+00 1/1 0/0 0/0 .text s_fsdown_sub__FPvPv */
-static void s_fsdown_sub(void* param_0, void* param_1) {
- // NONMATCHING
+static void* s_fsdown_sub(void* i_actor, void* i_data) {
+ // FAKEMATCH???
+ if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_FS) {
+ ((e_fs_class*)i_actor)->mTimer[0] = (fopAcM_GetID(i_actor) << 3) & 24;
+ ((e_fs_class*)i_actor)->mMode++;
+ }
+ return NULL;
}
-/* ############################################################################################## */
-/* 80A5E030-80A5E034 000134 0004+00 0/0 0/0 0/0 .rodata @6631 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6631 = -183.0f;
-COMPILER_STRIP_GATE(0x80A5E030, &lit_6631);
-#pragma pop
-
-/* 80A5E034-80A5E038 000138 0004+00 0/2 0/0 0/0 .rodata @6632 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_6632 = 15.0f;
-COMPILER_STRIP_GATE(0x80A5E034, &lit_6632);
-#pragma pop
-
-/* 80A5E038-80A5E03C 00013C 0004+00 0/7 0/0 0/0 .rodata @7089 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7089 = 500.0f;
-COMPILER_STRIP_GATE(0x80A5E038, &lit_7089);
-#pragma pop
-
-/* 80A5E03C-80A5E040 000140 0004+00 0/2 0/0 0/0 .rodata @7090 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7090 = 1.0f / 5.0f;
-COMPILER_STRIP_GATE(0x80A5E03C, &lit_7090);
-#pragma pop
-
-/* 80A5E040-80A5E044 000144 0004+00 0/1 0/0 0/0 .rodata @7091 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7091 = 250.0f;
-COMPILER_STRIP_GATE(0x80A5E040, &lit_7091);
-#pragma pop
-
-/* 80A5E044-80A5E048 000148 0004+00 0/1 0/0 0/0 .rodata @7092 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7092 = 2.0f / 5.0f;
-COMPILER_STRIP_GATE(0x80A5E044, &lit_7092);
-#pragma pop
-
-/* 80A5E048-80A5E04C 00014C 0004+00 0/1 0/0 0/0 .rodata @7093 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u32 const lit_7093 = 0x3BA3D70A;
-COMPILER_STRIP_GATE(0x80A5E048, &lit_7093);
-#pragma pop
-
-/* 80A5E04C-80A5E050 000150 0004+00 0/1 0/0 0/0 .rodata @7094 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7094 = -250.0f;
-COMPILER_STRIP_GATE(0x80A5E04C, &lit_7094);
-#pragma pop
-
-/* 80A5E050-80A5E054 000154 0004+00 0/3 0/0 0/0 .rodata @7095 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7095 = 10000.0f;
-COMPILER_STRIP_GATE(0x80A5E050, &lit_7095);
-#pragma pop
-
-/* 80A5E054-80A5E058 000158 0004+00 0/1 0/0 0/0 .rodata @7096 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7096 = 3150.0f;
-COMPILER_STRIP_GATE(0x80A5E054, &lit_7096);
-#pragma pop
-
-/* 80A5E058-80A5E05C 00015C 0004+00 0/1 0/0 0/0 .rodata @7097 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7097 = 65.0f;
-COMPILER_STRIP_GATE(0x80A5E058, &lit_7097);
-#pragma pop
-
-/* 80A5E05C-80A5E060 000160 0004+00 0/1 0/0 0/0 .rodata @7098 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7098 = -4786.0f;
-COMPILER_STRIP_GATE(0x80A5E05C, &lit_7098);
-#pragma pop
-
-/* 80A5E060-80A5E064 000164 0004+00 0/1 0/0 0/0 .rodata @7099 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7099 = 3982.0f;
-COMPILER_STRIP_GATE(0x80A5E060, &lit_7099);
-#pragma pop
-
-/* 80A5E064-80A5E068 000168 0004+00 0/1 0/0 0/0 .rodata @7100 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7100 = -1843.0f;
-COMPILER_STRIP_GATE(0x80A5E064, &lit_7100);
-#pragma pop
-
-/* 80A5E068-80A5E06C 00016C 0004+00 0/1 0/0 0/0 .rodata @7101 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7101 = -3232.0f;
-COMPILER_STRIP_GATE(0x80A5E068, &lit_7101);
-#pragma pop
-
-/* 80A5E06C-80A5E070 000170 0004+00 0/1 0/0 0/0 .rodata @7102 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7102 = 4137.0f;
-COMPILER_STRIP_GATE(0x80A5E06C, &lit_7102);
-#pragma pop
-
-/* 80A5E070-80A5E074 000174 0004+00 0/1 0/0 0/0 .rodata @7103 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7103 = -1425.0f;
-COMPILER_STRIP_GATE(0x80A5E070, &lit_7103);
-#pragma pop
-
-/* 80A5E074-80A5E078 000178 0004+00 0/1 0/0 0/0 .rodata @7104 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7104 = -2459.0f;
-COMPILER_STRIP_GATE(0x80A5E074, &lit_7104);
-#pragma pop
-
-/* 80A5E078-80A5E07C 00017C 0004+00 0/1 0/0 0/0 .rodata @7105 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7105 = 4199.0f;
-COMPILER_STRIP_GATE(0x80A5E078, &lit_7105);
-#pragma pop
-
-/* 80A5E07C-80A5E080 000180 0004+00 0/1 0/0 0/0 .rodata @7106 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7106 = -2752.0f;
-COMPILER_STRIP_GATE(0x80A5E07C, &lit_7106);
-#pragma pop
-
-/* 80A5E080-80A5E084 000184 0004+00 0/1 0/0 0/0 .rodata @7107 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7107 = 103.0f;
-COMPILER_STRIP_GATE(0x80A5E080, &lit_7107);
-#pragma pop
-
-/* 80A5E084-80A5E088 000188 0004+00 0/1 0/0 0/0 .rodata @7108 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7108 = 4025.0f;
-COMPILER_STRIP_GATE(0x80A5E084, &lit_7108);
-#pragma pop
-
-/* 80A5E088-80A5E08C 00018C 0004+00 0/1 0/0 0/0 .rodata @7109 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7109 = -1930.0f;
-COMPILER_STRIP_GATE(0x80A5E088, &lit_7109);
-#pragma pop
-
-/* 80A5E08C-80A5E090 000190 0004+00 0/1 0/0 0/0 .rodata @7110 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7110 = -112.0f;
-COMPILER_STRIP_GATE(0x80A5E08C, &lit_7110);
-#pragma pop
-
-/* 80A5E090-80A5E094 000194 0004+00 0/1 0/0 0/0 .rodata @7111 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7111 = 2420.0f;
-COMPILER_STRIP_GATE(0x80A5E090, &lit_7111);
-#pragma pop
-
-/* 80A5E094-80A5E098 000198 0004+00 0/1 0/0 0/0 .rodata @7112 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7112 = 13414.0f;
-COMPILER_STRIP_GATE(0x80A5E094, &lit_7112);
-#pragma pop
-
-/* 80A5E098-80A5E09C 00019C 0004+00 0/1 0/0 0/0 .rodata @7113 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7113 = 145.0f;
-COMPILER_STRIP_GATE(0x80A5E098, &lit_7113);
-#pragma pop
-
-/* 80A5E09C-80A5E0A0 0001A0 0004+00 0/1 0/0 0/0 .rodata @7114 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7114 = 2354.0f;
-COMPILER_STRIP_GATE(0x80A5E09C, &lit_7114);
-#pragma pop
-
-/* 80A5E0A0-80A5E0A4 0001A4 0004+00 0/1 0/0 0/0 .rodata @7115 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7115 = 13179.0f;
-COMPILER_STRIP_GATE(0x80A5E0A0, &lit_7115);
-#pragma pop
-
-/* 80A5E0A4-80A5E0A8 0001A8 0004+00 0/1 0/0 0/0 .rodata @7116 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7116 = 3.0f / 25.0f;
-COMPILER_STRIP_GATE(0x80A5E0A4, &lit_7116);
-#pragma pop
-
-/* 80A5E0A8-80A5E0AC 0001AC 0004+00 0/1 0/0 0/0 .rodata @7117 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7117 = 8486.0f;
-COMPILER_STRIP_GATE(0x80A5E0A8, &lit_7117);
-#pragma pop
-
-/* 80A5E0AC-80A5E0B0 0001B0 0004+00 0/1 0/0 0/0 .rodata @7118 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7118 = 4143.0f;
-COMPILER_STRIP_GATE(0x80A5E0AC, &lit_7118);
-#pragma pop
-
-/* 80A5E0B0-80A5E0B4 0001B4 0004+00 0/1 0/0 0/0 .rodata @7119 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7119 = -10114.0f;
-COMPILER_STRIP_GATE(0x80A5E0B0, &lit_7119);
-#pragma pop
-
-/* 80A5E0B4-80A5E0B8 0001B8 0004+00 0/1 0/0 0/0 .rodata @7120 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7120 = 8364.0f;
-COMPILER_STRIP_GATE(0x80A5E0B4, &lit_7120);
-#pragma pop
-
-/* 80A5E0B8-80A5E0BC 0001BC 0004+00 0/1 0/0 0/0 .rodata @7121 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7121 = 4325.0f;
-COMPILER_STRIP_GATE(0x80A5E0B8, &lit_7121);
-#pragma pop
-
-/* 80A5E0BC-80A5E0C0 0001C0 0004+00 0/1 0/0 0/0 .rodata @7122 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7122 = -9756.0f;
-COMPILER_STRIP_GATE(0x80A5E0BC, &lit_7122);
-#pragma pop
-
-/* 80A5E0C0-80A5E0C4 0001C4 0004+00 0/1 0/0 0/0 .rodata @7123 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7123 = 1.0f / 20.0f;
-COMPILER_STRIP_GATE(0x80A5E0C0, &lit_7123);
-#pragma pop
-
-/* 80A5E0C4-80A5E0C8 0001C8 0004+00 0/1 0/0 0/0 .rodata @7124 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7124 = 6899.0f;
-COMPILER_STRIP_GATE(0x80A5E0C4, &lit_7124);
-#pragma pop
-
-/* 80A5E0C8-80A5E0CC 0001CC 0004+00 0/1 0/0 0/0 .rodata @7125 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7125 = 3867.0f;
-COMPILER_STRIP_GATE(0x80A5E0C8, &lit_7125);
-#pragma pop
-
-/* 80A5E0CC-80A5E0D0 0001D0 0004+00 0/1 0/0 0/0 .rodata @7126 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7126 = -8870.0f;
-COMPILER_STRIP_GATE(0x80A5E0CC, &lit_7126);
-#pragma pop
-
-/* 80A5E0D0-80A5E0D4 0001D4 0004+00 0/1 0/0 0/0 .rodata @7127 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7127 = 8222.0f;
-COMPILER_STRIP_GATE(0x80A5E0D0, &lit_7127);
-#pragma pop
-
-/* 80A5E0D4-80A5E0D8 0001D8 0004+00 0/1 0/0 0/0 .rodata @7128 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7128 = 3896.0f;
-COMPILER_STRIP_GATE(0x80A5E0D4, &lit_7128);
-#pragma pop
-
-/* 80A5E0D8-80A5E0DC 0001DC 0004+00 0/1 0/0 0/0 .rodata @7129 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7129 = -9579.0f;
-COMPILER_STRIP_GATE(0x80A5E0D8, &lit_7129);
-#pragma pop
-
-/* 80A5E0DC-80A5E0E0 0001E0 0004+00 0/3 0/0 0/0 .rodata @7130 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7130 = -500.0f;
-COMPILER_STRIP_GATE(0x80A5E0DC, &lit_7130);
-#pragma pop
-
-/* 80A5E0E0-80A5E0E4 0001E4 0004+00 0/1 0/0 0/0 .rodata @7131 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7131 = 3681.0f;
-COMPILER_STRIP_GATE(0x80A5E0E0, &lit_7131);
-#pragma pop
-
-/* 80A5E0E4-80A5E0E8 0001E8 0004+00 0/1 0/0 0/0 .rodata @7132 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7132 = 7485.0f;
-COMPILER_STRIP_GATE(0x80A5E0E4, &lit_7132);
-#pragma pop
-
-/* 80A5E0E8-80A5E0EC 0001EC 0004+00 0/1 0/0 0/0 .rodata @7133 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7133 = -333.0f;
-COMPILER_STRIP_GATE(0x80A5E0E8, &lit_7133);
-#pragma pop
-
-/* 80A5E0EC-80A5E0F0 0001F0 0004+00 0/1 0/0 0/0 .rodata @7134 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7134 = 3316.0f;
-COMPILER_STRIP_GATE(0x80A5E0EC, &lit_7134);
-#pragma pop
-
-/* 80A5E0F0-80A5E0F4 0001F4 0004+00 0/1 0/0 0/0 .rodata @7135 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7135 = 7149.0f;
-COMPILER_STRIP_GATE(0x80A5E0F0, &lit_7135);
-#pragma pop
-
-/* 80A5E0F4-80A5E0F8 0001F8 0004+00 0/1 0/0 0/0 .rodata @7136 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7136 = -531.0f;
-COMPILER_STRIP_GATE(0x80A5E0F4, &lit_7136);
-#pragma pop
-
-/* 80A5E0F8-80A5E0FC 0001FC 0004+00 0/1 0/0 0/0 .rodata @7137 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7137 = 3295.0f;
-COMPILER_STRIP_GATE(0x80A5E0F8, &lit_7137);
-#pragma pop
-
-/* 80A5E0FC-80A5E100 000200 0004+00 0/1 0/0 0/0 .rodata @7138 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7138 = 7381.0f;
-COMPILER_STRIP_GATE(0x80A5E0FC, &lit_7138);
-#pragma pop
-
-/* 80A5E100-80A5E104 000204 0004+00 0/1 0/0 0/0 .rodata @7139 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7139 = 162.0f;
-COMPILER_STRIP_GATE(0x80A5E100, &lit_7139);
-#pragma pop
-
-/* 80A5E104-80A5E108 000208 0004+00 0/1 0/0 0/0 .rodata @7140 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7140 = 3354.0f;
-COMPILER_STRIP_GATE(0x80A5E104, &lit_7140);
-#pragma pop
-
-/* 80A5E108-80A5E10C 00020C 0004+00 0/1 0/0 0/0 .rodata @7141 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7141 = 6881.0f;
-COMPILER_STRIP_GATE(0x80A5E108, &lit_7141);
-#pragma pop
-
-/* 80A5E10C-80A5E110 000210 0004+00 0/1 0/0 0/0 .rodata @7142 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7142 = 263.0f;
-COMPILER_STRIP_GATE(0x80A5E10C, &lit_7142);
-#pragma pop
-
-/* 80A5E110-80A5E114 000214 0004+00 0/1 0/0 0/0 .rodata @7143 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7143 = 3374.0f;
-COMPILER_STRIP_GATE(0x80A5E110, &lit_7143);
-#pragma pop
-
-/* 80A5E114-80A5E118 000218 0004+00 0/1 0/0 0/0 .rodata @7144 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7144 = 7168.0f;
-COMPILER_STRIP_GATE(0x80A5E114, &lit_7144);
-#pragma pop
-
-/* 80A5E118-80A5E11C 00021C 0004+00 0/1 0/0 0/0 .rodata @7145 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7145 = 59.0f;
-COMPILER_STRIP_GATE(0x80A5E118, &lit_7145);
-#pragma pop
-
-/* 80A5E11C-80A5E120 000220 0004+00 0/1 0/0 0/0 .rodata @7146 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7146 = 12899.0f;
-COMPILER_STRIP_GATE(0x80A5E11C, &lit_7146);
-#pragma pop
-
-/* 80A5E120-80A5E124 000224 0004+00 0/1 0/0 0/0 .rodata @7147 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7147 = 3767.0f;
-COMPILER_STRIP_GATE(0x80A5E120, &lit_7147);
-#pragma pop
-
-/* 80A5E124-80A5E128 000228 0004+00 0/1 0/0 0/0 .rodata @7148 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7148 = 3364.0f;
-COMPILER_STRIP_GATE(0x80A5E124, &lit_7148);
-#pragma pop
-
-/* 80A5E128-80A5E12C 00022C 0004+00 0/1 0/0 0/0 .rodata @7149 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7149 = 11821.0f;
-COMPILER_STRIP_GATE(0x80A5E128, &lit_7149);
-#pragma pop
-
-/* 80A5E12C-80A5E130 000230 0004+00 0/1 0/0 0/0 .rodata @7150 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7150 = 3889.0f;
-COMPILER_STRIP_GATE(0x80A5E12C, &lit_7150);
-#pragma pop
-
-/* 80A5E130-80A5E134 000234 0004+00 0/1 0/0 0/0 .rodata @7151 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7151 = 4033.0f;
-COMPILER_STRIP_GATE(0x80A5E130, &lit_7151);
-#pragma pop
-
-/* 80A5E134-80A5E138 000238 0004+00 0/1 0/0 0/0 .rodata @7152 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7152 = 11710.0f;
-COMPILER_STRIP_GATE(0x80A5E134, &lit_7152);
-#pragma pop
-
-/* 80A5E138-80A5E13C 00023C 0004+00 0/1 0/0 0/0 .rodata @7153 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7153 = 3936.0f;
-COMPILER_STRIP_GATE(0x80A5E138, &lit_7153);
-#pragma pop
-
-/* 80A5E13C-80A5E140 000240 0004+00 0/1 0/0 0/0 .rodata @7154 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7154 = 4253.0f;
-COMPILER_STRIP_GATE(0x80A5E13C, &lit_7154);
-#pragma pop
-
-/* 80A5E140-80A5E144 000244 0004+00 0/1 0/0 0/0 .rodata @7155 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7155 = 12772.0f;
-COMPILER_STRIP_GATE(0x80A5E140, &lit_7155);
-#pragma pop
-
-/* 80A5E144-80A5E148 000248 0004+00 0/1 0/0 0/0 .rodata @7156 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7156 = 3940.0f;
-COMPILER_STRIP_GATE(0x80A5E144, &lit_7156);
-#pragma pop
-
-/* 80A5E148-80A5E14C 00024C 0004+00 0/1 0/0 0/0 .rodata @7157 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7157 = 3565.0f;
-COMPILER_STRIP_GATE(0x80A5E148, &lit_7157);
-#pragma pop
-
-/* 80A5E14C-80A5E150 000250 0004+00 0/1 0/0 0/0 .rodata @7158 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7158 = 13003.0f;
-COMPILER_STRIP_GATE(0x80A5E14C, &lit_7158);
-#pragma pop
-
-/* 80A5E150-80A5E154 000254 0004+00 0/1 0/0 0/0 .rodata @7159 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7159 = 4022.0f;
-COMPILER_STRIP_GATE(0x80A5E150, &lit_7159);
-#pragma pop
-
-/* 80A5E154-80A5E158 000258 0004+00 0/1 0/0 0/0 .rodata @7160 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7160 = 3613.0f;
-COMPILER_STRIP_GATE(0x80A5E154, &lit_7160);
-#pragma pop
-
-/* 80A5E158-80A5E15C 00025C 0004+00 0/1 0/0 0/0 .rodata @7161 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7161 = 1.0f / 25.0f;
-COMPILER_STRIP_GATE(0x80A5E158, &lit_7161);
-#pragma pop
-
-/* 80A5E15C-80A5E160 000260 0004+00 0/1 0/0 0/0 .rodata @7162 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u32 const lit_7162 = 0x3A83126F;
-COMPILER_STRIP_GATE(0x80A5E15C, &lit_7162);
-#pragma pop
-
-/* 80A5E160-80A5E164 000264 0004+00 0/1 0/0 0/0 .rodata @7163 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7163 = 12626.0f;
-COMPILER_STRIP_GATE(0x80A5E160, &lit_7163);
-#pragma pop
-
-/* 80A5E164-80A5E168 000268 0004+00 0/1 0/0 0/0 .rodata @7164 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7164 = 12714.0f;
-COMPILER_STRIP_GATE(0x80A5E164, &lit_7164);
-#pragma pop
-
-/* 80A5E168-80A5E16C 00026C 0004+00 0/1 0/0 0/0 .rodata @7165 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7165 = -23451.0f;
-COMPILER_STRIP_GATE(0x80A5E168, &lit_7165);
-#pragma pop
-
-/* 80A5E16C-80A5E170 000270 0004+00 0/1 0/0 0/0 .rodata @7166 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7166 = 262.0f;
-COMPILER_STRIP_GATE(0x80A5E16C, &lit_7166);
-#pragma pop
-
-/* 80A5E170-80A5E174 000274 0004+00 0/1 0/0 0/0 .rodata @7167 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7167 = -15980.0f;
-COMPILER_STRIP_GATE(0x80A5E170, &lit_7167);
-#pragma pop
-
-/* 80A5E174-80A5E178 000278 0004+00 0/1 0/0 0/0 .rodata @7168 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7168 = -22325.0f;
-COMPILER_STRIP_GATE(0x80A5E174, &lit_7168);
-#pragma pop
-
-/* 80A5E178-80A5E17C 00027C 0004+00 0/1 0/0 0/0 .rodata @7169 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7169 = 275.0f;
-COMPILER_STRIP_GATE(0x80A5E178, &lit_7169);
-#pragma pop
-
-/* 80A5E17C-80A5E180 000280 0004+00 0/1 0/0 0/0 .rodata @7170 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7170 = -15119.0f;
-COMPILER_STRIP_GATE(0x80A5E17C, &lit_7170);
-#pragma pop
-
-/* 80A5E180-80A5E184 000284 0004+00 0/1 0/0 0/0 .rodata @7171 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7171 = -22672.0f;
-COMPILER_STRIP_GATE(0x80A5E180, &lit_7171);
-#pragma pop
-
-/* 80A5E184-80A5E188 000288 0004+00 0/1 0/0 0/0 .rodata @7172 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7172 = 311.0f;
-COMPILER_STRIP_GATE(0x80A5E184, &lit_7172);
-#pragma pop
-
-/* 80A5E188-80A5E18C 00028C 0004+00 0/1 0/0 0/0 .rodata @7173 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7173 = -15080.0f;
-COMPILER_STRIP_GATE(0x80A5E188, &lit_7173);
-#pragma pop
-
-/* 80A5E18C-80A5E190 000290 0004+00 0/1 0/0 0/0 .rodata @7174 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7174 = -22343.0f;
-COMPILER_STRIP_GATE(0x80A5E18C, &lit_7174);
-#pragma pop
-
-/* 80A5E190-80A5E194 000294 0004+00 0/1 0/0 0/0 .rodata @7175 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7175 = 273.0f;
-COMPILER_STRIP_GATE(0x80A5E190, &lit_7175);
-#pragma pop
-
-/* 80A5E194-80A5E198 000298 0004+00 0/1 0/0 0/0 .rodata @7176 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7176 = -15017.0f;
-COMPILER_STRIP_GATE(0x80A5E194, &lit_7176);
-#pragma pop
-
-/* 80A5E198-80A5E19C 00029C 0004+00 0/1 0/0 0/0 .rodata @7177 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7177 = -22177.0f;
-COMPILER_STRIP_GATE(0x80A5E198, &lit_7177);
-#pragma pop
-
-/* 80A5E19C-80A5E1A0 0002A0 0004+00 0/1 0/0 0/0 .rodata @7178 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7178 = 213.0f;
-COMPILER_STRIP_GATE(0x80A5E19C, &lit_7178);
-#pragma pop
-
-/* 80A5E1A0-80A5E1A4 0002A4 0004+00 0/1 0/0 0/0 .rodata @7179 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7179 = -14705.0f;
-COMPILER_STRIP_GATE(0x80A5E1A0, &lit_7179);
-#pragma pop
-
-/* 80A5E1A4-80A5E1A8 0002A8 0004+00 0/1 0/0 0/0 .rodata @7180 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7180 = 1.0f / 50.0f;
-COMPILER_STRIP_GATE(0x80A5E1A4, &lit_7180);
-#pragma pop
-
-/* 80A5E1A8-80A5E1AC 0002AC 0004+00 0/1 0/0 0/0 .rodata @7181 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u32 const lit_7181 = 0x38D1B717;
-COMPILER_STRIP_GATE(0x80A5E1A8, &lit_7181);
-#pragma pop
-
-/* 80A5E1AC-80A5E1B0 0002B0 0004+00 0/1 0/0 0/0 .rodata @7182 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7182 = -22613.0f;
-COMPILER_STRIP_GATE(0x80A5E1AC, &lit_7182);
-#pragma pop
-
-/* 80A5E1B0-80A5E1B4 0002B4 0004+00 0/1 0/0 0/0 .rodata @7183 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7183 = -15097.0f;
-COMPILER_STRIP_GATE(0x80A5E1B0, &lit_7183);
-#pragma pop
-
-/* 80A5E1B4-80A5E1B8 0002B8 0004+00 0/1 0/0 0/0 .rodata @7184 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7184 = -22275.0f;
-COMPILER_STRIP_GATE(0x80A5E1B4, &lit_7184);
-#pragma pop
-
-/* 80A5E1B8-80A5E1BC 0002BC 0004+00 0/1 0/0 0/0 .rodata @7185 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7185 = -15092.0f;
-COMPILER_STRIP_GATE(0x80A5E1B8, &lit_7185);
-#pragma pop
-
-/* 80A5E1BC-80A5E1C0 0002C0 0004+00 0/1 0/0 0/0 .rodata @7186 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7186 = -23371.0f;
-COMPILER_STRIP_GATE(0x80A5E1BC, &lit_7186);
-#pragma pop
-
-/* 80A5E1C0-80A5E1C4 0002C4 0004+00 0/1 0/0 0/0 .rodata @7187 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7187 = 380.0f;
-COMPILER_STRIP_GATE(0x80A5E1C0, &lit_7187);
-#pragma pop
-
-/* 80A5E1C4-80A5E1C8 0002C8 0004+00 0/1 0/0 0/0 .rodata @7188 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7188 = -15901.0f;
-COMPILER_STRIP_GATE(0x80A5E1C4, &lit_7188);
-#pragma pop
-
-/* 80A5E1C8-80A5E1CC 0002CC 0004+00 0/1 0/0 0/0 .rodata @7189 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7189 = -23163.0f;
-COMPILER_STRIP_GATE(0x80A5E1C8, &lit_7189);
-#pragma pop
-
-/* 80A5E1CC-80A5E1D0 0002D0 0004+00 0/1 0/0 0/0 .rodata @7190 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7190 = 474.0f;
-COMPILER_STRIP_GATE(0x80A5E1CC, &lit_7190);
-#pragma pop
-
-/* 80A5E1D0-80A5E1D4 0002D4 0004+00 0/1 0/0 0/0 .rodata @7191 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7191 = -15653.0f;
-COMPILER_STRIP_GATE(0x80A5E1D0, &lit_7191);
-#pragma pop
-
-/* 80A5E1D4-80A5E1D8 0002D8 0004+00 0/1 0/0 0/0 .rodata @7192 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7192 = -22650.0f;
-COMPILER_STRIP_GATE(0x80A5E1D4, &lit_7192);
-#pragma pop
-
-/* 80A5E1D8-80A5E1DC 0002DC 0004+00 0/1 0/0 0/0 .rodata @7193 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7193 = 334.0f;
-COMPILER_STRIP_GATE(0x80A5E1D8, &lit_7193);
-#pragma pop
-
-/* 80A5E1DC-80A5E1E0 0002E0 0004+00 0/1 0/0 0/0 .rodata @7194 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7194 = -15147.0f;
-COMPILER_STRIP_GATE(0x80A5E1DC, &lit_7194);
-#pragma pop
-
-/* 80A5E1E0-80A5E1E4 0002E4 0004+00 0/1 0/0 0/0 .rodata @7195 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7195 = -22277.0f;
-COMPILER_STRIP_GATE(0x80A5E1E0, &lit_7195);
-#pragma pop
-
-/* 80A5E1E4-80A5E1E8 0002E8 0004+00 0/1 0/0 0/0 .rodata @7196 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7196 = 355.0f;
-COMPILER_STRIP_GATE(0x80A5E1E4, &lit_7196);
-#pragma pop
-
-/* 80A5E1E8-80A5E1EC 0002EC 0004+00 0/1 0/0 0/0 .rodata @7197 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7197 = -15077.0f;
-COMPILER_STRIP_GATE(0x80A5E1E8, &lit_7197);
-#pragma pop
-
-/* 80A5E1EC-80A5E1F0 0002F0 0004+00 0/1 0/0 0/0 .rodata @7198 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7198 = -30827.0f;
-COMPILER_STRIP_GATE(0x80A5E1EC, &lit_7198);
-#pragma pop
-
-/* 80A5E1F0-80A5E1F4 0002F4 0004+00 0/1 0/0 0/0 .rodata @7199 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7199 = 411.0f;
-COMPILER_STRIP_GATE(0x80A5E1F0, &lit_7199);
-#pragma pop
-
-/* 80A5E1F4-80A5E1F8 0002F8 0004+00 0/2 0/0 0/0 .rodata @7200 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7200 = -17200.0f;
-COMPILER_STRIP_GATE(0x80A5E1F4, &lit_7200);
-#pragma pop
-
-/* 80A5E1F8-80A5E1FC 0002FC 0004+00 0/1 0/0 0/0 .rodata @7201 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7201 = -30601.0f;
-COMPILER_STRIP_GATE(0x80A5E1F8, &lit_7201);
-#pragma pop
-
-/* 80A5E1FC-80A5E200 000300 0004+00 0/1 0/0 0/0 .rodata @7202 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7202 = 388.0f;
-COMPILER_STRIP_GATE(0x80A5E1FC, &lit_7202);
-#pragma pop
-
-/* 80A5E200-80A5E204 000304 0004+00 0/1 0/0 0/0 .rodata @7203 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7203 = -17465.0f;
-COMPILER_STRIP_GATE(0x80A5E200, &lit_7203);
-#pragma pop
-
-/* 80A5E204-80A5E208 000308 0004+00 0/1 0/0 0/0 .rodata @7204 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7204 = -30496.0f;
-COMPILER_STRIP_GATE(0x80A5E204, &lit_7204);
-#pragma pop
-
-/* 80A5E208-80A5E20C 00030C 0004+00 0/1 0/0 0/0 .rodata @7205 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7205 = -17449.0f;
-COMPILER_STRIP_GATE(0x80A5E208, &lit_7205);
-#pragma pop
-
-/* 80A5E20C-80A5E210 000310 0004+00 0/1 0/0 0/0 .rodata @7206 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7206 = -30844.0f;
-COMPILER_STRIP_GATE(0x80A5E20C, &lit_7206);
-#pragma pop
-
-/* 80A5E210-80A5E214 000314 0004+00 0/1 0/0 0/0 .rodata @7207 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7207 = 298.0f;
-COMPILER_STRIP_GATE(0x80A5E210, &lit_7207);
-#pragma pop
-
-/* 80A5E214-80A5E218 000318 0004+00 0/1 0/0 0/0 .rodata @7208 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7208 = -17007.0f;
-COMPILER_STRIP_GATE(0x80A5E214, &lit_7208);
-#pragma pop
-
-/* 80A5E218-80A5E21C 00031C 0004+00 0/1 0/0 0/0 .rodata @7209 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7209 = -30653.0f;
-COMPILER_STRIP_GATE(0x80A5E218, &lit_7209);
-#pragma pop
-
-/* 80A5E21C-80A5E220 000320 0004+00 0/1 0/0 0/0 .rodata @7210 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7210 = 357.0f;
-COMPILER_STRIP_GATE(0x80A5E21C, &lit_7210);
-#pragma pop
-
-/* 80A5E220-80A5E224 000324 0004+00 0/1 0/0 0/0 .rodata @7211 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7211 = -17289.0f;
-COMPILER_STRIP_GATE(0x80A5E220, &lit_7211);
-#pragma pop
-
-/* 80A5E224-80A5E228 000328 0004+00 0/1 0/0 0/0 .rodata @7212 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7212 = -30887.0f;
-COMPILER_STRIP_GATE(0x80A5E224, &lit_7212);
-#pragma pop
-
-/* 80A5E228-80A5E22C 00032C 0004+00 0/1 0/0 0/0 .rodata @7213 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7213 = 429.0f;
-COMPILER_STRIP_GATE(0x80A5E228, &lit_7213);
-#pragma pop
-
-/* 80A5E22C-80A5E230 000330 0004+00 0/1 0/0 0/0 .rodata @7214 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7214 = -17181.0f;
-COMPILER_STRIP_GATE(0x80A5E22C, &lit_7214);
-#pragma pop
-
-/* 80A5E230-80A5E234 000334 0004+00 0/1 0/0 0/0 .rodata @7215 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7215 = -30870.0f;
-COMPILER_STRIP_GATE(0x80A5E230, &lit_7215);
-#pragma pop
-
-/* 80A5E234-80A5E238 000338 0004+00 0/1 0/0 0/0 .rodata @7216 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7216 = 471.0f;
-COMPILER_STRIP_GATE(0x80A5E234, &lit_7216);
-#pragma pop
-
-/* 80A5E238-80A5E23C 00033C 0004+00 0/1 0/0 0/0 .rodata @7217 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7217 = -17527.0f;
-COMPILER_STRIP_GATE(0x80A5E238, &lit_7217);
-#pragma pop
-
-/* 80A5E23C-80A5E240 000340 0004+00 0/1 0/0 0/0 .rodata @7218 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7218 = -37509.0f;
-COMPILER_STRIP_GATE(0x80A5E23C, &lit_7218);
-#pragma pop
-
-/* 80A5E240-80A5E244 000344 0004+00 0/1 0/0 0/0 .rodata @7219 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7219 = 805.0f;
-COMPILER_STRIP_GATE(0x80A5E240, &lit_7219);
-#pragma pop
-
-/* 80A5E244-80A5E248 000348 0004+00 0/1 0/0 0/0 .rodata @7220 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7220 = -22416.0f;
-COMPILER_STRIP_GATE(0x80A5E244, &lit_7220);
-#pragma pop
-
-/* 80A5E248-80A5E24C 00034C 0004+00 0/1 0/0 0/0 .rodata @7221 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7221 = -36523.0f;
-COMPILER_STRIP_GATE(0x80A5E248, &lit_7221);
-#pragma pop
-
-/* 80A5E24C-80A5E250 000350 0004+00 0/1 0/0 0/0 .rodata @7222 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7222 = 335.0f;
-COMPILER_STRIP_GATE(0x80A5E24C, &lit_7222);
-#pragma pop
-
-/* 80A5E250-80A5E254 000354 0004+00 0/1 0/0 0/0 .rodata @7223 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7223 = -20500.0f;
-COMPILER_STRIP_GATE(0x80A5E250, &lit_7223);
-#pragma pop
-
-/* 80A5E254-80A5E258 000358 0004+00 0/1 0/0 0/0 .rodata @7224 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7224 = -37817.0f;
-COMPILER_STRIP_GATE(0x80A5E254, &lit_7224);
-#pragma pop
-
-/* 80A5E258-80A5E25C 00035C 0004+00 0/1 0/0 0/0 .rodata @7225 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7225 = -21442.0f;
-COMPILER_STRIP_GATE(0x80A5E258, &lit_7225);
-#pragma pop
-
-/* 80A5E25C-80A5E260 000360 0004+00 0/1 0/0 0/0 .rodata @7226 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7226 = -36666.0f;
-COMPILER_STRIP_GATE(0x80A5E25C, &lit_7226);
-#pragma pop
-
-/* 80A5E260-80A5E264 000364 0004+00 0/1 0/0 0/0 .rodata @7227 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7227 = -22213.0f;
-COMPILER_STRIP_GATE(0x80A5E260, &lit_7227);
-#pragma pop
-
-/* 80A5E264-80A5E268 000368 0004+00 0/1 0/0 0/0 .rodata @7228 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7228 = -36489.0f;
-COMPILER_STRIP_GATE(0x80A5E264, &lit_7228);
-#pragma pop
-
-/* 80A5E268-80A5E26C 00036C 0004+00 0/1 0/0 0/0 .rodata @7229 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7229 = 399.0f;
-COMPILER_STRIP_GATE(0x80A5E268, &lit_7229);
-#pragma pop
-
-/* 80A5E26C-80A5E270 000370 0004+00 0/1 0/0 0/0 .rodata @7230 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7230 = -20932.0f;
-COMPILER_STRIP_GATE(0x80A5E26C, &lit_7230);
-#pragma pop
-
-/* 80A5E270-80A5E274 000374 0004+00 0/1 0/0 0/0 .rodata @7231 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7231 = -36574.0f;
-COMPILER_STRIP_GATE(0x80A5E270, &lit_7231);
-#pragma pop
-
-/* 80A5E274-80A5E278 000378 0004+00 0/1 0/0 0/0 .rodata @7232 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7232 = 421.0f;
-COMPILER_STRIP_GATE(0x80A5E274, &lit_7232);
-#pragma pop
-
-/* 80A5E278-80A5E27C 00037C 0004+00 0/1 0/0 0/0 .rodata @7233 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7233 = -21554.0f;
-COMPILER_STRIP_GATE(0x80A5E278, &lit_7233);
-#pragma pop
-
-/* 80A5E27C-80A5E280 000380 0004+00 0/1 0/0 0/0 .rodata @7234 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7234 = -36397.0f;
-COMPILER_STRIP_GATE(0x80A5E27C, &lit_7234);
-#pragma pop
-
-/* 80A5E280-80A5E284 000384 0004+00 0/1 0/0 0/0 .rodata @7235 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7235 = 374.0f;
-COMPILER_STRIP_GATE(0x80A5E280, &lit_7235);
-#pragma pop
-
-/* 80A5E284-80A5E288 000388 0004+00 0/1 0/0 0/0 .rodata @7236 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7236 = -20263.0f;
-COMPILER_STRIP_GATE(0x80A5E284, &lit_7236);
-#pragma pop
-
-/* 80A5E288-80A5E28C 00038C 0004+00 0/1 0/0 0/0 .rodata @7237 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7237 = -36581.0f;
-COMPILER_STRIP_GATE(0x80A5E288, &lit_7237);
-#pragma pop
-
-/* 80A5E28C-80A5E290 000390 0004+00 0/1 0/0 0/0 .rodata @7238 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7238 = 412.0f;
-COMPILER_STRIP_GATE(0x80A5E28C, &lit_7238);
-#pragma pop
-
-/* 80A5E290-80A5E294 000394 0004+00 0/1 0/0 0/0 .rodata @7239 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7239 = -21418.0f;
-COMPILER_STRIP_GATE(0x80A5E290, &lit_7239);
-#pragma pop
-
-/* 80A5E294-80A5E298 000398 0004+00 0/1 0/0 0/0 .rodata @7240 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7240 = -36509.0f;
-COMPILER_STRIP_GATE(0x80A5E294, &lit_7240);
-#pragma pop
-
-/* 80A5E298-80A5E29C 00039C 0004+00 0/1 0/0 0/0 .rodata @7241 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7241 = -21127.0f;
-COMPILER_STRIP_GATE(0x80A5E298, &lit_7241);
-#pragma pop
-
-/* 80A5E29C-80A5E2A0 0003A0 0004+00 0/1 0/0 0/0 .rodata @7242 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7242 = -38113.0f;
-COMPILER_STRIP_GATE(0x80A5E29C, &lit_7242);
-#pragma pop
-
-/* 80A5E2A0-80A5E2A4 0003A4 0004+00 0/1 0/0 0/0 .rodata @7243 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7243 = 1234.0f;
-COMPILER_STRIP_GATE(0x80A5E2A0, &lit_7243);
-#pragma pop
-
-/* 80A5E2A4-80A5E2A8 0003A8 0004+00 0/1 0/0 0/0 .rodata @7244 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7244 = -22897.0f;
-COMPILER_STRIP_GATE(0x80A5E2A4, &lit_7244);
-#pragma pop
-
-/* 80A5E2A8-80A5E2AC 0003AC 0004+00 0/1 0/0 0/0 .rodata @7245 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7245 = -37882.0f;
-COMPILER_STRIP_GATE(0x80A5E2A8, &lit_7245);
-#pragma pop
-
-/* 80A5E2AC-80A5E2B0 0003B0 0004+00 0/1 0/0 0/0 .rodata @7246 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7246 = 1182.0f;
-COMPILER_STRIP_GATE(0x80A5E2AC, &lit_7246);
-#pragma pop
-
-/* 80A5E2B0-80A5E2B4 0003B4 0004+00 0/1 0/0 0/0 .rodata @7247 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7247 = -22713.0f;
-COMPILER_STRIP_GATE(0x80A5E2B0, &lit_7247);
-#pragma pop
-
-/* 80A5E2B4-80A5E2B8 0003B8 0004+00 0/1 0/0 0/0 .rodata @7248 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7248 = -36540.0f;
-COMPILER_STRIP_GATE(0x80A5E2B4, &lit_7248);
-#pragma pop
-
-/* 80A5E2B8-80A5E2BC 0003BC 0004+00 0/1 0/0 0/0 .rodata @7249 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7249 = -20870.0f;
-COMPILER_STRIP_GATE(0x80A5E2B8, &lit_7249);
-#pragma pop
-
-/* 80A5E2BC-80A5E2C0 0003C0 0004+00 0/1 0/0 0/0 .rodata @7250 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7250 = 1.0f / 100.0f;
-COMPILER_STRIP_GATE(0x80A5E2BC, &lit_7250);
-#pragma pop
-
-/* 80A5E2C0-80A5E2C4 0003C4 0004+00 0/1 0/0 0/0 .rodata @7251 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7251 = -36467.0f;
-COMPILER_STRIP_GATE(0x80A5E2C0, &lit_7251);
-#pragma pop
-
-/* 80A5E2C4-80A5E2C8 0003C8 0004+00 0/1 0/0 0/0 .rodata @7252 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7252 = 426.0f;
-COMPILER_STRIP_GATE(0x80A5E2C4, &lit_7252);
-#pragma pop
-
-/* 80A5E2C8-80A5E2CC 0003CC 0004+00 0/1 0/0 0/0 .rodata @7253 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7253 = -20914.0f;
-COMPILER_STRIP_GATE(0x80A5E2C8, &lit_7253);
-#pragma pop
-
-/* 80A5E2CC-80A5E2D0 0003D0 0004+00 0/1 0/0 0/0 .rodata @7254 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7254 = -36244.0f;
-COMPILER_STRIP_GATE(0x80A5E2CC, &lit_7254);
-#pragma pop
-
-/* 80A5E2D0-80A5E2D4 0003D4 0004+00 0/1 0/0 0/0 .rodata @7255 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7255 = 409.0f;
-COMPILER_STRIP_GATE(0x80A5E2D0, &lit_7255);
-#pragma pop
-
-/* 80A5E2D4-80A5E2D8 0003D8 0004+00 0/1 0/0 0/0 .rodata @7256 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7256 = -20714.0f;
-COMPILER_STRIP_GATE(0x80A5E2D4, &lit_7256);
-#pragma pop
-
-/* 80A5E438-80A5E438 00053C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
-#pragma push
-#pragma force_active on
-SECTION_DEAD static char const* const stringBase_80A5E440 = " PL IN %d";
-#pragma pop
-
/* 80A50094-80A5280C 0071F4 2778+00 1/1 0/0 0/0 .text demo_camera__FP12npc_ks_class */
-static void demo_camera(npc_ks_class* param_0) {
+static void demo_camera(npc_ks_class* i_this) {
// NONMATCHING
-}
+ fopAc_ac_c* a_this = &i_this->actor;
+ daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
+ camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0));
+ dComIfGp_getCamera(0);
+ obj_sw_class* sw_p = i_this->field_0x934;
+ cXyz sp44, sp50;
+ f32 fVar1, fVar2;
+ npc_ks_class* npc_ks_p;
+ obj_brg_class* brg_p;
+ daMidna_c* midna_p;
+
+ switch (i_this->field_0xb42) {
+ case 1:
+ if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+ a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ return;
+ }
+
+ i_this->field_0xb42 = 2;
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ i_this->field_0xb44 = 0;
+ player->changeOriginalDemo();
+ player->changeDemoMode(19, 0, 0, 0);
+ player->changeDemoParam0(0);
+ i_this->field_0xb60 = player->current.pos;
+ i_this->field_0xba8.z = 500.0f;
+ i_this->field_0xba8.x = 500.0f;
+ i_this->field_0xba8.y = 0.0f;
+ // fallthrough
+ case 2:
+ i_this->field_0xbb8 = 55.0f;
+ cLib_addCalc2(&i_this->field_0xb60.x, player->current.pos.x, 0.2f, 50.0f);
+ cLib_addCalc2(&i_this->field_0xb60.y, sw_p->actor.current.pos.y - 250.0f, 0.2f, 50.0f);
+ cLib_addCalc2(&i_this->field_0xb60.z, player->current.pos.z, 0.2f, 50.0f);
+ if (fopAcM_GetRoomNo(a_this) == 2) {
+ cMtx_YrotS(*calc_mtx, sw_p->actor.current.angle.y);
+ } else {
+ cMtx_YrotS(*calc_mtx, player->shape_angle.y);
+ }
+
+ sp44.x = i_this->field_0xba8.x;
+ sp44.y = i_this->field_0xba8.y;
+ sp44.z = i_this->field_0xba8.z;
+ MtxPosition(&sp44,&sp50);
+
+ sp50.x = sp50.x + player->current.pos.x;
+ sp50.y = sp50.y + (sw_p->actor.current.pos.y - 250.0f);
+ sp50.z = sp50.z + player->current.pos.z;
+ if (i_this->field_0xb44 == 0) {
+ i_this->field_0xb48 = sp50;
+ } else {
+ cLib_addCalc2(&i_this->field_0xb48.x, sp50.x, 0.1f, 200.0f);
+ cLib_addCalc2(&i_this->field_0xb48.y, sp50.y, 0.1f, 200.0f);
+ cLib_addCalc2(&i_this->field_0xb48.z, sp50.z, 0.1f, 200.0f);
+ }
+
+ if (i_this->field_0x92c != 0) {
+ i_this->field_0xba8.z += -10.0f;
+ }
+ break;
+
+ case 3:
+ cLib_addCalc2(&i_this->field_0xb60.x, player->current.pos.x, 0.4f, 100.0f);
+ cLib_addCalc2(&i_this->field_0xb60.y, player->current.pos.y + 70.0f, 0.4f, 100.0f);
+ cLib_addCalc2(&i_this->field_0xb60.z, player->current.pos.z, 0.4f, 100.0f);
+ cMtx_YrotS(*calc_mtx, player->shape_angle.y);
+ fVar1 = 50.0f;
+ if (fopAcM_GetRoomNo(a_this) == 4 && i_this->field_0xbdb == 0) {
+ sp44.x = 100.0f;
+ sp44.y = 100.0f;
+ sp44.z = 300.0f;
+
+ if (i_this->field_0xb44 == 10) {
+ player->changeDemoMode(40, 0, 0, 0);
+ }
+
+ if (i_this->field_0xb44 == 0x1c) {
+ player->changeDemoMode(41, 0, 0, 0);
+ }
+
+ if (i_this->field_0xb44 == 40) {
+ i_this->field_0xb42 = 100;
+ i_this->field_0xbdb = 1;
+ }
+
+ fVar1 = 200.0f;
+ } else {
+ sp44.x = 0.0f;
+ sp44.y = 0.0f;
+ sp44.z = -400.0f;
+
+ if (i_this->field_0xb44 == 8) {
+ i_this->field_0xb42 = 100;
+ }
+ }
+
+ MtxPosition(&sp44, &sp50);
+ sp50.x = sp50.x + player->current.pos.x;
+ sp50.y = sp50.y + player->current.pos.y;
+ sp50.z = sp50.z + player->current.pos.z;
+ cLib_addCalc2(&i_this->field_0xb48.x, sp50.x, 0.2f, fVar1);
+ cLib_addCalc2(&i_this->field_0xb48.y, sp50.y, 0.2f, fVar1);
+ cLib_addCalc2(&i_this->field_0xb48.z, sp50.z, 0.2f, fVar1);
+ break;
+
+ case 10:
+ if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+ a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ return;
+ }
+
+ i_this->field_0xb42 = 11;
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ i_this->field_0xb44 = 0;
+ i_this->field_0xbb8 = 55.0f;
+ i_this->field_0xba8.z = 500.0f;
+ i_this->field_0xba8.x = 500.0f;
+ i_this->field_0xba8.y = 0.0f;
+ i_this->field_0xbc0 = NULL;
+ // fallthrough
+
+ sp50 = i_this->field_0xbc8;
+ sp50.y = player->current.pos.y;
+ setPlayerPosAndAngle(&sp50, player->shape_angle.y);
+ npc_ks_p = i_this->field_0xbc0;
+ i_this->field_0xbc0 = get_move_saru(i_this,sw_p->field_0x91c);;
+ i_this->field_0xb6c.y = sw_p->actor.current.pos.y - 200.0f;
+ if (i_this->field_0xbc0 != NULL) {
+ sw_p = i_this->field_0xbc0->field_0x934;
+ cMtx_YrotS(*calc_mtx, i_this->field_0xbd4);
+ sp44.x = i_this->field_0xba8.x;
+ sp44.y = i_this->field_0xba8.y;
+ sp44.z = i_this->field_0xba8.z;
+ MtxPosition(&sp44, &i_this->field_0xb54);
+ i_this->field_0xb54.x += i_this->field_0xbc0->actor.current.pos.x;
+ i_this->field_0xb54.y += sw_p->actor.current.pos.y - 250.0f;
+ i_this->field_0xb54.z += i_this->field_0xbc0->actor.current.pos.z;
+ i_this->field_0xb6c.x = i_this->field_0xbc0->actor.current.pos.x;
+ i_this->field_0xb6c.y = sw_p->actor.current.pos.y - 200.0f;
+
+ if (i_this->field_0xbc0->mActionID == 20 && i_this->field_0xb6c.y < i_this->field_0xbc0->actor.current.pos.y) {
+ i_this->field_0xb6c.y = i_this->field_0xbc0->actor.current.pos.y;
+ }
+
+ i_this->field_0xb6c.z = i_this->field_0xbc0->actor.current.pos.z;
+ if (npc_ks_p != i_this->field_0xbc0) {
+ i_this->field_0xb48 = i_this->field_0xb54;
+ i_this->field_0xb60 = i_this->field_0xb6c;
+ }
+ i_this->field_0xb84.set(200.0f, 200.0f, 200.0f);
+ i_this->field_0xbc4 = 1.0f;
+ } else {
+ if (all_hang_check(i_this, sw_p->field_0x91c) != 0) {
+ i_this->field_0xb42 = 12;
+ if (fopAcM_GetRoomNo(a_this) == 0) {
+ i_this->field_0xb44 = 45;
+ } else if (sw_p->field_0x91c >= 3) {
+ i_this->field_0xb6c.x = saru_p[sw_p->field_0x91c]->actor.current.pos.x;
+ i_this->field_0xb6c.y = saru_p[sw_p->field_0x91c]->actor.current.pos.y;
+ i_this->field_0xb6c.y = i_this->field_0xb6c.y - 150.0f;
+ i_this->field_0xb6c.z = saru_p[sw_p->field_0x91c]->actor.current.pos.z;
+
+ i_this->field_0xb84.x = std::fabsf(i_this->field_0xb6c.x - i_this->field_0xb60.x);
+ i_this->field_0xb84.y = std::fabsf(i_this->field_0xb6c.y - i_this->field_0xb60.y);
+ i_this->field_0xb84.z = std::fabsf(i_this->field_0xb6c.z - i_this->field_0xb60.z);
+ i_this->field_0xbc4 = 0.0f;
+ i_this->field_0xb44 = 5;
+ } else {
+ i_this->field_0xb44 = 45;
+ }
+ }
+ }
+ // fallthrough
+ case 12:
+ cLib_addCalc2(&i_this->field_0xb48.x, i_this->field_0xb54.x, 0.2f, i_this->field_0xbc4 * 200.0f);
+ cLib_addCalc2(&i_this->field_0xb48.y, i_this->field_0xb54.y, 0.2f, i_this->field_0xbc4 * 200.0f);
+ cLib_addCalc2(&i_this->field_0xb48.z, i_this->field_0xb54.z, 0.2f, i_this->field_0xbc4 * 200.0f);
+ cLib_addCalc2(&i_this->field_0xb60.x, i_this->field_0xb6c.x, 0.2f, i_this->field_0xb84.x * i_this->field_0xbc4);
+ cLib_addCalc2(&i_this->field_0xb60.y, i_this->field_0xb6c.y, 0.2f, i_this->field_0xb84.y * i_this->field_0xbc4);
+ cLib_addCalc2(&i_this->field_0xb60.z, i_this->field_0xb6c.z, 0.2f, i_this->field_0xb84.z * i_this->field_0xbc4);
+ if (i_this->field_0xb42 == 12) {
+ cLib_addCalc2(&i_this->field_0xbb8, 40.0f, 0.2f, i_this->field_0xbc4);
+ cLib_addCalc2(&i_this->field_0xbc4, 0.1f, 1.0f, 0.005f);
+ if (85 < i_this->field_0xb44) {
+ i_this->field_0xb42 = 100;
+ sp44.x = saru_p[i_this->field_0xb40]->actor.current.pos.x - i_this->field_0xbc8.x;
+ sp44.z = saru_p[i_this->field_0xb40]->actor.current.pos.z - i_this->field_0xbc8.z;
+ s16 angle = cM_atan2s(sp44.x, sp44.z);
+ cMtx_YrotS(*calc_mtx, angle);
+ sp44.x = 0.0f;
+ sp44.y = 0.0f;
+ if (fopAcM_GetRoomNo(a_this) == 4) {
+ sp44.z = -250.0f;
+ } else {
+ sp44.z = -150.0f;
+ }
+ MtxPosition(&sp44,&sp50);
+ sp50.x = sp50.x + i_this->field_0xbc8.x;
+ sp50.z = sp50.z + i_this->field_0xbc8.z;
+
+ if (fopAcM_GetRoomNo(a_this) == 2) {
+ sp50.y = 3764.0f;
+ } else {
+ sp50.y = player->current.pos.y;
+ }
+ setPlayerPosAndAngle(&sp50, angle);
+ sp44.x = 0.0f;
+ sp44.y = 100.0f;
+ sp44.z = -250.0f;
+ MtxPosition(&sp44, &i_this->field_0xb48);
+ i_this->field_0xb48 += player->current.pos;
+ i_this->field_0xb60 = player->current.pos;
+ i_this->field_0xb60.y += 120.0f;
+ i_this->field_0xbb8 = 55.0f;
+ }
+ }
+ break;
+
+ case 60:
+ if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+ a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ return;
+ }
+
+ i_this->field_0xb42 = 61;
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ i_this->field_0xb44 = 0;
+ cMtx_YrotS(*calc_mtx, a_this->shape_angle.y);
+ sp44.x = 300.0f;
+ sp44.y = 100.0f;
+ sp44.z = 0.0f;
+ MtxPosition(&sp44, &i_this->field_0xb48);
+ i_this->field_0xb48 += a_this->current.pos;
+
+ fVar2 = i_this->field_0xb48.x;
+ sp44.x = fVar2 - player->current.pos.x;
+ sp44.z = i_this->field_0xb48.z - player->current.pos.z;
+ if (sp44.x * sp44.x + sp44.z * sp44.z < 10000.0f) {
+ i_this->field_0xb48.x = fVar2 + 200.0f;
+ }
+
+ i_this->field_0xb60 = a_this->eyePos;
+ player->changeOriginalDemo();
+ player->changeDemoMode(1, 1, 0, 0);
+ // fallthrough
+ case 61:
+ sp50 = player->old.pos;
+ sp50.y = 3150.0f;
+ setPlayerPosAndAngle(&sp50, player->shape_angle.y);
+ i_this->field_0xbb8 = 65.0f;
+ cLib_addCalc2(&i_this->field_0xb60.x, a_this->eyePos.x, 0.1f, 50.0f);
+ cLib_addCalc2(&i_this->field_0xb60.y, a_this->eyePos.y, 0.1f, 50.0f);
+ cLib_addCalc2(&i_this->field_0xb60.z, a_this->eyePos.z, 0.1f, 50.0f);
+ break;
+
+ case 70:
+ if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+ a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ return;
+ }
+
+ i_this->field_0xb42 = 71;
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ i_this->field_0xb44 = 0;
+ i_this->field_0xbb8 = 55.0f;
+ player->changeOriginalDemo();
+ player->changeDemoMode(1, 1, 0, 0);
+ // fallthrough
+ case 71:
+ if (i_this->field_0xb44 == 0) {
+ i_this->field_0xb60 = a_this->current.pos;
+ i_this->field_0xb60.y = a_this->current.pos.y + 120.0f;
+ i_this->field_0xb48.set(-4786.0f, 3982.0f, -1843.0f);
+ } else if (i_this->field_0xb44 == 210) {
+ i_this->field_0xb48.set(-3232.0f, 4137.0f, -1425.0f);
+ } else if (i_this->field_0xb44 == 240) {
+ i_this->field_0xb48.set(-2459.0f, 4199.0f, -2752.0f);
+ } else if (i_this->field_0xb44 == 290) {
+ i_this->field_0xb48.set(103.0f, 4025.0f, -1930.0f);
+ }
+ cLib_addCalc2(&i_this->field_0xb60.x, a_this->current.pos.x, 0.2f, 60.0f);
+ cLib_addCalc2(&i_this->field_0xb60.y, a_this->current.pos.y + 120.0f, 0.1f, 30.0f);
+ cLib_addCalc2(&i_this->field_0xb60.z, a_this->current.pos.z, 0.2f, 60.0f);
+
+ if (i_this->field_0xb44 == 358) {
+ i_this->field_0xb42 = 99;
+ }
+ break;
+
+ case 72:
+ if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+ a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ return;
+ }
+
+ i_this->field_0xb42 = 73;
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ i_this->field_0xb44 = 0;
+ i_this->field_0xbb8 = 55.0f;
+ player->changeOriginalDemo();
+ player->changeDemoMode(1, 1, 0, 0);
+ // fallthrough
+ case 73:
+ if (i_this->field_0xb44 == 0) {
+ i_this->field_0xb60 = a_this->current.pos;
+ i_this->field_0xb60.y = a_this->current.pos.y + 120.0f;
+ i_this->field_0xb48.set(-112.0f, 2420.0f, 13414.0f);
+ }
+
+ sp50.set(145.0f, 2354.0f, 13179.0f);
+ setPlayerPosAndAngle(&sp50, -0x691B);
+ cLib_addCalc2(&i_this->field_0xb60.x, a_this->current.pos.x, 0.1f, 20.0f);
+ cLib_addCalc2(&i_this->field_0xb60.y, a_this->current.pos.y + 120.0f, 0.1f, 10.0f);
+ cLib_addCalc2(&i_this->field_0xb60.z, a_this->current.pos.z, 0.12f, 20.0f);
+
+ if (i_this->field_0xb44 == 280) {
+ i_this->field_0xb42 = 100;
+ }
+ break;
+
+ case 75:
+ if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+ a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ return;
+ }
+
+ i_this->field_0xb42 = 76;
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ i_this->field_0xb44 = 0;
+ i_this->field_0xbb8 = 55.0f;
+ player->changeOriginalDemo();
+ player->changeDemoMode(1,1,0,0);
+ // fallthrough
+ case 76:
+ setPlayerPosAndAngle(&player->current.pos, i_this->field_0x5c8 + 0x8000);
+ if (i_this->field_0xb44 == 0) {
+ cMtx_YrotS(*calc_mtx,a_this->shape_angle.y);
+ sp44.x = 0.0f;
+ sp44.y = 100.0f;
+ sp44.z = 400.0f;
+ MtxPosition(&sp44, &i_this->field_0xb48);
+ i_this->field_0xb48 += a_this->current.pos;
+ i_this->field_0xb60 = a_this->current.pos;
+ i_this->field_0xb60.y = a_this->current.pos.y + 120.0f;
+ }
+ cLib_addCalc2(&i_this->field_0xb60.x, a_this->current.pos.x, 0.2f, 60.0f);
+ cLib_addCalc2(&i_this->field_0xb60.y, a_this->current.pos.y + 120.0f, 0.1f, 30.0f);
+ cLib_addCalc2(&i_this->field_0xb60.z, a_this->current.pos.z, 0.2f, 60.0f);
+ if (i_this->field_0xb44 == 180) {
+ i_this->field_0xb42 = 99;
+ }
+ break;
+
+ case 77:
+ if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+ a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ return;
+ }
+
+ i_this->field_0xb42 = 78;
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ i_this->field_0xb44 = 0;
+ i_this->field_0xbb8 = 55.0f;
+ player->changeOriginalDemo();
+ player->changeDemoMode(1, 1, 0, 0);
+ i_this->field_0xbb8 = 65.0f;
+ i_this->field_0xb60.set(8486.0f, 4143.0f, -10114.0f);
+ i_this->field_0xb48.set(8364.0f, 4325.0f, -9756.0f);
+ // fallthrough
+ case 78:
+ cLib_addCalc2(&i_this->field_0xbb8, 55.0f, 0.05f, 0.2f);
+ if (i_this->field_0xb44 != 80) break;
+ i_this->field_0xb42 = 79;
+ i_this->field_0xb44 = 0;
+ // fallthrough
+ case 79:
+ if (i_this->field_0xb44 == 0) {
+ i_this->field_0xb60 = a_this->current.pos;
+ i_this->field_0xb60.y = a_this->current.pos.y + 120.0f;
+ i_this->field_0xb48.set(6899.0f, 3867.0f, -8870.0f);
+ } else if (i_this->field_0xb44 == 60) {
+ i_this->field_0xb48.set(8222.0f, 3896.0f, -9579.0f);
+ }
+ cLib_addCalc2(&i_this->field_0xb60.x, a_this->current.pos.x, 0.2f, 60.0f);
+ cLib_addCalc2(&i_this->field_0xb60.y, a_this->current.pos.y + 120.0f, 0.1f, 30.0f);
+ cLib_addCalc2(&i_this->field_0xb60.z, a_this->current.pos.z, 0.2f, 60.0f);
+ if (i_this->field_0xb44 >= 130) {
+ cLib_addCalc2(&i_this->field_0xbb8, 40.0f, 0.05f, 0.3f);
+ }
+
+ if (i_this->field_0xb44 == 200) {
+ i_this->field_0xb42 = 100;
+ dComIfGs_onSwitch(83, fopAcM_GetRoomNo(a_this));
+ }
+ break;
+
+ case 80:
+ if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+ a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ return;
+ }
+
+ i_this->field_0xb42 = 81;
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ i_this->field_0xb44 = 0;
+ i_this->field_0xbb8 = 55.0f;
+ player->changeOriginalDemo();
+ player->changeDemoMode(1, 1, 0, 0);
+ // fallthrough
+ case 81:
+ if (i_this->field_0xb44 == 0) {
+ saru_p[3]->actor.current.pos.x = -500.0f;
+ saru_p[3]->actor.current.pos.y = 3681.0f;
+ saru_p[3]->actor.current.pos.z = 7485.0f;
+ }
+
+ if (i_this->field_0xb44 == 30) {
+ saru_p[0]->actor.current.pos.x = player->current.pos.x;
+ saru_p[0]->actor.current.pos.y = player->current.pos.y + 500.0f;
+ saru_p[0]->actor.current.pos.z = player->current.pos.z - 100.0f;
+ }
+
+ if (i_this->field_0xb44 == 60) {
+ saru_p[1]->actor.current.pos.x = player->current.pos.x + 200.0f;
+ saru_p[1]->actor.current.pos.y = player->current.pos.y + 500.0f;
+ saru_p[1]->actor.current.pos.z = player->current.pos.z;
+ }
+
+ if (i_this->field_0xb44 == 90) {
+ saru_p[2]->actor.current.pos.x = i_this->field_0xb48.x - 250.0f;
+ saru_p[2]->actor.current.pos.y = i_this->field_0xb48.y + 200.0f;
+ saru_p[2]->actor.current.pos.z = i_this->field_0xb48.z - 100.0f;
+ }
+
+ if (i_this->field_0xb44 < 80) {
+ i_this->field_0xb60.set(-333.0f,3316.0f,7149.0f);
+ i_this->field_0xb48.set(-531.0f,3295.0f,7381.0f);
+ } else {
+ i_this->field_0xb60.set(162.0f,3354.0f,6881.0f);
+ i_this->field_0xb48.set(263.0f,3374.0f,7168.0f);
+ }
+
+ if (i_this->field_0xb44 == 170) {
+ i_this->field_0xb42 = 100;
+ i_this->field_0xb60.set(-333.0f,3316.0f,7149.0f);
+ i_this->field_0xb48.set(-531.0f,3295.0f,7381.0f);
+ }
+ break;
+
+ case 110:
+ if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+ a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ return;
+ }
+
+ i_this->field_0xb42 = 111;
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ i_this->field_0xb44 = 0;
+ i_this->field_0xbb8 = 59.0f;
+ player->changeOriginalDemo();
+ player->changeDemoMode(3, 0, 0, 0);
+ sp50.set(12899.0f, 3767.0f, 3364.0f);
+ player->changeDemoPos0(&sp50);
+
+ i_this->field_0xb60.set(11821.0f, 3889.0f, 4033.0f);
+ i_this->field_0xb48.set(11710.0f, 3936.0f, 4253.0f);
+ i_this->field_0xb6c.set(12772.0f, 3940.0f, 3565.0f);
+ i_this->field_0xb54.set(13003.0f, 4022.0f, 3613.0f);
+
+ i_this->field_0xb78.x = std::fabsf(i_this->field_0xb54.x - i_this->field_0xb48.x);
+ i_this->field_0xb78.y = std::fabsf(i_this->field_0xb54.y - i_this->field_0xb48.y);
+ i_this->field_0xb78.z = std::fabsf(i_this->field_0xb54.z - i_this->field_0xb48.z);
+ i_this->field_0xb84.x = std::fabsf(i_this->field_0xb6c.x - i_this->field_0xb60.x);
+ i_this->field_0xb84.y = std::fabsf(i_this->field_0xb6c.y - i_this->field_0xb60.y);
+ i_this->field_0xb84.z = std::fabsf(i_this->field_0xb6c.z - i_this->field_0xb60.z);
+ i_this->field_0xbc4 = 0.0f;
+ // fallthrough
+ case 111:
+ case 112:
+ if (i_this->field_0xb44 < 10) {
+ sp50.set(11497.0f, 3764.0f, 3810.0f);
+ setPlayerPosAndAngle(&sp50, 0x4D5A);
+ }
+
+ if (i_this->field_0xb44 > 5) {
+ cam_3d_morf(i_this, 0.1f);
+ cLib_addCalc2(&i_this->field_0xbc4, 0.04f, 1.0f, 0.001f);
+ }
+
+ if (i_this->field_0xbdc == 0 && player->current.pos.x >= 12626.0f) {
+ i_this->field_0xbdc = 1;
+ JUTReport(300, 220, " PL IN %d");
+ brg_p = (obj_brg_class *)fopAcM_SearchByName(44);
+ if (brg_p != NULL) {
+ brg_p->field_0xaf1c = 4;
+ brg_p->field_0xaed0 = 6;
+ dComIfGp_particle_set(0x833F, &brg_p->mBr[6].field_0x0bc, &brg_p->mBr[6].field_0x0d4, NULL);
+ }
+ }
+
+ if (i_this->field_0xbdc == 1 && player->current.pos.x >= 12714.0f) {
+ i_this->field_0xbdc = 2;
+ i_this->field_0xb42 = 112;
+ daPy_getPlayerActorClass()->changeDemoMode(25, 0, 0, 0);
+ i_this->field_0xb44 = 20;
+ }
+
+ if (i_this->field_0xb42 == 112 && i_this->field_0xb44 >= 53) {
+ i_this->field_0xb42 = 100;
+ cMtx_YrotS(*calc_mtx, player->shape_angle.y);
+ sp44.x = 0.0f;
+ sp44.y = 100.0f;
+ sp44.z = -250.0f;
+ MtxPosition(&sp44, &i_this->field_0xb48);
+ i_this->field_0xb48 += player->current.pos;
+ i_this->field_0xb60 = player->current.pos;
+ i_this->field_0xb60.y += 120.0f;
+ }
+ break;
+
+ case 200:
+ if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+ a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ return;
+ }
+
+ i_this->field_0xb42 = 201;
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ i_this->field_0xb44 = 0;
+ i_this->field_0xbb8 = 55.0f;
+ player->changeOriginalDemo();
+ player->changeDemoMode(2, 0, 0, 0);
+ sp50.set(-23451.0f,262.0f,-15980.0f);
+ player->changeDemoPos0(&sp50);
+ i_this->field_0xb60.set(-22325.0f, 275.0f, -15119.0f);
+ i_this->field_0xb48.set(-22672.0f, 311.0f, -15080.0f);
+ i_this->field_0xb6c.set(-22343.0f, 273.0f, -15017.0f);
+ i_this->field_0xb78.set(0.0f, 0.0f, 0.0f);
+ i_this->field_0xb84.x = std::fabsf(i_this->field_0xb6c.x - i_this->field_0xb60.x);
+ i_this->field_0xb84.y = std::fabsf(i_this->field_0xb6c.y - i_this->field_0xb60.y);
+ i_this->field_0xb84.z = std::fabsf(i_this->field_0xb6c.z - i_this->field_0xb60.z);
+ i_this->field_0xbc4 = 0.0f;
+ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0xE0]);
+ // fallthrough
+ case 201:
+ if (i_this->field_0xb44 < 30) {
+ sp50.set(-22177.0f, 213.0f, -14705.0f);
+ setPlayerPosAndAngle(&sp50, -0x5FFD);
+ player->speedF = 0.0f;
+ }
+
+ cam_3d_morf(i_this, 0.05f);
+ cLib_addCalc2(&i_this->field_0xbc4, 0.02f, 1.0f, 0.0001f);
+
+ if (i_this->field_0xb44 == 110) {
+ i_this->mMode = 2;
+ i_this->field_0xbb4 = 500.0f;
+ }
+
+ if (i_this->field_0xb44 == 132) {
+ i_this->field_0xc17 = 2;
+
+ mDoAud_seStart(0x5001A, NULL, 0, 0);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1);
+ dComIfGs_setItem(1, 0xFF);
+ dMeter2Info_setOilGaugeBackUp(dComIfGs_getOil());
+ dComIfGp_getVibration().StartShock(2, 31, cXyz(0.0f, 1.0f, 0.0f));
+ }
+
+ if (i_this->field_0xb44 == 139) {
+ player->changeDemoMode(1, 1, 0, 0);
+ }
+
+ if (i_this->field_0xb44 == 144) {
+ cMtx_YrotS(*calc_mtx, player->shape_angle.y);
+ sp44.x = 0.0f;
+ sp44.y = 0.0f;
+ sp44.z = 100.0f;
+ MtxPosition(&sp44, &sp50);
+ a_this->current.pos = player->current.pos + sp50;
+ a_this->current.angle.y = player->shape_angle.y;
+ i_this->field_0x8fc.y = player->shape_angle.y;
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 230;
+ i_this->mTimers[0] = 65;
+ }
+
+ if (i_this->field_0xb44 == 145) {
+ i_this->field_0xb42 = 202;
+ i_this->field_0xb44 = 0;
+ i_this->field_0xb60.set(-22613.0f, 350.0f, -15097.0f);
+ i_this->field_0xb48.set(-22275.0f, 350.0f, -15092.0f);
+ }
+ break;
+
+ case 202:
+ if (i_this->field_0xb44 == 30) {
+ i_this->field_0xb60.set(-23371.0f, 380.0f, -15901.0f);
+ i_this->field_0xb48.set(-23163.0f, 474.0f, -15653.0f);
+ player->changeDemoMode(1, 1, 0, 0);
+ }
+
+ if (i_this->field_0xb44 >= 120) {
+ cLib_addCalc2(&i_this->field_0xbb8, 80.0f, 0.05f, 0.2f);
+ }
+
+ if (i_this->field_0xb44 == 270) {
+ i_this->field_0xb42 = 203;
+ i_this->field_0xb44 = 0;
+ }
+ break;
+
+ case 203:
+ i_this->field_0xb60.set(-22650.0f, 334.0f, -15147.0f);
+ i_this->field_0xb48.set(-22277.0f, 355.0f, -15077.0f);
+ i_this->field_0xbb8 = 55.0f;
+ if (i_this->field_0xb44 == 10) {
+ midna_p = daPy_py_c::getMidnaActor();
+ midna_p->changeOriginalDemo();
+ midna_p->changeDemoMode(2);
+ }
+
+ if (i_this->field_0xb44 >= 100) {
+ i_this->field_0xb44 = 100;
+ }
+
+ if (i_this->field_0xb44 >= 70) {
+ if (i_this->field_0xb44 == 70) {
+ i_this->mMsgFlow.init(a_this, 2015, 0, NULL);
+ }
+ if (i_this->mMsgFlow.doFlow(a_this, NULL, 0) != 0) {
+ i_this->field_0xb42 = 204;
+ daPy_py_c::getMidnaActor()->changeDemoMode(5);
+ }
+ }
+ break;
+
+ case 204:
+ if (daPy_py_c::getMidnaActor()->checkShadowReturnEnd() != 0) {
+ i_this->field_0xb42 = 100;
+ }
+ break;
+
+ case 300:
+ if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+ a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ return;
+ }
+
+ i_this->field_0xb42 = 301;
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ i_this->field_0xb44 = 0;
+ i_this->field_0xbb8 = 60.0f;
+ player->changeOriginalDemo();
+ i_this->field_0xb60.set(-30827.0f, 411.0f, -17200.0f);
+ i_this->field_0xb48.set(-30601.0f, 388.0f, -17465.0f);
+ // fallthrough
+ case 301:
+ sp50.set(-30496.0f, 300.0f, -17449.0f);
+ setPlayerPosAndAngle(&sp50, -0x18B4);
+ if (i_this->field_0xb44 == 60) {
+ i_this->field_0xb42 = 302;
+ i_this->field_0xb44 = 0;
+ i_this->field_0xb60.set(-30844.0f, 298.0f, -17007.0f);
+ i_this->field_0xb48.set(-30653.0f, 357.0f, -17289.0f);
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ i_this->field_0xc17 = 3;
+ mDoAud_seStart(0x600AC, &i_this->field_0xc04, 0, 0);
+ }
+ break;
+
+ case 302:
+ if (i_this->field_0xb44 == 30) {
+ dComIfGp_setItemOilCount(-(dComIfGs_getMaxOil() & 0xFFFF));
+ }
+
+ if (i_this->field_0xb44 == 80) {
+ i_this->field_0xb42 = 303;
+ i_this->field_0xb44 = 0;
+ i_this->field_0xb60.set(-30887.0f, 429.0f, -17181.0f);
+ i_this->field_0xb48.set(-30870.0f, 471.0f, -17527.0f);
+ }
+ break;
+
+ case 303:
+ if (i_this->field_0xb44 == 10) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 301;
+ a_this->speedF = l_HIO.field_0x1c;
+ }
+
+ if (i_this->field_0xb44 == 0x50) {
+ i_this->field_0xb42 = 100;
+ i_this->mMode = 302;
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0xe1]);
+ dComIfGs_offSwitch(61, fopAcM_GetRoomNo(a_this));
+ }
+ break;
+
+ case 350:
+ if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+ a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ return;
+ }
+
+ i_this->field_0xb42 = 351;
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ i_this->field_0xb44 = 0;
+ i_this->field_0xbb8 = 55.0f;
+ player->changeOriginalDemo();
+ i_this->field_0xb60 = a_this->current.pos;
+ i_this->field_0xb48.set(-37509.0f, 805.0f, -22416.0f);
+ // fallthrough
+ case 351:
+ sp44.set(-36523.0f, 335.0f, -20500.0f);
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp44, 0xffff8000, 0);
+ sp44 = a_this->current.pos;
+ cLib_addCalc2(&i_this->field_0xb60.x, sp44.x, 0.2f, 50.0f);
+ cLib_addCalc2(&i_this->field_0xb60.y, sp44.y + 100.0f, 0.2f, 50.0f);
+ cLib_addCalc2(&i_this->field_0xb60.z, sp44.z, 0.2f, 50.0f);
+
+ if (i_this->field_0xb44 == 105) {
+ i_this->field_0xb48.set(-37817.0f, 800.0f, -21442.0f);
+ }
+
+ if (i_this->field_0xb44 == 178) {
+ fpcM_Search(s_fsdown_sub, i_this);
+ }
+
+ if (i_this->field_0xb44 == 180) {
+ i_this->field_0xb60.set(-36666.0f, 600.0f, -22213.0f);
+ i_this->field_0xb48.set(-36489.0f, 399.0f, -20932.0f);
+ i_this->field_0xb6c.set(-36574.0f, 421.0f, -21554.0f);
+ i_this->field_0xb54.set(-36397.0f, 374.0f, -20263.0f);
+
+ i_this->field_0xb78.x = std::fabsf(i_this->field_0xb54.x - i_this->field_0xb48.x);
+ i_this->field_0xb78.y = std::fabsf(i_this->field_0xb54.y - i_this->field_0xb48.y);
+ i_this->field_0xb78.z = std::fabsf(i_this->field_0xb54.z - i_this->field_0xb48.z);
+ i_this->field_0xb84.x = std::fabsf(i_this->field_0xb6c.x - i_this->field_0xb60.x);
+ i_this->field_0xb84.y = std::fabsf(i_this->field_0xb6c.y - i_this->field_0xb60.y);
+ i_this->field_0xb84.z = std::fabsf(i_this->field_0xb6c.z - i_this->field_0xb60.z);
+ i_this->field_0xbc4 = 0.0f;
+ i_this->field_0xb42 = 352;
+ i_this->field_0xb44 = 0;
+ i_this->field_0xb60.y = 1500.0f;
+ }
+ break;
+
+ case 352:
+ if (i_this->field_0xb44 == 40) {
+ i_this->mMode = 40;
+ }
+
+ if (i_this->field_0xb44 == 110) {
+ fpcM_Search(s_fsdown_sub, i_this);
+ }
+
+ if (i_this->field_0xb44 > 160) {
+ cam_3d_morf(i_this, 0.1f);
+ cLib_addCalc2(&i_this->field_0xbc4, 0.2f, 1.0f, 0.005f);
+ } else if (25 < i_this->field_0xb44) {
+ cLib_addCalc2(&i_this->field_0xb60.y, 600.0f, 0.5f, 100.0f);
+ }
+
+ if (i_this->field_0xb44 == 230) {
+ i_this->field_0xb42 = 100;
+ fpcM_Search(s_fsdown_sub, i_this);
+ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x220]);
+ }
+ break;
+
+ case 360:
+ if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+ a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
+ return;
+ }
+
+ i_this->field_0xb42 = 361;
+ camera->mCamera.Stop();
+ camera->mCamera.SetTrimSize(3);
+ i_this->field_0xb44 = 0;
+ i_this->field_0xbb8 = 55.0f;
+ player->changeOriginalDemo();
+
+ i_this->field_0xb60.set(-36581.0f, 412.0f, -21418.0f);
+ i_this->field_0xb48.set(-36509.0f, 412.0f, -21127.0f);
+ i_this->field_0xb6c.set(-38113.0f, 1234.0f, -22897.0f);
+ i_this->field_0xb54.set(-37882.0f, 1182.0f, -22713.0f);
+
+ i_this->field_0xb78.x = std::fabsf(i_this->field_0xb54.x - i_this->field_0xb48.x);
+ i_this->field_0xb78.y = std::fabsf(i_this->field_0xb54.y - i_this->field_0xb48.y);
+ i_this->field_0xb78.z = std::fabsf(i_this->field_0xb54.z - i_this->field_0xb48.z);
+ i_this->field_0xb84.x = std::fabsf(i_this->field_0xb6c.x - i_this->field_0xb60.x);
+ i_this->field_0xb84.y = std::fabsf(i_this->field_0xb6c.y - i_this->field_0xb60.y);
+ i_this->field_0xb84.z = std::fabsf(i_this->field_0xb6c.z - i_this->field_0xb60.z);
+ i_this->field_0xbc4 = 0.0f;
+ anm_init(i_this, 39, 5.0f, 2, 1.0f);
+ i_this->mMode = 41;
+ i_this->mTimers[0] = 30;
+ // fallthrough
+ case 361:
+ case 362:
+ sp44.set(-36540.0f, 335.0f, -20870.0f);
+ daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp44, 0xffff8000, 0);
+ if (i_this->field_0xb44 >= 105) {
+ if (i_this->field_0xb44 == 105) {
+ i_this->mMsgFlow.init(a_this, 116, 0, NULL);
+ }
+
+ if (i_this->mMsgFlow.getNowMsgNo() == 0x1421) {
+ i_this->field_0xb42 = 362;
+ i_this->field_0xb44 = 0;
+ }
+ i_this->mMsgFlow.doFlow(a_this, NULL, 0);
+ }
+ break;
+
+ case 363:
+ if (i_this->field_0xb44 == 15) {
+ i_this->mTimers[2] = 30;
+ }
+ if (i_this->field_0xb44 >= 30) {
+ cam_3d_morf(i_this, 0.2f);
+ cLib_addCalc2(&i_this->field_0xbc4, 0.3f, 1.0f, 0.01f);
+ }
+
+ if (i_this->mMsgFlow.getNowMsgNo() == 0x1423) {
+ i_this->field_0xb42 = 363;
+ i_this->field_0xb44 = 0;
+ i_this->field_0xb6c.set(-36467.0f, 426.0f, -20914.0f);
+ i_this->field_0xb54.set(-36244.0f, 409.0f, -20714.0f);
+
+ i_this->field_0xb78.x = std::fabsf(i_this->field_0xb54.x - i_this->field_0xb48.x);
+ i_this->field_0xb78.y = std::fabsf(i_this->field_0xb54.y - i_this->field_0xb48.y);
+ i_this->field_0xb78.z = std::fabsf(i_this->field_0xb54.z - i_this->field_0xb48.z);
+ i_this->field_0xb84.x = std::fabsf(i_this->field_0xb6c.x - i_this->field_0xb60.x);
+ i_this->field_0xb84.y = std::fabsf(i_this->field_0xb6c.y - i_this->field_0xb60.y);
+ i_this->field_0xb84.z = std::fabsf(i_this->field_0xb6c.z - i_this->field_0xb60.z);
+ i_this->field_0xbc4 = 0.0f;
+ }
+ i_this->mMsgFlow.doFlow(a_this, NULL, 0);
+ break;
+
+ case 364:
+ cam_3d_morf(i_this, 0.1f);
+ cLib_addCalc2(&i_this->field_0xbc4, 0.3f, 1.0f, 0.01f);
+ if (i_this->mMsgFlow.doFlow(a_this, NULL, 0) != 0) {
+ i_this->field_0xb42 = 100;
+ }
+ break;
-/* 80A5280C-80A52898 00996C 008C+00 3/3 0/0 0/0 .text saru_count_check__FP12npc_ks_class
- */
-static void saru_count_check(npc_ks_class* param_0) {
- // NONMATCHING
-}
-
-/* ############################################################################################## */
-/* 80A5E2D8-80A5E2DC 0003DC 0004+00 0/1 0/0 0/0 .rodata @7645 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7645 = 5274.0f;
-COMPILER_STRIP_GATE(0x80A5E2D8, &lit_7645);
-#pragma pop
-
-/* 80A5E2DC-80A5E2E0 0003E0 0004+00 0/1 0/0 0/0 .rodata @7646 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7646 = 3250.0f;
-COMPILER_STRIP_GATE(0x80A5E2DC, &lit_7646);
-#pragma pop
+ }
-/* 80A5E2E0-80A5E2E4 0003E4 0004+00 0/1 0/0 0/0 .rodata @7647 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7647 = 6500.0f;
-COMPILER_STRIP_GATE(0x80A5E2E0, &lit_7647);
-#pragma pop
+ if (i_this->field_0xb42 == 99 || i_this->field_0xb42 == 98) {
+ if (i_this->field_0xb42 == 99) {
+ fopAcM_delete(a_this);
+ }
+
+ cMtx_YrotS(*calc_mtx, player->shape_angle.y);
+ sp44.x = 0.0f;
+ sp44.y = 100.0f;
+ sp44.z = -250.0f;
+ MtxPosition(&sp44, &i_this->field_0xb48);
+ i_this->field_0xb48 += player->current.pos;
+ i_this->field_0xb60 = player->current.pos;
+ i_this->field_0xb60.y += 120.0f;
+ i_this->field_0xb42 = 100;
+ }
-/* 80A5E2E4-80A5E2E8 0003E8 0004+00 0/2 0/0 0/0 .rodata @7648 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7648 = 3000.0f;
-COMPILER_STRIP_GATE(0x80A5E2E4, &lit_7648);
-#pragma pop
+ if (i_this->field_0xb42 == 100) {
+ camera->mCamera.Reset(i_this->field_0xb60, i_this->field_0xb48, i_this->field_0xbb8, 0);
+ camera->mCamera.Start();
+ camera->mCamera.SetTrimSize(0);
+ dComIfGp_event_reset();
+ daPy_getPlayerActorClass()->cancelOriginalDemo();
+ i_this->field_0xb42 = 0;
+ }
-/* 80A5E2E8-80A5E2EC 0003EC 0004+00 0/1 0/0 0/0 .rodata @7649 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7649 = 7211.0f;
-COMPILER_STRIP_GATE(0x80A5E2E8, &lit_7649);
-#pragma pop
+ if (i_this->field_0xb42 != 0) {
+ camera->mCamera.Set(i_this->field_0xb60, i_this->field_0xb48, i_this->field_0xbb8, 0);
+ i_this->field_0xb44++;
+ }
+}
-/* 80A5E2EC-80A5E2F0 0003F0 0004+00 0/3 0/0 0/0 .rodata @7650 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7650 = 450.0f;
-COMPILER_STRIP_GATE(0x80A5E2EC, &lit_7650);
-#pragma pop
+/* 80A5280C-80A52898 00996C 008C+00 3/3 0/0 0/0 .text saru_count_check__FP12npc_ks_class */
+static int saru_count_check(npc_ks_class* i_this) {
+ obj_sw_class* sw_p = (obj_sw_class*)fpcM_Search(s_sw_sub, i_this);
+ i_this->field_0x934 = sw_p;
+ if (i_this->field_0x934 == NULL) {
+ return 0;
+ } else {
+ for (int i = 0; i < i_this->field_0x934->field_0x91c; i++) {
+ if (saru_p[i] == NULL) {
+ return 0;
+ }
+ }
+
+ return 1;
+ }
+}
/* 80A52898-80A533B4 0099F8 0B1C+00 2/1 0/0 0/0 .text action_check__FP12npc_ks_class */
-static void action_check(npc_ks_class* param_0) {
+static void action_check(npc_ks_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ cXyz spd4;
+
+ switch (fopAcM_GetRoomNo(a_this)) {
+ case 0:
+ if (!dComIfGp_event_runCheck() && i_this->field_0x5b6 == 0) {
+ if (saru_p[1] == NULL) {
+ if (dComIfGs_isSwitch(22, fopAcM_GetRoomNo(a_this))) {
+ spd4.x = a_this->current.pos.x - 5.0f;
+ spd4.z = a_this->current.pos.z - 5274.0f;
+ if (JMAFastSqrt(spd4.x * spd4.x + spd4.z * spd4.z) < 500.0f) {
+ i_this->mActionID = 110;
+ i_this->mMode = 0;
+ i_this->field_0xaec = 1;
+ return;
+ }
+ } else {
+ dBgS_GndChk dStack_74;
+ spd4.set(0.0f, 3250.0f, 6500.0f);
+ dStack_74.SetPos(&spd4);
+ if (dComIfG_Bgsp().GroundCross(&dStack_74) > 3000.0f) {
+ i_this->mActionID = 112;
+ i_this->mMode = 0;
+ if (a_this->current.pos.y < 3000.0f) {
+ a_this->current.pos = player->current.pos;
+ a_this->old.pos = a_this->current.pos;
+ }
+
+ i_this->field_0xaec = 1;
+ return;
+ }
+ }
+ } else if (saru_p[1] != NULL && saru_p[2] != NULL && saru_p[3] != NULL) {
+ if (player->current.pos.y < 3000.0f) {
+ dComIfGs_onSwitch(82, fopAcM_GetRoomNo(a_this));
+ }
+
+ if (!dComIfGs_isSwitch(82, fopAcM_GetRoomNo(a_this))) {
+ spd4.x = player->current.pos.x - -500.0f;
+ spd4.z = player->current.pos.z - 7211.0f;
+ if (JMAFastSqrt(spd4.x * spd4.x + spd4.z * spd4.z) < 200.0f) {
+ dComIfGs_onSwitch(82, fopAcM_GetRoomNo(a_this));
+ for (int i = 0; i < 4; i++) {
+ saru_p[i]->mActionID = 111;
+ saru_p[i]->mMode = 0;
+ saru_p[i]->field_0xaec = 1;
+ }
+ i_this->field_0xb42 = 80;
+ }
+ }
+ }
+ }
+
+ if (!dComIfGs_isSwitch(82, fopAcM_GetRoomNo(a_this)) && saru_count_check(i_this) != 0) {
+ if (dComIfGs_isSwitch(22, fopAcM_GetRoomNo(a_this))) {
+ for (int i = 0; i < 2; i++) {
+ spd4 = player->current.pos - i_this->field_0x934->field_0x904[i];
+ if (spd4.abs() < 300.0f) {
+ i_this->field_0xbd9 = 0;
+ i_this->mActionID = 20;
+ i_this->mMode = 0;
+ i_this->field_0xaec = 0;
+ i_this->field_0xbc8 = i_this->field_0x934->field_0x904[i];
+ spd4 = i_this->field_0x934->field_0x904[i - 1] - i_this->field_0xbc8;
+ leader->field_0xbd4 = cM_atan2s(spd4.x, spd4.z);
+ leader->field_0xb42 = 10;
+ leader->field_0xb40 = i_this->field_0x934->field_0x570;
+
+ if (i_this->field_0x5b6 != 0) {
+ leader->field_0x934 = i_this->field_0x934;
+ leader->field_0xbc8 = i_this->field_0xbc8;
+ }
+ }
+ }
+ }
+ }
+ break;
+
+ case 1:
+ if (!dComIfGp_event_runCheck() && i_this->field_0x5b6 == 0 && saru_p[1] == NULL && a_this->field_0x567 == 0) {
+ spd4.x = a_this->current.pos.x - 5334.0f;
+ spd4.z = a_this->current.pos.z - 7609.0f;
+ if (JMAFastSqrt(spd4.x * spd4.x + spd4.z * spd4.z) < 700.0f) {
+ i_this->mActionID = 113;
+ i_this->mMode = 0;
+ i_this->field_0xaec = 1;
+ a_this->field_0x567 = 1;
+ }
+ }
+ break;
+
+ case 2:
+ case 4:
+ if (saru_count_check(i_this) != 0) {
+ int iVar1 = 1;
+ if (fopAcM_GetRoomNo(a_this) == 2) {
+ for (int i = 0; i < i_this->field_0x934->field_0x91c; i++) {
+ spd4 = player->current.pos - saru_p[i]->actor.current.pos;
+ if (spd4.abs() > 400.0f) {
+ iVar1 = 0;
+ }
+ }
+ }
+
+ if (iVar1 != 0) {
+ spd4.x = player->current.pos.x - i_this->field_0x934->field_0x904[0].x;
+ spd4.y = player->current.pos.y - (i_this->field_0x934->field_0x904[0].y - 450.0f);
+ spd4.z = player->current.pos.z - i_this->field_0x934->field_0x904[0].z;
+ if (spd4.abs() < 300.0f) {
+ i_this->field_0xbc8 = i_this->field_0x934->field_0x904[0];
+ if (i_this->field_0x5b6 == 0) {
+ i_this->field_0xbd9 = 0;
+ i_this->mActionID = 20;
+ i_this->mMode = 0;
+ i_this->field_0xaec = 0;
+ leader->field_0xb42 = 10;
+ leader->field_0xb40 = 0;
+ leader->field_0xbc8 = i_this->field_0xbc8;
+ spd4 = i_this->field_0x934->field_0x904[1] - i_this->field_0xbc8;
+ leader->field_0xbd4 = cM_atan2s(spd4.x, spd4.z);
+ } else {
+ i_this->mActionID = 22;
+ i_this->mMode = 0;
+ i_this->field_0x930 = leader;
+ }
+ }
+ }
+ } else if (!checkDoorDemo() && fopAcM_GetRoomNo(a_this) == 4 && i_this->field_0x5b6 == 0) {
+ if (!dComIfGs_isSwitch(22, fopAcM_GetRoomNo(a_this))) {
+ i_this->mActionID = 203;
+ i_this->mMode = 0;
+ }
+ }
+ break;
+
+ case 9:
+ if (!dComIfGp_event_runCheck() && i_this->field_0x5b6 == 4 && player->current.pos.z < -3900.0f) {
+ if (!dComIfGs_isSwitch(81, fopAcM_GetRoomNo(a_this))) {
+ dBgS_GndChk dStack_c8;
+ spd4.set(7275.0f, 3373.0f, -4790.0f);
+ dStack_c8.SetPos(&spd4);
+ if (dComIfG_Bgsp().GroundCross(&dStack_c8) > 3000.0f) {
+ i_this->mActionID = 115;
+ i_this->mMode = 0;
+ dComIfGs_onSwitch(81, fopAcM_GetRoomNo(a_this));
+ i_this->field_0xaec = 1;
+ }
+ }
+ }
+ break;
+
+ case 12:
+ if (!dComIfGp_event_runCheck() && i_this->field_0x5b6 == 4) {
+ if (!dComIfGs_isSwitch(83, fopAcM_GetRoomNo(a_this))) {
+ i_this->mActionID = 204;
+ i_this->mMode = 0;
+ fopAcM_setRoomLayer(i_this, 12);
+ i_this->field_0xb42 = 77;
+ i_this->field_0xaec = 1;
+ }
+ }
+ }
}
-/* 80A533B4-80A5352C 00A514 0178+00 1/1 0/0 0/0 .text water_check__FP12npc_ks_class4cXyzf
- */
-static void water_check(npc_ks_class* param_0, cXyz param_1, f32 param_2) {
+/* 80A533B4-80A5352C 00A514 0178+00 1/1 0/0 0/0 .text water_check__FP12npc_ks_class4cXyzf */
+static BOOL water_check(npc_ks_class* i_this, cXyz param_2, f32 param_3) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ dBgS_GndChk dStack_80;
+ dBgS_LinChk dStack_f0;
+ cXyz sp154;
+ sp154.x = param_2.x;
+ sp154.y = param_2.y + 3000.0f;
+ sp154.z = param_2.z;
+ dStack_f0.Set(&a_this->current.pos, &sp154, a_this);
+ if (dComIfG_Bgsp().LineCross(&dStack_f0)) {
+ sp154.y = dStack_f0.GetCross().y - 10.0f;;
+ }
+
+ dBgS_ObjGndChk_Spl cStack_148;
+ cStack_148.SetPos(&sp154);
+ i_this->field_0x63c = dComIfG_Bgsp().GroundCross(&cStack_148);
+ sp154.y = i_this->field_0x63c + 60.0f;
+
+ dStack_80.SetPos(&sp154);
+ if ((i_this->field_0x63c - dComIfG_Bgsp().GroundCross(&dStack_80)) > param_3) {
+ return TRUE;
+ }
+
+ return FALSE;
}
-/* ############################################################################################## */
-/* 80A5E2F0-80A5E2F4 0003F4 0004+00 0/0 0/0 0/0 .rodata @7651 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7651 = 5334.0f;
-COMPILER_STRIP_GATE(0x80A5E2F0, &lit_7651);
-#pragma pop
+/* 80A5FF54 */
+static u8 gap_05_00000114_bss;
-/* 80A5E2F4-80A5E2F8 0003F8 0004+00 0/0 0/0 0/0 .rodata @7652 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7652 = 7609.0f;
-COMPILER_STRIP_GATE(0x80A5E2F4, &lit_7652);
-#pragma pop
+/* 80A5352C-80A548E4 00A68C 13B8+00 2/1 0/0 0/0 .text npc_ks_option__FP12npc_ks_class */
+static int npc_ks_option(npc_ks_class* i_this) {
+ // NONMATCHING
+ static u16 w_eff_id[4] = {
+ 0x01B8, 0x01B9, 0x01BA, 0x01BB
+ };
+
+ fopAc_ac_c* a_this = &i_this->actor;
+ fopAc_ac_c* actor_p;
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ cXyz sp140, sp14c;
+ f32 fVar3 = 0.0f;
+ f32 fVar4 = 5.0f;
+ int iVar4 = 0;
+ int iVar3 = 1;
+ int iVar2 = 1;
+ int iVar1 = 1;
+ s16 sVar1 = 0x800;
+ int frame = i_this->mpModelMorf->getFrame();
+ f32 fVar1 = 0.0f;
+ f32 fVar2;
+ u32 i_soundID;
+ if (fopAcM_GetRoomNo(a_this) == 7 || fopAcM_GetRoomNo(a_this) == 8) {
+ fVar1 = 10000.0f;
+ }
-/* 80A5E2F8-80A5E2FC 0003FC 0004+00 0/8 0/0 0/0 .rodata @7653 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7653 = 700.0f;
-COMPILER_STRIP_GATE(0x80A5E2F8, &lit_7653);
-#pragma pop
+ if (daPy_getPlayerActorClass()->checkAutoJumpStart() && i_this->field_0xbd8 < 3) {
+ i_this->field_0xbd8++;
+ }
-/* 80A5E2FC-80A5E300 000400 0004+00 0/0 0/0 0/0 .rodata @7654 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7654 = -3900.0f;
-COMPILER_STRIP_GATE(0x80A5E2FC, &lit_7654);
-#pragma pop
+ if (i_this->mMode >= 30 && i_this->mMode < 40) {
+ actor_p = bomb_check(i_this);
+ if (actor_p == NULL) {
+ i_this->mMode = 0;
+ } else {
+ a_this->health = 0;
+ sp140.x = actor_p->current.pos.x - a_this->current.pos.x;
+ sp140.z = actor_p->current.pos.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp140.x, sp140.z);
+ fVar2 = JMAFastSqrt(sp140.x * sp140.x + sp140.z * sp140.z);
+ }
+ } else if (i_this->mMode >= 40 && i_this->mMode < 50) {
+ actor_p = enemy_check(i_this, fVar1 + 700.0f);
+ if (actor_p == NULL) {
+ i_this->mMode = 0;
+ } else {
+ a_this->health = 0;
+ if (i_this->mMode == 40) {
+ sp140.x = actor_p->current.pos.x - a_this->current.pos.x;
+ sp140.z = actor_p->current.pos.z - a_this->current.pos.z;
+ i_this->field_0x8fc.y = cM_atan2s(sp140.x, sp140.z);
+ fVar2 = JMAFastSqrt(sp140.x * sp140.x + sp140.z * sp140.z);
+ }
+ }
+ }
-/* 80A5E300-80A5E304 000404 0004+00 0/0 0/0 0/0 .rodata @7655 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7655 = 7275.0f;
-COMPILER_STRIP_GATE(0x80A5E300, &lit_7655);
-#pragma pop
+ fVar1 = l_HIO.field_0xc;
+ if (checkDoorDemo()) {
+ fVar1 -= 70.0f;
+ }
-/* 80A5E304-80A5E308 000408 0004+00 0/0 0/0 0/0 .rodata @7656 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7656 = 3373.0f;
-COMPILER_STRIP_GATE(0x80A5E304, &lit_7656);
-#pragma pop
+ switch (i_this->mMode) {
+ case 0:
+ i_this->mMode = 1;
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ i_this->mTimers[0] = cM_rndF(100.0f) + 100.0f;
+ fopAcM_setStageLayer(i_this);
+ a_this->health = 0;
+ // fallthrough
+ case 1:
+ if (i_this->mTimers[0] == 0) {
+ if (cM_rndF(1.0f) < 0.5f) {
+ if (i_this->field_0x5d0 != 51) {
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ i_this->mTimers[0] = cM_rndF(100.0f) + 80.0f;
+ i_soundID = Z2SE_KOSARU_V_WAIT;
+ }
+ } else if (i_this->field_0x5d0 != 53) {
+ anm_init(i_this, 53, 8.0f, 2, 1.0f);
+ i_this->mTimers[0] = cM_rndF(30.0f) + 40.0f;
+ i_soundID = Z2SE_KOSARU_V_WAIT;
+ }
+
+ }
+
+ if (i_this->mTimers[1] == 0 && i_this->field_0x5c4 > (fVar1 + 20.0f)) {
+ anm_init(i_this, 28, 5.0f, 2, 1.0f);
+ i_this->mMode = 2;
+ i_soundID = Z2SE_KOSARU_V_JUMP;
+ }
+ break;
+
+ case 2:
+ fVar3 = l_HIO.field_0x10;
+ if (i_this->field_0x5c4 < (fVar1 - 20.0f)) {
+ i_this->mMode = 0;
+ } else if ((fVar1 + 200.0f) > i_this->field_0x5c4) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ i_this->mMode = 3;
+ i_soundID = Z2SE_KOSARU_V_WALK;
+ }
+
+ if (i_this->mObjAcch.ChkWallHit() && i_this->mObjAcch.ChkGroundHit() && !otherBgCheck(a_this, player)) {
+ a_this->speed.y = 30.0f;
+ }
+ break;
+
+ case 3:
+ fVar3 = l_HIO.field_0x14;
+ if (i_this->mpModelMorf->checkFrame(1.0f)) {
+ i_soundID = Z2SE_KOSARU_V_WALK;
+ }
+
+ if (i_this->field_0x5c4 < (fVar1 + 130.0f)) {
+ anm_init(i_this, 28, 3.0f, 2, 1.0f);
+ i_this->mMode = 2;
+ }
+
+ if (i_this->mObjAcch.ChkWallHit() && i_this->mObjAcch.ChkGroundHit() && !otherBgCheck(a_this, player)) {
+ a_this->speed.y = 30.0f;
+ }
+ break;
+
+ case 5:
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ if (frame >= 11) {
+ i_this->mMode = 0;
+ }
+ break;
+
+ case 7:
+ anm_init(i_this, 47, 3.0f, 2, i_this->field_0x5d4);
+ i_this->mMode = 8;
+ // fallthrough
+ case 8:
+ if (i_this->mpModelMorf->checkFrame(1.0f)) {
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_SWIM, 0, -1);
+ }
+
+ iVar1 = 0;
+ a_this->gravity = 0.0f;
+ cLib_addCalc0(&a_this->speed.y, 1.0f, 1.0f);
+ cLib_addCalc2(&a_this->current.pos.y, i_this->field_0x63c, 0.1f, 10.0f);
+
+ if (i_this->field_0x5c4 > (fVar1 + 50.0f)) {
+ fVar3 = 5.0f;
+ } else {
+ fVar3 = 0.0f;
+ }
+
+ cLib_addCalc2(&i_this->field_0x5d4, fVar3 + 0.5f, 1.0f, 0.1f);
+ i_this->mpModelMorf->setPlaySpeed(i_this->field_0x5d4);
+
+ fVar4 = 0.1f;
+ sVar1 = 0x100;
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+
+ if (i_this->mTimers[0] == 0) {
+ i_this->mTimers[0] = cM_rndF(30.0f) + 20.0f;
+ i_soundID = Z2SE_KOSARU_V_WAIT;
+ }
+ break;
+
+ case 10:
+ i_this->mTimers[0] = cM_rndF(30.0f) + 20.0f;
+ i_this->mMode = 11;
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ // fallthrough
+ case 11:
+ i_this->field_0x5fc = 1;
+ if (i_this->mTimers[0] == 0) {
+ if (cM_rndF(1.0f) < 0.5f) {
+ anm_init(i_this, 30, 3.0f, 0, 1.0f);
+ } else {
+ anm_init(i_this, 5, 3.0f, 0, 1.0f);
+ }
+
+ i_this->mMode = 12;
+ }
+ break;
+
+ case 12:
+ i_this->field_0x5fc = 1;
+ if (i_this->mpModelMorf->isStop()) {
+ if (cM_rndF(1.0f) < 0.5f) {
+ anm_init(i_this, 30, 3.0f, 0, 1.0f);
+ } else {
+ anm_init(i_this, 5, 3.0f, 0, 1.0f);
+ }
+
+ i_this->mMode = 13;
+ }
+ break;
+
+ case 13:
+ if (i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 0;
+ }
+ break;
+
+ case 20:
+ iVar2 = 0;
+ if (i_this->mTimers[0] == 0) {
+ i_this->mActionID = 200;
+ i_this->mMode = 0;
+ i_this->field_0xaec = 0;
+ return 1;
+ }
+ break;
+
+ case 30:
+ fVar3 = l_HIO.field_0x14;
+ i_this->field_0x8fc.y += 0x8000;
+ if (fVar2 > 400.0f) {
+ i_this->mMode = 31;
+ anm_init(i_this, 51, 5.0f, 2, 1.0f);
+ }
+ break;
+
+ case 31:
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ i_this->field_0x938 = fopAcM_GetID(actor_p);
+ i_this->field_0x5fc = 1;
+ if (fVar2 < 350.0f) {
+ i_this->mMode = 30;
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+ break;
+
+ case 40:
+ anm_init(i_this, 39, 5.0f, 2, 1.0f);
+ i_this->mMode = 41;
+ i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f;
+ i_this->field_0x8fc.y += 0x8000;
+ break;
+
+ case 41:
+ sVar1 = 0x1000;
+ if ((i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7)) || ((frame > 40 && frame < 48) || frame > 65)) {
+ i_this->field_0x5e0 = 4;
+ }
+
+ if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) {
+ anm_init(i_this, 43, 5.0f, 0, 1.0f);
+ }
+
+ if (i_this->field_0x5d0 == 43) {
+ if (i_this->mpModelMorf->isStop()) {
+ i_this->mMode = 40;
+ }
+ }
+ break;
+
+ case 50:
+ iVar3 = 2;
+ a_this->speedF = 0.0f;
+ if (i_this->mTimers[0] == 0) {
+ fopAc_ac_c* player_p2 = dComIfGp_getPlayer(0);
+ cMtx_YrotS(*calc_mtx, player_p2->shape_angle.y);
+ sp140.y = 50.0f;
+ sp140.z = 0.0f;
+
+ int i = 0;
+ for (; i < 2; i++) {
+ dBgS_GndChk dStack_e0;
+ sp140.x = yuka_jump_x;
+ MtxPosition(&sp140, &sp14c);
+ sp14c += player_p2->current.pos;
+ dStack_e0.SetPos(&sp14c);
+ sp14c.y = dComIfG_Bgsp().GroundCross(&dStack_e0);
+ yuka_jump_x *= -1.0f;
+ if (fabsf(sp14c.y - player_p2->current.pos.y) < 20.0f) {
+ i_this->mMode = 51;
+ i_this->field_0x8f0 = sp14c;
+ i_this->field_0x910 = a_this->current.pos;
+ i_this->field_0x91c = i_this->field_0x8f0;
+ anm_init(i_this, 32, 2.0f, 0, 1.0f);
+ break;
+ }
+ }
+ if (i == 2) {
+ i_this->mMode = 0;
+ }
+ }
+
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ fVar3 = 4096.0f;
+ break;
+
+ case 51:
+ iVar3 = 2;
+ if (i_this->field_0x5d0 == 32 && i_this->mpModelMorf->isStop()) {
+ anm_init(i_this, 35, 1.0f, 0, 1.0f);
+ a_this->speedF = 40.0f;
+ i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1);
+ i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ i_this->field_0xbe0 = 1;
+ }
+
+ sp140 = i_this->field_0x8f0 - a_this->current.pos;
+ i_this->field_0x8fc.y = cM_atan2s(sp140.x, sp140.z);
+ i_this->field_0x8fc.x = -cM_atan2s(sp140.y, JMAFastSqrt(sp140.x * sp140.x + sp140.z * sp140.z));
+ sVar1 = 0x2000;
+
+ if (a_this->speedF > 25.0f) {
+ i_this->field_0x90c = 1;
+ }
+
+ if (sp140.abs() <= a_this->speedF * 1.2f) {
+ i_this->mMode = 0;
+ a_this->speedF *= 0.5f;
+ i_this->field_0xbe0 = 1;
+ return iVar3;
+ }
+
+ fVar3 = a_this->speedF;
+ }
-/* 80A5E308-80A5E30C 00040C 0004+00 0/0 0/0 0/0 .rodata @7657 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_7657 = -4790.0f;
-COMPILER_STRIP_GATE(0x80A5E308, &lit_7657);
-#pragma pop
+ cLib_addCalc2(&a_this->speedF, fVar3, 1.0f, fVar4);
+ if (i_this->mMode < 7) {
+ i_this->field_0x5fc = 1;
+ if (fVar3 > 1.0f) {
+ i_this->field_0x8fc.y = i_this->field_0x5c8;
+ } else {
+ s16 sVar2 = a_this->current.angle.y - i_this->field_0x5c8;
+ if ((sVar2 > 0x3000 || sVar2 < -0x3000) && i_this->mMode < 5) {
+ anm_init(i_this, 28, 3.0f, 0, 1.0f);
+ i_this->mMode = 5;
+ i_soundID = Z2SE_KOSARU_V_WALK;
+ }
+ }
+
+ if (a_this->health != 0) {
+ a_this->health = 0;
+ i_this->mMode = 10;
+ return iVar3;
+ }
+
+ if (!checkDoorDemo()) {
+ npc_ks_class* npc_ks_p = (npc_ks_class*)fpcM_Search(s_01_sub, i_this);
+ if (npc_ks_p != NULL) {
+ sp140 = npc_ks_p->actor.current.pos - a_this->current.pos;
+ i_this->field_0x8fc.y = cM_atan2s(sp140.x, sp140.z);
+ i_this->mMode = 20;
+ i_this->mTimers[0] = 60;
+ return iVar3;
+ }
+ }
+
+ if (i_this->mTimers[3] == 0) {
+ if (cM_rndF(1.0f) < 0.5f) {
+ i_this->field_0x938 = fopAcM_GetID(en_search_test(i_this));
+ } else {
+ i_this->field_0x938 = -1;
+ }
+
+ i_this->mTimers[3] = cM_rndF(30.0f) + 30.0f;
+ }
+
+ if ((i_this->field_0x5e6 & 15) == 0 && bomb_view_check(i_this) != NULL) {
+ i_this->mMode = 30;
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ return iVar3;
+ }
+
+ if ((i_this->field_0x5e6 + 2 & 15) == 0 && enemy_view_check(i_this, fVar1 + 600.0f) != NULL) {
+ i_this->mMode = 40;
+ return iVar3;
+ }
+ }
-/* 80A5E30C-80A5E310 000410 0004+00 0/2 0/0 0/0 .rodata @8130 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_8130 = 8.0f;
-COMPILER_STRIP_GATE(0x80A5E30C, &lit_8130);
-#pragma pop
+ cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 2, sVar1);
+ cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800);
+
+ fopAc_ac_c* player_p3 = dComIfGp_getPlayer(0);
+ if (iVar2 != 0) {
+ if (fabsf(player_p3->current.pos.y - a_this->current.pos.y) > 3000.0f) {
+ if (fopAcM_CheckCondition(a_this, 4) != 0) {
+ if (fopAcM_otherBgCheck(a_this, dComIfGp_getPlayer(0))) {
+ if (iVar1 != 0 && player_p3->speedF > 2.0f) {
+ camera_class* camera = dComIfGp_getCamera(0);
+ sp140.x = camera->lookat.eye.x - camera->lookat.center.x;
+ sp140.z = camera->lookat.eye.z - camera->lookat.center.z;
+ cMtx_YrotS(*calc_mtx, cM_atan2s(sp140.x, sp140.z));
+ sp140.x = 0.0f;
+ sp140.y = -50.0f;
+ sp140.z = 100.0f;
+ MtxPosition(&sp140, &sp14c);
+ sp14c += camera->lookat.eye;
+
+ dBgS_GndChk dStack_134;
+ dStack_134.SetPos(&sp14c);
+ if (fabs(sp14c.y - dComIfG_Bgsp().GroundCross(&dStack_134)) < 500.0f) {
+ a_this->current.pos = sp14c;
+ a_this->old = a_this->current;
+ OS_REPORT("////////KS OP RESET \n");
+ } else {
+ OS_REPORT("////////KS OP NO FLOOR・NONRESET \n");
+ iVar4 = 0;
+ }
+ } else {
+ iVar4 = 0;
+ }
+ }
+ }
+ }
+
+ if (iVar4 != 0) {
+ i_this->mSound.startCreatureVoice(i_soundID, -1);
+ }
+
+ if (i_this->field_0x94c != 0 && (i_this->field_0x5d0 == 26 || i_this->field_0x5d0 == 28)) {
+ anm_init(i_this, 55, 3.0f, 2, 1.0f);
+ } else if (i_this->field_0x94c == 0 && i_this->field_0x5d0 == 55) {
+ anm_init(i_this, 26, 3.0f, 2, 1.0f);
+ }
+
+ if (iVar1 != 0) {
+ if (i_this->field_0xbdd != 0 && a_this->current.pos.y < i_this->field_0x63c) {
+ if (a_this->speed.y < -10.0f) {
+ a_this->speed.y = -10.0f;
+ }
+
+ i_this->mMode = 7;
+ a_this->speedF = 0.0f;
+ i_this->field_0x5d4 = 0.0f;
+ cXyz sp158 = a_this->current.pos;
+ sp158.y = i_this->field_0x63c;
+
+ static cXyz sc;
+ if (gap_05_00000114_bss == 0) {
+ sc = cXyz(1.0f, 1.0f, 1.0f);
+ gap_05_00000114_bss = 1;
+ }
+
+ for (int i = 0; i < 4; i++) {
+ i_this->field_0xbe4[i] = dComIfGp_particle_set(i_this->field_0xbe4[i], w_eff_id[i], &sp158, &a_this->tevStr, NULL,
+ &sc, 0xFF, NULL, -1, NULL, NULL, NULL);
+ }
+
+ i_this->mSound.startCreatureSound(Z2SE_AL_INTO_WATER, 0, -1);
+ return iVar3;
+ }
+
+ if (i_this->mMode < 50 && i_this->field_0xbd8 != 0) {
+ i_this->field_0xbd8--;
+ i_this->mMode = 50;
+ i_this->mTimers[0] = 20;
+ }
+ } else {
+ if (a_this->speedF >= 3.0f) {
+ fVar4 = 0.2f;
+ } else {
+ fVar4 = 0.05f;
+ }
+
+ cXyz sp164 = a_this->current.pos;
+ sp164.y = i_this->field_0x63c;
+ fopAcM_effHamonSet(&i_this->field_0xbf4, &sp164, 1.5f, fVar4);
+ if (i_this->field_0xbdd == 0) {
+ i_this->mMode = 0;
+ }
+ }
+ }
-/* 80A5352C-80A548E4 00A68C 13B8+00 2/1 0/0 0/0 .text npc_ks_option__FP12npc_ks_class */
-static void npc_ks_option(npc_ks_class* param_0) {
- // NONMATCHING
+ action_check(i_this);
+ return iVar3;
}
-/* 80A548E4-80A54A14 00BA44 0130+00 1/1 0/0 0/0 .text npc_ks_awaydoor__FP12npc_ks_class
- */
+/* 80A548E4-80A54A14 00BA44 0130+00 1/1 0/0 0/0 .text npc_ks_awaydoor__FP12npc_ks_class */
static void npc_ks_awaydoor(npc_ks_class* param_0) {
// NONMATCHING
}
-/* 80A54A14-80A55174 00BB74 0760+00 1/1 0/0 0/0 .text npc_ks_guide_00__FP12npc_ks_class
- */
+/* 80A54A14-80A55174 00BB74 0760+00 1/1 0/0 0/0 .text npc_ks_guide_00__FP12npc_ks_class */
static void npc_ks_guide_00(npc_ks_class* param_0) {
// NONMATCHING
}
@@ -3909,14 +4996,14 @@ COMPILER_STRIP_GATE(0x80A5E400, &lit_10881);
/* 80A5FF48-80A5FF58 000108 000C+04 0/0 0/0 0/0 .bss @7870 */
#pragma push
#pragma force_active on
-static u8 lit_7870[12 + 4 /* padding */];
+static u8 lit_7870[12];
#pragma pop
+// /* 80A5FF54 */
+// static u8 gap_05_00000114_bss;
+
/* 80A5FF58-80A5FF64 000118 000C+00 0/0 0/0 0/0 .bss sc$7869 */
-#pragma push
-#pragma force_active on
-static u8 sc[12];
-#pragma pop
+// static cXyz sc[12];
/* 80A5FF64-80A5FF68 000124 0004+00 0/2 0/0 0/0 .bss c_start */
#pragma push
@@ -4104,395 +5191,33 @@ extern "C" void __dt__10cCcD_GSttsFv() {
// NONMATCHING
}
-/* 80A5DA90-80A5DAD8 014BF0 0048+00 2/1 0/0 0/0 .text __dt__14daNpc_Ks_HIO_cFv */
-daNpc_Ks_HIO_c::~daNpc_Ks_HIO_c() {
- // NONMATCHING
-}
-
-/* 80A5DAD8-80A5DB30 014C38 0058+00 0/0 1/0 0/0 .text __sinit_d_a_npc_ks_cpp */
-void __sinit_d_a_npc_ks_cpp() {
- // NONMATCHING
-}
-
-#pragma push
-#pragma force_active on
-REGISTER_CTORS(0x80A5DAD8, __sinit_d_a_npc_ks_cpp);
-#pragma pop
-
-/* 80A5DB30-80A5DB38 014C90 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */
-static void func_80A5DB30() {
- // NONMATCHING
-}
-
-/* 80A5DB38-80A5DB40 014C98 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */
-static void func_80A5DB38() {
- // NONMATCHING
-}
-
-/* 80A5DB40-80A5DB54 014CA0 0014+00 1/1 0/0 0/0 .text cancelOriginalDemo__9daPy_py_cFv */
-// void daPy_py_c::cancelOriginalDemo() {
-extern "C" void cancelOriginalDemo__9daPy_py_cFv() {
- // NONMATCHING
-}
-
-/* 80A5DB54-80A5DB80 014CB4 002C+00 1/1 0/0 0/0 .text dComIfGp_event_reset__Fv */
-// static void dComIfGp_event_reset() {
-extern "C" static asm void dComIfGp_event_reset__Fv() {
- // NONMATCHING
-}
-
-/* 80A5DB80-80A5DB9C 014CE0 001C+00 1/1 0/0 0/0 .text __ct__4cXyzFRC4cXyz */
-// cXyz::cXyz(cXyz const& param_0) {
-extern "C" void __ct__4cXyzFRC4cXyz() {
- // NONMATCHING
-}
-
-/* 80A5DB9C-80A5DBB4 014CFC 0018+00 1/1 0/0 0/0 .text dComIfGp_setItemOilCount__Fl */
-// static void dComIfGp_setItemOilCount(s32 param_0) {
-extern "C" static asm void dComIfGp_setItemOilCount__Fl() {
- // NONMATCHING
-}
+AUDIO_INSTANCES;
-/* 80A5DBB4-80A5DBC4 014D14 0010+00 1/1 0/0 0/0 .text dComIfGs_getMaxOil__Fv */
-// static void dComIfGs_getMaxOil() {
-extern "C" static asm void dComIfGs_getMaxOil__Fv() {
- // NONMATCHING
-}
-
-/* 80A5DBC4-80A5DBD4 014D24 0010+00 1/1 0/0 0/0 .text daPy_getPlayerActorClass__Fv */
-// static void daPy_getPlayerActorClass() {
-extern "C" static asm void daPy_getPlayerActorClass__Fv() {
- // NONMATCHING
-}
-
-/* 80A5DBD4-80A5DC48 014D34 0074+00 1/1 0/0 0/0 .text
- * dComIfGp_particle_set__FUsPC4cXyzPC5csXyzPC4cXyz */
-// static void dComIfGp_particle_set(u16 param_0, cXyz const* param_1, csXyz const* param_2,
-// cXyz const* param_3) {
-extern "C" static asm void dComIfGp_particle_set__FUsPC4cXyzPC5csXyzPC4cXyz() {
- // NONMATCHING
-}
-
-/* 80A5DC48-80A5DC64 014DA8 001C+00 1/1 0/0 0/0 .text changeDemoPos0__9daPy_py_cFPC4cXyz
- */
-// void daPy_py_c::changeDemoPos0(cXyz const* param_0) {
-extern "C" void changeDemoPos0__9daPy_py_cFPC4cXyz() {
- // NONMATCHING
-}
-
-/* 80A5DC64-80A5DC98 014DC4 0034+00 1/1 0/0 0/0 .text __apl__4cXyzFRC3Vec */
-// void cXyz::operator+=(Vec const& param_0) {
-extern "C" void __apl__4cXyzFRC3Vec() {
- // NONMATCHING
-}
-
-/* 80A5DC98-80A5DCA4 014DF8 000C+00 1/1 0/0 0/0 .text fabsf__3stdFf */
-// void std::fabsf(f32 param_0) {
-extern "C" void fabsf__3stdFf() {
- // NONMATCHING
-}
-
-/* 80A5DCA4-80A5DCB4 014E04 0010+00 1/1 0/0 0/0 .text set__4cXyzFfff */
-// void cXyz::set(f32 param_0, f32 param_1, f32 param_2) {
-extern "C" void set__4cXyzFfff() {
- // NONMATCHING
-}
-
-/* 80A5DCB4-80A5DCD0 014E14 001C+00 1/1 0/0 0/0 .text __as__4cXyzFRC4cXyz */
-// void cXyz::operator=(cXyz const& param_0) {
-extern "C" void __as__4cXyzFRC4cXyz() {
- // NONMATCHING
-}
-
-/* 80A5DCD0-80A5DCD8 -00001 0008+00 0/0 0/0 0/0 .text changeDemoParam0__9daPy_py_cFi */
-// void daPy_py_c::changeDemoParam0(int param_0) {
-extern "C" void changeDemoParam0__9daPy_py_cFi(daPy_py_c* param_0, int param_1) {
- *(u32*)(((u8*)param_0) + 1548) /* this->field_0x60c */ = (u32)(param_1);
-}
-
-/* 80A5DCD8-80A5DCEC 014E38 0014+00 1/1 0/0 0/0 .text changeDemoMode__9daPy_py_cFUliis */
-// void daPy_py_c::changeDemoMode(u32 param_0, int param_1, int param_2, s16 param_3) {
-extern "C" void changeDemoMode__9daPy_py_cFUliis() {
- // NONMATCHING
-}
-
-/* 80A5DCEC-80A5DD00 014E4C 0014+00 1/1 0/0 0/0 .text changeOriginalDemo__9daPy_py_cFv */
-// void daPy_py_c::changeOriginalDemo() {
-extern "C" void changeOriginalDemo__9daPy_py_cFv() {
- // NONMATCHING
-}
-
-/* 80A5DD00-80A5DD10 014E60 0010+00 1/1 0/0 0/0 .text onCondition__11dEvt_info_cFUs */
-// void dEvt_info_c::onCondition(u16 param_0) {
-extern "C" void onCondition__11dEvt_info_cFUs() {
- // NONMATCHING
-}
-
-/* 80A5DD10-80A5DD24 014E70 0014+00 1/1 0/0 0/0 .text checkCommandDemoAccrpt__11dEvt_info_cFv */
-// void dEvt_info_c::checkCommandDemoAccrpt() {
-extern "C" void checkCommandDemoAccrpt__11dEvt_info_cFv() {
- // NONMATCHING
-}
-
-/* 80A5DD24-80A5DD3C 014E84 0018+00 1/1 0/0 0/0 .text dComIfGp_getCamera__Fi */
-// static void dComIfGp_getCamera(int param_0) {
-extern "C" static asm void dComIfGp_getCamera__Fi() {
- // NONMATCHING
-}
-
-/* 80A5DD3C-80A5DD58 014E9C 001C+00 1/1 0/0 0/0 .text dComIfGp_getPlayerCameraID__Fi */
-// static void dComIfGp_getPlayerCameraID(int param_0) {
-extern "C" static asm void dComIfGp_getPlayerCameraID__Fi() {
- // NONMATCHING
-}
-
-/* 80A5DD58-80A5DD70 014EB8 0018+00 1/1 0/0 0/0 .text dComIfGp_getPlayer__Fi */
-// static void dComIfGp_getPlayer(int param_0) {
-extern "C" void dComIfGp_getPlayer__Fi() {
- // NONMATCHING
-}
-
-/* 80A5DD70-80A5DDC0 014ED0 0050+00 1/1 0/0 0/0 .text checkShadowReturnEnd__9daMidna_cCFv
- */
-// void daMidna_c::checkShadowReturnEnd() const {
-extern "C" void checkShadowReturnEnd__9daMidna_cCFv() {
- // NONMATCHING
-}
-
-/* 80A5DDC0-80A5DDC8 -00001 0008+00 0/0 0/0 0/0 .text changeDemoMode__9daMidna_cFUl */
-// void daMidna_c::changeDemoMode(u32 param_0) {
-extern "C" void changeDemoMode__9daMidna_cFUl(daMidna_c* param_0, u32 param_1) {
- *(u32*)(((u8*)param_0) + 2240) /* this->field_0x8c0 */ = (u32)(param_1);
-}
-
-/* 80A5DDC8-80A5DDD4 014F28 000C+00 1/1 0/0 0/0 .text changeOriginalDemo__9daMidna_cFv */
-// void daMidna_c::changeOriginalDemo() {
-extern "C" void changeOriginalDemo__9daMidna_cFv() {
- // NONMATCHING
-}
-
-/* 80A5DDD4-80A5DDE4 014F34 0010+00 1/1 0/0 0/0 .text dComIfGp_getVibration__Fv */
-// static void dComIfGp_getVibration() {
-extern "C" static asm void dComIfGp_getVibration__Fv() {
- // NONMATCHING
-}
-
-/* 80A5DDE4-80A5DDF4 014F44 0010+00 1/1 0/0 0/0 .text __ct__4cXyzFfff */
-// cXyz::cXyz(f32 param_0, f32 param_1, f32 param_2) {
-extern "C" void __ct__4cXyzFfff() {
- // NONMATCHING
-}
-
-/* 80A5DDF4-80A5DE04 014F54 0010+00 1/1 0/0 0/0 .text dMeter2Info_setOilGaugeBackUp__FUs
- */
-// static void dMeter2Info_setOilGaugeBackUp(u16 param_0) {
-extern "C" static asm void dMeter2Info_setOilGaugeBackUp__FUs() {
- // NONMATCHING
-}
-
-/* 80A5DE04-80A5DE14 014F64 0010+00 1/1 0/0 0/0 .text dComIfGs_getOil__Fv */
-// static void dComIfGs_getOil() {
-extern "C" static asm void dComIfGs_getOil__Fv() {
- // NONMATCHING
-}
-
-/* 80A5DE14-80A5DE4C 014F74 0038+00 1/1 0/0 0/0 .text dComIfGs_setItem__FiUc */
-// static void dComIfGs_setItem(int param_0, u8 param_1) {
-extern "C" static asm void dComIfGs_setItem__FiUc() {
- // NONMATCHING
-}
-
-/* 80A5DE4C-80A5DE54 -00001 0008+00 0/0 0/0 0/0 .text __ct__10JAISoundIDFUl */
-// JAISoundID::JAISoundID(u32 param_0) {
-void __ct__10JAISoundIDFUl() {
- // *(u32*)this = (u32)(param_0);
- asm {
- stw r4, 0x0(r3)
- }
-}
-
-/* 80A5DE54-80A5DEB8 014FB4 0064+00 1/1 0/0 0/0 .text mDoAud_seStart__FUlPC3VecUlSc */
-// static void mDoAud_seStart(u32 param_0, Vec const* param_1, u32 param_2, s8 param_3) {
-extern "C" static asm void mDoAud_seStart__FUlPC3VecUlSc() {
- // NONMATCHING
-}
-
-/* 80A5DEB8-80A5DEE8 015018 0030+00 1/1 0/0 0/0 .text dComIfGs_onEventBit__FUs */
-// static void dComIfGs_onEventBit(u16 param_0) {
-extern "C" static asm void dComIfGs_onEventBit__FUs() {
- // NONMATCHING
-}
-
-/* ############################################################################################## */
-/* 80A5FF68-80A5FF6C 000128 0004+00 0/0 0/0 0/0 .bss
- * sInstance__40JASGlobalInstance<19JASDefaultBankTable> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF68[4];
-#pragma pop
-
-/* 80A5FF6C-80A5FF70 00012C 0004+00 0/0 0/0 0/0 .bss
- * sInstance__35JASGlobalInstance<14JASAudioThread> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF6C[4];
-#pragma pop
-
-/* 80A5FF70-80A5FF74 000130 0004+00 0/0 0/0 0/0 .bss sInstance__27JASGlobalInstance<7Z2SeMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF70[4];
-#pragma pop
-
-/* 80A5FF74-80A5FF78 000134 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8Z2SeqMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF74[4];
-#pragma pop
-
-/* 80A5FF78-80A5FF7C 000138 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SceneMgr>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF78[4];
-#pragma pop
-
-/* 80A5FF7C-80A5FF80 00013C 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2StatusMgr>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF7C[4];
-#pragma pop
-
-/* 80A5FF80-80A5FF84 000140 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2DebugSys>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF80[4];
-#pragma pop
-
-/* 80A5FF84-80A5FF88 000144 0004+00 0/0 0/0 0/0 .bss
- * sInstance__36JASGlobalInstance<15JAISoundStarter> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF84[4];
-#pragma pop
-
-/* 80A5FF88-80A5FF8C 000148 0004+00 0/0 0/0 0/0 .bss
- * sInstance__35JASGlobalInstance<14Z2SoundStarter> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF88[4];
-#pragma pop
-
-/* 80A5FF8C-80A5FF90 00014C 0004+00 0/0 0/0 0/0 .bss
- * sInstance__33JASGlobalInstance<12Z2SpeechMgr2> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF8C[4];
-#pragma pop
-
-/* 80A5FF90-80A5FF94 000150 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8JAISeMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF90[4];
-#pragma pop
-
-/* 80A5FF94-80A5FF98 000154 0004+00 0/0 0/0 0/0 .bss sInstance__29JASGlobalInstance<9JAISeqMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF94[4];
-#pragma pop
-
-/* 80A5FF98-80A5FF9C 000158 0004+00 0/0 0/0 0/0 .bss
- * sInstance__33JASGlobalInstance<12JAIStreamMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF98[4];
-#pragma pop
-
-/* 80A5FF9C-80A5FFA0 00015C 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SoundMgr>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FF9C[4];
-#pragma pop
-
-/* 80A5FFA0-80A5FFA4 000160 0004+00 0/0 0/0 0/0 .bss
- * sInstance__33JASGlobalInstance<12JAISoundInfo> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FFA0[4];
-#pragma pop
-
-/* 80A5FFA4-80A5FFA8 000164 0004+00 0/0 0/0 0/0 .bss
- * sInstance__34JASGlobalInstance<13JAUSoundTable> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FFA4[4];
-#pragma pop
-
-/* 80A5FFA8-80A5FFAC 000168 0004+00 0/0 0/0 0/0 .bss
- * sInstance__38JASGlobalInstance<17JAUSoundNameTable> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FFA8[4];
-#pragma pop
-
-/* 80A5FFAC-80A5FFB0 00016C 0004+00 0/0 0/0 0/0 .bss
- * sInstance__33JASGlobalInstance<12JAUSoundInfo> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FFAC[4];
-#pragma pop
-
-/* 80A5FFB0-80A5FFB4 000170 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SoundInfo>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FFB0[4];
-#pragma pop
-
-/* 80A5FFB4-80A5FFB8 000174 0004+00 0/0 0/0 0/0 .bss
- * sInstance__34JASGlobalInstance<13Z2SoundObjMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FFB4[4];
-#pragma pop
-
-/* 80A5FFB8-80A5FFBC 000178 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2Audience>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FFB8[4];
-#pragma pop
-
-/* 80A5FFBC-80A5FFC0 00017C 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2FxLineMgr>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FFBC[4];
-#pragma pop
-
-/* 80A5FFC0-80A5FFC4 000180 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2EnvSeMgr>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FFC0[4];
-#pragma pop
-
-/* 80A5FFC4-80A5FFC8 000184 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SpeechMgr>
- */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FFC4[4];
-#pragma pop
+/* 80A5E438-80A5E438 00053C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
-/* 80A5FFC8-80A5FFCC 000188 0004+00 0/0 0/0 0/0 .bss
- * sInstance__34JASGlobalInstance<13Z2WolfHowlMgr> */
-#pragma push
-#pragma force_active on
-static u8 data_80A5FFC8[4];
-#pragma pop
+/* 80A5FD74-80A5FD94 -00001 0020+00 1/0 0/0 0/0 .data l_daNpc_Ks_Method */
+static actor_method_class l_daNpc_Ks_Method = {
+ (process_method_func)daNpc_Ks_Create,
+ (process_method_func)daNpc_Ks_Delete,
+ (process_method_func)daNpc_Ks_Execute,
+ (process_method_func)daNpc_Ks_IsDelete,
+ (process_method_func)daNpc_Ks_Draw,
+};
-/* 80A5E438-80A5E438 00053C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
+/* 80A5FD94-80A5FDC4 -00001 0030+00 0/0 0/0 1/0 .data g_profile_NPC_KS */
+extern actor_process_profile_definition g_profile_NPC_KS = {
+ fpcLy_CURRENT_e, // mLayerID
+ 3, // mListID
+ fpcPi_CURRENT_e, // mListPrio
+ PROC_NPC_KS, // mProcName
+ &g_fpcLf_Method.base, // sub_method
+ sizeof(npc_ks_class), // mSize
+ 0, // mSizeOther
+ 0, // mParameters
+ &g_fopAc_Method.base, // sub_method
+ 701, // mPriority
+ &l_daNpc_Ks_Method, // sub_method
+ 0x00044100, // mStatus
+ fopAc_ACTOR_e, // mActorType
+ fopAc_CULLBOX_CUSTOM_e, // cullType
+};
diff --git a/src/d/actor/d_a_obj_sw.cpp b/src/d/actor/d_a_obj_sw.cpp
index 1449894ddc..1f037f4cad 100644
--- a/src/d/actor/d_a_obj_sw.cpp
+++ b/src/d/actor/d_a_obj_sw.cpp
@@ -6,8 +6,8 @@
//#define VIRTUAL_3DLINEMAT
#include "m_Do/m_Do_ext.h"
#include "d/d_camera.h"
-
#include "d/actor/d_a_obj_sw.h"
+#include "d/d_com_inf_game.h"
#include "dol2asm.h"
@@ -118,154 +118,239 @@ extern "C" extern void* __vt__19mDoExt_3DlineMat1_c[5];
extern "C" extern void* __vt__16Z2SoundObjSimple[8];
extern "C" u8 m_cpadInfo__8mDoCPd_c[256];
extern "C" u8 now__14mDoMtx_stack_c[48];
-extern "C" extern u8 g_dComIfG_gameInfo[122384];
extern "C" u8 sincosTable___5JMath[65536];
-//
-// Declarations:
-//
-
-/* ############################################################################################## */
-/* 80CF30FC-80CF3100 000000 0004+00 1/1 0/0 0/0 .data l_color$3804 */
-SECTION_DATA static u8 l_color[4] = {
- 0x14,
- 0x0F,
- 0x00,
- 0xFF,
-};
-
/* 80CF0638-80CF0774 000078 013C+00 1/0 0/0 0/0 .text daObj_Sw_Draw__FP12obj_sw_class */
-static void daObj_Sw_Draw(obj_sw_class* param_0) {
+static int daObj_Sw_Draw(obj_sw_class* i_this) {
// NONMATCHING
+ static _GXColor l_color = {
+ 0x14,
+ 0x0F,
+ 0x00,
+ 0xFF,
+ };
+
+ fopAc_ac_c* a_this = &i_this->actor;
+ if (i_this->field_0x570 == 8) {
+ g_env_light.settingTevStruct(0, &a_this->current.pos, &a_this->tevStr);
+ obj_sc_s* sc_p = &i_this->field_0x5a8;
+ for (int i = 0; i < 8; i++) {
+ if (sc_p->field_0x0 != 0) {
+ g_env_light.setLightTevColorType_MAJI(sc_p->mpModelMorf->getModel(), &a_this->tevStr);
+ sc_p->mpModelMorf->entryDL();
+
+ if (i == 2 && i_this->field_0x864.mpModel != NULL) {
+ g_env_light.setLightTevColorType_MAJI(i_this->field_0x864.mpModel, &a_this->tevStr);
+ mDoExt_modelUpdateDL(i_this->field_0x864.mpModel);
+ }
+ }
+ sc_p = (obj_sc_s *)((s8*)sc_p + 100);
+ }
+ } else {
+ g_env_light.settingTevStruct(16, &a_this->current.pos, &a_this->tevStr);
+ i_this->field_0xd50.update(63, l_color, &a_this->tevStr);
+ dComIfGd_set3DlineMat(&i_this->field_0xd50);
+ }
+
+ return 1;
}
-/* ############################################################################################## */
/* 80CF3278-80CF327C 000000 0004+00 3/3 0/0 0/0 .bss saru_ct */
-static u8 saru_ct[4];
+static int saru_ct;
/* 80CF0774-80CF07F8 0001B4 0084+00 1/1 0/0 0/0 .text s_ks_sub__FPvPv */
-static void s_ks_sub(void* param_0, void* param_1) {
- // NONMATCHING
+static void* s_ks_sub(void* i_actor, void* i_data) {
+ if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_NPC_KS) {
+ int swBit = fopAcM_GetParam(i_actor) >> 24;
+ if (swBit != 0xFF) {
+ if (dComIfGs_isSwitch(swBit, fopAcM_GetRoomNo((fopAc_ac_c*)i_actor))) {
+ saru_ct++;
+ }
+ }
+ }
+ return NULL;
}
+struct path {
+ int field_0x0;
+ f32 field_0x4;
+ f32 field_0x8;
+ f32 field_0xc;
+};
/* ############################################################################################## */
/* 80CF3100-80CF3210 000004 0110+00 3/3 0/0 0/0 .data sc_path */
-SECTION_DATA static u8 sc_path[272] = {
- 0x00, 0x00, 0x00, 0x01, 0x45, 0xFF, 0x60, 0x00, 0x45, 0x53, 0x40, 0x00, 0xC6, 0x2A, 0x1C, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x46, 0x01, 0xC4, 0x00, 0x45, 0x5C, 0x40, 0x00, 0xC6, 0x30, 0x2C, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x46, 0x09, 0x18, 0x00, 0x45, 0x65, 0xD0, 0x00, 0xC6, 0x27, 0xA0, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x46, 0x09, 0x68, 0x00, 0x45, 0x65, 0xD0, 0x00, 0xC6, 0x32, 0x80, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x46, 0x10, 0xCC, 0x00, 0x45, 0x72, 0xF0, 0x00, 0xC6, 0x25, 0x68, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x46, 0x0C, 0xD4, 0x00, 0x45, 0x73, 0xE0, 0x00, 0xC6, 0x37, 0x5C, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x46, 0x0F, 0x80, 0x00, 0x45, 0x79, 0xD0, 0x00, 0xC6, 0x2F, 0x78, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x46, 0x10, 0x58, 0x00, 0x45, 0x80, 0xF8, 0x00, 0xC6, 0x39, 0xB8, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x46, 0x16, 0x60, 0x00, 0x45, 0x8F, 0xD0, 0x00, 0xC6, 0x36, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x46, 0x14, 0xA4, 0x00, 0x45, 0x97, 0xB0, 0x00, 0xC6, 0x3E, 0xC4, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x46, 0x0D, 0x64, 0x00, 0x45, 0x9D, 0x58, 0x00, 0xC6, 0x3C, 0x48, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x46, 0x08, 0x2C, 0x00, 0x45, 0x9E, 0xD8, 0x00, 0xC6, 0x38, 0x24, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x46, 0x03, 0xB0, 0x00, 0x45, 0xA2, 0xB0, 0x00, 0xC6, 0x31, 0xF0, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x7C, 0x00, 0x45, 0xA7, 0x48, 0x00, 0xC6, 0x2F, 0xC8, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x45, 0xF5, 0x58, 0x00, 0x45, 0xAA, 0xA0, 0x00, 0xC6, 0x30, 0x14, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x45, 0xED, 0x78, 0x00, 0x45, 0xAD, 0x08, 0x00, 0xC6, 0x2E, 0xC8, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+static path sc_path[17] = {
+ {1, 8172.0f, 3380.0f, -10887.0f},
+ {1, 8305.0f, 3524.0f, -11275.0f},
+ {1, 8774.0f, 3677.0f, -10728.0f},
+ {1, 8794.0f, 3677.0f, -11424.0f},
+ {1, 9267.0f, 3887.0f, -10586.0f},
+ {1, 9013.0f, 3902.0f, -11735.0f},
+ {1, 9184.0f, 3997.0f, -11230.0f},
+ {1, 9238.0f, 4127.0f, -11886.0f},
+ {1, 9624.0f, 4602.0f, -11648.0f},
+ {0, 9513.0f, 4854.0f, -12209.0f},
+ {0, 9049.0f, 5035.0f, -12050.0f},
+ {0, 8715.0f, 5083.0f, -11785.0f},
+ {0, 8428.0f, 5206.0f, -11388.0f},
+ {0, 8223.0f, 5353.0f, -11250.0f},
+ {0, 7851.0f, 5460.0f, -11269.0f},
+ {0, 7599.0f, 5537.0f, -11186.0f},
+ {0, 0.0f, 0.0f, 0.0f},
+ // 0x00000001, 0x45FF6000, 0x45534000, 0xC62A1C00,
+ // 0x00000001, 0x4601C400, 0x455C4000, 0xC6302C00,
+ // 0x00000001, 0x46091800, 0x4565D000, 0xC627A000,
+ // 0x00000001, 0x46096800, 0x4565D000, 0xC6328000,
+ // 0x00000001, 0x4610CC00, 0x4572F000, 0xC6256800,
+ // 0x00000001, 0x460CD400, 0x4573E000, 0xC6375C00,
+ // 0x00000001, 0x460F8000, 0x4579D000, 0xC62F7800,
+ // 0x00000001, 0x46105800, 0x4580F800, 0xC639B800,
+ // 0x00000001, 0x46166000, 0x458FD000, 0xC6360000,
+ // 0x00000000, 0x4614A400, 0x4597B000, 0xC63EC400,
+ // 0x00000000, 0x460D6400, 0x459D5800, 0xC63C4800,
+ // 0x00000000, 0x46082C00, 0x459ED800, 0xC6382400,
+ // 0x00000000, 0x4603B000, 0x45A2B000, 0xC631F000,
+ // 0x00000000, 0x46007C00, 0x45A74800, 0xC62FC800,
+ // 0x00000000, 0x45F55800, 0x45AAA000, 0xC6301400,
+ // 0x00000000, 0x45ED7800, 0x45AD0800, 0xC62EC800,
+ // 0x00000000, 0x00000000, 0x00000000, 0x00000000,
};
/* 80CF07F8-80CF08F8 000238 0100+00 1/1 0/0 0/0 .text s_ksdel_sub__FPvPv */
-static void s_ksdel_sub(void* param_0, void* param_1) {
+static void* s_ksdel_sub(void* i_actor, void* i_data) {
// NONMATCHING
-}
-
-/* ############################################################################################## */
-/* 80CF3000-80CF3004 000000 0004+00 8/8 0/0 0/0 .rodata @3850 */
-SECTION_RODATA static u8 const lit_3850[4] = {
- 0x00,
- 0x00,
- 0x00,
- 0x00,
-};
-COMPILER_STRIP_GATE(0x80CF3000, &lit_3850);
-
-/* 80CF3004-80CF3008 000004 0004+00 1/1 0/0 0/0 .rodata @3851 */
-SECTION_RODATA static f32 const lit_3851 = -1.0f;
-COMPILER_STRIP_GATE(0x80CF3004, &lit_3851);
+ if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_NPC_KS) {
+ fopAcM_delete((fopAc_ac_c*)i_actor);
-/* 80CF30EC-80CF30EC 0000EC 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
-#pragma push
-#pragma force_active on
-SECTION_DEAD static char const* const stringBase_80CF30EC = "Npc_ksw";
-#pragma pop
+ saru_ct++;
+ }
+ return NULL;
+}
/* 80CF08F8-80CF09A8 000338 00B0+00 3/3 0/0 0/0 .text anm_init__FP8obj_sc_sifUcf */
-static void anm_init(obj_sc_s* param_0, int param_1, f32 param_2, u8 param_3, f32 param_4) {
- // NONMATCHING
+static void anm_init(obj_sc_s* i_this, int param_2, f32 i_morf, u8 i_mode, f32 i_speed) {
+ i_this->mpModelMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("Npc_ksw", param_2), i_mode, i_morf,
+ i_speed, 0.0f, -1.0f, NULL);
+ i_this->field_0x3c = param_2;
}
-/* ############################################################################################## */
-/* 80CF3008-80CF300C 000008 0004+00 0/4 0/0 0/0 .rodata @3976 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3976 = 5.0f;
-COMPILER_STRIP_GATE(0x80CF3008, &lit_3976);
-#pragma pop
-
-/* 80CF300C-80CF3010 00000C 0004+00 0/5 0/0 0/0 .rodata @3977 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3977 = 1.0f;
-COMPILER_STRIP_GATE(0x80CF300C, &lit_3977);
-#pragma pop
-
-/* 80CF3010-80CF3014 000010 0004+00 0/3 0/0 0/0 .rodata @3978 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3978 = 2.0f;
-COMPILER_STRIP_GATE(0x80CF3010, &lit_3978);
-#pragma pop
-
-/* 80CF3014-80CF3018 000014 0004+00 0/4 0/0 0/0 .rodata @3979 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3979 = 40.0f;
-COMPILER_STRIP_GATE(0x80CF3014, &lit_3979);
-#pragma pop
-
-/* 80CF3018-80CF301C 000018 0004+00 0/1 0/0 0/0 .rodata @3980 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3980 = 25.0f;
-COMPILER_STRIP_GATE(0x80CF3018, &lit_3980);
-#pragma pop
-
-/* 80CF301C-80CF3020 00001C 0004+00 0/1 0/0 0/0 .rodata @3981 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3981 = 1700.0f;
-COMPILER_STRIP_GATE(0x80CF301C, &lit_3981);
-#pragma pop
-
-/* 80CF3020-80CF3024 000020 0004+00 0/1 0/0 0/0 .rodata @3982 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3982 = -35.0f;
-COMPILER_STRIP_GATE(0x80CF3020, &lit_3982);
-#pragma pop
-
-/* 80CF3024-80CF3028 000024 0004+00 0/2 0/0 0/0 .rodata @3983 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_3983 = 30.0f;
-COMPILER_STRIP_GATE(0x80CF3024, &lit_3983);
-#pragma pop
-
/* 80CF09A8-80CF1008 0003E8 0660+00 1/1 0/0 0/0 .text sc_build__FP12obj_sw_class */
-static void sc_build(obj_sw_class* param_0) {
- // NONMATCHING
-}
-
-/* 80CF1008-80CF1044 000A48 003C+00 1/1 0/0 0/0 .text __dt__4cXyzFv */
-//cXyz::~cXyz() {
-void __dt__4cXyzFv() {
+static void sc_build(obj_sw_class* i_this) {
// NONMATCHING
+ fopAc_ac_c* a_this = &i_this->actor;
+ obj_sc_s* sc_p = &i_this->field_0x5a8;
+ cXyz sp24, sp30;
+
+ for (int i = 0; i < 8; i++) {
+ if (sc_p->field_0x34 != 0) {
+ sc_p->field_0x34--;
+ }
+
+ s16 sVar1;
+ switch (sc_p->field_0x0) {
+ case 0:
+ anm_init(sc_p, 14, 5.0f, 2, 1.0f);
+ sc_p->field_0x0 = 1;
+ sc_p->field_0x10 = sc_p->field_0x4;
+ sc_p->field_0x1c.x = sc_path[sc_p->field_0x38].field_0x4;
+ sc_p->field_0x1c.y = sc_path[sc_p->field_0x38].field_0x8;
+ sc_p->field_0x1c.z = sc_path[sc_p->field_0x38].field_0xc;
+ break;
+
+ case 1:
+ sp24 = sc_p->field_0x1c - sc_p->field_0x4;
+ cLib_addCalcAngleS2(&sc_p->field_0x2a, cM_atan2s(sp24.x, sp24.z), 1, 0x2000);
+ if (sc_p->field_0x34 == 0) {
+ sc_p->field_0x0 = 2;
+ anm_init(sc_p, 11, 2.0f, 0, 1.0f);
+ }
+ break;
+
+ case 2:
+ if (sc_path[sc_p->field_0x38].field_0x0 == 1) {
+ if (sc_p->field_0x3c == 11) {
+ if (sc_p->mpModelMorf->isStop()) {
+ anm_init(sc_p, 12, 1.0f, 0, 1.0f);
+ sc_p->mSound.startSound(Z2SE_KOSARU_V_JUMP, 0, -1);
+ sc_p->mSound.startSound(Z2SE_KOSARU_JUMP_START, 0, -1);
+ sc_p->mSound.startSound(Z2SE_KOSARU_JUMP_WIND, 0, -1);
+ sc_p->field_0x30 = 40.0f;
+ }
+ }
+ } else {
+ sc_p->field_0x30 = 25.0f;
+ }
+
+ sp24 = sc_p->field_0x1c - sc_p->field_0x4;
+ sVar1 = cM_atan2s(sp24.x, sp24.z);
+ cLib_addCalcAngleS2(&sc_p->field_0x2a, sVar1, 1, 0x2000);
+ cMtx_YrotS(*calc_mtx, sVar1);
+ cMtx_XrotM(*calc_mtx, -cM_atan2s(sp24.y, JMAFastSqrt(sp24.x * sp24.x + sp24.z * sp24.z)));
+ sp24.x = 0.0f;
+ sp24.y = 0.0f;
+ sp24.z = sc_p->field_0x30;
+ MtxPosition(&sp24, &sp30);
+ sc_p->field_0x4 += sp30;
+ sp24 = sc_p->field_0x1c - sc_p->field_0x4;
+
+ if ((sp24.x * sp24.x + sp24.z * sp24.z) <= 1700.0f) {
+ sc_p->field_0x4 = sc_p->field_0x1c;
+ if (sc_p->field_0x38 == 16) {
+ sc_p->field_0x0 = 3;
+ anm_init(sc_p, 4, 2.0f, 2, 2.0f);
+ sc_p->field_0x30 = 0.0f;
+ sc_p->mSound.startSound(Z2SE_KOSARU_V_WAIT, 0, -1);
+ } else {
+ sc_p->field_0x38++;
+ sc_p->field_0x10 = sc_p->field_0x4;
+ sc_p->field_0x1c.x = sc_path[sc_p->field_0x38].field_0x4;
+ sc_p->field_0x1c.y = sc_path[sc_p->field_0x38].field_0x8;
+ sc_p->field_0x1c.z = sc_path[sc_p->field_0x38].field_0xc;
+
+ if (sc_path[sc_p->field_0x38].field_0x0 == 1) {
+ anm_init(sc_p, 11, 2.0f, 0, 1.0f);
+ sc_p->field_0x30 = 0.0f;
+ } else if (sc_p->field_0x3c != 10) {
+ anm_init(sc_p, 10, 2.0f, 2, 1.0f);
+ }
+ }
+ }
+ break;
+
+ case 3:
+ cLib_addCalcAngleS2(&sc_p->field_0x2a, a_this->current.angle.y + 0x8000, 2, 0x1000);
+ cMtx_YrotS(*calc_mtx, sc_p->field_0x2a);
+ sp24.x = 0.0f;
+ sp24.y = 0.0f;
+ sp24.z = -35.0f;
+ MtxPosition(&sp24, &sp30);
+ cLib_addCalc2(&sc_p->field_0x4.x, a_this->eyePos.x + sp30.x, 1.0f, 30.0f);
+ cLib_addCalc2(&sc_p->field_0x4.y, a_this->eyePos.y, 1.0f, 30.0f);
+ cLib_addCalc2(&sc_p->field_0x4.z, a_this->eyePos.z + sp30.z, 1.0f, 30.0f);
+
+ if (sc_p->field_0x4.y <= a_this->eyePos.y + 1.0f) {
+ sp24 = sc_p->field_0x4 - a_this->eyePos;
+ anm_init(sc_p, 13, 5.0f, 0, 1.0f);
+ sc_p->field_0x0 = 10;
+ sc_p->mSound.startSound(Z2SE_KOSARU_V_WAIT, 0, -1);
+
+ if (i == 7) {
+ i_this->field_0x576 = 2;
+ i_this->field_0x57c = 120;
+ int swBit = fopAcM_GetParam(a_this) >> 24;
+ if (swBit != 0xFF) {
+ dComIfGs_onSwitch(swBit, fopAcM_GetRoomNo(a_this));
+ }
+ }
+ }
+ }
+
+ if (sc_p->field_0x30 >= 30.0f) {
+ sc_p->field_0x35 = 1;
+ }
+
+ sc_p = (obj_sc_s *)((s8*)sc_p + 100);
+ }
}
/* ############################################################################################## */
@@ -360,8 +445,21 @@ COMPILER_STRIP_GATE(0x80CF3060, &lit_4067);
#pragma pop
/* 80CF1044-80CF1384 000A84 0340+00 1/1 0/0 0/0 .text sc_move__FP12obj_sw_class */
-static void sc_move(obj_sw_class* param_0) {
+static void sc_move(obj_sw_class* i_this) {
// NONMATCHING
+ cXyz sp24, sp30;
+
+ if (i_this->field_0x864.field_0x68 == 0) {
+ if (i_this->field_0x57a == 0) {
+ if (cM_rndF(1.0f) >= 0.2f) {
+ if (cM_rndF(1.0f) >= 0.33f) {
+ if (cM_rndF(1.0f) >= 0.5f) {
+
+ }
+ }
+ }
+ }
+ }
}
/* ############################################################################################## */