summaryrefslogtreecommitdiff
path: root/src/code/graph.c
diff options
context:
space:
mode:
authorfig02 <fig02srl@gmail.com>2024-12-15 11:07:21 -0500
committerGitHub <noreply@github.com>2024-12-15 11:07:21 -0500
commitff78b1263b8d16da70031d04ff14af3431380b13 (patch)
treebc36ce42fc75809c7495e227658294d4bf74e65a /src/code/graph.c
parent2eb0b9151675c056b46c629ee10aca2331903866 (diff)
Add macros for line number differences (#2365)
* initial work, think I got all of them * cleanup line_numbers.h * fix gc-eu-mq-dbg * fix matching problems * remove old lines * format * missed some stuff * comment fixes * other * review changes
Diffstat (limited to 'src/code/graph.c')
-rw-r--r--src/code/graph.c30
1 files changed, 5 insertions, 25 deletions
diff --git a/src/code/graph.c b/src/code/graph.c
index 2564d83dd..84186386e 100644
--- a/src/code/graph.c
+++ b/src/code/graph.c
@@ -3,6 +3,7 @@
#include "terminal.h"
#include "ucode_disas.h"
#include "versions.h"
+#include "line_numbers.h"
#define GFXPOOL_HEAD_MAGIC 0x1234
#define GFXPOOL_TAIL_MAGIC 0x5678
@@ -379,30 +380,15 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
PRINTF("%c", BEL);
PRINTF(VT_COL(RED, WHITE) T("ダイナミック領域先頭が破壊されています\n", "Dynamic area head is destroyed\n")
VT_RST);
-#if OOT_VERSION < NTSC_1_1
- Fault_AddHungupAndCrash("../graph.c", 937);
-#elif OOT_VERSION < PAL_1_0
- Fault_AddHungupAndCrash("../graph.c", 940);
-#elif OOT_VERSION < GC_JP
- Fault_AddHungupAndCrash("../graph.c", 951);
-#else
- Fault_AddHungupAndCrash("../graph.c", 1070);
-#endif
+ Fault_AddHungupAndCrash("../graph.c", LN4(937, 940, 951, 1070));
}
+
if (pool->tailMagic != GFXPOOL_TAIL_MAGIC) {
problem = true;
PRINTF("%c", BEL);
PRINTF(VT_COL(RED, WHITE)
T("ダイナミック領域末尾が破壊されています\n", "Dynamic region tail is destroyed\n") VT_RST);
-#if OOT_VERSION < NTSC_1_1
- Fault_AddHungupAndCrash("../graph.c", 943);
-#elif OOT_VERSION < PAL_1_0
- Fault_AddHungupAndCrash("../graph.c", 946);
-#elif OOT_VERSION < GC_JP
- Fault_AddHungupAndCrash("../graph.c", 957);
-#else
- Fault_AddHungupAndCrash("../graph.c", 1076);
-#endif
+ Fault_AddHungupAndCrash("../graph.c", LN4(943, 946, 957, 1076));
}
}
@@ -494,14 +480,8 @@ void Graph_ThreadEntry(void* arg0) {
sprintf(faultMsg, "CLASS SIZE= %d bytes", size);
Fault_AddHungupAndCrashImpl("GAME CLASS MALLOC FAILED", faultMsg);
-#elif OOT_VERSION < NTSC_1_1
- Fault_AddHungupAndCrash("../graph.c", 1067);
-#elif OOT_VERSION < PAL_1_0
- Fault_AddHungupAndCrash("../graph.c", 1070);
-#elif OOT_VERSION < GC_JP
- Fault_AddHungupAndCrash("../graph.c", 1081);
#else
- Fault_AddHungupAndCrash("../graph.c", 1200);
+ Fault_AddHungupAndCrash("../graph.c", LN4(1067, 1070, 1081, 1200));
#endif
}