summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2025-02-21 18:02:19 -0800
committerGitHub <noreply@github.com>2025-02-21 18:02:19 -0800
commit61961fb938fa2ff9a6b2391be09ad19d46b7b3d5 (patch)
tree7ef814f477dc8cbf5c48d5c52997ef83ffcd604f /src/code
parenta96c93d9363c72010eace4e32c053e012afe5b9a (diff)
Remove asm-processor in favor of preprocess.sh (#1760)
* Remove asm-processor in favor of preprocess.sh * Remove duplicate CMD_F * preprocess_pragmas gitignore * Mac fixes * Macos + clang as cc check fixes * Need quotes for paths with spaces * Fix bss
Diffstat (limited to 'src/code')
-rw-r--r--src/code/main.c3
-rw-r--r--src/code/sys_math3d.c41
-rw-r--r--src/code/z_bgcheck.c3
-rw-r--r--src/code/z_collision_check.c63
-rw-r--r--src/code/z_demo.c5
-rw-r--r--src/code/z_kaleido_scope_call.c1
-rw-r--r--src/code/z_map_disp.c1
-rw-r--r--src/code/z_message.c1
8 files changed, 12 insertions, 106 deletions
diff --git a/src/code/main.c b/src/code/main.c
index 13dd030c5..588fe6da2 100644
--- a/src/code/main.c
+++ b/src/code/main.c
@@ -1,7 +1,8 @@
-#include "prevent_bss_reordering.h"
#include "ultra64.h"
#include "stack.h"
+#pragma increment_block_number "n64-us:128"
+
// Variables are put before most headers as a hacky way to bypass bss reordering
OSMesgQueue sSerialEventQueue;
OSMesg sSerialMsgBuf[1];
diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c
index 69435f663..039f58829 100644
--- a/src/code/sys_math3d.c
+++ b/src/code/sys_math3d.c
@@ -1,48 +1,15 @@
-#include "prevent_bss_reordering2.h" // bumps the bss index by 65
-// clang-format off
-// Partial structs taken from "prevent_bss_reordering.h", bumps the bss index by 59
-struct Dummy200 { int x; };
-struct Dummy201 { int x; };
-struct Dummy202 { int x; };
-struct Dummy203 { int x; };
-struct Dummy204 { int x; };
-struct Dummy205 { int x; };
-struct Dummy206 { int x; };
-struct Dummy207 { int x; };
-struct Dummy208 { int x; };
-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; };
-struct Dummy228 { int x; };
-typedef int Dummy229;
-
-// clang-format on
-
// Headers are currently valued at 60 mod 256 (./tools/calc_bss.sh <headers>)
#include "z64math.h"
#include "stdbool.h"
#include "PR/gu.h"
-// The bss index at this point should be 184
#include "macros.h"
+#pragma increment_block_number "n64-us:124"
+
+// 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 89dfaf5be..4271927fb 100644
--- a/src/code/z_bgcheck.c
+++ b/src/code/z_bgcheck.c
@@ -1,4 +1,3 @@
-#include "prevent_bss_reordering.h"
#include "z64bgcheck.h"
#include "libc64/fixed_point.h"
@@ -9,6 +8,8 @@
#include "vt.h"
#include "z64actor.h"
+#pragma increment_block_number "n64-us:128"
+
#define DYNA_RAYCAST_FLOORS 1
#define DYNA_RAYCAST_WALLS 2
#define DYNA_RAYCAST_CEILINGS 4
diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c
index 5cf01a80e..dacdf40b5 100644
--- a/src/code/z_collision_check.c
+++ b/src/code/z_collision_check.c
@@ -18,66 +18,7 @@ typedef void (*ColChkApplyFunc)(struct PlayState*, CollisionCheckContext*, Colli
typedef void (*ColChkVsFunc)(struct PlayState*, CollisionCheckContext*, Collider*, Collider*);
typedef s32 (*ColChkLineFunc)(struct PlayState*, CollisionCheckContext*, Collider*, Vec3f*, Vec3f*);
-#include "prevent_bss_reordering2.h"
-// clang-format off
-// Partial structs taken from "prevent_bss_reordering.h"
-struct Dummy200 { int x; };
-struct Dummy201 { int x; };
-struct Dummy202 { int x; };
-struct Dummy203 { int x; };
-struct Dummy204 { int x; };
-struct Dummy205 { int x; };
-struct Dummy206 { int x; };
-struct Dummy207 { int x; };
-struct Dummy208 { int x; };
-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; };
-struct Dummy228 { int x; };
-struct Dummy229 { int x; };
-struct Dummy230 { int x; };
-struct Dummy231 { int x; };
-struct Dummy232 { int x; };
-struct Dummy233 { int x; };
-struct Dummy234 { int x; };
-struct Dummy235 { int x; };
-struct Dummy236 { int x; };
-struct Dummy237 { int x; };
-struct Dummy238 { int x; };
-struct Dummy239 { int x; };
-struct Dummy240 { int x; };
-struct Dummy241 { int x; };
-struct Dummy242 { int x; };
-struct Dummy243 { int x; };
-struct Dummy244 { int x; };
-struct Dummy245 { int x; };
-struct Dummy246 { int x; };
-struct Dummy247 { int x; };
-struct Dummy248 { int x; };
-struct Dummy249 { int x; };
-struct Dummy250 { int x; };
-struct Dummy251 { int x; };
-struct Dummy252 { int x; };
-struct Dummy253 { int x; };
-struct Dummy254 { int x; };
-struct Dummy255 { int x; };
-// clang-format on
+#pragma increment_block_number "n64-us:192"
Vec3f D_801EDE00;
Vec3f D_801EDE10;
@@ -103,7 +44,7 @@ TriNorm D_801EE0E8[2];
TriNorm D_801EE150;
TriNorm D_801EE188;
-#include "prevent_bss_reordering.h"
+#pragma increment_block_number "n64-us:128"
/**
* Gets the damage and effect that should be applied for the collision between
diff --git a/src/code/z_demo.c b/src/code/z_demo.c
index d7a2239e8..95c6cdcaf 100644
--- a/src/code/z_demo.c
+++ b/src/code/z_demo.c
@@ -1,8 +1,7 @@
-#include "prevent_bss_reordering.h"
-#include "prevent_bss_reordering2.h"
-
#include "PR/ultratypes.h"
+#pragma increment_block_number "n64-us:128"
+
// Variables are put before most headers as a hacky way to bypass bss reordering
struct CutsceneCamera;
diff --git a/src/code/z_kaleido_scope_call.c b/src/code/z_kaleido_scope_call.c
index 3a9b42c7b..1dce431f9 100644
--- a/src/code/z_kaleido_scope_call.c
+++ b/src/code/z_kaleido_scope_call.c
@@ -1,4 +1,3 @@
-#include "prevent_bss_reordering.h"
#include "kaleido_manager.h"
#include "z64.h"
diff --git a/src/code/z_map_disp.c b/src/code/z_map_disp.c
index 5bbe997c8..e2a77b22b 100644
--- a/src/code/z_map_disp.c
+++ b/src/code/z_map_disp.c
@@ -1,4 +1,3 @@
-#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 0ae0955ed..20ce6279e 100644
--- a/src/code/z_message.c
+++ b/src/code/z_message.c
@@ -1,4 +1,3 @@
-#include "prevent_bss_reordering.h"
#include "z64message.h"
#include "global.h"