diff --git a/config/GZ2E01/rels/d_a_b_ob/symbols.txt b/config/GZ2E01/rels/d_a_b_ob/symbols.txt index 14edc6fc051..6bc1178c091 100644 --- a/config/GZ2E01/rels/d_a_b_ob/symbols.txt +++ b/config/GZ2E01/rels/d_a_b_ob/symbols.txt @@ -351,13 +351,16 @@ pno = .bss:0x0000007C; // type:object size:0x4 scope:global data:4byte fin = .bss:0x00000080; // type:object size:0x4 scope:global data:4byte bf_ct = .bss:0x00000084; // type:object size:0x4 scope:global data:4byte @5008 = .bss:0x00000088; // type:object size:0xC scope:local +init$2871 = .bss:0x00000094; // type:object size:0x1 scope:local align:1 @5011 = .bss:0x00000098; // type:object size:0xC scope:local @5012 = .bss:0x000000A4; // type:object size:0xC scope:local @5013 = .bss:0x000000B0; // type:object size:0xC scope:local sdemo_p$5007 = .bss:0x000000BC; // type:object size:0x30 scope:local @6147 = .bss:0x000000EC; // type:object size:0xC scope:local +init$3982 = .bss:0x000000F8; // type:object size:0x1 scope:local align:1 room_pos$6146 = .bss:0x000000FC; // type:object size:0xC scope:local @6151 = .bss:0x00000108; // type:object size:0xC scope:local +init$3986 = .bss:0x00000114; // type:object size:0x1 scope:local align:1 sc$6150 = .bss:0x00000118; // type:object size:0xC scope:local sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x00000124; // type:object size:0x4 scope:global sInstance__35JASGlobalInstance<14JASAudioThread> = .bss:0x00000128; // type:object size:0x4 scope:global diff --git a/config/GZ2E01/rels/d_a_npc_zrz/symbols.txt b/config/GZ2E01/rels/d_a_npc_zrz/symbols.txt index ffa2bd36ce5..a2ca13fae42 100644 --- a/config/GZ2E01/rels/d_a_npc_zrz/symbols.txt +++ b/config/GZ2E01/rels/d_a_npc_zrz/symbols.txt @@ -253,6 +253,7 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa @4021 = .bss:0x00000048; // type:object size:0xC scope:local l_HIO = .bss:0x00000054; // type:object size:0x4 scope:global data:4byte @4997 = .bss:0x00000058; // type:object size:0xC scope:local +init$2630 = .bss:0x00000064; // type:object size:0x1 scope:local align:1 eyeOffset$4996 = .bss:0x00000068; // type:object size:0xC scope:local sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x00000074; // type:object size:0x4 scope:global sInstance__35JASGlobalInstance<14JASAudioThread> = .bss:0x00000078; // type:object size:0x4 scope:global diff --git a/configure.py b/configure.py index c2be32b7ffb..e4a6d3c2f76 100755 --- a/configure.py +++ b/configure.py @@ -644,7 +644,7 @@ config.libs = [ Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_cc_mass_s.cpp"), Object(NonMatching, "d/d_cc_s.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_cc_uty.cpp"), - Object(Equivalent, "d/d_cam_param.cpp"), # weak func order + Object(MatchingFor("GZ2E01"), "d/d_cam_param.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_ev_camera.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_spline_path.cpp"), Object(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d/d_item_data.cpp"), @@ -1665,18 +1665,18 @@ config.libs = [ ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_L7low_dr"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_L7op_demo_dr"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_b_bh"), - ActorRel(NonMatching, "d_a_b_bq"), + ActorRel(MatchingFor("GZ2E01"), "d_a_b_bq"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_b_dr"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_b_dre"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_b_ds"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_b_gg"), - ActorRel(NonMatching, "d_a_b_gm"), + ActorRel(MatchingFor("GZ2E01"), "d_a_b_gm"), ActorRel(NonMatching, "d_a_b_gnd"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_b_go"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_b_gos"), ActorRel(Equivalent, "d_a_b_mgn"), # extra mr/regalloc - ActorRel(NonMatching, "d_a_b_ob"), - ActorRel(NonMatching, "d_a_b_oh"), + ActorRel(MatchingFor("GZ2E01"), "d_a_b_ob"), + ActorRel(MatchingFor("GZ2E01"), "d_a_b_oh"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_b_oh2"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_b_tn"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_b_yo"), @@ -1916,9 +1916,9 @@ config.libs = [ ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_zelR"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_zelRo"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_zelda"), - ActorRel(Equivalent, "d_a_npc_zra", extra_cflags=[DANPCF_C_HACK]), # regalloc - ActorRel(NonMatching, "d_a_npc_zrc", extra_cflags=[DANPCF_C_HACK]), - ActorRel(NonMatching, "d_a_npc_zrz", extra_cflags=[DANPCF_C_HACK]), + ActorRel(Equivalent, "d_a_npc_zra", extra_cflags=[DANPCF_C_HACK]), # weak func order + ActorRel(MatchingFor("GZ2E01"), "d_a_npc_zrc", extra_cflags=[DANPCF_C_HACK]), + ActorRel(NonMatching, "d_a_npc_zrz", extra_cflags=[DANPCF_C_HACK]), # regalloc ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_Lv5Key"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_Turara"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_TvCdlst"), @@ -2186,7 +2186,7 @@ config.libs = [ ActorRel(NonMatching, "d_a_obj_thashi"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_thdoor"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_timeFire"), - ActorRel(Equivalent, "d_a_obj_tks", extra_cflags=[DANPCF_C_HACK]), # weak function order, sinShort inline issue + ActorRel(Equivalent, "d_a_obj_tks", extra_cflags=[DANPCF_C_HACK]), # weak function order ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_tmoon"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_toaru_maki"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_toby"), diff --git a/include/d/actor/d_a_b_bq.h b/include/d/actor/d_a_b_bq.h index 6eea070ba7b..40aa09fe7b5 100644 --- a/include/d/actor/d_a_b_bq.h +++ b/include/d/actor/d_a_b_bq.h @@ -13,7 +13,8 @@ * * @details Forest Temple dungeon boss. * - */ +*/ + class b_bq_class : public fopEn_enemy_c { public: /* 805B9B3C */ b_bq_class(); @@ -120,15 +121,4 @@ public: STATIC_ASSERT(sizeof(b_bq_class) == 0x13A0); -class daB_BQ_HIO_c { -public: - /* 805B356C */ daB_BQ_HIO_c(); - /* 805B9FFC */ virtual ~daB_BQ_HIO_c() {} - - /* 0x04 */ s8 field_0x4; - /* 0x08 */ f32 mModelSize; - /* 0x0C */ s16 mChanceTime; - /* 0x0E */ s16 mWaterSprayTime; -}; - #endif /* D_A_B_BQ_H */ diff --git a/include/d/actor/d_a_b_gm.h b/include/d/actor/d_a_b_gm.h index df65157daf2..f1535417724 100644 --- a/include/d/actor/d_a_b_gm.h +++ b/include/d/actor/d_a_b_gm.h @@ -114,34 +114,4 @@ public: STATIC_ASSERT(sizeof(b_gm_class) == 0x1d08); -class daB_GM_HIO_c { -public: - /* 805ED94C */ daB_GM_HIO_c(); - /* 805F3E64 */ virtual ~daB_GM_HIO_c() {} - - /* 0x04 */ s8 field_0x4; - /* 0x08 */ f32 model_size; - /* 0x0C */ f32 check_size; - /* 0x10 */ f32 dash_speed; - /* 0x14 */ f32 dash_anm_speed; - /* 0x18 */ f32 move_speed; - /* 0x1C */ f32 move_anm_speed; - /* 0x20 */ f32 wait_anm_speed; - /* 0x24 */ f32 range; - /* 0x28 */ s16 smoke_prim_R; - /* 0x2A */ s16 smoke_prim_G; - /* 0x2C */ s16 smoke_prim_B; - /* 0x2E */ s16 smoke_env_R; - /* 0x30 */ s16 smoke_env_G; - /* 0x32 */ s16 smoke_env_B; - /* 0x34 */ s16 smoke_alpha; - /* 0x36 */ s16 field_0x36; - /* 0x38 */ f32 smoke_blend; - /* 0x3C */ f32 bend_degree_1; - /* 0x40 */ f32 bend_degree_2; - /* 0x44 */ f32 bend_degree_3; - /* 0x48 */ u8 foot_pos_check; - /* 0x49 */ u8 eye_check; -}; - #endif /* D_A_B_GM_H */ diff --git a/include/d/actor/d_a_b_ob.h b/include/d/actor/d_a_b_ob.h index 9393333f2ac..dbca8c5f356 100644 --- a/include/d/actor/d_a_b_ob.h +++ b/include/d/actor/d_a_b_ob.h @@ -23,22 +23,6 @@ enum b_ob_action { OB_ACTION_FISH_END, }; -enum b_oh_anm { - OB_ANM_APPEAR = 0x12, - OB_ANM_APPEAR_2, - OB_ANM_DEAD, - OB_ANM_EAT, - OB_ANM_EAT_2, - OB_ANM_LAST_DAMAGE, - OB_ANM_OPEN_MOUTH, - OB_ANM_OPEN_MOUTH_WAIT, - OB_ANM_SWALLOW, - OB_ANM_SWIM_WAIT, - OB_ANM_TENTACLE_END, - OB_ANM_THROWUP, - OB_ANM_WAIT, -}; - struct ob_part_s { /* 0x00 */ mDoExt_McaMorf* mpMorf; /* 0x04 */ mDoExt_McaMorf* mpFinMorf; @@ -70,7 +54,8 @@ struct ob_ke_s { * * @details Lakebed Temple dungeon boss. This is the core/body part of the boss. * - */ +*/ + class b_ob_class : public fopEn_enemy_c { public: /* 0x05AC */ request_of_phase_process_class mPhase; @@ -191,21 +176,4 @@ public: STATIC_ASSERT(sizeof(b_ob_class) == 0x5DE4); -class daB_OB_HIO_c { -public: -public: - /* 8061056C */ daB_OB_HIO_c(); - /* 8061A808 */ virtual ~daB_OB_HIO_c() {} - - /* 0x04 */ s8 field_0x04; - /* 0x08 */ f32 mCoreSize; - /* 0x0C */ f32 mCoreMoveSpeed; - /* 0x10 */ f32 mBodySize; - /* 0x14 */ s16 mLightR; - /* 0x16 */ s16 mLightG; - /* 0x18 */ s16 mLightB; - /* 0x1C */ f32 mRange; -}; - - #endif /* D_A_B_OB_H */ diff --git a/include/d/actor/d_a_b_oh.h b/include/d/actor/d_a_b_oh.h index 8a27c88f323..61e5221057c 100644 --- a/include/d/actor/d_a_b_oh.h +++ b/include/d/actor/d_a_b_oh.h @@ -6,16 +6,6 @@ #include "d/d_cc_d.h" #include "d/d_cc_uty.h" -class daB_OH_HIO_c { -public: - /* 8061B72C */ daB_OH_HIO_c(); - /* 8061D93C */ virtual ~daB_OH_HIO_c() {} // supposed to be inlined - - /* 0x4 */ s8 field_0x4; - /* 0x8 */ f32 mModelSize; - /* 0xC */ f32 mLength; -}; - enum b_oh_action { OH_ACTION_START, OH_ACTION_WAIT, @@ -32,7 +22,8 @@ enum b_oh_action { * * @details Lakebed Temple dungeon boss. This is the head part of the boss. * - */ +*/ + class b_oh_class : public fopEn_enemy_c { public: /* 0x05AC */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_npc_zra.h b/include/d/actor/d_a_npc_zra.h index e27177f6324..9b93e9bbeed 100644 --- a/include/d/actor/d_a_npc_zra.h +++ b/include/d/actor/d_a_npc_zra.h @@ -11,7 +11,8 @@ class daNpc_zrA_HIO_c; * * @details * - */ +*/ + class daNpc_zrA_Path_c : public daNpcF_Path_c { public: /* 80B7850C */ BOOL getDstPosDst2(cXyz, cXyz&); diff --git a/include/d/actor/d_a_obj_carry.h b/include/d/actor/d_a_obj_carry.h index 933c541d113..3caa64950d5 100644 --- a/include/d/actor/d_a_obj_carry.h +++ b/include/d/actor/d_a_obj_carry.h @@ -257,7 +257,7 @@ public: /* 80479664 */ int CreateInitCall(); s32 getType() { return mType; } - u32 getSwbit() { return fopAcM_GetParamBit(this, 6, 8); } + u8 getSwbit() { return fopAcM_GetParamBit(this, 6, 8); } u32 getSwbit2() { return fopAcM_GetParamBit(this, 14, 8); } s8 getRoomNo() { return fopAcM_GetParamBit(this, 0, 6); } @@ -361,7 +361,7 @@ public: /* 0xDAA */ u8 field_0xdaa; /* 0xDAB */ u8 field_0xdab; /* 0xDAC */ bool field_0xdac; - /* 0xDAD */ u8 field_0xdad; + /* 0xDAD */ bool field_0xdad; /* 0xDAE */ u8 field_0xdae; /* 0xDAF */ u8 field_0xdaf; /* 0xDB0 */ u8 field_0xdb0; diff --git a/include/d/actor/d_a_obj_gra2.h b/include/d/actor/d_a_obj_gra2.h index d95df1d6617..634a2fc3681 100644 --- a/include/d/actor/d_a_obj_gra2.h +++ b/include/d/actor/d_a_obj_gra2.h @@ -92,9 +92,6 @@ public: class daObj_GrA_prtclMngr_c { public: - /* 80C04E14 */ ~daObj_GrA_prtclMngr_c() {} - /* 80C04E50 */ daObj_GrA_prtclMngr_c() {} - /* 0x00 */ bool field_0x0; /* 0x04 */ cXyz field_0x4; /* 0x10 */ csXyz field_0x10; diff --git a/include/d/actor/d_a_obj_master_sword.h b/include/d/actor/d_a_obj_master_sword.h index 26158795d07..75eeb0eeeac 100644 --- a/include/d/actor/d_a_obj_master_sword.h +++ b/include/d/actor/d_a_obj_master_sword.h @@ -18,7 +18,8 @@ struct daObjMasterSword_Attr_c { * * @details * - */ +*/ + class daObjMasterSword_c : public fopAc_ac_c { public: enum Mode_e { diff --git a/include/d/actor/d_a_obj_tks.h b/include/d/actor/d_a_obj_tks.h index 559d6986776..7d6973c8320 100644 --- a/include/d/actor/d_a_obj_tks.h +++ b/include/d/actor/d_a_obj_tks.h @@ -27,7 +27,8 @@ public: * * @details * - */ +*/ + class daObjTks_c : public daNpcF_c { public: /* 80D0F28C */ daObjTks_c(); @@ -49,18 +50,18 @@ public: /* 80D11228 */ void warp(); /* 80D11CB4 */ inline void lookat(); - /* 80D11670 */ virtual void setParam(); - /* 80D116C8 */ virtual BOOL main(); - /* 80D118E8 */ virtual BOOL ctrlBtk(); - /* 80D10100 */ virtual void setMtx(); - /* 80D119BC */ virtual void setAttnPos(); - /* 80D10184 */ virtual bool setExpressionAnm(int, bool); - /* 80D102D0 */ virtual bool setExpressionBtp(int); - /* 80D106C8 */ virtual void setExpression(int, f32); - /* 80D11104 */ virtual void setMotionAnm(int, f32); - /* 80D103A4 */ virtual void setMotion(int, f32, int); - /* 80D11E94 */ virtual BOOL drawDbgInfo(); - /* 80D11E9C */ virtual void drawOtherMdls(); + /* 80D11670 */ virtual inline void setParam(); + /* 80D116C8 */ virtual inline BOOL main(); + /* 80D118E8 */ virtual inline BOOL ctrlBtk(); + /* 80D10100 */ virtual inline void setMtx(); + /* 80D119BC */ virtual inline void setAttnPos(); + /* 80D10184 */ virtual inline bool setExpressionAnm(int, bool); + /* 80D102D0 */ virtual inline bool setExpressionBtp(int); + /* 80D106C8 */ virtual inline void setExpression(int, f32); + /* 80D11104 */ virtual inline void setMotionAnm(int, f32); + /* 80D103A4 */ virtual inline void setMotion(int, f32, int); + /* 80D11E94 */ virtual inline BOOL drawDbgInfo(); + /* 80D11E9C */ virtual inline void drawOtherMdls(); void calcSpringF(f32* param_0, f32 param_1, f32* param_2) { *param_2 = daObjTks_Param_c::m.spring_atten * (*param_2 + (daObjTks_Param_c::m.spring_factor * (*param_0 - param_1))); diff --git a/include/d/actor/d_a_obj_waterPillar.h b/include/d/actor/d_a_obj_waterPillar.h index 200b58ec4ef..a76449beb32 100644 --- a/include/d/actor/d_a_obj_waterPillar.h +++ b/include/d/actor/d_a_obj_waterPillar.h @@ -13,7 +13,8 @@ * * @details Water columns that can carry broken stalactites (see d_a_obj_syrock) * - */ +*/ + class daWtPillar_c : public fopAc_ac_c, public request_of_phase_process_class, public dEvLib_callback_c { public: daWtPillar_c(); diff --git a/src/d/actor/d_a_b_bq.cpp b/src/d/actor/d_a_b_bq.cpp index ca961b09995..d926738b4b0 100644 --- a/src/d/actor/d_a_b_bq.cpp +++ b/src/d/actor/d_a_b_bq.cpp @@ -1,7 +1,7 @@ /** * d_a_b_bq.cpp * Boss Baba (Diababa) - */ +*/ #include "d/dolzel_rel.h" @@ -11,7 +11,6 @@ #include "d/d_s_play.h" #include "f_op/f_op_camera_mng.h" #include "f_op/f_op_msg_mng.h" -#include "m_Do/m_Do_controller_pad.h" #include "m_Do/m_Do_graphic.h" #include "d/actor/d_a_obj_ystone.h" #include "JSystem/J3DGraphBase/J3DMaterial.h" @@ -19,6 +18,50 @@ #include "c/c_damagereaction.h" #include "cmath.h" +enum B_bq_RES_File_ID { + /* BCK */ + /* 0x07 */ BCK_BQ_APPEAR = 0x7, + /* 0x08 */ BCK_BQ_ATTACK, + /* 0x09 */ BCK_BQ_ATTACK_A, + /* 0x0A */ BCK_BQ_ATTACK_B, + /* 0x0B */ BCK_BQ_ATTACK_C, + /* 0x0C */ BCK_BQ_BOMBDAMAGE, + /* 0x0D */ BCK_BQ_COREDAMAGE, + /* 0x0E */ BCK_BQ_DAMAGEWAIT, + /* 0x0F */ BCK_BQ_DEAD, + /* 0x10 */ BCK_BQ_LOOK_M, + /* 0x11 */ BCK_BQ_NODAMAGE, + /* 0x12 */ BCK_BQ_RETURN01, + /* 0x13 */ BCK_BQ_RETURN02, + /* 0x14 */ BCK_BQ_RUNAWAY, + /* 0x15 */ BCK_BQ_TESTMOTION, + /* 0x16 */ BCK_BQ_TODOME, + /* 0x17 */ BCK_BQ_WAIT01, + + /* BMDR */ + /* 0x1A */ BMDR_BQ_EYEBALL = 0x1A, + + /* BMDV */ + /* 0x1D */ BMDV_BQ = 0x1D, + + /* BRK */ + /* 0x20 */ BRK_BQ_DEAD = 0x20, + + /* BTK */ + /* 0x23 */ BTK_BQ_TODOME = 0x23, +}; + +class daB_BQ_HIO_c { +public: + /* 805B356C */ daB_BQ_HIO_c(); + /* 805B9FFC */ virtual ~daB_BQ_HIO_c() {} + + /* 0x04 */ s8 field_0x4; + /* 0x08 */ f32 mModelSize; + /* 0x0C */ s16 mChanceTime; + /* 0x0E */ s16 mWaterSprayTime; +}; + class obj_fw_class : public fopAc_ac_c { public: /* 0x568 */ request_of_phase_process_class mPhase; @@ -83,26 +126,6 @@ public: /* 0x8C9 */ u8 field_0x8c9; }; -enum daB_BQ_ANM { - ANM_APPEAR = 7, - ANM_ATTACK, - ANM_ATTACK_A, - ANM_ATTACK_B, - ANM_ATTACK_C, - ANM_BOMB_DAMAGE, - ANM_CORE_DAMAGE, - ANM_DAMAGE_WAIT, - ANM_DEAD, - ANM_LOOK_M, - ANM_NO_DAMAGE, - ANM_RETURN_01, - ANM_RETURN_02, - ANM_RUNAWAY, - ANM_TEST_MOTION, - ANM_TODOME, - ANM_WAIT_01, -}; - enum daB_BQ_ACT { ACTION_STAY, ACTION_WAIT, @@ -440,7 +463,7 @@ static void damage_check(b_bq_class* i_this) { } def_se_set(&i_this->mSound, i_this->mAtInfo.mpCollider, 0x2D, NULL); - anm_init(i_this, ANM_NO_DAMAGE, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_BQ_NODAMAGE, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mSound.startCreatureVoice(Z2SE_EN_BQ_V_NODAMAGE, -1); i_this->field_0x6de = 10; } @@ -485,10 +508,10 @@ static s8 b_bq_stay(b_bq_class* i_this) { switch (i_this->mMode) { case 0: - anm_init(i_this, ANM_APPEAR, 1.0f, J3DFrameCtrl::EMode_NONE, 0.0f); + anm_init(i_this, BCK_BQ_APPEAR, 1.0f, J3DFrameCtrl::EMode_NONE, 0.0f); i_this->mMode = 1; break; - case 2: + case 2: { i_this->mTimers[0] = 150; int sw = (fopAcM_GetParam(a_this) >> 0x10) & 0xFF; @@ -501,13 +524,14 @@ static s8 b_bq_stay(b_bq_class* i_this) { dComIfGp_particle_set(0x82B1, &a_this->current.pos, NULL, NULL); mDoAud_seStart(Z2SE_EN_BQ_ABUKU, &a_this->current.pos, 0, 0); break; + } case 3: if (i_this->mTimers[0] == 100) { mDoAud_seStart(Z2SE_EN_BQ_JINARI, NULL, 0, 0); } if (i_this->mTimers[0] == 0) { - anm_init(i_this, ANM_APPEAR, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_BQ_APPEAR, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 4; i_this->mDisableDraw = false; @@ -533,7 +557,7 @@ static s8 b_bq_stay(b_bq_class* i_this) { if (i_this->mpMorf->isStop()) { i_this->mAction = ACTION_WAIT; - anm_init(i_this, ANM_WAIT_01, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); + anm_init(i_this, BCK_BQ_WAIT01, 1.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mMode = 1; } break; @@ -546,7 +570,7 @@ static s8 b_bq_stay(b_bq_class* i_this) { static void b_bq_wait(b_bq_class* i_this) { switch (i_this->mMode) { case 0: - anm_init(i_this, ANM_WAIT_01, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); + anm_init(i_this, BCK_BQ_WAIT01, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mMode = 1; // fallthrough case 1: @@ -565,8 +589,8 @@ static void b_bq_wait(b_bq_class* i_this) { break; } - if (i_this->mAnmID == ANM_NO_DAMAGE && i_this->mpMorf->isStop()) { - anm_init(i_this, ANM_WAIT_01, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); + if (i_this->mAnmID == BCK_BQ_NODAMAGE && i_this->mpMorf->isStop()) { + anm_init(i_this, BCK_BQ_WAIT01, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } if (i_this->field_0x11fc != 0 && i_this->mTimers[2] == 1) { @@ -582,7 +606,7 @@ static void b_bq_damage(b_bq_class* i_this) { switch (i_this->mMode) { case 0: - anm_init(i_this, ANM_BOMB_DAMAGE, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_BQ_BOMBDAMAGE, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 1; i_this->mTimers[0] = 1000; a_this->health = 50; @@ -613,7 +637,7 @@ static void b_bq_damage(b_bq_class* i_this) { } if (i_this->mpMorf->isStop()) { - anm_init(i_this, ANM_DAMAGE_WAIT, 3.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); + anm_init(i_this, BCK_BQ_DAMAGEWAIT, 3.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mMode = 2; i_this->mTimers[0] = l_HIO.mChanceTime; } @@ -625,12 +649,12 @@ static void b_bq_damage(b_bq_class* i_this) { } break; case 10: - anm_init(i_this, ANM_CORE_DAMAGE, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_BQ_COREDAMAGE, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 11; break; case 11: if (i_this->mpMorf->isStop()) { - anm_init(i_this, ANM_DAMAGE_WAIT, JREG_F(15), J3DFrameCtrl::EMode_LOOP, 1.0f); + anm_init(i_this, BCK_BQ_DAMAGEWAIT, JREG_F(15), J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mMode = 2; } break; @@ -645,7 +669,7 @@ static void b_bq_damage(b_bq_class* i_this) { return; } - anm_init(i_this, ANM_RETURN_01, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_BQ_RETURN01, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 21; i_this->mSound.startCreatureVoice(Z2SE_EN_BQ_V_DAMAGEBACK, -1); break; @@ -655,7 +679,7 @@ static void b_bq_damage(b_bq_class* i_this) { } break; case 30: - anm_init(i_this, ANM_RETURN_02, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_BQ_RETURN02, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 31; i_this->mSound.startCreatureVoice(Z2SE_EN_BQ_V_BACK, -1); break; @@ -709,7 +733,7 @@ static void b_bq_damage(b_bq_class* i_this) { i_this->setDownPos(&sp5C); if (i_this->checkCutDownHitFlg()) { - anm_init(i_this, ANM_TODOME, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_BQ_TODOME, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mPlayTodomeBtk = true; i_this->mMode = 40; @@ -748,7 +772,7 @@ static s8 b_bq_attack(b_bq_class* i_this) { switch (i_this->mMode) { case 0: - anm_init(i_this, ANM_ATTACK_A, 10.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_BQ_ATTACK_A, 10.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 1; if (cM_rndF(1.0f) < 0.5f) { @@ -772,7 +796,7 @@ static s8 b_bq_attack(b_bq_class* i_this) { } if (i_this->mpMorf->isStop()) { - anm_init(i_this, ANM_ATTACK_B, 2.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); + anm_init(i_this, BCK_BQ_ATTACK_B, 2.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mMode = 2; i_this->mTimers[0] = l_HIO.mWaterSprayTime; } @@ -781,7 +805,7 @@ static s8 b_bq_attack(b_bq_class* i_this) { set_dokuhaki = true; if (i_this->mTimers[0] == 0) { - anm_init(i_this, ANM_ATTACK_B, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_BQ_ATTACK_B, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 3; } break; @@ -882,16 +906,17 @@ static void b_bq_end(b_bq_class* i_this) { fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; switch (i_this->mMode) { - case 0: + case 0: { i_this->mSound.startCreatureVoice(Z2SE_EN_BQ_V_DEAD, -1); - anm_init(i_this, ANM_DEAD, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_BQ_DEAD, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mpDeadBrk->setPlaySpeed(1.0f); i_this->mMode = 1; int sw = fopAcM_GetParam(a_this) >> 0x18; dComIfGs_onSwitch(sw, fopAcM_GetRoomNo(a_this)); // fallthrough + } case 1: break; } @@ -990,7 +1015,7 @@ static void action(b_bq_class* i_this) { static void anm_se_set(b_bq_class* i_this) { int anm_frame = i_this->mpMorf->getFrame(); - if (i_this->mAnmID == ANM_APPEAR) { + if (i_this->mAnmID == BCK_BQ_APPEAR) { if (anm_frame >= 175) { i_this->field_0x1188 = dComIfGp_particle_set(i_this->field_0x1188, 0x82BA, &i_this->current.pos, NULL, NULL); @@ -1018,7 +1043,7 @@ static void anm_se_set(b_bq_class* i_this) { emitter->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(JNT_HEAD)); } } - } else if (i_this->mAnmID == ANM_RETURN_01) { + } else if (i_this->mAnmID == BCK_BQ_RETURN01) { i_this->field_0x1188 = dComIfGp_particle_set(i_this->field_0x1188, 0x8322, &i_this->current.pos, NULL, NULL); @@ -1034,7 +1059,7 @@ static void anm_se_set(b_bq_class* i_this) { if (emitter != NULL) { emitter->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(JNT_HEAD)); } - } else if (i_this->mAnmID == ANM_RETURN_02) { + } else if (i_this->mAnmID == BCK_BQ_RETURN02) { i_this->field_0x1188 = dComIfGp_particle_set(i_this->field_0x1188, 0x8324, &i_this->current.pos, NULL, NULL); @@ -1050,7 +1075,7 @@ static void anm_se_set(b_bq_class* i_this) { if (emitter != NULL) { emitter->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(JNT_HEAD)); } - } else if (i_this->mAnmID == ANM_BOMB_DAMAGE) { + } else if (i_this->mAnmID == BCK_BQ_BOMBDAMAGE) { i_this->field_0x1188 = dComIfGp_particle_set(i_this->field_0x1188, 0x82FA, &i_this->current.pos, NULL, NULL); @@ -1074,7 +1099,7 @@ static void anm_se_set(b_bq_class* i_this) { if (emitter != NULL) { emitter->setGlobalRTMatrix(i_this->mpMorf->getModel()->getAnmMtx(JNT_HEAD)); } - } else if (i_this->mAnmID == ANM_DEAD) { + } else if (i_this->mAnmID == BCK_BQ_DEAD) { if (anm_frame == 1) { for (int i = 0; i < 19; i++) { static u16 g_e_i[] = {0x82FD, 0x82FE, 0x82FF, 0x8300, 0x8301, 0x8302, 0x8303, @@ -1102,7 +1127,7 @@ static void anm_se_set(b_bq_class* i_this) { } } else { f32 scale_target = 1.0f; - if (i_this->mAnmID != ANM_WAIT_01) { + if (i_this->mAnmID != BCK_BQ_WAIT01) { scale_target = 0.0f; } @@ -1789,7 +1814,7 @@ static void demo_camera(b_bq_class* i_this) { i_this->mDemoMode = 100; } break; - case 50: + case 50: { if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); @@ -1826,6 +1851,7 @@ static void demo_camera(b_bq_class* i_this) { e_mb_class* monkey_bomb = (e_mb_class*)fopAcM_SearchByID(i_this->mMonkeyBombID); monkey_bomb->mAction = 5; // fallthrough + } case 51: if (i_this->mDemoModeTimer == 24 || i_this->mDemoModeTimer == 64 || i_this->mDemoModeTimer == 95 || i_this->mDemoModeTimer == 122) @@ -2381,10 +2407,10 @@ static int daB_BQ_Execute(b_bq_class* i_this) { static u16 takino2[] = {0x842D, 0x842E, 0x842F, 0x8430}; if (i_this->field_0x1151) { - i_this->field_0x1228[i] = dComIfGp_particle_set(i_this->field_0x1228[i], takino[i], + i_this->field_0x1228[i] = dComIfGp_particle_set(i_this->field_0x1228[i], takino2[i], &a_this->home.pos, NULL, NULL); } else { - i_this->field_0x1228[i] = dComIfGp_particle_set(i_this->field_0x1228[i], takino2[i], + i_this->field_0x1228[i] = dComIfGp_particle_set(i_this->field_0x1228[i], takino[i], &a_this->home.pos, NULL, NULL); } } @@ -2423,7 +2449,7 @@ static int daB_BQ_Delete(b_bq_class* i_this) { static int useHeapInit(fopAc_ac_c* i_this) { b_bq_class* a_this = (b_bq_class*)i_this; - a_this->mpMorf = new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("B_bq", 0x1D), NULL, + a_this->mpMorf = new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("B_bq", BMDV_BQ), NULL, NULL, NULL, J3DFrameCtrl::EMode_LOOP, 0.6f, 0, -1, &a_this->mSound, 0, 0x11000284); if (a_this->mpMorf == NULL || a_this->mpMorf->getModel() == NULL) { @@ -2443,7 +2469,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { } if (!a_this->mpDeadBrk->init(a_this->mpMorf->getModel()->getModelData(), - (J3DAnmTevRegKey*)dComIfG_getObjectRes("B_bq", 0x20), TRUE, + (J3DAnmTevRegKey*)dComIfG_getObjectRes("B_bq", BRK_BQ_DEAD), TRUE, J3DFrameCtrl::EMode_NONE, 1.0f, 0, -1)) { return false; @@ -2457,13 +2483,13 @@ static int useHeapInit(fopAc_ac_c* i_this) { } if (!a_this->mpTodomeBtk->init(a_this->mpMorf->getModel()->getModelData(), - (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("B_bq", 0x23), TRUE, + (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("B_bq", BTK_BQ_TODOME), TRUE, J3DFrameCtrl::EMode_NONE, 1.0f, 0, -1)) { return false; } - J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("B_bq", 0x1A); + J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("B_bq", BMDR_BQ_EYEBALL); JUT_ASSERT(0, modelData != 0); a_this->mpEyeballModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); diff --git a/src/d/actor/d_a_b_gm.cpp b/src/d/actor/d_a_b_gm.cpp index fd5cb29ce53..219ee66a3fa 100644 --- a/src/d/actor/d_a_b_gm.cpp +++ b/src/d/actor/d_a_b_gm.cpp @@ -9,6 +9,7 @@ #include "d/actor/d_a_e_gm.h" #include "d/actor/d_a_player.h" #include "d/actor/d_a_obj_ystone.h" +#include "d/d_s_play.h" #include "d/d_com_inf_game.h" #include "c/c_damagereaction.h" #include "SSystem/SComponent/c_math.h" @@ -53,6 +54,36 @@ enum daB_GM_ACTION { ACTION_DROP, }; +class daB_GM_HIO_c { +public: + /* 805ED94C */ daB_GM_HIO_c(); + /* 805F3E64 */ virtual ~daB_GM_HIO_c() {} + + /* 0x04 */ s8 field_0x4; + /* 0x08 */ f32 model_size; + /* 0x0C */ f32 check_size; + /* 0x10 */ f32 dash_speed; + /* 0x14 */ f32 dash_anm_speed; + /* 0x18 */ f32 move_speed; + /* 0x1C */ f32 move_anm_speed; + /* 0x20 */ f32 wait_anm_speed; + /* 0x24 */ f32 range; + /* 0x28 */ s16 smoke_prim_R; + /* 0x2A */ s16 smoke_prim_G; + /* 0x2C */ s16 smoke_prim_B; + /* 0x2E */ s16 smoke_env_R; + /* 0x30 */ s16 smoke_env_G; + /* 0x32 */ s16 smoke_env_B; + /* 0x34 */ s16 smoke_alpha; + /* 0x36 */ s16 field_0x36; + /* 0x38 */ f32 smoke_blend; + /* 0x3C */ f32 bend_degree_1; + /* 0x40 */ f32 bend_degree_2; + /* 0x44 */ f32 bend_degree_3; + /* 0x48 */ u8 foot_pos_check; + /* 0x49 */ u8 eye_check; +}; + /* 805ED94C-805ED9FC 0000EC 00B0+00 1/1 0/0 0/0 .text __ct__12daB_GM_HIO_cFv */ daB_GM_HIO_c::daB_GM_HIO_c() { field_0x4 = 0xFF; @@ -145,7 +176,10 @@ static daB_GM_HIO_c l_HIO; static int daB_GM_Draw(b_gm_class* i_this) { fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; + #ifdef DEBUG + # else g_env_light.settingTevStruct(0, &a_this->current.pos, &a_this->tevStr); + #endif for (int i = 0; i < 4; i++) { g_env_light.setLightTevColorType_MAJI(i_this->mpSpotLightModel[i], &a_this->tevStr); @@ -158,6 +192,9 @@ static int daB_GM_Draw(b_gm_class* i_this) { } J3DModel* model = i_this->mpModelMorf->getModel(); + #ifdef DEBUG + g_env_light.settingTevStruct(0, &a_this->current.pos, &a_this->tevStr); + #endif g_env_light.setLightTevColorType_MAJI(model, &a_this->tevStr); i_this->mpZoomBtk->entry(model->getModelData()); @@ -176,8 +213,8 @@ static int daB_GM_Draw(b_gm_class* i_this) { i_this->mpModelMorf->entryDL(); cXyz shadow_pos; - shadow_pos.set(a_this->current.pos.x, a_this->current.pos.y + l_HIO.model_size * 400.0f, a_this->current.pos.z); - i_this->mShadowID = dComIfGd_setShadow(i_this->mShadowID, 1, model, &shadow_pos, l_HIO.model_size * 3000.0f, 0.0f, a_this->current.pos.y, i_this->mAcch.GetGroundH(), i_this->mAcch.m_gnd, &a_this->tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex()); + shadow_pos.set(a_this->current.pos.x, BREG_F(18) + (a_this->current.pos.y + l_HIO.model_size * 400.0f), a_this->current.pos.z); + i_this->mShadowID = dComIfGd_setShadow(i_this->mShadowID, 1, model, &shadow_pos, (l_HIO.model_size * 3000.0f) + BREG_F(19), 0.0f, a_this->current.pos.y, i_this->mAcch.GetGroundH(), i_this->mAcch.m_gnd, &a_this->tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex()); if (i_this->field_0x6c0 > 0.1f) { J3DModel* model = i_this->mpBeamModelMorf->getModel(); @@ -1602,7 +1639,6 @@ static void demo_camera(b_gm_class* i_this) { } /* 805F1F58-805F30A0 0046F8 1148+00 2/1 0/0 0/0 .text daB_GM_Execute__FP10b_gm_class */ -// NONMATCHING - regalloc, equivalent? static int daB_GM_Execute(b_gm_class* i_this) { if (cDmrNowMidnaTalk()) { return 1; @@ -1610,8 +1646,17 @@ static int daB_GM_Execute(b_gm_class* i_this) { fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; fopAc_ac_c* player = dComIfGp_getPlayer(0); - cXyz spD4; - cXyz spC8; + cXyz spD4, spC8; + + #ifdef DEBUG + if (mDoCPd_c::getTrigA(2) && i_this->mDemoMode == 0 && !i_this->mIsDisappear) { + i_this->mAction = 0xB; + i_this->mMode = 0x14; + i_this->mDemoMode = 0x1E; + a_this->current.pos.y = VREG_F(18); + a_this->speedF = 0.0f; + } + #endif for (int i = 0; i < 4; i++) { mDoMtx_stack_c::transS(target_pos[i].x, target_pos[i].y, target_pos[i].z); @@ -1620,7 +1665,7 @@ static int daB_GM_Execute(b_gm_class* i_this) { if (!i_this->mIsDisappear && a_this->current.pos.y > 1000.0f) { spD4.x = a_this->eyePos.x - target_pos[i].x; spD4.z = a_this->eyePos.z - target_pos[i].z; - if (JMAFastSqrt((spD4.x * spD4.x) + (spD4.z * spD4.z)) < 500.0f) { + if (JMAFastSqrt((spD4.x * spD4.x) + (spD4.z * spD4.z)) < NREG_F(18) + 500.0f) { target_size = 0.0f; } } @@ -1648,7 +1693,7 @@ static int daB_GM_Execute(b_gm_class* i_this) { if (i_this->mIsDisappear) { if (i_this->mDemoMode == 0) { - daE_GM_c* kogoma = (daE_GM_c*)fpcM_Search(s_ko2_get, i_this); + daE_GM_c* kogoma = (daE_GM_c*)fpcM_Search(s_ko2_get, a_this); if (kogoma != NULL) { fopAc_ac_c* ko_actor = kogoma; i_this->field_0x1cec = ko_actor->current.pos; @@ -1692,7 +1737,7 @@ static int daB_GM_Execute(b_gm_class* i_this) { mDoMtx_stack_c::ZrotM(a_this->shape_angle.z); mDoMtx_stack_c::XrotM(a_this->shape_angle.x); mDoMtx_stack_c::scaleM(l_HIO.model_size, l_HIO.model_size, l_HIO.model_size); - mDoMtx_stack_c::transM(0.0f, 0.0f, 200.0f); + mDoMtx_stack_c::transM(0.0f, 0.0f, KREG_F(8) + 200.0f); J3DModel* model = i_this->mpModelMorf->getModel(); model->setBaseTRMtx(mDoMtx_stack_c::get()); @@ -1711,7 +1756,7 @@ static int daB_GM_Execute(b_gm_class* i_this) { f32 sph_base_size = l_HIO.check_size * l_HIO.model_size; MTXCopy(model->getAnmMtx(0x15), *calc_mtx); MtxScale(l_HIO.check_size, l_HIO.check_size, l_HIO.check_size, 1); - spD4.set(-20.0f, 0.0f, 0.0f); + spD4.set(JREG_F(8) + -20.0f, JREG_F(9) + 0.0f, JREG_F(10) + 0.0f); MtxPosition(&spD4, &spC8); if (i_this->mInvincibilityTimer != 0 || i_this->field_0x1ad6 == 0) { @@ -1719,18 +1764,18 @@ static int daB_GM_Execute(b_gm_class* i_this) { } i_this->mCoreSph.SetC(spC8); - i_this->mCoreSph.SetR(160.0f * sph_base_size); + i_this->mCoreSph.SetR((JREG_F(11) + 160.0f) * sph_base_size); dComIfG_Ccsp()->Set(&i_this->mCoreSph); - spD4.set(50.0f, -20.0f, 0.0f); + spD4.set(JREG_F(12) + 50.0f, JREG_F(13) + -20.0f, JREG_F(14) + 0.0f); MtxPosition(&spD4, &a_this->eyePos); a_this->attention_info.position = a_this->eyePos; - a_this->attention_info.position.y += 70.0f; + a_this->attention_info.position.y += JREG_F(15) + 70.0f; if (i_this->field_0x1ad6 == 0) { MTXCopy(model->getAnmMtx(6), *calc_mtx); MtxScale(l_HIO.check_size, l_HIO.check_size, l_HIO.check_size, 1); - spD4.set(170.0f, 0.0f, 0.0f); + spD4.set(JREG_F(0) + 170.0f, JREG_F(1) + 0.0f, JREG_F(2) + 0.0f); MtxPosition(&spD4, &spC8); if (i_this->mInvincibilityTimer != 0) { @@ -1738,19 +1783,19 @@ static int daB_GM_Execute(b_gm_class* i_this) { } i_this->mBodySph[0].SetC(spC8); - i_this->mBodySph[0].SetR(190.0f * sph_base_size); + i_this->mBodySph[0].SetR((JREG_F(3) + 190.0f) * sph_base_size); } MTXCopy(model->getAnmMtx(2), *calc_mtx); MtxScale(l_HIO.check_size, l_HIO.check_size, l_HIO.check_size, 1); - spD4.set(100.0f, 0.0f, 0.0f); + spD4.set(JREG_F(4) + 100.0f, JREG_F(5) + 0.0f, JREG_F(6) + 0.0f); MtxPosition(&spD4, &spC8); if (i_this->mInvincibilityTimer != 0) { spC8.y += 20000.0f; } i_this->mBodySph[1].SetC(spC8); - i_this->mBodySph[1].SetR(180.0f * sph_base_size); + i_this->mBodySph[1].SetR((JREG_F(7) + 180.0f) * sph_base_size); for (int i = 0; i < 2; i++) { dComIfG_Ccsp()->Set(&i_this->mBodySph[i]); @@ -1759,10 +1804,10 @@ static int daB_GM_Execute(b_gm_class* i_this) { for (int i = 0; i < 8; i++) { MTXCopy(model->getAnmMtx(top_j[i]), *calc_mtx); MtxScale(l_HIO.check_size, l_HIO.check_size, l_HIO.check_size, 1); - spD4.set(150.0f, 0.0f, 0.0f); + spD4.set(AREG_F(10) + 150.0f, AREG_F(11) + 0.0f, AREG_F(12) + 0.0f); MtxPosition(&spD4, &spC8); - i_this->mFootSph[i].SetR(50.0f * sph_base_size); + i_this->mFootSph[i].SetR((TREG_F(13) + 50.0f) * sph_base_size); i_this->mFootSph[i].SetC(spC8); if (i_this->mAnmID == ANM_GOMA_DASH && a_this->current.angle.x < 0x1000 && a_this->current.angle.x > -0x1000) { @@ -1781,17 +1826,17 @@ static int daB_GM_Execute(b_gm_class* i_this) { MTXCopy(model->getAnmMtx(0x3B), *calc_mtx); MtxScale(l_HIO.check_size, l_HIO.check_size, l_HIO.check_size, 1); - spD4.set(80.0f, 0.0f, 0.0f); + spD4.set(XREG_F(0) + 80.0f, XREG_F(1), XREG_F(2)); MtxPosition(&spD4, &spC8); i_this->mHandSph[0].SetC(spC8 + spBC); - i_this->mHandSph[0].SetR(80.0f * sph_base_size); + i_this->mHandSph[0].SetR((XREG_F(3) + 80.0f) * sph_base_size); MTXCopy(model->getAnmMtx(0x40), *calc_mtx); MtxScale(l_HIO.check_size, l_HIO.check_size, l_HIO.check_size, 1); - spD4.set(0.0f, 0.0f, 0.0f); + spD4.set(XREG_F(0), XREG_F(1), XREG_F(2)); MtxPosition(&spD4, &spC8); i_this->mHandSph[1].SetC(spC8 + spBC); - i_this->mHandSph[1].SetR(60.0f * sph_base_size); + i_this->mHandSph[1].SetR((XREG_F(3) + 60.0f) * sph_base_size); dComIfG_Ccsp()->Set(&i_this->mHandSph[0]); dComIfG_Ccsp()->Set(&i_this->mHandSph[1]); @@ -1817,8 +1862,7 @@ static int daB_GM_Execute(b_gm_class* i_this) { sp14 = -0x1400; } - s16 sp10; - s16 spE; + s16 sp10, spE; if (i_this->field_0x1ade != 0) { i_this->field_0x1ade--; @@ -1835,7 +1879,7 @@ static int daB_GM_Execute(b_gm_class* i_this) { if (i_this->field_0x6c0 > 0.1f) { dBgS_LinChk line_chk; MTXCopy(model->getAnmMtx(0x15), *calc_mtx); - spD4.set(120.0f, 0.0f, 0.0f); + spD4.set(XREG_F(8) + 120.0f, XREG_F(9), XREG_F(10)); MtxPosition(&spD4, &spC8); if (i_this->field_0x6f4 == 0) { @@ -1845,7 +1889,7 @@ static int daB_GM_Execute(b_gm_class* i_this) { } cXyz spB0; - cLib_addCalc2(&i_this->field_0x6c4, 40.0f, 1.0f, 1.0f); + cLib_addCalc2(&i_this->field_0x6c4, AREG_F(17) + 40.0f, 1.0f, 1.0f); spD4 = player->current.pos - i_this->field_0x6cc; if (i_this->field_0x6f4 == 0) { @@ -1862,7 +1906,7 @@ static int daB_GM_Execute(b_gm_class* i_this) { } s16 spC = var_f30 * cM_ssin(i_this->mCounter * 1000); - cLib_addCalcAngleS2(&i_this->field_0x6c8, spC + cM_atan2s(spD4.x, spD4.z), 8, 0x400); + cLib_addCalcAngleS2(&i_this->field_0x6c8, spC + cM_atan2s(spD4.x, spD4.z), 8, AREG_S(7) + 0x400); } i_this->field_0x6f4 = 1; @@ -1884,12 +1928,11 @@ static int daB_GM_Execute(b_gm_class* i_this) { mDoMtx_stack_c::XrotM(spA); mDoMtx_stack_c::YrotM(sp8); - f32 sp24 = 5.0f; - mDoMtx_stack_c::scaleM(1.0f, 1.0f, sp24 * i_this->field_0x6c0); + f32 sp24 = XREG_F(12) + 5.0f; + mDoMtx_stack_c::scaleM(XREG_F(11) + 1.0f, XREG_F(11) + 1.0f, sp24 * i_this->field_0x6c0); - MtxP now_mtx = mDoMtx_stack_c::get(); - i_this->mpBeamModelMorf->getModel()->setBaseTRMtx(now_mtx); - mDoMtx_stack_c::transM(0.0f, 0.0f, i_this->field_0x6c0 * 2400.0f); + i_this->mpBeamModelMorf->getModel()->setBaseTRMtx(mDoMtx_stack_c::get()); + mDoMtx_stack_c::transM(0.0f, 0.0f, i_this->field_0x6c0 * (XREG_F(6) + 2400.0f)); mDoMtx_stack_c::multVecZero(&spD4); line_chk.Set(&spC8, &spD4, i_this); @@ -1904,7 +1947,7 @@ static int daB_GM_Execute(b_gm_class* i_this) { csXyz sp48; dComIfG_Bgsp().GetTriPla(line_chk, &spE0); - sp48.y = cM_atan2s(spE0.mNormal.x, spE0.mNormal.z); + sp48.y = (s16)cM_atan2s(spE0.mNormal.x, spE0.mNormal.z); sp48.x = -cM_atan2s(spE0.mNormal.y, JMAFastSqrt((spE0.mNormal.x * spE0.mNormal.x) + (spE0.mNormal.z * spE0.mNormal.z))); sp48.x += 0x4000; sp48.z = 0; @@ -1915,7 +1958,7 @@ static int daB_GM_Execute(b_gm_class* i_this) { } f32 sp1C = 0.013f * (i_this->mCounter & 3); - spD4 = spD4 + ((spC8 - spD4) * sp1C); + spD4 = spD4 + ((spC8 - spD4) * (sp1C)); i_this->mBeamSph.SetC(spD4); dComIfG_Ccsp()->Set(&i_this->mBeamSph); @@ -1936,7 +1979,7 @@ static int daB_GM_Execute(b_gm_class* i_this) { if (i_this->field_0x1ad6 != 0) { cLib_addCalcAngleS2(&i_this->field_0x1ad8, 6000, 4, 800); } else { - cLib_addCalcAngleS2(&i_this->field_0x1ad8, -3900, 1, 800); + cLib_addCalcAngleS2(&i_this->field_0x1ad8, BREG_S(7) + -3900, 1, 800); } f32 target_blend = 1.0f; diff --git a/src/d/actor/d_a_b_gnd.cpp b/src/d/actor/d_a_b_gnd.cpp index 96e22320ed9..bebfafa972b 100644 --- a/src/d/actor/d_a_b_gnd.cpp +++ b/src/d/actor/d_a_b_gnd.cpp @@ -662,8 +662,7 @@ static cXyz b_path[8]; static void b_gnd_h_run_a(b_gnd_class* i_this) { fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; fopAc_ac_c* player = dComIfGp_getPlayer(0); - cXyz sp8C; - cXyz sp80; + cXyz sp8C, sp80; f32 player_distxz = i_this->mPlayerDistXZ; f32 speed_target = 0.0f; @@ -685,8 +684,7 @@ static void b_gnd_h_run_a(b_gnd_class* i_this) { s8 sp8 = false; s16 spE = 0x80; - cXyz sp74; - cXyz sp68; + cXyz sp74, sp68; switch (i_this->mMoveMode) { case 0: @@ -854,14 +852,12 @@ static void b_gnd_h_run_a(b_gnd_class* i_this) { i_this->field_0x5cc = cM_atan2s(sp8C.x, sp8C.z); if (i_this->field_0x1e0a >= 1 && i_this->mMoveMode <= 2) { - speed_target = (var_f30 - 800.0f) * 2.0f; + speed_target = (var_f30 - 800.0f) * (AREG_F(8) + 2.0f); var_f30 = 7000.0f; if (speed_target > 7000.0f) { speed_target = 7000.0f; - } else { - if (speed_target < 0.0f) { - speed_target = 0.0f; - } + } else if (speed_target < 0.0f) { + speed_target = 0.0f; } i_this->field_0xc90 = i_this->field_0xc90 + i_this->field_0xc92; @@ -899,7 +895,7 @@ static void b_gnd_h_run_a(b_gnd_class* i_this) { speed_target = l_HIO.field_0xc; } - if (fopAcM_searchPlayerDistanceXZ(a_this) < 2000.0f) { + if (fopAcM_searchPlayerDistanceXZ(a_this) < KREG_F(0) + 2000.0f) { speed_target *= 1.2f; } @@ -926,7 +922,7 @@ static void b_gnd_h_run_a(b_gnd_class* i_this) { cLib_addCalc2(&a_this->speedF, speed_target, 1.0f, speed_step); if (speed_target > 10.0f) { - sp12 = (a_this->current.angle.y - sp12) * -8; + sp12 = (AREG_S(7) + -8) * (a_this->current.angle.y - sp12); if (sp12 > 2000) { sp12 = 2000; } else if (sp12 < -2000) { @@ -937,8 +933,8 @@ static void b_gnd_h_run_a(b_gnd_class* i_this) { } if (i_this->mAnmID == B_GND_BCK_EGND_RRUN) { - i_this->mpModelMorf->setPlaySpeed(i_this->mPlaySpeed); - i_this->mpHorseMorf->setPlaySpeed(i_this->mPlaySpeed); + i_this->mpModelMorf->setPlaySpeed(i_this->mPlaySpeed * (JREG_F(11) + 1.0f)); + i_this->mpHorseMorf->setPlaySpeed(i_this->mPlaySpeed * (JREG_F(11) + 1.0f)); } cLib_addCalc2(&i_this->mPlaySpeed, anm_speed_target, 1.0f, 0.1f); diff --git a/src/d/actor/d_a_b_ob.cpp b/src/d/actor/d_a_b_ob.cpp index 4994ce404a3..7756f08db70 100644 --- a/src/d/actor/d_a_b_ob.cpp +++ b/src/d/actor/d_a_b_ob.cpp @@ -9,7 +9,6 @@ #include "JSystem/J3DGraphBase/J3DMaterial.h" #include "SSystem/SComponent/c_math.h" #include "c/c_damagereaction.h" -#include "cmath.h" #include "d/actor/d_a_player.h" #include "d/d_com_inf_game.h" #include "d/d_s_play.h" @@ -21,6 +20,76 @@ #include "d/actor/d_a_obj_ystone.h" #include "Z2AudioLib/Z2Instances.h" +enum B_oh_RES_File_ID { + /* BCK */ + /* 0x08 */ BCK_AL_FOIFINISH = 0x8, + /* 0x09 */ BCK_AL_OICUT, + /* 0x0A */ BCK_AL_OICUTB, + /* 0x0B */ BCK_AL_OIFINISH, + /* 0x0C */ BCK_AL_OIHANG, + /* 0x0D */ BCK_AL_OIHANGMISS, + /* 0x0E */ BCK_AL_OIHANGWAIT, + /* 0x0F */ BCK_AL_OIHANGWAITB, + /* 0x10 */ BCK_AL_OISPIT, + /* 0x11 */ BCK_OH_CORE_OPEN, + /* 0x12 */ BCK_OI_APPEAR, + /* 0x13 */ BCK_OI_APPEAR02, + /* 0x14 */ BCK_OI_DEAD, + /* 0x15 */ BCK_OI_EAT, + /* 0x16 */ BCK_OI_EAT02, + /* 0x17 */ BCK_OI_LASTDAMAGE, + /* 0x18 */ BCK_OI_OPENMOUTH, + /* 0x19 */ BCK_OI_OPENMOUTHWAIT, + /* 0x1A */ BCK_OI_SWALLOW, + /* 0x1B */ BCK_OI_SWIMWAIT, + /* 0x1C */ BCK_OI_TENTACLE_END, + /* 0x1D */ BCK_OI_THROWUP, + /* 0x1E */ BCK_OI_WAIT, + + /* BMDR */ + /* 0x21 */ BMDR_EF_OISUI = 0x21, + /* 0x22 */ BMDR_OI_BODY, + /* 0x23 */ BMDR_OI_FINA, + /* 0x24 */ BMDR_OI_FINB, + /* 0x25 */ BMDR_OI_FINC, + /* 0x26 */ BMDR_OI_TAIL, + + /* BMDV */ + /* 0x29 */ BMDV_OH = 0x29, + /* 0x2A */ BMDV_OH_CORE, + /* 0x2B */ BMDV_OI_HEAD, + + /* BRK */ + /* 0x2E */ BRK_EF_OISUI = 0x2E, + /* 0x2F */ BRK_OH_LOOP, + + /* BTK */ + /* 0x32 */ BTK_AL_FOICUT = 0x32, + /* 0x33 */ BTK_AL_FOICUTB, + /* 0x34 */ BTK_AL_FOIFINISH, + /* 0x35 */ BTK_EF_OISUI, + /* 0x36 */ BTK_OH_LOOP, + + /* BTP */ + /* 0x39 */ BTP_AL_FOIFINISH = 0x39, +}; + +class daB_OB_HIO_c { +public: +public: + /* 8061056C */ daB_OB_HIO_c(); + /* 8061A808 */ virtual ~daB_OB_HIO_c() {} + + /* 0x04 */ s8 field_0x04; + /* 0x08 */ f32 mCoreSize; + /* 0x0C */ f32 mCoreMoveSpeed; + /* 0x10 */ f32 mBodySize; + /* 0x14 */ s16 mLightR; + /* 0x16 */ s16 mLightG; + /* 0x18 */ s16 mLightB; + /* 0x1C */ f32 mRange; +}; + /* 8061056C-806105BC 0000EC 0050+00 1/1 0/0 0/0 .text __ct__12daB_OB_HIO_cFv */ daB_OB_HIO_c::daB_OB_HIO_c() { @@ -361,7 +430,7 @@ static void core_start(b_ob_class* i_this) { i_this->mMode = 1; i_this->field_0x478c = 0; - anm_init(i_this, OB_ANM_APPEAR, 0.0f, 0, 0.0f); + anm_init(i_this, BCK_OI_APPEAR, 0.0f, 0, 0.0f); a_this->home.pos.y = (i_this->field_0x47a0 - 200.0f) + KREG_F(11); a_this->current.pos.y = a_this->home.pos.y - 500.0f; } @@ -380,7 +449,7 @@ static void core_start(b_ob_class* i_this) { i_this->mDemoAction = 30; } break; - case 2: + case 2: { b_oh_class* tentacle = (b_oh_class*)fopAcM_SearchByID(i_this->mTentacleActorIDs[i_this->mCoreHandNo]); MTXCopy(tentacle->mpMorf->getModel()->getAnmMtx(i_this->field_0x478c), @@ -441,6 +510,7 @@ static void core_start(b_ob_class* i_this) { } } break; + } case 3: break; } @@ -470,7 +540,7 @@ static void core_hand_move(b_ob_class* i_this) { } } break; - case 1: + case 1: { b_oh_class* tentacle = (b_oh_class*)fopAcM_SearchByID(i_this->mTentacleActorIDs[i_this->mCoreHandNo]); if (tentacle == NULL || (tentacle != NULL && tentacle->mAction == OH_ACTION_END)) { @@ -524,6 +594,7 @@ static void core_hand_move(b_ob_class* i_this) { cLib_addCalc0(&i_this->field_0x479c, 1.0f, 10.0f); break; + } case 2: cLib_addCalc2(&i_this->field_0x479c, -200.0f, 1.0f, 10.0f); @@ -581,7 +652,7 @@ static void bombfishset(b_ob_class* i_this) { switch (i_this->mMode) { case 0: - anm_init(i_this, OB_ANM_WAIT, 5.0f, J3DFrameCtrl::EMode_LOOP, 3.0f); + anm_init(i_this, BCK_OI_WAIT, 5.0f, J3DFrameCtrl::EMode_LOOP, 3.0f); i_this->mMode = 1; if (a_this->field_0x567 == 0 && i_this->mDemoAction == 0) { @@ -616,7 +687,7 @@ static void bombfishset(b_ob_class* i_this) { i_this->mAction = OB_ACTION_CORE_HAND_MOVE; i_this->mMode = 0; - anm_init(i_this, OB_ANM_WAIT, 5.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); + anm_init(i_this, BCK_OI_WAIT, 5.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } break; } @@ -754,10 +825,10 @@ static void core_end(b_ob_class* i_this) { a_this->gravity = 0.0f; i_this->mDemoAction = 20; i_this->field_0x479c = -1000.0f; - anm_init(i_this, OB_ANM_TENTACLE_END, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_OI_TENTACLE_END, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); particle_pos.set(0.0f, 0.0f, 0.0f); - dComIfGp_particle_set(0x880A, &particle_pos, NULL, NULL); + dComIfGp_particle_set(dPa_RM(ID_ZI_S_OI_ISO_DISAPP_A), &particle_pos, NULL, NULL); mDoAud_seStart(Z2SE_EN_OI_DEMO_APPEAR2, NULL, 0, 0); break; case 1: @@ -813,7 +884,7 @@ static void core_end(b_ob_class* i_this) { i_this->mMoveAngle.x = -0x4000; i_this->field_0x4750 = 0; i_this->mTimers[0] = 110; - anm_init(i_this, OB_ANM_APPEAR_2, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_OI_APPEAR02, 1.0f, J3DFrameCtrl::EMode_NONE, 1.0f); fopAcM_OffStatus(a_this, 0x80000); fopAcM_OnStatus(a_this, 0x200000); @@ -941,7 +1012,7 @@ static void core_damage_check(b_ob_class* i_this) { if (fopAcM_CheckStatus(a_this, 0x100000)) { i_this->field_0x5d38 = - dComIfGp_particle_set(i_this->field_0x5d38, 0x8802, &a_this->current.pos, NULL, NULL); + dComIfGp_particle_set(i_this->field_0x5d38, dPa_RM(ID_ZI_S_OI_ISO_COREHIT_B), &a_this->current.pos, NULL, NULL); } i_this->mCoreCcStts.Move(); @@ -950,7 +1021,7 @@ static void core_damage_check(b_ob_class* i_this) { i_this->mAtInfo.mpCollider = i_this->mCcSph.GetTgHitObj(); cc_at_check(a_this, &i_this->mAtInfo); - dComIfGp_particle_set(0x8801, &a_this->current.pos, NULL, NULL); + dComIfGp_particle_set(dPa_RM(ID_ZI_S_OI_ISO_COREHIT_A), &a_this->current.pos, NULL, NULL); if (i_this->mAtInfo.mpCollider->ChkAtType(AT_TYPE_HOOKSHOT)) { i_this->mAction = OB_ACTION_CORE_HOOK; @@ -1146,13 +1217,13 @@ static int fish_normal(b_ob_class* i_this) { i_this->mMode = 1; i_this->field_0x476a = 0; /* fallthrough */ - case 1: + case 1: { if (in_opening_demo && i_this->mTimers[0] > 60) { ret = 4; } - if (i_this->mAnmID != OB_ANM_SWIM_WAIT) { - anm_init(i_this, OB_ANM_SWIM_WAIT, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); + if (i_this->mAnmID != BCK_OI_SWIMWAIT) { + anm_init(i_this, BCK_OI_SWIMWAIT, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } if (dist_to_ground < l_HIO.mBodySize * (ZREG_F(8) + 1200.0f)) { @@ -1182,6 +1253,7 @@ static int fish_normal(b_ob_class* i_this) { i_this->mTimers[4] = 30; } break; + } case 2: ret = 1; i_this->mTargetMovePos.x = player->current.pos.x; @@ -1291,19 +1363,19 @@ static int fish_normal(b_ob_class* i_this) { mDoMtx_stack_c::multVecZero(&sp70); i_this->field_0x5d24[0] = - dComIfGp_particle_set(i_this->field_0x5d24[0], 0x87EC, &sp70, NULL, NULL); + dComIfGp_particle_set(i_this->field_0x5d24[0], dPa_RM(ID_ZI_S_OI_FISH_APP_A), &sp70, NULL, NULL); sp64.set(0.0f, 0.0f, 0.0f); i_this->field_0x5d24[1] = - dComIfGp_particle_set(i_this->field_0x5d24[1], 0x87ED, &sp64, NULL, NULL); + dComIfGp_particle_set(i_this->field_0x5d24[1], dPa_RM(ID_ZI_S_OI_FISH_APP_B), &sp64, NULL, NULL); if (i_this->mTimers[3] == 1) { dComIfGp_getVibration().StopQuake(31); } } - if (i_this->mAnmID == OB_ANM_APPEAR_2 && i_this->mBodyParts[0].mpMorf->isStop()) { - anm_init(i_this, OB_ANM_SWIM_WAIT, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); + if (i_this->mAnmID == BCK_OI_APPEAR02 && i_this->mBodyParts[0].mpMorf->isStop()) { + anm_init(i_this, BCK_OI_SWIMWAIT, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } if (throw_player) { @@ -1326,13 +1398,13 @@ static int fish_vacume(b_ob_class* i_this) { switch (i_this->mMode) { case 0: - anm_init(i_this, OB_ANM_OPEN_MOUTH, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_OI_OPENMOUTH, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mMode = 1; i_this->field_0x476a = 0; break; case 1: if (i_this->mBodyParts[0].mpMorf->isStop()) { - anm_init(i_this, OB_ANM_OPEN_MOUTH_WAIT, 3.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); + anm_init(i_this, BCK_OI_OPENMOUTHWAIT, 3.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); i_this->mMode = 2; i_this->mTimers[0] = 200; } @@ -1367,12 +1439,12 @@ static int fish_vacume(b_ob_class* i_this) { i_this->mBodyParts[0].mSph.OffCoSetBit(); if (i_this->mBodyParts[0].mpMorf->isStop()) { - if (i_this->mAnmID == OB_ANM_SWALLOW) { - anm_init(i_this, OB_ANM_EAT_2, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); - } else if (i_this->mAnmID == OB_ANM_EAT_2) { - anm_init(i_this, OB_ANM_THROWUP, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + if (i_this->mAnmID == BCK_OI_SWALLOW) { + anm_init(i_this, BCK_OI_EAT02, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + } else if (i_this->mAnmID == BCK_OI_EAT02) { + anm_init(i_this, BCK_OI_THROWUP, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mOISound.startCreatureVoice(Z2SE_EN_OI_V_THROWUP, -1); - } else if (i_this->mAnmID == OB_ANM_THROWUP) { + } else if (i_this->mAnmID == BCK_OI_THROWUP) { i_this->mAction = OB_ACTION_FISH_NORMAL; i_this->mMode = 0; } @@ -1411,11 +1483,11 @@ static int fish_end(b_ob_class* i_this) { i_this->field_0x5d04 = KREG_F(8) + 1.5f; i_this->mBlureRateTarget = 150; i_this->field_0x5dd8 = 3; - anm_init(i_this, OB_ANM_LAST_DAMAGE, 0.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_OI_LASTDAMAGE, 0.0f, J3DFrameCtrl::EMode_NONE, 1.0f); break; case 1: if (i_this->mBodyParts[0].mpMorf->isStop()) { - anm_init(i_this, OB_ANM_SWIM_WAIT, 5.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); + anm_init(i_this, BCK_OI_SWIMWAIT, 5.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } if (i_this->mTimers[0] == 0) { @@ -1423,7 +1495,7 @@ static int fish_end(b_ob_class* i_this) { i_this->mTargetMovePos.set(0.0f, -19000.0f, -6500.0f); i_this->mTimers[0] = 150; i_this->mDemoCamEye.set(-6000.0f, -22000.0f, 2000.0f); - anm_init(i_this, OB_ANM_LAST_DAMAGE, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_OI_LASTDAMAGE, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); } break; case 2: @@ -1438,12 +1510,12 @@ static int fish_end(b_ob_class* i_this) { i_this->mDemoAction = 42; i_this->mDemoActionTimer = 0; i_this->mBlureRateTarget = 0; - anm_init(i_this, OB_ANM_LAST_DAMAGE, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_OI_LASTDAMAGE, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f); } break; case 3: if (i_this->mAcch.ChkWallHit() && i_this->mTimers[0] == 0) { - anm_init(i_this, OB_ANM_DEAD, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_OI_DEAD, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f); dComIfGp_getVibration().StartShock(8, 31, cXyz(0.0f, 1.0f, 0.0f)); mDoAud_seStart(Z2SE_OBJ_BOMB_EXPLODE, NULL, 0, 0); @@ -1465,7 +1537,7 @@ static int fish_end(b_ob_class* i_this) { a_this->home.pos.set(0.0f, -23580.0f, 10300.0f); for (int i = 0; i < 5; i++) { - static u16 iso_eff[] = {0x87F2, 0x87F3, 0x87F4, 0x87F5, 0x87F6}; + static u16 iso_eff[] = {dPa_RM(ID_ZI_S_OI_FISH_SYOTOTSU_A), dPa_RM(ID_ZI_S_OI_FISH_SYOTOTSU_B), dPa_RM(ID_ZI_S_OI_FISH_SYOTOTSU_C), dPa_RM(ID_ZI_S_OI_FISH_SYOTOTSU_D), dPa_RM(ID_ZI_S_OI_FISH_SYOTOTSU_E)}; dComIfGp_particle_set(iso_eff[i], &a_this->home.pos, NULL, NULL); } @@ -1797,7 +1869,7 @@ static void fish_move(b_ob_class* i_this) { if (i == 0) { part->mpMorf->play(NULL, 0, 0); - if (i_this->mAnmID == OB_ANM_EAT_2 && i_this->mBodyParts[0].mpMorf->checkFrame(1.0f)) { + if (i_this->mAnmID == BCK_OI_EAT02 && i_this->mBodyParts[0].mpMorf->checkFrame(1.0f)) { i_this->mOISound.startCreatureVoice(Z2SE_EN_OI_V_EAT02, -1); } } @@ -1902,7 +1974,7 @@ static void fish_move(b_ob_class* i_this) { i_this->field_0x2320 &= 0x1FF; } - f32 var_f31_2 = l_HIO.mBodySize * ((VREG_F(17) + 360.0f) * 0.6f); + f32 var_f31_2 = l_HIO.mBodySize * ((VREG_F(17) + 600.0f) * 0.6f); a_this->current.pos.y -= var_f31_2; a_this->old.pos.y -= var_f31_2; i_this->mAcch.CrrPos(dComIfG_Bgsp()); @@ -2084,7 +2156,7 @@ static void demo_camera(b_ob_class* i_this) { dComIfGp_getVibration().StartShock(4, 31, cXyz(0.0f, 1.0f, 0.0f)); } - if (i_this->mAnmID == OB_ANM_EAT && i_this->mBodyParts[0].mpMorf->checkFrame(153.0f)) { + if (i_this->mAnmID == BCK_OI_EAT && i_this->mBodyParts[0].mpMorf->checkFrame(153.0f)) { i_this->mDemoAction = 4; i_this->mDemoActionTimer = 0; @@ -2104,7 +2176,7 @@ static void demo_camera(b_ob_class* i_this) { if (i_this->mBodyParts[0].mpMorf->isStop()) { i_this->mDemoAction = 100; - i_this->mCoreAnm = OB_ANM_WAIT; + i_this->mCoreAnm = BCK_OI_WAIT; i_this->mCoreAnmMode = J3DFrameCtrl::EMode_LOOP; i_this->field_0x4794 = 100; } @@ -2129,7 +2201,7 @@ static void demo_camera(b_ob_class* i_this) { i_this->field_0x5cfc = 0; i_this->field_0x5d00 = ZREG_F(3) + 1000.0; - anm_init(i_this, OB_ANM_OPEN_MOUTH_WAIT, 3.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); + anm_init(i_this, BCK_OI_OPENMOUTHWAIT, 3.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); if (cM_rndF(1.0f) < 0.5f) { i_this->field_0x5cd4 = 500.0f; @@ -2137,7 +2209,7 @@ static void demo_camera(b_ob_class* i_this) { i_this->field_0x5cd4 = -500.0f; } /* fallthrough */ - case 11: + case 11: { f32 temp_f31 = (a_this->eyePos - player->current.pos).abs(); if (temp_f31 < KREG_F(11) + 150.0f) { i_this->mDemoAction = 100; @@ -2184,7 +2256,7 @@ static void demo_camera(b_ob_class* i_this) { if (i_this->mDemoActionTimer >= 15) { if (i_this->mDemoActionTimer == 30) { - anm_init(i_this, OB_ANM_SWALLOW, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_OI_SWALLOW, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mOISound.startCreatureVoice(Z2SE_EN_OI_V_SWALLOW, -1); } @@ -2210,6 +2282,7 @@ static void demo_camera(b_ob_class* i_this) { cLib_addCalc2(&i_this->mDemoCamCenter.z, player->current.pos.z, 0.4f, 300.0f); } break; + } case 20: if (!a_this->eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); @@ -2412,7 +2485,7 @@ static void demo_camera(b_ob_class* i_this) { i_this->mBodyParts[0].mpMorf->setPlaySpeed(1.0f); sp58.set(0.0f, 0.0f, 0.0f); - dComIfGp_particle_set(0x87FB, &sp58, NULL, NULL); + dComIfGp_particle_set(dPa_RM(ID_ZI_S_OI_ISO_APP_A), &sp58, NULL, NULL); dComIfGp_getVibration().StartQuake(3, 31, cXyz(0.0f, 1.0f, 0.0f)); i_this->field_0x5cd0 = 0; @@ -2462,7 +2535,7 @@ static void demo_camera(b_ob_class* i_this) { } if (i_this->mBodyParts[0].mpMorf->isStop()) { - anm_init(i_this, OB_ANM_WAIT, 0.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); + anm_init(i_this, BCK_OI_WAIT, 0.0f, J3DFrameCtrl::EMode_LOOP, 1.0f); } if (i_this->mDemoActionTimer == 120) { @@ -2552,7 +2625,7 @@ static void demo_camera(b_ob_class* i_this) { fpcM_Search(s_hasidel_sub, i_this); fpcM_Search(s_kaisoudel_sub, i_this); /* fallthrough */ - case 45: + case 45: { var_r27 = 1; if (i_this->mDemoActionTimer != 80) { break; @@ -2580,6 +2653,7 @@ static void demo_camera(b_ob_class* i_this) { water->field_0x586 = 0; var_r27 = 2; /* fallthrough */ + } case 46: sp58.set(VREG_F(0) + -1225.0f, -24000.0f, VREG_F(1) + 8678.0f); player->setPlayerPosAndAngle(&sp58, VREG_S(1) + 10000, 0); @@ -2609,7 +2683,7 @@ static void demo_camera(b_ob_class* i_this) { if (i_this->mDemoActionTimer == 50) { i_this->mHideCore = true; - dComIfGp_particle_set(0x8491, &a_this->eyePos, NULL, NULL); + dComIfGp_particle_set(dPa_RM(ID_ZI_S_FM_ENDDEMO_CORECRASH_A), &a_this->eyePos, NULL, NULL); fopAcM_createDisappear(a_this, &a_this->eyePos, 15, 0, 0xFF); mDoAud_seStart(Z2SE_EN_BQ_EYE_EXPLODE, NULL, 0, 0); @@ -2662,19 +2736,19 @@ static void demo_camera(b_ob_class* i_this) { } i_this->field_0x5d40[0][idx] = dComIfGp_particle_set( - 0x8627, &i_this->mBodyParts[idx].mPos, NULL, &spA0); + dPa_RM(ID_ZI_S_OI_DEADEXP_POLY_HEAD), &i_this->mBodyParts[idx].mPos, NULL, &spA0); i_this->field_0x5d40[1][idx] = dComIfGp_particle_set( - 0x862A, &i_this->mBodyParts[idx].mPos, NULL, &spA0); + dPa_RM(ID_ZI_S_OI_DEADEXP_SMOKE_HEAD), &i_this->mBodyParts[idx].mPos, NULL, &spA0); } else if (idx == 18) { i_this->field_0x5d40[0][idx] = dComIfGp_particle_set( - 0x8628, &i_this->mBodyParts[idx].mPos, NULL, &spA0); + dPa_RM(ID_ZI_S_OI_DEADEXP_POLY_TAIL), &i_this->mBodyParts[idx].mPos, NULL, &spA0); i_this->field_0x5d40[1][idx] = dComIfGp_particle_set( - 0x862B, &i_this->mBodyParts[idx].mPos, NULL, &spA0); + dPa_RM(ID_ZI_S_OI_DEADEXP_SMOKE_TAIL), &i_this->mBodyParts[idx].mPos, NULL, &spA0); } else { i_this->field_0x5d40[0][idx] = dComIfGp_particle_set( - 0x8626, &i_this->mBodyParts[idx].mPos, NULL, &spA0); + dPa_RM(ID_ZI_S_OI_DEADEXP_POLY_BODY), &i_this->mBodyParts[idx].mPos, NULL, &spA0); i_this->field_0x5d40[1][idx] = dComIfGp_particle_set( - 0x8629, &i_this->mBodyParts[idx].mPos, NULL, &spA0); + dPa_RM(ID_ZI_S_OI_DEADEXP_SMOKE_BODY), &i_this->mBodyParts[idx].mPos, NULL, &spA0); } } } @@ -2696,7 +2770,7 @@ static void demo_camera(b_ob_class* i_this) { static cXyz sc(10.0f, 10.0f, 10.0f); for (int i = 0; i < 5; i++) { - static u16 ex_eff[] = {0x8621, 0x8622, 0x8623, 0x8624, 0x8625}; + static u16 ex_eff[] = {dPa_RM(ID_ZI_S_OI_CONVERGE_FILTER), dPa_RM(ID_ZI_S_OI_CONVERGE_FILTEROUT), dPa_RM(ID_ZI_S_OI_CONVERGE_HIDE), dPa_RM(ID_ZI_S_OI_CONVERGE_POLYGON_A), dPa_RM(ID_ZI_S_OI_CONVERGE_POLYGON_B)}; dComIfGp_particle_set(ex_eff[i], &room_pos, NULL, &sc); } @@ -2793,14 +2867,14 @@ static void demo_camera(b_ob_class* i_this) { i_this->field_0x5cfc = 0; i_this->field_0x5d00 = ZREG_F(3) + 300.0f; - anm_init(i_this, OB_ANM_EAT, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f); + anm_init(i_this, BCK_OI_EAT, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f); i_this->mOISound.startCreatureVoice(Z2SE_EN_OI_V_EAT, -1); MTXCopy(i_this->mBodyParts[0].mpMorf->getModel()->getAnmMtx(0), mDoMtx_stack_c::get()); mDoMtx_stack_c::multVecZero(&sp64); - dComIfGp_particle_set(0x8803, &sp64, NULL, NULL); - dComIfGp_particle_set(0x8804, &sp64, NULL, NULL); + dComIfGp_particle_set(dPa_RM(ID_ZI_S_OI_ISO_HAKI_A), &sp64, NULL, NULL); + dComIfGp_particle_set(dPa_RM(ID_ZI_S_OI_ISO_HAKI_B), &sp64, NULL, NULL); /* fallthrough */ case 51: MTXCopy(i_this->mBodyParts[0].mpMorf->getModel()->getAnmMtx(0x13), mDoMtx_stack_c::get()); @@ -2822,7 +2896,7 @@ static void demo_camera(b_ob_class* i_this) { MtxPosition(&sp58, &i_this->mDemoCamEye); i_this->mDemoCamEye += a_this->home.pos; - if (i_this->mAnmID == OB_ANM_EAT) { + if (i_this->mAnmID == BCK_OI_EAT) { if (i_this->mBodyParts[0].mpMorf->checkFrame(120.0f)) { daPy_getPlayerActorClass()->changeDemoMode(46, 0, 0, 0); } @@ -2856,7 +2930,7 @@ static void demo_camera(b_ob_class* i_this) { if (i_this->mDemoAction == 52 && i_this->mBodyParts[0].mpMorf->isStop()) { i_this->mDemoAction = 100; - i_this->mCoreAnm = OB_ANM_WAIT; + i_this->mCoreAnm = BCK_OI_WAIT; i_this->mCoreAnmMode = J3DFrameCtrl::EMode_LOOP; i_this->field_0x4794 = 100; } @@ -2958,7 +3032,7 @@ static void demo_camera(b_ob_class* i_this) { sp64.set(0.0f, -23580.0f, 10300.0f); for (int i = 0; i < 4; i++) { - static u16 iso_eff[] = {0x87F7, 0x87F8, 0x87F9, 0x87FA}; + static u16 iso_eff[] = {dPa_RM(ID_ZI_S_OI_HAISUI_A), dPa_RM(ID_ZI_S_OI_HAISUI_B), dPa_RM(ID_ZI_S_OI_HAISUI_C), dPa_RM(ID_ZI_S_OI_HAISUI_D)}; i_this->field_0x5d24[i] = dComIfGp_particle_set(i_this->field_0x5d24[i], iso_eff[i], &sp64, NULL, NULL); @@ -3136,7 +3210,7 @@ static int daB_OB_Execute(b_ob_class* i_this) { } } - if (i_this->mAnmID == OB_ANM_APPEAR && i_this->mBodyParts[0].mpMorf->getPlaySpeed() >= 0.5f) { + if (i_this->mAnmID == BCK_OI_APPEAR && i_this->mBodyParts[0].mpMorf->getPlaySpeed() >= 0.5f) { J3DModel* model = i_this->mBodyParts[0].mpMorf->getModel(); for (int i = 0; i < 5; i++) { int joint_no = 1; @@ -3147,24 +3221,24 @@ static int daB_OB_Execute(b_ob_class* i_this) { MTXCopy(model->getAnmMtx(joint_no), mDoMtx_stack_c::get()); mDoMtx_stack_c::multVecZero(&sp7C); - static u16 iso_eff[] = {0x87FC, 0x87FD, 0x87FE, 0x87FF, 0x8800}; + static u16 iso_eff[] = {dPa_RM(ID_ZI_S_OI_ISO_APP_B), dPa_RM(ID_ZI_S_OI_ISO_APP_C), dPa_RM(ID_ZI_S_OI_ISO_APP_D), dPa_RM(ID_ZI_S_OI_ISO_APP_E), dPa_RM(ID_ZI_S_OI_ISO_APP_F)}; i_this->field_0x5d24[i] = dComIfGp_particle_set(i_this->field_0x5d24[i], iso_eff[i], &sp7C, NULL, NULL); } - } else if (i_this->mAnmID == OB_ANM_EAT) { + } else if (i_this->mAnmID == BCK_OI_EAT) { J3DModel* model = i_this->mBodyParts[0].mpMorf->getModel(); MTXCopy(model->getAnmMtx(0x13), mDoMtx_stack_c::get()); mDoMtx_stack_c::multVecZero(&sp7C); for (int i = 0; i < 3; i++) { - static u16 iso_eff[] = {0x8805, 0x8806, 0x8807}; + static u16 iso_eff[] = {dPa_RM(ID_ZI_S_OI_ISO_HAKI_C), dPa_RM(ID_ZI_S_OI_ISO_HAKI_D), dPa_RM(ID_ZI_S_OI_ISO_HAKI_E)}; i_this->field_0x5d24[i] = dComIfGp_particle_set(i_this->field_0x5d24[i], iso_eff[i], &sp7C, NULL, NULL); } - } else if (i_this->mAnmID == OB_ANM_THROWUP) { + } else if (i_this->mAnmID == BCK_OI_THROWUP) { J3DModel* model = i_this->mBodyParts[0].mpMorf->getModel(); for (int i = 0; i < 4; i++) { - static u16 iso_eff[] = {0x87EE, 0x87EF, 0x87F0, 0x87F1}; + static u16 iso_eff[] = {dPa_RM(ID_ZI_S_OI_FISH_HAKI_A), dPa_RM(ID_ZI_S_OI_FISH_HAKI_B), dPa_RM(ID_ZI_S_OI_FISH_HAKI_C), dPa_RM(ID_ZI_S_OI_FISH_HAKI_D)}; i_this->field_0x5d24[i] = dComIfGp_particle_set(i_this->field_0x5d24[i], iso_eff[i], &a_this->current.pos, NULL, NULL); @@ -3197,7 +3271,7 @@ static int daB_OB_Execute(b_ob_class* i_this) { if (i_this->field_0x5d18 != 0) { i_this->field_0x5d18--; i_this->field_0x5d38 = - dComIfGp_particle_set(i_this->field_0x5d38, 0x8809, &a_this->current.pos, NULL, NULL); + dComIfGp_particle_set(i_this->field_0x5d38, dPa_RM(ID_ZI_S_OI_FISH_CORESASHI_A), &a_this->current.pos, NULL, NULL); JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->field_0x5d38); if (emitter != 0) { @@ -3266,13 +3340,13 @@ static int useHeapInit(fopAc_ac_c* i_this) { b_ob_class* a_this = (b_ob_class*)i_this; a_this->mpCoreMorf = - new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("B_oh", 0x2A), NULL, NULL, - (J3DAnmTransform*)dComIfG_getObjectRes("B_oh", 0x11), 2, 1.0f, 0, -1, + new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("B_oh", BMDV_OH_CORE), NULL, NULL, + (J3DAnmTransform*)dComIfG_getObjectRes("B_oh", BCK_OH_CORE_OPEN), 2, 1.0f, 0, -1, &a_this->mSound, 0, 0x11000084); for (int i = 0; i < 19; i++) { - static int p_bmd[] = {43, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 38}; + static int p_bmd[] = {BMDV_OI_HEAD, BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_BODY, + BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_BODY, BMDR_OI_TAIL}; u32 var_r31 = 0x80000; if (p_bmd[i] == 43) { @@ -3311,7 +3385,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { if (i >= 4 && i <= 17) { a_this->mBodyParts[i].mpFinMorf = - new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("B_oh", 0x23), NULL, NULL, + new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("B_oh", BMDR_OI_FINA), NULL, NULL, NULL, 2, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000084); if (a_this->mBodyParts[i].mpFinMorf == NULL || @@ -3342,7 +3416,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { if (i >= 7 && i <= 15) { a_this->mBodyParts[i].mpFinUnkMorf = - new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("B_oh", 0x23), NULL, NULL, + new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("B_oh", BMDR_OI_FINA), NULL, NULL, NULL, 2, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000084); if (a_this->mBodyParts[i].mpFinUnkMorf == NULL || @@ -3367,7 +3441,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { if (i == 8) { a_this->mBodyParts[i].mpFinBMorf = - new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("B_oh", 0x24), NULL, NULL, + new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("B_oh", BMDR_OI_FINB), NULL, NULL, NULL, 2, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000084); if (a_this->mBodyParts[i].mpFinBMorf == NULL || @@ -3392,7 +3466,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { if (i == 17) { a_this->mBodyParts[i].mpFinCMorf = - new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("B_oh", 0x25), NULL, NULL, + new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("B_oh", BMDR_OI_FINC), NULL, NULL, NULL, 2, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000084); if (a_this->mBodyParts[i].mpFinCMorf == NULL || @@ -3416,7 +3490,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { } } - J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("B_oh", 0x21); + J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("B_oh", BMDR_EF_OISUI); JUT_ASSERT(0, modelData != 0); a_this->mpSuiModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000284); @@ -3435,7 +3509,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 0; } - if (!a_this->mpSuiBrk->init(modelData, (J3DAnmTevRegKey*)dComIfG_getObjectRes("B_oh", 0x2E), TRUE, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1)) { + if (!a_this->mpSuiBrk->init(modelData, (J3DAnmTevRegKey*)dComIfG_getObjectRes("B_oh", BRK_EF_OISUI), TRUE, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1)) { return 0; } @@ -3444,7 +3518,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 0; } - if (!a_this->mpSuiBtk->init(modelData, (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("B_oh", 0x35), TRUE, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1)) { + if (!a_this->mpSuiBtk->init(modelData, (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("B_oh", BTK_EF_OISUI), TRUE, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1)) { return 0; } diff --git a/src/d/actor/d_a_b_oh.cpp b/src/d/actor/d_a_b_oh.cpp index 3084af013de..39cf9c67840 100644 --- a/src/d/actor/d_a_b_oh.cpp +++ b/src/d/actor/d_a_b_oh.cpp @@ -1,156 +1,79 @@ /** * d_a_b_oh.cpp * Morpheel Tentacle - */ - -/** - * This almost entirely matches, there's just an issue with extra vtables / weak dtors being emitted - * things like cCcD_ShapeAttr, dCcD/cCcD_Stts, etc - */ +*/ #include "d/dolzel_rel.h" -#include "dol2asm.h" -#include "f_op/f_op_actor_mng.h" -#include "d/d_com_inf_game.h" #include "d/actor/d_a_b_ob.h" #include "d/actor/d_a_b_oh.h" -#include "SSystem/SComponent/c_lib.h" -#include "SSystem/SComponent/c_math.h" #include "d/actor/d_a_player.h" #include "c/c_damagereaction.h" +#include "Z2AudioLib/Z2Instances.h" -// -// Forward References: -// +enum B_oh_RES_File_ID { + /* BCK */ + /* 0x08 */ BCK_AL_FOIFINISH = 0x8, + /* 0x09 */ BCK_AL_OICUT, + /* 0x0A */ BCK_AL_OICUTB, + /* 0x0B */ BCK_AL_OIFINISH, + /* 0x0C */ BCK_AL_OIHANG, + /* 0x0D */ BCK_AL_OIHANGMISS, + /* 0x0E */ BCK_AL_OIHANGWAIT, + /* 0x0F */ BCK_AL_OIHANGWAITB, + /* 0x10 */ BCK_AL_OISPIT, + /* 0x11 */ BCK_OH_CORE_OPEN, + /* 0x12 */ BCK_OI_APPEAR, + /* 0x13 */ BCK_OI_APPEAR02, + /* 0x14 */ BCK_OI_DEAD, + /* 0x15 */ BCK_OI_EAT, + /* 0x16 */ BCK_OI_EAT02, + /* 0x17 */ BCK_OI_LASTDAMAGE, + /* 0x18 */ BCK_OI_OPENMOUTH, + /* 0x19 */ BCK_OI_OPENMOUTHWAIT, + /* 0x1A */ BCK_OI_SWALLOW, + /* 0x1B */ BCK_OI_SWIMWAIT, + /* 0x1C */ BCK_OI_TENTACLE_END, + /* 0x1D */ BCK_OI_THROWUP, + /* 0x1E */ BCK_OI_WAIT, -extern "C" void __ct__12daB_OH_HIO_cFv(); -extern "C" static void nodeCallBack__FP8J3DJointi(); -extern "C" static void daB_OH_Draw__FP10b_oh_class(); -extern "C" static void start__FP10b_oh_class(); -extern "C" void __dt__4cXyzFv(); -extern "C" static void wait__FP10b_oh_class(); -extern "C" static void attack__FP10b_oh_class(); -extern "C" static void caught__FP10b_oh_class(); -extern "C" static void end__FP10b_oh_class(); -extern "C" static void non__FP10b_oh_class(); -extern "C" static void action__FP10b_oh_class(); -extern "C" static void damage_check__FP10b_oh_class(); -extern "C" static void daB_OH_Execute__FP10b_oh_class(); -extern "C" static bool daB_OH_IsDelete__FP10b_oh_class(); -extern "C" static void daB_OH_Delete__FP10b_oh_class(); -extern "C" static void useHeapInit__FP10fopAc_ac_c(); -extern "C" void __dt__12J3DFrameCtrlFv(); -extern "C" static void daB_OH_Create__FP10fopAc_ac_c(); -extern "C" void __dt__8dCcD_SphFv(); -extern "C" void __ct__8dCcD_SphFv(); -extern "C" void __dt__8cM3dGSphFv(); -extern "C" void __dt__8cM3dGAabFv(); -extern "C" void __ct__4cXyzFv(); -extern "C" void __dt__5csXyzFv(); -extern "C" void __ct__5csXyzFv(); -extern "C" void __dt__12daB_OH_HIO_cFv(); -extern "C" void __sinit_d_a_b_oh_cpp(); -extern "C" extern char const* const d_a_b_oh__stringBase0; + /* BMDR */ + /* 0x21 */ BMDR_EF_OISUI = 0x21, + /* 0x22 */ BMDR_OI_BODY, + /* 0x23 */ BMDR_OI_FINA, + /* 0x24 */ BMDR_OI_FINB, + /* 0x25 */ BMDR_OI_FINC, + /* 0x26 */ BMDR_OI_TAIL, -// -// External References: -// + /* BMDV */ + /* 0x29 */ BMDV_OH = 0x29, + /* 0x2A */ BMDV_OH_CORE, + /* 0x2B */ BMDV_OI_HEAD, -extern "C" void mDoMtx_XrotM__FPA4_fs(); -extern "C" void mDoMtx_YrotM__FPA4_fs(); -extern "C" void mDoMtx_ZrotM__FPA4_fs(); -extern "C" void scaleM__14mDoMtx_stack_cFfff(); -extern "C" void play__14mDoExt_baseAnmFv(); -extern "C" void init__13mDoExt_btkAnmFP16J3DMaterialTableP19J3DAnmTextureSRTKeyiifss(); -extern "C" void entry__13mDoExt_btkAnmFP16J3DMaterialTablef(); -extern "C" void init__13mDoExt_brkAnmFP16J3DMaterialTableP15J3DAnmTevRegKeyiifss(); -extern "C" void entry__13mDoExt_brkAnmFP16J3DMaterialTablef(); -extern "C" void create__21mDoExt_invisibleModelFP8J3DModelUc(); -extern "C" void entryDL__21mDoExt_invisibleModelFP4cXyz(); -extern "C" void -__ct__14mDoExt_McaMorfFP12J3DModelDataP25mDoExt_McaMorfCallBack1_cP25mDoExt_McaMorfCallBack2_cP15J3DAnmTransformifiiiPvUlUl(); -extern "C" void play__14mDoExt_McaMorfFP3VecUlSc(); -extern "C" void modelCalc__14mDoExt_McaMorfFv(); -extern "C" void cDmrNowMidnaTalk__Fv(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void fopAcIt_Judge__FPFPvPv_PvPv(); -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_searchActorDistance__FPC10fopAc_ac_cPC10fopAc_ac_c(); -extern "C" void fpcSch_JudgeByID__FPvPv(); -extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfGp_getReverb__Fi(); -extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci(); -extern "C" void setHitMark__13dPa_control_cFUsP10fopAc_ac_cPC4cXyzPC5csXyzPC4cXyzUl(); -extern "C" void -set__13dPa_control_cFUlUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -extern "C" void StartShock__12dVibration_cFii4cXyz(); -extern "C" void __ct__10dCcD_GSttsFv(); -extern "C" void Move__10dCcD_GSttsFv(); -extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c(); -extern "C" void __ct__12dCcD_GObjInfFv(); -extern "C" void __dt__12dCcD_GObjInfFv(); -extern "C" void ChkTgHit__12dCcD_GObjInfFv(); -extern "C" void GetTgHitObj__12dCcD_GObjInfFv(); -extern "C" void ChkCoHit__12dCcD_GObjInfFv(); -extern "C" void GetCoHitObj__12dCcD_GObjInfFv(); -extern "C" void Set__8dCcD_SphFRC11dCcD_SrcSph(); -extern "C" void cc_at_check__FP10fopAc_ac_cP11dCcU_AtInfo(); -extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c(); -extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c(); -extern "C" void GetAc__8cCcD_ObjFv(); -extern "C" void Set__4cCcSFP8cCcD_Obj(); -extern "C" void cM_atan2s__Fff(); -extern "C" void cM_rndF__Ff(); -extern "C" void cM_rndFX__Ff(); -extern "C" void SetC__8cM3dGSphFRC4cXyz(); -extern "C" void SetR__8cM3dGSphFf(); -extern "C" void cLib_addCalc2__FPffff(); -extern "C" void cLib_addCalc0__FPfff(); -extern "C" void cLib_addCalcAngleS2__FPssss(); -extern "C" void MtxTrans__FfffUc(); -extern "C" void MtxScale__FfffUc(); -extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void startTentacleSound__12Z2CreatureOIF10JAISoundIDUcUlSc(); -extern "C" void* __nw__FUl(); -extern "C" void __dl__FPv(); -extern "C" void init__12J3DFrameCtrlFs(); -extern "C" void __construct_array(); -extern "C" void _savegpr_20(); -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_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__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 now__14mDoMtx_stack_c[48]; -extern "C" u8 mCurrentMtx__6J3DSys[48]; -extern "C" u8 sincosTable___5JMath[65536]; -extern "C" extern u8 struct_80450C98[4]; -extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; -extern "C" void __register_global_object(); + /* BRK */ + /* 0x2E */ BRK_EF_OISUI = 0x2E, + /* 0x2F */ BRK_OH_LOOP, -// -// Declarations: -// + /* BTK */ + /* 0x32 */ BTK_AL_FOICUT = 0x32, + /* 0x33 */ BTK_AL_FOICUTB, + /* 0x34 */ BTK_AL_FOIFINISH, + /* 0x35 */ BTK_EF_OISUI, + /* 0x36 */ BTK_OH_LOOP, -/* 8061DAAC-8061DAEC 000030 0040+00 1/1 0/0 0/0 .data cc_sph_src$4457 */ + /* BTP */ + /* 0x39 */ BTP_AL_FOIFINISH = 0x39, +}; + +class daB_OH_HIO_c { +public: + /* 8061B72C */ daB_OH_HIO_c(); + /* 8061D93C */ virtual ~daB_OH_HIO_c() {} + + /* 0x4 */ s8 field_0x4; + /* 0x8 */ f32 mModelSize; + /* 0xC */ f32 mLength; +}; /* 8061B72C-8061B75C 0000EC 0030+00 1/1 0/0 0/0 .text __ct__12daB_OH_HIO_cFv */ daB_OH_HIO_c::daB_OH_HIO_c() { @@ -209,10 +132,7 @@ static daB_OH_HIO_c l_HIO; static b_ob_class* boss; /* 8061DBD8-8061DBDC 000068 0004+00 0/1 0/0 0/0 .bss Cinit */ -#pragma push -#pragma force_active on static int Cinit; -#pragma pop /* 8061B960-8061BB18 000320 01B8+00 1/1 0/0 0/0 .text start__FP10b_oh_class */ static void start(b_oh_class* i_this) { @@ -368,8 +288,8 @@ static void attack(b_oh_class* i_this) { if (boss->mAction != OB_ACTION_CORE_HAND_MOVE) { boss->mAction = OB_ACTION_CORE_HAND_MOVE; boss->mMode = 0; - boss->mCoreAnm = 30; - boss->mCoreAnmMode = 2; + boss->mCoreAnm = BCK_OI_WAIT; + boss->mCoreAnmMode = J3DFrameCtrl::EMode_LOOP; } boss->mOISound.startTentacleSound( @@ -409,8 +329,8 @@ static void caught(b_oh_class* i_this) { cLib_addCalcAngleS2(&i_this->field_0xca4, i_this->field_0xc88 * 9000, 1, 500); if (i_this->mTimers[0] == 1) { - boss->mCoreAnm = 21; - boss->mCoreAnmMode = 0; + boss->mCoreAnm = BCK_OI_EAT; + boss->mCoreAnmMode = J3DFrameCtrl::EMode_NONE; boss->mOISound.startCreatureVoice(Z2SE_EN_OI_V_EAT, -1); } @@ -699,8 +619,8 @@ static void damage_check(b_oh_class* i_this) { if (boss->mDemoAction != 0) { boss->mDemoAction = 100; - boss->mCoreAnm = 30; - boss->mCoreAnmMode = 2; + boss->mCoreAnm = BCK_OI_WAIT; + boss->mCoreAnmMode = J3DFrameCtrl::EMode_LOOP; boss->field_0x4794 = 180; } @@ -805,7 +725,7 @@ static int daB_OH_Delete(b_oh_class* i_this) { static int useHeapInit(fopAc_ac_c* i_this) { b_oh_class* this_ = (b_oh_class*)i_this; - this_->mpMorf = new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("B_oh", 0x29), NULL, + this_->mpMorf = new mDoExt_McaMorf((J3DModelData*)dComIfG_getObjectRes("B_oh", BMDV_OH), NULL, NULL, NULL, 2, 1.0f, 0, -1, 1, NULL, 0, 0x11000284); if (this_->mpMorf == NULL || this_->mpMorf->getModel() == NULL) { return 0; @@ -827,7 +747,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 0; } - J3DAnmTextureSRTKey* btk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("B_oh", 0x36); + J3DAnmTextureSRTKey* btk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("B_oh", BTK_OH_LOOP); if (!this_->mpBtk->init(this_->mpMorf->getModel()->getModelData(), btk, TRUE, 2, 1.0f, 0, -1)) { return 0; } @@ -840,7 +760,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 0; } - J3DAnmTevRegKey* brk = (J3DAnmTevRegKey*)dComIfG_getObjectRes("B_oh", 0x2F); + J3DAnmTevRegKey* brk = (J3DAnmTevRegKey*)dComIfG_getObjectRes("B_oh", BRK_OH_LOOP); if (!this_->mpBrk->init(this_->mpMorf->getModel()->getModelData(), brk, TRUE, 2, 1.0f, 0, -1)) { return 0; } @@ -921,198 +841,31 @@ static int daB_OH_Create(fopAc_ac_c* i_this) { return phase; } -/* ############################################################################################## */ -/* 8061DBDC-8061DBE0 00006C 0004+00 0/0 0/0 0/0 .bss - * sInstance__40JASGlobalInstance<19JASDefaultBankTable> */ -#pragma push -#pragma force_active on -static u8 data_8061DBDC[4]; -#pragma pop - -/* 8061DBE0-8061DBE4 000070 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14JASAudioThread> */ -#pragma push -#pragma force_active on -static u8 data_8061DBE0[4]; -#pragma pop - -/* 8061DBE4-8061DBE8 000074 0004+00 0/0 0/0 0/0 .bss sInstance__27JASGlobalInstance<7Z2SeMgr> */ -#pragma push -#pragma force_active on -static u8 data_8061DBE4[4]; -#pragma pop - -/* 8061DBE8-8061DBEC 000078 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8Z2SeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_8061DBE8[4]; -#pragma pop - -/* 8061DBEC-8061DBF0 00007C 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SceneMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8061DBEC[4]; -#pragma pop - -/* 8061DBF0-8061DBF4 000080 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2StatusMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8061DBF0[4]; -#pragma pop - -/* 8061DBF4-8061DBF8 000084 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2DebugSys> - */ -#pragma push -#pragma force_active on -static u8 data_8061DBF4[4]; -#pragma pop - -/* 8061DBF8-8061DBFC 000088 0004+00 0/0 0/0 0/0 .bss - * sInstance__36JASGlobalInstance<15JAISoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_8061DBF8[4]; -#pragma pop - -/* 8061DBFC-8061DC00 00008C 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14Z2SoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_8061DBFC[4]; -#pragma pop - -/* 8061DC00-8061DC04 000090 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12Z2SpeechMgr2> */ -#pragma push -#pragma force_active on -static u8 data_8061DC00[4]; -#pragma pop - -/* 8061DC04-8061DC08 000094 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8JAISeMgr> */ -#pragma push -#pragma force_active on -static u8 data_8061DC04[4]; -#pragma pop - -/* 8061DC08-8061DC0C 000098 0004+00 0/0 0/0 0/0 .bss sInstance__29JASGlobalInstance<9JAISeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_8061DC08[4]; -#pragma pop - -/* 8061DC0C-8061DC10 00009C 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAIStreamMgr> */ -#pragma push -#pragma force_active on -static u8 data_8061DC0C[4]; -#pragma pop - -/* 8061DC10-8061DC14 0000A0 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SoundMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8061DC10[4]; -#pragma pop - -/* 8061DC14-8061DC18 0000A4 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAISoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_8061DC14[4]; -#pragma pop - -/* 8061DC18-8061DC1C 0000A8 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13JAUSoundTable> */ -#pragma push -#pragma force_active on -static u8 data_8061DC18[4]; -#pragma pop - -/* 8061DC1C-8061DC20 0000AC 0004+00 0/0 0/0 0/0 .bss - * sInstance__38JASGlobalInstance<17JAUSoundNameTable> */ -#pragma push -#pragma force_active on -static u8 data_8061DC1C[4]; -#pragma pop - -/* 8061DC20-8061DC24 0000B0 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAUSoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_8061DC20[4]; -#pragma pop - -/* 8061DC24-8061DC28 0000B4 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SoundInfo> - */ -#pragma push -#pragma force_active on -static u8 data_8061DC24[4]; -#pragma pop - -/* 8061DC28-8061DC2C 0000B8 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2SoundObjMgr> */ -#pragma push -#pragma force_active on -static u8 data_8061DC28[4]; -#pragma pop - -/* 8061DC2C-8061DC30 0000BC 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2Audience> - */ -#pragma push -#pragma force_active on -static u8 data_8061DC2C[4]; -#pragma pop - -/* 8061DC30-8061DC34 0000C0 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2FxLineMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8061DC30[4]; -#pragma pop - -/* 8061DC34-8061DC38 0000C4 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2EnvSeMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8061DC34[4]; -#pragma pop - -/* 8061DC38-8061DC3C 0000C8 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SpeechMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8061DC38[4]; -#pragma pop - -/* 8061DC3C-8061DC40 0000CC 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2WolfHowlMgr> */ -#pragma push -#pragma force_active on -static u8 data_8061DC3C[4]; -#pragma pop - -/* 8061DA74-8061DA74 0000A0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ +AUDIO_INSTANCES; /* 8061DAEC-8061DB0C -00001 0020+00 1/0 0/0 0/0 .data l_daB_OH_Method */ -SECTION_DATA static void* l_daB_OH_Method[8] = { - (void*)daB_OH_Create__FP10fopAc_ac_c, - (void*)daB_OH_Delete__FP10b_oh_class, - (void*)daB_OH_Execute__FP10b_oh_class, - (void*)daB_OH_IsDelete__FP10b_oh_class, - (void*)daB_OH_Draw__FP10b_oh_class, - (void*)NULL, - (void*)NULL, - (void*)NULL, +static actor_method_class l_daB_OH_Method = { + (process_method_func)daB_OH_Create, + (process_method_func)daB_OH_Delete, + (process_method_func)daB_OH_Execute, + (process_method_func)daB_OH_IsDelete, + (process_method_func)daB_OH_Draw, }; /* 8061DB0C-8061DB3C -00001 0030+00 0/0 0/0 1/0 .data g_profile_B_OH */ -SECTION_DATA extern void* g_profile_B_OH[12] = { - (void*)0xFFFFFFFD, (void*)0x0003FFFD, - (void*)0x00D20000, (void*)&g_fpcLf_Method, - (void*)0x00001F88, (void*)NULL, - (void*)NULL, (void*)&g_fopAc_Method, - (void*)0x00DA0000, (void*)&l_daB_OH_Method, - (void*)0x00044000, (void*)0x020E0000, +extern actor_process_profile_definition g_profile_B_OH = { + fpcLy_CURRENT_e, + 3, + fpcPi_CURRENT_e, + PROC_B_OH, + &g_fpcLf_Method.base, + sizeof(b_oh_class), + 0, + 0, + &g_fopAc_Method.base, + 218, + &l_daB_OH_Method, + 0x00044000, + fopAc_ENEMY_e, + fopAc_CULLBOX_CUSTOM_e, }; diff --git a/src/d/actor/d_a_do.cpp b/src/d/actor/d_a_do.cpp index fd22da8e12d..f234eab5c23 100644 --- a/src/d/actor/d_a_do.cpp +++ b/src/d/actor/d_a_do.cpp @@ -7,19 +7,14 @@ #include "d/dolzel_rel.h" -#include "JSystem/JGeometry.h" -#include "SSystem/SComponent/c_math.h" -#include "Z2AudioLib/Z2Instances.h" #include "c/c_damagereaction.h" #include "d/actor/d_a_canoe.h" #include "d/actor/d_a_do.h" #include "d/actor/d_a_obj_food.h" #include "d/actor/d_a_player.h" #include "d/d_a_item_static.h" -#include "d/d_com_inf_game.h" -#include "d/d_procname.h" -#include "f_op/f_op_actor_mng.h" #include "m_Do/m_Do_controller_pad.h" +#include "Z2AudioLib/Z2Instances.h" /* 8066F2B4-8066F2B8 -00001 0004+00 1/2 0/0 0/0 .bss None */ /* 8066F2B6 0002+00 data_8066F2B6 None */ diff --git a/src/d/actor/d_a_myna.cpp b/src/d/actor/d_a_myna.cpp index a7ac0cf31e4..245fb1f9d3e 100644 --- a/src/d/actor/d_a_myna.cpp +++ b/src/d/actor/d_a_myna.cpp @@ -11,7 +11,7 @@ #include "d/d_msg_object.h" #include "d/actor/d_a_obj_ss_item.h" #include "d/actor/d_a_tag_myna_light.h" -#include "SSystem/SComponent/c_math.h" +#include "Z2AudioLib/Z2Instances.h" class daMyna_HIO_c : public mDoHIO_entry_c { public: @@ -1510,12 +1510,13 @@ int daMyna_c::checkEndAnm(J3DFrameCtrl* param_0) { case 2: return param_0->checkState(2); case 0: - case 1: + case 1: { u8 retVal = 1; if (param_0->checkState(1) == 0 && param_0->getRate() != 0.0f) { retVal = 0; } return retVal; + } case 3: default: return 0; @@ -1660,7 +1661,6 @@ int daMyna_c::chkPlayerInEvtArea(fopAc_ac_c* param_0, cXyz param_1) { } /* 80949EE8-8094A054 004368 016C+00 2/1 0/0 0/0 .text animeControl__8daMyna_cFv */ -// NONMATCHING regswap void daMyna_c::animeControl() { f32 rate = 1.0f; int attr = J3DFrameCtrl::EMode_LOOP; @@ -1867,175 +1867,4 @@ extern actor_process_profile_definition g_profile_MYNA = { fopAc_CULLBOX_0_e }; -/* 8094BAD0-8094BAD4 0000E8 0004+00 0/0 0/0 0/0 .bss - * sInstance__40JASGlobalInstance<19JASDefaultBankTable> */ -#pragma push -#pragma force_active on -static u8 data_8094BAD0[4]; -#pragma pop - -/* 8094BAD4-8094BAD8 0000EC 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14JASAudioThread> */ -#pragma push -#pragma force_active on -static u8 data_8094BAD4[4]; -#pragma pop - -/* 8094BAD8-8094BADC 0000F0 0004+00 0/0 0/0 0/0 .bss sInstance__27JASGlobalInstance<7Z2SeMgr> */ -#pragma push -#pragma force_active on -static u8 data_8094BAD8[4]; -#pragma pop - -/* 8094BADC-8094BAE0 0000F4 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8Z2SeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_8094BADC[4]; -#pragma pop - -/* 8094BAE0-8094BAE4 0000F8 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SceneMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8094BAE0[4]; -#pragma pop - -/* 8094BAE4-8094BAE8 0000FC 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2StatusMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8094BAE4[4]; -#pragma pop - -/* 8094BAE8-8094BAEC 000100 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2DebugSys> - */ -#pragma push -#pragma force_active on -static u8 data_8094BAE8[4]; -#pragma pop - -/* 8094BAEC-8094BAF0 000104 0004+00 0/0 0/0 0/0 .bss - * sInstance__36JASGlobalInstance<15JAISoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_8094BAEC[4]; -#pragma pop - -/* 8094BAF0-8094BAF4 000108 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14Z2SoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_8094BAF0[4]; -#pragma pop - -/* 8094BAF4-8094BAF8 00010C 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12Z2SpeechMgr2> */ -#pragma push -#pragma force_active on -static u8 data_8094BAF4[4]; -#pragma pop - -/* 8094BAF8-8094BAFC 000110 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8JAISeMgr> */ -#pragma push -#pragma force_active on -static u8 data_8094BAF8[4]; -#pragma pop - -/* 8094BAFC-8094BB00 000114 0004+00 0/0 0/0 0/0 .bss sInstance__29JASGlobalInstance<9JAISeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_8094BAFC[4]; -#pragma pop - -/* 8094BB00-8094BB04 000118 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAIStreamMgr> */ -#pragma push -#pragma force_active on -static u8 data_8094BB00[4]; -#pragma pop - -/* 8094BB04-8094BB08 00011C 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SoundMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8094BB04[4]; -#pragma pop - -/* 8094BB08-8094BB0C 000120 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAISoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_8094BB08[4]; -#pragma pop - -/* 8094BB0C-8094BB10 000124 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13JAUSoundTable> */ -#pragma push -#pragma force_active on -static u8 data_8094BB0C[4]; -#pragma pop - -/* 8094BB10-8094BB14 000128 0004+00 0/0 0/0 0/0 .bss - * sInstance__38JASGlobalInstance<17JAUSoundNameTable> */ -#pragma push -#pragma force_active on -static u8 data_8094BB10[4]; -#pragma pop - -/* 8094BB14-8094BB18 00012C 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAUSoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_8094BB14[4]; -#pragma pop - -/* 8094BB18-8094BB1C 000130 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SoundInfo> - */ -#pragma push -#pragma force_active on -static u8 data_8094BB18[4]; -#pragma pop - -/* 8094BB1C-8094BB20 000134 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2SoundObjMgr> */ -#pragma push -#pragma force_active on -static u8 data_8094BB1C[4]; -#pragma pop - -/* 8094BB20-8094BB24 000138 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2Audience> - */ -#pragma push -#pragma force_active on -static u8 data_8094BB20[4]; -#pragma pop - -/* 8094BB24-8094BB28 00013C 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2FxLineMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8094BB24[4]; -#pragma pop - -/* 8094BB28-8094BB2C 000140 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2EnvSeMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8094BB28[4]; -#pragma pop - -/* 8094BB2C-8094BB30 000144 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SpeechMgr> - */ -#pragma push -#pragma force_active on -static u8 data_8094BB2C[4]; -#pragma pop - -/* 8094BB30-8094BB34 000148 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2WolfHowlMgr> */ -#pragma push -#pragma force_active on -static u8 data_8094BB30[4]; -#pragma pop - -/* 8094B24C-8094B24C 00009C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ +AUDIO_INSTANCES; diff --git a/src/d/actor/d_a_npc_zra.cpp b/src/d/actor/d_a_npc_zra.cpp index f621822fa1b..983785b0cb5 100644 --- a/src/d/actor/d_a_npc_zra.cpp +++ b/src/d/actor/d_a_npc_zra.cpp @@ -484,10 +484,7 @@ daNpc_zrA_c::EventFn daNpc_zrA_c::mEvtCutList[11] = { }; /* 80B7956C-80B79798 00114C 022C+00 1/1 0/0 0/0 .text __ct__11daNpc_zrA_cFv */ -// NONMATCHING daNpcF_c needs to not be inlined -daNpc_zrA_c::daNpc_zrA_c() { - /* empty function */ -} +daNpc_zrA_c::daNpc_zrA_c() {} /* 80B79828-80B79B58 001408 0330+00 1/0 0/0 0/0 .text __dt__11daNpc_zrA_cFv */ daNpc_zrA_c::~daNpc_zrA_c() { @@ -2062,10 +2059,10 @@ bool daNpc_zrA_c::selectAction() { } /* 80B7DF40-80B7E668 005B20 0728+00 1/1 0/0 0/0 .text doEvent__11daNpc_zrA_cFv */ -// NONMATCHING regalloc BOOL daNpc_zrA_c::doEvent() { dEvent_manager_c* event_manager = NULL; BOOL ret = false; + int staff_id; if (dComIfGp_event_runCheck() != FALSE) { event_manager = &dComIfGp_getEventManager(); @@ -2097,33 +2094,31 @@ BOOL daNpc_zrA_c::doEvent() { } changeEvent(l_resNames[l_evtGetParamList[mOrderEvtNo].arcIdx], l_evtNames[l_evtGetParamList[mOrderEvtNo].fileIdx], 1, 0xffff); - } else { - if (chkAction(&daNpc_zrA_c::talk)) { - (this->*mpActionFn)(NULL); - } else if (dComIfGp_event_chkTalkXY()) { - if (dComIfGp_evmng_ChkPresentEnd()) { - if (dComIfGp_event_getPreItemNo() == 0x91) { - if (mSoldierType != SOLDIER_NONE) { - if (home.angle.x == 0x6d) { - mFlowID = 4; - } else { - mFlowID = 5; - } + } else if (chkAction(&daNpc_zrA_c::talk)) { + (this->*mpActionFn)(NULL); + } else if (dComIfGp_event_chkTalkXY()) { + if (dComIfGp_evmng_ChkPresentEnd()) { + if (dComIfGp_event_getPreItemNo() == 0x91) { + if (mSoldierType != SOLDIER_NONE) { + if (home.angle.x == 0x6d) { + mFlowID = 4; } else { - mFlowID = 6; + mFlowID = 5; } - setAction(&daNpc_zrA_c::talk); } else { - s16 event_idx = - dComIfGp_getEventManager().getEventIdx(this, "NO_RESPONSE", 0xff); - dComIfGp_getEvent().reset(this); - fopAcM_orderChangeEventId(this, event_idx, 1, 0xffff); - field_0x9ec = true; + mFlowID = 6; } + setAction(&daNpc_zrA_c::talk); + } else { + s16 event_idx = + dComIfGp_getEventManager().getEventIdx(this, "NO_RESPONSE", 0xff); + dComIfGp_getEvent().reset(this); + fopAcM_orderChangeEventId(this, event_idx, 1, 0xffff); + field_0x9ec = true; } - } else { - setAction(&daNpc_zrA_c::talk); } + } else { + setAction(&daNpc_zrA_c::talk); } ret = true; } else { @@ -2132,7 +2127,7 @@ BOOL daNpc_zrA_c::doEvent() { mItemID = -1; } - int staff_id = event_manager->getMyStaffId(mStaffName, this, 0); + staff_id = event_manager->getMyStaffId(mStaffName, this, 0); if (staff_id != -1) { mStaffID = staff_id; int act_idx = event_manager->getMyActIdx(staff_id, mEvtCutNameList, @@ -2199,10 +2194,8 @@ BOOL daNpc_zrA_c::doEvent() { setExpression(expression, -1.0f); setMotion(motion, -1.0f, false); } - } else { - if (!field_0x9eb && prev_msg_timer != 0 && mMsgTimer == 0) { - setExpressionTalkAfter(); - } + } else if (!field_0x9eb && prev_msg_timer != 0 && mMsgTimer == 0) { + setExpressionTalkAfter(); } } diff --git a/src/d/actor/d_a_npc_zrc.cpp b/src/d/actor/d_a_npc_zrc.cpp index 8908b82f59c..8d44390aa92 100644 --- a/src/d/actor/d_a_npc_zrc.cpp +++ b/src/d/actor/d_a_npc_zrc.cpp @@ -1047,38 +1047,40 @@ void daNpc_zrC_c::playMotion() { } } -/* 80B90940-80B90A6C 002E20 012C+00 1/1 0/0 0/0 .text - * playMotionAnm2__11daNpc_zrC_cFPPPQ28daNpcF_c18daNpcF_anmPlayData */ -// NONMATCHING regalloc +/* 80B90940-80B90A6C 002E20 012C+00 1/1 0/0 0/0 .text playMotionAnm2__11daNpc_zrC_cFPPPQ28daNpcF_c18daNpcF_anmPlayData */ void daNpc_zrC_c::playMotionAnm2(daNpcF_c::daNpcF_anmPlayData*** i_data) { + f32 morf; daNpcF_anmPlayData* playData = NULL; + if (i_data[mMotion] != NULL) { playData = i_data[mMotion][mMotionPhase]; } + if (playData != NULL) { - if (mMotionPrevPhase == mMotionPhase && playData->numLoops > 0 && - playData->numLoops <= mMotionLoops) - { + if (mMotionPrevPhase == mMotionPhase && (int)playData->numLoops > 0 && playData->numLoops <= mMotionLoops) { mMotionPhase++; playData = i_data[mMotion][mMotionPhase]; } + if (playData != NULL && mMotionPrevPhase != mMotionPhase) { setMotionAnm(playData->idx, 0.0f); - f32 morf = playData->morf; + morf = playData->morf; + if (mMotionPhase == 0 && 0.0f <= mMotionMorfOverride) { morf = mMotionMorfOverride; } + if (morf > 0.0f) { mExpressionMorf = 0.0f; mpMorf->setMorf(morf); } } } + mMotionPrevPhase = mMotionPhase; } -/* 80B90A6C-80B90A98 002F4C 002C+00 2/2 0/0 0/0 .text - * chkAction__11daNpc_zrC_cFM11daNpc_zrC_cFPCvPvPv_i */ +/* 80B90A6C-80B90A98 002F4C 002C+00 2/2 0/0 0/0 .text chkAction__11daNpc_zrC_cFM11daNpc_zrC_cFPCvPvPv_i */ BOOL daNpc_zrC_c::chkAction(ActionFn i_action) { return mpActionFn == i_action; } @@ -1149,10 +1151,10 @@ void daNpc_zrC_c::doNormalAction(BOOL param_0) { } /* 80B90D48-80B9113C 003228 03F4+00 1/1 0/0 0/0 .text doEvent__11daNpc_zrC_cFv */ -// NONMATCHING minor regalloc BOOL daNpc_zrC_c::doEvent() { dEvent_manager_c* event_mgr = NULL; BOOL ret = 0; + int staff_id; if (dComIfGp_event_runCheck() != FALSE) { event_mgr = &dComIfGp_getEventManager(); @@ -1189,7 +1191,7 @@ BOOL daNpc_zrC_c::doEvent() { mItemID = -1; } - int staff_id = event_mgr->getMyStaffId(l_myName, NULL, 0); + staff_id = event_mgr->getMyStaffId(l_myName, NULL, 0); if (staff_id != -1) { mStaffID = staff_id; int evtCutNo = event_mgr->getMyActIdx(staff_id, mEvtCutNameList, 2, 0, 0); diff --git a/src/d/actor/d_a_npc_zrz.cpp b/src/d/actor/d_a_npc_zrz.cpp index a9d4ab8505a..ea24313edf9 100644 --- a/src/d/actor/d_a_npc_zrz.cpp +++ b/src/d/actor/d_a_npc_zrz.cpp @@ -10,6 +10,7 @@ #include "JSystem/J3DGraphBase/J3DMaterial.h" #include "d/actor/d_a_obj_grave_stone.h" #include "d/actor/d_a_obj_zra_rock.h" +#include "Z2AudioLib/Z2Instances.h" /* 80B9B8B4-80B9B8B8 000054 0004+00 1/1 0/0 0/0 .bss l_HIO */ static daNpc_zrZ_Param_c l_HIO; @@ -627,7 +628,7 @@ BOOL daNpc_zrZ_c::ctrlBtk() { /* 80B956B4-80B95BB8 0019D4 0504+00 1/0 0/0 0/0 .text setAttnPos__11daNpc_zrZ_cFv */ void daNpc_zrZ_c::setAttnPos() { - static cXyz eyeOffset(-20.0f, 10.0f, 0.0f); + static cXyz eyeOffset(-10.0f, 10.0f, 0.0f); f32 offset = daNpc_zrZ_Param_c::m.mAttnOffsetY; cXyz center, vec2, vec3, vec4; @@ -1335,9 +1336,9 @@ void daNpc_zrZ_c::lightColorProc() { } int frames = next_key_frame - prev_key_frame; - s16 step_r = fabs(key_color[i + 1].r - key_color[i].r) / frames; - s16 step_g = fabs(key_color[i + 1].g - key_color[i].g) / frames; - s16 step_b = fabs(key_color[i + 1].b - key_color[i].b) / frames; + s16 step_r = std::fabs(key_color[i + 1].r - key_color[i].r) / frames; + s16 step_g = std::fabs(key_color[i + 1].g - key_color[i].g) / frames; + s16 step_b = std::fabs(key_color[i + 1].b - key_color[i].b) / frames; cLib_chaseS(&mLight.mColor.r, key_color[next].r, ++step_r); cLib_chaseS(&mLight.mColor.g, key_color[next].g, ++step_g); cLib_chaseS(&mLight.mColor.b, key_color[next].b, ++step_b); @@ -2501,177 +2502,7 @@ static int daNpc_zrZ_IsDelete(void* i_this) { return 1; } -/* ############################################################################################## */ -/* 80B9B8D4-80B9B8D8 000074 0004+00 0/0 0/0 0/0 .bss - * sInstance__40JASGlobalInstance<19JASDefaultBankTable> */ -#pragma push -#pragma force_active on -static u8 data_80B9B8D4[4]; -#pragma pop - -/* 80B9B8D8-80B9B8DC 000078 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14JASAudioThread> */ -#pragma push -#pragma force_active on -static u8 data_80B9B8D8[4]; -#pragma pop - -/* 80B9B8DC-80B9B8E0 00007C 0004+00 0/0 0/0 0/0 .bss sInstance__27JASGlobalInstance<7Z2SeMgr> */ -#pragma push -#pragma force_active on -static u8 data_80B9B8DC[4]; -#pragma pop - -/* 80B9B8E0-80B9B8E4 000080 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8Z2SeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_80B9B8E0[4]; -#pragma pop - -/* 80B9B8E4-80B9B8E8 000084 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SceneMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80B9B8E4[4]; -#pragma pop - -/* 80B9B8E8-80B9B8EC 000088 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2StatusMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80B9B8E8[4]; -#pragma pop - -/* 80B9B8EC-80B9B8F0 00008C 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2DebugSys> - */ -#pragma push -#pragma force_active on -static u8 data_80B9B8EC[4]; -#pragma pop - -/* 80B9B8F0-80B9B8F4 000090 0004+00 0/0 0/0 0/0 .bss - * sInstance__36JASGlobalInstance<15JAISoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_80B9B8F0[4]; -#pragma pop - -/* 80B9B8F4-80B9B8F8 000094 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14Z2SoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_80B9B8F4[4]; -#pragma pop - -/* 80B9B8F8-80B9B8FC 000098 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12Z2SpeechMgr2> */ -#pragma push -#pragma force_active on -static u8 data_80B9B8F8[4]; -#pragma pop - -/* 80B9B8FC-80B9B900 00009C 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8JAISeMgr> */ -#pragma push -#pragma force_active on -static u8 data_80B9B8FC[4]; -#pragma pop - -/* 80B9B900-80B9B904 0000A0 0004+00 0/0 0/0 0/0 .bss sInstance__29JASGlobalInstance<9JAISeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_80B9B900[4]; -#pragma pop - -/* 80B9B904-80B9B908 0000A4 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAIStreamMgr> */ -#pragma push -#pragma force_active on -static u8 data_80B9B904[4]; -#pragma pop - -/* 80B9B908-80B9B90C 0000A8 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SoundMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80B9B908[4]; -#pragma pop - -/* 80B9B90C-80B9B910 0000AC 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAISoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_80B9B90C[4]; -#pragma pop - -/* 80B9B910-80B9B914 0000B0 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13JAUSoundTable> */ -#pragma push -#pragma force_active on -static u8 data_80B9B910[4]; -#pragma pop - -/* 80B9B914-80B9B918 0000B4 0004+00 0/0 0/0 0/0 .bss - * sInstance__38JASGlobalInstance<17JAUSoundNameTable> */ -#pragma push -#pragma force_active on -static u8 data_80B9B914[4]; -#pragma pop - -/* 80B9B918-80B9B91C 0000B8 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAUSoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_80B9B918[4]; -#pragma pop - -/* 80B9B91C-80B9B920 0000BC 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SoundInfo> - */ -#pragma push -#pragma force_active on -static u8 data_80B9B91C[4]; -#pragma pop - -/* 80B9B920-80B9B924 0000C0 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2SoundObjMgr> */ -#pragma push -#pragma force_active on -static u8 data_80B9B920[4]; -#pragma pop - -/* 80B9B924-80B9B928 0000C4 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2Audience> - */ -#pragma push -#pragma force_active on -static u8 data_80B9B924[4]; -#pragma pop - -/* 80B9B928-80B9B92C 0000C8 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2FxLineMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80B9B928[4]; -#pragma pop - -/* 80B9B92C-80B9B930 0000CC 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2EnvSeMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80B9B92C[4]; -#pragma pop - -/* 80B9B930-80B9B934 0000D0 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SpeechMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80B9B930[4]; -#pragma pop - -/* 80B9B934-80B9B938 0000D4 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2WolfHowlMgr> */ -#pragma push -#pragma force_active on -static u8 data_80B9B934[4]; -#pragma pop +AUDIO_INSTANCES; /* 80B9B714-80B9B734 -00001 0020+00 1/0 0/0 0/0 .data daNpc_zrZ_MethodTable */ static actor_method_class daNpc_zrZ_MethodTable = { diff --git a/src/d/actor/d_a_obj_cblock.cpp b/src/d/actor/d_a_obj_cblock.cpp index 3bdc8f7ff98..b2966816b3c 100644 --- a/src/d/actor/d_a_obj_cblock.cpp +++ b/src/d/actor/d_a_obj_cblock.cpp @@ -7,11 +7,9 @@ #include "d/actor/d_a_obj_cblock.h" #include "d/d_cc_d.h" -#include "Z2AudioLib/Z2Instances.h" -#include "d/d_com_inf_game.h" #include "d/d_path.h" #include "d/actor/d_a_player.h" -#include "dol2asm.h" +#include "Z2AudioLib/Z2Instances.h" /* 80BC5A0C-80BC5A48 0000EC 003C+00 1/1 0/0 0/0 .text initBaseMtx__11daObjCBlk_cFv */ void daObjCBlk_c::initBaseMtx() { diff --git a/src/d/actor/d_a_obj_flag3.cpp b/src/d/actor/d_a_obj_flag3.cpp index c9ab66e3ec8..99decdbfe14 100644 --- a/src/d/actor/d_a_obj_flag3.cpp +++ b/src/d/actor/d_a_obj_flag3.cpp @@ -493,8 +493,7 @@ void daObjFlag3_c::create_init() { #endif } -/* 80BEFD08-80BEFF30 001308 0228+00 1/1 0/0 0/0 .text - * initFlagPos__12FlagCloth2_cFP4cXyzP10fopAc_ac_c */ +/* 80BEFD08-80BEFF30 001308 0228+00 1/1 0/0 0/0 .text initFlagPos__12FlagCloth2_cFP4cXyzP10fopAc_ac_c */ void FlagCloth2_c::initFlagPos(cXyz* param_0, fopAc_ac_c* param_1) { mpFlagPosition = param_0; cXyz direction; diff --git a/src/d/actor/d_a_obj_master_sword.cpp b/src/d/actor/d_a_obj_master_sword.cpp index dd745f912c5..2eca2963da1 100644 --- a/src/d/actor/d_a_obj_master_sword.cpp +++ b/src/d/actor/d_a_obj_master_sword.cpp @@ -35,8 +35,7 @@ void daObjMasterSword_c::initWait() { shape_angle = home.angle; } -/* 80C90B50-80C90C50 0000D0 0100+00 1/0 0/0 0/0 .text executeWait__18daObjMasterSword_cFv - */ +/* 80C90B50-80C90C50 0000D0 0100+00 1/0 0/0 0/0 .text executeWait__18daObjMasterSword_cFv */ void daObjMasterSword_c::executeWait() { if (daPy_getPlayerActorClass()->checkPriActorOwn(this)) { for (int i = 0; i < dComIfGp_getAttention()->GetActionCount(); i++) { @@ -56,8 +55,7 @@ void daObjMasterSword_c::executeWait() { } } -/* 80C90C50-80C90C70 0001D0 0020+00 1/1 0/0 0/0 .text - * createHeapCallBack__18daObjMasterSword_cFP10fopAc_ac_c */ +/* 80C90C50-80C90C70 0001D0 0020+00 1/1 0/0 0/0 .text createHeapCallBack__18daObjMasterSword_cFP10fopAc_ac_c */ int daObjMasterSword_c::createHeapCallBack(fopAc_ac_c* i_this) { return static_cast(i_this)->CreateHeap(); } @@ -65,8 +63,7 @@ int daObjMasterSword_c::createHeapCallBack(fopAc_ac_c* i_this) { /* 80C9199C-80C919A0 -00001 0004+00 3/3 0/0 0/0 .data l_arcName */ static char* l_arcName = "MstrSword"; -/* 80C90C70-80C90D98 0001F0 0128+00 1/1 0/0 0/0 .text CreateHeap__18daObjMasterSword_cFv - */ +/* 80C90C70-80C90D98 0001F0 0128+00 1/1 0/0 0/0 .text CreateHeap__18daObjMasterSword_cFv */ int daObjMasterSword_c::CreateHeap() { J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 5); mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000284); @@ -146,8 +143,7 @@ void daObjMasterSword_c::initCollision() { mCyl.SetStts(&mCcStts); } -/* 80C90F6C-80C9120C 0004EC 02A0+00 1/1 0/0 0/0 .text create_init__18daObjMasterSword_cFv - */ +/* 80C90F6C-80C9120C 0004EC 02A0+00 1/1 0/0 0/0 .text create_init__18daObjMasterSword_cFv */ void daObjMasterSword_c::create_init() { fopAcM_setCullSizeBox2(this, mpModel->getModelData()); initCollision(); @@ -174,8 +170,7 @@ void daObjMasterSword_c::create_init() { setAction(MODE_0_e); } -/* 80C91420-80C91448 0009A0 0028+00 1/0 0/0 0/0 .text - * daObjMasterSword_Delete__FP18daObjMasterSword_c */ +/* 80C91420-80C91448 0009A0 0028+00 1/0 0/0 0/0 .text daObjMasterSword_Delete__FP18daObjMasterSword_c */ static int daObjMasterSword_Delete(daObjMasterSword_c* i_this) { i_this->~daObjMasterSword_c(); return 1; diff --git a/src/d/actor/d_a_obj_waterPillar.cpp b/src/d/actor/d_a_obj_waterPillar.cpp index d8ca932aafb..e9953b7902a 100644 --- a/src/d/actor/d_a_obj_waterPillar.cpp +++ b/src/d/actor/d_a_obj_waterPillar.cpp @@ -11,7 +11,7 @@ struct daWtPillar_HIO_c : public mDoHIO_entry_c { /* 80D2C6CC */ daWtPillar_HIO_c(); - /* 80D2DF34 */ ~daWtPillar_HIO_c(); + /* 80D2DF34 */ virtual ~daWtPillar_HIO_c(); void genMessage(JORMContext*); diff --git a/src/d/d_cam_param.cpp b/src/d/d_cam_param.cpp index 5cdd69fa4aa..2111aa64782 100644 --- a/src/d/d_cam_param.cpp +++ b/src/d/d_cam_param.cpp @@ -12,8 +12,7 @@ #include "d/d_camera.h" #include "d/d_com_inf_game.h" -/* 8008813C-80088284 082A7C 0148+00 0/0 12/12 0/0 .text rationalBezierRatio__8dCamMathFff - */ +/* 8008813C-80088284 082A7C 0148+00 0/0 12/12 0/0 .text rationalBezierRatio__8dCamMathFff */ f32 dCamMath::rationalBezierRatio(f32 param_0, f32 param_1) { f64 var_f31; f32 var_f1 = param_0;