mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
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:
@@ -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
|
||||
|
||||
+5
-5
@@ -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;
|
||||
|
||||
+25
-20
@@ -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
|
||||
|
||||
+51
-2
@@ -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) {
|
||||
|
||||
+77
-72
@@ -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;
|
||||
|
||||
+129
-137
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
}
|
||||
|
||||
+7
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user