G_CM3D_F_INF

This commit is contained in:
LagoLunatic
2025-05-21 16:46:21 -04:00
parent ee2e164fa2
commit 21cd7a2f67
55 changed files with 147 additions and 142 deletions
+4 -4
View File
@@ -495,14 +495,14 @@ config.libs = [
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_att_dist.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_bg_s.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_bg_s_acch.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_bg_s_func.cpp"),
Object(Matching, "d/d_bg_s_func.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_bg_s_lin_chk.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_bg_s_movebg_actor.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_bg_s_spl_grp_chk.cpp"),
Object(Matching, "d/d_bg_s_spl_grp_chk.cpp"),
Object(Matching, "d/d_bg_s_wtr_chk.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_bg_w.cpp"),
Object(Matching, "d/d_bg_w_deform.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_bg_w_hf.cpp"),
Object(Matching, "d/d_bg_w_hf.cpp"),
Object(Matching, "d/d_bg_w_sv.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_cc_d.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d/d_cc_mass_s.cpp"),
@@ -643,7 +643,7 @@ config.libs = [
Object(Matching, "SSystem/SComponent/c_xyz.cpp"),
Object(Matching, "SSystem/SComponent/c_sxyz.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "SSystem/SComponent/c_math.cpp"),
Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "SSystem/SComponent/c_bg_s.cpp"),
Object(Matching, "SSystem/SComponent/c_bg_s.cpp"),
Object(Matching, "SSystem/SComponent/c_bg_s_chk.cpp"),
Object(Matching, "SSystem/SComponent/c_bg_s_gnd_chk.cpp"),
Object(Matching, "SSystem/SComponent/c_bg_s_lin_chk.cpp"),
+1 -3
View File
@@ -2,11 +2,9 @@
#define C_BG_S_H
#include "SSystem/SComponent/c_bg_s_poly_info.h"
#include "SSystem/SComponent/c_m3d.h"
#include "dolphin/types.h"
#define C_BG_MIN_HEIGHT (-1e+9f)
#define C_BG_MAX_HEIGHT (1e+9f)
class fopAc_ac_c;
class cBgS_ShdwDraw;
class cBgS_LinChk;
+5
View File
@@ -19,6 +19,11 @@ class cXyz;
struct Vec;
extern const f32 G_CM3D_F_ABS_MIN;
#if VERSION == VERSION_DEMO
extern const f32 G_CM3D_F_INF;
#else
#define G_CM3D_F_INF 1e+9f
#endif
extern const u32 BPCP_OUTCODE0;
extern const u32 BPCP_OUTCODE1;
+3 -4
View File
@@ -1,10 +1,9 @@
#ifndef C_M3D_G_AAB_H
#define C_M3D_G_AAB_H
#include "SSystem/SComponent/c_bg_s.h"
#include "SSystem/SComponent/c_xyz.h"
#include "SSystem/SComponent/c_m3d.h"
#include "SSystem/SComponent/c_m3d_g_lin.h"
#include "SSystem/SComponent/c_xyz.h"
#include "global.h"
// Axis aligned bounding box
@@ -62,8 +61,8 @@ public:
mMax.x = -1000000000.0f;
}
void ClearForMinMaxY() {
mMin.y = C_BG_MAX_HEIGHT;
mMax.y = C_BG_MIN_HEIGHT;
mMin.y = G_CM3D_F_INF;
mMax.y = -G_CM3D_F_INF;
}
void SetMinMaxY(f32 y) {
if (mMin.y > y) {
+1 -1
View File
@@ -121,7 +121,7 @@ public:
mWallRadius = 0.0f;
pm_pos = NULL;
pm_old_pos = NULL;
mGroundH = C_BG_MIN_HEIGHT;
mGroundH = -G_CM3D_F_INF;
field_0x60 = 0;
field_0x68 = 20.0f;
field_0x58 = NULL;
+1 -1
View File
@@ -128,7 +128,7 @@ bool cBgS::LineCross(cBgS_LinChk* chk) {
/* 802468E4-80246A14 .text GroundCross__4cBgSFP11cBgS_GndChk */
f32 cBgS::GroundCross(cBgS_GndChk* chk) {
chk->SetNowY(C_BG_MIN_HEIGHT);
chk->SetNowY(-G_CM3D_F_INF);
chk->ClearPi();
chk->mWallPrecheck = (chk->mFlag & 0x02);
chk->mGndPrecheck = (chk->mFlag & 0x01);
+3
View File
@@ -21,6 +21,9 @@
#define CHECK_PVEC3_RANGE(line, v) JUT_ASSERT(line, -1.0e32f < v->x && v->x < 1.0e32f && -1.0e32f < v->y && v->y < 1.0e32f && -1.0e32f < v->z && v->z < 1.0e32f)
const f32 G_CM3D_F_ABS_MIN = 3.8146973e-06f;
#if VERSION == VERSION_DEMO
const f32 G_CM3D_F_INF = 1.0e38f;
#endif
static void dummy(f32 dummy) {
// to fix float literal order
+1 -1
View File
@@ -653,7 +653,7 @@ void dr_body_bg_check(damagereaction* dr) {
temp.z = z;
gndChk.SetPos(&temp);
f32 floor_y = dComIfG_Bgsp()->GroundCross(&gndChk);
if (floor_y != C_BG_MIN_HEIGHT && dr->mpEnemy->current.pos.y <= floor_y) {
if (floor_y != -G_CM3D_F_INF && dr->mpEnemy->current.pos.y <= floor_y) {
dr->mpEnemy->current.pos.y = floor_y + REG0_F(13);
dr->mMode = 0;
dr->m47C = 0;
+1 -1
View File
@@ -1311,7 +1311,7 @@ void daAgb_c::CursorMove(fopAc_ac_c* actor, u32 stage_type) {
cXyz r1_14;
dBgS_GndChk r1_5C;
f32 f30 = C_BG_MIN_HEIGHT;
f32 f30 = -G_CM3D_F_INF;
r1_5C.OffWall();
r1_14.y = actor->current.pos.y + 150.0f;
static cXy l_ckOffset[] = {
+1 -1
View File
@@ -388,7 +388,7 @@ static BOOL Line_check(am2_class* i_this, cXyz destPos) {
/* 0000177C-00001A24 .text naraku_check__FP9am2_class */
static BOOL naraku_check(am2_class* i_this) {
// Checks if the Armos has fallen into an abyss.
if (i_this->mAcch.GetGroundH() != C_BG_MIN_HEIGHT &&
if (i_this->mAcch.GetGroundH() != -G_CM3D_F_INF &&
dComIfG_Bgsp()->ChkPolySafe(i_this->mAcch.m_gnd) &&
dComIfG_Bgsp()->GetGroundCode(i_this->mAcch.m_gnd) == 4) // Abyss ground code
{
+1 -1
View File
@@ -515,7 +515,7 @@ void daArrow_c::setRoomInfo() {
mGndChk.SetPos(&current.pos);
f32 groundY = dComIfG_Bgsp()->GroundCross(&mGndChk);
if (groundY != C_BG_MIN_HEIGHT) {
if (groundY != -G_CM3D_F_INF) {
roomNo = dComIfG_Bgsp()->GetRoomId(mGndChk);
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mGndChk);
} else {
+5 -5
View File
@@ -627,8 +627,8 @@ static u8 ground_4_check(bk_class* i_this, int r18, s16 r20, f32 f29) {
sp8 += i_this->current.pos;
gndChk.SetPos(&sp8);
sp8.y = dComIfG_Bgsp()->GroundCross(&gndChk);
if (sp8.y == C_BG_MIN_HEIGHT) {
sp8.y = C_BG_MAX_HEIGHT;
if (sp8.y == -G_CM3D_F_INF) {
sp8.y = G_CM3D_F_INF;
}
if (i_this->dr.mAcch.GetGroundH() - sp8.y > 200.0f) {
r19 |= check_bit[i];
@@ -4451,14 +4451,14 @@ static BOOL daBk_Execute(bk_class* i_this) {
sp28.y += 50.0f - i_this->dr.m44C.y;
gndChk.SetPos(&sp28);
sp28.y = dComIfG_Bgsp()->GroundCross(&gndChk);
if (sp28.y != C_BG_MIN_HEIGHT) {
if (sp28.y != -G_CM3D_F_INF) {
Vec temp;
temp.x = sp28.x;
temp.y = 50.0f + sp28.y;
temp.z = sp28.z + f31;
gndChk.SetPos(&temp);
f32 f1 = dComIfG_Bgsp()->GroundCross(&gndChk);
if (f1 != C_BG_MIN_HEIGHT) {
if (f1 != -G_CM3D_F_INF) {
r21 = (s16)-cM_atan2s(f1 - sp28.y, temp.z - sp28.z);
if (r21 > 0x2000 || r21 < -0x2000) {
r21 = 0;
@@ -4469,7 +4469,7 @@ static BOOL daBk_Execute(bk_class* i_this) {
temp.z = sp28.z;
gndChk.SetPos(&temp);
f1 = dComIfG_Bgsp()->GroundCross(&gndChk);
if (f1 != C_BG_MIN_HEIGHT) {
if (f1 != -G_CM3D_F_INF) {
r23 = (s16)cM_atan2s(f1 - sp28.y, temp.x - sp28.x);
if (r23 > 0x2000 || r23 < -0x2000) {
r23 = 0;
+2 -2
View File
@@ -70,7 +70,7 @@ void daBoko_c::setFlameEffect() {
/* 00001340-000013CC .text setRoomInfo__8daBoko_cFv */
void daBoko_c::setRoomInfo() {
int roomNo;
if (mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
if (mAcch.GetGroundH() != -G_CM3D_F_INF) {
roomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mAcch.m_gnd);
} else {
@@ -195,7 +195,7 @@ BOOL daBoko_c::procCarry() {
int i;
for (i = 0; i < 3; i++) {
m_ground_check.SetPos(&current.pos);
if (dComIfG_Bgsp()->GroundCross(&m_ground_check) != C_BG_MIN_HEIGHT) {
if (dComIfG_Bgsp()->GroundCross(&m_ground_check) != -G_CM3D_F_INF) {
break;
}
current.pos.x -= 50.0f * cM_ssin(shape_angle.y);
+7 -7
View File
@@ -292,12 +292,12 @@ namespace daBomb2 {
mAcch.ClrRoofNone();
mAcch.m_roof_crr_height = 50.0f;
mAcch.OnLineCheck();
field_0x51C = C_BG_MIN_HEIGHT;
field_0x520 = C_BG_MIN_HEIGHT;
field_0x51C = -G_CM3D_F_INF;
field_0x520 = -G_CM3D_F_INF;
field_0x524 = 0;
mbWaterIn = 0;
field_0x526 = 0;
field_0x528 = C_BG_MIN_HEIGHT;
field_0x528 = -G_CM3D_F_INF;
}
dCcD_SrcSph Act_c::M_sph_src = {
@@ -553,7 +553,7 @@ namespace daBomb2 {
r5 = true;
field_0x526 = 1;
} else {
field_0x520 = C_BG_MIN_HEIGHT;
field_0x520 = -G_CM3D_F_INF;
field_0x526 = 0;
}
mbWaterIn = r5;
@@ -564,7 +564,7 @@ namespace daBomb2 {
}
bool Act_c::chk_lava_in() const {
if(field_0x51C == C_BG_MIN_HEIGHT) {
if(field_0x51C == -G_CM3D_F_INF) {
return false;
}
@@ -573,7 +573,7 @@ namespace daBomb2 {
void Act_c::setRoomInfo() {
s32 roomNo;
if(mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
if(mAcch.GetGroundH() != -G_CM3D_F_INF) {
roomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mAcch.m_gnd);
}
@@ -1092,7 +1092,7 @@ namespace daBomb2 {
void Act_c::mode_sink() {
f32 temp;
bool temp2 = fopAcM_getWaterY(&current.pos, &temp);
if(temp2 && field_0x528 != C_BG_MIN_HEIGHT && --field_0x698 > 0) {
if(temp2 && field_0x528 != -G_CM3D_F_INF && --field_0x698 > 0) {
current.pos.y += temp - field_0x528;
field_0x528 = temp;
posMoveF();
+9 -9
View File
@@ -197,7 +197,7 @@ BOOL daBomb_c::draw() {
draw_norm();
}
if(fopAcM_GetModel(this) == 0 && mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
if(fopAcM_GetModel(this) == 0 && mAcch.GetGroundH() != -G_CM3D_F_INF) {
cM3dGPla* pNormal = dComIfG_Bgsp()->GetTriPla(mAcch.m_gnd);
if(pNormal) {
dComIfGd_setSimpleShadow(&current.pos, mAcch.GetGroundH(), 25.0f, pNormal->GetNP());
@@ -438,7 +438,7 @@ bool daBomb_c::checkExplodeBg() {
/* 800DA320-800DA3A0 .text water_tention__8daBomb_cFv */
void daBomb_c::water_tention() {
if(chk_water_in()) {
if(field_0x558 != C_BG_MIN_HEIGHT && field_0x55C != C_BG_MIN_HEIGHT) {
if(field_0x558 != -G_CM3D_F_INF && field_0x55C != -G_CM3D_F_INF) {
f32 temp = field_0x558 - field_0x55C;
current.pos.y += temp < 0.0f ? 0.8f * temp : 0.2f * temp;
}
@@ -533,7 +533,7 @@ void daBomb_c::bgCrrPos_water() {
r5 = true;
field_0x562 = 1;
} else {
field_0x558 = C_BG_MIN_HEIGHT;
field_0x558 = -G_CM3D_F_INF;
field_0x562 = 0;
}
field_0x560 = r5 && !mbWaterIn;
@@ -559,7 +559,7 @@ bool daBomb_c::chk_water_sink() {
/* 800DA768-800DA794 .text chk_lava_hit__8daBomb_cFv */
bool daBomb_c::chk_lava_hit() {
if(field_0x554 == C_BG_MIN_HEIGHT) {
if(field_0x554 == -G_CM3D_F_INF) {
return false;
}
@@ -568,7 +568,7 @@ bool daBomb_c::chk_lava_hit() {
/* 800DA794-800DA7CC .text chk_dead_zone__8daBomb_cFv */
bool daBomb_c::chk_dead_zone() {
return mAcch.GetGroundH() == C_BG_MIN_HEIGHT && field_0x558 == C_BG_MIN_HEIGHT && field_0x554 == C_BG_MIN_HEIGHT;
return mAcch.GetGroundH() == -G_CM3D_F_INF && field_0x558 == -G_CM3D_F_INF && field_0x554 == -G_CM3D_F_INF;
}
/* 800DA7CC-800DA8C8 .text bound__8daBomb_cFf */
@@ -629,7 +629,7 @@ void daBomb_c::set_real_shadow_flag() {
/* 800DA9DC-800DAA60 .text setRoomInfo__8daBomb_cFv */
void daBomb_c::setRoomInfo() {
s32 roomNo;
if(mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
if(mAcch.GetGroundH() != -G_CM3D_F_INF) {
roomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mAcch.m_gnd);
}
@@ -1398,9 +1398,9 @@ void daBomb_c::create_init() {
mAcch.m_roof_crr_height = 50.0f;
mAcch.OnLineCheck();
field_0x554 = C_BG_MIN_HEIGHT;
field_0x558 = C_BG_MIN_HEIGHT;
field_0x55C = C_BG_MIN_HEIGHT;
field_0x554 = -G_CM3D_F_INF;
field_0x558 = -G_CM3D_F_INF;
field_0x55C = -G_CM3D_F_INF;
field_0x560 = 0;
mbWaterIn = 0;
field_0x562 = 0;
+1 -1
View File
@@ -52,7 +52,7 @@ void bg_check(esa_class* i_this) {
cXyz sp54 = i_this->current.pos;
sp54.y += 100.0f;
f32 waterHeight = dBgS_GetWaterHeight(sp54);
if(waterHeight != C_BG_MIN_HEIGHT && i_this->mGroundHeight <= waterHeight) {
if(waterHeight != -G_CM3D_F_INF && i_this->mGroundHeight <= waterHeight) {
i_this->mGroundHeight = waterHeight;
state = 2;
}
+1 -1
View File
@@ -808,7 +808,7 @@ void down(fganon_class* i_this) {
sp2C.y += 300.0f;
gndChk.SetPos(&sp2C);
f32 height = dComIfG_Bgsp()->GroundCross(&gndChk);
if (height != C_BG_MIN_HEIGHT && i_this->current.pos.y <= height) {
if (height != -G_CM3D_F_INF && i_this->current.pos.y <= height) {
bVar3 = TRUE;
}
if ((i_this->m3A4[0] == 0) || bVar3) {
+4 -4
View File
@@ -207,7 +207,7 @@ void daIball_c::checkGeo() {
lavaChk.SetPos(&pos);
f32 lavaY = dComIfG_Bgsp()->GroundCross(&lavaChk);
f32 groundH = mAcch.GetGroundH();
if (lavaY != C_BG_MIN_HEIGHT) {
if (lavaY != -G_CM3D_F_INF) {
f32 lava_depth = lavaY - groundH;
if ((lava_depth < 20.0f && lavaY > current.pos.y) || (lava_depth >= 20.0f && lavaY > current.pos.y + 20.0f)) {
fopAcM_seStartCurrent(this, JA_SE_OBJ_FALL_MAGMA_S, 0);
@@ -239,7 +239,7 @@ void daIball_c::mode_wait() {
}
f32 seaHeight = mAcch.GetSeaHeight();
if (seaHeight > current.pos.y && seaHeight != C_BG_MIN_HEIGHT) {
if (seaHeight > current.pos.y && seaHeight != -G_CM3D_F_INF) {
mode_water_init();
current.pos.y = seaHeight;
}
@@ -255,10 +255,10 @@ void daIball_c::mode_water_init() {
/* 800F3FE8-800F4054 .text mode_water__9daIball_cFv */
void daIball_c::mode_water() {
f32 seaHeight = mAcch.GetSeaHeight();
if (seaHeight == C_BG_MIN_HEIGHT || seaHeight < current.pos.y) {
if (seaHeight == -G_CM3D_F_INF || seaHeight < current.pos.y) {
mode_wait_init();
}
if (seaHeight != C_BG_MIN_HEIGHT) {
if (seaHeight != -G_CM3D_F_INF) {
current.pos.y = seaHeight;
}
}
+1 -1
View File
@@ -1299,7 +1299,7 @@ void daItem_c::mode_wait() {
temp.set(old.pos.x, old.pos.y, old.pos.z);
lavaChk.SetPos(&temp);
f32 lavaY = dComIfG_Bgsp()->GroundCross(&lavaChk);
if (lavaY != C_BG_MIN_HEIGHT && lavaY > current.pos.y) {
if (lavaY != -G_CM3D_F_INF && lavaY > current.pos.y) {
fopAcM_delete(this);
}
}
+1 -1
View File
@@ -118,7 +118,7 @@ void kita_move(kita_class* i_this) {
lgc_pos.x = lgc_x; lgc_pos.y = lgc_y; lgc_pos.z = lgc_z;
liquid_ground_check.SetPos(&lgc_pos);
float liquid_gnd_cross = dComIfG_Bgsp()->GroundCross(&liquid_ground_check);
if(liquid_gnd_cross != C_BG_MIN_HEIGHT && liquid_gnd_cross > i_this->field_35C){
if(liquid_gnd_cross != -G_CM3D_F_INF && liquid_gnd_cross > i_this->field_35C){
i_this->field_35C = liquid_gnd_cross + 40.0f + REG0_F(17);
i_this->field_360 = 1;
}
+1 -1
View File
@@ -130,7 +130,7 @@ void naraku_check(ks_class* i_this) {
cXyz local_24;
cXyz local_18;
if (i_this->mAcch.GetGroundH() != C_BG_MIN_HEIGHT && dComIfG_Bgsp()->ChkPolySafe(i_this->mAcch.m_gnd) && dComIfG_Bgsp()->GetGroundCode(i_this->mAcch.m_gnd) == 4) {
if (i_this->mAcch.GetGroundH() != -G_CM3D_F_INF && dComIfG_Bgsp()->ChkPolySafe(i_this->mAcch.m_gnd) && dComIfG_Bgsp()->GetGroundCode(i_this->mAcch.m_gnd) == 4) {
i_this->m2D3++;
if (i_this->current.pos.y < -500.0f || i_this->m2D3 > 0x32) {
+1 -1
View File
@@ -101,7 +101,7 @@ void kotori_move(kt_class* i_this) {
gndChk.SetPos(&i_this->mTargetPosHome);
i_this->mTargetPosHome.y = dComIfG_Bgsp()->GroundCross(&gndChk);
if (i_this->mTargetPosHome.y == C_BG_MIN_HEIGHT)
if (i_this->mTargetPosHome.y == -G_CM3D_F_INF)
i_this->mTargetPosHome = player->current.pos;
i_this->mTargetPos = i_this->mTargetPosHome;
i_this->mSpeedLerp = 0.0f;
+1 -1
View File
@@ -113,7 +113,7 @@ void daLlift_c::CreateInit() {
cXyz waterCheckPos = current.pos;
waterCheckPos.y += 200.0f;
mWaterY = dBgS_ObjGndChk_Wtr_Func(waterCheckPos);
if (mWaterY != C_BG_MIN_HEIGHT) {
if (mWaterY != -G_CM3D_F_INF) {
cXyz particlePos = current.pos;
particlePos.y = mWaterY + 1.0f;
mEmitter3 = dComIfGp_particle_set(dPa_name::ID_SCENE_82AA, &particlePos, &current.angle);
+1 -1
View File
@@ -274,7 +274,7 @@ void daNh_c::BGCheck() {
dBgS_ObjGndChk_All gndChk;
gndChk.SetPos(&current.pos);
f32 groundY = dComIfG_Bgsp()->GroundCross(&gndChk);
if (groundY != C_BG_MIN_HEIGHT) {
if (groundY != -G_CM3D_F_INF) {
mGroundY = groundY;
tevStr.mRoomNo = current.roomNo = dComIfG_Bgsp()->GetRoomId(gndChk);
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(gndChk);
+1 -1
View File
@@ -1286,7 +1286,7 @@ BOOL daNpc_kam_c::execute() {
if (!isNoBgCheck()) {
mAcch.CrrPos(*dComIfG_Bgsp());
if (mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
if (mAcch.GetGroundH() != -G_CM3D_F_INF) {
s8 roomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
fopAcM_SetRoomNo(this, roomNo);
tevStr.mRoomNo = roomNo;
+4 -4
View File
@@ -2131,7 +2131,7 @@ BOOL daNpc_Os_c::execute() {
mAcch.CrrPos(*dComIfG_Bgsp());
field_0x784 |= 0x10;
if(mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
if(mAcch.GetGroundH() != -G_CM3D_F_INF) {
tevStr.mRoomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mAcch.m_gnd);
@@ -2208,7 +2208,7 @@ BOOL daNpc_Os_c::execute() {
}
}
if(mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
if(mAcch.GetGroundH() != -G_CM3D_F_INF) {
cM3dGPla* plane = dComIfG_Bgsp()->GetTriPla(mAcch.m_gnd.GetBgIndex(), mAcch.m_gnd.GetPolyIndex());
if(plane) {
field_0x7F0 = *plane->GetNP();
@@ -2228,7 +2228,7 @@ BOOL daNpc_Os_c::execute() {
field_0x7A8 = mAcch.ChkGroundHit();
if(!fopAcM_checkCarryNow(this)) {
if(mAcch.GetGroundH() == C_BG_MIN_HEIGHT || dComIfG_Bgsp()->GetGroundCode(mAcch.m_gnd) == 4) {
if(mAcch.GetGroundH() == -G_CM3D_F_INF || dComIfG_Bgsp()->GetGroundCode(mAcch.m_gnd) == 4) {
if(m4E8 < 30) {
m4E8 += 1;
}
@@ -2270,7 +2270,7 @@ BOOL daNpc_Os_c::execute() {
mAcch.CrrPos(*dComIfG_Bgsp());
field_0x784 |= 0x10;
if(mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
if(mAcch.GetGroundH() != -G_CM3D_F_INF) {
tevStr.mRoomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mAcch.m_gnd);
}
+1 -1
View File
@@ -4547,7 +4547,7 @@ cPhs_State daNpcPeople_c::createInit() {
if(mNpcType != 0xB) {
mObjAcch.CrrPos(*dComIfG_Bgsp());
if(C_BG_MIN_HEIGHT != mObjAcch.GetGroundH()) {
if(-G_CM3D_F_INF != mObjAcch.GetGroundH()) {
current.pos.y = home.pos.y = mObjAcch.GetGroundH();
}
}
+1 -1
View File
@@ -1760,7 +1760,7 @@ cPhs_State daNpcRoten_c::createInit() {
fopAcM_setCullSizeBox(this, -200.0f, 0.0f, -200.0f, 200.0f, 300.0f, 200.0f);
mObjAcch.CrrPos(*dComIfG_Bgsp());
if(C_BG_MIN_HEIGHT != mObjAcch.GetGroundH()) {
if(-G_CM3D_F_INF != mObjAcch.GetGroundH()) {
current.pos.y = home.pos.y = mObjAcch.GetGroundH();
}
+1 -1
View File
@@ -727,7 +727,7 @@ bool daObjBarrel::Act_c::_draw() {
float gndH = mAcch.GetGroundH();
cM3dGPla* gndPlane = dComIfG_Bgsp()->GetTriPla(mAcch.m_gnd);
cXyz *norm = gndPlane->GetNP();
if (gndPlane && gndH != C_BG_MIN_HEIGHT) {
if (gndPlane && gndH != -G_CM3D_F_INF) {
dComIfGd_setSimpleShadow(&current.pos, gndH, attr().m02, norm);
}
}
+2 -2
View File
@@ -114,7 +114,7 @@ namespace daObjMovebox {
/* 000001F0-000003A4 .text gnd_pos__Q212daObjMovebox5Bgc_cFPCQ212daObjMovebox5Act_cPCQ212daObjMovebox8BgcSrc_cif */
void Bgc_c::gnd_pos(const Act_c* movebox, const BgcSrc_c* bgcSrc, int bgcSrcCount, f32 param_4) {
f32 maxGroundY = C_BG_MIN_HEIGHT;
f32 maxGroundY = -G_CM3D_F_INF;
mDoMtx_stack_c::transS(movebox->current.pos);
mDoMtx_stack_c::YrotM(movebox->home.angle.y);
@@ -1870,7 +1870,7 @@ namespace daObjMovebox {
int temp = mBgc.mMaxGroundIdx;
f32 groundH = mBgc.mGroundY[temp];
cM3dGPla* triPla = dComIfG_Bgsp()->GetTriPla(Bgc_c::M_gnd_work[temp]);
if (triPla && groundH != C_BG_MIN_HEIGHT) {
if (triPla && groundH != -G_CM3D_F_INF) {
dComIfGd_setSimpleShadow(&current.pos, groundH, i_attr()->m10, triPla->GetNP(), shape_angle.y, 1.0f, NULL);
}
}
+1 -1
View File
@@ -190,7 +190,7 @@ void daPy_lk_c::checkBgClimbMove() {
local_5c.set(current.pos.x + (25.0f * dVar7), local_68.y + 30.0f, current.pos.z + (25.0f * dVar6));
mGndChk.SetPos(&local_5c);
dVar3 = dComIfG_Bgsp()->GroundCross(&mGndChk);
if (C_BG_MIN_HEIGHT != dVar3 && cBgW_CheckBGround(dComIfG_Bgsp()->GetTriPla(mGndChk)->GetNP()->y) &&
if (-G_CM3D_F_INF != dVar3 && cBgW_CheckBGround(dComIfG_Bgsp()->GetTriPla(mGndChk)->GetNP()->y) &&
dVar3 >= local_68.y - 30.0f)
{
dVar4 = 3.0f;
+2 -2
View File
@@ -51,7 +51,7 @@ void daPy_lk_c::setHammerQuake(cBgS_PolyInfo* param_1, const cXyz* param_2, int
local_2c.set(mSwordTopPos.x, mSwordTopPos.y + 100.0f, mSwordTopPos.z);
mGndChk.SetPos(&local_2c);
dVar9 = dComIfG_Bgsp()->GroundCross(&mGndChk);
if (C_BG_MIN_HEIGHT != dVar9) {
if (-G_CM3D_F_INF != dVar9) {
iVar6 = dComIfG_Bgsp()->GetMtrlSndId(mGndChk);
} else {
iVar6 = mMtrlSndId;
@@ -334,7 +334,7 @@ BOOL daPy_lk_c::procHammerFrontSwing() {
int r26;
r26 = -1;
f32 f30 = 300.0f;
f32 f31 = C_BG_MIN_HEIGHT;
f32 f31 = -G_CM3D_F_INF;
for (r27 = 0; r27 < mSwBlur.field_0x014; r27++) {
sp08.set(mSwBlur.field_0x034[r27].x, f30 + mSwBlur.field_0x034[r27].y, mSwBlur.field_0x034[r27].z);
mGndChk.SetPos(&sp08);
+2 -2
View File
@@ -114,7 +114,7 @@ int daPy_lk_c::changeHangEndProc(int param_0) {
mGndChk.SetPos(&pos);
m35DC = dComIfG_Bgsp()->GroundCross(&mGndChk);
if (C_BG_MIN_HEIGHT != m35DC) {
if (-G_CM3D_F_INF != m35DC) {
m3588 = dComIfG_Bgsp()->GetAttributeCode(mGndChk);
} else {
m3588 = dBgS_Attr_UNK1B_e;
@@ -281,7 +281,7 @@ BOOL daPy_lk_c::procHangFallStart_init(cM3dGPla* param_0) {
mGndChk.SetPos(&local_34);
f32 cross = dComIfG_Bgsp()->GroundCross(&mGndChk);
local_34.y = cross;
if (local_34.y != C_BG_MIN_HEIGHT) {
if (local_34.y != -G_CM3D_F_INF) {
if (local_34.y < -30.1f + current.pos.y) {
return false;
}
+12 -12
View File
@@ -1553,7 +1553,7 @@ void daPy_lk_c::drawShadow() {
local_30.y = pMVar3[1][3];
local_30.z = pMVar3[2][3];
if (checkGrabWear()) {
if ((C_BG_MIN_HEIGHT != mAcch.GetGroundH()) && (dComIfG_Bgsp()->ChkPolySafe(mAcch.m_gnd))) {
if ((-G_CM3D_F_INF != mAcch.GetGroundH()) && (dComIfG_Bgsp()->ChkPolySafe(mAcch.m_gnd))) {
dComIfGd_setSimpleShadow2(&local_30, mAcch.GetGroundH(), 30.0f, mAcch.m_gnd, 0, 1.0f,
&dDlst_shadowControl_c::mSimpleTexObj);
}
@@ -3540,7 +3540,7 @@ void daPy_lk_c::deleteEquipItem(BOOL param_1) {
void daPy_lk_c::setFallVoice() {
if ((!checkNoResetFlg0(daPyFlg0_NO_FALL_VOICE) &&
((((!checkNoResetFlg0(daPyFlg0_UNK80) || m35D0 < mAcch.GetGroundH()) || m3580 == 4) ||
C_BG_MIN_HEIGHT == mAcch.GetGroundH()))) &&
-G_CM3D_F_INF == mAcch.GetGroundH()))) &&
(m35F0 - current.pos.y > 500.0f))
{
if (current.pos.y - mAcch.GetGroundH() >= 100.0f * daPy_HIO_fall_c0::m.field_0x14) {
@@ -4662,7 +4662,7 @@ void daPy_lk_c::setFrontWallType() {
if (!checkModeFlg(ModeFlg_SWIM) && dVar16 < current.pos.y) {
return;
}
if (dVar16 == C_BG_MIN_HEIGHT || !cBgW_CheckBGround(dComIfG_Bgsp()->GetTriPla(mGndChk)->GetNP()->y)) {
if (dVar16 == -G_CM3D_F_INF || !cBgW_CheckBGround(dComIfG_Bgsp()->GetTriPla(mGndChk)->GetNP()->y)) {
return;
}
cXyz sp3C;
@@ -8710,7 +8710,7 @@ void daPy_lk_c::footBgCheck() {
} else {
sp10[i] = 0;
}
if (f1 != C_BG_MIN_HEIGHT && sp5C.y - f1 < 60.2f) {
if (f1 != -G_CM3D_F_INF && sp5C.y - f1 < 60.2f) {
*r26 = f1;
r25_r26->field_0x000 = 1;
} else {
@@ -10696,7 +10696,7 @@ BOOL daPy_lk_c::checkLavaFace(cXyz* oldPos, int attributeCode) {
mLavaGndChk.SetPos(&pos);
m35D4 = dComIfG_Bgsp()->GroundCross(&mLavaGndChk);
if (mAcch.GetGroundH() > m35D4) {
m35D4 = C_BG_MIN_HEIGHT;
m35D4 = -G_CM3D_F_INF;
}
if (m35D4 > current.pos.y) {
attributeCode = dComIfG_Bgsp()->GetAttributeCode(mLavaGndChk);
@@ -10731,7 +10731,7 @@ void daPy_lk_c::checkFallCode() {
f32 dVar6;
cXyz local_44;
if (m3580 == 4 || C_BG_MIN_HEIGHT == mAcch.GetGroundH()) {
if (m3580 == 4 || -G_CM3D_F_INF == mAcch.GetGroundH()) {
bVar4 = m35D0 > mAcch.GetGroundH() ? TRUE : FALSE;
if (((((!bVar4) && checkModeFlg(ModeFlg_MIDAIR)) &&
(!checkModeFlg(ModeFlg_HOOKSHOT) && (m35F4 - current.pos.y > 100.0f * daPy_HIO_fall_c0::m.field_0x14))) ||
@@ -10955,7 +10955,7 @@ void daPy_lk_c::setShapeAngleOnGround() {
mDoMtx_stack_c::multVec(&l_crawl_back_up_offset, &local_50);
mGndChk.SetPos(&local_44);
local_44.y = dComIfG_Bgsp()->GroundCross(&mGndChk);
if (C_BG_MIN_HEIGHT != local_44.y) {
if (-G_CM3D_F_INF != local_44.y) {
triPla = dComIfG_Bgsp()->GetTriPla(mGndChk);
} else {
triPla = NULL;
@@ -10967,7 +10967,7 @@ void daPy_lk_c::setShapeAngleOnGround() {
}
mGndChk.SetPos(&local_50);
local_50.y = dComIfG_Bgsp()->GroundCross(&mGndChk);
if (C_BG_MIN_HEIGHT != local_50.y) {
if (-G_CM3D_F_INF != local_50.y) {
triPla = dComIfG_Bgsp()->GetTriPla(mGndChk);
} else {
triPla = NULL;
@@ -11245,7 +11245,7 @@ BOOL daPy_lk_c::execute() {
!dComIfGp_checkPlayerStatus0(0, daPyStts0_SHIP_RIDE_e) &&
!checkModeFlg(ModeFlg_ROPE | ModeFlg_CLIMB | ModeFlg_LADDER) &&
mCurProc != daPyProc_DEMO_TOOL_e &&
mAcch.GetGroundH() != C_BG_MIN_HEIGHT &&
mAcch.GetGroundH() != -G_CM3D_F_INF &&
!checkNoResetFlg0((daPy_FLG0)(daPyFlg0_UNK20000000 | daPyFlg0_UNK80000000)) &&
dComIfG_Bgsp()->ChkPolySafe(mAcch.m_gnd) &&
dComIfG_Bgsp()->ChkMoveBG(mAcch.m_gnd)
@@ -11403,7 +11403,7 @@ BOOL daPy_lk_c::execute() {
}
} else if (mCurProc == daPyProc_DEMO_TOOL_e) {
current.pos = sp14;
if (m3574 != 0 && mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
if (m3574 != 0 && mAcch.GetGroundH() != -G_CM3D_F_INF) {
current.pos.y = mAcch.GetGroundH();
}
} else if (mCurProc == daPyProc_HOOKSHOT_FLY_e ||
@@ -11423,7 +11423,7 @@ BOOL daPy_lk_c::execute() {
}
int roomNo;
if (mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
if (mAcch.GetGroundH() != -G_CM3D_F_INF) {
roomNo = setRoomInfo();
m357C = m3580;
m3580 = dComIfG_Bgsp()->GetGroundCode(mAcch.m_gnd);
@@ -12398,7 +12398,7 @@ cPhs_State daPy_lk_c::makeBgWait() {
m352E--;
}
mAcch.CrrPos(*dComIfG_Bgsp());
if ((C_BG_MIN_HEIGHT == mAcch.GetGroundH()) ||
if ((-G_CM3D_F_INF == mAcch.GetGroundH()) ||
(((m352E != 0 && (dComIfG_Bgsp()->ChkMoveBG(mAcch.m_gnd))) &&
(fopAcM_GetName(dComIfG_Bgsp()->GetActorPointer(mAcch.m_gnd.GetBgIndex())) ==
PROC_TBOX))))
+1 -1
View File
@@ -13,7 +13,7 @@
int daPy_npc_c::check_initialRoom() {
if (home.roomNo < 0) {
mAcch.CrrPos(*dComIfG_Bgsp());
if (mAcch.GetGroundH() == C_BG_MIN_HEIGHT || dComIfG_Bgsp()->GetGroundCode(mAcch.m_gnd) == 4) {
if (mAcch.GetGroundH() == -G_CM3D_F_INF || dComIfG_Bgsp()->GetGroundCode(mAcch.m_gnd) == 4) {
return 0;
}
int roomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
+4 -4
View File
@@ -37,7 +37,7 @@ void daPy_swimTailEcallBack_c::getMaxWaterY(JGeometry::TVec3<f32>* pos) {
if (field_0x10 > pos->y) {
pos->y = field_0x10 + 2.0f;
}
} else if (field_0x10 != C_BG_MIN_HEIGHT) {
} else if (field_0x10 != -G_CM3D_F_INF) {
pos->y = field_0x10 + 2.0f;
} else {
pos->y = field_0x0C;
@@ -893,7 +893,7 @@ void daPy_lk_c::setFootMark(cXyz* i_pos) {
mGndChk.SetPos(&pos);
pos.y = dComIfG_Bgsp()->GroundCross(&mGndChk);
if (pos.y != C_BG_MIN_HEIGHT && dComIfG_Bgsp()->GetAttributeCode(mGndChk) == dBgS_Attr_SAND_e) {
if (pos.y != -G_CM3D_F_INF && dComIfG_Bgsp()->GetAttributeCode(mGndChk) == dBgS_Attr_SAND_e) {
fopKyM_create(PROC_WATER_MARK, (shape_angle.y << 16) | 2, &pos, &scale, NULL);
}
@@ -1042,7 +1042,7 @@ void daPy_lk_c::setFootEffect() {
mGndChk.SetPos(&pos);
f32 groundY = dComIfG_Bgsp()->GroundCross(&mGndChk);
if (groundY != C_BG_MIN_HEIGHT) {
if (groundY != -G_CM3D_F_INF) {
pos.y = groundY;
}
@@ -1133,7 +1133,7 @@ void daPy_lk_c::setWaterDrop() {
return;
}
if (dKyr_player_overhead_bg_chk() && dStage_stagInfo_GetSTType(dComIfGp_getStageStagInfo()) != dStageType_MISC_e && mCurProc != daPyProc_DEMO_LAST_COMBO_e && mAcch.m_roof_y == C_BG_MAX_HEIGHT) {
if (dKyr_player_overhead_bg_chk() && dStage_stagInfo_GetSTType(dComIfGp_getStageStagInfo()) != dStageType_MISC_e && mCurProc != daPyProc_DEMO_LAST_COMBO_e && mAcch.m_roof_y == G_CM3D_F_INF) {
if (m3460[0].getEmitter() == NULL) {
m3460[0].makeEmitter(dPa_name::ID_COMMON_0432, mpCLModel->getAnmMtx(0x0E), &current.pos, NULL);
}
+1 -1
View File
@@ -214,7 +214,7 @@ BOOL daPy_lk_c::checkSwimFallCheck() {
BOOL daPy_lk_c::changeSwimOutProc() {
cM3dGPla* pcVar1;
if (mAcch.GetGroundH() != C_BG_MIN_HEIGHT && dComIfG_Bgsp()->ChkPolySafe(mAcch.m_gnd)) {
if (mAcch.GetGroundH() != -G_CM3D_F_INF && dComIfG_Bgsp()->ChkPolySafe(mAcch.m_gnd)) {
pcVar1 = dComIfG_Bgsp()->GetTriPla(mAcch.m_gnd);
}
else {
+4 -4
View File
@@ -99,7 +99,7 @@ cM3dGPla* daPy_lk_c::getWHideModePolygon(cXyz* param_0, cXyz* param_1, cXyz* par
local_3c.z = param_2->z + cM_ssin(uVar3) * daPy_HIO_wall_c0::m.field_0x50;
mGndChk.SetPos(&local_3c);
float f31 = bgs->GroundCross(&mGndChk);
if (C_BG_MIN_HEIGHT != f31 && (!cBgW_CheckBGround(bgs->GetTriPla(mGndChk)->GetNP()->y))) {
if (-G_CM3D_F_INF != f31 && (!cBgW_CheckBGround(bgs->GetTriPla(mGndChk)->GetNP()->y))) {
return NULL;
}
@@ -383,7 +383,7 @@ BOOL daPy_lk_c::procWHideWait() {
mAcchCir[2].SetWallH(125.0f);
}
if (mStickDistance > 0.05f && C_BG_MIN_HEIGHT != mAcch.GetGroundH() &&
if (mStickDistance > 0.05f && -G_CM3D_F_INF != mAcch.GetGroundH() &&
cBgW_CheckBGround(dComIfG_Bgsp()->GetTriPla(mAcch.m_gnd)->GetNP()->y))
{
int direction = getDirectionFromCurrentAngle();
@@ -451,7 +451,7 @@ BOOL daPy_lk_c::procWHideMove() {
f32 fVar2;
if (checkWHideModeChange(&acStack_24) != 0) {
fVar2 = 0.0f;
} else if (mStickDistance > 0.05f && C_BG_MIN_HEIGHT != mAcch.GetGroundH() &&
} else if (mStickDistance > 0.05f && -G_CM3D_F_INF != mAcch.GetGroundH() &&
cBgW_CheckBGround(dComIfG_Bgsp()->GetTriPla(mAcch.m_gnd)->GetNP()->y))
{
int direction = getDirectionFromCurrentAngle();
@@ -491,7 +491,7 @@ BOOL daPy_lk_c::procWHideMove() {
if (std::fabsf(mVelocity) <= 0.001f) {
return procWHideWait_init();
}
if (mAcch.GetGroundH() == C_BG_MIN_HEIGHT || !cBgW_CheckBGround(dComIfG_Bgsp()->GetTriPla(mAcch.m_gnd)->GetNP()->y) ||
if (mAcch.GetGroundH() == -G_CM3D_F_INF || !cBgW_CheckBGround(dComIfG_Bgsp()->GetTriPla(mAcch.m_gnd)->GetNP()->y) ||
!checkWHideBackWall(&cStack_30))
{
mVelocity = 0.0f;
+2 -2
View File
@@ -260,12 +260,12 @@ void hand_move(shand_class* i_this) {
chk_pos_y += 200.0f;
local_100.GetPointP()->set(chk_pos_x, chk_pos_y, chk_pos_z);
float spl_ground_y = dComIfG_Bgsp()->GroundCross(&local_100) + 10.0f;
if(spl_ground_y != C_BG_MIN_HEIGHT){
if(spl_ground_y != -G_CM3D_F_INF){
i_this->ground_y = spl_ground_y;
}
}
else {
i_this->ground_y = C_BG_MIN_HEIGHT;
i_this->ground_y = -G_CM3D_F_INF;
}
i_this->mState = 2;
+4 -4
View File
@@ -770,7 +770,7 @@ void daShip_c::getMaxWaterY(cXyz* shipPos) {
}
}
else {
if (m03F8 != C_BG_MIN_HEIGHT) {
if (m03F8 != -G_CM3D_F_INF) {
shipPos->y = m03F8;
}
else {
@@ -831,7 +831,7 @@ f32 daShip_c::getWaterY() {
m03F8 = mAcch.m_wtr.GetHeight();
}
else {
m03F8 = C_BG_MIN_HEIGHT;
m03F8 = -G_CM3D_F_INF;
}
if (daSea_ChkArea(current.pos.x, current.pos.z)) {
waterY = daSea_calcWave(current.pos.x, current.pos.z);
@@ -3024,7 +3024,7 @@ void daShip_c::setEffectData(float param_1, short param_2) {
/* 000085D8-00008688 .text setRoomInfo__8daShip_cFv */
void daShip_c::setRoomInfo() {
int roomId;
if (mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
if (mAcch.GetGroundH() != -G_CM3D_F_INF) {
roomId = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mAcch.m_gnd);
m03C4 = dComIfG_Bgsp()->GetGroundCode(mAcch.m_gnd);
@@ -3820,7 +3820,7 @@ BOOL daShip_c::execute() {
else {
cXyz sp108;
int sp18;
if (mAcch.GetGroundH() != C_BG_MIN_HEIGHT && dPath_GetPolyRoomPathVec(mAcch.m_gnd, &sp108, &sp18)) {
if (mAcch.GetGroundH() != -G_CM3D_F_INF && dPath_GetPolyRoomPathVec(mAcch.m_gnd, &sp108, &sp18)) {
sp108.normalizeZP();
sp108 *= sp18 >> 1;
cLib_addCalcPosXZ(&m1044, sp108, 0.5f, 5.0f, 1.0f);
+2 -2
View File
@@ -354,7 +354,7 @@ void dBgS::WallCorrect(dBgS_Acch* acch) {
/* 800A13E0-800A14FC .text RoofChk__4dBgSFP12dBgS_RoofChk */
f32 dBgS::RoofChk(dBgS_RoofChk* chk) {
chk->SetNowY(C_BG_MAX_HEIGHT);
chk->SetNowY(G_CM3D_F_INF);
chk->ClearPi();
cBgS_ChkElm* elm;
for (s32 bg_index = 0; bg_index < (s32)ARRAY_SIZE(m_chk_element); bg_index++) {
@@ -606,7 +606,7 @@ void dBgS_CrrPos::CrrPos(dBgS& i_bgs) {
mGndChk.SetPos(&pos);
f32 f31 = pm_pos->y;
mGroundH = i_bgs.GroundCross(&mGndChk);
if (mGroundH != C_BG_MIN_HEIGHT && mGroundH > f31) {
if (mGroundH != -G_CM3D_F_INF && mGroundH > f31) {
pm_pos->y = mGroundH;
if (field_0x58) {
field_0x58->y = 0.0f;
+11 -11
View File
@@ -56,7 +56,7 @@ dBgS_Acch::dBgS_Acch() {
pm_pos = NULL;
pm_old_pos = NULL;
pm_speed = NULL;
m_ground_h = C_BG_MIN_HEIGHT;
m_ground_h = -G_CM3D_F_INF;
m_ground_up_h = 0.0f;
m_ground_check_offset = 60.0f;
m_ground_up_h_diff = 0.0f;
@@ -73,7 +73,7 @@ dBgS_Acch::dBgS_Acch() {
pm_shape_angle = NULL;
m_my_ac = NULL;
pm_out_poly_info = NULL;
m_sea_height = C_BG_MIN_HEIGHT;
m_sea_height = -G_CM3D_F_INF;
}
static void dummy1() {
@@ -108,7 +108,7 @@ 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&) {
m_ground_h = C_BG_MIN_HEIGHT;
m_ground_h = -G_CM3D_F_INF;
if (m_flags & GRND_NONE) {
return;
}
@@ -131,7 +131,7 @@ void dBgS_Acch::GroundCheck(dBgS& i_bgs) {
m_gnd.m_pos = pos;
m_ground_h = i_bgs.GroundCross(&m_gnd);
if (m_ground_h != C_BG_MIN_HEIGHT) {
if (m_ground_h != -G_CM3D_F_INF) {
field_0xb8 = m_ground_h + m_ground_up_h;
if (field_0xb8 > field_0xb4) {
pm_pos->y = field_0xb8;
@@ -155,8 +155,8 @@ void dBgS_Acch::GroundCheck(dBgS& i_bgs) {
/* 800A305C-800A313C .text GroundRoofProc__9dBgS_AcchFR4dBgS */
f32 dBgS_Acch::GroundRoofProc(dBgS& i_bgs) {
f32 y = C_BG_MIN_HEIGHT;
if (m_ground_h != C_BG_MIN_HEIGHT) {
f32 y = -G_CM3D_F_INF;
if (m_ground_h != -G_CM3D_F_INF) {
// y = m_roof_height;
// fakematch to fix load order
if (field_0xb8 < (y = m_roof_height) && y < pm_pos->y) {
@@ -257,14 +257,14 @@ void dBgS_Acch::CrrPos(dBgS& i_bgs) {
LineCheck(i_bgs);
}
m_roof_height = C_BG_MAX_HEIGHT;
m_roof_height = G_CM3D_F_INF;
if (!(m_flags & ROOF_NONE)) {
m_roof.SetExtChk(*(cBgS_Chk*)this);
ClrRoofHit();
cXyz roofPos = *pm_pos;
m_roof.SetPos(roofPos);
m_roof_y = i_bgs.RoofChk(&m_roof);
if (m_roof_y != C_BG_MAX_HEIGHT && pm_pos->y + m_roof_crr_height > m_roof_y) {
if (m_roof_y != G_CM3D_F_INF && pm_pos->y + m_roof_crr_height > m_roof_y) {
m_roof_height = m_roof_y - m_roof_crr_height;
SetRoofHit();
}
@@ -281,10 +281,10 @@ void dBgS_Acch::CrrPos(dBgS& i_bgs) {
if (!(m_flags & WATER_NONE)) {
ClrWaterHit();
ClrWaterIn();
m_wtr.SetHeight(C_BG_MIN_HEIGHT);
m_wtr.SetHeight(-G_CM3D_F_INF);
int room_no = i_bgs.GetRoomId(m_gnd);
if (m_ground_h != C_BG_MIN_HEIGHT && 0 <= room_no && room_no < 64) {
if (m_ground_h != -G_CM3D_F_INF && 0 <= room_no && room_no < 64) {
JUT_ASSERT(693, 0 <= room_no && room_no < 64);
dBgW* bgw = dComIfGp_roomControl_getBgW(room_no);
@@ -312,7 +312,7 @@ void dBgS_Acch::CrrPos(dBgS& i_bgs) {
if (ChkSeaCheckOn()) {
m_flags &= ~SEA_IN;
m_sea_height = C_BG_MIN_HEIGHT;
m_sea_height = -G_CM3D_F_INF;
if (daSea_ChkArea(pm_pos->x, pm_pos->z)) {
m_sea_height = daSea_calcWave(pm_pos->x, pm_pos->z);
+2 -2
View File
@@ -34,7 +34,7 @@ bool dBgS_SplGrpChk_In_ObjGnd(cXyz& r30, dBgS_SplGrpChk* r31, f32 f31) {
gndChk.SetPos(&sp1c);
f32 height = dComIfG_Bgsp()->GroundCross(&gndChk);
r31->SetHeight(height);
if (height == C_BG_MIN_HEIGHT) {
if (height == -G_CM3D_F_INF) {
return FALSE;
}
@@ -79,7 +79,7 @@ u32 dBgS_GetGndMtrlSndId_Func(cXyz r21, f32 f1) {
r21.y += f1;
dBgS_ObjGndChk gndChk;
gndChk.SetPos(&r21);
if (dComIfG_Bgsp()->GroundCross(&gndChk) == C_BG_MIN_HEIGHT) {
if (dComIfG_Bgsp()->GroundCross(&gndChk) == -G_CM3D_F_INF) {
return 0;
}
return dComIfG_Bgsp()->GetMtrlSndId(gndChk);
+1 -1
View File
@@ -14,7 +14,7 @@ dBgS_SplGrpChk::dBgS_SplGrpChk() {
m_ground.x = 0.0f;
m_ground.y = 0.0f;
m_ground.z = 0.0f;
m_roof = C_BG_MAX_HEIGHT;
m_roof = G_CM3D_F_INF;
m_height = 0.0f;
}
+2 -2
View File
@@ -153,8 +153,8 @@ void dBgWHf::MakeBlckBndHf(int blck_id, f32* r28, f32* r29) {
r31 = pm_bgd->m_t_num - 1;
}
*r28 = C_BG_MAX_HEIGHT;
*r29 = C_BG_MIN_HEIGHT;
*r28 = G_CM3D_F_INF;
*r29 = -G_CM3D_F_INF;
for (int t = r7; t <= r31; t++) {
#if VERSION > VERSION_JPN
+9 -9
View File
@@ -269,9 +269,9 @@ void dCamera_c::initialize(camera_class* camera, fopAc_ac_c* playerActor, u32 ca
mEventData.mStaffIdx = -1;
mEventData.field_0x0c = -1;
mRoomNo = -1;
m318 = C_BG_MIN_HEIGHT;
mBG.m5C.m58 = C_BG_MIN_HEIGHT;
mBG.m00.m58 = C_BG_MIN_HEIGHT;
m318 = -G_CM3D_F_INF;
mBG.m5C.m58 = -G_CM3D_F_INF;
mBG.m00.m58 = -G_CM3D_F_INF;
mBG.m00.m04.OffNormalGrp();
mBG.m00.m04.OnWaterGrp();
m31D = 0;
@@ -284,7 +284,7 @@ void dCamera_c::initialize(camera_class* camera, fopAc_ac_c* playerActor, u32 ca
m350 = 0;
m364 = 0;
m368 = 0.0f;
m354 = C_BG_MIN_HEIGHT;
m354 = -G_CM3D_F_INF;
mRoomMapToolCameraIdx = 0xFF;
m608 = mCamSetup.mBGChk.WallUpDistance();
@@ -1814,7 +1814,7 @@ f32 dCamera_c::groundHeight(cXyz* param_0) {
wtr_y = gnd_y;
}
if (wtr_y == C_BG_MIN_HEIGHT) {
if (wtr_y == -G_CM3D_F_INF) {
gnd_y = param_0->y;
}
else {
@@ -2501,13 +2501,13 @@ void dCamera_c::checkGroundInfo() {
mBG.m5C.m04 = gnd_chk;
}
mBG.m5C.m00 = mBG.m5C.m58 != C_BG_MIN_HEIGHT;
mBG.m5C.m00 = mBG.m5C.m58 != -G_CM3D_F_INF;
mBG.m00.m04.SetPos(&gnd_chk_pos);
mBG.m00.m58 = dComIfG_Bgsp()->GroundCross(&mBG.m00.m04);
mBG.m00.m00 = mBG.m00.m58 != C_BG_MIN_HEIGHT;
mBG.m00.m00 = mBG.m00.m58 != -G_CM3D_F_INF;
m354 = mBG.m00.m58;
if (mpPlayerActor->current.pos.y - mBG.m5C.m58 > mCamSetup.mBGChk.FloorMargin()) {
@@ -2588,7 +2588,7 @@ void dCamera_c::checkGroundInfo() {
m314 = 1;
}
else {
m318 = C_BG_MIN_HEIGHT;
m318 = -G_CM3D_F_INF;
m314 = 0;
}
@@ -4749,7 +4749,7 @@ bool camera_draw(camera_process_class* i_this) {
gndchk.SetPos(&i_this->mLookat.mEye);
f32 ground_y = dComIfG_Bgsp()->GroundCross(&gndchk);
if (ground_y != C_BG_MIN_HEIGHT) {
if (ground_y != -G_CM3D_F_INF) {
mDoAud_getCameraMapInfo(dComIfG_Bgsp()->GetMtrlSndId(gndchk));
mDoAud_setCameraGroupInfo(dComIfG_Bgsp()->GetGrpSoundId(gndchk));
+6 -6
View File
@@ -20,10 +20,10 @@ void dCcMassS_Mng::Ct() {
mFlag = 0;
mResultCam = 0;
mCamTopPos.x = 0.0f;
mCamTopPos.y = C_BG_MIN_HEIGHT;
mCamTopPos.y = -G_CM3D_F_INF;
mCamTopPos.z = 0.0f;
mCamBottomPos.x = 0.0f;
mCamBottomPos.y = C_BG_MIN_HEIGHT;
mCamBottomPos.y = -G_CM3D_F_INF;
mCamBottomPos.z = 0.0f;
Clear();
}
@@ -71,13 +71,13 @@ void dCcMassS_Mng::Prepare() {
mDivideArea.CalcDivideInfo(&mDivideInfo, mCpsAttr.GetWorkAab(), 0);
}
mCamTopPos.x = 0.0f;
mCamTopPos.y = C_BG_MIN_HEIGHT;
mCamTopPos.y = -G_CM3D_F_INF;
mCamTopPos.z = 0.0f;
mCamTopDist = C_BG_MAX_HEIGHT;
mCamTopDist = G_CM3D_F_INF;
mCamBottomPos.x = 0.0f;
mCamBottomPos.y = C_BG_MIN_HEIGHT;
mCamBottomPos.y = -G_CM3D_F_INF;
mCamBottomPos.z = 0.0f;
mCamBottomDist = C_BG_MAX_HEIGHT;
mCamBottomDist = G_CM3D_F_INF;
}
/* 800ACCB8-800AD17C .text Chk__12dCcMassS_MngFP4cXyzPP10fopAc_ac_cP15dCcMassS_HitInf */
+2 -2
View File
@@ -562,7 +562,7 @@ s8 dComIfGp_getReverb(int param_0) {
/* 800534C4-800535B8 .text dComIfGd_setSimpleShadow2__FP4cXyzffR13cBgS_PolyInfosfP9_GXTexObj */
int dComIfGd_setSimpleShadow2(cXyz* i_pos, f32 groundY, f32 param_2, cBgS_PolyInfo& i_floorPoly,
s16 i_angle, f32 param_5, GXTexObj* i_tex) {
if (i_floorPoly.ChkSetInfo() && C_BG_MIN_HEIGHT != groundY) {
if (i_floorPoly.ChkSetInfo() && -G_CM3D_F_INF != groundY) {
cM3dGPla* plane_p =
dComIfG_Bgsp()->GetTriPla(i_floorPoly);
@@ -1041,7 +1041,7 @@ u8 dComIfGs_checkGetItemNum(u8 i_itemNo) {
int dComIfGd_setShadow(u32 id, s8 param_2, J3DModel* pModel, cXyz* pPos, f32 param_5, f32 param_6,
f32 y, f32 groundY, cBgS_PolyInfo& pFloorPoly, dKy_tevstr_c* param_10,
s16 rotY, f32 param_12, GXTexObj* pTexObj) {
if (groundY <= C_BG_MIN_HEIGHT) {
if (groundY <= -G_CM3D_F_INF) {
return 0;
}
+1 -1
View File
@@ -444,7 +444,7 @@ static f32 checkGroundY(cXyz& pos) {
chk.SetPos(&pos);
f32 y = dComIfG_Bgsp()->GroundCross(&chk);
pos.y -= 50.0f;
if (y <= C_BG_MIN_HEIGHT)
if (y <= -G_CM3D_F_INF)
return pos.y;
else
return y;
+2 -2
View File
@@ -726,7 +726,7 @@ bool overhead_bg_chk() {
pos.y += 50.0f;
roofChk.SetPos(pos);
if (dComIfG_Bgsp()->RoofChk(&roofChk) != C_BG_MAX_HEIGHT)
if (dComIfG_Bgsp()->RoofChk(&roofChk) != G_CM3D_F_INF)
ret = true;
pos.y += 10000.0f;
gndChk.SetPos(&pos);
@@ -755,7 +755,7 @@ bool forward_overhead_bg_chk(cXyz* pPos, f32 dist) {
*pPos = pos;
roofChk.SetPos(pos);
if (dComIfG_Bgsp()->RoofChk(&roofChk) != C_BG_MAX_HEIGHT)
if (dComIfG_Bgsp()->RoofChk(&roofChk) != G_CM3D_F_INF)
ret = true;
pos.y += 10000.0f;
gndChk.SetPos(&pos);
+1 -1
View File
@@ -27,7 +27,7 @@ void dLib_setCirclePath(dLib_circle_path_c* path) {
/* 800570CC-8005716C .text dLib_getWaterY__FR4cXyzR12dBgS_ObjAcch */
f32 dLib_getWaterY(cXyz& pos, dBgS_ObjAcch& acch) {
BOOL waterHit = acch.ChkWaterHit();
f32 waterHeight = waterHit ? acch.m_wtr.GetHeight() : C_BG_MIN_HEIGHT;
f32 waterHeight = waterHit ? acch.m_wtr.GetHeight() : -G_CM3D_F_INF;
if (daSea_ChkArea(pos.x, pos.z)) {
f32 seaHeight = daSea_calcWave(pos.x, pos.z);
if (!waterHit || seaHeight > waterHeight) {
+1 -1
View File
@@ -766,7 +766,7 @@ JPABaseEmitter* dPa_control_c::setSimpleLand(int code, const cXyz* pos, const cs
dBgS_ObjGndChk chk;
cXyz chkPos(pos->x, pos->y + 10.0f, pos->z);
chk.SetPos(&chkPos);
if (dComIfG_Bgsp()->GroundCross(&chk) != C_BG_MIN_HEIGHT) {
if (dComIfG_Bgsp()->GroundCross(&chk) != -G_CM3D_F_INF) {
code = dComIfG_Bgsp()->GetAttributeCode(chk);
}
}
+1 -1
View File
@@ -603,7 +603,7 @@ bool dWood::Unit_c::set_ground() {
gndChk.SetPos(&pos);
f32 gndHeight = dComIfG_Bgsp()->GroundCross(&gndChk);
if (gndHeight > C_BG_MIN_HEIGHT) {
if (gndHeight > -G_CM3D_F_INF) {
mPos.y = gndHeight;
cM3dGPla *triPla = dComIfG_Bgsp()->GetTriPla(gndChk);
+2 -2
View File
@@ -90,7 +90,7 @@ static cPhs_State dWpotWater_Create(kankyo_class* i_k) {
);
lavaChk.SetPos(&pos);
f32 lavaY = dComIfG_Bgsp()->GroundCross(&lavaChk);
if (lavaY != C_BG_MIN_HEIGHT) {
if (lavaY != -G_CM3D_F_INF) {
gndChk.SetPos(&pos);
f32 groundY = dComIfG_Bgsp()->GroundCross(&gndChk);
if (lavaChk.ChkSetInfo() && dComIfG_Bgsp()->GetAttributeCode(lavaChk) == dBgS_Attr_LAVA_e && lavaY > groundY) {
@@ -109,7 +109,7 @@ static cPhs_State dWpotWater_Create(kankyo_class* i_k) {
gndChk.SetPos(&pos);
f32 groundY = dComIfG_Bgsp()->GroundCross(&gndChk);
i_this->mPos.y = groundY;
if (groundY != C_BG_MIN_HEIGHT) {
if (groundY != -G_CM3D_F_INF) {
cXyz sp18(i_this->mPos.x, i_this->mPos.y, i_this->mPos.z);
fopAcM_create(PROC_HITOBJ, 0, &sp18, i_this->mParam);
return i_this->create();
+4 -4
View File
@@ -1293,13 +1293,13 @@ BOOL fopAcM_getGroundAngle(fopAc_ac_c* actor, csXyz* p_angle) {
pos.y = dComIfG_Bgsp()->GroundCross(&gndChk);
s16 targetAngleX;
int targetAngleZ;
if (pos.y != C_BG_MIN_HEIGHT) {
if (pos.y != -G_CM3D_F_INF) {
f32 origY = pos.y + 50.0f;
gndChk.GetPointP()->set(pos.x, origY, pos.z + 10.0f);
f32 origX = gndChk.GetPointP()->x;
f32 origZ = gndChk.GetPointP()->z;
f32 groundY = dComIfG_Bgsp()->GroundCross(&gndChk);
if (groundY != C_BG_MIN_HEIGHT) {
if (groundY != -G_CM3D_F_INF) {
targetAngleX = -cM_atan2s(groundY - pos.y, origZ - pos.z);
} else {
pos.y = pos.y; // ?? fakematch?
@@ -1311,7 +1311,7 @@ BOOL fopAcM_getGroundAngle(fopAc_ac_c* actor, csXyz* p_angle) {
f32 tempZ = pos.z;
gndChk.GetPointP()->set(origX, origY, tempZ);
groundY = dComIfG_Bgsp()->GroundCross(&gndChk);
if (groundY != C_BG_MIN_HEIGHT) {
if (groundY != -G_CM3D_F_INF) {
targetAngleZ = cM_atan2s(groundY - pos.y, origX - pos.x);
} else {
ret = FALSE;
@@ -1412,7 +1412,7 @@ BOOL fopAcM_getWaterY(const cXyz* pPos, f32* pDstWaterY) {
static dBgS_WtrChk water_check;
BOOL ret = FALSE;
*pDstWaterY = C_BG_MIN_HEIGHT;
*pDstWaterY = -G_CM3D_F_INF;
cXyz pos;
pos.x = pPos->x;