summaryrefslogtreecommitdiff
path: root/soh/src/code/z_construct.c
diff options
context:
space:
mode:
authorBaoulettes <perlouzerie@hotmail.fr>2022-07-06 01:29:34 +0200
committerGitHub <noreply@github.com>2022-07-05 19:29:34 -0400
commita5df9dddf06adc328dea2877d1f21d1836653b35 (patch)
treec333cbf26b7caf5d940788b38b5a696fe7dda848 /soh/src/code/z_construct.c
parenta9c3c7541e927e31b671e94ceaa43df73df5a8d7 (diff)
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
Diffstat (limited to 'soh/src/code/z_construct.c')
-rw-r--r--soh/src/code/z_construct.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/soh/src/code/z_construct.c b/soh/src/code/z_construct.c
index 0bdf4a9d4..96915d919 100644
--- a/soh/src/code/z_construct.c
+++ b/soh/src/code/z_construct.c
@@ -34,20 +34,20 @@ void func_801109B0(GlobalContext* globalCtx) {
// "Permanent PARAMETER Segment = %x"
osSyncPrintf("常駐PARAMETERセグメント=%x\n", parameterSize);
- interfaceCtx->parameterSegment = GameState_Alloc(&globalCtx->state, parameterSize, "../z_construct.c", 159);
+ interfaceCtx->parameterSegment = GAMESTATE_ALLOC_MC(&globalCtx->state, parameterSize);
osSyncPrintf("parameter->parameterSegment=%x\n", interfaceCtx->parameterSegment);
- ASSERT(interfaceCtx->parameterSegment != NULL, "parameter->parameterSegment != NULL", "../z_construct.c", 161);
+ ASSERT(interfaceCtx->parameterSegment != NULL);
DmaMgr_SendRequest1(interfaceCtx->parameterSegment, (uintptr_t)_parameter_staticSegmentRomStart, parameterSize,
- "../z_construct.c", 162);
+ __FILE__, 162);
- interfaceCtx->doActionSegment = GameState_Alloc(&globalCtx->state, 0x480, "../z_construct.c", 166);
+ interfaceCtx->doActionSegment = GAMESTATE_ALLOC_MC(&globalCtx->state, 0x480);
osSyncPrintf("DOアクション テクスチャ初期=%x\n", 0x480); // "DO Action Texture Initialization"
osSyncPrintf("parameter->do_actionSegment=%x\n", interfaceCtx->doActionSegment);
- ASSERT(interfaceCtx->doActionSegment != NULL, "parameter->do_actionSegment != NULL", "../z_construct.c", 169);
+ ASSERT(interfaceCtx->doActionSegment != NULL);
if (gSaveContext.language == LANGUAGE_ENG) {
doActionOffset = 0;
@@ -60,7 +60,7 @@ void func_801109B0(GlobalContext* globalCtx) {
memcpy(interfaceCtx->doActionSegment, ResourceMgr_LoadTexByName(gAttackDoActionENGTex), 0x180);
memcpy(interfaceCtx->doActionSegment + 0x180, ResourceMgr_LoadTexByName(gCheckDoActionENGTex), 0x180);
//DmaMgr_SendRequest1(interfaceCtx->doActionSegment, (uintptr_t)_do_action_staticSegmentRomStart + doActionOffset, 0x300,
- //"../z_construct.c", 174);
+ //__FILE__, __LINE__);
if (gSaveContext.language == LANGUAGE_ENG) {
doActionOffset = 0x480;
@@ -72,16 +72,16 @@ void func_801109B0(GlobalContext* globalCtx) {
memcpy(interfaceCtx->doActionSegment + 0x300, ResourceMgr_LoadTexByName(gReturnDoActionENGTex), 0x180);
//DmaMgr_SendRequest1(interfaceCtx->doActionSegment + 0x300, (uintptr_t)_do_action_staticSegmentRomStart + doActionOffset,
- //0x180, "../z_construct.c", 178);
+ //0x180);
- interfaceCtx->iconItemSegment = GameState_Alloc(
- &globalCtx->state, 0x1000 * ARRAY_COUNT(gSaveContext.equips.buttonItems), "../z_construct.c", 190);
+ interfaceCtx->iconItemSegment = GAMESTATE_ALLOC_MC(
+ &globalCtx->state, 0x1000 * ARRAY_COUNT(gSaveContext.equips.buttonItems));
// "Icon Item Texture Initialization = %x"
osSyncPrintf("アイコンアイテム テクスチャ初期=%x\n", 0x4000);
osSyncPrintf("parameter->icon_itemSegment=%x\n", interfaceCtx->iconItemSegment);
- ASSERT(interfaceCtx->iconItemSegment != NULL, "parameter->icon_itemSegment != NULL", "../z_construct.c", 193);
+ ASSERT(interfaceCtx->iconItemSegment != NULL);
osSyncPrintf("Register_Item[%x, %x, %x, %x]\n", gSaveContext.equips.buttonItems[0],
gSaveContext.equips.buttonItems[1], gSaveContext.equips.buttonItems[2],
@@ -92,12 +92,12 @@ void func_801109B0(GlobalContext* globalCtx) {
DmaMgr_SendRequest1(interfaceCtx->iconItemSegment + 0x1000 * buttonIndex,
_icon_item_staticSegmentRomStart +
gSaveContext.equips.buttonItems[buttonIndex] * 0x1000,
- 0x1000, "../z_construct.c", 198);
+ 0x1000, __FILE__, __LINE__);
} else if (buttonIndex == 0 && gSaveContext.equips.buttonItems[buttonIndex] != 0xFF) {
DmaMgr_SendRequest1(interfaceCtx->iconItemSegment + 0x1000 * buttonIndex,
_icon_item_staticSegmentRomStart +
gSaveContext.equips.buttonItems[buttonIndex] * 0x1000,
- 0x1000, "../z_construct.c", 203);
+ 0x1000, __FILE__, __LINE__);
}
}
@@ -171,12 +171,12 @@ void Message_Init(GlobalContext* globalCtx) {
View_Init(&msgCtx->view, globalCtx->state.gfxCtx);
- msgCtx->textboxSegment = GameState_Alloc(&globalCtx->state, 0x2200, "../z_construct.c", 349);
+ msgCtx->textboxSegment = GAMESTATE_ALLOC_MC(&globalCtx->state, 0x2200);
osSyncPrintf("message->fukidashiSegment=%x\n", msgCtx->textboxSegment);
osSyncPrintf("吹き出しgame_alloc=%x\n", 0x2200); // "Textbox game_alloc=%x"
- ASSERT(msgCtx->textboxSegment != NULL, "message->fukidashiSegment != NULL", "../z_construct.c", 352);
+ ASSERT(msgCtx->textboxSegment != NULL);
Font_LoadOrderedFont(&globalCtx->msgCtx.font);