several fixes and improvements

This commit is contained in:
uwabami 2020-05-14 18:47:12 +02:00
parent 8d2e0f5ffd
commit 2bdb1ab551
6 changed files with 22 additions and 2 deletions

View File

@ -8,11 +8,15 @@
void bub_spawner_act_0(void) {
s32 i;
s32 sp18 = o->oBirdChirpChirpUnkF4;
#ifndef NODRAWINGDISTANCE
if (o->oDistanceToMario < 1500.0f) {
#endif
for (i = 0; i < sp18; i++)
spawn_object(o, MODEL_BUB, bhvBub);
o->oAction = 1;
#ifndef NODRAWINGDISTANCE
}
#endif
}
void bub_spawner_act_1(void) {

View File

@ -108,7 +108,5 @@ void bhv_butterfly_loop(void) {
break;
}
#ifndef NODRAWINGDISTANCE
set_object_visibility(o, 3000);
#endif
}

View File

@ -1,10 +1,14 @@
static void fire_spitter_act_idle(void) {
approach_f32_ptr(&o->header.gfx.scale[0], 0.2f, 0.002f);
#ifndef NODRAWINGDISTANCE
if (o->oTimer > 150 && o->oDistanceToMario < 800.0f && !(o->oMoveFlags & 0x00000078)) {
#endif
o->oAction = FIRE_SPITTER_ACT_SPIT_FIRE;
o->oFireSpitterScaleVel = 0.05f;
#ifndef NODRAWINGDISTANCE
}
#endif
}
static void fire_spitter_act_spit_fire(void) {

View File

@ -14,18 +14,24 @@ void bhv_lll_floating_wood_bridge_loop(void) {
s32 i;
switch (o->oAction) {
case 0:
#ifndef NODRAWINGDISTANCE
if (o->oDistanceToMario < 2500.0f) {
#endif
for (i = 1; i < 4; i++) {
sp3C = spawn_object_relative(0, (i - 2) * 300, 0, 0, o, MODEL_LLL_WOOD_BRIDGE,
bhvLllWoodPiece);
sp3C->oLllWoodPieceUnkF4 = i * 4096;
}
o->oAction = 1;
#ifndef NODRAWINGDISTANCE
}
#endif
break;
case 1:
#ifndef NODRAWINGDISTANCE
if (o->oDistanceToMario > 2600.0f)
o->oAction = 2;
#endif
break;
case 2:
o->oAction = 0;

View File

@ -30,7 +30,9 @@ void fire_bar_spawn_flames(s16 a0) {
}
void fire_bar_act_0(void) {
#ifndef NODRAWINGDISTANCE
if (o->oDistanceToMario < 3000.0f)
#endif
o->oAction = 1;
}
@ -45,8 +47,10 @@ void fire_bar_act_1(void) {
void fire_bar_act_2(void) {
o->oAngleVelYaw = -0x100;
o->oMoveAngleYaw += o->oAngleVelYaw;
#ifndef NODRAWINGDISTANCE
if (o->oDistanceToMario > 3200.0f)
o->oAction = 3;
#endif
}
void fire_bar_act_3(void) {

View File

@ -527,11 +527,15 @@ void set_object_visibility(struct Object *obj, s32 dist) {
f32 objY = obj->oPosY;
f32 objZ = obj->oPosZ;
#ifndef NODRAWINGDISTANCE
if (is_point_within_radius_of_mario(objX, objY, objZ, dist) == TRUE) {
#endif
obj->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE;
#ifndef NODRAWINGDISTANCE
} else {
obj->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE;
}
#endif
}
/**