mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-09 18:43:45 +00:00
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
This commit is contained in:
parent
2eb0b91516
commit
ff78b1263b
13 changed files with 111 additions and 144 deletions
63
include/line_numbers.h
Normal file
63
include/line_numbers.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
#ifndef LINE_NUMBERS_H
|
||||
#define LINE_NUMBERS_H
|
||||
|
||||
// The macros in this file serve to reduce clutter from version differences that are only due to line numbers being different.
|
||||
|
||||
// The "LN" macros defined here are not meant to be used directly. See the wrapper macros below.
|
||||
#if OOT_VERSION == NTSC_1_0
|
||||
#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce) (ntsc_1_0)
|
||||
#elif OOT_VERSION == NTSC_1_1
|
||||
#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce) (ntsc_1_1)
|
||||
#elif OOT_VERSION == PAL_1_0
|
||||
#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce) (pal_1_0)
|
||||
#elif OOT_VERSION == NTSC_1_2
|
||||
#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce) (ntsc_1_2)
|
||||
#elif OOT_VERSION == PAL_1_1
|
||||
#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce) (pal_1_1)
|
||||
#elif OOT_VERSION == GC_JP
|
||||
#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce) (gc_jp)
|
||||
#elif OOT_VERSION == GC_JP_MQ
|
||||
#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce) (gc_jp_mq)
|
||||
#elif OOT_VERSION == GC_US
|
||||
#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce) (gc_us)
|
||||
#elif OOT_VERSION == GC_US_MQ
|
||||
#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce) (gc_us_mq)
|
||||
#elif OOT_VERSION == GC_EU_MQ_DBG
|
||||
#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce) (gc_eu_mq_dbg)
|
||||
#elif OOT_VERSION == GC_EU
|
||||
#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce) (gc_eu)
|
||||
#elif OOT_VERSION == GC_EU_MQ
|
||||
#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce) (gc_eu_mq)
|
||||
#elif OOT_VERSION == GC_JP_CE
|
||||
#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce) (gc_jp_ce)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* These wrappers exist to remove duplication of line numbers being passed to LN.
|
||||
* The wrappers have ambiguous names purposefully so they are short and don't add clutter.
|
||||
*
|
||||
* The groupings of different line numbers are difficult to name, as the exact grouping
|
||||
* depends on which versions happen to have changes in a given file.
|
||||
*/
|
||||
|
||||
// NTSC 1.0 and all the other versions
|
||||
#define LN1(ntsc_1_0, other) \
|
||||
LN(ntsc_1_0, other, other, other, other, other, other, other, other, other, other, other, other)
|
||||
|
||||
// NTSC 1.0, NTSC 1.1, and all the other versions
|
||||
#define LN2(ntsc_1_0, ntsc_1_1, other) \
|
||||
LN(ntsc_1_0, ntsc_1_1, other, other, other, other, other, other, other, other, other, other, other)
|
||||
|
||||
// NTSC 1.0, Gamecube, and all the other versions
|
||||
#define LN3(ntsc_1_0, other, gc) \
|
||||
LN(ntsc_1_0, other, other, other, other, gc, gc, gc, gc, gc, gc, gc, gc)
|
||||
|
||||
// NTSC 1.0, NTSC 1.1, Gamecube, and all the other versions
|
||||
#define LN4(ntsc_1_0, ntsc_1_1, other, gc) \
|
||||
LN(ntsc_1_0, ntsc_1_1, other, other, other, gc, gc, gc, gc, gc, gc, gc, gc)
|
||||
|
||||
// NTSC 1.0, NTSC 1.1, NTSC 1.2/PAL 1.0, Gamecube US/JP, Gamecube EU, and Gamecube CE
|
||||
#define LN5(ntsc_1_0, ntsc_1_1, other, pal_1_1, gc_ntsc, gc_eu, gc_jp_ce) \
|
||||
LN(ntsc_1_0, ntsc_1_1, other, other, pal_1_1, gc_ntsc, gc_ntsc, gc_ntsc, gc_ntsc, gc_eu, gc_eu, gc_eu, gc_jp_ce)
|
||||
|
||||
#endif
|
|
@ -2,6 +2,7 @@
|
|||
#include "region.h"
|
||||
#include "terminal.h"
|
||||
#include "versions.h"
|
||||
#include "line_numbers.h"
|
||||
|
||||
s32 gCurrentRegion = 0;
|
||||
|
||||
|
@ -39,15 +40,7 @@ void Locale_Init(void) {
|
|||
PRINTF(VT_COL(RED, WHITE));
|
||||
PRINTF(T("z_locale_init: 日本用かアメリカ用か判別できません\n",
|
||||
"z_locale_init: Can't tell if it's for Japan or America\n"));
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
LogUtils_HungupThread("../z_locale.c", 86);
|
||||
#elif OOT_VERSION < PAL_1_0
|
||||
LogUtils_HungupThread("../z_locale.c", 92);
|
||||
#elif OOT_VERSION < GC_JP
|
||||
LogUtils_HungupThread("../z_locale.c", 101);
|
||||
#else
|
||||
LogUtils_HungupThread("../z_locale.c", 118);
|
||||
#endif
|
||||
LogUtils_HungupThread("../z_locale.c", LN4(86, 92, 101, 118));
|
||||
PRINTF(VT_RST);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "fault.h"
|
||||
#include "stack.h"
|
||||
#include "terminal.h"
|
||||
#include "line_numbers.h"
|
||||
#if PLATFORM_N64
|
||||
#include "n64dd.h"
|
||||
#endif
|
||||
|
@ -296,14 +297,9 @@ NORETURN void DmaMgr_Error(DmaRequest* req, const char* filename, const char* er
|
|||
Fault_AddHungupAndCrashImpl(buff1, buff2);
|
||||
}
|
||||
|
||||
#define DMA_ERROR(req, filename, errorName, errorDesc, file, line1, line2, line3) \
|
||||
DmaMgr_Error(req, filename, errorName, errorDesc)
|
||||
#elif OOT_VERSION < NTSC_1_1
|
||||
#define DMA_ERROR(req, filename, errorName, errorDesc, file, line1, line2, line3) Fault_AddHungupAndCrash(file, line1)
|
||||
#elif OOT_VERSION < GC_JP
|
||||
#define DMA_ERROR(req, filename, errorName, errorDesc, file, line1, line2, line3) Fault_AddHungupAndCrash(file, line2)
|
||||
#define DMA_ERROR(req, filename, errorName, errorDesc, file, line) DmaMgr_Error(req, filename, errorName, errorDesc)
|
||||
#else
|
||||
#define DMA_ERROR(req, filename, errorName, errorDesc, file, line1, line2, line3) Fault_AddHungupAndCrash(file, line3)
|
||||
#define DMA_ERROR(req, filename, errorName, errorDesc, file, line) Fault_AddHungupAndCrash(file, line)
|
||||
#endif
|
||||
|
||||
#if PLATFORM_GC
|
||||
|
@ -409,7 +405,7 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
|
|||
DMA_ERROR(req, filename, "Segment Alignment Error",
|
||||
T("セグメント境界をまたがってDMA転送することはできません",
|
||||
"DMA transfers cannot cross segment boundaries"),
|
||||
"../z_std_dma.c", 575, 578, 726);
|
||||
"../z_std_dma.c", LN3(575, 578, 726));
|
||||
}
|
||||
|
||||
DmaMgr_DmaRomToRam(iter->romStart + (vrom - iter->file.vromStart), ram, size);
|
||||
|
@ -430,7 +426,7 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
|
|||
DMA_ERROR(req, filename, "Can't Transfer Segment",
|
||||
T("圧縮されたセグメントの途中からはDMA転送することはできません",
|
||||
"DMA transfer cannot be performed from the middle of a compressed segment"),
|
||||
"../z_std_dma.c", 595, 598, 746);
|
||||
"../z_std_dma.c", LN3(595, 598, 746));
|
||||
}
|
||||
|
||||
if (size != iter->file.vromEnd - iter->file.vromStart) {
|
||||
|
@ -439,7 +435,7 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
|
|||
DMA_ERROR(req, filename, "Can't Transfer Segment",
|
||||
T("圧縮されたセグメントの一部だけをDMA転送することはできません",
|
||||
"It is not possible to DMA only part of a compressed segment"),
|
||||
"../z_std_dma.c", 601, 604, 752);
|
||||
"../z_std_dma.c", LN3(601, 604, 752));
|
||||
}
|
||||
|
||||
// Reduce the thread priority and decompress the file, the decompression routine handles the DMA
|
||||
|
@ -472,8 +468,8 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
|
|||
// Error, rom is compressed so DMA may only be requested within the filesystem bounds
|
||||
|
||||
DMA_ERROR(req, NULL, "DATA DON'T EXIST",
|
||||
T("該当するデータが存在しません", "Corresponding data does not exist"), "../z_std_dma.c", 621,
|
||||
624, 771);
|
||||
T("該当するデータが存在しません", "Corresponding data does not exist"), "../z_std_dma.c",
|
||||
LN3(621, 624, 771));
|
||||
return;
|
||||
} else {
|
||||
// ROM is uncompressed, allow arbitrary DMA even if the region is not marked in the filesystem
|
||||
|
@ -543,7 +539,7 @@ s32 DmaMgr_RequestAsync(DmaRequest* req, void* ram, uintptr_t vrom, size_t size,
|
|||
(size == 0) || (size & 1)) {
|
||||
//! @bug `req` is passed to `DMA_ERROR` without rom, ram and size being set
|
||||
DMA_ERROR(req, NULL, "ILLIGAL DMA-FUNCTION CALL", T("パラメータ異常です", "Parameter error"), "../z_std_dma.c",
|
||||
UNK_LINE, UNK_LINE, UNK_LINE);
|
||||
UNK_LINE);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -645,13 +641,7 @@ void DmaMgr_Init(void) {
|
|||
PRINTF("_bootSegmentRomStart(%08x) != dma_rom_ad[0].rom_b(%08x)\n", _bootSegmentRomStart,
|
||||
gDmaDataTable[0].file.vromEnd);
|
||||
//! @bug The main code file where fault.c resides is not yet loaded
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
Fault_AddHungupAndCrash("../z_std_dma.c", 837);
|
||||
#elif OOT_VERSION < GC_JP
|
||||
Fault_AddHungupAndCrash("../z_std_dma.c", 840);
|
||||
#else
|
||||
Fault_AddHungupAndCrash("../z_std_dma.c", 1055);
|
||||
#endif
|
||||
Fault_AddHungupAndCrash("../z_std_dma.c", LN3(837, 840, 1055));
|
||||
}
|
||||
|
||||
// Start the DMA manager
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "libc64/os_malloc.h"
|
||||
#include "terminal.h"
|
||||
#include "versions.h"
|
||||
#include "line_numbers.h"
|
||||
#if PLATFORM_N64
|
||||
#include "n64dd.h"
|
||||
#endif
|
||||
|
@ -390,15 +391,7 @@ void GameState_InitArena(GameState* gameState, size_t size) {
|
|||
} else {
|
||||
THA_Init(&gameState->tha, NULL, 0);
|
||||
PRINTF(T("ハイラル確保失敗\n", "Failure to secure Hyrule\n"));
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
HUNGUP_AND_CRASH("../game.c", 895);
|
||||
#elif OOT_VERSION < PAL_1_0
|
||||
HUNGUP_AND_CRASH("../game.c", 898);
|
||||
#elif OOT_VERSION < GC_JP
|
||||
HUNGUP_AND_CRASH("../game.c", 985);
|
||||
#else
|
||||
HUNGUP_AND_CRASH("../game.c", 999);
|
||||
#endif
|
||||
HUNGUP_AND_CRASH("../game.c", LN4(895, 898, 985, 999));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -439,15 +432,7 @@ void GameState_Realloc(GameState* gameState, size_t size) {
|
|||
SystemArena_Display();
|
||||
#endif
|
||||
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
HUNGUP_AND_CRASH("../game.c", 940);
|
||||
#elif OOT_VERSION < PAL_1_0
|
||||
HUNGUP_AND_CRASH("../game.c", 943);
|
||||
#elif OOT_VERSION < GC_JP
|
||||
HUNGUP_AND_CRASH("../game.c", 1030);
|
||||
#else
|
||||
HUNGUP_AND_CRASH("../game.c", 1044);
|
||||
#endif
|
||||
HUNGUP_AND_CRASH("../game.c", LN4(940, 943, 1030, 1044));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "global.h"
|
||||
#include "fault.h"
|
||||
#include "terminal.h"
|
||||
#include "line_numbers.h"
|
||||
|
||||
#define PADMGR_LOG(controllerNum, msg) \
|
||||
if (DEBUG_FEATURES) { \
|
||||
|
@ -326,13 +327,7 @@ void PadMgr_UpdateInputs(PadMgr* padMgr) {
|
|||
default:
|
||||
// Unknown error response
|
||||
LOG_HEX("padnow1->errno", pad->errno, "../padmgr.c", 396);
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
Fault_AddHungupAndCrash("../padmgr.c", 379);
|
||||
#elif OOT_VERSION < GC_JP
|
||||
Fault_AddHungupAndCrash("../padmgr.c", 382);
|
||||
#else
|
||||
Fault_AddHungupAndCrash("../padmgr.c", 397);
|
||||
#endif
|
||||
Fault_AddHungupAndCrash("../padmgr.c", LN3(379, 382, 397));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "line_numbers.h"
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||
"pal-1.1:128"
|
||||
|
@ -33,15 +34,7 @@ void SysCfb_Init(s32 n64dd) {
|
|||
PRINTF("RAM4M mode\n");
|
||||
sSysCfbEnd = 0x80400000;
|
||||
} else {
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
LogUtils_HungupThread("../sys_cfb.c", 305);
|
||||
#elif OOT_VERSION < PAL_1_0
|
||||
LogUtils_HungupThread("../sys_cfb.c", 308);
|
||||
#elif OOT_VERSION < GC_JP
|
||||
LogUtils_HungupThread("../sys_cfb.c", 322);
|
||||
#else
|
||||
LogUtils_HungupThread("../sys_cfb.c", 354);
|
||||
#endif
|
||||
LogUtils_HungupThread("../sys_cfb.c", LN4(305, 308, 322, 354));
|
||||
}
|
||||
|
||||
screenSize = SCREEN_WIDTH * SCREEN_HEIGHT;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "terminal.h"
|
||||
#include "line_numbers.h"
|
||||
|
||||
#pragma increment_block_number "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128"
|
||||
|
||||
|
@ -1610,13 +1611,11 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
|
|||
colCtx->subdivAmount.x * sizeof(StaticLookup) * colCtx->subdivAmount.y *
|
||||
colCtx->subdivAmount.z,
|
||||
ALIGNOF_MASK(StaticLookup));
|
||||
|
||||
if (colCtx->lookupTbl == NULL) {
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
LogUtils_HungupThread("../z_bgcheck.c", 4173);
|
||||
#else
|
||||
LogUtils_HungupThread("../z_bgcheck.c", 4176);
|
||||
#endif
|
||||
LogUtils_HungupThread("../z_bgcheck.c", LN1(4173, 4176));
|
||||
}
|
||||
|
||||
colCtx->minBounds.x = colCtx->colHeader->minBounds.x;
|
||||
colCtx->minBounds.y = colCtx->colHeader->minBounds.y;
|
||||
colCtx->minBounds.z = colCtx->colHeader->minBounds.z;
|
||||
|
@ -1633,17 +1632,14 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
|
|||
colCtx->colHeader->numPolygons * sizeof(u8) + colCtx->dyna.polyNodesMax * sizeof(SSNode) +
|
||||
colCtx->dyna.polyListMax * sizeof(CollisionPoly) + colCtx->dyna.vtxListMax * sizeof(Vec3s) +
|
||||
sizeof(CollisionContext);
|
||||
|
||||
if (customNodeListMax > 0) {
|
||||
// tblMax is set without checking if customNodeListMax will result in a memory overflow
|
||||
// this is a non-issue as long as sceneSubdivisionList.nodeListMax is -1
|
||||
tblMax = customNodeListMax;
|
||||
} else {
|
||||
if (colCtx->memSize < memSize) {
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
LogUtils_HungupThread("../z_bgcheck.c", 4227);
|
||||
#else
|
||||
LogUtils_HungupThread("../z_bgcheck.c", 4230);
|
||||
#endif
|
||||
LogUtils_HungupThread("../z_bgcheck.c", LN1(4227, 4230));
|
||||
}
|
||||
tblMax = (colCtx->memSize - memSize) / sizeof(SSNode);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "quake.h"
|
||||
#include "terminal.h"
|
||||
#include "versions.h"
|
||||
#include "line_numbers.h"
|
||||
#if PLATFORM_N64
|
||||
#include "n64dd.h"
|
||||
#endif
|
||||
|
@ -176,21 +177,7 @@ void Play_SetupTransition(PlayState* this, s32 transitionType) {
|
|||
break;
|
||||
|
||||
default:
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
HUNGUP_AND_CRASH("../z_play.c", 2263);
|
||||
#elif OOT_VERSION < PAL_1_0
|
||||
HUNGUP_AND_CRASH("../z_play.c", 2266);
|
||||
#elif OOT_VERSION < PAL_1_1
|
||||
HUNGUP_AND_CRASH("../z_play.c", 2269);
|
||||
#elif OOT_VERSION < GC_JP
|
||||
HUNGUP_AND_CRASH("../z_play.c", 2272);
|
||||
#elif OOT_VERSION < GC_EU_MQ_DBG
|
||||
HUNGUP_AND_CRASH("../z_play.c", 2287);
|
||||
#elif OOT_VERSION < GC_JP_CE
|
||||
HUNGUP_AND_CRASH("../z_play.c", 2290);
|
||||
#else
|
||||
HUNGUP_AND_CRASH("../z_play.c", 2293);
|
||||
#endif
|
||||
HUNGUP_AND_CRASH("../z_play.c", LN5(2263, 2266, 2269, 2272, 2287, 2290, 2293));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "fault.h"
|
||||
#include "terminal.h"
|
||||
#include "versions.h"
|
||||
#include "line_numbers.h"
|
||||
#if PLATFORM_N64
|
||||
#include "n64dd.h"
|
||||
#endif
|
||||
|
@ -456,14 +457,11 @@ RoomShapeImageMultiBgEntry* Room_GetImageMultiBgEntry(RoomShapeImageMulti* roomS
|
|||
PRINTF(VT_COL(RED, WHITE) T("z_room.c:カメラIDに一致するデータが存在しません camid=%d\n",
|
||||
"z_room.c: Data consistent with camera id does not exist camid=%d\n") VT_RST,
|
||||
bgCamIndex);
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
Fault_AddHungupAndCrash("../z_room.c", 724);
|
||||
#elif OOT_VERSION < PAL_1_0
|
||||
Fault_AddHungupAndCrash("../z_room.c", 727);
|
||||
#elif OOT_VERSION < GC_JP
|
||||
Fault_AddHungupAndCrash("../z_room.c", 721);
|
||||
#else
|
||||
|
||||
#if PLATFORM_GC
|
||||
LogUtils_HungupThread("../z_room.c", 726);
|
||||
#else
|
||||
Fault_AddHungupAndCrash("../z_room.c", LN2(724, 727, 721));
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
|
@ -547,14 +545,10 @@ void Room_DrawImage(PlayState* play, Room* room, u32 flags) {
|
|||
} else if (roomShape->amountType == ROOM_SHAPE_IMAGE_AMOUNT_MULTI) {
|
||||
Room_DrawImageMulti(play, room, flags);
|
||||
} else {
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
Fault_AddHungupAndCrash("../z_room.c", 849);
|
||||
#elif OOT_VERSION < PAL_1_0
|
||||
Fault_AddHungupAndCrash("../z_room.c", 852);
|
||||
#elif OOT_VERSION < GC_JP
|
||||
Fault_AddHungupAndCrash("../z_room.c", 836);
|
||||
#else
|
||||
#if PLATFORM_GC
|
||||
LogUtils_HungupThread("../z_room.c", 841);
|
||||
#else
|
||||
Fault_AddHungupAndCrash("../z_room.c", LN2(849, 852, 836));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "n64dd.h"
|
||||
#include "stack.h"
|
||||
#include "versions.h"
|
||||
#include "line_numbers.h"
|
||||
|
||||
#pragma increment_block_number "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
|
||||
|
||||
|
@ -112,14 +113,9 @@ void func_801C6FD8(void) {
|
|||
// Adds a HungupAndCrash
|
||||
void func_801C7018(void) {
|
||||
if (D_80121213 != 0) {
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
Fault_AddHungupAndCrash("../z_n64dd.c", 503);
|
||||
#elif OOT_VERSION < PAL_1_0
|
||||
Fault_AddHungupAndCrash("../z_n64dd.c", 551);
|
||||
#else
|
||||
Fault_AddHungupAndCrash("../z_n64dd.c", 573);
|
||||
#endif
|
||||
Fault_AddHungupAndCrash("../z_n64dd.c", LN2(503, 551, 573));
|
||||
}
|
||||
|
||||
D_80121213 = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "z_en_horse_game_check.h"
|
||||
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
|
||||
#include "line_numbers.h"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
|
||||
|
||||
|
@ -90,12 +91,9 @@ s32 EnHorseGameCheck_InitIngoRace(EnHorseGameCheckBase* base, PlayState* play) {
|
|||
this->ingoHorse = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -250.0f, 1.0f, -1650.0f, 0, 0x4000, 0, 0x8003);
|
||||
|
||||
if (this->ingoHorse == NULL) {
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
LogUtils_HungupThread("../z_en_horse_game_check.c", 382);
|
||||
#else
|
||||
LogUtils_HungupThread("../z_en_horse_game_check.c", 385);
|
||||
#endif
|
||||
LogUtils_HungupThread("../z_en_horse_game_check.c", LN1(382, 385));
|
||||
}
|
||||
|
||||
this->startTimer = 0;
|
||||
this->finishTimer = 0;
|
||||
this->result = INGORACE_NO_RESULT;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "z_eff_ss_kakera.h"
|
||||
#include "versions.h"
|
||||
#include "line_numbers.h"
|
||||
|
||||
#define rReg0 regs[0]
|
||||
#define rGravity regs[1]
|
||||
|
@ -55,11 +56,7 @@ u32 EffectSsKakera_Init(PlayState* play, u32 index, EffectSs* this, void* initPa
|
|||
|
||||
} else {
|
||||
PRINTF("shape_modelがNULL\n");
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
LogUtils_HungupThread("../z_eff_kakera.c", 175);
|
||||
#else
|
||||
LogUtils_HungupThread("../z_eff_kakera.c", 178);
|
||||
#endif
|
||||
LogUtils_HungupThread("../z_eff_kakera.c", LN1(175, 178));
|
||||
}
|
||||
|
||||
this->draw = EffectSsKakera_Draw;
|
||||
|
|
Loading…
Add table
Reference in a new issue