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

@@ -73,7 +73,7 @@ void PadMgr_RumbleControl(PadMgr* padMgr) {
if (padMgr->rumbleEnable[i] != 0) {
if (padMgr->rumbleCounter[i] < 3) {
// clang-format off
if (1) {} osSyncPrintf(VT_FGCOL(YELLOW));
osSyncPrintf(VT_FGCOL(YELLOW));
// clang-format on
// "Vibration pack jumble jumble"?
@@ -95,7 +95,7 @@ void PadMgr_RumbleControl(PadMgr* padMgr) {
} else {
if (padMgr->rumbleCounter[i] != 0) {
// clang-format off
if (1) {} osSyncPrintf(VT_FGCOL(YELLOW));
osSyncPrintf(VT_FGCOL(YELLOW));
// clang-format on
// "Stop vibration pack"
@@ -154,7 +154,7 @@ void PadMgr_RumbleControl(PadMgr* padMgr) {
} else if (var4 == 11) {
padMgr->pakType[i] = 2;
} else if (var4 == 4) {
LOG_NUM("++errcnt", ++errcnt, "../padmgr.c", 282);
LOG_NUM("++errcnt", ++errcnt);
osSyncPrintf(VT_FGCOL(YELLOW));
// "Controller pack communication error"
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "コントローラパックの通信エラー");
@@ -223,8 +223,6 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
for (i = 0; i < padMgr->nControllers; i++, input++, padnow1++) {
input->prev = input->cur;
if (1) {} // Necessary to match
switch (padnow1->err_no) {
case 0:
input->cur = *padnow1;
@@ -237,7 +235,7 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
break;
case 4:
input->cur = input->prev;
LOG_NUM("this->Key_switch[i]", padMgr->ctrlrIsConnected[i], "../padmgr.c", 380);
LOG_NUM("this->Key_switch[i]", padMgr->ctrlrIsConnected[i]);
osSyncPrintf(VT_FGCOL(YELLOW));
// "Overrun error occurred"
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "オーバーランエラーが発生");
@@ -259,8 +257,8 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
}
break;
default:
LOG_HEX("padnow1->errno", padnow1->err_no, "../padmgr.c", 396);
Fault_AddHungupAndCrash("../padmgr.c", 397);
LOG_HEX("padnow1->errno", padnow1->err_no);
Fault_AddHungupAndCrash(__FILE__, __LINE__);
}
buttonDiff = input->prev.button ^ input->cur.button;
@@ -325,7 +323,7 @@ void PadMgr_HandleRetraceMsg(PadMgr* padMgr) {
if (padMgr->padStatus[i].type == CONT_TYPE_NORMAL) {
mask |= 1 << i;
} else {
//LOG_HEX("this->pad_status[i].type", padMgr->padStatus[i].type, "../padmgr.c", 458);
//LOG_HEX("this->pad_status[i].type", padMgr->padStatus[i].type);
// "An unknown type of controller is connected"
//osSyncPrintf("知らない種類のコントローラが接続されています\n");
}
@@ -400,7 +398,7 @@ void PadMgr_ThreadEntry(PadMgr* padMgr) {
}
osRecvMesg(&padMgr->interruptMsgQ, (OSMesg*)&mesg, OS_MESG_BLOCK);
//LogUtils_CheckNullPointer("msg", mesg, "../padmgr.c", 563);
//LOG_CHECK_NULL_POINTER("msg", mesg);
PadMgr_HandleRetraceMsg(padMgr);
break;