diff options
| author | cadmic <cadmic24@gmail.com> | 2024-08-27 00:33:20 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-27 09:33:20 +0200 |
| commit | d2aca2239fb2a814ffe9bfad8f2a100445e11ce8 (patch) | |
| tree | 287c09ccc8e3eb3578233d527fc19013d0279798 /src/code | |
| parent | c00991da29ac2032f7194892538173b093d192ec (diff) | |
[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 de09338d92e50dd3b9cb8ee7214e2e6b3fecf7ff.
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/audio_thread_manager.c | 4 | ||||
| -rw-r--r-- | src/code/z_eff_ss_dead.c | 24 | ||||
| -rw-r--r-- | src/code/z_fbdemo_wipe1.c | 10 | ||||
| -rw-r--r-- | src/code/z_parameter.c | 7 |
4 files changed, 30 insertions, 15 deletions
diff --git a/src/code/audio_thread_manager.c b/src/code/audio_thread_manager.c index a2e03cb72..1dc72642f 100644 --- a/src/code/audio_thread_manager.c +++ b/src/code/audio_thread_manager.c @@ -153,6 +153,10 @@ void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, Schedule audioMgr->irqMgr = irqMgr; audioMgr->rspTask = NULL; +#if PLATFORM_N64 + R_AUDIOMGR_DEBUG_LEVEL = AUDIOMGR_DEBUG_LEVEL_NO_RSP; +#endif + osCreateMesgQueue(&audioMgr->taskDoneQueue, &audioMgr->taskDoneMsg, 1); osCreateMesgQueue(&audioMgr->interruptQueue, audioMgr->interruptMsgBuf, ARRAY_COUNT(audioMgr->interruptMsgBuf)); osCreateMesgQueue(&audioMgr->initQueue, &audioMgr->initMsg, 1); diff --git a/src/code/z_eff_ss_dead.c b/src/code/z_eff_ss_dead.c index c77b7f215..2a64a23f4 100644 --- a/src/code/z_eff_ss_dead.c +++ b/src/code/z_eff_ss_dead.c @@ -30,20 +30,24 @@ void func_80026400(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) { Gfx* displayListHead; f32 cos; - if (arg3 != 0) { - OPEN_DISPS(play->state.gfxCtx, "../z_eff_ss_dead.c", 141); +#if PLATFORM_GC + if (arg3 == 0) { + return; + } +#endif - cos = Math_CosS((0x4000 / arg3) * arg2); - displayListHead = POLY_OPA_DISP; + OPEN_DISPS(play->state.gfxCtx, "../z_eff_ss_dead.c", 141); - gDPPipeSync(displayListHead++); - gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a); - gSPFogPosition(displayListHead++, 0, (s16)(2800.0f * ABS(cos)) + 1700); + cos = Math_CosS((0x4000 / arg3) * arg2); + displayListHead = POLY_OPA_DISP; + + gDPPipeSync(displayListHead++); + gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a); + gSPFogPosition(displayListHead++, 0, (s16)(2800.0f * ABS(cos)) + 1700); - 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) { diff --git a/src/code/z_fbdemo_wipe1.c b/src/code/z_fbdemo_wipe1.c index 4fb3ba38e..ba7635b23 100644 --- a/src/code/z_fbdemo_wipe1.c +++ b/src/code/z_fbdemo_wipe1.c @@ -88,7 +88,8 @@ void TransitionWipe_Draw(void* thisx, Gfx** gfxP) { Gfx* gfx = *gfxP; Mtx* modelView; TransitionWipe* this = (TransitionWipe*)thisx; - s32 pad[4]; + Color_RGBA8_u32* color; + s32 pad[3]; Gfx* texScroll; 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); guRotate(&modelView[1], 0.0f, 0.0f, 0.0f, 1.0f); guTranslate(&modelView[2], 0.0f, 0.0f, 0.0f); + gDPPipeSync(gfx++); + texScroll = Gfx_BranchTexScroll(&gfx, this->texX, this->texY, 0, 0); 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); gSPPerspNormalize(gfx++, this->normal); gSPMatrix(gfx++, &this->lookAt, G_MTX_MUL | G_MTX_PROJECTION); diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 64a0cffaa..d4c9825a7 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -2813,7 +2813,8 @@ void Interface_DrawItemButtons(PlayState* play) { if (IS_PAUSED(&play->pauseCtx)) { // Start Button Texture, Color & Label 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 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)]; - 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 = Gfx_TextureI8(OVERLAY_DISP, ((u8*)gCounterDigit0Tex + (8 * 16 * interfaceCtx->counterDigits[svar2])), 8, 16, svar3, 206, 8, 16, 1 << 10, 1 << 10); |
