mirror of
https://github.com/zeldaret/oot.git
synced 2025-02-13 17:07:44 +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:
parent
c00991da29
commit
d2aca2239f
6 changed files with 79 additions and 21 deletions
|
@ -186,6 +186,16 @@ typedef struct InterfaceContext {
|
||||||
#define C_UP_BUTTON_X 254
|
#define C_UP_BUTTON_X 254
|
||||||
#define C_UP_BUTTON_Y 16
|
#define C_UP_BUTTON_Y 16
|
||||||
|
|
||||||
|
#if PLATFORM_N64
|
||||||
|
#define START_BUTTON_R 200
|
||||||
|
#define START_BUTTON_G 0
|
||||||
|
#define START_BUTTON_B 0
|
||||||
|
#else
|
||||||
|
#define START_BUTTON_R 120
|
||||||
|
#define START_BUTTON_G 120
|
||||||
|
#define START_BUTTON_B 120
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These are the colors for the hearts in the interface. The prim color is the red color of the heart
|
* These are the colors for the hearts in the interface. The prim color is the red color of the heart
|
||||||
* for the base hearts, while the prim color for the double defense hearts is the white outline. The
|
* for the base hearts, while the prim color for the double defense hearts is the white outline. The
|
||||||
|
|
|
@ -153,6 +153,10 @@ void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, Schedule
|
||||||
audioMgr->irqMgr = irqMgr;
|
audioMgr->irqMgr = irqMgr;
|
||||||
audioMgr->rspTask = NULL;
|
audioMgr->rspTask = NULL;
|
||||||
|
|
||||||
|
#if PLATFORM_N64
|
||||||
|
R_AUDIOMGR_DEBUG_LEVEL = AUDIOMGR_DEBUG_LEVEL_NO_RSP;
|
||||||
|
#endif
|
||||||
|
|
||||||
osCreateMesgQueue(&audioMgr->taskDoneQueue, &audioMgr->taskDoneMsg, 1);
|
osCreateMesgQueue(&audioMgr->taskDoneQueue, &audioMgr->taskDoneMsg, 1);
|
||||||
osCreateMesgQueue(&audioMgr->interruptQueue, audioMgr->interruptMsgBuf, ARRAY_COUNT(audioMgr->interruptMsgBuf));
|
osCreateMesgQueue(&audioMgr->interruptQueue, audioMgr->interruptMsgBuf, ARRAY_COUNT(audioMgr->interruptMsgBuf));
|
||||||
osCreateMesgQueue(&audioMgr->initQueue, &audioMgr->initMsg, 1);
|
osCreateMesgQueue(&audioMgr->initQueue, &audioMgr->initMsg, 1);
|
||||||
|
|
|
@ -30,7 +30,12 @@ void func_80026400(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
||||||
Gfx* displayListHead;
|
Gfx* displayListHead;
|
||||||
f32 cos;
|
f32 cos;
|
||||||
|
|
||||||
if (arg3 != 0) {
|
#if PLATFORM_GC
|
||||||
|
if (arg3 == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
OPEN_DISPS(play->state.gfxCtx, "../z_eff_ss_dead.c", 141);
|
OPEN_DISPS(play->state.gfxCtx, "../z_eff_ss_dead.c", 141);
|
||||||
|
|
||||||
cos = Math_CosS((0x4000 / arg3) * arg2);
|
cos = Math_CosS((0x4000 / arg3) * arg2);
|
||||||
|
@ -43,7 +48,6 @@ void func_80026400(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
||||||
POLY_OPA_DISP = displayListHead;
|
POLY_OPA_DISP = displayListHead;
|
||||||
|
|
||||||
CLOSE_DISPS(play->state.gfxCtx, "../z_eff_ss_dead.c", 153);
|
CLOSE_DISPS(play->state.gfxCtx, "../z_eff_ss_dead.c", 153);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80026608(PlayState* play) {
|
void func_80026608(PlayState* play) {
|
||||||
|
|
|
@ -88,7 +88,8 @@ void TransitionWipe_Draw(void* thisx, Gfx** gfxP) {
|
||||||
Gfx* gfx = *gfxP;
|
Gfx* gfx = *gfxP;
|
||||||
Mtx* modelView;
|
Mtx* modelView;
|
||||||
TransitionWipe* this = (TransitionWipe*)thisx;
|
TransitionWipe* this = (TransitionWipe*)thisx;
|
||||||
s32 pad[4];
|
Color_RGBA8_u32* color;
|
||||||
|
s32 pad[3];
|
||||||
Gfx* texScroll;
|
Gfx* texScroll;
|
||||||
|
|
||||||
modelView = this->modelView[this->frame];
|
modelView = this->modelView[this->frame];
|
||||||
|
@ -97,10 +98,15 @@ void TransitionWipe_Draw(void* thisx, Gfx** gfxP) {
|
||||||
guScale(&modelView[0], 0.56f, 0.56f, 1.0f);
|
guScale(&modelView[0], 0.56f, 0.56f, 1.0f);
|
||||||
guRotate(&modelView[1], 0.0f, 0.0f, 0.0f, 1.0f);
|
guRotate(&modelView[1], 0.0f, 0.0f, 0.0f, 1.0f);
|
||||||
guTranslate(&modelView[2], 0.0f, 0.0f, 0.0f);
|
guTranslate(&modelView[2], 0.0f, 0.0f, 0.0f);
|
||||||
|
|
||||||
gDPPipeSync(gfx++);
|
gDPPipeSync(gfx++);
|
||||||
|
|
||||||
texScroll = Gfx_BranchTexScroll(&gfx, this->texX, this->texY, 0, 0);
|
texScroll = Gfx_BranchTexScroll(&gfx, this->texX, this->texY, 0, 0);
|
||||||
gSPSegment(gfx++, 8, texScroll);
|
gSPSegment(gfx++, 8, texScroll);
|
||||||
gDPSetPrimColor(gfx++, 0, 0x80, this->color.r, this->color.g, this->color.b, 255);
|
|
||||||
|
color = &this->color;
|
||||||
|
gDPSetPrimColor(gfx++, 0, 0x80, color->r, color->g, color->b, 255);
|
||||||
|
|
||||||
gSPMatrix(gfx++, &this->projection, G_MTX_LOAD | G_MTX_PROJECTION);
|
gSPMatrix(gfx++, &this->projection, G_MTX_LOAD | G_MTX_PROJECTION);
|
||||||
gSPPerspNormalize(gfx++, this->normal);
|
gSPPerspNormalize(gfx++, this->normal);
|
||||||
gSPMatrix(gfx++, &this->lookAt, G_MTX_MUL | G_MTX_PROJECTION);
|
gSPMatrix(gfx++, &this->lookAt, G_MTX_MUL | G_MTX_PROJECTION);
|
||||||
|
|
|
@ -2813,7 +2813,8 @@ void Interface_DrawItemButtons(PlayState* play) {
|
||||||
if (IS_PAUSED(&play->pauseCtx)) {
|
if (IS_PAUSED(&play->pauseCtx)) {
|
||||||
// Start Button Texture, Color & Label
|
// Start Button Texture, Color & Label
|
||||||
gDPPipeSync(OVERLAY_DISP++);
|
gDPPipeSync(OVERLAY_DISP++);
|
||||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 120, 120, 120, interfaceCtx->startAlpha);
|
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, START_BUTTON_R, START_BUTTON_G, START_BUTTON_B,
|
||||||
|
interfaceCtx->startAlpha);
|
||||||
|
|
||||||
#if OOT_NTSC
|
#if OOT_NTSC
|
||||||
gSPTextureRectangle(OVERLAY_DISP++, 132 << 2, 17 << 2, (132 + 22) << 2, 39 << 2, G_TX_RENDERTILE, 0, 0,
|
gSPTextureRectangle(OVERLAY_DISP++, 132 << 2, 17 << 2, (132 + 22) << 2, 39 << 2, G_TX_RENDERTILE, 0, 0,
|
||||||
|
@ -3258,9 +3259,9 @@ void Interface_Draw(PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
svar2 = rupeeDigitsFirst[CUR_UPG_VALUE(UPG_WALLET)];
|
svar2 = rupeeDigitsFirst[CUR_UPG_VALUE(UPG_WALLET)];
|
||||||
svar5 = rupeeDigitsCount[CUR_UPG_VALUE(UPG_WALLET)];
|
svar4 = rupeeDigitsCount[CUR_UPG_VALUE(UPG_WALLET)];
|
||||||
|
|
||||||
for (svar1 = 0, svar3 = 42; svar1 < svar5; svar1++, svar2++, svar3 += 8) {
|
for (svar1 = 0, svar3 = 42; svar1 < svar4; svar1++, svar2++, svar3 += 8) {
|
||||||
OVERLAY_DISP =
|
OVERLAY_DISP =
|
||||||
Gfx_TextureI8(OVERLAY_DISP, ((u8*)gCounterDigit0Tex + (8 * 16 * interfaceCtx->counterDigits[svar2])), 8,
|
Gfx_TextureI8(OVERLAY_DISP, ((u8*)gCounterDigit0Tex + (8 * 16 * interfaceCtx->counterDigits[svar2])), 8,
|
||||||
16, svar3, 206, 8, 16, 1 << 10, 1 << 10);
|
16, svar3, 206, 8, 16, 1 << 10, 1 << 10);
|
||||||
|
|
|
@ -497,7 +497,8 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
|
|
||||||
gDPPipeSync(POLY_OPA_DISP++);
|
gDPPipeSync(POLY_OPA_DISP++);
|
||||||
|
|
||||||
if (!OOT_DEBUG || (HREG(15) == 0)) {
|
#if OOT_DEBUG
|
||||||
|
if (HREG(15) == 0) {
|
||||||
gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_POINT);
|
gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_POINT);
|
||||||
|
|
||||||
gDPLoadTLUT_pal256(POLY_OPA_DISP++, gWorldMapImageTLUT);
|
gDPLoadTLUT_pal256(POLY_OPA_DISP++, gWorldMapImageTLUT);
|
||||||
|
@ -542,12 +543,44 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
POLY_OPA_DISP = gfx;
|
POLY_OPA_DISP = gfx;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OOT_DEBUG
|
|
||||||
if (HREG(15) == 2) {
|
if (HREG(15) == 2) {
|
||||||
HREG(15) = 1;
|
HREG(15) = 1;
|
||||||
HREG(14) = 6100;
|
HREG(14) = 6100;
|
||||||
HREG(13) = 5300;
|
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
|
#endif
|
||||||
|
|
||||||
if (ZREG(38) == 0) {
|
if (ZREG(38) == 0) {
|
||||||
|
@ -660,8 +693,8 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
pointPulseEnvColor[0] = pointEnvColors[pointPulseStage][0];
|
pointPulseEnvColor[0] = pointEnvColors[pointPulseStage][0];
|
||||||
pointPulseEnvColor[1] = pointEnvColors[pointPulseStage][1];
|
pointPulseEnvColor[1] = pointEnvColors[pointPulseStage][1];
|
||||||
pointPulseEnvColor[2] = pointEnvColors[pointPulseStage][2];
|
pointPulseEnvColor[2] = pointEnvColors[pointPulseStage][2];
|
||||||
pointPulseStage ^= 1;
|
|
||||||
pointPulseTimer = 20;
|
pointPulseTimer = 20;
|
||||||
|
pointPulseStage ^= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Gfx_SetupDL_42Opa(gfxCtx);
|
Gfx_SetupDL_42Opa(gfxCtx);
|
||||||
|
|
Loading…
Add table
Reference in a new issue