Use Macro for __FILE__ & __LINE__ when possible (#559)

* First batch some overlay

* Almost all overlay

* effect & gamestate

* kaleido stuffs

* more overlay

* more left over from code folder

* remaining hardcoded line and file

* Open & Close _DISP __FILE__ & __LINE__ clean up

* Some if (1) {} remove

* LOG_xxxx __FILE__ , __LINE__ cleaned

* ASSERT macro __FILE__ __LINE__

* mtx without line/file in functions

* " if (1) {} " & "if (0) {}" and tab/white place

* LogUtils as macro

* GameState_, GameAlloc_, SystemArena_ & ZeldaArena_

* Revert "GameState_, GameAlloc_, SystemArena_ & ZeldaArena_"

This reverts commit 0d85caaf7e342648c01a15fe21e93637352dc596.

* Like last commit but as macro

* Fix matrix not using macros

* use function not macro

* DebugArena_* functions
GameAlloc_MallocDebug
BgCheck_PosErrorCheck as macros
removed issues with ; in macro file
This commit is contained in:
Baoulettes
2022-07-06 01:29:34 +02:00
committed by GitHub
parent a9c3c7541e
commit a5df9dddf0
467 changed files with 3081 additions and 3459 deletions

View File

@@ -21,7 +21,7 @@ void Locale_Init(void) {
default:
osSyncPrintf(VT_COL(RED, WHITE));
osSyncPrintf("z_locale_init: 日本用かアメリカ用か判別できません\n");
LogUtils_HungupThread("../z_locale.c", 118);
LOG_HUNGUP_THREAD();
osSyncPrintf(VT_RST);
break;
}

View File

@@ -60,7 +60,6 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, uintptr_t ram, size_t size) {
osCreateMesgQueue(&queue, &msg, 1);
while (size > buffSize) {
if (1) {} // Necessary to match
ioMsg.hdr.pri = OS_MESG_PRI_NORMAL;
ioMsg.hdr.retQueue = &queue;
@@ -92,7 +91,6 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, uintptr_t ram, size_t size) {
ram += buffSize;
}
if (1) {} // Also necessary to match
ioMsg.hdr.pri = OS_MESG_PRI_NORMAL;
ioMsg.hdr.retQueue = &queue;
@@ -125,9 +123,9 @@ end:
s32 DmaMgr_DmaHandler(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction) {
s32 ret;
ASSERT(pihandle == gCartHandle, "pihandle == carthandle", "../z_std_dma.c", 530);
ASSERT(direction == OS_READ, "direction == OS_READ", "../z_std_dma.c", 531);
ASSERT(mb != NULL, "mb != NULL", "../z_std_dma.c", 532);
ASSERT(pihandle == gCartHandle);
ASSERT(direction == OS_READ);
ASSERT(mb != NULL);
if (D_80009460 == 10) {
osSyncPrintf("%10lld サウンドDMA %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), mb->dramAddr,
@@ -249,7 +247,6 @@ void DmaMgr_ProcessMsg(DmaRequest* req) {
while (iter->vromEnd) {
if (vrom >= iter->vromStart && vrom < iter->vromEnd) {
if (1) {} // Necessary to match
if (iter->romEnd == 0) {
if (iter->vromEnd < vrom + size) {
@@ -354,8 +351,7 @@ s32 DmaMgr_SendRequestImpl(DmaRequest* req, uintptr_t ram, uintptr_t vrom, size_
osSyncPrintf("%c", 7);
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf("dmaEntryMsgQが一杯です。キューサイズの再検討をおすすめします。");
LOG_NUM("(sizeof(dmaEntryMsgBufs) / sizeof(dmaEntryMsgBufs[0]))", ARRAY_COUNT(sDmaMgrMsgs),
"../z_std_dma.c", 952);
LOG_NUM("(sizeof(dmaEntryMsgBufs) / sizeof(dmaEntryMsgBufs[0]))", ARRAY_COUNT(sDmaMgrMsgs));
osSyncPrintf(VT_RST);
}
}
@@ -417,7 +413,7 @@ void DmaMgr_Init(void) {
{
osSyncPrintf("_bootSegmentRomStart(%08x) != dma_rom_ad[0].rom_b(%08x)\n", _bootSegmentRomStart,
gDmaDataTable[0].vromEnd);
Fault_AddHungupAndCrash("../z_std_dma.c", 1055);
Fault_AddHungupAndCrash(__FILE__, __LINE__);
}
#endif