mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-20 05:37:03 -04:00
C_BG_MIN_HEIGHT, C_BG_MAX_HEIGHT
This commit is contained in:
@@ -1310,7 +1310,7 @@ void daAgb_c::CursorMove(fopAc_ac_c* actor, u32 stage_type) {
|
||||
|
||||
cXyz r1_14;
|
||||
dBgS_GndChk r1_5C;
|
||||
f32 f30 = C_BG_INVALID_HEIGHT;
|
||||
f32 f30 = C_BG_MIN_HEIGHT;
|
||||
r1_5C.OffWall();
|
||||
r1_14.y = actor->current.pos.y + 150.0f;
|
||||
static cXy l_ckOffset[] = {
|
||||
|
||||
@@ -387,7 +387,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() != -1000000000.0f &&
|
||||
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) // Abyss ground code
|
||||
{
|
||||
|
||||
@@ -514,7 +514,7 @@ void daArrow_c::setRoomInfo() {
|
||||
|
||||
mGndChk.SetPos(¤t.pos);
|
||||
f32 groundY = dComIfG_Bgsp()->GroundCross(&mGndChk);
|
||||
if (groundY != -1000000000.0f) {
|
||||
if (groundY != C_BG_MIN_HEIGHT) {
|
||||
roomNo = dComIfG_Bgsp()->GetRoomId(mGndChk);
|
||||
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mGndChk);
|
||||
} else {
|
||||
|
||||
@@ -625,8 +625,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 == -1e9f) {
|
||||
sp8.y = 1e9f;
|
||||
if (sp8.y == C_BG_MIN_HEIGHT) {
|
||||
sp8.y = C_BG_MAX_HEIGHT;
|
||||
}
|
||||
if (i_this->dr.mAcch.GetGroundH() - sp8.y > 200.0f) {
|
||||
r19 |= check_bit[i];
|
||||
@@ -3225,14 +3225,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 != -1e9f) {
|
||||
if (sp28.y != C_BG_MIN_HEIGHT) {
|
||||
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 != -1e9f) {
|
||||
if (f1 != C_BG_MIN_HEIGHT) {
|
||||
r21 = (s16)-cM_atan2s(f1 - sp28.y, temp.z - sp28.z);
|
||||
if (r21 > 0x2000 || r21 < -0x2000) {
|
||||
r21 = 0;
|
||||
@@ -3243,7 +3243,7 @@ static BOOL daBk_Execute(bk_class* i_this) {
|
||||
temp.z = sp28.z;
|
||||
gndChk.SetPos(&temp);
|
||||
f1 = dComIfG_Bgsp()->GroundCross(&gndChk);
|
||||
if (f1 != -1e9f) {
|
||||
if (f1 != C_BG_MIN_HEIGHT) {
|
||||
r23 = (s16)cM_atan2s(f1 - sp28.y, temp.x - sp28.x);
|
||||
if (r23 > 0x2000 || r23 < -0x2000) {
|
||||
r23 = 0;
|
||||
|
||||
@@ -69,7 +69,7 @@ void daBoko_c::setFlameEffect() {
|
||||
/* 00001340-000013CC .text setRoomInfo__8daBoko_cFv */
|
||||
void daBoko_c::setRoomInfo() {
|
||||
int roomNo;
|
||||
if (mAcch.GetGroundH() != -1e9f) {
|
||||
if (mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
|
||||
roomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
|
||||
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mAcch.m_gnd);
|
||||
} else {
|
||||
@@ -194,7 +194,7 @@ BOOL daBoko_c::procCarry() {
|
||||
int i;
|
||||
for (i = 0; i < 3; i++) {
|
||||
m_ground_check.SetPos(¤t.pos);
|
||||
if (dComIfG_Bgsp()->GroundCross(&m_ground_check) != -1e9f) {
|
||||
if (dComIfG_Bgsp()->GroundCross(&m_ground_check) != C_BG_MIN_HEIGHT) {
|
||||
break;
|
||||
}
|
||||
current.pos.x -= 50.0f * cM_ssin(shape_angle.y);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/actor/d_a_bomb2.h"
|
||||
#include "d/actor/d_a_sea.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_a_obj.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/d_kankyo_wether.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
@@ -292,12 +293,12 @@ namespace daBomb2 {
|
||||
mAcch.ClrRoofNone();
|
||||
mAcch.m_roof_crr_height = 50.0f;
|
||||
mAcch.OnLineCheck();
|
||||
field_0x51C = -1.0e9f;
|
||||
field_0x520 = -1.0e9f;
|
||||
field_0x51C = C_BG_MIN_HEIGHT;
|
||||
field_0x520 = C_BG_MIN_HEIGHT;
|
||||
field_0x524 = 0;
|
||||
mbWaterIn = 0;
|
||||
field_0x526 = 0;
|
||||
field_0x528 = -1.0e9f;
|
||||
field_0x528 = C_BG_MIN_HEIGHT;
|
||||
}
|
||||
|
||||
dCcD_SrcSph Act_c::M_sph_src = {
|
||||
@@ -553,7 +554,7 @@ namespace daBomb2 {
|
||||
r5 = true;
|
||||
field_0x526 = 1;
|
||||
} else {
|
||||
field_0x520 = -1e9f;
|
||||
field_0x520 = C_BG_MIN_HEIGHT;
|
||||
field_0x526 = 0;
|
||||
}
|
||||
mbWaterIn = r5;
|
||||
@@ -564,7 +565,7 @@ namespace daBomb2 {
|
||||
}
|
||||
|
||||
bool Act_c::chk_lava_in() const {
|
||||
if(field_0x51C == -1.0e9f) {
|
||||
if(field_0x51C == C_BG_MIN_HEIGHT) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -573,7 +574,7 @@ namespace daBomb2 {
|
||||
|
||||
void Act_c::setRoomInfo() {
|
||||
s32 roomNo;
|
||||
if(mAcch.GetGroundH() != -1.0e9f) {
|
||||
if(mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
|
||||
roomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
|
||||
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mAcch.m_gnd);
|
||||
}
|
||||
@@ -1092,7 +1093,7 @@ namespace daBomb2 {
|
||||
void Act_c::mode_sink() {
|
||||
f32 temp;
|
||||
bool temp2 = fopAcM_getWaterY(¤t.pos, &temp);
|
||||
if(temp2 && field_0x528 != -1.0e9f && --field_0x698 > 0) {
|
||||
if(temp2 && field_0x528 != C_BG_MIN_HEIGHT && --field_0x698 > 0) {
|
||||
current.pos.y += temp - field_0x528;
|
||||
field_0x528 = temp;
|
||||
posMoveF();
|
||||
|
||||
+18
-15
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "d/actor/d_a_bomb.h"
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
#include "d/d_a_obj.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/actor/d_a_player_main.h"
|
||||
@@ -198,7 +199,7 @@ BOOL daBomb_c::draw() {
|
||||
draw_norm();
|
||||
}
|
||||
|
||||
if(fopAcM_GetModel(this) == 0 && mAcch.GetGroundH() != -1.0e9f) {
|
||||
if(fopAcM_GetModel(this) == 0 && mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
|
||||
cM3dGPla* pNormal = dComIfG_Bgsp()->GetTriPla(mAcch.m_gnd);
|
||||
if(pNormal) {
|
||||
dComIfGd_setSimpleShadow(¤t.pos, mAcch.GetGroundH(), 25.0f, pNormal->GetNP());
|
||||
@@ -439,8 +440,8 @@ bool daBomb_c::checkExplodeBg() {
|
||||
/* 800DA320-800DA3A0 .text water_tention__8daBomb_cFv */
|
||||
void daBomb_c::water_tention() {
|
||||
if(chk_water_in()) {
|
||||
if(field_0x554.y != -1.0e9f && field_0x554.z != -1.0e9f) {
|
||||
f32 temp = field_0x554.y - field_0x554.z;
|
||||
if(field_0x558 != C_BG_MIN_HEIGHT && field_0x55C != C_BG_MIN_HEIGHT) {
|
||||
f32 temp = field_0x558 - field_0x55C;
|
||||
current.pos.y += temp < 0.0f ? 0.8f * temp : 0.2f * temp;
|
||||
}
|
||||
}
|
||||
@@ -506,7 +507,7 @@ void daBomb_c::bgCrrPos_lava() {
|
||||
cXyz temp(current.pos.x, old.pos.y + 1.0f, current.pos.z);
|
||||
mGndChk.SetPos(&temp);
|
||||
|
||||
field_0x554.x = dComIfG_Bgsp()->GroundCross(&mGndChk);
|
||||
field_0x554 = dComIfG_Bgsp()->GroundCross(&mGndChk);
|
||||
}
|
||||
|
||||
/* 800DA5E0-800DA700 .text bgCrrPos_water__8daBomb_cFv */
|
||||
@@ -517,7 +518,7 @@ void daBomb_c::bgCrrPos_water() {
|
||||
bool r4 = mAcch.ChkWaterIn();
|
||||
bool r3 = r31 && current.pos.y < f1;
|
||||
bool r5 = false;
|
||||
field_0x554.z = field_0x554.y;
|
||||
field_0x55C = field_0x558;
|
||||
if (r4 && r3) {
|
||||
if (f31 > f1) {
|
||||
r3 = 0;
|
||||
@@ -526,15 +527,15 @@ void daBomb_c::bgCrrPos_water() {
|
||||
}
|
||||
}
|
||||
if (r4) {
|
||||
field_0x554.y = f31;
|
||||
field_0x558 = f31;
|
||||
r5 = true;
|
||||
field_0x562 = 0;
|
||||
} else if (r3) {
|
||||
field_0x554.y = f1;
|
||||
field_0x558 = f1;
|
||||
r5 = true;
|
||||
field_0x562 = 1;
|
||||
} else {
|
||||
field_0x554.y = -1e9f;
|
||||
field_0x558 = C_BG_MIN_HEIGHT;
|
||||
field_0x562 = 0;
|
||||
}
|
||||
field_0x560 = r5 && !mbWaterIn;
|
||||
@@ -555,21 +556,21 @@ bool daBomb_c::chk_water_in() {
|
||||
bool daBomb_c::chk_water_sink() {
|
||||
bool water = chk_water_in();
|
||||
|
||||
return water && field_0x554.y - current.pos.y > 30.0f;
|
||||
return water && field_0x558 - current.pos.y > 30.0f;
|
||||
}
|
||||
|
||||
/* 800DA768-800DA794 .text chk_lava_hit__8daBomb_cFv */
|
||||
bool daBomb_c::chk_lava_hit() {
|
||||
if(field_0x554.x == -1.0e9f) {
|
||||
if(field_0x554 == C_BG_MIN_HEIGHT) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return current.pos.y < field_0x554.x;
|
||||
return current.pos.y < field_0x554;
|
||||
}
|
||||
|
||||
/* 800DA794-800DA7CC .text chk_dead_zone__8daBomb_cFv */
|
||||
bool daBomb_c::chk_dead_zone() {
|
||||
return mAcch.GetGroundH() == -1.0e9f && field_0x554.y == -1.0e9f && field_0x554.x == -1.0e9f;
|
||||
return mAcch.GetGroundH() == C_BG_MIN_HEIGHT && field_0x558 == C_BG_MIN_HEIGHT && field_0x554 == C_BG_MIN_HEIGHT;
|
||||
}
|
||||
|
||||
/* 800DA7CC-800DA8C8 .text bound__8daBomb_cFf */
|
||||
@@ -630,7 +631,7 @@ void daBomb_c::set_real_shadow_flag() {
|
||||
/* 800DA9DC-800DAA60 .text setRoomInfo__8daBomb_cFv */
|
||||
void daBomb_c::setRoomInfo() {
|
||||
s32 roomNo;
|
||||
if(mAcch.GetGroundH() != -1.0e9f) {
|
||||
if(mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
|
||||
roomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
|
||||
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mAcch.m_gnd);
|
||||
}
|
||||
@@ -1210,7 +1211,7 @@ void daBomb_c::se_cannon_fly_stop() {
|
||||
|
||||
/* 800DC44C-800DC568 .text eff_water_splash__8daBomb_cFv */
|
||||
void daBomb_c::eff_water_splash() {
|
||||
cXyz pos(current.pos.x, field_0x554.y, current.pos.z);
|
||||
cXyz pos(current.pos.x, field_0x558, current.pos.z);
|
||||
fopKyM_createWpillar(&pos, 0.5f, 0.75f, 0);
|
||||
|
||||
cBgS_PolyInfo* temp[2] = {
|
||||
@@ -1399,7 +1400,9 @@ void daBomb_c::create_init() {
|
||||
mAcch.m_roof_crr_height = 50.0f;
|
||||
mAcch.OnLineCheck();
|
||||
|
||||
field_0x554.setall(-1.0e9f);
|
||||
field_0x554 = C_BG_MIN_HEIGHT;
|
||||
field_0x558 = C_BG_MIN_HEIGHT;
|
||||
field_0x55C = C_BG_MIN_HEIGHT;
|
||||
field_0x560 = 0;
|
||||
mbWaterIn = 0;
|
||||
field_0x562 = 0;
|
||||
|
||||
@@ -51,7 +51,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 != -1000000000.0f && i_this->mGroundHeight <= waterHeight) {
|
||||
if(waterHeight != C_BG_MIN_HEIGHT && i_this->mGroundHeight <= waterHeight) {
|
||||
i_this->mGroundHeight = waterHeight;
|
||||
state = 2;
|
||||
}
|
||||
|
||||
+10
-10
@@ -201,19 +201,19 @@ void daIball_c::checkGeo() {
|
||||
|
||||
(this->*mode_proc[mMode])();
|
||||
|
||||
dBgS_ObjGndChk_Yogan gnd_chk;
|
||||
dBgS_ObjGndChk_Yogan lavaChk;
|
||||
cXyz pos(current.pos.x, old.pos.y + 30.0f + m_data.mYOffset, current.pos.z);
|
||||
gnd_chk.SetPos(&pos);
|
||||
f32 groundY = dComIfG_Bgsp()->GroundCross(&gnd_chk);
|
||||
lavaChk.SetPos(&pos);
|
||||
f32 lavaY = dComIfG_Bgsp()->GroundCross(&lavaChk);
|
||||
f32 groundH = mAcch.GetGroundH();
|
||||
if (groundY != -1000000000.0f) {
|
||||
f32 dist_off_gnd = groundY - groundH;
|
||||
if ((dist_off_gnd < 20.0f && groundY > current.pos.y) || (dist_off_gnd >= 20.0f && groundY > current.pos.y + 20.0f)) {
|
||||
if (lavaY != C_BG_MIN_HEIGHT) {
|
||||
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);
|
||||
cXyz particle_scale;
|
||||
particle_scale.setall(0.25f);
|
||||
cXyz particle_pos(current.pos);
|
||||
particle_pos.y = groundY;
|
||||
particle_pos.y = lavaY;
|
||||
dComIfGp_particle_set(dPa_name::ID_SCENE_80D5, &particle_pos, NULL, &particle_scale);
|
||||
fopAcM_delete(this);
|
||||
}
|
||||
@@ -238,7 +238,7 @@ void daIball_c::mode_wait() {
|
||||
}
|
||||
|
||||
f32 seaHeight = mAcch.GetSeaHeight();
|
||||
if (seaHeight > current.pos.y && seaHeight != -1000000000.0f) {
|
||||
if (seaHeight > current.pos.y && seaHeight != C_BG_MIN_HEIGHT) {
|
||||
mode_water_init();
|
||||
current.pos.y = seaHeight;
|
||||
}
|
||||
@@ -254,10 +254,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 == -1000000000.0f || seaHeight < current.pos.y) {
|
||||
if (seaHeight == C_BG_MIN_HEIGHT || seaHeight < current.pos.y) {
|
||||
mode_wait_init();
|
||||
}
|
||||
if (seaHeight != -1000000000.0f) {
|
||||
if (seaHeight != C_BG_MIN_HEIGHT) {
|
||||
current.pos.y = seaHeight;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1296,12 +1296,12 @@ void daItem_c::mode_wait() {
|
||||
mode_water_init();
|
||||
}
|
||||
|
||||
dBgS_ObjGndChk_Yogan gndChk;
|
||||
dBgS_ObjGndChk_Yogan lavaChk;
|
||||
cXyz temp;
|
||||
temp.set(old.pos.x, old.pos.y, old.pos.z);
|
||||
gndChk.SetPos(&temp);
|
||||
f32 groundY = dComIfG_Bgsp()->GroundCross(&gndChk);
|
||||
if (groundY != -1000000000.0f && groundY > current.pos.y) {
|
||||
lavaChk.SetPos(&temp);
|
||||
f32 lavaY = dComIfG_Bgsp()->GroundCross(&lavaChk);
|
||||
if (lavaY != C_BG_MIN_HEIGHT && lavaY > current.pos.y) {
|
||||
fopAcM_delete(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,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 == -1e9f)
|
||||
if (i_this->mTargetPosHome.y == C_BG_MIN_HEIGHT)
|
||||
i_this->mTargetPosHome = player->current.pos;
|
||||
i_this->mTargetPos = i_this->mTargetPosHome;
|
||||
i_this->mSpeedLerp = 0.0f;
|
||||
|
||||
@@ -112,7 +112,7 @@ void daLlift_c::CreateInit() {
|
||||
cXyz waterCheckPos = current.pos;
|
||||
waterCheckPos.y += 200.0f;
|
||||
mWaterY = dBgS_ObjGndChk_Wtr_Func(waterCheckPos);
|
||||
if (mWaterY != -1e9f) {
|
||||
if (mWaterY != C_BG_MIN_HEIGHT) {
|
||||
cXyz particlePos = current.pos;
|
||||
particlePos.y = mWaterY + 1.0f;
|
||||
mEmitter3 = dComIfGp_particle_set(dPa_name::ID_SCENE_82AA, &particlePos, ¤t.angle);
|
||||
|
||||
@@ -273,7 +273,7 @@ void daNh_c::BGCheck() {
|
||||
dBgS_ObjGndChk_All gndChk;
|
||||
gndChk.SetPos(¤t.pos);
|
||||
f32 groundY = dComIfG_Bgsp()->GroundCross(&gndChk);
|
||||
if (groundY != -1000000000.0f) {
|
||||
if (groundY != C_BG_MIN_HEIGHT) {
|
||||
mGroundY = groundY;
|
||||
tevStr.mRoomNo = current.roomNo = dComIfG_Bgsp()->GetRoomId(gndChk);
|
||||
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(gndChk);
|
||||
|
||||
@@ -1285,7 +1285,7 @@ BOOL daNpc_kam_c::execute() {
|
||||
|
||||
if (!isNoBgCheck()) {
|
||||
mAcch.CrrPos(*dComIfG_Bgsp());
|
||||
if (mAcch.GetGroundH() != -1000000000.0f) {
|
||||
if (mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
|
||||
s8 roomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
|
||||
fopAcM_SetRoomNo(this, roomNo);
|
||||
tevStr.mRoomNo = roomNo;
|
||||
|
||||
@@ -2129,7 +2129,7 @@ BOOL daNpc_Os_c::execute() {
|
||||
mAcch.CrrPos(*dComIfG_Bgsp());
|
||||
|
||||
field_0x784 |= 0x10;
|
||||
if(mAcch.GetGroundH() != -1.0e9f) {
|
||||
if(mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
|
||||
tevStr.mRoomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
|
||||
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mAcch.m_gnd);
|
||||
|
||||
@@ -2206,7 +2206,7 @@ BOOL daNpc_Os_c::execute() {
|
||||
}
|
||||
}
|
||||
|
||||
if(mAcch.GetGroundH() != -1.0e9f) {
|
||||
if(mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
|
||||
cM3dGPla* plane = dComIfG_Bgsp()->GetTriPla(mAcch.m_gnd.GetBgIndex(), mAcch.m_gnd.GetPolyIndex());
|
||||
if(plane) {
|
||||
field_0x7F0 = *plane->GetNP();
|
||||
@@ -2226,7 +2226,7 @@ BOOL daNpc_Os_c::execute() {
|
||||
|
||||
field_0x7A8 = mAcch.ChkGroundHit();
|
||||
if(!fopAcM_checkCarryNow(this)) {
|
||||
if(mAcch.GetGroundH() == -1.0e9f || dComIfG_Bgsp()->GetGroundCode(mAcch.m_gnd) == 4) {
|
||||
if(mAcch.GetGroundH() == C_BG_MIN_HEIGHT || dComIfG_Bgsp()->GetGroundCode(mAcch.m_gnd) == 4) {
|
||||
if(m4E8 < 30) {
|
||||
m4E8 += 1;
|
||||
}
|
||||
@@ -2268,7 +2268,7 @@ BOOL daNpc_Os_c::execute() {
|
||||
mAcch.CrrPos(*dComIfG_Bgsp());
|
||||
|
||||
field_0x784 |= 0x10;
|
||||
if(mAcch.GetGroundH() != -1.0e9f) {
|
||||
if(mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
|
||||
tevStr.mRoomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
|
||||
tevStr.mEnvrIdxOverride = dComIfG_Bgsp()->GetPolyColor(mAcch.m_gnd);
|
||||
}
|
||||
|
||||
@@ -4430,7 +4430,7 @@ s32 daNpcPeople_c::createInit() {
|
||||
|
||||
if(mNpcType != 0xB) {
|
||||
mObjAcch.CrrPos(*dComIfG_Bgsp());
|
||||
if(-1.0e9f != mObjAcch.GetGroundH()) {
|
||||
if(C_BG_MIN_HEIGHT != mObjAcch.GetGroundH()) {
|
||||
current.pos.y = home.pos.y = mObjAcch.GetGroundH();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1733,7 +1733,7 @@ s32 daNpcRoten_c::createInit() {
|
||||
fopAcM_setCullSizeBox(this, -200.0f, 0.0f, -200.0f, 200.0f, 300.0f, 200.0f);
|
||||
|
||||
mObjAcch.CrrPos(*dComIfG_Bgsp());
|
||||
if(-1e9f != mObjAcch.GetGroundH()) {
|
||||
if(C_BG_MIN_HEIGHT != mObjAcch.GetGroundH()) {
|
||||
current.pos.y = home.pos.y = mObjAcch.GetGroundH();
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,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 tempz;
|
||||
f32 maxGroundY = -1000000000.0f;
|
||||
f32 maxGroundY = C_BG_MIN_HEIGHT;
|
||||
|
||||
mDoMtx_stack_c::transS(movebox->current.pos);
|
||||
mDoMtx_stack_c::YrotM(movebox->home.angle.y);
|
||||
@@ -1872,7 +1872,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 != -1000000000.0f) {
|
||||
if (triPla && groundH != C_BG_MIN_HEIGHT) {
|
||||
dComIfGd_setSimpleShadow(¤t.pos, groundH, i_attr()->m10, triPla->GetNP(), shape_angle.y, 1.0f, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3087,7 +3087,7 @@ BOOL daPy_lk_c::checkLavaFace(cXyz* oldPos, int attributeCode) {
|
||||
mLavaGndChk.SetPos(&pos);
|
||||
m35D4 = dComIfG_Bgsp()->GroundCross(&mLavaGndChk);
|
||||
if (mAcch.GetGroundH() > m35D4) {
|
||||
m35D4 = -1000000000.0f;
|
||||
m35D4 = C_BG_MIN_HEIGHT;
|
||||
}
|
||||
if (m35D4 > current.pos.y) {
|
||||
attributeCode = dComIfG_Bgsp()->GetAttributeCode(mLavaGndChk);
|
||||
@@ -3337,7 +3337,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() != -1e9f &&
|
||||
mAcch.GetGroundH() != C_BG_MIN_HEIGHT &&
|
||||
!checkNoResetFlg0((daPy_FLG0)(daPyFlg0_UNK20000000 | daPyFlg0_UNK80000000)) &&
|
||||
dComIfG_Bgsp()->ChkPolySafe(mAcch.m_gnd) &&
|
||||
dComIfG_Bgsp()->ChkMoveBG(mAcch.m_gnd)
|
||||
@@ -3495,7 +3495,7 @@ BOOL daPy_lk_c::execute() {
|
||||
}
|
||||
} else if (mCurProc == daPyProc_DEMO_TOOL_e) {
|
||||
current.pos = sp14;
|
||||
if (m3574 != 0 && mAcch.GetGroundH() != -1e9f) {
|
||||
if (m3574 != 0 && mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
|
||||
current.pos.y = mAcch.GetGroundH();
|
||||
}
|
||||
} else if (mCurProc == daPyProc_HOOKSHOT_FLY_e ||
|
||||
@@ -3515,7 +3515,7 @@ BOOL daPy_lk_c::execute() {
|
||||
}
|
||||
|
||||
int roomNo;
|
||||
if (mAcch.GetGroundH() != -1e9f) {
|
||||
if (mAcch.GetGroundH() != C_BG_MIN_HEIGHT) {
|
||||
roomNo = setRoomInfo();
|
||||
m357C = m3580;
|
||||
m3580 = dComIfG_Bgsp()->GetGroundCode(mAcch.m_gnd);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
int daPy_npc_c::check_initialRoom() {
|
||||
if (home.roomNo < 0) {
|
||||
mAcch.CrrPos(*dComIfG_Bgsp());
|
||||
if (mAcch.GetGroundH() == -1000000000.0f || dComIfG_Bgsp()->GetGroundCode(mAcch.m_gnd) == 4) {
|
||||
if (mAcch.GetGroundH() == C_BG_MIN_HEIGHT || dComIfG_Bgsp()->GetGroundCode(mAcch.m_gnd) == 4) {
|
||||
return 0;
|
||||
} else {
|
||||
int roomNo = dComIfG_Bgsp()->GetRoomId(mAcch.m_gnd);
|
||||
|
||||
@@ -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 != -1e9f) {
|
||||
} else if (field_0x10 != C_BG_MIN_HEIGHT) {
|
||||
pos->y = field_0x10 + 2.0f;
|
||||
} else {
|
||||
pos->y = field_0x0C;
|
||||
@@ -899,7 +899,7 @@ void daPy_lk_c::setFootMark(cXyz* i_pos) {
|
||||
mGndChk.SetPos(&pos);
|
||||
|
||||
pos.y = dComIfG_Bgsp()->GroundCross(&mGndChk);
|
||||
if (pos.y != -1e9f && dComIfG_Bgsp()->GetAttributeCode(mGndChk) == dBgS_Attr_SAND_e) {
|
||||
if (pos.y != C_BG_MIN_HEIGHT && dComIfG_Bgsp()->GetAttributeCode(mGndChk) == dBgS_Attr_SAND_e) {
|
||||
fopKyM_create(PROC_WATER_MARK, (shape_angle.y << 16) | 2, &pos, &scale, NULL);
|
||||
}
|
||||
|
||||
@@ -1049,7 +1049,7 @@ void daPy_lk_c::setFootEffect() {
|
||||
mGndChk.SetPos(&pos);
|
||||
|
||||
f32 groundY = dComIfG_Bgsp()->GroundCross(&mGndChk);
|
||||
if (groundY != -1e9f) {
|
||||
if (groundY != C_BG_MIN_HEIGHT) {
|
||||
pos.y = groundY;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user