mirror of https://github.com/zeldaret/tp
d_a_horse 100% (#2912)
* Fix missing line numbers for debug * Fix horse inlines and HIO * Match daHorse_c::setEffect * Improve a few debug matches * Match daHorse_c::checkHorseNoMove (half fake) * Update configure.py
This commit is contained in:
parent
4d3f25d34e
commit
7fe9a68a9d
|
|
@ -325,8 +325,10 @@ l_backFootOffset = .bss:0x0000006C; // type:object size:0xC scope:global align:4
|
|||
init$4891 = .bss:0x00000084; // type:object size:0x1 scope:local align:1
|
||||
localEyePos$7278 = .bss:0x00000088; // type:object size:0xC scope:local
|
||||
@7469 = .bss:0x00000094; // type:object size:0xC scope:local
|
||||
init$5140 = .bss:0x000000A0; // type:object size:0x1 scope:local align:1
|
||||
runScale$7468 = .bss:0x000000A4; // type:object size:0xC scope:local
|
||||
@7473 = .bss:0x000000B0; // type:object size:0xC scope:local
|
||||
init$5144 = .bss:0x000000BC; // type:object size:0x1 scope:local align:1
|
||||
landScale$7472 = .bss:0x000000C0; // type:object size:0xC scope:local
|
||||
@7477 = .bss:0x000000CC; // type:object size:0xC scope:local
|
||||
init$5083 = .bss:0x000000D8; // type:object size:0x1 scope:local align:1
|
||||
|
|
|
|||
10
configure.py
10
configure.py
|
|
@ -260,7 +260,7 @@ cflags_base = [
|
|||
]
|
||||
|
||||
if config.version == "ShieldD":
|
||||
cflags_base.extend(["-O0", "-inline off", "-RTTI on", "-str reuse", "-enc SJIS", "-DDEBUG=1", "-DWIDESCREEN_SUPPORT=1", '-pragma "nosyminline on"'])
|
||||
cflags_base.extend(["-O0", "-inline off", "-RTTI on", "-str reuse", "-enc SJIS", "-DDEBUG=1", "-DWIDESCREEN_SUPPORT=1"])
|
||||
elif config.version == "RZDE01_00" or config.version == "RZDE01_02" or config.version == "Shield":
|
||||
cflags_base.extend(["-O4,p", "-inline auto", "-ipa file", "-RTTI on", "-str reuse", "-enc SJIS", "-DWIDESCREEN_SUPPORT=1"])
|
||||
else:
|
||||
|
|
@ -733,7 +733,7 @@ config.libs = [
|
|||
Object(MatchingFor(ALL_GCN), "d/d_bg_w_base.cpp"),
|
||||
Object(MatchingFor(ALL_GCN), "d/d_bg_w_kcol.cpp"),
|
||||
Object(MatchingFor(ALL_GCN), "d/d_bg_w_sv.cpp"),
|
||||
Object(Equivalent, "d/d_cc_d.cpp"), # weak func order
|
||||
Object(Equivalent, "d/d_cc_d.cpp"), # weak func order (cCcD_ShapeAttr::GetCoCP)
|
||||
Object(MatchingFor(ALL_GCN), "d/d_cc_mass_s.cpp"),
|
||||
Object(MatchingFor(ALL_GCN), "d/d_cc_s.cpp"),
|
||||
Object(MatchingFor(ALL_GCN), "d/d_cc_uty.cpp"),
|
||||
|
|
@ -1286,7 +1286,7 @@ config.libs = [
|
|||
[
|
||||
Object(MatchingFor("ShieldD"), "JSystem/JHostIO/JHIComm.cpp"),
|
||||
Object(MatchingFor("ShieldD"), "JSystem/JHostIO/JHICommonMem.cpp"),
|
||||
Object(Equivalent, "JSystem/JHostIO/JORServer.cpp"), # weak func order
|
||||
Object(Equivalent, "JSystem/JHostIO/JORServer.cpp"), # debug weak func order
|
||||
Object(MatchingFor("ShieldD"), "JSystem/JHostIO/JOREntry.cpp", extra_cflags=["-sym off"]), # debug weak func order
|
||||
Object(MatchingFor("ShieldD"), "JSystem/JHostIO/JORFile.cpp", extra_cflags=["-sym off"]),
|
||||
Object(MatchingFor("ShieldD"), "JSystem/JHostIO/JORMessageBox.cpp"),
|
||||
|
|
@ -1941,8 +1941,8 @@ config.libs = [
|
|||
ActorRel(MatchingFor(ALL_GCN), "d_a_e_zs"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_formation_mng"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_guard_mng"),
|
||||
ActorRel(NonMatching, "d_a_horse"),
|
||||
ActorRel(Equivalent, "d_a_hozelda"), # weak func order
|
||||
ActorRel(Equivalent, "d_a_horse"), # weak func order (J3DMtxCalcNoAnm)
|
||||
ActorRel(Equivalent, "d_a_hozelda"), # weak func order (J3DMtxCalcNoAnm)
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_izumi_gate"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_kago"),
|
||||
ActorRel(MatchingFor(ALL_GCN), "d_a_kytag01"),
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ public:
|
|||
/* 0xE8 */ JPAResource* mpRes;
|
||||
/* 0xEC */ JPAEmitterCallBack* mpEmtrCallBack;
|
||||
/* 0xF0 */ JPAParticleCallBack* mpPtclCallBack;
|
||||
/* 0xF4 */ volatile u32 mStatus;
|
||||
/* 0xF4 */ u32 mStatus;
|
||||
/* 0xF8 */ f32 mEmitCount;
|
||||
/* 0xFC */ f32 mScaleOut;
|
||||
/* 0x100 */ u32 mTick;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,13 @@ public:
|
|||
|
||||
class daHoZelda_c;
|
||||
class daHorse_hio_c;
|
||||
class daHorse_hio_c0;
|
||||
|
||||
#if DEBUG
|
||||
#define HORSE_HIO_CLASS daHorse_hio_c
|
||||
#else
|
||||
#define HORSE_HIO_CLASS daHorse_hio_c0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup actors-unsorted
|
||||
|
|
@ -231,11 +238,9 @@ public:
|
|||
~daHorse_c();
|
||||
|
||||
u32 getLashDashStart() const { return checkResetStateFlg0(RFLG0_LASH_DASH_START); }
|
||||
|
||||
|
||||
bool checkNoBombProc() const { return m_procID == PROC_WAIT_e || m_procID == PROC_MOVE_e; }
|
||||
BOOL checkResetStateFlg0(daHorse_RFLG0 flag) const { return m_resetStateFlg0 & flag; }
|
||||
bool checkEndResetStateFlg0(daHorse_ERFLG0 flag) const { return m_endResetStateFlg0 & flag; }
|
||||
BOOL checkNoBombProc() const { return !(m_procID == PROC_WAIT_e || m_procID == PROC_MOVE_e); }
|
||||
u32 checkResetStateFlg0(daHorse_RFLG0 flag) const { return m_resetStateFlg0 & flag; }
|
||||
u32 checkEndResetStateFlg0(daHorse_ERFLG0 flag) const { return m_endResetStateFlg0 & flag; }
|
||||
u32 checkStateFlg0(daHorse_FLG0 flag) const { return m_stateFlg0 & flag; }
|
||||
f32 getNormalMaxSpeedF() { return m_normalMaxSpeedF; }
|
||||
f32 getLashMaxSpeedF() { return m_lashMaxSpeedF; }
|
||||
|
|
@ -267,21 +272,21 @@ public:
|
|||
void setZeldaActor(fopAc_ac_c* i_actor) { m_zeldaActorKeep.setData(i_actor); }
|
||||
|
||||
u32 checkTurnStandCamera() const { return checkResetStateFlg0(RFLG0_TURN_STAND_CAMERA); }
|
||||
BOOL checkTurnStand() const { return checkResetStateFlg0(RFLG0_TURN_STAND); }
|
||||
u32 checkTurnStand() const { return checkResetStateFlg0(RFLG0_TURN_STAND); }
|
||||
u32 checkRodeoMode() const { return checkStateFlg0(FLG0_RODEO_MODE); }
|
||||
bool checkCutTurnCancel() const { return checkEndResetStateFlg0(ERFLG0_CUT_TURN_CANCEL); }
|
||||
bool checkTurnCancelKeep() const { return checkStateFlg0(FLG0_TURN_CANCEL_KEEP); }
|
||||
BOOL checkRodeoLeft() const { return checkStateFlg0(FLG0_RODEO_LEFT); }
|
||||
BOOL checkHorseCallWait() const { return checkStateFlg0(FLG0_NO_DRAW_WAIT); }
|
||||
u32 checkCutTurnCancel() const { return checkEndResetStateFlg0(ERFLG0_CUT_TURN_CANCEL); }
|
||||
u32 checkTurnCancelKeep() const { return checkStateFlg0(FLG0_TURN_CANCEL_KEEP); }
|
||||
u32 checkRodeoLeft() const { return checkStateFlg0(FLG0_RODEO_LEFT); }
|
||||
u32 checkHorseCallWait() const { return checkStateFlg0(FLG0_NO_DRAW_WAIT); }
|
||||
BOOL checkTurn() const { return m_procID == PROC_TURN_e && field_0x1720 == 0; }
|
||||
BOOL checkStop() const { return m_procID == PROC_STOP_e; }
|
||||
BOOL checkJump() const { return m_procID == PROC_JUMP_e; }
|
||||
bool checkWait() const { return m_procID == PROC_WAIT_e; }
|
||||
bool checkLand() const { return m_procID == PROC_LAND_e && field_0x171a == 0; }
|
||||
bool checkGetOff() const { return fabsf(speedF) < 3.0f; }
|
||||
BOOL checkEnemySearch() { return checkResetStateFlg0(RFLG0_ENEMY_SEARCH); }
|
||||
bool checkOriginalDemo() const { return field_0x16b8 == 3; }
|
||||
bool checkHorseDemoMode() { return field_0x16b8 != 0; }
|
||||
BOOL checkWait() const { return m_procID == PROC_WAIT_e; }
|
||||
BOOL checkLand() const { return m_procID == PROC_LAND_e && field_0x171a == 0; }
|
||||
BOOL checkGetOff() const { return fabsf(speedF) < 3.0f; }
|
||||
u32 checkEnemySearch() { return checkResetStateFlg0(RFLG0_ENEMY_SEARCH); }
|
||||
BOOL checkOriginalDemo() const { return field_0x16b8 == 3; }
|
||||
BOOL checkHorseDemoMode() { return field_0x16b8 != 0; }
|
||||
s16 checkCowHit() const { return m_cowHit; }
|
||||
s16 getCowHitAngle() const { return m_cowHitAngle; }
|
||||
u8 getRodeoPointCnt() const { return m_rodeoPointCnt; }
|
||||
|
|
@ -333,7 +338,7 @@ public:
|
|||
|
||||
u32 getShadowID() const { return m_shadowID; }
|
||||
|
||||
bool checkInputOnR() const { return m_padStickValue > 0.05f; }
|
||||
BOOL checkInputOnR() const { return m_padStickValue > 0.05f; }
|
||||
|
||||
void onBagMaterial() {
|
||||
m_modelData->getMaterialNodePointer(5)->getShape()->show();
|
||||
|
|
@ -354,7 +359,7 @@ public:
|
|||
/* 0x0594 */ mDoExt_AnmRatioPack m_anmRatio[3];
|
||||
/* 0x05AC */ mDoExt_MtxCalcOldFrame* m_oldFrame;
|
||||
/* 0x05B0 */ daPy_frameCtrl_c m_frameCtrl[3];
|
||||
/* 0x05F8 */ daHorse_hio_c* m_hio;
|
||||
/* 0x05F8 */ HORSE_HIO_CLASS* m_hio;
|
||||
/* 0x05FC */ dBgS_AcchCir m_acchcir[3];
|
||||
/* 0x06BC */ dBgS_HorseAcch m_acch;
|
||||
/* 0x0894 */ dCcD_Stts m_cc_stts;
|
||||
|
|
@ -566,15 +571,15 @@ class daHorse_hio_c : public JORReflexible {
|
|||
public:
|
||||
daHorse_hio_c() {
|
||||
#if DEBUG
|
||||
mParameters = daHorse_hio_c0::m;
|
||||
m = daHorse_hio_c0::m;
|
||||
#endif
|
||||
}
|
||||
#if DEBUG
|
||||
virtual ~daHorse_hio_c() {}
|
||||
void genMessage(JORMContext*);
|
||||
/* 0x4 */ s8 id;
|
||||
/* 0x8 */ daHorse_hio_c1 mParameters;
|
||||
#endif
|
||||
/* 0x8 */ daHorse_hio_c1 m;
|
||||
};
|
||||
|
||||
#endif /* D_A_HORSE_H */
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "d/d_cc_d.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
#include "JSystem/JParticle/JPAEmitter.h"
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "d/d_bg_w_base.h"
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
|
||||
class dBgW;
|
||||
|
|
@ -80,6 +81,11 @@ public:
|
|||
virtual void genMessage(JORMContext*);
|
||||
virtual ~dBgS_HIO();
|
||||
|
||||
BOOL ChkLineOff();
|
||||
BOOL ChkCheckCounter();
|
||||
BOOL ChkLineTimer();
|
||||
BOOL ChkGroundCheckTimer();
|
||||
|
||||
/* 0x04 */ u8 field_0x4[0x6 - 0x4];
|
||||
/* 0x06 */ u16 field_0x6;
|
||||
/* 0x08 */ u16 field_0x8;
|
||||
|
|
@ -90,6 +96,12 @@ public:
|
|||
#endif
|
||||
};
|
||||
|
||||
extern int g_line_counter;
|
||||
extern OSStopwatch s_line_sw;
|
||||
|
||||
extern int g_ground_counter;
|
||||
extern OSStopwatch s_ground_sw;
|
||||
|
||||
class dBgS : public cBgS {
|
||||
public:
|
||||
dBgS() {}
|
||||
|
|
@ -139,8 +151,45 @@ public:
|
|||
u32 GetMtrlSndId(const cBgS_PolyInfo& param_0) { return dKy_pol_sound_get(¶m_0); }
|
||||
void DebugDrawPoly(dBgW_Base *param_1) {}
|
||||
fopAc_ac_c* GetActorPointer(cBgS_PolyInfo const& param_0) const { return cBgS::GetActorPointer(param_0); }
|
||||
bool LineCross(cBgS_LinChk* i_linChk) { return ((cBgS*)this)->LineCross(i_linChk); }
|
||||
f32 GroundCross(cBgS_GndChk* i_gndChk) { return (f32)((cBgS*)this)->GroundCross(i_gndChk); }
|
||||
bool LineCross(cBgS_LinChk* i_linChk) {
|
||||
#ifdef DEBUG
|
||||
if (m_hio.ChkLineOff()) {
|
||||
return false;
|
||||
}
|
||||
if (m_hio.ChkCheckCounter()) {
|
||||
g_line_counter++;
|
||||
}
|
||||
if (m_hio.ChkLineTimer()) {
|
||||
OSStartStopwatch(&s_line_sw);
|
||||
}
|
||||
bool rt = cBgS::LineCross(i_linChk);
|
||||
if (m_hio.ChkLineTimer()) {
|
||||
OSStopStopwatch(&s_line_sw);
|
||||
OSDumpStopwatch(&s_line_sw);
|
||||
}
|
||||
return rt;
|
||||
#else
|
||||
return cBgS::LineCross(i_linChk);
|
||||
#endif
|
||||
}
|
||||
f32 GroundCross(cBgS_GndChk* i_gndChk) {
|
||||
#ifdef DEBUG
|
||||
if (m_hio.ChkCheckCounter()) {
|
||||
g_ground_counter++;
|
||||
}
|
||||
if (m_hio.ChkGroundCheckTimer()) {
|
||||
OSStartStopwatch(&s_ground_sw);
|
||||
}
|
||||
f32 rt = cBgS::GroundCross(i_gndChk);
|
||||
if (m_hio.ChkGroundCheckTimer()) {
|
||||
OSStopStopwatch(&s_ground_sw);
|
||||
OSDumpStopwatch(&s_ground_sw);
|
||||
}
|
||||
return rt;
|
||||
#else
|
||||
return cBgS::GroundCross(i_gndChk);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ChkDeleteActorRegist(fopAc_ac_c*);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define D_BG_D_BG_S_MOVEBG_ACTOR_H
|
||||
|
||||
#include "f_op/f_op_actor.h"
|
||||
#include "SSystem/SComponent/c_bg_s_poly_info.h"
|
||||
|
||||
class dBgW;
|
||||
typedef void (*MoveBGActor_SetFunc)(dBgW*, void*, cBgS_PolyInfo const&, bool, cXyz*, csXyz*,
|
||||
|
|
|
|||
|
|
@ -13516,7 +13516,7 @@ BOOL daAlink_c::setItemActor() {
|
|||
|
||||
if (checkBombItem(mEquipItem)) {
|
||||
if (checkHorseRide()) {
|
||||
if (!dComIfGp_getHorseActor()->checkNoBombProc() &&
|
||||
if (dComIfGp_getHorseActor()->checkNoBombProc() &&
|
||||
(mProcID != PROC_HORSE_TURN || !checkModeFlg(MODE_DISABLE_ITEMS)))
|
||||
{
|
||||
mEquipItem = fpcNm_ITEM_NONE;
|
||||
|
|
|
|||
|
|
@ -371,10 +371,11 @@ void daAlink_c::setCrawlMoveAngle() {
|
|||
}
|
||||
|
||||
mLinkGndChk.SetPos(&sp20);
|
||||
// Fakematch:
|
||||
// dBgS::GroundCross is implicitly inlined to cBgS::GroundCross, but for some
|
||||
// reason here that breaks the match. This is the only place in the code so
|
||||
// far (September 2025) where it causes issues.
|
||||
sp2C.set(sp20.x - sp38.x, ((cBgS&)dComIfG_Bgsp()).GroundCross(&mLinkGndChk) - sp38.y,
|
||||
sp2C.set(sp20.x - sp38.x, dComIfG_Bgsp().cBgS::GroundCross(&mLinkGndChk) - sp38.y,
|
||||
sp20.z - sp38.z);
|
||||
|
||||
if (cLib_distanceAngleS(sp2C.atan2sY_XZ(), shape_angle.x) > 0x800) {
|
||||
|
|
|
|||
|
|
@ -1254,7 +1254,7 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
i_this->mDemoCamEye.z = tentacle->current.pos.z + i_this->field_0x1298;
|
||||
|
||||
i_this->mDemoCamCenter.x = tentacle->current.pos.x;
|
||||
i_this->mDemoCamCenter.y = tentacle->current.pos.y;
|
||||
i_this->mDemoCamCenter.y = tentacle->current.pos.y + ZREG_F(1);
|
||||
i_this->mDemoCamCenter.z = tentacle->current.pos.z;
|
||||
} else {
|
||||
spFC = tentacle->current.pos;
|
||||
|
|
@ -1423,10 +1423,10 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
i_this->mDemoCamEye = camera0->lookat.eye;
|
||||
i_this->mDemoCamCenter = camera0->lookat.center;
|
||||
|
||||
dComIfGp_getEvent().startCheckSkipEdge(i_this);
|
||||
dComIfGp_getEvent().startCheckSkipEdge(a_this);
|
||||
// fallthrough
|
||||
case 11:
|
||||
if (i_this->mDemoModeTimer == VREG_S(0) + 8) {
|
||||
if (i_this->mDemoModeTimer == (s16)(VREG_S(0) + 8)) {
|
||||
daPy_getPlayerActorClass()->changeDemoMode(0x19, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
|
@ -1444,11 +1444,11 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
i_this->mDemoCamEyeTarget.set(240.0f, 274.0f, 2075.0f);
|
||||
|
||||
i_this->field_0x1288.x =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
i_this->field_0x1288.y =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
i_this->field_0x1288.z =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
}
|
||||
|
||||
spFC.set(0.0f, 0.0f, 1700.0f);
|
||||
|
|
@ -1464,10 +1464,12 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
spF0 = i_this->mDemoCamCenterTarget - i_this->mDemoCamCenter;
|
||||
f32 temp_f30 = spF0.abs();
|
||||
|
||||
var_f31 = temp_f31 * (BREG_F(19) + 0.1f) * cM_ssin((temp_f30 / temp_f31) * (f32)0x8000);
|
||||
f32 f28 = temp_f31 * (BREG_F(19) + 0.1f);
|
||||
s16 sp0C = (temp_f30 / temp_f31) * (f32)0x8000;
|
||||
var_f31 = f28 * cM_ssin(sp0C);
|
||||
}
|
||||
|
||||
if (i_this->mDemoModeTimer != VREG_S(8) + 320) {
|
||||
if (i_this->mDemoModeTimer != (s16)(VREG_S(8) + 320)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1476,32 +1478,32 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
i_this->mDemoCamCenterTarget.set(76.0f, 204.0f, 1782.0f);
|
||||
i_this->mDemoCamEyeTarget.set(-41.0f, 261.0f, 2095.0f);
|
||||
|
||||
i_this->field_0x127c.x = std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
i_this->field_0x127c.y = std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
i_this->field_0x127c.z = std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
i_this->field_0x127c.x = fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
i_this->field_0x127c.y = fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
i_this->field_0x127c.z = fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
|
||||
i_this->field_0x1288.x =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
i_this->field_0x1288.y =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
i_this->field_0x1288.z =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
|
||||
i_this->field_0x129c = 0.0f;
|
||||
i_this->mDemoMode = 12;
|
||||
i_this->mDemoModeTimer = 0;
|
||||
// fallthrough
|
||||
case 12:
|
||||
if (i_this->mDemoModeTimer == 260) {
|
||||
if (i_this->mDemoModeTimer == (s16)(VREG_S(0) + 260)) {
|
||||
i_this->field_0x6f9 = 2;
|
||||
}
|
||||
|
||||
cam_3d_morf(i_this, 0.1f);
|
||||
cLib_addCalc2(&i_this->field_0x129c, 0.005f, 1.0f, 0.00015f);
|
||||
|
||||
if (i_this->mDemoModeTimer == VREG_S(2) + 340) {
|
||||
if (i_this->mDemoModeTimer == (s16)(VREG_S(2) + 340)) {
|
||||
i_this->mDemoCamCenter = tentacle->current.pos;
|
||||
i_this->mDemoCamCenter.y = 0.0f;
|
||||
i_this->mDemoCamCenter.y = VREG_F(6) + 0.0f;
|
||||
|
||||
i_this->mDemoCamEye.set(1394.0f, 313.0f, -300.0f);
|
||||
i_this->mDemoMode = 13;
|
||||
|
|
@ -1537,43 +1539,43 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
dComIfGp_getVibration().StopQuake(31);
|
||||
}
|
||||
|
||||
if (i_this->mDemoModeTimer == VREG_S(2) + 100) {
|
||||
if (i_this->mDemoModeTimer == (s16)(VREG_S(2) + 100)) {
|
||||
i_this->field_0x6f9 = 2;
|
||||
}
|
||||
|
||||
if (i_this->mDemoModeTimer == VREG_S(4) + 53) {
|
||||
if (i_this->mDemoModeTimer == (s16)(VREG_S(4) + 53)) {
|
||||
i_this->mColpatType = 15;
|
||||
}
|
||||
|
||||
if (i_this->mDemoModeTimer >= VREG_S(3) + 110) {
|
||||
if (i_this->mDemoModeTimer >= (s16)(VREG_S(3) + 110)) {
|
||||
cLib_addCalc2(&i_this->mDemoCamCenter.x, tentacle->current.pos.x, 0.1f,
|
||||
VREG_S(5) + 20.0f);
|
||||
VREG_F(5) + 20.0f);
|
||||
|
||||
if (tentacle->current.pos.y + 100.0f > 0.0f) {
|
||||
cLib_addCalc2(&i_this->mDemoCamCenter.y, tentacle->current.pos.y + 100.0f, 0.8f,
|
||||
VREG_S(5) + 60.0f);
|
||||
VREG_F(5) + 60.0f);
|
||||
}
|
||||
|
||||
cLib_addCalc2(&i_this->mDemoCamCenter.z, tentacle->current.pos.z, 0.1f,
|
||||
VREG_S(5) + 20.0f);
|
||||
VREG_F(5) + 20.0f);
|
||||
|
||||
if (i_this->mDemoModeTimer == VREG_S(4) + 113) {
|
||||
if (i_this->mDemoModeTimer == (s16)(VREG_S(4) + 113)) {
|
||||
i_this->field_0x6f9 = 2;
|
||||
i_this->mColpatType = 1;
|
||||
}
|
||||
|
||||
if (i_this->mDemoModeTimer >= VREG_S(5) + 150) {
|
||||
cLib_addCalc2(&i_this->mDemoCamEye.y, VREG_S(6) + 1413.0f, 0.1f,
|
||||
i_this->field_0x129c * (VREG_S(7) + 40.0f));
|
||||
if (i_this->mDemoModeTimer >= (s16)(VREG_S(5) + 150)) {
|
||||
cLib_addCalc2(&i_this->mDemoCamEye.y, VREG_F(6) + 1413.0f, 0.1f,
|
||||
i_this->field_0x129c * (VREG_F(7) + 40.0f));
|
||||
cLib_addCalc2(&i_this->field_0x129c, 1.0f, 1.0f, 0.02f);
|
||||
|
||||
if (i_this->mDemoModeTimer == VREG_S(6) + 200) {
|
||||
if (i_this->mDemoModeTimer == (s16)(VREG_S(6) + 200)) {
|
||||
daPy_getPlayerActorClass()->changeDemoMode(0x17, 1, 2, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (i_this->mDemoModeTimer != VREG_S(7) + 280) {
|
||||
if (i_this->mDemoModeTimer != (s16)(VREG_S(7) + 280)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1582,16 +1584,16 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
i_this->mDemoCamCenterTarget.set(0.0f, 278.0f, 1252.0f);
|
||||
i_this->mDemoCamEyeTarget.set(0.0f, 86.0f, 2167.0f);
|
||||
|
||||
i_this->field_0x127c.x = std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
i_this->field_0x127c.y = std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
i_this->field_0x127c.z = std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
i_this->field_0x127c.x = fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
i_this->field_0x127c.y = fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
i_this->field_0x127c.z = fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
|
||||
i_this->field_0x1288.x =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
i_this->field_0x1288.y =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
i_this->field_0x1288.z =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
|
||||
i_this->field_0x129c = 0.0f;
|
||||
i_this->mDemoMode = 14;
|
||||
|
|
@ -1739,16 +1741,16 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
i_this->mDemoCamCenterTarget.set(-2243.0f, 1340.0f, 977.0f);
|
||||
i_this->mDemoCamEyeTarget.set(-1226.0f, 980.0f, 1350.0f);
|
||||
|
||||
i_this->field_0x127c.x = std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
i_this->field_0x127c.y = std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
i_this->field_0x127c.z = std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
i_this->field_0x127c.x = fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
i_this->field_0x127c.y = fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
i_this->field_0x127c.z = fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
|
||||
i_this->field_0x1288.x =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
i_this->field_0x1288.y =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
i_this->field_0x1288.z =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
|
||||
i_this->field_0x129c = 0.0f;
|
||||
i_this->mDemoMode = 34;
|
||||
|
|
@ -1759,7 +1761,7 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
cam_3d_morf(i_this, 0.2f);
|
||||
cLib_addCalc2(&i_this->field_0x129c, 0.1f, 1.0f, 0.005f);
|
||||
|
||||
if (i_this->mDemoModeTimer > JREG_S(7) + 133) {
|
||||
if (i_this->mDemoModeTimer > (s16)(JREG_S(7) + 133)) {
|
||||
cLib_addCalc2(&i_this->mDemoCamFovy, 30.0f, 0.5f, 4.0f);
|
||||
}
|
||||
}
|
||||
|
|
@ -1783,7 +1785,7 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
mDoMtx_stack_c::multVecZero(&sp114);
|
||||
|
||||
cLib_addCalc2(&i_this->mDemoCamCenter.x, sp114.x, BREG_F(14) + 0.6f, 100.0f);
|
||||
cLib_addCalc2(&i_this->mDemoCamCenter.y, sp114.y + 200.0f + BREG_F(12), BREG_F(14) + 0.6f,
|
||||
cLib_addCalc2(&i_this->mDemoCamCenter.y, sp114.y + 200.0f + JREG_F(12), BREG_F(14) + 0.6f,
|
||||
100.0f);
|
||||
cLib_addCalc2(&i_this->mDemoCamCenter.z, sp114.z, BREG_F(14) + 0.6f, 100.0f);
|
||||
|
||||
|
|
@ -1812,9 +1814,9 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
i_this->mDemoCamEye.set(95.0f, 50.0f, 2800.0f);
|
||||
i_this->mDemoCamEyeTarget.set(72.0f, 52.0f, 2153.0f);
|
||||
|
||||
i_this->field_0x127c.x = std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
i_this->field_0x127c.y = std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
i_this->field_0x127c.z = std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
i_this->field_0x127c.x = fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
i_this->field_0x127c.y = fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
i_this->field_0x127c.z = fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
|
||||
i_this->field_0x1288.set(0.0f, 0.0f, 0.0f);
|
||||
i_this->field_0x129c = 0.0f;
|
||||
|
|
@ -1854,12 +1856,12 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
i_this->mColpatType = 4;
|
||||
}
|
||||
|
||||
if (i_this->mDemoModeTimer >= TREG_S(5) + 380) {
|
||||
if (i_this->mDemoModeTimer >= (s16)(TREG_S(5) + 380)) {
|
||||
cam_3d_morf(i_this, 0.1f);
|
||||
cLib_addCalc2(&i_this->field_0x129c, 0.05f, 1.0f, 0.001f);
|
||||
}
|
||||
|
||||
if (i_this->mDemoModeTimer == TREG_S(6) + 430) {
|
||||
if (i_this->mDemoModeTimer == (s16)(TREG_S(6) + 430)) {
|
||||
i_this->field_0x5c8 = 1;
|
||||
i_this->field_0x5cc = a_this->eyePos;
|
||||
}
|
||||
|
|
@ -1870,7 +1872,7 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
spFC.set(BREG_F(5) + -30.0f, 0.0f, BREG_F(6) + 1938.0f);
|
||||
}
|
||||
|
||||
daPy_getPlayerActorClass()->setPlayerPosAndAngle(&spFC, 0x8000, 0);
|
||||
daPy_getPlayerActorClass()->setPlayerPosAndAngle(&spFC, BREG_S(5) + 0x8000, 0);
|
||||
|
||||
if (i_this->field_0x5c8 != 0) {
|
||||
i_this->field_0x5cc.y += i_this->field_0x5d8;
|
||||
|
|
@ -1890,7 +1892,7 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
} else {
|
||||
i_this->field_0x5d8 = 0.0f;
|
||||
}
|
||||
} else if (i_this->mDemoModeTimer >= TREG_S(6) + 435) {
|
||||
} else if (i_this->mDemoModeTimer >= (s16)(TREG_S(6) + 435)) {
|
||||
i_this->field_0x5cc.z += BREG_F(9) + 6.0f;
|
||||
}
|
||||
|
||||
|
|
@ -1923,8 +1925,11 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
fopAcM_GetRoomNo(a_this), &a_this->shape_angle, &sp120,
|
||||
0.0f, 0.0f, -1);
|
||||
|
||||
fopAcM_delete(fopAcM_SearchByID(i_this->mTentacleIDs[0]));
|
||||
fopAcM_delete(fopAcM_SearchByID(i_this->mTentacleIDs[1]));
|
||||
fopAc_ac_c* sp28;
|
||||
sp28 = fopAcM_SearchByID(i_this->mTentacleIDs[0]);
|
||||
fopAcM_delete(sp28);
|
||||
sp28 = fopAcM_SearchByID(i_this->mTentacleIDs[1]);
|
||||
fopAcM_delete(sp28);
|
||||
}
|
||||
|
||||
if (i_this->mDemoModeTimer == 535) {
|
||||
|
|
@ -1968,18 +1973,18 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
i_this->mDemoCamEyeTarget.set(1214.0f, 350.0f, 2696.0f);
|
||||
|
||||
i_this->field_0x127c.x =
|
||||
std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
i_this->field_0x127c.y =
|
||||
std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
i_this->field_0x127c.z =
|
||||
std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
|
||||
i_this->field_0x1288.x =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
i_this->field_0x1288.y =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
i_this->field_0x1288.z =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
|
||||
i_this->field_0x129c = 0.0f;
|
||||
} else if (i_this->mDemoModeTimer < 140) {
|
||||
|
|
@ -1988,18 +1993,18 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
i_this->mDemoCamEyeTarget.set(23.0f, 108.0f, 2155.0f);
|
||||
|
||||
i_this->field_0x127c.x =
|
||||
std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
i_this->field_0x127c.y =
|
||||
std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
i_this->field_0x127c.z =
|
||||
std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
|
||||
i_this->field_0x1288.x =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
i_this->field_0x1288.y =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
i_this->field_0x1288.z =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
}
|
||||
|
||||
cam_3d_morf(i_this, 0.1f);
|
||||
|
|
@ -2037,18 +2042,18 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
i_this->mDemoCamEyeTarget.set(953.0f, 997.0f, -36.0f);
|
||||
|
||||
i_this->field_0x127c.x =
|
||||
std::fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
fabsf(i_this->mDemoCamEyeTarget.x - i_this->mDemoCamEye.x);
|
||||
i_this->field_0x127c.y =
|
||||
std::fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
fabsf(i_this->mDemoCamEyeTarget.y - i_this->mDemoCamEye.y);
|
||||
i_this->field_0x127c.z =
|
||||
std::fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
fabsf(i_this->mDemoCamEyeTarget.z - i_this->mDemoCamEye.z);
|
||||
|
||||
i_this->field_0x1288.x =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
fabsf(i_this->mDemoCamCenterTarget.x - i_this->mDemoCamCenter.x);
|
||||
i_this->field_0x1288.y =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
fabsf(i_this->mDemoCamCenterTarget.y - i_this->mDemoCamCenter.y);
|
||||
i_this->field_0x1288.z =
|
||||
std::fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
fabsf(i_this->mDemoCamCenterTarget.z - i_this->mDemoCamCenter.z);
|
||||
|
||||
cXyz pos(0.0f, 0.0f, 0.0f);
|
||||
for (int i = 0; i < 5; i++) {
|
||||
|
|
@ -2123,7 +2128,7 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
i_this->field_0x1151 = 1;
|
||||
|
||||
dComIfGs_onStageBossEnemy();
|
||||
int sw = (fopAcM_GetParam(a_this) >> 0x10) & 0xFF;
|
||||
int sw = (fopAcM_GetParam(a_this) & 0x00FF0000) >> 0x10;
|
||||
dComIfGs_offSwitch(sw, fopAcM_GetRoomNo(a_this));
|
||||
|
||||
fish_set(i_this);
|
||||
|
|
@ -2136,7 +2141,7 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
Z2GetAudioMgr()->subBgmStop();
|
||||
OS_REPORT("//////////////B_BQ SKIP 11\n");
|
||||
|
||||
int sw = (fopAcM_GetParam(a_this) >> 8) & 0xFF;
|
||||
int sw = (fopAcM_GetParam(a_this) & 0x0000FF00) >> 8;
|
||||
dComIfGs_onSwitch(sw, fopAcM_GetRoomNo(a_this));
|
||||
dStage_changeScene(1, 0.0f, 0, fopAcM_GetRoomNo(a_this), 0, -1);
|
||||
i_this->mDemoMode = 1000;
|
||||
|
|
|
|||
|
|
@ -50,12 +50,6 @@
|
|||
#define ANM_HS_WALK_FAST 34
|
||||
#define ANM_HS_WALK_SLOW 35
|
||||
|
||||
#if DEBUG
|
||||
#define HIO m_hio->mParameters
|
||||
#else
|
||||
#define HIO daHorse_hio_c0::m
|
||||
#endif
|
||||
|
||||
static void strippedFunc()
|
||||
{
|
||||
extern void F(f32*);
|
||||
|
|
@ -254,7 +248,7 @@ void daHorse_c::coHitCallbackBoarJump(fopAc_ac_c* i_hitActor) {
|
|||
{
|
||||
f32 sin_y = cM_ssin(current.angle.y);
|
||||
f32 cos_y = cM_scos(current.angle.y);
|
||||
f32 jump_chk_dist = (HIO.boar_jump_horizontal + HIO.boar_jump_horizontal) + 100.0f;
|
||||
f32 jump_chk_dist = (m_hio->m.boar_jump_horizontal + m_hio->m.boar_jump_horizontal) + 100.0f;
|
||||
|
||||
cXyz start(current.pos);
|
||||
cXyz end(start.x + (jump_chk_dist * sin_y), start.y, start.z + (jump_chk_dist * cos_y));
|
||||
|
|
@ -293,8 +287,8 @@ void daHorse_c::coHitCallbackBoarJump(fopAc_ac_c* i_hitActor) {
|
|||
|
||||
if (jump_chk_dist <= 0.0f) {
|
||||
onEndResetStateFlg0(ERFLG0_UNK_20);
|
||||
field_0x1768 = HIO.boar_jump_horizontal;
|
||||
field_0x176c = HIO.boar_jump_height + current.pos.y;
|
||||
field_0x1768 = m_hio->m.boar_jump_horizontal;
|
||||
field_0x176c = m_hio->m.boar_jump_height + current.pos.y;
|
||||
field_0x1770 = field_0x1768;
|
||||
} else if (m_procID == PROC_MOVE_e && speedF > 5.0f) {
|
||||
setBoarHit(this, 0);
|
||||
|
|
@ -523,12 +517,11 @@ int daHorse_c::createHeap() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
m_hio = new daHorse_hio_c();
|
||||
m_hio = new HORSE_HIO_CLASS();
|
||||
if (m_hio == NULL) {
|
||||
return 0;
|
||||
}
|
||||
#if DEBUG
|
||||
#endif
|
||||
|
||||
ResTIMG* texImg = (ResTIMG*)dComIfG_getObjectRes(l_arcName, 0x2C);
|
||||
JUT_ASSERT(0x4B6, texImg != NULL);
|
||||
|
||||
|
|
@ -650,14 +643,14 @@ int daHorse_c::create() {
|
|||
|
||||
if (daAlink_c::checkStageName("F_SP00") || daAlink_c::checkStageName("F_SP103") || daAlink_c::checkStageName("F_SP104") || daAlink_c::checkStageName("F_SP108") || daAlink_c::checkStageName("F_SP113")) {
|
||||
onStateFlg0(FLG0_UNK_2000);
|
||||
m_normalMaxSpeedF = HIO.kakariko_max_speed;
|
||||
m_lashAddSpeed = HIO.kakariko_add_lash_speed;
|
||||
m_normalMaxSpeedF = m_hio->m.kakariko_max_speed;
|
||||
m_lashAddSpeed = m_hio->m.kakariko_add_lash_speed;
|
||||
} else {
|
||||
m_normalMaxSpeedF = HIO.max_speed;
|
||||
m_lashAddSpeed = HIO.add_lash_speed;
|
||||
m_normalMaxSpeedF = m_hio->m.max_speed;
|
||||
m_lashAddSpeed = m_hio->m.add_lash_speed;
|
||||
}
|
||||
|
||||
field_0x16c2 = HIO.max_turn;
|
||||
field_0x16c2 = m_hio->m.max_turn;
|
||||
m_flowID = shape_angle.z;
|
||||
if (m_flowID == 0) {
|
||||
m_flowID = 5000;
|
||||
|
|
@ -687,7 +680,7 @@ int daHorse_c::create() {
|
|||
m_acch.Set(this, 3, m_acchcir);
|
||||
m_acch.SetWaterCheckOffset(500.0f);
|
||||
|
||||
field_0x1764 = HIO.walk_to_fastwalk_rate * m_normalMaxSpeedF;
|
||||
field_0x1764 = m_hio->m.walk_to_fastwalk_rate * m_normalMaxSpeedF;
|
||||
m_lashMaxSpeedF = m_normalMaxSpeedF + m_lashAddSpeed;
|
||||
|
||||
attention_info.distances[fopAc_attn_ETC_e] = 14;
|
||||
|
|
@ -1195,7 +1188,7 @@ void daHorse_c::setDemoMoveData(u32* i_mode, cXyz const* i_pos) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((0.5f * (speedF * speedF)) / HIO.stopping_deceleration > JMAFastSqrt(dist_xz2)) {
|
||||
if ((0.5f * (speedF * speedF)) / m_hio->m.stopping_deceleration > JMAFastSqrt(dist_xz2)) {
|
||||
m_padStickValue = 0.0f;
|
||||
}
|
||||
s16 s = pos_vec.atan2sX_Z();
|
||||
|
|
@ -1407,7 +1400,7 @@ void daHorse_c::setStickData() {
|
|||
if (checkStateFlg0(daHorse_FLG0(FLG0_RODEO_MODE | FLG0_UNK_10000000))) {
|
||||
field_0x16c2 = 2000;
|
||||
} else {
|
||||
field_0x16c2 = HIO.max_turn;
|
||||
field_0x16c2 = m_hio->m.max_turn;
|
||||
}
|
||||
|
||||
if (dComIfGp_event_runCheck()) {
|
||||
|
|
@ -1469,11 +1462,11 @@ void daHorse_c::setMoveAnime(f32 i_morf) {
|
|||
|
||||
f32 run_anm_speed, fastrun_anm_speed;
|
||||
if (checkStateFlg0(FLG0_UNK_2000)) {
|
||||
run_anm_speed = HIO.kakariko_run_anm_speed;
|
||||
fastrun_anm_speed = HIO.kakariko_fastrun_anm_speed;
|
||||
run_anm_speed = m_hio->m.kakariko_run_anm_speed;
|
||||
fastrun_anm_speed = m_hio->m.kakariko_fastrun_anm_speed;
|
||||
} else {
|
||||
run_anm_speed = HIO.run_anm_speed;
|
||||
fastrun_anm_speed = HIO.fast_run_anm_speed;
|
||||
run_anm_speed = m_hio->m.run_anm_speed;
|
||||
fastrun_anm_speed = m_hio->m.fast_run_anm_speed;
|
||||
}
|
||||
|
||||
if (m_anmIdx[0] == ANM_HS_RUN_DASH && !m_frameCtrl[0].checkAnmEnd()) {
|
||||
|
|
@ -1497,25 +1490,25 @@ void daHorse_c::setMoveAnime(f32 i_morf) {
|
|||
if (speedF >= 0.0f) {
|
||||
var_f31 = speedF * (1.0f / m_normalMaxSpeedF);
|
||||
} else {
|
||||
var_f31 = speedF * (1.0f / HIO.max_backward_speed);
|
||||
var_f31 = speedF * (1.0f / m_hio->m.max_backward_speed);
|
||||
}
|
||||
|
||||
if (var_f31 < HIO.walk_to_fastwalk_rate) {
|
||||
if (var_f31 < m_hio->m.walk_to_fastwalk_rate) {
|
||||
if (checkStateFlg0(FLG0_UNK_2)) {
|
||||
offStateFlg0(FLG0_UNK_2);
|
||||
i_morf = HIO.walk_run_interpolation;
|
||||
i_morf = m_hio->m.walk_run_interpolation;
|
||||
}
|
||||
|
||||
if (var_f31 < 0.0f && m_anmIdx[0] == ANM_HS_WALK_START && !m_frameCtrl[0].checkAnmEnd()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (var_f31 < -HIO.backward_idle_to_walk_rate) {
|
||||
setDoubleAnime(1.0f, HIO.backwalk_anm_speed, HIO.backwalk_anm_speed, ANM_HS_BACK_WALK, ANM_HS_BACK_WALK, i_morf);
|
||||
if (var_f31 < -m_hio->m.backward_idle_to_walk_rate) {
|
||||
setDoubleAnime(1.0f, m_hio->m.backwalk_anm_speed, m_hio->m.backwalk_anm_speed, ANM_HS_BACK_WALK, ANM_HS_BACK_WALK, i_morf);
|
||||
} else if (var_f31 < 0.0f) {
|
||||
ratio = 1.0f - ((var_f31 + HIO.backward_idle_to_walk_rate) / HIO.backward_idle_to_walk_rate);
|
||||
setDoubleAnime(ratio, HIO.wait_anm_speed, HIO.backwalk_anm_speed, ANM_HS_WAIT_01, ANM_HS_BACK_WALK, i_morf);
|
||||
} else if (var_f31 < HIO.wait_to_walk_rate) {
|
||||
ratio = 1.0f - ((var_f31 + m_hio->m.backward_idle_to_walk_rate) / m_hio->m.backward_idle_to_walk_rate);
|
||||
setDoubleAnime(ratio, m_hio->m.wait_anm_speed, m_hio->m.backwalk_anm_speed, ANM_HS_WAIT_01, ANM_HS_BACK_WALK, i_morf);
|
||||
} else if (var_f31 < m_hio->m.wait_to_walk_rate) {
|
||||
int sp8 = cLib_distanceAngleS(m_padStickAngleY, shape_angle.y);
|
||||
if (checkWaitTurn() && checkInputOnR() && sp8 >= 0x800 && sp8 <= 0x6000) {
|
||||
f32 anm_speed = 1.0f;
|
||||
|
|
@ -1564,19 +1557,19 @@ void daHorse_c::setMoveAnime(f32 i_morf) {
|
|||
|
||||
setDoubleAnime(0.0f, anm_speed, anm_speed, anm_idx, anm_idx, i_morf);
|
||||
} else {
|
||||
ratio = var_f31 / HIO.wait_to_walk_rate;
|
||||
ratio = var_f31 / m_hio->m.wait_to_walk_rate;
|
||||
if (m_procID != PROC_WAIT_e && speedF > 0.05f) {
|
||||
ratio = HIO.field_0xdc + (ratio * (1.0f - HIO.field_0xdc));
|
||||
ratio = m_hio->m.field_0xdc + (ratio * (1.0f - m_hio->m.field_0xdc));
|
||||
}
|
||||
setDoubleAnime(ratio, HIO.wait_anm_speed, HIO.walk_anm_speed, ANM_HS_WAIT_01, ANM_HS_WALK_SLOW, i_morf);
|
||||
setDoubleAnime(ratio, m_hio->m.wait_anm_speed, m_hio->m.walk_anm_speed, ANM_HS_WAIT_01, ANM_HS_WALK_SLOW, i_morf);
|
||||
}
|
||||
} else {
|
||||
ratio = (var_f31 - HIO.wait_to_walk_rate) / (HIO.walk_to_fastwalk_rate - HIO.wait_to_walk_rate);
|
||||
setDoubleAnime(ratio, HIO.walk_anm_speed, HIO.fast_walk_anm_speed, ANM_HS_WALK_SLOW, ANM_HS_WALK_FAST, i_morf);
|
||||
ratio = (var_f31 - m_hio->m.wait_to_walk_rate) / (m_hio->m.walk_to_fastwalk_rate - m_hio->m.wait_to_walk_rate);
|
||||
setDoubleAnime(ratio, m_hio->m.walk_anm_speed, m_hio->m.fast_walk_anm_speed, ANM_HS_WALK_SLOW, ANM_HS_WALK_FAST, i_morf);
|
||||
}
|
||||
} else if (var_f31 < HIO.fastwalk_to_run_rate) {
|
||||
} else if (var_f31 < m_hio->m.fastwalk_to_run_rate) {
|
||||
if (checkStateFlg0(FLG0_UNK_2) == 0) {
|
||||
setDoubleAnime(1.0f, HIO.fast_walk_anm_speed, HIO.fast_walk_anm_speed, ANM_HS_WALK_FAST, ANM_HS_WALK_FAST, i_morf);
|
||||
setDoubleAnime(1.0f, m_hio->m.fast_walk_anm_speed, m_hio->m.fast_walk_anm_speed, ANM_HS_WALK_FAST, ANM_HS_WALK_FAST, i_morf);
|
||||
} else {
|
||||
setDoubleAnime(0.0f, run_anm_speed, run_anm_speed, ANM_HS_RUN_SLOW, ANM_HS_RUN_SLOW, i_morf);
|
||||
}
|
||||
|
|
@ -1585,15 +1578,15 @@ void daHorse_c::setMoveAnime(f32 i_morf) {
|
|||
onStateFlg0(FLG0_UNK_2);
|
||||
if (m_lashAccelerationTime == 0) {
|
||||
onResetStateFlg0(RFLG0_UNK_4);
|
||||
setSingleAnime(ANM_HS_RUN_DASH, HIO.dash_anm_speed, 0.0f, -1, 3.0f, 0);
|
||||
setSingleAnime(ANM_HS_RUN_DASH, m_hio->m.dash_anm_speed, 0.0f, -1, 3.0f, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (var_f31 < HIO.run_to_fastrun_rate) {
|
||||
ratio = 0.1f * ((var_f31 - HIO.fastwalk_to_run_rate) / (HIO.run_to_fastrun_rate - HIO.fastwalk_to_run_rate));
|
||||
if (var_f31 < m_hio->m.run_to_fastrun_rate) {
|
||||
ratio = 0.1f * ((var_f31 - m_hio->m.fastwalk_to_run_rate) / (m_hio->m.run_to_fastrun_rate - m_hio->m.fastwalk_to_run_rate));
|
||||
} else {
|
||||
ratio = 0.1f + ((var_f31 - HIO.run_to_fastrun_rate) / ((1.0f + (m_lashAddSpeed / m_normalMaxSpeedF)) - HIO.run_to_fastrun_rate));
|
||||
ratio = 0.1f + ((var_f31 - m_hio->m.run_to_fastrun_rate) / ((1.0f + (m_lashAddSpeed / m_normalMaxSpeedF)) - m_hio->m.run_to_fastrun_rate));
|
||||
if (ratio > 1.0f) {
|
||||
ratio = 1.0f;
|
||||
}
|
||||
|
|
@ -1635,7 +1628,6 @@ void daHorse_c::setMoveAnime(f32 i_morf) {
|
|||
}
|
||||
}
|
||||
|
||||
// NONMATCHING - instruction order, some float regalloc, equivalent
|
||||
int daHorse_c::checkHorseNoMove(int param_0) {
|
||||
cXyz sp50;
|
||||
cXyz sp44;
|
||||
|
|
@ -1657,12 +1649,12 @@ int daHorse_c::checkHorseNoMove(int param_0) {
|
|||
spA = field_0x1714;
|
||||
}
|
||||
|
||||
f32 sp28;
|
||||
f32 var_f31;
|
||||
f32 var_f30;
|
||||
f32 var_f29;
|
||||
f32 var_f28;
|
||||
f32 sp28;
|
||||
f32 var_f27;
|
||||
f32 var_f31;
|
||||
f32 var_f30;
|
||||
|
||||
if (param_0 != 0) {
|
||||
if (checkEndResetStateFlg0(ERFLG0_UNK_200) || (checkStateFlg0(FLG0_UNK_100000) && (m_procID == PROC_MOVE_e || m_procID == PROC_TURN_e || m_procID == PROC_STOP_e) && ((current.pos.z < -33500.0f && abs(shape_angle.y) > 0x4000) || (current.pos.z > -20500.0f && abs(shape_angle.y) < 0x4000)))) {
|
||||
|
|
@ -1701,7 +1693,12 @@ int daHorse_c::checkHorseNoMove(int param_0) {
|
|||
m_linechk.Set(&start, &end, this);
|
||||
|
||||
onStateFlg0(FLG0_UNK_100);
|
||||
BOOL line_cross = dComIfG_Bgsp().LineCross(&m_linechk);
|
||||
// Fakematch: Debug shows that dBgS::LineCross is called here, but the instruction order on
|
||||
// retail only matches if cBgS::LineCross is called instead.
|
||||
// An alternative way to match the instruction order is by changing dBgS::LineCross's return
|
||||
// type to BOOL while keeping cBgS::LineCross's return type as bool, but that breaks other
|
||||
// functions that call dBgS::LineCross.
|
||||
BOOL line_cross = dComIfG_Bgsp().cBgS::LineCross(&m_linechk);
|
||||
offStateFlg0(FLG0_UNK_100);
|
||||
|
||||
if (line_cross) {
|
||||
|
|
@ -1749,7 +1746,7 @@ int daHorse_c::checkHorseNoMove(int param_0) {
|
|||
fopAcM_gc_c::getTriPla(&sp5C);
|
||||
|
||||
s16 sp8 = cM_atan2s(sp5C.mNormal.absXZ(), sp5C.mNormal.y);
|
||||
f32 sp14 = cM_deg2s(HIO.floor_angle_limit);
|
||||
f32 sp14 = cM_deg2s(m_hio->m.floor_angle_limit);
|
||||
|
||||
if (!checkStateFlg0(FLG0_UNK_1)) {
|
||||
for (int i = 0; i < m_scnChg_num; i++) {
|
||||
|
|
@ -1781,7 +1778,7 @@ int daHorse_c::checkHorseNoMove(int param_0) {
|
|||
}
|
||||
|
||||
if (fopAcM_wt_c::waterCheck(&sp50)) {
|
||||
if (fopAcM_wt_c::getWaterY() - fopAcM_gc_c::getGroundY() > HIO.water_depth_limit) {
|
||||
if (fopAcM_wt_c::getWaterY() - fopAcM_gc_c::getGroundY() > m_hio->m.water_depth_limit) {
|
||||
if (var_f30 <= 101.0f) {
|
||||
if (param_0 != 0) {
|
||||
onStateFlg0(FLG0_UNK_40000);
|
||||
|
|
@ -1840,7 +1837,7 @@ int daHorse_c::setSpeedAndAngle() {
|
|||
|
||||
if (var_r28 == 2 && m_procID == PROC_MOVE_e) {
|
||||
if (speedF >= 0.0f) {
|
||||
if (speedF <= HIO.cliff_rise_rate) {
|
||||
if (speedF <= m_hio->m.cliff_rise_rate) {
|
||||
onStateFlg0(FLG0_UNK_40000000);
|
||||
}
|
||||
return 4;
|
||||
|
|
@ -1860,10 +1857,10 @@ int daHorse_c::setSpeedAndAngle() {
|
|||
if (var_r28 == 2) {
|
||||
speedF = 0.0f;
|
||||
} else if (var_r28 == 1) {
|
||||
cLib_chaseF(&speedF, 0.0f, HIO.stopping_deceleration);
|
||||
cLib_chaseF(&speedF, 0.0f, m_hio->m.stopping_deceleration);
|
||||
}
|
||||
} else if (m_lashAccelerationTime == 0 && speedF > m_normalMaxSpeedF) {
|
||||
cLib_chaseF(&speedF, m_normalMaxSpeedF, HIO.stopping_deceleration);
|
||||
cLib_chaseF(&speedF, m_normalMaxSpeedF, m_hio->m.stopping_deceleration);
|
||||
}
|
||||
|
||||
if (checkStateFlg0(FLG0_UNK_200000)) {
|
||||
|
|
@ -1899,9 +1896,9 @@ int daHorse_c::setSpeedAndAngle() {
|
|||
if (checkInputOnR()) {
|
||||
if (checkStateFlg0(FLG0_UNK_40000) && (m_anmIdx[2] != ANM_HS_WAIT_03 || m_frameCtrl[2].getFrame() >= 18.0f)) {
|
||||
if (var_r27 == 1) {
|
||||
cLib_addCalcAngleS(¤t.angle.y, m_padStickAngleY + 0x8000, 5, field_0x16c2, HIO.min_turn);
|
||||
cLib_addCalcAngleS(¤t.angle.y, m_padStickAngleY + 0x8000, 5, field_0x16c2, m_hio->m.min_turn);
|
||||
} else {
|
||||
cLib_addCalcAngleS(¤t.angle.y, m_padStickAngleY, 5, field_0x16c2, HIO.min_turn);
|
||||
cLib_addCalcAngleS(¤t.angle.y, m_padStickAngleY, 5, field_0x16c2, m_hio->m.min_turn);
|
||||
}
|
||||
|
||||
if (!checkStateFlg0(daHorse_FLG0(FLG0_UNK_100000 | FLG0_UNK_200000))) {
|
||||
|
|
@ -1916,10 +1913,10 @@ int daHorse_c::setSpeedAndAngle() {
|
|||
}
|
||||
|
||||
if (!checkStateFlg0(daHorse_FLG0(FLG0_UNK_100000 | FLG0_UNK_200000))) {
|
||||
cLib_addCalcAngleS(¤t.angle.y, m_padStickAngleY, 5, field_0x16c2 * var_f28, HIO.min_turn * var_f28);
|
||||
cLib_addCalcAngleS(¤t.angle.y, m_padStickAngleY, 5, field_0x16c2 * var_f28, m_hio->m.min_turn * var_f28);
|
||||
}
|
||||
} else {
|
||||
cLib_addCalcAngleS(¤t.angle.y, m_padStickAngleY, 5, field_0x16c2, HIO.min_turn);
|
||||
cLib_addCalcAngleS(¤t.angle.y, m_padStickAngleY, 5, field_0x16c2, m_hio->m.min_turn);
|
||||
}
|
||||
|
||||
if (!checkStateFlg0(daHorse_FLG0(FLG0_UNK_100000 | FLG0_UNK_200000))) {
|
||||
|
|
@ -1931,7 +1928,7 @@ int daHorse_c::setSpeedAndAngle() {
|
|||
return 3;
|
||||
}
|
||||
|
||||
cLib_addCalcAngleS(¤t.angle.y, (m_padStickAngleY + 0x8000), 5, field_0x16c2, HIO.min_turn);
|
||||
cLib_addCalcAngleS(¤t.angle.y, (m_padStickAngleY + 0x8000), 5, field_0x16c2, m_hio->m.min_turn);
|
||||
|
||||
if (!checkStateFlg0(daHorse_FLG0(FLG0_UNK_100000 | FLG0_UNK_200000))) {
|
||||
shape_angle.y = current.angle.y;
|
||||
|
|
@ -1941,7 +1938,7 @@ int daHorse_c::setSpeedAndAngle() {
|
|||
|
||||
if (m_demoMode == 6) {
|
||||
if (var_r28 != 0 && speedF > 0.0f) {
|
||||
cLib_chaseF(&speedF, 0.0f, HIO.stopping_deceleration);
|
||||
cLib_chaseF(&speedF, 0.0f, m_hio->m.stopping_deceleration);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1949,7 +1946,7 @@ int daHorse_c::setSpeedAndAngle() {
|
|||
if (checkStateFlg0(FLG0_UNK_1)) {
|
||||
dAttention_c* attention = dComIfGp_getAttention();
|
||||
if (attention->GetLockonList(0) != NULL && attention->LockonTruth() && fopAcM_searchActorDistanceXZ2(this, attention->GetLockonList(0)->getActor()) > 1000000.0f) {
|
||||
cLib_addCalcAngleS(¤t.angle.y, fopAcM_searchActorAngleY(this, attention->GetLockonList(0)->getActor()), 5, field_0x16c2, HIO.min_turn);
|
||||
cLib_addCalcAngleS(¤t.angle.y, fopAcM_searchActorAngleY(this, attention->GetLockonList(0)->getActor()), 5, field_0x16c2, m_hio->m.min_turn);
|
||||
if (!checkStateFlg0(daHorse_FLG0(FLG0_UNK_100000 | FLG0_UNK_200000))) {
|
||||
shape_angle.y = current.angle.y;
|
||||
}
|
||||
|
|
@ -2003,10 +2000,10 @@ int daHorse_c::setSpeedAndAngle() {
|
|||
}
|
||||
|
||||
if (var_r28 != 0 && speedF > 0.0f) {
|
||||
cLib_chaseF(&speedF, 0.0f, HIO.stopping_deceleration);
|
||||
cLib_chaseF(&speedF, 0.0f, m_hio->m.stopping_deceleration);
|
||||
} else if (checkStateFlg0(FLG0_UNK_40000)) {
|
||||
if (m_anmIdx[2] != ANM_HS_WAIT_03 || m_frameCtrl[2].getFrame() >= 18.0f) {
|
||||
cLib_chaseF(&speedF, -HIO.max_backward_speed, HIO.max_backward_acceleration);
|
||||
cLib_chaseF(&speedF, -m_hio->m.max_backward_speed, m_hio->m.max_backward_acceleration);
|
||||
|
||||
field_0x1704--;
|
||||
if (field_0x1704 == 0) {
|
||||
|
|
@ -2019,36 +2016,36 @@ int daHorse_c::setSpeedAndAngle() {
|
|||
}
|
||||
} else if (checkInputOnR() && m_lashAccelerationTime == 0 && var_r27 == 1) {
|
||||
if (speedF > 0.0f) {
|
||||
cLib_chaseF(&speedF, 0.0f, HIO.stopping_deceleration);
|
||||
} else if (!checkStateFlg0(FLG0_UNK_8) && (checkTurnInput() || checkStateFlg0(daHorse_FLG0(FLG0_UNK_100000 | FLG0_UNK_200000))) && checkTurnPlayerState() && speedF > (0.2f * -HIO.max_backward_speed)) {
|
||||
cLib_chaseF(&speedF, 0.0f, m_hio->m.stopping_deceleration);
|
||||
} else if (!checkStateFlg0(FLG0_UNK_8) && (checkTurnInput() || checkStateFlg0(daHorse_FLG0(FLG0_UNK_100000 | FLG0_UNK_200000))) && checkTurnPlayerState() && speedF > (0.2f * -m_hio->m.max_backward_speed)) {
|
||||
return 1;
|
||||
} else {
|
||||
int spC = checkHorseNoMove(0);
|
||||
if (spC == 0) {
|
||||
if (!checkStateFlg0(daHorse_FLG0(FLG0_UNK_100000 | FLG0_UNK_200000))) {
|
||||
cLib_chaseF(&speedF, -HIO.max_backward_speed, HIO.max_backward_acceleration);
|
||||
cLib_chaseF(&speedF, -m_hio->m.max_backward_speed, m_hio->m.max_backward_acceleration);
|
||||
}
|
||||
} else if (spC == 1) {
|
||||
cLib_chaseF(&speedF, 0.0f, HIO.stopping_deceleration);
|
||||
cLib_chaseF(&speedF, 0.0f, m_hio->m.stopping_deceleration);
|
||||
} else {
|
||||
speedF = 0.0f;
|
||||
}
|
||||
}
|
||||
} else if (m_cowHit != 0) {
|
||||
if (!checkStateFlg0(daHorse_FLG0(FLG0_UNK_100000 | FLG0_UNK_200000))) {
|
||||
cLib_chaseF(&speedF, 0.5f * m_normalMaxSpeedF, HIO.lash_acceleration);
|
||||
cLib_chaseF(&speedF, 0.5f * m_normalMaxSpeedF, m_hio->m.lash_acceleration);
|
||||
}
|
||||
} else {
|
||||
f32 var_f31;
|
||||
f32 var_f29;
|
||||
if (var_r28 != 0) {
|
||||
var_f31 = 0.0f;
|
||||
var_f29 = HIO.deceleration;
|
||||
var_f29 = m_hio->m.deceleration;
|
||||
} else if (m_lashAccelerationTime != 0 || (checkStateFlg0(FLG0_RODEO_MODE) && checkStateFlg0(FLG0_UNK_1)) || m_demoMode == 4) {
|
||||
var_f31 = m_lashMaxSpeedF;
|
||||
var_f29 = HIO.lash_acceleration;
|
||||
if (speedF < HIO.min_lash_speed) {
|
||||
speedF = HIO.min_lash_speed;
|
||||
var_f29 = m_hio->m.lash_acceleration;
|
||||
if (speedF < m_hio->m.min_lash_speed) {
|
||||
speedF = m_hio->m.min_lash_speed;
|
||||
}
|
||||
} else {
|
||||
if (player->checkHorseHangMode()) {
|
||||
|
|
@ -2060,7 +2057,7 @@ int daHorse_c::setSpeedAndAngle() {
|
|||
var_f31 = var_f30 * (m_normalMaxSpeedF * (m_padStickValue * m_padStickValue));
|
||||
}
|
||||
|
||||
var_f29 = HIO.acceleration;
|
||||
var_f29 = m_hio->m.acceleration;
|
||||
if (checkStateFlg0(FLG0_UNK_4) && abs(field_0x16ea) < 0x4000) {
|
||||
var_f31 *= 1.0f - (0.8f * cM_scos(field_0x16ea));
|
||||
}
|
||||
|
|
@ -2077,20 +2074,20 @@ int daHorse_c::setSpeedAndAngle() {
|
|||
return 3;
|
||||
}
|
||||
|
||||
cLib_chaseF(&speedF, var_f31, HIO.stopping_deceleration);
|
||||
cLib_chaseF(&speedF, var_f31, m_hio->m.stopping_deceleration);
|
||||
} else {
|
||||
if (dComIfGp_event_runCheck() || checkStateFlg0(FLG0_UNK_10000000)) {
|
||||
var_f29 = HIO.stopping_deceleration;
|
||||
var_f29 = m_hio->m.stopping_deceleration;
|
||||
} else {
|
||||
var_f29 = HIO.deceleration;
|
||||
var_f29 = m_hio->m.deceleration;
|
||||
}
|
||||
|
||||
cLib_chaseF(&speedF, var_f31, var_f29);
|
||||
}
|
||||
}
|
||||
|
||||
if (checkInputOnR() && m_procID == PROC_MOVE_e && var_r28 == 0 && var_r27 == 0 && speedF > 0.05f && speedF < HIO.walk_min_speed) {
|
||||
speedF = HIO.walk_min_speed;
|
||||
if (checkInputOnR() && m_procID == PROC_MOVE_e && var_r28 == 0 && var_r27 == 0 && speedF > 0.05f && speedF < m_hio->m.walk_min_speed) {
|
||||
speedF = m_hio->m.walk_min_speed;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -2152,7 +2149,7 @@ void daHorse_c::setBodyPart() {
|
|||
void daHorse_c::setMatrix() {
|
||||
s16 var_r29 = 0;
|
||||
s16 var_r27 = 0;
|
||||
f32 temp_f31 = m_normalMaxSpeedF * HIO.fastwalk_to_run_rate;
|
||||
f32 temp_f31 = m_normalMaxSpeedF * m_hio->m.fastwalk_to_run_rate;
|
||||
|
||||
if (m_procID == PROC_MOVE_e && speedF > temp_f31) {
|
||||
f32 var_f30;
|
||||
|
|
@ -2227,7 +2224,6 @@ void daHorse_c::setDashEffect(u32* i_emitterID) {
|
|||
NULL, 0xFF, NULL, -1, 0, 0, 0);
|
||||
}
|
||||
|
||||
// NONMATCHING - regalloc
|
||||
void daHorse_c::setEffect() {
|
||||
JPABaseEmitter* sp50;
|
||||
int sp4C;
|
||||
|
|
@ -3125,7 +3121,7 @@ BOOL daHorse_c::checkTurnAfterFastMove(f32 param_0) {
|
|||
}
|
||||
|
||||
if (temp_r29 < 0x2000 && !checkHorseNoMove(1)) {
|
||||
speedF = HIO.fastwalk_to_run_rate * m_normalMaxSpeedF;
|
||||
speedF = m_hio->m.fastwalk_to_run_rate * m_normalMaxSpeedF;
|
||||
return procMoveInit();
|
||||
}
|
||||
|
||||
|
|
@ -3205,18 +3201,18 @@ void daHorse_c::setLashCnt() {
|
|||
if (!checkStateFlg0(FLG0_PLAYER_BACK_RIDE_LASH)) {
|
||||
m_lashCnt--;
|
||||
if (m_lashCnt == 0) {
|
||||
m_lashRecoverTime = HIO.full_spur_recovery_time;
|
||||
m_lashRecoverTime = m_hio->m.full_spur_recovery_time;
|
||||
} else {
|
||||
m_lashRecoverTime = HIO.spur_recovery_time;
|
||||
m_lashRecoverTime = m_hio->m.spur_recovery_time;
|
||||
}
|
||||
} else {
|
||||
offStateFlg0(FLG0_PLAYER_BACK_RIDE_LASH);
|
||||
}
|
||||
|
||||
if (checkStateFlg0(FLG0_UNK_2000)) {
|
||||
m_lashAccelerationTime = HIO.kakariko_lash_acceleration_time;
|
||||
m_lashAccelerationTime = m_hio->m.kakariko_lash_acceleration_time;
|
||||
} else {
|
||||
m_lashAccelerationTime = HIO.lash_acceleration_time;
|
||||
m_lashAccelerationTime = m_hio->m.lash_acceleration_time;
|
||||
}
|
||||
|
||||
onResetStateFlg0(RFLG0_LASH_DASH_START);
|
||||
|
|
@ -3242,7 +3238,7 @@ void daHorse_c::setLashCnt() {
|
|||
} else {
|
||||
m_lashCnt++;
|
||||
if (m_lashCnt < 6) {
|
||||
m_lashRecoverTime = HIO.continuous_spur_recovery_time;
|
||||
m_lashRecoverTime = m_hio->m.continuous_spur_recovery_time;
|
||||
}
|
||||
|
||||
if (!dComIfGp_event_runCheck()) {
|
||||
|
|
@ -3455,7 +3451,7 @@ int daHorse_c::procWait() {
|
|||
|
||||
if (fabsf(speedF) >= 0.05f) {
|
||||
if (checkEndResetStateFlg0(ERFLG0_RIDE_RUN_FLG)) {
|
||||
speedF = HIO.fastwalk_to_run_rate * m_normalMaxSpeedF;
|
||||
speedF = m_hio->m.fastwalk_to_run_rate * m_normalMaxSpeedF;
|
||||
}
|
||||
return procMoveInit();
|
||||
}
|
||||
|
|
@ -3465,7 +3461,7 @@ int daHorse_c::procWait() {
|
|||
return 1;
|
||||
}
|
||||
|
||||
f32 enemy_search_range = HIO.enemy_search_range;
|
||||
f32 enemy_search_range = m_hio->m.enemy_search_range;
|
||||
if ((!checkInputOnR() || !checkStateFlg0(FLG0_UNK_1)) && fopAcIt_Judge((fopAcIt_JudgeFunc)daHorse_searchEnemy, &enemy_search_range) != NULL) {
|
||||
onResetStateFlg0(RFLG0_ENEMY_SEARCH);
|
||||
|
||||
|
|
@ -3593,12 +3589,12 @@ int daHorse_c::procMove() {
|
|||
}
|
||||
}
|
||||
|
||||
if (m_demoMode == 2 && speedF > (HIO.walk_to_fastwalk_rate * m_normalMaxSpeedF)) {
|
||||
speedF = HIO.walk_to_fastwalk_rate * m_normalMaxSpeedF;
|
||||
} else if (m_demoMode == 10 && speedF > (HIO.wait_to_walk_rate * m_normalMaxSpeedF)) {
|
||||
speedF = HIO.wait_to_walk_rate * m_normalMaxSpeedF;
|
||||
} else if (m_demoMode == 11 && speedF > (HIO.fastwalk_to_run_rate * m_normalMaxSpeedF)) {
|
||||
speedF = HIO.fastwalk_to_run_rate * m_normalMaxSpeedF;
|
||||
if (m_demoMode == 2 && speedF > (m_hio->m.walk_to_fastwalk_rate * m_normalMaxSpeedF)) {
|
||||
speedF = m_hio->m.walk_to_fastwalk_rate * m_normalMaxSpeedF;
|
||||
} else if (m_demoMode == 10 && speedF > (m_hio->m.wait_to_walk_rate * m_normalMaxSpeedF)) {
|
||||
speedF = m_hio->m.wait_to_walk_rate * m_normalMaxSpeedF;
|
||||
} else if (m_demoMode == 11 && speedF > (m_hio->m.fastwalk_to_run_rate * m_normalMaxSpeedF)) {
|
||||
speedF = m_hio->m.fastwalk_to_run_rate * m_normalMaxSpeedF;
|
||||
}
|
||||
|
||||
if (checkStateFlg0(daHorse_FLG0(FLG0_UNK_200000 | FLG0_UNK_100000)) && !m_acch.ChkGroundHit()) {
|
||||
|
|
@ -3612,8 +3608,8 @@ int daHorse_c::procMove() {
|
|||
} else if (!checkStateFlg0(FLG0_UNK_10000000) && checkEndResetStateFlg0(daHorse_ERFLG0(ERFLG0_UNK_20 | ERFLG0_UNK_1))) {
|
||||
procJumpInit(0);
|
||||
} else if (var_r30 == 5) {
|
||||
field_0x1768 = HIO.cliff_jump_horizontal;
|
||||
field_0x176c = HIO.cliff_jump_vertical + current.pos.y;
|
||||
field_0x1768 = m_hio->m.cliff_jump_horizontal;
|
||||
field_0x176c = m_hio->m.cliff_jump_vertical + current.pos.y;
|
||||
field_0x1770 = field_0x1768;
|
||||
procJumpInit(1);
|
||||
} else if (var_r30 == 1) {
|
||||
|
|
@ -3658,17 +3654,17 @@ int daHorse_c::procStopInit() {
|
|||
offStateFlg0(daHorse_FLG0(FLG0_TURN_CANCEL_KEEP | FLG0_PLAYER_BACK_RIDE_LASH | FLG0_UNK_800 | FLG0_UNK_2));
|
||||
field_0x171a = 0;
|
||||
|
||||
if (m_demoMode == 8 || m_demoMode == 16 || m_demoMode == 14 || checkStateFlg0(FLG0_UNK_40000000) || (speedF * (1.0f / m_normalMaxSpeedF)) < HIO.run_to_fastrun_rate) {
|
||||
setSingleAnime(ANM_HS_STOP_SLOW, HIO.faststop_anm_speed, 0.0f, -1, HIO.faststop_interpolation, 0);
|
||||
field_0x177C = HIO.fast_stop_cancel_frame;
|
||||
if (m_demoMode == 8 || m_demoMode == 16 || m_demoMode == 14 || checkStateFlg0(FLG0_UNK_40000000) || (speedF * (1.0f / m_normalMaxSpeedF)) < m_hio->m.run_to_fastrun_rate) {
|
||||
setSingleAnime(ANM_HS_STOP_SLOW, m_hio->m.faststop_anm_speed, 0.0f, -1, m_hio->m.faststop_interpolation, 0);
|
||||
field_0x177C = m_hio->m.fast_stop_cancel_frame;
|
||||
|
||||
if (checkStateFlg0(FLG0_UNK_40000000)) {
|
||||
offStateFlg0(FLG0_UNK_40000000);
|
||||
field_0x171a = 1;
|
||||
}
|
||||
} else {
|
||||
setSingleAnime(ANM_HS_STOP_STAND, HIO.faststop_stand_anm_speed, 0.0f, -1, HIO.faststop_interpolation, 0);
|
||||
field_0x177C = HIO.faststop_stand_cancel_frame;
|
||||
setSingleAnime(ANM_HS_STOP_STAND, m_hio->m.faststop_stand_anm_speed, 0.0f, -1, m_hio->m.faststop_interpolation, 0);
|
||||
field_0x177C = m_hio->m.faststop_stand_cancel_frame;
|
||||
}
|
||||
|
||||
field_0x16b7 = 1;
|
||||
|
|
@ -3678,12 +3674,12 @@ int daHorse_c::procStopInit() {
|
|||
field_0x1774 = 2.7f;
|
||||
field_0x171c = 1;
|
||||
} else if (speedF <= m_normalMaxSpeedF) {
|
||||
field_0x1774 = HIO.faststop_deceleration_slow;
|
||||
field_0x1774 = m_hio->m.faststop_deceleration_slow;
|
||||
} else {
|
||||
f32 var_f31 = (m_normalMaxSpeedF * m_normalMaxSpeedF) / (2.0f * HIO.faststop_deceleration_slow);
|
||||
f32 var_f31 = (m_normalMaxSpeedF * m_normalMaxSpeedF) / (2.0f * m_hio->m.faststop_deceleration_slow);
|
||||
field_0x1774 = (speedF * speedF) / (2.f * var_f31);
|
||||
if (field_0x1774 > HIO.faststop_deceleration) {
|
||||
field_0x1774 = HIO.faststop_deceleration;
|
||||
if (field_0x1774 > m_hio->m.faststop_deceleration) {
|
||||
field_0x1774 = m_hio->m.faststop_deceleration;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3799,11 +3795,11 @@ int daHorse_c::procTurnInit(int param_0) {
|
|||
m_procID = PROC_TURN_e;
|
||||
|
||||
resetNeckAnime();
|
||||
setSingleAnime(ANM_HS_STAND, HIO.stand_anm_speed, 0.0f, -1, HIO.stand_interpolation, 0);
|
||||
setSingleAnime(ANM_HS_STAND, m_hio->m.stand_anm_speed, 0.0f, -1, m_hio->m.stand_interpolation, 0);
|
||||
|
||||
field_0x1774 = 52.0f;
|
||||
field_0x1778 = 0.09817477f;
|
||||
field_0x177C = HIO.stand_cancel_frame;
|
||||
field_0x177C = m_hio->m.stand_cancel_frame;
|
||||
field_0x1780 = 20.0f;
|
||||
field_0x1784 = 53.0f;
|
||||
speedF = 0.0f;
|
||||
|
|
@ -3815,11 +3811,7 @@ int daHorse_c::procTurnInit(int param_0) {
|
|||
field_0x171e = shape_angle.y + 0x8000;
|
||||
|
||||
if (!dComIfGp_event_runCheck() && !checkStateFlg0(FLG0_UNK_4000000)) {
|
||||
#if PLATFORM_GCN || PLATFORM_WII
|
||||
field_0x170a += 0x8000;
|
||||
#else
|
||||
field_0x170a += (s16)0x8000;
|
||||
#endif
|
||||
field_0x170a += (s16)(f32)0x8000;
|
||||
} else if (checkStateFlg0(FLG0_UNK_4000000)) {
|
||||
field_0x171e = shape_angle.y;
|
||||
}
|
||||
|
|
@ -3997,9 +3989,9 @@ int daHorse_c::procJumpInit(int param_0) {
|
|||
field_0x1720 = param_0;
|
||||
|
||||
if (param_0) {
|
||||
setSingleAnime(ANM_HS_JUMP_START_CLIFT, HIO.cliff_jump_anm_speed, HIO.cliff_jump_start_frame, HIO.cliff_jump_end_frame, HIO.cliff_jump_interpolation, 0);
|
||||
setSingleAnime(ANM_HS_JUMP_START_CLIFT, m_hio->m.cliff_jump_anm_speed, m_hio->m.cliff_jump_start_frame, m_hio->m.cliff_jump_end_frame, m_hio->m.cliff_jump_interpolation, 0);
|
||||
} else {
|
||||
setSingleAnime(ANM_HS_JUMP_START, HIO.jump_anm_speed, HIO.jump_start_frame, HIO.jump_end_frame, HIO.jump_interpolation, 0);
|
||||
setSingleAnime(ANM_HS_JUMP_START, m_hio->m.jump_anm_speed, m_hio->m.jump_start_frame, m_hio->m.jump_end_frame, m_hio->m.jump_interpolation, 0);
|
||||
}
|
||||
|
||||
if (speedF < 0.75f * m_normalMaxSpeedF) {
|
||||
|
|
@ -4012,14 +4004,14 @@ int daHorse_c::procJumpInit(int param_0) {
|
|||
speedF *= field_0x1768 / JMAFastSqrt((field_0x1768 * field_0x1768) + (temp_f31 * temp_f31));
|
||||
|
||||
field_0x171a = field_0x1768 / speedF;
|
||||
if (field_0x171a < HIO.min_jump_time) {
|
||||
field_0x171a = HIO.min_jump_time;
|
||||
if (field_0x171a < m_hio->m.min_jump_time) {
|
||||
field_0x171a = m_hio->m.min_jump_time;
|
||||
speedF = field_0x1768 / (f32)field_0x171a;
|
||||
}
|
||||
|
||||
field_0x171e = field_0x1770 / speedF;
|
||||
if (field_0x171e < HIO.min_jump_time) {
|
||||
field_0x171e = HIO.min_jump_time;
|
||||
if (field_0x171e < m_hio->m.min_jump_time) {
|
||||
field_0x171e = m_hio->m.min_jump_time;
|
||||
}
|
||||
|
||||
field_0x177C = (-2.0f * temp_f31) / (f32)(field_0x171e * field_0x171e);
|
||||
|
|
@ -4048,11 +4040,11 @@ int daHorse_c::procJump() {
|
|||
|
||||
if (m_anmIdx[0] == ANM_HS_JUMP_START_CLIFT) {
|
||||
if (m_frameCtrl[0].checkAnmEnd()) {
|
||||
setSingleAnime(ANM_HS_JUMP_MIDDLE, HIO.cliff_air_anm_speed, HIO.cliff_air_start_frame, HIO.cliff_air_end_frame, HIO.cliff_air_interpolation, 0);
|
||||
setSingleAnime(ANM_HS_JUMP_MIDDLE, m_hio->m.cliff_air_anm_speed, m_hio->m.cliff_air_start_frame, m_hio->m.cliff_air_end_frame, m_hio->m.cliff_air_interpolation, 0);
|
||||
}
|
||||
} else if (m_anmIdx[0] == ANM_HS_JUMP_START) {
|
||||
if (m_frameCtrl[0].checkAnmEnd()) {
|
||||
int temp_r28 = (f32)field_0x171a - ((1.0f / HIO.jump_anm_speed) * (f32)(m_frameCtrl[0].getEnd() - m_frameCtrl[0].getStart()));
|
||||
int temp_r28 = (f32)field_0x171a - ((1.0f / m_hio->m.jump_anm_speed) * (f32)(m_frameCtrl[0].getEnd() - m_frameCtrl[0].getStart()));
|
||||
if (temp_r28 <= 0) {
|
||||
temp_r28 += field_0x171e;
|
||||
gravity = field_0x177C;
|
||||
|
|
@ -4060,14 +4052,14 @@ int daHorse_c::procJump() {
|
|||
if (temp_r28 <= 0) {
|
||||
setSingleAnime(ANM_HS_JUMP_END, 0.0f, 0.0f, -1, field_0x171e, 0);
|
||||
} else {
|
||||
setSingleAnime(ANM_HS_JUMP_MIDDLE, (HIO.air_end_frame - 6.0f) / temp_r28, 6.0f, HIO.air_end_frame, HIO.air_interpolation, 0);
|
||||
setSingleAnime(ANM_HS_JUMP_MIDDLE, (m_hio->m.air_end_frame - 6.0f) / temp_r28, 6.0f, m_hio->m.air_end_frame, m_hio->m.air_interpolation, 0);
|
||||
}
|
||||
} else {
|
||||
setSingleAnime(ANM_HS_JUMP_MIDDLE, (6.0f - HIO.air_start_frame) / temp_r28, HIO.air_start_frame, 6, HIO.air_interpolation, 0);
|
||||
setSingleAnime(ANM_HS_JUMP_MIDDLE, (6.0f - m_hio->m.air_start_frame) / temp_r28, m_hio->m.air_start_frame, 6, m_hio->m.air_interpolation, 0);
|
||||
}
|
||||
}
|
||||
} else if (m_anmIdx[0] == ANM_HS_JUMP_MIDDLE && field_0x1720 == 0 && m_frameCtrl[0].checkAnmEnd() && m_frameCtrl[0].getEnd() == 6) {
|
||||
setSingleAnime(ANM_HS_JUMP_MIDDLE, (1.0f + (HIO.air_end_frame - 6.0f)) / field_0x171e, 7.0f, HIO.air_end_frame, -1.0f, 0);
|
||||
setSingleAnime(ANM_HS_JUMP_MIDDLE, (1.0f + (m_hio->m.air_end_frame - 6.0f)) / field_0x171e, 7.0f, m_hio->m.air_end_frame, -1.0f, 0);
|
||||
gravity = field_0x177C;
|
||||
}
|
||||
|
||||
|
|
@ -4082,11 +4074,11 @@ int daHorse_c::procLandInit(f32 i_speedF, BOOL param_1) {
|
|||
dComIfGp_getVibration().StartShock(VIBMODE_S_POWER2, 1, cXyz(0.0f, 1.0f, 0.0f));
|
||||
|
||||
if (param_1) {
|
||||
setSingleAnime(ANM_HS_JUMP_END, HIO.cliff_land_anm_speed, HIO.cliff_land_start_frame, HIO.cliff_land_end_frame, HIO.cliff_land_interpolation, 0);
|
||||
field_0x177C = HIO.cliff_land_cancel_frame;
|
||||
setSingleAnime(ANM_HS_JUMP_END, m_hio->m.cliff_land_anm_speed, m_hio->m.cliff_land_start_frame, m_hio->m.cliff_land_end_frame, m_hio->m.cliff_land_interpolation, 0);
|
||||
field_0x177C = m_hio->m.cliff_land_cancel_frame;
|
||||
} else {
|
||||
setSingleAnime(ANM_HS_JUMP_END, HIO.land_anm_speed, HIO.land_start_frame, HIO.land_end_frame, HIO.land_interpolation, 0);
|
||||
field_0x177C = HIO.land_cancel_frame;
|
||||
setSingleAnime(ANM_HS_JUMP_END, m_hio->m.land_anm_speed, m_hio->m.land_start_frame, m_hio->m.land_end_frame, m_hio->m.land_interpolation, 0);
|
||||
field_0x177C = m_hio->m.land_cancel_frame;
|
||||
}
|
||||
|
||||
speedF = i_speedF;
|
||||
|
|
@ -4109,16 +4101,16 @@ int daHorse_c::procLand() {
|
|||
if (temp_r3 == 2) {
|
||||
speedF = 0.0f;
|
||||
} else if (temp_r3 != 0) {
|
||||
cLib_chaseF(&speedF, 0.0f, HIO.stopping_deceleration);
|
||||
cLib_chaseF(&speedF, 0.0f, m_hio->m.stopping_deceleration);
|
||||
}
|
||||
|
||||
if (field_0x171a != 0) {
|
||||
cLib_chaseF(&speedF, 0.0f, HIO.stopping_deceleration);
|
||||
cLib_chaseF(&speedF, 0.0f, m_hio->m.stopping_deceleration);
|
||||
dComIfGp_evmng_cutEnd(m_demoStaffId);
|
||||
setMoveAnime(-1.0f);
|
||||
} else if (frame_ctrl->checkAnmEnd()) {
|
||||
if (m_demoMode == 7) {
|
||||
cLib_chaseF(&speedF, 0.0f, HIO.stopping_deceleration);
|
||||
cLib_chaseF(&speedF, 0.0f, m_hio->m.stopping_deceleration);
|
||||
dComIfGp_evmng_cutEnd(m_demoStaffId);
|
||||
setMoveAnime(3.0f);
|
||||
field_0x171a = 1;
|
||||
|
|
@ -4137,7 +4129,7 @@ int daHorse_c::procLargeDamageInit() {
|
|||
m_procID = PROC_LARGE_DAMAGE_e;
|
||||
|
||||
resetNeckAnime();
|
||||
setSingleAnime(ANM_HS_STAND, HIO.stand_anm_speed, 0.0f, -1, HIO.stand_interpolation, 0);
|
||||
setSingleAnime(ANM_HS_STAND, m_hio->m.stand_anm_speed, 0.0f, -1, m_hio->m.stand_interpolation, 0);
|
||||
|
||||
current.angle.y = m_cowHitAngle;
|
||||
speedF = 60.0f;
|
||||
|
|
@ -4247,16 +4239,16 @@ int daHorse_c::execute() {
|
|||
daAlink_c* player_p = daAlink_getAlinkActorClass();
|
||||
|
||||
#if PLATFORM_SHIELD || PLATFORM_WII
|
||||
l_autoUpHeight = HIO.m0D0;
|
||||
l_autoUpHeight = m_hio->m.m0D0;
|
||||
m_acchcir[0].SetWall(l_autoUpHeight + 0.1f, 60.0f);
|
||||
if (checkStateFlg0(FLG0_UNK_2000)) {
|
||||
m_normalMaxSpeedF = HIO.kakariko_max_speed;
|
||||
m_lashAddSpeed = HIO.kakariko_add_lash_speed;
|
||||
m_normalMaxSpeedF = m_hio->m.kakariko_max_speed;
|
||||
m_lashAddSpeed = m_hio->m.kakariko_add_lash_speed;
|
||||
} else {
|
||||
m_normalMaxSpeedF = HIO.max_speed;
|
||||
m_lashAddSpeed = HIO.add_lash_speed;
|
||||
m_normalMaxSpeedF = m_hio->m.max_speed;
|
||||
m_lashAddSpeed = m_hio->m.add_lash_speed;
|
||||
}
|
||||
field_0x1764 = HIO.walk_to_fastwalk_rate * m_normalMaxSpeedF;
|
||||
field_0x1764 = m_hio->m.walk_to_fastwalk_rate * m_normalMaxSpeedF;
|
||||
m_lashMaxSpeedF = m_normalMaxSpeedF + m_lashAddSpeed;
|
||||
#endif
|
||||
|
||||
|
|
@ -4476,7 +4468,7 @@ int daHorse_c::execute() {
|
|||
|
||||
if (!checkInputOnR() && fabsf(speedF) < 0.05f) {
|
||||
offStateFlg0(FLG0_UNK_8);
|
||||
} else if (fabsf(speedF) > 0.2f * HIO.max_backward_speed || (m_anmIdx[0] == ANM_HS_WALK_START && m_frameCtrl[0].getFrame() > 2.0f)) {
|
||||
} else if (fabsf(speedF) > 0.2f * m_hio->m.max_backward_speed || (m_anmIdx[0] == ANM_HS_WALK_START && m_frameCtrl[0].getFrame() > 2.0f)) {
|
||||
onStateFlg0(FLG0_UNK_8);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -137,9 +137,6 @@ const daNpcRafrel_HIOParam daNpcRafrel_Param_c::m = {
|
|||
static char* l_myName = "Rafrel";
|
||||
|
||||
#if DEBUG
|
||||
// Fixes Debug function order
|
||||
#pragma nosyminline on
|
||||
|
||||
daNpcRafrel_HIO_c::daNpcRafrel_HIO_c() {
|
||||
m = daNpcRafrel_Param_c::m;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ bool cBgS::LineCross(cBgS_LinChk* p_line) {
|
|||
elm++;
|
||||
}
|
||||
|
||||
return p_line->ChkHit() ? true : false;
|
||||
return p_line->ChkHit();
|
||||
}
|
||||
|
||||
f32 cBgS::GroundCross(cBgS_GndChk* p_gnd) {
|
||||
|
|
@ -825,3 +825,9 @@ f32 dBgS_GetNY(cBgS_PolyInfo const& poly) {
|
|||
dComIfG_Bgsp().GetTriPla(poly, &pla);
|
||||
return pla.mNormal.y;
|
||||
}
|
||||
|
||||
// TODO hack just to get the inlines to appear for debug
|
||||
static void dummy(dBgS& i_bgs) {
|
||||
i_bgs.LineCross(NULL);
|
||||
i_bgs.GroundCross(NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue