mirror of
https://github.com/zeldaret/tp
synced 2026-05-22 22:44:28 -04:00
various d_bg debug cleanup / d_menu_window_HIO debug (#3132)
* various d_bg debug cleanup * matching forward decl for compiler compatibility * fix build
This commit is contained in:
@@ -20,6 +20,9 @@ public:
|
||||
|
||||
/* 0x14 */ cM3dGAab mM3dGAab;
|
||||
/* 0x30 */ cBgS_ShdwDraw_Callback mCallbackFun;
|
||||
#if DEBUG
|
||||
/* 0x34 */ int field_0x34;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* C_BG_S_SHDW_DRAW_H */
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
cBgW_BgId() { Ct(); }
|
||||
void Ct() { m_id = 0x100; }
|
||||
|
||||
u16 GetId() const { return m_id; }
|
||||
int GetId() const { return m_id; }
|
||||
};
|
||||
|
||||
bool cBgW_CheckBGround(float a1);
|
||||
|
||||
@@ -35,16 +35,16 @@ public:
|
||||
const f32 GetMinX(void) const { return mMin.x; }
|
||||
const f32 GetMinY(void) const { return mMin.y; }
|
||||
const f32 GetMinZ(void) const { return mMin.z; }
|
||||
bool Cross(const cM3dGLin *param_1) {
|
||||
bool Cross(const cM3dGLin *param_1) const {
|
||||
return cM3d_Cross_MinMaxBoxLine(GetMinP(), GetMaxP(), (Vec*)¶m_1->GetStartP(), (Vec*)¶m_1->GetEndP());
|
||||
}
|
||||
bool Cross(const cM3dGAab *param_1) {
|
||||
bool Cross(const cM3dGAab *param_1) const {
|
||||
return cM3d_Cross_AabAab(this, param_1);
|
||||
}
|
||||
bool Cross(const cM3dGCyl *param_1) {
|
||||
bool Cross(const cM3dGCyl *param_1) const {
|
||||
return cM3d_Cross_AabCyl(this, param_1);
|
||||
}
|
||||
bool Cross(const cM3dGSph *param_1) {
|
||||
bool Cross(const cM3dGSph *param_1) const {
|
||||
return cM3d_Cross_AabSph(this, param_1);
|
||||
}
|
||||
}; // Size = 0x1C
|
||||
|
||||
@@ -30,6 +30,8 @@ public:
|
||||
cM3dGCir(void);
|
||||
virtual ~cM3dGCir(void);
|
||||
void Set(f32, f32, f32, f32);
|
||||
|
||||
f32 GetHeight() const { return mPosZ; }
|
||||
};
|
||||
|
||||
#endif /* C_M3D_G_CIR_H */
|
||||
|
||||
@@ -31,8 +31,8 @@ public:
|
||||
cM3d_CalcPla(v1, v2, v3, &mNormal, &mD);
|
||||
}
|
||||
|
||||
f32 getCrossY_NonIsZero(const cXyz *param_1) {
|
||||
return ((-mNormal.x * param_1->x - mNormal.z * param_1->z) - mD) / mNormal.y;
|
||||
f32 getCrossY_NonIsZero(const cXyz& param_1) const {
|
||||
return ((-mNormal.x * param_1.x - mNormal.z * param_1.z) - mD) / mNormal.y;
|
||||
}
|
||||
|
||||
bool cross(cM3dGLin const& line, Vec& point) {
|
||||
|
||||
+120
-57
@@ -13,7 +13,7 @@ class cBgS_ChkElm {
|
||||
public:
|
||||
/* 0x00 */ dBgW_Base* m_bgw_base_ptr;
|
||||
/* 0x04 */ bool m_used;
|
||||
/* 0x08 */ u32 m_actor_id;
|
||||
/* 0x08 */ fpc_ProcID m_actor_id;
|
||||
/* 0x0C */ fopAc_ac_c* m_actor_ptr;
|
||||
/* 0x10 vtable */
|
||||
|
||||
@@ -50,6 +50,7 @@ public:
|
||||
bool GetTriPnt(cBgS_PolyInfo const&, cXyz*, cXyz*, cXyz*) const;
|
||||
void ShdwDraw(cBgS_ShdwDraw*);
|
||||
u32 GetGrpInf(cBgS_PolyInfo const&) const;
|
||||
void Draw();
|
||||
|
||||
virtual ~cBgS() {}
|
||||
virtual void Ct();
|
||||
@@ -67,40 +68,124 @@ u8 dKy_pol_sound_get(cBgS_PolyInfo const* param_0);
|
||||
class dBgS_HIO : public JORReflexible {
|
||||
public:
|
||||
#if DEBUG
|
||||
enum flags_e {
|
||||
FLAG_ACCH_WALL_OFF_e = 0x2,
|
||||
FLAG_CHECK_COUNTER_e = 0x4,
|
||||
FLAG_ACCH_WALL_TIMER_e = 0x8,
|
||||
FLAG_OBJ_LINE_CHECK_e = 0x10,
|
||||
FLAG_ACCH_DRAW_WALL_e = 0x400,
|
||||
FLAG_ROOF_TIMER_e = 0x2000,
|
||||
FLAG_ROOF_OFF_e = 0x4000,
|
||||
|
||||
FLAG2_GND_CHK_e = 0x1,
|
||||
FLAG2_SHAPE_DISP_e = 0x2,
|
||||
FLAG2_GROUND_CHECK_TIMER_e = 0x4,
|
||||
FLAG2_SPL_OFF_e = 0x8,
|
||||
FLAG2_SPL_TIMER_e = 0x10,
|
||||
FLAG2_LINE_OFF_e = 0x40,
|
||||
FLAG2_LINE_TIMER_e = 0x80,
|
||||
FLAG2_SHDW_DRAW_OFF_e = 0x100,
|
||||
FLAG2_SHDW_DRAW_TIMER_e = 0x200,
|
||||
FLAG2_CAPTPOLY_OFF_e = 0x800,
|
||||
FLAG2_CAPTPOLY_TIMER_e = 0x1000,
|
||||
FLAG2_SPH_CHK_OFF_e = 0x2000,
|
||||
FLAG2_SPH_CHK_TIMER_e = 0x4000,
|
||||
};
|
||||
|
||||
dBgS_HIO() {
|
||||
field_0x6 = 0;
|
||||
field_0x8 = 0;
|
||||
m_flags = 0;
|
||||
m_flags2 = 0;
|
||||
|
||||
field_0xc.x = field_0xc.y = field_0xc.z = 0.0f;
|
||||
field_0x18.x = field_0x18.y = field_0x18.z = 0.0f;
|
||||
field_0x24.x = field_0x24.y = field_0x24.z = 0.0f;
|
||||
m_linecheck_start.x = m_linecheck_start.y = m_linecheck_start.z = 0.0f;
|
||||
m_linecheck_end.x = m_linecheck_end.y = m_linecheck_end.z = 0.0f;
|
||||
m_gndcheck_pos.x = m_gndcheck_pos.y = m_gndcheck_pos.z = 0.0f;
|
||||
|
||||
field_0x30 = -1;
|
||||
m_errorCheck_actor_num = -1;
|
||||
}
|
||||
|
||||
virtual void genMessage(JORMContext*);
|
||||
virtual ~dBgS_HIO();
|
||||
|
||||
BOOL ChkLineOff();
|
||||
BOOL ChkCheckCounter();
|
||||
BOOL ChkLineTimer();
|
||||
BOOL ChkGroundCheckTimer();
|
||||
bool ChkLineOff() { return m_flags2 & FLAG2_LINE_OFF_e; }
|
||||
bool ChkCheckCounter() { return m_flags & FLAG_CHECK_COUNTER_e; }
|
||||
bool ChkLineTimer() { return m_flags2 & FLAG2_LINE_TIMER_e; }
|
||||
bool ChkGroundCheckTimer() { return m_flags2 & FLAG2_GROUND_CHECK_TIMER_e; }
|
||||
bool ChkObjLineCheck() { return m_flags & FLAG_OBJ_LINE_CHECK_e; }
|
||||
bool ChkGndCheck() { return m_flags2 & FLAG2_GND_CHK_e; }
|
||||
bool ChkCaptPolyTimer() { return m_flags2 & FLAG2_CAPTPOLY_TIMER_e; }
|
||||
bool ChkCaptPolyOff() { return m_flags2 & FLAG2_CAPTPOLY_OFF_e; }
|
||||
bool ChkShdwDrawOff() { return m_flags2 & FLAG2_SHDW_DRAW_OFF_e; }
|
||||
bool ChkShdwDrawTimer() { return m_flags2 & FLAG2_SHDW_DRAW_TIMER_e; }
|
||||
bool ChkAcchWallOff() { return m_flags & FLAG_ACCH_WALL_OFF_e; }
|
||||
bool ChkAcchWallTimer() { return m_flags & FLAG_ACCH_WALL_TIMER_e; }
|
||||
bool ChkRoofTimer() { return m_flags & FLAG_ROOF_TIMER_e; }
|
||||
bool ChkRoofOff() { return m_flags & FLAG_ROOF_OFF_e; }
|
||||
bool ChkSplOff() { return m_flags2 & FLAG2_SPL_OFF_e; }
|
||||
bool ChkSplTimer() { return m_flags2 & FLAG2_SPL_TIMER_e; }
|
||||
bool ChkSphChkOff() { return m_flags2 & FLAG2_SPH_CHK_OFF_e; }
|
||||
bool ChkSphChkTimer() { return m_flags2 & FLAG2_SPH_CHK_TIMER_e; }
|
||||
bool ChkShapeDisp() { return m_flags2 & FLAG2_SHAPE_DISP_e; }
|
||||
bool ChkAcchDrawWall() { return m_flags & FLAG_ACCH_DRAW_WALL_e; }
|
||||
|
||||
/* 0x04 */ u8 field_0x4[0x6 - 0x4];
|
||||
/* 0x06 */ u16 field_0x6;
|
||||
/* 0x08 */ u16 field_0x8;
|
||||
/* 0x0C */ cXyz field_0xc;
|
||||
/* 0x18 */ cXyz field_0x18;
|
||||
/* 0x24 */ cXyz field_0x24;
|
||||
/* 0x30 */ int field_0x30;
|
||||
/* 0x04 */ s8 id;
|
||||
/* 0x06 */ u16 m_flags;
|
||||
/* 0x08 */ u16 m_flags2;
|
||||
/* 0x0C */ cXyz m_linecheck_start;
|
||||
/* 0x18 */ cXyz m_linecheck_end;
|
||||
/* 0x24 */ cXyz m_gndcheck_pos;
|
||||
/* 0x30 */ s32 m_errorCheck_actor_num;
|
||||
#endif
|
||||
};
|
||||
|
||||
extern int g_line_counter;
|
||||
extern OSStopwatch s_line_sw;
|
||||
class dBgS_InsideHIO : public JORReflexible {
|
||||
public:
|
||||
#if DEBUG
|
||||
enum flags_e {
|
||||
FLAG_DISP_POLY_e = 0x1,
|
||||
FLAG_DISP_DP_AREA_e = 0x2,
|
||||
FLAG_WHITE_WIRE_e = 0x4,
|
||||
FLAG_PLAYER_AROUND_e = 0x8,
|
||||
FLAG_DISP_WATER_POLY_e = 0x10,
|
||||
FLAG_GROUND_OFF_e = 0x20,
|
||||
FLAG_WALL_OFF_e = 0x40,
|
||||
FLAG_ROOF_OFF_e = 0x80,
|
||||
FLAG_GNDCHK_PLAYER_UNDER_e = 0x100,
|
||||
};
|
||||
|
||||
extern int g_ground_counter;
|
||||
extern OSStopwatch s_ground_sw;
|
||||
dBgS_InsideHIO() {
|
||||
m_flags = FLAG_PLAYER_AROUND_e;
|
||||
|
||||
m_raise_amount = 1.0f;
|
||||
|
||||
m_p0.x = 100.0f;
|
||||
m_p0.y = 0.0f;
|
||||
m_p0.z = 0.0f;
|
||||
|
||||
m_p1.x = 0.0f;
|
||||
m_p1.y = 0.0f;
|
||||
m_p1.z = 0.0f;
|
||||
}
|
||||
|
||||
virtual void genMessage(JORMContext*);
|
||||
virtual ~dBgS_InsideHIO();
|
||||
|
||||
BOOL ChkWallOff() { return m_flags & FLAG_WALL_OFF_e; }
|
||||
BOOL ChkRoofOff() { return m_flags & FLAG_ROOF_OFF_e; }
|
||||
BOOL ChkGroundOff() { return m_flags & FLAG_GROUND_OFF_e; }
|
||||
BOOL ChkGndChkPlayerUnder() { return m_flags & FLAG_GNDCHK_PLAYER_UNDER_e; }
|
||||
BOOL ChkWhiteWire() { return m_flags & FLAG_WHITE_WIRE_e; }
|
||||
BOOL ChkDispWaterPoly() { return m_flags & FLAG_DISP_WATER_POLY_e; }
|
||||
BOOL ChkDispDpArea() { return m_flags & FLAG_DISP_DP_AREA_e; }
|
||||
BOOL ChkPlayerAround() { return m_flags & FLAG_PLAYER_AROUND_e; }
|
||||
BOOL ChkDispPoly() { return m_flags & FLAG_DISP_POLY_e; }
|
||||
|
||||
/* 0x04 */ s8 id;
|
||||
/* 0x06 */ u16 m_flags;
|
||||
/* 0x08 */ f32 m_raise_amount;
|
||||
/* 0x0C */ cXyz m_p0;
|
||||
/* 0x18 */ cXyz m_p1;
|
||||
#endif
|
||||
};
|
||||
|
||||
class dBgS : public cBgS {
|
||||
public:
|
||||
@@ -149,53 +234,31 @@ public:
|
||||
|
||||
bool WaterChk(dBgS_SplGrpChk* chk) { return SplGrpChk(chk); }
|
||||
u32 GetMtrlSndId(const cBgS_PolyInfo& param_0) { return dKy_pol_sound_get(¶m_0); }
|
||||
void DebugDrawPoly(dBgW_Base *param_1) {}
|
||||
void DebugDrawPoly(dBgW_Base const& param_1) {}
|
||||
void DrawPoly(cBgS_PolyInfo const& param_0, GXColor const& param_1);
|
||||
fopAc_ac_c* GetActorPointer(cBgS_PolyInfo const& param_0) const { return cBgS::GetActorPointer(param_0); }
|
||||
|
||||
#if DEBUG
|
||||
void DebugDrawPoly(const dBgW_Base& param_1);
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
bool LineCross(cBgS_LinChk* i_linChk);
|
||||
f32 GroundCross(cBgS_GndChk* i_gndChk);
|
||||
void ShdwDraw(cBgS_ShdwDraw*);
|
||||
#else
|
||||
bool LineCross(cBgS_LinChk* i_linChk) {
|
||||
#if 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) {
|
||||
#if 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
|
||||
}
|
||||
#endif
|
||||
|
||||
void ChkDeleteActorRegist(fopAc_ac_c*);
|
||||
|
||||
void Draw();
|
||||
void CaptPoly(dBgS_CaptPoly&);
|
||||
|
||||
#if DEBUG
|
||||
/* 0x1404 */ u8 field_0x1404[0x1408 - 0x1404];
|
||||
|
||||
+71
-69
@@ -25,7 +25,7 @@ private:
|
||||
|
||||
public:
|
||||
enum {
|
||||
/* 0x2 */ WALL_HIT = 2,
|
||||
/* 0x2 */ FLAG_WALL_HIT = 2,
|
||||
/* 0x4 */ WALL_H_DIRECT = 4,
|
||||
};
|
||||
|
||||
@@ -42,16 +42,18 @@ public:
|
||||
virtual ~dBgS_AcchCir() {}
|
||||
#endif
|
||||
|
||||
void SetWallPolyIndex(int index) { SetPolyIndex(index); }
|
||||
|
||||
f32 GetWallH() { return m_wall_h; }
|
||||
f32 GetWallR() { return m_wall_r; }
|
||||
void SetWallH(f32 h) { m_wall_h = h; }
|
||||
void ClrWallHDirect() { m_flags &= ~WALL_H_DIRECT; }
|
||||
bool ChkWallHit() { return (m_flags & WALL_HIT) != 0; }
|
||||
bool ChkWallHit() { return (m_flags & FLAG_WALL_HIT) != 0; }
|
||||
s16 GetWallAngleY() { return m_wall_angle_y; }
|
||||
bool ChkWallHDirect() { return (m_flags & WALL_H_DIRECT) != 0; }
|
||||
BOOL ChkWallHDirect() { return (m_flags & WALL_H_DIRECT); }
|
||||
f32 GetWallHDirect() { return m_wall_h_direct; }
|
||||
f32 GetWallRR() { return m_wall_rr; }
|
||||
void SetWallHit() { m_flags |= WALL_HIT; }
|
||||
void SetWallHit() { m_flags |= FLAG_WALL_HIT; }
|
||||
void SetWallAngleY(s16 i_angle) { m_wall_angle_y = i_angle; }
|
||||
cM3dGCir* GetCirP() { return &m_cir; }
|
||||
|
||||
@@ -62,26 +64,26 @@ class dBgS;
|
||||
class dBgS_Acch : public cBgS_Chk, public dBgS_Chk {
|
||||
public:
|
||||
enum {
|
||||
/* 0x000002 */ GRND_NONE = (1 << 1),
|
||||
/* 0x000004 */ WALL_NONE = (1 << 2),
|
||||
/* 0x000008 */ ROOF_NONE = (1 << 3),
|
||||
/* 0x000010 */ WALL_HIT = (1 << 4),
|
||||
/* 0x000020 */ GROUND_HIT = (1 << 5),
|
||||
/* 0x000040 */ GROUND_FIND = (1 << 6),
|
||||
/* 0x000080 */ GROUND_LANDING = (1 << 7),
|
||||
/* 0x000100 */ GROUND_AWAY = (1 << 8),
|
||||
/* 0x000200 */ ROOF_HIT = (1 << 9),
|
||||
/* 0x000400 */ WATER_NONE = (1 << 10),
|
||||
/* 0x000800 */ WATER_HIT = (1 << 11),
|
||||
/* 0x001000 */ WATER_IN = (1 << 12),
|
||||
/* 0x002000 */ LINE_CHECK = (1 << 13),
|
||||
/* 0x004000 */ LINE_CHECK_NONE = (1 << 14),
|
||||
/* 0x008000 */ CLR_SPEED_Y = (1 << 15),
|
||||
/* 0x010000 */ LINE_CHECK_HIT = (1 << 16),
|
||||
/* 0x100000 */ MOVE_BG_ONLY = (1 << 20),
|
||||
/* 0x200000 */ GND_THIN_CELLING_OFF = (1 << 21),
|
||||
/* 0x400000 */ WALL_SORT = (1 << 22),
|
||||
/* 0x800000 */ LINE_DOWN = (1 << 23),
|
||||
/* 0x000002 */ FLAG_GRND_NONE = (1 << 1),
|
||||
/* 0x000004 */ FLAG_WALL_NONE = (1 << 2),
|
||||
/* 0x000008 */ FLAG_ROOF_NONE = (1 << 3),
|
||||
/* 0x000010 */ FLAG_WALL_HIT = (1 << 4),
|
||||
/* 0x000020 */ FLAG_GROUND_HIT = (1 << 5),
|
||||
/* 0x000040 */ FLAG_GROUND_FIND = (1 << 6),
|
||||
/* 0x000080 */ FLAG_GROUND_LANDING = (1 << 7),
|
||||
/* 0x000100 */ FLAG_GROUND_AWAY = (1 << 8),
|
||||
/* 0x000200 */ FLAG_ROOF_HIT = (1 << 9),
|
||||
/* 0x000400 */ FLAG_WATER_NONE = (1 << 10),
|
||||
/* 0x000800 */ FLAG_WATER_HIT = (1 << 11),
|
||||
/* 0x001000 */ FLAG_WATER_IN = (1 << 12),
|
||||
/* 0x002000 */ FLAG_LINE_CHECK = (1 << 13),
|
||||
/* 0x004000 */ FLAG_LINE_CHECK_NONE = (1 << 14),
|
||||
/* 0x008000 */ FLAG_CLR_SPEED_Y = (1 << 15),
|
||||
/* 0x010000 */ FLAG_LINE_CHECK_HIT = (1 << 16),
|
||||
/* 0x100000 */ FLAG_MOVE_BG_ONLY = (1 << 20),
|
||||
/* 0x200000 */ FLAG_GND_THIN_CELLING_OFF = (1 << 21),
|
||||
/* 0x400000 */ FLAG_WALL_SORT = (1 << 22),
|
||||
/* 0x800000 */ FLAG_LINE_DOWN = (1 << 23),
|
||||
};
|
||||
|
||||
dBgS_Acch();
|
||||
@@ -124,56 +126,56 @@ public:
|
||||
f32 GetRoofHeight() const { return m_roof_height; }
|
||||
int GetTblSize() { return m_tbl_size; }
|
||||
void SetLin() { m_lin.SetStartEnd(*pm_old_pos, *pm_pos); }
|
||||
bool ChkGroundFind() { return (m_flags & GROUND_FIND) != 0; }
|
||||
bool ChkGroundHit() const { return (m_flags & GROUND_HIT) != 0; }
|
||||
bool ChkGroundLanding() const { return (m_flags & GROUND_LANDING) != 0; }
|
||||
void ClrGroundLanding() { m_flags &= ~GROUND_LANDING; }
|
||||
void ClrGroundAway() { m_flags &= ~GROUND_AWAY; }
|
||||
void ClrWallHit() { m_flags &= ~WALL_HIT; }
|
||||
void SetRoofNone() { m_flags |= ROOF_NONE; }
|
||||
void SetRoofHit() { m_flags |= ROOF_HIT; }
|
||||
void SetWaterNone() { m_flags |= WATER_NONE; }
|
||||
u32 ChkWallHit() const { return m_flags & WALL_HIT; }
|
||||
void OffLineCheckHit() { m_flags &= ~LINE_CHECK_HIT; }
|
||||
void OffLineCheck() { m_flags &= ~LINE_CHECK; }
|
||||
u32 ChkLineCheckNone() const { return (m_flags & LINE_CHECK_NONE) != 0; }
|
||||
u32 ChkLineCheck() const { return (m_flags & LINE_CHECK) != 0; }
|
||||
void ClrRoofHit() { m_flags &= ~ROOF_HIT; }
|
||||
void ClrWaterHit() { m_flags &= ~WATER_HIT; }
|
||||
void SetWaterHit() { m_flags |= WATER_HIT; }
|
||||
void ClrWaterIn() { m_flags &= ~WATER_IN; }
|
||||
void SetWaterIn() { m_flags |= WATER_IN; }
|
||||
const u32 MaskWaterIn() const { return m_flags & WATER_IN; }
|
||||
bool ChkGroundFind() { return (m_flags & FLAG_GROUND_FIND) != 0; }
|
||||
bool ChkGroundHit() const { return (m_flags & FLAG_GROUND_HIT) != 0; }
|
||||
bool ChkGroundLanding() const { return (m_flags & FLAG_GROUND_LANDING) != 0; }
|
||||
void ClrGroundLanding() { m_flags &= ~FLAG_GROUND_LANDING; }
|
||||
void ClrGroundAway() { m_flags &= ~FLAG_GROUND_AWAY; }
|
||||
void ClrWallHit() { m_flags &= ~FLAG_WALL_HIT; }
|
||||
void SetRoofNone() { m_flags |= FLAG_ROOF_NONE; }
|
||||
void SetRoofHit() { m_flags |= FLAG_ROOF_HIT; }
|
||||
void SetWaterNone() { m_flags |= FLAG_WATER_NONE; }
|
||||
u32 ChkWallHit() const { return m_flags & FLAG_WALL_HIT; }
|
||||
void OffLineCheckHit() { m_flags &= ~FLAG_LINE_CHECK_HIT; }
|
||||
void OffLineCheck() { m_flags &= ~FLAG_LINE_CHECK; }
|
||||
u32 ChkLineCheckNone() const { return (m_flags & FLAG_LINE_CHECK_NONE); }
|
||||
u32 ChkLineCheck() const { return (m_flags & FLAG_LINE_CHECK); }
|
||||
void ClrRoofHit() { m_flags &= ~FLAG_ROOF_HIT; }
|
||||
void ClrWaterHit() { m_flags &= ~FLAG_WATER_HIT; }
|
||||
void SetWaterHit() { m_flags |= FLAG_WATER_HIT; }
|
||||
void ClrWaterIn() { m_flags &= ~FLAG_WATER_IN; }
|
||||
void SetWaterIn() { m_flags |= FLAG_WATER_IN; }
|
||||
const u32 MaskWaterIn() const { return m_flags & FLAG_WATER_IN; }
|
||||
const bool ChkWaterIn() const { return MaskWaterIn() != 0; }
|
||||
void ClrGroundFind() { m_flags &= ~GROUND_FIND; }
|
||||
u32 MaskRoofHit() const { return m_flags & ROOF_HIT; }
|
||||
void ClrGroundFind() { m_flags &= ~FLAG_GROUND_FIND; }
|
||||
u32 MaskRoofHit() const { return m_flags & FLAG_ROOF_HIT; }
|
||||
bool ChkRoofHit() const { return MaskRoofHit() != 0; }
|
||||
void OffClrSpeedY() { m_flags |= CLR_SPEED_Y; }
|
||||
void OnClrSpeedY() { m_flags &= ~CLR_SPEED_Y; }
|
||||
bool ChkClrSpeedY() const { return !(m_flags & CLR_SPEED_Y); }
|
||||
void SetGroundFind() { m_flags |= GROUND_FIND; }
|
||||
void SetGroundHit() { m_flags |= GROUND_HIT; }
|
||||
void SetGroundLanding() { m_flags |= GROUND_LANDING; }
|
||||
void SetGroundAway() { m_flags |= GROUND_AWAY; }
|
||||
const u32 MaskWaterHit() const { return m_flags & WATER_HIT; }
|
||||
void OffClrSpeedY() { m_flags |= FLAG_CLR_SPEED_Y; }
|
||||
void OnClrSpeedY() { m_flags &= ~FLAG_CLR_SPEED_Y; }
|
||||
bool ChkClrSpeedY() const { return !(m_flags & FLAG_CLR_SPEED_Y); }
|
||||
void SetGroundFind() { m_flags |= FLAG_GROUND_FIND; }
|
||||
void SetGroundHit() { m_flags |= FLAG_GROUND_HIT; }
|
||||
void SetGroundLanding() { m_flags |= FLAG_GROUND_LANDING; }
|
||||
void SetGroundAway() { m_flags |= FLAG_GROUND_AWAY; }
|
||||
const u32 MaskWaterHit() const { return m_flags & FLAG_WATER_HIT; }
|
||||
const bool ChkWaterHit() const { return MaskWaterHit() != 0; }
|
||||
void ClrWaterNone() { m_flags &= ~WATER_NONE; }
|
||||
void ClrWaterNone() { m_flags &= ~FLAG_WATER_NONE; }
|
||||
void SetWaterCheckOffset(f32 offset) { m_wtr_chk_offset = offset; }
|
||||
void OnLineCheck() { m_flags |= LINE_CHECK; }
|
||||
void ClrRoofNone() { m_flags &= ~ROOF_NONE; }
|
||||
void OnLineCheck() { m_flags |= FLAG_LINE_CHECK; }
|
||||
void ClrRoofNone() { m_flags &= ~FLAG_ROOF_NONE; }
|
||||
void SetRoofCrrHeight(f32 height) { m_roof_crr_height = height; }
|
||||
void SetWtrChkMode(int mode) { m_wtr_mode = mode; }
|
||||
void SetGrndNone() { m_flags |= GRND_NONE; }
|
||||
void ClrGrndNone() { m_flags &= ~GRND_NONE; }
|
||||
bool ChkMoveBGOnly() const { return (m_flags & MOVE_BG_ONLY) != 0; }
|
||||
void SetWallHit() { m_flags |= WALL_HIT; }
|
||||
void ClrWallNone() { m_flags &= ~WALL_NONE; }
|
||||
void OnLineCheckNone() { m_flags |= LINE_CHECK_NONE; }
|
||||
void OffLineCheckNone() { m_flags &= ~LINE_CHECK_NONE; }
|
||||
void SetWallNone() { m_flags |= WALL_NONE; }
|
||||
void OnLineCheckHit() { m_flags |= LINE_CHECK_HIT; }
|
||||
bool ChkGroundAway() const { return (m_flags & GROUND_AWAY) != 0; }
|
||||
void ClrGroundHit() { m_flags &= ~GROUND_HIT; }
|
||||
void SetGrndNone() { m_flags |= FLAG_GRND_NONE; }
|
||||
void ClrGrndNone() { m_flags &= ~FLAG_GRND_NONE; }
|
||||
bool ChkMoveBGOnly() const { return (m_flags & FLAG_MOVE_BG_ONLY) != 0; }
|
||||
void SetWallHit() { m_flags |= FLAG_WALL_HIT; }
|
||||
void ClrWallNone() { m_flags &= ~FLAG_WALL_NONE; }
|
||||
void OnLineCheckNone() { m_flags |= FLAG_LINE_CHECK_NONE; }
|
||||
void OffLineCheckNone() { m_flags &= ~FLAG_LINE_CHECK_NONE; }
|
||||
void SetWallNone() { m_flags |= FLAG_WALL_NONE; }
|
||||
void OnLineCheckHit() { m_flags |= FLAG_LINE_CHECK_HIT; }
|
||||
bool ChkGroundAway() const { return (m_flags & FLAG_GROUND_AWAY) != 0; }
|
||||
void ClrGroundHit() { m_flags &= ~FLAG_GROUND_HIT; }
|
||||
void SetGroundCheckOffset(f32 offset) { m_gnd_chk_offset = offset; }
|
||||
|
||||
cM3dGCyl* GetWallBmdCylP() { return &m_wall_cyl; }
|
||||
@@ -186,7 +188,7 @@ public:
|
||||
|
||||
f32 GetWallH(int i_no) { return pm_acch_cir[i_no].GetWallH(); }
|
||||
f32 GetWallR(int i_no) { return pm_acch_cir[i_no].GetWallR(); }
|
||||
bool ChkWallHDirect(int i_no) { return pm_acch_cir[i_no].ChkWallHDirect(); }
|
||||
BOOL ChkWallHDirect(int i_no) { return pm_acch_cir[i_no].ChkWallHDirect(); }
|
||||
f32 GetWallHDirect(int i_no) { return pm_acch_cir[i_no].GetWallHDirect(); }
|
||||
f32 GetWallRR(int i_no) { return pm_acch_cir[i_no].GetWallRR(); }
|
||||
void SetWallCirHit(int i_no) { pm_acch_cir[i_no].SetWallHit(); }
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#ifndef D_BG_D_BG_S_CAPT_POLY_H
|
||||
#define D_BG_D_BG_S_CAPT_POLY_H
|
||||
|
||||
#include "d/d_bg_s_chk.h"
|
||||
#include "SSystem/SComponent/c_m3d_g_aab.h"
|
||||
|
||||
class dBgS_CaptPoly;
|
||||
|
||||
typedef void (*CaptPolyCallback)(dBgS_CaptPoly&, cBgD_Vtx_t*, u16, u16, u16, cM3dGPla*);
|
||||
|
||||
struct dBgS_CaptPoly : public cBgS_Chk, public dBgS_Chk {
|
||||
public:
|
||||
cM3dGAab* GetBndP() { return &m_pos;}
|
||||
|
||||
/* 0x2C */ cM3dGAab m_pos;
|
||||
/* 0x48 */ CaptPolyCallback m_callback;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,18 +1,24 @@
|
||||
#ifndef _D_BG_S_CAPT_POLY_H
|
||||
#define _D_BG_S_CAPT_POLY_H
|
||||
#ifndef D_BG_D_BG_S_CAPT_POLY_H
|
||||
#define D_BG_D_BG_S_CAPT_POLY_H
|
||||
|
||||
#include "d/d_bg_s_chk.h"
|
||||
#include "SSystem/SComponent/c_m3d_g_aab.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
|
||||
class dBgS_CaptPoly : public cBgS_Chk, public dBgS_Chk {
|
||||
struct dBgS_CaptPoly;
|
||||
|
||||
typedef int (*CaptPolyCallback)(dBgS_CaptPoly*, cBgD_Vtx_t*, int, int, int, cM3dGPla*);
|
||||
|
||||
struct dBgS_CaptPoly : public cBgS_Chk, public dBgS_Chk {
|
||||
public:
|
||||
dBgS_CaptPoly();
|
||||
~dBgS_CaptPoly() {}
|
||||
void Set(cXyz&, cXyz&);
|
||||
|
||||
/* 0x24 */ cM3dGAab aab;
|
||||
/* 0x48 */ int field_0x48;
|
||||
void SetCallback(CaptPolyCallback callback) { m_callback = callback; }
|
||||
cM3dGAab* GetBndP() { return &m_bnd;}
|
||||
|
||||
/* 0x2C */ cM3dGAab m_bnd;
|
||||
/* 0x48 */ CaptPolyCallback m_callback;
|
||||
};
|
||||
|
||||
#endif /* _D_BG_S_CAPT_POLY_H */
|
||||
#endif
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
void OffWaterGrp() { mGrp &= ~WATER_GRP; }
|
||||
void OnNormalGrp() { mGrp |= NORMAL_GRP; }
|
||||
void OffNormalGrp() { mGrp &= ~NORMAL_GRP; }
|
||||
void OnFullGrp() { mGrp |= FULL_GRP; }
|
||||
void OffFullGrp() { mGrp &= ~FULL_GRP; }
|
||||
void OnAll() { mGrp |= FULL_GRP; }
|
||||
u32 MaskNormalGrp() { return mGrp & NORMAL_GRP; }
|
||||
|
||||
@@ -15,6 +15,7 @@ public:
|
||||
dBgS_SphChk();
|
||||
virtual ~dBgS_SphChk();
|
||||
|
||||
void Init() { ClearPi(); }
|
||||
void SetCallback(SphChk_Callback i_callback) { mCallback = i_callback; }
|
||||
|
||||
/* 0x50 */ SphChk_Callback mCallback;
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
void OffMoveBGOnly() { m_flags &= ~MOVE_BG_ONLY; }
|
||||
void OnMoveBGOnly() { m_flags |= MOVE_BG_ONLY; }
|
||||
void OnFind() { m_flags |= FIND; }
|
||||
bool ChkMoveBGOnly() { return m_flags & MOVE_BG_ONLY; }
|
||||
BOOL ChkMoveBGOnly() { return m_flags & MOVE_BG_ONLY; }
|
||||
void SetHeight(f32 height) { m_height = height; }
|
||||
f32 GetHeight() { return m_height; }
|
||||
cXyz& GetPosP() { return m_ground; }
|
||||
|
||||
+22
-8
@@ -153,6 +153,10 @@ public:
|
||||
u32 GetMaskPolyInf1_NoShift(int, u32) const;
|
||||
u32 GetPolyInf2(int, u32, u32) const;
|
||||
int GetTriGrp(int) const;
|
||||
|
||||
#if DEBUG
|
||||
void DebugLocalPos();
|
||||
#endif
|
||||
|
||||
virtual ~cBgW();
|
||||
virtual bool ChkMemoryError();
|
||||
@@ -215,23 +219,23 @@ public:
|
||||
virtual bool ChkShdwDrawThrough(int, cBgS_PolyPassChk*);
|
||||
virtual bool ChkGrpThrough(int, cBgS_GrpPassChk*, int);
|
||||
|
||||
u32 GetOldInvMtx(Mtx m) { return MTXInverse(m_inv_mtx, m); }
|
||||
MtxP GetBaseMtxP() { return pm_base; }
|
||||
bool ChkNoCalcVtx() { return mFlags & NO_CALC_VTX_e; }
|
||||
bool ChkFlush() { return field_0x91 & 8; }
|
||||
u32 GetOldInvMtx(Mtx m) const { return PSMTXInverse(m_inv_mtx, m); }
|
||||
MtxP GetBaseMtxP() { return *pm_base; }
|
||||
BOOL ChkNoCalcVtx() { return mFlags & NO_CALC_VTX_e; }
|
||||
BOOL ChkFlush() { return field_0x91 & 8; }
|
||||
void SetLock() { mFlags |= (u8)LOCK_e; }
|
||||
void OffRoofRegist() { field_0x91 |= (u8)0x4; }
|
||||
void OnRoofRegist() { field_0x91 &= ~0x04; }
|
||||
bool ChkRoofRegist() { return field_0x91 & 4;}
|
||||
bool ChkRoofRegist() { return (field_0x91 & 4) == 0;}
|
||||
cBgD_Vtx_t* GetVtxTbl() const { return pm_vtx_tbl; }
|
||||
int GetVtxNum() const { return pm_bgd->m_v_num; }
|
||||
void ClrNoCalcVtx() { mFlags &= ~NO_CALC_VTX_e; }
|
||||
void SetBaseMtxP(MtxP mtx) { pm_base = mtx; }
|
||||
void SetBaseMtxP(Mtx* mtx) { pm_base = mtx; }
|
||||
void SetNoCalcVtx() { mFlags |= NO_CALC_VTX_e; }
|
||||
cBgD_t* GetBgd() const { return pm_bgd; }
|
||||
|
||||
public:
|
||||
/* 0x18 */ MtxP pm_base; // Model Matrix
|
||||
/* 0x18 */ Mtx* pm_base; // Model Matrix
|
||||
/* 0x1C */ Mtx m_inv_mtx;
|
||||
/* 0x4C */ Mtx m_mtx;
|
||||
/* 0x7C */ cXyz mTransVel;
|
||||
@@ -330,10 +334,16 @@ public:
|
||||
virtual bool ChkShdwDrawThrough(int, cBgS_PolyPassChk*);
|
||||
virtual bool ChkGrpThrough(int, cBgS_GrpPassChk*, int);
|
||||
|
||||
#if DEBUG
|
||||
void DrawBox() const;
|
||||
void DebugDraw() const;
|
||||
void DrawPoly(const cBgS_PolyInfo&, const GXColor&) const;
|
||||
#endif
|
||||
|
||||
void SetCrrFunc(dBgW_CrrFunc func) { m_crr_func = func; }
|
||||
void SetRideCallback(dBgW_RideCallback func) { m_ride_callback = func; }
|
||||
void SetArrowStickCallback(dBgW_ArrowStickCallback func) { m_arrow_stick_callback = func; }
|
||||
void OnMoveFlag() { m_flags |= 1; }
|
||||
void OnMoveFlag() { m_flags |= (u8)1; }
|
||||
|
||||
private:
|
||||
/* 0xB0 */ dBgW_CrrFunc m_crr_func;
|
||||
@@ -344,4 +354,8 @@ private:
|
||||
|
||||
dBgW* dBgW_NewSet(cBgD_t* pbgd, u32 flags, Mtx* pbase_mtx);
|
||||
|
||||
#if DEBUG
|
||||
extern u8 lbl_8074C7F0;
|
||||
#endif
|
||||
|
||||
#endif /* D_BG_D_BG_W_H */
|
||||
|
||||
@@ -106,16 +106,16 @@ public:
|
||||
virtual void CallArrowStickCallBack(fopAc_ac_c*, fopAc_ac_c*, cXyz&);
|
||||
|
||||
#if DEBUG
|
||||
virtual void DebugDraw() {}
|
||||
virtual void DrawPoly(cBgS_PolyInfo const& param_0, GXColor const& param_1) {}
|
||||
virtual void DebugBox() {}
|
||||
virtual void DebugDraw() const {}
|
||||
virtual void DrawPoly(cBgS_PolyInfo const& param_0, GXColor const& param_1) const {}
|
||||
virtual void DrawBox() const {}
|
||||
#endif
|
||||
|
||||
PushPull_CallBack GetPushPullCallback() const { return m_pushPull_Callback; }
|
||||
s16 GetDiffShapeAngleY() { return m_diff_ShapeAngleY; }
|
||||
int GetRoomId() { return m_roomId; }
|
||||
bool chkStickWall() { return field_0xb & 1; }
|
||||
bool chkStickRoof() { return field_0xb & 2; }
|
||||
BOOL chkStickWall() { return field_0xb & 1; }
|
||||
BOOL chkStickRoof() { return field_0xb & 2; }
|
||||
bool ChkPushPullOk() const { return m_pushPull_Ok; }
|
||||
void SetPushPullCallback(PushPull_CallBack i_callBack) { m_pushPull_Callback = i_callBack; }
|
||||
void SetRoomId(int id) { m_roomId = id; }
|
||||
|
||||
@@ -616,6 +616,7 @@ public:
|
||||
void setItemMaxMagicCount(s16 max) { mItemInfo.mItemMaxMagicCount += max; }
|
||||
s32 getItemOilCount() { return mItemInfo.mItemOilCount; }
|
||||
void setItemOilCount(s32 oil) { mItemInfo.mItemOilCount += oil; }
|
||||
void setItemMaxOilCount(s32 oil) { mItemInfo.mItemMaxOilCount += oil; }
|
||||
void clearItemOilCount() { mItemInfo.mItemOilCount = 0; }
|
||||
s32 getItemNowOil() { return mItemInfo.mItemNowOil; }
|
||||
void setItemNowOil(s32 oil) { mItemInfo.mItemNowOil = oil; }
|
||||
@@ -630,6 +631,7 @@ public:
|
||||
s32 getOxygenCount() { return mItemInfo.mOxygenCount; }
|
||||
void setOxygenCount(s32 oxygen) { mItemInfo.mOxygenCount += oxygen; }
|
||||
void clearOxygenCount() { mItemInfo.mOxygenCount = 0; }
|
||||
void setMaxOxygenCount(s32 oxygen) { mItemInfo.mMaxOxygenCount += oxygen; }
|
||||
s32 getMaxOxygenCount() { return mItemInfo.mMaxOxygenCount; }
|
||||
void clearMaxOxygenCount() { mItemInfo.mMaxOxygenCount = 0; }
|
||||
s16 getItemArrowNumCount() { return mItemInfo.mItemArrowNumCount; }
|
||||
@@ -1615,6 +1617,10 @@ inline u8 dComIfGs_getBombMax(u8 i_bombType) {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getItemMax().getBombNum(i_bombType);
|
||||
}
|
||||
|
||||
inline void dComIfGs_setPohSpiritNum(u8 i_num) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getCollect().setPohNum(i_num);
|
||||
}
|
||||
|
||||
inline u8 dComIfGs_getPohSpiritNum() {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getCollect().getPohNum();
|
||||
}
|
||||
@@ -1623,6 +1629,10 @@ inline void dComIfGs_addPohSpiritNum() {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getCollect().addPohNum();
|
||||
}
|
||||
|
||||
inline BOOL dComIfGs_isCollectClothes(u8 i_clothesNo) {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getCollect().isCollect(COLLECT_CLOTHING, i_clothesNo);
|
||||
}
|
||||
|
||||
inline void dComIfGs_setCollectClothes(u8 i_clothesNo) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getCollect().setCollect(COLLECT_CLOTHING, i_clothesNo);
|
||||
}
|
||||
@@ -1640,18 +1650,34 @@ inline BOOL dComIfGs_isCollectClothing(u8 i_clothesNo) {
|
||||
i_clothesNo);
|
||||
}
|
||||
|
||||
inline void dComIfGs_offCollectClothes(u8 i_clothesNo) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getCollect().offCollect(COLLECT_CLOTHING, i_clothesNo);
|
||||
}
|
||||
|
||||
inline BOOL dComIfGs_isCollectSword(u8 i_swordNo) {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getCollect().isCollect(COLLECT_SWORD, i_swordNo);
|
||||
}
|
||||
|
||||
inline void dComIfGs_offCollectSword(u8 i_swordNo) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getCollect().offCollect(COLLECT_SWORD, i_swordNo);
|
||||
}
|
||||
|
||||
inline BOOL dComIfGs_isCollectShield(u8 i_item) {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getCollect().isCollect(COLLECT_SHIELD, i_item);
|
||||
}
|
||||
|
||||
inline void dComIfGs_offCollectShield(u8 i_shieldNo) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getCollect().offCollect(COLLECT_SHIELD, i_shieldNo);
|
||||
}
|
||||
|
||||
inline void dComIfGs_onCollectCrystal(u8 i_item) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getCollect().onCollectCrystal(i_item);
|
||||
}
|
||||
|
||||
inline void dComIfGs_offCollectCrystal(u8 i_item) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getCollect().offCollectCrystal(i_item);
|
||||
}
|
||||
|
||||
inline bool dComIfGs_isCollectCrystal(u8 i_item) {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getCollect().isCollectCrystal(i_item);
|
||||
}
|
||||
@@ -1660,6 +1686,10 @@ inline void dComIfGs_onCollectMirror(u8 i_item) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getCollect().onCollectMirror(i_item);
|
||||
}
|
||||
|
||||
inline void dComIfGs_offCollectMirror(u8 i_item) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getCollect().offCollectMirror(i_item);
|
||||
}
|
||||
|
||||
inline bool dComIfGs_isCollectMirror(u8 i_item) {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getCollect().isCollectMirror(i_item);
|
||||
}
|
||||
@@ -3457,7 +3487,7 @@ inline u8 dComIfGp_getItemLifeCountType() {
|
||||
return g_dComIfG_gameInfo.play.getItemLifeCountType();
|
||||
}
|
||||
|
||||
inline void dComIfGp_setItemLifeCount(float amount, u8 type) {
|
||||
inline void dComIfGp_setItemLifeCount(f32 amount, u8 type) {
|
||||
g_dComIfG_gameInfo.play.setItemLifeCount(amount, type);
|
||||
}
|
||||
|
||||
@@ -3521,6 +3551,10 @@ inline void dComIfGp_setItemOilCount(s32 oil) {
|
||||
g_dComIfG_gameInfo.play.setItemOilCount(oil);
|
||||
}
|
||||
|
||||
inline void dComIfGp_setItemMaxOilCount(s32 oil) {
|
||||
g_dComIfG_gameInfo.play.setItemMaxOilCount(oil);
|
||||
}
|
||||
|
||||
inline void dComIfGp_clearItemOilCount() {
|
||||
g_dComIfG_gameInfo.play.clearItemOilCount();
|
||||
}
|
||||
@@ -3577,6 +3611,10 @@ inline void dComIfGp_clearOxygenCount() {
|
||||
g_dComIfG_gameInfo.play.clearOxygenCount();
|
||||
}
|
||||
|
||||
inline void dComIfGp_setMaxOxygenCount(s32 oxygen) {
|
||||
g_dComIfG_gameInfo.play.setMaxOxygenCount(oxygen);
|
||||
}
|
||||
|
||||
inline s32 dComIfGp_getMaxOxygenCount() {
|
||||
return g_dComIfG_gameInfo.play.getMaxOxygenCount();
|
||||
}
|
||||
|
||||
@@ -1,75 +1,83 @@
|
||||
#ifndef D_MENU_D_MENU_WINDOW_HIO_H
|
||||
#define D_MENU_D_MENU_WINDOW_HIO_H
|
||||
|
||||
#include <types.h>
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
|
||||
class dMw_DHIO_c {
|
||||
class dMw_DHIO_c : public JORReflexible {
|
||||
public:
|
||||
dMw_DHIO_c();
|
||||
|
||||
virtual ~dMw_DHIO_c() {}
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
void bitCheck();
|
||||
|
||||
/* 0x004 */ s8 field_0x4;
|
||||
/* 0x005 */ bool mMap[32];
|
||||
/* 0x025 */ bool mCompass[32];
|
||||
/* 0x045 */ bool mBossKey[32];
|
||||
/* 0x065 */ bool mBossClear[32];
|
||||
/* 0x085 */ bool mHeartContainer[32];
|
||||
/* 0x0A5 */ bool mBossDemo[32];
|
||||
/* 0x0C5 */ bool mPortal[32];
|
||||
/* 0x0E5 */ bool mMidBossClear[32];
|
||||
/* 0x105 */ bool mMapCopy[32];
|
||||
/* 0x125 */ bool mCompassCopy[32];
|
||||
/* 0x145 */ bool mBossKeyCopy[32];
|
||||
/* 0x165 */ bool mBossClearCopy[32];
|
||||
/* 0x185 */ bool mHeartContainerCopy[32];
|
||||
/* 0x1A5 */ bool mBossDemoCopy[32];
|
||||
/* 0x1C5 */ bool mPortalCopy[32];
|
||||
/* 0x1E5 */ bool mMidBossClearCopy[32];
|
||||
/* 0x005 */ u8 mMap[32];
|
||||
/* 0x025 */ u8 mCompass[32];
|
||||
/* 0x045 */ u8 mBossKey[32];
|
||||
/* 0x065 */ u8 mBossClear[32];
|
||||
/* 0x085 */ u8 mHeartContainer[32];
|
||||
/* 0x0A5 */ u8 mBossDemo[32];
|
||||
/* 0x0C5 */ u8 mPortal[32];
|
||||
/* 0x0E5 */ u8 mMidBossClear[32];
|
||||
/* 0x105 */ u8 mMapCopy[32];
|
||||
/* 0x125 */ u8 mCompassCopy[32];
|
||||
/* 0x145 */ u8 mBossKeyCopy[32];
|
||||
/* 0x165 */ u8 mBossClearCopy[32];
|
||||
/* 0x185 */ u8 mHeartContainerCopy[32];
|
||||
/* 0x1A5 */ u8 mBossDemoCopy[32];
|
||||
/* 0x1C5 */ u8 mPortalCopy[32];
|
||||
/* 0x1E5 */ u8 mMidBossClearCopy[32];
|
||||
};
|
||||
|
||||
extern dMw_DHIO_c g_mwDHIO;
|
||||
|
||||
class dMw_HIO_c {
|
||||
class dMw_HIO_c : public JORReflexible {
|
||||
public:
|
||||
dMw_HIO_c();
|
||||
void init();
|
||||
bool getBombFlag();
|
||||
bool getArrowFlag();
|
||||
bool getPachinkoFlag();
|
||||
u8 getBombFlag();
|
||||
u8 getArrowFlag();
|
||||
u8 getPachinkoFlag();
|
||||
void update();
|
||||
void playerStatusHIO();
|
||||
void itemBitCheck();
|
||||
void itemNumHIO();
|
||||
void itemHIO();
|
||||
|
||||
void setArrowFlag(u8 i_flag) { mArrowFlag = i_flag; }
|
||||
void setPachinkoFlag(u8 i_flag) { mPachinkoFlag = i_flag; }
|
||||
void setBombFlag(u8 i_flag) { mBombFlag = i_flag; }
|
||||
|
||||
virtual ~dMw_HIO_c() {}
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x004 */ s8 field_0x4;
|
||||
/* 0x006 */ u16 mLife;
|
||||
/* 0x008 */ u16 mMaxLife;
|
||||
/* 0x006 */ s16 mLife;
|
||||
/* 0x008 */ s16 mMaxLife;
|
||||
/* 0x00A */ u8 mMagic;
|
||||
/* 0x00B */ u8 mMaxMagic;
|
||||
/* 0x00C */ s32 mOil;
|
||||
/* 0x010 */ s32 mMaxOil;
|
||||
/* 0x014 */ s32 mOxygen;
|
||||
/* 0x018 */ s32 mMaxOxygen;
|
||||
/* 0x01C */ bool mEnableMagic;
|
||||
/* 0x01D */ bool mEnableArrowDrops;
|
||||
/* 0x01C */ u8 mEnableMagic;
|
||||
/* 0x01D */ u8 mEnableArrowDrops;
|
||||
/* 0x01E */ s16 mRupees;
|
||||
/* 0x020 */ s16 mWalletSize;
|
||||
/* 0x022 */ u8 mKeys;
|
||||
/* 0x023 */ u8 field_0x23;
|
||||
/* 0x024 */ u16 mLifeCopy;
|
||||
/* 0x026 */ u16 mMaxLifeCopy;
|
||||
/* 0x024 */ s16 mLifeCopy;
|
||||
/* 0x026 */ s16 mMaxLifeCopy;
|
||||
/* 0x028 */ u8 mMagicCopy;
|
||||
/* 0x029 */ u8 mMaxMagicCopy;
|
||||
/* 0x02C */ s32 mOilCopy;
|
||||
/* 0x030 */ s32 mMaxOilCopy;
|
||||
/* 0x034 */ s32 mOxygenCopy;
|
||||
/* 0x038 */ s32 mMaxOxygenCopy;
|
||||
/* 0x03C */ bool mEnableMagicCopy;
|
||||
/* 0x03D */ bool mEnableArrowDropsCopy;
|
||||
/* 0x03C */ u8 mEnableMagicCopy;
|
||||
/* 0x03D */ u8 mEnableArrowDropsCopy;
|
||||
/* 0x03E */ s16 mRupeesCopy;
|
||||
/* 0x040 */ s16 mWalletSizeCopy;
|
||||
/* 0x042 */ s16 mDonationAmount;
|
||||
@@ -81,23 +89,23 @@ public:
|
||||
/* 0x04A */ u8 mItems[24];
|
||||
/* 0x062 */ u8 mItemsCopy[24];
|
||||
/* 0x07A */ u8 field_0x7a[24];
|
||||
/* 0x092 */ bool mSwords[4];
|
||||
/* 0x096 */ bool mShields[3];
|
||||
/* 0x099 */ bool mClothes[3];
|
||||
/* 0x09C */ bool mSwordsCopy[4];
|
||||
/* 0x0A0 */ bool mShieldsCopy[3];
|
||||
/* 0x0A3 */ bool mClothesCopy[3];
|
||||
/* 0x092 */ u8 mSwords[4];
|
||||
/* 0x096 */ u8 mShields[3];
|
||||
/* 0x099 */ u8 mClothes[3];
|
||||
/* 0x09C */ u8 mSwordsCopy[4];
|
||||
/* 0x0A0 */ u8 mShieldsCopy[3];
|
||||
/* 0x0A3 */ u8 mClothesCopy[3];
|
||||
/* 0x0A6 */ u8 mScent;
|
||||
/* 0x0A7 */ u8 mScentCopy;
|
||||
/* 0x0A8 */ u8 field_0xa8;
|
||||
/* 0x0A9 */ bool mBombBagLV2;
|
||||
/* 0x0AA */ bool mBombBagLV2Copy;
|
||||
/* 0x0AB */ bool mLV2KeyShards[3];
|
||||
/* 0x0AE */ bool mLV2KeyShardsCopy[3];
|
||||
/* 0x0B1 */ bool mLV5Item[2];
|
||||
/* 0x0B3 */ bool mLV5ItemCopy[2];
|
||||
/* 0x0B5 */ bool mGoldBug[24];
|
||||
/* 0x0CD */ bool mGoldBugCopy[24];
|
||||
/* 0x0A9 */ u8 mBombBagLV2;
|
||||
/* 0x0AA */ u8 mBombBagLV2Copy;
|
||||
/* 0x0AB */ u8 mLV2KeyShards[3];
|
||||
/* 0x0AE */ u8 mLV2KeyShardsCopy[3];
|
||||
/* 0x0B1 */ u8 mLV5Item[2];
|
||||
/* 0x0B3 */ u8 mLV5ItemCopy[2];
|
||||
/* 0x0B5 */ u8 mGoldBug[24];
|
||||
/* 0x0CD */ u8 mGoldBugCopy[24];
|
||||
/* 0x0E5 */ u8 mArrowNum;
|
||||
/* 0x0E6 */ u8 mSeedNum;
|
||||
/* 0x0E7 */ u8 mBombNum[3];
|
||||
@@ -112,15 +120,15 @@ public:
|
||||
/* 0x101 */ u8 field_0x101[8];
|
||||
/* 0x109 */ u8 field_0x109[8];
|
||||
/* 0x111 */ u8 field_0x111[8];
|
||||
/* 0x119 */ bool mEnableOxygenMeter;
|
||||
/* 0x11A */ bool mEnableOxygenMeterCopy;
|
||||
/* 0x119 */ u8 mEnableOxygenMeter;
|
||||
/* 0x11A */ u8 mEnableOxygenMeterCopy;
|
||||
/* 0x11B */ u8 mArrowFlag;
|
||||
/* 0x11C */ u8 mPachinkoFlag;
|
||||
/* 0x11D */ u8 mBombFlag;
|
||||
/* 0x11E */ bool mFusedShadow[4];
|
||||
/* 0x122 */ bool mFusedShadowCopy[4];
|
||||
/* 0x126 */ bool mMirrorShard[4];
|
||||
/* 0x12A */ bool mMirrorShardCopy[4];
|
||||
/* 0x11E */ u8 mFusedShadow[4];
|
||||
/* 0x122 */ u8 mFusedShadowCopy[4];
|
||||
/* 0x126 */ u8 mMirrorShard[4];
|
||||
/* 0x12A */ u8 mMirrorShardCopy[4];
|
||||
}; // Size: 0x130
|
||||
|
||||
extern dMw_HIO_c g_mwHIO;
|
||||
|
||||
@@ -557,6 +557,11 @@ inline bool dMsgObject_isSelectTalkNowCheck() {
|
||||
return dMsgObject_getMsgObjectClass()->getStatus() != 8 || (dMsgObject_getMsgObjectClass()->getStatus() != 9 && dMsgObject_getMsgObjectClass()->getStatus() != 20);
|
||||
}
|
||||
|
||||
inline void dMsgObject_setOffering(u16 i_num) {
|
||||
dComIfGs_setEventReg(0xF7FF, i_num >> 8);
|
||||
dComIfGs_setEventReg(0xF8FF, i_num & 0xFF);
|
||||
}
|
||||
|
||||
class dMsgObject_HowlHIO_c {
|
||||
public:
|
||||
dMsgObject_HowlHIO_c();
|
||||
|
||||
+3
-1
@@ -396,12 +396,14 @@ public:
|
||||
void offCollectMirror(u8 i_item);
|
||||
BOOL isCollectMirror(u8 i_item) const;
|
||||
|
||||
void setPohNum(u8 i_num) { mPohNum = i_num; }
|
||||
u8 getPohNum() const { return mPohNum; }
|
||||
|
||||
void addPohNum() {
|
||||
if (mPohNum < 0xFF) {
|
||||
mPohNum++;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x0 */ u8 mItem[8];
|
||||
|
||||
@@ -20,7 +20,8 @@ static void ride_call_back(dBgW* i_bgw, fopAc_ac_c* i_bgActor, fopAc_ac_c* i_rid
|
||||
obj_brg_class* a_this = (obj_brg_class*)i_bgActor;
|
||||
|
||||
cXyz sp74 = a_this->mBr[0].field_0x0bc - i_rideActor->current.pos;
|
||||
int var_r27 = JMAFastSqrt(sp74.x * sp74.x + sp74.z * sp74.z) / (a_this->field_0xaedc * 51.0f) - -0.5f;
|
||||
f32 var_f28 = JMAFastSqrt(sp74.x * sp74.x + sp74.z * sp74.z);
|
||||
int var_r27 = var_f28 / (a_this->field_0xaedc * 51.0f) - -0.5f;
|
||||
|
||||
if (var_r27 > a_this->field_0xb1ea - 1) {
|
||||
var_r27 = a_this->field_0xb1ea - 1;
|
||||
@@ -37,7 +38,7 @@ static void ride_call_back(dBgW* i_bgw, fopAc_ac_c* i_bgActor, fopAc_ac_c* i_rid
|
||||
if (a_this->mType & 5) {
|
||||
var_f30 = 0.85f;
|
||||
} else if (a_this->field_0xb1ed == 2) {
|
||||
var_f30 = KREG_F(7) + 0.1f;
|
||||
var_f30 = KREG_F(4) + 0.1f;
|
||||
} else {
|
||||
var_f30 = 1.0f;
|
||||
}
|
||||
|
||||
@@ -380,7 +380,10 @@ int Act_c::Draw() {
|
||||
dComIfGd_setListBG();
|
||||
mDoExt_modelUpdateDL(mModel);
|
||||
dComIfGd_setList();
|
||||
dComIfG_Bgsp().DebugDrawPoly(mpBgW);
|
||||
|
||||
#if DEBUG
|
||||
dComIfG_Bgsp().DebugDrawPoly(*mpBgW);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ cPhs_Step daObjSwpush::Act_c::Mthd_Create() {
|
||||
mDoMtx_stack_c::scaleM(field_0x5f8);
|
||||
MTXCopy(mDoMtx_stack_c::get(), mMtx);
|
||||
mpBgW->ClrNoCalcVtx();
|
||||
mpBgW->SetBaseMtxP(mMtx);
|
||||
mpBgW->SetBaseMtxP(&mMtx);
|
||||
mpBgW->GlobalVtx();
|
||||
mpBgW->SetBaseMtxP(NULL);
|
||||
mpBgW->SetNoCalcVtx();
|
||||
|
||||
+1117
-352
File diff suppressed because it is too large
Load Diff
+176
-135
@@ -11,6 +11,10 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "global.h"
|
||||
|
||||
#if DEBUG
|
||||
#include "d/d_debug_viewer.h"
|
||||
#endif
|
||||
|
||||
dBgS_AcchCir::dBgS_AcchCir() {
|
||||
m_flags = 0;
|
||||
m_wall_rr = 0.0f;
|
||||
@@ -22,26 +26,26 @@ dBgS_AcchCir::dBgS_AcchCir() {
|
||||
}
|
||||
|
||||
void dBgS_AcchCir::ClrWallHit() {
|
||||
m_flags &= ~WALL_HIT;
|
||||
m_flags &= ~FLAG_WALL_HIT;
|
||||
ClearPi();
|
||||
}
|
||||
|
||||
void dBgS_AcchCir::SetWallR(f32 i_wall_r) {
|
||||
m_wall_r = i_wall_r;
|
||||
void dBgS_AcchCir::SetWallR(f32 wall_r) {
|
||||
m_wall_r = wall_r;
|
||||
}
|
||||
|
||||
void dBgS_AcchCir::CalcWallRR() {
|
||||
m_wall_rr = m_wall_r * m_wall_r;
|
||||
}
|
||||
|
||||
void dBgS_AcchCir::SetWall(f32 i_wall_h, f32 i_wall_r) {
|
||||
SetWallH(i_wall_h);
|
||||
SetWallR(i_wall_r);
|
||||
void dBgS_AcchCir::SetWall(f32 wall_h, f32 wall_r) {
|
||||
SetWallH(wall_h);
|
||||
SetWallR(wall_r);
|
||||
}
|
||||
|
||||
void dBgS_AcchCir::SetWallHDirect(f32 i_h_direct) {
|
||||
void dBgS_AcchCir::SetWallHDirect(f32 h_direct) {
|
||||
m_flags |= WALL_H_DIRECT;
|
||||
m_wall_h_direct = i_h_direct;
|
||||
m_wall_h_direct = h_direct;
|
||||
}
|
||||
|
||||
dBgS_Acch::~dBgS_Acch() {}
|
||||
@@ -89,40 +93,43 @@ void dBgS_Acch::Init() {
|
||||
}
|
||||
}
|
||||
|
||||
void dBgS_Acch::Set(cXyz* i_pos, cXyz* i_old_pos, fopAc_ac_c* i_actor, int i_tbl_size,
|
||||
dBgS_AcchCir* i_acchcir, cXyz* i_speed, csXyz* i_angle, csXyz* i_shape_angle) {
|
||||
pm_pos = i_pos;
|
||||
pm_old_pos = i_old_pos;
|
||||
void dBgS_Acch::Set(cXyz* ppos, cXyz* pold_pos, fopAc_ac_c* pactor, int tbl_size,
|
||||
dBgS_AcchCir* pacchcir, cXyz* pspeed, csXyz* pangle, csXyz* pshape_angle) {
|
||||
pm_pos = ppos;
|
||||
pm_old_pos = pold_pos;
|
||||
|
||||
JUT_ASSERT(246, pm_pos != NULL);
|
||||
JUT_ASSERT(247, pm_old_pos != NULL);
|
||||
|
||||
m_my_ac = i_actor;
|
||||
fpc_ProcID id = fopAcM_GetID(i_actor);
|
||||
m_my_ac = pactor;
|
||||
|
||||
fpc_ProcID id = fopAcM_GetID(pactor);
|
||||
SetActorPid(id);
|
||||
pm_speed = i_speed;
|
||||
m_tbl_size = i_tbl_size;
|
||||
pm_acch_cir = i_acchcir;
|
||||
pm_angle = i_angle;
|
||||
pm_shape_angle = i_shape_angle;
|
||||
|
||||
pm_speed = pspeed;
|
||||
m_tbl_size = tbl_size;
|
||||
pm_acch_cir = pacchcir;
|
||||
pm_angle = pangle;
|
||||
pm_shape_angle = pshape_angle;
|
||||
}
|
||||
|
||||
void dBgS_Acch::Set(fopAc_ac_c* i_actor, int i_tbl_size, dBgS_AcchCir* i_acchcir) {
|
||||
m_tbl_size = i_tbl_size;
|
||||
pm_acch_cir = i_acchcir;
|
||||
m_my_ac = i_actor;
|
||||
void dBgS_Acch::Set(fopAc_ac_c* pactor, int tbl_size, dBgS_AcchCir* pacchcir) {
|
||||
m_tbl_size = tbl_size;
|
||||
pm_acch_cir = pacchcir;
|
||||
m_my_ac = pactor;
|
||||
|
||||
SetActorPid(fopAcM_GetID(i_actor));
|
||||
pm_pos = fopAcM_GetPosition_p(i_actor);
|
||||
pm_old_pos = fopAcM_GetOldPosition_p(i_actor);
|
||||
pm_speed = fopAcM_GetSpeed_p(i_actor);
|
||||
pm_angle = fopAcM_GetAngle_p(i_actor);
|
||||
pm_shape_angle = fopAcM_GetShapeAngle_p(i_actor);
|
||||
SetActorPid(fopAcM_GetID(pactor));
|
||||
pm_pos = fopAcM_GetPosition_p(pactor);
|
||||
pm_old_pos = fopAcM_GetOldPosition_p(pactor);
|
||||
pm_speed = fopAcM_GetSpeed_p(pactor);
|
||||
pm_angle = fopAcM_GetAngle_p(pactor);
|
||||
pm_shape_angle = fopAcM_GetShapeAngle_p(pactor);
|
||||
}
|
||||
|
||||
void dBgS_Acch::GroundCheckInit(dBgS& i_bgs) {
|
||||
UNUSED(i_bgs);
|
||||
if (!(m_flags & 2)) {
|
||||
void dBgS_Acch::GroundCheckInit(dBgS& bgs) {
|
||||
UNUSED(bgs);
|
||||
|
||||
if (!(m_flags & FLAG_GRND_NONE)) {
|
||||
m_ground_h = -G_CM3D_F_INF;
|
||||
m_gnd.SetExtChk(*this);
|
||||
field_0xb4 = ChkGroundHit();
|
||||
@@ -132,8 +139,8 @@ void dBgS_Acch::GroundCheckInit(dBgS& i_bgs) {
|
||||
}
|
||||
}
|
||||
|
||||
void dBgS_Acch::GroundCheck(dBgS& i_bgs) {
|
||||
if (!(m_flags & GRND_NONE)) {
|
||||
void dBgS_Acch::GroundCheck(dBgS& bgs) {
|
||||
if (!(m_flags & FLAG_GRND_NONE)) {
|
||||
cXyz grnd_pos;
|
||||
grnd_pos = *pm_pos;
|
||||
grnd_pos.y += field_0x94 + (m_gnd_chk_offset - field_0x90);
|
||||
@@ -143,15 +150,15 @@ void dBgS_Acch::GroundCheck(dBgS& i_bgs) {
|
||||
tmpRoofChk.SetActorPid(m_gnd.GetActorPid());
|
||||
tmpRoofChk.SetPos(*pm_pos);
|
||||
|
||||
f32 roof_chk = i_bgs.RoofChk(&tmpRoofChk);
|
||||
if (grnd_pos.y > roof_chk) {
|
||||
grnd_pos.y = roof_chk;
|
||||
f32 roof_y = bgs.RoofChk(&tmpRoofChk);
|
||||
if (grnd_pos.y > roof_y) {
|
||||
grnd_pos.y = roof_y;
|
||||
}
|
||||
}
|
||||
|
||||
field_0x94 = 0.0f;
|
||||
m_gnd.SetPos(&grnd_pos);
|
||||
m_ground_h = i_bgs.GroundCross(&m_gnd);
|
||||
m_ground_h = bgs.GroundCross(&m_gnd);
|
||||
|
||||
if (m_ground_h != -G_CM3D_F_INF) {
|
||||
field_0xbc = m_ground_h + field_0x90;
|
||||
@@ -162,13 +169,13 @@ void dBgS_Acch::GroundCheck(dBgS& i_bgs) {
|
||||
pm_speed->y = 0.0f;
|
||||
}
|
||||
|
||||
i_bgs.GetTriPla(m_gnd, &field_0xa0);
|
||||
bgs.GetTriPla(m_gnd, &field_0xa0);
|
||||
SetGroundFind();
|
||||
SetGroundHit();
|
||||
|
||||
if (field_0xc0 == 0) {
|
||||
field_0xc0 = 1;
|
||||
i_bgs.RideCallBack(m_gnd, m_my_ac);
|
||||
bgs.RideCallBack(m_gnd, m_my_ac);
|
||||
}
|
||||
|
||||
if (field_0xb4 == 0) {
|
||||
@@ -183,28 +190,28 @@ void dBgS_Acch::GroundCheck(dBgS& i_bgs) {
|
||||
}
|
||||
}
|
||||
|
||||
void dBgS_Acch::GroundRoofProc(dBgS& i_bgs) {
|
||||
void dBgS_Acch::GroundRoofProc(dBgS& bgs) {
|
||||
if (m_ground_h != -G_CM3D_F_INF) {
|
||||
if (field_0xbc < field_0xcc && field_0xcc < pm_pos->y) {
|
||||
pm_pos->y = field_0xcc;
|
||||
}
|
||||
|
||||
if (!(m_flags & ROOF_NONE) && m_ground_h >= m_roof_height) {
|
||||
if (!(m_flags & FLAG_ROOF_NONE) && m_ground_h >= m_roof_height) {
|
||||
m_roof.SetExtChk(*this);
|
||||
ClrRoofHit();
|
||||
cXyz roof_pos(*pm_pos);
|
||||
m_roof.SetPos(roof_pos);
|
||||
m_roof_height = i_bgs.RoofChk(&m_roof);
|
||||
m_roof_height = bgs.RoofChk(&m_roof);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dBgS_Acch::LineCheck(dBgS& i_bgs) {
|
||||
void dBgS_Acch::LineCheck(dBgS& bgs) {
|
||||
dBgS_RoofChk roof_chk;
|
||||
roof_chk.SetActorPid(m_gnd.GetActorPid());
|
||||
roof_chk.SetPos(*GetOldPos());
|
||||
|
||||
f32 temp_f31 = dComIfG_Bgsp().RoofChk(&roof_chk);
|
||||
f32 roof_y = dComIfG_Bgsp().RoofChk(&roof_chk);
|
||||
|
||||
f32 var_f30 = G_CM3D_F_INF;
|
||||
bool var_r30 = false;
|
||||
@@ -218,22 +225,22 @@ void dBgS_Acch::LineCheck(dBgS& i_bgs) {
|
||||
old_pos = *GetOldPos();
|
||||
pos = *GetPos();
|
||||
|
||||
f32 var_f2 = GetWallH(i);
|
||||
if (temp_f31 < old_pos.y + var_f2) {
|
||||
f32 wall_h = GetWallH(i);
|
||||
if (roof_y < old_pos.y + wall_h) {
|
||||
if (var_r29) {
|
||||
continue;
|
||||
} else {
|
||||
var_f2 = (temp_f31 - old_pos.y) - 1.0f;
|
||||
wall_h = (roof_y - old_pos.y) - 1.0f;
|
||||
var_r29 = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (var_f30 > var_f2) {
|
||||
var_f30 = var_f2;
|
||||
if (var_f30 > wall_h) {
|
||||
var_f30 = wall_h;
|
||||
}
|
||||
|
||||
old_pos.y += var_f2;
|
||||
pos.y += var_f2;
|
||||
old_pos.y += wall_h;
|
||||
pos.y += wall_h;
|
||||
|
||||
if (GetSpeedY() < 0.0f) {
|
||||
if (m_my_ac != NULL && fopAcM_GetName(m_my_ac) == fpcNm_ALINK_e &&
|
||||
@@ -246,7 +253,7 @@ void dBgS_Acch::LineCheck(dBgS& i_bgs) {
|
||||
lin_chk.Set2(&old_pos, &pos, GetActorPid());
|
||||
lin_chk.SetExtChk(*this);
|
||||
|
||||
if (i_bgs.LineCross(&lin_chk)) {
|
||||
if (bgs.LineCross(&lin_chk)) {
|
||||
*GetPos() = lin_chk.GetCross();
|
||||
OnLineCheckHit();
|
||||
|
||||
@@ -254,10 +261,10 @@ void dBgS_Acch::LineCheck(dBgS& i_bgs) {
|
||||
*pm_out_poly_info = lin_chk;
|
||||
|
||||
cM3dGPla plane;
|
||||
i_bgs.GetTriPla(lin_chk, &plane);
|
||||
bgs.GetTriPla(lin_chk, &plane);
|
||||
if (!cBgW_CheckBGround(plane.mNormal.y)) {
|
||||
PSVECAdd(GetPos(), &plane.mNormal, GetPos());
|
||||
f32 var_f28 = JMAFastSqrt(plane.mNormal.x * plane.mNormal.x + plane.mNormal.z * plane.mNormal.z);
|
||||
f32 var_f28 = JMAFastSqrt(SQUARE(plane.mNormal.x) + SQUARE(plane.mNormal.z));
|
||||
if (!cM3d_IsZero(var_f28)) {
|
||||
pm_acch_cir[i].SetWallHDirect(GetPos()->y);
|
||||
}
|
||||
@@ -265,7 +272,7 @@ void dBgS_Acch::LineCheck(dBgS& i_bgs) {
|
||||
GetPos()->y -= GetWallH(i);
|
||||
} else {
|
||||
GetPos()->y -= 1.0f;
|
||||
GroundCheck(i_bgs);
|
||||
GroundCheck(bgs);
|
||||
var_r30 = true;
|
||||
}
|
||||
}
|
||||
@@ -273,7 +280,6 @@ void dBgS_Acch::LineCheck(dBgS& i_bgs) {
|
||||
|
||||
if (ChkLineDown()) {
|
||||
f32 temp_f1 = GetOldPos()->y - GetPos()->y;
|
||||
|
||||
if (var_f30 != G_CM3D_F_INF && !var_r30 && !cM3d_IsZero(temp_f1)) {
|
||||
cBgS_LinChk lin_chk;
|
||||
cXyz old_pos;
|
||||
@@ -287,7 +293,7 @@ void dBgS_Acch::LineCheck(dBgS& i_bgs) {
|
||||
lin_chk.Set2(&old_pos, &pos, GetActorPid());
|
||||
lin_chk.SetExtChk(*this);
|
||||
|
||||
if (i_bgs.LineCross(&lin_chk)) {
|
||||
if (bgs.LineCross(&lin_chk)) {
|
||||
*GetPos() = lin_chk.GetCross();
|
||||
OnLineCheckHit();
|
||||
|
||||
@@ -295,13 +301,13 @@ void dBgS_Acch::LineCheck(dBgS& i_bgs) {
|
||||
*pm_out_poly_info = lin_chk;
|
||||
|
||||
GetPos()->y -= 1.0f;
|
||||
GroundCheck(i_bgs);
|
||||
GroundCheck(bgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dBgS_Acch::CrrPos(dBgS& i_bgs) {
|
||||
void dBgS_Acch::CrrPos(dBgS& bgs) {
|
||||
bool bvar9;
|
||||
if (!(m_flags & 1)) {
|
||||
JUT_ASSERT(792, pm_pos != NULL);
|
||||
@@ -316,7 +322,7 @@ void dBgS_Acch::CrrPos(dBgS& i_bgs) {
|
||||
JUT_ASSERT(839, pm_pos->y < 1.0e32f);
|
||||
JUT_ASSERT(840, -1.0e32f < pm_pos->z && pm_pos->z < 1.0e32f);
|
||||
|
||||
i_bgs.MoveBgCrrPos(m_gnd, ChkGroundHit(), pm_pos, pm_angle, pm_shape_angle, false, false);
|
||||
bgs.MoveBgCrrPos(m_gnd, ChkGroundHit(), pm_pos, pm_angle, pm_shape_angle, false, false);
|
||||
|
||||
if (!ChkGroundHit()) {
|
||||
bvar9 = false;
|
||||
@@ -324,7 +330,7 @@ void dBgS_Acch::CrrPos(dBgS& i_bgs) {
|
||||
if (ChkWallHit()) {
|
||||
for (int i = 0; i < m_tbl_size; i++) {
|
||||
if (pm_acch_cir[i].ChkWallHit()) {
|
||||
i_bgs.MoveBgCrrPos(pm_acch_cir[i], true, pm_pos, pm_angle, pm_shape_angle,
|
||||
bgs.MoveBgCrrPos(pm_acch_cir[i], true, pm_pos, pm_angle, pm_shape_angle,
|
||||
true, false);
|
||||
bvar9 = true;
|
||||
break;
|
||||
@@ -333,89 +339,86 @@ void dBgS_Acch::CrrPos(dBgS& i_bgs) {
|
||||
}
|
||||
|
||||
if (!bvar9 && ChkRoofHit()) {
|
||||
i_bgs.MoveBgCrrPos(m_roof, true, pm_pos, pm_angle, pm_shape_angle, false, true);
|
||||
bgs.MoveBgCrrPos(m_roof, true, pm_pos, pm_angle, pm_shape_angle, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
GroundCheckInit(i_bgs);
|
||||
GroundCheckInit(bgs);
|
||||
Init();
|
||||
|
||||
f32 tmp = GetWallAllLowH_R();
|
||||
f32 dvar10 = GetOldPos()->abs2XZ(*GetPos());
|
||||
f32 dvar11 = GetOldPos()->y - GetPos()->y;
|
||||
f32 tmp2 = GetWallAllLowH();
|
||||
f32 wall_all_low_h_r = GetWallAllLowH_R();
|
||||
f32 old_pos_dist2XZ = GetOldPos()->abs2XZ(*GetPos());
|
||||
f32 old_pos_dist_y = GetOldPos()->y - GetPos()->y;
|
||||
f32 wall_all_low_h = GetWallAllLowH();
|
||||
|
||||
field_0xb8 = GetPos()->y;
|
||||
field_0xc0 = 0;
|
||||
f32 fvar12 = tmp2 + GetOldPos()->y;
|
||||
f32 fvar12 = wall_all_low_h + GetOldPos()->y;
|
||||
f32 fvar1 = m_gnd_chk_offset + GetPos()->y;
|
||||
bool bvar2 = false;
|
||||
|
||||
OffLineCheckHit();
|
||||
if (!ChkLineCheckNone() && !cM3d_IsZero(tmp) &&
|
||||
(dvar10 > (tmp * tmp) || fvar12 > fvar1 || dvar11 > m_gnd_chk_offset || ChkLineCheck()))
|
||||
if (!ChkLineCheckNone() && !cM3d_IsZero(wall_all_low_h_r) &&
|
||||
(old_pos_dist2XZ > SQUARE(wall_all_low_h_r) || fvar12 > fvar1 || old_pos_dist_y > m_gnd_chk_offset || ChkLineCheck()))
|
||||
{
|
||||
bvar2 = true;
|
||||
LineCheck(i_bgs);
|
||||
LineCheck(bgs);
|
||||
}
|
||||
|
||||
if (!(m_flags & WALL_NONE)) {
|
||||
if (!(m_flags & FLAG_WALL_NONE)) {
|
||||
if (ChkWallSort()) {
|
||||
i_bgs.WallCorrectSort(this);
|
||||
bgs.WallCorrectSort(this);
|
||||
} else {
|
||||
i_bgs.WallCorrect(this);
|
||||
bgs.WallCorrect(this);
|
||||
}
|
||||
}
|
||||
|
||||
if (ChkWallHit() && bvar2) {
|
||||
LineCheck(i_bgs);
|
||||
LineCheck(bgs);
|
||||
}
|
||||
|
||||
field_0xcc = G_CM3D_F_INF;
|
||||
|
||||
if (!(m_flags & ROOF_NONE)) {
|
||||
if (!(m_flags & FLAG_ROOF_NONE)) {
|
||||
m_roof.SetExtChk(*this);
|
||||
ClrRoofHit();
|
||||
cXyz roof_pos;
|
||||
roof_pos.x = pm_pos->x;
|
||||
roof_pos.y = pm_pos->y;
|
||||
roof_pos.z = pm_pos->z;
|
||||
|
||||
cXyz roof_pos(*pm_pos);
|
||||
m_roof.SetPos(roof_pos);
|
||||
m_roof_height = i_bgs.RoofChk(&m_roof);
|
||||
m_roof_height = bgs.RoofChk(&m_roof);
|
||||
|
||||
if (m_roof_height != G_CM3D_F_INF) {
|
||||
f32 y = pm_pos->y;
|
||||
|
||||
if (y + m_roof_crr_height > m_roof_height) {
|
||||
if (pm_pos->y + m_roof_crr_height > m_roof_height) {
|
||||
field_0xcc = m_roof_height - m_roof_crr_height;
|
||||
SetRoofHit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!(m_flags & GRND_NONE)) {
|
||||
if (!(m_flags & FLAG_GRND_NONE)) {
|
||||
ClrGroundFind();
|
||||
GroundCheck(i_bgs);
|
||||
GroundRoofProc(i_bgs);
|
||||
GroundCheck(bgs);
|
||||
GroundRoofProc(bgs);
|
||||
} else {
|
||||
if (field_0xcc < pm_pos->y) {
|
||||
pm_pos->y = field_0xcc;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(m_flags & 0x400)) {
|
||||
if (!(m_flags & FLAG_WATER_NONE)) {
|
||||
ClrWaterHit();
|
||||
ClrWaterIn();
|
||||
m_wtr.SetHeight(-G_CM3D_F_INF);
|
||||
|
||||
bool spD = false;
|
||||
|
||||
f32 var_f29;
|
||||
f32 top;
|
||||
|
||||
f32 temp_f1_5 = m_ground_h;
|
||||
if (temp_f1_5 == -G_CM3D_F_INF) {
|
||||
if (m_ground_h == -G_CM3D_F_INF) {
|
||||
var_f29 = pm_pos->y - 50.0f;
|
||||
spD = true;
|
||||
} else {
|
||||
var_f29 = temp_f1_5;
|
||||
var_f29 = m_ground_h;
|
||||
}
|
||||
|
||||
if (m_wtr_mode == 1) {
|
||||
@@ -425,7 +428,7 @@ void dBgS_Acch::CrrPos(dBgS& i_bgs) {
|
||||
roof_chk.SetUnderwaterRoof();
|
||||
roof_chk.SetPos(*pm_pos);
|
||||
|
||||
top = i_bgs.RoofChk(&roof_chk);
|
||||
top = bgs.RoofChk(&roof_chk);
|
||||
if (top == G_CM3D_F_INF) {
|
||||
top = pm_pos->y + 1000000.0f;
|
||||
}
|
||||
@@ -438,7 +441,7 @@ void dBgS_Acch::CrrPos(dBgS& i_bgs) {
|
||||
m_wtr.Set(ground, top);
|
||||
m_wtr.SetPassChkInfo(*this);
|
||||
|
||||
if (i_bgs.WaterChk(&m_wtr)) {
|
||||
if (bgs.WaterChk(&m_wtr)) {
|
||||
SetWaterHit();
|
||||
if (m_wtr.GetHeight() > pm_pos->y) {
|
||||
SetWaterIn();
|
||||
@@ -460,15 +463,15 @@ void dBgS_Acch::CrrPos(dBgS& i_bgs) {
|
||||
}
|
||||
|
||||
f32 dBgS_Acch::GetWallAllR() {
|
||||
f32 ret = 0.0f;
|
||||
f32 rt = 0.0f;
|
||||
|
||||
for (int i = 0; i < m_tbl_size; i++) {
|
||||
f32 wall_r = pm_acch_cir[i].GetWallR();
|
||||
if (ret < wall_r) {
|
||||
ret = wall_r;
|
||||
if (rt < pm_acch_cir[i].GetWallR()) {
|
||||
rt = pm_acch_cir[i].GetWallR();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
||||
return rt;
|
||||
}
|
||||
|
||||
void dBgS_Acch::SetWallCir() {
|
||||
@@ -481,31 +484,26 @@ void dBgS_Acch::CalcWallBmdCyl() {
|
||||
if (m_tbl_size <= 0) {
|
||||
m_wall_cyl.Set(*pm_pos, 0.0f, 0.0f);
|
||||
} else {
|
||||
f32 dvar8 = GetWallAllR();
|
||||
f32 dvar9 = pm_acch_cir->GetWallH();
|
||||
f32 dvar10 = pm_acch_cir->GetWallH();
|
||||
f32 wall_all_r = GetWallAllR();
|
||||
f32 wall_h_max = pm_acch_cir->GetWallH();
|
||||
f32 wall_h_min = pm_acch_cir->GetWallH();
|
||||
|
||||
if (m_tbl_size >= 1) {
|
||||
for (int i = 0; i < m_tbl_size; i++) {
|
||||
f32 tmp = pm_acch_cir[i].GetWallH();
|
||||
if (dvar9 > tmp) {
|
||||
dvar9 = pm_acch_cir[i].GetWallH();
|
||||
if (wall_h_max > pm_acch_cir[i].GetWallH()) {
|
||||
wall_h_max = pm_acch_cir[i].GetWallH();
|
||||
}
|
||||
|
||||
f32 tmp2 = pm_acch_cir[i].GetWallH();
|
||||
if (dvar10 < tmp2) {
|
||||
dvar10 = pm_acch_cir[i].GetWallH();
|
||||
if (wall_h_min < pm_acch_cir[i].GetWallH()) {
|
||||
wall_h_min = pm_acch_cir[i].GetWallH();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cXyz xyz;
|
||||
xyz.x = pm_pos->x;
|
||||
xyz.y = pm_pos->y;
|
||||
xyz.z = pm_pos->z;
|
||||
xyz.y += dvar9;
|
||||
cXyz xyz(*pm_pos);
|
||||
xyz.y += wall_h_max;
|
||||
|
||||
m_wall_cyl.Set(xyz, dvar8, dvar10 - dvar9);
|
||||
m_wall_cyl.Set(xyz, wall_all_r, wall_h_min - wall_h_max);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -519,15 +517,14 @@ f32 dBgS_Acch::GetWallAllLowH() {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
f32 tmp = pm_acch_cir->GetWallH();
|
||||
f32 wall_low_h = pm_acch_cir->GetWallH();
|
||||
for (int i = 1; i < m_tbl_size; i++) {
|
||||
f32 tmp2 = pm_acch_cir[i].GetWallH();
|
||||
if (tmp > tmp2) {
|
||||
tmp = pm_acch_cir[i].GetWallH();
|
||||
if (wall_low_h > pm_acch_cir[i].GetWallH()) {
|
||||
wall_low_h = pm_acch_cir[i].GetWallH();
|
||||
}
|
||||
}
|
||||
|
||||
return tmp;
|
||||
return wall_low_h;
|
||||
}
|
||||
|
||||
f32 dBgS_Acch::GetWallAllLowH_R() {
|
||||
@@ -536,11 +533,10 @@ f32 dBgS_Acch::GetWallAllLowH_R() {
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
f32 tmp = pm_acch_cir->GetWallH();
|
||||
f32 wall_h = pm_acch_cir->GetWallH();
|
||||
for (int i = 1; i < m_tbl_size; i++) {
|
||||
f32 tmp2 = pm_acch_cir[i].GetWallH();
|
||||
if (tmp > tmp2) {
|
||||
tmp = pm_acch_cir[i].GetWallH();
|
||||
if (wall_h > pm_acch_cir[i].GetWallH()) {
|
||||
wall_h = pm_acch_cir[i].GetWallH();
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
@@ -556,6 +552,49 @@ f32 dBgS_Acch::GetSpeedY() {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
static GXColor blue = {0, 0, 0xFF, 0x80};
|
||||
static GXColor red = {0xFF, 0, 0, 0x80};
|
||||
|
||||
void dBgS_Acch::DrawWall(dBgS& bgs) {
|
||||
if (bgs.m_hio.ChkAcchDrawWall()) {
|
||||
if (!(m_flags & FLAG_WALL_NONE)) {
|
||||
for (int i = 0; i < m_tbl_size; i++) {
|
||||
cM3dGCir cir;
|
||||
cir = *pm_acch_cir[i].GetCirP();
|
||||
|
||||
cXyz pos;
|
||||
pos.x = cir.GetCx();
|
||||
pos.y = cir.GetHeight();
|
||||
pos.z = cir.GetCy();
|
||||
|
||||
f32 radius = cir.GetR();
|
||||
dDbVw_drawCylinderXlu(pos, radius, 3.0f, blue, TRUE);
|
||||
|
||||
if (pm_acch_cir[i].ChkWallHit()) {
|
||||
bgs.DrawPoly(pm_acch_cir[i], blue);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
SetWallCir();
|
||||
|
||||
for (int i = 0; i < m_tbl_size; i++) {
|
||||
cM3dGCir cir;
|
||||
cir = *pm_acch_cir[i].GetCirP();
|
||||
|
||||
cXyz pos;
|
||||
pos.x = cir.GetCx();
|
||||
pos.y = cir.GetHeight();
|
||||
pos.z = cir.GetCy();
|
||||
|
||||
f32 radius = cir.GetR();
|
||||
dDbVw_drawCylinderXlu(pos, radius, 3.0f, red, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
f32 dBgS_Acch::GetWallAddY(Vec& param_0) {
|
||||
if (!ChkGroundFind() || field_0xa0.mNormal.y < 0.5f) {
|
||||
return 0.0f;
|
||||
@@ -572,15 +611,17 @@ f32 dBgS_Acch::GetWallAddY(Vec& param_0) {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
void dBgS_Acch::SetNowActorInfo(int bg_index, void* param_1, fpc_ProcID param_2) {
|
||||
void dBgS_Acch::SetNowActorInfo(int bg_index, void* param_1, fpc_ProcID proc_id) {
|
||||
m_bg_index = bg_index;
|
||||
field_0x7c = param_1;
|
||||
field_0x80 = param_2;
|
||||
field_0x80 = proc_id;
|
||||
}
|
||||
|
||||
void dBgS_Acch::SetWallPolyIndex(int index, int poly_index) {
|
||||
JUT_ASSERT(1534, index <= m_tbl_size);
|
||||
|
||||
pm_acch_cir[index].SetActorInfo(m_bg_index, field_0x7c, field_0x80);
|
||||
pm_acch_cir[index].SetPolyIndex(poly_index);
|
||||
pm_acch_cir[index].SetWallPolyIndex(poly_index);
|
||||
}
|
||||
|
||||
void dBgS_Acch::CalcMovePosWork() {
|
||||
@@ -596,35 +637,35 @@ void dBgS_Acch::CalcWallRR() {
|
||||
}
|
||||
|
||||
void dBgS_Acch::SetMoveBGOnly() {
|
||||
m_flags |= MOVE_BG_ONLY;
|
||||
m_flags |= FLAG_MOVE_BG_ONLY;
|
||||
m_wtr.OnMoveBGOnly();
|
||||
}
|
||||
|
||||
void dBgS_Acch::ClrMoveBGOnly() {
|
||||
m_flags &= ~MOVE_BG_ONLY;
|
||||
m_flags &= ~FLAG_MOVE_BG_ONLY;
|
||||
m_wtr.OffMoveBGOnly();
|
||||
}
|
||||
|
||||
void dBgS_Acch::SetGndThinCellingOff() {
|
||||
m_flags |= GND_THIN_CELLING_OFF;
|
||||
m_flags |= FLAG_GND_THIN_CELLING_OFF;
|
||||
}
|
||||
|
||||
void dBgS_Acch::ClrGndThinCellingOff() {
|
||||
m_flags &= ~GND_THIN_CELLING_OFF;
|
||||
m_flags &= ~FLAG_GND_THIN_CELLING_OFF;
|
||||
}
|
||||
|
||||
bool dBgS_Acch::ChkGndThinCellingOff() {
|
||||
return m_flags & GND_THIN_CELLING_OFF;
|
||||
return m_flags & FLAG_GND_THIN_CELLING_OFF;
|
||||
}
|
||||
|
||||
void dBgS_Acch::OnWallSort() {
|
||||
m_flags |= WALL_SORT;
|
||||
m_flags |= FLAG_WALL_SORT;
|
||||
}
|
||||
|
||||
bool dBgS_Acch::ChkWallSort() {
|
||||
return m_flags & WALL_SORT;
|
||||
return m_flags & FLAG_WALL_SORT;
|
||||
}
|
||||
|
||||
bool dBgS_Acch::ChkLineDown() {
|
||||
return m_flags & LINE_DOWN;
|
||||
return m_flags & FLAG_LINE_DOWN;
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
dBgS_CaptPoly::dBgS_CaptPoly() {
|
||||
SetPolyPassChk(GetPolyPassChkInfo());
|
||||
SetGrpPassChk(GetGrpPassChkInfo());
|
||||
field_0x48 = 0;
|
||||
m_callback = NULL;
|
||||
}
|
||||
|
||||
void dBgS_CaptPoly::Set(cXyz& min, cXyz& max) {
|
||||
aab.Set(&min, &max);
|
||||
m_bnd.Set(&min, &max);
|
||||
|
||||
JUT_ASSERT(36, !(fpclassify(min.x) == FP_QNAN));
|
||||
JUT_ASSERT(37, !(fpclassify(min.y) == FP_QNAN));
|
||||
|
||||
@@ -14,8 +14,9 @@ dBgS_MoveBgActor::dBgS_MoveBgActor() {
|
||||
mpBgW = NULL;
|
||||
}
|
||||
|
||||
static int CheckCreateHeap(fopAc_ac_c* p_actor) {
|
||||
return static_cast<dBgS_MoveBgActor*>(p_actor)->MoveBGCreateHeap();
|
||||
static int CheckCreateHeap(fopAc_ac_c* actor) {
|
||||
dBgS_MoveBgActor* i_this = (dBgS_MoveBgActor*)actor;
|
||||
return i_this->MoveBGCreateHeap();
|
||||
}
|
||||
|
||||
int dBgS_MoveBgActor::CreateHeap() {
|
||||
@@ -68,8 +69,7 @@ int dBgS_MoveBgActor::MoveBGCreateHeap() {
|
||||
|
||||
mpBgW = new dBgW();
|
||||
if (mpBgW != NULL) {
|
||||
cBgD_t* res = (cBgD_t*)dComIfG_getObjectRes(m_name, m_dzb_id);
|
||||
if (!mpBgW->Set(res, cBgW::MOVE_BG_e, &mBgMtx)) {
|
||||
if (!mpBgW->Set((cBgD_t*)dComIfG_getObjectRes(m_name, m_dzb_id), cBgW::MOVE_BG_e, &mBgMtx)) {
|
||||
if (m_set_func != NULL) {
|
||||
mpBgW->SetCrrFunc(m_set_func);
|
||||
}
|
||||
@@ -87,6 +87,8 @@ int dBgS_MoveBgActor::MoveBGCreateHeap() {
|
||||
|
||||
int dBgS_MoveBgActor::MoveBGCreate(char const* i_arcName, int i_dzb_id,
|
||||
MoveBGActor_SetFunc i_setFunc, u32 i_heapSize, Mtx* i_bgMtx) {
|
||||
bool var_r28 = true;
|
||||
|
||||
if (i_bgMtx == NULL) {
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
@@ -104,6 +106,15 @@ int dBgS_MoveBgActor::MoveBGCreate(char const* i_arcName, int i_dzb_id,
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if (mpBgW != NULL && mpBgW->ChkUsed()) {
|
||||
BOOL isDebugPad = mDoCPd_c::isConnect(PAD_3);
|
||||
if (isDebugPad) {
|
||||
JUT_WARN(185, "%s", "dBgS_MoveBgActor::MoveBGCreate() Don't Regist CreateHeap\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mpBgW != NULL && dComIfG_Bgsp().Regist(mpBgW, this)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
@@ -116,7 +127,10 @@ int dBgS_MoveBgActor::MoveBGDelete() {
|
||||
int ret = Delete();
|
||||
|
||||
if (mpBgW != NULL && mpBgW->ChkUsed()) {
|
||||
dComIfG_Bgsp().Release(mpBgW);
|
||||
bool rt = dComIfG_Bgsp().Release(mpBgW);
|
||||
if (rt != 0) {
|
||||
OS_REPORT("Release Error\n");
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,10 @@ bool dBgS_PolyPassChk::ChkNoHorse() {
|
||||
return true;
|
||||
}
|
||||
|
||||
return !ChkHorse();
|
||||
if (!ChkHorse())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void dBgS_PolyPassChk::SetStatue() {
|
||||
|
||||
@@ -10,6 +10,17 @@
|
||||
void dBgS_SplGrpChk::Set(cXyz& ground, f32 roof) {
|
||||
m_ground = ground;
|
||||
m_roof = roof;
|
||||
|
||||
JUT_ASSERT(23, !isnan(m_ground.x));
|
||||
JUT_ASSERT(24, !isnan(m_ground.y));
|
||||
JUT_ASSERT(25, !isnan(m_ground.z));
|
||||
|
||||
JUT_ASSERT(29, -INF < m_ground.x && m_ground.x < INF);
|
||||
JUT_ASSERT(30, -INF < m_ground.y && m_ground.y < INF);
|
||||
JUT_ASSERT(31, -INF < m_ground.z && m_ground.z < INF);
|
||||
|
||||
JUT_ASSERT(33, !isnan(m_roof));
|
||||
JUT_ASSERT(34, -INF < m_roof && m_roof < INF);
|
||||
}
|
||||
|
||||
dBgS_SplGrpChk::dBgS_SplGrpChk() {
|
||||
|
||||
+825
-490
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
#include "d/d_bg_w_kcol.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/actor/d_a_horse.h"
|
||||
#include "d/d_bg_s_cap_poly.h"
|
||||
#include "d/d_bg_s_capt_poly.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
@@ -979,7 +979,7 @@ void dBgWKCol::CaptPoly(dBgS_CaptPoly& i_captpoly) {
|
||||
cM3dGPla plane;
|
||||
plane = GetTriPla(r28[0]);
|
||||
|
||||
i_captpoly.m_callback(i_captpoly, (cBgD_Vtx_t*)&vtx_tbl, 0, 1, 2, &plane);
|
||||
i_captpoly.m_callback(&i_captpoly, (cBgD_Vtx_t*)&vtx_tbl, 0, 1, 2, &plane);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1234
-76
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user