1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-12 01:40:47 +00:00

Use debug macros even in N64-only code (#2298)

* Use debug macros even in N64-only code

* Use UNK_FILE/UNK_LINE instead
This commit is contained in:
cadmic 2024-11-15 10:18:05 -08:00 committed by GitHub
parent e46fcbdbc9
commit cf4dc98cc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 70 additions and 67 deletions

View file

@ -163,7 +163,7 @@ void FileSelect_DrawImageRGBA32(GraphicsContext* gfxCtx, s16 centerX, s16 center
s32 pad;
s32 i;
OPEN_DISPS(gfxCtx, "../z_file_choose.c", 0);
OPEN_DISPS(gfxCtx, "../z_file_choose.c", UNK_LINE);
Gfx_SetupDL_56Opa(gfxCtx);
@ -210,7 +210,7 @@ void FileSelect_DrawImageRGBA32(GraphicsContext* gfxCtx, s16 centerX, s16 center
}
}
CLOSE_DISPS(gfxCtx, "../z_file_choose.c", 0);
CLOSE_DISPS(gfxCtx, "../z_file_choose.c", UNK_LINE);
}
void FileSelect_DrawInitialLanguageMenu(FileSelectState* this) {
@ -219,7 +219,7 @@ void FileSelect_DrawInitialLanguageMenu(FileSelectState* this) {
s32 y1;
s32 y2;
OPEN_DISPS(this->state.gfxCtx, "../z_file_choose.c", 0);
OPEN_DISPS(this->state.gfxCtx, "../z_file_choose.c", UNK_LINE);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 70 + WREG(0));
FileSelect_DrawImageRGBA32(this->state.gfxCtx, 160, 85 + WREG(1), (u8*)gTitleZeldaShieldLogoTex, 160, 160);
@ -294,7 +294,7 @@ void FileSelect_DrawInitialLanguageMenu(FileSelectState* this) {
y1 = y2;
}
CLOSE_DISPS(this->state.gfxCtx, "../z_file_choose.c", 0);
CLOSE_DISPS(this->state.gfxCtx, "../z_file_choose.c", UNK_LINE);
}
#endif
@ -2334,8 +2334,8 @@ void FileSelect_Init(GameState* thisx) {
#if OOT_PAL_N64
size = gObjectTable[OBJECT_MAG].vromEnd - gObjectTable[OBJECT_MAG].vromStart;
this->objectMagSegment = GAME_STATE_ALLOC(&this->state, size, "../z_file_choose.c", 0);
DMA_REQUEST_SYNC(this->objectMagSegment, gObjectTable[OBJECT_MAG].vromStart, size, "../z_file_choose.c", 0);
this->objectMagSegment = GAME_STATE_ALLOC(&this->state, size, "../z_file_choose.c", UNK_LINE);
DMA_REQUEST_SYNC(this->objectMagSegment, gObjectTable[OBJECT_MAG].vromStart, size, "../z_file_choose.c", UNK_LINE);
#endif
Matrix_Init(&this->state);

View file

@ -16,7 +16,7 @@ void FileSelect_DrawCharacter(GraphicsContext* gfxCtx, void* texture, s16 vtx) {
#if OOT_NTSC
void FileSelect_DrawCharacterTransition(GraphicsContext* gfxCtx, void* texture1, void* texture2, s16 vtx) {
OPEN_DISPS(gfxCtx, "", 0);
OPEN_DISPS(gfxCtx, "../z_file_nameset_PAL.c", UNK_LINE);
gDPLoadTextureBlock_4b(POLY_OPA_DISP++, texture1, G_IM_FMT_I, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@ -24,7 +24,7 @@ void FileSelect_DrawCharacterTransition(GraphicsContext* gfxCtx, void* texture1,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSP1Quadrangle(POLY_OPA_DISP++, vtx, vtx + 2, vtx + 3, vtx + 1, 0);
CLOSE_DISPS(gfxCtx, "", 0);
CLOSE_DISPS(gfxCtx, "../z_file_nameset_PAL.c", UNK_LINE);
}
#endif
@ -1877,7 +1877,7 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) {
#if OOT_PAL_N64
Matrix_Push();
Matrix_Translate(0.0f, 0.8f, 0.0f, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, this->state.gfxCtx, "../z_file_nameset_PAL.c", 0);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, this->state.gfxCtx, "../z_file_nameset_PAL.c", UNK_LINE);
gSPVertex(POLY_OPA_DISP++, gOptionsDividerLanguageVtx, 4, 0);
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
Matrix_Pop();

View file

@ -3698,12 +3698,12 @@ void KaleidoScope_Update(PlayState* play) {
#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN) {
size = (uintptr_t)_icon_item_jpn_staticSegmentRomEnd - (uintptr_t)_icon_item_jpn_staticSegmentRomStart;
DmaMgr_RequestSync(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_jpn_staticSegmentRomStart,
size);
DMA_REQUEST_SYNC(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_jpn_staticSegmentRomStart, size,
"../z_kaleido_scope_PAL.c", UNK_LINE);
} else {
size = (uintptr_t)_icon_item_nes_staticSegmentRomEnd - (uintptr_t)_icon_item_nes_staticSegmentRomStart;
DmaMgr_RequestSync(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_nes_staticSegmentRomStart,
size);
DMA_REQUEST_SYNC(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_nes_staticSegmentRomStart, size,
"../z_kaleido_scope_PAL.c", UNK_LINE);
}
#else
if (gSaveContext.language == LANGUAGE_ENG) {
@ -3734,17 +3734,17 @@ void KaleidoScope_Update(PlayState* play) {
if (((void)0, gSaveContext.worldMapArea) < WORLD_MAP_AREA_MAX) {
#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN) {
DmaMgr_RequestSync(pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
(uintptr_t)_map_name_staticSegmentRomStart +
(((void)0, gSaveContext.worldMapArea) * MAP_NAME_TEX2_SIZE) +
24 * MAP_NAME_TEX1_SIZE + 22 * LANGUAGE_JPN * MAP_NAME_TEX2_SIZE,
MAP_NAME_TEX2_SIZE);
DMA_REQUEST_SYNC(pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
(uintptr_t)_map_name_staticSegmentRomStart +
(((void)0, gSaveContext.worldMapArea) * MAP_NAME_TEX2_SIZE) +
24 * MAP_NAME_TEX1_SIZE + 22 * LANGUAGE_JPN * MAP_NAME_TEX2_SIZE,
MAP_NAME_TEX2_SIZE, "../z_kaleido_scope_PAL.c", UNK_LINE);
} else {
DmaMgr_RequestSync(pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
(uintptr_t)_map_name_staticSegmentRomStart +
(((void)0, gSaveContext.worldMapArea) * MAP_NAME_TEX2_SIZE) +
24 * MAP_NAME_TEX1_SIZE + 22 * LANGUAGE_ENG * MAP_NAME_TEX2_SIZE,
MAP_NAME_TEX2_SIZE);
DMA_REQUEST_SYNC(pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
(uintptr_t)_map_name_staticSegmentRomStart +
(((void)0, gSaveContext.worldMapArea) * MAP_NAME_TEX2_SIZE) +
24 * MAP_NAME_TEX1_SIZE + 22 * LANGUAGE_ENG * MAP_NAME_TEX2_SIZE,
MAP_NAME_TEX2_SIZE, "../z_kaleido_scope_PAL.c", UNK_LINE);
}
#else
if (gSaveContext.language == LANGUAGE_ENG) {
@ -4295,12 +4295,12 @@ void KaleidoScope_Update(PlayState* play) {
#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN) {
size = (uintptr_t)_icon_item_jpn_staticSegmentRomEnd - (uintptr_t)_icon_item_jpn_staticSegmentRomStart;
DmaMgr_RequestSync(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_jpn_staticSegmentRomStart,
size);
DMA_REQUEST_SYNC(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_jpn_staticSegmentRomStart, size,
"../z_kaleido_scope_PAL.c", UNK_LINE);
} else {
size = (uintptr_t)_icon_item_nes_staticSegmentRomEnd - (uintptr_t)_icon_item_nes_staticSegmentRomStart;
DmaMgr_RequestSync(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_nes_staticSegmentRomStart,
size);
DMA_REQUEST_SYNC(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_nes_staticSegmentRomStart, size,
"../z_kaleido_scope_PAL.c", UNK_LINE);
}
#else
if (gSaveContext.language == LANGUAGE_ENG) {