From 953451ba7c7dae56511aaf693141830d32d7eded Mon Sep 17 00:00:00 2001 From: Reonu Date: Wed, 26 May 2021 15:28:06 +0100 Subject: [PATCH] Moved the coordinate overflow fix setting to config.h --- include/config.h | 15 +++++++++++++++ src/engine/math_util.c | 2 ++ src/engine/math_util.h | 8 +------- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/include/config.h b/include/config.h index 4048e0a4..cab8aaaf 100644 --- a/include/config.h +++ b/include/config.h @@ -60,4 +60,19 @@ // Uncomment this if you want to keep the mario head and not skip it //#define KEEP_MARIO_HEAD +/* Coordinate overflow fix setting: + * Scales the world down by this factor, increasing how far you can render on + * console in exchange for a slight loss in precision. + * + * For double extended boundary hacks, a value of 1.5f or 2.0f is good. + * For quadruple extended bounds, use 3.f or 4.f + * + * In a nutshell: + * - If you're not using extbounds, set this to 1.f. + * - If you're using 2x bounds, set this to 2.f + * - If you're using 4x bounds, use a value between 3.f and 4.f, depending on whether you're filling up the entire 4x bounds or not. + * If you want to change the extended bounds mode, go to src/engine/extended_bounds.h + */ +#define WORLD_SCALE 2.f + #endif // CONFIG_H diff --git a/src/engine/math_util.c b/src/engine/math_util.c index 75cd43a0..9992a200 100644 --- a/src/engine/math_util.c +++ b/src/engine/math_util.c @@ -7,6 +7,8 @@ #include "trig_tables.inc.c" +#include "config.h" + // Variables for a spline curve animation (used for the flight path in the grand star cutscene) Vec4s *gSplineKeyframe; float gSplineKeyframeFraction; diff --git a/src/engine/math_util.h b/src/engine/math_util.h index 0826a840..2938061c 100644 --- a/src/engine/math_util.h +++ b/src/engine/math_util.h @@ -5,13 +5,7 @@ #include "types.h" -/* Scales the world down by this factor, increasing how far you can render on - * console in exchange for a slight loss in precision. - * - * For double extended boundary hacks, a value of 1.5f or 2.0f is good. - * For quadruple extended bounds, use 3.f or 4.f - */ -#define WORLD_SCALE 2.f + /* * The sine and cosine tables overlap, but "#define gCosineTable (gSineTable +