diff options
| author | Random06457 <28494085+Random06457@users.noreply.github.com> | 2023-11-20 23:01:37 +0100 |
|---|---|---|
| committer | Random06457 <28494085+Random06457@users.noreply.github.com> | 2023-11-20 23:13:23 +0100 |
| commit | 3cbd824c85e846a309d970cf672108ff21d4a40b (patch) | |
| tree | 20b377dc3f28cf83e8532294915a94314ccf865f | |
| parent | 1f64d76ed688605b72bb161250d1c2dee2243ad1 (diff) | |
fix D_0E000000 usage
| m--------- | OTRExporter | 0 | ||||
| m--------- | libultraship | 0 | ||||
| -rw-r--r-- | mm/src/code/z_fbdemo_fade.c | 2 | ||||
| -rw-r--r-- | mm/src/code/z_kankyo.c | 8 | ||||
| -rw-r--r-- | mm/src/code/z_play.c | 3 | ||||
| -rw-r--r-- | mm/src/code/z_play_hireso.c | 3 | ||||
| -rw-r--r-- | mm/src/code/z_viscvg.c | 22 | ||||
| -rw-r--r-- | mm/src/code/z_visfbuf.c | 2 | ||||
| -rw-r--r-- | mm/src/code/z_vismono.c | 2 | ||||
| -rw-r--r-- | mm/src/code/z_viszbuf.c | 2 | ||||
| -rw-r--r-- | mm/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c | 2 |
11 files changed, 29 insertions, 17 deletions
diff --git a/OTRExporter b/OTRExporter -Subproject 673880f9ff25c76160c4fd421105402b2e37291 +Subproject 17f396a0a2a264b689f5a5965951eddf14ec1db diff --git a/libultraship b/libultraship -Subproject 413428d2510da7e83390e3c930ea9b07abc3310 +Subproject f9960b7b9744bc58eae2fc5cb3ee3132b553296 diff --git a/mm/src/code/z_fbdemo_fade.c b/mm/src/code/z_fbdemo_fade.c index a9ab37d48..3d4f1933e 100644 --- a/mm/src/code/z_fbdemo_fade.c +++ b/mm/src/code/z_fbdemo_fade.c @@ -116,7 +116,7 @@ void TransitionFade_Draw(void* thisx, Gfx** gfxP) { gfx = *gfxP; gSPDisplayList(gfx++, sTransFadeSetupDL); gDPSetPrimColor(gfx++, 0, 0, color->r, color->g, color->b, color->a); - gSPDisplayList(gfx++, D_0E000000.fillRect); + gSPDisplayList(gfx++, 0x0E000000 + ((uintptr_t)&D_0E000000.fillRect - (uintptr_t)&D_0E000000) + 1); *gfxP = gfx; } } diff --git a/mm/src/code/z_kankyo.c b/mm/src/code/z_kankyo.c index 90aa1bd36..f21865065 100644 --- a/mm/src/code/z_kankyo.c +++ b/mm/src/code/z_kankyo.c @@ -1998,7 +1998,7 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, (u8)(weight * 75.0f) + 180, (u8)(weight * 155.0f) + 100, (u8)envCtx->glareAlpha); - gSPDisplayList(POLY_XLU_DISP++, D_0E000000.clearFillRect); + gSPDisplayList(POLY_XLU_DISP++, 0x0E000000 + ((uintptr_t)&D_0E000000.clearFillRect - (uintptr_t)&D_0E000000) + 1); } else { envCtx->glareAlpha = 0.0f; } @@ -2180,7 +2180,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) { gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, play->lightCtx.fogColor[0] + 16, play->lightCtx.fogColor[1] + 16, play->lightCtx.fogColor[2] + 16, 255.0f * D_801F4E74); } - gSPDisplayList(POLY_OPA_DISP++, D_0E000000.clearFillRect); + gSPDisplayList(POLY_OPA_DISP++, 0x0E000000 + ((uintptr_t)&D_0E000000.clearFillRect - (uintptr_t)&D_0E000000) + 1); CLOSE_DISPS(play->state.gfxCtx); } @@ -2191,7 +2191,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) { Gfx_SetupDL57_Opa(play->state.gfxCtx); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, play->envCtx.skyboxFilterColor[0], play->envCtx.skyboxFilterColor[1], play->envCtx.skyboxFilterColor[2], play->envCtx.skyboxFilterColor[3]); - gSPDisplayList(POLY_OPA_DISP++, D_0E000000.clearFillRect); + gSPDisplayList(POLY_OPA_DISP++, 0x0E000000 + ((uintptr_t)&D_0E000000.clearFillRect - (uintptr_t)&D_0E000000) + 1); CLOSE_DISPS(play->state.gfxCtx); } @@ -2202,7 +2202,7 @@ void Environment_DrawLightningFlash(PlayState* play, u8 red, u8 green, u8 blue, Gfx_SetupDL57_Opa(play->state.gfxCtx); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, red, green, blue, alpha); - gSPDisplayList(POLY_OPA_DISP++, D_0E000000.clearFillRect); + gSPDisplayList(POLY_OPA_DISP++, 0x0E000000 + ((uintptr_t)&D_0E000000.clearFillRect - (uintptr_t)&D_0E000000) + 1); CLOSE_DISPS(play->state.gfxCtx); } diff --git a/mm/src/code/z_play.c b/mm/src/code/z_play.c index 90b151c05..f3ae44aaa 100644 --- a/mm/src/code/z_play.c +++ b/mm/src/code/z_play.c @@ -1267,7 +1267,8 @@ void Play_DrawMain(PlayState* this) { func_80170798(&this->pauseBgPreRender, &sp8C); } - gSPDisplayList(sp8C++, D_0E000000.syncSegments); + __gSPDisplayList(sp8C++, + 0x0E000000 + ((uintptr_t)&D_0E000000.syncSegments - (uintptr_t)&D_0E000000) + 1); POLY_OPA_DISP = sp8C; sp25B = true; goto PostWorldDraw; diff --git a/mm/src/code/z_play_hireso.c b/mm/src/code/z_play_hireso.c index 594ffb068..0e12d621d 100644 --- a/mm/src/code/z_play_hireso.c +++ b/mm/src/code/z_play_hireso.c @@ -1083,7 +1083,8 @@ void BombersNotebook_Draw(BombersNotebook* this, GraphicsContext* gfxCtx) { BombersNotebook_DrawRows(this, &gfx); gDPPipeSync(gfx++); - gSPDisplayList(gfx++, D_0E000000.setScissor); + + __gSPDisplayList(gfx++, 0x0E000000 + ((uintptr_t)&D_0E000000.setScissor - (uintptr_t)&D_0E000000) + 1); BombersNotebook_DrawTimeOfDay(&gfx); diff --git a/mm/src/code/z_viscvg.c b/mm/src/code/z_viscvg.c index 1821805ee..ba62cfc59 100644 --- a/mm/src/code/z_viscvg.c +++ b/mm/src/code/z_viscvg.c @@ -5,7 +5,9 @@ Gfx D_801C5DD0[] = { gsDPSetOtherMode(G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PRIM | G_RM_VISCVG | G_RM_VISCVG2), - gsSPBranchList(D_0E000000.fillRect), + // BENTODO: CRASH + // gsSPBranchList(D_0E000000.fillRect), + gsSPBranchList(0x0E0002E0 | 1), }; Gfx D_801C5DE0[] = { @@ -14,7 +16,9 @@ Gfx D_801C5DE0[] = { G_AC_NONE | G_ZS_PRIM | IM_RD | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_FOG, G_BL_A_FOG, G_BL_CLR_MEM, G_BL_A_MEM) | GBL_c2(G_BL_CLR_FOG, G_BL_A_FOG, G_BL_CLR_MEM, G_BL_A_MEM)), - gsSPBranchList(D_0E000000.fillRect), + // BENTODO: CRASH + //gsSPBranchList(D_0E000000.fillRect), + gsSPBranchList(0x0E0002E0 | 1), }; Gfx D_801C5DF0[] = { @@ -23,7 +27,9 @@ Gfx D_801C5DF0[] = { G_AC_NONE | G_ZS_PRIM | IM_RD | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM) | GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM)), - gsSPBranchList(D_0E000000.fillRect), + // BENTODO: CRASH + //gsSPBranchList(D_0E000000.fillRect), + gsSPBranchList(0x0E0002E0 | 1), }; Gfx D_801C5E00[] = { @@ -31,13 +37,17 @@ Gfx D_801C5E00[] = { gsDPSetOtherMode(G_AD_NOTPATTERN | G_CD_DISABLE | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PRIM | G_RM_CLD_SURF | G_RM_CLD_SURF2), - gsSPDisplayList(D_0E000000.fillRect), + // BENTODO: CRASH + //gsSPDisplayList(D_0E000000.fillRect), + gsSPBranchList(0x0E0002E0 | 1), gsDPSetOtherMode(G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PRIM | IM_RD | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL | GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM) | GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM)), - gsSPBranchList(D_0E000000.fillRect), + // BENTODO: CRASH + //gsSPBranchList(D_0E000000.fillRect), + gsSPBranchList(0x0E0002E0 | 1), }; void VisCvg_Init(VisCvg* this) { @@ -59,7 +69,7 @@ void VisCvg_Draw(VisCvg* this, Gfx** gfxp) { gDPSetPrimDepth(gfx++, -1, -1); if (this->setScissor == true) { - gSPDisplayList(gfx++, D_0E000000.setScissor); + __gSPDisplayList(gfx++, 0x0E000000 + ((uintptr_t)&D_0E000000.setScissor - (uintptr_t)&D_0E000000) + 1); } switch (this->type) { diff --git a/mm/src/code/z_visfbuf.c b/mm/src/code/z_visfbuf.c index 62242bcec..79d403d27 100644 --- a/mm/src/code/z_visfbuf.c +++ b/mm/src/code/z_visfbuf.c @@ -54,7 +54,7 @@ void VisFbuf_DrawBgToColorImage(Gfx** gfxP, uObjBg* bg, void* img, s32 width, s3 gDPPipeSync(gfx++); // Reset the color image and scissor to frame's defaults gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gCfbWidth, D_0F000000); - gSPDisplayList(gfx++, D_0E000000.setScissor); + gSPDisplayList(gfx++, 0x0E000000 + ((uintptr_t)&D_0E000000.setScissor - (uintptr_t)&D_0E000000) + 1); *gfxP = gfx; } diff --git a/mm/src/code/z_vismono.c b/mm/src/code/z_vismono.c index 6d36e5404..94ccd5cf4 100644 --- a/mm/src/code/z_vismono.c +++ b/mm/src/code/z_vismono.c @@ -154,7 +154,7 @@ void VisMono_Draw(VisMono* this, Gfx** gfxp) { gDPPipeSync(gfx++); if (this->setScissor == true) { - gSPDisplayList(gfx++, D_0E000000.setScissor); + __gSPDisplayList(gfx++, 0x0E000000 + ((uintptr_t)&D_0E000000.setScissor - (uintptr_t)&D_0E000000) + 1); } gDPSetColor(gfx++, G_SETPRIMCOLOR, this->primColor.rgba); diff --git a/mm/src/code/z_viszbuf.c b/mm/src/code/z_viszbuf.c index 17c734cb0..2a4856af9 100644 --- a/mm/src/code/z_viszbuf.c +++ b/mm/src/code/z_viszbuf.c @@ -33,7 +33,7 @@ void VisZbuf_Draw(VisZbuf* this, Gfx** gfxP, void* zbuffer) { gDPPipeSync(gfx++); if (this->setScissor == true) { - gSPDisplayList(gfx++, D_0E000000.setScissor); + __gSPDisplayList(gfx++, 0x0E000000 + ((uintptr_t)&D_0E000000.setScissor - (uintptr_t)&D_0E000000) + 1); } gDPSetOtherMode(gfx++, diff --git a/mm/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c b/mm/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c index fa1edaf6b..c76b9c15f 100644 --- a/mm/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c +++ b/mm/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c @@ -2404,7 +2404,7 @@ void FileSelect_Main(GameState* thisx) { gDPPipeSync(POLY_OPA_DISP++); gSPDisplayList(POLY_OPA_DISP++, sScreenFillSetupDL); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, this->screenFillAlpha); - gSPDisplayList(POLY_OPA_DISP++, D_0E000000.fillRect); + gSPDisplayList(POLY_OPA_DISP++, 0x0E000000 + ((uintptr_t)&D_0E000000.fillRect - (uintptr_t)&D_0E000000) + 1); CLOSE_DISPS(this->state.gfxCtx); } |
