mirror of https://github.com/sm64pc/sm64pc.git
Fixed fish bug
Also changed applicable files to only import configfile if NODRAWINGDISTANCE is not used (otherwise it's an unused import)
This commit is contained in:
parent
e2b2309c31
commit
38d6c1f615
|
@ -13,7 +13,9 @@
|
|||
#include "game/object_list_processor.h"
|
||||
#include "graph_node.h"
|
||||
#include "surface_collision.h"
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
// Macros for retrieving arguments from behavior scripts.
|
||||
#define BHV_CMD_GET_1ST_U8(index) (u8)((gCurBhvCommand[index] >> 24) & 0xFF) // unused
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
#include "game/mario.h"
|
||||
#include "game/object_list_processor.h"
|
||||
#include "surface_load.h"
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
s32 unused8038BE90;
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
// bub.c.inc
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
// coin.c.inc
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file fish.inc.c
|
||||
|
@ -21,22 +23,22 @@ void fish_act_spawn(void) {
|
|||
|
||||
// Blue fish with a quanitiy of twenty.
|
||||
case 0:
|
||||
model = MODEL_FISH; schoolQuantity = 20; minDistToMario = 15 * configDrawDistance; fishAnimation = blue_fish_seg3_anims_0301C2B0;
|
||||
model = MODEL_FISH; schoolQuantity = 20; minDistToMario = 15; fishAnimation = blue_fish_seg3_anims_0301C2B0;
|
||||
break;
|
||||
|
||||
// Blue fish with a quanitiy of five.
|
||||
case 1:
|
||||
model = MODEL_FISH; schoolQuantity = 5; minDistToMario = 15 * configDrawDistance; fishAnimation = blue_fish_seg3_anims_0301C2B0;
|
||||
model = MODEL_FISH; schoolQuantity = 5; minDistToMario = 15; fishAnimation = blue_fish_seg3_anims_0301C2B0;
|
||||
break;
|
||||
|
||||
// Cyan fish with a quanitiy of twenty.
|
||||
case 2:
|
||||
model = MODEL_CYAN_FISH; schoolQuantity = 20; minDistToMario = 15 * configDrawDistance; fishAnimation = cyan_fish_seg6_anims_0600E264;
|
||||
model = MODEL_CYAN_FISH; schoolQuantity = 20; minDistToMario = 15; fishAnimation = cyan_fish_seg6_anims_0600E264;
|
||||
break;
|
||||
|
||||
// Cyan fish with a quanitiy of five.
|
||||
case 3:
|
||||
model = MODEL_CYAN_FISH; schoolQuantity = 5; minDistToMario = 15 * configDrawDistance; fishAnimation = cyan_fish_seg6_anims_0600E264;
|
||||
model = MODEL_CYAN_FISH; schoolQuantity = 5; minDistToMario = 15; fishAnimation = cyan_fish_seg6_anims_0600E264;
|
||||
break;
|
||||
}
|
||||
/**
|
||||
|
@ -45,7 +47,7 @@ void fish_act_spawn(void) {
|
|||
* Fish moves at random with a max-range of 700.0f.
|
||||
*/
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
if (o->oDistanceToMario < minDistToMario || gCurrLevelNum == LEVEL_SA) {
|
||||
if (o->oDistanceToMario < minDistToMario * configDrawDistance / 100 || gCurrLevelNum == LEVEL_SA) {
|
||||
#endif
|
||||
for (i = 0; i < schoolQuantity; i++) {
|
||||
fishObject = spawn_object(o, model, bhvFish);
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
// heave_ho.c.inc
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
// king_bobomb.c.inc
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// lll_floating_wood_piece.c.inc
|
||||
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
void bhv_lll_wood_piece_loop(void) {
|
||||
if (o->oTimer == 0)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// lll_rotating_hex_flame.c.inc
|
||||
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
void bhv_lll_rotating_hex_flame_loop(void) {
|
||||
f32 sp24 = o->oLllRotatingHexFlameUnkF4;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Behavior for bhvPiranhaPlant.
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
// sl_walking_penguin.c.inc
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Behavior file for bhvSnufit and bhvSnufitBalls.
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
struct TripletButterflyActivationData {
|
||||
s32 model;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// water_bomb_cannon.inc.c
|
||||
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
void bhv_bubble_cannon_barrel_loop(void) {
|
||||
struct Object *val04;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
// whirlpool.c.inc
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
|
||||
// whomp.c.inc
|
||||
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
#include "obj_behaviors.h"
|
||||
#include "object_helpers.h"
|
||||
#include "object_list_processor.h"
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
#include "pc/configfile.h"
|
||||
#endif
|
||||
#include "rendering_graph_node.h"
|
||||
#include "save_file.h"
|
||||
#include "spawn_object.h"
|
||||
|
|
Loading…
Reference in New Issue