summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorTharo <17233964+Thar0@users.noreply.github.com>2024-06-23 17:51:44 +0100
committerGitHub <noreply@github.com>2024-06-23 12:51:44 -0400
commit3682a13ec55f84eecf8b16aa7e32bda7bcf9bdfc (patch)
tree45b87f464a1b6adffe36dd25711c611ac8c046ca /src/code
parent4c201ff47f65571d8d1d719229431d46995d8a7e (diff)
Format gbi.h, move ucode defines to makefile (#1650)
* Format gbi.h, move ucode defines to makefile, correct usage of gDPSetDither * UCODE_DEFS -> GBI_DEFINES, add GBI_DOWHILE toggle * Define GBI_DOWHILE for bss calculations * Makefile thing
Diffstat (limited to 'src/code')
-rw-r--r--src/code/sys_math3d.c21
-rw-r--r--src/code/z_bgcheck.c1
-rw-r--r--src/code/z_lights.c2
-rw-r--r--src/code/z_map_disp.c1
-rw-r--r--src/code/z_message.c1
5 files changed, 23 insertions, 3 deletions
diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c
index ad617e50f..b5048e523 100644
--- a/src/code/sys_math3d.c
+++ b/src/code/sys_math3d.c
@@ -1,6 +1,6 @@
-#include "prevent_bss_reordering.h"
+#include "prevent_bss_reordering2.h" // bumps the bss index by 65
// clang-format off
-// Partial structs taken from "prevent_bss_reordering.h"
+// Partial structs taken from "prevent_bss_reordering.h", bumps the bss index by 56
struct Dummy200 { int x; };
struct Dummy201 { int x; };
struct Dummy202 { int x; };
@@ -14,12 +14,29 @@ struct Dummy209 { int x; };
struct Dummy210 { int x; };
struct Dummy211 { int x; };
struct Dummy212 { int x; };
+struct Dummy213 { int x; };
+struct Dummy214 { int x; };
+struct Dummy215 { int x; };
+struct Dummy216 { int x; };
+struct Dummy217 { int x; };
+struct Dummy218 { int x; };
+struct Dummy219 { int x; };
+struct Dummy220 { int x; };
+struct Dummy221 { int x; };
+struct Dummy222 { int x; };
+struct Dummy223 { int x; };
+struct Dummy224 { int x; };
+struct Dummy225 { int x; };
+struct Dummy226 { int x; };
+struct Dummy227 { int x; };
// clang-format on
+// Headers are currently valued at 63 mod 256 (./tools/calc_bss.sh <headers>)
#include "z64math.h"
#include "libc/stdbool.h"
#include "PR/gu.h"
+// The bss index at this point should be 184
Vec3f gZeroVec3f = { 0.0f, 0.0f, 0.0f };
Vec3s gZeroVec3s = { 0, 0, 0 };
diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c
index a73878099..060954255 100644
--- a/src/code/z_bgcheck.c
+++ b/src/code/z_bgcheck.c
@@ -1,3 +1,4 @@
+#include "prevent_bss_reordering.h"
#include "z64bgcheck.h"
#include "libc64/fixed_point.h"
diff --git a/src/code/z_lights.c b/src/code/z_lights.c
index c04a08593..81b4e47f3 100644
--- a/src/code/z_lights.c
+++ b/src/code/z_lights.c
@@ -428,7 +428,7 @@ void Lights_DrawGlow(PlayState* play) {
gfx = Gfx_SetupDL65_NoCD(POLY_XLU_DISP);
- gDPSetDither(gfx++, G_CD_NOISE);
+ gDPSetDither(gfx++, G_AD_PATTERN | G_CD_NOISE);
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
0);
diff --git a/src/code/z_map_disp.c b/src/code/z_map_disp.c
index 6ab61fcf7..7fbae707d 100644
--- a/src/code/z_map_disp.c
+++ b/src/code/z_map_disp.c
@@ -1,3 +1,4 @@
+#include "prevent_bss_reordering.h"
#include "global.h"
#include "gfx.h"
#include "sys_cmpdma.h"
diff --git a/src/code/z_message.c b/src/code/z_message.c
index 8cb55ef1f..b4bda662a 100644
--- a/src/code/z_message.c
+++ b/src/code/z_message.c
@@ -1,3 +1,4 @@
+#include "prevent_bss_reordering.h"
#include "z64message.h"
#include "global.h"