From 0a8679f92eaf0ca12e3413b0c4fdda7e7cf81a2a Mon Sep 17 00:00:00 2001 From: TakaRikka <38417346+TakaRikka@users.noreply.github.com> Date: Fri, 22 Aug 2025 22:58:29 -0700 Subject: [PATCH] d_a_mg_rod mostly done (#2598) * d_a_mg_rod mostly done * pr --- include/d/actor/d_a_alink.h | 46 + include/d/actor/d_a_mg_rod.h | 325 +- include/d/actor/d_a_obj_life_container.h | 4 + include/d/actor/d_a_player.h | 5 + include/d/d_com_inf_game.h | 8 + include/d/d_menu_window.h | 2 + include/d/d_meter2_info.h | 10 + .../MSL/MSL_C/MSL_Common/Include/cmath.h | 4 + src/d/actor/d_a_alink_canoe.inc | 2 +- src/d/actor/d_a_b_gnd.cpp | 4 +- src/d/actor/d_a_e_bg.cpp | 6 +- src/d/actor/d_a_e_sg.cpp | 4 +- src/d/actor/d_a_mg_fish.cpp | 160 +- src/d/actor/d_a_mg_rod.cpp | 9180 +++++++++++------ src/d/actor/d_a_npc_henna.cpp | 18 +- src/d/actor/d_a_npc_ne.cpp | 6 +- src/d/actor/d_a_obj_lp.cpp | 4 +- 17 files changed, 6718 insertions(+), 3070 deletions(-) diff --git a/include/d/actor/d_a_alink.h b/include/d/actor/d_a_alink.h index c71b8d88dee..1a84f4e0369 100644 --- a/include/d/actor/d_a_alink.h +++ b/include/d/actor/d_a_alink.h @@ -3564,6 +3564,36 @@ public: return var_r4; } + BOOL setCanoeCast() { + if (mProcVar2.field_0x300c == 0 && checkCanoeFishingWaitAnime()) { + mProcVar2.field_0x300c = 1; + return TRUE; + } else { + return FALSE; + } + } + + bool checkFishingRodGrabLeft() const { return mItemVar0.field_0x3018 == 0; } + + void setCanoeFishingWaitAngle(s16 i_angle) { field_0x311a = i_angle; } + + void setFishingArnmAngle(s16 i_angle) { field_0x3160.set(0, 0, i_angle); } + void setFishingArm1Angle(const csXyz& i_angle) { mFishingArm1Angle = i_angle; } + void setFishingArm2Angle(const csXyz& i_angle) { field_0x3160 = i_angle; } + + void onFishingRodCastingEnd() { onNoResetFlg1(FLG1_UNK_8000); } + void endFishingCastWait() { offNoResetFlg2(FLG2_UNK_20000000); } + + void startFishingCastWait() { + if (checkFishingRodItem(mEquipItem)) { + onNoResetFlg2(FLG2_UNK_20000000); + } + } + + f32 getFishingReelFrame() const { return mUpperFrameCtrl[2].getFrame(); } + + void changeFishGetFace(u8 param_0) { field_0x2fc8 = param_0; } + BOOL checkSlideMode() { return mProcID == PROC_SLIDE || mProcID == PROC_SLIDE_LAND || mProcID == PROC_WOLF_SLIDE_READY || mProcID == PROC_WOLF_SLIDE_LAND || @@ -3578,6 +3608,22 @@ public: return (mEquipItem == 0x5C || mEquipItem == 0x5F) || mEquipItem == 0x5E; } + bool checkFisingRodWorm() const { return mItemMode == 0x74; } + + bool checkFisingRodBee() const { return mItemMode == 0x76; } + + void fishingCastWaitAnimeStart() { + if (mProcID == PROC_FISHING_CAST) { + mProcVar3.field_0x300e = 0; + } + } + + void fishingCastWaitAnimeStop() { + if (mProcID == PROC_FISHING_CAST) { + mProcVar3.field_0x300e = 1; + } + } + MtxP getCopyRodMtx() { if (mHeldItemModel != NULL) { return mHeldItemModel->getAnmMtx(0); diff --git a/include/d/actor/d_a_mg_rod.h b/include/d/actor/d_a_mg_rod.h index fb30fa8c35e..2f0b8f82dd7 100644 --- a/include/d/actor/d_a_mg_rod.h +++ b/include/d/actor/d_a_mg_rod.h @@ -8,27 +8,66 @@ #include "d/d_msg_flow.h" #include "f_op/f_op_actor_mng.h" +#define MG_ROD_LURE_LINE_LEN 106 +#define MG_ROD_UKI_LINE_LEN 100 + +enum mg_catch_type { + MG_CATCH_FISH, + MG_CATCH_BT, // Boot + MG_CATCH_SP, // Spoon + MG_CATCH_LH, // Rupee Bag + MG_CATCH_SG, // Skullfish + MG_CATCH_BB, // Bombfish + MG_CATCH_BIN, // Empty Bottle + MG_CATCH_KN, // Can + MG_CATCH_ED, // Branch + MG_CATCH_SY, // Wheel +}; + +enum mg_lure_type { + MG_LURE_FR, // Frog + MG_LURE_PE, // Swimmer + MG_LURE_PO, // Popper + MG_LURE_WS, // Spinner + MG_LURE_SP, // Spoon (Sinking) +}; + +enum mg_rod_kind { + MG_ROD_KIND_LURE, // Henna Fishing Rod + MG_ROD_KIND_UKI, // Player Fishing Rod +}; + +enum mg_rod_uki_action { + ACTION_UKI_READY, + ACTION_UKI_STANDBY, + + ACTION_UKI_HIT = 5, + ACTION_UKI_CATCH, +}; + +enum mg_rod_lure_action { + ACTION_LURE_ONBOAT, + ACTION_LURE_STANDBY, + + ACTION_LURE_CAST = 3, + ACTION_LURE_ACTION, + ACTION_LURE_HIT, + ACTION_LURE_CATCH, + ACTION_LURE_BARE, + ACTION_LURE_HEART, +}; + struct mg_rod_s { - /* 0x0 */ u8 field_0x0[0x14 - 0x0]; - /* 0x14 */ void* field_0x14; - /* 0x18 */ u8 field_0x18[0x2E - 0x18]; - /* 0x2E */ s16 field_0x2e; - /* 0x30 */ s16 field_0x30; - /* 0x32 */ u8 field_0x32[0x54 - 0x32]; - /* 0x54 */ u32 field_0x54; - /* 0x58 */ u8 field_0x58[0xC0 - 0x58]; + /* 0x0 */ cXyz field_0x0[16]; }; struct mg_line_s { - /* 0x0 */ cXyz field_0x0[100]; + /* 0x0 */ cXyz pos[100]; }; struct mg_hook_s { - /* 804BAF78 */ ~mg_hook_s(); - /* 804BAFD8 */ mg_hook_s(); - /* 0x00 */ cXyz field_0x0[2]; - /* 0x18 */ u8 field_0x18[0x20 - 0x18]; + /* 0x18 */ csXyz field_0x18; }; struct wd_ss; @@ -41,132 +80,224 @@ struct wd_ss; * @details * */ -class dmg_rod_class : public fopAc_ac_c { +class dmg_rod_class { public: - /* 804BAC0C */ dmg_rod_class(); - - f32 getRodStickX() { return mRodStickX; } - f32 getRodStickY() { return mRodStickY; } + f32 getRodStickX() { return rod_stick_x; } + f32 getRodStickY() { return rod_stick_y; } bool checkRodEquipPermission() { return field_0x1514 == 0; } - bool checkReelSpin() { return field_0x14f0 != 0; } + bool checkReelSpin() { return reel_btn_flags != 0; } - /* 0x0568 */ u8 field_0x568[0x57A - 0x568]; - /* 0x057A */ s16 field_0x57a; - /* 0x057C */ u8 field_0x57c[0x57E - 0x57C]; - /* 0x057E */ s16 field_0x57e; - /* 0x0580 */ s16 field_0x580; - /* 0x0582 */ u8 field_0x582[0x584 - 0x582]; - /* 0x0584 */ s16 field_0x584; - /* 0x0586 */ u8 field_0x586[0x590 - 0x586]; + /* 0x0000 */ fopAc_ac_c actor; + /* 0x0568 */ request_of_phase_process_class phase; + /* 0x0570 */ char* arcname; + /* 0x0574 */ u8 arg0; + /* 0x0575 */ u8 arg1; + /* 0x0576 */ u8 arg2; + /* 0x0578 */ s16 field_0x578; + /* 0x057A */ s16 timers[10]; /* 0x0590 */ f32 field_0x590; - /* 0x0594 */ u8 field_0x594[0x5A4 - 0x594]; - /* 0x05A4 */ mg_rod_s field_0x5a4; - /* 0x0664 */ u8 field_0x664[0x6AC - 0x664]; + /* 0x0594 */ f32 field_0x594; + /* 0x0598 */ f32 field_0x598; + /* 0x059C */ f32 field_0x59c; + /* 0x05A0 */ u8 field_0x5A0[0x05A4 - 0x05A0]; + /* 0x05A4 */ mg_rod_s mg_rod; // below to mg_line_s part of mg_rod_s? + /* 0x0664 */ J3DModel* rod_uki_model[15]; + /* 0x06A0 */ f32 field_0x6a0; + /* 0x06A4 */ f32 field_0x6a4; + /* 0x06A8 */ u8 field_0x6a8; /* 0x06AC */ cXyz field_0x6ac; /* 0x06B8 */ cXyz field_0x6b8; - /* 0x06C4 */ u8 field_0x6c4[0x6C8 - 0x6C4]; + /* 0x06C4 */ s16 field_0x6c4; /* 0x06C8 */ cXyz field_0x6c8; /* 0x06D4 */ cXyz field_0x6d4; - /* 0x06E0 */ s16 field_0x6e0; - /* 0x06E2 */ u8 field_0x6e2[0x6EC - 0x6E2]; + /* 0x06E0 */ f32 field_0x6e0; + /* 0x06E4 */ f32 field_0x6e4; + /* 0x06E8 */ s8 field_0x6e8; /* 0x06EC */ cXyz field_0x6ec; /* 0x06F8 */ f32 field_0x6f8; - /* 0x06FC */ u8 field_0x6fc[0x71C - 0x6FC]; + /* 0x06FC */ f32 cast_power; + /* 0x0700 */ mDoExt_McaMorf* rod_modelMorf; + /* 0x0704 */ J3DModel* unk_ring_model[6]; /* 0x071C */ csXyz field_0x71c[6]; - /* 0x0740 */ u8 field_0x740[0x744 - 0x740]; + /* 0x0740 */ u8 field_0x740[0x0744 - 0x0740]; /* 0x0744 */ cXyz field_0x744; /* 0x0750 */ cXyz field_0x750; - /* 0x075C */ u8 field_0x75c[0x764 - 0x75C]; + /* 0x075C */ s16 field_0x75c; + /* 0x075E */ s16 field_0x75e; + /* 0x0760 */ f32 field_0x760; /* 0x0764 */ cXyz field_0x764; - /* 0x0770 */ mg_line_s field_0x770; - /* 0x0C20 */ u8 field_0xc20[0xF5C - 0xC20]; + /* 0x0770 */ mg_line_s mg_line; // below to mg_hook_s part of mg_line_s? + /* 0x0C20 */ f32 field_0xc20[98]; + /* 0x0DA8 */ u8 field_0xDA8[0x0DB0 - 0x0DA8]; + /* 0x0DB0 */ f32 field_0xdb0[98]; + /* 0x0F38 */ u8 field_0xF38[0x0F40 - 0x0F38]; + /* 0x0F40 */ mDoExt_3DlineMat0_c linemat; /* 0x0F5C */ f32 field_0xf5c; /* 0x0F60 */ f32 field_0xf60; /* 0x0F64 */ f32 field_0xf64; - /* 0x0F68 */ u8 field_0xf68[0xF7C - 0xF68]; - /* 0x0F7C */ s16 field_0xf7c; - /* 0x0F7E */ s16 field_0xf7e; - /* 0x0F80 */ s8 field_0xf80; - /* 0x0F81 */ u8 field_0xf81[0xFAC - 0xF81]; - /* 0x0FAC */ mg_hook_s field_0xfac[2]; - /* 0x0FEC */ u8 field_0xfec[0xFFC - 0xFEC]; + /* 0x0F68 */ f32 field_0xf68; + /* 0x0F6C */ u8 field_0xF6C[0x0F6E - 0x0F6C]; + /* 0x0F6E */ s8 field_0xf6e; + /* 0x0F6F */ u8 field_0xF6F[0x0F74 - 0x0F6F]; + /* 0x0F74 */ f32 field_0xf74; + /* 0x0F78 */ f32 field_0xf78; + /* 0x0F7C */ s16 kind; + /* 0x0F7E */ s16 action; + /* 0x0F80 */ s8 lure_type; + /* 0x0F81 */ s8 field_0xf81; + /* 0x0F84 */ J3DModel* lure_model[5]; + /* 0x0F98 */ J3DModel* hook_model[2]; + /* 0x0FA0 */ J3DModel* ring_model; + /* 0x0FA4 */ u8 field_0xFA4[0x0FAC - 0x0FA4]; + /* 0x0FAC */ mg_hook_s mg_hook[2]; + /* 0x0FEC */ f32 field_0xfec; + /* 0x0FF0 */ s16 field_0xff0; + /* 0x0FF2 */ s16 field_0xff2; + /* 0x0FF4 */ s16 field_0xff4; + /* 0x0FF8 */ f32 field_0xff8; /* 0x0FFC */ s16 field_0xffc; - /* 0x0FFE */ u8 field_0xffe[2]; + /* 0x0FFE */ s16 field_0xffe; /* 0x1000 */ s16 field_0x1000; - /* 0x1002 */ u8 field_0x1002[2]; + /* 0x1002 */ s16 field_0x1002; /* 0x1004 */ s16 field_0x1004; /* 0x1006 */ s16 field_0x1006; /* 0x1008 */ s8 field_0x1008; /* 0x1009 */ s8 field_0x1009; /* 0x100A */ s8 field_0x100a; - /* 0x100B */ u8 field_0x100b[1]; + /* 0x100B */ u8 field_0x100b; /* 0x100C */ u8 field_0x100c; /* 0x100D */ s8 field_0x100d; - /* 0x100E */ u8 field_0x100e[1]; + /* 0x100E */ s8 field_0x100e; /* 0x100F */ s8 field_0x100f; - /* 0x1010 */ u8 field_0x1010[0x102C - 0x1010]; - /* 0x102C */ s8 field_0x102c; - /* 0x102D */ s8 field_0x102d; - /* 0x102E */ u8 field_0x102e[0x1060 - 0x102E]; - /* 0x1060 */ cXyz mHookPosition; + /* 0x1010 */ cXyz field_0x1010; + /* 0x101C */ s16 field_0x101c[1]; + /* 0x101E */ s16 field_0x101e; + /* 0x1020 */ s16 field_0x1020; + /* 0x1022 */ s16 field_0x1022; + /* 0x1024 */ J3DModel* uki_model; + /* 0x1028 */ J3DModel* uki_saki_model; + /* 0x102C */ s8 esa_kind; + /* 0x102D */ s8 hook_kind; + /* 0x102E */ s8 field_0x102e; + /* 0x102F */ u8 field_0x102f; + /* 0x1030 */ J3DModel* esa_model[2]; + /* 0x1038 */ u8 field_0x1038[0x103C - 0x1038]; + /* 0x103C */ s16 field_0x103c[8]; + /* 0x104C */ u8 field_0x104C[0x104E - 0x104C]; + /* 0x104E */ s16 field_0x104e[8]; + /* 0x1060 */ cXyz hook_pos; /* 0x106C */ cXyz field_0x106c; /* 0x1078 */ cXyz field_0x1078; /* 0x1084 */ csXyz field_0x1084; - /* 0x108A */ u8 field_0x108a[0x1090 - 0x108A]; + /* 0x108A */ s16 field_0x108a; + /* 0x108C */ s16 field_0x108c; + /* 0x108E */ s16 field_0x108e; /* 0x1090 */ f32 field_0x1090; - /* 0x1094 */ u8 field_0x1094[0x10A4 - 0x1094]; + /* 0x1094 */ f32 field_0x1094; + /* 0x1098 */ u8 field_0x1098[0x109C - 0x1098]; + /* 0x109C */ s16 field_0x109c; + /* 0x109E */ s16 field_0x109e; + /* 0x10A0 */ s16 field_0x10a0; + /* 0x10A2 */ s16 field_0x10a2; /* 0x10A4 */ s8 field_0x10a4; /* 0x10A5 */ s8 field_0x10a5; /* 0x10A6 */ s8 field_0x10a6; /* 0x10A7 */ s8 field_0x10a7; /* 0x10A8 */ s8 field_0x10a8; /* 0x10A9 */ s8 field_0x10a9; - /* 0x10AA */ s8 field_0x10aa; + /* 0x10AA */ u8 field_0x10aa; /* 0x10AB */ u8 field_0x10ab; - /* 0x10AC */ s32 mFishId; + /* 0x10AC */ fpc_ProcID mg_fish_id; /* 0x10B0 */ s16 field_0x10b0; - /* 0x10B2 */ u8 field_0x10b2[2]; - /* 0x10B4 */ Z2Creature field_0x10b4; - /* 0x1144 */ u8 field_0x1144[0x114A - 0x1144]; + /* 0x10B4 */ Z2Creature sound; + /* 0x1144 */ fpc_ProcID boat_actor_id; + /* 0x1148 */ s8 field_0x1148; /* 0x114A */ s16 field_0x114a; /* 0x114C */ s16 field_0x114c; - /* 0x114E */ u8 field_0x114e[0x1178 - 0x114E]; + /* 0x114E */ s16 field_0x114e; + /* 0x1150 */ s16 field_0x1150; + /* 0x1154 */ f32 field_0x1154; + /* 0x1158 */ u8 field_0x1158[0x1165 - 0x1158]; + /* 0x1165 */ s8 field_0x1165; + /* 0x1168 */ u32 sibuki_eff[4]; /* 0x1178 */ u32 field_0x1178; - /* 0x117C */ u8 field_0x117c[0x1190 - 0x117C]; - /* 0x1190 */ dBgS_AcchCir field_0x1190; - /* 0x11D0 */ dBgS_ObjAcch field_0x11d0; - /* 0x13A8 */ u8 field_0x13a8[0x13B4 - 0x13A8]; - /* 0x13B4 */ s16 field_0x13b4; - /* 0x13B6 */ s16 field_0x13b6; - /* 0x13B8 */ u8 field_0x13b8[0x1408 - 0x13B8]; - /* 0x1408 */ f32 field_0x1408; - /* 0x140C */ u8 field_0x140c[0x1410 - 0x140C]; + /* 0x117C */ u32 field_0x117c; + /* 0x1180 */ u32 field_0x1180[2]; + /* 0x1188 */ f32 field_0x1188; + /* 0x118C */ f32 field_0x118c; + /* 0x1190 */ dBgS_AcchCir acchcir; + /* 0x11D0 */ dBgS_ObjAcch acch; + /* 0x13A8 */ u8 field_0x13a8; + /* 0x13AC */ f32 field_0x13ac; + /* 0x13B0 */ f32 field_0x13b0; + /* 0x13B4 */ s16 play_cam_mode; + /* 0x13B6 */ s16 play_cam_timer; + /* 0x13B8 */ cXyz play_cam_eye; + /* 0x13C4 */ cXyz play_cam_center; + /* 0x13D0 */ cXyz play_cam_eye_target; + /* 0x13DC */ cXyz play_cam_center_target; + /* 0x13E8 */ cXyz play_cam_eye_speed; + /* 0x13F4 */ cXyz play_cam_center_speed; + /* 0x1400 */ s16 field_0x1400; + /* 0x1402 */ s16 field_0x1402; + /* 0x1404 */ s16 field_0x1404; + /* 0x1406 */ u8 field_0x1406; + /* 0x1407 */ u8 field_0x1407; + /* 0x1408 */ f32 play_cam_fovy; + /* 0x140C */ f32 field_0x140c; /* 0x1410 */ f32 field_0x1410; - /* 0x1414 */ u8 field_0x1414[0x146D - 0x1414]; + /* 0x1414 */ f32 field_0x1414; + /* 0x1418 */ s16 field_0x1418; + /* 0x141A */ s16 field_0x141a; + /* 0x141C */ f32 field_0x141c; + /* 0x1420 */ f32 field_0x1420; + /* 0x1424 */ f32 field_0x1424; + /* 0x1428 */ f32 field_0x1428; + /* 0x142C */ f32 field_0x142c; + /* 0x1430 */ u8 field_0x1430[0x1434 - 0x1430]; + /* 0x1434 */ cXyz field_0x1434; + /* 0x1440 */ cXyz field_0x1440; + /* 0x144C */ cXyz field_0x144c; + /* 0x1458 */ cXyz field_0x1458; + /* 0x1464 */ f32 field_0x1464; + /* 0x1468 */ u8 field_0x1468[0x146C - 0x1468]; + /* 0x146C */ u8 field_0x146c; /* 0x146D */ s8 field_0x146d; - /* 0x146E */ u8 field_0x146e[0x1474 - 0x146E]; - /* 0x1474 */ dMsgFlow_c mMsgFlow; - /* 0x14C0 */ u8 field_0x14c0[0x14C2 - 0x14C0]; - /* 0x14C2 */ s16 field_0x14c2; - /* 0x14C4 */ u8 field_0x14c4[0x14C8 - 0x14C4]; - /* 0x14C8 */ f32 mRodStickX; - /* 0x14CC */ f32 mRodStickY; - /* 0x14D0 */ u8 field_0x14d0[0x14D8 - 0x14D0]; - /* 0x14D8 */ f32 field_0x14d8; - /* 0x14DC */ f32 field_0x14dc; - /* 0x14E0 */ u8 field_0x14e0[0x14F0 - 0x14E0]; - /* 0x14F0 */ s32 field_0x14f0; - /* 0x14F4 */ u8 field_0x14f4[0x14FC - 0x14F4]; - /* 0x14F4 */ s16 field_0x14fc; - /* 0x14F4 */ u8 field_0x14fe[0x1508 - 0x14FE]; + /* 0x146E */ u8 field_0x146E[0x1470 - 0x146E]; + /* 0x1470 */ u8 field_0x1470; + /* 0x1472 */ s16 field_0x1472; + /* 0x1474 */ dMsgFlow_c msgflow; + /* 0x14C0 */ u8 field_0x14c0; + /* 0x14C2 */ u16 field_0x14c2; + /* 0x14C4 */ u16 catch_flow_id; + /* 0x14C6 */ u8 field_0x14C6[0x14C8 - 0x14C6]; + /* 0x14C8 */ f32 rod_stick_x; + /* 0x14CC */ f32 rod_stick_y; + /* 0x14D0 */ f32 field_0x14d0; + /* 0x14D4 */ f32 field_0x14d4; + /* 0x14D8 */ f32 rod_substick_x; + /* 0x14DC */ f32 rod_substick_y; + /* 0x14E0 */ f32 prev_rod_substick_y; + /* 0x14E4 */ u8 field_0x14e4; + /* 0x14E5 */ u8 field_0x14E5[0x14EC - 0x14E5]; + /* 0x14EC */ f32 field_0x14ec; + /* 0x14F0 */ int reel_btn_flags; + /* 0x14F4 */ f32 reel_speed; + /* 0x14F8 */ s16 field_0x14f8; + /* 0x14FA */ s16 field_0x14fa; + /* 0x14FC */ s16 field_0x14fc; + /* 0x14FE */ u8 field_0x14FE[0x1504 - 0x14FE]; + /* 0x1504 */ f32 field_0x1504; /* 0x1508 */ f32 field_0x1508; - /* 0x150C */ u8 field_0x150c[0x1514 - 0x150C]; + /* 0x150C */ f32 field_0x150c; + /* 0x1510 */ u8 field_0x1510[0x1514 - 0x1510]; /* 0x1514 */ u8 field_0x1514; /* 0x1515 */ u8 field_0x1515; - /* 0x1516 */ u8 field_0x1516[0x1518 - 0x1516]; - /* 0x1518 */ dCcD_Stts field_0x1518; - /* 0x1554 */ dCcD_Sph field_0x1554; + /* 0x1518 */ dCcD_Stts ccStts; + /* 0x1554 */ dCcD_Sph ccSph; /* 0x168C */ u8 field_0x168c; + /* 0x168D */ u8 field_0x168d; + /* 0x168E */ u8 HIOInit; }; STATIC_ASSERT(sizeof(dmg_rod_class) == 0x1690); @@ -174,7 +305,17 @@ STATIC_ASSERT(sizeof(dmg_rod_class) == 0x1690); class dmg_rod_HIO_c { public: /* 804A95EC */ dmg_rod_HIO_c(); - /* 804BB070 */ ~dmg_rod_HIO_c(); + /* 804BB070 */ virtual ~dmg_rod_HIO_c() {} + + /* 0x04 */ s8 id; + /* 0x08 */ f32 field_0x8; + /* 0x0C */ f32 field_0xc; + /* 0x10 */ f32 field_0x10; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ f32 field_0x18; + /* 0x1C */ f32 field_0x1c; + /* 0x20 */ f32 field_0x20; + /* 0x24 */ u8 force_fish_msg_output; }; #endif /* D_A_MG_ROD_H */ diff --git a/include/d/actor/d_a_obj_life_container.h b/include/d/actor/d_a_obj_life_container.h index e1526401dde..bbaf2f3f5ec 100644 --- a/include/d/actor/d_a_obj_life_container.h +++ b/include/d/actor/d_a_obj_life_container.h @@ -56,6 +56,10 @@ public: u8 getItemNo() { return fopAcM_GetParamBit(this, 0, 8); } int getSwNo() { return 0xFF; } + void startCtrl() { + actionInitWait2(); + } + void setPos(cXyz); private: diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h index f488f273f27..8b8a3f1f3ea 100644 --- a/include/d/actor/d_a_player.h +++ b/include/d/actor/d_a_player.h @@ -930,6 +930,8 @@ public: bool checkMidnaAtnPos() const { return checkNoResetFlg1(FLG1_MIDNA_ATN_POS); } bool checkMidnaHairAtnPos() const { return checkNoResetFlg1(FLG1_MIDNA_HAIR_ATN_POS); } bool checkAttentionLock() const { return checkResetFlg0(RFLG0_UNK_10000); } + BOOL checkFishingRodUseStart() const { return checkResetFlg1(RFLG1_UNK_80); } + BOOL checkFishingRodUseAccept() const { return checkResetFlg1(RFLG1_UNK_200); } void onBossRoomWait() { onEndResetFlg0(ERFLG0_BOSS_ROOM_WAIT); } void onBeeFollow() { onEndResetFlg0(ERFLG0_BEE_FOLLOW); } @@ -944,6 +946,9 @@ public: void onPortalWarpMidnaAtnKeep() { onEndResetFlg2(ERFLG2_PORTAL_WARP_MIDNA_ATN_KEEP); } void onFogFade() { onNoResetFlg2(FLG2_UNK_4000); } void onDkCaught2() { onNoResetFlg0(FLG0_DK_CAUGHT); } + void onFishingRodReelEnd() { onEndResetFlg0(ERFLG0_UNK_20000); } + void onFishingHit() { onEndResetFlg0(ERFLG0_UNK_10000); } + void onFishingKeep() { onEndResetFlg2(ERFLG2_UNK_1); } BOOL checkStickArrowReset() const { return checkResetFlg0(RFLG0_UNK_1); } u32 getCutAtFlg() const { return checkNoResetFlg0(FLG0_UNK_40); } diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index 847020ec5fb..cab9d3f57db 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -2009,6 +2009,14 @@ inline u8 dComIfGs_getFishSize(u8 param_0) { return g_dComIfG_gameInfo.info.getPlayer().getFishingInfo().getMaxSize(param_0); } +inline void dComIfGs_addFishNum(u8 param_0) { + g_dComIfG_gameInfo.info.getPlayer().getFishingInfo().addFishCount(param_0); +} + +inline void dComIfGs_setFishSize(u8 param_0, u8 param_1) { + g_dComIfG_gameInfo.info.getPlayer().getFishingInfo().setMaxSize(param_0, param_1); +} + inline u8 dComIfGs_getGetNumber(int i_no) { return g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().getGetNumber(i_no); } diff --git a/include/d/d_menu_window.h b/include/d/d_menu_window.h index fa2da1448e4..bf18a47eda4 100644 --- a/include/d/d_menu_window.h +++ b/include/d/d_menu_window.h @@ -32,6 +32,8 @@ BOOL dMw_LEFT_TRIGGER(); BOOL dMw_RIGHT_TRIGGER(); void dMw_onPauseWindow(); void dMw_offPauseWindow(); +void dMw_onMenuRing(); +void dMw_offMenuRing(); class dDlst_MENU_CAPTURE_c; diff --git a/include/d/d_meter2_info.h b/include/d/d_meter2_info.h index 6700a2b838b..7558a635d16 100644 --- a/include/d/d_meter2_info.h +++ b/include/d/d_meter2_info.h @@ -204,6 +204,8 @@ public: void setHorseLifeCount(s16 i_count) { mHorseLifeCount = i_count; } void resetTouchKeyCheck() { mTouchKeyCheck = 0; } void resetWindowAccept() { mWindowAccept = 0xFFFF; } + void onWindowAccept(int param_0) { mWindowAccept |= (u16)(1 << param_0); } + void offWindowAccept(int param_0) { mWindowAccept &= ~(u16)(1 << param_0); } public: /* 0x04 */ u8 unk_0x4[4]; @@ -842,4 +844,12 @@ inline void dMeter2Info_setMiniGameCount(s8 i_count) { g_meter2_info.setMiniGameCount(i_count); } +inline void dMeter2Info_onWindowAccept(int param_0) { + g_meter2_info.onWindowAccept(param_0); +} + +inline void dMeter2Info_offWindowAccept(int param_0) { + g_meter2_info.offWindowAccept(param_0); +} + #endif /* D_METER_D_METER2_INFO_H */ diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath.h index d4e55263a7b..2cc68dd01b0 100644 --- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath.h @@ -35,6 +35,10 @@ inline float ceil(float num) { inline float floor(float num) { return ::floorf(num); } + +inline float tan(float num) { + return ::i_tanf(num); +} } // namespace std #endif diff --git a/src/d/actor/d_a_alink_canoe.inc b/src/d/actor/d_a_alink_canoe.inc index 73479e0fd9b..b6b2e44a1df 100644 --- a/src/d/actor/d_a_alink_canoe.inc +++ b/src/d/actor/d_a_alink_canoe.inc @@ -340,7 +340,7 @@ int daAlink_c::canoeCommon() { /* 800F4924-800F4A50 0EF264 012C+00 10/10 0/0 0/0 .text checkNextActionCanoe__9daAlink_cFv */ int daAlink_c::checkNextActionCanoe() { if ((!checkFishingRodAndLureItem() || mItemAcKeep.getActor() == NULL || - static_cast(mItemAcKeep.getActor())->checkRodEquipPermission()) && + ((dmg_rod_class*)mItemAcKeep.getActor())->checkRodEquipPermission()) && checkNextActionFromButton()) { return 1; } diff --git a/src/d/actor/d_a_b_gnd.cpp b/src/d/actor/d_a_b_gnd.cpp index 8274f54978e..1ef8c7d807c 100644 --- a/src/d/actor/d_a_b_gnd.cpp +++ b/src/d/actor/d_a_b_gnd.cpp @@ -1246,7 +1246,7 @@ static void b_gnd_g_wait(b_gnd_class* i_this) { mant_class* mant_p = (mant_class*)fopAcM_SearchByID(i_this->mMantChildID); dmg_rod_class* mgrod_p = (dmg_rod_class*)fopAcM_SearchByName(PROC_MG_ROD); - if (mgrod_p != NULL && mgrod_p->field_0xf7e != 0) { + if (mgrod_p != NULL && mgrod_p->action != 0) { if (i_this->mMoveMode < 5 && i_this->mPlayerDistXZ < 600.0f) { i_this->mMoveMode = 5; i_this->field_0xc44[0] = 10; @@ -1332,7 +1332,7 @@ static void b_gnd_g_wait(b_gnd_class* i_this) { } i_this->field_0xc7d = 2; - i_this->field_0xc80 = mgrod_p->mHookPosition; + i_this->field_0xc80 = mgrod_p->hook_pos; break; case 6: angle_step = 0; diff --git a/src/d/actor/d_a_e_bg.cpp b/src/d/actor/d_a_e_bg.cpp index 99e1d8a6868..ab85c46996c 100644 --- a/src/d/actor/d_a_e_bg.cpp +++ b/src/d/actor/d_a_e_bg.cpp @@ -241,9 +241,9 @@ void daE_BG_c::setSparkEffect() { /* 80685F04-80685F88 0007E4 0084+00 2/2 0/0 0/0 .text search_esa__8daE_BG_cFv */ fopAc_ac_c* daE_BG_c::search_esa() { dmg_rod_class* rod = (dmg_rod_class*)fopAcM_SearchByName(PROC_MG_ROD); - if (rod != NULL && rod->field_0xf7c == 1 && rod->field_0xf7e != 5 && rod->field_0x100d != 0 && - rod->current.pos.y < rod->field_0x590 - 20.0f) { - return rod; + if (rod != NULL && rod->kind == 1 && rod->action != 5 && rod->field_0x100d != 0 && + rod->actor.current.pos.y < rod->field_0x590 - 20.0f) { + return &rod->actor; } else { return NULL; } diff --git a/src/d/actor/d_a_e_sg.cpp b/src/d/actor/d_a_e_sg.cpp index 58bba4693d1..7cf99c50b84 100644 --- a/src/d/actor/d_a_e_sg.cpp +++ b/src/d/actor/d_a_e_sg.cpp @@ -233,8 +233,8 @@ static obj_kbox_class* search_box(e_sg_class* i_this) { static dmg_rod_class* search_esa(e_sg_class* i_this) { dmg_rod_class* rod = (dmg_rod_class*)fopAcM_SearchByName(PROC_MG_ROD); - if (rod != NULL && rod->field_0xf7c == 1 && rod->field_0xf7e != 5 && rod->field_0x100d != 0 && - rod->current.pos.y < rod->field_0x590 - 20.0f) + if (rod != NULL && rod->kind == 1 && rod->action != 5 && rod->field_0x100d != 0 && + rod->actor.current.pos.y < rod->field_0x590 - 20.0f) { return rod; } diff --git a/src/d/actor/d_a_mg_fish.cpp b/src/d/actor/d_a_mg_fish.cpp index 6faac6a4442..ab805e087b6 100644 --- a/src/d/actor/d_a_mg_fish.cpp +++ b/src/d/actor/d_a_mg_fish.cpp @@ -184,8 +184,8 @@ static void* s_lure_sub(void* a, void* b) { if (fopAc_IsActor(a)) { if (fopAcM_GetName(a) == PROC_MG_ROD) { dmg_rod_class* rod = (dmg_rod_class*)a; - if (rod->field_0xf7c == 0 && - rod->field_0xf7e == 4 && + if (rod->kind == 0 && + rod->action == 4 && rod->field_0x10a9 == 0 && rod->field_0x100d != 0) { return rod; @@ -200,10 +200,10 @@ static void* s_esa_sub(void* a, void* b) { if (fopAc_IsActor(a)) { if (fopAcM_GetName(a) == PROC_MG_ROD) { dmg_rod_class* rod = (dmg_rod_class*)a; - if (rod->field_0xf7c == 1 && - rod->field_0xf7e != 5 && + if (rod->kind == 1 && + rod->action != 5 && rod->field_0x100d != 0 && - rod->current.pos.y < rod->field_0x590 - 20.0f) { + rod->actor.current.pos.y < rod->field_0x590 - 20.0f) { return rod; } } @@ -260,7 +260,7 @@ static s32 search_lure(mg_fish_class* i_this, int param_2) { fpcM_Search(s_other_search_sub, i_this); if (s_fish_ct <= 1) { f32 fVar1 = i_this->field_0x5ec; - if (rod->field_0xf80 == 4) { + if (rod->lure_type == MG_LURE_SP) { fVar1 = 1000.0f; } else { if (rod->field_0x1009 != 0) { @@ -274,13 +274,13 @@ static s32 search_lure(mg_fish_class* i_this, int param_2) { fVar1 *= 0.5f; } if (i_this->mGedouKind != GEDOU_KIND_CF_1 && - rod->field_0xf80 != 4 && - (i_this->field_0x750 & learn_d[rod->field_0xf80]) != 0) + rod->lure_type != MG_LURE_SP && + (i_this->field_0x750 & learn_d[rod->lure_type]) != 0) { return -1; } - cXyz diff = rod->current.pos - i_this->actor.current.pos; - if (rod->field_0xf80 == 2 && rod->field_0x100c >= 10) { + cXyz diff = rod->actor.current.pos - i_this->actor.current.pos; + if (rod->lure_type == MG_LURE_PO && rod->field_0x100c >= 10) { diff.y = -80.0f; } if (diff.abs() < fVar1) { @@ -292,15 +292,15 @@ static s32 search_lure(mg_fish_class* i_this, int param_2) { fopAc_ac_c* rod_actor = (fopAc_ac_c*)fpcM_Search(s_esa_sub, i_this); if (rod_actor != NULL) { dmg_rod_class* rod = (dmg_rod_class*)rod_actor; - if (i_this->mGedouKind == GEDOU_KIND_KS_2 && rod->field_0x102d != 1) { + if (i_this->mGedouKind == GEDOU_KIND_KS_2 && rod->hook_kind != 1) { return -1; } - if ((i_this->mGedouKind == GEDOU_KIND_BG || rod->field_0x102d == 1 || rod->field_0x102c != 0) && - rod->current.pos.y < i_this->mSurfaceY - 60.0f) + if ((i_this->mGedouKind == GEDOU_KIND_BG || rod->hook_kind == 1 || rod->esa_kind != 0) && + rod->actor.current.pos.y < i_this->mSurfaceY - 60.0f) { f32 maxLatDist = i_this->field_0x5ec; - f32 distX = rod->current.pos.x - i_this->actor.current.pos.x; - f32 distZ = rod->current.pos.z - i_this->actor.current.pos.z; + f32 distX = rod->actor.current.pos.x - i_this->actor.current.pos.x; + f32 distZ = rod->actor.current.pos.z - i_this->actor.current.pos.z; f32 latDist = JMAFastSqrt(distX * distX + distZ * distZ); if (latDist < maxLatDist) { return fopAcM_GetID(rod); @@ -1378,9 +1378,9 @@ static void mf_lure_search(mg_fish_class* i_this) { foundLure = true; } else if (rod->field_0x100a != 0 || rod->field_0x100d == 0) { foundLure = true; - } else if (rod->field_0xf7e != 4) { - if (rod->field_0xf7e >= 5 && - rod->mFishId == fopAcM_GetID(i_this)) { + } else if (rod->action != 4) { + if (rod->action >= 5 && + rod->mg_fish_id == fopAcM_GetID(i_this)) { foundLure = false; } else { foundLure = true; @@ -1404,7 +1404,7 @@ static void mf_lure_search(mg_fish_class* i_this) { case 1: i_this->mActionPhase = 2; case 2: { - rodSep = rod->current.pos - i_this->actor.current.pos; + rodSep = rod->actor.current.pos - i_this->actor.current.pos; rodSep.y -= 10.0f; i_this->mMovementYaw = cM_atan2s(rodSep.x, rodSep.z); i_this->mMovementPitch = -cM_atan2s(rodSep.y, JMAFastSqrt(rodSep.x * rodSep.x + rodSep.z * rodSep.z)); @@ -1412,7 +1412,7 @@ static void mf_lure_search(mg_fish_class* i_this) { i_this->mMovementPitch = -0x2000; } f32 rodDist = sqrtf(VECSquareMag(&rodSep)); - if (rod->field_0xf80 != 4 && rod->field_0xf80 != 2 && + if (rod->lure_type != MG_LURE_SP && rod->lure_type != MG_LURE_PO && rodDist > 2.0f * i_this->field_0x5ec) { foundLure = true; } else { @@ -1421,7 +1421,7 @@ static void mf_lure_search(mg_fish_class* i_this) { i_this->field_0x624[0] = cM_rndF(100.0f); i_this->field_0x624[1] = cM_rndF(200.0f) + 100.0f; if (i_this->mGedouKind == GEDOU_KIND_NP_1 || i_this->mGedouKind == GEDOU_KIND_LM_1) { - if (rod->field_0x14f0 != 0) { + if (rod->reel_btn_flags != 0) { target = 2.0f; } f32 fVar11; @@ -1431,8 +1431,8 @@ static void mf_lure_search(mg_fish_class* i_this) { fVar11 = 0.025f; } if (rodDist < 1.3f * i_this->field_0x5ec && - (rod->field_0xf80 == 4 || rod->field_0xf80 == 3) && - rod->field_0x14f0 != 0 && + (rod->lure_type == MG_LURE_SP || rod->lure_type == MG_LURE_WS) && + rod->reel_btn_flags != 0 && (i_this->mBobTimer & 0x1f) == 0 && cM_rndF(1.0f) < fVar11) { sVar10 = 0x5a; @@ -1458,7 +1458,7 @@ static void mf_lure_search(mg_fish_class* i_this) { limit1 *= 2.0f; limit2 *= 2.0f; } else if (i_this->mGedouKind == GEDOU_KIND_RI_1 && - rod->field_0xf80 != 0 && + rod->lure_type != MG_LURE_FR && i_this->field_0x5f8 < 10) { limit1 = limit2 = -1.0f; } @@ -1493,7 +1493,7 @@ static void mf_lure_search(mg_fish_class* i_this) { i_this->field_0x624[2] = sVar10; } - cLib_addCalc2(&i_this->actor.current.pos.y, rod->current.pos.y - 20.0f, + cLib_addCalc2(&i_this->actor.current.pos.y, rod->actor.current.pos.y - 20.0f, 0.05f, 2.0f); if (i_this->field_0x624[1] == 1) { @@ -1511,12 +1511,12 @@ static void mf_lure_search(mg_fish_class* i_this) { break; } - rodSep = rod->current.pos - i_this->actor.current.pos; + rodSep = rod->actor.current.pos - i_this->actor.current.pos; i_this->mMovementYaw = cM_atan2s(rodSep.x, rodSep.z); i_this->mMovementPitch = -cM_atan2s(rodSep.y, JMAFastSqrt(rodSep.x * rodSep.x + rodSep.z * rodSep.z)); target = 3.0f; - if (rod->field_0x14f0 != 0) { + if (rod->reel_btn_flags != 0) { target = 5.0f; } @@ -1529,12 +1529,12 @@ static void mf_lure_search(mg_fish_class* i_this) { if (rodDist < i_this->mJointScale * 40.0f) { if (i_this->mGedouKind == GEDOU_KIND_CF_1) { - if (rod->field_0xf80 == 4) { + if (rod->lure_type == MG_LURE_SP) { i_this->mRemainingHookTime = cM_rndF(10.0f) + 20.0f; } else { i_this->mRemainingHookTime = cM_rndF(12.0f) + 30.0f; } - } else if (rod->field_0xf80 == 4) { + } else if (rod->lure_type == MG_LURE_SP) { if (i_this->mJointScale >= 0.6f) { if (sVar10 != 0) { i_this->mActionPhase = 3; @@ -1555,13 +1555,13 @@ static void mf_lure_search(mg_fish_class* i_this) { break; } - if (rod->field_0xf80 == 0) { + if (rod->lure_type == MG_LURE_FR) { i_this->mRemainingHookTime = cM_rndF(10.0f) + 40.0f; } - rod->field_0xf7e = 5; + rod->action = 5; rod->field_0x10a5 = 2; - rod->mFishId = fopAcM_GetID(i_this); + rod->mg_fish_id = fopAcM_GetID(i_this); rod->field_0x1006 = cM_rndFX(7000.0f) + 1000.0f; i_this->mHookedState = 1; i_this->mMovementYaw = cM_rndFX(65536.0f); @@ -1570,7 +1570,7 @@ static void mf_lure_search(mg_fish_class* i_this) { i_this->mActionPhase = 4; mouth_close(i_this); - if (rod->current.pos.y > i_this->mSurfaceY - 15.0f) { + if (rod->actor.current.pos.y > i_this->mSurfaceY - 15.0f) { sibuki_set(i_this, 2.5f, i_this->field_0x638); if (i_this->mGedouKind == GEDOU_KIND_RI_1) { i_this->mSound.startCreatureSound(Z2SE_AL_DOJOU_EAT_IMPACT, 0, -1); @@ -1593,7 +1593,7 @@ static void mf_lure_search(mg_fish_class* i_this) { maxStep = 0.5f; i_this->mHookedState = 2; if (i_this->mRemainingHookTime == 0) { - if (rod->field_0xf80 != 4) { + if (rod->lure_type != MG_LURE_SP) { rod->field_0x10a6 = 30; if (rod->field_0x10a7 != 4) { rod->field_0x10a7 = 1; @@ -1635,7 +1635,7 @@ static void mf_lure_search(mg_fish_class* i_this) { */ static void mf_bait_search(mg_fish_class* i_this) { s32 foundBait = false; - dmg_rod_class* rod = (dmg_rod_class*)fopAcM_SearchByID(i_this->mBaitId); + fr_class* rod = (fr_class*)fopAcM_SearchByID(i_this->mBaitId); if (rod == NULL) { i_this->mActionPhase = 100; foundBait = true; @@ -1695,9 +1695,9 @@ static void mf_bait_search(mg_fish_class* i_this) { speedMaxStep = 1.0f; f32 fVar10 = offsetToRod.abs(); if (fVar10 < 40.0f * i_this->mJointScale) { - rod->field_0x5a4.field_0x2e = 0x32; - rod->field_0x5a4.field_0x30 = 0; - rod->field_0x5a4.field_0x54 = fopAcM_GetID(i_this); + rod->field_0x5d2 = 0x32; + rod->field_0x5d4 = 0; + rod->field_0x5f8 = fopAcM_GetID(i_this); fVar10 = cM_rndFX(65536.0f); i_this->mMovementYaw = fVar10; i_this->mMovementPitch = 0x2000; @@ -1877,7 +1877,7 @@ static void mf_hit(mg_fish_class* i_this) { } } } else { - if (pvVar5->field_0x14f0 == 0 || + if (pvVar5->reel_btn_flags == 0 || pvVar5->field_0x1515 == 0 || pvVar5->field_0xf60 < 100.0f) { @@ -1894,16 +1894,16 @@ static void mf_hit(mg_fish_class* i_this) { i_this->mActionPhase = 0; g_dComIfG_gameInfo.play.mVibration.StartShock(4, 1, cXyz(0.0f, 1.0f, 0.0f)); Z2AudioMgr::getInterface()->changeBgmStatus(4); - pvVar5->field_0xf7e = 6; - pvVar5->field_0x13b4 = 10; - pvVar5->field_0x13b6 = 0; + pvVar5->action = 6; + pvVar5->play_cam_mode = 10; + pvVar5->play_cam_timer = 0; pvVar5->field_0x14c2 = 0; - pvVar5->field_0x1408 = 90.0f; + pvVar5->play_cam_fovy = 90.0f; pvVar5->field_0x146d = 0; pvVar5->field_0x10b0 = 0; daPy_py_c* player = daPy_getLinkPlayerActorClass(); player->onFishingRodGetFish(); - if (pvVar5->field_0xf80 == 4) { + if (pvVar5->lure_type == MG_LURE_SP) { u8 bVar7 = g_dComIfG_gameInfo.info.mSavedata.mEvent.getEventReg(0xf11f); if (bVar7 < 0x1f) { bVar7++; @@ -1913,12 +1913,12 @@ static void mf_hit(mg_fish_class* i_this) { } else if (iVar1 != 0) { if (iVar1 == 2) { pvVar5->field_0x10a7 = 3; - pvVar5->field_0x57e = cM_rndF(13.0f) + 30.0f; + pvVar5->timers[2] = cM_rndF(13.0f) + 30.0f; pvVar5->field_0x10a6 = 1; } else { pvVar5->field_0x10a7 = 2; pvVar5->field_0x10a6 = 0x19; - pvVar5->field_0x57e = 0; + pvVar5->timers[2] = 0; } i_this->mCurAction = ACTION_MG_FISH_MF_AWAY; i_this->mActionPhase = -1; @@ -1979,7 +1979,7 @@ static void mf_jump(mg_fish_class* i_this) { i_this->actor.current.angle.z = i_this->actor.current.angle.z + i_this->jointYaws2[2]; i_this->actor.shape_angle.z = i_this->actor.current.angle.z; i_this->mMovementPitch = i_this->mMovementPitch + i_this->jointYaws2[3]; - if (i_this->field_0x624[0] == 1 && rod->mRodStickY <= -0.5f && cM_rndF(1.0f) < 0.35f) { + if (i_this->field_0x624[0] == 1 && rod->rod_stick_y <= -0.5f && cM_rndF(1.0f) < 0.35f) { i_this->field_0x65a = 1; i_this->mHookedState = 0; } @@ -2224,9 +2224,9 @@ static void mf_catch(mg_fish_class* i_this) { i_this->mActionPhase = 3; i_this->field_0x624[0] = 40; player->onFishingRelease(); - rod->health = 1; - rod->field_0x13b4 = 11; - rod->field_0x13b6 = 0; + rod->actor.health = 1; + rod->play_cam_mode = 11; + rod->play_cam_timer = 0; rod->field_0x146d = 0; i_this->field_0x740 = cM_rndF(1000.0f) + 3000.0f; } @@ -2291,7 +2291,7 @@ static void mf_esa_search(mg_fish_class* i_this) { flag1 = 1; } else if (rod->field_0x100d == 0) { flag1 = 1; - } else if (rod->field_0xf7e == 5) { + } else if (rod->action == 5) { flag1 = 1; } if (flag1) { @@ -2313,7 +2313,7 @@ static void mf_esa_search(mg_fish_class* i_this) { i_this->mActionPhase = 2; } case 2: { - cXyz xyz = rod->current.pos - i_this->actor.current.pos; + cXyz xyz = rod->actor.current.pos - i_this->actor.current.pos; i_this->mMovementYaw = cM_atan2s(xyz.x, xyz.z); i_this->mMovementPitch = -cM_atan2s(xyz.y, JMAFastSqrt(xyz.x * xyz.x + xyz.z * xyz.z)); @@ -2337,23 +2337,23 @@ static void mf_esa_search(mg_fish_class* i_this) { } } - xyz = i_this->field_0x638 - rod->current.pos; + xyz = i_this->field_0x638 - rod->actor.current.pos; if (sqrtf(VECSquareMag(&xyz)) < i_this->mJointScale * 14.0f) { fVar9 = i_this->field_0x654; i_this->mMaxStep = 0; if (i_this->field_0x624[0] == 0) { - rod->mFishId = fopAcM_GetID(i_this); + rod->mg_fish_id = fopAcM_GetID(i_this); f32 fVar10 = 0.5f; if (dComIfGs_getFishNum(5) <= 5) { fVar10 = 1.5f; } if (i_this->mGedouKind != GEDOU_KIND_BG) { - if (rod->field_0x102d == 1) { + if (rod->hook_kind == 1) { fVar10 = 1.0f; } - if (rod->field_0x102c == 1) { + if (rod->esa_kind == 1) { fVar10 *= 1.5f; - } else if (rod->field_0x102c == 2) { + } else if (rod->esa_kind == 2) { fVar10 *= 2.0f; } } @@ -2371,7 +2371,7 @@ static void mf_esa_search(mg_fish_class* i_this) { rod->field_0x10a5 = fVar10 * (cM_rndF(15.0f) + 15.0f); i_this->field_0x659 = rod->field_0x10a5; i_this->field_0x650 = 0.0f; - if (rod->field_0x102d == 0 && rod->field_0x102c == 0) { + if (rod->hook_kind == 0 && rod->esa_kind == 0) { i_this->field_0x624[0] = cM_rndF(80.0f) + 50.0f; } else { i_this->field_0x624[0] = cM_rndF(20.0f) + 30.0f; @@ -2380,9 +2380,9 @@ static void mf_esa_search(mg_fish_class* i_this) { } } if (i_this->field_0x659 == 0) { - cLib_addCalc2(&i_this->actor.current.pos.y, rod->current.pos.y, 0.05f, 2.0f); + cLib_addCalc2(&i_this->actor.current.pos.y, rod->actor.current.pos.y, 0.05f, 2.0f); } else { - cLib_addCalc2(&i_this->actor.current.pos.y, rod->current.pos.y - 20.0f, 0.05f, 2.0f); + cLib_addCalc2(&i_this->actor.current.pos.y, rod->actor.current.pos.y - 20.0f, 0.05f, 2.0f); } break; } @@ -2401,8 +2401,8 @@ static void mf_esa_search(mg_fish_class* i_this) { cLib_addCalcAngleS2(&i_this->actor.current.angle.y, i_this->mMovementYaw, 2, i_this->mMaxStep); cLib_addCalcAngleS2(&i_this->actor.current.angle.x, i_this->mMovementPitch, 2, i_this->mMaxStep); if (i_this->field_0x5ec > 10000.0f) { - cLib_addCalc2(&i_this->actor.current.pos.x, rod->current.pos.x, 0.1f, 50.0f); - cLib_addCalc2(&i_this->actor.current.pos.z, rod->current.pos.z, 0.1f, 50.0f); + cLib_addCalc2(&i_this->actor.current.pos.x, rod->actor.current.pos.x, 0.1f, 50.0f); + cLib_addCalc2(&i_this->actor.current.pos.z, rod->actor.current.pos.z, 0.1f, 50.0f); } if (flag2) { i_this->mCurAction = ACTION_MG_FISH_MF_SWIM_S; @@ -2415,7 +2415,7 @@ static void mf_esa_search(mg_fish_class* i_this) { /* 8053109C-805313D8 00745C 033C+00 1/1 0/0 0/0 .text mf_esa_hit__FP13mg_fish_class */ static void mf_esa_hit(mg_fish_class* i_this) { dmg_rod_class* rod = (dmg_rod_class*)fopAcM_SearchByID(i_this->mRodId); - if (rod == NULL || (rod != NULL && rod->field_0xf7e != 5)) { + if (rod == NULL || (rod != NULL && rod->action != 5)) { i_this->mCurAction = ACTION_MG_FISH_MF_SWIM_S; i_this->mActionPhase = 0; i_this->field_0x62e = cM_rndF(100.0f) + 100.0f; @@ -3398,7 +3398,7 @@ static int daMg_Fish_Execute(mg_fish_class* i_this) { i_this->actor.current.pos.z); cMtx_YrotM(mDoMtx_stack_c::now, i_this->actor.shape_angle.y); cMtx_XrotM(mDoMtx_stack_c::now, 0x4000); - if (rod->field_0x102d == 1) { + if (rod->hook_kind == 1) { mDoMtx_stack_c::transM(0.0f, 0.0f, 35.0f); } else { mDoMtx_stack_c::transM(0.0f, 0.0f, 29.0f); @@ -3516,7 +3516,7 @@ static int daMg_Fish_Execute(mg_fish_class* i_this) { i_this->actor.current.pos.z); cMtx_YrotM(mDoMtx_stack_c::now, i_this->actor.shape_angle.y); cMtx_XrotM(mDoMtx_stack_c::now, -0x4000); - if (rod->field_0x102d == 1) { + if (rod->hook_kind == 1) { mDoMtx_stack_c::transM(0.0f, 0.0f, -14.0f); } else { mDoMtx_stack_c::transM(0.0f, 0.0f, -8.0f); @@ -3533,7 +3533,7 @@ static int daMg_Fish_Execute(mg_fish_class* i_this) { i_this->actor.current.pos.z); cMtx_YrotM(mDoMtx_stack_c::now, i_this->actor.shape_angle.y); cMtx_XrotM(mDoMtx_stack_c::now, -0x4000); - if (rod->field_0x102d == 1) { + if (rod->hook_kind == 1) { mDoMtx_stack_c::transM(0.0f, 0.0f, -25.0f); } else { mDoMtx_stack_c::transM(0.0f, 0.0f, -19.0f); @@ -3586,7 +3586,7 @@ static int daMg_Fish_Execute(mg_fish_class* i_this) { MtxPosition(&commonXyz, &i_this->field_0x638); if (i_this->mHookedState != 0) { dmg_rod_class* rod = (dmg_rod_class*)fopAcM_SearchByID(i_this->mRodId); - if (rod->field_0xf80 == 4 && i_this->mCurAction == ACTION_MG_FISH_MF_CATCH) { + if (rod->lure_type == MG_LURE_SP && i_this->mCurAction == ACTION_MG_FISH_MF_CATCH) { if (i_this->mKind2 == 0) { f32 fVar3 = (i_this->mJointScale - 0.48f) * 100.0f; if (fVar3 < 0.0f) { @@ -3606,29 +3606,29 @@ static int daMg_Fish_Execute(mg_fish_class* i_this) { commonXyz.z += 5.0f; } MtxPosition(&commonXyz, &i_this->field_0x638); - rod->current.angle.y = 0; - rod->current.angle.x = 0x4000; - rod->current.angle.z = player->shape_angle.y + 8000; - rod->shape_angle.x = rod->current.angle.x; - rod->shape_angle.y = rod->current.angle.y; - rod->shape_angle.z = rod->current.angle.z; + rod->actor.current.angle.y = 0; + rod->actor.current.angle.x = 0x4000; + rod->actor.current.angle.z = player->shape_angle.y + 8000; + rod->actor.shape_angle.x = rod->actor.current.angle.x; + rod->actor.shape_angle.y = rod->actor.current.angle.y; + rod->actor.shape_angle.z = rod->actor.current.angle.z; rod->field_0x114a = 0; rod->field_0x114c = 0; rod->field_0x1004 = 0; } else { - if (rod->field_0xf80 == 0 && i_this->mGedouKind == GEDOU_KIND_RI_1) { + if (rod->lure_type == MG_LURE_FR && i_this->mGedouKind == GEDOU_KIND_RI_1) { commonXyz.y += 8.0f; commonXyz.z += -3.0f; MtxPosition(&commonXyz, &i_this->field_0x638); } - cLib_addCalcAngleS2(&rod->current.angle.y, i_this->actor.shape_angle.y - 0x1710, 2, 0x800); - cLib_addCalcAngleS2(&rod->current.angle.x, + cLib_addCalcAngleS2(&rod->actor.current.angle.y, i_this->actor.shape_angle.y - 0x1710, 2, 0x800); + cLib_addCalcAngleS2(&rod->actor.current.angle.x, i_this->actor.shape_angle.x + - 0x310c + rod->field_0x1006, 2, 0x800); - cLib_addCalcAngleS2(&rod->current.angle.z, 0x6328, 2, 0x800); + cLib_addCalcAngleS2(&rod->actor.current.angle.z, 0x6328, 2, 0x800); } - rod->current.pos.x = i_this->field_0x638.x; - rod->current.pos.y = i_this->field_0x638.y; - rod->current.pos.z = i_this->field_0x638.z; + rod->actor.current.pos.x = i_this->field_0x638.x; + rod->actor.current.pos.y = i_this->field_0x638.y; + rod->actor.current.pos.z = i_this->field_0x638.z; rod->field_0x1000 = 0; rod->field_0xffc = 0; } diff --git a/src/d/actor/d_a_mg_rod.cpp b/src/d/actor/d_a_mg_rod.cpp index f8cca31f6f4..d199590dff8 100644 --- a/src/d/actor/d_a_mg_rod.cpp +++ b/src/d/actor/d_a_mg_rod.cpp @@ -4,696 +4,6359 @@ */ #include "d/actor/d_a_mg_rod.h" +#include "d/d_com_inf_game.h" +#include "d/d_s_play.h" +#include "d/actor/d_a_alink.h" +#include "d/actor/d_a_canoe.h" +#include "d/actor/d_a_npc_henna.h" +#include "d/actor/d_a_obj_lp.h" +#include "d/actor/d_a_e_sg.h" +#include "d/actor/d_a_obj_life_container.h" +#include "d/d_menu_window.h" +#include "d/d_meter2_info.h" +#include "d/d_msg_object.h" +#include "d/d_item.h" +#include "f_op/f_op_kankyo_mng.h" +#include "c/c_damagereaction.h" +#include "SSystem/SComponent/c_counter.h" +#include "Z2AudioLib/Z2Instances.h" +#include -#include "d/d_camera.h" -#include "dol2asm.h" -#include "d/d_cc_d.h" - -// -// Forward References: -// - -extern "C" void __ct__13dmg_rod_HIO_cFv(); -extern "C" static void frog_nodeCallBack__FP8J3DJointi(); -extern "C" static void ws_nodeCallBack__FP8J3DJointi(); -extern "C" static void Reel_CallBack__FP8J3DJointi(); -extern "C" static void Worm_nodeCallBack__FP8J3DJointi(); -extern "C" static void dmg_rod_Draw__FP13dmg_rod_class(); -extern "C" static void rod_control__FP13dmg_rod_class(); -extern "C" static void rod_main__FP13dmg_rod_class(); -extern "C" static void line_control1__FP13dmg_rod_class(); -extern "C" void __dt__8cM3dGPlaFv(); -extern "C" static void line_control2__FP13dmg_rod_class(); -extern "C" static void line_control1_u__FP13dmg_rod_class(); -extern "C" static void line_control2_u__FP13dmg_rod_class(); -extern "C" static void line_main__FP13dmg_rod_class(); -extern "C" static void depth_check__FP13dmg_rod_classP4cXyz(); -extern "C" static void sibuki_set__FP13dmg_rod_classfP4cXyzi(); -extern "C" static void s_boat_sub__FPvPv(); -extern "C" static void lure_onboat__FP13dmg_rod_class(); -extern "C" static void lure_standby__FP13dmg_rod_class(); -extern "C" static void lure_bound_se_set__FP13dmg_rod_class(); -extern "C" static void lure_cast__FP13dmg_rod_class(); -extern "C" static void simple_bg_check__FP13dmg_rod_classf(); -extern "C" static void s_wd_sub__FPvPv(); -extern "C" static void wd_check__FP13dmg_rod_class(); -extern "C" static void fr_action__FP13dmg_rod_classf(); -extern "C" static void pe_action__FP13dmg_rod_classf(); -extern "C" static void po_action__FP13dmg_rod_classf(); -extern "C" static void ws_action__FP13dmg_rod_classf(); -extern "C" static void sp_action__FP13dmg_rod_classf(); -extern "C" static void ground_action__FP13dmg_rod_class(); -extern "C" static void wd_action__FP13dmg_rod_classfP5wd_ss(); -extern "C" static void heart_action__FP13dmg_rod_classf(); -extern "C" static void action_eff_set__FP13dmg_rod_class(); -extern "C" static void lure_action__FP13dmg_rod_class(); -extern "C" static void lure_hit__FP13dmg_rod_classP13mg_fish_class(); -extern "C" static void lure_catch__FP13dmg_rod_class(); -extern "C" static void lure_bare__FP13dmg_rod_class(); -extern "C" static void lure_heart__FP13dmg_rod_class(); -extern "C" static void hook_set__FP13dmg_rod_classP4cXyzi(); -extern "C" static void lure_disp__FP13dmg_rod_class(); -extern "C" static void lure_main__FP13dmg_rod_class(); -extern "C" static void uki_calc__FP13dmg_rod_class(); -extern "C" static void uki_ready__FP13dmg_rod_class(); -extern "C" static void uki_rod_bg_check__FP13dmg_rod_class(); -extern "C" static void uki_pl_arm_calc__FP13dmg_rod_class(); -extern "C" static void uki_standby__FP13dmg_rod_class(); -extern "C" static void uki_hit__FP13dmg_rod_class(); -extern "C" static void bb_get__FP13dmg_rod_class(); -extern "C" static void uki_catch__FP13dmg_rod_class(); -extern "C" static void s_sg_sub__FPvPv(); -extern "C" static void s_bb_sub__FPvPv(); -extern "C" static void s_lh_sub__FPvPv(); -extern "C" static void s_bt_sub__FPvPv(); -extern "C" static void uki_main__FP13dmg_rod_class(); -extern "C" static void cam_3d_morf__FP13dmg_rod_classf(); -extern "C" static void play_camera__FP13dmg_rod_class(); -extern "C" static void play_camera_u__FP13dmg_rod_class(); -extern "C" static void dmg_rod_Execute__FP13dmg_rod_class(); -extern "C" static void dmg_rod_IsDelete__FP13dmg_rod_class(); -extern "C" static void dmg_rod_Delete__FP13dmg_rod_class(); -extern "C" static void useHeapInit__FP10fopAc_ac_c(); -extern "C" static void dmg_rod_Create__FP10fopAc_ac_c(); -extern "C" void __ct__13dmg_rod_classFv(); -extern "C" void __dt__8cM3dGSphFv(); -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__9mg_hook_sFv(); -extern "C" void __ct__9mg_hook_sFv(); -extern "C" void __ct__5csXyzFv(); -extern "C" void __ct__4cXyzFv(); -extern "C" void __dt__10cCcD_GSttsFv(); -extern "C" void __dt__13dmg_rod_HIO_cFv(); -extern "C" void __sinit_d_a_mg_rod_cpp(); -extern "C" void func_804BB130(); -extern "C" static void func_804BB168(); -extern "C" static void func_804BB170(); -extern "C" void __dt__5csXyzFv(); -extern "C" void __dt__4cXyzFv(); -extern "C" static void daAlink_getAlinkActorClass__Fv(); -extern "C" static void dComIfGp_event_runCheck__Fv(); -extern "C" static void dComIfGp_checkPlayerStatus0__FiUl(); -extern "C" void __ct__4cXyzFfff(); -extern "C" static void dComIfGp_getCamera__Fi(); -extern "C" static void dComIfGp_getPlayerCameraID__Fi(); -extern "C" static void dComIfGp_getPlayer__Fi(); -extern "C" void cancelOriginalDemo__9daPy_py_cFv(); -extern "C" static void daPy_getPlayerActorClass__Fv(); -extern "C" void __ct__4cXyzFRC4cXyz(); -extern "C" static void JMAFastSqrt__Ff(); -extern "C" void changeDemoMode__9daPy_py_cFUliis(); -extern "C" void changeOriginalDemo__9daPy_py_cFv(); -extern "C" static void mDoAud_seStart__FUlPC3VecUlSc(); -extern "C" static void cM_ssin__Fs(); -extern "C" void abs__4cXyzCFv(); -extern "C" void __as__4cXyzFRC4cXyz(); -extern "C" void getTrigZ__8mDoCPd_cFUl(); -extern "C" void getTrigA__8mDoCPd_cFUl(); -extern "C" static void dComIfGp_setDoStatusForce__FUcUc(); -extern "C" static void dComIfGp_setZStatusForce__FUcUc(); -extern "C" extern char const* const d_a_mg_rod__stringBase0; - -// -// External References: -// - -extern "C" void mDoMtx_XrotS__FPA4_fs(); -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 push__14mDoMtx_stack_cFv(); -extern "C" void pop__14mDoMtx_stack_cFv(); -extern "C" void transM__14mDoMtx_stack_cFfff(); -extern "C" void scaleM__14mDoMtx_stack_cFfff(); -extern "C" void mDoExt_modelUpdateDL__FP8J3DModel(); -extern "C" void -__ct__14mDoExt_McaMorfFP12J3DModelDataP25mDoExt_McaMorfCallBack1_cP25mDoExt_McaMorfCallBack2_cP15J3DAnmTransformifiiiPvUlUl(); -extern "C" void entryDL__14mDoExt_McaMorfFv(); -extern "C" void modelCalc__14mDoExt_McaMorfFv(); -extern "C" void init__19mDoExt_3DlineMat0_cFUsUsi(); -extern "C" void update__19mDoExt_3DlineMat0_cFiR8_GXColorP12dKy_tevstr_c(); -extern "C" void setMat__26mDoExt_3DlineMatSortPacketFP18mDoExt_3DlineMat_c(); -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_setStageLayer__FPv(); -extern "C" void fopAcM_delete__FP10fopAc_ac_c(); -extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl(); -extern "C" void fopAcM_searchActorAngleY__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_effSmokeSet1__FPUlPUlPC4cXyzPC5csXyzfPC12dKy_tevstr_ci(); -extern "C" void fopAcM_effHamonSet__FPUlPC4cXyzff(); -extern "C" void fopAcM_getWaterStream__FPC4cXyzRC13cBgS_PolyInfoP4cXyzPii(); -extern "C" void fopKyM_createWpillar__FPC4cXyzfi(); -extern "C" void fpcEx_Search__FPFPvPv_PvPv(); -extern "C" void fpcSch_JudgeForPName__FPvPv(); -extern "C" void fpcSch_JudgeByID__FPvPv(); -extern "C" void dStage_changeScene__FifUlScsi(); -extern "C" void setItemBombNumCount__14dComIfG_play_cFUcs(); -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 getItem__17dSv_player_item_cCFib(); -extern "C" void setEmptyBottle__17dSv_player_item_cFv(); -extern "C" void setEmptyBombBagItemIn__17dSv_player_item_cFUcUcb(); -extern "C" void getBombNum__24dSv_player_item_record_cCFUc(); -extern "C" void getBombNum__21dSv_player_item_max_cCFUc(); -extern "C" void addFishCount__18dSv_fishing_info_cFUc(); -extern "C" void onEventBit__11dSv_event_cFUs(); -extern "C" void offEventBit__11dSv_event_cFUs(); -extern "C" void isEventBit__11dSv_event_cCFUs(); -extern "C" void setEventReg__11dSv_event_cFUsUc(); -extern "C" void getEventReg__11dSv_event_cCFUs(); -extern "C" void onItem__10dSv_info_cFii(); -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 dKyw_get_AllWind_vec__FP4cXyzP4cXyzPf(); -extern "C" void StartShock__12dVibration_cFii4cXyz(); -extern "C" void request__10dAttLook_cFP10fopAc_ac_cfffsi(); -extern "C" void LineCross__4cBgSFP11cBgS_LinChk(); -extern "C" void GroundCross__4cBgSFP11cBgS_GndChk(); -extern "C" void GetTriPla__4cBgSCFRC13cBgS_PolyInfoP8cM3dGPla(); -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 SetRope__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 ChkCoHit__12dCcD_GObjInfFv(); -extern "C" void Set__8dCcD_SphFRC11dCcD_SrcSph(); -extern "C" void execItemGet__FUc(); -extern "C" void checkEquipAnime__9daAlink_cCFv(); -extern "C" void checkFishingRodGrab__9daAlink_cCFP10fopAc_ac_c(); -extern "C" void checkCanoeFishingRodGrabOrPut__9daAlink_cCFv(); -extern "C" void checkFishingRodItem__9daPy_py_cFi(); -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 dCam_getControledAngleY__FP12camera_class(); -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_set__F4cXyziUii(); -extern "C" void dMw_onMenuRing__Fv(); -extern "C" void dMw_offMenuRing__Fv(); -extern "C" void setMeterString__13dMeter2Info_cFl(); -extern "C" void getSelectCursorPos__12dMsgObject_cFv(); -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 remove__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 __ct__5csXyzFsss(); -extern "C" void cM_atan2s__Fff(); -extern "C" void cM_atan2f__Fff(); -extern "C" void cM_rndF__Ff(); -extern "C" void cM_rndFX__Ff(); -extern "C" void SetPos__11cBgS_GndChkFPC3Vec(); -extern "C" void SetPos__11cBgS_GndChkFPC4cXyz(); -extern "C" void __dt__13cBgS_PolyInfoFv(); -extern "C" void cBgW_CheckBGround__Ff(); -extern "C" void __dt__8cM3dGCirFv(); -extern "C" void SetC__8cM3dGSphFRC4cXyz(); -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 MtxPush__Fv(); -extern "C" void MtxPull__Fv(); -extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void subBgmStart__8Z2SeqMgrFUl(); -extern "C" void changeBgmStatus__8Z2SeqMgrFl(); -extern "C" void changeFishingBgm__8Z2SeqMgrFl(); -extern "C" void __ct__10Z2CreatureFv(); -extern "C" void init__10Z2CreatureFP3VecP3VecUcUc(); -extern "C" void* __nw__FUl(); -extern "C" void __dl__FPv(); -extern "C" void __destroy_arr(); -extern "C" void __construct_array(); -extern "C" void __cvt_fp2unsigned(); -extern "C" void _savegpr_20(); -extern "C" void _savegpr_21(); -extern "C" void _savegpr_22(); -extern "C" void _savegpr_23(); -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_20(); -extern "C" void _restgpr_21(); -extern "C" void _restgpr_22(); -extern "C" void _restgpr_23(); -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* __vt__19mDoExt_3DlineMat0_c[5]; -extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */]; -extern "C" extern void* __vt__8dCcD_Sph[36]; -extern "C" extern void* __vt__9dCcD_Stts[11]; -extern "C" extern void* __vt__12cCcD_SphAttr[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" extern u8 g_dComIfG_gameInfo[122384]; -extern "C" extern u8 g_meter2_info[248]; -extern "C" extern u8 g_Counter[12 + 4 /* padding */]; -extern "C" u8 mCurrentMtx__6J3DSys[48]; -extern "C" u8 sincosTable___5JMath[65536]; -extern "C" extern u8 struct_80450C98[4]; -extern "C" extern u8 cDmr_SkipInfo[4]; -extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; -extern "C" void __register_global_object(); -extern "C" void actionInitWait2__11daObjLife_cFv(); - -// -// Declarations: -// - -/* ############################################################################################## */ /* 804BB534-804BB540 000000 000C+00 45/45 0/0 0/0 .rodata @3879 */ -SECTION_RODATA static u8 const lit_3879[12] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x804BB534, &lit_3879); - -/* 804BB540-804BB544 00000C 0004+00 1/34 0/0 0/0 .rodata @4285 */ -SECTION_RODATA static f32 const lit_4285 = 1.0f; -COMPILER_STRIP_GATE(0x804BB540, &lit_4285); - -/* 804BB544-804BB548 000010 0004+00 0/8 0/0 0/0 .rodata @4286 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4286 = 3.0f / 10.0f; -COMPILER_STRIP_GATE(0x804BB544, &lit_4286); -#pragma pop - -/* 804BB548-804BB54C 000014 0004+00 0/6 0/0 0/0 .rodata @4287 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4287 = 7.0f / 10.0f; -COMPILER_STRIP_GATE(0x804BB548, &lit_4287); -#pragma pop - -/* 804BB54C-804BB550 000018 0004+00 0/1 0/0 0/0 .rodata @4288 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4288 = -7.0f; -COMPILER_STRIP_GATE(0x804BB54C, &lit_4288); -#pragma pop - -/* 804BB550-804BB554 00001C 0004+00 0/6 0/0 0/0 .rodata @4289 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4289 = 35.0f; -COMPILER_STRIP_GATE(0x804BB550, &lit_4289); -#pragma pop - -/* 804BB554-804BB558 000020 0004+00 0/6 0/0 0/0 .rodata @4290 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4290 = 4.0f / 5.0f; -COMPILER_STRIP_GATE(0x804BB554, &lit_4290); -#pragma pop - -/* 804BB558-804BB55C 000024 0004+00 0/7 0/0 0/0 .rodata @4291 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4291 = 1.5f; -COMPILER_STRIP_GATE(0x804BB558, &lit_4291); -#pragma pop - -/* 804BB850-804BB85C 000000 000C+00 4/4 0/0 0/0 .data cNullVec__6Z2Calc */ -SECTION_DATA static u8 cNullVec__6Z2Calc[12] = { +static u8 const lit_3879[12] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -/* 804BB85C-804BB870 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 +UNK_REL_DATA /* 804BB870-804BB878 000020 0008+00 1/2 0/0 0/0 .data check_kind */ -SECTION_DATA static u8 check_kind[8] = { - 0xF5, 0x7F, 0xF4, 0x7F, 0xF3, 0x7F, 0xF2, 0x7F, +static u16 check_kind[] = { + 0xF57F, 0xF47F, 0xF37F, 0xF27F, }; -/* 804BB878-804BB87C 000028 0004+00 1/1 0/0 0/0 .data l_color$4439 */ -SECTION_DATA static u8 l_color_4439[4] = { - 0xFF, - 0xFF, - 0x96, - 0xFF, -}; +/* 804A95EC-804A964C 0000EC 0060+00 1/1 0/0 0/0 .text __ct__13dmg_rod_HIO_cFv */ +dmg_rod_HIO_c::dmg_rod_HIO_c() { + id = -1; + field_0x8 = 1.0f; + field_0x20 = 0.3f; + field_0xc = 0.7f; + field_0x10 = -7.0f; + field_0x14 = 35.0f; + field_0x18 = 0.8f; + field_0x1c = 1.5f; + force_fish_msg_output = 0; +} -/* 804BB87C-804BB880 00002C 0004+00 1/1 0/0 0/0 .data l_color$4445 */ -SECTION_DATA static u8 l_color_4445[4] = { - 0xFF, - 0xFF, - 0x96, - 0xFF, -}; +/* 804A964C-804A9734 00014C 00E8+00 1/1 0/0 0/0 .text frog_nodeCallBack__FP8J3DJointi */ +static int frog_nodeCallBack(J3DJoint* i_joint, int param_1) { + if (param_1 == 0) { + int jnt_no = i_joint->getJntNo(); + J3DModel* model = j3dSys.getModel(); + dmg_rod_class* a_this = (dmg_rod_class*)model->getUserArea(); -/* 804BB880-804BB8C0 000030 0040+00 0/1 0/0 0/0 .data rod_p$4578 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 rod_p[64] = { - 0x00, 0x00, 0x00, 0x00, 0x3B, 0x3F, 0x11, 0x1A, 0x3C, 0xBF, 0x11, 0x1A, 0x3D, 0x3A, 0x96, 0xB3, - 0x3D, 0xA1, 0x36, 0x6E, 0x3D, 0xFF, 0xFF, 0xEA, 0x3E, 0x1D, 0x6F, 0x27, 0x3E, 0x3F, 0x11, 0x1A, - 0x3E, 0x65, 0x2D, 0x73, 0x3E, 0x88, 0x05, 0xED, 0x3E, 0x9F, 0xF9, 0xFA, 0x3E, 0xBA, 0x96, 0xB3, - 0x3E, 0xF8, 0x59, 0x7B, 0x3F, 0x21, 0x36, 0x6E, 0x3F, 0x4C, 0xF7, 0xB9, 0x3F, 0x7F, 0xFF, 0xEA, -}; -#pragma pop + if (a_this != NULL) { + if (jnt_no == 1) { + MTXCopy(model->getAnmMtx(jnt_no), *calc_mtx); + cMtx_YrotM(*calc_mtx, -a_this->field_0xff2); + MtxScale(1.5f + JREG_F(10), 1.0f + JREG_F(11), 1.3f + JREG_F(12), 1); + model->setAnmMtx(jnt_no, *calc_mtx); + MTXCopy(*calc_mtx, J3DSys::mCurrentMtx); + } + } + } -/* 804BB8C0-804BB8D0 000070 000F+01 0/1 0/0 0/0 .data rod_wd$4591 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 rod_wd_4591[15 + 1 /* padding */] = { - 0x0F, - 0x0F, - 0x0F, - 0x0D, - 0x0B, - 0x0A, - 0x09, - 0x08, - 0x07, - 0x06, - 0x05, - 0x04, - 0x03, - 0x02, - 0x02, - /* padding */ - 0x00, -}; -#pragma pop + return 1; +} -/* 804BB8D0-804BB8E0 000080 000F+01 0/1 0/0 0/0 .data rod_wd$4600 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 rod_wd_4600[15 + 1 /* padding */] = { - 0x0A, - 0x09, - 0x09, - 0x08, - 0x08, - 0x07, - 0x07, - 0x06, - 0x06, - 0x05, - 0x05, - 0x04, - 0x04, - 0x03, - 0x03, - /* padding */ - 0x00, -}; -#pragma pop +/* 804A9734-804A97F8 000234 00C4+00 1/1 0/0 0/0 .text ws_nodeCallBack__FP8J3DJointi */ +static int ws_nodeCallBack(J3DJoint* i_joint, int param_1) { + if (param_1 == 0) { + int jnt_no = i_joint->getJntNo(); + J3DModel* model = j3dSys.getModel(); + dmg_rod_class* a_this = (dmg_rod_class*)model->getUserArea(); -/* 804BB8E0-804BB8E8 000090 0008+00 1/1 0/0 0/0 .data w_eff_id$5449 */ -SECTION_DATA static u8 w_eff_id_5449[8] = { - 0x01, 0xB8, 0x01, 0xB9, 0x01, 0xBA, 0x01, 0xBB, -}; + if (a_this != NULL) { + MTXCopy(model->getAnmMtx(jnt_no), *calc_mtx); + cMtx_XrotM(*calc_mtx, a_this->field_0x101c[jnt_no - 1]); // technically an OoB access, but this callback is only ever set for joints 1 and 2 + model->setAnmMtx(jnt_no, *calc_mtx); + MTXCopy(*calc_mtx, J3DSys::mCurrentMtx); + } + } -/* 804BB8E8-804BB8F4 000098 000C+00 1/1 0/0 0/0 .data c_x$5925 */ -SECTION_DATA static u8 c_x[12] = { - 0x00, 0x00, 0x00, 0x00, 0x41, 0x70, 0x00, 0x00, 0xC1, 0x70, 0x00, 0x00, -}; + return 1; +} -/* 804BB8F4-804BB900 0000A4 000C+00 1/1 0/0 0/0 .data c_z$5926 */ -SECTION_DATA static u8 c_z[12] = { - 0x41, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; +/* 804A97F8-804A98F4 0002F8 00FC+00 1/1 0/0 0/0 .text Reel_CallBack__FP8J3DJointi */ +static int Reel_CallBack(J3DJoint* i_joint, int param_1) { + if (param_1 == 0) { + int jnt_no = i_joint->getJntNo(); + J3DModel* model = j3dSys.getModel(); + dmg_rod_class* a_this = (dmg_rod_class*)model->getUserArea(); -/* 804BB900-804BB904 0000B0 0004+00 1/1 0/0 0/0 .data w_eff_id$6422 */ -SECTION_DATA static u8 w_eff_id_6422[4] = { - 0x89, - 0x7D, - 0x89, - 0x7E, -}; + if (a_this != NULL) { + if (jnt_no == 1 || jnt_no == 3) { + MTXCopy(model->getAnmMtx(jnt_no), *calc_mtx); -/* 804BB904-804BB908 0000B4 0004+00 1/1 0/0 0/0 .data w_eff_id$6432 */ -SECTION_DATA static u8 w_eff_id_6432[4] = { - 0x89, - 0x7F, - 0x89, - 0x80, -}; + if (jnt_no == 1) { + cMtx_XrotM(*calc_mtx, -a_this->field_0x75c); + } else { + cMtx_XrotM(*calc_mtx, (a_this->field_0x75c * 2)); + } -/* 804BB908-804BB910 0000B8 0005+03 1/1 0/0 0/0 .data learn_d$6852 */ -SECTION_DATA static u8 learn_d[5 + 3 /* padding */] = { - 0x01, - 0x02, - 0x04, - 0x08, - 0x10, - /* padding */ - 0x00, - 0x00, - 0x00, -}; + model->setAnmMtx(jnt_no, *calc_mtx); + MTXCopy(*calc_mtx, J3DSys::mCurrentMtx); + } + } + } -/* 804BB910-804BB918 0000C0 0008+00 0/1 0/0 0/0 .data catch_msgn_20$7073 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 catch_msgn_20[8] = { - 0x02, 0xCE, 0x02, 0xD1, 0x02, 0xCF, 0x02, 0xD0, -}; -#pragma pop + return 1; +} -/* 804BB918-804BB920 0000C8 0008+00 0/1 0/0 0/0 .data catch_msgn_21$7074 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 catch_msgn_21[8] = { - 0x02, 0xD2, 0x02, 0xD5, 0x02, 0xD3, 0x02, 0xD4, -}; -#pragma pop +/* 804A98F4-804A99E0 0003F4 00EC+00 1/1 0/0 0/0 .text Worm_nodeCallBack__FP8J3DJointi */ +static int Worm_nodeCallBack(J3DJoint* i_joint, int param_1) { + if (param_1 == 0) { + int jnt_no = i_joint->getJntNo(); + J3DModel* model = j3dSys.getModel(); + dmg_rod_class* a_this = (dmg_rod_class*)model->getUserArea(); -/* 804BB920-804BB928 0000D0 0008+00 0/1 0/0 0/0 .data catch_msgn_22$7075 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 catch_msgn_22[8] = { - 0x02, 0xD7, 0x02, 0xDA, 0x02, 0xD8, 0x02, 0xD9, -}; -#pragma pop + if (a_this != NULL) { + if (jnt_no >= 1 && jnt_no <= 9) { + MTXCopy(model->getAnmMtx(jnt_no), *calc_mtx); + cMtx_YrotM(*calc_mtx, a_this->field_0x103c[jnt_no - 1]); + cMtx_ZrotM(*calc_mtx, a_this->field_0x104e[jnt_no - 1]); + model->setAnmMtx(jnt_no, *calc_mtx); + MTXCopy(*calc_mtx, J3DSys::mCurrentMtx); + } + } + } -/* 804BB928-804BB930 0000D8 0008+00 0/1 0/0 0/0 .data catch_msgn_10$7076 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 catch_msgn_10[8] = { - 0x02, 0xDC, 0x02, 0xDF, 0x02, 0xDD, 0x02, 0xDE, -}; -#pragma pop + return 1; +} -/* 804BB930-804BB938 0000E0 0008+00 0/1 0/0 0/0 .data catch_msgn_11$7077 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 catch_msgn_11[8] = { - 0x02, 0xE0, 0x02, 0xE3, 0x02, 0xE1, 0x02, 0xE2, -}; -#pragma pop +/* 804A99E0-804A9EAC 0004E0 04CC+00 1/0 0/0 0/0 .text dmg_rod_Draw__FP13dmg_rod_class */ +static int dmg_rod_Draw(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + g_env_light.settingTevStruct(0, &actor->current.pos, &actor->tevStr); -/* 804BB938-804BB940 0000E8 0008+00 0/1 0/0 0/0 .data catch_msgn_12$7078 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 catch_msgn_12[8] = { - 0x02, 0xE4, 0x02, 0xE7, 0x02, 0xE5, 0x02, 0xE6, -}; -#pragma pop + if (i_this->kind == MG_ROD_KIND_LURE) { + J3DModel* model = i_this->lure_model[i_this->lure_type]; + + g_env_light.setLightTevColorType_MAJI(model, &actor->tevStr); + mDoExt_modelUpdateDL(model); + g_env_light.setLightTevColorType_MAJI(i_this->ring_model, &actor->tevStr); + mDoExt_modelUpdateDL(i_this->ring_model); + + if (i_this->lure_type != MG_LURE_FR) { + for (int i = 0; i < 2; i++) { + if (i == 1 || i_this->lure_type != MG_LURE_SP) { + g_env_light.setLightTevColorType_MAJI(i_this->hook_model[i], &actor->tevStr); + mDoExt_modelUpdateDL(i_this->hook_model[i]); + } + } + } + + if (i_this->field_0x1148 != 0) { + i_this->field_0x1148--; + } else { + for (int i = 0; i < 15; i++) { + g_env_light.setLightTevColorType_MAJI(i_this->rod_uki_model[i], &actor->tevStr); + mDoExt_modelUpdateDL(i_this->rod_uki_model[i]); + } + + for (int i = 0; i < 6; i++) { + g_env_light.setLightTevColorType_MAJI(i_this->unk_ring_model[i], &actor->tevStr); + mDoExt_modelUpdateDL(i_this->unk_ring_model[i]); + } + } + + static GXColor l_color = {0xFF, 0xFF, 0x96, 0xFF}; + i_this->linemat.update(MG_ROD_LURE_LINE_LEN, l_color, &actor->tevStr); + dComIfGd_set3DlineMat(&i_this->linemat); + + model = i_this->rod_modelMorf->getModel(); + g_env_light.setLightTevColorType_MAJI(model, &actor->tevStr); + i_this->rod_modelMorf->entryDL(); + } else { + if (dComIfGp_checkPlayerStatus0(0, 0x2000)) { + fopAc_ac_c* player = dComIfGp_getPlayer(0); + camera_class* camera = dComIfGp_getCamera(0); + f32 dx = player->current.pos.x - camera->lookat.eye.x; + f32 dz = player->current.pos.z - camera->lookat.eye.z; + + if ((SQUARE(dx) + SQUARE(dz)) < 5000.0f) { + return 1; + } + } + + g_env_light.setLightTevColorType_MAJI(i_this->uki_model, &actor->tevStr); + mDoExt_modelUpdateDL(i_this->uki_model); + g_env_light.setLightTevColorType_MAJI(i_this->uki_saki_model, &actor->tevStr); + mDoExt_modelUpdateDL(i_this->uki_saki_model); + + static GXColor l_color = {0xFF, 0xFF, 0x96, 0xFF}; + i_this->linemat.update(MG_ROD_UKI_LINE_LEN, l_color, &actor->tevStr); + dComIfGd_set3DlineMat(&i_this->linemat); + + for (int i = 0; i < 15; i++) { + g_env_light.setLightTevColorType_MAJI(i_this->rod_uki_model[i], &actor->tevStr); + mDoExt_modelUpdateDL(i_this->rod_uki_model[i]); + } + + if (i_this->action != ACTION_UKI_HIT && i_this->action != ACTION_UKI_CATCH) { + g_env_light.setLightTevColorType_MAJI(i_this->hook_model[i_this->hook_kind], &actor->tevStr); + mDoExt_modelUpdateDL(i_this->hook_model[i_this->hook_kind]); + + if (i_this->esa_kind != 0) { + g_env_light.setLightTevColorType_MAJI(i_this->esa_model[i_this->esa_kind - 1], &actor->tevStr); + + if (i_this->esa_kind == 2) { + i_this->esa_model[i_this->esa_kind - 1]->setUserArea((u32)i_this); + for (u16 i = 0; i < i_this->esa_model[i_this->esa_kind - 1]->getModelData()->getJointNum(); i++) { + if (i >= 1) { + i_this->esa_model[i_this->esa_kind - 1]->getModelData()->getJointNodePointer(i)->setCallBack(Worm_nodeCallBack); + } + } + } + + mDoExt_modelUpdateDL(i_this->esa_model[i_this->esa_kind - 1]); + } + } else if (i_this->action == ACTION_UKI_CATCH) { + fopAc_ac_c* mgfish_a = fopAcM_SearchByID(i_this->mg_fish_id); + mg_fish_class* mgfish = (mg_fish_class*)mgfish_a; + + if (mgfish->mCaughtType == MG_CATCH_SP || mgfish->mCaughtType >= MG_CATCH_ED) { + g_env_light.setLightTevColorType_MAJI(i_this->hook_model[i_this->hook_kind], &actor->tevStr); + mDoExt_modelUpdateDL(i_this->hook_model[i_this->hook_kind]); + } + } + } + + return 1; +} + +/* 804A9EAC-804AAB78 0009AC 0CCC+00 1/1 0/0 0/0 .text rod_control__FP13dmg_rod_class */ +static void rod_control(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0); + int i; + + cXyz sp98; + cXyz sp8C; + cXyz sp80; + cXyz sp74; + cXyz sp68; + csXyz sp30; + s16 spE, spC, spA, sp8; + + cXyz* temp_r28 = i_this->mg_rod.field_0x0; + + if (i_this->kind == MG_ROD_KIND_LURE && (i_this->action == ACTION_LURE_ONBOAT || (i_this->action == ACTION_LURE_STANDBY && i_this->timers[4] != 0))) { + daCanoe_c* boat = (daCanoe_c*)fopAcM_SearchByID(i_this->boat_actor_id); + if (i_this->play_cam_mode >= 950 && i_this->play_cam_mode < 1000) { + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp98.x = -50.0f + AREG_F(0); + sp98.y = -20.0f + AREG_F(1); + sp98.z = -70.0f + AREG_F(2); + MtxPosition(&sp98, &sp8C); + sp8C += player->current.pos; + + MtxTrans(sp8C.x, sp8C.y, sp8C.z, 0); + cMtx_YrotM(*calc_mtx, (player->shape_angle.y + AREG_S(0)) - 30200); + cMtx_XrotM(*calc_mtx, AREG_S(1) - 13000); + } else { + MTXCopy(boat->getModelMtx(), *calc_mtx); + if (boat->checkTandem()) { + MtxTrans(-33.0f + NREG_F(0), 30.0f + NREG_F(1), 115.0f + NREG_F(2), 1); + cMtx_YrotM(*calc_mtx, (NREG_S(0) - 24000)); + } else { + MtxTrans(-30.0f + NREG_F(0), 30.0f + NREG_F(1), 35.0f + NREG_F(2), 1); + cMtx_YrotM(*calc_mtx, NREG_S(0) - 25000); + } + + cMtx_XrotM(*calc_mtx, NREG_S(1) + 0x76C); + cMtx_YrotM(*calc_mtx, JREG_S(3) + 0x20B6); + cMtx_ZrotM(*calc_mtx, JREG_S(5) - 0x4000); + } + + i_this->field_0x6c4 = boat->shape_angle.y + NREG_S(3); + } else { + i_this->field_0x6c4 = daAlink_getAlinkActorClass()->getFishingRodAngleY(); + if (i_this->kind == MG_ROD_KIND_LURE && daAlink_getAlinkActorClass()->checkFishingRodGrabLeft()) { + MTXCopy(daAlink_getAlinkActorClass()->getLeftItemMatrix(), *calc_mtx); + cMtx_YrotM(*calc_mtx, (JREG_S(3) + 0x20B6)); + cMtx_XrotM(*calc_mtx, (JREG_S(4) + 0x8000)); + cMtx_ZrotM(*calc_mtx, (JREG_S(5) - 0x4000)); + } else { + MTXCopy(daAlink_getAlinkActorClass()->getRightItemMatrix(), *calc_mtx); + if (i_this->kind == MG_ROD_KIND_LURE) { + sp8 = 0; + spA = i_this->field_0x6c4 - player->shape_angle.y; + spA = 1000.0f + (spA * (0.2f + NREG_F(10))); + + if (i_this->field_0x14f8 < 0) { + sp8 = i_this->field_0x14f8 * (1.2f + NREG_F(11)); + } + + cMtx_XrotM(*calc_mtx, (JREG_S(4) + spA) - 2000); + cMtx_ZrotM(*calc_mtx, JREG_S(5) + sp8); + } + } + } + + if (i_this->kind == MG_ROD_KIND_LURE) { + MtxTrans(JREG_F(4), 3.0f + JREG_F(5), JREG_F(6), 1); + + J3DModel* model = i_this->rod_modelMorf->getModel(); + model->setBaseTRMtx(*calc_mtx); + + MtxPush(); + i_this->rod_modelMorf->modelCalc(); + MtxPull(); + + sp98.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp98, &i_this->field_0x750); + sp98.set(i_this->field_0x760, 5.0f + DREG_F(8), (-4.5f + DREG_F(9)) - 1.0f); + MtxPosition(&sp98, &i_this->field_0x744); + + MTXCopy(model->getAnmMtx(2), *calc_mtx); + cMtx_XrotM(*calc_mtx, -0x4000); + } else { + cMtx_YrotM(*calc_mtx, (YREG_S(0) - 17000)); + cMtx_XrotM(*calc_mtx, (YREG_S(1) + 0xA134)); + MtxTrans(KREG_F(3), -1.0f + KREG_F(4), -10.0f + KREG_F(5), 1); + } + + sp98.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp98, temp_r28); + MtxTrans(JREG_F(0), JREG_F(1), 16.0f * i_this->field_0x6a0, 1); + + sp98.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp98, &sp68); + sp98 = sp68 - *temp_r28; + + sp30.y = cM_atan2s(sp98.x, sp98.z); + sp30.x = -cM_atan2s(sp98.y, JMAFastSqrt(SQUARE(sp98.x) + SQUARE(sp98.z))); + cMtx_YrotS(*calc_mtx, sp30.y); + cMtx_XrotM(*calc_mtx, sp30.x); + sp98.x = 0.0f; + sp98.y = 0.0f; + sp98.z = 300.0f + YREG_F(0); + MtxPosition(&sp98, &sp80); + sp98 = i_this->mg_line.pos[70] - sp68; + + if (i_this->kind == MG_ROD_KIND_UKI && i_this->action == ACTION_UKI_STANDBY && i_this->field_0x1508 < 0.1f) { + cMtx_YrotS(*calc_mtx, i_this->field_0x6c4); + cMtx_XrotM(*calc_mtx, 6000); + } else { + cMtx_YrotS(*calc_mtx, (s16)cM_atan2s(sp98.x, sp98.z)); + cMtx_XrotM(*calc_mtx, -cM_atan2s(sp98.y, JMAFastSqrt(SQUARE(sp98.x) + SQUARE(sp98.z)))); + } + + sp98.x = 0.0f; + sp98.y = 0.0f; + sp98.z = i_this->field_0x6f8 * (3.0f + YREG_F(1)); + MtxPosition(&sp98, &sp74); + + sp98.x = 0.0f; + sp98.y = 0.0f; + sp98.z = i_this->field_0x6a0 * i_this->field_0x6a4; + + temp_r28++; + for (i = 1; i < 16; i++, temp_r28++) { + static f32 rod_p[] = { + 0.0f, + 0.002915448f, + 0.023323584f, + 0.045553874f, + 0.078717098f, + 0.124999836f, + 0.15374433f, + 0.18658867f, + 0.22380619f, + 0.2656702f, + 0.31245404f, + 0.36443099f, + 0.48505768f, + 0.62973678f, + 0.80065495f, + 0.99999869f, + }; + + f32 temp_f29 = rod_p[i]; + f32 temp_f31 = sp80.x + ((temp_r28[0].x - temp_r28[-1].x) + (sp74.x * temp_f29)); + f32 temp_f26 = sp80.y + ((temp_r28[0].y - temp_r28[-1].y) + (sp74.y * temp_f29)); + f32 temp_f30 = sp80.z + ((temp_r28[0].z - temp_r28[-1].z) + (sp74.z * temp_f29)); + + spC = (s16)cM_atan2s(temp_f31, temp_f30); + spE = -cM_atan2s(temp_f26, JMAFastSqrt(SQUARE(temp_f31) + SQUARE(temp_f30))); + cMtx_YrotS(*calc_mtx, spC); + cMtx_XrotM(*calc_mtx, spE); + MtxPosition(&sp98, &sp8C); + + temp_r28[0].x = temp_r28[-1].x + sp8C.x; + temp_r28[0].y = temp_r28[-1].y + sp8C.y; + temp_r28[0].z = temp_r28[-1].z + sp8C.z; + + if (i == 15) { + i_this->field_0x6b8 = i_this->field_0x6ac; + i_this->field_0x6ac = *temp_r28; + } else if (i == 1) { + i_this->field_0x6d4 = i_this->field_0x6c8; + i_this->field_0x6c8 = *temp_r28; + } + } + + if (i_this->kind == MG_ROD_KIND_UKI) { + temp_r28 = i_this->mg_rod.field_0x0; + for (i = 0; i < 15; i++, temp_r28++) { + sp98 = temp_r28[1] - temp_r28[0]; + + mDoMtx_stack_c::transS(temp_r28->x, temp_r28->y, temp_r28->z); + mDoMtx_stack_c::YrotM(cM_atan2s(sp98.x, sp98.z)); + mDoMtx_stack_c::XrotM(NREG_S(6) + -cM_atan2s(sp98.y, JMAFastSqrt(SQUARE(sp98.x) + SQUARE(sp98.z)))); + + static u8 rod_wd[] = { + 15, + 15, + 15, + 13, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 2, + }; + + f32 temp_f28 = rod_wd[i] * (0.05166f + NREG_F(3)); + mDoMtx_stack_c::scaleM(temp_f28, temp_f28, (0.073f + NREG_F(1)) * sp98.abs()); + + if (i == 0) { + mDoMtx_stack_c::scaleM(1.0f, 1.0f, 0.5f + NREG_F(4)); + mDoMtx_stack_c::transM(0.0f, 0.0f, -5.5f + NREG_F(5)); + } + + i_this->rod_uki_model[i]->setBaseTRMtx(mDoMtx_stack_c::get()); + } + } else { + temp_r28 = i_this->mg_rod.field_0x0; + for (i = 0; i < 15; i++, temp_r28++) { + sp98 = temp_r28[1] - temp_r28[0]; + + mDoMtx_stack_c::transS(temp_r28->x, temp_r28->y, temp_r28->z); + mDoMtx_stack_c::YrotM(cM_atan2s(sp98.x, sp98.z)); + mDoMtx_stack_c::XrotM(NREG_S(6) + -cM_atan2s(sp98.y, JMAFastSqrt(SQUARE(sp98.x) + SQUARE(sp98.z)))); + + static u8 rod_wd[] = { + 10, + 9, + 9, + 8, + 8, + 7, + 7, + 6, + 6, + 5, + 5, + 4, + 4, + 3, + 3, + }; + + f32 temp_f28 = rod_wd[i] * (0.05166f + NREG_F(3)); + mDoMtx_stack_c::scaleM(temp_f28, temp_f28, (0.073f + NREG_F(1)) * sp98.abs()); + + i_this->rod_uki_model[i]->setBaseTRMtx(mDoMtx_stack_c::get()); + } + } +} + +/* 804AAB78-804AAB98 001678 0020+00 1/1 0/0 0/0 .text rod_main__FP13dmg_rod_class */ +static void rod_main(dmg_rod_class* i_this) { + rod_control(i_this); +} + +UNK_REL_BSS; + +/* 804BBBD0-804BBBD4 000048 0004+00 6/9 0/0 0/0 .bss henna */ +static npc_henna_class* henna; + +/* 804BBBD4 0001+00 data_804BBBD4 None */ +static u8 data_804BBBD4; +static u8 l_HIOInit; + +/* 804BBBE4-804BBC0C 00005C 0028+00 1/6 0/0 0/0 .bss l_HIO */ +static dmg_rod_HIO_c l_HIO; + +/* 804BBC18-804BC0C8 000090 04B0+00 3/4 0/0 0/0 .bss old_line_pos */ +static cXyz old_line_pos[100]; + +/* 804AAB98-804AB01C 001698 0484+00 1/1 0/0 0/0 .text line_control1__FP13dmg_rod_class */ +static void line_control1(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + int i; + + cXyz sp4C; + cXyz sp40; + Vec sp34; + dBgS_GndChk sp6C; + cM3dGPla sp58; + cXyz sp28; + + if (i_this->field_0x6e0 > 0.1f) { + sp4C = i_this->mg_rod.field_0x0[14] - i_this->mg_rod.field_0x0[12]; + cMtx_YrotS(*calc_mtx, cM_atan2s(sp4C.x, sp4C.z)); + cMtx_XrotM(*calc_mtx, -cM_atan2s(sp4C.y, JMAFastSqrt(SQUARE(sp4C.x) + SQUARE(sp4C.z)))); + + sp4C.x = 0.0f; + sp4C.y = 0.0f; + sp4C.z = i_this->field_0x6e0 * (500.0f + NREG_F(7)); + MtxPosition(&sp4C, &sp28); + cLib_addCalc0(&i_this->field_0x6e0, 1.0f, 0.2f + NREG_F(8)); + } else { + sp28.set(0.0f, 0.0f, 0.0f); + } + + if (i_this->action == ACTION_LURE_STANDBY && i_this->timers[0] != 0) { + cMtx_YrotS(*calc_mtx, i_this->field_0x6c4); + cMtx_XrotM(*calc_mtx, (NREG_S(7) - 21500)); + + sp4C.x = 0.0f; + sp4C.y = 0.0f; + sp4C.z = 1000.0f + NREG_F(17); + MtxPosition(&sp4C, &sp28); + } + + cXyz* temp_r30 = i_this->mg_line.pos; + *temp_r30 = i_this->field_0x6ac; + + sp4C.x = 0.0f; + sp4C.y = 0.0f; + sp4C.z = i_this->field_0xf5c; + + temp_r30++; + + BOOL sp10 = 1; + if (i_this->kind == MG_ROD_KIND_LURE && (i_this->action == ACTION_LURE_ACTION || i_this->action == ACTION_LURE_CAST || i_this->action == ACTION_LURE_HIT || i_this->action == ACTION_LURE_ONBOAT || i_this->action == ACTION_LURE_STANDBY)) { + sp10 = 0; + } + + f32 var_f31 = i_this->field_0xf64; + + for (i = 1; i < 100; i++, temp_r30++) { + f32 temp_f29 = sp28.x + (temp_r30[0].x - temp_r30[-1].x); + f32 temp_f28 = sp28.z + (temp_r30[0].z - temp_r30[-1].z); + f32 var_f26; + + if (sp10 != 0) { + sp34.x = temp_r30->x; + sp34.y = 50.0f + temp_r30->y; + sp34.z = temp_r30->z; + sp6C.SetPos(&sp34); + + f32 var_f30 = KREG_F(7) + (2.0f + dComIfG_Bgsp().GroundCross(&sp6C)); + if (var_f30 < i_this->field_0x590) { + var_f30 = i_this->field_0x590; + } + + f32 var_f27 = sp28.y + (temp_r30[0].y + var_f31); + if (var_f27 < var_f30) { + var_f27 = var_f30; + } + + var_f26 = var_f27 - temp_r30[-1].y; + } else { + var_f31 = (0.5f + TREG_F(5)) * ((2.0f + i_this->field_0x590) - temp_r30[0].y); + if (var_f31 < i_this->field_0xf64) { + var_f31 = i_this->field_0xf64; + } else if (var_f31 > 0.25f) { + var_f31 = 0.25f; + } + + if (i_this->lure_type == MG_LURE_SP && var_f31 > 0.0f) { + var_f31 = JREG_F(11); + } + + var_f26 = sp28.y + (var_f31 + (temp_r30[0].y - temp_r30[-1].y)); + } + + s16 spA, sp8; + sp8 = (s16)cM_atan2s(temp_f29, temp_f28); + spA = -cM_atan2s(var_f26, JMAFastSqrt(SQUARE(temp_f29) + SQUARE(temp_f28))); + + cMtx_YrotS(*calc_mtx, sp8); + cMtx_XrotM(*calc_mtx, spA); + MtxPosition(&sp4C, &sp40); + + old_line_pos[i] = *temp_r30; + + temp_r30[0].x = temp_r30[-1].x + sp40.x; + temp_r30[0].y = temp_r30[-1].y + sp40.y; + temp_r30[0].z = temp_r30[-1].z + sp40.z; + + if (i == 99) { + i_this->field_0x764 = *temp_r30; + } + } +} + +/* 804AB064-804AB588 001B64 0524+00 1/1 0/0 0/0 .text line_control2__FP13dmg_rod_class */ +static void line_control2(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + int i; + + cXyz sp34; + cXyz sp28; + Vec sp1C; + dBgS_GndChk spD8; + cM3dGPla sp54; + + i_this->mg_line.pos[99] = i_this->field_0x1010; + + cXyz* var_r28 = &i_this->mg_line.pos[98]; + sp34.x = 0.0f; + sp34.y = 0.0f; + sp34.z = i_this->field_0xf5c; + + for (i = 98; i >= 1; i--, var_r28--) { + f32 temp_f30 = (var_r28[0].x - var_r28[1].x) + i_this->field_0xc20[i + TREG_S(9)]; + f32 temp_f29 = (var_r28[0].z - var_r28[1].z) + i_this->field_0xdb0[i + TREG_S(9)]; + + sp1C.x = var_r28->x; + sp1C.y = 50.0f + var_r28->y; + sp1C.z = var_r28->z; + spD8.SetPos(&sp1C); + + f32 var_f31; + if (dComIfG_Bgsp().GetTriPla(spD8, &sp54) && cBgW_CheckBGround(sp54.mNormal.y)) { + var_f31 = KREG_F(7) + (2.0f + dComIfG_Bgsp().GroundCross(&spD8)); + } else if (i_this->lure_type == MG_LURE_SP) { + var_f31 = i_this->field_0x590 - 1000.0f; + } else { + var_f31 = i_this->field_0x590; + } + + f32 var_f28 = var_r28[0].y; + if (var_f28 < var_f31) { + var_f28 = var_f31; + } + + f32 sp14 = var_f28 - var_r28[1].y; + + s16 spA, sp8; + sp8 = (s16)cM_atan2s(temp_f30, temp_f29); + spA = -cM_atan2s(sp14, JMAFastSqrt(SQUARE(temp_f30) + SQUARE(temp_f29))); + + cMtx_YrotS(*calc_mtx, sp8); + cMtx_XrotM(*calc_mtx, spA); + MtxPosition(&sp34, &sp28); + var_r28[0].x = var_r28[1].x + sp28.x; + var_r28[0].y = var_r28[1].y + sp28.y; + var_r28[0].z = var_r28[1].z + sp28.z; + } + + if (i_this->lure_type != MG_LURE_SP && i_this->action == ACTION_LURE_ACTION && i_this->field_0x100d != 0) { + dBgS_LinChk sp68; + cM3dGPla sp40; + sp68.SetRope(); + + for (i = 1; i < 99; i++) { + sp68.Set(&old_line_pos[i], &i_this->mg_line.pos[i], actor); + if (dComIfG_Bgsp().LineCross(&sp68)) { + dComIfG_Bgsp().GetTriPla(sp68, &sp40); + + sp34.x = sp40.GetNP()->x; + sp34.z = sp40.GetNP()->z; + cMtx_YrotS(*calc_mtx, cM_atan2s(sp34.x, sp34.z)); + + sp34.x = 0.0f; + sp34.y = 0.0f; + sp34.z = 5.0f + YREG_F(18); + MtxPosition(&sp34, &sp28); + + f32 temp_f27 = (0.1f * sp28.x) + sp68.GetCross().x; + f32 temp_f26 = (0.1f * sp28.z) + sp68.GetCross().z; + f32 temp_f25 = i_this->mg_line.pos[i - 1].x - temp_f27; + f32 temp_f24 = i_this->mg_line.pos[i - 1].z - temp_f26; + if (JMAFastSqrt(SQUARE(temp_f25) + SQUARE(temp_f24)) < 100.0f + nREG_F(6)) { + i_this->mg_line.pos[i].x = temp_f27; + i_this->mg_line.pos[i].z = temp_f26; + } + + i_this->field_0xc20[i] = sp28.x; + i_this->field_0xdb0[i] = sp28.z; + + for (int sp10 = i - 3; sp10 < i + 3; sp10++) { + if (sp10 >= 1 && sp10 < 99) { + i_this->field_0xc20[sp10] = sp28.x; + i_this->field_0xdb0[sp10] = sp28.z; + } + } + } else { + if (fabsf(i_this->field_0xc20[i]) > 0.05f || fabsf(i_this->field_0xdb0[i]) > 0.05f) { + i_this->field_0xc20[i] *= 0.95f; + i_this->field_0xdb0[i] *= 0.95f; + actor->current.pos.x += (0.02f + TREG_F(17)) * i_this->field_0xc20[i]; + actor->current.pos.z += (0.02f + TREG_F(17)) * i_this->field_0xdb0[i]; + cLib_addCalcAngleS2(&i_this->field_0xffe, 0, 2, 20); + + cMtx_YrotS(*calc_mtx, actor->current.angle.y); + sp34.x = 0.0f; + sp34.y = 0.0f; + sp34.z = 0.1f + TREG_F(16); + MtxPosition(&sp34, &sp28); + actor->current.pos += sp28; + } else { + i_this->field_0xdb0[i] = 0.0f; + i_this->field_0xc20[i] = 0.0f; + } + } + } + } +} + +/* 804AB588-804ABCE0 002088 0758+00 1/1 0/0 0/0 .text line_control1_u__FP13dmg_rod_class + */ +static void line_control1_u(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + int i; + + cXyz sp98; + cXyz sp8C; + Vec sp80; + dBgS_GndChk spA4; + cXyz sp74(0.0f, 0.0f, 0.0f); + + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp98.x = 0.0f; + sp98.y = i_this->field_0x6e0 * (20.0f + BREG_F(8)); + sp98.z = i_this->field_0x6e0 * (30.0f + BREG_F(9)); + MtxPosition(&sp98, &sp74); + sp74.y += i_this->field_0x6e4; + + cLib_addCalc0(&i_this->field_0x6e4, 1.0f, 3.0f + ZREG_F(17)); + + cXyz* temp_r28 = i_this->mg_line.pos; + *temp_r28 = i_this->field_0x6ac; + + f32 sp4C, sp48, sp44, sp40; + f32 sp3C, sp38; + + if (i_this->action == ACTION_UKI_CATCH) { + fopAc_ac_c* mg_fish = fopAcM_SearchByID(i_this->mg_fish_id); + f32 sp30 = i_this->play_cam_timer * 2; + if (sp30 > 300.0f) { + sp30 = 300.0f; + } + temp_r28[0].y = 700.0f + mg_fish->current.pos.y + sp30; + } + + sp98.x = 0.0f; + sp98.y = 0.0f; + sp98.z = i_this->field_0xf5c; + + temp_r28++; + + f32 sp2C; + f32 sp28 = i_this->field_0xf64; + f32 sp24 = i_this->field_0xf68; + if (i_this->hook_kind == 1) { + sp28 *= 1.5f; + sp24 *= 1.5f; + } + + cXyz sp68; + f32 sp20; + dKyw_get_AllWind_vec(&i_this->hook_pos, &sp68, &sp20); + + if (sp20 < 0.4f) { + sp20 = 0.0f; + } else { + sp20 -= 0.4f; + if (sp20 > 1.0f) { + sp20 = 1.0f; + } + } + + f32 sp1C, sp18, sp14; + if (sp20 > 0.01f) { + sp20 *= 40.0f; + sp1C = sp68.x * sp20; + sp18 = sp68.z * sp20; + + if ((i_this->field_0x578 & 15) == 0) { + i_this->field_0x109e = 2000.0f + (60.0f * sp20) + cM_rndF(60.0f * sp20); + } + + i_this->field_0x109c += i_this->field_0x109e; + } else { + sp68.z = 0.0f; + sp68.y = 0.0f; + sp68.x = 0.0f; + } + + cXyz sp5C; + int sp10 = 0; + fopAcM_getWaterStream(&actor->current.pos, i_this->acchcir, &sp5C, &sp10, 0); + + for (i = 1; i < 100; i++, temp_r28++) { + if (sp20 > 0.01f && temp_r28[0].y > (20.0f + i_this->field_0x590)) { + sp14 = 0.1f + (0.003f * i); + sp68.x = sp1C * (1.0f + (sp14 * cM_ssin(i_this->field_0x109c - (i * 600)))); + sp68.y = JREG_F(7) * (sp20 * (sp14 * cM_ssin(i_this->field_0x109c - (i * 650)))); + sp68.z = sp18 * (1.0f + (sp14 * cM_ssin(i_this->field_0x109c - (i * 630)))); + } else { + if (sp10 != 0) { + sp68.x = sp10 * (0.5f * sp5C.x); + sp68.z = sp10 * (0.5f * sp5C.z); + } else { + sp68.z = 0.0f; + sp68.x = 0.0f; + } + sp68.y = 0.0f; + } + + sp4C = sp68.x + (sp74.x + (temp_r28[0].x - temp_r28[-1].x)); + sp44 = sp68.z + (sp74.z + (temp_r28[0].z - temp_r28[-1].z)); + + sp80.x = temp_r28[0].x; + sp80.y = 50.0f + temp_r28[0].y; + sp80.z = temp_r28[0].z; + spA4.SetPos(&sp80); + + sp3C = KREG_F(7) + (2.0f + dComIfG_Bgsp().GroundCross(&spA4)); + if (i >= 50 && i <= 90) { + f32 var_f31 = (0.07f + KREG_F(9)) * (20.0f - fabsf(i - 70.0f)); + if (var_f31 > 1.0f) { + var_f31 = 1.0f; + } + var_f31 *= var_f31; + sp2C = AREG_F(14) + (5.0f + (i_this->field_0x590 + (i_this->field_0xf74 * var_f31))); + } else { + sp2C = 5.0f + i_this->field_0x590 + AREG_F(14); + } + + sp38 = ((0.5f + TREG_F(5)) * (sp2C - temp_r28[0].y)) - 0.25f; + if (sp38 < sp28) { + sp38 = sp28; + } else if (sp38 > 2.0f) { + sp38 = 2.0f; + } + + if (i >= (TREG_S(9) + BREG_S(5) + 71) && temp_r28[0].y < sp2C) { + f32 temp_f31 = (0.02f + VREG_F(3)) * (AREG_S(7) + (i - (TREG_S(9) + BREG_S(5) + 61))); + sp38 = sp24 * (temp_f31 * temp_f31); + } + + sp40 = sp68.y + (sp74.y + (temp_r28[0].y + sp38)); + + if ((sp40 <= sp2C || sp40 <= sp3C) && (i == (TREG_S(9) + BREG_S(6) + 72))) { + cLib_addCalc0(&i_this->field_0x6e0, 1.0f, 0.08f + BREG_F(19)); + } + + if (sp40 <= sp3C) { + sp40 = sp3C; + if (i == 99 && sp40 > sp2C) { + i_this->field_0x102e = 1; + } + } + + sp48 = (sp40 - temp_r28[-1].y); + + s16 spA, sp8; + sp8 = (s16)cM_atan2s(sp4C, sp44); + spA = -cM_atan2s(sp48, JMAFastSqrt(SQUARE(sp4C) + SQUARE(sp44))); + + cMtx_YrotS(*calc_mtx, sp8); + cMtx_XrotM(*calc_mtx, spA); + MtxPosition(&sp98, &sp8C); + temp_r28[0].x = temp_r28[-1].x + sp8C.x; + temp_r28[0].y = temp_r28[-1].y + sp8C.y; + temp_r28[0].z = temp_r28[-1].z + sp8C.z; + + if (i == 99) { + i_this->field_0x764 = *temp_r28; + } + } +} + +/* 804ABCE0-804ABED8 0027E0 01F8+00 2/2 0/0 0/0 .text line_control2_u__FP13dmg_rod_class + */ +static void line_control2_u(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + int i; + cXyz sp30; + cXyz sp24; + Vec sp18; + s16 spA, sp8; + dBgS_GndChk sp3C; + + i_this->mg_line.pos[99] = actor->current.pos; + cXyz* var_r31 = &i_this->mg_line.pos[98]; + + sp30.x = 0.0f; + sp30.y = 0.0f; + sp30.z = i_this->field_0xf5c; + + for (i = 98; i >= 1; i--, var_r31--) { + f32 temp_f31 = var_r31[0].x - var_r31[1].x; + f32 var_f28; + f32 temp_f30 = var_r31[0].z - var_r31[1].z; + + if (i_this->action == ACTION_UKI_STANDBY) { + sp18.x = var_r31->x; + sp18.y = 50.0f + var_r31->y; + sp18.z = var_r31->z; + sp3C.SetPos(&sp18); + + f32 temp_f27 = KREG_F(7) + (2.0f + dComIfG_Bgsp().GroundCross(&sp3C)); + f32 var_f29 = var_r31->y; + if (var_f29 < temp_f27) { + var_f29 = temp_f27; + } + var_f28 = var_f29 - var_r31[1].y; + } else { + var_f28 = var_r31[0].y - var_r31[1].y; + } + + sp8 = (s16)cM_atan2s(temp_f31, temp_f30); + spA = -cM_atan2s(var_f28, JMAFastSqrt(SQUARE(temp_f31) + SQUARE(temp_f30))); + + cMtx_YrotS(*calc_mtx, sp8); + cMtx_XrotM(*calc_mtx, spA); + MtxPosition(&sp30, &sp24); + var_r31[0].x = var_r31[1].x + sp24.x; + var_r31[0].y = var_r31[1].y + sp24.y; + var_r31[0].z = var_r31[1].z + sp24.z; + } +} + +/* 804ABED8-804ABFA4 0029D8 00CC+00 1/1 0/0 0/0 .text line_main__FP13dmg_rod_class */ +static void line_main(dmg_rod_class* i_this) { + if (i_this->kind == MG_ROD_KIND_LURE && i_this->action != ACTION_LURE_CATCH && i_this->action == ACTION_LURE_HIT && (i_this->reel_btn_flags != 0 || mDoCPd_c::getHoldX(PAD_1))) { + cLib_addCalc2(&i_this->field_0xf5c, 0.5f, 1.0f, 0.1f + YREG_F(11)); + } + + if (i_this->kind == MG_ROD_KIND_LURE) { + line_control1(i_this); + i_this->field_0x760 = 2.0f * cM_ssin(i_this->field_0x75e); + } else { + line_control1_u(i_this); + } +} + +/* 804ABFA4-804AC04C 002AA4 00A8+00 2/2 0/0 0/0 .text depth_check__FP13dmg_rod_classP4cXyz */ +static f32 depth_check(dmg_rod_class* i_this, cXyz* param_1) { + dBgS_GndChk sp14; + Vec sp8; + + sp8.x = param_1->x; + sp8.y = 50.0f + i_this->field_0x590; + sp8.z = param_1->z; + sp14.SetPos(&sp8); + + f32 temp_f31 = i_this->field_0x590 - dComIfG_Bgsp().GroundCross(&sp14); + return temp_f31; +} + +/* 804AC04C-804AC1C0 002B4C 0174+00 1/1 0/0 0/0 .text sibuki_set__FP13dmg_rod_classfP4cXyzi */ +static void sibuki_set(dmg_rod_class* i_this, f32 i_size, cXyz* i_pos, BOOL param_3) { + fopAc_ac_c* actor = &i_this->actor; + + if (i_this->field_0x1165 == 0 && (param_3 || i_this->field_0x590 - i_pos->y < 20.0f) && depth_check(i_this, i_pos) > 0.0f) { + cXyz pos(*i_pos); + pos.y = i_this->field_0x590; + + static cXyz sc(i_size, i_size, i_size); + + for (int i = 0; i < 4; i++) { + static u16 w_eff_id[] = {0x01B8, 0x01B9, 0x01BA, 0x01BB}; + i_this->sibuki_eff[i] = dComIfGp_particle_set(i_this->sibuki_eff[i], w_eff_id[i], &pos, &actor->tevStr, NULL, &sc, 0xFF, NULL, -1, NULL, NULL, NULL); + } + } +} + +/* 804AC1C0-804AC228 002CC0 0068+00 1/1 0/0 0/0 .text s_boat_sub__FPvPv */ +static void* s_boat_sub(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_CANOE) { + cXyz spC = ((fopAc_ac_c*)i_actor)->current.pos - ((fopAc_ac_c*)i_data)->current.pos; + return i_actor; + } + + return NULL; +} + +/* 804AC228-804AC41C 002D28 01F4+00 1/1 0/0 0/0 .text lure_onboat__FP13dmg_rod_class */ +static void lure_onboat(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp20; + cXyz sp14; + + i_this->field_0x100d = 0; + + if (fopAcM_SearchByID(i_this->boat_actor_id) == NULL) { + fopAcM_delete(actor); + return; + } + + if (mDoCPd_c::getTrigB(PAD_1)) { + i_this->timers[1] = 30; + i_this->field_0x146c = 30; + } + + if (i_this->field_0x146c == 0 && !dComIfGp_checkPlayerStatus0(0, 0x2000)) { + dComIfGp_setAStatusForce(79, 2); + } + + i_this->field_0xf64 = -30.0f + KREG_F(8); + i_this->field_0xf5c = 0.125f + BREG_F(2); + i_this->field_0x6f8 = 15.0f + BREG_F(4); + actor->current.pos = i_this->field_0x764; + + sp20 = i_this->field_0x6ac - actor->current.pos; + actor->current.angle.x = -cM_atan2s(sp20.y, sp20.z); + actor->current.angle.y = cM_atan2s(sp20.x, JMAFastSqrt(SQUARE(sp20.y) + SQUARE(sp20.z))); + + if (daAlink_getAlinkActorClass()->checkFishingRodGrab(actor)) { + i_this->action = ACTION_LURE_STANDBY; + i_this->timers[4] = WREG_S(2) + 8; + i_this->field_0xf5c = 0.5f; + i_this->play_cam_mode = 1; + i_this->timers[0] = 0; + i_this->timers[1] = 10; + i_this->field_0x14f8 = 0; + + camera_class* camera = dComIfGp_getCamera(0); + i_this->field_0x1418 = cM_atan2s(camera->lookat.center.x - camera->lookat.eye.x, camera->lookat.center.z - camera->lookat.eye.z); + + daAlink_getAlinkActorClass()->setCanoeFishingWaitAngle(i_this->field_0x1418); + daAlink_getAlinkActorClass()->seStartOnlyReverb(Z2SE_AL_ROD_TAKEOUT); + } +} + +/* 804AC41C-804ACB94 002F1C 0778+00 1/1 0/0 0/0 .text lure_standby__FP13dmg_rod_class */ +static int lure_standby(dmg_rod_class* i_this) { + fopAc_ac_c* actor = (fopAc_ac_c*)&i_this->actor; + fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0); + cXyz sp70; + cXyz sp64; + + int sp14 = 0; + int sp10 = 0; + i_this->field_0x10a6 = 0; + i_this->field_0x100d = 0; + + if (daAlink_getAlinkActorClass()->checkCanoeFishingRodGrabOrPut()) { + i_this->field_0x146c = 5; + } + + f32 var_f30 = 0.3f + BREG_F(5); + if (i_this->timers[4] != 0) { + var_f30 = 0.275f; + } + cLib_addCalc2(&i_this->field_0xf5c, var_f30, 1.0f, 1.0f + BREG_F(3)); + + i_this->field_0xf64 = -30.0f + KREG_F(8); + actor->current.pos = i_this->field_0x764; + + sp70 = i_this->field_0x6ac - actor->current.pos; + actor->current.angle.x = -cM_atan2s(sp70.y, sp70.z); + actor->current.angle.y = cM_atan2s(sp70.x, JMAFastSqrt(SQUARE(sp70.y) + SQUARE(sp70.z))); + + if (i_this->timers[1] != 0) { + i_this->field_0x14f8 = -7000; + daAlink_getAlinkActorClass()->setFishingArnmAngle(i_this->field_0x14f8); + return sp14; + } + + if (data_804BBBD4 != 0) { + dComIfGp_setDoStatusForce(4, 0); + } else { + dComIfGp_setDoStatusForce(42, 0); + } + + i_this->rod_stick_x = mDoCPd_c::getStickX3D(PAD_1) * mDoCPd_c::getStickX3D(PAD_1); + if (mDoCPd_c::getStickX3D(PAD_1) < 0.0f) { + i_this->rod_stick_x *= -1.0f; + } + + if (i_this->rod_stick_x > 1.0f) { + i_this->rod_stick_x = 1.0f; + } else if (i_this->rod_stick_x < -1.0f) { + i_this->rod_stick_x = -1.0f; + } + + s16 sp8 = (i_this->rod_substick_y * (-14000.0f + JREG_F(18))) - 7000.0f; + if (sp8 > 7000) { + sp8 = 7000; + } else if (sp8 < -7000) { + sp8 = -7000; + } + + cLib_addCalcAngleS2(&i_this->field_0x14f8, sp8, 2, (JREG_S(9) + 4000)); + + if (i_this->prev_rod_substick_y < 0.0f) { + if ((i_this->rod_substick_y - i_this->prev_rod_substick_y) >= 0.5f) { + sp10 = 1; + i_this->cast_power = fabsf(i_this->prev_rod_substick_y); + i_this->cast_power *= i_this->cast_power; + if (i_this->cast_power < 0.6f) { + i_this->cast_power = 0.6f; + } + } + } + + daAlink_getAlinkActorClass()->setFishingArnmAngle(i_this->field_0x14f8); + sp70 = actor->current.pos - actor->old.pos; + + f32 temp_f29 = (0.005f + NREG_F(9)) * sp70.abs(); + if (temp_f29 > (0.4f + NREG_F(8))) { + i_this->field_0x6e0 = temp_f29; + if (i_this->field_0x6e0 > 1.0f) { + i_this->field_0x6e0 = 1.0f; + } + } + + if (i_this->timers[0] != 0) { + i_this->field_0x6e0 = 1.0f + XREG_F(11); + + if (i_this->timers[0] == 3) { + dComIfGp_getVibration().StartShock(3, 1, cXyz(0.0f, 1.0f, 0.0f)); + } + + if (i_this->field_0x6e8 != 0) { + cMtx_YrotS(*calc_mtx, i_this->field_0x6c4); + + if (i_this->field_0x6e8 == 1) { + sp70.x = -100.0f + hREG_F(1); + } else { + sp70.x = 100.0f + hREG_F(6); + } + + sp70.y = hREG_F(2); + sp70.z = hREG_F(3); + MtxPosition(&sp70, &sp64); + actor->current.pos = sp64 + player->eyePos; + sp14 = 1; + } + + if (i_this->timers[0] == 1) { + daAlink_getAlinkActorClass()->setCanoeCast(); + i_this->action = ACTION_LURE_CAST; + i_this->field_0x10a8 = 0; + i_this->play_cam_timer = 0; + + actor->current.angle.y = i_this->field_0x6c4 + NREG_S(6) + 0x7E0C; + OS_REPORT(" CAST POWER %f\n", i_this->cast_power); + + f32 var_f31 = i_this->cast_power; + if (var_f31 > 1.0f) { + var_f31 = 1.0f; + } + actor->speedF = (-40.0f + JREG_F(13)) * var_f31; + + cMtx_YrotS(*calc_mtx, actor->current.angle.y); + + if (i_this->field_0x6e8 != 0) { + actor->speed.y = 25.0f + JREG_F(14); + sp70.x = 0.0f; + sp70.y = WREG_F(15); + sp70.z = WREG_F(16); + + if (i_this->field_0x6e8 == 1) { + i_this->field_0x14fa = -5000; + } else { + i_this->field_0x14fa = 5000; + } + } else { + actor->speed.y = 35.0f + JREG_F(14); + sp70.x = 0.0f; + sp70.y = 50.0f + WREG_F(5); + sp70.z = -50.0f + WREG_F(6); + i_this->field_0x14fa = 0; + } + + MtxPosition(&sp70, &sp64); + actor->current.pos += sp64; + + i_this->field_0x1410 = 0.05f + ZREG_F(11); + i_this->field_0xf64 = KREG_F(8); + i_this->field_0x14f8 = XREG_S(8) - 5000; + i_this->field_0x594 = 0.0f; + i_this->field_0x6e0 = 0.0f; + } + } else if (sp10 != 0) { + if (sp10 == 1) { + i_this->timers[0] = XREG_S(7) + 5; + } else { + i_this->timers[0] = XREG_S(7) + 4; + } + + daAlink_getAlinkActorClass()->seStartOnlyReverb(Z2SE_AL_ROD_SWING_LURE); + daAlink_getAlinkActorClass()->seStartOnlyReverb(Z2SE_AL_REEL_ROLL_THROW); + i_this->field_0x1514 = 30; + } else if (i_this->field_0x14f8 < 5000) { + dComIfGp_setCStickStatusForce(80, 2, 0); + } + + i_this->field_0x6f8 = (500.0f + NREG_F(19)) * i_this->field_0x6e0; + + if (!daAlink_getAlinkActorClass()->checkFishingRodGrab(actor)) { + i_this->action = ACTION_LURE_ONBOAT; + i_this->play_cam_mode = 0; + + camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + camera->mCamera.Reset(i_this->play_cam_center, i_this->play_cam_eye, i_this->play_cam_fovy, 0); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + + dMw_onMenuRing(); + daAlink_getAlinkActorClass()->seStartOnlyReverb(Z2SE_AL_ROD_TAKEOUT); + i_this->timers[1] = 30; + i_this->field_0x146c = 5; + } + + return sp14; +} + +/* 804ACB94-804ACC1C 003694 0088+00 2/2 0/0 0/0 .text lure_bound_se_set__FP13dmg_rod_class */ +static void lure_bound_se_set(dmg_rod_class* i_this) { + if (i_this->lure_type != MG_LURE_FR) { + if (i_this->lure_type == MG_LURE_SP) { + i_this->sound.startCreatureSound(Z2SE_AL_LURE_BOUND, 0, -1); + } else { + i_this->sound.startCreatureSound(Z2SE_AL_LURE_BOUND_WOOD, 0, -1); + } + } +} + +/* 804ACC1C-804AD46C 00371C 0850+00 1/1 0/0 0/0 .text lure_cast__FP13dmg_rod_class */ +static void lure_cast(dmg_rod_class* i_this) { + fopAc_ac_c* actor = (fopAc_ac_c*)&i_this->actor; + fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0); + cXyz sp4C; + cXyz sp40; + + if (!daAlink_getAlinkActorClass()->checkFishingRodGrab(actor)) { + i_this->action = ACTION_LURE_ONBOAT; + i_this->play_cam_mode = 0; + + camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + camera->mCamera.Reset(i_this->play_cam_center, i_this->play_cam_eye, i_this->play_cam_fovy, 0); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + + dMw_onMenuRing(); + return; + } + + cLib_addCalcAngleS2(&i_this->field_0x14f8, (VREG_S(5) - 7000), 8, (VREG_S(6) + 200)); + daAlink_getAlinkActorClass()->setFishingArnmAngle(i_this->field_0x14f8); + + sp4C = actor->current.pos - i_this->field_0x6ac; + + if (i_this->reel_btn_flags != 0) { + actor->speedF *= 0.95f + VREG_F(11); + sp40.x = 50.0f + VREG_F(12); + sp40.y = (0.0105f + TREG_F(10)) * sp4C.abs(); + i_this->field_0x75c += 0x1100; + i_this->field_0x75e += 0x880; + } else { + sp40.x = 0.0f; + sp40.y = (0.011f + TREG_F(11)) * sp4C.abs(); + i_this->field_0x75c += 0x2200; + i_this->field_0x75e += 0x1100; + } + + cLib_addCalc2(&i_this->field_0x6f8, sp40.x, 0.1f, 5.0f); + cLib_addCalc2(&i_this->field_0xf5c, sp40.y, 1.0f, 1.5f + YREG_F(13)); + + cMtx_YrotS(*calc_mtx, actor->current.angle.y); + sp4C.x = 0.0f; + sp4C.y = 0.0f; + sp4C.z = actor->speedF; + MtxPosition(&sp4C, &sp40); + actor->speed.x = sp40.x; + actor->speed.z = sp40.z; + actor->speed.y -= 1.5f + NREG_F(12); + actor->current.pos += actor->speed; + + int sp10 = 0; + + if (i_this->timers[1] == 0) { + int spC = 0; + + dBgS_LinChk sp58; + sp58.SetRope(); + sp4C = actor->old.pos; + sp40 = actor->current.pos; + + sp40.x += 2.0f * actor->speed.x; + sp40.z += 2.0f * actor->speed.z; + + sp58.Set(&sp4C, &sp40, actor); + if (dComIfG_Bgsp().LineCross(&sp58)) { + spC = 1; + } + + sp4C = player->eyePos; + + sp58.Set(&sp4C, &sp40, actor); + if (dComIfG_Bgsp().LineCross(&sp58)) { + spC = 1; + OS_REPORT(" LURE WALL 2 HIT \n"); + } + + sp4C.y = 1.0f + i_this->field_0x590 + XREG_F(7); + sp4C.x -= actor->speed.x * (3.0f + XREG_F(6)); + sp4C.z -= actor->speed.z * (3.0f + XREG_F(6)); + + sp40 = actor->current.pos; + sp40.x -= actor->speed.x * (3.0f + XREG_F(6)); + sp40.z -= actor->speed.z * (3.0f + XREG_F(6)); + sp40.y = 1.0f + i_this->field_0x590 + XREG_F(7); + + sp58.Set(&sp4C, &sp40, actor); + if (dComIfG_Bgsp().LineCross(&sp58) || spC != 0) { + actor->old.pos.x -= actor->speed.x; + actor->old.pos.z -= actor->speed.z; + actor->current.pos.x = actor->old.pos.x; + actor->current.pos.z = actor->old.pos.z; + + if (actor->speedF < 0.0f) { + actor->speedF = 0.1f; + if (spC != 0) { + i_this->field_0x114e = cM_rndFX(5000.0f); + i_this->field_0x1150 = cM_rndFX(5000.0f); + actor->speed.y = -2.0f; + lure_bound_se_set(i_this); + } + } + i_this->timers[1] = 10; + } + } + + if (i_this->acch.ChkGroundHit()) { + actor->speed.y = 20.0f; + actor->speedF *= 0.5f; + i_this->field_0xffc = cM_rndFX(3000.0f); + sp10 = 2; + } + + if (i_this->field_0x100d != 0) { + if (actor->speedF < -5.0f + VREG_F(7)) { + actor->speedF = -5.0f + VREG_F(7); + } + actor->speed.y = -10.0f + VREG_F(0); + actor->current.pos.y = i_this->field_0x590; + + i_this->field_0x1009 = 30; + i_this->field_0x10a4 = 30; + + if (i_this->lure_type == MG_LURE_WS) { + i_this->field_0x1020 = -(12000.0f + cM_rndF(4000.0f)); + i_this->field_0x1022 = 12000.0f + cM_rndF(4000.0f); + } + + i_this->field_0x10a8 = 2; + sp10 = 1; + } + + if (sp10 != 0) { + i_this->action = ACTION_LURE_ACTION; + i_this->timers[3] = 30; + i_this->timers[4] = 5; + i_this->timers[6] = WREG_S(6) + 25; + i_this->play_cam_mode = 5; + i_this->field_0x1410 = 0.0f; + + if (i_this->lure_type == MG_LURE_SP) { + if ((s16)(player->shape_angle.y - daAlink_getAlinkActorClass()->getFishingRodAngleY()) < 0) { + i_this->field_0x141a = 0x1000; + } else { + i_this->field_0x141a = -0x1000; + } + i_this->field_0x140c = 35.0f; + } else { + i_this->field_0x140c = 5.0f; + } + + i_this->field_0x14d4 = 0.0f; + i_this->field_0x14d0 = 0.0f; + i_this->field_0x114c = 0; + i_this->field_0x114a = 0; + i_this->field_0x1150 = 0; + i_this->field_0x114e = 0; + i_this->field_0x1008 = 0; + i_this->field_0x100c = 0; + i_this->field_0x100a = 0; + i_this->field_0x100b = 0; + + Z2GetAudioMgr()->changeFishingBgm(1); + } + + cLib_addCalcAngleS2(&actor->current.angle.x, 0, 2, 0x1000); + i_this->field_0x114a += i_this->field_0x114e; + i_this->field_0x114c += i_this->field_0x1150; + i_this->sound.startCreatureSoundLevel(Z2SE_AL_ROD_CASTING_LOOP, 0, -1); +} + +/* 804AD46C-804AD5AC 003F6C 0140+00 1/1 0/0 0/0 .text simple_bg_check__FP13dmg_rod_classf + */ +static int simple_bg_check(dmg_rod_class* i_this, f32 param_1) { + fopAc_ac_c* actor = (fopAc_ac_c*)&i_this->actor; + cXyz sp24; + cXyz sp18; + cXyz spC; + + sp24 = actor->current.pos; + spC.y = 0.0f; + + cMtx_YrotS(*calc_mtx, actor->current.angle.y); + + dBgS_LinChk linchk; + linchk.SetRope(); + + for (int i = 0; i < 3; i++) { + static f32 c_x[] = {0.0f, 15.0f, -15.0f}; + static f32 c_z[] = {15.0f, 0.0f, 0.0f}; + + spC.x = param_1 * c_x[i]; + spC.z = param_1 * c_z[i]; + MtxPosition(&spC, &sp18); + sp18 += sp24; + + linchk.Set(&sp24, &sp18, actor); + if (dComIfG_Bgsp().LineCross(&linchk)) { + return i + 1; + } + } + + return 0; +} + +/* 804AD5AC-804AD5F8 0040AC 004C+00 1/1 0/0 0/0 .text s_wd_sub__FPvPv */ +static void* s_wd_sub(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_OBJ_LP) { + return i_actor; + } + + return NULL; +} + +/* 804AD5F8-804AD7C0 0040F8 01C8+00 1/1 0/0 0/0 .text wd_check__FP13dmg_rod_class */ +static wd_ss* wd_check(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + obj_lp_class* obj_lp = (obj_lp_class*)fpcM_Search(s_wd_sub, i_this); + + if (obj_lp != NULL) { + wd_ss* wd_p = obj_lp->mWdSs; + cXyz sp14; + + for (int i = 0; i < obj_lp->field_0xad98; i++, wd_p++) { + sp14 = wd_p->field_0x10 - actor->current.pos; + if (sp14.abs() < wd_p->field_0x3c * (22.0f + KREG_F(11))) { + return wd_p; + } + } + } + + return NULL; +} + +/* 804AD7C0-804AD918 0042C0 0158+00 1/1 0/0 0/0 .text fr_action__FP13dmg_rod_classf */ +static void fr_action(dmg_rod_class* i_this, f32 param_1) { + fopAc_ac_c* actor = &i_this->actor; + cXyz sp14; + cXyz sp8; + + cLib_addCalc0(&actor->speedF, 0.1f, 1.0f + BREG_F(12)); + + if (i_this->reel_btn_flags != 0) { + actor->speedF = i_this->reel_speed; + + if (i_this->field_0x578 & 48) { + i_this->field_0xffe = (1000.0f + ZREG_F(8)) * cM_ssin(i_this->field_0x578 * 5000); + } else { + i_this->field_0xffe = 0; + } + + if (actor->speedF > 12.0f) { + i_this->field_0x1188 = 2.0f; + } + } + + if (param_1 >= 0.2f && i_this->field_0x100e == 0) { + actor->speedF = (6.0f + BREG_F(14)) * param_1; + + if (i_this->field_0xffe > 0) { + i_this->field_0xffe = -(BREG_S(2) + 8000); + } else { + i_this->field_0xffe = BREG_S(2) + 8000; + } + + i_this->field_0x1000 = 0; + i_this->field_0xf5c -= 2.0f + BREG_F(10); + i_this->field_0x1009 = 10; + i_this->field_0x100e = 3; + } + + cLib_addCalcAngleS2(&i_this->field_0xffc, i_this->field_0xffe, 4, (BREG_S(3) + 12000)); + i_this->field_0xff0 = 0; +} + +/* 804AD918-804ADB58 004418 0240+00 1/2 0/0 0/0 .text pe_action__FP13dmg_rod_classf */ +static void pe_action(dmg_rod_class* i_this, f32 param_1) { + fopAc_ac_c* actor = &i_this->actor; + cXyz sp18; + cXyz spC; + + if (i_this->reel_btn_flags != 0) { + actor->speedF = i_this->reel_speed; + + if (i_this->field_0x578 & 48) { + i_this->field_0xffe = (1000.0f + ZREG_F(8)) * cM_ssin(i_this->field_0x578 * 5000); + } else { + i_this->field_0xffe = 0; + } + + if (actor->speedF > 12.0f) { + i_this->field_0x1188 = 2.0f; + } + } + + if (param_1 >= 0.2f && i_this->field_0x100e == 0) { + actor->speedF = (8.0f + BREG_F(14)) * param_1; + + s16 temp_r26 = 13000.0f * param_1; + if (i_this->field_0xffe > 0) { + i_this->field_0xffe = -temp_r26; + } else { + i_this->field_0xffe = temp_r26; + } + + i_this->field_0x1000 = 5000.0f * param_1; + i_this->field_0xf5c -= 2.0f + BREG_F(10); + i_this->field_0x1009 = 30; + i_this->field_0x100e = 3; + } + + cLib_addCalcAngleS2(&i_this->field_0xffc, i_this->field_0xffe, 4, (BREG_S(3) + 12000)); + + s16 var_r25 = 4; + s16 var_r27 = 500; + if (i_this->field_0x10a4 != 0) { + var_r27 = 5000; + } + + if (actor->speedF > 4.0f) { + i_this->sound.startCreatureSoundLevel(Z2SE_AL_ROD_ROLLBACK_SLOW, 0, -1); + i_this->field_0x1002 = YREG_S(0) - 500; + var_r25 = 4; + var_r27 = 15000; + } else { + i_this->field_0x1002 = (s16)(YREG_S(1) + ((400.0f + ZREG_F(18)) * cM_ssin(i_this->field_0x578 * 1500))) - 2500; + } + + cLib_addCalc0(&actor->speedF, 0.1f, 0.3f + BREG_F(12)); + cLib_addCalcAngleS2(&i_this->field_0x1000, i_this->field_0x1002, var_r25, var_r27); + + if (i_this->field_0x1000 > 0) { + i_this->field_0x594 = (-5.0f + YREG_F(11)) * cM_ssin(i_this->field_0x1000); + } else { + i_this->field_0x594 = 0.0f; + } +} + +/* 804ADB58-804ADDD4 004658 027C+00 1/2 0/0 0/0 .text po_action__FP13dmg_rod_classf */ +static void po_action(dmg_rod_class* i_this, f32 param_1) { + fopAc_ac_c* actor = &i_this->actor; + cXyz sp18; + cXyz spC; + + s16 var_r26 = 1500; + if (i_this->reel_btn_flags != 0) { + actor->speedF = i_this->reel_speed; + if (i_this->field_0x578 & 48) { + i_this->field_0xffe = (2000.0f + ZREG_F(8)) * cM_ssin(i_this->field_0x578 * 4000); + } else { + i_this->field_0xffe = 0; + } + + var_r26 = 4000; + i_this->timers[0] = ZREG_S(5) + 15; + + if (actor->speedF > 3.0f) { + i_this->field_0x1188 = 2.0f; + } + } + + if (param_1 >= 0.2f && i_this->field_0x100e == 0) { + actor->speedF = (10.0f + BREG_F(14)) * param_1; + + if ((i_this->field_0x590 - actor->current.pos.y) <= 15.0f) { + u32 var_r27 = (127.0f * param_1); + if (var_r27 > 127) { + var_r27 = 127; + } + i_this->sound.startCreatureSound(Z2SE_AL_UKI_POKOPOKO, var_r27, -1); + i_this->field_0x100c++; + } + + i_this->field_0x1009 = VREG_S(9) + 10; + i_this->field_0xffe = 0; + i_this->field_0x1000 = VREG_S(0) + 5000; + actor->speed.y = -5.0f + VREG_F(5); + i_this->field_0xf5c -= 2.0f + BREG_F(10); + i_this->timers[0] = ZREG_S(5) + 15; + i_this->field_0x100e = 3; + i_this->field_0x118c = actor->speedF; + } + + f32 temp_f31 = actor->speedF; + cLib_addCalc0(&actor->speedF, 0.5f, 1.5f + BREG_F(12)); + + if (actor->speedF < 2.0f) { + if (temp_f31 >= 2.0f) { + if (cM_rndF(1.0f) < 0.5f) { + i_this->field_0xffe = -(BREG_S(2) + 10000); + } else { + i_this->field_0xffe = BREG_S(2) + 10000; + } + i_this->field_0x598 = 1.0f; + } + } + + if (i_this->timers[0] == 1) { + i_this->field_0xffe += (s16)cM_rndFX(5000.0f); + } + + cLib_addCalcAngleS2(&i_this->field_0xffc, i_this->field_0xffe, 4, var_r26); + + if (actor->speedF > 4.0f) { + i_this->field_0x1002 = YREG_S(0) - 500; + } else { + i_this->field_0x1002 = YREG_S(1); + } + + cLib_addCalcAngleS2(&i_this->field_0x1000, i_this->field_0x1002, 8, (YREG_S(2) + 1000)); +} + +/* 804ADDD4-804AE06C 0048D4 0298+00 1/1 0/0 0/0 .text ws_action__FP13dmg_rod_classf */ +static void ws_action(dmg_rod_class* i_this, f32 param_1) { + fopAc_ac_c* actor = &i_this->actor; + cXyz sp1C; + cXyz sp10; + s16 sp8 = 6000; + + if (i_this->reel_btn_flags != 0) { + actor->speedF = i_this->reel_speed; + + if (i_this->field_0x578 & 48) { + i_this->field_0xffe = (1000.0f + ZREG_F(8)) * cM_ssin(i_this->field_0x578 * 3000); + } else { + i_this->field_0xffe = 0; + } + + i_this->field_0x1009 = 4; + i_this->field_0x1020 = 15000.0f + cM_rndF(5000.0f); + i_this->field_0x1022 = -(10000.0f + cM_rndF(3000.0f)); + } + + if (param_1 >= 0.2f && i_this->field_0x100e == 0) { + actor->speedF = (15.0f + BREG_F(14)) * param_1; + i_this->field_0x1020 = (1300.0f * actor->speedF) + cM_rndF(5000.0f); + i_this->field_0x1022 = -((1000.0f * actor->speedF) + cM_rndF(3000.0f)); + i_this->field_0xffe = 0; + i_this->field_0xf5c -= 2.0f + BREG_F(10); + i_this->field_0x100e = 3; + } + + if ((i_this->field_0x590 - actor->current.pos.y) <= 15.0f && actor->speedF > 2.0f) { + u32 var_r27 = 9.0f * actor->speedF; + if (var_r27 > 127) { + var_r27 = 127; + } + i_this->sound.startCreatureSoundLevel(Z2SE_AL_UKI_KURUKURU_LOOP, var_r27, -1); + } + + f32 temp_f31 = actor->speedF; + cLib_addCalc0(&actor->speedF, 0.3f, 0.5f + BREG_F(12)); + + if (actor->speedF < 4.0f) { + if (temp_f31 >= 4.0f) { + if (cM_rndF(1.0f) < 0.5f) { + i_this->field_0xffe = -(BREG_S(2) + 10000); + } else { + i_this->field_0xffe = BREG_S(2) + 10000; + } + i_this->field_0x1009 = VREG_S(9) + 10; + } + } + + cLib_addCalcAngleS2(&i_this->field_0xffc, i_this->field_0xffe, 4, sp8); + cLib_addCalcAngleS2(&i_this->field_0x1000, 0, 8, (YREG_S(2) + 1000)); + + if (actor->speedF > 3.0f) { + i_this->field_0x1188 = actor->speedF; + } +} + +/* 804AE06C-804AE250 004B6C 01E4+00 1/1 0/0 0/0 .text sp_action__FP13dmg_rod_classf */ +static void sp_action(dmg_rod_class* i_this, f32 param_1) { + fopAc_ac_c* actor = &i_this->actor; + cXyz sp18; + cXyz spC; + + i_this->field_0xf6e = 2; + + f32 var_f31 = fopAcM_searchPlayerDistanceXZ(actor); + var_f31 *= -0.2f + VREG_F(18); + + if (var_f31 < -500.0f) { + var_f31 = -500.0f; + } + + f32 var_f30; + if (var_f31 > -200.0f) { + var_f30 = 0.0f; + } else { + var_f30 = -50.0f; + } + + if (i_this->reel_btn_flags != 0 || i_this->timers[0] != 0) { + cLib_addCalc2(&actor->speedF, i_this->reel_speed, 1.0f, 3.0f + BREG_F(14)); + cLib_addCalc2(&i_this->field_0x594, var_f30, 0.1f, 0.2f * i_this->reel_speed); + actor->current.angle.z = 28000.0f * cM_ssin(i_this->field_0x578 * 3000); + i_this->field_0x1004 = 4000.0f * cM_ssin(i_this->field_0x578 * 4000); + i_this->field_0x1009 = 5; + } else { + cLib_addCalc2(&i_this->field_0x594, var_f31, 0.1f, 1.5f); + if (i_this->field_0x594 > 20.0f + var_f31) { + actor->current.angle.z = 28000.0f * cM_ssin(i_this->field_0x578 * 2000); + i_this->field_0x1004 = 1000.0f * cM_ssin(i_this->field_0x578 * 4000); + } + } + + cLib_addCalc0(&actor->speedF, 0.1f, 1.0f); + i_this->field_0x1009 = 10; +} + +/* 804AE250-804AE778 004D50 0528+00 1/1 0/0 0/0 .text ground_action__FP13dmg_rod_class */ +static void ground_action(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + cXyz sp3C; + cXyz sp30; + Vec sp24; + f32 var_f31 = 0.0f; + + if (actor->speedF > 15.0f && i_this->acch.ChkWallHit()) { + actor->speedF = 0.0f; + i_this->field_0xffc = cM_rndFX(3000.0f); + } + + if (i_this->reel_btn_flags != 0) { + var_f31 = i_this->reel_speed; + cLib_addCalcAngleS2(&i_this->field_0xffc, i_this->field_0xffe, 2, var_f31 * (1000.0f + JREG_F(7))); + } + + if (actor->speedF >= 5.0f && (i_this->field_0x578 & 1) == 0 && cM_rndF(1.0f) < 0.5f) { + i_this->field_0xffe = cM_rndFX(3000.0f + VREG_F(12)); + i_this->field_0x1000 = cM_rndFX(3000.0f + VREG_F(13)); + + if (i_this->lure_type == MG_LURE_FR) { + i_this->field_0xff2 = 2000; + } else if (i_this->lure_type == MG_LURE_WS) { + i_this->field_0x1020 = 2000.0f + cM_rndF(2000.0f); + i_this->field_0x1022 = -(2000.0f + cM_rndF(2000.0f)); + } + } + + if (i_this->acch.ChkGroundHit()) { + cLib_addCalcAngleS2(&i_this->field_0x1000, 0, 1, (YREG_S(2) + 0x2000)); + + if (i_this->field_0x10a8 == 0) { + i_this->field_0xffc = cM_rndFX(32768.0f); + i_this->field_0x1000 = cM_rndFX(32768.0f); + + if (cM_rndF(1.0f) < 0.5f) { + actor->current.angle.z = -0x5000; + } else { + actor->current.angle.z = 0x5000; + } + + i_this->field_0x10a8++; + if (actor->current.pos.y < 70.0f + i_this->field_0x590) { + actor->speed.y = 20.0f + AREG_F(11); + lure_bound_se_set(i_this); + fopAcM_effSmokeSet1(&i_this->field_0x1178, &i_this->field_0x117c, &actor->current.pos, NULL, 0.2f, &actor->tevStr, 1); + } + } else { + if (i_this->field_0x10a8 == 1) { + lure_bound_se_set(i_this); + } + i_this->field_0x10a8 = 2; + actor->speed.y = -10.0f; + } + + dBgS_GndChk sp48; + cMtx_YrotS(*calc_mtx, actor->shape_angle.y); + sp3C.x = 0.0f; + sp3C.y = 0.0f; + sp3C.z = -10.0f; + MtxPosition(&sp3C, &sp30); + sp30 += actor->current.pos; + + sp24.x = sp30.x; + sp24.y = 50.0f + sp30.y; + sp24.z = sp30.z; + sp48.SetPos(&sp24); + + sp30.y = 3.0f + dComIfG_Bgsp().GroundCross(&sp48); + sp3C = sp30 - actor->current.pos; + + if (fabsf(sp3C.y) < 30.0f) { + actor->current.angle.x = cM_atan2s(sp3C.y, JMAFastSqrt(SQUARE(sp3C.x) + SQUARE(sp3C.z))); + + sp3C.x = 10.0f; + sp3C.y = 0.0f; + sp3C.z = 0.0f; + MtxPosition(&sp3C, &sp30); + sp30 += actor->current.pos; + + sp24.x = sp30.x; + sp24.y = 50.0f + sp30.y; + sp24.z = sp30.z; + sp48.SetPos(&sp24); + + sp30.y = 3.0f + dComIfG_Bgsp().GroundCross(&sp48); + sp3C = sp30 - actor->current.pos; + + s16 sp8 = (s16)cM_atan2s(sp3C.y, JMAFastSqrt(SQUARE(sp3C.x) + SQUARE(sp3C.z))); + if (actor->current.angle.x >= 0x1800 || sp8 >= 0x1800 || sp8 <= -0x1800) { + actor->speedF = 20.0f; + if (cM_rndF(1.0f) < 0.5f) { + actor->current.angle.z = 32768.0f + cM_rndFX(16000.0f); + i_this->field_0xffc = cM_rndFX(3000.0f + VREG_F(12)); + i_this->field_0x1000 = cM_rndFX(3000.0f + VREG_F(13)); + } + } + } + } else if (i_this->field_0x10a8 == 1) { + i_this->field_0xffc += 3200; + i_this->field_0x1000 += 4000; + } + + cLib_addCalc2(&actor->speedF, var_f31, 1.0f, 5.0f + BREG_F(12)); +} + +/* 804AE778-804AEA80 005278 0308+00 1/1 0/0 0/0 .text wd_action__FP13dmg_rod_classfP5wd_ss */ +static void wd_action(dmg_rod_class* i_this, f32 param_1, wd_ss* i_wd_s) { + fopAc_ac_c* actor = &i_this->actor; + cXyz sp28; + cXyz sp1C; + cLib_addCalc0(&actor->speedF, 1.0f, 5.0f + BREG_F(12)); + + if (i_this->lure_type == MG_LURE_FR) { + if (i_this->reel_btn_flags != 0) { + actor->speedF = i_this->reel_speed; + i_this->field_0xffe = 0; + } + + if (param_1 >= 0.2f && i_this->field_0x100e == 0) { + actor->speedF = (10.0f + BREG_F(14)) * param_1; + s16 spC = 2000.0f * param_1; + + if (i_this->field_0xffe > 0) { + i_this->field_0xffe = -spC; + } else { + i_this->field_0xffe = spC; + } + + i_this->field_0x1000 = 0; + i_this->field_0x100e = 3; + } + + if (i_this->field_0xff0 == 0) { + if (cM_rndF(1.0f) < 0.5f) { + i_this->field_0xff0 = 0x7000; + } else { + i_this->field_0xff0 = -0x7000; + } + } + + if (actor->speedF > 5.0f && (i_this->field_0x578 & 3) == 0 && cM_rndF(1.0f) < 0.75f) { + if (cM_rndF(1.0f) < 0.5f) { + i_this->field_0xff0 = 0x7000; + } else { + i_this->field_0xff0 = -0x7000; + } + } + + actor->current.angle.z = i_this->field_0xff0; + } else { + i_this->field_0x1008 = 1; + if (i_this->reel_btn_flags != 0) { + actor->speedF = 3.0f + BREG_F(17); + i_this->field_0xf6e = 1; + i_this->field_0xffe = 0; + } + + if (param_1 >= 0.2f && i_this->field_0x100e == 0) { + actor->speedF = (7.0f + BREG_F(14)) * param_1; + s16 spA = 4000.0f * param_1; + + if (i_this->field_0xffe > 0) { + i_this->field_0xffe = -spA; + } else { + i_this->field_0xffe = spA; + } + + i_this->field_0x1000 = 0; + i_this->field_0x100e = 3; + } + + if (fabsf(actor->speed.x) > 1.0f || fabsf(actor->speed.z) > 1.0f) { + i_wd_s->field_0x10.x += 0.65f * actor->speed.x; + i_wd_s->field_0x10.z += 0.65f * actor->speed.z; + sp28 = actor->current.pos - i_wd_s->field_0x10; + + s16 sp8 = (s16)cM_atan2s(sp28.x, sp28.z); + sp8 -= actor->shape_angle.y; + + if (sp8 < 0) { + i_wd_s->field_0x38 += 200; + } else { + i_wd_s->field_0x38 -= 200; + } + } + } + + cLib_addCalcAngleS2(&i_this->field_0xffc, i_this->field_0xffe, 2, (BREG_S(3) + 12000)); + cLib_addCalcAngleS2(&i_this->field_0x1000, 0, 1, (YREG_S(2) + 1000)); + cLib_addCalc2(&i_this->field_0x59c, 4.0f + KREG_F(15), 1.0f, 1.0f); +} + +/* 804AEA80-804AEBF0 005580 0170+00 1/1 0/0 0/0 .text heart_action__FP13dmg_rod_classf */ +static void heart_action(dmg_rod_class* i_this, f32 param_1) { + fopAc_ac_c* actor = &i_this->actor; + cLib_addCalc0(&actor->speedF, 1.0f, 5.0f + BREG_F(12)); + + if (i_this->reel_btn_flags != 0) { + actor->speedF = i_this->reel_speed; + + if ((i_this->field_0x578 & 7) == 0) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER1, 1, cXyz(0.0f, 1.0f, 0.0f)); + } + + if (i_this->lure_type == MG_LURE_WS) { + i_this->field_0x1020 = 7000.0f + cM_rndF(2000.0f); + i_this->field_0x1022 = -(4000.0f + cM_rndF(1000.0f)); + i_this->sound.startCreatureSound(Z2SE_AL_UKI_OUT_WATER, 0, -1); + } + + if (actor->speedF > 3.0f) { + i_this->field_0x1188 = 2.0f; + } + } + + if (param_1 >= 0.2f && i_this->field_0x100e == 0) { + actor->speedF = (10.0f + BREG_F(14)) * param_1; + i_this->field_0x100e = 3; + } +} + +/* 804AEBF0-804AEE18 0056F0 0228+00 1/1 0/0 0/0 .text action_eff_set__FP13dmg_rod_class + */ +static void action_eff_set(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + if (!((i_this->field_0x590 - actor->current.pos.y) > 15.0f)) { + cXyz sp3C; + cXyz sp30; + s16 temp_r0 = actor->shape_angle.y - fopAcM_searchPlayerAngleY(actor); + temp_r0 /= 2; + + cMtx_YrotS(*calc_mtx, actor->shape_angle.y - temp_r0); + sp3C.set(0.0f, 0.0f, 20.0f + hREG_F(6)); + MtxPosition(&sp3C, &sp30); + sp30 += actor->current.pos; + + if (i_this->field_0x1188 > 0.1f) { + f32 var_f31 = (0.2f + NREG_F(7)) * i_this->field_0x1188; + if (var_f31 > 1.0f) { + var_f31 = 1.0f; + } + + cXyz sp24(var_f31, var_f31, var_f31); + for (int i = 0; i < 2; i++) { + static u16 w_eff_id[] = {0x897D, 0x897E}; + i_this->field_0x1180[i] = dComIfGp_particle_set(i_this->field_0x1180[i], w_eff_id[i], &sp30, &actor->tevStr, &actor->shape_angle, &sp24, 0xFF, NULL, -1, NULL, NULL, NULL); + } + } + + i_this->field_0x1188 = 0.0f; + if (i_this->field_0x118c > 0.1f) { + f32 var_f30 = (0.2f + NREG_F(7)) * i_this->field_0x118c; + if (var_f30 > 1.0f) { + var_f30 = 1.0f; + } + + cXyz sp18(var_f30, var_f30, var_f30); + for (int i = 0; i < 2; i++) { + static u16 w_eff_id[] = {0x897F, 0x8980}; + dComIfGp_particle_set(w_eff_id[i], &sp30, &actor->tevStr, &actor->shape_angle, &sp18); + } + } + + i_this->field_0x118c = 0.0f; + } +} + +/* 804AEE18-804AFA70 005918 0C58+00 1/1 0/0 0/0 .text lure_action__FP13dmg_rod_class */ +static void lure_action(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + cXyz sp54; + cXyz sp48; + + if (i_this->field_0x10a6 == 0) { + dMeter2Info_onUseButton(2); + dComIfGp_setAStatusForce(86, 0); + dComIfGp_set3DStatusForce(114, 5, 0); + } + + if (i_this->timers[4] == 1) { + daAlink_getAlinkActorClass()->onFishingRodCastingEnd(); + } + + i_this->field_0x75c = TREG_F(18) + (16000.0f + (2259.862f * (2.0f * daAlink_getAlinkActorClass()->getFishingReelFrame()))); + i_this->field_0x75e = 2259.862f * daAlink_getAlinkActorClass()->getFishingReelFrame(); + + cLib_addCalc2(&i_this->field_0xf64, -10.0f + KREG_F(9), 1.0f, 0.5f); + cLib_addCalc2(&i_this->field_0x6f8, i_this->field_0xf60 * (0.7f + VREG_F(14)), 0.1f, 10.0f); + + f32 var_f30 = i_this->rod_stick_x; + if (fabsf(var_f30) < 0.1f) { + var_f30 = 0.0f; + } + + f32 var_f29 = i_this->rod_stick_y; + if (var_f29 > -0.1f) { + var_f29 = 0.0f; + } + + f32 temp_f1 = JMAFastSqrt(SQUARE(var_f30) + SQUARE(var_f29)); + f32 var_f31 = temp_f1 - i_this->field_0x14ec; + if (var_f31 < 0.0f) { + var_f31 = 0.0f; + } + + var_f31 *= 1.0f + ZREG_F(11); + if (var_f31 > 1.0f) { + var_f31 = 1.0f; + } + + i_this->field_0x14ec = temp_f1; + if (i_this->reel_btn_flags != 0) { + if (i_this->reel_speed > 11.0f) { + daAlink_getAlinkActorClass()->seStartOnlyReverbLevel(Z2SE_AL_REEL_FAST_LOOP); + i_this->sound.startCreatureSoundLevel(Z2SE_AL_ROD_ROLLBACK_FAST, 0, -1); + i_this->field_0x100b += 2; + } else { + daAlink_getAlinkActorClass()->seStartOnlyReverbLevel(Z2SE_AL_REEL_SLOW_LOOP); + i_this->sound.startCreatureSoundLevel(Z2SE_AL_ROD_ROLLBACK_SLOW, 0, -1); + i_this->field_0x100b++; + } + + if (i_this->lure_type != MG_LURE_SP && i_this->lure_type != MG_LURE_WS && i_this->field_0x100b > 60) { + i_this->field_0x100b = 60; + i_this->field_0x100a = 1; + } + } else if (i_this->field_0x100b != 0) { + i_this->field_0x100b--; + } else { + i_this->field_0x100a = 0; + } + + if (fabsf(actor->speedF) > 20.0f) { + i_this->field_0x100a = 1; + } + + if (i_this->field_0x10a4 != 0) { + i_this->field_0x10a4--; + } + + if (i_this->field_0x100e != 0) { + i_this->field_0x100e--; + } + + if (i_this->field_0x100d != 0) { + if (i_this->field_0x10a9 != 0) { + heart_action(i_this, var_f31); + actor->current.angle.z = 0; + actor->current.angle.x = 0; + i_this->field_0x114c = 0; + i_this->field_0x114a = 0; + i_this->field_0xffc = 0; + i_this->field_0x1000 = 0; + cMtx_YrotS(*calc_mtx, actor->current.angle.y); + } else { + wd_ss* wd_p = wd_check(i_this); + if (wd_p != NULL) { + wd_action(i_this, var_f31, wd_p); + cMtx_YrotS(*calc_mtx, actor->current.angle.y); + } else { + cLib_addCalc0(&i_this->field_0x59c, 1.0f, 1.0f); + + switch (i_this->lure_type) { + case MG_LURE_FR: + fr_action(i_this, var_f31); + break; + case MG_LURE_PE: + pe_action(i_this, var_f31); + break; + case MG_LURE_PO: + po_action(i_this, var_f31); + break; + case MG_LURE_WS: + ws_action(i_this, var_f31); + break; + case MG_LURE_SP: + sp_action(i_this, var_f31); + break; + } + + if (actor->speedF > 10.0f) { + cLib_addCalc2(&actor->speedF, 10.0f, 1.0f, 2.0f); + } + + action_eff_set(i_this); + } + + if (i_this->timers[3] == 0 && actor->speedF > 1.0f) { + int sp1C = simple_bg_check(i_this, 1.0f); + if (sp1C != 0) { + i_this->timers[3] = 2; + + if (sp1C == 2) { + i_this->field_0xffe = -0x1000; + } else if (sp1C == 3) { + i_this->field_0xffe = 0x1000; + } else { + i_this->field_0xffe = 0; + } + + actor->speedF *= 0.8f; + actor->current.pos = actor->old.pos; + } + } + + cLib_addCalcAngleS2(&actor->current.angle.x, 0, 4, 0x2000); + + if (i_this->lure_type != MG_LURE_SP) { + cLib_addCalcAngleS2(&actor->current.angle.z, 0, 2, 0x1000); + cMtx_YrotS(*calc_mtx, (actor->current.angle.y + i_this->field_0xffc)); + } else { + cMtx_YrotS(*calc_mtx, actor->current.angle.y); + } + } + } else { + ground_action(i_this); + cMtx_YrotS(*calc_mtx, actor->current.angle.y); + } + + sp54.x = 0.0f; + sp54.y = 0.0f; + sp54.z = actor->speedF; + MtxPosition(&sp54, &sp48); + actor->speed.x = sp48.x; + actor->speed.z = sp48.z; + actor->current.pos += actor->speed; + + if (i_this->field_0x100d != 0) { + cLib_addCalc2(&actor->current.pos.y, i_this->field_0x590 + i_this->field_0x594, 0.5f, 2.0f + VREG_F(1)); + cLib_addCalc0(&actor->speed.y, 1.0f, 2.0f + VREG_F(2)); + } else { + actor->speed.y -= 5.0f; + i_this->field_0x594 = 0.0f; + } + + sp54 = i_this->field_0x6ac - actor->current.pos; + + f32 var_f28; + if (i_this->field_0xf6e == 1) { + var_f28 = (0.007999999f + BREG_F(12)) * sp54.abs(); + } else if (i_this->field_0xf6e == 2) { + var_f28 = (0.0095f + BREG_F(13)) * sp54.abs(); + } else { + var_f28 = (0.01f + BREG_F(11)) * sp54.abs(); + } + + cLib_addCalc2(&i_this->field_0xf5c, var_f28, 1.0f, 1.5f + YREG_F(13)); + + sp54 = i_this->mg_line.pos[90] - actor->current.pos; + cLib_addCalcAngleS2(&actor->current.angle.y, cM_atan2s(sp54.x, sp54.z), 1, 0x1000); + + if (i_this->field_0xf5c < 2.0f) { + i_this->field_0xf5c = 2.0f; + } + + if (i_this->timers[6] == 0 && (i_this->field_0xf5c <= 2.5f + BREG_F(17) || (fopAcM_searchPlayerDistanceXZ(actor) < 450.0f + AREG_F(15))) && i_this->field_0x10a6 == 0) { + if (i_this->field_0x10a9 != 0) { + i_this->field_0x10a9 = 2; + i_this->action = ACTION_LURE_HEART; + Z2GetAudioMgr()->changeBgmStatus(4); + i_this->play_cam_mode = 30; + i_this->play_cam_timer = 0; + i_this->play_cam_fovy = 90.0f + DREG_F(6); + i_this->field_0x1410 = -40.0f; + i_this->field_0x146d = 0; + i_this->field_0x10b0 = 0; + daPy_getLinkPlayerActorClass()->onFishingRodGetFish(); + } else { + daPy_getLinkPlayerActorClass()->onFishingRodReelEnd(); + actor->speed.y = 6.0f; + i_this->action = ACTION_LURE_STANDBY; + + Z2GetAudioMgr()->changeFishingBgm(0); + + if (i_this->field_0x10a7 == 3) { + daAlink_getAlinkActorClass()->setCanoeFishingWaitAngle(dComIfGp_getPlayer(0)->shape_angle.y); + } else { + daAlink_getAlinkActorClass()->setCanoeFishingWaitAngle(daAlink_getAlinkActorClass()->getFishingRodAngleY()); + } + + i_this->field_0x10a7 = 0; + sp54 = i_this->field_0x6ac - actor->current.pos; + + actor->current.angle.x = -cM_atan2s(sp54.y, sp54.z); + actor->current.angle.y = cM_atan2s(sp54.x, JMAFastSqrt(SQUARE(sp54.y) + SQUARE(sp54.z))); + + OS_REPORT(" MG ROD noo 1!!! \n"); + + i_this->play_cam_mode = 2; + i_this->play_cam_timer = 0; + i_this->field_0x1410 = 10.0f; + i_this->field_0x1000 = 0; + i_this->field_0xffc = 0; + i_this->timers[0] = 0; + i_this->timers[1] = 20; + i_this->field_0x14f8 = 0; + i_this->field_0x6f8 = 0.0f; + i_this->field_0x6e0 = 0.0f; + + actor->old.pos = actor->current.pos = i_this->field_0x764; + + for (int i = 1; i < 99; i++) { + i_this->field_0xdb0[i] = 0.0f; + i_this->field_0xc20[i] = 0.0f; + } + } + } + + if (i_this->field_0x10a6 != 0) { + i_this->field_0x10a6--; + if (i_this->field_0x10a6 == 0) { + i_this->play_cam_mode = 20; + i_this->play_cam_timer = 0; + + camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + camera->mCamera.SetTrimSize(1); + + i_this->action = ACTION_LURE_BARE; + i_this->field_0x146d = 0; + } + } + + if (i_this->field_0x13a8 > 50) { + i_this->field_0x100d = 0; + actor->speed.y = 0.0f; + actor->current.pos.y += 3.0f + VREG_F(16); + } +} + +/* 804AFA70-804B02C4 006570 0854+00 1/1 0/0 0/0 .text lure_hit__FP13dmg_rod_classP13mg_fish_class + */ +static void lure_hit(dmg_rod_class* i_this, mg_fish_class* i_mg_fish) { + fopAc_ac_c* sp1C = &i_this->actor; + fopAc_ac_c* sp18 = dComIfGp_getPlayer(0); + cXyz sp44; + cXyz sp38; + + i_this->field_0x1515 = 0; + + if (henna != NULL) { + henna->field_0x7cc |= 1; + } + + if (i_this->timers[7] == 1) { + Z2GetAudioMgr()->seStart(Z2SE_AL_FISHING_HIT, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + dMeter2Info_setMeterString(0x4C7); // "FISH ON!" + Z2GetAudioMgr()->changeFishingBgm(2); + } + + if (i_this->reel_btn_flags != 0 && i_mg_fish->mRemainingHookTime == 0 && i_this->timers[7] == 0) { + daAlink_getAlinkActorClass()->seStartOnlyReverbLevel(Z2SE_AL_REEL_SLOW_LOOP); + } + + i_this->field_0x75c = TREG_F(18) + (16000.0f + (2259.862f * (2.0f * daAlink_getAlinkActorClass()->getFishingReelFrame()))); + i_this->field_0x75e = 2259.862f * daAlink_getAlinkActorClass()->getFishingReelFrame(); + sp1C->speedF = 0.0f; + i_this->field_0xf64 = -3.5f + JREG_F(9); + + i_this->field_0x6f8 = i_this->field_0xf60 * (2.0f + JREG_F(11)); + if (i_this->field_0x6f8 > 500.0f + JREG_F(12)) { + i_this->field_0x6f8 = 500.0f + JREG_F(12); + } + + if (i_mg_fish != NULL) { + i_this->field_0x6f8 += (i_this->field_0x6f8 * (0.05f + XREG_F(9))) + ((0.05f + XREG_F(9)) * (i_this->field_0x6f8 * cM_ssin(i_mg_fish->jointYaws2[1]))); + } + + if (i_mg_fish != NULL) { + sp44 = sp1C->current.pos - sp18->current.pos; + + f32 temp_f28 = 0.5f + ((0.004f + XREG_F(13)) * sp44.abs()); + if (i_this->field_0xf5c < temp_f28) { + i_this->field_0xf5c = temp_f28; + } + + if (i_this->field_0xf60 > 200.0f + JREG_F(14)) { + daAlink_getAlinkActorClass()->seStartOnlyReverbLevel(Z2SE_AL_ROD_BEND); + } + + if (i_this->field_0xf60 > 100.0f + JREG_F(16)) { + f32 temp_f31 = i_this->field_0xf60 - (100.0f + JREG_F(16)); + + f32 var_f30 = i_this->rod_stick_x; + if (fabsf(var_f30) < 0.1f) { + var_f30 = 0.0f; + } + + temp_f31 *= 0.1f + JREG_F(17); + if (i_this->rod_stick_y < -0.5f) { + i_this->field_0x1515 = 1; + } + + f32 var_f29; + if (i_this->field_0x1515 != 0) { + var_f29 = 6.0f; + } else { + var_f29 = 3.0f; + } + + if (temp_f31 > var_f29) { + temp_f31 = var_f29; + } + + cMtx_YrotS(*calc_mtx, i_this->field_0x6c4); + sp44.x = var_f30 * -(200.0f + VREG_F(10)); + sp44.y = 0.0f; + sp44.z = 0.0f; + MtxPosition(&sp44, &sp38); + sp38 += sp18->current.pos; + sp44 = sp38 - sp1C->current.pos; + + s16 spA = cM_atan2s(sp44.x, sp44.z); + cMtx_YrotS(*calc_mtx, spA); + sp44.x = 0.0f; + sp44.y = 0.0f; + sp44.z = temp_f31; + MtxPosition(&sp44, &sp38); + i_mg_fish->actor.current.pos += sp38; + + for (int i = 0; i <= i_mg_fish->mNumJoints; i++) { + i_mg_fish->mJointTranslations[i] += sp38; + } + + if (i_mg_fish->mCurAction == 52) { + cLib_addCalc2(&i_mg_fish->actor.current.pos.y, i_this->field_0x590 - ((25.0f + JREG_F(5)) * i_mg_fish->mJointScale), 0.05f, temp_f31 * (1.0f + JREG_F(6))); + if (i_mg_fish->mDistToPlayer < 200.0f) { + cLib_addCalc2(&i_mg_fish->actor.current.pos.y, i_this->field_0x590 - ((20.0f + JREG_F(5)) * i_mg_fish->mJointScale), 0.2f, 0.8f + fabsf(i_mg_fish->actor.speed.y)); + } + } + } + + s16 sp8 = 0; + if (i_this->lure_type == MG_LURE_FR) { + if (i_mg_fish->mRemainingHookTime != 0) { + if (i_mg_fish->mRemainingHookTime < 15) { + sp8 = 1; + } else { + sp8 = 2; + } + } + } else if (i_mg_fish->mRemainingHookTime != 0) { + sp8 = 1; + } + + if (sp8 != 0) { + dMeter2Info_onUseButton(2); + dComIfGp_setAStatusForce(82, 0); + dComIfGp_set3DStatusForce(82, 2, 0); + + if (i_this->reel_btn_flags != 0) { + cLib_addCalc2(&i_this->field_0xf5c, 0.5f, 1.0f, 0.2f + DREG_F(14)); + } + + int sp10 = 0; + if (i_this->rod_stick_y < -0.5f) { + sp10 = 1; + } + + if (sp10 != 0) { + OS_REPORT("/// HOOKSET TIM !!%d\n", i_mg_fish->mRemainingHookTime); + i_mg_fish->mRemainingHookTime = 0; + + if (sp8 == 2) { + i_this->field_0x10a7 = 4; + } else { + i_mg_fish->mCurAction = 52; + i_mg_fish->mActionPhase = 0; + i_mg_fish->field_0x65a = 0; + i_this->field_0x10a7 = 0; + + static u8 learn_d[] = {0x01, 0x02, 0x04, 0x08, 0x10}; + i_mg_fish->field_0x750 |= learn_d[i_this->lure_type]; + + if (i_this->field_0xf60 >= 200.0f) { + i_this->field_0xf5c -= 1.0f + YREG_F(14); + } else if (i_this->field_0xf60 >= 100.0f) { + i_this->field_0xf5c -= 2.0f + YREG_F(14); + } else { + i_this->field_0xf5c -= 3.0f + YREG_F(15); + } + + if (i_mg_fish->mGedouKind == 3) { + i_this->field_0x10aa = 5; + i_this->field_0x10ab = 20; + } else if (i_mg_fish->mJointScale >= 0.7f) { + i_this->field_0x10aa = 8; + i_this->field_0x10ab = 40; + } else if (i_mg_fish->mJointScale >= 0.65f) { + i_this->field_0x10aa = 7; + i_this->field_0x10ab = 35; + } else if (i_mg_fish->mJointScale >= 0.6f) { + i_this->field_0x10aa = 6; + i_this->field_0x10ab = 30; + } else { + i_this->field_0x10aa = 5; + i_this->field_0x10ab = 25; + } + + daAlink_getAlinkActorClass()->onFishingHit(); + + i_this->timers[7] = WREG_S(9) + 10; + i_this->field_0x1420 = 400.0f; + i_this->field_0x141c = 400.0f; + + if (i_this->field_0x140c < 20.0f + AREG_F(19)) { + if ((s16)(sp18->shape_angle.y - daAlink_getAlinkActorClass()->getFishingRodAngleY()) < 0) { + i_this->field_0x141a = 0x1000; + } else { + i_this->field_0x141a = -0x1000; + } + } else if (i_this->field_0x141a > 0) { + i_this->field_0x141a = 0x1000; + } else { + i_this->field_0x141a = -0x1000; + } + + i_this->field_0x140c = 35.0f + AREG_F(7); + i_this->field_0x1407 = 20; + } + } + } else if (i_this->field_0x10a6 == 0 && i_this->field_0x100f == 0) { + dMeter2Info_onUseButton(2); + dComIfGp_setAStatusForce(0x55, 0); + dComIfGp_set3DStatusForce(0x55, 2, 0); + } + } +} + +/* 804B02C4-804B0A90 006DC4 07CC+00 1/1 0/0 0/0 .text lure_catch__FP13dmg_rod_class */ +static void lure_catch(dmg_rod_class* i_this) { + fopAc_ac_c* actor = (fopAc_ac_c*)&i_this->actor; + fopAc_ac_c* mgfish_a = fopAcM_SearchByID(i_this->mg_fish_id); + mg_fish_class* mgfish = (mg_fish_class*)mgfish_a; + + i_this->field_0xf64 = -5.0f + JREG_F(9); + i_this->field_0x6f8 = 0.0f; + i_this->field_0xf5c = 2.3f + AREG_F(5); + i_this->field_0x100d = 0; + csXyz sp18; + + if (mgfish->mActionPhase < 2 && i_this->play_cam_timer > 25) { + s16 spA = DREG_S(6) + 2000; + if (mgfish->mJointScale > 0.5f) { + spA += (s16)((mgfish->mJointScale - 0.5f) * (20000.0f + DREG_F(19))); + } + + if (spA > 6000) { + spA = 6000; + } + + cLib_addCalcAngleS2(&i_this->field_0x10b0, spA, 8, 300); + } else { + i_this->field_0x10b0 = 0; + } + + sp18.x = i_this->field_0x10b0; + sp18.y = 0; + sp18.z = i_this->field_0x10b0; + daAlink_getAlinkActorClass()->setFishingArm1Angle(sp18); + + if (i_this->field_0x14c2 != 0) { + i_this->field_0x14c2++; + if (i_this->field_0x14c2 >= 2) { + if (i_this->field_0x14c2 == 2) { + i_this->msgflow.init(actor, 0x2D6, 0, NULL); + } + + if (i_this->field_0x14c2 > 100) { + i_this->field_0x14c2 = 100; + } + + if (i_this->msgflow.doFlow(actor, NULL, 0)) { + i_this->field_0x14c2 = 0; + mgfish_a->health = 1; + } + } + return; + } + + s16 var_r26; + if (data_804BBBD4 == 1) { + var_r26 = 39.37008f * mgfish->mJointScale; + } else { + var_r26 = 100.0f * mgfish->mJointScale; + } + + if (var_r26 > 99) { + var_r26 = 99; + } + + u8 fish_kind = mgfish->mKind2; + if (l_HIO.force_fish_msg_output != 0) { + fish_kind = l_HIO.force_fish_msg_output - 1; + } + + if (i_this->play_cam_timer == 1) { + daAlink_getAlinkActorClass()->changeFishGetFace(1); + if (data_804BBBD4 == 2) { + f32 var_f31 = var_r26 / 2.54f; + f32 var_f30 = dComIfGs_getEventReg(check_kind[fish_kind]) / 2.54f; + + if ((u8)var_f31 > (u8)var_f30) { + i_this->field_0x14c0 = 1; + } else { + i_this->field_0x14c0 = 0; + } + } else if ((u8)var_r26 > dComIfGs_getEventReg(check_kind[fish_kind])) { + i_this->field_0x14c0 = 1; + } else { + i_this->field_0x14c0 = 0; + } + } + + if (i_this->play_cam_timer == 40) { + if (!dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[467])) { + Z2GetAudioMgr()->subBgmStart(Z2BGM_FISHING_GET1); + } else if (fish_kind == 3) { + Z2GetAudioMgr()->subBgmStart(Z2BGM_FISHING_GET3); + } else if (i_this->field_0x14c0 != 0) { + Z2GetAudioMgr()->subBgmStart(Z2BGM_FISHING_GET1); + } else { + Z2GetAudioMgr()->subBgmStart(Z2BGM_FISHING_GET2); + } + } else if (i_this->play_cam_timer == 80) { + u8 sp8 = 1; + if (i_this->field_0x14c0 != 0) { + if (!dComIfGs_isEventBit((u16)dSv_event_flag_c::saveBitLabels[467])) { + sp8 = 2; + } else if (fish_kind != 3) { + sp8 = 2; + } + } else if (fish_kind == 3) { + sp8 = 3; + } + + if (fish_kind == 1) { + sp8 = 2; + } + + if (henna != NULL && sp8 == 2) { + henna->field_0x6a4 = 10; + } + + daAlink_getAlinkActorClass()->changeFishGetFace(sp8); + } + + if (i_this->play_cam_timer >= 60) { + if (i_this->field_0x146d == 0) { + data_80450C9A++; + if (data_80450C9A > 200) { + data_80450C9A = 200; + } + + dComIfGs_onEventBit((u16)dSv_event_flag_c::saveBitLabels[467]); + + static u16 catch_msgn_20[] = {0x02CE, 0x02D1, 0x02CF, 0x02D0}; + static u16 catch_msgn_21[] = {0x02D2, 0x02D5, 0x02D3, 0x02D4}; + static u16 catch_msgn_22[] = {0x02D7, 0x02DA, 0x02D8, 0x02D9}; + static u16 catch_msgn_10[] = {0x02DC, 0x02DF, 0x02DD, 0x02DE}; + static u16 catch_msgn_11[] = {0x02E0, 0x02E3, 0x02E1, 0x02E2}; + static u16 catch_msgn_12[] = {0x02E4, 0x02E7, 0x02E5, 0x02E6}; + + if (dComIfGs_getEventReg(check_kind[fish_kind]) == 0) { + dComIfGs_setEventReg(check_kind[fish_kind], 1); + if (henna != NULL) { + i_this->catch_flow_id = catch_msgn_20[fish_kind]; + } else { + i_this->catch_flow_id = catch_msgn_10[fish_kind]; + } + } else if (i_this->field_0x14c0 != 0) { + if (henna != NULL) { + i_this->catch_flow_id = catch_msgn_21[fish_kind]; + } else { + i_this->catch_flow_id = catch_msgn_11[fish_kind]; + } + } else if (henna != NULL) { + i_this->catch_flow_id = catch_msgn_22[fish_kind]; + } else { + i_this->catch_flow_id = catch_msgn_12[fish_kind]; + } + + if (data_804BBBD4 == 2) { + dComIfGp_setMessageCountNumber((u8)(var_r26 / 2.54f)); + } else { + dComIfGp_setMessageCountNumber(var_r26); + } + + i_this->msgflow.init(actor, i_this->catch_flow_id, 0, NULL); + i_this->field_0x146d = 1; + } + + if (i_this->field_0x146d == 1 && i_this->msgflow.doFlow(actor, NULL, 0)) { + i_this->field_0x146d = 2; + int sp10 = 0; + + if (i_this->field_0x14c0 != 0) { + data_80450C9B = 1; + if (dMsgObject_getSelectCursorPos() == 0) { + dComIfGs_setEventReg(check_kind[fish_kind], var_r26); + sp10 = 1; + actor->health = 1; + i_this->mg_fish_id = -1; + i_this->play_cam_mode = 2; + i_this->play_cam_timer = 20; + i_this->field_0x1418 = daAlink_getAlinkActorClass()->shape_angle.y; + i_this->field_0x1410 = 0.0f; + + camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + camera->mCamera.SetTrimSize(1); + daAlink_getAlinkActorClass()->onFishingKeep(); + data_80450C9B = 2; + + if (fish_kind == 1) { + if (var_r26 >= 72) { + data_80450C9B = 4; + } else { + data_80450C9B = 3; + } + } + } + } + + if (sp10 == 0) { + if (i_this->catch_flow_id == 0x2D1 || i_this->catch_flow_id == 0x2D5) { + i_this->field_0x14c2 = 1; + } else { + mgfish_a->health = 1; + } + } else { + mgfish_a->health = 2; + } + } + } + + if (actor->health != 0) { + i_this->action = ACTION_LURE_STANDBY; + i_this->field_0xf5c = 0.5f; + i_this->field_0x10a5 = 0; + i_this->timers[2] = 20; + actor->current.angle.set(0, 0, 0); + i_this->field_0xffc = i_this->field_0x1000 = 0; + daAlink_getAlinkActorClass()->changeFishGetFace(0); + daAlink_getAlinkActorClass()->setCanoeFishingWaitAngle(daAlink_getAlinkActorClass()->shape_angle.y); + } +} + +/* 804B0A90-804B0E74 007590 03E4+00 1/1 0/0 0/0 .text lure_bare__FP13dmg_rod_class */ +static void lure_bare(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + fopAc_ac_c* mgfish = fopAcM_SearchByID(i_this->mg_fish_id); + i_this->rod_stick_x = 0.0f; + i_this->rod_stick_y = 0.0f; + + if (i_this->play_cam_timer >= 20) { + if (i_this->field_0x146d == 0) { + if (i_this->field_0x10a7 == 0) { + if (henna != NULL) { + i_this->msgflow.init(actor, 0x3E6, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x2EC, 0, NULL); + } + } else if (i_this->field_0x10a7 == 1) { + if (henna != NULL) { + i_this->msgflow.init(actor, 0x3E4, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x2EA, 0, NULL); + } + } else if (i_this->field_0x10a7 == 2) { + if (henna != NULL) { + i_this->msgflow.init(actor, 0x3E5, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x2EB, 0, NULL); + } + } else if (i_this->field_0x10a7 == 3) { + if (henna != NULL) { + i_this->msgflow.init(actor, 0x3E7, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x2ED, 0, NULL); + } + } else { + if (henna != NULL) { + i_this->msgflow.init(actor, 0x2E9, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x2EE, 0, NULL); + } + } + + i_this->field_0x146d = 1; + } + + if (i_this->field_0x146d == 1 && i_this->msgflow.doFlow(actor, NULL, 0)) { + i_this->field_0x146d = 2; + i_this->play_cam_mode = 5; + i_this->field_0x1410 = 1.0f; + i_this->field_0x1407 = 110; + dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0))->mCamera.SetTrimSize(1); + i_this->action = ACTION_LURE_ACTION; + i_this->field_0x1006 = 0; + daAlink_getAlinkActorClass()->changeFishGetFace(0); + Z2GetAudioMgr()->changeFishingBgm(1); + return; + } + + if (i_this->play_cam_timer == 25) { + Z2GetAudioMgr()->subBgmStart(Z2BGM_FISHING_BARE); + if (i_this->field_0x10a7 == 1) { + daAlink_getAlinkActorClass()->changeFishGetFace(4); + } else if (i_this->field_0x10a7 == 2) { + daAlink_getAlinkActorClass()->changeFishGetFace(3); + } else { + daAlink_getAlinkActorClass()->changeFishGetFace(4); + } + } + } + + if (i_this->lure_type != MG_LURE_SP) { + i_this->field_0x594 = 0.0f; + actor->current.pos.y = i_this->field_0x590; + } + + if (i_this->field_0x10a7 == 3 && i_this->timers[2] != 0) { + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp18; + cXyz spC; + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp18.x = 200.0f * cM_ssin(i_this->field_0x578 * 1800); + sp18.y = -300.0f; + sp18.z = 100.0f; + MtxPosition(&sp18, &actor->current.pos); + actor->current.pos += player->current.pos; + } + + actor->speed.y = 0.0f; +} + +/* 804B0E74-804B11CC 007974 0358+00 1/1 0/0 0/0 .text lure_heart__FP13dmg_rod_class */ +static void lure_heart(dmg_rod_class* i_this) { + fopAc_ac_c* actor = (fopAc_ac_c*)&i_this->actor; + + i_this->field_0xf64 = -5.0f + JREG_F(9); + i_this->field_0x6f8 = 0.0f; + i_this->field_0xf5c = 0.29999995f + AREG_F(5); + i_this->field_0x100d = 0; + csXyz sp8; + + i_this->field_0x10b0 = 0; + sp8.x = i_this->field_0x10b0; + sp8.y = 0; + sp8.z = i_this->field_0x10b0; + + fopAc_ac_c* obj_life = (fopAc_ac_c*)fopAcM_SearchByName(PROC_Obj_LifeContainer); + if (obj_life != NULL) { + fopAc_ac_c* temp_r25 = (fopAc_ac_c*)dComIfGp_getPlayer(0); + cXyz sp10; + + cMtx_YrotS(*calc_mtx, temp_r25->shape_angle.y); + sp10.x = 0.0f; + sp10.y = 50.0f + hREG_F(5); + sp10.z = 150.0f + hREG_F(6); + MtxPosition(&sp10, &actor->current.pos); + actor->current.pos += obj_life->current.pos; + } + + daAlink_getAlinkActorClass()->setFishingArm1Angle(sp8); + if (i_this->play_cam_timer == 1) { + daAlink_getAlinkActorClass()->changeFishGetFace(2); + } + + if (i_this->play_cam_timer == 65) { + if ((dComIfGs_getMaxLife() % 5) == 4) { + mDoAud_subBgmStart(Z2BGM_HEART_GET); + } else { + mDoAud_subBgmStart(Z2BGM_ITEM_GET_MINI); + } + + dComIfGp_setMesgBgmOn(); + if (henna != NULL) { + henna->field_0x6a4 = 10; + henna->field_0x688 = 1; + } + } + + if (i_this->play_cam_timer >= 60) { + if (i_this->play_cam_timer == 60) { + if (henna != NULL) { + i_this->msgflow.init(actor, 0x2DB, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x2E8, 0, NULL); + } + } + + if (i_this->play_cam_timer == 90 && henna != NULL) { + henna->field_0x688 = 0; + } + + if (i_this->msgflow.doFlow(actor, NULL, 0)) { + i_this->play_cam_mode = 2; + i_this->play_cam_timer = 20; + i_this->field_0x1418 = daAlink_getAlinkActorClass()->shape_angle.y; + i_this->field_0x1410 = 0.0f; + + dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0))->mCamera.SetTrimSize(1); + daAlink_getAlinkActorClass()->onFishingKeep(); + + i_this->action = ACTION_LURE_STANDBY; + i_this->field_0xf5c = 0.5f; + i_this->field_0x10a5 = 0; + i_this->timers[2] = 20; + + daAlink_getAlinkActorClass()->changeFishGetFace(0); + daAlink_getAlinkActorClass()->setCanoeFishingWaitAngle(daAlink_getAlinkActorClass()->shape_angle.y); + actor->current.angle.set(0, 0, 0); + + if (obj_life != NULL) { + fopAcM_delete(obj_life); + fopAcM_onItem(obj_life, 0x80); + execItemGet(fpcNm_ITEM_KAKERA_HEART); + dComIfGs_setEventReg(0xECFF, dComIfGs_getEventReg(0xECFF) | 0x40); + } + + i_this->field_0x10a9 = 0; + } + } +} + +/* 804B11CC-804B16B8 007CCC 04EC+00 1/1 0/0 0/0 .text hook_set__FP13dmg_rod_classP4cXyzi + */ +static void hook_set(dmg_rod_class* i_this, cXyz* param_1, int param_2) { + fopAc_ac_c* actor = (fopAc_ac_c*)&i_this->actor; + cXyz sp38; + cXyz sp2C; + cXyz sp20; + + if (i_this->field_0x100d != 0) { + if (i_this->lure_type == MG_LURE_SP) { + sp20.set(0.0f, -2.0f, 0.0f); + } else { + mDoMtx_stack_c::YrotS(actor->shape_angle.y); + mDoMtx_stack_c::ZrotM(actor->shape_angle.z); + sp38.set(0.0f, -2.0f + NREG_F(14), 0.0f); + mDoMtx_stack_c::multVec(&sp38, &sp20); + } + } else if (i_this->action == ACTION_LURE_ACTION) { + mDoMtx_stack_c::YrotS(actor->shape_angle.y); + mDoMtx_stack_c::XrotM(actor->shape_angle.x); + + if (param_2 == 0) { + s16 sp10 = actor->shape_angle.z - 0x8000; + mDoMtx_stack_c::ZrotM((sp10 * 2) + 0x8000); + sp38.x = 0.0f; + sp38.y = -5.0f; + sp38.z = -5.0f; + } else { + sp38.x = 0.0f; + sp38.y = 0.0f; + sp38.z = -5.0f; + } + + mDoMtx_stack_c::multVec(&sp38, &sp20); + } else if (i_this->lure_type == MG_LURE_SP && i_this->action == ACTION_LURE_CATCH) { + sp20.set(0.0f, 50.0f, 0.0f); + } else { + sp20.set(0.0f, -10.0f + NREG_F(15), 0.0f); + } + + mg_hook_s* temp_r30 = &i_this->mg_hook[param_2]; + temp_r30->field_0x0[0] = *param_1; + + f32 temp_f27 = sp20.x + (temp_r30->field_0x0[1].x - temp_r30->field_0x0[0].x); + f32 temp_f30 = sp20.y + (temp_r30->field_0x0[1].y - temp_r30->field_0x0[0].y); + f32 temp_f29 = sp20.z + (temp_r30->field_0x0[1].z - temp_r30->field_0x0[0].z); + + temp_r30->field_0x18.x = -cM_atan2s(temp_f30, temp_f29); + temp_r30->field_0x18.y = cM_atan2s(temp_f27, JMAFastSqrt(SQUARE(temp_f30) + SQUARE(temp_f29))); + + cMtx_XrotS(*calc_mtx, temp_r30->field_0x18.x); + cMtx_YrotM(*calc_mtx, temp_r30->field_0x18.y); + sp38.set(0.0f, 0.0f, 1.0f + BREG_F(17)); + MtxPosition(&sp38, &sp2C); + temp_r30->field_0x0[1] = temp_r30->field_0x0[0] + sp2C; + + mDoMtx_stack_c::transS(temp_r30->field_0x0[0].x, temp_r30->field_0x0[0].y, temp_r30->field_0x0[0].z); + + if (param_2 == 0 && (i_this->action == ACTION_LURE_HIT || i_this->action == ACTION_LURE_CATCH)) { + mDoMtx_stack_c::YrotM(actor->shape_angle.y); + mDoMtx_stack_c::XrotM(actor->shape_angle.x); + mDoMtx_stack_c::ZrotM(actor->shape_angle.z); + } else { + mDoMtx_stack_c::XrotM(temp_r30->field_0x18.x); + mDoMtx_stack_c::YrotM(temp_r30->field_0x18.y); + mDoMtx_stack_c::XrotM(-0x4000); + + if (param_2 == 1 && (i_this->action <= ACTION_LURE_STANDBY || (i_this->lure_type != MG_LURE_SP && i_this->action == ACTION_LURE_CATCH))) { + sp38.x = fabsf(temp_r30->field_0x18.y); + sp38.z = fabsf(temp_r30->field_0x18.x - 0x4000); + + f32 var_f31 = JMAFastSqrt(SQUARE(sp38.x) + SQUARE(sp38.z)); + if (var_f31 > 7000.0f) { + var_f31 = 7000.0f; + } + + if (var_f31 > 2000.0f && i_this->field_0xfec < var_f31) { + i_this->field_0xfec = var_f31; + } + + s16 spE, spC; + spE = i_this->field_0xfec * cM_ssin(i_this->field_0x578 * 4000); + spC = i_this->field_0xfec * cM_ssin(i_this->field_0x578 * 3800); + + mDoMtx_stack_c::XrotM(spE); + mDoMtx_stack_c::ZrotM(spC); + cLib_addCalc0(&i_this->field_0xfec, 1.0f, 150.0f); + } + } + + f32 temp_f28 = 1.0f + ZREG_F(6); + mDoMtx_stack_c::scaleM(temp_f28, temp_f28, temp_f28); + mDoMtx_stack_c::YrotM(actor->current.angle.z); + i_this->hook_model[param_2]->setBaseTRMtx(mDoMtx_stack_c::get()); +} /* 804BB940-804BB954 0000F0 0014+00 0/1 0/0 0/0 .data lure_scale */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 lure_scale[20] = { - 0x3F, 0x80, 0x00, 0x00, 0x3F, 0x40, 0x00, 0x00, 0x3F, 0x40, - 0x00, 0x00, 0x3F, 0x19, 0x99, 0x9A, 0x3E, 0xC0, 0x00, 0x00, -}; -#pragma pop +static f32 lure_scale[] = {1.0f, 0.75f, 0.75f, 0.6f, 0.375f}; /* 804BB954-804BB968 000104 0014+00 0/1 0/0 0/0 .data lure_eye_off */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 lure_eye_off[20] = { - 0x40, 0x80, 0x00, 0x00, 0x41, 0x88, 0x00, 0x00, 0x41, 0x30, - 0x00, 0x00, 0x41, 0x84, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, -}; -#pragma pop +static f32 lure_eye_off[] = {4.0f, 17.0f, 11.0f, 16.5f, 4.0f}; /* 804BB968-804BB97C 000118 0014+00 0/1 0/0 0/0 .data hook_1_offy */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 hook_1_offy[20] = { - 0xC0, 0x60, 0x00, 0x00, 0xC0, 0x60, 0x00, 0x00, 0xC0, 0x60, - 0x00, 0x00, 0xC0, 0xA0, 0x00, 0x00, 0xC0, 0x60, 0x00, 0x00, -}; -#pragma pop +static f32 hook_1_offy[] = {-3.5f, -3.5f, -3.5f, -5.0f, -3.5f}; /* 804BB97C-804BB990 00012C 0014+00 0/1 0/0 0/0 .data hook_2_offz */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 hook_2_offz[20] = { - 0xC1, 0x80, 0x00, 0x00, 0xC1, 0x98, 0x00, 0x00, 0xC1, 0x80, - 0x00, 0x00, 0xC1, 0xB8, 0x00, 0x00, 0xC2, 0x2E, 0x00, 0x00, -}; -#pragma pop +static f32 hook_2_offz[] = {-16.0f, -19.0f, -16.0f, -23.0f, -43.5f}; /* 804BB990-804BB9A4 000140 0014+00 0/1 0/0 0/0 .data hook_2_offy */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 hook_2_offy[20] = { - 0x00, 0x00, 0x00, 0x00, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -#pragma pop +static f32 hook_2_offy[] = {0.0f, -1.0f, 0.0f, 0.0f, 0.0f}; /* 804BB9A4-804BB9B8 000154 0014+00 0/1 0/0 0/0 .data lure_nose_off */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 lure_nose_off[20] = { - 0xC0, 0x93, 0x33, 0x33, 0xC1, 0x84, 0xCC, 0xCD, 0xC1, 0x39, - 0x99, 0x9A, 0xC1, 0x8C, 0xCC, 0xCD, 0xC0, 0x26, 0x66, 0x66, -}; -#pragma pop +static f32 lure_nose_off[] = {-4.6f, -16.6f, -11.6f, -17.6f, -2.6f}; /* 804BB9B8-804BB9CC 000168 0014+00 0/1 0/0 0/0 .data hiton_off */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 hiton_off[20] = { - 0x40, 0x89, 0x99, 0x9A, 0x41, 0x82, 0x66, 0x66, 0x41, 0x34, - 0xCC, 0xCD, 0x41, 0x8A, 0x66, 0x66, 0x40, 0x13, 0x33, 0x34, -}; -#pragma pop +static f32 hiton_off[] = {4.3f, 16.3f, 11.3f, 17.3f, 2.3000002f}; -/* 804BB9CC-804BB9DC 00017C 0010+00 1/1 0/0 0/0 .data ax$7724 */ -SECTION_DATA static u8 ax[16] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xA0, 0x00, 0x00, 0xC1, 0xA0, 0x00, 0x00, -}; +/* 804B16B8-804B1D14 0081B8 065C+00 1/1 0/0 0/0 .text lure_disp__FP13dmg_rod_class */ +static void lure_disp(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + cXyz sp28; + cXyz sp1C; -/* 804BB9DC-804BB9EC 00018C 0010+00 1/1 0/0 0/0 .data az$7725 */ -SECTION_DATA static u8 az[16] = { - 0x41, 0xA0, 0x00, 0x00, 0xC1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; + if (i_this->action <= ACTION_LURE_STANDBY) { + mDoMtx_stack_c::XrotM((s16)actor->shape_angle.x); + mDoMtx_stack_c::YrotM((s16)actor->shape_angle.y); + mDoMtx_stack_c::ZrotM(actor->current.angle.z); + actor->current.angle.z += i_this->field_0x114e; -/* 804BB9EC-804BBA10 -00001 0024+00 1/1 0/0 0/0 .data @7881 */ -SECTION_DATA static void* lit_7881[9] = { - (void*)(((char*)lure_main__FP13dmg_rod_class) + 0x70), - (void*)(((char*)lure_main__FP13dmg_rod_class) + 0x84), - (void*)(((char*)lure_main__FP13dmg_rod_class) + 0x1B4), - (void*)(((char*)lure_main__FP13dmg_rod_class) + 0xAC), - (void*)(((char*)lure_main__FP13dmg_rod_class) + 0xD0), - (void*)(((char*)lure_main__FP13dmg_rod_class) + 0x118), - (void*)(((char*)lure_main__FP13dmg_rod_class) + 0x144), - (void*)(((char*)lure_main__FP13dmg_rod_class) + 0x16C), - (void*)(((char*)lure_main__FP13dmg_rod_class) + 0x190), -}; + if (i_this->field_0x578 & 0x80) { + cLib_addCalcAngleS2(&i_this->field_0x114e, 700, 8, 13); + } else { + cLib_addCalcAngleS2(&i_this->field_0x114e, -700, 8, 13); + } -/* 804BBA10-804BBA18 0001C0 0008+00 1/1 0/0 0/0 .data hook_size$8962 */ -SECTION_DATA static u8 hook_size[8] = { - 0x3F, 0x80, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, -}; + if (i_this->play_cam_mode >= 950 && i_this->play_cam_mode < 1000) { + i_this->field_0x1154 = lure_nose_off[i_this->lure_type]; + } else { + cLib_addCalc2(&i_this->field_0x1154, lure_nose_off[i_this->lure_type], 1.0f, 2.0f); + } + } else { + mDoMtx_stack_c::YrotM(actor->shape_angle.y + i_this->field_0x114c); + mDoMtx_stack_c::XrotM(actor->shape_angle.x + i_this->field_0x114a); -/* 804BBA18-804BBA30 0001C8 0018+00 1/1 0/0 0/0 .data rodline_p$10700 */ -SECTION_DATA static u8 rodline_p[24] = { - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, - 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0F, -}; + if (i_this->lure_type == MG_LURE_SP) { + mDoMtx_stack_c::transM(0.0f, 0.0f, 10.0f + nREG_F(3)); + mDoMtx_stack_c::YrotM(i_this->field_0x1004); + mDoMtx_stack_c::transM(0.0f, 0.0f, -(10.0f + nREG_F(3))); + } -/* 804BBA30-804BBA48 0001E0 0018+00 1/1 0/0 0/0 .data rodline_off$10701 */ -SECTION_DATA static u8 rodline_off[24] = { - 0x3F, 0x00, 0x00, 0x00, 0x3E, 0xCC, 0xCC, 0xCD, 0x3E, 0xB3, 0x33, 0x33, - 0x3E, 0x99, 0x99, 0x9A, 0x3E, 0x80, 0x00, 0x00, 0x3E, 0x4C, 0xCC, 0xCD, -}; + mDoMtx_stack_c::ZrotM(actor->shape_angle.z); + cLib_addCalc0(&i_this->field_0x1154, 1.0f, 2.0f); + } -/* 804BBA48-804BBA5C 0001F8 0014+00 0/1 0/0 0/0 .data lure_bmd$11119 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 lure_bmd[20] = { - 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0D, -}; -#pragma pop + f32 var_f31 = l_HIO.field_0x8 * lure_scale[i_this->lure_type]; + if (i_this->action == ACTION_LURE_CATCH) { + var_f31 *= 0.8f; + } -/* 804BBA5C-804BBA64 00020C 0008+00 0/1 0/0 0/0 .data hook_bmd$11201 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 hook_bmd[8] = { - 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x2B, -}; -#pragma pop + mDoMtx_stack_c::scaleM(var_f31, var_f31, var_f31); + mDoMtx_stack_c::transM(0.0f, 0.0f, i_this->field_0x1154 + WREG_F(14)); + i_this->lure_model[i_this->lure_type]->setBaseTRMtx(mDoMtx_stack_c::get()); + + sp28.set(0.0f, 0.0f, WREG_F(6) + lure_eye_off[i_this->lure_type]); + mDoMtx_stack_c::multVec(&sp28, &i_this->field_0x1010); -/* 804BBA64-804BBA6C 000214 0008+00 0/1 0/0 0/0 .data esa_bmd$11202 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 esa_bmd[8] = { - 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, -}; -#pragma pop + f32 var_f30 = 0.2f + WREG_F(5); + if (i_this->lure_type == MG_LURE_SP) { + var_f30 += 0.5f; + } -/* 804BBA6C-804BBAAC 00021C 0040+00 1/1 0/0 0/0 .data cc_sph_src$11380 */ -static dCcD_SrcSph cc_sph_src = { - { - {0x0, {{0x0, 0x0, 0x0}, {0x0, 0x0}, 0x49}}, // 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}, 5.0f} // mSph - } // mSphAttr -}; + mDoMtx_stack_c::push(); + + mDoMtx_stack_c::transM(0.0f, 0.0f, WREG_F(15) + hiton_off[i_this->lure_type]); + if (i_this->lure_type != 0) { + mDoMtx_stack_c::ZrotM(0x4000); + } + mDoMtx_stack_c::scaleM(var_f30, var_f30, var_f30); + i_this->ring_model->setBaseTRMtx(mDoMtx_stack_c::get()); + + mDoMtx_stack_c::pop(); + + if (i_this->lure_type != MG_LURE_FR) { + if (i_this->lure_type != MG_LURE_SP) { + mDoMtx_stack_c::push(); + mDoMtx_stack_c::transM(ZREG_F(0), ZREG_F(1) + hook_1_offy[i_this->lure_type], 1.0f + ZREG_F(2)); + mDoMtx_stack_c::multVecZero(&sp1C); + hook_set(i_this, &sp1C, 0); + mDoMtx_stack_c::pop(); + } + + mDoMtx_stack_c::transM(ZREG_F(3), ZREG_F(4) + hook_2_offy[i_this->lure_type], ZREG_F(5) + hook_2_offz[i_this->lure_type]); + mDoMtx_stack_c::multVecZero(&sp1C); + hook_set(i_this, &sp1C, 1); + return; + } + + if (i_this->action <= ACTION_LURE_STANDBY) { + i_this->field_0xff2 = 7000.0f + (i_this->field_0xff8 * cM_ssin(i_this->field_0x578 * 4000)); + + f32 var_f29 = (300.0f + KREG_F(12)) * (actor->current.pos - actor->old.pos).abs(); + if (var_f29 > 6000.0f) { + var_f29 = 6000.0f; + } + + if (var_f29 > i_this->field_0xff8) { + i_this->field_0xff8 = var_f29; + } + + cLib_addCalc2(&i_this->field_0xff8, 500.0f, 1.0f, 50.0f + KREG_F(13)); + return; + } + + if (i_this->action == ACTION_LURE_CAST) { + i_this->field_0xff2 = 7000.0f * cM_ssin(i_this->field_0x578 * 6000); + return; + } + + s16 spC = 2; + s16 spA = 0x400; + s16 sp8; + if (i_this->action == ACTION_LURE_ACTION && (actor->current.angle.z > 0x1000 || actor->current.angle.z < -0x1000)) { + i_this->field_0xff4 = 6000; + spC = 1; + spA = 0x800; + } else if (actor->speedF >= 0.5f) { + i_this->field_0xff4 = -4000.0f + (2000.0f * actor->speedF); + if (i_this->field_0xff4 > 7000) { + i_this->field_0xff4 = 7000; + } + i_this->field_0xff8 = 2500.0f; + sp8 = 0x800; + } else { + i_this->field_0xff4 = -5000; + } + + cLib_addCalcAngleS2(&i_this->field_0xff2, i_this->field_0xff4 + (s16)(i_this->field_0xff8 * cM_ssin(i_this->field_0x578 * 2000)), spC, spA); + cLib_addCalc2(&i_this->field_0xff8, 500.0f, 1.0f, 200.0f); +} + +/* 804B1D14-804B265C 008814 0948+00 2/1 0/0 0/0 .text lure_main__FP13dmg_rod_class */ +static void lure_main(dmg_rod_class* i_this) { + fopAc_ac_c* actor = (fopAc_ac_c*)&i_this->actor; + cXyz sp68; + cXyz sp5C; + + fopAc_ac_c* mgfish_a = fopAcM_SearchByID(i_this->mg_fish_id); + mg_fish_class* mgfish = (mg_fish_class*)mgfish_a; + + int sp20 = 0; + int sp1C = 1; + int sp18 = 0; + int sp14 = 1; + + switch (i_this->action) { + case ACTION_LURE_ONBOAT: + lure_onboat(i_this); + sp1C = 0; + sp14 = 0; + break; + case ACTION_LURE_STANDBY: + sp14 = lure_standby(i_this); + sp1C = 0; + dMeter2Info_onGameStatus(1); + break; + case ACTION_LURE_CAST: + lure_cast(i_this); + sp20 = 1; + dMeter2Info_onGameStatus(1); + break; + case ACTION_LURE_ACTION: + lure_action(i_this); + sp20 = 1; + dComIfGp_setCStickStatusForce(91, 2, 0); + dMeter2Info_onGameStatus(1); + sp18 = 1; + break; + case ACTION_LURE_HIT: + lure_hit(i_this, mgfish); + sp20 = 1; + sp1C = 0; + dMeter2Info_onGameStatus(1); + sp18 = 1; + break; + case ACTION_LURE_CATCH: + lure_catch(i_this); + sp20 = 1; + sp1C = 0; + dMeter2Info_onGameStatus(1); + break; + case ACTION_LURE_BARE: + lure_bare(i_this); + sp1C = 0; + dMeter2Info_onGameStatus(1); + break; + case ACTION_LURE_HEART: + lure_heart(i_this); + sp20 = 1; + sp1C = 0; + dMeter2Info_onGameStatus(1); + break; + } + + if (sp18 != 0 && i_this->rod_stick_x > 0.0f) { + i_this->rod_stick_x *= 0.7f; + } + + if (i_this->lure_type == MG_LURE_WS) { + i_this->field_0x101c[0] += i_this->field_0x1020; + i_this->field_0x101e += i_this->field_0x1022; + + if (i_this->action == ACTION_LURE_CAST) { + i_this->field_0x1020 = 8000; + i_this->field_0x1022 = -8000; + } else if (i_this->action == ACTION_LURE_HIT) { + if ((i_this->field_0x578 & 7) == 0 && cM_rndF(1.0f) < 0.35f) { + i_this->field_0x1020 = -(3000.0f + cM_rndF(3000.0f)); + } + + if ((i_this->field_0x578 & 7) == 7 && cM_rndF(1.0f) < 0.35f) { + i_this->field_0x1022 = 3000.0f + cM_rndF(3000.0f); + } + } + + cLib_addCalcAngleS2(&i_this->field_0x1020, 0, 1, 500); + cLib_addCalcAngleS2(&i_this->field_0x1022, 0, 1, 500); + } + + if (sp20 != 0) { + dComIfGp_att_LookRequest(actor, 400.0f, 300.0f, -300.0f, 0x6000, 1); + } + + cXyz sp50; + if (i_this->field_0x10a5 != 0) { + i_this->field_0x10a5--; + if (i_this->field_0x10a5 == 0) { + i_this->action = ACTION_LURE_ACTION; + i_this->field_0x1006 = 0; + OS_REPORT(" MG ROD noo 3!!! \n"); + } + } + + if (i_this->action == ACTION_LURE_ACTION || i_this->action == ACTION_LURE_CAST) { + f32 temp_f31 = 3.0f + VREG_F(11); + actor->current.pos.y -= temp_f31; + actor->old.pos.y -= temp_f31; + i_this->acch.CrrPos(dComIfG_Bgsp()); + actor->current.pos.y += temp_f31; + actor->old.pos.y += temp_f31; + + if (i_this->acch.ChkWallHit()) { + i_this->field_0x13a8++; + + dBgS_LinChk sp78; + sp78.SetRope(); + + for (int i = 0; i < 4; i++) { + static f32 ax[] = {0.0f, 0.0f, 20.0f, -20.0f}; + static f32 az[] = {20.0f, -20.0f, 0.0f, -0.0f}; + + sp5C.x = actor->current.pos.x + ax[i]; + sp5C.y = actor->current.pos.y; + sp5C.z = actor->current.pos.z + az[i]; + sp78.Set(&actor->current.pos, &sp5C, actor); + + if (dComIfG_Bgsp().LineCross(&sp78)) { + actor->current.pos.x -= 0.05f * ax[i]; + actor->current.pos.z -= 0.05f * az[i]; + break; + } + } + } else { + i_this->field_0x13a8 = 0; + } + + if (actor->current.pos.y <= i_this->field_0x590) { + if (i_this->field_0x100d == 0) { + i_this->field_0x100d = 1; + i_this->field_0x1009 = 30; + i_this->field_0x10a4 = 50; + + if (sp1C != 0) { + if (i_this->field_0x10a9 != 0) { + i_this->sound.startCreatureSound(Z2SE_AL_FISH_JUMP_DOWN, 0, -1); + sp68 = actor->current.pos; + sp68.y = i_this->field_0x590; + fopKyM_createWpillar(&sp68, 1.5f, 0); + } else { + sibuki_set(i_this, 0.25f, &actor->current.pos, 1); + i_this->sound.startCreatureSound(Z2SE_AL_FISH_JUMP_UP_S, 0, -1); + } + + if (actor->speed.y <= -20.0f + VREG_F(0)) { + actor->speed.y = -10.0f + VREG_F(0); + } else { + actor->speed.y = 0.0f; + } + + dKy_Sound_set(actor->current.pos, 5, fopAcM_GetID(i_this), 5); + if (actor->speedF > 5.0f) { + actor->speedF = 5.0f; + } + } + } + } else if (i_this->field_0x100d != 0) { + i_this->field_0x100d = 0; + if (cM_rndF(1.0f) < 0.5f) { + actor->current.angle.z = -0x5000; + } else { + actor->current.angle.z = 0x5000; + } + } + + if (i_this->field_0x100d != 0) { + sp50 = actor->current.pos; + sp50.y = i_this->field_0x590; + + f32 var_f30; + if (fabsf(actor->speedF) >= 2.0f) { + var_f30 = 0.2f + KREG_F(1); + } else { + var_f30 = 0.05f + KREG_F(0); + } + + f32 var_f29; + if (i_this->field_0x10a9 != 0) { + var_f29 = 1.2f; + } else { + var_f29 = 0.3f; + } + + fopAcM_effHamonSet(&i_this->field_0x1178, &sp50, var_f29, var_f30); + } + } else if (i_this->action == ACTION_LURE_HIT) { + i_this->field_0x100d = 1; + sp68 = i_this->field_0x6ac - actor->current.pos; + + sp50.x = actor->current.pos.x + ((i_this->field_0x590 - actor->current.pos.y) / std::tan(cM_atan2f(sp68.y, sp68.x))); + sp50.z = actor->current.pos.z + ((i_this->field_0x590 - actor->current.pos.y) / std::tan(cM_atan2f(sp68.y, sp68.z))); + sp50.y = i_this->field_0x590; + fopAcM_effHamonSet(&i_this->field_0x1178, &sp50, 0.3f + KREG_F(12), 0.3f + KREG_F(13)); + } + + cLib_addCalcAngleS2(&actor->shape_angle.y, actor->current.angle.y + i_this->field_0xffc, 2, 0x2000); + cLib_addCalcAngleS2(&actor->shape_angle.x, actor->current.angle.x + i_this->field_0x1000, 2, 0x2000); + cLib_addCalcAngleS2(&actor->shape_angle.z, actor->current.angle.z, 2, 0x1000); + + mDoMtx_stack_c::transS(actor->current.pos.x, actor->current.pos.y + i_this->field_0x59c + (i_this->field_0x598 * cM_ssin(i_this->field_0x578 * 5000)), actor->current.pos.z); + cLib_addCalc0(&i_this->field_0x598, 1.0f, 0.05f); + + lure_disp(i_this); + + if (sp14 != 0) { + line_control2(i_this); + cXyz sp44 = i_this->mg_line.pos[0] - i_this->mg_line.pos[1]; + i_this->field_0xf60 = sp44.abs(); + } +} + +/* 804B265C-804B2C54 00915C 05F8+00 4/4 0/0 0/0 .text uki_calc__FP13dmg_rod_class */ +static int uki_calc(dmg_rod_class* i_this) { + fopAc_ac_c* actor = (fopAc_ac_c*)&i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp68; + cXyz sp5C; + + int var_r28 = 0; + + if (dComIfGp_checkPlayerStatus0(0, 0x100000)) { + i_this->field_0x1165 = 30; + i_this->field_0x100d = 0; + } + + if (i_this->hook_pos.y < 10.0f + i_this->field_0x590 + BREG_F(12) && depth_check(i_this, &i_this->hook_pos) > 0.0f) { + if (i_this->field_0x100d == 0) { + i_this->field_0x100d = 1; + if (i_this->field_0x1165 == 0) { + sp68.x = i_this->hook_pos.x; + sp68.y = i_this->field_0x590; + sp68.z = i_this->hook_pos.z; + fopKyM_createWpillar(&sp68, 0.2f, 0); + i_this->field_0x1165 = 20; + i_this->sound.startCreatureSound(Z2SE_AL_UKI_IN_WATER, 0, -1); + } + + i_this->field_0x108a = 2500.0f + cM_rndF(2500.0f); + i_this->field_0x108c = 800.0f + cM_rndF(400.0f); + if (cM_rndF(1.0f) < 0.5f) { + i_this->field_0x108c *= -1; + } + } + + if (i_this->field_0x10a5 != 0 || abs(i_this->field_0x1084.x) < 0x3000 || i_this->field_0x10a2 > 2000) { + cXyz sp50(i_this->hook_pos); + sp50.y = i_this->field_0x590; + fopAcM_effHamonSet(&i_this->field_0x1178, &sp50, 0.2f + KREG_F(2), 0.05f + KREG_F(0)); + } + + if (i_this->field_0x590 - i_this->mg_line.pos[85].y > 45.0f + BREG_F(11)) { + cLib_addCalcAngleS2(&i_this->field_0x108a, 0, 8, WREG_S(0) + 50); + if (i_this->field_0x108a > WREG_S(0) + 10) { + i_this->field_0x108e += i_this->field_0x108c; + } + cLib_addCalc2(&i_this->field_0x1090, 0.5f + AREG_F(10), 1.0f, 0.01f + AREG_F(11)); + } else { + i_this->field_0x1090 = 0.0f; + } + } else { + if (i_this->field_0x100d != 0 && i_this->field_0x1165 == 0) { + sp68.x = i_this->hook_pos.x; + sp68.y = i_this->field_0x590; + sp68.z = i_this->hook_pos.z; + fopKyM_createWpillar(&sp68, 0.2f, 0); + i_this->field_0x1165 = 20; + i_this->sound.startCreatureSound(Z2SE_AL_UKI_OUT_WATER, 0, -1); + } + + i_this->field_0x1090 = -10.0f; + i_this->field_0x100d = 0; + cLib_addCalcAngleS2(&i_this->field_0x108a, 0, 2, 100); + } + + cXyz sp44; + if (i_this->action == ACTION_UKI_CATCH) { + sp44 = i_this->mg_line.pos[TREG_S(9) + BREG_S(9) + 51]; + } else { + sp44 = i_this->mg_line.pos[TREG_S(9) + BREG_S(6) + 68]; + } + + cXyz sp38; + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp68.x = 0.0f; + sp68.y = 0.0f; + sp68.z = 0.2f + YREG_F(8); + MtxPosition(&sp68, &sp38); + + f32 temp_f30 = sp38.x + (i_this->hook_pos.x - sp44.x); + dBgS_GndChk spE8; + Vec sp2C; + sp2C.x = i_this->hook_pos.x; + sp2C.y = 50.0f + i_this->hook_pos.y; + sp2C.z = i_this->hook_pos.z; + spE8.SetPos(&sp2C); + + f32 var_f31 = KREG_F(17) + (17.0f + dComIfG_Bgsp().GroundCross(&spE8)); + if (var_f31 < (5.0f + i_this->field_0x590 + AREG_F(18))) { + if (i_this->action < ACTION_UKI_HIT) { + var_f31 = 5.0f + i_this->field_0x590 + AREG_F(18); + } + } else { + var_r28 = 1; + } + + f32 var_f28 = i_this->hook_pos.y + i_this->field_0x1090; + if (var_f28 < var_f31) { + var_f28 = var_f31; + } else { + var_r28 = 0; + } + + f32 temp_f27 = var_f28 - sp44.y; + f32 temp_f29 = sp38.z + (i_this->hook_pos.z - sp44.z); + + s16 temp_r0 = -cM_atan2s(temp_f27, JMAFastSqrt(SQUARE(temp_f30) + SQUARE(temp_f29))); + s16 sp8; + if (temp_r0 > 0 || i_this->field_0x1090 > 0.0f || i_this->action >= ACTION_UKI_HIT) { + if (temp_r0 > 0 || i_this->action >= ACTION_UKI_HIT) { + sp8 = 0x800; + } else { + sp8 = 4096.0f * i_this->field_0x1090; + } + cLib_addCalcAngleS2(&i_this->field_0x1084.x, temp_r0, 2, sp8); + } + + cLib_addCalcAngleS2(&i_this->field_0x1084.y, (s16)cM_atan2s(temp_f30, temp_f29), 2, 0x800); + cMtx_YrotS(*calc_mtx, i_this->field_0x1084.y); + cMtx_XrotM(*calc_mtx, i_this->field_0x1084.x); + sp68.set(0.0f, 0.0f, 6.5f + XREG_F(8)); + MtxPosition(&sp68, &sp5C); + i_this->hook_pos = sp44 + sp5C; + + if (i_this->field_0x6e0 > 0.1f) { + dBgS_LinChk sp78; + sp78.SetRope(); + sp78.Set(&i_this->field_0x106c, &i_this->hook_pos, actor); + if (dComIfG_Bgsp().LineCross(&sp78)) { + OS_REPORT(" UKI WALL HIT \n"); + i_this->field_0x6e0 = -0.5f; + i_this->hook_pos = i_this->field_0x106c; + } + } + + i_this->field_0x106c = i_this->hook_pos; + return var_r28; +} + +/* 804B2C54-804B30E8 009754 0494+00 1/1 0/0 0/0 .text uki_ready__FP13dmg_rod_class */ +static void uki_ready(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0); + cXyz sp24; + cXyz sp18; + + u32 sp8 = daAlink_getAlinkActorClass()->checkFishingRodUseStart(); + + i_this->field_0x1508 = 1.0f; + sp24 = i_this->field_0x6c8 - i_this->field_0x6d4; + sp18.x = 0.0666667f * (i_this->field_0x6a0 * sp24.abs()); + if (sp18.x > (10.0f + ZREG_F(2))) { + sp18.z = sp18.x * (5.0f + ZREG_F(3)); + if (sp18.z > 100.0f) { + sp18.z = 100.0f; + } + sp18.y = sp18.z; + } else { + sp24.x = player->speedF * (2.0f + ZREG_F(4)); + sp18.z = 30.0f + ZREG_F(5) + sp24.x + (sp24.x * cM_ssin(i_this->field_0x578 * (ZREG_S(2) + 4000))); + if (sp18.z > 100.0f) { + sp18.z = 100.0f; + } + sp18.y = 10.0f + ZREG_F(6); + } + + cLib_addCalc2(&i_this->field_0x6f8, sp18.z, 1.0f, sp18.y); + + MTXCopy(daAlink_getAlinkActorClass()->getLeftItemMatrix(), *calc_mtx); + sp24.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp24, &sp18); + + if (i_this->timers[3] != 0) { + actor->current.pos = sp18; + } else { + cLib_addCalc2(&actor->current.pos.x, sp18.x, 1.0f, i_this->field_0x1094); + cLib_addCalc2(&actor->current.pos.y, sp18.y, 1.0f, i_this->field_0x1094); + cLib_addCalc2(&actor->current.pos.z, sp18.z, 1.0f, i_this->field_0x1094); + cLib_addCalc2(&i_this->field_0x1094, 200.0f, 1.0f, 10.0f); + } + + line_control2_u(i_this); + uki_calc(i_this); + + cLib_addCalc2(&i_this->field_0xf64, -30.0f + ZREG_F(1), 1.0f, 0.5f + BREG_F(14)); + cLib_addCalc2(&i_this->field_0xf68, -(20.0f + AREG_F(10)), 1.0f, 0.02f * (20.0f + AREG_F(10))); + + if (i_this->timers[0] != 0 || dComIfGp_event_runCheck() != 0 || i_this->play_cam_mode >= 1000 || (henna != NULL && henna->field_0x752 != 0) || dComIfGp_checkPlayerStatus0(0, 0x100000)) { + return; + } + + if (daAlink_getAlinkActorClass()->checkFishingRodUseAccept() && player->speedF < 1.0f && i_this->rod_substick_y < -0.9f) { + i_this->field_0x14e4++; + if (i_this->field_0x14e4 > 6) { + i_this->play_cam_mode = 1; + } + } else { + i_this->field_0x14e4 = 0; + } + + if (sp8 != 0) { + i_this->play_cam_mode = 1; + } + + if (i_this->play_cam_mode != 0) { + daAlink_getAlinkActorClass()->startFishingCastWait(); + i_this->action = ACTION_UKI_STANDBY; + i_this->field_0x6e0 = 0.0f; + i_this->field_0x1504 = 0.0f; + i_this->field_0x1418 = player->shape_angle.y - dCam_getControledAngleY(dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0))); + i_this->timers[0] = 20; + i_this->field_0x102e = 0; + daAlink_getAlinkActorClass()->seStartOnlyReverb(Z2SE_AL_ROD_SWING_UKI); + i_this->timers[6] = 20; + i_this->cast_power = 1.0f; + i_this->field_0x6e0 = 1.0f; + i_this->field_0xf68 = 0.0f; + i_this->field_0xf64 = 0.0f; + } +} + +/* 804B30E8-804B31D8 009BE8 00F0+00 1/1 0/0 0/0 .text uki_rod_bg_check__FP13dmg_rod_class + */ +static BOOL uki_rod_bg_check(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + + dBgS_LinChk sp20; + sp20.SetRope(); + + cXyz sp14; + cXyz sp8; + sp14 = player->current.pos; + sp14.y += 100.0f; + sp8 = i_this->field_0x6ac; + sp8.y += 30.0f + YREG_F(1); + + sp20.Set(&sp14, &sp8, actor); + if (dComIfG_Bgsp().LineCross(&sp20)) { + return TRUE; + } else { + return FALSE; + } +} + +/* 804B31D8-804B345C 009CD8 0284+00 3/3 0/0 0/0 .text uki_pl_arm_calc__FP13dmg_rod_class + */ +static void uki_pl_arm_calc(dmg_rod_class* i_this) { + fopAc_ac_c* temp_r28 = dComIfGp_getPlayer(0); + csXyz sp10; + csXyz sp8; + + if (i_this->action == ACTION_UKI_STANDBY) { + f32 var_f30 = i_this->hook_pos.y; + if (var_f30 < i_this->field_0x590) { + var_f30 = i_this->field_0x590; + } + + f32 var_f31 = temp_r28->current.pos.y - var_f30; + if (var_f31 > 100.0f + hREG_F(16)) { + var_f31 = temp_r28->current.pos.y - i_this->field_0x590; + var_f31 -= 100.0f + hREG_F(16); + var_f31 *= 5.0f + hREG_F(17); + if (var_f31 > 1000.0f) { + var_f31 = 1000.0f; + } + } else { + var_f31 = 0.0f; + } + cLib_addCalc2(&i_this->field_0x1504, var_f31, 0.1f, 20.0f); + } else { + i_this->field_0x1504 = 0.0f; + } + + sp8.x = 0; + sp8.y = ((1000.0f + (6000.0f + WREG_S(1))) - 300.0f) + (5.0f * i_this->field_0x1504); + sp8.z = (300.0f + ((-3500.0f + WREG_S(2)) - 1000.0f)) - (3.0f * i_this->field_0x1504); + + sp10.x = 0; + sp10.y = WREG_S(4) - 5000; + sp10.z = WREG_S(5) + 2000; + + sp8.y += (s16)(-15000.0f * i_this->field_0x1508); + sp8.z += (s16)(3500.0f * i_this->field_0x1508); + + sp10.y += (s16)(-4000.0f * i_this->field_0x1508); + sp10.z += (s16)((3500.0f * i_this->field_0x1508) + ((-11000.0f + WREG_F(8)) * (i_this->field_0x150c * i_this->field_0x1508))); + + if (i_this->action == ACTION_UKI_HIT && i_this->field_0xf60 > 140.0f + JREG_F(14)) { + sp8.y += (s16)((50.0f + nREG_F(0)) * cM_ssin(i_this->field_0x578 * 0x6200)); + sp8.z += (s16)((50.0f + nREG_F(0)) * cM_ssin(i_this->field_0x578 * 0x6500)); + daAlink_getAlinkActorClass()->seStartOnlyReverbLevel(Z2SE_AL_ROD_BEND); + } + + daAlink_getAlinkActorClass()->setFishingArm1Angle(sp8); + daAlink_getAlinkActorClass()->setFishingArm2Angle(sp10); +} + +/* 804B345C-804B3B7C 009F5C 0720+00 1/1 0/0 0/0 .text uki_standby__FP13dmg_rod_class */ +static void uki_standby(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp30; + cXyz sp24; + + dComIfGp_setDoStatusForce(42, 0); + + f32 var_f31 = -(i_this->rod_substick_y * (1.05f + AREG_F(13))); + f32 temp_f30 = i_this->rod_substick_x; + if (var_f31 < 0.0f) { + var_f31 = 0.0f; + } + + cLib_addCalc2(&i_this->field_0x1508, var_f31, 0.5f, 0.2f); + cLib_addCalc2(&i_this->field_0x150c, temp_f30, 0.5f, 0.2f); + + if (i_this->field_0x1508 > 0.3f && i_this->play_cam_mode < 5) { + i_this->field_0x1418 += (s16)((-500.0f + VREG_F(3)) * mDoCPd_c::getStickX3D(PAD_1)); + } + + cMtx_YrotS(*calc_mtx, i_this->field_0x1418); + sp30.x = 0.0f; + sp30.y = 0.0f; + sp30.z = 1.0f; + MtxPosition(&sp30, &sp24); + i_this->rod_stick_x = -sp24.x; + i_this->rod_stick_y = sp24.z; + + uki_pl_arm_calc(i_this); + + sp30 = i_this->field_0x6c8 - i_this->field_0x6d4; + sp24.x = 0.0666667f * (i_this->field_0x6a0 * sp30.abs()); + if (sp24.x > 10.0f + ZREG_F(2)) { + sp24.z = sp24.x * (5.0f + ZREG_F(3)); + if (sp24.z > 100.0f) { + sp24.z = 100.0f; + } + sp24.y = sp24.z; + } else { + sp30.x = player->speedF * (2.0f + ZREG_F(4)); + sp24.z = 30.0f + ZREG_F(5) + sp30.x + (sp30.x * cM_ssin(i_this->field_0x578 * (ZREG_S(2) + 4000))); + if (sp24.z > 100.0f) { + sp24.z = 100.0f; + } + sp24.y = 10.0f + ZREG_F(6); + } + + cLib_addCalc2(&i_this->field_0x6f8, sp24.z, 1.0f, sp24.y); + + if (i_this->field_0x10a5 == 0) { + actor->current.pos = i_this->field_0x764; + if (actor->current.pos.y <= (10.0f + i_this->field_0x590) && actor->old.pos.y > (10.0f + i_this->field_0x590)) { + sp30.x = actor->current.pos.x; + sp30.y = i_this->field_0x590; + sp30.z = actor->current.pos.z; + fopKyM_createWpillar(&sp30, 0.1f, 0); + } + } + + actor->eyePos = i_this->hook_pos; + + BOOL sp8 = 0; + if (i_this->prev_rod_substick_y < 0.0f) { + if (i_this->rod_substick_y - i_this->prev_rod_substick_y >= 0.2f) { + sp8 = 1; + i_this->cast_power = fabsf(i_this->prev_rod_substick_y); + i_this->cast_power *= i_this->cast_power; + if (i_this->cast_power < 0.2f) { + i_this->cast_power = 0.2f; + } + + if (i_this->field_0x1508 > 0.7f) { + daAlink_getAlinkActorClass()->seStartOnlyReverb(Z2SE_AL_ROD_SWING_UKI); + } + } + } + + if (sp8 != 0) { + i_this->field_0x6e0 = i_this->cast_power; + i_this->field_0xf68 = 0.0f; + i_this->field_0xf64 = 0.0f; + } + + uki_calc(i_this); + + cLib_addCalc0(&i_this->field_0x6e0, 1.0f, 0.02f + BREG_F(18)); + cLib_addCalc2(&i_this->field_0xf64, -30.0f + ZREG_F(1), 1.0f, 0.5f + BREG_F(14)); + cLib_addCalc2(&i_this->field_0xf68, -(10.0f + AREG_F(10)), 1.0f, 0.01f * (10.0f + AREG_F(10))); + + f32 temp_f29 = (player->current.pos - i_this->hook_pos).abs(); + if (temp_f29 >= YREG_F(18) && i_this->field_0x1508 < 0.5f && i_this->field_0x100d != 0) { + if (i_this->timers[1] == 0 && i_this->play_cam_mode < 5) { + i_this->play_cam_mode = 5; + i_this->timers[1] = 15; + i_this->field_0xf68 = 0.0f; + Z2GetAudioMgr()->changeFishingBgm(1); + } + } else if (i_this->timers[1] == 0 && i_this->play_cam_mode >= 5) { + i_this->play_cam_mode = 3; + i_this->timers[1] = 15; + Z2GetAudioMgr()->changeFishingBgm(0); + } + + if (mDoCPd_c::getTrigA(PAD_1)) { + i_this->play_cam_mode = 90; + Z2GetAudioMgr()->changeFishingBgm(0); + } + + if (i_this->timers[0] == 0 && (dComIfGp_checkPlayerStatus0(0, 0x100000) || i_this->ccSph.ChkCoHit() || dComIfGp_event_runCheck() != 0 || uki_rod_bg_check(i_this) || (i_this->field_0x100d == 0 && player->current.pos.y - actor->current.pos.y > (350.0f + nREG_F(11))) || i_this->field_0x102e != 0)) { + i_this->play_cam_mode = 90; + } + + if (i_this->play_cam_mode == 90) { + i_this->action = ACTION_UKI_READY; + daAlink_getAlinkActorClass()->endFishingCastWait(); + i_this->field_0x1094 = 0.0f; + i_this->field_0x6e0 = 0.0f; + i_this->field_0x10a5 = 0; + } +} + +/* 804B3B7C-804B40B8 00A67C 053C+00 1/1 0/0 0/0 .text uki_hit__FP13dmg_rod_class */ +static void uki_hit(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp54; + cXyz sp48; + fopAc_ac_c* mgfish_a = fopAcM_SearchByID(i_this->mg_fish_id); + mg_fish_class* mgfish = (mg_fish_class*)mgfish_a; + + actor->eyePos.x = i_this->hook_pos.x; + actor->eyePos.z = i_this->hook_pos.z; + actor->eyePos.y = i_this->field_0x590; + + int sp18 = 0; + int sp14 = 0; + + f32 var_f29 = -i_this->rod_substick_y; + f32 temp_f27 = i_this->rod_substick_x; + if (var_f29 < 0.0f) { + var_f29 = 0.0f; + } + + cLib_addCalc2(&i_this->field_0x1508, var_f29, 0.5f, 0.2f); + cLib_addCalc2(&i_this->field_0x150c, temp_f27, 0.5f, 0.2f); + + i_this->rod_stick_x = 0.0f; + i_this->rod_stick_y = 0.0f; + uki_pl_arm_calc(i_this); + + if (i_this->field_0x1508 > 0.5f) { + f32 var_f31 = (i_this->field_0x1508 - 0.5f); + var_f31 *= (20.0f + JREG_F(17)); + if (var_f31 > 6.0f + JREG_F(19)) { + var_f31 = 6.0f + JREG_F(19); + } + + s16 spA = (-15000.0f + TREG_F(14)) * (i_this->field_0x150c * i_this->field_0x1508); + cMtx_YrotS(*calc_mtx, player->shape_angle.y + spA); + sp54.x = 0.0f; + sp54.y = 0.0f; + sp54.z = 150.0f + TREG_F(13); + MtxPosition(&sp54, &sp48); + sp48 += player->current.pos; + + sp54.x = (sp48.x - actor->current.pos.x); + sp54.z = (sp48.z - actor->current.pos.z); + + s16 sp8 = cM_atan2s(sp54.x, sp54.z); + f32 var_f30 = 0.01f * JMAFastSqrt(SQUARE(sp54.x) + SQUARE(sp54.z)); + if (var_f30 > 1.0f) { + var_f30 = 1.0f; + } + + if (mgfish->mJointScale > 0.55f) { + var_f30 *= mgfish->mJointScale * (1.1f + (6.0f * (mgfish->mJointScale - 0.55f))); + } + + cMtx_YrotS(*calc_mtx, sp8); + sp54.x = 0.0f; + sp54.y = 0.0f; + sp54.z = var_f31 * var_f30; + MtxPosition(&sp54, &sp48); + mgfish->actor.current.pos += sp48; + + for (int i = 0; i <= mgfish->mNumJoints; i++) { + mgfish->mJointTranslations[i] += sp48; + } + + if (i_this->timers[5] == 0 || i_this->field_0x590 - mgfish_a->current.pos.y > 300.0f) { + cLib_addCalc2(&mgfish_a->current.pos.y, 100.0f + i_this->field_0x590, 0.5f, var_f31 * (0.7f + JREG_F(6))); + if (mgfish_a->current.pos.y > (i_this->field_0x590 - (KREG_F(11) * mgfish->mJointScale))) { + sp18 = 1; + } + } + + i_this->timers[3] = 20; + } else if (i_this->timers[3] == 0 && i_this->field_0x1508 < 0.3f) { + sp14 = 1; + } + + if (sp14 != 0 || i_this->timers[2] == 0) { + i_this->action = ACTION_UKI_STANDBY; + i_this->field_0x6e0 = 0.0f; + i_this->timers[0] = 20; + i_this->play_cam_mode = 2; + i_this->field_0x10a5 = 0; + i_this->field_0x1090 = 0.0f; + + mgfish->mCurAction = 0; + mgfish->mActionPhase = 0; + if (mgfish->mCaughtType == MG_CATCH_SG) { + e_sg_class* sg = (e_sg_class*)fopAcM_SearchByID(mgfish->mSkullfishId); + sg->mInactive = 0; + } + + mgfish->mCaughtType = MG_CATCH_FISH; + mgfish->field_0x62e = 300.0f + cM_rndF(200.0f); + Z2GetAudioMgr()->changeFishingBgm(1); + return; + } + + f32 var_f28 = i_this->field_0xf60 * (1.3f + JREG_F(11)); + if (var_f28 > 280.0f + TREG_F(2)) { + var_f28 = 280.0f + TREG_F(2); + } + + cLib_addCalc2(&i_this->field_0x6f8, var_f28, 0.2f, 50.0f); + + uki_calc(i_this); + + cLib_addCalc0(&i_this->field_0x6e0, 1.0f, 0.02f + BREG_F(18)); + cLib_addCalc2(&i_this->field_0xf64, -30.0f + ZREG_F(1), 1.0f, 0.5f + BREG_F(14)); + cLib_addCalc2(&i_this->field_0xf68, -(10.0f + AREG_F(10)), 1.0f, 0.01f * (10.0f + AREG_F(10))); + + cXyz sp3C; + sp54 = i_this->field_0x6ac - actor->current.pos; + sp3C.x = actor->current.pos.x + ((i_this->field_0x590 - actor->current.pos.y) / std::tan(cM_atan2f(sp54.y, sp54.x))); + sp3C.z = actor->current.pos.z + ((i_this->field_0x590 - actor->current.pos.y) / std::tan(cM_atan2f(sp54.y, sp54.z))); + sp3C.y = i_this->field_0x590; + fopAcM_effHamonSet(&i_this->field_0x1178, &sp3C, 0.3f + KREG_F(12), 0.3f + KREG_F(13)); + + if (sp18 != 0) { + dComIfGp_getVibration().StartShock(4, 1, cXyz(0.0f, 1.0f, 0.0f)); + mgfish->mCurAction = 72; + mgfish->mActionPhase = 0; + mgfish->field_0x624[0] = 6; + + i_this->action = ACTION_UKI_CATCH; + i_this->play_cam_mode = 20; + i_this->play_cam_timer = 0; + i_this->field_0x1410 = 0.0f; + i_this->field_0x146d = 0; + i_this->field_0x14fc = 0; + } +} + +/* 804B40B8-804B41A0 00ABB8 00E8+00 1/1 0/0 0/0 .text bb_get__FP13dmg_rod_class */ +static int bb_get(dmg_rod_class* i_this) { + for (int i = 0; i < 3; i++) { + u8 itemno = dComIfGs_getItem(i + 15, false); + if (itemno != fpcNm_ITEM_NONE) { + if (itemno == fpcNm_ITEM_BOMB_BAG_LV1) { + dComIfGs_setEmptyBombBagItemIn(fpcNm_ITEM_WATER_BOMB, 1, true); + return 1; + } else if (itemno == fpcNm_ITEM_WATER_BOMB) { + if (dComIfGs_getBombNum(i) < dComIfGs_getBombMax(itemno)) { + dComIfGp_setItemBombNumCount(i, 1); + return 1; + } + } + } + } + + return 0; +} + +/* 804B41A0-804B4A94 00ACA0 08F4+00 1/1 0/0 0/0 .text uki_catch__FP13dmg_rod_class */ +static void uki_catch(dmg_rod_class* i_this) { + fopAc_ac_c* actor = (fopAc_ac_c*)&i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp20; + cXyz sp14; + + fopAc_ac_c* mgfish_a = fopAcM_SearchByID(i_this->mg_fish_id); + mg_fish_class* mgfish = (mg_fish_class*)mgfish_a; + u8 fish_kind = mgfish->mKind2; + + s16 fish_size; + if (data_804BBBD4 == 1) { + fish_size = 39.37008f * mgfish->mJointScale; + } else { + fish_size = 100.0f * mgfish->mJointScale; + } + + if (data_804BBBD4 == 2) { + f32 temp_f31 = fish_size / 2.54f; + f32 var_f30 = dComIfGs_getFishSize(fish_kind) / 2.54f; + if ((u8)temp_f31 > (u8)var_f30) { + i_this->field_0x14c0 = 1; + } else { + i_this->field_0x14c0 = 0; + } + } else if ((u8)fish_size > dComIfGs_getFishSize(fish_kind)) { + i_this->field_0x14c0 = 1; + } else { + i_this->field_0x14c0 = 0; + } + + i_this->rod_stick_x = 0.0f; + i_this->rod_stick_y = 0.0f; + + if (i_this->play_cam_mode == 20 && i_this->play_cam_timer < 26) { + cLib_addCalc2(&i_this->field_0x1508, 1.2f, 0.5f, 0.3f); + cLib_addCalcAngleS2(&i_this->field_0x14fc, -700, 2, 200); + } else { + cLib_addCalc2(&i_this->field_0x1508, 0.8f, 0.3f, 0.15f); + cLib_addCalcAngleS2(&i_this->field_0x14fc, 0, 1, 100); + } + + cLib_addCalc0(&i_this->field_0x150c, 0.5f, 0.5f); + uki_pl_arm_calc(i_this); + + i_this->field_0x6f8 = 200.0f + YREG_F(18); + if (l_HIO.force_fish_msg_output != 0) { + fish_kind = l_HIO.force_fish_msg_output - 1; + } + + if (mgfish->mCaughtType == MG_CATCH_BT || mgfish->mCaughtType == MG_CATCH_KN || mgfish->mCaughtType == MG_CATCH_ED || mgfish->mCaughtType == MG_CATCH_SY) { + if (i_this->play_cam_timer == 80) { + Z2GetAudioMgr()->subBgmStart(Z2BGM_FISHING_GET3); + if (cM_rndF(1.0f) < 0.5f) { + daAlink_getAlinkActorClass()->changeFishGetFace(3); + } else { + daAlink_getAlinkActorClass()->changeFishGetFace(4); + } + } + } else if (i_this->play_cam_timer == 40) { + if (fish_kind == 4 || mgfish->mCaughtType == MG_CATCH_SP || mgfish->mCaughtType == MG_CATCH_BB || mgfish->mCaughtType == MG_CATCH_BIN || mgfish->mCaughtType == MG_CATCH_LH) { + Z2GetAudioMgr()->subBgmStart(Z2BGM_FISHING_GET1); + daAlink_getAlinkActorClass()->changeFishGetFace(2); + } else if (i_this->field_0x14c0 != 0 || dComIfGs_getFishSize(fish_kind) == 0) { + Z2GetAudioMgr()->subBgmStart(Z2BGM_FISHING_GET1); + daAlink_getAlinkActorClass()->changeFishGetFace(2); + } else { + Z2GetAudioMgr()->subBgmStart(Z2BGM_FISHING_GET2); + daAlink_getAlinkActorClass()->changeFishGetFace(1); + } + } + + if (i_this->play_cam_timer >= 50) { + if (i_this->field_0x146d == 0) { + if (mgfish->mCaughtType == MG_CATCH_BT) { + if (data_80450C9E != 0) { + i_this->msgflow.init(actor, 0x1395, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x1394, 0, NULL); + data_80450C9E = 1; + } + + if (henna != NULL) { + henna->field_0x6a4 = 30; + } + } else if (mgfish->mCaughtType == MG_CATCH_SP) { + i_this->msgflow.init(actor, 0x1397, 0, NULL); + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[466]); + } else if (mgfish->mCaughtType == MG_CATCH_LH) { + i_this->msgflow.init(actor, 0x1396, 0, NULL); + } else if (mgfish->mCaughtType == MG_CATCH_SG) { + i_this->msgflow.init(actor, 0x1398, 0, NULL); + } else if (mgfish->mCaughtType == MG_CATCH_BB) { + if (bb_get(i_this)) { + i_this->msgflow.init(actor, 0x1399, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x139E, 0, NULL); + } + } else if (mgfish->mCaughtType == MG_CATCH_BIN) { + i_this->msgflow.init(actor, 0x139A, 0, NULL); + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[468]); + dComIfGs_setEmptyBottle(); + } else if (mgfish->mCaughtType == MG_CATCH_KN) { + i_this->msgflow.init(actor, 0x139C, 0, NULL); + } else if (mgfish->mCaughtType == MG_CATCH_ED) { + i_this->msgflow.init(actor, 0x139D, 0, NULL); + } else if (mgfish->mCaughtType == MG_CATCH_SY) { + i_this->msgflow.init(actor, 0x139B, 0, NULL); + } else { + OS_REPORT(" GET FISH SIZE %d\n", fish_size); + OS_REPORT(" GET FISH KIND %d\n", fish_kind); + OS_REPORT(" GET FISH REC %d\n", dComIfGs_getFishSize(fish_kind)); + + switch (fish_kind) { + case 5: + if (i_this->field_0x14c0 == 0) { + i_this->msgflow.init(actor, 0x138A, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x138B, 0, NULL); + } + break; + case 0: + if (i_this->field_0x14c0 == 0) { + i_this->msgflow.init(actor, 0x138C, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x138D, 0, NULL); + } + break; + case 1: + if (i_this->field_0x14c0 == 0) { + i_this->msgflow.init(actor, 0x1390, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x1391, 0, NULL); + } + break; + case 2: + if (i_this->field_0x14c0 == 0) { + i_this->msgflow.init(actor, 0x138E, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x138F, 0, NULL); + } + break; + case 3: + if (i_this->field_0x14c0 == 0) { + i_this->msgflow.init(actor, 0x1392, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x1393, 0, NULL); + } + break; + case 4: + if (i_this->field_0x14c0 == 0) { + i_this->msgflow.init(actor, 0x1389, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x139F, 0, NULL); + } + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[620]); + break; + } + + if (data_804BBBD4 == 2) { + dComIfGp_setMessageCountNumber((u8)(fish_size / 2.54f)); + } else { + dComIfGp_setMessageCountNumber(fish_size); + } + } + + i_this->field_0x146d = 1; + } + + if (i_this->field_0x146d == 1 && i_this->msgflow.doFlow(actor, NULL, 0)) { + i_this->field_0x146d = 2; + i_this->play_cam_mode = 21; + i_this->play_cam_timer = 0; + + if (mgfish->mCaughtType != MG_CATCH_FISH) { + if (mgfish->mCaughtType == MG_CATCH_LH) { + dComIfGp_setItemRupeeCount(10.0f + cM_rndF(40.9f)); + } + } else { + dComIfGs_addFishNum(fish_kind); + if (i_this->field_0x14c0 != 0) { + dComIfGs_setFishSize(fish_kind, fish_size); + } + } + + i_this->timers[2] = 30; + + if (henna != NULL) { + henna->field_0x7cc |= 2; + } + } + } +} + +/* 804B4A94-804B4B08 00B594 0074+00 1/1 0/0 0/0 .text s_sg_sub__FPvPv */ +static void* s_sg_sub(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_SG && ((fopAc_ac_c*)i_actor)->current.pos.y < ((dmg_rod_class*)i_data)->field_0x590 - 50.0f) { + return i_actor; + } + + return NULL; +} + +/* 804B4B08-804B4B7C 00B608 0074+00 1/1 0/0 0/0 .text s_bb_sub__FPvPv */ +static void* s_bb_sub(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_BG && ((fopAc_ac_c*)i_actor)->current.pos.y < ((dmg_rod_class*)i_data)->field_0x590 - 50.0f) { + return i_actor; + } + + return NULL; +} + +/* 804B4B7C-804B4CF0 00B67C 0174+00 1/1 0/0 0/0 .text s_lh_sub__FPvPv */ +static void* s_lh_sub(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_MG_FISH && ((mg_fish_class*)i_actor)->mGedouKind == 21) { + if ((((fopAc_ac_c*)i_actor)->current.pos - ((fopAc_ac_c*)i_data)->current.pos).abs() < ((mg_fish_class*)i_actor)->mJointScale) { + return i_actor; + } + } + + return NULL; +} + +/* 804B4CF0-804B4E64 00B7F0 0174+00 1/1 0/0 0/0 .text s_bt_sub__FPvPv */ +static void* s_bt_sub(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_MG_FISH && ((mg_fish_class*)i_actor)->mGedouKind == 20) { + if ((((fopAc_ac_c*)i_actor)->current.pos - ((fopAc_ac_c*)i_data)->current.pos).abs() < ((mg_fish_class*)i_actor)->mJointScale) { + return i_actor; + } + } + + return NULL; +} + +/* 804B4E64-804B5E60 00B964 0FFC+00 1/1 0/0 0/0 .text uki_main__FP13dmg_rod_class */ +static void uki_main(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + fopAc_ac_c* mgfish_a = fopAcM_SearchByID(i_this->mg_fish_id); + mg_fish_class* mgfish = (mg_fish_class*)mgfish_a; + + cXyz sp90; + cXyz sp84; + + f32 var_f30 = i_this->rod_stick_x; + if (fabsf(var_f30) < 0.1f) { + var_f30 = 0.0f; + } + + i_this->field_0xf5c = 4.25f + ZREG_F(0); + int sp38 = 0; + + if (i_this->field_0x6a8 != 0) { + i_this->field_0x6a8--; + cLib_addCalc2(&i_this->field_0x6a4, 1.0f, 1.0f, 0.077f + hREG_F(11)); + } else if (daAlink_getAlinkActorClass()->checkEquipAnime()) { + cLib_addCalc0(&i_this->field_0x6a4, 1.0f, 0.2f + hREG_F(10)); + } else { + i_this->field_0x6a4 = 1.0f; + } + + if (i_this->action == ACTION_UKI_READY) { + if (daAlink_getAlinkActorClass()->checkFisingRodJewl()) { + i_this->hook_kind = 1; + } else { + i_this->hook_kind = 0; + } + } + + if (daAlink_getAlinkActorClass()->checkFisingRodWorm()) { + i_this->esa_kind = 2; + } else if (daAlink_getAlinkActorClass()->checkFisingRodBee()) { + i_this->esa_kind = 1; + } else { + i_this->esa_kind = 0; + } + + switch (i_this->action) { + case ACTION_UKI_READY: + uki_ready(i_this); + break; + case ACTION_UKI_STANDBY: + uki_standby(i_this); + dMeter2Info_onGameStatus(1); + break; + case ACTION_UKI_HIT: + uki_hit(i_this); + dMeter2Info_onGameStatus(1); + break; + case ACTION_UKI_CATCH: + uki_catch(i_this); + dMeter2Info_onGameStatus(1); + break; + } + + if (i_this->rod_substick_y <= -0.5f && (i_this->rod_substick_y - i_this->prev_rod_substick_y) <= -0.5f && i_this->action == ACTION_UKI_STANDBY) { + if (i_this->field_0x100d != 0) { + daAlink_getAlinkActorClass()->seStartOnlyReverb(Z2SE_AL_ROD_SWING_LURE); + } + } + + if (i_this->action == ACTION_UKI_STANDBY && i_this->rod_substick_y < -0.5f) { + sp38 = 1; + } + + if (i_this->field_0x10a5 != 0) { + i_this->field_0x10a5--; + + line_control2_u(i_this); + if (i_this->action == ACTION_UKI_CATCH) { + uki_calc(i_this); + } + + cXyz sp78 = i_this->mg_line.pos[0] - i_this->mg_line.pos[1]; + i_this->field_0xf60 = sp78.abs(); + + if (i_this->timers[2] == 0 && i_this->action < ACTION_UKI_HIT && sp38 != 0) { + daAlink_getAlinkActorClass()->onFishingHit(); + i_this->action = ACTION_UKI_HIT; + i_this->play_cam_mode = 10; + mgfish->mCurAction = 71; + mgfish->mActionPhase = 0; + + e_sg_class* sg = (e_sg_class*)fpcM_Search(s_sg_sub, i_this); + if (sg != NULL) { + mgfish->mSkullfishId = fopAcM_GetID(sg); + mgfish->mCaughtType = MG_CATCH_SG; + sg->mInactive = 1; + } else { + fopAc_ac_c* bb = (fopAc_ac_c*)fpcM_Search(s_bb_sub, i_this); + if (bb != NULL) { + mgfish->mCaughtType = MG_CATCH_BB; + } + } + + int get_no = dComIfGs_getFishNum(0) + + dComIfGs_getFishNum(1) + + dComIfGs_getFishNum(5) + + dComIfGs_getFishNum(4) + + dComIfGs_getFishNum(1) + + dComIfGs_getFishNum(2); + OS_REPORT(" GET NO %d\n", get_no); + + if (strcmp(dComIfGp_getStartStageName(), "F_SP127") == 0) { + if (get_no >= 5 && cM_rndF(1.0f) < 0.15f) { + int rnd_catch = cM_rndF(4.99f); + if (rnd_catch == 0) { + mgfish->mCaughtType = MG_CATCH_BT; + } else if (rnd_catch == 1) { + mgfish->mCaughtType = MG_CATCH_LH; + } else if (rnd_catch == 2) { + mgfish->mCaughtType = MG_CATCH_KN; + } else if (rnd_catch == 3) { + mgfish->mCaughtType = MG_CATCH_ED; + } else if (rnd_catch == 4) { + mgfish->mCaughtType = MG_CATCH_SY; + } + } + + if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[468])) { + if (cM_rndF(1.0f) <= 0.5f) { + cXyz bin_pos(6800.0f, 30.0f, -270.0f); + bin_pos -= player->current.pos; + + if (bin_pos.abs() < 2500.0f) { + s16 spE = (player->shape_angle.y - cM_atan2s(bin_pos.x, bin_pos.z)); + if (spE < 0x4000 && spE > -0x4000) { + mgfish->mCaughtType = MG_CATCH_BIN; + } + } + } + } + + if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[466]) && i_this->hook_kind == 1) { + static cXyz sp_pos[] = { + cXyz(-4600.0f, 0.0f, 3100.0f), + cXyz(3616.0f, 0.0f, -4739.0f), + }; + + for (int i = 0; i < 2; i++) { + sp90 = actor->current.pos - sp_pos[i]; + sp90.y = 0.0f; + if (sp90.abs() < 300.0f) { + int sp20 = 0; + for (int j = 0; j <= 3; j++) { + if ((j == 0 || j == 2 || j == 3) && dComIfGs_getEventReg(check_kind[j]) >= 10) { + sp20++; + } + } + + if (sp20 >= 3) { + mgfish->mCaughtType = MG_CATCH_SP; + } + break; + } + } + } + } else if (get_no >= 4 && cM_rndF(1.0f) < 0.2f) { + if (cM_rndF(1.0f) < 0.5f) { + if (fpcM_Search(s_lh_sub, i_this) != NULL) { + mgfish->mCaughtType = MG_CATCH_LH; + } + } else if (fpcM_Search(s_bt_sub, i_this) != NULL) { + mgfish->mCaughtType = MG_CATCH_BT; + } + } + + Z2GetAudioMgr()->seStart(Z2SE_AL_FISHING_HIT, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + dMeter2Info_setMeterString(0x4C7); + Z2GetAudioMgr()->changeFishingBgm(2); + + i_this->timers[3] = 20; + i_this->field_0x1508 = 0.7f; + i_this->timers[5] = 80; + i_this->timers[2] = 400; + } + } + + mDoMtx_stack_c::transS(i_this->hook_pos.x, i_this->hook_pos.y, i_this->hook_pos.z); + + cXyz sp60; + f32 sp18; + dKyw_get_AllWind_vec(&i_this->hook_pos, &sp60, &sp18); + + if (sp18 >= 0.4f && i_this->hook_pos.y < (i_this->field_0x590 - 5.0f) + ZREG_F(11)) { + f32 temp_f29 = 7000.0f + (900.0f * cM_ssin(i_this->field_0x578 * 2000)); + + cLib_addCalcAngleS2(&i_this->field_0x10a0, cM_atan2s(sp60.x, sp60.z), 4, 100); + cLib_addCalcAngleS2(&i_this->field_0x10a2, (sp18 - 0.4f) * temp_f29, 4, 100); + } else { + cLib_addCalcAngleS2(&i_this->field_0x10a2, 0, 2, 200); + } + + mDoMtx_stack_c::YrotM(i_this->field_0x10a0); + mDoMtx_stack_c::XrotM(i_this->field_0x10a2); + mDoMtx_stack_c::YrotM(i_this->field_0x1084.y); + mDoMtx_stack_c::XrotM(i_this->field_0x1084.x); + mDoMtx_stack_c::ZrotM(i_this->field_0x108e); + + s16 spC = i_this->field_0x108a * cM_ssin(i_this->field_0x1084.x); + mDoMtx_stack_c::XrotM(spC); + mDoMtx_stack_c::scaleM(l_HIO.field_0xc, l_HIO.field_0xc, l_HIO.field_0xc); + mDoMtx_stack_c::transM(0.0f, 0.0f, l_HIO.field_0x10); + mDoMtx_stack_c::XrotM(XREG_S(8)); + i_this->uki_model->setBaseTRMtx(mDoMtx_stack_c::get()); + + mDoMtx_stack_c::transM(0.0f, 0.0f, l_HIO.field_0x14); + mDoMtx_stack_c::scaleM(l_HIO.field_0x18, l_HIO.field_0x18, l_HIO.field_0x1c); + i_this->uki_saki_model->setBaseTRMtx(mDoMtx_stack_c::get()); + + sp90 = i_this->mg_line.pos[95] - actor->current.pos; + s16 spA = -cM_atan2s(sp90.y, sp90.z); + s16 sp8 = (s16)cM_atan2s(sp90.x, JMAFastSqrt(SQUARE(sp90.y) + SQUARE(sp90.z))); + + actor->current.angle.z += i_this->field_0x114e; + + if (i_this->action == ACTION_UKI_CATCH && mgfish->mCaughtType == MG_CATCH_SP) { + if (g_Counter.mTimer & 128) { + cLib_addCalcAngleS2(&i_this->field_0x114e, 1000, 4, 40); + } else { + cLib_addCalcAngleS2(&i_this->field_0x114e, -1000, 4, 40); + } + } else if (i_this->action == ACTION_UKI_CATCH && mgfish->mCaughtType >= MG_CATCH_KN) { + if (g_Counter.mTimer & 256) { + cLib_addCalcAngleS2(&i_this->field_0x114e, 200, 4, 8); + } else { + cLib_addCalcAngleS2(&i_this->field_0x114e, -200, 4, 8); + } + } else if (i_this->field_0x578 & 256) { + cLib_addCalcAngleS2(&i_this->field_0x114e, 500, 8, 10); + } else { + cLib_addCalcAngleS2(&i_this->field_0x114e, -500, 8, 10); + } + + mDoMtx_stack_c::transS(actor->current.pos.x, actor->current.pos.y, actor->current.pos.z); + mDoMtx_stack_c::XrotM(spA); + mDoMtx_stack_c::YrotM(sp8); + mDoMtx_stack_c::ZrotM(actor->current.angle.z); + mDoMtx_stack_c::push(); + + mDoMtx_stack_c::XrotM(0x4000); + + static f32 hook_size[] = {1.0f, 0.5f}; + f32 temp_f31 = hook_size[i_this->hook_kind]; + mDoMtx_stack_c::scaleM(temp_f31, temp_f31, temp_f31); + i_this->hook_model[i_this->hook_kind]->setBaseTRMtx(mDoMtx_stack_c::get()); + + mDoMtx_stack_c::pop(); + + if (i_this->esa_kind != 0) { + f32 var_f31; + if (i_this->esa_kind == 1) { + mDoMtx_stack_c::XrotM(-0x8000); + if (i_this->hook_kind == 1) { + mDoMtx_stack_c::transM(JREG_F(8), -0.5f + JREG_F(9), 16.5f + JREG_F(10)); + } else { + mDoMtx_stack_c::transM(JREG_F(8), -0.5f + JREG_F(9), 9.0f + JREG_F(10)); + } + var_f31 = 0.1f; + } else { + if (i_this->hook_kind == 1) { + mDoMtx_stack_c::transM(JREG_F(13), -1.0f + JREG_F(14), -9.0f + JREG_F(15)); + } else { + mDoMtx_stack_c::transM(JREG_F(13), -1.0f + JREG_F(14), -3.0f + JREG_F(15)); + } + var_f31 = 0.065f + JREG_F(12); + } + + mDoMtx_stack_c::scaleM(var_f31, var_f31, var_f31); + i_this->esa_model[i_this->esa_kind - 1]->setBaseTRMtx(mDoMtx_stack_c::get()); + + if (i_this->esa_kind == 2) { + for (int i = XREG_S(2) + 1; i < 9; i++) { + i_this->field_0x103c[i] = 4000.0f * cM_ssin((i_this->field_0x578 * 2000) - (i * 4000)); + i_this->field_0x104e[i] = 2000.0f * cM_ssin((i_this->field_0x578 * 2000) - (i * 5000)); + } + } + } + + i_this->ccSph.SetC(i_this->mg_line.pos[(i_this->field_0x578 * 4) & 60]); + dComIfG_Ccsp()->Set(&i_this->ccSph); +} + +/* 804B5E60-804B5F44 00C960 00E4+00 1/1 0/0 0/0 .text cam_3d_morf__FP13dmg_rod_classf */ +static void cam_3d_morf(dmg_rod_class* i_this, f32 i_scale) { + cLib_addCalc2(&i_this->play_cam_center.x, i_this->play_cam_center_target.x, i_scale, i_this->play_cam_center_speed.x * i_this->field_0x1410); + cLib_addCalc2(&i_this->play_cam_center.y, i_this->play_cam_center_target.y, i_scale, i_this->play_cam_center_speed.y * i_this->field_0x1410); + cLib_addCalc2(&i_this->play_cam_center.z, i_this->play_cam_center_target.z, i_scale, i_this->play_cam_center_speed.z * i_this->field_0x1410); + + cLib_addCalc2(&i_this->play_cam_eye.x, i_this->play_cam_eye_target.x, i_scale, i_this->play_cam_eye_speed.x * i_this->field_0x1410); + cLib_addCalc2(&i_this->play_cam_eye.y, i_this->play_cam_eye_target.y, i_scale, i_this->play_cam_eye_speed.y * i_this->field_0x1410); + cLib_addCalc2(&i_this->play_cam_eye.z, i_this->play_cam_eye_target.z, i_scale, i_this->play_cam_eye_speed.z * i_this->field_0x1410); +} + +/* 804B5F44-804B805C 00CA44 2118+00 1/1 0/0 0/0 .text play_camera__FP13dmg_rod_class */ +static void play_camera(dmg_rod_class* i_this) { + fopAc_ac_c* actor = (fopAc_ac_c*)&i_this->actor; + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + fopAc_ac_c* mgfish_a = fopAcM_SearchByID(i_this->mg_fish_id); + mg_fish_class* mgfish = (mg_fish_class*)mgfish_a; + camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + camera_class* camera0 = dComIfGp_getCamera(0); + + dBgS_GndChk sp244; + dBgS_ObjGndChk_Spl sp1F0; + int sp70 = 0; + i_this->field_0x13b0 = i_this->rod_substick_y; + i_this->field_0x13ac = i_this->rod_substick_x; + + cXyz sp174; + cXyz sp168; + cXyz sp15C; + cXyz sp150; + cXyz sp144(0.0f, 0.0f, 0.0f); + + switch (i_this->play_cam_mode) { + case 0: + if (dComIfGp_checkPlayerStatus0(0, 0x2000) || dComIfGp_event_runCheck() != 0) { + i_this->field_0x146c = 20; + } + + if (daAlink_getAlinkActorClass()->checkCanoeRide()) { + dComIfGp_setZStatusForce(94, 0); + dMeter2Info_onUseButton(0x800); + + if (data_804BBBD4 != 0) { + dComIfGp_setDoStatusForce(124, 0); + } else { + dComIfGp_setDoStatusForce(15, 0); + } + + if (i_this->field_0x146c == 0) { + if (mDoCPd_c::getTrigA(PAD_1)) { + i_this->play_cam_mode = 1050; + } + + if (mDoCPd_c::getTrigZ(PAD_1)) { + if (henna != NULL) { + i_this->play_cam_mode = 900; + } else { + i_this->play_cam_mode = 1000; + } + } + } + } + break; + case 1: { + i_this->play_cam_mode = 2; + camera->mCamera.Stop(); + i_this->play_cam_timer = 0; + i_this->field_0x1420 = 500.0f; + i_this->field_0x141c = 500.0f; + i_this->field_0x1424 = 180.0f + WREG_F(0); + i_this->field_0x1428 = 100.0f + WREG_F(1); + + camera_class* sp58 = dComIfGp_getCamera(0); + i_this->field_0x144c = sp58->lookat.eye; + i_this->field_0x1458 = sp58->lookat.center; + i_this->play_cam_eye = i_this->field_0x144c; + i_this->play_cam_center = i_this->field_0x1458; + + dMw_offMenuRing(); + camera->mCamera.SetTrimSize(1); + i_this->play_cam_fovy = 55.0f; + /* fallthrough */ + } + case 2: { + sp70 = 1; + f32 sp6C = 0.3f + NREG_F(3); + f32 sp68 = i_this->field_0x1420; + f32 sp64 = 180.0f + WREG_F(0); + f32 sp60 = 100.0f + WREG_F(1); + f32 sp5C = 30.0f; + + if (i_this->play_cam_timer > YREG_S(6) + 8) { + cLib_addCalcAngleS2(&i_this->field_0x1418, daAlink_getAlinkActorClass()->getFishingRodAngleY(), 6, 2000); + } + + sp6C = 0.5f + NREG_F(5); + sp68 = 350.0f + WREG_F(2); + sp5C = 100.0f; + sp64 = 230.0f + WREG_F(3); + sp60 = (150.0f + WREG_F(4)) - 30.0f; + + i_this->field_0x1420 = 500.0f; + if (i_this->action == ACTION_LURE_CAST) { + sp150 = actor->current.pos; + if (sp150.y > (150.0f + (300.0f + i_this->field_0x590) + ZREG_F(19))) { + sp150.y = (150.0f + (300.0f + i_this->field_0x590) + ZREG_F(19)); + } + + f32 fovy; + if (i_this->lure_type == MG_LURE_SP) { + fovy = 35.0f; + } else { + fovy = 5.0f; + } + cLib_addCalc2(&i_this->play_cam_fovy, fovy, 0.1f, 1.0f + BREG_F(16)); + } else { + cLib_addCalc2(&i_this->play_cam_fovy, 55.0f, 0.2f, 10.0f); + cLib_addCalc2(&i_this->field_0x141c, sp68, 0.5f, sp5C); + cLib_addCalc2(&i_this->field_0x1424, sp64, 0.5f, 5.0f); + cLib_addCalc2(&i_this->field_0x1428, sp60, 0.5f, 5.0f); + + cMtx_YrotS(*calc_mtx, i_this->field_0x1418); + sp174.x = 0.0f; + sp174.y = 0.0f; + sp174.z = -i_this->field_0x141c; + MtxPosition(&sp174, &sp15C); + sp15C += player->current.pos; + + cLib_addCalc2(&i_this->play_cam_eye.x, sp15C.x, sp6C, 1000.0f); + cLib_addCalc2(&i_this->play_cam_eye.z, sp15C.z, sp6C, 1000.0f); + sp15C.y += ((250.0f + NREG_F(18)) - 100.0f) - 30.0f; + cLib_addCalc2(&i_this->play_cam_eye.y, sp15C.y, sp6C, 1000.0f); + + sp174.y = i_this->field_0x1428; + sp174.z = (100.0f + nREG_F(10)); + MtxPosition(&sp174, &sp150); + sp150 += player->current.pos; + } + + cLib_addCalc2(&i_this->field_0x1410, 1.0f, 1.0f, 0.01f + NREG_F(8)); + cLib_addCalc2(&i_this->play_cam_center.x, sp150.x, 0.3f + NREG_F(4), 200.0f * i_this->field_0x1410); + cLib_addCalc2(&i_this->play_cam_center.y, sp150.y, 0.2f + NREG_F(5), 200.0f * i_this->field_0x1410); + cLib_addCalc2(&i_this->play_cam_center.z, sp150.z, 0.3f + NREG_F(4), 200.0f * i_this->field_0x1410); + + i_this->field_0x141a = i_this->field_0x1418 - daAlink_getAlinkActorClass()->getFishingRodAngleY(); + i_this->field_0x140c = i_this->play_cam_fovy; + break; + } + case 5: { + sp70 = 1; + cLib_addCalc2(&i_this->field_0x141c, 400.0f + BREG_F(7), 0.1f, (20.0f + YREG_F(8)) * i_this->field_0x1410); + + f32 sp50 = i_this->field_0x13b0; + sp50 *= -(3.0f + BREG_F(2)); + + sp174 = actor->current.pos - player->current.pos; + f32 sp4C = sp174.abs(); + i_this->field_0x140c += sp50; + + f32 sp48 = (15.0f - (0.015f * (sp4C - 500.0f))); + if (sp48 < 0.0f) { + sp48 = 0.0f; + } + + f32 sp44 = 55.0f; + if (i_this->field_0x140c > sp44) { + i_this->field_0x140c = sp44; + } else if (i_this->field_0x140c < (5.0f + sp48)) { + i_this->field_0x140c = 5.0f + sp48; + } + + if (i_this->field_0x1407 != 0) { + i_this->field_0x1407--; + cLib_addCalc2(&i_this->play_cam_fovy, i_this->field_0x140c, 0.3f, 10.0f + BREG_F(2)); + } else { + cLib_addCalc2(&i_this->play_cam_fovy, i_this->field_0x140c, 0.1f, 3.0f + BREG_F(2)); + } + + f32 sp40 = i_this->field_0x13ac; + sp40 *= 1000.0f + BREG_F(3); + + i_this->field_0x141a += (s16)sp40; + if (i_this->field_0x141a > 0x1000) { + i_this->field_0x141a = 0x1000; + } else if (i_this->field_0x141a < -0x1000) { + i_this->field_0x141a = -0x1000; + } + + sp174.x = actor->current.pos.x - player->current.pos.x; + sp174.z = actor->current.pos.z - player->current.pos.z; + + cLib_addCalcAngleS2(&i_this->field_0x1418, (i_this->field_0x141a + cM_atan2s(sp174.x, sp174.z)), 2, 0x1000); + + cMtx_YrotS(*calc_mtx, i_this->field_0x1418); + sp174.x = 0.0f; + if (i_this->action == ACTION_LURE_HIT && mgfish != NULL && mgfish->mCurAction >= 52) { + sp174.y = 50.0f + (80.0f + AREG_F(10)); + } else { + sp174.y = 80.0f + AREG_F(10); + } + sp174.z = -i_this->field_0x141c; + MtxPosition(&sp174, &sp15C); + sp15C += player->current.pos; + sp174 = actor->current.pos - sp15C; + + s16 spC = (s16)cM_atan2s(sp174.x, sp174.z); + f32 sp3C; + if (i_this->field_0x140c < (20.0f + AREG_F(19))) { + sp3C = 700.0f; + } else { + sp3C = 0.0f; + } + + f32 sp38 = 0.1f; + if (i_this->field_0x1407 != 0) { + cLib_addCalc2(&i_this->field_0x142c, sp3C, 0.3f, 200.0f); + sp38 = 0.3f; + } else { + cLib_addCalc2(&i_this->field_0x142c, sp3C, 0.2f, 200.0f); + } + + cMtx_YrotS(*calc_mtx, spC); + sp174.x = 0.0f; + sp174.y = 0.0f; + sp174.z = i_this->field_0x142c; + MtxPosition(&sp174, &sp168); + sp15C += sp168; + + sp174 = actor->current.pos - player->current.pos; + cMtx_YrotS(*calc_mtx, cM_atan2s(sp174.x, sp174.z)); + sp174.x = 0.0f; + sp174.y = (100.0f * i_this->field_0x1410); + sp174.z = (200.0f * i_this->field_0x1410); + MtxPosition(&sp174, &sp168); + + cLib_addCalc2(&i_this->play_cam_eye.x, sp15C.x, sp38, fabsf(sp168.x)); + cLib_addCalc2(&i_this->play_cam_eye.y, sp15C.y, sp38, fabsf(sp168.y)); + cLib_addCalc2(&i_this->play_cam_eye.z, sp15C.z, sp38, fabsf(sp168.z)); + + sp150 = actor->current.pos; + if (i_this->lure_type == MG_LURE_SP && sp150.y < (i_this->field_0x590 - 100.0f)) { + sp150.y = (i_this->field_0x590 - 100.0f); + } + + sp174.x = 0.0f; + sp174.y = 100.0f * i_this->field_0x1410; + sp174.z = 200.0f * i_this->field_0x1410; + MtxPosition(&sp174, &sp168); + sp150 += i_this->field_0x1434; + + if (i_this->field_0x1407 > 100) { + i_this->play_cam_center = sp150; + i_this->field_0x1407 = 20; + } else { + cLib_addCalc2(&i_this->play_cam_center.x, sp150.x, 0.15f + NREG_F(4), fabsf(sp168.x)); + cLib_addCalc2(&i_this->play_cam_center.y, sp150.y, 0.25f + NREG_F(5), fabsf(sp168.y)); + cLib_addCalc2(&i_this->play_cam_center.z, sp150.z, 0.15f + NREG_F(4), fabsf(sp168.z)); + } + + cLib_addCalc2(&i_this->field_0x1410, 1.0f, 1.0f, 0.05f + NREG_F(8)); + cLib_addCalc2(&i_this->field_0x1434.x, i_this->field_0x1440.x, 1.0f, (5.0f + YREG_F(17)) * i_this->field_0x1414); + cLib_addCalc2(&i_this->field_0x1434.y, i_this->field_0x1440.y, 1.0f, (5.0f + YREG_F(17)) * i_this->field_0x1414); + cLib_addCalc2(&i_this->field_0x1434.z, i_this->field_0x1440.z, 1.0f, (5.0f + YREG_F(17)) * i_this->field_0x1414); + cLib_addCalc2(&i_this->field_0x1414, 1.0f, 1.0f, 0.02f + NREG_F(12)); + + if (i_this->timers[2] == 0) { + i_this->timers[2] = 5.0f + cM_rndF(10.0f); + + f32 sp34 = (55.0f - i_this->play_cam_fovy) * (0.4f + YREG_F(19)); + if (sp34 > 0.1f) { + i_this->field_0x1440.x = cM_rndFX(sp34); + i_this->field_0x1440.y = cM_rndFX(sp34); + i_this->field_0x1440.z = cM_rndFX(sp34); + i_this->field_0x1414 = 0.0f; + } + } + break; + } + case 10: { + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp174.x = (25.0f + (100.0f + DREG_F(0))) - 50.0f; + sp174.y = (10.0f + DREG_F(1)) - 10.0f; + sp174.z = 40.0f + (50.0f + (30.0f + (100.0f + DREG_F(2)))); + MtxPosition(&sp174, &i_this->play_cam_eye); + i_this->play_cam_eye += player->current.pos; + + f32 sp30 = 0.0f; + if (mgfish->mJointScale > 0.5f) { + sp30 = mgfish->mJointScale - 0.5f; + } + + sp174.x = 10.0f + (-30.0f + DREG_F(3)); + sp174.z = DREG_F(5); + sp174.y = (5.0f + (-35.0f + DREG_F(11))) - ((60.0f + DREG_F(12)) * sp30); + if (i_this->lure_type == MG_LURE_SP) { + sp174.y += 13.0f; + } + MtxPosition(&sp174, &sp150); + sp150.x += player->current.pos.x; + sp150.z += player->current.pos.z; + sp150.y += actor->current.pos.y; + if (sp150.y < player->current.pos.y + DREG_F(16)) { + sp150.y = player->current.pos.y + DREG_F(16); + } + + if (i_this->play_cam_timer == 0) { + i_this->play_cam_center = sp150; + camera->mCamera.SetTrimSize(1); + i_this->play_cam_fovy = 20.0f; + } else { + cLib_addCalc2(&i_this->play_cam_center.x, sp150.x, 0.1f, 10.0f); + cLib_addCalc2(&i_this->play_cam_center.y, sp150.y, 0.1f, 10.0f); + cLib_addCalc2(&i_this->play_cam_center.z, sp150.z, 0.1f, 10.0f); + } + + cLib_addCalc2(&i_this->play_cam_fovy, 40.0f + DREG_F(6), 0.05f, 1.0f); + + f32 sp2C = -20.0f + (20.0f * cM_ssin(i_this->field_0x578 * 700)); + actor->eyePos.y = actor->current.pos.y + sp2C; + if (TREG_S(7) != 0) { + camera_class* sp28 = dComIfGp_getCamera(0); + actor->eyePos = sp28->lookat.eye; + } + i_this->field_0xf78 = 0.05f; + break; + } + case 11: + cLib_addCalc2(&i_this->play_cam_fovy, 55.0f + DREG_F(6), 0.05f, 1.0f); + + cMtx_YrotS(*calc_mtx, daAlink_getAlinkActorClass()->getFishingRodAngleY()); + sp174.x = -150.0f + DREG_F(0); + sp174.y = 50.0f + DREG_F(1); + sp174.z = 150.0f + DREG_F(2); + MtxPosition(&sp174, &sp15C); + sp15C += player->current.pos; + + sp174.x = -50.0f + DREG_F(3); + sp174.y = DREG_F(4); + sp174.z = 50.0f + DREG_F(5); + MtxPosition(&sp174, &sp150); + sp150 += player->current.pos; + + if (i_this->play_cam_timer == 0) { + i_this->play_cam_eye = sp15C; + i_this->play_cam_center = sp150; + } else { + cLib_addCalc2(&i_this->play_cam_center.x, sp150.x, 0.1f, 10.0f); + cLib_addCalc2(&i_this->play_cam_center.y, sp150.y, 0.1f, 10.0f); + cLib_addCalc2(&i_this->play_cam_center.z, sp150.z, 0.1f, 10.0f); + } + if (i_this->play_cam_timer >= XREG_S(4) + 68) { + i_this->play_cam_mode = 2; + i_this->play_cam_timer = 20; + i_this->field_0x1418 = daAlink_getAlinkActorClass()->shape_angle.y; + i_this->field_0x1410 = 0.0f; + camera->mCamera.SetTrimSize(1); + } + + i_this->field_0xf78 = 0.05f; + i_this->timers[1] = 20; + break; + case 20: + i_this->play_cam_fovy = 40.0f + DREG_F(18); + + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp174.x = 60.0f + DREG_F(10); + sp174.y = 50.0f + DREG_F(11); + sp174.z = 110.0f + DREG_F(12); + MtxPosition(&sp174, &sp15C); + sp15C += player->current.pos; + + if (henna != NULL) { + sp174.x = 20.0f + DREG_F(13); + } else { + sp174.x = 0.0f; + } + sp174.y = 45.0f + DREG_F(14); + sp174.z = DREG_F(15); + MtxPosition(&sp174, &sp150); + sp150 += player->current.pos; + + if (i_this->play_cam_timer == 0) { + i_this->play_cam_eye = sp15C; + i_this->play_cam_center = sp150; + } else { + cLib_addCalc2(&i_this->play_cam_center.x, sp150.x, 0.1f, 10.0f); + cLib_addCalc2(&i_this->play_cam_center.y, sp150.y, 0.1f, 10.0f); + cLib_addCalc2(&i_this->play_cam_center.z, sp150.z, 0.1f, 10.0f); + } + + if (i_this->timers[2] != 0) { + i_this->play_cam_timer = 15; + } + break; + case 30: + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp174.x = (25.0f + (100.0f + DREG_F(0))) - 50.0f; + sp174.y = (10.0f + DREG_F(1)) - 10.0f; + sp174.z = 40.0f + (50.0f + (30.0f + (100.0f + DREG_F(2)))); + MtxPosition(&sp174, &i_this->play_cam_eye); + i_this->play_cam_eye += player->current.pos; + + sp174.x = 10.0f + (-30.0f + DREG_F(3)); + sp174.z = DREG_F(5); + sp174.y = 5.0f + (-35.0f + DREG_F(11)); + MtxPosition(&sp174, &sp150); + sp150.x += player->current.pos.x; + sp150.z += player->current.pos.z; + sp150.y += actor->current.pos.y; + if (sp150.y < (player->current.pos.y + DREG_F(16))) { + sp150.y = (player->current.pos.y + DREG_F(16)); + } + + if (i_this->play_cam_timer <= 2) { + i_this->play_cam_center = sp150; + camera->mCamera.SetTrimSize(1); + i_this->play_cam_fovy = 20.0f; + } else { + cLib_addCalc2(&i_this->play_cam_center.x, sp150.x, 0.1f, 10.0f); + cLib_addCalc2(&i_this->play_cam_center.y, sp150.y, 0.1f, 10.0f); + cLib_addCalc2(&i_this->play_cam_center.z, sp150.z, 0.1f, 10.0f); + } + + cLib_addCalc2(&i_this->play_cam_fovy, 40.0f + DREG_F(6), 0.05f, 1.0f); + + if (i_this->play_cam_timer >= BREG_S(7) + 24) { + cLib_addCalc0(&i_this->field_0x1410, 1.0f, 20.0f); + if (i_this->play_cam_timer == 35) { + mDoAud_seStart(Z2SE_AL_FISH_CATCH, NULL, 0, 0); + } + } + + i_this->field_0xf78 = 0.05f; + break; + case 900: + if (!actor->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0); + actor->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + + camera->mCamera.Stop(); + i_this->play_cam_mode = 901; + i_this->play_cam_timer = 0; + i_this->field_0x146d = 0; + i_this->play_cam_fovy = dComIfGd_getView()->fovy; + camera->mCamera.SetTrimSize(1); + + player->changeOriginalDemo(); + player->changeDemoMode(1, 1, 0, 0); + + sp174.x = camera0->lookat.eye.x - camera0->lookat.center.x; + sp174.y = camera0->lookat.eye.y - camera0->lookat.center.y; + sp174.z = camera0->lookat.eye.z - camera0->lookat.center.z; + + i_this->field_0x1400 = cM_atan2s(sp174.x, sp174.z) - player->shape_angle.y; + if (i_this->field_0x1400 >= 0) { + i_this->field_0x1402 = 6000; + } else { + i_this->field_0x1402 = -6000; + } + + i_this->field_0x1404 = -cM_atan2s(sp174.y, JMAFastSqrt(SQUARE(sp174.x) + SQUARE(sp174.z))); + i_this->field_0x1464 = sp174.abs(); + i_this->play_cam_center_target = camera0->lookat.center; + case 901: + if (daAlink_getAlinkActorClass()->checkCanoeRide()) { + fopAc_ac_c* sp24 = fopAcM_SearchByID(i_this->boat_actor_id); + cLib_addCalc0(&sp24->speedF, 1.0f, 1.0f + TREG_F(11)); + } + + cLib_addCalcAngleS2(&i_this->field_0x1400, i_this->field_0x1402, 4, 3000); + cLib_addCalcAngleS2(&i_this->field_0x1404, -1000, 4, 1000); + cLib_addCalc2(&i_this->field_0x1464, 400.0f + VREG_F(19), 0.25f, 200.0f); + cLib_addCalc2(&i_this->play_cam_fovy, 30.0f + TREG_F(12), 0.25f, 10.0f); + + cMtx_YrotS(*calc_mtx, (player->shape_angle.y + i_this->field_0x1400)); + cMtx_XrotM(*calc_mtx, i_this->field_0x1404); + sp174.x = 0.0f; + sp174.y = 0.0f; + sp174.z = i_this->field_0x1464; + MtxPosition(&sp174, &i_this->play_cam_eye); + i_this->play_cam_eye += i_this->play_cam_center_target; + i_this->play_cam_center = i_this->play_cam_center_target; + i_this->play_cam_center.y += (2.0f + TREG_F(17)) * cM_ssin(i_this->play_cam_timer * 1200); + + fopAcM_OnStatus(actor, 0); + cLib_onBit(actor->attention_info.flags, 0xA); + + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + if (i_this->field_0x1402 < 0) { + sp174.x = -200.0f; + } else { + sp174.x = 200.0f; + } + sp174.y = (-50.0f + JREG_F(11)); + sp174.z = 0.0f; + MtxPosition(&sp174, &actor->eyePos); + actor->eyePos += player->eyePos; + actor->attention_info.position = actor->eyePos; + + if (i_this->play_cam_timer >= 10) { + if (i_this->field_0x146d == 0) { + i_this->field_0x146d = 1; + if (henna->field_0x7d5 != 0 && (henna->field_0x7d6 == 0 || (i_this->field_0x1472 & 3) == 0)) { + i_this->msgflow.init(actor, 0x3C3, 0, NULL); + henna->field_0x7d5 = 0; + henna->field_0x7d6 = 1; + } else if (henna->field_0x7b8 != 0) { + i_this->msgflow.init(actor, 0x2C9, 0, NULL); + henna->field_0x6ba = 50; + henna->field_0x7b8 = 0; + } else if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[467])) { + if (i_this->field_0x1470 == 0) { + sp174.x = -2800.0f; + sp174.z = 4608.0f; + sp174.x -= player->current.pos.x; + sp174.z -= player->current.pos.z; + if (JMAFastSqrt(SQUARE(sp174.x) + SQUARE(sp174.z)) < 1500.0f) { + i_this->msgflow.init(actor, 0x3C2, 0, NULL); + i_this->field_0x1470++; + } else { + i_this->msgflow.init(actor, 0x3CF, 0, NULL); + } + } else { + i_this->msgflow.init(actor, 0x3CF, 0, NULL); + } + } else { + i_this->field_0x1472++; + if (i_this->field_0x1472 == 1) { + i_this->msgflow.init(actor, 0x3D0, 0, NULL); + } else if (i_this->field_0x1472 == 2) { + i_this->msgflow.init(actor, 0x3D1, 0, NULL); + } else if (i_this->field_0x1472 == 3) { + i_this->msgflow.init(actor, 0x3D2, 0, NULL); + i_this->field_0x1472 = 0; + } + } + } + + if (i_this->msgflow.doFlow(actor, NULL, 0)) { + camera->mCamera.Reset(i_this->play_cam_center, i_this->play_cam_eye, i_this->play_cam_fovy, 0); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + dComIfGp_event_reset(); + daPy_getPlayerActorClass()->cancelOriginalDemo(); + i_this->play_cam_mode = 0; + i_this->field_0x146c = 30; + i_this->field_0x146d = 0; + } + } + break; + case 950: + i_this->play_cam_mode = 951; + i_this->play_cam_timer = 0; + i_this->play_cam_fovy = 60.0f; + i_this->play_cam_center = actor->current.pos; + i_this->play_cam_center.y += AREG_F(7) - 25.0f; + case 951: + dComIfGp_setDoStatusForce(34, 0); + i_this->field_0xf78 = 0.1f + TREG_F(19); + + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp174.x = AREG_F(4); + sp174.y = (50.0f + AREG_F(5)) - 20.0f; + sp174.z = 50.0f + AREG_F(6); + MtxPosition(&sp174, &i_this->play_cam_eye); + i_this->play_cam_eye += player->current.pos; + + sp150 = actor->current.pos; + sp150.y += AREG_F(7) - 25.0f; + cLib_addCalc2(&i_this->play_cam_center.x, sp150.x, 0.1f, 20.0f); + cLib_addCalc2(&i_this->play_cam_center.y, sp150.y, 0.1f, 20.0f); + cLib_addCalc2(&i_this->play_cam_center.z, sp150.z, 0.1f, 20.0f); + + if (i_this->play_cam_mode == 951) { + static f32 old_stick_x = 0.0f; + static f32 old_stick_sx = 0.0f; + + if ((mDoCPd_c::getStickX3D(PAD_1) >= 0.8f && old_stick_x < 0.8f) || (mDoCPd_c::getStickX3D(PAD_1) <= -0.8f && old_stick_x > -0.8f) || + (mDoCPd_c::getSubStickX3D(PAD_1) >= 0.8f && old_stick_sx < 0.8f) || (mDoCPd_c::getSubStickX3D(PAD_1) <= -0.8f && old_stick_sx > -0.8f)) + { + int sp20 = 0; + int sp1C = 1; + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[466])) { + sp20 = 1; + } + + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[469])) { + sp1C = 0; + } + + if (i_this->play_cam_timer >= 15) { + if (mDoCPd_c::getStickX3D(PAD_1) >= 0.5f || mDoCPd_c::getSubStickX3D(PAD_1) >= 0.5f) { + i_this->field_0xf81++; + if (i_this->field_0xf81 > (s8)(sp20 + 3)) { + i_this->field_0xf81 = sp1C; + } + } else { + i_this->field_0xf81--; + if (i_this->field_0xf81 < sp1C) { + i_this->field_0xf81 = (s8)(sp20 + 3); + } + } + + mDoAud_seStart(Z2SE_SY_CURSOR_FLOOR, NULL, 0, 0); + i_this->msgflow.remove(); + i_this->play_cam_timer = 0; + } + } + + old_stick_x = mDoCPd_c::getStickX3D(PAD_1); + old_stick_sx = mDoCPd_c::getSubStickX(PAD_1); + + if (i_this->play_cam_timer == 1) { + if (i_this->field_0xf81 == 0) { + i_this->msgflow.init(actor, 0x2C3, 0, NULL); + } else if (i_this->field_0xf81 == 1) { + i_this->msgflow.init(actor, 0x2C4, 0, NULL); + } else if (i_this->lure_type == MG_LURE_PO) { + i_this->msgflow.init(actor, 0x2C5, 0, NULL); + } else if (i_this->field_0xf81 == 3) { + i_this->msgflow.init(actor, 0x2C6, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x2C7, 0, NULL); + } + } + + if (i_this->play_cam_timer >= 15 && mDoCPd_c::getTrigA(PAD_1)) { + mDoAud_seStart(Z2SE_SY_ITEM_SET_X, NULL, 0, 0); + i_this->play_cam_timer = 1; + } + + if (i_this->play_cam_timer >= 1 && i_this->msgflow.doFlow(actor, NULL, 0) && i_this->play_cam_timer >= 15) { + if (henna != NULL && i_this->field_0xf81 == 4) { + i_this->play_cam_mode = 1058; + i_this->play_cam_timer = 0; + } else { + i_this->play_cam_mode = 1053; + } + } + } + break; + case 1000: + if (!actor->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0); + actor->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + + i_this->play_cam_mode = 1001; + i_this->play_cam_timer = 0; + i_this->msgflow.init(actor, 0x2CA, 0, NULL); + camera->mCamera.Stop(); + camera->mCamera.SetTrimSize(1); + case 1001: + if (daAlink_getAlinkActorClass()->checkCanoeRide()) { + fopAc_ac_c* boat = fopAcM_SearchByID(i_this->boat_actor_id); + cLib_addCalc0(&boat->speedF, 1.0f, 1.0f + TREG_F(11)); + } + + if (i_this->msgflow.doFlow(actor, NULL, 0)) { + i_this->play_cam_timer = 0; + i_this->play_cam_mode = 1002; + } + break; + case 1002: + if (i_this->play_cam_timer >= 1) { + u8 sp8 = 0; + if (i_this->play_cam_timer == 1) { + if (dMsgObject_getSelectCursorPos() == 0) { + i_this->msgflow.init(actor, 0x2CB, 0, NULL); + } else if (dMsgObject_getSelectCursorPos() == 1) { + i_this->msgflow.init(actor, 0x2CC, 0, NULL); + } else if (dMsgObject_getSelectCursorPos() == 2) { + i_this->msgflow.init(actor, 0x2CD, 0, NULL); + } else { + sp8 = 1; + } + } + + if (sp8 || i_this->msgflow.doFlow(actor, NULL, 0)) { + dComIfGp_event_reset(); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + i_this->play_cam_mode = 0; + i_this->field_0x146c = 30; + } + } + break; + case 1050: + if (!actor->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0); + actor->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + + i_this->play_cam_mode = 1051; + i_this->play_cam_timer = 0; + + if (henna != NULL) { + i_this->msgflow.init(actor, 0x2BF, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x2C1, 0, NULL); + } + + camera->mCamera.Stop(); + camera->mCamera.SetTrimSize(1); + case 1051: + if (daAlink_getAlinkActorClass()->checkCanoeRide()) { + fopAc_ac_c* boat = fopAcM_SearchByID(i_this->boat_actor_id); + cLib_addCalc0(&boat->speedF, 1.0f, 1.0f + TREG_F(11)); + } + + if (i_this->msgflow.doFlow(actor, NULL, 0)) { + i_this->play_cam_timer = 0; + i_this->play_cam_mode = 1052; + } + break; + case 1052: + if (i_this->play_cam_timer >= 1) { + if (i_this->play_cam_timer == 1) { + if (dMsgObject_getSelectCursorPos() == 0) { + i_this->play_cam_mode = 1053; + } else if (dMsgObject_getSelectCursorPos() == 1) { + i_this->play_cam_mode = 950; + } else { + if (henna != NULL) { + i_this->msgflow.init(actor, 0x2C0, 0, NULL); + } else { + i_this->msgflow.init(actor, 0x2C2, 0, NULL); + } + i_this->play_cam_mode = 1055; + } + } + i_this->msgflow.doFlow(actor, NULL, 0); + } + break; + case 1053: + if (i_this->msgflow.doFlow(actor, NULL, 0)) { + dComIfGp_event_reset(); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + i_this->play_cam_mode = 0; + i_this->field_0x146c = 30; + } + break; + case 1055: + if (i_this->msgflow.doFlow(actor, NULL, 0)) { + if (dMsgObject_getSelectCursorPos() != 0) { + dComIfGp_event_reset(); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + i_this->field_0x146c = 30; + i_this->play_cam_mode = 0; + } else { + dStage_changeScene(2, 0.0f, 0, 0, 0, -1); + data_80450C99 = 1; + } + } + break; + case 1058: + if (i_this->play_cam_timer >= 5) { + if (i_this->play_cam_timer == 5) { + i_this->msgflow.init(actor, 0x2C8, 0, NULL); + daAlink_getAlinkActorClass()->changeFishGetFace(3); + } + + if (i_this->msgflow.doFlow(actor, NULL, 0)) { + dComIfGp_event_reset(); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + i_this->play_cam_mode = 0; + i_this->field_0x146c = 30; + dComIfGs_offEventBit(dSv_event_flag_c::saveBitLabels[466]); + i_this->field_0xf81 = 1; + } + } + break; + } + + if (i_this->play_cam_mode != 0) { + i_this->play_cam_timer++; + if (i_this->play_cam_timer > 10000) { + i_this->play_cam_timer = 10000; + } + + if (i_this->play_cam_mode < 1000) { + cXyz sp138(i_this->play_cam_eye); + cXyz sp12C(i_this->play_cam_center); + if (sp70 != 0) { + dBgS_LinChk sp180; + sp180.SetRope(); + + cXyz sp120(i_this->play_cam_eye); + cXyz sp114; + + sp174 = sp120 - i_this->play_cam_center; + s16 spA = (s16)cM_atan2s(sp174.x, sp174.z); + cMtx_YrotS(*calc_mtx, spA); + sp174.x = 0.0f; + sp174.y = 0.0f; + sp174.z = 100.0f + hREG_F(10); + MtxPosition(&sp174, &sp168); + sp120 += sp168; + + sp114 = i_this->play_cam_eye - (sp168 * (5.0f + nREG_F(5))); + + sp180.Set(&sp114, &sp120, actor); + if (dComIfG_Bgsp().LineCross(&sp180)) { + sp138 = sp180.GetCross() - sp168; + sp174 = sp138 - player->eyePos; + + f32 sp10 = sp174.abs(); + if (sp10 < 100.0f + nREG_F(17)) { + sp10 = (100.0f + nREG_F(17)) - sp10; + sp138.y += sp10; + } + } + } + + camera->mCamera.Set(sp12C, sp138, i_this->play_cam_fovy, 0); + } + } +} + +/* 804B805C-804B9318 00EB5C 12BC+00 1/1 0/0 0/0 .text play_camera_u__FP13dmg_rod_class */ +static void play_camera_u(dmg_rod_class* i_this) { + fopAc_ac_c* actor = (fopAc_ac_c*)&i_this->actor; + fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0); + fopAc_ac_c* mgfish_a = fopAcM_SearchByID(i_this->mg_fish_id); + camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + + i_this->field_0x13b0 = i_this->rod_substick_y; + i_this->field_0x13ac = i_this->rod_substick_x; + + cXyz spCC; + cXyz spC0; + cXyz spB4; + cXyz spA8; + + int sp18 = 0; + int sp14 = 0; + + switch (i_this->play_cam_mode) { + case 0: + break; + case 1: { + i_this->play_cam_mode = 2; + camera->mCamera.Stop(); + i_this->play_cam_timer = 0; + dMw_offMenuRing(); + i_this->play_cam_fovy = 55.0f; + + camera_class* sp10 = (camera_class*)dComIfGp_getCamera(0); + camera->mCamera.SetTrimSize(1); + + i_this->play_cam_eye = sp10->lookat.eye; + i_this->play_cam_center = sp10->lookat.center; + i_this->field_0x1410 = 1000.0f; + } + /* fallthrough */ + case 2: + sp14 = 1; + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + spCC.x = 0.0f; + spCC.y = 250.0f + WREG_F(0); + spCC.z = -170.0f + WREG_F(1); + MtxPosition(&spCC, &spB4); + spB4 += player->current.pos; + + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + spCC.x = (-50.0f + WREG_F(10)) * (i_this->field_0x150c * i_this->field_0x1508); + spCC.y = 200.0f + (i_this->field_0x1508 * (50.0f + WREG_F(11))); + spCC.z = 0.0f; + MtxPosition(&spCC, &spA8); + spA8 += player->current.pos; + + spCC.x = 0.0f; + spCC.y = i_this->field_0x1508 * (-100.0f + WREG_F(13)); + spCC.z = i_this->field_0x1508 * (-100.0f + WREG_F(14)); + MtxPosition(&spCC, &spC0); + spB4 += spC0; + + f32 var_f31; + if (i_this->play_cam_timer < 10) { + var_f31 = 200.0f; + } else { + var_f31 = 10.0f; + } + + cLib_addCalc2(&i_this->play_cam_eye.x, spB4.x, 0.2f, var_f31); + cLib_addCalc2(&i_this->play_cam_eye.y, spB4.y, 0.2f, var_f31); + cLib_addCalc2(&i_this->play_cam_eye.z, spB4.z, 0.2f, var_f31); + cLib_addCalc2(&i_this->play_cam_center.x, spA8.x, 0.2f, var_f31); + cLib_addCalc2(&i_this->play_cam_center.y, spA8.y, 0.2f, var_f31); + cLib_addCalc2(&i_this->play_cam_center.z, spA8.z, 0.2f, var_f31); + cLib_addCalc2(&i_this->play_cam_fovy, 55.0f, 0.2f, 2.0f); + break; + case 3: + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + spCC.x = 0.0f; + spCC.y = 250.0f + WREG_F(0); + spCC.z = -170.0f + WREG_F(1); + MtxPosition(&spCC, &i_this->play_cam_eye_target); + i_this->play_cam_eye_target += player->current.pos; + + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + spCC.x = 0.0f; + spCC.y = 200.0f + (50.0f + WREG_F(11)); + spCC.z = 0.0f; + MtxPosition(&spCC, &i_this->play_cam_center_target); + i_this->play_cam_center_target += player->current.pos; + + i_this->play_cam_eye_speed.x = fabsf(i_this->play_cam_eye_target.x - i_this->play_cam_eye.x); + i_this->play_cam_eye_speed.y = fabsf(i_this->play_cam_eye_target.y - i_this->play_cam_eye.y); + i_this->play_cam_eye_speed.z = fabsf(i_this->play_cam_eye_target.z - i_this->play_cam_eye.z); + i_this->play_cam_center_speed.x = fabsf(i_this->play_cam_center_target.x - i_this->play_cam_center.x); + i_this->play_cam_center_speed.y = fabsf(i_this->play_cam_center_target.y - i_this->play_cam_center.y); + i_this->play_cam_center_speed.z = fabsf(i_this->play_cam_center_target.z - i_this->play_cam_center.z); + + i_this->field_0x1410 = 0.0f; + i_this->play_cam_mode = 4; + i_this->play_cam_timer = 0; + daAlink_getAlinkActorClass()->fishingCastWaitAnimeStart(); + /* fallthrough */ + case 4: + cam_3d_morf(i_this, 0.1f); + cLib_addCalc2(&i_this->field_0x1410, 0.1f, 1.0f, 0.02f); + + if (i_this->play_cam_timer > 10) { + i_this->play_cam_mode = 2; + } + + cLib_addCalc2(&i_this->play_cam_fovy, 55.0f, 0.2f, 2.0f); + break; + case 5: + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + spCC.x = 0.0f; + spCC.y = 150.0f + ZREG_F(2); + spCC.z = 150.0f + ZREG_F(3); + MtxPosition(&spCC, &i_this->play_cam_eye_target); + i_this->play_cam_eye_target += player->current.pos; + i_this->play_cam_center_target = i_this->hook_pos; + + if (i_this->play_cam_center_target.y < i_this->field_0x590) { + i_this->play_cam_center_target.y = i_this->field_0x590; + } + + i_this->play_cam_eye_speed.x = fabsf(i_this->play_cam_eye_target.x - i_this->play_cam_eye.x); + i_this->play_cam_eye_speed.y = fabsf(i_this->play_cam_eye_target.y - i_this->play_cam_eye.y); + i_this->play_cam_eye_speed.z = fabsf(i_this->play_cam_eye_target.z - i_this->play_cam_eye.z); + i_this->play_cam_center_speed.x = fabsf(i_this->play_cam_center_target.x - i_this->play_cam_center.x); + i_this->play_cam_center_speed.y = fabsf(i_this->play_cam_center_target.y - i_this->play_cam_center.y); + i_this->play_cam_center_speed.z = fabsf(i_this->play_cam_center_target.z - i_this->play_cam_center.z); + + i_this->field_0x1410 = 0.0f; + i_this->play_cam_mode = 6; + i_this->play_cam_timer = 0; + /* fallthrough */ + case 6: + cam_3d_morf(i_this, 0.1f); + cLib_addCalc2(&i_this->field_0x1410, 0.1f, 1.0f, 0.01f); + + if (i_this->play_cam_timer > AREG_S(3) + 20) { + i_this->play_cam_mode = 7; + } + goto block_41; // fakematch? whats going on here + case 7: { + spA8 = i_this->hook_pos; + spA8.y += 20.0f + AREG_F(11); + if (spA8.y < i_this->field_0x590) { + spA8.y = i_this->field_0x590; + } + spA8.y = (spA8.y + ((0.1f + hREG_F(13)) * (player->current.pos.y - i_this->hook_pos.y))); + + f32 temp_f31 = 5.0f; + cLib_addCalc2(&i_this->play_cam_center.x, spA8.x, 0.1f, temp_f31); + cLib_addCalc2(&i_this->play_cam_center.y, spA8.y, 0.1f, temp_f31); + cLib_addCalc2(&i_this->play_cam_center.z, spA8.z, 0.1f, temp_f31); + + block_41: + if (nREG_S(6) == (int)daAlink_getAlinkActorClass()->getFishingReelFrame()) { + daAlink_getAlinkActorClass()->fishingCastWaitAnimeStop(); + } + + i_this->field_0x140c = 20.0f + (40.0f + BREG_F(15)); + spCC.z = (i_this->hook_pos - i_this->play_cam_eye).abs(); + + i_this->field_0x140c -= spCC.z * (0.1f + BREG_F(16)); + if (i_this->field_0x140c > 40.0f) { + i_this->field_0x140c = 40.0f; + } else if (i_this->field_0x140c < 15.0f) { + i_this->field_0x140c = 15.0f; + } + + cLib_addCalc2(&i_this->play_cam_fovy, i_this->field_0x140c, 0.05f, 2.0f); + break; + } + case 10: + daAlink_getAlinkActorClass()->fishingCastWaitAnimeStop(); + i_this->play_cam_mode = 11; + i_this->play_cam_timer = 0; + case 11: { + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + spCC.x = ZREG_F(16) - 100.0f; + spCC.y = 50.0f + (150.0f + ZREG_F(17)); + spCC.z = (50.0f + ZREG_F(18)) - 200.0f; + MtxPosition(&spCC, &spB4); + spB4 += player->current.pos; + spA8 = actor->current.pos; + + f32 temp_f31_2 = 50.0f + ZREG_F(19); + cLib_addCalc2(&i_this->play_cam_eye.x, spB4.x, 0.2f, temp_f31_2); + cLib_addCalc2(&i_this->play_cam_eye.y, spB4.y, 0.2f, temp_f31_2); + cLib_addCalc2(&i_this->play_cam_eye.z, spB4.z, 0.2f, temp_f31_2); + cLib_addCalc2(&i_this->play_cam_center.x, spA8.x, 0.05f, temp_f31_2); + cLib_addCalc2(&i_this->play_cam_center.y, 200.0f + (i_this->field_0x590 + ZREG_F(14)), 0.05f, temp_f31_2); + cLib_addCalc2(&i_this->play_cam_center.z, spA8.z, 0.05f, temp_f31_2); + cLib_addCalc2(&i_this->play_cam_fovy, 55.0f, 0.1f, 10.0f); + break; + } + case 20: + case 21: { + if (!actor->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0); + actor->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + + csXyz pl_angle(i_this->field_0x14fc, player->shape_angle.y, 0); + daPy_getPlayerActorClass()->setPlayerPosAndAngle(&player->current.pos, &pl_angle); + i_this->field_0xf78 = 0.1f; + + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + spCC.x = -80.0f + DREG_F(0); + spCC.y = 130.0f + DREG_F(1); + spCC.z = 130.0f + DREG_F(2); + MtxPosition(&spCC, &spB4); + spB4 += player->current.pos; + + cLib_addCalc2(&i_this->play_cam_eye.x, spB4.x, 0.2f, 100.0f * i_this->field_0x1410); + cLib_addCalc2(&i_this->play_cam_eye.y, spB4.y, 0.2f, 100.0f * i_this->field_0x1410); + cLib_addCalc2(&i_this->play_cam_eye.z, spB4.z, 0.2f, 100.0f * i_this->field_0x1410); + + spCC.x = 0.0f; + spCC.y = 0.0f; + spCC.z = -25.0f + KREG_F(10); + MtxPosition(&spCC, &spA8); + spA8 += mgfish_a->current.pos; + + if (i_this->play_cam_mode == 20 && i_this->play_cam_timer <= 1) { + camera->mCamera.SetTrimSize(1); + } + + cLib_addCalc2(&i_this->play_cam_center.x, spA8.x, 0.2f, 100.0f * i_this->field_0x1410); + cLib_addCalc2(&i_this->play_cam_center.y, spA8.y, 0.2f, 100.0f * i_this->field_0x1410); + cLib_addCalc2(&i_this->play_cam_center.z, spA8.z, 0.2f, 100.0f * i_this->field_0x1410); + + if (i_this->play_cam_timer > 5) { + cLib_addCalc2(&i_this->field_0x1410, 1.0f, 1.0f, 0.02f + NREG_F(8)); + cLib_addCalc2(&i_this->play_cam_fovy, 55.0f, 0.05f, 1.0f); + } + + if (henna != NULL && i_this->play_cam_mode == 20 && i_this->play_cam_timer <= 5) { + dBgS_GndChk sp19C; + dBgS_ObjGndChk_Spl sp148; + + spCC.x = 200.0f + DREG_F(15); + spCC.y = 300.0f + DREG_F(16); + spCC.z = -40.0f + DREG_F(17); + MtxPosition(&spCC, &spC0); + spC0 += player->current.pos; + + sp19C.SetPos(&spC0); + sp148.SetPos(&spC0); + + spC0.y = dComIfG_Bgsp().GroundCross(&sp19C); + if (spC0.y > dComIfG_Bgsp().GroundCross(&sp148) && fabsf(spC0.y - player->current.pos.y) < 50.0f) { + henna->actor.current.pos = spC0; + } + } + + actor->eyePos.y = actor->current.pos.y - 20.0f; + + mg_fish_class* mgfish = (mg_fish_class*)mgfish_a; + if (i_this->play_cam_mode == 21 && i_this->play_cam_timer == 3 && mgfish->mGedouKind == 10) { + spC0.set(3277.0f, player->current.pos.y, 13034.0f); + daPy_getPlayerActorClass()->setPlayerPosAndAngle(&spC0, -0x5E4D, 0); + } + + if (i_this->play_cam_mode == 21 && i_this->play_cam_timer == 4) { + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + if (mgfish->mGedouKind == 10) { + spCC.x = 300.0f; + spCC.y = 250.0f; + spCC.z = -200.0f; + MtxPosition(&spCC, &i_this->play_cam_eye); + i_this->play_cam_eye += player->current.pos; + + spCC.x = 0.0f; + spCC.y = 200.0f; + spCC.z = 0.0f; + MtxPosition(&spCC, &i_this->play_cam_center); + i_this->play_cam_center += player->current.pos; + + spCC.x = 0.0f; + spCC.y = 0.0f; + spCC.z = 200.0f; + MtxPosition(&spCC, &spC0); + spC0 += player->current.pos; + } else { + spCC.x = 0.0f; + spCC.y = 250.0f; + spCC.z = -400.0f; + MtxPosition(&spCC, &i_this->play_cam_eye); + i_this->play_cam_eye += player->current.pos; + + spCC.x = 0.0f; + spCC.y = 200.0f; + spCC.z = 0.0f; + MtxPosition(&spCC, &i_this->play_cam_center); + i_this->play_cam_center += player->current.pos; + } + + dComIfGp_event_reset(); + sp18 = 1; + + if (mgfish->mCaughtType != MG_CATCH_FISH) { + if (mgfish->mCaughtType == MG_CATCH_SG) { + e_sg_class* spC = (e_sg_class*)fopAcM_SearchByID(mgfish->mSkullfishId); + spC->mInactive = 0; + spC->current.pos = mgfish_a->current.pos; + spC->old.pos = spC->current.pos; + spC->mAction = 3; + spC->mMode = 0; + spC->field_0x567 = 1; + } else if (mgfish->mCaughtType == MG_CATCH_BB) { + mgfish->mSound.startCreatureSound(Z2SE_AL_FISH_JUMP_DOWN, 0, -1); + } + + mgfish->mCaughtType = MG_CATCH_FISH; + mgfish_a->current.pos = mgfish_a->home.pos; + mgfish->mCurAction = 0; + mgfish->mActionPhase = 0; + mgfish->field_0x659 = 0; + } else { + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + spCC.x = 0.0f; + spCC.y = 100.0f; + spCC.z = 100.0f; + MtxPosition(&spCC, &mgfish_a->current.pos); + mgfish_a->current.pos += player->current.pos; + + mgfish->mCurAction = 0x35; + mgfish->mActionPhase = 10; + mgfish->field_0x659 = 0; + mgfish->field_0x624[1] = 0; + + if (mgfish->mGedouKind == 10) { + mgfish->field_0x624[2] = 300; + } else { + mgfish->field_0x624[2] = 0; + } + + mgfish->field_0x5f6 = player->shape_angle.y; + } + + i_this->action = ACTION_UKI_READY; + i_this->field_0x10a5 = 0; + daAlink_getAlinkActorClass()->endFishingCastWait(); + i_this->field_0x1094 = 0.0f; + i_this->field_0x6e0 = 0.0f; + i_this->field_0xf64 = -30.0f; + daAlink_getAlinkActorClass()->changeFishGetFace(0); + } + break; + } + case 90: + sp18 = 1; + break; + case 1000: + if (!actor->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0); + actor->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + + i_this->play_cam_mode = 1001; + i_this->play_cam_timer = 0; + i_this->msgflow.init(actor, 0x3DA, 0, NULL); + + camera->mCamera.Stop(); + camera->mCamera.SetTrimSize(1); + case 1001: + if (i_this->msgflow.doFlow(actor, NULL, 0)) { + dComIfGp_event_reset(); + i_this->play_cam_mode = 0; + + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + + if (dMsgObject_getSelectCursorPos() != 0) { + henna->field_0x752 = 300; + } + } + break; + } + + if (sp18 != 0) { + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + spCC.x = 0.0f; + spCC.y = 100.0f + JREG_F(1); + spCC.z = -250.0f + JREG_F(2); + MtxPosition(&spCC, &i_this->play_cam_eye); + i_this->play_cam_eye += player->current.pos; + i_this->play_cam_center = player->current.pos; + i_this->play_cam_center.y += 120.0f; + + i_this->play_cam_mode = 0; + camera->mCamera.Reset(i_this->play_cam_center, i_this->play_cam_eye, i_this->play_cam_fovy, 0); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + + dMw_onMenuRing(); + } + + if (i_this->play_cam_mode != 0) { + i_this->play_cam_timer++; + if (i_this->play_cam_timer > 10000) { + i_this->play_cam_timer = 10000; + } + + if (i_this->play_cam_mode < 1000) { + cXyz sp9C; + cXyz sp90; + sp9C = i_this->play_cam_center; + sp90 = i_this->play_cam_eye; + + if (sp14 != 0) { + dBgS_LinChk spD8; + spD8.SetRope(); + + spD8.Set(&i_this->play_cam_center, &i_this->play_cam_eye, actor); + if (dComIfG_Bgsp().LineCross(&spD8)) { + sp90 = spD8.GetCross() + ((sp9C - sp90) * 0.15f); + } + } + + camera->mCamera.Set(sp9C, sp90, i_this->play_cam_fovy, 0); + } + } +} + +/* 804B9318-804BA098 00FE18 0D80+00 2/1 0/0 0/0 .text dmg_rod_Execute__FP13dmg_rod_class + */ +static int dmg_rod_Execute(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + + #if VERSION == VERSION_SHIELD_DEBUG + if (dComIfGs_getPalLanguage() == 1) { + data_804BBBD4 = 2; + } else { + data_804BBBD4 = 0; + } + #else + data_804BBBD4 = 1; + #endif + + if (i_this->field_0x10ab != 0) { + i_this->field_0x10ab--; + dComIfGp_getVibration().StartShock(i_this->field_0x10aa, 1, cXyz(0.0f, 1.0f, 0.0f)); + } + + if (strcmp(dComIfGp_getStartStageName(), "F_SP127") == 0) {} + + henna = (npc_henna_class*)fopAcM_SearchByName(PROC_NPC_HENNA); + if (henna != NULL && henna->field_0x734 != 0) { + henna = NULL; + } + + actor->eyePos = actor->current.pos; + + i_this->rod_stick_x = mDoCPd_c::getStickX3D(PAD_1); + i_this->rod_stick_y = mDoCPd_c::getStickY(PAD_1); + i_this->rod_substick_x = mDoCPd_c::getSubStickX(PAD_1); + i_this->prev_rod_substick_y = i_this->rod_substick_y; + i_this->rod_substick_y = mDoCPd_c::getSubStickY(PAD_1); + + i_this->reel_speed = 5.0f; + i_this->reel_btn_flags = mDoCPd_c::getHoldB(PAD_1) | mDoCPd_c::getHoldDown(PAD_1); + if (mDoCPd_c::getHoldDown(PAD_1)) { + i_this->reel_speed = 15.0f; + } + + if (i_this->rod_stick_x > 1.0f) { + i_this->rod_stick_x = 1.0f; + } else if (i_this->rod_stick_x < -1.0f) { + i_this->rod_stick_x = -1.0f; + } + + if (i_this->rod_stick_y > 1.0f) { + i_this->rod_stick_y = 1.0f; + } else if (i_this->rod_stick_y < -1.0f) { + i_this->rod_stick_y = -1.0f; + } + + i_this->field_0xf6e = 0; + + if (0.0f != i_this->field_0x590 && (g_Counter.mTimer & 15) == 0) { + dBgS_ObjGndChk_Spl sp160; + Vec sp108; + + sp108.x = actor->current.pos.x; + sp108.y = 500.0f + actor->current.pos.y; + sp108.z = actor->current.pos.z; + sp160.SetPos(&sp108); + i_this->field_0x590 = dComIfG_Bgsp().GroundCross(&sp160); + } + + i_this->field_0x578++; + + for (int i = 0; i < 10; i++) { + if (i_this->timers[i] != 0) { + i_this->timers[i]--; + } + } + + if (i_this->field_0x1009 != 0) { + i_this->field_0x1009--; + } + + if (i_this->field_0x1165 != 0) { + i_this->field_0x1165--; + } + + if (i_this->field_0x146c != 0) { + i_this->field_0x146c--; + } + + if (i_this->field_0x1514 != 0) { + i_this->field_0x1514--; + } + + rod_main(i_this); + line_main(i_this); + + cXyz* line_posp = i_this->linemat.getPos(0); + if (i_this->kind == MG_ROD_KIND_LURE) { + i_this->lure_type = i_this->field_0xf81; + lure_main(i_this); + + cXyz sp118[6]; + cXyz spFC(0.0f, 5.0f, 0.0f); + cXyz spF0; + cXyz spE4; + + for (int i = 0; i < 6; i++) { + static int rodline_p[] = {4, 6, 8, 10, 12, 15}; + + if (i == 5) { + sp118[i] = i_this->mg_rod.field_0x0[rodline_p[i]]; + } else { + sp118[i] = i_this->mg_rod.field_0x0[rodline_p[i]] + ((i_this->mg_rod.field_0x0[rodline_p[i] + 1] - i_this->mg_rod.field_0x0[rodline_p[i]]) * (0.5f + AREG_F(11))); + } + } + + s16 spA = 0; + if (i_this->action <= ACTION_LURE_STANDBY) { + spA = -0x4000; + } + + if (i_this->play_cam_mode >= 950 && i_this->play_cam_mode < 1000) { + spA = 0; + } + + static f32 rodline_off[] = {0.5f, 0.4f, 0.35f, 0.3f, 0.25f, 0.2f}; + + for (int i = 0; i < 6; i++, line_posp++) { + if (i == 0) { + *line_posp = i_this->field_0x744; + } else { + spF0 = sp118[i] - sp118[i - 1]; + + s16 spC = -cM_atan2s(spF0.y, JMAFastSqrt(SQUARE(spF0.x) + SQUARE(spF0.z))); + if (abs(spC) < 0x3800) { + i_this->field_0x71c[i].y = cM_atan2s(spF0.x, spF0.z); + i_this->field_0x71c[i].x = spC; + + spC = i_this->field_0x71c[i].y - i_this->field_0x6c4; + if (spC < 0x4000 && spC > -0x4000) { + spC = 0; + } else { + spC = -0x8000; + } + i_this->field_0x71c[i].z = (spA + spC); + } + + cMtx_YrotS(*calc_mtx, i_this->field_0x71c[i].y); + cMtx_XrotM(*calc_mtx, i_this->field_0x71c[i].x); + cMtx_ZrotM(*calc_mtx, i_this->field_0x71c[i].z); + spFC.x = i_this->field_0x760 * rodline_off[i - 1]; + MtxPosition(&spFC, &spE4); + *line_posp = sp118[i - 1] + (spE4 * rodline_off[i - 1]) * (1.0f + YREG_F(2)); + } + } + + for (int i = 0; i < MG_ROD_UKI_LINE_LEN; i++, line_posp++) { + *line_posp = i_this->mg_line.pos[i]; + if (i == 0) { + *line_posp += spE4 * (0.2f + YREG_F(7)); + } + } + + for (int i = 0; i < 6; i++) { + MtxTrans(sp118[i].x, sp118[i].y, sp118[i].z, 0); + + f32 temp_f30 = (0.9f + XREG_F(2)) * rodline_off[i]; + MtxScale(temp_f30, temp_f30, temp_f30, 1); + + if (i == 0) { + cMtx_YrotM(*calc_mtx, i_this->field_0x71c[1].y); + cMtx_XrotM(*calc_mtx, i_this->field_0x71c[1].x); + cMtx_ZrotM(*calc_mtx, i_this->field_0x71c[1].z); + } else { + cMtx_YrotM(*calc_mtx, i_this->field_0x71c[i].y); + cMtx_XrotM(*calc_mtx, i_this->field_0x71c[i].x); + cMtx_ZrotM(*calc_mtx, i_this->field_0x71c[i].z); + } + + MtxTrans(0.0f, 6.0f + AREG_F(15), 0.0f, 1); + cMtx_XrotM(*calc_mtx, 0x4000); + i_this->unk_ring_model[i]->setBaseTRMtx(*calc_mtx); + } + + play_camera(i_this); + } else if (i_this->kind == MG_ROD_KIND_UKI) { + f32 var_f31; + if (fabsf(i_this->hook_pos.y - i_this->field_0x590) < 30.0f) { + var_f31 = (25.0f + (6.0f + BREG_F(17))) * cM_ssin(i_this->field_0x1084.x); + if (var_f31 > 0.0f) { + var_f31 = 0.0f; + } + } else { + var_f31 = 0.0f; + } + + cLib_addCalc2(&i_this->field_0xf74, var_f31, 0.1f, 1.0f + AREG_F(13)); + uki_main(i_this); + + for (int i = 0; i < MG_ROD_UKI_LINE_LEN; i++, line_posp++) { + *line_posp = i_this->mg_line.pos[i]; + } + + play_camera_u(i_this); + } + + actor->health = 0; + i_this->sound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(actor))); + + if (i_this->play_cam_mode != 0) { + if (i_this->field_0x168c == 0) { + i_this->field_0x168c = 1; + dMeter2Info_offWindowAccept(2); + dMeter2Info_offWindowAccept(3); + } + } else if (i_this->field_0x168c != 0) { + i_this->field_0x168c = 0; + dMeter2Info_onWindowAccept(2); + dMeter2Info_onWindowAccept(3); + } + + if (i_this->field_0x1406 != (u8)i_this->play_cam_fovy || i_this->field_0xf78 > 0.001f) { + f32* sp30 = i_this->linemat.getSize(0); + + f32 var_f29; + if (i_this->field_0xf78 > 0.001f) { + var_f29 = i_this->field_0xf78; + } else if (i_this->kind == MG_ROD_KIND_LURE) { + var_f29 = 0.05f + YREG_F(8) + ((i_this->play_cam_fovy - 5.0f) * (0.003f + YREG_F(9))); + } else { + var_f29 = 0.05f + YREG_F(8) + ((i_this->play_cam_fovy - 15.0f) * (0.003f + YREG_F(9))); + } + + int sp2C; + if (i_this->kind == MG_ROD_KIND_LURE) { + sp2C = MG_ROD_LURE_LINE_LEN; + } else { + sp2C = MG_ROD_UKI_LINE_LEN; + } + + for (int i = 0; i < sp2C; i++, sp30++) { + *sp30 = var_f29; + } + + i_this->field_0xf78 = 0.0f; + } + + i_this->field_0x1406 = i_this->play_cam_fovy; + + if (i_this->kind == MG_ROD_KIND_LURE) { + daObjLife_c* obj_life = (daObjLife_c*)fopAcM_SearchByName(PROC_Obj_LifeContainer); + if (obj_life != NULL) { + if (i_this->field_0x10a9 != 0) { + if (i_this->field_0x10a9 == 2) { + cXyz spD8; + MTXCopy(daPy_getLinkPlayerActorClass()->getRightItemMatrix(), *calc_mtx); + spD8.x = 15.0f + XREG_F(0); + spD8.y = XREG_F(1) - 27.0f; + spD8.z = XREG_F(2) - 3.0f; + MtxPosition(&spD8, &obj_life->current.pos); + obj_life->current.pos.y += i_this->field_0x1410; + + actor->eyePos = obj_life->current.pos; + actor->eyePos.y += -20.0f + (20.0f * cM_ssin(i_this->field_0x578 * 700)); + + obj_life->shape_angle.x = 0; + obj_life->shape_angle.z = 0; + } else { + obj_life->current.pos = actor->current.pos; + obj_life->current.pos.y -= 15.0f + JREG_F(7); + + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cLib_addCalcAngleS2(&obj_life->shape_angle.y, daAlink_getAlinkActorClass()->getFishingRodAngleY(), 8, 0x200); + obj_life->shape_angle.z = 500.0f * cM_ssin(i_this->field_0x578 * 1300); + + s16 sp8 = 500.0f * cM_ssin(i_this->field_0x578 * 1100); + if (i_this->reel_btn_flags != 0) { + sp8 += 0x2000; + } + + cLib_addCalcAngleS2(&obj_life->shape_angle.x, sp8, 15, 0x200); + if (actor->current.pos.y > 200.0f) { + actor->speedF = 20.0f; + } + } + + obj_life->speed.zero(); + } else if (i_this->action == ACTION_LURE_CAST || i_this->action == ACTION_LURE_ACTION) { + cXyz spCC = obj_life->current.pos - actor->current.pos; + if (spCC.abs() < 50.0f) { + i_this->field_0x10a9 = 1; + obj_life->startCtrl(); + dComIfGp_getVibration().StartShock(3, 1, cXyz(0.0f, 1.0f, 0.0f)); + } + } + } + } + + if (daAlink_getAlinkActorClass()->checkFishingRodGrab(actor) && i_this->field_0x100f != 0) { + if (i_this->field_0x100f == 1) { + dComIfGp_setDoStatusForce(81, 0); + } else if (i_this->field_0x100f == 2) { + dComIfGp_set3DStatusForce(116, 8, 0); + } + } + + i_this->field_0x100f = 0; + return 1; +} + +/* 804BA098-804BA14C 010B98 00B4+00 1/0 0/0 0/0 .text dmg_rod_IsDelete__FP13dmg_rod_class + */ +static int dmg_rod_IsDelete(dmg_rod_class* i_this) { + if (i_this->play_cam_mode != 0) { + camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + camera->mCamera.Reset(i_this->play_cam_center, i_this->play_cam_eye, i_this->play_cam_fovy, 0); + camera->mCamera.Start(); + camera->mCamera.SetTrimSize(0); + dMw_onMenuRing(); + } + + return 1; +} + +/* 804BA14C-804BA1F4 010C4C 00A8+00 1/0 0/0 0/0 .text dmg_rod_Delete__FP13dmg_rod_class + */ +static int dmg_rod_Delete(dmg_rod_class* i_this) { + fopAc_ac_c* actor = &i_this->actor; + fpc_ProcID id = fopAcM_GetID(actor); + dComIfG_resDelete(&i_this->phase, i_this->arcname); + + if (i_this->HIOInit) { + l_HIOInit = FALSE; + mDoHIO_DELETE_CHILD(l_HIO.id); + } + + if (actor->heap != NULL) { + i_this->sound.deleteObject(); + } + + dMeter2Info_onWindowAccept(2); + dMeter2Info_onWindowAccept(3); + Z2GetAudioMgr()->changeFishingBgm(0); + return 1; +} + +/* 804BA1F4-804BA83C 010CF4 0648+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ +static int useHeapInit(fopAc_ac_c* i_this) { + dmg_rod_class* a_this = (dmg_rod_class*)i_this; + J3DModelData* modelData; + + if (a_this->kind == MG_ROD_KIND_LURE) { + if (!a_this->linemat.init(1, MG_ROD_LURE_LINE_LEN, 1)) { + return 0; + } + + f32* line_sizep = a_this->linemat.getSize(0); + + for (int i = 0; i < MG_ROD_LURE_LINE_LEN; i++, line_sizep++) { + *line_sizep = 0.1f + (0.1f * XREG_S(0)); + } + + for (int i = 0; i < 5; i++) { + static int lure_bmd[] = {6, 7, 8, 10, 13}; + modelData = (J3DModelData*)dComIfG_getObjectRes(a_this->arcname, lure_bmd[i]); + JUT_ASSERT(11397, modelData != 0); + + u32 mdlflg; + if (i == 4) { + mdlflg = 0; + } else { + mdlflg = 0x80000; + } + + a_this->lure_model[i] = mDoExt_J3DModel__create(modelData, mdlflg, 0x11000084); + if (a_this->lure_model[i] == NULL) { + return 0; + } + + if (i == 0) { + a_this->lure_model[i]->setUserArea((u32)a_this); + for (u16 j = 0; j < a_this->lure_model[i]->getModelData()->getJointNum(); j++) { + if (j == 1) { + a_this->lure_model[i]->getModelData()->getJointNodePointer(j)->setCallBack(frog_nodeCallBack); + } + } + } else { + if (i == 3) { + a_this->lure_model[i]->setUserArea((u32)a_this); + for (u16 j = 0; j < a_this->lure_model[i]->getModelData()->getJointNum(); j++) { + if (j == 1 || j == 2) { + a_this->lure_model[i]->getModelData()->getJointNodePointer(j)->setCallBack(ws_nodeCallBack); + } + } + + a_this->field_0x101c[0] = cM_rndF(65536.0f); + a_this->field_0x101e = cM_rndF(65536.0f); + } + + modelData = (J3DModelData*)dComIfG_getObjectRes(a_this->arcname, 5); + JUT_ASSERT(11440, modelData != 0); + + for (int j = 0; j < 2; j++) { + a_this->hook_model[j] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (a_this->hook_model[j] == NULL) { + return 0; + } + } + + modelData = (J3DModelData*)dComIfG_getObjectRes(a_this->arcname, 9); + JUT_ASSERT(11453, modelData != 0); + + a_this->ring_model = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (a_this->ring_model == NULL) { + return 0; + } + } + } + + a_this->rod_modelMorf = new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes(a_this->arcname, 4), NULL, NULL, NULL, 0, 1.0f, 0, -1, 1, 0, 0x80000, 0x11000084); + if (a_this->rod_modelMorf == NULL || a_this->rod_modelMorf->getModel() == NULL) { + return 0; + } + + J3DModel* model = a_this->rod_modelMorf->getModel(); + model->setUserArea((u32)a_this); + for (u16 i = 0; i < model->getModelData()->getJointNum(); i++) { + if (i == 1 || i == 3) { + model->getModelData()->getJointNodePointer(i)->setCallBack(Reel_CallBack); + } + } + + modelData = (J3DModelData*)dComIfG_getObjectRes(a_this->arcname, 9); + JUT_ASSERT(11499, modelData != 0); + + for (int i = 0; i < 6; i++) { + a_this->unk_ring_model[i] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (a_this->unk_ring_model[i] == NULL) { + return 0; + } + } + + for (int i = 0; i < 15; i++) { + int bmd_idx; + if ((i & 1) || i == 2) { + bmd_idx = 41; + } else { + bmd_idx = 42; + } + + modelData = (J3DModelData*)dComIfG_getObjectRes("Alink", bmd_idx); + JUT_ASSERT(11523, modelData != 0); + + a_this->rod_uki_model[i] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (a_this->rod_uki_model[i] == NULL) { + return 0; + } + } + } else { + if (!a_this->linemat.init(1, MG_ROD_UKI_LINE_LEN, 1)) { + return 0; + } + + f32* line_sizep = a_this->linemat.getSize(0); + for (int i = 0; i < MG_ROD_UKI_LINE_LEN; i++, line_sizep++) { + *line_sizep = 0.1f + (0.1f * XREG_S(0)); + } + + modelData = (J3DModelData*)dComIfG_getObjectRes(a_this->arcname, 0x2D); + JUT_ASSERT(11547, modelData != 0); + + a_this->uki_model = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (a_this->uki_model == NULL) { + return 0; + } + + modelData = (J3DModelData*)dComIfG_getObjectRes(a_this->arcname, 0x2E); + JUT_ASSERT(11556, modelData != 0); + + a_this->uki_saki_model = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (a_this->uki_saki_model == NULL) { + return 0; + } + + JUT_ASSERT(11564, modelData != 0); + + for (int i = 0; i < 2; i++) { + static int hook_bmd[] = {44, 43,}; + modelData = (J3DModelData*)dComIfG_getObjectRes(a_this->arcname, hook_bmd[i]); + a_this->hook_model[i] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (a_this->hook_model[i] == NULL) { + return 0; + } + + static int esa_bmd[] = {36, 48}; + modelData = (J3DModelData*)dComIfG_getObjectRes(a_this->arcname, esa_bmd[i]); + a_this->esa_model[i] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (a_this->esa_model[i] == NULL) { + return 0; + } + } + + int bmd_idx = 40; + for (int i = 0; i < 15; i++) { + if (i > 0) { + if (i == 3 || i == 6 || i == 9 || i >= 12) { + bmd_idx = 42; + } else { + bmd_idx = 41; + } + } + + modelData = (J3DModelData*)dComIfG_getObjectRes(a_this->arcname, bmd_idx); + JUT_ASSERT(11624, modelData != 0); + + a_this->rod_uki_model[i] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (a_this->rod_uki_model[i] == NULL) { + return 0; + } + } + } + + return 1; +} + +/* 804BA83C-804BAC0C 01133C 03D0+00 1/0 0/0 0/0 .text dmg_rod_Create__FP10fopAc_ac_c */ +static int dmg_rod_Create(fopAc_ac_c* i_this) { + dmg_rod_class* a_this = (dmg_rod_class*)i_this; + fopAcM_SetupActor(i_this, dmg_rod_class); + + a_this->arg0 = fopAcM_GetParam(i_this); + a_this->arg1 = (fopAcM_GetParam(i_this) & 0xFF00) >> 8; + a_this->arg2 = (fopAcM_GetParam(i_this) & 0xFF0000) >> 0x10; + + fopAc_ac_c* player = dComIfGp_getPlayer(0); + + if (a_this->arg0 == 0xF) { + a_this->arg0 = 13; + } + + if (daAlink_getAlinkActorClass()->checkCanoeRide()) { + a_this->arg0 = 13; + a_this->arg1 = 0; + } + + if (a_this->arg0 == 13) { + if (strcmp(dComIfGp_getStartStageName(), "T_MUKAO") == 0 && fopAcM_GetRoomNo(player) == 4) { + a_this->arg1 = 1; + a_this->arg0 = KREG_S(8) + 29; + } + } + + a_this->field_0x6a0 = a_this->arg0; + + u32 heap_size; + if (a_this->arg1 == 0) { + a_this->kind = MG_ROD_KIND_LURE; + a_this->arcname = "Mg_rod"; + heap_size = 0x15FE0; + } else { + a_this->kind = MG_ROD_KIND_UKI; + a_this->arcname = "Alink"; + heap_size = 0xC9A0; + } + + #if VERSION == VERSION_SHIELD_DEBUG + if (dComIfGs_getPalLanguage() == 1) { + data_804BBBD4 = 2; + } else { + data_804BBBD4 = 0; + } + #else + data_804BBBD4 = 1; + #endif + + int phase_state = dComIfG_resLoad(&a_this->phase, a_this->arcname); + if (phase_state == cPhs_COMPLEATE_e) { + OS_REPORT("MG_ROD PARAM %x\n", fopAcM_GetParam(i_this)); + OS_REPORT("MG_ROD//////////////MG_ROD SET 1 !!\n"); + + if (!fopAcM_entrySolidHeap(i_this, useHeapInit, heap_size)) { + OS_REPORT("//////////////MG_ROD SET NON !!\n"); + return cPhs_ERROR_e; + } + + OS_REPORT("//////////////MG_ROD SET 2 !!\n"); + if (!l_HIOInit) { + a_this->HIOInit = TRUE; + l_HIOInit = TRUE; + l_HIO.id = mDoHIO_CREATE_CHILD("釣りシステム", &l_HIO); + } + + a_this->acch.Set(fopAcM_GetPosition_p(i_this), fopAcM_GetOldPosition_p(i_this), i_this, 1, &a_this->acchcir, fopAcM_GetSpeed_p(i_this), NULL, NULL); + a_this->acchcir.SetWall(10.0f, 10.0f); + + if (strcmp(dComIfGp_getStartStageName(), "F_SP127") != 0) { + a_this->field_0x590 = -50000.0f; + } + + a_this->sound.init(&i_this->current.pos, &i_this->current.pos, 3, 1); + a_this->field_0x1165 = 20; + + fopAc_ac_c* boat_actor = (fopAc_ac_c*)fpcM_Search(s_boat_sub, i_this); + a_this->boat_actor_id = fopAcM_GetID(boat_actor); + + if (a_this->kind == MG_ROD_KIND_UKI) { + fopAcM_setStageLayer(i_this); + fopAc_ac_c* sp18 = dComIfGp_getPlayer(0); + + a_this->action = ACTION_UKI_READY; + a_this->hook_pos = sp18->current.pos; + a_this->hook_pos.y += 200.0f; + i_this->current.pos = a_this->hook_pos; + a_this->field_0x1094 = 200.0f; + a_this->timers[0] = 5; + a_this->timers[3] = 5; + + static dCcD_SrcSph cc_sph_src = { + { + {0x0, {{0x0, 0x0, 0x0}, {0x0, 0x0}, 0x49}}, // 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}, 5.0f} // mSph + } // mSphAttr + }; + + a_this->ccStts.Init(10, 0, i_this); + a_this->ccSph.Set(cc_sph_src); + a_this->ccSph.SetStts(&a_this->ccStts); + + a_this->field_0x6a8 = 15; + } else { + if (boat_actor != NULL) { + a_this->action = ACTION_LURE_ONBOAT; + } else { + a_this->action = ACTION_LURE_STANDBY; + } + + a_this->timers[1] = 20; + a_this->lure_type = MG_LURE_PE; + a_this->field_0xf81 = 1; + + u8 lure_ct = dComIfGs_getEventReg(0xF11F) & 0xFF; + OS_REPORT(" SP LURE CT %d\n", lure_ct); + if (lure_ct != 0) { + lure_ct--; + dComIfGs_setEventReg(0xF11F, lure_ct); + } + + a_this->field_0x6a4 = 1.0f; + } + + OS_REPORT("//////////////MG_ROD SET 3 !!\n"); + dmg_rod_Execute(a_this); + } + + return phase_state; +} /* 804BBAAC-804BBACC -00001 0020+00 1/0 0/0 0/0 .data l_dmg_rod_Method */ static actor_method_class l_dmg_rod_Method = { - (process_method_func)dmg_rod_Create__FP10fopAc_ac_c, - (process_method_func)dmg_rod_Delete__FP13dmg_rod_class, - (process_method_func)dmg_rod_Execute__FP13dmg_rod_class, - (process_method_func)dmg_rod_IsDelete__FP13dmg_rod_class, - (process_method_func)dmg_rod_Draw__FP13dmg_rod_class, + (process_method_func)dmg_rod_Create, + (process_method_func)dmg_rod_Delete, + (process_method_func)dmg_rod_Execute, + (process_method_func)dmg_rod_IsDelete, + (process_method_func)dmg_rod_Draw, }; /* 804BBACC-804BBAFC -00001 0030+00 0/0 0/0 1/0 .data g_profile_MG_ROD */ @@ -714,2241 +6377,6 @@ extern actor_process_profile_definition g_profile_MG_ROD = { fopAc_CULLBOX_0_e, // cullType }; -/* 804BBAFC-804BBB08 0002AC 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, -}; - -/* 804BBB08-804BBB14 0002B8 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, -}; - -/* 804BBB14-804BBB20 0002C4 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, -}; - -/* 804BBB20-804BBB2C 0002D0 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, -}; - -/* 804BBB2C-804BBB38 0002DC 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, -}; - -/* 804BBB38-804BBB5C 0002E8 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_804BB170, - (void*)NULL, - (void*)NULL, - (void*)func_804BB168, -}; - -/* 804BBB5C-804BBB70 00030C 0014+00 1/1 0/0 0/0 .data __vt__18mDoExt_3DlineMat_c */ -SECTION_DATA extern void* __vt__18mDoExt_3DlineMat_c[5] = { - (void*)NULL /* RTTI */, (void*)NULL, (void*)NULL, (void*)NULL, (void*)NULL, -}; - -/* 804BBB70-804BBB7C 000320 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGPla */ -SECTION_DATA extern void* __vt__8cM3dGPla[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGPlaFv, -}; - -/* 804BBB7C-804BBB88 00032C 000C+00 2/2 0/0 0/0 .data __vt__13dmg_rod_HIO_c */ -SECTION_DATA extern void* __vt__13dmg_rod_HIO_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__13dmg_rod_HIO_cFv, -}; - -/* 804A95EC-804A964C 0000EC 0060+00 1/1 0/0 0/0 .text __ct__13dmg_rod_HIO_cFv */ -dmg_rod_HIO_c::dmg_rod_HIO_c() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB55C-804BB560 000028 0004+00 0/2 0/0 0/0 .rodata @4325 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4325 = 13.0f / 10.0f; -COMPILER_STRIP_GATE(0x804BB55C, &lit_4325); -#pragma pop - -/* 804A964C-804A9734 00014C 00E8+00 1/1 0/0 0/0 .text frog_nodeCallBack__FP8J3DJointi */ -static void frog_nodeCallBack(J3DJoint* param_0, int param_1) { - // NONMATCHING -} - -/* 804A9734-804A97F8 000234 00C4+00 1/1 0/0 0/0 .text ws_nodeCallBack__FP8J3DJointi */ -static void ws_nodeCallBack(J3DJoint* param_0, int param_1) { - // NONMATCHING -} - -/* 804A97F8-804A98F4 0002F8 00FC+00 1/1 0/0 0/0 .text Reel_CallBack__FP8J3DJointi */ -static void Reel_CallBack(J3DJoint* param_0, int param_1) { - // NONMATCHING -} - -/* 804A98F4-804A99E0 0003F4 00EC+00 1/1 0/0 0/0 .text Worm_nodeCallBack__FP8J3DJointi */ -static void Worm_nodeCallBack(J3DJoint* param_0, int param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB560-804BB564 00002C 0004+00 1/5 0/0 0/0 .rodata @4545 */ -SECTION_RODATA static f32 const lit_4545 = 5000.0f; -COMPILER_STRIP_GATE(0x804BB560, &lit_4545); - -/* 804A99E0-804A9EAC 0004E0 04CC+00 1/0 0/0 0/0 .text dmg_rod_Draw__FP13dmg_rod_class */ -static void dmg_rod_Draw(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB564-804BB568 000030 0004+00 0/5 0/0 0/0 .rodata @4872 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4872 = -50.0f; -COMPILER_STRIP_GATE(0x804BB564, &lit_4872); -#pragma pop - -/* 804BB568-804BB56C 000034 0004+00 0/4 0/0 0/0 .rodata @4873 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4873 = -20.0f; -COMPILER_STRIP_GATE(0x804BB568, &lit_4873); -#pragma pop - -/* 804BB56C-804BB570 000038 0004+00 0/1 0/0 0/0 .rodata @4874 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4874 = -70.0f; -COMPILER_STRIP_GATE(0x804BB56C, &lit_4874); -#pragma pop - -/* 804BB570-804BB574 00003C 0004+00 0/1 0/0 0/0 .rodata @4875 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4875 = -33.0f; -COMPILER_STRIP_GATE(0x804BB570, &lit_4875); -#pragma pop - -/* 804BB574-804BB578 000040 0004+00 1/9 0/0 0/0 .rodata @4876 */ -SECTION_RODATA static f32 const lit_4876 = 30.0f; -COMPILER_STRIP_GATE(0x804BB574, &lit_4876); - -/* 804BB578-804BB57C 000044 0004+00 0/1 0/0 0/0 .rodata @4877 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4877 = 115.0f; -COMPILER_STRIP_GATE(0x804BB578, &lit_4877); -#pragma pop - -/* 804BB57C-804BB580 000048 0004+00 0/8 0/0 0/0 .rodata @4878 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4878 = -30.0f; -COMPILER_STRIP_GATE(0x804BB57C, &lit_4878); -#pragma pop - -/* 804BB580-804BB584 00004C 0004+00 0/12 0/0 0/0 .rodata @4879 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4879 = 1000.0f; -COMPILER_STRIP_GATE(0x804BB580, &lit_4879); -#pragma pop - -/* 804BB584-804BB588 000050 0004+00 0/20 0/0 0/0 .rodata @4880 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4880 = 1.0f / 5.0f; -COMPILER_STRIP_GATE(0x804BB584, &lit_4880); -#pragma pop - -/* 804BB588-804BB58C 000054 0004+00 0/2 0/0 0/0 .rodata @4881 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4881 = 6.0f / 5.0f; -COMPILER_STRIP_GATE(0x804BB588, &lit_4881); -#pragma pop - -/* 804BB58C-804BB590 000058 0004+00 2/37 0/0 0/0 .rodata @4882 */ -SECTION_RODATA static u8 const lit_4882[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x804BB58C, &lit_4882); - -/* 804BB590-804BB594 00005C 0004+00 0/13 0/0 0/0 .rodata @4883 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4883 = 3.0f; -COMPILER_STRIP_GATE(0x804BB590, &lit_4883); -#pragma pop - -/* 804BB594-804BB598 000060 0004+00 0/16 0/0 0/0 .rodata @4884 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4884 = 5.0f; -COMPILER_STRIP_GATE(0x804BB594, &lit_4884); -#pragma pop - -/* 804BB598-804BB59C 000064 0004+00 0/1 0/0 0/0 .rodata @4885 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4885 = -5.5f; -COMPILER_STRIP_GATE(0x804BB598, &lit_4885); -#pragma pop - -/* 804BB59C-804BB5A0 000068 0004+00 1/6 0/0 0/0 .rodata @4886 */ -SECTION_RODATA static f32 const lit_4886 = -1.0f; -COMPILER_STRIP_GATE(0x804BB59C, &lit_4886); - -/* 804BB5A0-804BB5A4 00006C 0004+00 0/9 0/0 0/0 .rodata @4887 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4887 = -10.0f; -COMPILER_STRIP_GATE(0x804BB5A0, &lit_4887); -#pragma pop - -/* 804BB5A4-804BB5A8 000070 0004+00 0/1 0/0 0/0 .rodata @4888 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4888 = 16.0f; -COMPILER_STRIP_GATE(0x804BB5A4, &lit_4888); -#pragma pop - -/* 804BB5A8-804BB5AC 000074 0004+00 0/7 0/0 0/0 .rodata @4889 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4889 = 300.0f; -COMPILER_STRIP_GATE(0x804BB5A8, &lit_4889); -#pragma pop - -/* 804BB5AC-804BB5B0 000078 0004+00 0/20 0/0 0/0 .rodata @4890 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4890 = 1.0f / 10.0f; -COMPILER_STRIP_GATE(0x804BB5AC, &lit_4890); -#pragma pop - -/* 804BB5B0-804BB5B4 00007C 0004+00 0/1 0/0 0/0 .rodata @4891 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4891 = 0x3D539970; -COMPILER_STRIP_GATE(0x804BB5B0, &lit_4891); -#pragma pop - -/* 804BB5B4-804BB5BC 000080 0008+00 0/15 0/0 0/0 .rodata @4892 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4892[8] = { - 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x804BB5B4, &lit_4892); -#pragma pop - -/* 804BB5BC-804BB5C4 000088 0008+00 0/15 0/0 0/0 .rodata @4893 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4893[8] = { - 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x804BB5BC, &lit_4893); -#pragma pop - -/* 804BB5C4-804BB5CC 000090 0008+00 0/15 0/0 0/0 .rodata @4894 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4894[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x804BB5C4, &lit_4894); -#pragma pop - -/* 804BB5CC-804BB5D0 000098 0004+00 0/1 0/0 0/0 .rodata @4895 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4895 = 0x3D958106; -COMPILER_STRIP_GATE(0x804BB5CC, &lit_4895); -#pragma pop - -/* 804BB5D0-804BB5D4 00009C 0004+00 0/24 0/0 0/0 .rodata @4896 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4896 = 0.5f; -COMPILER_STRIP_GATE(0x804BB5D0, &lit_4896); -#pragma pop - -/* 804BB5D4-804BB5DC 0000A0 0008+00 0/6 0/0 0/0 .rodata @4898 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4898[8] = { - 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x804BB5D4, &lit_4898); -#pragma pop - -/* 804BB5DC-804BB5E4 0000A8 0008+00 0/4 0/0 0/0 .rodata @4902 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4902[8] = { - 0x43, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x804BB5DC, &lit_4902); -#pragma pop - -/* 804A9EAC-804AAB78 0009AC 0CCC+00 1/1 0/0 0/0 .text rod_control__FP13dmg_rod_class */ -static void rod_control(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804AAB78-804AAB98 001678 0020+00 1/1 0/0 0/0 .text rod_main__FP13dmg_rod_class */ -static void rod_main(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB5E4-804BB5E8 0000B0 0004+00 0/6 0/0 0/0 .rodata @5034 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5034 = 500.0f; -COMPILER_STRIP_GATE(0x804BB5E4, &lit_5034); -#pragma pop - -/* 804BB5E8-804BB5EC 0000B4 0004+00 3/19 0/0 0/0 .rodata @5035 */ -SECTION_RODATA static f32 const lit_5035 = 50.0f; -COMPILER_STRIP_GATE(0x804BB5E8, &lit_5035); - -/* 804BB5EC-804BB5F0 0000B8 0004+00 0/18 0/0 0/0 .rodata @5036 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5036 = 2.0f; -COMPILER_STRIP_GATE(0x804BB5EC, &lit_5036); -#pragma pop - -/* 804BB5F0-804BB5F4 0000BC 0004+00 0/3 0/0 0/0 .rodata @5037 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5037 = 0.25f; -COMPILER_STRIP_GATE(0x804BB5F0, &lit_5037); -#pragma pop - -/* 804BBB90-804BBB94 000008 0001+03 7/7 0/0 0/0 .bss @1109 */ -static u8 lit_1109[1 + 3 /* padding */]; - -/* 804BBB94-804BBB98 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 - -/* 804BBB98-804BBB9C 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 - -/* 804BBB9C-804BBBA0 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 - -/* 804BBBA0-804BBBA4 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 - -/* 804BBBA4-804BBBA8 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 - -/* 804BBBA8-804BBBAC 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 - -/* 804BBBAC-804BBBB0 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 - -/* 804BBBB0-804BBBB4 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 - -/* 804BBBB4-804BBBB8 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 - -/* 804BBBB8-804BBBBC 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 - -/* 804BBBBC-804BBBC0 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 - -/* 804BBBC0-804BBBC4 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 - -/* 804BBBC4-804BBBC8 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 - -/* 804BBBC8-804BBBCC 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 - -/* 804BBBCC-804BBBD0 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 - -/* 804BBBD0-804BBBD4 000048 0004+00 6/9 0/0 0/0 .bss henna */ -static u8 henna[4]; - -/* 804BBBD4-804BBBD8 -00001 0004+00 3/7 0/0 0/0 .bss None */ -/* 804BBBD4 0001+00 data_804BBBD4 None */ -/* 804BBBD5 0003+00 data_804BBBD5 None */ -static u8 struct_804BBBD4[4]; - -/* 804BBBD8-804BBBE4 000050 000C+00 0/1 0/0 0/0 .bss @4280 */ -#pragma push -#pragma force_active on -static u8 lit_4280[12]; -#pragma pop - -/* 804BBBE4-804BBC0C 00005C 0028+00 1/6 0/0 0/0 .bss l_HIO */ -static u8 l_HIO[40]; - -/* 804BBC0C-804BBC18 000084 000C+00 0/1 0/0 0/0 .bss @4921 */ -#pragma push -#pragma force_active on -static u8 lit_4921[12]; -#pragma pop - -/* 804BBC18-804BC0C8 000090 04B0+00 3/4 0/0 0/0 .bss old_line_pos */ -static u8 old_line_pos[1200]; - -/* 804AAB98-804AB01C 001698 0484+00 1/1 0/0 0/0 .text line_control1__FP13dmg_rod_class */ -static void line_control1(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804AB01C-804AB064 001B1C 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGPlaFv */ -// cM3dGPla::~cM3dGPla() { -extern "C" void __dt__8cM3dGPlaFv() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB5F4-804BB5F8 0000C0 0004+00 1/13 0/0 0/0 .rodata @5172 */ -SECTION_RODATA static f32 const lit_5172 = 100.0f; -COMPILER_STRIP_GATE(0x804BB5F4, &lit_5172); - -/* 804BB5F8-804BB5FC 0000C4 0004+00 0/7 0/0 0/0 .rodata @5173 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5173 = 1.0f / 20.0f; -COMPILER_STRIP_GATE(0x804BB5F8, &lit_5173); -#pragma pop - -/* 804BB5FC-804BB600 0000C8 0004+00 0/2 0/0 0/0 .rodata @5174 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5174 = 19.0f / 20.0f; -COMPILER_STRIP_GATE(0x804BB5FC, &lit_5174); -#pragma pop - -/* 804BB600-804BB604 0000CC 0004+00 0/6 0/0 0/0 .rodata @5175 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5175 = 1.0f / 50.0f; -COMPILER_STRIP_GATE(0x804BB600, &lit_5175); -#pragma pop - -/* 804AB064-804AB588 001B64 0524+00 1/1 0/0 0/0 .text line_control2__FP13dmg_rod_class */ -static void line_control2(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB604-804BB608 0000D0 0004+00 0/13 0/0 0/0 .rodata @5362 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5362 = 20.0f; -COMPILER_STRIP_GATE(0x804BB604, &lit_5362); -#pragma pop - -/* 804BB608-804BB60C 0000D4 0004+00 0/2 0/0 0/0 .rodata @5363 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5363 = 700.0f; -COMPILER_STRIP_GATE(0x804BB608, &lit_5363); -#pragma pop - -/* 804BB60C-804BB610 0000D8 0004+00 0/4 0/0 0/0 .rodata @5364 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5364 = 2.0f / 5.0f; -COMPILER_STRIP_GATE(0x804BB60C, &lit_5364); -#pragma pop - -/* 804BB610-804BB614 0000DC 0004+00 0/6 0/0 0/0 .rodata @5365 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5365 = 1.0f / 100.0f; -COMPILER_STRIP_GATE(0x804BB610, &lit_5365); -#pragma pop - -/* 804BB614-804BB618 0000E0 0004+00 0/3 0/0 0/0 .rodata @5366 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5366 = 40.0f; -COMPILER_STRIP_GATE(0x804BB614, &lit_5366); -#pragma pop - -/* 804BB618-804BB61C 0000E4 0004+00 0/8 0/0 0/0 .rodata @5367 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5367 = 2000.0f; -COMPILER_STRIP_GATE(0x804BB618, &lit_5367); -#pragma pop - -/* 804BB61C-804BB620 0000E8 0004+00 0/3 0/0 0/0 .rodata @5368 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5368 = 60.0f; -COMPILER_STRIP_GATE(0x804BB61C, &lit_5368); -#pragma pop - -/* 804BB620-804BB624 0000EC 0004+00 0/2 0/0 0/0 .rodata @5369 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_5369 = 0x3B449BA6; -COMPILER_STRIP_GATE(0x804BB620, &lit_5369); -#pragma pop - -/* 804BB624-804BB628 0000F0 0004+00 0/2 0/0 0/0 .rodata @5370 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5370 = 70.0f; -COMPILER_STRIP_GATE(0x804BB624, &lit_5370); -#pragma pop - -/* 804BB628-804BB62C 0000F4 0004+00 0/1 0/0 0/0 .rodata @5371 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5371 = 7.0f / 100.0f; -COMPILER_STRIP_GATE(0x804BB628, &lit_5371); -#pragma pop - -/* 804BB62C-804BB630 0000F8 0004+00 0/1 0/0 0/0 .rodata @5372 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5372 = 2.0f / 25.0f; -COMPILER_STRIP_GATE(0x804BB62C, &lit_5372); -#pragma pop - -/* 804AB588-804ABCE0 002088 0758+00 1/1 0/0 0/0 .text line_control1_u__FP13dmg_rod_class - */ -static void line_control1_u(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804ABCE0-804ABED8 0027E0 01F8+00 2/2 0/0 0/0 .text line_control2_u__FP13dmg_rod_class - */ -static void line_control2_u(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804ABED8-804ABFA4 0029D8 00CC+00 1/1 0/0 0/0 .text line_main__FP13dmg_rod_class */ -static void line_main(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804ABFA4-804AC04C 002AA4 00A8+00 2/2 0/0 0/0 .text depth_check__FP13dmg_rod_classP4cXyz */ -static void depth_check(dmg_rod_class* param_0, cXyz* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BC0C8-804BC0D8 000540 000C+04 0/1 0/0 0/0 .bss @5446 */ -#pragma push -#pragma force_active on -static u8 lit_5446[12 + 4 /* padding */]; -#pragma pop - -/* 804BC0D8-804BC0E4 000550 000C+00 0/1 0/0 0/0 .bss sc$5445 */ -#pragma push -#pragma force_active on -static u8 sc[12]; -#pragma pop - -/* 804AC04C-804AC1C0 002B4C 0174+00 1/1 0/0 0/0 .text sibuki_set__FP13dmg_rod_classfP4cXyzi */ -static void sibuki_set(dmg_rod_class* param_0, f32 param_1, cXyz* param_2, int param_3) { - // NONMATCHING -} - -/* 804AC1C0-804AC228 002CC0 0068+00 1/1 0/0 0/0 .text s_boat_sub__FPvPv */ -static void s_boat_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB630-804BB634 0000FC 0004+00 0/1 0/0 0/0 .rodata @5543 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5543 = 0.125f; -COMPILER_STRIP_GATE(0x804BB630, &lit_5543); -#pragma pop - -/* 804BB634-804BB638 000100 0004+00 0/8 0/0 0/0 .rodata @5544 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5544 = 15.0f; -COMPILER_STRIP_GATE(0x804BB634, &lit_5544); -#pragma pop - -/* 804AC228-804AC41C 002D28 01F4+00 1/1 0/0 0/0 .text lure_onboat__FP13dmg_rod_class */ -static void lure_onboat(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB638-804BB63C 000104 0004+00 0/1 0/0 0/0 .rodata @5745 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5745 = 11.0f / 40.0f; -COMPILER_STRIP_GATE(0x804BB638, &lit_5745); -#pragma pop - -/* 804BB63C-804BB640 000108 0004+00 0/1 0/0 0/0 .rodata @5746 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5746 = -14000.0f; -COMPILER_STRIP_GATE(0x804BB63C, &lit_5746); -#pragma pop - -/* 804BB640-804BB644 00010C 0004+00 0/5 0/0 0/0 .rodata @5747 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5747 = 7000.0f; -COMPILER_STRIP_GATE(0x804BB640, &lit_5747); -#pragma pop - -/* 804BB644-804BB648 000110 0004+00 0/2 0/0 0/0 .rodata @5748 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5748 = 3.0f / 5.0f; -COMPILER_STRIP_GATE(0x804BB644, &lit_5748); -#pragma pop - -/* 804BB648-804BB64C 000114 0004+00 0/1 0/0 0/0 .rodata @5749 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_5749 = 0x3BA3D70A; -COMPILER_STRIP_GATE(0x804BB648, &lit_5749); -#pragma pop - -/* 804BB64C-804BB650 000118 0004+00 0/2 0/0 0/0 .rodata @5750 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5750 = -100.0f; -COMPILER_STRIP_GATE(0x804BB64C, &lit_5750); -#pragma pop - -/* 804BB650-804BB654 00011C 0004+00 0/3 0/0 0/0 .rodata @5751 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5751 = -40.0f; -COMPILER_STRIP_GATE(0x804BB650, &lit_5751); -#pragma pop - -/* 804BB654-804BB658 000120 0004+00 0/2 0/0 0/0 .rodata @5752 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5752 = 25.0f; -COMPILER_STRIP_GATE(0x804BB654, &lit_5752); -#pragma pop - -/* 804AC41C-804ACB94 002F1C 0778+00 1/1 0/0 0/0 .text lure_standby__FP13dmg_rod_class */ -static void lure_standby(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804ACB94-804ACC1C 003694 0088+00 2/2 0/0 0/0 .text lure_bound_se_set__FP13dmg_rod_class */ -static void lure_bound_se_set(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB658-804BB65C 000124 0004+00 0/1 0/0 0/0 .rodata @5913 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_5913 = 0x3C2C0831; -COMPILER_STRIP_GATE(0x804BB658, &lit_5913); -#pragma pop - -/* 804BB65C-804BB660 000128 0004+00 0/1 0/0 0/0 .rodata @5914 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_5914 = 0x3C343958; -COMPILER_STRIP_GATE(0x804BB65C, &lit_5914); -#pragma pop - -/* 804BB660-804BB664 00012C 0004+00 0/2 0/0 0/0 .rodata @5915 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5915 = -2.0f; -COMPILER_STRIP_GATE(0x804BB660, &lit_5915); -#pragma pop - -/* 804BB664-804BB668 000130 0004+00 0/3 0/0 0/0 .rodata @5916 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5916 = 3000.0f; -COMPILER_STRIP_GATE(0x804BB664, &lit_5916); -#pragma pop - -/* 804BB668-804BB66C 000134 0004+00 0/6 0/0 0/0 .rodata @5917 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5917 = -5.0f; -COMPILER_STRIP_GATE(0x804BB668, &lit_5917); -#pragma pop - -/* 804BB66C-804BB670 000138 0004+00 0/1 0/0 0/0 .rodata @5918 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5918 = 12000.0f; -COMPILER_STRIP_GATE(0x804BB66C, &lit_5918); -#pragma pop - -/* 804BB670-804BB674 00013C 0004+00 0/5 0/0 0/0 .rodata @5919 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5919 = 4000.0f; -COMPILER_STRIP_GATE(0x804BB670, &lit_5919); -#pragma pop - -/* 804ACC1C-804AD46C 00371C 0850+00 1/1 0/0 0/0 .text lure_cast__FP13dmg_rod_class */ -static void lure_cast(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804AD46C-804AD5AC 003F6C 0140+00 1/1 0/0 0/0 .text simple_bg_check__FP13dmg_rod_classf - */ -static void simple_bg_check(dmg_rod_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* 804AD5AC-804AD5F8 0040AC 004C+00 1/1 0/0 0/0 .text s_wd_sub__FPvPv */ -static void s_wd_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB674-804BB678 000140 0004+00 0/1 0/0 0/0 .rodata @6020 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6020 = 22.0f; -COMPILER_STRIP_GATE(0x804BB674, &lit_6020); -#pragma pop - -/* 804AD5F8-804AD7C0 0040F8 01C8+00 1/1 0/0 0/0 .text wd_check__FP13dmg_rod_class */ -static void wd_check(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB678-804BB67C 000144 0004+00 0/2 0/0 0/0 .rodata @6048 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6048 = 12.0f; -COMPILER_STRIP_GATE(0x804BB678, &lit_6048); -#pragma pop - -/* 804BB67C-804BB680 000148 0004+00 0/5 0/0 0/0 .rodata @6049 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6049 = 6.0f; -COMPILER_STRIP_GATE(0x804BB67C, &lit_6049); -#pragma pop - -/* 804AD7C0-804AD918 0042C0 0158+00 1/1 0/0 0/0 .text fr_action__FP13dmg_rod_classf */ -static void fr_action(dmg_rod_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB680-804BB684 00014C 0004+00 0/1 0/0 0/0 .rodata @6095 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6095 = 8.0f; -COMPILER_STRIP_GATE(0x804BB680, &lit_6095); -#pragma pop - -/* 804BB684-804BB688 000150 0004+00 0/1 0/0 0/0 .rodata @6096 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6096 = 13000.0f; -COMPILER_STRIP_GATE(0x804BB684, &lit_6096); -#pragma pop - -/* 804BB688-804BB68C 000154 0004+00 0/4 0/0 0/0 .rodata @6097 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6097 = 4.0f; -COMPILER_STRIP_GATE(0x804BB688, &lit_6097); -#pragma pop - -/* 804BB68C-804BB690 000158 0004+00 0/4 0/0 0/0 .rodata @6098 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6098 = 400.0f; -COMPILER_STRIP_GATE(0x804BB68C, &lit_6098); -#pragma pop - -/* 804AD918-804ADB58 004418 0240+00 1/2 0/0 0/0 .text pe_action__FP13dmg_rod_classf */ -static void pe_action(dmg_rod_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB690-804BB694 00015C 0004+00 0/13 0/0 0/0 .rodata @6141 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6141 = 10.0f; -COMPILER_STRIP_GATE(0x804BB690, &lit_6141); -#pragma pop - -/* 804BB694-804BB698 000160 0004+00 0/1 0/0 0/0 .rodata @6142 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6142 = 127.0f; -COMPILER_STRIP_GATE(0x804BB694, &lit_6142); -#pragma pop - -/* 804ADB58-804ADDD4 004658 027C+00 1/2 0/0 0/0 .text po_action__FP13dmg_rod_classf */ -static void po_action(dmg_rod_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB698-804BB69C 000164 0004+00 0/1 0/0 0/0 .rodata @6183 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6183 = 15000.0f; -COMPILER_STRIP_GATE(0x804BB698, &lit_6183); -#pragma pop - -/* 804BB69C-804BB6A0 000168 0004+00 0/1 0/0 0/0 .rodata @6184 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6184 = 10000.0f; -COMPILER_STRIP_GATE(0x804BB69C, &lit_6184); -#pragma pop - -/* 804BB6A0-804BB6A4 00016C 0004+00 0/1 0/0 0/0 .rodata @6185 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6185 = 1300.0f; -COMPILER_STRIP_GATE(0x804BB6A0, &lit_6185); -#pragma pop - -/* 804BB6A4-804BB6A8 000170 0004+00 0/2 0/0 0/0 .rodata @6186 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6186 = 9.0f; -COMPILER_STRIP_GATE(0x804BB6A4, &lit_6186); -#pragma pop - -/* 804ADDD4-804AE06C 0048D4 0298+00 1/1 0/0 0/0 .text ws_action__FP13dmg_rod_classf */ -static void ws_action(dmg_rod_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB6A8-804BB6AC 000174 0004+00 0/1 0/0 0/0 .rodata @6224 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6224 = -1.0f / 5.0f; -COMPILER_STRIP_GATE(0x804BB6A8, &lit_6224); -#pragma pop - -/* 804BB6AC-804BB6B0 000178 0004+00 0/2 0/0 0/0 .rodata @6225 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6225 = -500.0f; -COMPILER_STRIP_GATE(0x804BB6AC, &lit_6225); -#pragma pop - -/* 804BB6B0-804BB6B4 00017C 0004+00 0/4 0/0 0/0 .rodata @6226 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6226 = -200.0f; -COMPILER_STRIP_GATE(0x804BB6B0, &lit_6226); -#pragma pop - -/* 804BB6B4-804BB6B8 000180 0004+00 0/1 0/0 0/0 .rodata @6227 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6227 = 28000.0f; -COMPILER_STRIP_GATE(0x804BB6B4, &lit_6227); -#pragma pop - -/* 804AE06C-804AE250 004B6C 01E4+00 1/1 0/0 0/0 .text sp_action__FP13dmg_rod_classf */ -static void sp_action(dmg_rod_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB6B8-804BB6BC 000184 0004+00 0/1 0/0 0/0 .rodata @6321 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6321 = 32768.0f; -COMPILER_STRIP_GATE(0x804BB6B8, &lit_6321); -#pragma pop - -/* 804BB6BC-804BB6C0 000188 0004+00 0/3 0/0 0/0 .rodata @6322 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6322 = 16000.0f; -COMPILER_STRIP_GATE(0x804BB6BC, &lit_6322); -#pragma pop - -/* 804AE250-804AE778 004D50 0528+00 1/1 0/0 0/0 .text ground_action__FP13dmg_rod_class */ -static void ground_action(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB6C0-804BB6C4 00018C 0004+00 0/1 0/0 0/0 .rodata @6387 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6387 = 0.75f; -COMPILER_STRIP_GATE(0x804BB6C0, &lit_6387); -#pragma pop - -/* 804BB6C4-804BB6C8 000190 0004+00 0/1 0/0 0/0 .rodata @6388 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6388 = 7.0f; -COMPILER_STRIP_GATE(0x804BB6C4, &lit_6388); -#pragma pop - -/* 804BB6C8-804BB6CC 000194 0004+00 0/2 0/0 0/0 .rodata @6389 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6389 = 13.0f / 20.0f; -COMPILER_STRIP_GATE(0x804BB6C8, &lit_6389); -#pragma pop - -/* 804AE778-804AEA80 005278 0308+00 1/1 0/0 0/0 .text wd_action__FP13dmg_rod_classfP5wd_ss */ -static void wd_action(dmg_rod_class* param_0, f32 param_1, wd_ss* param_2) { - // NONMATCHING -} - -/* 804AEA80-804AEBF0 005580 0170+00 1/1 0/0 0/0 .text heart_action__FP13dmg_rod_classf */ -static void heart_action(dmg_rod_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* 804AEBF0-804AEE18 0056F0 0228+00 1/1 0/0 0/0 .text action_eff_set__FP13dmg_rod_class - */ -static void action_eff_set(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB6CC-804BB6D0 000198 0004+00 0/2 0/0 0/0 .rodata @6778 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_6778 = 0x450D3DCB; -COMPILER_STRIP_GATE(0x804BB6CC, &lit_6778); -#pragma pop - -/* 804BB6D0-804BB6D4 00019C 0004+00 0/1 0/0 0/0 .rodata @6779 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6779 = -1.0f / 10.0f; -COMPILER_STRIP_GATE(0x804BB6D0, &lit_6779); -#pragma pop - -/* 804BB6D4-804BB6D8 0001A0 0004+00 0/1 0/0 0/0 .rodata @6780 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6780 = 11.0f; -COMPILER_STRIP_GATE(0x804BB6D4, &lit_6780); -#pragma pop - -/* 804BB6D8-804BB6DC 0001A4 0004+00 0/1 0/0 0/0 .rodata @6781 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_6781 = 0x3C03126E; -COMPILER_STRIP_GATE(0x804BB6D8, &lit_6781); -#pragma pop - -/* 804BB6DC-804BB6E0 0001A8 0004+00 0/1 0/0 0/0 .rodata @6782 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_6782 = 0x3C1BA5E3; -COMPILER_STRIP_GATE(0x804BB6DC, &lit_6782); -#pragma pop - -/* 804BB6E0-804BB6E4 0001AC 0004+00 0/1 0/0 0/0 .rodata @6783 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6783 = 2.5f; -COMPILER_STRIP_GATE(0x804BB6E0, &lit_6783); -#pragma pop - -/* 804BB6E4-804BB6E8 0001B0 0004+00 0/1 0/0 0/0 .rodata @6784 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6784 = 450.0f; -COMPILER_STRIP_GATE(0x804BB6E4, &lit_6784); -#pragma pop - -/* 804BB6E8-804BB6EC 0001B4 0004+00 0/1 0/0 0/0 .rodata @6785 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6785 = 90.0f; -COMPILER_STRIP_GATE(0x804BB6E8, &lit_6785); -#pragma pop - -/* 804AEE18-804AFA70 005918 0C58+00 1/1 0/0 0/0 .text lure_action__FP13dmg_rod_class */ -static void lure_action(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB6EC-804BB6F0 0001B8 0004+00 0/1 0/0 0/0 .rodata @6993 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6993 = -3.5f; -COMPILER_STRIP_GATE(0x804BB6EC, &lit_6993); -#pragma pop - -/* 804BB6F0-804BB6F4 0001BC 0004+00 0/1 0/0 0/0 .rodata @6994 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_6994 = 0x3B83126F; -COMPILER_STRIP_GATE(0x804BB6F0, &lit_6994); -#pragma pop - -/* 804BB6F4-804BB6F8 0001C0 0004+00 0/10 0/0 0/0 .rodata @6995 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6995 = 200.0f; -COMPILER_STRIP_GATE(0x804BB6F4, &lit_6995); -#pragma pop - -/* 804BB6F8-804BB6FC 0001C4 0004+00 0/3 0/0 0/0 .rodata @6996 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6996 = -0.5f; -COMPILER_STRIP_GATE(0x804BB6F8, &lit_6996); -#pragma pop - -/* 804AFA70-804B02C4 006570 0854+00 1/1 0/0 0/0 .text lure_hit__FP13dmg_rod_classP13mg_fish_class - */ -static void lure_hit(dmg_rod_class* param_0, mg_fish_class* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB6FC-804BB700 0001C8 0004+00 0/1 0/0 0/0 .rodata @7218 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7218 = 23.0f / 10.0f; -COMPILER_STRIP_GATE(0x804BB6FC, &lit_7218); -#pragma pop - -/* 804BB700-804BB704 0001CC 0004+00 0/1 0/0 0/0 .rodata @7219 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7219 = 20000.0f; -COMPILER_STRIP_GATE(0x804BB700, &lit_7219); -#pragma pop - -/* 804BB704-804BB708 0001D0 0004+00 0/2 0/0 0/0 .rodata @7220 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_7220 = 0x421D7AF6; -COMPILER_STRIP_GATE(0x804BB704, &lit_7220); -#pragma pop - -/* 804BB708-804BB70C 0001D4 0004+00 0/2 0/0 0/0 .rodata @7221 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7221 = 127.0f / 50.0f; -COMPILER_STRIP_GATE(0x804BB708, &lit_7221); -#pragma pop - -/* 804B02C4-804B0A90 006DC4 07CC+00 1/1 0/0 0/0 .text lure_catch__FP13dmg_rod_class */ -static void lure_catch(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB70C-804BB710 0001D8 0004+00 0/1 0/0 0/0 .rodata @7320 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7320 = -300.0f; -COMPILER_STRIP_GATE(0x804BB70C, &lit_7320); -#pragma pop - -/* 804B0A90-804B0E74 007590 03E4+00 1/1 0/0 0/0 .text lure_bare__FP13dmg_rod_class */ -static void lure_bare(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB710-804BB714 0001DC 0004+00 0/1 0/0 0/0 .rodata @7428 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_7428 = 0x3E999998; -COMPILER_STRIP_GATE(0x804BB710, &lit_7428); -#pragma pop - -/* 804BB714-804BB718 0001E0 0004+00 0/5 0/0 0/0 .rodata @7429 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7429 = 150.0f; -COMPILER_STRIP_GATE(0x804BB714, &lit_7429); -#pragma pop - -/* 804B0E74-804B11CC 007974 0358+00 1/1 0/0 0/0 .text lure_heart__FP13dmg_rod_class */ -static void lure_heart(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804B11CC-804B16B8 007CCC 04EC+00 1/1 0/0 0/0 .text hook_set__FP13dmg_rod_classP4cXyzi - */ -static void hook_set(dmg_rod_class* param_0, cXyz* param_1, int param_2) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB718-804BB71C 0001E4 0004+00 0/1 0/0 0/0 .rodata @7680 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7680 = 6000.0f; -COMPILER_STRIP_GATE(0x804BB718, &lit_7680); -#pragma pop - -/* 804BB71C-804BB720 0001E8 0004+00 0/2 0/0 0/0 .rodata @7681 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7681 = -4000.0f; -COMPILER_STRIP_GATE(0x804BB71C, &lit_7681); -#pragma pop - -/* 804BB720-804BB724 0001EC 0004+00 0/3 0/0 0/0 .rodata @7682 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7682 = 2500.0f; -COMPILER_STRIP_GATE(0x804BB720, &lit_7682); -#pragma pop - -/* 804B16B8-804B1D14 0081B8 065C+00 1/1 0/0 0/0 .text lure_disp__FP13dmg_rod_class */ -static void lure_disp(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804B1D14-804B265C 008814 0948+00 2/1 0/0 0/0 .text lure_main__FP13dmg_rod_class */ -static void lure_main(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB724-804BB728 0001F0 0004+00 0/0 0/0 0/0 .rodata @7880 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7880 = 7.0f / 20.0f; -COMPILER_STRIP_GATE(0x804BB724, &lit_7880); -#pragma pop - -/* 804BB728-804BB72C 0001F4 0004+00 0/1 0/0 0/0 .rodata @7990 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7990 = 800.0f; -COMPILER_STRIP_GATE(0x804BB728, &lit_7990); -#pragma pop - -/* 804BB72C-804BB730 0001F8 0004+00 0/2 0/0 0/0 .rodata @7991 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7991 = 45.0f; -COMPILER_STRIP_GATE(0x804BB72C, &lit_7991); -#pragma pop - -/* 804BB730-804BB734 0001FC 0004+00 0/1 0/0 0/0 .rodata @7992 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7992 = 17.0f; -COMPILER_STRIP_GATE(0x804BB730, &lit_7992); -#pragma pop - -/* 804BB734-804BB738 000200 0004+00 0/1 0/0 0/0 .rodata @7993 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7993 = 4096.0f; -COMPILER_STRIP_GATE(0x804BB734, &lit_7993); -#pragma pop - -/* 804BB738-804BB73C 000204 0004+00 0/1 0/0 0/0 .rodata @7994 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_7994 = 6.5f; -COMPILER_STRIP_GATE(0x804BB738, &lit_7994); -#pragma pop - -/* 804B265C-804B2C54 00915C 05F8+00 4/4 0/0 0/0 .text uki_calc__FP13dmg_rod_class */ -static void uki_calc(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB73C-804BB740 000208 0004+00 0/2 0/0 0/0 .rodata @8106 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_8106 = 0x3D88888D; -COMPILER_STRIP_GATE(0x804BB73C, &lit_8106); -#pragma pop - -/* 804BB740-804BB744 00020C 0004+00 0/1 0/0 0/0 .rodata @8107 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_8107 = 0x3ECCCCCC; -COMPILER_STRIP_GATE(0x804BB740, &lit_8107); -#pragma pop - -/* 804BB744-804BB748 000210 0004+00 0/1 0/0 0/0 .rodata @8108 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8108 = -9.0f / 10.0f; -COMPILER_STRIP_GATE(0x804BB744, &lit_8108); -#pragma pop - -/* 804B2C54-804B30E8 009754 0494+00 1/1 0/0 0/0 .text uki_ready__FP13dmg_rod_class */ -static void uki_ready(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804B30E8-804B31D8 009BE8 00F0+00 1/1 0/0 0/0 .text uki_rod_bg_check__FP13dmg_rod_class - */ -static void uki_rod_bg_check(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB748-804BB74C 000214 0004+00 0/1 0/0 0/0 .rodata @8187 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8187 = 6700.0f; -COMPILER_STRIP_GATE(0x804BB748, &lit_8187); -#pragma pop - -/* 804BB74C-804BB750 000218 0004+00 0/1 0/0 0/0 .rodata @8188 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8188 = -4200.0f; -COMPILER_STRIP_GATE(0x804BB74C, &lit_8188); -#pragma pop - -/* 804BB750-804BB754 00021C 0004+00 0/2 0/0 0/0 .rodata @8189 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8189 = -15000.0f; -COMPILER_STRIP_GATE(0x804BB750, &lit_8189); -#pragma pop - -/* 804BB754-804BB758 000220 0004+00 0/1 0/0 0/0 .rodata @8190 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8190 = 3500.0f; -COMPILER_STRIP_GATE(0x804BB754, &lit_8190); -#pragma pop - -/* 804BB758-804BB75C 000224 0004+00 0/1 0/0 0/0 .rodata @8191 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8191 = -11000.0f; -COMPILER_STRIP_GATE(0x804BB758, &lit_8191); -#pragma pop - -/* 804BB75C-804BB760 000228 0004+00 0/1 0/0 0/0 .rodata @8192 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8192 = 140.0f; -COMPILER_STRIP_GATE(0x804BB75C, &lit_8192); -#pragma pop - -/* 804B31D8-804B345C 009CD8 0284+00 3/3 0/0 0/0 .text uki_pl_arm_calc__FP13dmg_rod_class - */ -static void uki_pl_arm_calc(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB760-804BB764 00022C 0004+00 0/1 0/0 0/0 .rodata @8348 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8348 = 21.0f / 20.0f; -COMPILER_STRIP_GATE(0x804BB760, &lit_8348); -#pragma pop - -/* 804BB764-804BB768 000230 0004+00 0/2 0/0 0/0 .rodata @8349 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_8349 = 0x3DCCCCCC; -COMPILER_STRIP_GATE(0x804BB764, &lit_8349); -#pragma pop - -/* 804BB768-804BB76C 000234 0004+00 0/2 0/0 0/0 .rodata @8350 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8350 = 350.0f; -COMPILER_STRIP_GATE(0x804BB768, &lit_8350); -#pragma pop - -/* 804B345C-804B3B7C 009F5C 0720+00 1/1 0/0 0/0 .text uki_standby__FP13dmg_rod_class */ -static void uki_standby(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB76C-804BB770 000238 0004+00 0/1 0/0 0/0 .rodata @8448 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8448 = 11.0f / 10.0f; -COMPILER_STRIP_GATE(0x804BB76C, &lit_8448); -#pragma pop - -/* 804BB770-804BB774 00023C 0004+00 0/1 0/0 0/0 .rodata @8449 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8449 = 11.0f / 20.0f; -COMPILER_STRIP_GATE(0x804BB770, &lit_8449); -#pragma pop - -/* 804BB774-804BB778 000240 0004+00 0/1 0/0 0/0 .rodata @8450 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8450 = 280.0f; -COMPILER_STRIP_GATE(0x804BB774, &lit_8450); -#pragma pop - -/* 804B3B7C-804B40B8 00A67C 053C+00 1/1 0/0 0/0 .text uki_hit__FP13dmg_rod_class */ -static void uki_hit(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804B40B8-804B41A0 00ABB8 00E8+00 1/1 0/0 0/0 .text bb_get__FP13dmg_rod_class */ -static void bb_get(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB778-804BB77C 000244 0004+00 0/4 0/0 0/0 .rodata @8720 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8720 = 3.0f / 20.0f; -COMPILER_STRIP_GATE(0x804BB778, &lit_8720); -#pragma pop - -/* 804BB77C-804BB780 000248 0004+00 0/1 0/0 0/0 .rodata @8721 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_8721 = 0x4223999A; -COMPILER_STRIP_GATE(0x804BB77C, &lit_8721); -#pragma pop - -/* 804B41A0-804B4A94 00ACA0 08F4+00 1/1 0/0 0/0 .text uki_catch__FP13dmg_rod_class */ -static void uki_catch(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804B4A94-804B4B08 00B594 0074+00 1/1 0/0 0/0 .text s_sg_sub__FPvPv */ -static void s_sg_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* 804B4B08-804B4B7C 00B608 0074+00 1/1 0/0 0/0 .text s_bb_sub__FPvPv */ -static void s_bb_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* 804B4B7C-804B4CF0 00B67C 0174+00 1/1 0/0 0/0 .text s_lh_sub__FPvPv */ -static void s_lh_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* 804B4CF0-804B4E64 00B7F0 0174+00 1/1 0/0 0/0 .text s_bt_sub__FPvPv */ -static void s_bt_sub(void* param_0, void* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB780-804BB784 00024C 0004+00 0/1 0/0 0/0 .rodata @9271 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9271 = 4.25f; -COMPILER_STRIP_GATE(0x804BB780, &lit_9271); -#pragma pop - -/* 804BB784-804BB788 000250 0004+00 0/1 0/0 0/0 .rodata @9272 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_9272 = 0x3D9DB22D; -COMPILER_STRIP_GATE(0x804BB784, &lit_9272); -#pragma pop - -/* 804BB788-804BB78C 000254 0004+00 0/1 0/0 0/0 .rodata @9273 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_9273 = 0x409FAE14; -COMPILER_STRIP_GATE(0x804BB788, &lit_9273); -#pragma pop - -/* 804BB78C-804BB790 000258 0004+00 0/1 0/0 0/0 .rodata @9274 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9274 = 6800.0f; -COMPILER_STRIP_GATE(0x804BB78C, &lit_9274); -#pragma pop - -/* 804BB790-804BB794 00025C 0004+00 0/1 0/0 0/0 .rodata @9275 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9275 = -270.0f; -COMPILER_STRIP_GATE(0x804BB790, &lit_9275); -#pragma pop - -/* 804BB794-804BB798 000260 0004+00 0/1 0/0 0/0 .rodata @9276 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9276 = -4600.0f; -COMPILER_STRIP_GATE(0x804BB794, &lit_9276); -#pragma pop - -/* 804BB798-804BB79C 000264 0004+00 0/1 0/0 0/0 .rodata @9277 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9277 = 3100.0f; -COMPILER_STRIP_GATE(0x804BB798, &lit_9277); -#pragma pop - -/* 804BB79C-804BB7A0 000268 0004+00 0/1 0/0 0/0 .rodata @9278 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9278 = 3616.0f; -COMPILER_STRIP_GATE(0x804BB79C, &lit_9278); -#pragma pop - -/* 804BB7A0-804BB7A4 00026C 0004+00 0/1 0/0 0/0 .rodata @9279 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9279 = -4739.0f; -COMPILER_STRIP_GATE(0x804BB7A0, &lit_9279); -#pragma pop - -/* 804BB7A4-804BB7A8 000270 0004+00 0/1 0/0 0/0 .rodata @9280 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9280 = 900.0f; -COMPILER_STRIP_GATE(0x804BB7A4, &lit_9280); -#pragma pop - -/* 804BB7A8-804BB7AC 000274 0004+00 0/1 0/0 0/0 .rodata @9281 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9281 = 16.5f; -COMPILER_STRIP_GATE(0x804BB7A8, &lit_9281); -#pragma pop - -/* 804BB7AC-804BB7B0 000278 0004+00 0/1 0/0 0/0 .rodata @9282 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9282 = -9.0f; -COMPILER_STRIP_GATE(0x804BB7AC, &lit_9282); -#pragma pop - -/* 804BB7B0-804BB7B4 00027C 0004+00 0/3 0/0 0/0 .rodata @9283 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9283 = -3.0f; -COMPILER_STRIP_GATE(0x804BB7B0, &lit_9283); -#pragma pop - -/* 804BB7B4-804BB7B8 000280 0004+00 0/1 0/0 0/0 .rodata @9284 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_9284 = 0x3D851EB8; -COMPILER_STRIP_GATE(0x804BB7B4, &lit_9284); -#pragma pop - -/* 804BB830-804BB830 0002FC 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_804BB830 = "F_SP127"; -#pragma pop - -/* 804BC0E4-804BC0F4 00055C 000C+04 0/1 0/0 0/0 .bss @8906 */ -#pragma push -#pragma force_active on -static u8 lit_8906[12 + 4 /* padding */]; -#pragma pop - -/* 804BC0F4-804BC100 00056C 000C+00 0/1 0/0 0/0 .bss @8909 */ -#pragma push -#pragma force_active on -static u8 lit_8909[12]; -#pragma pop - -/* 804BC100-804BC118 000578 0018+00 0/1 0/0 0/0 .bss sp_pos$8905 */ -#pragma push -#pragma force_active on -static u8 sp_pos[24]; -#pragma pop - -/* 804B4E64-804B5E60 00B964 0FFC+00 1/1 0/0 0/0 .text uki_main__FP13dmg_rod_class */ -static void uki_main(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804B5E60-804B5F44 00C960 00E4+00 1/1 0/0 0/0 .text cam_3d_morf__FP13dmg_rod_classf */ -static void cam_3d_morf(dmg_rod_class* param_0, f32 param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB7B8-804BB7BC 000284 0004+00 0/1 0/0 0/0 .rodata @10166 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10166 = 180.0f; -COMPILER_STRIP_GATE(0x804BB7B8, &lit_10166); -#pragma pop - -/* 804BB7BC-804BB7C0 000288 0004+00 0/2 0/0 0/0 .rodata @10167 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10167 = 55.0f; -COMPILER_STRIP_GATE(0x804BB7BC, &lit_10167); -#pragma pop - -/* 804BB7C0-804BB7C4 00028C 0004+00 0/1 0/0 0/0 .rodata @10168 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10168 = 230.0f; -COMPILER_STRIP_GATE(0x804BB7C0, &lit_10168); -#pragma pop - -/* 804BB7C4-804BB7C8 000290 0004+00 0/2 0/0 0/0 .rodata @10169 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10169 = 120.0f; -COMPILER_STRIP_GATE(0x804BB7C4, &lit_10169); -#pragma pop - -/* 804BB7C8-804BB7CC 000294 0004+00 0/1 0/0 0/0 .rodata @10170 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_10170 = 0x3C75C28F; -COMPILER_STRIP_GATE(0x804BB7C8, &lit_10170); -#pragma pop - -/* 804BB7CC-804BB7D0 000298 0004+00 0/2 0/0 0/0 .rodata @10171 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10171 = 130.0f; -COMPILER_STRIP_GATE(0x804BB7CC, &lit_10171); -#pragma pop - -/* 804BB7D0-804BB7D4 00029C 0004+00 0/1 0/0 0/0 .rodata @10172 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10172 = 80.0f; -COMPILER_STRIP_GATE(0x804BB7D0, &lit_10172); -#pragma pop - -/* 804BB7D4-804BB7D8 0002A0 0004+00 0/1 0/0 0/0 .rodata @10173 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10173 = 75.0f; -COMPILER_STRIP_GATE(0x804BB7D4, &lit_10173); -#pragma pop - -/* 804BB7D8-804BB7DC 0002A4 0004+00 0/1 0/0 0/0 .rodata @10174 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10174 = 220.0f; -COMPILER_STRIP_GATE(0x804BB7D8, &lit_10174); -#pragma pop - -/* 804BB7DC-804BB7E0 0002A8 0004+00 0/1 0/0 0/0 .rodata @10175 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10175 = 13.0f; -COMPILER_STRIP_GATE(0x804BB7DC, &lit_10175); -#pragma pop - -/* 804BB7E0-804BB7E4 0002AC 0004+00 0/2 0/0 0/0 .rodata @10176 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10176 = -150.0f; -COMPILER_STRIP_GATE(0x804BB7E0, &lit_10176); -#pragma pop - -/* 804BB7E4-804BB7E8 0002B0 0004+00 0/1 0/0 0/0 .rodata @10177 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10177 = 110.0f; -COMPILER_STRIP_GATE(0x804BB7E4, &lit_10177); -#pragma pop - -/* 804BB7E8-804BB7EC 0002B4 0004+00 0/1 0/0 0/0 .rodata @10178 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10178 = -2800.0f; -COMPILER_STRIP_GATE(0x804BB7E8, &lit_10178); -#pragma pop - -/* 804BB7EC-804BB7F0 0002B8 0004+00 0/1 0/0 0/0 .rodata @10179 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10179 = 4608.0f; -COMPILER_STRIP_GATE(0x804BB7EC, &lit_10179); -#pragma pop - -/* 804BB7F0-804BB7F4 0002BC 0004+00 0/1 0/0 0/0 .rodata @10180 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10180 = 1500.0f; -COMPILER_STRIP_GATE(0x804BB7F0, &lit_10180); -#pragma pop - -/* 804BB7F4-804BB7F8 0002C0 0004+00 0/2 0/0 0/0 .rodata @10181 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10181 = -25.0f; -COMPILER_STRIP_GATE(0x804BB7F4, &lit_10181); -#pragma pop - -/* 804BB7F8-804BB7FC 0002C4 0004+00 0/1 0/0 0/0 .rodata @10182 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10182 = -4.0f / 5.0f; -COMPILER_STRIP_GATE(0x804BB7F8, &lit_10182); -#pragma pop - -/* 804BC118-804BC120 000590 0004+04 0/1 0/0 0/0 .bss old_stick_x$9448 */ -#pragma push -#pragma force_active on -static u8 old_stick_x[4 + 4 /* padding */]; -#pragma pop - -/* 804BC120-804BC128 000598 0004+04 0/1 0/0 0/0 .bss old_stick_sx$9451 */ -#pragma push -#pragma force_active on -static u8 old_stick_sx[4 + 4 /* padding */]; -#pragma pop - -/* 804B5F44-804B805C 00CA44 2118+00 1/1 0/0 0/0 .text play_camera__FP13dmg_rod_class */ -static void play_camera(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB7FC-804BB800 0002C8 0004+00 0/1 0/0 0/0 .rodata @10647 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10647 = 250.0f; -COMPILER_STRIP_GATE(0x804BB7FC, &lit_10647); -#pragma pop - -/* 804BB800-804BB804 0002CC 0004+00 0/1 0/0 0/0 .rodata @10648 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10648 = -170.0f; -COMPILER_STRIP_GATE(0x804BB800, &lit_10648); -#pragma pop - -/* 804BB804-804BB808 0002D0 0004+00 0/1 0/0 0/0 .rodata @10649 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10649 = -80.0f; -COMPILER_STRIP_GATE(0x804BB804, &lit_10649); -#pragma pop - -/* 804BB808-804BB80C 0002D4 0004+00 0/1 0/0 0/0 .rodata @10650 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10650 = 3277.0f; -COMPILER_STRIP_GATE(0x804BB808, &lit_10650); -#pragma pop - -/* 804BB80C-804BB810 0002D8 0004+00 0/1 0/0 0/0 .rodata @10651 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10651 = 13034.0f; -COMPILER_STRIP_GATE(0x804BB80C, &lit_10651); -#pragma pop - -/* 804BB810-804BB814 0002DC 0004+00 0/1 0/0 0/0 .rodata @10652 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10652 = -400.0f; -COMPILER_STRIP_GATE(0x804BB810, &lit_10652); -#pragma pop - -/* 804BB814-804BB818 0002E0 0004+00 0/1 0/0 0/0 .rodata @10653 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10653 = -250.0f; -COMPILER_STRIP_GATE(0x804BB814, &lit_10653); -#pragma pop - -/* 804B805C-804B9318 00EB5C 12BC+00 1/1 0/0 0/0 .text play_camera_u__FP13dmg_rod_class */ -static void play_camera_u(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB818-804BB81C 0002E4 0004+00 0/1 0/0 0/0 .rodata @11065 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11065 = 9.0f / 10.0f; -COMPILER_STRIP_GATE(0x804BB818, &lit_11065); -#pragma pop - -/* 804BB81C-804BB820 0002E8 0004+00 0/1 0/0 0/0 .rodata @11066 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11066 = 31.0f; -COMPILER_STRIP_GATE(0x804BB81C, &lit_11066); -#pragma pop - -/* 804BB820-804BB824 0002EC 0004+00 0/1 0/0 0/0 .rodata @11067 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_11067 = 0x3A83126F; -COMPILER_STRIP_GATE(0x804BB820, &lit_11067); -#pragma pop - -/* 804BB824-804BB828 0002F0 0004+00 0/1 0/0 0/0 .rodata @11068 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11068 = -27.0f; -COMPILER_STRIP_GATE(0x804BB824, &lit_11068); -#pragma pop - -/* 804B9318-804BA098 00FE18 0D80+00 2/1 0/0 0/0 .text dmg_rod_Execute__FP13dmg_rod_class - */ -static void dmg_rod_Execute(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804BA098-804BA14C 010B98 00B4+00 1/0 0/0 0/0 .text dmg_rod_IsDelete__FP13dmg_rod_class - */ -static void dmg_rod_IsDelete(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* 804BA14C-804BA1F4 010C4C 00A8+00 1/0 0/0 0/0 .text dmg_rod_Delete__FP13dmg_rod_class - */ -static void dmg_rod_Delete(dmg_rod_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB828-804BB82C 0002F4 0004+00 0/1 0/0 0/0 .rodata @11348 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11348 = 65536.0f; -COMPILER_STRIP_GATE(0x804BB828, &lit_11348); -#pragma pop - -/* 804BB830-804BB830 0002FC 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_804BB838 = "Alink"; -#pragma pop - -/* 804BA1F4-804BA83C 010CF4 0648+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ -static void useHeapInit(fopAc_ac_c* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BB82C-804BB830 0002F8 0004+00 0/1 0/0 0/0 .rodata @11462 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11462 = -50000.0f; -COMPILER_STRIP_GATE(0x804BB82C, &lit_11462); -#pragma pop - -/* 804BB830-804BB830 0002FC 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_804BB83E = "T_MUKAO"; -SECTION_DEAD static char const* const stringBase_804BB846 = "Mg_rod"; -#pragma pop - -/* 804BA83C-804BAC0C 01133C 03D0+00 1/0 0/0 0/0 .text dmg_rod_Create__FP10fopAc_ac_c */ -static void dmg_rod_Create(fopAc_ac_c* param_0) { - // NONMATCHING -} - -/* 804BAC0C-804BADAC 01170C 01A0+00 1/1 0/0 0/0 .text __ct__13dmg_rod_classFv */ -dmg_rod_class::dmg_rod_class() { - // NONMATCHING -} - -/* 804BADAC-804BADF4 0118AC 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGSphFv */ -// cM3dGSph::~cM3dGSph() { -extern "C" void __dt__8cM3dGSphFv() { - // NONMATCHING -} - -/* 804BADF4-804BAE3C 0118F4 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */ -// cM3dGAab::~cM3dGAab() { -extern "C" void __dt__8cM3dGAabFv() { - // NONMATCHING -} - -/* 804BAE3C-804BAE98 01193C 005C+00 1/0 0/0 0/0 .text __dt__10dCcD_GSttsFv */ -// dCcD_GStts::~dCcD_GStts() { -extern "C" void __dt__10dCcD_GSttsFv() { - // NONMATCHING -} - -/* 804BAE98-804BAF08 011998 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ -// dBgS_ObjAcch::~dBgS_ObjAcch() { -extern "C" void __dt__12dBgS_ObjAcchFv() { - // NONMATCHING -} - -/* 804BAF08-804BAF78 011A08 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */ -// dBgS_AcchCir::~dBgS_AcchCir() { -extern "C" void __dt__12dBgS_AcchCirFv() { - // NONMATCHING -} - -/* 804BAF78-804BAFD8 011A78 0060+00 1/1 0/0 0/0 .text __dt__9mg_hook_sFv */ -mg_hook_s::~mg_hook_s() { - // NONMATCHING -} - -/* 804BAFD8-804BB020 011AD8 0048+00 1/1 0/0 0/0 .text __ct__9mg_hook_sFv */ -mg_hook_s::mg_hook_s() { - // NONMATCHING -} - -/* 804BB020-804BB024 011B20 0004+00 1/1 0/0 0/0 .text __ct__5csXyzFv */ -// csXyz::csXyz() { -extern "C" void __ct__5csXyzFv() { - /* empty function */ -} - -/* 804BB024-804BB028 011B24 0004+00 3/3 0/0 0/0 .text __ct__4cXyzFv */ -// cXyz::cXyz() { -extern "C" void __ct__4cXyzFv() { - /* empty function */ -} - -/* 804BB028-804BB070 011B28 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */ -// cCcD_GStts::~cCcD_GStts() { -extern "C" void __dt__10cCcD_GSttsFv() { - // NONMATCHING -} - -/* 804BB070-804BB0B8 011B70 0048+00 2/1 0/0 0/0 .text __dt__13dmg_rod_HIO_cFv */ -dmg_rod_HIO_c::~dmg_rod_HIO_c() { - // NONMATCHING -} - -/* 804BB0B8-804BB130 011BB8 0078+00 0/0 1/0 0/0 .text __sinit_d_a_mg_rod_cpp */ -void __sinit_d_a_mg_rod_cpp() { - // NONMATCHING -} - -#pragma push -#pragma force_active on -REGISTER_CTORS(0x804BB0B8, __sinit_d_a_mg_rod_cpp); -#pragma pop - -/* 804BB130-804BB168 011C30 0038+00 1/1 0/0 0/0 .text __arraydtor$4920 */ -void func_804BB130() { - // NONMATCHING -} - -/* 804BB168-804BB170 011C68 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ -static void func_804BB168() { - // NONMATCHING -} - -/* 804BB170-804BB178 011C70 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ -static void func_804BB170() { - // NONMATCHING -} - -/* 804BB178-804BB1B4 011C78 003C+00 1/1 0/0 0/0 .text __dt__5csXyzFv */ -// csXyz::~csXyz() { -extern "C" void __dt__5csXyzFv() { - // NONMATCHING -} - -/* 804BB1B4-804BB1F0 011CB4 003C+00 7/7 0/0 0/0 .text __dt__4cXyzFv */ -// cXyz::~cXyz() { -extern "C" void __dt__4cXyzFv() { - // NONMATCHING -} - -/* 804BB1F0-804BB200 011CF0 0010+00 1/1 0/0 0/0 .text daAlink_getAlinkActorClass__Fv */ -static void daAlink_getAlinkActorClass() { - // NONMATCHING -} - -/* 804BB200-804BB21C 011D00 001C+00 1/1 0/0 0/0 .text dComIfGp_event_runCheck__Fv */ -static void dComIfGp_event_runCheck() { - // NONMATCHING -} - -/* 804BB21C-804BB238 011D1C 001C+00 1/1 0/0 0/0 .text dComIfGp_checkPlayerStatus0__FiUl - */ -static void dComIfGp_checkPlayerStatus0(int param_0, u32 param_1) { - // NONMATCHING -} - -/* 804BB238-804BB248 011D38 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 -} - -/* 804BB248-804BB260 011D48 0018+00 1/1 0/0 0/0 .text dComIfGp_getCamera__Fi */ -static void dComIfGp_getCamera(int param_0) { - // NONMATCHING -} - -/* 804BB260-804BB27C 011D60 001C+00 1/1 0/0 0/0 .text dComIfGp_getPlayerCameraID__Fi */ -static void dComIfGp_getPlayerCameraID(int param_0) { - // NONMATCHING -} - -/* 804BB27C-804BB294 011D7C 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 -} - -/* 804BB294-804BB2A8 011D94 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 -} - -/* 804BB2A8-804BB2B8 011DA8 0010+00 1/1 0/0 0/0 .text daPy_getPlayerActorClass__Fv */ -static void daPy_getPlayerActorClass() { - // NONMATCHING -} - -/* 804BB2B8-804BB2D4 011DB8 001C+00 1/1 0/0 0/0 .text __ct__4cXyzFRC4cXyz */ -// cXyz::cXyz(cXyz const& param_0) { -extern "C" void __ct__4cXyzFRC4cXyz() { - // NONMATCHING -} - -/* 804BB2D4-804BB2F0 011DD4 001C+00 1/1 0/0 0/0 .text JMAFastSqrt__Ff */ -// static void JMAFastSqrt(f32 param_0) { -extern "C" static asm void JMAFastSqrt__Ff() { - // NONMATCHING -} - -/* 804BB2F0-804BB304 011DF0 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 -} - -/* 804BB304-804BB318 011E04 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 -} - -/* 804BB318-804BB37C 011E18 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 -} - -/* 804BB37C-804BB390 011E7C 0014+00 1/1 0/0 0/0 .text cM_ssin__Fs */ -// static void cM_ssin(s16 param_0) { -extern "C" void cM_ssin__Fs() { - // NONMATCHING -} - -/* 804BB390-804BB4A4 011E90 0114+00 1/1 0/0 0/0 .text abs__4cXyzCFv */ -// void cXyz::abs() const { -extern "C" void abs__4cXyzCFv() { - // NONMATCHING -} - -/* 804BB4A4-804BB4C0 011FA4 001C+00 1/1 0/0 0/0 .text __as__4cXyzFRC4cXyz */ -// void cXyz::operator=(cXyz const& param_0) { -extern "C" void __as__4cXyzFRC4cXyz() { - // NONMATCHING -} - -/* 804BB4C0-804BB4DC 011FC0 001C+00 1/1 0/0 0/0 .text getTrigZ__8mDoCPd_cFUl */ -// void mDoCPd_c::getTrigZ(u32 param_0) { -extern "C" void getTrigZ__8mDoCPd_cFUl() { - // NONMATCHING -} - -/* 804BB4DC-804BB4F8 011FDC 001C+00 1/1 0/0 0/0 .text getTrigA__8mDoCPd_cFUl */ -// void mDoCPd_c::getTrigA(u32 param_0) { -extern "C" void getTrigA__8mDoCPd_cFUl() { - // NONMATCHING -} - -/* 804BB4F8-804BB50C 011FF8 0014+00 1/1 0/0 0/0 .text dComIfGp_setDoStatusForce__FUcUc */ -static void dComIfGp_setDoStatusForce(u8 param_0, u8 param_1) { - // NONMATCHING -} - -/* 804BB50C-804BB520 01200C 0014+00 1/1 0/0 0/0 .text dComIfGp_setZStatusForce__FUcUc */ -static void dComIfGp_setZStatusForce(u8 param_0, u8 param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 804BC128-804BC12C 0005A0 0004+00 0/0 0/0 0/0 .bss - * sInstance__40JASGlobalInstance<19JASDefaultBankTable> */ -#pragma push -#pragma force_active on -static u8 data_804BC128[4]; -#pragma pop - -/* 804BC12C-804BC130 0005A4 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14JASAudioThread> */ -#pragma push -#pragma force_active on -static u8 data_804BC12C[4]; -#pragma pop - -/* 804BC130-804BC134 0005A8 0004+00 0/0 0/0 0/0 .bss sInstance__27JASGlobalInstance<7Z2SeMgr> */ -#pragma push -#pragma force_active on -static u8 data_804BC130[4]; -#pragma pop - -/* 804BC134-804BC138 0005AC 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8Z2SeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_804BC134[4]; -#pragma pop - -/* 804BC138-804BC13C 0005B0 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SceneMgr> - */ -#pragma push -#pragma force_active on -static u8 data_804BC138[4]; -#pragma pop - -/* 804BC13C-804BC140 0005B4 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2StatusMgr> - */ -#pragma push -#pragma force_active on -static u8 data_804BC13C[4]; -#pragma pop - -/* 804BC140-804BC144 0005B8 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2DebugSys> - */ -#pragma push -#pragma force_active on -static u8 data_804BC140[4]; -#pragma pop - -/* 804BC144-804BC148 0005BC 0004+00 0/0 0/0 0/0 .bss - * sInstance__36JASGlobalInstance<15JAISoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_804BC144[4]; -#pragma pop - -/* 804BC148-804BC14C 0005C0 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14Z2SoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_804BC148[4]; -#pragma pop - -/* 804BC14C-804BC150 0005C4 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12Z2SpeechMgr2> */ -#pragma push -#pragma force_active on -static u8 data_804BC14C[4]; -#pragma pop - -/* 804BC150-804BC154 0005C8 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8JAISeMgr> */ -#pragma push -#pragma force_active on -static u8 data_804BC150[4]; -#pragma pop - -/* 804BC154-804BC158 0005CC 0004+00 0/0 0/0 0/0 .bss sInstance__29JASGlobalInstance<9JAISeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_804BC154[4]; -#pragma pop - -/* 804BC158-804BC15C 0005D0 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAIStreamMgr> */ -#pragma push -#pragma force_active on -static u8 data_804BC158[4]; -#pragma pop - -/* 804BC15C-804BC160 0005D4 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SoundMgr> - */ -#pragma push -#pragma force_active on -static u8 data_804BC15C[4]; -#pragma pop - -/* 804BC160-804BC164 0005D8 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAISoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_804BC160[4]; -#pragma pop - -/* 804BC164-804BC168 0005DC 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13JAUSoundTable> */ -#pragma push -#pragma force_active on -static u8 data_804BC164[4]; -#pragma pop - -/* 804BC168-804BC16C 0005E0 0004+00 0/0 0/0 0/0 .bss - * sInstance__38JASGlobalInstance<17JAUSoundNameTable> */ -#pragma push -#pragma force_active on -static u8 data_804BC168[4]; -#pragma pop - -/* 804BC16C-804BC170 0005E4 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAUSoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_804BC16C[4]; -#pragma pop - -/* 804BC170-804BC174 0005E8 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SoundInfo> - */ -#pragma push -#pragma force_active on -static u8 data_804BC170[4]; -#pragma pop - -/* 804BC174-804BC178 0005EC 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2SoundObjMgr> */ -#pragma push -#pragma force_active on -static u8 data_804BC174[4]; -#pragma pop - -/* 804BC178-804BC17C 0005F0 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2Audience> - */ -#pragma push -#pragma force_active on -static u8 data_804BC178[4]; -#pragma pop - -/* 804BC17C-804BC180 0005F4 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2FxLineMgr> - */ -#pragma push -#pragma force_active on -static u8 data_804BC17C[4]; -#pragma pop - -/* 804BC180-804BC184 0005F8 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2EnvSeMgr> - */ -#pragma push -#pragma force_active on -static u8 data_804BC180[4]; -#pragma pop - -/* 804BC184-804BC188 0005FC 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SpeechMgr> - */ -#pragma push -#pragma force_active on -static u8 data_804BC184[4]; -#pragma pop - -/* 804BC188-804BC18C 000600 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2WolfHowlMgr> */ -#pragma push -#pragma force_active on -static u8 data_804BC188[4]; -#pragma pop - -/* 804BC18C-804BC190 000604 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14JAUSectionHeap> */ -#pragma push -#pragma force_active on -static u8 data_804BC18C[4]; -#pragma pop - -/* 804BB830-804BB830 0002FC 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ +AUDIO_INSTANCES +#include "JSystem/JAudio2/JAUSectionHeap.h" +JAUSectionHeap* JASGlobalInstance::sInstance; diff --git a/src/d/actor/d_a_npc_henna.cpp b/src/d/actor/d_a_npc_henna.cpp index f219730bb3d..0a0b23b2401 100644 --- a/src/d/actor/d_a_npc_henna.cpp +++ b/src/d/actor/d_a_npc_henna.cpp @@ -501,7 +501,7 @@ static void henna_ride(npc_henna_class* i_this) { if (lrl != NULL) { fopAc_ac_c* fish; - if (lrl->field_0xf7e == 0) { + if (lrl->action == 0) { if (i_this->field_0x710 == 0) { i_this->field_0x710 = cM_rndF(100.0f) + 90.0f; cMtx_YrotS(*calc_mtx, actor->shape_angle.y); @@ -519,25 +519,25 @@ static void henna_ride(npc_henna_class* i_this) { i_this->field_0x720 = fish->current.pos; i_this->field_0x70e = 0x600; } - } else if (lrl->field_0x13b4 == 10 || lrl->field_0x13b4 == 11) { - fish = fopAcM_SearchByID(lrl->mFishId); + } else if (lrl->play_cam_mode == 10 || lrl->play_cam_mode == 11) { + fish = fopAcM_SearchByID(lrl->mg_fish_id); if (fish != NULL) { i_this->field_0x720 = fish->current.pos; i_this->field_0x70e = 1000; } - } else if (lrl->field_0xf7e == 1) { + } else if (lrl->action == 1) { cMtx_YrotS(*calc_mtx, player->getFishingRodAngleY()); unkXyz_48.x = 0.0f; unkXyz_48.y = 0.0f; unkXyz_48.z = 2000.0f; MtxPosition(&unkXyz_48, &i_this->field_0x720); i_this->field_0x720 += player->eyePos; - } else if (lrl->field_0xf7e == 3 || lrl->field_0xf7e == 4 || lrl->field_0xf7e == 5) { - i_this->field_0x720 = lrl->current.pos; + } else if (lrl->action == 3 || lrl->action == 4 || lrl->action == 5) { + i_this->field_0x720 = lrl->actor.current.pos; i_this->field_0x70e = 0x600; } - if (player->checkCanoeRide() != 0 && (lrl->field_0x13b4 == 0 || lrl->field_0x13b4 >= 0x50)) + if (player->checkCanoeRide() != 0 && (lrl->play_cam_mode == 0 || lrl->play_cam_mode >= 0x50)) { if (i_this->field_0x6a4 < 5) { i_this->field_0x6a4 = 5; @@ -704,7 +704,7 @@ static void action(npc_henna_class* i_this) { msg_class* msg = ((dMsgObject_c*)unkActor1)->getActor(); if (msg != 0 && msg->mode == 6 && ((dMsgObject_c*)unkActor1)->isMouthCheck() != 0 && - (lrl == 0 || lrl->field_0x13b4 != 30)) + (lrl == 0 || lrl->play_cam_mode != 30)) { i_this->field_0x6a6 = 15; } @@ -2197,7 +2197,7 @@ static void message_guide(npc_henna_class* i_this) { actor->eventInfo.onCondition(dEvtCnd_CANTALK_e); - if (lrl != NULL && lrl->field_0x13b4 != 0) { + if (lrl != NULL && lrl->play_cam_mode != 0) { return; } diff --git a/src/d/actor/d_a_npc_ne.cpp b/src/d/actor/d_a_npc_ne.cpp index 9df4150c0cb..fde053eadb2 100644 --- a/src/d/actor/d_a_npc_ne.cpp +++ b/src/d/actor/d_a_npc_ne.cpp @@ -2472,9 +2472,9 @@ static void action(npc_ne_class* i_this) { cXyz vec1, vec2; if (i_this->mWantsFish && i_this->mAction != npc_ne_class::ACT_SANBASI && player->current.pos.z > -2800.0f) { - dmg_rod_class* rod = static_cast(fopAcM_SearchByName(PROC_MG_ROD)); - if (rod != NULL && rod->field_0xf7c == 1 && rod->field_0xf7e != 5 - && rod->field_0x13b4 != 0 && !i_this->mNoFollow) { + dmg_rod_class* rod = ((dmg_rod_class*)fopAcM_SearchByName(PROC_MG_ROD)); + if (rod != NULL && rod->kind == 1 && rod->action != 5 + && rod->play_cam_mode != 0 && !i_this->mNoFollow) { if (i_this->mDistToTarget > 500.0f) { _this->current.pos = ground_search(i_this); _this->old = _this->current; diff --git a/src/d/actor/d_a_obj_lp.cpp b/src/d/actor/d_a_obj_lp.cpp index 43ec98d1df1..e2512563e6a 100644 --- a/src/d/actor/d_a_obj_lp.cpp +++ b/src/d/actor/d_a_obj_lp.cpp @@ -241,8 +241,8 @@ static int daObj_Lp_Execute(obj_lp_class* i_this) { if (mCanoe) { tandem = mCanoe->checkTandem(); dmg_rod_class* mDmgRod = (dmg_rod_class*)fopAcM_SearchByName(0x2e4); - if (((mDmgRod && mDmgRod->field_0x13b4 == 11) && - mDmgRod->field_0x13b6 > 20) && mDmgRod->field_0x13b6 < 0x3c) { + if (((mDmgRod && mDmgRod->play_cam_mode == 11) && + mDmgRod->play_cam_timer > 20) && mDmgRod->play_cam_timer < 0x3c) { demo_f = 1; } else { demo_f = 0;