Various regalloc fixes and linking (#2673)

* some d_a_b TUs matching

* reworked d_a_b_ob enums

* d_a_b_oh seems to be linking fine

* d_a_b_oh actually not good (i think), but npc_zrc matching

* d_a_b_oh is indeed matching!

* d_a_cam_param linked

---------

Co-authored-by: hatal175 <hatal175@users.noreply.github.com>
This commit is contained in:
Carco_21
2025-09-19 21:38:54 +03:00
committed by GitHub
co-authored by hatal175
parent 9306edbec6
commit 2c39c2105f
28 changed files with 504 additions and 1047 deletions
+3
View File
@@ -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
@@ -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
+9 -9
View File
@@ -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"),
+2 -12
View File
@@ -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 */
-30
View File
@@ -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 */
+2 -34
View File
@@ -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 */
+2 -11
View File
@@ -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;
+2 -1
View File
@@ -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&);
+2 -2
View File
@@ -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;
-3
View File
@@ -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;
+2 -1
View File
@@ -18,7 +18,8 @@ struct daObjMasterSword_Attr_c {
*
* @details
*
*/
*/
class daObjMasterSword_c : public fopAc_ac_c {
public:
enum Mode_e {
+14 -13
View File
@@ -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)));
+2 -1
View File
@@ -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();
+81 -55
View File
@@ -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);
+78 -35
View File
@@ -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;
+9 -13
View File
@@ -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);
+147 -73
View File
File diff suppressed because it is too large Load Diff
+91 -338
View File
File diff suppressed because it is too large Load Diff
+1 -6
View File
@@ -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 */
+4 -175
View File
@@ -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;

Some files were not shown because too many files have changed in this diff Show More