summaryrefslogtreecommitdiff
path: root/rel
diff options
context:
space:
mode:
authorCaroline Madsen <69010899+randomsalience@users.noreply.github.com>2024-03-25 14:41:20 -0400
committerGitHub <noreply@github.com>2024-03-25 20:41:20 +0200
commit7da5cdee5679d8f7995c601f69e46967bfbcdb73 (patch)
tree048f398551645db8ea9b7d90bc30587224b2d0ea /rel
parent023c06c5736af85b8ea50dba8ac6025875e8d844 (diff)
d_a_e_nest OK (#2108)
* d_a_e_nest OK * complete merge
Diffstat (limited to 'rel')
-rw-r--r--rel/d/a/e/d_a_e_nest/d_a_e_nest.cpp2257
1 files changed, 1032 insertions, 1225 deletions
diff --git a/rel/d/a/e/d_a_e_nest/d_a_e_nest.cpp b/rel/d/a/e/d_a_e_nest/d_a_e_nest.cpp
index 048235360c..dfdb7faf2c 100644
--- a/rel/d/a/e/d_a_e_nest/d_a_e_nest.cpp
+++ b/rel/d/a/e/d_a_e_nest/d_a_e_nest.cpp
@@ -1,1309 +1,1116 @@
-//
-// Generated By: dol2asm
-// Translation Unit: d_a_e_nest
-//
+/**
+ * d_a_e_nest.cpp
+ * Enemy - Beehive
+ */
#include "rel/d/a/e/d_a_e_nest/d_a_e_nest.h"
-#include "d/cc/d_cc_d.h"
-#include "dol2asm.h"
-
-//
-// Types:
-//
-
-struct request_of_phase_process_class {};
-
-struct nest_hahen_s {
- /* 805044AC */ ~nest_hahen_s();
- /* 805044E8 */ nest_hahen_s();
-};
-
-struct mDoMtx_stack_c {
- /* 8000CD9C */ void transM(f32, f32, f32);
- /* 8000CE38 */ void scaleM(f32, f32, f32);
-
- static u8 now[48];
-};
-
-struct fopAc_ac_c {
- /* 80018B64 */ fopAc_ac_c();
-};
-
-struct fopAcM_gc_c {
- /* 8001DCBC */ void gndCheck(cXyz const*);
-
- static f32 mGroundY;
-};
-
-struct e_nest_class {};
-
-struct daPy_py_c {
- /* 8015F4F0 */ void setLookPos(cXyz*);
- /* 8015F89C */ void checkBoomerangCharge();
-};
-
-struct daNPC_TK_c {
- /* 80B0A444 */ void setHawkSideCamera(cXyz);
- /* 80B0A500 */ void setHawkCamera(fopAc_ac_c*);
- /* 80B0A568 */ void endHawkCamera();
-};
-
-struct daE_Nest_HIO_c {
- /* 80500F8C */ daE_Nest_HIO_c();
- /* 80504634 */ ~daE_Nest_HIO_c();
-};
-
-struct dSv_info_c {
- /* 80035200 */ void onSwitch(int, int);
- /* 80035360 */ void isSwitch(int, int) const;
-};
-
-struct dSv_event_flag_c {
- static u8 saveBitLabels[1644 + 4 /* padding */];
-};
-
-struct dSv_event_c {
- /* 8003498C */ void onEventBit(u16);
-};
-
-struct dKy_tevstr_c {};
-
-struct J3DModelData {};
-
-struct dScnKy_env_light_c {
- /* 801A37C4 */ void settingTevStruct(int, cXyz*, dKy_tevstr_c*);
- /* 801A4DA0 */ void setLightTevColorType_MAJI(J3DModelData*, dKy_tevstr_c*);
-};
-
-struct dRes_info_c {};
-
-struct dRes_control_c {
- /* 8003C2EC */ void getRes(char const*, s32, dRes_info_c*, int);
-};
-
-struct dPa_levelEcallBack {};
-
-struct csXyz {};
-
-struct _GXColor {};
-
-struct dPa_control_c {
- /* 8004CA90 */ void set(u8, u16, cXyz const*, dKy_tevstr_c const*, csXyz const*, cXyz const*,
- u8, dPa_levelEcallBack*, s8, _GXColor const*, _GXColor const*,
- cXyz const*, f32);
- /* 8004D4CC */ void set(u32, u8, u16, cXyz const*, dKy_tevstr_c const*, csXyz const*,
- cXyz const*, u8, dPa_levelEcallBack*, s8, _GXColor const*,
- _GXColor const*, cXyz const*, f32);
-};
-
-struct dEvt_control_c {
- /* 80042468 */ void reset();
-};
-
-struct dDlst_shadowControl_c {
- static u8 mSimpleTexObj[32];
-};
-
-struct dCcU_AtInfo {};
-
-struct dCamera_c {
- /* 801614AC */ void Start();
- /* 801614D0 */ void Stop();
- /* 8016300C */ void SetTrimSize(s32);
- /* 80180AE0 */ void Set(cXyz, cXyz, f32, s16);
- /* 80180C18 */ void Reset(cXyz, cXyz);
-};
-
-struct dBgS_PolyPassChk {
- /* 80078E68 */ void SetObj();
-};
-
-struct dBgS_ObjGndChk_Spl {
- /* 800777B0 */ dBgS_ObjGndChk_Spl();
- /* 80077848 */ ~dBgS_ObjGndChk_Spl();
-};
-
-struct dBgS_ObjAcch {
- /* 805045C4 */ ~dBgS_ObjAcch();
-};
-
-struct dBgS_LinChk {
- /* 80077C68 */ dBgS_LinChk();
- /* 80077CDC */ ~dBgS_LinChk();
- /* 80077D64 */ void Set(cXyz const*, cXyz const*, fopAc_ac_c const*);
-};
-
-struct dBgS_AcchCir {
- /* 80075EAC */ dBgS_AcchCir();
- /* 80075F58 */ void SetWall(f32, f32);
-};
-
-struct dBgS {};
-
-struct dBgS_Acch {
- /* 80075F94 */ ~dBgS_Acch();
- /* 800760A0 */ dBgS_Acch();
- /* 80076248 */ void Set(cXyz*, cXyz*, fopAc_ac_c*, int, dBgS_AcchCir*, cXyz*, csXyz*, csXyz*);
- /* 80076AAC */ void CrrPos(dBgS&);
-};
-
-struct dAttCatch_c {
- /* 80073A08 */ void request(fopAc_ac_c*, u8, f32, f32, f32, s16, int);
-};
-
-struct cCcS {
- /* 80264BA8 */ void Set(cCcD_Obj*);
-};
-
-struct cBgS_PolyInfo {};
-
-struct cBgS_LinChk {};
-
-struct cBgS_GndChk {
- /* 80267D28 */ void SetPos(cXyz const*);
-};
-
-struct cBgS {
- /* 800743B4 */ void LineCross(cBgS_LinChk*);
- /* 800744A0 */ void GroundCross(cBgS_GndChk*);
-};
-
-struct _GXTexObj {};
-
-struct Z2SoundObjSimple {
- /* 802BE844 */ Z2SoundObjSimple();
-};
-
-struct Z2SoundObjBeeGroup {
- /* 802C1D10 */ Z2SoundObjBeeGroup();
-};
-
-struct Z2SoundObjBase {
- /* 802BDFF8 */ void deleteObject();
-};
-
-struct JMath {
- static u8 sincosTable_[65536];
-};
-
-struct J3DModel {};
-
-//
-// Forward References:
-//
-
-extern "C" void __ct__14daE_Nest_HIO_cFv();
-extern "C" static void hahen_draw__FP12e_nest_class();
-extern "C" static void s_bomb_sub__FPvPv();
-extern "C" static void hahen_normal__FP12e_nest_classP12nest_hahen_s();
-extern "C" static void hahen_move__FP12e_nest_class();
-extern "C" static void daE_Nest_Draw__FP12e_nest_class();
-extern "C" static void mtx_cc_set__FP12e_nest_class();
-extern "C" static void e_nest_normal__FP12e_nest_class();
-extern "C" static void wall_angle_get__FP12e_nest_class();
-extern "C" static void e_nest_drop__FP12e_nest_class();
-extern "C" static void e_nest_carry__FP12e_nest_class();
-extern "C" static void water_check__FP12e_nest_class();
-extern "C" static void simple_bg_check__FP12e_nest_class();
-extern "C" static void e_nest_float__FP12e_nest_class();
-extern "C" static void e_nest_hahen__FP12e_nest_class();
-extern "C" static void e_nest_hook__FP12e_nest_class();
-extern "C" static void bee_nest_action__FP12e_nest_class();
-extern "C" static void shot_b_sub__FPvPv();
-extern "C" static void demo_camera__FP12e_nest_class();
-extern "C" static void daE_Nest_Execute__FP12e_nest_class();
-extern "C" static bool daE_Nest_IsDelete__FP12e_nest_class();
-extern "C" static void daE_Nest_Delete__FP12e_nest_class();
-extern "C" static void useHeapInit__FP10fopAc_ac_c();
-extern "C" static void daE_Nest_Create__FP10fopAc_ac_c();
-extern "C" void __dt__12nest_hahen_sFv();
-extern "C" void __ct__12nest_hahen_sFv();
-extern "C" void __dt__8cM3dGCylFv();
-extern "C" void __dt__8cM3dGSphFv();
-extern "C" void __dt__8cM3dGAabFv();
-extern "C" void __dt__12dBgS_ObjAcchFv();
-extern "C" void __dt__14daE_Nest_HIO_cFv();
-extern "C" void __sinit_d_a_e_nest_cpp();
-extern "C" static void func_805046B8();
-extern "C" static void func_805046C0();
-extern "C" extern char const* const d_a_e_nest__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 mDoExt_modelUpdateDL__FP8J3DModel();
-extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl();
-extern "C" void __ct__10fopAc_ac_cFv();
-extern "C" void fopAc_IsActor__FPv();
-extern "C" void fopAcIt_Judge__FPFPvPv_PvPv();
-extern "C" void fopAcM_delete__FP10fopAc_ac_c();
-extern "C" void fopAcM_createChild__FsUiUlPC4cXyziPC5csXyzPC4cXyzScPFPv_i();
-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_searchActorDistance__FPC10fopAc_ac_cPC10fopAc_ac_c();
-extern "C" void fopAcM_orderPotentialEvent__FP10fopAc_ac_cUsUsUs();
-extern "C" void fopAcM_effSmokeSet1__FPUlPUlPC4cXyzPC5csXyzfPC12dKy_tevstr_ci();
-extern "C" void fopAcM_effHamonSet__FPUlPC4cXyzff();
-extern "C" void gndCheck__11fopAcM_gc_cFPC4cXyz();
-extern "C" void fpcEx_Search__FPFPvPv_PvPv();
-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 onEventBit__11dSv_event_cFUs();
-extern "C" void onSwitch__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 request__11dAttCatch_cFP10fopAc_ac_cUcfffsi();
-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__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 Move__10dCcD_GSttsFv();
-extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c();
-extern "C" void __ct__12dCcD_GObjInfFv();
-extern "C" void ChkTgHit__12dCcD_GObjInfFv();
-extern "C" void GetTgHitObj__12dCcD_GObjInfFv();
-extern "C" void ChkCoHit__12dCcD_GObjInfFv();
-extern "C" void GetCoHitObj__12dCcD_GObjInfFv();
-extern "C" void Set__8dCcD_CylFRC11dCcD_SrcCyl();
-extern "C" void Set__8dCcD_SphFRC11dCcD_SrcSph();
-extern "C" void at_power_check__FP11dCcU_AtInfo();
-extern "C" void cc_at_check__FP10fopAc_ac_cP11dCcU_AtInfo();
-extern "C" void setLookPos__9daPy_py_cFP4cXyz();
-extern "C" void checkBoomerangCharge__9daPy_py_cFv();
-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_cF4cXyz4cXyz();
-extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c();
-extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c();
-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 cM_rndFX__Ff();
-extern "C" void SetPos__11cBgS_GndChkFPC4cXyz();
-extern "C" void SetC__8cM3dGCylFRC4cXyz();
-extern "C" void SetH__8cM3dGCylFf();
-extern "C" void SetR__8cM3dGCylFf();
-extern "C" void SetC__8cM3dGSphFRC4cXyz();
-extern "C" void SetR__8cM3dGSphFf();
-extern "C" void cLib_addCalc2__FPffff();
-extern "C" void cLib_addCalc0__FPfff();
-extern "C" void cLib_addCalcAngleS2__FPssss();
-extern "C" void MtxTrans__FfffUc();
-extern "C" void MtxScale__FfffUc();
-extern "C" void MtxPosition__FP4cXyzP4cXyz();
-extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc();
-extern "C" void deleteObject__14Z2SoundObjBaseFv();
-extern "C" void __ct__16Z2SoundObjSimpleFv();
-extern "C" void __ct__18Z2SoundObjBeeGroupFv();
-extern "C" void __dl__FPv();
-extern "C" void PSMTXCopy();
-extern "C" void PSMTXTrans();
-extern "C" void PSMTXMultVec();
-extern "C" void __construct_array();
-extern "C" void _savegpr_24();
-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_24();
-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" extern void* g_fopAc_Method[8];
-extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */];
-extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */];
-extern "C" extern void* __vt__8dCcD_Sph[36];
-extern "C" extern void* __vt__8dCcD_Cyl[36];
-extern "C" extern void* __vt__9dCcD_Stts[11];
-extern "C" extern void* __vt__12cCcD_SphAttr[25];
-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 now__14mDoMtx_stack_c[48];
-extern "C" extern u8 g_dComIfG_gameInfo[122384];
-extern "C" u8 mSimpleTexObj__21dDlst_shadowControl_c[32];
-extern "C" extern u8 g_env_light[4880];
-extern "C" u8 sincosTable___5JMath[65536];
-extern "C" extern void* calc_mtx[1 + 1 /* padding */];
-extern "C" f32 mGroundY__11fopAcM_gc_c;
-extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
-extern "C" void __register_global_object();
-extern "C" void setHawkSideCamera__10daNPC_TK_cF4cXyz();
-extern "C" void setHawkCamera__10daNPC_TK_cFP10fopAc_ac_c();
-extern "C" void endHawkCamera__10daNPC_TK_cFv();
-
-//
-// Declarations:
-//
-
-/* ############################################################################################## */
-/* 805046DC-805046E0 000000 0004+00 16/16 0/0 0/0 .rodata @3999 */
-SECTION_RODATA static f32 const lit_3999 = 1.0f;
-COMPILER_STRIP_GATE(0x805046DC, &lit_3999);
-
-/* 805047FC-80504808 000000 000C+00 1/1 0/0 0/0 .data c_x$4617 */
-SECTION_DATA static u8 c_x[12] = {
- 0x42, 0x48, 0x00, 0x00, 0xC2, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
+#include "rel/d/a/npc/d_a_npc_tk/d_a_npc_tk.h"
+#include "JSystem/JKernel/JKRHeap.h"
+#include "SSystem/SComponent/c_math.h"
+#include "f_op/f_op_actor_mng.h"
+#include "d/com/d_com_inf_game.h"
+#include "d/a/d_a_player.h"
+#include "d/d_bomb.h"
+#include "d/d_procname.h"
-/* 80504808-80504814 00000C 000C+00 1/1 0/0 0/0 .data c_z$4618 */
-SECTION_DATA static u8 c_z[12] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x48, 0x00, 0x00,
-};
-
-/* 80504814-8050481C 000018 0008+00 1/1 0/0 0/0 .data w_eff_id$4885 */
-SECTION_DATA static u8 w_eff_id[8] = {
- 0x01, 0xB8, 0x01, 0xB9, 0x01, 0xBA, 0x01, 0xBB,
-};
-
-/* 8050481C-80504820 000020 0004+00 1/1 0/0 0/0 .data b_eff_id$4895 */
-SECTION_DATA static u8 b_eff_id[4] = {
- 0x83,
- 0x2C,
- 0x83,
- 0x2D,
-};
-
-/* 80504820-80504860 000024 0040+00 1/1 0/0 0/0 .data cc_sph_src$5262 */
-static dCcD_SrcSph cc_sph_src = {
- {
- {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
- {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x1}, // mGObjAt
- {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjTg
- {0x0}, // mGObjCo
- }, // mObjInf
- {
- {{0.0f, 0.0f, 0.0f}, 30.0f} // mSph
- } // mSphAttr
-};
-
-/* 80504860-805048A4 000064 0044+00 1/1 0/0 0/0 .data cc_cyl_src$5263 */
-static dCcD_SrcCyl cc_cyl_src = {
- {
- {0x0, {{0x0, 0x0, 0x0}, {0x2020, 0x3}, 0x79}}, // mObj
- {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
- {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
- {0x0}, // mGObjCo
- }, // mObjInf
- {
- {0.0f, 0.0f, 0.0f}, // mCenter
- 5.0f, // mRadius
- 10.0f // mHeight
- } // mCyl
-};
-
-/* 805048A4-805048C4 -00001 0020+00 1/0 0/0 0/0 .data l_daE_Nest_Method */
-SECTION_DATA static void* l_daE_Nest_Method[8] = {
- (void*)daE_Nest_Create__FP10fopAc_ac_c,
- (void*)daE_Nest_Delete__FP12e_nest_class,
- (void*)daE_Nest_Execute__FP12e_nest_class,
- (void*)daE_Nest_IsDelete__FP12e_nest_class,
- (void*)daE_Nest_Draw__FP12e_nest_class,
- (void*)NULL,
- (void*)NULL,
- (void*)NULL,
-};
-
-/* 805048C4-805048F4 -00001 0030+00 0/0 0/0 1/0 .data g_profile_E_NEST */
-SECTION_DATA extern void* g_profile_E_NEST[12] = {
- (void*)0xFFFFFFFD, (void*)0x0007FFFD,
- (void*)0x01E80000, (void*)&g_fpcLf_Method,
- (void*)0x00000CF8, (void*)NULL,
- (void*)NULL, (void*)&g_fopAc_Method,
- (void*)0x00B20000, (void*)&l_daE_Nest_Method,
- (void*)0x000D4100, (void*)0x000E0000,
-};
-
-/* 805048F4-80504900 0000F8 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,
-};
-
-/* 80504900-8050490C 000104 000C+00 2/2 0/0 0/0 .data __vt__8cM3dGSph */
-SECTION_DATA extern void* __vt__8cM3dGSph[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__8cM3dGSphFv,
-};
-
-/* 8050490C-80504918 000110 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,
-};
-
-/* 80504918-8050493C 00011C 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_805046C0,
- (void*)NULL,
- (void*)NULL,
- (void*)func_805046B8,
-};
+/* 80504950-80504954 000008 0004+00 2/2 0/0 0/0 .bss None */
+static bool l_hioInit;
-/* 8050493C-80504948 000140 000C+00 2/2 0/0 0/0 .data __vt__14daE_Nest_HIO_c */
-SECTION_DATA extern void* __vt__14daE_Nest_HIO_c[3] = {
- (void*)NULL /* RTTI */,
- (void*)NULL,
- (void*)__dt__14daE_Nest_HIO_cFv,
-};
+/* 80504960-8050496C 000018 000C+00 7/7 0/0 0/0 .bss l_HIO */
+static daE_Nest_HIO_c l_HIO;
/* 80500F8C-80500FB0 0000EC 0024+00 1/1 0/0 0/0 .text __ct__14daE_Nest_HIO_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm daE_Nest_HIO_c::daE_Nest_HIO_c() {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/__ct__14daE_Nest_HIO_cFv.s"
+daE_Nest_HIO_c::daE_Nest_HIO_c() {
+ field_0x4 = -1;
+ mScale = 1.0f;
}
-#pragma pop
/* 80500FB0-80501040 000110 0090+00 1/1 0/0 0/0 .text hahen_draw__FP12e_nest_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void hahen_draw(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/hahen_draw__FP12e_nest_class.s"
+static void hahen_draw(e_nest_class* i_this) {
+ nest_hahen_s* debris = i_this->mDebris;
+ g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->tevStr);
+ for (int i = 0; i < 5; i++, debris++) {
+ if (debris->mActive) {
+ g_env_light.setLightTevColorType_MAJI(debris->mpModel, &i_this->tevStr);
+ mDoExt_modelUpdateDL(debris->mpModel);
+ }
+ }
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 805046E0-805046E4 000004 0004+00 1/13 0/0 0/0 .rodata @4066 */
-SECTION_RODATA static u8 const lit_4066[4] = {
- 0x00,
- 0x00,
- 0x00,
- 0x00,
-};
-COMPILER_STRIP_GATE(0x805046E0, &lit_4066);
-
-/* 805046E4-805046EC 000008 0008+00 0/5 0/0 0/0 .rodata @4067 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const lit_4067[8] = {
- 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x805046E4, &lit_4067);
-#pragma pop
-
-/* 805046EC-805046F4 000010 0008+00 0/5 0/0 0/0 .rodata @4068 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const lit_4068[8] = {
- 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x805046EC, &lit_4068);
-#pragma pop
-
-/* 805046F4-805046FC 000018 0008+00 0/5 0/0 0/0 .rodata @4069 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const lit_4069[8] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x805046F4, &lit_4069);
-#pragma pop
-
-/* 805046FC-80504700 000020 0004+00 0/1 0/0 0/0 .rodata @4070 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4070 = 120.0f;
-COMPILER_STRIP_GATE(0x805046FC, &lit_4070);
-#pragma pop
/* 80501040-805011CC 0001A0 018C+00 1/1 0/0 0/0 .text s_bomb_sub__FPvPv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void s_bomb_sub(void* param_0, void* param_1) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/s_bomb_sub__FPvPv.s"
+static void* s_bomb_sub(void* i_actor, void* i_debris) {
+ if (fopAcM_IsActor(i_actor)) {
+ fopAc_ac_c* actor = static_cast<fopAc_ac_c*>(i_actor);
+ if (dBomb_c::checkBombActor(actor)) {
+ dBomb_c* bomb = static_cast<dBomb_c*>(actor);
+ if (bomb->checkStateExplode()) {
+ nest_hahen_s* debris = static_cast<nest_hahen_s*>(i_debris);
+ cXyz delta = debris->mPos - bomb->current.pos;
+ if (delta.abs() < 120.0f) {
+ return i_actor;
+ }
+ }
+ }
+ }
+ return NULL;
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 80504700-80504704 000024 0004+00 0/4 0/0 0/0 .rodata @4198 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4198 = 500.0f;
-COMPILER_STRIP_GATE(0x80504700, &lit_4198);
-#pragma pop
-
-/* 80504704-80504708 000028 0004+00 0/4 0/0 0/0 .rodata @4199 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4199 = 0.5f;
-COMPILER_STRIP_GATE(0x80504704, &lit_4199);
-#pragma pop
-
-/* 80504708-8050470C 00002C 0004+00 0/2 0/0 0/0 .rodata @4200 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4200 = -5.0f;
-COMPILER_STRIP_GATE(0x80504708, &lit_4200);
-#pragma pop
-
-/* 8050470C-80504710 000030 0004+00 0/2 0/0 0/0 .rodata @4201 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4201 = 19.0f / 20.0f;
-COMPILER_STRIP_GATE(0x8050470C, &lit_4201);
-#pragma pop
-
-/* 80504710-80504714 000034 0004+00 0/1 0/0 0/0 .rodata @4202 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4202 = 4.0f;
-COMPILER_STRIP_GATE(0x80504710, &lit_4202);
-#pragma pop
-
-/* 80504714-80504718 000038 0004+00 0/1 0/0 0/0 .rodata @4203 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4203 = -50.0f;
-COMPILER_STRIP_GATE(0x80504714, &lit_4203);
-#pragma pop
-
-/* 80504718-8050471C 00003C 0004+00 0/5 0/0 0/0 .rodata @4204 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4204 = 100.0f;
-COMPILER_STRIP_GATE(0x80504718, &lit_4204);
-#pragma pop
-
-/* 8050471C-80504720 000040 0004+00 0/1 0/0 0/0 .rodata @4205 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4205 = -7.0f;
-COMPILER_STRIP_GATE(0x8050471C, &lit_4205);
-#pragma pop
-
-/* 80504720-80504724 000044 0004+00 0/2 0/0 0/0 .rodata @4206 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4206 = 15.0f;
-COMPILER_STRIP_GATE(0x80504720, &lit_4206);
-#pragma pop
-
-/* 80504724-80504728 000048 0004+00 0/5 0/0 0/0 .rodata @4207 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4207 = 10.0f;
-COMPILER_STRIP_GATE(0x80504724, &lit_4207);
-#pragma pop
-
-/* 80504728-8050472C 00004C 0004+00 1/7 0/0 0/0 .rodata @4208 */
-SECTION_RODATA static f32 const lit_4208 = 50.0f;
-COMPILER_STRIP_GATE(0x80504728, &lit_4208);
-
-/* 8050472C-80504730 000050 0004+00 0/3 0/0 0/0 .rodata @4209 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4209 = -1.0f;
-COMPILER_STRIP_GATE(0x8050472C, &lit_4209);
-#pragma pop
-
-/* 80504730-80504734 000054 0004+00 0/1 0/0 0/0 .rodata @4210 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4210 = 400.0f;
-COMPILER_STRIP_GATE(0x80504730, &lit_4210);
-#pragma pop
-
-/* 80504734-80504738 000058 0004+00 0/1 0/0 0/0 .rodata @4211 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4211 = 5000.0f;
-COMPILER_STRIP_GATE(0x80504734, &lit_4211);
-#pragma pop
-
-/* 80504738-8050473C 00005C 0004+00 0/1 0/0 0/0 .rodata @4212 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4212 = 1.0f / 100.0f;
-COMPILER_STRIP_GATE(0x80504738, &lit_4212);
-#pragma pop
-
-/* 8050473C-80504744 000060 0004+04 0/3 0/0 0/0 .rodata @4213 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4213[1 + 1 /* padding */] = {
- 2.0f,
- /* padding */
- 0.0f,
-};
-COMPILER_STRIP_GATE(0x8050473C, &lit_4213);
-#pragma pop
-
-/* 80504744-8050474C 000068 0008+00 1/3 0/0 0/0 .rodata @4215 */
-SECTION_RODATA static u8 const lit_4215[8] = {
- 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x80504744, &lit_4215);
/* 805011CC-805017FC 00032C 0630+00 1/1 0/0 0/0 .text
* hahen_normal__FP12e_nest_classP12nest_hahen_s */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void hahen_normal(e_nest_class* param_0, nest_hahen_s* param_1) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/hahen_normal__FP12e_nest_classP12nest_hahen_s.s"
+static void hahen_normal(e_nest_class* i_this, nest_hahen_s* i_debris) {
+ fopAc_ac_c* a_this = static_cast<fopAc_ac_c*>(i_this);
+ dBgS_LinChk lin_chk;
+ dBgS_ObjGndChk_Spl gnd_chk;
+
+ i_debris->mCounter++;
+ if (i_debris->mTimer != 0) {
+ i_debris->mTimer--;
+ }
+
+ i_debris->mLastPos = i_debris->mPos;
+ i_debris->mPos += i_debris->mSpeed;
+
+ cXyz vec1 = i_debris->mPos;
+ vec1.y += 500.0f;
+ gnd_chk.SetPos(&vec1);
+ f32 ground_cross = dComIfG_Bgsp().GroundCross(&gnd_chk);
+ if (i_debris->mPos.y < ground_cross) {
+ i_debris->mSpeed.y -= 0.5f;
+ if (i_debris->mSpeed.y < -5.0f) {
+ i_debris->mSpeed.y = -5.0f;
+ }
+ i_debris->mSpeed.x *= 0.95f;
+ i_debris->mSpeed.z *= 0.95f;
+ } else {
+ i_debris->mSpeed.y -= 4.0f;
+ if (i_debris->mSpeed.y < -50.0f) {
+ i_debris->mSpeed.y = -50.0f;
+ }
+ }
+
+ cXyz vec2;
+ vec2.set(i_debris->mPos.x, i_debris->mPos.y + 100.0f, i_debris->mPos.z);
+ if (fopAcM_gc_c::gndCheck(&vec2)) {
+ if (i_debris->mSpeed.y <= 0.0f && i_debris->mPos.y <= fopAcM_gc_c::getGroundY() + 1.0f) {
+ i_debris->mPos.y = fopAcM_gc_c::getGroundY() + 1.0f;
+ if (i_debris->mSpeed.y < -7.0f && i_debris->mGroundHitStage == 0) {
+ i_debris->mMaxRotationZ = cM_rndF(10.0f) + 15.0f;
+ i_debris->mGroundHitStage++;
+ vec2 = i_debris->mPos;
+ vec2.y += 50.0f;
+ vec2.z += 10.0f;
+ if (fopAcM_gc_c::gndCheck(&vec2)) {
+ vec2.y = fopAcM_gc_c::getGroundY() + 1.0f;
+ i_debris->mGroundAngleX = -cM_atan2s(vec2.y - i_debris->mPos.y,
+ vec2.z - i_debris->mPos.z);
+ if (i_debris->mGroundAngleX > 0x3000 || i_debris->mGroundAngleX < -0x3000) {
+ i_debris->mGroundAngleX = 0;
+ }
+ vec2 = i_debris->mPos;
+ vec2.y += 50.0f;
+ vec2.x += 10.0f;
+ if (fopAcM_gc_c::gndCheck(&vec2)) {
+ vec2.y = fopAcM_gc_c::getGroundY() + 1.0f;
+ i_debris->mGroundAngleZ = cM_atan2s(vec2.y - i_debris->mPos.y,
+ vec2.x - i_debris->mPos.x);
+ if (i_debris->mGroundAngleZ > 0x3000 || i_debris->mGroundAngleZ < -0x3000) {
+ i_debris->mGroundAngleZ = 0;
+ }
+ }
+ }
+ } else {
+ i_debris->mGroundHitStage = 3;
+ i_debris->mSpeed.y = -1.0f;
+ i_debris->mSpeed.z = 0.0f;
+ i_debris->mSpeed.x = 0.0f;
+ if (fpcM_Search(s_bomb_sub, i_debris) != NULL) {
+ i_debris->mActive = false;
+ }
+ }
+ i_debris->mAngleZ = i_debris->mMaxRotationZ * 400.0f
+ * cM_ssin(i_debris->mCounter * 0x1700);
+ cLib_addCalcAngleS2(&i_debris->mMaxRotationZ, 0, 1, 1);
+ } else {
+ if (i_debris->mPos.y < ground_cross) {
+ i_debris->mAngleZ = cM_ssin(i_debris->mCounter * 0x500) * 5000.0f;
+ } else {
+ cLib_addCalcAngleS2(&i_debris->mAngleZ, 0, 4, 0x400);
+ }
+ }
+ }
+
+ if (i_debris->mTimer == 0) {
+ cXyz delta_xz = i_debris->mPos - i_debris->mLastPos;
+ delta_xz.y = 0.0f;
+ if (delta_xz.abs() > 0.01f) {
+ cXyz lin_end = i_debris->mPos + delta_xz * 2.0f;
+ lin_chk.Set(&i_debris->mLastPos, &lin_end, a_this);
+ if (dComIfG_Bgsp().LineCross(&lin_chk)) {
+ i_debris->mPos = i_debris->mLastPos;
+ i_debris->mSpeed.x *= -1.0f;
+ i_debris->mSpeed.z *= -1.0f;
+ i_debris->mSpeed.y = 0.0f;
+ i_debris->mPos += i_debris->mSpeed;
+ i_debris->mTimer = 5;
+ }
+ }
+ }
}
-#pragma pop
/* 805017FC-80501930 00095C 0134+00 1/1 0/0 0/0 .text hahen_move__FP12e_nest_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void hahen_move(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/hahen_move__FP12e_nest_class.s"
+static void hahen_move(e_nest_class* i_this) {
+ nest_hahen_s* debris = i_this->mDebris;
+ dBgS_LinChk lin_chk;
+
+ for (int i = 0; i < 5; i++, debris++) {
+ if (debris->mActive) {
+ if (i_this->mBreakStage == 3 && debris->mActive == true) {
+ hahen_normal(i_this, debris);
+ }
+ MtxTrans(debris->mPos.x, debris->mPos.y, debris->mPos.z, 0);
+ mDoMtx_XrotM(*calc_mtx, debris->mGroundAngleX);
+ mDoMtx_ZrotM(*calc_mtx, debris->mGroundAngleZ);
+ mDoMtx_YrotM(*calc_mtx, debris->mAngleY + 0x4000);
+ mDoMtx_ZrotM(*calc_mtx, debris->mAngleZ);
+ MtxScale(debris->mScale.x, debris->mScale.y, debris->mScale.z, 1);
+ debris->mpModel->setBaseTRMtx(*calc_mtx);
+ }
+ }
+
+ if (i_this->mBreakStage == 2) {
+ i_this->mBreakStage = 3;
+ }
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 80504950-80504954 000008 0004+00 2/2 0/0 0/0 .bss None */
-static u8 data_80504950[4];
-
-/* 80504954-80504960 00000C 000C+00 1/1 0/0 0/0 .bss @3994 */
-static u8 lit_3994[12];
-
-/* 80504960-8050496C 000018 000C+00 7/7 0/0 0/0 .bss l_HIO */
-static u8 l_HIO[12];
/* 80501930-80501A40 000A90 0110+00 1/0 0/0 0/0 .text daE_Nest_Draw__FP12e_nest_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void daE_Nest_Draw(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/daE_Nest_Draw__FP12e_nest_class.s"
+static int daE_Nest_Draw(e_nest_class* i_this) {
+ g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->tevStr);
+ if (i_this->mBreakStage != 0) {
+ hahen_draw(i_this);
+ return 1;
+ } else {
+ g_env_light.setLightTevColorType_MAJI(i_this->mpModel, &i_this->tevStr);
+ mDoExt_modelUpdateDL(i_this->mpModel);
+ if (i_this->mAction == e_nest_class::ACT_DROP) {
+ cXyz vec;
+ f32 scale = l_HIO.mScale * i_this->scale.x;
+ vec.set(i_this->current.pos.x, i_this->current.pos.y + 50.0f, i_this->current.pos.z);
+ i_this->mShadowKey =
+ dComIfGd_setShadow(i_this->mShadowKey, 1, i_this->mpModel, &vec, scale * 500.0f,
+ 0.0f, i_this->current.pos.y, i_this->mAcch.GetGroundH(),
+ i_this->mAcch.m_gnd, &i_this->tevStr, 0, 1.0f,
+ dDlst_shadowControl_c::getSimpleTex());
+ }
+ return 1;
+ }
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 8050474C-80504750 000070 0004+00 0/1 0/0 0/0 .rodata @4297 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4297 = -90.0f;
-COMPILER_STRIP_GATE(0x8050474C, &lit_4297);
-#pragma pop
-
-/* 80504750-80504754 000074 0004+00 0/3 0/0 0/0 .rodata @4298 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4298 = 40.0f;
-COMPILER_STRIP_GATE(0x80504750, &lit_4298);
-#pragma pop
-
-/* 80504754-80504758 000078 0004+00 0/1 0/0 0/0 .rodata @4299 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4299 = -30.0f;
-COMPILER_STRIP_GATE(0x80504754, &lit_4299);
-#pragma pop
-
-/* 80504758-8050475C 00007C 0004+00 0/5 0/0 0/0 .rodata @4300 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4300 = 5.0f;
-COMPILER_STRIP_GATE(0x80504758, &lit_4300);
-#pragma pop
-
-/* 8050475C-80504760 000080 0004+00 0/3 0/0 0/0 .rodata @4301 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4301 = 30.0f;
-COMPILER_STRIP_GATE(0x8050475C, &lit_4301);
-#pragma pop
/* 80501A40-80501BDC 000BA0 019C+00 2/2 0/0 0/0 .text mtx_cc_set__FP12e_nest_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void mtx_cc_set(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/mtx_cc_set__FP12e_nest_class.s"
+static void mtx_cc_set(e_nest_class* i_this) {
+ mDoMtx_stack_c::transS(i_this->current.pos.x, i_this->current.pos.y, i_this->current.pos.z);
+ mDoMtx_stack_c::YrotM(i_this->mRotation.y);
+ mDoMtx_stack_c::XrotM(i_this->mRotation.x);
+ mDoMtx_stack_c::ZrotM(i_this->mRotation.z);
+ f32 scale = l_HIO.mScale * i_this->scale.x;
+ mDoMtx_stack_c::scaleM(scale, scale, scale);
+ mDoMtx_stack_c::transM(0.0f, i_this->mCarryOffset + i_this->mDropOffset, 0.0f);
+ i_this->mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
+
+ cXyz vec;
+ vec.x = 0.0f;
+ vec.y = -90.0f;
+ vec.z = 0.0f;
+ mDoMtx_stack_c::multVec(&vec, &i_this->mCenterPos);
+
+ i_this->mCcSph.SetC(i_this->mCenterPos);
+ dComIfG_Ccsp()->Set(&i_this->mCcSph);
+ i_this->mCcSph.SetR(scale * 40.0f);
+
+ if (i_this->mAction == e_nest_class::ACT_NORMAL) {
+ vec = i_this->current.pos;
+ vec.y += -30.0f;
+ i_this->mCcCyl.SetC(vec);
+ i_this->mCcCyl.SetR(5.0f);
+ i_this->mCcCyl.SetH(30.0f);
+ dComIfG_Ccsp()->Set(&i_this->mCcCyl);
+ }
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 80504760-80504764 000084 0004+00 2/3 0/0 0/0 .rodata @4431 */
-SECTION_RODATA static f32 const lit_4431 = 135.0f;
-COMPILER_STRIP_GATE(0x80504760, &lit_4431);
-
-/* 805047EC-805047EC 000110 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
-#pragma push
-#pragma force_active on
-SECTION_DEAD static char const* const stringBase_805047EC = "F_SP103";
-#pragma pop
/* 80501BDC-805020D0 000D3C 04F4+00 1/1 0/0 0/0 .text e_nest_normal__FP12e_nest_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void e_nest_normal(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/e_nest_normal__FP12e_nest_class.s"
+static void e_nest_normal(e_nest_class* i_this) {
+ fopAc_ac_c* a_this = static_cast<fopAc_ac_c*>(i_this);
+ if (i_this->mHitTimer != 0) {
+ i_this->mHitTimer--;
+ i_this->mRotation.x = i_this->mHitTimer * cM_ssin(i_this->mHitTimer * 12000) * 50.0f;
+ i_this->mRotation.z = i_this->mHitTimer * cM_ssin(i_this->mHitTimer * 14000) * 50.0f;
+ if (i_this->mHitTimer == 0) {
+ if (i_this->mKnockDown != 0) {
+ i_this->mAction = e_nest_class::ACT_DROP;
+ i_this->mMode = 0;
+ i_this->mTimers[0] = 8;
+ i_this->mTimers[2] = 120;
+ i_this->mTimers[1] = 100;
+ i_this->mDropOffset = 135.0f;
+ a_this->current.pos.y -= i_this->mDropOffset * l_HIO.mScale * a_this->scale.x;
+ if (i_this->mHawkHit) {
+ daNPC_TK_c* hawk =
+ static_cast<daNPC_TK_c*>(fopAcM_SearchByID(i_this->mHitActorID));
+ hawk->setHawkCamera(a_this);
+ }
+ } else {
+ a_this->health = 1;
+ }
+ }
+ } else {
+ a_this->health = 0;
+ if (i_this->mIframes == 0) {
+ if (i_this->mCcCyl.ChkTgHit()) {
+ i_this->mAtInfo.mpCollider = i_this->mCcCyl.GetTgHitObj();
+ if (i_this->mAtInfo.mpCollider->ChkAtType(AT_TYPE_BOMB)) {
+ a_this->field_0x567 = 1;
+ fopAcM_delete(a_this);
+ } else {
+ i_this->mIframes = 10;
+ i_this->mHitTimer = 3;
+ i_this->mKnockDown = 1;
+ i_this->mHitActorID = fopAcM_GetID(daPy_getPlayerActorClass());
+ }
+ } else {
+ int knock_down = false;
+
+ if (i_this->mCcSph.ChkTgHit()) {
+ i_this->mIframes = 10;
+ i_this->mAtInfo.mpCollider = i_this->mCcSph.GetTgHitObj();
+ cc_at_check(a_this, &i_this->mAtInfo);
+ if (i_this->mAtInfo.mpCollider->ChkAtType(AT_TYPE_HOOKSHOT)) {
+ i_this->mAction = e_nest_class::ACT_HOOK;
+ i_this->mMode = 0;
+ i_this->mKnockDown = 0;
+ i_this->mHitActorID = fopAcM_GetID(daPy_getPlayerActorClass());
+ } else if (i_this->mAtInfo.mpCollider->ChkAtType(AT_TYPE_SLINGSHOT) ||
+ i_this->mAtInfo.mpCollider->ChkAtType(AT_TYPE_IRON_BALL)) {
+ i_this->mHitTimer = 10;
+ i_this->mAtInfo.mpCollider = i_this->mCcSph.GetTgHitObj();
+ knock_down = true;
+ } else {
+ i_this->mHitTimer = 10;
+ i_this->mAtInfo.mpCollider = i_this->mCcSph.GetTgHitObj();
+ }
+ } else if (i_this->mCcSph.ChkCoHit()) {
+ i_this->mHitTimer = 5;
+ i_this->mAtInfo.mpCollider = i_this->mCcSph.GetCoHitObj();
+ }
+
+ if (i_this->mHitTimer != 0) {
+ fopAc_ac_c* actor = at_power_check(&i_this->mAtInfo);
+ if (knock_down) {
+ i_this->mIframes = 10;
+ if (!dComIfGp_event_runCheck()) {
+ i_this->mHitTimer = 20;
+ i_this->mKnockDown = 1;
+ i_this->mHitActorID = fopAcM_GetID(daPy_getPlayerActorClass());
+ if (!strcmp(dComIfGp_getStartStageName(), "F_SP103")) {
+ i_this->mDemoStage = 1;
+ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[183]);
+ }
+ }
+ } else if (i_this->mAtInfo.mHitType == HIT_TYPE_LINK_NORMAL_ATTACK
+ || i_this->mAtInfo.mHitType == HIT_TYPE_BOMB
+ || i_this->mAtInfo.mHitType == HIT_TYPE_ARROW
+ || i_this->mAtInfo.mHitType == HIT_TYPE_BOOMERANG
+ || i_this->mAtInfo.mHitType == HIT_TYPE_STUN) {
+ i_this->mHitActorID = fopAcM_GetID(daPy_getPlayerActorClass());
+ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[172]);
+ } else if (fopAcM_GetName(actor) == PROC_NPC_TK) {
+ daNPC_TK_c* hawk = static_cast<daNPC_TK_c*>(actor);
+ hawk->setBump();
+ i_this->mHitActorID = fopAcM_GetID(hawk);
+ i_this->mKnockDown = 1;
+ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[171]);
+ i_this->mHitTimer = 20;
+ i_this->mHawkHit = true;
+ i_this->mSound.startSound(Z2SE_OBJ_HACHINOSU_HIT, 0, -1);
+ } else if (!strcmp(dComIfGp_getStartStageName(), "F_SP103")) {
+ i_this->mHitActorID = fopAcM_GetID(actor);
+ } else {
+ i_this->mHitTimer = 0;
+ }
+ }
+ }
+ }
+ }
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 80504764-80504768 000088 0004+00 0/1 0/0 0/0 .rodata @4489 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4489 = -10.0f;
-COMPILER_STRIP_GATE(0x80504764, &lit_4489);
-#pragma pop
-
-/* 80504768-8050476C 00008C 0004+00 0/3 0/0 0/0 .rodata @4490 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4490 = 200.0f;
-COMPILER_STRIP_GATE(0x80504768, &lit_4490);
-#pragma pop
/* 805020D0-80502280 001230 01B0+00 1/1 0/0 0/0 .text wall_angle_get__FP12e_nest_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void wall_angle_get(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/wall_angle_get__FP12e_nest_class.s"
+static s16 wall_angle_get(e_nest_class* i_this) {
+ fopAc_ac_c* a_this = static_cast<fopAc_ac_c*>(i_this);
+ dBgS_LinChk lin_chk;
+ cXyz vec1, vec2, vec3[2];
+ mDoMtx_YrotS(*calc_mtx, a_this->current.angle.y);
+ vec1.x = 0.0f;
+ vec1.y = 0.0f;
+ vec1.z = a_this->scale.x * -10.0f;
+ MtxPosition(&vec1, &vec2);
+ vec2 += a_this->current.pos;
+ vec1.x = 5.0f;
+ vec1.y = 0.0f;
+ vec1.z = a_this->scale.x * 200.0f;
+ for (int i = 0; i < 2; i++) {
+ MtxPosition(&vec1, &vec3[i]);
+ vec1.x *= -1.0f;
+ vec3[i] += vec2;
+ lin_chk.Set(&vec2, &vec3[i], a_this);
+ if (dComIfG_Bgsp().LineCross(&lin_chk)) {
+ vec3[i] = lin_chk.i_GetCross();
+ } else {
+ return 0x23;
+ }
+ }
+ vec1 = vec3[1] - vec3[0];
+ return cM_atan2s(vec1.x, vec1.z) + 0x4000;
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 8050476C-80504770 000090 0004+00 0/2 0/0 0/0 .rodata @4547 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4547 = 20.0f;
-COMPILER_STRIP_GATE(0x8050476C, &lit_4547);
-#pragma pop
-
-/* 80504770-80504774 000094 0004+00 0/2 0/0 0/0 .rodata @4548 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4548 = 1000.0f;
-COMPILER_STRIP_GATE(0x80504770, &lit_4548);
-#pragma pop
-
-/* 80504774-80504778 000098 0004+00 0/1 0/0 0/0 .rodata @4549 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4549 = 1300.0f;
-COMPILER_STRIP_GATE(0x80504774, &lit_4549);
-#pragma pop
-
-/* 80504778-8050477C 00009C 0004+00 0/2 0/0 0/0 .rodata @4550 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4550 = -80.0f;
-COMPILER_STRIP_GATE(0x80504778, &lit_4550);
-#pragma pop
-
-/* 8050477C-80504780 0000A0 0004+00 0/1 0/0 0/0 .rodata @4551 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4551 = -3.0f / 10.0f;
-COMPILER_STRIP_GATE(0x8050477C, &lit_4551);
-#pragma pop
-
-/* 80504780-80504784 0000A4 0004+00 0/3 0/0 0/0 .rodata @4552 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4552 = 1.0f / 10.0f;
-COMPILER_STRIP_GATE(0x80504780, &lit_4552);
-#pragma pop
/* 80502280-805025C4 0013E0 0344+00 1/1 0/0 0/0 .text e_nest_drop__FP12e_nest_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void e_nest_drop(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/e_nest_drop__FP12e_nest_class.s"
+static void e_nest_drop(e_nest_class* i_this) {
+ if (i_this->mAcch.ChkGroundHit()) {
+ if (i_this->mKnockDown != 0) {
+ i_this->field_0x567 = 1;
+ i_this->health = 2;
+ return;
+ }
+ if (i_this->mCcSph.ChkTgHit()) {
+ i_this->field_0x567 = 2;
+ }
+ if (i_this->mMode < 3) {
+ if (i_this->mMode == 0) {
+ i_this->health = 2;
+ i_this->mSound.startSound(Z2SE_OBJ_HACHINOSU_BOUND, 0, -1);
+ i_this->speed.y = 20.0f;
+ fopAcM_effSmokeSet1(&i_this->mSmokeKey1, &i_this->mSmokeKey2,
+ &i_this->current.pos, &i_this->shape_angle,
+ i_this->scale.x, &i_this->tevStr, 1);
+ i_this->mWobble = 1000.0f;
+ if (i_this->mSpin == 0) {
+ i_this->mSpin = cM_rndFX(1300.0f);
+ }
+ } else if (i_this->mMode == 1) {
+ i_this->speed.y = 5.0f;
+ } else if (i_this->mMode == 2) {
+ i_this->speed.y = 2.0f;
+ }
+ i_this->mMode++;
+ i_this->speedF *= 0.5f;
+ } else {
+ i_this->speedF = 0.0f;
+ }
+ }
+
+ cXyz vec1, vec2;
+ mDoMtx_YrotS(*calc_mtx, i_this->current.angle.y);
+ vec1.x = 0.0f;
+ vec1.y = 0.0f;
+ vec1.z = i_this->speedF;
+ MtxPosition(&vec1, &vec2);
+ i_this->speed.x = vec2.x;
+ i_this->speed.z = vec2.z;
+ i_this->speed.y += -5.0f;
+ i_this->current.pos += i_this->speed;
+ if (i_this->speed.y < -80.0f) {
+ i_this->speed.y = -80.0f;
+ }
+
+ if (i_this->mTimers[1] == 0 && i_this->mAcch.ChkWallHit()) {
+ s16 wall_angle = wall_angle_get(i_this);
+ if (wall_angle != 0x23) {
+ s16 angle_delta = i_this->current.angle.y - wall_angle;
+ i_this->mSpin = angle_delta * -0.3f;
+ i_this->current.angle.y += (s16)(0x8000 - (angle_delta << 1));
+ i_this->speedF *= 0.5f;
+ i_this->mTimers[1] = 10;
+ i_this->mSound.startSound(Z2SE_OBJ_HACHINOSU_BOUND, 0, -1);
+ }
+ }
+
+ i_this->mDropOffset = 135.0f;
+ i_this->mRotation.x = i_this->mWobble * cM_ssin(i_this->mFrame * 3000);
+ i_this->mRotation.z = i_this->mWobble * cM_ssin(i_this->mFrame * 4000);
+ cLib_addCalc0(&i_this->mWobble, 0.1f, 50.0f);
+ i_this->mRotation.y += i_this->mSpin;
+ cLib_addCalcAngleS2(&i_this->mSpin, 0, 1, 100);
}
-#pragma pop
/* 805025C4-80502730 001724 016C+00 1/1 0/0 0/0 .text e_nest_carry__FP12e_nest_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void e_nest_carry(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/e_nest_carry__FP12e_nest_class.s"
+static s8 e_nest_carry(e_nest_class* i_this) {
+ fopAc_ac_c* player = dComIfGp_getPlayer(0);
+ i_this->speed.y = 0.0f;
+ s8 ret = true;
+
+ switch (i_this->mMode) {
+ case 0:
+ cLib_offBit<u32>(i_this->attention_info.flags, 0x10);
+ i_this->mMode = 1;
+ s16 angle_delta_y = i_this->mRotation.y - player->shape_angle.y;
+ if (angle_delta_y > 0x4000 || angle_delta_y < -0x4000) {
+ i_this->mCarryAngle = 0x8000;
+ } else {
+ i_this->mCarryAngle = 0;
+ }
+ i_this->mTimers[0] = 20;
+ break;
+
+ case 1:
+ if (!fopAcM_checkCarryNow(i_this)) {
+ i_this->mTimers[0] = 0;
+ i_this->mCcSph.OnCoSetBit();
+ i_this->mAction = e_nest_class::ACT_DROP;
+ if (i_this->speedF >= 1.0f) {
+ i_this->speedF = 30.0f;
+ i_this->speed.y = 30.0f;
+ i_this->current.angle.y = player->shape_angle.y;
+ i_this->mMode = 0;
+ } else {
+ i_this->speedF = 0.0f;
+ i_this->mMode = 3;
+ i_this->mWobble = 500.0f;
+ }
+ } else {
+ ret = false;
+ }
+ break;
+ }
+
+ cLib_addCalcAngleS2(&i_this->mRotation.y, player->shape_angle.y + i_this->mCarryAngle,
+ 1, i_this->mCarryAngleSpeed);
+ cLib_addCalcAngleS2(&i_this->mCarryAngleSpeed, 0x2000, 1, 0x100);
+ return ret;
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 80504784-80504788 0000A8 0004+00 0/1 0/0 0/0 .rodata @4611 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4611 = 3000.0f;
-COMPILER_STRIP_GATE(0x80504784, &lit_4611);
-#pragma pop
/* 80502730-8050284C 001890 011C+00 1/1 0/0 0/0 .text water_check__FP12e_nest_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void water_check(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/water_check__FP12e_nest_class.s"
+static int water_check(e_nest_class* i_this) {
+ dBgS_LinChk lin_chk;
+ cXyz vec;
+ vec.x = i_this->current.pos.x;
+ vec.y = i_this->current.pos.y + 3000.0f;
+ vec.z = i_this->current.pos.z;
+ lin_chk.Set(&i_this->current.pos, &vec, i_this);
+ if (dComIfG_Bgsp().LineCross(&lin_chk)) {
+ vec.y = lin_chk.i_GetCross().y - 10.0f;
+ }
+ dBgS_ObjGndChk_Spl gnd_chk;
+ gnd_chk.SetPos(&vec);
+ i_this->mWaterHeight = dComIfG_Bgsp().GroundCross(&gnd_chk);
+ if (i_this->mWaterHeight > i_this->current.pos.y + 50.0f) {
+ return true;
+ } else {
+ return false;
+ }
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 80504788-8050478C 0000AC 0004+00 0/2 0/0 0/0 .rodata @4683 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4683 = 3.0f;
-COMPILER_STRIP_GATE(0x80504788, &lit_4683);
-#pragma pop
/* 8050284C-80502AD4 0019AC 0288+00 1/1 0/0 0/0 .text simple_bg_check__FP12e_nest_class
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void simple_bg_check(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/simple_bg_check__FP12e_nest_class.s"
+static int simple_bg_check(e_nest_class* i_this) {
+ fopAc_ac_c* a_this = static_cast<fopAc_ac_c*>(i_this);
+ cXyz vec2, vec3, vec1;
+ vec1 = a_this->current.pos - a_this->old.pos;
+ vec1.y = 0.0f;
+ if (vec1.abs() > 0.0f) {
+ s16 angle_y = cM_atan2s(vec1.x, vec1.z);
+ vec2 = a_this->current.pos;
+ vec2.y = i_this->mWaterHeight + 3.0f;
+ vec1.y = 0.0f;
+ mDoMtx_YrotS(*calc_mtx, angle_y);
+ static f32 c_x[3] = {50.0f, -50.0f, 0.0f};
+ static f32 c_z[3] = {0.0f, 0.0f, 50.0f};
+ for (int i = 0; i < 3; i++) {
+ vec1.x = c_x[i] * l_HIO.mScale * a_this->scale.x;
+ vec1.z = c_z[i] * l_HIO.mScale * a_this->scale.x;
+ MtxPosition(&vec1, &vec3);
+ vec3 += vec2;
+ dBgS_LinChk lin_chk;
+ lin_chk.Set(&vec2, &vec3, a_this);
+ if (dComIfG_Bgsp().LineCross(&lin_chk)) {
+ return true;
+ }
+ }
+ }
+ return false;
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 8050478C-80504790 0000B0 0004+00 0/1 0/0 0/0 .rodata @4717 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4717 = 0.25f;
-COMPILER_STRIP_GATE(0x8050478C, &lit_4717);
-#pragma pop
-
-/* 80504790-80504794 0000B4 0004+00 0/2 0/0 0/0 .rodata @4718 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4718 = 60.0f;
-COMPILER_STRIP_GATE(0x80504790, &lit_4718);
-#pragma pop
-
-/* 80504794-80504798 0000B8 0004+00 0/1 0/0 0/0 .rodata @4719 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4719 = 1.0f / 20.0f;
-COMPILER_STRIP_GATE(0x80504794, &lit_4719);
-#pragma pop
-
-/* 80504798-8050479C 0000BC 0004+00 0/1 0/0 0/0 .rodata @4720 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u32 const lit_4720 = 0x3B83126F;
-COMPILER_STRIP_GATE(0x80504798, &lit_4720);
-#pragma pop
/* 80502AD4-80502D30 001C34 025C+00 1/1 0/0 0/0 .text e_nest_float__FP12e_nest_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void e_nest_float(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/e_nest_float__FP12e_nest_class.s"
+static void e_nest_float(e_nest_class* i_this) {
+ cLib_addCalc0(&i_this->speed.y, 1.0f, 0.25f);
+ i_this->current.pos += i_this->speed;
+ i_this->speed.x *= 0.95f;
+ i_this->speed.z *= 0.95f;
+
+ cXyz vec = i_this->current.pos;
+ vec.y = i_this->mWaterHeight;
+ if (i_this->current.pos.y + 60.0f > vec.y) {
+ fopAcM_effHamonSet(&i_this->mRippleKey, &vec, i_this->scale.x, 0.05f);
+ }
+
+ cLib_addCalc2(&i_this->current.pos.y, i_this->mWaterHeight - 40.0f +
+ i_this->mBob * 0.004f * cM_ssin(i_this->mFrame * 900), 0.1f, 10.0f);
+ i_this->mRotation.x = i_this->mBob * cM_ssin(i_this->mFrame * 1000);
+ i_this->mRotation.z = i_this->mBob * cM_ssin(i_this->mFrame * 1100);
+ cLib_addCalc2(&i_this->mBob, 500.0f, 0.1f, 30.0f);
+ i_this->mRotation.y += i_this->mSpin;
+
+ if (i_this->mCcSph.ChkCoHit()) {
+ cXyz* move_p = i_this->mCcStts.GetCCMoveP();
+ if (move_p != NULL) {
+ cLib_addCalc2(&i_this->speed.x, move_p->x * 0.5f, 0.1f, 1.0f);
+ cLib_addCalc2(&i_this->speed.z, move_p->z * 0.5f, 0.1f, 1.0f);
+ cLib_addCalc2(&i_this->mBob, 1000.0f, 0.1f, 100.0f);
+ }
+ }
+
+ cLib_addCalcAngleS2(&i_this->mSpin, 0, 1, 150);
+
+ if (simple_bg_check(i_this)) {
+ i_this->current.pos = i_this->old.pos;
+ }
+
+ if (i_this->mAcch.ChkGroundHit()) {
+ i_this->mAction = e_nest_class::ACT_DROP;
+ i_this->speedF = 0.0f;
+ i_this->mMode = 3;
+ }
+
+ if (i_this->mCcSph.ChkTgHit()) {
+ i_this->field_0x567 = 2;
+ }
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 8050479C-805047A0 0000C0 0004+00 0/1 0/0 0/0 .rodata @4844 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4844 = -150.0f;
-COMPILER_STRIP_GATE(0x8050479C, &lit_4844);
-#pragma pop
-
-/* 805047A0-805047A4 0000C4 0004+00 0/1 0/0 0/0 .rodata @4845 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_4845 = 230.0f;
-COMPILER_STRIP_GATE(0x805047A0, &lit_4845);
-#pragma pop
/* 80502D30-80503120 001E90 03F0+00 1/1 0/0 0/0 .text e_nest_hahen__FP12e_nest_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void e_nest_hahen(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/e_nest_hahen__FP12e_nest_class.s"
+static void e_nest_hahen(e_nest_class* i_this) {
+ fopAc_ac_c* a_this = static_cast<fopAc_ac_c*>(i_this);
+ daPy_py_c* player = static_cast<daPy_py_c*>(dComIfGp_getPlayer(0));
+
+ switch (i_this->mMode) {
+ case 0:
+ i_this->mTimers[0] = 10;
+ i_this->mMode = 1;
+ // no break
+
+ case 1:
+ if (i_this->mTimers[0] == 1 && i_this->mHawkHit) {
+ daNPC_TK_c* hawk = static_cast<daNPC_TK_c*>(fopAcM_SearchByID(i_this->mHitActorID));
+ hawk->setHawkSideCamera(a_this->current.pos);
+ }
+
+ for (int i = 0; i < 5; i++) {
+ if (i_this->mDebris[i].mActive
+ && i_this->mDebris[i].mPos.y > i_this->mWaterHeight - 10.0f) {
+ cXyz player_to_debris = i_this->mDebris[i].mPos - player->current.pos;
+ if (player_to_debris.abs() < 100.0f) {
+ a_this->current.pos = i_this->mDebris[i].mPos;
+ a_this->attention_info.position = a_this->current.pos;
+ a_this->eyePos = a_this->attention_info.position;
+ if (a_this->eventInfo.i_checkCommandCatch()) {
+ i_this->mMode = 2;
+ i_this->mTimers[0] = 60;
+ } else {
+ dComIfGp_att_CatchRequest(a_this, 0x76, 100.0f, 50.0f, -150.0f, 0x5000, 1);
+ a_this->eventInfo.i_onCondition(0x40);
+ }
+ break;
+ }
+ }
+ }
+ break;
+
+ case 2:
+ if (i_this->mTimers[0] == 0) {
+ i_this->mMode = 1;
+ }
+ break;
+ }
+
+ if (fopAcM_searchPlayerDistance(a_this) < 230.0f) {
+ player->setLookPos(&a_this->current.pos);
+ }
+
+ if (!strcmp(dComIfGp_getStartStageName(), "F_SP103") && i_this->mTimers[2] == 70) {
+ mDoAud_seStart(Z2SE_READ_RIDDLE_B, 0, 0, 0);
+ }
+
+ if (i_this->mTimers[2] == 1 && i_this->mHawkHit) {
+ daNPC_TK_c* hawk = static_cast<daNPC_TK_c*>(fopAcM_SearchByID(i_this->mHitActorID));
+ if (hawk != NULL) {
+ hawk->endHawkCamera();
+ }
+ }
+
+ cXyz gnd_chk_pos = a_this->current.pos;
+ gnd_chk_pos.y += 200.0f;
+ if (fopAcM_gc_c::gndCheck(&gnd_chk_pos)) {
+ a_this->current.pos.y = fopAcM_gc_c::getGroundY();
+ }
}
-#pragma pop
/* 80503120-805031CC 002280 00AC+00 1/1 0/0 0/0 .text e_nest_hook__FP12e_nest_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void e_nest_hook(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/e_nest_hook__FP12e_nest_class.s"
+static void e_nest_hook(e_nest_class* i_this) {
+ i_this->mIframes = 10;
+
+ switch (i_this->mMode) {
+ case 0:
+ i_this->mMode = 1;
+ i_this->speedF = 0.0f;
+ i_this->mTimers[0] = 3;
+ // no break
+
+ case 1:
+ default:
+ if (i_this->mTimers[0] == 0 && !fopAcM_checkHookCarryNow(i_this)) {
+ i_this->mAction = e_nest_class::ACT_DROP;
+ i_this->mMode = 0;
+ i_this->mDropOffset = 135.0f;
+ i_this->current.pos.y -= i_this->mDropOffset * l_HIO.mScale * i_this->scale.x;
+ fopAcM_OffStatus(i_this, 0x80000);
+ }
+ break;
+ }
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 805047A4-805047A8 0000C8 0004+00 0/1 0/0 0/0 .rodata @5004 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5004 = -2.0f;
-COMPILER_STRIP_GATE(0x805047A4, &lit_5004);
-#pragma pop
-
-/* 805047A8-805047AC 0000CC 0004+00 0/1 0/0 0/0 .rodata @5005 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5005 = 2.5f;
-COMPILER_STRIP_GATE(0x805047A8, &lit_5005);
-#pragma pop
-
-/* 805047AC-805047B0 0000D0 0004+00 0/1 0/0 0/0 .rodata @5006 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5006 = -8.0f;
-COMPILER_STRIP_GATE(0x805047AC, &lit_5006);
-#pragma pop
-
-/* 805047B0-805047B4 0000D4 0004+00 0/1 0/0 0/0 .rodata @5007 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5007 = 2500.0f;
-COMPILER_STRIP_GATE(0x805047B0, &lit_5007);
-#pragma pop
-
-/* 805047B4-805047B8 0000D8 0004+00 0/2 0/0 0/0 .rodata @5008 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5008 = 7.0f / 10.0f;
-COMPILER_STRIP_GATE(0x805047B4, &lit_5008);
-#pragma pop
/* 805031CC-80503668 00232C 049C+00 1/1 0/0 0/0 .text bee_nest_action__FP12e_nest_class
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void bee_nest_action(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/bee_nest_action__FP12e_nest_class.s"
+static void bee_nest_action(e_nest_class* i_this) {
+ i_this->attention_info.position = i_this->eyePos = i_this->current.pos;
+ i_this->eyePos.y += i_this->scale.x * -80.0f;
+
+ s8 bvar7 = false;
+ s8 float_check = false;
+ f32 carry_offset = 0.0f;
+ s8 carry_check = false;
+
+ if (i_this->mIframes != 0) {
+ i_this->mIframes--;
+ }
+
+ i_this->mCcStts.Move();
+
+ switch (i_this->mAction) {
+ case e_nest_class::ACT_NORMAL:
+ e_nest_normal(i_this);
+ break;
+ case e_nest_class::ACT_DROP:
+ e_nest_drop(i_this);
+ carry_check = true;
+ if (i_this->mTimers[0] == 0) {
+ bvar7 = true;
+ }
+ float_check = true;
+ break;
+ case e_nest_class::ACT_HOOK:
+ e_nest_hook(i_this);
+ break;
+ case e_nest_class::ACT_CARRY:
+ bvar7 = e_nest_carry(i_this);
+ carry_offset = 15.0f;
+ break;
+ case e_nest_class::ACT_FLOAT:
+ e_nest_float(i_this);
+ bvar7 = true;
+ carry_check = true;
+ break;
+ case e_nest_class::ACT_DEBRIS:
+ e_nest_hahen(i_this);
+ cLib_offBit<u32>(i_this->attention_info.flags, 0x10);
+ return;
+ }
+
+ cLib_addCalc2(&i_this->mCarryOffset, carry_offset, 1.0f, 5.0f);
+
+ if (bvar7) {
+ i_this->mAcch.CrrPos(dComIfG_Bgsp());
+ }
+
+ if (carry_check) {
+ cLib_onBit<u32>(i_this->attention_info.flags, 0x10);
+ i_this->attention_info.field_0x0[4] = 0x2c;
+ if (fopAcM_checkCarryNow(i_this)) {
+ i_this->mAction = e_nest_class::ACT_CARRY;
+ i_this->mMode = 0;
+ i_this->mCcSph.OffCoSetBit();
+ }
+ } else {
+ cLib_offBit<u32>(i_this->attention_info.flags, 0x10);
+ }
+
+ if (float_check && water_check(i_this)) {
+ i_this->mAction = e_nest_class::ACT_FLOAT;
+ i_this->mMode = 0;
+ i_this->health = 2;
+ if (i_this->speedF < 5.0f) {
+ mDoMtx_YrotS(*calc_mtx, i_this->current.angle.y);
+ cXyz vec;
+ vec.x = 0.0f;
+ vec.y = -2.0f;
+ vec.z = 2.5f;
+ MtxPosition(&vec, &i_this->speed);
+ } else {
+ i_this->current.pos.y = i_this->mWaterHeight;
+ i_this->speed.y = -8.0f;
+ i_this->speed.x *= 0.5f;
+ i_this->speed.z *= 0.5f;
+ i_this->mBob = 2500.0f;
+ }
+ i_this->speedF = 0.0f;
+ cXyz vec1(i_this->scale.x, i_this->scale.x, i_this->scale.x);
+ cXyz vec2 = i_this->current.pos;
+ vec2.y = i_this->mWaterHeight;
+ static u16 w_eff_id[] = {0x01B8, 0x01B9, 0x01BA, 0x01BB};
+ for (int i = 0; i < 4; i++) {
+ i_this->mParticleKey[i] =
+ dComIfGp_particle_set(i_this->mParticleKey[i], w_eff_id[i], &vec2, &i_this->tevStr,
+ NULL, &vec1, -1, NULL, -1, NULL, NULL, NULL);
+ }
+ i_this->mSound.startSound(Z2SE_AL_INTO_WATER, 0, -1);
+ }
+
+ if (i_this->field_0x567 != 0) {
+ i_this->mSound.startSound(Z2SE_OBJ_HACHINOSU_BREAK, 0, -1);
+ cXyz vec1 = i_this->current.pos;
+ f32 scale = i_this->scale.x * 0.7f;
+ cXyz vec2(scale, scale, scale);
+ static u16 b_eff_id[] = {0x832C, 0x832D};
+ for (int i = 0; i < 2; i++) {
+ dComIfGp_particle_set(b_eff_id[i], &vec1, &i_this->tevStr, &i_this->shape_angle, &vec2);
+ }
+ i_this->mBreakStage = 1;
+ if (i_this->field_0x567 == 1) {
+ dComIfGs_onSwitch(i_this->mBrokenSwitch, fopAcM_GetRoomNo(i_this));
+ }
+ i_this->field_0x567 = 0;
+ }
+
+ mtx_cc_set(i_this);
}
-#pragma pop
/* 80503668-805036E0 0027C8 0078+00 1/1 0/0 0/0 .text shot_b_sub__FPvPv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void shot_b_sub(void* param_0, void* param_1) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/shot_b_sub__FPvPv.s"
+static void* shot_b_sub(void* i_actor, void* i_data) {
+ daPy_py_c* player = static_cast<daPy_py_c*>(dComIfGp_getPlayer(0));
+ if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_BOOMERANG
+ && !dComIfGp_checkPlayerStatus0(0, 0x80000) && player->checkBoomerangCharge()
+ && fopAcM_GetParam(i_actor) == 1) {
+ return i_actor;
+ }
+ return NULL;
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 805047B8-805047BC 0000DC 0004+00 0/1 0/0 0/0 .rodata @5110 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5110 = 55.0f;
-COMPILER_STRIP_GATE(0x805047B8, &lit_5110);
-#pragma pop
-
-/* 805047BC-805047C0 0000E0 0004+00 0/1 0/0 0/0 .rodata @5111 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5111 = -1290.0f;
-COMPILER_STRIP_GATE(0x805047BC, &lit_5111);
-#pragma pop
-
-/* 805047C0-805047C4 0000E4 0004+00 0/1 0/0 0/0 .rodata @5112 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5112 = 1342.0f;
-COMPILER_STRIP_GATE(0x805047C0, &lit_5112);
-#pragma pop
-
-/* 805047C4-805047C8 0000E8 0004+00 0/1 0/0 0/0 .rodata @5113 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5113 = 1077.0f;
-COMPILER_STRIP_GATE(0x805047C4, &lit_5113);
-#pragma pop
-
-/* 805047C8-805047CC 0000EC 0004+00 0/2 0/0 0/0 .rodata @5114 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5114 = 1.0f / 5.0f;
-COMPILER_STRIP_GATE(0x805047C8, &lit_5114);
-#pragma pop
-
-/* 805047CC-805047D0 0000F0 0004+00 0/1 0/0 0/0 .rodata @5115 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5115 = 3.0f / 20.0f;
-COMPILER_STRIP_GATE(0x805047CC, &lit_5115);
-#pragma pop
/* 805036E0-80503984 002840 02A4+00 1/1 0/0 0/0 .text demo_camera__FP12e_nest_class */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void demo_camera(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/demo_camera__FP12e_nest_class.s"
+static void demo_camera(e_nest_class* i_this) {
+ camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0));
+ s8 end_demo = false;
+
+ switch (i_this->mDemoStage) {
+ case 0:
+ break;
+
+ case 1:
+ if (!i_this->eventInfo.checkCommandDemoAccrpt()) {
+ fopAcM_orderPotentialEvent(i_this, 2, -1, 0);
+ i_this->eventInfo.i_onCondition(2);
+ return;
+ }
+ camera->mCamera.Stop();
+ i_this->mDemoStage = 2;
+ i_this->mDemoTimer = 0;
+ i_this->mDemoCameraFovY = 55.0f;
+ camera->mCamera.SetTrimSize(3);
+ daPy_getPlayerActorClass()->changeOriginalDemo();
+ daPy_getPlayerActorClass()->changeDemoMode(1, 0, 0, 0);
+ i_this->mDemoCameraCenter.x = i_this->mCenterPos.x;
+ i_this->mDemoCameraCenter.z = i_this->mCenterPos.z;
+ i_this->mDemoCameraCenter.y = i_this->mCenterPos.y - 60.0f;
+ i_this->mDemoCameraEye.set(-1290.0f, 1342.0f, 1077.0f);
+ // no break
+
+ case 2:
+ cLib_addCalc2(&i_this->mDemoCameraCenter.x, i_this->mCenterPos.x, 0.2f, 100.0f);
+ cLib_addCalc2(&i_this->mDemoCameraCenter.y, i_this->mCenterPos.y - 60.0f, 0.2f, 100.0f);
+ cLib_addCalc2(&i_this->mDemoCameraCenter.z, i_this->mCenterPos.z, 0.2f, 100.0f);
+ if (i_this->mDemoTimer > 60) {
+ cLib_addCalc2(&i_this->mDemoCameraFovY, 40.0f, 0.15f, 0.2f);
+ }
+ if (i_this->mDemoTimer == 120) {
+ end_demo = true;
+ }
+ break;
+ }
+
+ if (end_demo) {
+ camera->mCamera.Reset(i_this->mDemoCameraCenter, i_this->mDemoCameraEye);
+ camera->mCamera.Start();
+ camera->mCamera.SetTrimSize(0);
+ dComIfGp_event_reset();
+ daPy_getPlayerActorClass()->cancelOriginalDemo();
+ i_this->mDemoStage = 0;
+ }
+
+ if (i_this->mDemoStage != 0) {
+ camera->mCamera.Set(i_this->mDemoCameraCenter, i_this->mDemoCameraEye,
+ i_this->mDemoCameraFovY, 0);
+ i_this->mDemoTimer++;
+ }
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 805047D0-805047D4 0000F4 0004+00 0/1 0/0 0/0 .rodata @5202 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5202 = 10000.0f;
-COMPILER_STRIP_GATE(0x805047D0, &lit_5202);
-#pragma pop
-
-/* 805047D4-805047D8 0000F8 0004+00 0/1 0/0 0/0 .rodata @5203 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5203 = 25.0f;
-COMPILER_STRIP_GATE(0x805047D4, &lit_5203);
-#pragma pop
-
-/* 805047D8-805047DC 0000FC 0004+00 0/1 0/0 0/0 .rodata @5204 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5204 = 65536.0f;
-COMPILER_STRIP_GATE(0x805047D8, &lit_5204);
-#pragma pop
/* 80503984-80503E24 002AE4 04A0+00 1/0 0/0 0/0 .text daE_Nest_Execute__FP12e_nest_class
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void daE_Nest_Execute(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/daE_Nest_Execute__FP12e_nest_class.s"
+static int daE_Nest_Execute(e_nest_class* i_this) {
+ cXyz vec1, vec2;
+
+ i_this->mFrame++;
+ for (int i = 0; i < 3; i++) {
+ if (i_this->mTimers[i] != 0) {
+ i_this->mTimers[i]--;
+ }
+ }
+
+ i_this->mSound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
+
+ if (i_this->mBreakStage == 3) {
+ fopAc_ac_c* boomerang = (fopAc_ac_c*)fpcM_Search(shot_b_sub, i_this);
+ if (boomerang != NULL) {
+ cXyz delta = boomerang->current.pos - i_this->current.pos;
+ if (delta.abs() < 200.0f) {
+ nest_hahen_s* debris = i_this->mDebris;
+ for (int i = 0; i < 5; i++, debris++) {
+ if (debris->mSpeed.y <= 0.0f) {
+ debris->mActive = true;
+ debris->mAngleZ = cM_rndFX(10000.0f);
+ mDoMtx_YrotS(*calc_mtx, debris->mAngleY);
+ vec1.x = 0.0f;
+ vec1.y = i_this->scale.x * 20.0f;
+ vec1.z = 0.0f;
+ MtxPosition(&vec1, &vec2);
+ debris->mPos += vec2;
+ vec1.x = 0.0f;
+ vec1.y = i_this->scale.x * (cM_rndF(5.0f) + 20.0f);
+ vec1.z = 0.0f;
+ MtxPosition(&vec1, &debris->mSpeed);
+ debris->mGroundHitStage = 0;
+ }
+ }
+ }
+ }
+ }
+
+ if (i_this->mBreakStage == 1) {
+ i_this->mBreakStage = 2;
+ i_this->mAction = e_nest_class::ACT_DEBRIS;
+ i_this->mMode = 0;
+ fopAcM_OffStatus(i_this, fopAcStts_CULL_e);
+ nest_hahen_s* debris = i_this->mDebris;
+ for (int i = 0; i < 5; i++, debris++) {
+ debris->mActive = true;
+ float scale = i_this->scale.x * (cM_rndF(0.2f) + 0.7f);
+ debris->mScale.x = scale;
+ debris->mScale.z = scale;
+ debris->mScale.y = i_this->scale.x * 0.7f;
+ debris->mPos = i_this->current.pos;
+ debris->mAngleY = i * 0x3333;
+ debris->mAngleZ = -0x4000;
+ mDoMtx_YrotS(*calc_mtx, debris->mAngleY);
+ vec1.x = 0.0f;
+ vec1.y = i_this->scale.x * 20.0f;
+ vec1.z = i_this->scale.x * 25.0f;
+ MtxPosition(&vec1, &vec2);
+ debris->mPos += vec2;
+ vec1.x = 0.0f;
+ vec1.y = i_this->scale.x * (cM_rndF(3.0f) + 10.0f);
+ vec1.z = i_this->scale.x * (cM_rndF(1.0f) + 2.0f);
+ MtxPosition(&vec1, &debris->mSpeed);
+ debris->mGroundHitStage = 0;
+ debris->mCounter = cM_rndF(0x10000);
+ }
+ }
+
+ hahen_move(i_this);
+ if (i_this->mParamType == e_nest_class::TYPE_BEE) {
+ bee_nest_action(i_this);
+ }
+ demo_camera(i_this);
+ return 1;
}
-#pragma pop
/* 80503E24-80503E2C 002F84 0008+00 1/0 0/0 0/0 .text daE_Nest_IsDelete__FP12e_nest_class
*/
-static bool daE_Nest_IsDelete(e_nest_class* param_0) {
- return true;
+static int daE_Nest_IsDelete(e_nest_class* param_0) {
+ return 1;
}
-/* ############################################################################################## */
-/* 805047EC-805047EC 000110 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
-#pragma push
-#pragma force_active on
-SECTION_DEAD static char const* const stringBase_805047F4 = "E_nest";
-#pragma pop
-
/* 80503E2C-80503EA0 002F8C 0074+00 1/0 0/0 0/0 .text daE_Nest_Delete__FP12e_nest_class
*/
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void daE_Nest_Delete(e_nest_class* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/daE_Nest_Delete__FP12e_nest_class.s"
+static int daE_Nest_Delete(e_nest_class* i_this) {
+ dComIfG_resDelete(&i_this->mPhase, "E_nest");
+
+ if (i_this->mHIOInit) {
+ l_hioInit = false;
+ }
+
+ if (i_this->heap != NULL) {
+ i_this->mSound.deleteObject();
+ i_this->mBeeSound.deleteObject();
+ }
+
+ return 1;
}
-#pragma pop
/* 80503EA0-80503FCC 003000 012C+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void useHeapInit(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/useHeapInit__FP10fopAc_ac_c.s"
+static int useHeapInit(fopAc_ac_c* i_this) {
+ e_nest_class* _this = static_cast<e_nest_class*>(i_this);
+
+ J3DModelData* model_data = static_cast<J3DModelData*>(dComIfG_getObjectRes("E_nest", 3));
+ _this->mpModel = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000084);
+ if (_this->mpModel == NULL) {
+ return 0;
+ }
+ _this->model = _this->mpModel;
+
+ J3DModelData* debris_model_data = static_cast<J3DModelData*>(dComIfG_getObjectRes("E_nest", 4));
+ for (int i = 0; i < 5; i++) {
+ _this->mDebris[i].mpModel = mDoExt_J3DModel__create(debris_model_data, 0x80000, 0x11000084);
+ if (_this->mDebris[i].mpModel == NULL) {
+ return 0;
+ }
+ }
+
+ _this->mSound.init(&_this->current.pos, 1);
+ _this->mBeeSound.init(&_this->current.pos, 2);
+
+ return 1;
}
-#pragma pop
-
-/* ############################################################################################## */
-/* 805047DC-805047E0 000100 0004+00 0/1 0/0 0/0 .rodata @5399 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5399 = -300.0f;
-COMPILER_STRIP_GATE(0x805047DC, &lit_5399);
-#pragma pop
-
-/* 805047E0-805047E4 000104 0004+00 0/1 0/0 0/0 .rodata @5400 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static f32 const lit_5400 = 300.0f;
-COMPILER_STRIP_GATE(0x805047E0, &lit_5400);
-#pragma pop
-
-/* 805047E4-805047EC 000108 0008+00 0/1 0/0 0/0 .rodata @5402 */
-#pragma push
-#pragma force_active on
-SECTION_RODATA static u8 const lit_5402[8] = {
- 0x43, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-COMPILER_STRIP_GATE(0x805047E4, &lit_5402);
-#pragma pop
/* 80503FCC-805044AC 00312C 04E0+00 1/0 0/0 0/0 .text daE_Nest_Create__FP10fopAc_ac_c */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void daE_Nest_Create(fopAc_ac_c* param_0) {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/daE_Nest_Create__FP10fopAc_ac_c.s"
-}
-#pragma pop
-
-/* 805044AC-805044E8 00360C 003C+00 1/1 0/0 0/0 .text __dt__12nest_hahen_sFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm nest_hahen_s::~nest_hahen_s() {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/__dt__12nest_hahen_sFv.s"
-}
-#pragma pop
-
-/* 805044E8-805044EC 003648 0004+00 1/1 0/0 0/0 .text __ct__12nest_hahen_sFv */
-nest_hahen_s::nest_hahen_s() {
- /* empty function */
+static cPhs__Step daE_Nest_Create(fopAc_ac_c* i_this) {
+ fopAcM_SetupActor(i_this, e_nest_class);
+ e_nest_class* _this = static_cast<e_nest_class*>(i_this);
+
+ cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhase, "E_nest");
+ if (step == cPhs_COMPLEATE_e) {
+ _this->mBrokenSwitch = (u8)((u16)_this->current.angle.z >> 8);
+ _this->shape_angle.z = 0;
+ _this->current.angle.z = 0;
+ _this->mParamType = (u8)fopAcM_GetParam(_this);
+ _this->mParamType = e_nest_class::TYPE_BEE;
+ _this->mParam1 = (u8)(fopAcM_GetParam(_this) >> 8);
+ _this->mParamScale = (u8)(fopAcM_GetParam(_this) >> 16);
+ if (_this->mParamScale == 0xff) {
+ _this->mParamScale = 0;
+ }
+
+ if (!fopAcM_entrySolidHeap(_this, useHeapInit, 0x3000)) {
+ return cPhs_ERROR_e;
+ }
+
+ if (!l_hioInit) {
+ _this->mHIOInit = true;
+ l_hioInit = true;
+ l_HIO.field_0x4 = -1;
+ }
+
+ fopAcM_SetMtx(_this, _this->mpModel->getBaseTRMtx());
+ fopAcM_SetMin(_this, -300.0f, -300.0f, -300.0f);
+ fopAcM_SetMax(_this, 300.0f, 300.0f, 300.0f);
+
+ if (_this->mParamScale == 0xff || _this->mParamScale == 0) {
+ _this->mParamScale = 10;
+ }
+ _this->scale.x = _this->mParamScale * 0.1f;
+
+ _this->mRotation.y = _this->current.angle.y;
+
+ if (_this->mBrokenSwitch != 0xff
+ && dComIfGs_isSwitch(_this->mBrokenSwitch, fopAcM_GetRoomNo(_this)))
+ {
+ cXyz pos = _this->current.pos;
+ pos.y -= 100.0f;
+ if (fopAcM_gc_c::gndCheck(&pos)) {
+ pos.y = fopAcM_gc_c::mGroundY;
+ }
+ _this->mBreakStage = 1;
+ _this->current.pos = pos;
+ _this->mAction = e_nest_class::ACT_DEBRIS;
+ _this->mMode = 1;
+ fopAcM_SetMtx(_this, _this->mDebris[0].mpModel->getBaseTRMtx());
+ return step;
+ }
+
+ _this->mCcStts.Init(100, 0, _this);
+ static dCcD_SrcSph cc_sph_src = {
+ {
+ {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x1}, // mGObjAt
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjTg
+ {0x0}, // mGObjCo
+ }, // mObjInf
+ {
+ {{0.0f, 0.0f, 0.0f}, 30.0f} // mCcSph
+ } // mCcSphAttr
+ };
+ _this->mCcSph.Set(cc_sph_src);
+ _this->mCcSph.SetStts(&_this->mCcStts);
+ static dCcD_SrcCyl cc_cyl_src = {
+ {
+ {0x0, {{0x0, 0x0, 0x0}, {0x2020, 0x3}, 0x79}}, // mObj
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
+ {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
+ {0x0}, // mGObjCo
+ }, // mObjInf
+ {
+ {0.0f, 0.0f, 0.0f}, // mCenter
+ 5.0f, // mRadius
+ 10.0f // mHeight
+ } // mCcCyl
+ };
+ _this->mCcCyl.Set(cc_cyl_src);
+ _this->mCcCyl.SetStts(&_this->mCcStts);
+
+ if (_this->mParamType == e_nest_class::TYPE_BEE) {
+ fopAcM_createChild(PROC_E_BEE, fopAcM_GetID(_this),
+ _this->mParamScale << 16 | 0x100 | _this->mParam1,
+ &_this->current.pos, fopAcM_GetRoomNo(_this),
+ NULL, NULL, -1, NULL);
+ _this->mAcch.Set(&_this->current.pos, &_this->old.pos, _this, 1,
+ &_this->mAcchCir, &_this->speed, NULL, NULL);
+ _this->mAcchCir.SetWall(_this->scale.x * 50.0f, _this->scale.x * 50.0f);
+ } else if (_this->mParamType == e_nest_class::TYPE_BUG) {
+ fopAcM_createChild(PROC_E_BUG, fopAcM_GetID(_this),
+ _this->mParam1 | 0xff000000, &_this->current.pos,
+ fopAcM_GetRoomNo(_this), NULL, NULL, -1, NULL);
+ }
+
+ mtx_cc_set(_this);
+ _this->mHitActorID = -1;
+ }
+ return step;
}
-/* 805044EC-80504534 00364C 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-// asm cM3dGCyl::~cM3dGCyl() {
-extern "C" asm void __dt__8cM3dGCylFv() {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/__dt__8cM3dGCylFv.s"
-}
-#pragma pop
-
-/* 80504534-8050457C 003694 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGSphFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-// asm cM3dGSph::~cM3dGSph() {
-extern "C" asm void __dt__8cM3dGSphFv() {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/__dt__8cM3dGSphFv.s"
-}
-#pragma pop
-
-/* 8050457C-805045C4 0036DC 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-// asm cM3dGAab::~cM3dGAab() {
-extern "C" asm void __dt__8cM3dGAabFv() {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/__dt__8cM3dGAabFv.s"
-}
-#pragma pop
-
-/* 805045C4-80504634 003724 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm dBgS_ObjAcch::~dBgS_ObjAcch() {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/__dt__12dBgS_ObjAcchFv.s"
-}
-#pragma pop
-
-/* 80504634-8050467C 003794 0048+00 2/1 0/0 0/0 .text __dt__14daE_Nest_HIO_cFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm daE_Nest_HIO_c::~daE_Nest_HIO_c() {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/__dt__14daE_Nest_HIO_cFv.s"
-}
-#pragma pop
-
-/* 8050467C-805046B8 0037DC 003C+00 0/0 1/0 0/0 .text __sinit_d_a_e_nest_cpp */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-asm void __sinit_d_a_e_nest_cpp() {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/__sinit_d_a_e_nest_cpp.s"
-}
-#pragma pop
-
-#pragma push
-#pragma force_active on
-REGISTER_CTORS(0x8050467C, __sinit_d_a_e_nest_cpp);
-#pragma pop
-
-/* 805046B8-805046C0 003818 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void func_805046B8() {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/func_805046B8.s"
-}
-#pragma pop
-
-/* 805046C0-805046C8 003820 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */
-#pragma push
-#pragma optimization_level 0
-#pragma optimizewithasm off
-static asm void func_805046C0() {
- nofralloc
-#include "asm/rel/d/a/e/d_a_e_nest/d_a_e_nest/func_805046C0.s"
-}
-#pragma pop
+/* 805048A4-805048C4 -00001 0020+00 1/0 0/0 0/0 .data l_daE_Nest_Method */
+static actor_method_class l_daE_Nest_Method = {
+ (process_method_func)daE_Nest_Create,
+ (process_method_func)daE_Nest_Delete,
+ (process_method_func)daE_Nest_Execute,
+ (process_method_func)daE_Nest_IsDelete,
+ (process_method_func)daE_Nest_Draw,
+};
-/* 805047EC-805047EC 000110 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
+/* 805048C4-805048F4 -00001 0030+00 0/0 0/0 1/0 .data g_profile_E_NEST */
+extern actor_process_profile_definition g_profile_E_NEST = {
+ fpcLy_CURRENT_e,
+ 7,
+ fpcPi_CURRENT_e,
+ PROC_E_NEST,
+ &g_fpcLf_Method.mBase,
+ sizeof(e_nest_class),
+ 0,
+ 0,
+ &g_fopAc_Method.base,
+ 0xB2,
+ &l_daE_Nest_Method,
+ 0xD4100,
+ fopAc_ACTOR_e,
+ fopAc_CULLBOX_CUSTOM_e,
+};