1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

[ntsc-1.2] Match a bunch of small stuff (#2094)

* Match z_fbdemo_wipe1.c

* Fix gDPSetTileCustom

* Match z_eff_ss_dead.c

* Match src/code/audio_thread_manager.c

* Match z_parameter.c

* Match KaleidoScope_DrawWorldMap

* Format

* 1 -> AUDIOMGR_DEBUG_LEVEL_NO_RSP

* Actually match KaleidoScope_DrawWorldMap

* Add comment on duplicate code

* Revert "Fix gDPSetTileCustom"

This reverts commit de09338d92.
This commit is contained in:
cadmic 2024-08-27 00:33:20 -07:00 committed by GitHub
parent c00991da29
commit d2aca2239f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 79 additions and 21 deletions

View file

@ -497,7 +497,8 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
gDPPipeSync(POLY_OPA_DISP++);
if (!OOT_DEBUG || (HREG(15) == 0)) {
#if OOT_DEBUG
if (HREG(15) == 0) {
gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_POINT);
gDPLoadTLUT_pal256(POLY_OPA_DISP++, gWorldMapImageTLUT);
@ -542,12 +543,44 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
POLY_OPA_DISP = gfx;
}
#if OOT_DEBUG
if (HREG(15) == 2) {
HREG(15) = 1;
HREG(14) = 6100;
HREG(13) = 5300;
}
#else
// Same as `HREG(15) == 0` case above
gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_POINT);
gDPLoadTLUT_pal256(POLY_OPA_DISP++, gWorldMapImageTLUT);
gDPSetTextureLUT(POLY_OPA_DISP++, G_TT_RGBA16);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[188], 32, 0);
for (j = t = i = 0; i < 8; i++, t++, j += 4) {
gDPLoadTextureBlock(POLY_OPA_DISP++, (u8*)gWorldMapImageTex + t * 216 * 9, G_IM_FMT_CI, G_IM_SIZ_8b, 216, 9, 0,
G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);
gSP1Quadrangle(POLY_OPA_DISP++, j, j + 2, j + 3, j + 1, 0);
}
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[220], 28, 0);
for (j = i = 0; i < 6; i++, t++, j += 4) {
gDPLoadTextureBlock(POLY_OPA_DISP++, (u8*)gWorldMapImageTex + t * 216 * 9, G_IM_FMT_CI, G_IM_SIZ_8b, 216, 9, 0,
G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);
gSP1Quadrangle(POLY_OPA_DISP++, j, j + 2, j + 3, j + 1, 0);
}
gDPLoadTextureBlock(POLY_OPA_DISP++, (u8*)gWorldMapImageTex + t * 216 * 9, G_IM_FMT_CI, G_IM_SIZ_8b, 216, 2, 0,
G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);
gSP1Quadrangle(POLY_OPA_DISP++, j, j + 2, j + 3, j + 1, 0);
#endif
if (ZREG(38) == 0) {
@ -660,8 +693,8 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
pointPulseEnvColor[0] = pointEnvColors[pointPulseStage][0];
pointPulseEnvColor[1] = pointEnvColors[pointPulseStage][1];
pointPulseEnvColor[2] = pointEnvColors[pointPulseStage][2];
pointPulseStage ^= 1;
pointPulseTimer = 20;
pointPulseStage ^= 1;
}
Gfx_SetupDL_42Opa(gfxCtx);