More d_bg_s_acch progress

This commit is contained in:
LagoLunatic 2023-10-18 23:31:18 -04:00
parent 7e360ed3ca
commit 9c667f2223
3 changed files with 34 additions and 9 deletions

View File

@ -12,6 +12,11 @@ public:
f32 GetCx() const { return mPosX; }
f32 GetCy() const { return mPosY; }
f32 GetR() const { return mRadius; }
void Set(f32 x, f32 y, f32 r) {
mPosX = x;
mPosY = y;
mRadius = r;
}
cM2dGCir() {}
virtual ~cM2dGCir() {}
@ -23,7 +28,10 @@ class cM3dGCir : public cM2dGCir {
public:
cM3dGCir(void) {}
virtual ~cM3dGCir(void) {}
void Set(f32, f32, f32, f32);
void Set(f32 x, f32 y, f32 z, f32 r) {
cM2dGCir::Set(x, y, r);
mPosZ = z;
}
};
#endif /* C_M3D_G_CIR_H */

View File

@ -30,7 +30,6 @@ public:
};
dBgS_AcchCir();
void ClrWallHit();
void SetWallR(f32);
void CalcWallRR();
void SetWall(f32 i_halfHeight, f32 i_radius);
@ -44,6 +43,10 @@ public:
void SetWallH(f32 h) { m_wall_h = h; }
void ClrWallHDirect() { m_flags &= ~WALL_H_DIRECT; }
bool ChkWallHit() { return m_flags & WALL_HIT; }
void ClrWallHit() {
m_flags &= ~WALL_HIT;
ClearPi();
}
void SetCir(cXyz& pos) { m_cir.Set(pos.x, pos.z, pos.y + GetWallH(), m_wall_r); }
}; // Size: 0x40
@ -107,7 +110,6 @@ public:
void OnWallSort();
bool ChkWallSort();
bool ChkLineDown();
void ClrGroundHit();
f32 GetOnePolyInfo(cBgS_PolyInfo*);
f32 GetWallAddY(Vec&, int);
@ -147,6 +149,7 @@ public:
bool ChkClrSpeedY() { return m_flags & CLR_SPEED_Y; }
void SetGroundFind() { m_flags |= GROUND_FIND; }
void SetGroundHit() { m_flags |= GROUND_HIT; }
void ClrGroundHit() { m_flags &= ~GROUND_HIT; }
void SetGroundLanding() { m_flags |= GROUND_LANDING; }
void SetGroundAway() { m_flags |= GROUND_AWAY; }
const u32 MaskWaterHit() { return m_flags & WATER_HIT; }

View File

@ -51,9 +51,9 @@ dBgS_Acch::dBgS_Acch() {
pm_pos = NULL;
pm_old_pos = NULL;
pm_speed = NULL;
m_ground_h = 1000000000.0f;
m_ground_h = -1000000000.0f;
m_ground_up_h = 0.0f;
field_0x98 = 98.0f;
field_0x98 = 60.0f;
m_ground_up_h_diff = 0.0f;
field_0xb0 = 0;
field_0xb4 = 0.0f;
@ -68,7 +68,7 @@ dBgS_Acch::dBgS_Acch() {
pm_shape_angle = NULL;
m_my_ac = NULL;
pm_out_poly_info = NULL;
m_sea_height = 1000000000.0f;
m_sea_height = -1000000000.0f;
}
static void dummy1() {
@ -77,7 +77,11 @@ static void dummy1() {
/* 800A2CFC-800A2D78 .text Init__9dBgS_AcchFv */
void dBgS_Acch::Init() {
/* Nonmatching */
ClrWallHit();
for (int i = 0; i < m_tbl_size; i++) {
pm_acch_cir[i].ClrWallHit();
pm_acch_cir[i].ClrWallHDirect();
}
}
/* 800A2D78-800A2E80 .text Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz */
@ -99,7 +103,15 @@ void dBgS_Acch::Set(cXyz* pos, cXyz* old_pos, fopAc_ac_c* actor, int tbl_size, d
/* 800A2E80-800A2EE8 .text GroundCheckInit__9dBgS_AcchFR4dBgS */
void dBgS_Acch::GroundCheckInit(dBgS&) {
/* Nonmatching */
m_ground_h = -1000000000.0f;
if (m_flags & GRND_NONE) {
return;
}
m_gnd.SetExtChk(*(cBgS_Chk*)this);
field_0xb0 = ChkGroundHit();
ClrGroundHit();
ClrGroundLanding();
ClrGroundAway();
}
/* 800A2EE8-800A305C .text GroundCheck__9dBgS_AcchFR4dBgS */
@ -252,7 +264,9 @@ f32 dBgS_Acch::GetWallAllR() {
/* 800A3F8C-800A3FE4 .text SetWallCir__9dBgS_AcchFv */
void dBgS_Acch::SetWallCir() {
/* Nonmatching */
for (int i = 0; i < m_tbl_size; i++) {
pm_acch_cir[i].SetCir(*pm_pos);
}
}
/* 800A3FE4-800A4114 .text CalcWallBmdCyl__9dBgS_AcchFv */