From aaad2e1caf0ce184bbba7a9a5c6bb30054bca3cd Mon Sep 17 00:00:00 2001 From: cadmic Date: Wed, 17 Jul 2024 16:11:24 -0700 Subject: [PATCH] Match NTSC z_en_mag.c (#1989) --- src/overlays/actors/ovl_En_Mag/z_en_mag.c | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c index 840b056a8a..83ad84d110 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -508,6 +508,33 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) { #endif } +#if OOT_NTSC + if (gSaveContext.language == LANGUAGE_JPN) { + this->unk_E30C++; + gDPPipeSync(gfx++); + gDPSetCycleType(gfx++, G_CYC_2CYCLE); + if ((s16)this->subAlpha < 100) { + gDPSetRenderMode(gfx++, G_RM_PASS, G_RM_CLD_SURF2); + } else { + gDPSetRenderMode(gfx++, G_RM_PASS, G_RM_XLU_SURF2); + } + gDPSetCombineLERP(gfx++, TEXEL1, PRIMITIVE, PRIM_LOD_FRAC, TEXEL0, 0, 0, 0, TEXEL0, PRIMITIVE, ENVIRONMENT, + COMBINED, ENVIRONMENT, COMBINED, 0, PRIMITIVE, 0); + gDPSetPrimColor(gfx++, 0, 0x80, 255, 255, 170, (s16)this->subAlpha); + gDPSetEnvColor(gfx++, 255, 150, 0, 255); + if ((s16)this->subAlpha != 0) { + gDPLoadTextureBlock(gfx++, gTitleTitleJPNTex, G_IM_FMT_I, G_IM_SIZ_8b, 128, 16, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMASK, G_TX_NOLOD); + gDPLoadMultiBlock(gfx++, gTitleFlameEffectTex, 0x100, 1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, 2, 1); + gDPSetTileSize(gfx++, 1, this->unk_E30C & 0x7F, this->effectScroll & 0x7F, + (this->unk_E30C & 0x7F) + ((32 - 1) << 2), (this->effectScroll & 0x7F) + ((32 - 1) << 2)); + gSPTextureRectangle(gfx++, 424, 576, 424 + 512, 576 + 64, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); + } + } +#endif + Gfx_SetupDL_39Ptr(&gfx); gDPSetAlphaCompare(gfx++, G_AC_NONE); @@ -517,9 +544,21 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) { (s16)this->copyrightAlpha); if ((s16)this->copyrightAlpha != 0) { +#if OOT_NTSC + if (gSaveContext.language == LANGUAGE_JPN) { + gDPLoadTextureBlock(gfx++, gTitleCopyright19982002Tex, G_IM_FMT_IA, G_IM_SIZ_8b, 160, 16, 0, + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, + G_TX_NOLOD, G_TX_NOLOD); + } else { + gDPLoadTextureBlock(gfx++, gTitleCopyright19982003Tex, G_IM_FMT_IA, G_IM_SIZ_8b, 160, 16, 0, + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, + G_TX_NOLOD, G_TX_NOLOD); + } +#else gDPLoadTextureBlock(gfx++, gTitleCopyright19982003Tex, G_IM_FMT_IA, G_IM_SIZ_8b, 160, 16, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); +#endif gSPTextureRectangle(gfx++, 78 << 2, 198 << 2, 238 << 2, 214 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); }