mirror of https://github.com/zeldaret/tp.git
Co-authored-by: hatal175 <hatal175@users.noreply.github.com>
This commit is contained in:
parent
69aaeeeda6
commit
d528862dd0
|
@ -91,6 +91,6 @@ __vt__12dBgS_ObjAcch = .data:0x00000134; // type:object size:0x24 scope:global
|
|||
__vt__12J3DFrameCtrl = .data:0x00000158; // type:object size:0xC scope:global
|
||||
__vt__10daFr_HIO_c = .data:0x00000164; // type:object size:0xC scope:global
|
||||
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
|
||||
lbl_72_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte
|
||||
l_initHIO = .bss:0x00000008; // type:object size:0x1 data:byte
|
||||
@3644 = .bss:0x0000000C; // type:object size:0xC scope:local
|
||||
l_HIO = .bss:0x00000018; // type:object size:0x2C scope:global data:byte
|
||||
|
|
|
@ -27,4 +27,4 @@ lbl_22_data_10 = .data:0x00000010; // type:object size:0x10
|
|||
mode_proc$3725 = .data:0x00000038; // type:object size:0x18 scope:local
|
||||
Mthd_Table__Q210daObjTimer27@unnamed@d_a_obj_timer_cpp@ = .data:0x00000050; // type:object size:0x20 scope:global
|
||||
g_profile_Obj_Timer = .data:0x00000070; // type:object size:0x30 scope:global
|
||||
lbl_22_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte
|
||||
init$1527 = .bss:0x00000000; // type:object size:0x1 data:byte
|
||||
|
|
|
@ -67,6 +67,6 @@ lbl_73_data_134 = .data:0x00000134; // type:object size:0xC
|
|||
@92624 = .data:0x00000140; // type:object size:0xC scope:local
|
||||
__RTTI__10daFr_HIO_c = .data:0x0000014C; // type:object size:0x8 scope:global
|
||||
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
|
||||
lbl_73_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte
|
||||
l_initHIO = .bss:0x00000008; // type:object size:0x1 data:byte
|
||||
@92050 = .bss:0x0000000C; // type:object size:0xC scope:local
|
||||
l_HIO = .bss:0x00000018; // type:object size:0x2C scope:global data:byte
|
||||
|
|
|
@ -125,5 +125,5 @@ lbl_70_data_2F8 = .data:0x000002F8; // type:object size:0x24
|
|||
@117848 = .data:0x000004E0; // type:object size:0xC scope:local
|
||||
@117849 = .data:0x00000504; // type:object size:0x11 scope:local data:string
|
||||
@117850 = .data:0x0000052C; // type:object size:0xD scope:local data:string
|
||||
lbl_70_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte
|
||||
l_initHIO = .bss:0x00000000; // type:object size:0x1 data:byte
|
||||
l_HIO = .bss:0x00000004; // type:object size:0x2C scope:global data:byte
|
||||
|
|
|
@ -1499,7 +1499,7 @@ config.libs = [
|
|||
ActorRel(NonMatching, "d_a_obj_ito"),
|
||||
ActorRel(NonMatching, "d_a_obj_movebox"),
|
||||
ActorRel(NonMatching, "d_a_obj_swpush"),
|
||||
ActorRel(NonMatching, "d_a_obj_timer"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_timer"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_path_line"),
|
||||
ActorRel(NonMatching, "d_a_scene_exit"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_set_bgobj"),
|
||||
|
@ -1921,7 +1921,7 @@ config.libs = [
|
|||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_enemy_create"),
|
||||
ActorRel(NonMatching, "d_a_obj_fallobj"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_fan"),
|
||||
ActorRel(NonMatching, "d_a_obj_fchain"),
|
||||
ActorRel(Equivalent, "d_a_obj_fchain"), # weak func order
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_fireWood"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_fireWood2"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_firepillar"),
|
||||
|
@ -2229,7 +2229,7 @@ config.libs = [
|
|||
ActorRel(MatchingFor("GZ2E01"), "d_a_tag_wara_howl"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_tag_watchge"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_tag_waterfall"),
|
||||
ActorRel(NonMatching, "d_a_tag_wljump"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_tag_wljump"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_tag_yami", extra_cflags=['-pragma "nosyminline off"']),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_talk"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_tboxSw"),
|
||||
|
|
|
@ -16,12 +16,11 @@
|
|||
* @details
|
||||
*
|
||||
*/
|
||||
class fr_class : public fopAc_ac_c {
|
||||
class fr_class : public fopEn_enemy_c {
|
||||
public:
|
||||
/* 0x568 */ u8 field_0x568[0x5ac - 0x568];
|
||||
/* 0x5AC */ request_of_phase_process_class mPhase;
|
||||
/* 0x5B4 */ u8 field_0x5b4;
|
||||
/* 0x5B5 */ u8 field_0x5b5[0x5c4 - 0x5b5];
|
||||
/* 0x5B5 */ cXyz field_0x5b8;
|
||||
/* 0x5C4 */ mDoExt_McaMorf* mMorf;
|
||||
/* 0x5C8 */ mDoExt_btkAnm* mBtkAnm;
|
||||
/* 0x5CC */ u8 field_0x5cc;
|
||||
|
@ -77,6 +76,7 @@ public:
|
|||
/* 0x20 */ f32 field_0x20;
|
||||
/* 0x24 */ f32 field_0x24;
|
||||
/* 0x28 */ f32 field_0x28;
|
||||
/* 0x2C */ f32 field_0x2c;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class Act_c : public fopAc_ac_c {
|
|||
/* 80485284 */ void mode_wait();
|
||||
/* 804852E0 */ void mode_count_init();
|
||||
/* 80485324 */ void mode_count();
|
||||
/* 804854BC */ int _execute();
|
||||
/* 804854BC */ bool _execute();
|
||||
|
||||
int prm_get_swSave() {
|
||||
return daObj::PrmAbstract(this,PRM_8, PRM_16);
|
||||
|
|
|
@ -4,13 +4,15 @@
|
|||
*/
|
||||
|
||||
#include "d/actor/d_a_fr.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "SSystem/SComponent/c_lib.h"
|
||||
#include "c/c_damagereaction.h"
|
||||
#include "d/actor/d_a_mg_fish.h"
|
||||
#include "d/actor/d_a_obj_lp.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "dol2asm.h"
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
|
||||
/* 805198EC-8051994C 0000EC 0060+00 1/1 0/0 0/0 .text __ct__10daFr_HIO_cFv */
|
||||
daFr_HIO_c::daFr_HIO_c() {
|
||||
|
@ -34,18 +36,20 @@ static void anm_init(fr_class* i_this, int i_index, f32 i_morf, u8 i_mode, f32 i
|
|||
|
||||
/* 805199F4-80519AB8 0001F4 00C4+00 1/0 0/0 0/0 .text daFr_Draw__FP8fr_class */
|
||||
static int daFr_Draw(fr_class* i_this) {
|
||||
fopAc_ac_c* actor = i_this;
|
||||
|
||||
J3DModel* model = i_this->mMorf->getModel();
|
||||
|
||||
g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->tevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(model, &i_this->tevStr);
|
||||
g_env_light.settingTevStruct(0, &actor->current.pos, &actor->tevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(model, &actor->tevStr);
|
||||
|
||||
J3DModelData* modelData = model->getModelData();
|
||||
i_this->mBtkAnm->entry(modelData);
|
||||
i_this->mBtkAnm->entry(model->getModelData());
|
||||
i_this->mMorf->entryDL();
|
||||
|
||||
if (!i_this->field_0x5ec) {
|
||||
dComIfGd_setSimpleShadow(&i_this->current.pos, i_this->mAcch.m_ground_h, i_this->scale.x * 10.0f,
|
||||
i_this->mAcch.m_gnd, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex());
|
||||
dComIfGd_setSimpleShadow(&actor->current.pos, i_this->mAcch.GetGroundH(),
|
||||
(10.0f + TREG_F(8)) * actor->scale.x, i_this->mAcch.m_gnd, 0, 1.0f,
|
||||
dDlst_shadowControl_c::getSimpleTex());
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -53,14 +57,17 @@ static int daFr_Draw(fr_class* i_this) {
|
|||
|
||||
/* 80519AB8-80519B14 0002B8 005C+00 1/1 0/0 0/0 .text sibuki_set__FP8fr_class */
|
||||
static void sibuki_set(fr_class* i_this) {
|
||||
cXyz sp18 = i_this->current.pos;
|
||||
fopAc_ac_c* actor = i_this;
|
||||
|
||||
cXyz sp18 = actor->current.pos;
|
||||
sp18.y = i_this->field_0x5f0;
|
||||
fopKyM_createWpillar(&sp18, i_this->scale.x * 0.3f, 0);
|
||||
fopKyM_createWpillar(&sp18, actor->scale.x * 0.3f, 0);
|
||||
}
|
||||
|
||||
/* 80519B14-80519B60 000314 004C+00 1/1 0/0 0/0 .text s_wd_sub__FPvPv */
|
||||
static void* s_wd_sub(void* param_1, void* param_2) {
|
||||
if (fopAc_IsActor(param_1) && fopAcM_GetName(param_1) == PROC_OBJ_LP) {
|
||||
(void)param_2;
|
||||
if (fopAcM_IsActor(param_1) && fopAcM_GetName(param_1) == PROC_OBJ_LP) {
|
||||
return param_1;
|
||||
}
|
||||
|
||||
|
@ -69,12 +76,15 @@ static void* s_wd_sub(void* param_1, void* param_2) {
|
|||
|
||||
/* 80519B60-80519D28 000360 01C8+00 1/1 0/0 0/0 .text wd_check__FP8fr_class */
|
||||
static wd_ss* wd_check(fr_class* i_this) {
|
||||
fopAc_ac_c* actor = i_this;
|
||||
|
||||
obj_lp_class* mLilyPad = (obj_lp_class*)fpcM_Search(s_wd_sub, i_this);
|
||||
if (mLilyPad) {
|
||||
wd_ss* mWdSs = mLilyPad->mWdSs;
|
||||
cXyz unkXyz1;
|
||||
for (int i = 0; i < mLilyPad->field_0xad98; i++, mWdSs++) {
|
||||
cXyz sp48 = mWdSs->field_0x10 - i_this->current.pos;
|
||||
if (sp48.abs() < mWdSs->field_0x3c * 22.0f) {
|
||||
unkXyz1 = mWdSs->field_0x10 - actor->current.pos;
|
||||
if (unkXyz1.abs() < mWdSs->field_0x3c * (22.0f + KREG_F(11))) {
|
||||
return mWdSs;
|
||||
}
|
||||
}
|
||||
|
@ -84,34 +94,35 @@ static wd_ss* wd_check(fr_class* i_this) {
|
|||
}
|
||||
|
||||
/* 80519D28-80519E24 000528 00FC+00 4/4 0/0 0/0 .text way_bg_check__FP8fr_class */
|
||||
static bool way_bg_check(fr_class* i_this) {
|
||||
static BOOL way_bg_check(fr_class* i_this) {
|
||||
// NONMATCHING
|
||||
cXyz sp24;
|
||||
cXyz sp18;
|
||||
cXyz sp0c;
|
||||
|
||||
cXyz sp90 = i_this->current.pos;
|
||||
sp90.y += 20.0f;
|
||||
sp24 = i_this->current.pos;
|
||||
sp24.y += 20.0f;
|
||||
|
||||
cMtx_YrotS(*calc_mtx, i_this->shape_angle.y);
|
||||
|
||||
cXyz sp9c;
|
||||
cXyz spa8(0.0f, 0.0f, 50.0f);
|
||||
MtxPosition(&spa8, &sp9c);
|
||||
sp9c += sp90;
|
||||
sp0c.x = 0.0f;
|
||||
sp0c.y = 0.0f;
|
||||
sp0c.z = 50.0f;
|
||||
MtxPosition(&sp0c, &sp18);
|
||||
sp18 += sp24;
|
||||
|
||||
dBgS_LinChk dStack_84;
|
||||
dStack_84.Set(&sp90, &sp90, i_this);
|
||||
dStack_84.Set(&sp24, &sp18, i_this);
|
||||
|
||||
if (dComIfG_Bgsp().LineCross(&dStack_84)) {
|
||||
return true;
|
||||
return TRUE;
|
||||
} else {
|
||||
return false;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* 8051BC10-8051BC14 000008 0004+00 2/2 0/0 0/0 .bss None */
|
||||
static u8 data_8051BC10[4];
|
||||
|
||||
/* 8051BC14-8051BC20 00000C 000C+00 1/1 0/0 0/0 .bss @3644 */
|
||||
static u8 lit_3644[12];
|
||||
static bool l_initHIO;
|
||||
|
||||
/* 8051BC20-8051BC4C 000018 002C+00 9/9 0/0 0/0 .bss l_HIO */
|
||||
static daFr_HIO_c l_HIO;
|
||||
|
@ -119,16 +130,20 @@ static daFr_HIO_c l_HIO;
|
|||
/* 80519E24-8051A0D8 000624 02B4+00 1/2 0/0 0/0 .text fr_normal__FP8fr_class */
|
||||
static void fr_normal(fr_class* i_this) {
|
||||
// NONMATCHING
|
||||
switch (i_this->field_0x5d2) {
|
||||
fopAc_ac_c* actor = i_this;
|
||||
fopAc_ac_c* player = dComIfGp_getPlayer(0);
|
||||
|
||||
cXyz sp18;
|
||||
cXyz sp0c;
|
||||
switch (i_this->field_0x5d4) {
|
||||
case 0:
|
||||
i_this->field_0x5d4 = 1;
|
||||
i_this->field_0x5d4 += (s16)1;
|
||||
anm_init(i_this, 11, 5.0f, 2, cM_rndF(0.3f) + 0.8f);
|
||||
i_this->field_0x5dc[0] = cM_rndF(50.0f) + 20.0f;
|
||||
i_this->speedF = 0.0f;
|
||||
break;
|
||||
case 1:
|
||||
if (!i_this->field_0x5dc[0]) {
|
||||
if (i_this->mMorf->getFrame() == 14) {
|
||||
if ((int)i_this->mMorf->getFrame() == 14) {
|
||||
i_this->field_0x5d4++;
|
||||
anm_init(i_this, 7, 5.0f, 0, 2.0f);
|
||||
}
|
||||
|
@ -141,13 +156,12 @@ static void fr_normal(fr_class* i_this) {
|
|||
i_this->speed.y = l_HIO.field_0xc + cM_rndFX(l_HIO.field_0xc * 0.5f);
|
||||
|
||||
if (way_bg_check(i_this)) {
|
||||
i_this->field_0x5e8 = l_HIO.field_0x14;
|
||||
i_this->current.angle.y += 0x8000;
|
||||
} else {
|
||||
i_this->current.angle.y += -0x8000;
|
||||
cLib_addCalcAngleS2(&i_this->current.angle.y,
|
||||
cM_atan2s((i_this->home.pos.x + cM_rndFX(i_this->field_0x5e8)) - i_this->current.pos.x,
|
||||
(i_this->home.pos.z + cM_rndFX(i_this->field_0x5e8) - i_this->current.pos.z)),
|
||||
1, 0x2000);
|
||||
i_this->field_0x5e8 = l_HIO.field_0x14;
|
||||
f32 x = i_this->home.pos.x + cM_rndFX(i_this->field_0x5e8) - i_this->current.pos.x;
|
||||
f32 z = i_this->home.pos.z + cM_rndFX(i_this->field_0x5e8) - i_this->current.pos.z;
|
||||
cLib_addCalcAngleS2(&i_this->current.angle.y, cM_atan2s(x, z), 1, 0x2000 + TREG_S(2));
|
||||
}
|
||||
|
||||
i_this->field_0x5d4++;
|
||||
|
@ -169,10 +183,14 @@ static void fr_normal(fr_class* i_this) {
|
|||
|
||||
/* 8051A0D8-8051A318 0008D8 0240+00 1/2 0/0 0/0 .text fr_away__FP8fr_class */
|
||||
static void fr_away(fr_class* i_this) {
|
||||
// NONMATCHING
|
||||
fopAc_ac_c* actor = i_this;
|
||||
fopAc_ac_c* player = dComIfGp_getPlayer(0);
|
||||
|
||||
cXyz sp14;
|
||||
cXyz sp08;
|
||||
switch (i_this->field_0x5d4) {
|
||||
case 0:
|
||||
i_this->field_0x5d4 = 1;
|
||||
i_this->field_0x5d4 += (s16)1;
|
||||
i_this->speedF = 0.0f;
|
||||
anm_init(i_this, 7, 3.0f, 0, 4.0f);
|
||||
break;
|
||||
|
@ -183,11 +201,11 @@ static void fr_away(fr_class* i_this) {
|
|||
i_this->speed.y = l_HIO.field_0x20 + cM_rndFX(l_HIO.field_0x20 * 0.5f);
|
||||
|
||||
if (way_bg_check(i_this)) {
|
||||
i_this->current.angle.y += -0x8000;
|
||||
i_this->current.angle.y += 0x8000;
|
||||
} else {
|
||||
cLib_addCalcAngleS2(&i_this->current.angle.y,
|
||||
fopAcM_searchPlayerAngleY(i_this) + cM_rndFX(8000.0f) + -0x8000, 1,
|
||||
0x2000);
|
||||
fopAcM_searchPlayerAngleY(i_this) + 0x8000 + (s16)cM_rndFX(8000.0f), 1,
|
||||
0x2000 + TREG_S(2));
|
||||
}
|
||||
|
||||
i_this->field_0x5d4++;
|
||||
|
@ -203,7 +221,7 @@ static void fr_away(fr_class* i_this) {
|
|||
case 3:
|
||||
if (i_this->mMorf->isStop()) {
|
||||
i_this->field_0x5d4 = 0;
|
||||
if ((l_HIO.field_0x18 + 200.0f) < i_this->field_0x5d8) {
|
||||
if (i_this->field_0x5d8 > (l_HIO.field_0x18 + 200.0f)) {
|
||||
i_this->field_0x5d2 = 0;
|
||||
}
|
||||
}
|
||||
|
@ -212,40 +230,42 @@ static void fr_away(fr_class* i_this) {
|
|||
|
||||
/* 8051A318-8051A558 000B18 0240+00 1/1 0/0 0/0 .text fr_s_normal__FP8fr_class */
|
||||
static void fr_s_normal(fr_class* i_this) {
|
||||
// NONMATCHING
|
||||
fopAc_ac_c* actor = i_this;
|
||||
fopAc_ac_c* player = dComIfGp_getPlayer(0);
|
||||
|
||||
cXyz sp18;
|
||||
cXyz sp0c;
|
||||
switch (i_this->field_0x5d4) {
|
||||
case 0:
|
||||
i_this->field_0x5d4++;
|
||||
anm_init(i_this, 10, 5.0f, 2, cM_rndF(0.3f) + 1.5f);
|
||||
i_this->field_0x5cc = 0;
|
||||
i_this->field_0x5dc[0] = cM_rndF(100.0f) + 50.0f;
|
||||
if (l_HIO.field_0x24 < i_this->speedF) {
|
||||
if (i_this->speedF > l_HIO.field_0x24) {
|
||||
i_this->speedF = l_HIO.field_0x24;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (i_this->mMorf->getFrame() > 9) {
|
||||
if (i_this->mMorf->getFrame() < 0x1a) {
|
||||
if ((int)i_this->mMorf->getFrame() >= 10) {
|
||||
if ((int)i_this->mMorf->getFrame() <= 25) {
|
||||
cLib_addCalc2(&i_this->speedF, l_HIO.field_0x24, 1.0f, l_HIO.field_0x24 * 0.2f);
|
||||
if (i_this->mMorf->getFrame() > 9) {
|
||||
if (i_this->mMorf->getFrame() < 16 && i_this->field_0x5cc == 0) {
|
||||
if ((int)i_this->mMorf->getFrame() >= 10) {
|
||||
if ((int)i_this->mMorf->getFrame() <= 15 && (s8)i_this->field_0x5cc == 0) {
|
||||
if (way_bg_check(i_this)) {
|
||||
i_this->current.angle.y += -0x8000;
|
||||
i_this->current.angle.y += 0x8000;
|
||||
} else {
|
||||
i_this->field_0x5e8 = l_HIO.field_0x14;
|
||||
|
||||
cXyz sp28;
|
||||
sp28.x = i_this->home.pos.x + cM_rndFX(i_this->field_0x5e8) - i_this->current.pos.x;
|
||||
sp28.z = i_this->home.pos.z + cM_rndFX(i_this->field_0x5e8) - i_this->current.pos.z;
|
||||
s16 sVar2 = cM_atan2s(sp28.x, sp28.z);
|
||||
cLib_addCalcAngleS2(&i_this->current.angle.y, sVar2, 1, 0x2000);
|
||||
sp0c.x = i_this->home.pos.x + cM_rndFX(i_this->field_0x5e8) - i_this->current.pos.x;
|
||||
sp0c.z = i_this->home.pos.z + cM_rndFX(i_this->field_0x5e8) - i_this->current.pos.z;
|
||||
cLib_addCalcAngleS2(&i_this->current.angle.y, cM_atan2s(sp0c.x, sp0c.z), 1, 0x2000 + TREG_S(2));
|
||||
}
|
||||
|
||||
i_this->field_0x5cc = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (i_this->mMorf->getFrame() < 20) {
|
||||
if ((int)i_this->mMorf->getFrame() < 20) {
|
||||
return;
|
||||
}
|
||||
i_this->field_0x5cc = 0;
|
||||
|
@ -263,7 +283,11 @@ static void fr_s_normal(fr_class* i_this) {
|
|||
|
||||
/* 8051A558-8051A620 000D58 00C8+00 1/1 0/0 0/0 .text fr_s_wait__FP8fr_class */
|
||||
static void fr_s_wait(fr_class* i_this) {
|
||||
// NONMATCHING
|
||||
fopAc_ac_c* actor = i_this;
|
||||
fopAc_ac_c* player = dComIfGp_getPlayer(0);
|
||||
|
||||
cXyz sp14;
|
||||
cXyz sp08;
|
||||
switch (i_this->field_0x5d4) {
|
||||
case 0:
|
||||
i_this->field_0x5d4++;
|
||||
|
@ -283,6 +307,11 @@ static void fr_s_wait(fr_class* i_this) {
|
|||
/* 8051A620-8051A820 000E20 0200+00 1/1 0/0 0/0 .text fr_s_away__FP8fr_class */
|
||||
static void fr_s_away(fr_class* i_this) {
|
||||
// NONMATCHING
|
||||
fopAc_ac_c* actor = i_this;
|
||||
fopAc_ac_c* player = dComIfGp_getPlayer(0);
|
||||
|
||||
cXyz sp14;
|
||||
cXyz sp08;
|
||||
switch (i_this->field_0x5d4) {
|
||||
case 0:
|
||||
i_this->field_0x5d4++;
|
||||
|
@ -290,20 +319,20 @@ static void fr_s_away(fr_class* i_this) {
|
|||
i_this->field_0x5cc = 0;
|
||||
break;
|
||||
case 1:
|
||||
if (i_this->mMorf->getFrame() > 9) {
|
||||
if (i_this->mMorf->getFrame() > 0x1a) {
|
||||
if ((int)i_this->mMorf->getFrame() >= 10) {
|
||||
if ((int)i_this->mMorf->getFrame() >= 25) {
|
||||
cLib_addCalc2(&i_this->speedF, l_HIO.field_0x28, 1.0f, l_HIO.field_0x28 * 0.2f);
|
||||
if (i_this->mMorf->getFrame() > 9) {
|
||||
if (i_this->mMorf->getFrame() < 16 && i_this->field_0x5cc == 0) {
|
||||
if ((int)i_this->mMorf->getFrame() >= 10) {
|
||||
if ((int)i_this->mMorf->getFrame() <= 15 && (s8)i_this->field_0x5cc == 0) {
|
||||
if (way_bg_check(i_this)) {
|
||||
i_this->current.angle.y += -0x8000;
|
||||
i_this->current.angle.y += 0x8000;
|
||||
} else {
|
||||
cLib_addCalcAngleS2(&i_this->current.angle.y,
|
||||
(fopAcM_searchPlayerAngleY(i_this) + cM_rndFX(8000.0f)) + -0x8000,
|
||||
1, 0x2000);
|
||||
(s16)(fopAcM_searchPlayerAngleY(i_this) + (s16)cM_rndFX(8000.0f)) + 0x8000,
|
||||
1, 0x2000 + TREG_S(2));
|
||||
}
|
||||
|
||||
if (l_HIO.field_0x18 + 200.0f < i_this->field_0x5d8) {
|
||||
if (i_this->field_0x5d8 > l_HIO.field_0x18 + 200.0f) {
|
||||
i_this->field_0x5d2 = 20;
|
||||
i_this->field_0x5d4 = 0;
|
||||
}
|
||||
|
@ -312,7 +341,7 @@ static void fr_s_away(fr_class* i_this) {
|
|||
}
|
||||
}
|
||||
|
||||
if (i_this->mMorf->getFrame() < 20) {
|
||||
if ((int)i_this->mMorf->getFrame() < 20) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -327,29 +356,34 @@ static void fr_s_away(fr_class* i_this) {
|
|||
|
||||
/* 8051A820-8051A904 001020 00E4+00 1/1 0/0 0/0 .text fr_eat__FP8fr_class */
|
||||
static void fr_eat(fr_class* i_this) {
|
||||
// NONMATCHING
|
||||
fopAc_ac_c* this_actor = i_this;
|
||||
fopAc_ac_c* player = dComIfGp_getPlayer(0);
|
||||
|
||||
cXyz sp14;
|
||||
cXyz sp08;
|
||||
fopAc_ac_c* actor = fopAcM_SearchByID(i_this->field_0x5f8);
|
||||
if (!actor) {
|
||||
fopAcM_delete(i_this);
|
||||
} else {
|
||||
switch (i_this->field_0x5d4) {
|
||||
case 0:
|
||||
i_this->field_0x5d4++;
|
||||
anm_init(i_this, 10, 20.0f, 2, 0.0f);
|
||||
i_this->field_0x5dc[0] = 20;
|
||||
case 1:
|
||||
i_this->mMorf->setFrame(0.0f);
|
||||
case 0:
|
||||
i_this->field_0x5d4++;
|
||||
anm_init(i_this, 10, 20.0f, 2, 0.0f);
|
||||
i_this->field_0x5dc[0] = 20;
|
||||
case 1:
|
||||
i_this->mMorf->setFrame(0.0f);
|
||||
// not sure if this cast is right
|
||||
i_this->current.pos = ((mg_fish_class*)actor)->field_0x638;
|
||||
|
||||
if (i_this->field_0x5dc[0] == 0) {
|
||||
fopAcM_delete(i_this);
|
||||
}
|
||||
if (i_this->field_0x5dc[0] == 0) {
|
||||
fopAcM_delete(i_this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 8051A904-8051AA9C 001104 0198+00 2/2 0/0 0/0 .text swim_on__FP8fr_class */
|
||||
static void swim_on(fr_class* i_this) {
|
||||
// NONMATCHING
|
||||
if (i_this->field_0x5ec == 0) {
|
||||
i_this->field_0x5d2 = 0;
|
||||
i_this->field_0x5d4 = 0;
|
||||
|
@ -358,21 +392,20 @@ static void swim_on(fr_class* i_this) {
|
|||
i_this->gravity = 0.0f;
|
||||
i_this->speed.y = 0.0f;
|
||||
|
||||
f32 fVar3 = 0.5f * cM_ssin(i_this->field_0x5d0 * 0x5dc) - i_this->scale.x * 10.0f * 1.33f;
|
||||
f32 fVar3 = (0.5f + BREG_F(6)) * cM_ssin(i_this->field_0x5d0 * (1500 + BREG_S(5))) - i_this->scale.x * 10.0f * 1.33f;
|
||||
|
||||
s16 sVar2;
|
||||
if (i_this->field_0x5d2 == 0x1e) {
|
||||
sVar2 = -(5000 + 700 * cM_ssin(i_this->field_0x5d0 * 700));
|
||||
fVar3 -= 3.0f * i_this->scale.x * 1.33f;
|
||||
sVar2 = (cM_ssin(i_this->field_0x5d0 * (700 + BREG_S(3))) * (700 + BREG_S(4)) + -(5000 + BREG_S(7)));
|
||||
fVar3 -= (3.0f + BREG_F(4)) * i_this->scale.x * 1.33f;
|
||||
} else {
|
||||
sVar2 = 0;
|
||||
}
|
||||
|
||||
cLib_addCalc2(&i_this->field_0x5f4, fVar3, 0.1f, 1.0f);
|
||||
cLib_addCalcAngleS2(&i_this->shape_angle.x, sVar2, 16, 0x100);
|
||||
fVar3 = cM_ssin(i_this->field_0x5d0 * 600);
|
||||
|
||||
i_this->shape_angle.z = 500 * fVar3;
|
||||
i_this->shape_angle.z = cM_ssin(i_this->field_0x5d0 * (600 + BREG_S(1))) * (500 + BREG_S(2));
|
||||
|
||||
if (((i_this->field_0x994 == -1 || !daPy_py_c::checkNowWolf()) &&
|
||||
i_this->field_0x5d2 != 0x28) && i_this->field_0x5d8 < l_HIO.field_0x18) {
|
||||
|
@ -384,14 +417,15 @@ static void swim_on(fr_class* i_this) {
|
|||
|
||||
/* 8051AA9C-8051AC2C 00129C 0190+00 1/1 0/0 0/0 .text swim_off__FP8fr_class */
|
||||
static void swim_off(fr_class* i_this) {
|
||||
// NONMATCHING
|
||||
fopAc_ac_c* this_actor = i_this;
|
||||
|
||||
cLib_addCalc0(&i_this->field_0x5f4, 0.1f, 1.0f);
|
||||
i_this->shape_angle.z = 0;
|
||||
|
||||
if (i_this->mAcch.ChkGroundHit() || i_this->field_0x5ce != 0) {
|
||||
i_this->shape_angle.x = 0;
|
||||
} else {
|
||||
i_this->shape_angle.x = i_this->speed.y * -500.0f;
|
||||
i_this->shape_angle.x = i_this->speed.y * (-500.0f + TREG_F(9));
|
||||
if (i_this->shape_angle.x > 0x1000) {
|
||||
i_this->shape_angle.x = 0x1000;
|
||||
} else if (i_this->shape_angle.x < -0x2000) {
|
||||
|
@ -414,11 +448,11 @@ static void swim_off(fr_class* i_this) {
|
|||
|
||||
/* 8051AC2C-8051AD04 00142C 00D8+00 1/1 0/0 0/0 .text fr_message__FP8fr_class */
|
||||
static void fr_message(fr_class* i_this) {
|
||||
// NONMATCHING
|
||||
s16 sVar1 = i_this->field_0x5d4;
|
||||
fopAc_ac_c* this_actor = i_this;
|
||||
|
||||
switch (i_this->field_0x5d4) {
|
||||
case 0:
|
||||
anm_init(i_this, 11, 400.0f, 2, cM_rndF(0.3f) + 0.8f);
|
||||
anm_init(i_this, 11, 5.0f, 2, cM_rndF(0.3f) + 0.8f);
|
||||
i_this->field_0x5d4++;
|
||||
case 1:
|
||||
default:
|
||||
|
@ -435,40 +469,46 @@ static void fr_message(fr_class* i_this) {
|
|||
/* 8051AD04-8051B04C 001504 0348+00 2/1 0/0 0/0 .text action__FP8fr_class */
|
||||
static void action(fr_class* i_this) {
|
||||
// NONMATCHING
|
||||
fopAc_ac_c* this_actor = i_this;
|
||||
|
||||
cXyz sp30;
|
||||
cXyz sp24;
|
||||
|
||||
char cVar4 = 0;
|
||||
i_this->gravity = l_HIO.field_0x10;
|
||||
i_this->field_0x991 = 0;
|
||||
switch (i_this->field_0x5d2) {
|
||||
case 0:
|
||||
fr_normal(i_this);
|
||||
i_this->field_0x991 = 1;
|
||||
break;
|
||||
case 5:
|
||||
fr_away(i_this);
|
||||
i_this->field_0x991 = 1;
|
||||
break;
|
||||
case 10:
|
||||
fr_message(i_this);
|
||||
i_this->field_0x991 = 2;
|
||||
break;
|
||||
case 15:
|
||||
cVar4 = -1;
|
||||
break;
|
||||
case 20:
|
||||
fr_s_normal(i_this);
|
||||
cVar4 = 1;
|
||||
break;
|
||||
case 30:
|
||||
fr_s_wait(i_this);
|
||||
cVar4 = 1;
|
||||
break;
|
||||
case 40:
|
||||
fr_s_away(i_this);
|
||||
cVar4 = 1;
|
||||
break;
|
||||
case 50:
|
||||
fr_eat(i_this);
|
||||
cVar4 = -2;
|
||||
case 0:
|
||||
fr_normal(i_this);
|
||||
i_this->field_0x991 = 1;
|
||||
break;
|
||||
case 5:
|
||||
fr_away(i_this);
|
||||
i_this->field_0x991 = 1;
|
||||
break;
|
||||
case 10:
|
||||
fr_message(i_this);
|
||||
i_this->field_0x991 = 2;
|
||||
break;
|
||||
case 20:
|
||||
fr_s_normal(i_this);
|
||||
cVar4 = 1;
|
||||
break;
|
||||
case 30:
|
||||
fr_s_wait(i_this);
|
||||
cVar4 = 1;
|
||||
break;
|
||||
case 40:
|
||||
fr_s_away(i_this);
|
||||
cVar4 = 1;
|
||||
break;
|
||||
case 50:
|
||||
fr_eat(i_this);
|
||||
cVar4 = -2;
|
||||
break;
|
||||
case 15:
|
||||
cVar4 = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (((i_this->field_0x991 == 1 && i_this->field_0x994 != -1) && daPy_py_c::checkNowWolf()) && i_this->field_0x5d8 < 300.0f) {
|
||||
|
@ -479,11 +519,12 @@ static void action(fr_class* i_this) {
|
|||
if (cVar4 != -2) {
|
||||
cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->current.angle.y, 2, 0x4000);
|
||||
cMtx_YrotS(*calc_mtx, i_this->current.angle.y);
|
||||
cXyz sp90;
|
||||
cXyz sp84(0.0f, 0.0f, i_this->speedF);
|
||||
MtxPosition(&sp84, &sp90);
|
||||
i_this->speed.x = sp90.x;
|
||||
i_this->speed.z = sp90.z;
|
||||
sp24.x = 0.0f;
|
||||
sp24.y = 0.0f;
|
||||
sp24.z = i_this->speedF;
|
||||
MtxPosition(&sp24, &sp30);
|
||||
i_this->speed.x = sp30.x;
|
||||
i_this->speed.z = sp30.z;
|
||||
i_this->speed.y += i_this->gravity;
|
||||
|
||||
i_this->current.pos += (i_this->speed * i_this->scale.x) * 1.33f;
|
||||
|
@ -492,8 +533,8 @@ static void action(fr_class* i_this) {
|
|||
i_this->speed.y = -80.0f;
|
||||
}
|
||||
|
||||
sp84 = i_this->current.pos;
|
||||
sp84.y += 200.0f;
|
||||
sp24 = i_this->current.pos;
|
||||
sp24.y += 200.0f;
|
||||
f32 fVar6 = i_this->mAcch.GetGroundH();
|
||||
dBgS_ObjGndChk_Spl(cStack_78);
|
||||
i_this->field_0x5ec = 0;
|
||||
|
@ -502,12 +543,11 @@ static void action(fr_class* i_this) {
|
|||
if (wd_check(i_this)) {
|
||||
bVar2 = true;
|
||||
} else {
|
||||
cStack_78.SetPos(&sp84);
|
||||
f32 fVar5 = dComIfG_Bgsp().GroundCross(&cStack_78);
|
||||
i_this->field_0x5f0 = fVar5;
|
||||
cStack_78.SetPos(&sp24);
|
||||
i_this->field_0x5f0 = dComIfG_Bgsp().GroundCross(&cStack_78);
|
||||
|
||||
if (fVar6 < fVar5 && i_this->current.pos.y <= fVar5) {
|
||||
i_this->current.pos.y = i_this->field_0x5f0;
|
||||
if (fVar6 < i_this->field_0x5f0 && i_this->current.pos.y <= i_this->field_0x5f0 + YREG_F(0)) {
|
||||
i_this->current.pos.y = i_this->field_0x5f0 + YREG_F(0);
|
||||
i_this->field_0x5ec = 1;
|
||||
}
|
||||
}
|
||||
|
@ -521,8 +561,8 @@ static void action(fr_class* i_this) {
|
|||
|
||||
i_this->mAcch.CrrPos(dComIfG_Bgsp());
|
||||
i_this->field_0x5ce = 0;
|
||||
if ((bVar2 && i_this->speed.y <= 0.0f) && i_this->current.pos.y <= i_this->field_0x5f0 + i_this->scale.x * 5.0f) {
|
||||
i_this->current.pos.y = i_this->field_0x5f0 + i_this->scale.x * 5.0f;
|
||||
if ((bVar2 && i_this->speed.y <= 0.0f) && i_this->current.pos.y <= i_this->field_0x5f0 + i_this->scale.x * (5.0f + YREG_F(11))) {
|
||||
i_this->current.pos.y = i_this->field_0x5f0 + i_this->scale.x * (5.0f + YREG_F(11));
|
||||
i_this->speed.y = 0.0f;
|
||||
i_this->field_0x5ce = 1;
|
||||
}
|
||||
|
@ -531,7 +571,6 @@ static void action(fr_class* i_this) {
|
|||
|
||||
/* 8051B04C-8051B170 00184C 0124+00 1/1 0/0 0/0 .text message__FP8fr_class */
|
||||
static int message(fr_class* i_this) {
|
||||
// NONMATCHING
|
||||
if (i_this->field_0x992) {
|
||||
i_this->field_0x5e4 = 10;
|
||||
if (i_this->mMsgFlow.doFlow(i_this, NULL, 0)) {
|
||||
|
@ -553,20 +592,23 @@ static int message(fr_class* i_this) {
|
|||
i_this->eventInfo.onCondition(1);
|
||||
} else {
|
||||
fopAcM_OffStatus(i_this, 0);
|
||||
cLib_offBit<u32>(i_this->attention_info.flags, 1);
|
||||
#if DEBUG
|
||||
cLib_offBit<u32>(i_this->attention_info.flags, 0x42);
|
||||
#else
|
||||
cLib_offBit<u32>(i_this->attention_info.flags, 0xa);
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
/* 8051B170-8051B354 001970 01E4+00 2/1 0/0 0/0 .text daFr_Execute__FP8fr_class */
|
||||
static int daFr_Execute(fr_class* i_this) {
|
||||
// NONMATCHING
|
||||
if (cDmrNowMidnaTalk()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
cXyz sp18(0.0f, 0.0f, 0.0f);
|
||||
i_this->field_0x5d8 = fopAcM_searchPlayerDistance(i_this);
|
||||
i_this->field_0x5d0++;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
@ -582,8 +624,8 @@ static int daFr_Execute(fr_class* i_this) {
|
|||
action(i_this);
|
||||
|
||||
mDoMtx_stack_c::transS(i_this->current.pos.x, i_this->current.pos.y + i_this->field_0x5f4, i_this->current.pos.z);
|
||||
mDoMtx_stack_c::YrotM(i_this->shape_angle.y);
|
||||
mDoMtx_stack_c::XrotM(i_this->shape_angle.x);
|
||||
mDoMtx_stack_c::YrotM((s16)i_this->shape_angle.y);
|
||||
mDoMtx_stack_c::XrotM((s16)i_this->shape_angle.x);
|
||||
mDoMtx_stack_c::ZrotM(i_this->shape_angle.z);
|
||||
mDoMtx_stack_c::scaleM(i_this->scale.x, i_this->scale.x, i_this->scale.x);
|
||||
|
||||
|
@ -609,11 +651,15 @@ static int daFr_IsDelete(fr_class* i_this) {
|
|||
|
||||
/* 8051B35C-8051B3B0 001B5C 0054+00 1/0 0/0 0/0 .text daFr_Delete__FP8fr_class */
|
||||
static int daFr_Delete(fr_class* i_this) {
|
||||
fpc_ProcID id = fopAcM_GetID(i_this);
|
||||
|
||||
dComIfG_resDelete(&i_this->mPhase, "Fr");
|
||||
if (i_this->field_0x9e4) {
|
||||
data_8051BC10[0] = 0;
|
||||
l_initHIO = false;
|
||||
}
|
||||
|
||||
mDoHIO_DELETE_CHILD(l_HIO.field_0x4);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -666,9 +712,9 @@ static int daFr_Create(fopAc_ac_c* a_this) {
|
|||
|
||||
OS_REPORT("//////////////FR SET 2 !!\n");
|
||||
|
||||
if (data_8051BC10[0] == 0) {
|
||||
if (!l_initHIO) {
|
||||
i_this->field_0x9e4 = 1;
|
||||
data_8051BC10[0] = 1;
|
||||
l_initHIO = true;
|
||||
l_HIO.field_0x4 = -1;
|
||||
}
|
||||
|
||||
|
@ -698,21 +744,6 @@ static int daFr_Create(fopAc_ac_c* a_this) {
|
|||
return phase_state;
|
||||
}
|
||||
|
||||
// /* 8051B920-8051B968 002120 0048+00 2/1 0/0 0/0 .text __dt__10daFr_HIO_cFv */
|
||||
// daFr_HIO_c::~daFr_HIO_c() {
|
||||
// // NONMATCHING
|
||||
// }
|
||||
|
||||
/* 8051B968-8051B9A4 002168 003C+00 0/0 1/0 0/0 .text __sinit_d_a_fr_cpp */
|
||||
void __sinit_d_a_fr_cpp() {
|
||||
// NONMATCHING
|
||||
}
|
||||
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
REGISTER_CTORS(0x8051B968, __sinit_d_a_fr_cpp);
|
||||
#pragma pop
|
||||
|
||||
/* 8051BB60-8051BB80 -00001 0020+00 1/0 0/0 0/0 .data l_daFr_Method */
|
||||
static actor_method_class l_daFr_Method = {
|
||||
(process_method_func)daFr_Create,
|
||||
|
|
|
@ -140,123 +140,114 @@ int daObjFchain_c::execute() {
|
|||
} else {
|
||||
field_0x588 = 0;
|
||||
}
|
||||
cXyz* local_148 = ¤t.pos;
|
||||
cXyz local_54;
|
||||
cXyz cStack_60;
|
||||
cXyz* sp_38 = ¤t.pos;
|
||||
cXyz sp_12c;
|
||||
cXyz sp_120;
|
||||
if (field_0x586 != 0) {
|
||||
field_0x586--;
|
||||
}
|
||||
cXyz* pcVar12 = field_0x694;
|
||||
cXyz* local_150 = field_0x79c;
|
||||
int i;
|
||||
cXyz* var_r28 = field_0x694;
|
||||
cXyz* sp_30 = field_0x79c;
|
||||
u32 isWolf = daPy_py_c::checkNowWolf();
|
||||
daPy_py_c* player = daPy_getLinkPlayerActorClass();
|
||||
for (int i = 0; i < 22; i++) {
|
||||
local_54 = (*pcVar12 - *local_148) + *local_150;
|
||||
local_54.y += -1.5f;
|
||||
for (i = 0; i < 22; i++, var_r28++, sp_30++) {
|
||||
sp_12c = (*var_r28 - *sp_38) + *sp_30;
|
||||
sp_12c.y += -1.5f;
|
||||
if (dComIfGs_isEventBit(0x510)) {
|
||||
if (isWolf) {
|
||||
checkPlayerFoot(pcVar12, player->getLeftHandPosP(), &local_54);
|
||||
checkPlayerFoot(pcVar12, player->getRightHandPosP(), &local_54);
|
||||
checkPlayerFoot(var_r28, player->getLeftHandPosP(), &sp_12c);
|
||||
checkPlayerFoot(var_r28, player->getRightHandPosP(), &sp_12c);
|
||||
}
|
||||
checkPlayerFoot(pcVar12, player->getLeftFootPosP(), &local_54);
|
||||
checkPlayerFoot(pcVar12, player->getRightFootPosP(), &local_54);
|
||||
checkPlayerFoot(var_r28, player->getLeftFootPosP(), &sp_12c);
|
||||
checkPlayerFoot(var_r28, player->getRightFootPosP(), &sp_12c);
|
||||
}
|
||||
cStack_60 = local_54;
|
||||
local_54.normalizeZP();
|
||||
*pcVar12 = *local_148 + (local_54 * 9.0f);
|
||||
if (pcVar12->y < current.pos.y) {
|
||||
setGroundVec(&cStack_60, current.pos.y - pcVar12->y);
|
||||
*pcVar12 = *local_148 + (cStack_60 * 9.0f);
|
||||
sp_120 = sp_12c;
|
||||
sp_12c.normalizeZP();
|
||||
*var_r28 = *sp_38 + (sp_12c * 9.0f);
|
||||
if (var_r28->y < current.pos.y) {
|
||||
setGroundVec(&sp_120, current.pos.y - var_r28->y);
|
||||
*var_r28 = *sp_38 + (sp_120 * 9.0f);
|
||||
}
|
||||
local_150++;
|
||||
local_148 = pcVar12;
|
||||
pcVar12++;
|
||||
sp_38 = var_r28;
|
||||
}
|
||||
if (isWolf && !dComIfGs_isEventBit(0x510)) {
|
||||
mDoMtx_multVec(
|
||||
player->getModelJointMtx(17), &wolfChainBaseOffset,
|
||||
&field_0x694[21]);
|
||||
cXyz diff = (field_0x694[21] - current.pos);
|
||||
f32 dVar13 = diff.abs();
|
||||
sp_12c = (field_0x694[21] - current.pos);
|
||||
f32 dVar13 = sp_12c.abs();
|
||||
if (dVar13 > 198.0f) {
|
||||
s16 sVar10 = cM_atan2s(-local_54.x, -local_54.z);
|
||||
player->setOutPower(dVar13 - 198.0f, sVar10, 0);
|
||||
player->setOutPower(dVar13 - 198.0f, cM_atan2s(-sp_12c.x, -sp_12c.z), 0);
|
||||
player->onWolfFchainPull();
|
||||
cXyz* pcVar8 = field_0x694;
|
||||
local_148 = ¤t.pos;
|
||||
local_54 *= 9.0f / dVar13;
|
||||
for (int i = 0; pcVar12 = pcVar8, i < 22; i++) {
|
||||
*pcVar8 = *local_148 + local_54;
|
||||
local_148 = pcVar8;
|
||||
pcVar8++;
|
||||
var_r28 = field_0x694;
|
||||
sp_38 = ¤t.pos;
|
||||
sp_12c *= 9.0f / dVar13;
|
||||
for (i = 0; i < 22; i++, var_r28++) {
|
||||
*var_r28 = *sp_38 + sp_12c;
|
||||
sp_38 = var_r28;
|
||||
}
|
||||
field_0x584 = 0;
|
||||
} else {
|
||||
cXyz* pcVar8 = &field_0x694[20];
|
||||
local_150 = &field_0x79c[20];
|
||||
local_148 = pcVar8 + 1;
|
||||
for (int i = 20; i >= 0; i--) {
|
||||
local_54 = (*pcVar8 - *local_148) + *local_150;
|
||||
local_54.y += -1.5f;
|
||||
cStack_60 = local_54;
|
||||
local_54.normalizeZP();
|
||||
*pcVar8 = *local_148 + (local_54 * 9.0f);
|
||||
if (pcVar8->y < current.pos.y) {
|
||||
setGroundVec(&cStack_60, current.pos.y - pcVar8->y);
|
||||
*pcVar8 = *local_148 + (cStack_60 * 9.0f);
|
||||
var_r28 = &field_0x694[20];
|
||||
sp_30 = &field_0x79c[20];
|
||||
sp_38 = var_r28 + 1;
|
||||
for (i = 20; i >= 0; i--, var_r28--, sp_30--) {
|
||||
sp_12c = (*var_r28 - *sp_38) + *sp_30;
|
||||
sp_12c.y += -1.5f;
|
||||
sp_120 = sp_12c;
|
||||
sp_12c.normalizeZP();
|
||||
*var_r28 = *sp_38 + (sp_12c * 9.0f);
|
||||
if (var_r28->y < current.pos.y) {
|
||||
setGroundVec(&sp_120, current.pos.y - var_r28->y);
|
||||
*var_r28 = *sp_38 + (sp_120 * 9.0f);
|
||||
}
|
||||
local_150--;
|
||||
local_148 = pcVar8;
|
||||
pcVar8--;
|
||||
sp_38 = var_r28;
|
||||
}
|
||||
}
|
||||
}
|
||||
local_148 = ¤t.pos;
|
||||
local_150 = field_0x694;
|
||||
cXyz* pcVar8 = field_0x79c;
|
||||
csXyz* local_15c = field_0x8a4;
|
||||
cXyz* local_160 = field_0x58c;
|
||||
s16 local_178 = 0;
|
||||
for (int i = 0; i < 22; i++) {
|
||||
*local_150 = (*pcVar8 - *local_160) * 0.3f;
|
||||
*local_160 = *pcVar8;
|
||||
local_54 = *local_148 - *pcVar8;
|
||||
local_15c->x = local_54.atan2sY_XZ();
|
||||
if (!(local_54.absXZ() < 3.5f)) {
|
||||
local_15c->y = local_54.atan2sX_Z();
|
||||
sp_38 = ¤t.pos;
|
||||
var_r28 = field_0x694;
|
||||
sp_30 = field_0x79c;
|
||||
csXyz* sp_24 = field_0x8a4;
|
||||
cXyz* sp_20 = field_0x58c;
|
||||
s16 sp_08 = 0;
|
||||
for (i = 0; i < 22; i++, var_r28++, sp_30++, sp_24++, sp_20++) {
|
||||
*sp_30 = (*var_r28 - *sp_20) * 0.3f;
|
||||
*sp_20 = *var_r28;
|
||||
sp_12c = *sp_38 - *var_r28;
|
||||
sp_24->x = sp_12c.atan2sY_XZ();
|
||||
if (!(sp_12c.absXZ() < 3.5f)) {
|
||||
sp_24->y = sp_12c.atan2sX_Z();
|
||||
}
|
||||
if (local_150->abs2() > 3.0f && field_0x586 == 0) {
|
||||
if (sp_30->abs2() > 3.0f && field_0x586 == 0) {
|
||||
f32 fVar1;
|
||||
if (cM_rnd() < 0.5f) {
|
||||
fVar1 = 1.0f;
|
||||
} else {
|
||||
fVar1 = -1.0f;
|
||||
}
|
||||
local_15c->z = local_178 + 0x4000 +
|
||||
sp_24->z = sp_08 + 0x4000 +
|
||||
(fVar1 * (cM_rndF(4096.0f) + 1536.0f));
|
||||
if (pcVar8->y <= current.pos.y + 2.0f) {
|
||||
if ((local_15c->z >= 0 && local_15c->z < 0x4000) ||
|
||||
(local_15c->z > -0x7fff && local_15c->z < -0x4000))
|
||||
if (var_r28->y <= current.pos.y + 2.0f) {
|
||||
if ((sp_24->z >= 0 && sp_24->z < 0x4000) ||
|
||||
(sp_24->z > -0x7fff && sp_24->z < -0x4000))
|
||||
{
|
||||
local_15c->z = cM_rndFX(2048.0f) + 4096.0f;
|
||||
sp_24->z = cM_rndFX(2048.0f) + 4096.0f;
|
||||
} else {
|
||||
local_15c->z = cM_rndFX(2048.0f) + -4096.0f;
|
||||
sp_24->z = cM_rndFX(2048.0f) + -4096.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
local_178 = local_15c->z;
|
||||
local_150++;
|
||||
local_15c++;
|
||||
local_160++;
|
||||
local_148 = pcVar8;
|
||||
pcVar8++;
|
||||
sp_08 = sp_24->z;
|
||||
sp_38 = var_r28;
|
||||
}
|
||||
if (field_0x584 == 0) {
|
||||
field_0x584 = 1;
|
||||
local_150 = field_0x79c;
|
||||
sp_30 = field_0x79c;
|
||||
for (int i = 0; i < 22; i++) {
|
||||
*local_150 = cXyz::Zero;
|
||||
local_150++;
|
||||
*sp_30 = cXyz::Zero;
|
||||
sp_30++;
|
||||
}
|
||||
field_0x586 = 5;
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ int daObjL6Bm_c::CreateHeap() {
|
|||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, BTK_EF_BIMOBEAM_OFF);
|
||||
pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, BTK_EF_BIMOBEAM_0FF);
|
||||
JUT_ASSERT(660, pbtk != 0);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ void daObjTimer::Act_c::mode_count() {
|
|||
}
|
||||
|
||||
/* 804854BC-804855A4 00039C 00E8+00 1/1 0/0 0/0 .text _execute__Q210daObjTimer5Act_cFv */
|
||||
int daObjTimer::Act_c::_execute() {
|
||||
bool daObjTimer::Act_c::_execute() {
|
||||
static daObjTimer::Act_c::modeProc const mode_proc[2] = {
|
||||
&daObjTimer::Act_c::mode_wait,
|
||||
&daObjTimer::Act_c::mode_count,
|
||||
|
@ -97,10 +97,10 @@ int daObjTimer::Act_c::_execute() {
|
|||
|
||||
if (fopAcM_isSwitch(this, prm_get_sw2Save())) {
|
||||
fopAcM_delete(this);
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
(this->*mode_proc[field_0x568])();
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,8 +136,8 @@ namespace {
|
|||
(process_method_func)Mthd_Create,
|
||||
(process_method_func)Mthd_Delete,
|
||||
(process_method_func)Mthd_Execute,
|
||||
(process_method_func)Mthd_Draw,
|
||||
(process_method_func)Mthd_IsDelete,
|
||||
(process_method_func)Mthd_Draw,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ int daTagWljump_c::execute() {
|
|||
if (!midna->checkShadowModeTalkWait()) {
|
||||
if (shape_angle.x != 0 && (field_0x571 == 0xff || !fopAcM_isSwitch(this, field_0x571))) {
|
||||
if (field_0x56f == 0) {
|
||||
mMsgFlow.init(this, shape_angle.x & 0xFFFF, 0, NULL);
|
||||
mMsgFlow.init(this, (u16)shape_angle.x, 0, NULL);
|
||||
field_0x56f = 1;
|
||||
mDoAud_seStart(Z2SE_NAVI_TALK_START, NULL, 0, 0);
|
||||
} else {
|
||||
|
@ -207,7 +207,11 @@ int daTagWljump_c::execute() {
|
|||
field_0x570 = field_0x568;
|
||||
field_0x568 = -1;
|
||||
} else {
|
||||
#if DEBUG
|
||||
attention_info.flags |= 0x801;
|
||||
#else
|
||||
attention_info.flags |= 0x81;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
field_0x572 = 0;
|
||||
|
|
Loading…
Reference in New Issue