1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-29 03:34:07 +00:00

Match NTSC z_en_mag.c (#1989)

This commit is contained in:
cadmic 2024-07-17 16:11:24 -07:00 committed by GitHub
parent c83b93aae4
commit aaad2e1caf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}