From d4d3e8bc0fce5c22ee0c7598af1a56dbd08f010c Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 26 Feb 2026 13:36:55 +0000 Subject: [PATCH] Port Scrolling Texture Interpolation over from 2Ship (#6224) --- soh/include/functions.h | 6 + .../cosmetics/CustomLogoTitle.cpp | 4 +- soh/soh/Enhancements/randomizer/draw.cpp | 54 +-- soh/soh/GbiWrap.cpp | 14 + soh/soh/OTRGlobals.cpp | 13 + soh/soh/OTRGlobals.h | 3 + soh/src/code/z_draw.c | 67 +-- soh/src/code/z_kankyo.c | 4 +- soh/src/code/z_player_lib.c | 4 +- soh/src/code/z_rcp.c | 126 ++++++ soh/src/code/z_scene_table.c | 392 +++++++++--------- .../actors/ovl_Arrow_Fire/z_arrow_fire.c | 6 +- .../actors/ovl_Arrow_Ice/z_arrow_ice.c | 6 +- .../actors/ovl_Arrow_Light/z_arrow_light.c | 6 +- .../actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c | 3 +- .../ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c | 4 +- .../ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c | 7 +- .../actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c | 4 +- .../actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c | 4 +- .../ovl_Bg_Haka_Water/z_bg_haka_water.c | 4 +- .../ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c | 4 +- .../ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c | 4 +- .../ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c | 16 +- .../ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c | 16 +- .../ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c | 16 +- .../ovl_Bg_Mizu_Water/z_bg_mizu_water.c | 4 +- .../ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c | 4 +- .../ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c | 4 +- .../z_bg_spot00_hanebasi.c | 4 +- .../z_bg_spot01_idomizu.c | 4 +- .../z_bg_spot02_objects.c | 4 +- .../ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c | 10 +- .../z_bg_spot06_objects.c | 8 +- .../ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c | 20 +- .../ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c | 4 +- .../z_bg_spot16_doughnut.c | 3 +- .../ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c | 4 +- .../ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c | 10 +- .../actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c | 3 +- .../actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c | 5 +- .../overlays/actors/ovl_Boss_Fd/z_boss_fd.c | 7 +- .../overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c | 8 +- .../actors/ovl_Boss_Ganon/z_boss_ganon.c | 39 +- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 13 +- .../overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 26 +- .../overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 8 +- .../overlays/actors/ovl_Boss_Tw/z_boss_tw.c | 156 +++---- .../overlays/actors/ovl_Boss_Va/z_boss_va.c | 22 +- .../overlays/actors/ovl_Demo_6K/z_demo_6k.c | 12 +- .../actors/ovl_Demo_Effect/z_demo_effect.c | 57 +-- .../overlays/actors/ovl_Demo_Ext/z_demo_ext.c | 6 +- .../overlays/actors/ovl_Demo_Gt/z_demo_gt.c | 21 +- .../actors/ovl_Demo_Kankyo/z_demo_kankyo.c | 3 +- .../actors/ovl_Demo_Kekkai/z_demo_kekkai.c | 17 +- .../overlays/actors/ovl_Demo_Shd/z_demo_shd.c | 10 +- .../actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c | 4 +- .../actors/ovl_Door_Warp1/z_door_warp1.c | 10 +- .../actors/ovl_Efc_Erupc/z_efc_erupc.c | 16 +- soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c | 12 +- soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c | 10 +- .../actors/ovl_En_Blkobj/z_en_blkobj.c | 5 +- soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c | 9 +- soh/src/overlays/actors/ovl_En_Bx/z_en_bx.c | 3 +- .../actors/ovl_En_Clear_Tag/z_en_clear_tag.c | 9 +- soh/src/overlays/actors/ovl_En_Dh/z_en_dh.c | 5 +- .../actors/ovl_En_Dy_Extra/z_en_dy_extra.c | 4 +- soh/src/overlays/actors/ovl_En_Fd/z_en_fd.c | 3 +- .../actors/ovl_En_Fd_Fire/z_en_fd_fire.c | 6 +- .../actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c | 10 +- soh/src/overlays/actors/ovl_En_Fz/z_en_fz.c | 8 +- soh/src/overlays/actors/ovl_En_Gb/z_en_gb.c | 5 +- soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c | 3 +- .../actors/ovl_En_Honotrap/z_en_honotrap.c | 5 +- .../actors/ovl_En_Ice_Hono/z_en_ice_hono.c | 3 +- .../overlays/actors/ovl_En_Light/z_en_light.c | 7 +- .../actors/ovl_En_M_Thunder/z_en_m_thunder.c | 10 +- .../actors/ovl_En_Nutsball/z_en_nutsball.c | 5 +- .../overlays/actors/ovl_En_Okuta/z_en_okuta.c | 6 +- .../actors/ovl_En_Po_Field/z_en_po_field.c | 10 +- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 4 +- soh/src/overlays/actors/ovl_En_Poh/z_en_poh.c | 5 +- soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c | 5 +- .../actors/ovl_En_Siofuki/z_en_siofuki.c | 3 +- .../actors/ovl_En_Stream/z_en_stream.c | 4 +- .../overlays/actors/ovl_En_Vali/z_en_vali.c | 2 +- .../actors/ovl_En_Viewer/z_en_viewer.c | 4 +- .../overlays/actors/ovl_Fishing/z_fishing.c | 8 +- .../actors/ovl_Magic_Dark/z_magic_dark.c | 5 +- .../actors/ovl_Magic_Fire/z_magic_fire.c | 6 +- .../actors/ovl_Magic_Wind/z_magic_wind.c | 16 +- .../actors/ovl_Obj_Dekujr/z_obj_dekujr.c | 3 +- .../actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c | 4 +- .../actors/ovl_Obj_Switch/z_obj_switch.c | 4 +- .../actors/ovl_Obj_Syokudai/z_obj_syokudai.c | 4 +- .../ovl_Object_Kankyo/z_object_kankyo.c | 5 +- .../actors/ovl_Oceff_Spot/z_oceff_spot.c | 4 +- .../actors/ovl_Oceff_Storm/z_oceff_storm.c | 8 +- .../actors/ovl_Oceff_Wipe/z_oceff_wipe.c | 4 +- .../actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c | 4 +- .../actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c | 4 +- .../actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c | 4 +- .../actors/ovl_player_actor/z_player.c | 8 +- .../ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c | 6 +- .../ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c | 4 +- .../ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c | 4 +- .../z_eff_ss_fire_tail.c | 6 +- .../z_eff_ss_ice_piece.c | 4 +- .../z_eff_ss_ice_smoke.c | 3 +- .../ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c | 4 +- 109 files changed, 925 insertions(+), 675 deletions(-) diff --git a/soh/include/functions.h b/soh/include/functions.h index 31f2d4932..5b9e0dc79 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -22,6 +22,7 @@ extern "C" void gSPSegment(void* value, int segNum, uintptr_t target); void gSPSegmentLoadRes(void* value, int segNum, uintptr_t target); void gSPDisplayList(Gfx* pkt, Gfx* dl); +void gDPSetTileSizeInterp(Gfx* pkt, int t, float uls, float ult, float lrs, float lrt); void gSPDisplayListOffset(Gfx* pkt, Gfx* dl, int offset); void gSPVertex(Gfx* pkt, uintptr_t v, int n, int v0); void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr); @@ -1220,10 +1221,15 @@ void Gfx_SetupDL_56Ptr(Gfx** gfxp); Gfx* Gfx_BranchTexScroll(Gfx** gfxp, u32 x, u32 y, s32 width, s32 height); Gfx* func_80094E78(GraphicsContext* gfxCtx, u32 x, u32 y); Gfx* Gfx_TexScroll(GraphicsContext* gfxCtx, u32 x, u32 y, s32 width, s32 height); +Gfx* Gfx_TexScrollEx(GraphicsContext* gfxCtx, u32 x, u32 y, s32 width, s32 height, s32 xStep, s32 yStep); Gfx* Gfx_TwoTexScroll(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, u32 x2, u32 y2, s32 width2, s32 height2); +Gfx* Gfx_TwoTexScrollEx(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, u32 x2, + u32 y2, s32 width2, s32 height2, s32 xStep1, s32 yStep1, s32 xStep2, s32 yStep2); Gfx* Gfx_TwoTexScrollEnvColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, u32 x2, u32 y2, s32 width2, s32 height2, s32 r, s32 g, s32 b, s32 a); +Gfx* Gfx_TwoTexScrollEnvColorEx(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, + u32 x2, u32 y2, s32 width2, s32 height2, s32 r, s32 g, s32 b, s32 a, s32 xStep1, s32 yStep1, s32 xStep2, s32 yStep2); Gfx* Gfx_EnvColor(GraphicsContext* gfxCtx, s32 r, s32 g, s32 b, s32 a); void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b); void func_80095974(GraphicsContext* gfxCtx); diff --git a/soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp b/soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp index 3ec872368..85549bf78 100644 --- a/soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp +++ b/soh/soh/Enhancements/cosmetics/CustomLogoTitle.cpp @@ -100,8 +100,8 @@ extern "C" void CustomLogoTitle_Draw(TitleContext* titleContext, uint8_t logoToD f32 scale = 0.4f; gSPSegment(POLY_OPA_DISP++, 0x08, - (uintptr_t)Gfx_TwoTexScroll(titleContext->state.gfxCtx, 0, 0, (0 - 1) % 128, 32, 32, 1, 0, - (1 * -2) % 128, 32, 32)); + (uintptr_t)Gfx_TwoTexScrollEx(titleContext->state.gfxCtx, 0, 0, (0 - 1) % 128, 32, 32, 1, 0, + (1 * -2) % 128, 32, 32, 0, 0, 0, 0)); Matrix_Translate(0.0f, -10.0f, 0.0f, MTXMODE_APPLY); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); diff --git a/soh/soh/Enhancements/randomizer/draw.cpp b/soh/soh/Enhancements/randomizer/draw.cpp index 32cfe801c..374b026b2 100644 --- a/soh/soh/Enhancements/randomizer/draw.cpp +++ b/soh/soh/Enhancements/randomizer/draw.cpp @@ -373,9 +373,9 @@ extern "C" void Randomizer_DrawMasterSword(PlayState* play, GetItemEntry* getIte Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, - (uintptr_t)Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 1), - 0 * (play->state.frames * 1), 32, 32, 1, 0 * (play->state.frames * 1), - 0 * (play->state.frames * 1), 32, 32)); + (uintptr_t)Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 1 * (play->state.frames * 1), + 0 * (play->state.frames * 1), 32, 32, 1, 0 * (play->state.frames * 1), + 0 * (play->state.frames * 1), 32, 32, 1, 0, 0, 0)); Matrix_Scale(0.05f, 0.05f, 0.05f, MTXMODE_APPLY); Matrix_RotateZ(2.1f, MTXMODE_APPLY); @@ -611,8 +611,8 @@ extern "C" s32 OverrideLimbDrawBarinade(PlayState* play, s32 limbIndex, Gfx** dL if (limbIndex == 20) { gDPPipeSync(POLY_OPA_DISP++); gSPSegment(POLY_OPA_DISP++, 0x08, - (uintptr_t)Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 8, 16, 1, 0, - (play->gameplayFrames * -2) % 64, 16, 16)); + (uintptr_t)Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 8, 16, 1, 0, + (play->gameplayFrames * -2) % 64, 16, 16, 0, 0, 0, -2)); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 200); Matrix_RotateX(-M_PIf / 2.0f, MTXMODE_APPLY); } else if ((limbIndex >= 10) && (limbIndex < 20)) { @@ -637,8 +637,8 @@ extern "C" void PostLimbDrawBarinade(PlayState* play, s32 limbIndex, Gfx** dList if (limbIndex == 25) { gSPSegment(POLY_XLU_DISP++, 0x09, - (uintptr_t)Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (play->gameplayFrames * 10) % 128, 16, 32, 1, - 0, (play->gameplayFrames * 5) % 128, 16, 32)); + (uintptr_t)Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (play->gameplayFrames * 10) % 128, 16, 32, 1, + 0, (play->gameplayFrames * 5) % 128, 16, 32, 0, 10, 0, 5)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, (Gfx*)gBarinadeDL_008D70); @@ -693,11 +693,11 @@ extern "C" void DrawBarinade(PlayState* play) { Matrix_Scale(0.03f, 0.03f, 0.03f, MTXMODE_APPLY); gSPSegment(POLY_OPA_DISP++, 0x08, - (uintptr_t)Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 8, 16, 1, 0, (play->gameplayFrames * -10) % 16, - 16, 16)); + (uintptr_t)Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 8, 16, 1, 0, + (play->gameplayFrames * -10) % 16, 16, 16, 0, 0, 0, -10)); gSPSegment(POLY_OPA_DISP++, 0x09, - (uintptr_t)Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (play->gameplayFrames * -10) % 32, 16, 0x20, 1, 0, - (play->gameplayFrames * -5) % 32, 16, 32)); + (uintptr_t)Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (play->gameplayFrames * -10) % 32, 16, 0x20, 1, + 0, (play->gameplayFrames * -5) % 32, 16, 32, 0, -10, 0, -5)); SkelAnime_DrawSkeletonOpa(play, &skelAnime, OverrideLimbDrawBarinade, PostLimbDrawBarinade, NULL); @@ -763,8 +763,8 @@ extern "C" void DrawVolvagia(PlayState* play) { gSPSegment(POLY_OPA_DISP++, 0x09, (uintptr_t)gVolvagiaEyeOpenTex); gSPSegment(POLY_OPA_DISP++, 0x08, - (uintptr_t)Gfx_TwoTexScroll(play->state.gfxCtx, 0, play->state.frames * 4, 120, 0x20, 0x20, 1, - play->state.frames * 3, play->state.frames * -2, 0x20, 0x20)); + (uintptr_t)Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, play->state.frames * 4, 120, 0x20, 0x20, 1, + play->state.frames * 3, play->state.frames * -2, 0x20, 0x20, 4, 0, 3, -2)); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 255); @@ -782,12 +782,13 @@ extern "C" void DrawMorpha(PlayState* play) { Matrix_Scale(0.015f, 0.015f, 0.015f, MTXMODE_APPLY); gSPSegment(POLY_XLU_DISP++, 0x08, - (uintptr_t)Gfx_TwoTexScroll(play->state.gfxCtx, 0, play->state.frames * 3, play->state.frames * 3, 32, - 32, 1, play->state.frames * -3, play->state.frames * -3, 32, 32)); + (uintptr_t)Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, play->state.frames * 3, play->state.frames * 3, 32, + 32, 1, play->state.frames * -3, play->state.frames * -3, 32, 32, 3, 3, -3, + -3)); gSPSegment(POLY_XLU_DISP++, 0x09, - (uintptr_t)Gfx_TwoTexScroll(play->state.gfxCtx, 0, play->state.frames * 3, 0, 32, 32, 1, 0, - play->state.frames * -5, 32, 32)); + (uintptr_t)Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, play->state.frames * 3, 0, 32, 32, 1, 0, + play->state.frames * -5, 32, 32, 3, 0, 0, -5)); Matrix_RotateX(play->state.frames * 0.1f, MTXMODE_APPLY); Matrix_RotateZ(play->state.frames * 0.16f, MTXMODE_APPLY); @@ -892,11 +893,12 @@ extern "C" void DrawKotake(PlayState* play) { gSPSegment(POLY_OPA_DISP++, 10, (uintptr_t)gTwinrovaKotakeKoumeEyeOpenTex); gSPSegment(POLY_XLU_DISP++, 10, (uintptr_t)gTwinrovaKotakeKoumeEyeOpenTex); gSPSegment(POLY_XLU_DISP++, 8, - (uintptr_t)Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 & 0x7F, 0 & 0x7F, 0x20, 0x20, 1, - play->state.frames & 0x7F, (play->state.frames * -7) & 0xFF, 0x20, 0x40)); + (uintptr_t)Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0 & 0x7F, 0 & 0x7F, 0x20, 0x20, 1, + play->state.frames & 0x7F, (play->state.frames * -7) & 0xFF, 0x20, 0x40, 0, + 0, 1, -7)); gSPSegment(POLY_XLU_DISP++, 9, - (uintptr_t)Gfx_TexScroll(play->state.gfxCtx, 0 & 0x7F, play->state.frames & 0xFF, 0x20, 0x40)); + (uintptr_t)Gfx_TexScrollEx(play->state.gfxCtx, 0 & 0x7F, play->state.frames & 0xFF, 0x20, 0x40, 0, 1)); SkelAnime_DrawSkeletonOpa(play, &skelAnime, OverrideLimbDrawKotake, PostLimbDrawKotake, NULL); @@ -982,9 +984,9 @@ extern "C" void Randomizer_DrawBossSoul(PlayState* play, GetItemEntry* getItemEn OPEN_DISPS(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 8, - (uintptr_t)Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), - 0 * (play->state.frames * 0), 16, 32, 1, 1 * (play->state.frames * 1), - -1 * (play->state.frames * 8), 16, 32)); + (uintptr_t)Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), + 0 * (play->state.frames * 0), 16, 32, 1, 1 * (play->state.frames * 1), + -1 * (play->state.frames * 8), 16, 32, 0, 0, 1, -8)); Matrix_Push(); Matrix_Translate(0.0f, -70.0f, 0.0f, MTXMODE_APPLY); Matrix_Scale(5.0f, 5.0f, 5.0f, MTXMODE_APPLY); @@ -1123,9 +1125,9 @@ extern "C" void Randomizer_DrawBronzeScale(PlayState* play, GetItemEntry* getIte Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - (uintptr_t)Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), - -1 * (play->state.frames * 2), 64, 64, 1, 1 * (play->state.frames * 4), - -1 * (play->state.frames * 4), 32, 32)); + (uintptr_t)Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), + -1 * (play->state.frames * 2), 64, 64, 1, 1 * (play->state.frames * 4), + -1 * (play->state.frames * 4), 32, 32, 2, -2, 4, -4)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD); diff --git a/soh/soh/GbiWrap.cpp b/soh/soh/GbiWrap.cpp index e210a292f..c16d46689 100644 --- a/soh/soh/GbiWrap.cpp +++ b/soh/soh/GbiWrap.cpp @@ -77,6 +77,20 @@ extern "C" void gSPDisplayList(Gfx* pkt, Gfx* dl) { __gSPDisplayList(pkt, dl); } +extern "C" void gDPSetTileSizeInterp(Gfx* pkt, int t, float uls, float ult, float lrs, float lrt) { + __gDPSetTileSizeInterp(pkt, t, 0, 0, 0, 0); + pkt->words.w0 = _SHIFTL(G_SETTILESIZE_INTERP, 24, 8); + pkt++; + + pkt->words.w0 = *(u32*)&uls; + pkt->words.w1 = *(u32*)&ult; + pkt++; + + pkt->words.w0 = *(u32*)&lrs; + pkt->words.w1 = *(u32*)&lrt; + pkt++; +} + extern "C" void gSPDisplayListOffset(Gfx* pkt, Gfx* dl, int offset) { char* imgData = (char*)dl; diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index ac3182eab..20af7b386 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1713,11 +1713,15 @@ void RunCommands(Gfx* Commands, const std::vector // Process window events for resize, mouse, keyboard events wnd->HandleEvents(); + auto intp = wnd->GetInterpreterWeak().lock().get(); + intp->mInterpolationIndex = 0; + UIWidgets::Colors themeColor = static_cast(CVarGetInteger(CVAR_SETTING("Menu.Theme"), UIWidgets::Colors::LightBlue)); ImGui::PushStyleColor(ImGuiCol_TitleBgActive, UIWidgets::ColorValues.at(themeColor)); for (const auto& m : mtx_replacements) { wnd->DrawAndRunGraphicsCommands(Commands, m); + intp->mInterpolationIndex++; } ImGui::PopStyleColor(); } @@ -2557,3 +2561,12 @@ bool SoH_HandleConfigDrop(char* filePath) { extern "C" void CheckTracker_RecalculateAvailableChecks() { CheckTracker::RecalculateAvailableChecks(); } + +extern "C" uint32_t Ship_GetInterpolationFPS() { + return OTRGlobals::Instance->GetInterpolationFPS(); +} + +// Number of interpolated frames +extern "C" uint32_t Ship_GetInterpolationFrameCount() { + return ceil((float)Ship_GetInterpolationFPS() / 20.0f); +} diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index 5e1a85d20..424105f8c 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -164,6 +164,9 @@ void CheckTracker_RecalculateAvailableChecks(); GetItemID RetrieveGetItemIDFromItemID(ItemID itemID); RandomizerGet RetrieveRandomizerGetFromItemID(ItemID itemID); void Messagebox_ShowErrorBox(char* title, char* body); + +uint32_t Ship_GetInterpolationFPS(); +uint32_t Ship_GetInterpolationFrameCount(); #endif #ifdef __cplusplus diff --git a/soh/src/code/z_draw.c b/soh/src/code/z_draw.c index b1b4c1cc5..98695c992 100644 --- a/soh/src/code/z_draw.c +++ b/soh/src/code/z_draw.c @@ -476,10 +476,10 @@ void GetItem_DrawJewel(PlayState* play, s16 drawId) { OPEN_DISPS(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 % 256, (256 - (0 % 256)) - 1, 64, 64, 1, 0 % 256, - (256 - (0 % 256)) - 1, 16, 16)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0 % 256, (256 - (0 % 256)) - 1, 64, 64, 1, 0 % 256, + (256 - (0 % 256)) - 1, 16, 16, 0, 0, 0, 0)); - gSPSegment(POLY_OPA_DISP++, 8, Gfx_TexScroll(play->state.gfxCtx, (u8)0, (u8)0, 16, 16)); + gSPSegment(POLY_OPA_DISP++, 8, Gfx_TexScrollEx(play->state.gfxCtx, (u8)0, (u8)0, 16, 16, 0, 0)); Matrix_Push(); Matrix_RotateZYX(0, -0x4000, 0x4000, MTXMODE_APPLY); @@ -541,8 +541,9 @@ void GetItem_DrawBlueFire(PlayState* play, s16 drawId) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 16, - 32, 1, 1 * (play->state.frames * 1), 1 * -(play->state.frames * 8), 16, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 16, + 32, 1, 1 * (play->state.frames * 1), 1 * -(play->state.frames * 8), 16, 32, 0, 0, 1, + -8)); Matrix_Push(); Matrix_Translate(-8.0f, -2.0f, 0.0f, MTXMODE_APPLY); Matrix_ReplaceRotation(&play->billboardMtxF); @@ -566,8 +567,9 @@ void GetItem_DrawPoes(PlayState* play, s16 drawId) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 16, - 32, 1, 1 * (play->state.frames * 1), 1 * -(play->state.frames * 6), 16, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 16, + 32, 1, 1 * (play->state.frames * 1), 1 * -(play->state.frames * 6), 16, 32, 0, 0, 1, + -6)); Matrix_Push(); Matrix_ReplaceRotation(&play->billboardMtxF); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); @@ -591,8 +593,9 @@ void GetItem_DrawFairy(PlayState* play, s16 drawId) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 32, - 32, 1, 1 * (play->state.frames * 1), 1 * -(play->state.frames * 6), 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 32, + 32, 1, 1 * (play->state.frames * 1), 1 * -(play->state.frames * 6), 32, 32, 0, 0, 1, + -6)); Matrix_Push(); Matrix_ReplaceRotation(&play->billboardMtxF); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); @@ -609,9 +612,9 @@ void GetItem_DrawMirrorShield(PlayState* play, s16 drawId) { Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0) % 256, - 1 * (play->state.frames * 2) % 256, 64, 64, 1, 0 * (play->state.frames * 0) % 128, - 1 * (play->state.frames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0 * (play->state.frames * 0) % 256, + 1 * (play->state.frames * 2) % 256, 64, 64, 1, 0 * (play->state.frames * 0) % 128, + 1 * (play->state.frames * 1) % 128, 32, 32, 0, 2, 0, 1)); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -633,8 +636,9 @@ void GetItem_DrawSkullToken(PlayState* play, s16 drawId) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 1 * -(play->state.frames * 5), 32, - 32, 1, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 32, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 1 * -(play->state.frames * 5), + 32, 32, 1, 0 * (play->state.frames * 0), 0 * (play->state.frames * 0), 32, 64, 0, -5, + 0, 0)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); @@ -677,8 +681,9 @@ void GetItem_DrawPotion(PlayState* play, s16 drawId) { Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, -1 * (play->state.frames * 1), 1 * (play->state.frames * 1), 32, - 32, 1, -1 * (play->state.frames * 1), 1 * (play->state.frames * 1), 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, -1 * (play->state.frames * 1), 1 * (play->state.frames * 1), + 32, 32, 1, -1 * (play->state.frames * 1), 1 * (play->state.frames * 1), 32, 32, -1, 1, + -1, 1)); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -700,8 +705,9 @@ void GetItem_DrawGoronSword(PlayState* play, s16 drawId) { Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 1), 0 * (play->state.frames * 1), 32, - 32, 1, 0 * (play->state.frames * 1), 0 * (play->state.frames * 1), 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 1 * (play->state.frames * 1), 0 * (play->state.frames * 1), 32, + 32, 1, 0 * (play->state.frames * 1), 0 * (play->state.frames * 1), 32, 32, 1, 0, 0, + 0)); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -715,8 +721,9 @@ void GetItem_DrawDekuNuts(PlayState* play, s16 drawId) { Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), 32, - 32, 1, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), 32, + 32, 1, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), 32, 32, 6, 6, 6, + 6)); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -730,8 +737,9 @@ void GetItem_DrawRecoveryHeart(PlayState* play, s16 drawId) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 1), 1 * -(play->state.frames * 3), 32, - 32, 1, 0 * (play->state.frames * 1), 1 * -(play->state.frames * 2), 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0 * (play->state.frames * 1), 1 * -(play->state.frames * 3), + 32, 32, 1, 0 * (play->state.frames * 1), 1 * -(play->state.frames * 2), 32, 32, 0, -3, + 0, -2)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); if (CVarGetInteger(CVAR_COSMETIC("Consumable.Hearts.Changed"), 0)) { Color_RGB8 color = CVarGetColor24(CVAR_COSMETIC("Consumable.Hearts.Value"), (Color_RGB8){ 255, 70, 50 }); @@ -752,8 +760,9 @@ void GetItem_DrawFish(PlayState* play, s16 drawId) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 1 * (play->state.frames * 1), 32, - 32, 1, 0 * (play->state.frames * 0), 1 * (play->state.frames * 1), 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), 1 * (play->state.frames * 1), 32, + 32, 1, 0 * (play->state.frames * 0), 1 * (play->state.frames * 1), 32, 32, 0, 1, 0, + 1)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -867,8 +876,9 @@ void GetItem_DrawMagicSpell(PlayState* play, s16 drawId) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), 1 * -(play->state.frames * 6), 32, - 32, 1, 1 * (play->state.frames * 1), -1 * (play->state.frames * 2), 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), 1 * -(play->state.frames * 6), + 32, 32, 1, 1 * (play->state.frames * 1), -1 * (play->state.frames * 2), 32, 32, 2, -6, + 1, -2)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); @@ -937,8 +947,9 @@ void GetItem_DrawScale(PlayState* play, s16 drawId) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), -1 * (play->state.frames * 2), 64, - 64, 1, 1 * (play->state.frames * 4), 1 * -(play->state.frames * 4), 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), -1 * (play->state.frames * 2), + 64, 64, 1, 1 * (play->state.frames * 4), 1 * -(play->state.frames * 4), 32, 32, 2, -2, + 4, -4)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]); diff --git a/soh/src/code/z_kankyo.c b/soh/src/code/z_kankyo.c index d78a93c6c..91aac9623 100644 --- a/soh/src/code/z_kankyo.c +++ b/soh/src/code/z_kankyo.c @@ -2427,8 +2427,8 @@ void Environment_DrawSandstorm(PlayState* play, u8 sandstormState) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, primColor.r, primColor.g, primColor.b, play->envCtx.sandstormPrimA); gDPSetEnvColor(POLY_XLU_DISP++, envColor.r, envColor.g, envColor.b, play->envCtx.sandstormEnvA); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (u32)sp96 % 0x1000, 0, 0x200, 0x20, 1, (u32)sp94 % 0x1000, - 0xFFF - ((u32)sp92 % 0x1000), 0x100, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (u32)sp96 % 0x1000, 0, 0x200, 0x20, 1, (u32)sp94 % 0x1000, + 0xFFF - ((u32)sp92 % 0x1000), 0x100, 0x40, sp98, 0, sp98 * 1.5f, -sp98)); gDPSetTextureLUT(POLY_XLU_DISP++, G_TT_NONE); gSPDisplayList(POLY_XLU_DISP++, gFieldSandstormDL); diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 6e2292ce1..54000a74d 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -1593,8 +1593,8 @@ void Player_DrawGetItemIceTrap(PlayState* play, Player* this, Vec3f* refPos, s32 iceTrapScale += 0.2f; } gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (0 - play->gameplayFrames) % 128, 32, 32, 1, 0, - (play->gameplayFrames * -2) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (0 - play->gameplayFrames) % 128, 32, 32, 1, 0, + (play->gameplayFrames * -2) % 128, 32, 32, 0, -1, 0, -2)); Matrix_Translate(0.0f, -40.0f, 0.0f, MTXMODE_APPLY); Matrix_Scale(iceTrapScale, iceTrapScale, iceTrapScale, MTXMODE_APPLY); diff --git a/soh/src/code/z_rcp.c b/soh/src/code/z_rcp.c index 8ccd74f82..d358d4f44 100644 --- a/soh/src/code/z_rcp.c +++ b/soh/src/code/z_rcp.c @@ -1394,6 +1394,38 @@ Gfx* Gfx_TexScroll(GraphicsContext* gfxCtx, u32 x, u32 y, s32 width, s32 height) return displayList; } +Gfx* Gfx_TexScrollEx(GraphicsContext* gfxCtx, u32 x, u32 y, s32 width, s32 height, s32 xStep, s32 yStep) { + int interpFrames = Ship_GetInterpolationFrameCount(); + + Gfx* gfx = Graph_Alloc(gfxCtx, (2 + (interpFrames * 4)) * sizeof(Gfx)); + + x %= 2048; + y %= 2048; + + float xFlt = (float)x; + float yFlt = (float)y; + + float xInc = (float)xStep / (float)interpFrames; + float yInc = (float)yStep / (float)interpFrames; + + int idx = 0; + + gDPTileSync(&gfx[idx++]); + + for (int i = 0; i < interpFrames; i++) { + gDPSetInterpolation(&gfx[idx++], i); + gDPSetTileSizeInterp(&gfx[idx], 0, xFlt, yFlt, (xFlt + ((width - 1) << 2)), (yFlt + ((height - 1) << 2))); + idx += 3; + + xFlt += xInc; + yFlt += yInc; + } + + gSPEndDisplayList(&gfx[idx++]); + + return gfx; +} + Gfx* Gfx_TwoTexScroll(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, u32 x2, u32 y2, s32 width2, s32 height2) { Gfx* displayList = Graph_Alloc(gfxCtx, 5 * sizeof(Gfx)); @@ -1412,6 +1444,52 @@ Gfx* Gfx_TwoTexScroll(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 wi return displayList; } +Gfx* Gfx_TwoTexScrollEx(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, u32 x2, + u32 y2, s32 width2, s32 height2, s32 xStep1, s32 yStep1, s32 xStep2, s32 yStep2) { + int interpFrames = Ship_GetInterpolationFrameCount(); + + Gfx* gfx = Graph_Alloc(gfxCtx, (5 + (interpFrames * 7)) * sizeof(Gfx)); + + x1 %= 2048; + y1 %= 2048; + x2 %= 2048; + y2 %= 2048; + + float x1Flt = (float)x1; + float y1Flt = (float)y1; + float x2Flt = (float)x2; + float y2Flt = (float)y2; + + int index = 0; + + gDPTileSync(&gfx[index++]); + + float xInc1 = (float)xStep1 / (float)interpFrames; + float yInc1 = (float)yStep1 / (float)interpFrames; + + float xInc2 = (float)xStep2 / (float)interpFrames; + float yInc2 = (float)yStep2 / (float)interpFrames; + + for (int i = 0; i < interpFrames; i++) { + gDPSetInterpolation(&gfx[index++], i); + + gDPSetTileSizeInterp(&gfx[index], tile1, x1Flt, y1Flt, (x1Flt + ((width1 - 1) << 2)), + (y1Flt + ((height1 - 1) << 2))); + index += 3; + gDPSetTileSizeInterp(&gfx[index], tile2, x2Flt, y2Flt, (x2Flt + ((width2 - 1) << 2)), + (y2Flt + ((height2 - 1) << 2))); + index += 3; + + x1Flt += xInc1; + x2Flt += xInc2; + y1Flt += yInc1; + y2Flt += yInc2; + } + gSPEndDisplayList(&gfx[index]); + + return gfx; +} + Gfx* Gfx_TwoTexScrollEnvColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, u32 x2, u32 y2, s32 width2, s32 height2, s32 r, s32 g, s32 b, s32 a) { Gfx* displayList = Graph_Alloc(gfxCtx, 6 * sizeof(Gfx)); @@ -1431,6 +1509,54 @@ Gfx* Gfx_TwoTexScrollEnvColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1 return displayList; } +Gfx* Gfx_TwoTexScrollEnvColorEx(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, + u32 x2, u32 y2, s32 width2, s32 height2, s32 r, s32 g, s32 b, s32 a, s32 xStep1, + s32 yStep1, s32 xStep2, s32 yStep2) { + int interpFrames = Ship_GetInterpolationFrameCount(); + + Gfx* gfx = Graph_Alloc(gfxCtx, (6 + (interpFrames * 7)) * sizeof(Gfx)); + + x1 %= 2048; + y1 %= 2048; + x2 %= 2048; + y2 %= 2048; + + float x1Flt = (float)x1; + float y1Flt = (float)y1; + float x2Flt = (float)x2; + float y2Flt = (float)y2; + + int index = 0; + + gDPTileSync(&gfx[index++]); + + float xInc1 = (float)xStep1 / (float)interpFrames; + float yInc1 = (float)yStep1 / (float)interpFrames; + + float xInc2 = (float)xStep2 / (float)interpFrames; + float yInc2 = (float)yStep2 / (float)interpFrames; + + for (int i = 0; i < interpFrames; i++) { + gDPSetInterpolation(&gfx[index++], i); + + gDPSetTileSizeInterp(&gfx[index], tile1, x1Flt, y1Flt, (x1Flt + ((width1 - 1) << 2)), + (y1Flt + ((height1 - 1) << 2))); + index += 3; + gDPSetTileSizeInterp(&gfx[index], tile2, x2Flt, y2Flt, (x2Flt + ((width2 - 1) << 2)), + (y2Flt + ((height2 - 1) << 2))); + index += 3; + + x1Flt += xInc1; + x2Flt += xInc2; + y1Flt += yInc1; + y2Flt += yInc2; + } + gDPSetEnvColor(&gfx[index++], r, g, b, a); + gSPEndDisplayList(&gfx[index]); + + return gfx; +} + Gfx* Gfx_EnvColor(GraphicsContext* gfxCtx, s32 r, s32 g, s32 b, s32 a) { Gfx* displayList = Graph_Alloc(gfxCtx, 2 * sizeof(Gfx)); diff --git a/soh/src/code/z_scene_table.c b/soh/src/code/z_scene_table.c index 7c28253fd..aad6a1b69 100644 --- a/soh/src/code/z_scene_table.c +++ b/soh/src/code/z_scene_table.c @@ -128,8 +128,8 @@ void func_800995DC(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128, 32, + 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); @@ -153,8 +153,8 @@ void func_80099760(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (gameplayFrames * 2) % 256, 0, 64, 32, 1, 0, - (gameplayFrames * 2) % 128, 64, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 2) % 256, 0, 64, 32, 1, 0, + (gameplayFrames * 2) % 128, 64, 32, 0, 2, 0, 2)); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); @@ -189,11 +189,11 @@ void func_80099878(PlayState* play) { gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sDCLavaFloorTextures[(s32)(gameplayFrames & 14) >> 1])); } gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 0, 64, 32, 1, 0, - (gameplayFrames * 1) % 128, 64, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 0, 64, 32, 1, 0, + (gameplayFrames * 1) % 128, 64, 32, 1, 0, 0, 1)); gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, - (gameplayFrames * 2) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, + (gameplayFrames * 2) % 128, 32, 32, 0, 1, 0, 2)); { s32 pad2[2]; } @@ -285,18 +285,20 @@ void func_8009A45C(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 64, 256, 16)); + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 1) % 64, 256, 16, 0, 1)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128, 32, + 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(POLY_OPA_DISP++, 0x0B, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 1) % 128, 32, 32, + 0, 0, 0, -1)); + gSPSegment(POLY_OPA_DISP++, 0x0B, Gfx_TexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 32, 32, 0, 1)); gSPSegment(POLY_XLU_DISP++, 0x0C, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 50) % 2048, 8, 512, 1, 0, - (gameplayFrames * 60) % 2048, 8, 512)); - gSPSegment(POLY_OPA_DISP++, 0x0D, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (gameplayFrames * 50) % 2048, 8, 512, 1, 0, + (gameplayFrames * 60) % 2048, 8, 512, 0, 50, 0, 60)); + gSPSegment( + POLY_OPA_DISP++, 0x0D, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (gameplayFrames * 1) % 128, 32, 32, 0, 0, 0, 1)); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); @@ -314,17 +316,17 @@ void func_8009A798(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 2) % 256, 64, 64)); + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 2) % 256, 64, 64, 0, 2)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 256, 32, - 64, 1, 0, 0, 32, 128)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 256, + 32, 64, 1, 0, 0, 32, 128, -1, 1, 0, 0)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -343,11 +345,11 @@ void func_8009A9DC(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 256, 32, 64, - 1, gameplayFrames % 128, (gameplayFrames * 3) % 256, 32, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 256, 32, 64, + 1, gameplayFrames % 128, (gameplayFrames * 3) % 256, 32, 64, -1, 3, 1, 3)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, -1, 3, 1, 3)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -365,7 +367,7 @@ void func_8009AB98(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, gameplayFrames % 64, 256, 16)); + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScrollEx(play->state.gfxCtx, 0, gameplayFrames % 64, 256, 16, 0, 1)); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); @@ -384,9 +386,9 @@ void func_8009ACA8(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); - gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, gameplayFrames % 64, 256, 16)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, -1, 3, 1, 3)); + gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScrollEx(play->state.gfxCtx, 0, gameplayFrames % 64, 256, 16, 0, 1)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -407,12 +409,12 @@ void func_8009AE30(PlayState* play) { if (play->sceneNum == SCENE_SHADOW_TEMPLE_BOSS) { gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (gameplayFrames * 2) % 128, 0, 32, 32, 1, - (gameplayFrames * 2) % 128, 0, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 2) % 128, 0, 32, 32, 1, + (gameplayFrames * 2) % 128, 0, 32, 32, 2, 0, 2, 0)); } else { gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (gameplayFrames * 2) % 128, 0, 32, 32, 1, - (gameplayFrames * 2) % 128, 0, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 2) % 128, 0, 32, 32, 1, + (gameplayFrames * 2) % 128, 0, 32, 32, 2, 0, 2, 0)); } gDPPipeSync(POLY_OPA_DISP++); @@ -436,7 +438,7 @@ void func_8009AFE0(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 32, 32)); + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 32, 32, 0, 3)); { s32 pad[2]; } @@ -470,54 +472,54 @@ void func_8009B0FC(PlayState* play) { if (spB0 == 1) { gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, - 0, spAC)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, + 0, 0, spAC, 1, 0, 0, 0)); } else if (spB0 < 1) { gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, - 0, 255)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, + 0, 0, 255, 1, 0, 0, 0)); } else { gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, - 0, 160)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, + 0, 0, 160, 1, 0, 0, 0)); } if (spB0 == 2) { gSPSegment(POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, - 0, spAC)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, + 0, 0, spAC, 1, 0, 0, 0)); } else if (spB0 < 2) { gSPSegment(POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, - 0, 255)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, + 0, 0, 255, 1, 0, 0, 0)); } else { gSPSegment(POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, - 0, 160)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, + 0, 0, 160, 1, 0, 0, 0)); } if (spB0 != 0) { gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, - 0, 160)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, + 0, 0, 160, 1, 0, 0, 0)); gSPSegment(POLY_OPA_DISP++, 0x0B, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, - 0, 180)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32, 0, + 0, 0, 180, 3, 0, 0, 0)); } else { gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 0, 32, 32, 1, 0, 0, 32, - 32, 0, 0, 0, 160 + (s32)((spAC / 200.0f) * 95.0f))); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 0, 32, 32, 1, 0, 0, 32, + 32, 0, 0, 0, 160 + (s32)((spAC / 200.0f) * 95.0f), 1, 0, 0, 0)); gSPSegment(POLY_OPA_DISP++, 0x0B, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, - 0, 185 + (s32)((spAC / 200.0f) * 70.0f))); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, 32, 32, 0, + 0, 0, 185 + (s32)((spAC / 200.0f) * 70.0f), 3, 0, 0, 0)); } gSPSegment(POLY_XLU_DISP++, 0x0C, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 1, gameplayFrames * 1, 32, 32, 1, 0, - 127 - (gameplayFrames * 1), 32, 32, 0, 0, 0, 128)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, gameplayFrames * 1, gameplayFrames * 1, 32, 32, 1, 0, + 127 - (gameplayFrames * 1), 32, 32, 0, 0, 0, 128, 1, 1, 0, -1)); gSPSegment(POLY_XLU_DISP++, 0x0D, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames * 4, 0, 32, 32, 1, gameplayFrames * 4, 0, - 32, 32, 0, 0, 0, 128)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, gameplayFrames * 4, 0, 32, 32, 1, gameplayFrames * 4, + 0, 32, 32, 0, 0, 0, 128, 4, 0, 4, 0)); { s32 pad[2]; } @@ -532,7 +534,7 @@ void func_8009B86C(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 1, 0, 0, 0)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, play->roomCtx.unk_74[0]); @@ -550,7 +552,7 @@ void func_8009B9BC(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, gameplayFrames % 64, 4, 16)); + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScrollEx(play->state.gfxCtx, 0, gameplayFrames % 64, 4, 16, 0, 1)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -566,11 +568,12 @@ void func_8009BAA4(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, -1, 3, 1, 3)); if (play->sceneNum == SCENE_CASTLE_COURTYARD_GUARDS_DAY) { - gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 10) % 256, 32, 64)); + gSPSegment(POLY_XLU_DISP++, 0x09, + Gfx_TexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 10) % 256, 32, 64, 0, 10)); } gDPPipeSync(POLY_OPA_DISP++); @@ -594,15 +597,17 @@ void func_8009BC44(PlayState* play) { gameplayFrames = play->gameplayFrames; if (play->sceneNum == SCENE_OUTSIDE_GANONS_CASTLE) { - gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 64, 64)); + gSPSegment(POLY_XLU_DISP++, 0x09, + Gfx_TexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 64, 64, 0, 1)); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 1) % 256, 64, 64, 1, 0, - (gameplayFrames * 1) % 256, 64, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 1) % 256, 64, 64, 1, 0, + (gameplayFrames * 1) % 256, 64, 64, 0, -1, 0, 1)); } gSPSegment(POLY_OPA_DISP++, 0x0B, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 255 - (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 128, 32, - 32, 1, (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 255 - (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 128, + 32, 32, 1, (gameplayFrames * 1) % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, + 1)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -647,14 +652,14 @@ void func_8009C0AC(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 512, 64, 128, 1, 0, - 511 - (gameplayFrames * 1) % 512, 64, 128)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 512, 64, 128, 1, 0, + 511 - (gameplayFrames * 1) % 512, 64, 128, 0, 1, 0, -1)); gSPSegment(POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 256, 32, 64, 1, 0, - 255 - (gameplayFrames * 1) % 256, 32, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 256, 32, 64, 1, 0, + 255 - (gameplayFrames * 1) % 256, 32, 64, 0, 1, 0, -1)); gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 20) % 2048, 16, 512, 1, 0, - (gameplayFrames * 30) % 2048, 16, 512)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (gameplayFrames * 20) % 2048, 16, 512, 1, 0, + (gameplayFrames * 30) % 2048, 16, 512, 0, 20, 0, 30)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -695,11 +700,11 @@ void func_8009C3EC(PlayState* play) { gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sIceCavernEntranceTextures[gSaveContext.nightFlag])); } gSPSegment(POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); { s32 pad[2]; } @@ -719,16 +724,16 @@ void func_8009C608(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 64, 256, 16)); + gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 1) % 64, 256, 16, 0, 1)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 60) % 2048, 8, 512, 1, 0, - (gameplayFrames * 50) % 2048, 8, 512)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (gameplayFrames * 60) % 2048, 8, 512, 1, 0, + (gameplayFrames * 50) % 2048, 8, 512, 0, 60, 0, 50)); gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - (gameplayFrames * 1) % 128, 0, 32, 32, 1, - (gameplayFrames * 1) % 128, 0, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - (gameplayFrames * 1) % 128, 0, 32, 32, 1, + (gameplayFrames * 1) % 128, 0, 32, 32, -1, 0, 1, 0)); gSPSegment(POLY_XLU_DISP++, 0x0B, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 1023 - (gameplayFrames * 6) % 1024, 16, 256, 1, 0, - 1023 - (gameplayFrames * 3) % 1024, 16, 256)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 1023 - (gameplayFrames * 6) % 1024, 16, 256, 1, 0, + 1023 - (gameplayFrames * 3) % 1024, 16, 256, 0, -6, 0, -3)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -746,12 +751,14 @@ void func_8009C8B8(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); + gSPSegment( + POLY_OPA_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, (gameplayFrames * 1) % 128, 32, 32, 0, 0, 0, 1)); gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); - gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, 255 - (gameplayFrames * 10) % 256, 32, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); + gSPSegment(POLY_XLU_DISP++, 0x09, + Gfx_TexScrollEx(play->state.gfxCtx, 0, 255 - (gameplayFrames * 10) % 256, 32, 64, 0, -10)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -770,8 +777,8 @@ void func_8009CAC0(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -800,11 +807,11 @@ void func_8009CC00(PlayState* play) { gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sGTGEntranceTextures[gSaveContext.nightFlag])); } gSPSegment(POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); { s32 pad[2]; } @@ -864,11 +871,14 @@ void func_8009D0E8(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 127 - (gameplayFrames * 4) % 128, 0, 32, 32)); - gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 5) % 64, 16, 16)); - gSPSegment(POLY_OPA_DISP++, 0x0A, Gfx_TexScroll(play->state.gfxCtx, 0, 63 - (gameplayFrames * 2) % 64, 16, 16)); + gSPSegment(POLY_XLU_DISP++, 0x08, + Gfx_TexScrollEx(play->state.gfxCtx, 127 - (gameplayFrames * 4) % 128, 0, 32, 32, -4, 0)); + gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 5) % 64, 16, 16, 0, 5)); + gSPSegment(POLY_OPA_DISP++, 0x0A, + Gfx_TexScrollEx(play->state.gfxCtx, 0, 63 - (gameplayFrames * 2) % 64, 16, 16, 0, -2)); gSPSegment(POLY_XLU_DISP++, 0x0B, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 127 - (gameplayFrames * 3) % 128, 32, 32, 1, 0, 0, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 127 - (gameplayFrames * 3) % 128, 32, 32, 1, 0, 0, 32, 32, + 0, -1, 0, 0)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -941,10 +951,10 @@ void func_8009D5B4(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 32, 32)); + gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 32, 32, 0, 3)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 1023 - (gameplayFrames * 3) % 1024, 16, 256, 1, 0, - 1023 - (gameplayFrames * 6) % 1024, 16, 256)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 1023 - (gameplayFrames * 3) % 1024, 16, 256, 1, 0, + 1023 - (gameplayFrames * 6) % 1024, 16, 256, 0, -3, 0, -6)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -974,11 +984,11 @@ void func_8009D758(PlayState* play) { gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sForestTempleEntranceTextures[gSaveContext.nightFlag])); } gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); { s32 pad[2]; } @@ -1023,11 +1033,11 @@ void func_8009DA30(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, -1, 3, 1, 3)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, + 32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32, -1, 10, 1, 10)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1088,14 +1098,14 @@ void func_8009DE78(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 6) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 6) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 6) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 6) % 128, 32, 32, -1, 6, 1, 6)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, -1, 3, 1, 3)); gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1121,11 +1131,11 @@ void func_8009E0B8(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, + 32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32, -1, 10, 1, 10)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1154,8 +1164,9 @@ void func_8009E0B8(PlayState* play) { gSPEndDisplayList(displayListHead); gSPSegment(POLY_OPA_DISP++, 0x0C, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (s16)(-play->roomCtx.unk_74[0] * 0.02f), 32, 16, 1, 0, - (s16)(-play->roomCtx.unk_74[0] * 0.02f), 32, 16)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (s16)(-play->roomCtx.unk_74[0] * 0.02f), 32, 16, 1, 0, + (s16)(-play->roomCtx.unk_74[0] * 0.02f), 32, 16, 0, + play->roomCtx.unk_74[0] == 0 ? 0 : -1, 0, play->roomCtx.unk_74[0] == 0 ? 0 : 1)); CLOSE_DISPS(play->state.gfxCtx); } @@ -1173,11 +1184,11 @@ void func_8009E54C(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, gameplayFrames, gameplayFrames, 32, 32, 1, 0, 0, 32, 32, - 0, 0, 0, play->roomCtx.unk_74[0] + 168)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, gameplayFrames, gameplayFrames, 32, 32, 1, 0, 0, 32, + 32, 0, 0, 0, play->roomCtx.unk_74[0] + 168, 1, 1, 0, 0)); gSPSegment(POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, -gameplayFrames, -gameplayFrames, 32, 32, 1, 0, 0, 16, - 64, 0, 0, 0, play->roomCtx.unk_74[0] + 168)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, -gameplayFrames, -gameplayFrames, 32, 32, 1, 0, 0, 16, + 64, 0, 0, 0, play->roomCtx.unk_74[0] + 168, -1, -1, 0, 0)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 128); @@ -1202,7 +1213,8 @@ void func_8009E730(PlayState* play) { if (LINK_IS_ADULT) { var = 0; } - gSPSegment(POLY_OPA_DISP++, 0x0C, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 64, 32, 1, 0, var, 64, 32)); + gSPSegment(POLY_OPA_DISP++, 0x0C, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 64, 32, 1, 0, var, 64, 32, 0, 0, 0, -1)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1221,14 +1233,15 @@ void func_8009E8C0(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 0, 32, 32, 1, 0, 0, 32, 32)); + gSPSegment( + POLY_OPA_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 1) % 128, 0, 32, 32, 1, 0, 0, 32, 32, 1, 0, 0, 0)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 2) % 256, 64, 64, 1, 0, - 255 - (gameplayFrames * 2) % 256, 64, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 2) % 256, 64, 64, 1, 0, + 255 - (gameplayFrames * 2) % 256, 64, 64, 0, -2, 0, -2)); gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, - (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, + (gameplayFrames * 1) % 128, 32, 32, 0, 1, 0, 1)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1247,22 +1260,23 @@ void func_8009EAD8(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 3) % 1024, 32, 256, 1, 0, - (gameplayFrames * 3) % 1024, 32, 256)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (gameplayFrames * 3) % 1024, 32, 256, 1, 0, + (gameplayFrames * 3) % 1024, 32, 256, 0, 3, 0, 3)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 256, 64, 64, 1, 0, - (gameplayFrames * 1) % 256, 64, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 256, 64, 64, 1, 0, + (gameplayFrames * 1) % 256, 64, 64, 0, 1, 0, 1)); gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 2) % 128, 32, 32, 1, 0, - (gameplayFrames * 2) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (gameplayFrames * 2) % 128, 32, 32, 1, 0, + (gameplayFrames * 2) % 128, 32, 32, 0, 2, 0, 2)); gSPSegment(POLY_OPA_DISP++, 0x0B, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 3) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 3) % 128, 32, 32, + 0, 0, 0, -3)); gSPSegment(POLY_XLU_DISP++, 0x0C, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, - (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, + (gameplayFrames * 1) % 128, 32, 32, 0, 1, 0, 1)); gSPSegment(POLY_XLU_DISP++, 0x0D, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 64, 16, 16, 1, 0, - (gameplayFrames * 1) % 64, 16, 16)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 64, 16, 16, 1, 0, + (gameplayFrames * 1) % 64, 16, 16, 0, 1, 0, 1)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1280,12 +1294,12 @@ void func_8009EE44(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment( - POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, gameplayFrames % 128, 0, 32, 16, 1, gameplayFrames % 128, 0, 32, 16)); + gSPSegment(POLY_XLU_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, gameplayFrames % 128, 0, 32, 16, 1, gameplayFrames % 128, 0, + 32, 16, 1, 0, 1, 0)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, gameplayFrames % 128, 32, 32, 1, - gameplayFrames % 128, gameplayFrames % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, gameplayFrames % 128, 32, 32, 1, + gameplayFrames % 128, gameplayFrames % 128, 32, 32, -1, 1, 1, 1)); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); @@ -1315,8 +1329,9 @@ void func_8009F074(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - gameplayFrames % 128, 32, 32)); + gSPSegment( + POLY_OPA_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - gameplayFrames % 128, 32, 32, 0, 0, 0, -1)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1351,12 +1366,12 @@ void func_8009F270(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment( - POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, 32, 32)); - gSPSegment( - POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, 32, 32)); + gSPSegment(POLY_OPA_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, + 32, 32, 0, 1, 0, 1)); + gSPSegment(POLY_XLU_DISP++, 0x09, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, + 32, 32, 0, 1, 0, 1)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1375,11 +1390,11 @@ void func_8009F40C(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, + 32, 1, gameplayFrames % 128, (gameplayFrames * 10) % 128, 32, 32, -1, 10, 1, 10)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, 32, 32, -1, 3, 1, 3)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1437,9 +1452,9 @@ void func_8009F7D4(PlayState* play) { sp6F = (sp6F >> 1) + 192; sp6E = (sp6E >> 1) + 192; - gSPSegment( - POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, 32, 32)); + gSPSegment(POLY_OPA_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, gameplayFrames % 128, 32, 32, 1, 0, gameplayFrames % 128, + 32, 32, 0, 1, 0, 1)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, sp6F, sp6E, 255, 128); @@ -1463,8 +1478,8 @@ void func_8009F9D0(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 127 - gameplayFrames % 128, 32, 32, 1, gameplayFrames % 128, - 0, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 127 - gameplayFrames % 128, 32, 32, 1, gameplayFrames % 128, + 0, 32, 32, 0, -1, 1, 0)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1509,11 +1524,12 @@ void func_8009FC90(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 127 - gameplayFrames % 128, 32, 32, 1, - 127 - gameplayFrames % 128, 0, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 127 - gameplayFrames % 128, 32, 32, 1, + 127 - gameplayFrames % 128, 0, 32, 32, 0, -1, -1, 0)); gSPSegment(POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 127 - (gameplayFrames * 6) % 128, 32, - 32, 1, (gameplayFrames * 6) % 128, 127 - (gameplayFrames * 3) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 127 - (gameplayFrames * 6) % 128, + 32, 32, 1, (gameplayFrames * 6) % 128, 127 - (gameplayFrames * 3) % 128, 32, 32, 3, + -6, 6, -3)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 64); @@ -1537,15 +1553,15 @@ void func_8009FE58(PlayState* play) { gameplayFrames = play->gameplayFrames; if (play->sceneNum == SCENE_JABU_JABU) { gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, gameplayFrames % 128, (gameplayFrames * 2) % 128, 32, 32, 1, - 127 - gameplayFrames % 128, (gameplayFrames * 2) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, gameplayFrames % 128, (gameplayFrames * 2) % 128, 32, 32, + 1, 127 - gameplayFrames % 128, (gameplayFrames * 2) % 128, 32, 32, 1, 2, -1, 2)); gSPSegment(POLY_OPA_DISP++, 0x0B, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 4) % 256, 32, 64, 1, 0, - 255 - (gameplayFrames * 4) % 256, 32, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 4) % 256, 32, 64, 1, 0, + 255 - (gameplayFrames * 4) % 256, 32, 64, 0, -4, 0, -4)); } else { - gSPSegment( - POLY_OPA_DISP++, 0x08, - Gfx_TexScroll(play->state.gfxCtx, (127 - (gameplayFrames * 1)) % 128, (gameplayFrames * 1) % 128, 32, 32)); + gSPSegment(POLY_OPA_DISP++, 0x08, + Gfx_TexScrollEx(play->state.gfxCtx, (127 - (gameplayFrames * 1)) % 128, (gameplayFrames * 1) % 128, + 32, 32, -1, 1)); } gDPPipeSync(POLY_OPA_DISP++); @@ -1616,14 +1632,14 @@ void func_800A0334(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 512, 32, 128, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 512, 32, 128)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 512, 32, + 128, 1, gameplayFrames % 128, (gameplayFrames * 1) % 512, 32, 128, -1, 1, 1, 1)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, + 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1651,8 +1667,10 @@ void func_800A059C(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gameplayFrames = play->gameplayFrames; - gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 127 - (gameplayFrames * 2) % 128, 0, 32, 64)); - gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 2) % 512, 128, 128)); + gSPSegment(POLY_OPA_DISP++, 0x08, + Gfx_TexScrollEx(play->state.gfxCtx, 127 - (gameplayFrames * 2) % 128, 0, 32, 64, -2, 0)); + gSPSegment(POLY_OPA_DISP++, 0x09, + Gfx_TexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 2) % 512, 128, 128, 0, 2)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); diff --git a/soh/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/soh/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index 2607244c6..9f3efde51 100644 --- a/soh/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/soh/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -242,9 +242,9 @@ void ArrowFire_Draw(Actor* thisx, PlayState* play2) { Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); - gSPDisplayList(POLY_XLU_DISP++, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 255 - (stateFrames * 2) % 256, 0, 64, 32, 1, - 255 - stateFrames % 256, 511 - (stateFrames * 10) % 512, 64, 64)); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 255 - (stateFrames * 2) % 256, 0, 64, + 32, 1, 255 - stateFrames % 256, + 511 - (stateFrames * 10) % 512, 64, 64, -2, 0, -1, -10)); gSPDisplayList(POLY_XLU_DISP++, sModelDL); CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/soh/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index 7b985866a..53f8107a1 100644 --- a/soh/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/soh/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -240,9 +240,9 @@ void ArrowIce_Draw(Actor* thisx, PlayState* play) { Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); - gSPDisplayList(POLY_XLU_DISP++, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 511 - (stateFrames * 5) % 512, 0, 128, 32, 1, - 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 10) % 512, 4, 16)); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 511 - (stateFrames * 5) % 512, 0, 128, + 32, 1, 511 - (stateFrames * 10) % 512, + 511 - (stateFrames * 10) % 512, 4, 16, -5, 0, -10, -10)); gSPDisplayList(POLY_XLU_DISP++, sModelDL); CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/soh/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 4b4d7abce..ee2cfc953 100644 --- a/soh/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/soh/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -238,9 +238,9 @@ void ArrowLight_Draw(Actor* thisx, PlayState* play) { Matrix_Translate(0.0f, -700.0f, 0.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); - gSPDisplayList(POLY_XLU_DISP++, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 511 - (stateFrames * 5) % 512, 0, 4, 32, 1, - 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 30) % 512, 8, 16)); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 511 - (stateFrames * 5) % 512, 0, 4, + 32, 1, 511 - (stateFrames * 10) % 512, + 511 - (stateFrames * 30) % 512, 8, 16, -5, 0, -10, -30)); gSPDisplayList(POLY_XLU_DISP++, sModelDL); CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c b/soh/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c index d07872de0..d4ab57b51 100644 --- a/soh/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c +++ b/soh/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c @@ -204,7 +204,8 @@ void BgBowlWall_Draw(Actor* thisx, PlayState* play2) { OPEN_DISPS(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx); - gSPSegment(POLY_OPA_DISP++, 0x8, Gfx_TexScroll(play->state.gfxCtx, 0, -2 * (frames = play->state.frames), 16, 16)); + gSPSegment(POLY_OPA_DISP++, 0x8, + Gfx_TexScrollEx(play->state.gfxCtx, 0, -2 * (frames = play->state.frames), 16, 16, 0, -2)); gDPPipeSync(POLY_OPA_DISP++); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/soh/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c b/soh/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c index 2754e9bae..8c8dc2fe9 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c +++ b/soh/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c @@ -338,8 +338,8 @@ void BgGanonOtyuka_Draw(Actor* thisx, PlayState* play) { if ((platform->dyna.actor.projectedPos.z > -30.0f) && (platform->flashState != FLASH_NONE)) { FrameInterpolation_RecordOpenChild(platform, 0); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, platform->flashTimer * 4, 0, 32, 64, 1, - platform->flashTimer * 4, 0, 32, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, platform->flashTimer * 4, 0, 32, 64, 1, + platform->flashTimer * 4, 0, 32, 64, 4, 0, 4, 0)); gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, platform->flashPrimColorR, platform->flashPrimColorG, platform->flashPrimColorB, 0); diff --git a/soh/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c b/soh/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c index c03e08da7..bc6de5dcf 100644 --- a/soh/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c +++ b/soh/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c @@ -121,11 +121,12 @@ void BgGjyoBridge_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TexScroll(play->state.gfxCtx, play->gameplayFrames & 127, play->gameplayFrames * -3 & 127, 32, 32)); + Gfx_TexScrollEx(play->state.gfxCtx, play->gameplayFrames & 127, play->gameplayFrames * -3 & 127, 32, 32, + 1, -3)); gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, -play->gameplayFrames & 127, 32, 32, 1, 0, - play->gameplayFrames & 127, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, -play->gameplayFrames & 127, 32, 32, 1, 0, + play->gameplayFrames & 127, 32, 32, 0, -1, 0, 1)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c b/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c index beea49380..748beac14 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c @@ -319,8 +319,8 @@ void BgHakaGate_DrawFlame(BgHakaGate* this, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, (this->vScrollTimer * -20) & 0x1FF, - 0x20, 0x80)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, (this->vScrollTimer * -20) & 0x1FF, + 0x20, 0x80, 0, 0, 0, -20)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, 255); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c b/soh/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c index e1f4279e7..4e5a28922 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c @@ -237,8 +237,8 @@ void BgHakaTubo_DrawFlameCircle(BgHakaTubo* this, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 0, 170, 255, 255); gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 255, 255); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, this->fireScroll & 127, 0, 32, 64, 1, 0, - (this->fireScroll * -15) & 0xFF, 32, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, this->fireScroll & 127, 0, 32, 64, 1, 0, + (this->fireScroll * -15) & 0xFF, 32, 64, 1, 0, 0, -15)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gEffFireCircleDL); diff --git a/soh/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c b/soh/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c index 224bc0eac..f84b32331 100644 --- a/soh/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c +++ b/soh/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c @@ -123,8 +123,8 @@ void BgHakaWater_Draw(Actor* thisx, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (u8)(0.765f * temp)); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, play->gameplayFrames % 128, play->gameplayFrames % 128, 32, 32, - 1, 0, (0 - play->gameplayFrames) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, play->gameplayFrames % 128, play->gameplayFrames % 128, 32, 32, + 1, 0, (0 - play->gameplayFrames) % 128, 32, 32, 1, 1, 0, -1)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gBotwWaterRingDL); diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c index de1578b24..0c6b7a204 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c @@ -254,8 +254,8 @@ void BgHidanCurtain_Draw(Actor* thisx, PlayState* play) { gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, this->texScroll & 0x7F, 0, 0x20, 0x40, 1, 0, - (this->texScroll * -0xF) & 0xFF, 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, this->texScroll & 0x7F, 0, 0x20, 0x40, 1, 0, + (this->texScroll * -0xF) & 0xFF, 0x20, 0x40, 1, 0, 0, -0xF)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c index 3d46f41c5..9300f035c 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c @@ -268,8 +268,8 @@ void BgHidanFwbig_Draw(Actor* thisx, PlayState* play) { gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, play->gameplayFrames % 0x80, 0, 0x20, 0x40, 1, 0, - (u8)(play->gameplayFrames * -15), 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, play->gameplayFrames % 0x80, 0, 0x20, 0x40, 1, 0, + (u8)(play->gameplayFrames * -15), 0x20, 0x40, 1, 0, 0, -15)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/soh/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c b/soh/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c index c4b1eb23f..eb267edcb 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c +++ b/soh/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c @@ -475,20 +475,20 @@ void BgIceShelter_Draw(Actor* thisx, PlayState* play2) { case 1: case 4: gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, -play->gameplayFrames & 0x7F, - -play->gameplayFrames & 0x7F, 0x20, 0x20, 1, -play->gameplayFrames & 0x7F, - play->gameplayFrames & 0x7F, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, -play->gameplayFrames & 0x7F, + -play->gameplayFrames & 0x7F, 0x20, 0x20, 1, -play->gameplayFrames & 0x7F, + play->gameplayFrames & 0x7F, 0x20, 0x20, -1, -1, -1, 1)); gSPDisplayList(POLY_XLU_DISP++, gRedIceBlockDL); break; case 2: gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, play->gameplayFrames & 0xFF, 0x40, 0x40, 1, 0, - -play->gameplayFrames & 0xFF, 0x40, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, play->gameplayFrames & 0xFF, 0x40, 0x40, 1, 0, + -play->gameplayFrames & 0xFF, 0x40, 0x40, 0, 1, 0, -1)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, -play->gameplayFrames & 0xFF, - play->gameplayFrames & 0xFF, 0x40, 0x40, 1, play->gameplayFrames & 0xFF, - play->gameplayFrames & 0xFF, 0x40, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, -play->gameplayFrames & 0xFF, + play->gameplayFrames & 0xFF, 0x40, 0x40, 1, play->gameplayFrames & 0xFF, + play->gameplayFrames & 0xFF, 0x40, 0x40, -1, 1, 1, 1)); gSPDisplayList(POLY_XLU_DISP++, gRedIcePlatformDL); break; diff --git a/soh/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c b/soh/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c index 70ca2b6e4..3085cb663 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c +++ b/soh/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c @@ -508,17 +508,17 @@ void BgMizuBwall_Draw(Actor* thisx, PlayState* play2) { Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, 1 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, 0x20, 0, 0, 0, - this->scrollAlpha1)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, 1 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, 0x20, 0, 0, + 0, this->scrollAlpha1, 1, 0, 0, 0)); gSPSegment(POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, 1 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, 0x20, 0, 0, 0, - this->scrollAlpha2)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, 1 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, 0x20, 0, 0, + 0, this->scrollAlpha2, 1, 0, 0, 0)); gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, 1 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, 0x20, 0, 0, 0, - this->scrollAlpha3)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, 1 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, 0x20, 0, 0, + 0, this->scrollAlpha3, 1, 0, 0, 0)); gSPSegment(POLY_OPA_DISP++, 0x0B, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, 3 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, 0x20, 0, 0, 0, - this->scrollAlpha4)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, 3 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, 0x20, 0, 0, + 0, this->scrollAlpha4, 3, 0, 0, 0)); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), 2); if (this->dList != NULL) { diff --git a/soh/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c b/soh/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c index 7dbe531d5..74eede4f0 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c +++ b/soh/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c @@ -367,20 +367,20 @@ void BgMizuMovebg_Draw(Actor* thisx, PlayState* play2) { Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, frames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, - this->scrollAlpha1)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, frames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, + this->scrollAlpha1, 1, 0, 0, 0)); gSPSegment(POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, frames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, - this->scrollAlpha2)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, frames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, + this->scrollAlpha2, 1, 0, 0, 0)); gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, frames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, - this->scrollAlpha3)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, frames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, + this->scrollAlpha3, 1, 0, 0, 0)); gSPSegment(POLY_OPA_DISP++, 0x0B, - Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, frames * 3, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, - this->scrollAlpha4)); + Gfx_TwoTexScrollEnvColorEx(play->state.gfxCtx, 0, frames * 3, 0, 32, 32, 1, 0, 0, 32, 32, 0, 0, 0, + this->scrollAlpha4, 3, 0, 0, 0)); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/soh/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c b/soh/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c index 2fcf27301..32aa02562 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c +++ b/soh/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c @@ -332,8 +332,8 @@ void BgMizuWater_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x0C, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, -gameplayFrames * 1, gameplayFrames * 1, 32, 32, 1, 0, - -gameplayFrames * 1, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, -gameplayFrames * 1, gameplayFrames * 1, 32, 32, 1, 0, + -gameplayFrames * 1, 32, 32, -1, 1, 0, -1)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/soh/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c b/soh/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c index 8ebb9bc25..7b3b996c6 100644 --- a/soh/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c +++ b/soh/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c @@ -173,8 +173,8 @@ void BgMoriIdomizu_Draw(Actor* thisx, PlayState* play) { gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, 128); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0x7F - (gameplayFrames & 0x7F), gameplayFrames % 0x80, 0x20, - 0x20, 1, gameplayFrames & 0x7F, gameplayFrames % 0x80, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0x7F - (gameplayFrames & 0x7F), gameplayFrames % 0x80, 0x20, + 0x20, 1, gameplayFrames & 0x7F, gameplayFrames % 0x80, 0x20, 0x20, -1, 1, 1, 1)); gSPDisplayList(POLY_XLU_DISP++, gMoriIdomizuWaterDL); diff --git a/soh/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c b/soh/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c index 3e5d1294f..c9c9ec433 100644 --- a/soh/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c +++ b/soh/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c @@ -168,8 +168,8 @@ void BgPoSyokudai_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (this->flameTextureScroll * -20) & 0x1FF, - 32, 128)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, + (this->flameTextureScroll * -20) & 0x1FF, 32, 128, 0, 0, 0, -20)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, primColor->r, primColor->g, primColor->b, 255); gDPSetEnvColor(POLY_XLU_DISP++, envColor->r, envColor->g, envColor->b, 255); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/soh/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index a3a46ed36..a2a6181ea 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -282,8 +282,8 @@ void BgSpot00Hanebasi_DrawTorches(Actor* thisx, PlayState* play2) { FrameInterpolation_RecordOpenChild("Hanebasi Torch", i); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, - ((play->gameplayFrames + i) * -20) & 0x1FF, 32, 128)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, + ((play->gameplayFrames + i) * -20) & 0x1FF, 32, 128, 0, 0, 0, -20)); Matrix_Translate((i == 0) ? 260.0f : -260.0f, 128.0f, 690.0f, MTXMODE_NEW); Matrix_RotateY(angle, MTXMODE_APPLY); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c b/soh/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c index c2f21e779..0ca84a9f2 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c @@ -78,8 +78,8 @@ void BgSpot01Idomizu_Draw(Actor* thisx, PlayState* play) { frames = play->state.frames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - frames % 128, frames & 0x7F, 32, 32, 1, frames % 128, - frames & 0x7F, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - frames % 128, frames & 0x7F, 32, 32, 1, frames % 128, + frames & 0x7F, 32, 32, -1, 1, 1, 1)); gSPDisplayList(POLY_XLU_DISP++, gKakarikoWellWaterDL); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c index 6fa8f7cf1..d649f7d95 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c @@ -322,8 +322,8 @@ void func_808AD450(Actor* thisx, PlayState* play) { gDPSetEnvColor(POLY_XLU_DISP++, 150, 120, 0, 128); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 2 * this->timer, -3 * this->timer, 32, 64, 1, - 4 * this->timer, -6 * this->timer, 32, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 2 * this->timer, -3 * this->timer, 32, 64, 1, + 4 * this->timer, -6 * this->timer, 32, 64, 2, -3, 4, -6)); gDPPipeSync(POLY_XLU_DISP++); gSPDisplayList(POLY_XLU_DISP++, object_spot02_objects_DL_0013F0); gDPPipeSync(POLY_XLU_DISP++); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c b/soh/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c index 8312543aa..c0e686362 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c @@ -130,9 +130,9 @@ void BgSpot03Taki_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); - gSPSegment( - POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, gameplayFrames * 5, 64, 64, 1, 0, gameplayFrames * 5, 64, 64)); + gSPSegment(POLY_XLU_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, gameplayFrames * 5, 64, 64, 1, 0, gameplayFrames * 5, 64, + 64, 0, 5, 0, 5)); gSPDisplayList(POLY_XLU_DISP++, object_spot03_object_DL_000B20); @@ -145,8 +145,8 @@ void BgSpot03Taki_Draw(Actor* thisx, PlayState* play) { gSPDisplayList(POLY_XLU_DISP++, object_spot03_object_DL_000BC0); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, gameplayFrames * 1, gameplayFrames * 3, 64, 64, 1, - -gameplayFrames, gameplayFrames * 3, 64, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, gameplayFrames * 1, gameplayFrames * 3, 64, 64, 1, + -gameplayFrames, gameplayFrames * 3, 64, 64, 1, 3, -1, 3)); gSPDisplayList(POLY_XLU_DISP++, object_spot03_object_DL_001580); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index 7aa40da13..624a3578c 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -533,11 +533,11 @@ void BgSpot06Objects_DrawLakeHyliaWater(BgSpot06Objects* this, PlayState* play) gameplayFrames = play->state.frames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, -gameplayFrames, gameplayFrames, 32, 32, 1, gameplayFrames, - gameplayFrames, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, -gameplayFrames, gameplayFrames, 32, 32, 1, gameplayFrames, + gameplayFrames, 32, 32, -1, 1, 1, 1)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, -gameplayFrames, gameplayFrames * 6, 32, 32, 1, gameplayFrames, - gameplayFrames * 6, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, -gameplayFrames, gameplayFrames * 6, 32, 32, 1, gameplayFrames, + gameplayFrames * 6, 32, 32, -1, 6, 1, 6)); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128); diff --git a/soh/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c b/soh/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c index 3e3d57a4a..7c87c08c6 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c @@ -86,26 +86,26 @@ void BgSpot07Taki_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, ((frames * -1) & 0x7F), ((frames * 1) & 0x7F), 32, 32, 1, - ((frames * 1) & 0x7F), ((frames * 1) & 0x7F), 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, ((frames * -1) & 0x7F), ((frames * 1) & 0x7F), 32, 32, 1, + ((frames * 1) & 0x7F), ((frames * 1) & 0x7F), 32, 32, -1, 1, 1, 1)); if (!LINK_IS_ADULT) { gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128); if (this->dyna.actor.params == 0) { gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, ((frames * -1) & 0x7F), ((frames * -3) & 0xFF), 64, 64, - 1, ((frames * 1) & 0x7F), ((frames * -3) & 0xFF), 64, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, ((frames * -1) & 0x7F), ((frames * -3) & 0xFF), 64, 64, + 1, ((frames * 1) & 0x7F), ((frames * -3) & 0xFF), 64, 64, -1, -3, 1, -3)); gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, frames * 0, ((frames * 3) & 0x1FF), 32, 128, 1, - frames * 0, ((frames * 3) & 0x1FF), 32, 128)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, frames * 0, ((frames * 3) & 0x1FF), 32, 128, 1, + frames * 0, ((frames * 3) & 0x1FF), 32, 128, 0, 3, 0, 3)); gSPDisplayList(POLY_XLU_DISP++, object_spot07_object_DL_000460); } else { gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, frames * 0, ((frames * -1) & 0x7F), 32, 32, 1, - frames * 0, ((frames * -1) & 0x7F), 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, frames * 0, ((frames * -1) & 0x7F), 32, 32, 1, + frames * 0, ((frames * -1) & 0x7F), 32, 32, 0, -1, 0, -1)); gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, frames * 0, ((frames * 3) & 0x1FF), 32, 128, 1, - frames * 0, ((frames * 3) & 0x1FF), 32, 128)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, frames * 0, ((frames * 3) & 0x1FF), 32, 128, 1, + frames * 0, ((frames * 3) & 0x1FF), 32, 128, 0, 3, 0, 3)); gSPDisplayList(POLY_XLU_DISP++, object_spot07_object_DL_000BE0); } } else if (this->dyna.actor.params == 0) { diff --git a/soh/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c b/soh/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c index 9e55a5eba..702285ffd 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c @@ -155,8 +155,8 @@ void BgSpot11Oasis_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128, 32, 32, - 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 127 - (gameplayFrames % 128), (gameplayFrames * 1) % 128, 32, + 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, -1, 1, 1, 1)); gSPDisplayList(POLY_XLU_DISP++, gDesertColossusOasisDL); CLOSE_DISPS(play->state.gfxCtx); } diff --git a/soh/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c b/soh/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c index 6f722ad2f..21988cbbe 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c @@ -129,7 +129,8 @@ void BgSpot16Doughnut_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->fireFlag & 1) { gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, scroll * (-1), 0, 16, 32, 1, scroll, scroll * (-2), 16, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, scroll * (-1), 0, 16, 32, 1, scroll, scroll * (-2), 16, 32, + -1, 0, 1, -2)); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, this->envColorAlpha); gSPDisplayList(POLY_XLU_DISP++, gDeathMountainCloudCircleFieryDL); } else { diff --git a/soh/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c b/soh/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c index 3baa5d89b..0f27a1930 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c @@ -63,8 +63,8 @@ void func_808B7478(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (0 - play->gameplayFrames) & 0x7F, 0x20, 0x20, 1, 0, - (0 - play->gameplayFrames) & 0x7F, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (0 - play->gameplayFrames) & 0x7F, 0x20, 0x20, 1, 0, + (0 - play->gameplayFrames) & 0x7F, 0x20, 0x20, 0, -1, 0, -1)); gSPDisplayList(POLY_XLU_DISP++, gCraterSmokeConeDL); CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c b/soh/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c index acb52db79..d7fea8555 100644 --- a/soh/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c +++ b/soh/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c @@ -94,9 +94,11 @@ void func_808BA018(BgTokiHikari* this, PlayState* play) { } else { gSPDisplayList(POLY_OPA_DISP++, object_toki_objects_DL_007E20); Gfx_SetupDL_25Xlu(play->state.gfxCtx); - gSPSegment(POLY_XLU_DISP++, 8, Gfx_TexScroll(play->state.gfxCtx, 0, play->gameplayFrames % 128, 64, 32)); + gSPSegment(POLY_XLU_DISP++, 8, + Gfx_TexScrollEx(play->state.gfxCtx, 0, play->gameplayFrames % 128, 64, 32, 0, 1)); - gSPSegment(POLY_XLU_DISP++, 9, Gfx_TexScroll(play->state.gfxCtx, 0, play->gameplayFrames % 128, 64, 32)); + gSPSegment(POLY_XLU_DISP++, 9, + Gfx_TexScrollEx(play->state.gfxCtx, 0, play->gameplayFrames % 128, 64, 32, 0, 1)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -147,8 +149,8 @@ void func_808BA2CC(BgTokiHikari* this, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, -2 * (play->gameplayFrames & 0x7F), 0, 0x20, 0x40, 1, - (play->gameplayFrames & 0x7F) * 4, 0, 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, -2 * (play->gameplayFrames & 0x7F), 0, 0x20, 0x40, 1, + (play->gameplayFrames & 0x7F) * 4, 0, 0x20, 0x40, -2, 0, 4, 0)); gSPDisplayList(POLY_XLU_DISP++, object_toki_objects_DL_000880); Matrix_Pop(); diff --git a/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c index a11180a7b..ef2fc3e59 100644 --- a/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c +++ b/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c @@ -209,7 +209,8 @@ void BgTokiSwd_Draw(Actor* thisx, PlayState* play2) { func_8002EBCC(&this->actor, play, 0); - gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, -(play->gameplayFrames % 0x80), 32, 32)); + gSPSegment(POLY_OPA_DISP++, 0x08, + Gfx_TexScrollEx(play->state.gfxCtx, 0, -(play->gameplayFrames % 0x80), 32, 32, 0, -1)); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, object_toki_objects_DL_001BD0); diff --git a/soh/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c b/soh/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c index 6715d140c..890b7c149 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c +++ b/soh/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c @@ -184,8 +184,9 @@ void BgYdanHasi_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, -play->gameplayFrames % 128, play->gameplayFrames % 128, - 0x20, 0x20, 1, play->gameplayFrames % 128, play->gameplayFrames % 128, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, -play->gameplayFrames % 128, play->gameplayFrames % 128, + 0x20, 0x20, 1, play->gameplayFrames % 128, play->gameplayFrames % 128, 0x20, 0x20, + -1, 1, 1, 1)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gDTWaterPlaneDL); diff --git a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index 249b3afe9..2a87e0f78 100644 --- a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -1841,9 +1841,10 @@ void BossFd_DrawBody(PlayState* play, BossFd* this) { gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeState])); } gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (s16)this->fwork[BFD_TEX1_SCROLL_X], - (s16)this->fwork[BFD_TEX1_SCROLL_Y], 0x20, 0x20, 1, (s16)this->fwork[BFD_TEX2_SCROLL_X], - (s16)this->fwork[BFD_TEX2_SCROLL_Y], 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (s16)this->fwork[BFD_TEX1_SCROLL_X], + (s16)this->fwork[BFD_TEX1_SCROLL_Y], 0x20, 0x20, 1, + (s16)this->fwork[BFD_TEX2_SCROLL_X], (s16)this->fwork[BFD_TEX2_SCROLL_Y], 0x20, 0x20, + 4, 1, 3, -2)); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, (s8)this->fwork[BFD_BODY_TEX2_ALPHA]); diff --git a/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index 0299016b9..1a00b983b 100644 --- a/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -1214,10 +1214,10 @@ void BossFd2_Draw(Actor* thisx, PlayState* play) { gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeState])); gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (s16)this->fwork[FD2_TEX1_SCROLL_X], - (s16)this->fwork[FD2_TEX1_SCROLL_Y], 0x20, 0x20, 1, - (s16)this->fwork[FD2_TEX2_SCROLL_X], (s16)this->fwork[FD2_TEX2_SCROLL_Y], 0x20, - 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (s16)this->fwork[FD2_TEX1_SCROLL_X], + (s16)this->fwork[FD2_TEX1_SCROLL_Y], 0x20, 0x20, 1, + (s16)this->fwork[FD2_TEX2_SCROLL_X], (s16)this->fwork[FD2_TEX2_SCROLL_Y], 0x20, + 0x20, 4, 0, 3, -2)); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 128); diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index 534988630..4aa8984a2 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -3447,9 +3447,9 @@ void BossGanon_DrawShock(BossGanon* this, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->shockGlow) { - gSPSegment( - POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (this->unk_1A2 + i) * -15, 32, 64)); + gSPSegment(POLY_XLU_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (this->unk_1A2 + i) * -15, + 32, 64, 0, 0, 0, -15)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 200, 255, 170, 255); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 128); gSPDisplayList(POLY_XLU_DISP++, gGanondorfShockGlowDL); @@ -3518,8 +3518,8 @@ void BossGanon_DrawBigMagicCharge(BossGanon* this, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, (s8)this->unk_290); gDPSetEnvColor(POLY_XLU_DISP++, 200, 255, 0, 128); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, this->unk_1A2 * -2, 0, 0x40, 0x40, 1, 0, this->unk_1A2 * 0xA, - 0x40, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, this->unk_1A2 * -2, 0, 0x40, 0x40, 1, 0, + this->unk_1A2 * 0xA, 0x40, 0x40, -2, 0, 0, 0xA)); Matrix_Translate(this->unk_278.x, this->unk_278.y, this->unk_278.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); Matrix_Scale(this->unk_28C, this->unk_28C, this->unk_28C, MTXMODE_APPLY); @@ -3533,14 +3533,15 @@ void BossGanon_DrawBigMagicCharge(BossGanon* this, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 0, 100, (s8)this->unk_288); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, 0, this->unk_1A2 * -4, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, 0, this->unk_1A2 * -4, 0x20, 0x20, 0, + 0, 0, -4)); gSPDisplayList(POLY_XLU_DISP++, gGanondorfBigMagicBGCircleDL); // yellow background dot gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 150, 170, 0, (s8)this->unk_288); gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, this->unk_1A2 * 2, - this->unk_1A2 * -0x14, 0x40, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, this->unk_1A2 * 2, + this->unk_1A2 * -0x14, 0x40, 0x40, 0, 0, 2, -0x14)); gSPDisplayList(POLY_XLU_DISP++, gGanondorfDotDL); // light ball material @@ -3647,8 +3648,8 @@ void BossGanon_DrawDarkVortex(BossGanon* this, PlayState* play) { Matrix_Push(); gDPPipeSync(POLY_XLU_DISP++); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, this->unk_1A2 * -8, 0, 0x20, 0x40, 1, this->unk_1A2 * -4, - this->unk_1A2 * -8, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, this->unk_1A2 * -8, 0, 0x20, 0x40, 1, this->unk_1A2 * -4, + this->unk_1A2 * -8, 0x20, 0x20, -8, 0, -4, -8)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 100, 0, 200, (s8)this->fwork[GDF_VORTEX_ALPHA]); gDPSetEnvColor(POLY_XLU_DISP++, 130, 0, 0, 128); @@ -5018,8 +5019,8 @@ void BossGanon_DrawEffects(PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, 0, 0, eff->alpha); gDPSetEnvColor(POLY_XLU_DISP++, 100, 70, 0, 128); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, eff->timer * 4, 0, 32, 64, 1, eff->timer * 2, - eff->timer * -20, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, eff->timer * 4, 0, 32, 64, 1, eff->timer * 2, + eff->timer * -20, 32, 32, 4, 0, 2, -20)); Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW); Matrix_Scale(eff->scale, eff->unk_40 * eff->scale, eff->scale, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -5037,8 +5038,8 @@ void BossGanon_DrawEffects(PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, eff->alpha); gDPSetEnvColor(POLY_XLU_DISP++, 200, 100, 0, 128); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, eff->timer * 4, 0, 32, 64, 1, eff->timer * 2, - eff->timer * -20, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, eff->timer * 4, 0, 32, 64, 1, eff->timer * 2, + eff->timer * -20, 32, 32, 4, 0, 2, -20)); Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW); Matrix_Scale(eff->scale, eff->unk_40 * eff->scale, eff->scale, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -5056,8 +5057,8 @@ void BossGanon_DrawEffects(PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, eff->alpha); gDPSetEnvColor(POLY_XLU_DISP++, 150, 255, 0, 128); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (eff->timer * 100), 0, 64, 32, 1, (eff->timer * 100), 0, - 64, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (eff->timer * 100), 0, 64, 32, 1, (eff->timer * 100), + 0, 64, 32, 100, 0, 100, 0)); Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW); Matrix_Scale((eff->scale * 200.0f) / 1500.0f, (eff->unk_40 * 200.0f) / 1500.0f, (eff->scale * 200.0f) / 1500.0f, MTXMODE_APPLY); @@ -5075,9 +5076,9 @@ void BossGanon_DrawEffects(PlayState* play) { gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 150, 170, 0, eff->alpha); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128); - gSPSegment( - POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, eff->timer * 2, eff->timer * -20, 64, 64)); + gSPSegment(POLY_XLU_DISP++, 0x0A, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, eff->timer * 2, eff->timer * -20, 64, + 64, 0, 0, 2, -20)); Matrix_Translate(eff->pos.x, eff->pos.y, eff->pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); Matrix_Scale(eff->scale, eff->scale, 1.0f, MTXMODE_APPLY); diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 1799dafd0..e463f981a 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -2449,7 +2449,8 @@ void func_80903F38(BossGanon2* this, PlayState* play) { if (D_80910638 >= 4) { gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, play->gameplayFrames * 18, 0, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, play->gameplayFrames * 18, 0, 32, 32, 0, + 0, 18, 0)); gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, D_80907080); Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_NEW); @@ -2469,8 +2470,8 @@ void func_80904108(BossGanon2* this, PlayState* play) { Matrix_Push(); gDPPipeSync(POLY_XLU_DISP++); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (s32)play->gameplayFrames, 0, 32, 64, 1, - -play->gameplayFrames * 2, -play->gameplayFrames * 8, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (s32)play->gameplayFrames, 0, 32, 64, 1, + -play->gameplayFrames * 2, -play->gameplayFrames * 8, 32, 32, 1, 0, -2, -8)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 200, 0, (s8)this->unk_324); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128); Matrix_Translate(-200.0f, 1086.0f, -200.0f, MTXMODE_NEW); @@ -2779,8 +2780,8 @@ void func_80905674(BossGanon2* this, PlayState* play) { Matrix_Push(); gDPPipeSync(POLY_XLU_DISP++); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, this->unk_19C * -8, 0, 32, 64, 1, this->unk_19C * -4, - this->unk_19C * -8, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, this->unk_19C * -8, 0, 32, 64, 1, this->unk_19C * -4, + this->unk_19C * -8, 32, 32, -8, 0, -4, -8)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, (s16)this->unk_37C); gDPSetEnvColor(POLY_XLU_DISP++, 255, 200, 0, 128); Matrix_Translate(sBossGanon2Zelda->actor.world.pos.x + 100.0f, @@ -2975,7 +2976,7 @@ void func_809060E8(PlayState* play) { Matrix_RotateX(effect->unk_38.y, MTXMODE_APPLY); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TexScroll(play->state.gfxCtx, 0, 0 - (play->gameplayFrames & 0x7F), 32, 32)); + Gfx_TexScrollEx(play->state.gfxCtx, 0, 0 - (play->gameplayFrames & 0x7F), 32, 32, 0, -1)); gSPDisplayList(POLY_OPA_DISP++, gGanonMasterSwordDL); if ((play->envCtx.unk_BD == 1) || (play->envCtx.unk_BD == 2)) { alpha = (s16)(play->envCtx.unk_D8 * 150.0f) + 50; diff --git a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index b80c39f3b..a6c1620fd 100644 --- a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -2601,8 +2601,8 @@ void BossMo_DrawWater(BossMo* this, PlayState* play) { Matrix_Translate(0.0f, MO_WATER_LEVEL(play), 0.0f, MTXMODE_NEW); gSPSegment(POLY_XLU_DISP++, 0x0D, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (s16)this->waterTex1x, (s16)this->waterTex1y, 32, 32, 1, - (s16)this->waterTex2x, (s16)this->waterTex2y, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (s16)this->waterTex1x, (s16)this->waterTex1y, 32, 32, 1, + (s16)this->waterTex2x, (s16)this->waterTex2y, 32, 32, -1, -1, 0, 1)); gDPPipeSync(POLY_XLU_DISP++); @@ -2631,13 +2631,13 @@ void BossMo_DrawCore(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, sMorphaTent1->work[MO_TENT_VAR_TIMER] * 3, - sMorphaTent1->work[MO_TENT_VAR_TIMER] * 3, 32, 32, 1, - sMorphaTent1->work[MO_TENT_VAR_TIMER] * -3, - sMorphaTent1->work[MO_TENT_VAR_TIMER] * -3, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, sMorphaTent1->work[MO_TENT_VAR_TIMER] * 3, + sMorphaTent1->work[MO_TENT_VAR_TIMER] * 3, 32, 32, 1, + sMorphaTent1->work[MO_TENT_VAR_TIMER] * -3, + sMorphaTent1->work[MO_TENT_VAR_TIMER] * -3, 32, 32, 3, 3, -3, -3)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, sMorphaTent1->work[MO_TENT_VAR_TIMER] * 5, 0, 32, 32, 1, 0, - sMorphaTent1->work[MO_TENT_VAR_TIMER] * -10, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, sMorphaTent1->work[MO_TENT_VAR_TIMER] * 5, 0, 32, 32, 1, 0, + sMorphaTent1->work[MO_TENT_VAR_TIMER] * -10, 32, 32, 5, 0, 0, -10)); Matrix_RotateX(this->work[MO_TENT_MOVE_TIMER] * 0.5f, MTXMODE_APPLY); Matrix_RotateZ(this->work[MO_TENT_MOVE_TIMER] * 0.8f, MTXMODE_APPLY); @@ -2704,8 +2704,9 @@ void BossMo_DrawCore(Actor* thisx, PlayState* play) { gDPSetEnvColor(POLY_XLU_DISP++, 0, 100, 255, (s8)this->fwork[MO_CORE_INTRO_WATER_ALPHA]); gSPSegment(POLY_XLU_DISP++, 0x0D, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (s16)sMorphaTent1->waterTex1x, (s16)sMorphaTent1->waterTex1y, - 32, 32, 1, (s16)sMorphaTent1->waterTex2x, (s16)sMorphaTent1->waterTex2y, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (s16)sMorphaTent1->waterTex1x, + (s16)sMorphaTent1->waterTex1y, 32, 32, 1, (s16)sMorphaTent1->waterTex2x, + (s16)sMorphaTent1->waterTex2y, 32, 32, 0, 0, 0, 0)); sp8C = this->cameraAt.x - this->cameraEye.x; sp88 = this->cameraAt.y - this->cameraEye.y; @@ -2755,8 +2756,9 @@ void BossMo_DrawTent(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, this->work[MO_TENT_BASE_TEX1_X], this->work[MO_TENT_BASE_TEX1_Y], - 32, 32, 1, this->work[MO_TENT_BASE_TEX2_X], this->work[MO_TENT_BASE_TEX2_Y], 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, this->work[MO_TENT_BASE_TEX1_X], + this->work[MO_TENT_BASE_TEX1_Y], 32, 32, 1, this->work[MO_TENT_BASE_TEX2_X], + this->work[MO_TENT_BASE_TEX2_Y], 32, 32, 1, 1, 1, 1)); gDPSetPrimColor(POLY_XLU_DISP++, 0xFF, 0xFF, 200, 255, 255, (s8)((this->baseAlpha * 12.0f) / 10.0f)); gDPSetEnvColor(POLY_XLU_DISP++, 0, 100, 255, (s8)this->baseAlpha); scroll = (s16)(Math_SinS(this->work[MO_TENT_VAR_TIMER] * 0xB00) * 30.0f) + 350; diff --git a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 6e1db9049..7884a1768 100644 --- a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -3195,8 +3195,8 @@ void BossSst_DrawEffect(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); if (this->effectMode == BONGO_ICE) { gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, play->gameplayFrames % 256, 0x20, 0x10, 1, 0, - (play->gameplayFrames * 2) % 256, 0x40, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, play->gameplayFrames % 256, 0x20, 0x10, 1, 0, + (play->gameplayFrames * 2) % 256, 0x40, 0x20, 0, 1, 0, 2)); gDPSetEnvColor(POLY_XLU_DISP++, 0, 50, 100, this->effects[0].alpha); gSPDisplayList(POLY_XLU_DISP++, gBongoIceCrystalDL); @@ -3229,8 +3229,8 @@ void BossSst_DrawEffect(Actor* thisx, PlayState* play) { gDPPipeSync(POLY_XLU_DISP++); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, play->gameplayFrames % 128, 0, 0x20, 0x40, 1, 0, - (play->gameplayFrames * -15) % 256, 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, play->gameplayFrames % 128, 0, 0x20, 0x40, 1, 0, + (play->gameplayFrames * -15) % 256, 0x20, 0x40, 1, 0, 0, -15)); for (i = 0; i < 3; i++, scaleY -= 0.001f) { effect = &this->effects[i]; diff --git a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index 1fee8de96..d03c6ea81 100644 --- a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -3267,8 +3267,8 @@ void func_80941BC0(BossTw* this, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 215, 215, 215, (s16)this->workf[UNK_F11] * this->workf[UNK_F14]); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, (u32)this->workf[UNK_F16] & 0x3F, - (this->work[CS_TIMER_2] * 4) & 0x3F, 0x10, 0x10)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, (u32)this->workf[UNK_F16] & 0x3F, + (this->work[CS_TIMER_2] * 4) & 0x3F, 0x10, 0x10, 0, 0, 5, 4)); Matrix_Push(); Matrix_RotateY(this->workf[UNK_F15], MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); @@ -3276,9 +3276,9 @@ void func_80941BC0(BossTw* this, PlayState* play) { Matrix_Pop(); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); gSPSegment(POLY_XLU_DISP++, 0xD, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, this->work[CS_TIMER_2] & 0x7F, - (this->work[CS_TIMER_2] * 8) & 0xFF, 0x20, 0x40, 1, - (-this->work[CS_TIMER_2] * 2) & 0x3F, 0, 0x10, 0x10)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, this->work[CS_TIMER_2] & 0x7F, + (this->work[CS_TIMER_2] * 8) & 0xFF, 0x20, 0x40, 1, + (-this->work[CS_TIMER_2] * 2) & 0x3F, 0, 0x10, 0x10, 1, 8, 2, 0)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, (s16)this->workf[UNK_F9]); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128); gDPSetRenderMode(POLY_XLU_DISP++, @@ -3303,8 +3303,8 @@ void func_80942180(BossTw* this, PlayState* play) { Matrix_Translate(this->groundBlastPos2.x, this->groundBlastPos2.y, this->groundBlastPos2.z, MTXMODE_NEW); Matrix_Scale(this->workf[KM_GD_CRTR_SCL], this->workf[KM_GD_CRTR_SCL], this->workf[KM_GD_CRTR_SCL], MTXMODE_APPLY); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (-this->work[CS_TIMER_1]) & 0x7F, 0, 0x20, 0x20, 1, - (this->work[CS_TIMER_1] * 2) & 0x7F, 0, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (-this->work[CS_TIMER_1]) & 0x7F, 0, 0x20, 0x20, 1, + (this->work[CS_TIMER_1] * 2) & 0x7F, 0, 0x20, 0x20, -1, 0, 2, 0)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 100, 40, 00, (s16)this->workf[KM_GRND_CRTR_A]); gDPPipeSync(POLY_XLU_DISP++); @@ -3314,17 +3314,18 @@ void func_80942180(BossTw* this, PlayState* play) { Matrix_ReplaceRotation(&play->billboardMtxF); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, this->work[CS_TIMER_1] & 0x7F, - (-this->work[CS_TIMER_1] * 6) & 0xFF, 0x20, 0x40, 1, - (this->work[CS_TIMER_1] * 2) & 0x7F, (-this->work[CS_TIMER_1] * 6) & 0xFF, 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, this->work[CS_TIMER_1] & 0x7F, + (-this->work[CS_TIMER_1] * 6) & 0xFF, 0x20, 0x40, 1, + (this->work[CS_TIMER_1] * 2) & 0x7F, (-this->work[CS_TIMER_1] * 6) & 0xFF, 0x20, 0x40, + 1, -6, 2, -6)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 80, 0, 0, (s16)this->workf[KM_GD_SMOKE_A]); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, 100); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaFireSmokeDL)); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (-this->work[CS_TIMER_1] * 3) & 0x7F, 0, 0x20, 0x20, 1, 0, - (-this->work[CS_TIMER_1] * 10) & 0xFF, 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (-this->work[CS_TIMER_1] * 3) & 0x7F, 0, 0x20, 0x20, 1, 0, + (-this->work[CS_TIMER_1] * 10) & 0xFF, 0x20, 0x40, -3, 0, 0, -10)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 100, 50, 0, (s16)(this->workf[KM_GD_FLM_A] * 0.7f)); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 200, 235, 240, 128); @@ -3344,8 +3345,8 @@ void func_809426F0(BossTw* this, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (u8)(-this->work[CS_TIMER_2] * 15), 0x20, 0x40, 1, 0, 0, 0x40, - 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (u8)(-this->work[CS_TIMER_2] * 15), 0x20, 0x40, 1, 0, 0, + 0x40, 0x40, 0, -15, 0, 0)); Matrix_Push(); Matrix_Translate(0.0f, 0.0f, 5000.0f, MTXMODE_APPLY); Matrix_Scale(this->spawnPortalScale / 2000.0f, this->spawnPortalScale / 2000.0f, this->spawnPortalScale / 2000.0f, @@ -3379,8 +3380,9 @@ void func_809426F0(BossTw* this, PlayState* play) { Matrix_RotateZ(((i * M_PI) * 2.0f * 0.125f) + this->flameRotation, MTXMODE_APPLY); Matrix_Translate(0.0f, this->spawnPortalScale * 1.5f, 0.0f, MTXMODE_APPLY); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, ((this->work[CS_TIMER_2] * 3) + (i * 10)) & 0x7F, - (u8)((-this->work[CS_TIMER_2] * 15) + (i * 50)), 0x20, 0x40, 1, 0, 0, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, ((this->work[CS_TIMER_2] * 3) + (i * 10)) & 0x7F, + (u8)((-this->work[CS_TIMER_2] * 15) + (i * 50)), 0x20, 0x40, 1, 0, 0, 0x20, 0x20, + 3, -15, 0, 0)); Matrix_Scale(0.4f, 0.4f, 0.4f, MTXMODE_APPLY); Matrix_ReplaceRotation(&play->billboardMtxF); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); @@ -3402,7 +3404,7 @@ void func_80942C70(Actor* thisx, PlayState* play) { if (this->beamDist != 0.0f) { Matrix_Push(); gSPSegment(POLY_XLU_DISP++, 0xC, - Gfx_TexScroll(play->state.gfxCtx, 0, (u8)(this->work[CS_TIMER_1] * -0xF), 0x20, 0x40)); + Gfx_TexScrollEx(play->state.gfxCtx, 0, (u8)(this->work[CS_TIMER_1] * -0xF), 0x20, 0x40, 0, -0xF)); alpha = this->beamScale * 100.0f * 255.0f; if (this->actor.params == 1) { @@ -3480,21 +3482,24 @@ void BossTw_Draw(Actor* thisx, PlayState* play2) { gSPSegment(POLY_OPA_DISP++, 10, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeTexIdx])); gSPSegment(POLY_XLU_DISP++, 10, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeTexIdx])); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (s16)this->workf[OUTR_CRWN_TX_X1] & 0x7F, - (s16)this->workf[OUTR_CRWN_TX_Y1] & 0x7F, 0x20, 0x20, 1, - (s16)this->workf[OUTR_CRWN_TX_X2] & 0x7F, (s16)this->workf[OUTR_CRWN_TX_Y2] & 0xFF, - 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (s16)this->workf[OUTR_CRWN_TX_X1] & 0x7F, + (s16)this->workf[OUTR_CRWN_TX_Y1] & 0x7F, 0x20, 0x20, 1, + (s16)this->workf[OUTR_CRWN_TX_X2] & 0x7F, + (s16)this->workf[OUTR_CRWN_TX_Y2] & 0xFF, 0x20, 0x40, 0, 0, + this->actor.params == 0 ? 1 : 0, this->actor.params == 0 ? -7 : -15)); if (this->actor.params == TW_KOTAKE) { gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TexScroll(play->state.gfxCtx, (s16)this->workf[INNR_CRWN_TX_X1] & 0x7F, - (s16)this->workf[INNR_CRWN_TX_Y1] & 0xFF, 0x20, 0x40)); + Gfx_TexScrollEx(play->state.gfxCtx, (s16)this->workf[INNR_CRWN_TX_X1] & 0x7F, + (s16)this->workf[INNR_CRWN_TX_Y1] & 0xFF, 0x20, 0x40, 0, + this->actor.params == 0 ? 1 : 0)); } else { gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (s16)this->workf[INNR_CRWN_TX_X1] & 0x7F, - (s16)this->workf[INNR_CRWN_TX_Y1] & 0x7F, 0x20, 0x20, 1, - (s16)this->workf[INNR_CRWN_TX_X2] & 0x7F, - (s16)this->workf[INNR_CRWN_TX_Y2] & 0xFF, 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (s16)this->workf[INNR_CRWN_TX_X1] & 0x7F, + (s16)this->workf[INNR_CRWN_TX_Y1] & 0x7F, 0x20, 0x20, 1, + (s16)this->workf[INNR_CRWN_TX_X2] & 0x7F, + (s16)this->workf[INNR_CRWN_TX_Y2] & 0xFF, 0x20, 0x40, 0, 0, 0, + this->actor.params == 0 ? 0 : -10)); } Gfx_SetupDL_25Opa(play->state.gfxCtx); @@ -3562,7 +3567,7 @@ s32 BossTw_TwinrovaOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, switch (limbIndex) { case 21: gSPSegment(POLY_OPA_DISP++, 0xC, - Gfx_TexScroll(play->state.gfxCtx, 0, (s16)(f32)this->work[CS_TIMER_1], 8, 8)); + Gfx_TexScrollEx(play->state.gfxCtx, 0, (s16)(f32)this->work[CS_TIMER_1], 8, 8, 0, 1)); gSPSegment(POLY_OPA_DISP++, 8, SEGMENTED_TO_VIRTUAL(D_8094A9B0[this->eyeTexIdx])); gSPSegment(POLY_OPA_DISP++, 9, SEGMENTED_TO_VIRTUAL(D_8094A9B0[this->leftEyeTexIdx])); gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, this->work[UNK_S8]); @@ -3571,27 +3576,28 @@ s32 BossTw_TwinrovaOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, case 41: *dList = NULL; gSPSegment(POLY_XLU_DISP++, 0xA, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, 0, -this->work[CS_TIMER_1] * 0xF, - 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, 0, -this->work[CS_TIMER_1] * 0xF, + 0x20, 0x40, 0, 0, 0, -0xF)); break; case 18: case 42: *dList = NULL; gSPSegment(POLY_XLU_DISP++, 0xB, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, 0, -this->work[CS_TIMER_1] * 0xA, - 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, 0, -this->work[CS_TIMER_1] * 0xA, + 0x20, 0x40, 0, 0, 0, -0xA)); break; case 16: case 32: *dList = NULL; gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, this->work[CS_TIMER_1], - -this->work[CS_TIMER_1] * 7, 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, this->work[CS_TIMER_1], + -this->work[CS_TIMER_1] * 7, 0x20, 0x40, 0, 0, 1, -7)); break; case 15: case 31: *dList = NULL; - gSPSegment(POLY_XLU_DISP++, 9, Gfx_TexScroll(play->state.gfxCtx, 0, this->work[CS_TIMER_1], 0x20, 0x40)); + gSPSegment(POLY_XLU_DISP++, 9, + Gfx_TexScrollEx(play->state.gfxCtx, 0, this->work[CS_TIMER_1], 0x20, 0x40, 0, 1)); break; case 19: if (this->unk_5F8 != 0) { @@ -3702,16 +3708,18 @@ void BossTw_ShieldChargeDraw(BossTw* this, PlayState* play) { gDPSetEnvColor(POLY_XLU_DISP++, 255, 245, 255, temp_a0); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaMirrorShieldFireChargeSidesDL)); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (this->work[CS_TIMER_1] * 2) * temp_t0, 0, 0x20, - 0x20, 1, (-this->work[CS_TIMER_1] * 2) * temp_t0, 0, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (this->work[CS_TIMER_1] * 2) * temp_t0, 0, 0x20, + 0x20, 1, (-this->work[CS_TIMER_1] * 2) * temp_t0, 0, 0x20, 0x20, 0, + 2 * temp_t0, -2 * temp_t0, 0)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 100, 20, 0, (s16)D_8094C854); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaMirrorShieldFireChargeCenterDL)); } else { gDPSetEnvColor(POLY_XLU_DISP++, 225, 255, 255, temp_a0); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaMirrorShieldIceChargeSidesDL)); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (-this->work[CS_TIMER_1] * 5) * temp_t0, 0x20, - 0x40, 1, (this->work[CS_TIMER_1] * 4) * temp_t0, 0, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (-this->work[CS_TIMER_1] * 5) * temp_t0, 0x20, + 0x40, 1, (this->work[CS_TIMER_1] * 4) * temp_t0, 0, 0x20, 0x200, 0, + -5 * temp_t0, 4 * temp_t0, 0)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 175, 205, 195, (s16)D_8094C854); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaMirrorShieldIceChargeCenterDL)); } @@ -3745,8 +3753,8 @@ void BossTw_ShieldChargeDraw(BossTw* this, PlayState* play) { } gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, this->work[CS_TIMER_1] * D_8094C872, 0x20, 0x40, 1, 0, - this->work[CS_TIMER_1] * D_8094C872, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, this->work[CS_TIMER_1] * D_8094C872, 0x20, 0x40, 1, 0, + this->work[CS_TIMER_1] * D_8094C872, 0x20, 0x20, 0, D_8094C872, 0, D_8094C872)); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaShieldAbsorbAndReflectEffectDL)); } @@ -3761,9 +3769,9 @@ void BossTw_SpawnPortalDraw(BossTw* this, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx); - gSPSegment( - POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, -this->work[CS_TIMER_1] * 15, 0x20, 0x40, 1, 0, 0, 0x40, 0x40)); + gSPSegment(POLY_XLU_DISP++, 8, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, -this->work[CS_TIMER_1] * 15, 0x20, 0x40, 1, 0, 0, 0x40, + 0x40, 0, -15, 0, 0)); Matrix_Push(); @@ -3812,16 +3820,16 @@ void func_80944C50(BossTw* this, PlayState* play) { Matrix_Pop(); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, -sKoumePtr->work[CS_TIMER_1] * 2, 0, 0x20, 0x20, 1, - -sKoumePtr->work[CS_TIMER_1] * 2, 0, 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, -sKoumePtr->work[CS_TIMER_1] * 2, 0, 0x20, 0x20, 1, + -sKoumePtr->work[CS_TIMER_1] * 2, 0, 0x20, 0x40, -2, 0, -2, 0)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s16)this->workf[UNK_F18] / 2); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaLightRaysDL)); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, -sKoumePtr->work[CS_TIMER_1] * 5, - -sKoumePtr->work[CS_TIMER_1] * 2, 0x20, 0x40, 1, 0, -sKoumePtr->work[CS_TIMER_1] * 2, - 0x10, 0x10)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, -sKoumePtr->work[CS_TIMER_1] * 5, + -sKoumePtr->work[CS_TIMER_1] * 2, 0x20, 0x40, 1, 0, -sKoumePtr->work[CS_TIMER_1] * 2, + 0x10, 0x10, -5, -2, 0, -2)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s16)(this->workf[UNK_F18] * 0.3f)); scale = this->workf[UNK_F18] / 150.0f; @@ -4416,9 +4424,9 @@ void BossTw_BlastDraw(Actor* thisx, PlayState* play2) { FrameInterpolation_RecordOpenChild("Twinrova Fire Blast", i); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, ((this->work[CS_TIMER_1] * 3) + (i * 10)) & 0x7F, - ((-this->work[CS_TIMER_1] * 15) + (i * 50)) & 0xFF, 0x20, 0x40, 1, 0, 0, - 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, ((this->work[CS_TIMER_1] * 3) + (i * 10)) & 0x7F, + ((-this->work[CS_TIMER_1] * 15) + (i * 50)) & 0xFF, 0x20, 0x40, 1, 0, 0, + 0x20, 0x20, 3, -15, 0, 0)); tailIdx = ((this->work[TAIL_IDX] - i) + 30) % 30; Matrix_Translate(this->blastTailPos[tailIdx].x, this->blastTailPos[tailIdx].y, this->blastTailPos[tailIdx].z, MTXMODE_NEW); @@ -4444,9 +4452,9 @@ void BossTw_BlastDraw(Actor* thisx, PlayState* play2) { FrameInterpolation_RecordOpenChild("Twinrova Ice Blast", i); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, ((this->work[CS_TIMER_1] * 3) + (i * 0xA)) & 0x7F, - (u8)((-this->work[CS_TIMER_1] * 0xF) + (i * 50)), 0x20, 0x40, 1, 0, 0, 0x20, - 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, ((this->work[CS_TIMER_1] * 3) + (i * 0xA)) & 0x7F, + (u8)((-this->work[CS_TIMER_1] * 0xF) + (i * 50)), 0x20, 0x40, 1, 0, 0, + 0x20, 0x20, 3, -0xF, 0, 0)); tailIdx = ((this->work[TAIL_IDX] - i) + 30) % 30; Matrix_Translate(this->blastTailPos[tailIdx].x, this->blastTailPos[tailIdx].y, this->blastTailPos[tailIdx].z, MTXMODE_NEW); @@ -4488,9 +4496,9 @@ void BossTw_DrawDeathBall(Actor* thisx, PlayState* play2) { FrameInterpolation_RecordOpenChild("Twinrova Death Ball 0", i); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (((this->work[CS_TIMER_1] * 3) + (i * 0xA))) & 0x7F, - (u8)((-this->work[CS_TIMER_1] * 0xF) + (i * 50)), 0x20, 0x40, 1, 0, 0, 0x20, - 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (((this->work[CS_TIMER_1] * 3) + (i * 0xA))) & 0x7F, + (u8)((-this->work[CS_TIMER_1] * 0xF) + (i * 50)), 0x20, 0x40, 1, 0, 0, 0x20, + 0x20, 3, -0xF, 0, 0)); tailIdx = ((this->work[TAIL_IDX] - i) + 30) % 30; Matrix_Translate(this->blastTailPos[tailIdx].x, this->blastTailPos[tailIdx].y, this->blastTailPos[tailIdx].z, MTXMODE_NEW); @@ -4511,9 +4519,9 @@ void BossTw_DrawDeathBall(Actor* thisx, PlayState* play2) { FrameInterpolation_RecordOpenChild("Twinrova Death Ball 1", i); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (((this->work[CS_TIMER_1] * 3) + (i * 0xA))) & 0x7F, - (u8)((-this->work[CS_TIMER_1] * 0xF) + (i * 50)), 0x20, 0x40, 1, 0, 0, 0x20, - 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (((this->work[CS_TIMER_1] * 3) + (i * 0xA))) & 0x7F, + (u8)((-this->work[CS_TIMER_1] * 0xF) + (i * 50)), 0x20, 0x40, 1, 0, 0, 0x20, + 0x20, 3, -0xF, 0, 0)); tailIdx = ((this->work[TAIL_IDX] - i) + 30) % 30; Matrix_Translate(this->blastTailPos[tailIdx].x, this->blastTailPos[tailIdx].y, this->blastTailPos[tailIdx].z, MTXMODE_NEW); @@ -4924,8 +4932,9 @@ void BossTw_DrawEffects(PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, currentEffect->alpha); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (currentEffect->frame * 3) & 0x7F, - (currentEffect->frame * 15) & 0xFF, 0x20, 0x40, 1, 0, 0, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (currentEffect->frame * 3) & 0x7F, + (currentEffect->frame * 15) & 0xFF, 0x20, 0x40, 1, 0, 0, 0x20, 0x20, 3, 15, 0, + 0)); Matrix_Translate(currentEffect->pos.x, currentEffect->pos.y, currentEffect->pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); Matrix_Scale(currentEffect->workf[EFF_SCALE], currentEffect->workf[EFF_SCALE], 1.0f, MTXMODE_APPLY); @@ -4952,8 +4961,9 @@ void BossTw_DrawEffects(PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 200, 20, 0, currentEffect->alpha); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (currentEffect->frame * 3) & 0x7F, - (currentEffect->frame * 15) & 0xFF, 0x20, 0x40, 1, 0, 0, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (currentEffect->frame * 3) & 0x7F, + (currentEffect->frame * 15) & 0xFF, 0x20, 0x40, 1, 0, 0, 0x20, 0x20, 3, 15, 0, + 0)); Matrix_Translate(currentEffect->pos.x, currentEffect->pos.y, currentEffect->pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); Matrix_Scale(currentEffect->workf[EFF_SCALE], currentEffect->workf[EFF_SCALE], 1.0f, MTXMODE_APPLY); @@ -4978,9 +4988,9 @@ void BossTw_DrawEffects(PlayState* play) { } gSPSegment(POLY_XLU_DISP++, 0xD, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, currentEffect->frame & 0x7F, - (currentEffect->frame * 8) & 0xFF, 0x20, 0x40, 1, - (currentEffect->frame * -2) & 0x7F, 0, 0x10, 0x10)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, currentEffect->frame & 0x7F, + (currentEffect->frame * 8) & 0xFF, 0x20, 0x40, 1, + (currentEffect->frame * -2) & 0x7F, 0, 0x10, 0x10, 1, 8, -2, 0)); if (currentEffect->work[EFF_ARGS] == 1) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 65, 0, currentEffect->alpha); @@ -5027,8 +5037,9 @@ void BossTw_DrawEffects(PlayState* play) { if (sp18F == 0) { gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gTwinrovaIceSurroundingPlayerMaterialDL)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, 255); - gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, 0, 0x20, 0x20)); + gSPSegment( + POLY_XLU_DISP++, 8, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, 0, 0x20, 0x20, 0, 0, 0, 0)); sp18F++; BossTw_InitRand(1, 0x71AC, 0x263A); } @@ -5080,8 +5091,9 @@ void BossTw_DrawEffects(PlayState* play) { } gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (currentEffect->frame * 3) & 0x7F, - (-currentEffect->frame * 15) & 0xFF, 0x20, 0x40, 1, 0, 0, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (currentEffect->frame * 3) & 0x7F, + (-currentEffect->frame * 15) & 0xFF, 0x20, 0x40, 1, 0, 0, 0x20, 0x20, 3, -15, + 0, 0)); Matrix_Translate(currentEffect->pos.x, currentEffect->pos.y, currentEffect->pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); Matrix_Scale(currentEffect->workf[EFF_SCALE], currentEffect->workf[EFF_SCALE], 1.0f, MTXMODE_APPLY); diff --git a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 3e8f05776..91083a757 100644 --- a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -2897,9 +2897,9 @@ s32 BossVa_BodyOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec if (limbIndex == 20) { gDPPipeSync(POLY_OPA_DISP++); - gSPSegment( - POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 8, 16, 1, 0, (play->gameplayFrames * -2) % 64, 16, 16)); + gSPSegment(POLY_OPA_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 8, 16, 1, 0, (play->gameplayFrames * -2) % 64, 16, + 16, 0, 0, 0, -2)); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, this->bodyGlow); Matrix_RotateX(-M_PI / 2, MTXMODE_APPLY); } else if ((limbIndex >= 10) && (limbIndex < 20)) { @@ -2948,8 +2948,8 @@ void BossVa_BodyPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* Matrix_MultVec3f(&sp78, &this->effectPos[limbIndex - 10]); } else if (limbIndex == 25) { gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (play->gameplayFrames * 10) % 128, 16, 32, 1, 0, - (play->gameplayFrames * 5) % 128, 16, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (play->gameplayFrames * 10) % 128, 16, 32, 1, 0, + (play->gameplayFrames * 5) % 128, 16, 32, 0, 10, 0, 5)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gBarinadeDL_008D70); } else if ((*dList != NULL) && (limbIndex >= 29) && (limbIndex < 56)) { @@ -3173,8 +3173,8 @@ void BossVa_BariPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* if (limbIndex == 2) { gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (play->gameplayFrames * 10) % 32, 16, 32, 1, 0, - (play->gameplayFrames * -5) % 32, 16, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (play->gameplayFrames * 10) % 32, 16, 32, 1, 0, + (play->gameplayFrames * -5) % 32, 16, 32, 0, 10, 0, -5)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gBarinadeDL_000FA0); } else if ((limbIndex == 3) || (limbIndex == 4)) { @@ -3221,11 +3221,11 @@ void BossVa_Draw(Actor* thisx, PlayState* play) { if (!this->isDead) { gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 8, 16, 1, 0, (play->gameplayFrames * -10) % 16, - 16, 16)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 8, 16, 1, 0, + (play->gameplayFrames * -10) % 16, 16, 16, 0, 0, 0, -10)); gSPSegment(POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (play->gameplayFrames * -10) % 32, 16, 0x20, 1, 0, - (play->gameplayFrames * -5) % 32, 16, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (play->gameplayFrames * -10) % 32, 16, 0x20, 1, + 0, (play->gameplayFrames * -5) % 32, 16, 32, 0, -10, 0, -5)); SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossVa_BodyOverrideLimbDraw, BossVa_BodyPostLimbDraw, this); } diff --git a/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c index 16ce65299..d91f3d43e 100644 --- a/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c +++ b/soh/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c @@ -570,8 +570,8 @@ void func_80967FFC(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); Matrix_RotateX(-M_PI / 2, MTXMODE_APPLY); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0x7FFF - ((timer1 * 8) & 0x7FFF), 16, 512, 1, 0, - 0x7FFF - ((timer1 * 8) & 0x7FFF), 16, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0x7FFF - ((timer1 * 8) & 0x7FFF), 16, 512, 1, 0, + 0x7FFF - ((timer1 * 8) & 0x7FFF), 16, 32, 0, -8, 0, -8)); { s32 i; @@ -639,8 +639,8 @@ void func_80968298(Actor* thisx, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 210, 210, 210, 255); gDPSetEnvColor(POLY_XLU_DISP++, 100, 100, 100, 255); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (0xFFF - (timer1 * 6)) & 0xFFF, (timer1 * 12) & 0xFFF, 128, 64, - 1, (0xFFF - (timer1 * 6)) & 0xFFF, (timer1 * 12) & 0xFFF, 64, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (0xFFF - (timer1 * 6)) & 0xFFF, (timer1 * 12) & 0xFFF, 128, 64, + 1, (0xFFF - (timer1 * 6)) & 0xFFF, (timer1 * 12) & 0xFFF, 64, 32, -6, 12, -6, 12)); gSPDisplayList(POLY_XLU_DISP++, object_demo_6k_DL_0039D0); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -737,8 +737,8 @@ void func_80968B70(Actor* thisx, PlayState* play) { Matrix_RotateX(M_PI / 2, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0xFF - ((timer2 * 2) & 0xFF), 0, 32, 32, 1, - 0xFF - ((timer2 * 2) & 0xFF), (timer2 * 15) & 0x3FF, 16, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0xFF - ((timer2 * 2) & 0xFF), 0, 32, 32, 1, + 0xFF - ((timer2 * 2) & 0xFF), (timer2 * 15) & 0x3FF, 16, 64, -2, 0, -2, 15)); if (this->timer2 < 40) { primColor[0] = primColor[2] = 100 - (this->timer2 * 2.5f); diff --git a/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index ac5120d5b..e4377972d 100644 --- a/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -1739,29 +1739,29 @@ void DemoEffect_DrawJewel(Actor* thisx, PlayState* play2) { switch (this->jewel.type) { case DEMO_EFFECT_JEWEL_KOKIRI: gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (frames * 4) % 256, - (256 - ((frames * 2) % 256)) - 1, 64, 64, 1, (frames * 2) % 256, - (256 - (frames % 256)) - 1, 16, 16)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (frames * 4) % 256, + (256 - ((frames * 2) % 256)) - 1, 64, 64, 1, (frames * 2) % 256, + (256 - (frames % 256)) - 1, 16, 16, 4, -2, 2, -1)); break; case DEMO_EFFECT_JEWEL_GORON: gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (frames * 4) % 128, - (256 - ((frames * 2) % 256)) - 1, 32, 64, 1, (frames * 2) % 256, - (256 - (frames % 256)) - 1, 16, 8)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (frames * 4) % 128, + (256 - ((frames * 2) % 256)) - 1, 32, 64, 1, (frames * 2) % 256, + (256 - (frames % 256)) - 1, 16, 8, 4, -2, 2, -1)); break; case DEMO_EFFECT_JEWEL_ZORA: gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (frames * 4) % 256, - (256 - ((frames * 2) % 256)) - 1, 32, 32, 1, (frames * 2) % 256, - (256 - (frames % 256)) - 1, 16, 16)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (frames * 4) % 256, + (256 - ((frames * 2) % 256)) - 1, 32, 32, 1, (frames * 2) % 256, + (256 - (frames % 256)) - 1, 16, 16, 4, -2, 2, -1)); break; } if (!frames) {} - gSPSegment(POLY_OPA_DISP++, 8, Gfx_TexScroll(play->state.gfxCtx, (u8)frames, (u8)frames, 16, 16)); + gSPSegment(POLY_OPA_DISP++, 8, Gfx_TexScrollEx(play->state.gfxCtx, (u8)frames, (u8)frames, 16, 16, 1, 1)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Gfx_SetupDL_25Xlu(play->state.gfxCtx); @@ -1801,8 +1801,8 @@ void DemoEffect_DrawCrystalLight(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (frames * 2) % 512, 512 - (frames % 512) - 1, 128, 128, 1, - 512 - ((frames * 2) % 512) - 1, 0, 64, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (frames * 2) % 512, 512 - (frames % 512) - 1, 128, 128, 1, + 512 - ((frames * 2) % 512) - 1, 0, 64, 64, 2, -1, -2, 0)); Matrix_Push(); Matrix_RotateY(0.0f, MTXMODE_APPLY); Matrix_RotateX((11.0 * M_PI) / 180.0, MTXMODE_APPLY); @@ -1841,7 +1841,8 @@ void DemoEffect_DrawFireBall(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(POLY_XLU_DISP++, play->billboardMtx, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 128 - ((frames * 20) % 128) - 1, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 128 - ((frames * 20) % 128) - 1, 32, 32, 0, + 0, 0, -20)); gSPDisplayList(POLY_XLU_DISP++, gCreationFireBallDL); CLOSE_DISPS(play->state.gfxCtx); } @@ -1871,11 +1872,11 @@ void DemoEffect_DrawGodLgt(Actor* thisx, PlayState* play) { } gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (frames * 4) % 512, 0, 128, 64, 1, (frames * 2) % 256, - 512 - ((frames * 70) % 512) - 1, 64, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (frames * 4) % 512, 0, 128, 64, 1, (frames * 2) % 256, + 512 - ((frames * 70) % 512) - 1, 64, 32, 4, 0, 2, -70)); gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 16, 96, 1, (frames * 10) % 256, - 256 - ((frames * 30) % 512) - 1, 8, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 16, 96, 1, (frames * 10) % 256, + 256 - ((frames * 30) % 512) - 1, 8, 32, 0, 0, 10, -30)); gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, this->primXluColor[0], this->primXluColor[1], this->primXluColor[2], 255); gDPSetEnvColor(POLY_XLU_DISP++, this->envXluColor[0], this->envXluColor[1], this->envXluColor[2], 255); @@ -1975,8 +1976,8 @@ void DemoEffect_DrawLgtShower(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (frames * 5) % 1024, 0, 256, 64, 1, (frames * 10) % 128, - 512 - ((frames * 50) % 512), 32, 16)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (frames * 5) % 1024, 0, 256, 64, 1, (frames * 10) % 128, + 512 - ((frames * 50) % 512), 32, 16, 5, 0, 10, -50)); gSPDisplayList(POLY_XLU_DISP++, gEnliveningLightDL); CLOSE_DISPS(play->state.gfxCtx); } @@ -1996,8 +1997,8 @@ void DemoEffect_DrawLightRing(Actor* thisx, PlayState* play2) { gDPSetEnvColor(POLY_XLU_DISP++, 0, 100, 255, 255); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (frames * 5) % 64, 512 - ((frames * 2) % 512) - 1, 16, 128, 1, 0, - 0, 8, 1024)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (frames * 5) % 64, 512 - ((frames * 2) % 512) - 1, 16, 128, 1, + 0, 0, 8, 1024, 5, -2, 0, 0)); gSPDisplayList(POLY_XLU_DISP++, gGoldenGoddessLightRingDL); CLOSE_DISPS(play->state.gfxCtx); @@ -2022,8 +2023,8 @@ void DemoEffect_DrawTriforceSpot(Actor* thisx, PlayState* play) { Matrix_Scale(1.0f, 2.4f, 1.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 256 - ((frames * 4) % 256) - 1, 64, 64, 1, 0, - 256 - ((frames * 2) % 256) - 1, 64, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 256 - ((frames * 4) % 256) - 1, 64, 64, 1, 0, + 256 - ((frames * 2) % 256) - 1, 64, 32, 0, -4, 0, -2)); vertices[86].n.a = vertices[87].n.a = vertices[88].n.a = vertices[89].n.a = vertices[92].n.a = vertices[93].n.a = vertices[94].n.a = vertices[95].n.a = (s8)this->triforceSpot.lightColumnOpacity; gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, 180, 255, 255, this->triforceSpot.lightColumnOpacity); @@ -2043,7 +2044,8 @@ void DemoEffect_DrawTriforceSpot(Actor* thisx, PlayState* play) { Matrix_RotateY(this->triforceSpot.rotation * (M_PI / 0x8000), MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(POLY_XLU_DISP++, 8, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 16, 1, 0, 0, 16, 8)); + gSPSegment(POLY_XLU_DISP++, 8, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 16, 1, 0, 0, 16, 8, 0, 0, 0, 0)); gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, 255, 255, 160, this->triforceSpot.triforceSpotOpacity); gDPSetEnvColor(POLY_XLU_DISP++, 170, 140, 0, 255); gSPDisplayList(POLY_XLU_DISP++, gTriforceDL); @@ -2054,7 +2056,8 @@ void DemoEffect_DrawTriforceSpot(Actor* thisx, PlayState* play) { Matrix_RotateY(this->triforceSpot.rotation * (M_PI / 0x8000), MTXMODE_APPLY); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPSegment(POLY_OPA_DISP++, 8, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 16, 1, 0, 0, 16, 8)); + gSPSegment(POLY_OPA_DISP++, 8, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 16, 1, 0, 0, 16, 8, 0, 0, 0, 0)); gDPSetPrimColor(POLY_OPA_DISP++, 128, 128, 255, 255, 160, 255); gDPSetEnvColor(POLY_OPA_DISP++, 170, 140, 0, 255); gSPDisplayList(POLY_OPA_DISP++, gTriforceDL); @@ -2154,8 +2157,8 @@ s32 DemoEffect_DrawTimewarpLimbs(PlayState* play, SkelAnimeCurve* skelCuve, s32 gDPSetPrimColor(POLY_XLU_DISP++, 0, 128, 170, 255, 255, 255); gDPSetEnvColor(POLY_XLU_DISP++, this->envXluColor[0], this->envXluColor[1], this->envXluColor[2], 255); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (frames * 6) % 1024, 256 - ((frames * 16) % 256) - 1, 256, 64, 1, - (frames * 4) % 512, 128 - ((frames * 12) % 128) - 1, 128, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (frames * 6) % 1024, 256 - ((frames * 16) % 256) - 1, 256, 64, + 1, (frames * 4) % 512, 128 - ((frames * 12) % 128) - 1, 128, 32, 6, -16, 4, -12)); CLOSE_DISPS(play->state.gfxCtx); if (limbIndex == 0) { diff --git a/soh/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c b/soh/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c index 063db6844..ed272daa5 100644 --- a/soh/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c +++ b/soh/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c @@ -205,9 +205,9 @@ void DemoExt_DrawVortex(Actor* thisx, PlayState* play) { gDPSetEnvColor(POLY_XLU_DISP++, kREG(29) + 90, kREG(30) + 50, kREG(31) + 95, this->envAlpha); curScroll = this->curScroll; - gSPSegment( - POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(gfxCtx, 0, curScroll[0], curScroll[1], 0x40, 0x40, 1, curScroll[2], curScroll[3], 0x40, 0x40)); + gSPSegment(POLY_XLU_DISP++, 0x08, + Gfx_TwoTexScrollEx(gfxCtx, 0, curScroll[0], curScroll[1], 0x40, 0x40, 1, curScroll[2], curScroll[3], + 0x40, 0x40, 25, 40, 5, 30)); gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gPhantomWarpDL); diff --git a/soh/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c b/soh/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c index bac92747f..6fcb2e938 100644 --- a/soh/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c +++ b/soh/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c @@ -669,18 +669,20 @@ void DemoGt_Draw1(DemoGt* this, PlayState* play) { Gfx_SetupDL_25Opa(gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScrollEnvColor(gfxCtx, 0, 0, unk198[0], 0x20, 0x40, 1, 0, unk198[1], 0x20, 0x40, unk178[0], - unk178[1], unk178[2], 0x80)); + Gfx_TwoTexScrollEnvColorEx(gfxCtx, 0, 0, unk198[0], 0x20, 0x40, 1, 0, unk198[1], 0x20, 0x40, unk178[0], + unk178[1], unk178[2], 0x80, 0, unk198[0] < 0 ? -1 : 1, 0, + unk198[1] < 0 ? -1 : 1)); gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScrollEnvColor(gfxCtx, 0, 0, unk198[0], 0x20, 0x40, 1, 0, unk198[1], 0x20, 0x40, unk188[0], - unk188[1], unk188[2], 0x80)); + Gfx_TwoTexScrollEnvColorEx(gfxCtx, 0, 0, unk198[0], 0x20, 0x40, 1, 0, unk198[1], 0x20, 0x40, unk188[0], + unk188[1], unk188[2], 0x80, 0, unk198[0] < 0 ? -1 : 1, 0, + unk198[1] < 0 ? -1 : 1)); gSPMatrix(POLY_OPA_DISP++, spB4, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, gTowerCollapseCsExteriorStructureDL); Gfx_SetupDL_25Xlu(gfxCtx); gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); - gSPSegment( - POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(gfxCtx, 0, 0, gameplayFrames * 0x14, 0x10, 0x200, 1, 0, gameplayFrames * 0x1E, 0x10, 0x200)); + gSPSegment(POLY_XLU_DISP++, 0x09, + Gfx_TwoTexScrollEx(gfxCtx, 0, 0, gameplayFrames * 0x14, 0x10, 0x200, 1, 0, gameplayFrames * 0x1E, 0x10, + 0x200, 0, 0x14, 0, 0x1E)); gSPMatrix(POLY_XLU_DISP++, spB4, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gTowerCollapseCsFlameSmokeDL); @@ -855,8 +857,9 @@ void DemoGt_Draw2(DemoGt* this, PlayState* play) { unk198 = this->unk_198; unk178 = this->unk_178; gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScrollEnvColor(gfxCtx, 0, 0, unk198[0], 0x20, 0x40, 1, 0, unk198[1], 0x20, 0x40, unk178[0], - unk178[1], unk178[2], 128)); + Gfx_TwoTexScrollEnvColorEx(gfxCtx, 0, 0, unk198[0], 0x20, 0x40, 1, 0, unk198[1], 0x20, 0x40, unk178[0], + unk178[1], unk178[2], 128, 0, unk198[0] < 0 ? -1 : 1, 0, + unk198[1] < 0 ? -1 : 1)); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(gfxCtx), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, gTowerCollapseCsCollapsedStructureInnerDL); gSPPopMatrix(POLY_OPA_DISP++, G_MTX_MODELVIEW); diff --git a/soh/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/soh/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c index d4684e9da..67ea304bc 100644 --- a/soh/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c +++ b/soh/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c @@ -720,7 +720,8 @@ void DemoKankyo_DrawLightPlane(Actor* thisx, PlayState* play) { if (play->csCtx.state == CS_STATE_IDLE || gSaveContext.sceneSetupIndex >= 4) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); - gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, play->state.frames & 0x7F, 64, 32)); + gSPSegment(POLY_XLU_DISP++, 0x08, + Gfx_TexScrollEx(play->state.gfxCtx, 0, play->state.frames & 0x7F, 64, 32, 0, 1)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, object_toki_objects_DL_008390); } diff --git a/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c b/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c index 3d50bf330..6dd049bcc 100644 --- a/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c +++ b/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c @@ -302,15 +302,16 @@ void DemoKekkai_DrawTrialBarrier(Actor* thisx, PlayState* play2) { Matrix_Translate(0.0f, -1200.0f, 0.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, frames * 5, frames * -10, 0x20, 0x20, 1, frames * 5, - frames * -10, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, frames * 5, frames * -10, 0x20, 0x20, 1, frames * 5, + frames * -10, 0x20, 0x20, 5, -10, 5, -10)); gSPDisplayList(POLY_XLU_DISP++, gTrialBarrierOrbDL); Matrix_Pop(); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0x00, 0x80, 50, 0, 100, 255); - gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, frames, frames, 0x20, 0x20)); + gSPSegment( + POLY_XLU_DISP++, 0x0A, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, frames, frames, 0x20, 0x20, 0, 0, 1, 1)); gSPDisplayList(POLY_XLU_DISP++, gTrialBarrierFloorDL); gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0x00, 0x80, sEnergyColors[colorIndex + 0], sEnergyColors[colorIndex + 1], @@ -318,8 +319,8 @@ void DemoKekkai_DrawTrialBarrier(Actor* thisx, PlayState* play2) { gDPSetEnvColor(POLY_XLU_DISP++, sEnergyColors[colorIndex + 3], sEnergyColors[colorIndex + 4], sEnergyColors[colorIndex + 5], 128); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, frames * 5, frames * -10, 0x20, 0x20, 1, frames * 5, - frames * -10, 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, frames * 5, frames * -10, 0x20, 0x20, 1, frames * 5, + frames * -10, 0x20, 0x40, 5, -10, 5, -10)); gSPDisplayList(POLY_XLU_DISP++, gTrialBarrierEnergyDL); CLOSE_DISPS(play->state.gfxCtx); } @@ -336,8 +337,8 @@ void DemoKekkai_DrawTowerBarrier(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(POLY_XLU_DISP++, 0x00, 0x80, 255, 170, 255, 255); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, scroll * 2, scroll * -4, 0x20, 0x40, 1, scroll * 2, scroll * -4, - 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, scroll * 2, scroll * -4, 0x20, 0x40, 1, scroll * 2, + scroll * -4, 0x20, 0x40, 2, -4, 2, -4)); gSPDisplayList(POLY_XLU_DISP++, gTowerBarrierDL); CLOSE_DISPS(play->state.gfxCtx); } diff --git a/soh/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c b/soh/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c index b39ba0738..e3c185467 100644 --- a/soh/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c +++ b/soh/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c @@ -110,12 +110,14 @@ void DemoShd_Draw(Actor* thisx, PlayState* play) { gSPDisplayList(POLY_XLU_DISP++, D_809932D0); if (this->unk_14C & 1) { - gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0x3FF - ((unk_14E * 5) & 0x3FF), 16, - 256, 1, 0, 255 - ((unk_14E * 5) & 255), 32, 32)); + gSPDisplayList(POLY_XLU_DISP++, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0x3FF - ((unk_14E * 5) & 0x3FF), 16, 256, 1, 0, + 255 - ((unk_14E * 5) & 255), 32, 32, 0, -5, 0, -5)); gSPDisplayList(POLY_XLU_DISP++, D_80993390); } else if (this->unk_14C & 2) { - gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0x3FF - ((unk_14E * 5) & 0x3FF), 16, - 256, 1, 0, 255 - ((unk_14E * 5) & 255), 32, 32)); + gSPDisplayList(POLY_XLU_DISP++, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0x3FF - ((unk_14E * 5) & 0x3FF), 16, 256, 1, 0, + 255 - ((unk_14E * 5) & 255), 32, 32, 0, -5, 0, -5)); gSPDisplayList(POLY_XLU_DISP++, D_809934B8); } diff --git a/soh/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c b/soh/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c index 07510e6d3..9da6aca84 100644 --- a/soh/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c +++ b/soh/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c @@ -139,8 +139,8 @@ s32 DemoTreLgt_PostLimbDraw(PlayState* play, SkelAnimeCurve* skelCurve, s32 limb OPEN_DISPS(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (play->state.frames * 2) % 256, 0, 64, 32, 1, - (play->state.frames * -2) % 256, 0, 64, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (play->state.frames * 2) % 256, 0, 64, 32, 1, + (play->state.frames * -2) % 256, 0, 64, 32, 2, 0, -2, 0)); if (limbIndex == 1) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 180, this->unk_170); diff --git a/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index 114399d48..1f6e78edd 100644 --- a/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -1035,9 +1035,9 @@ void DoorWarp1_DrawWarp(DoorWarp1* this, PlayState* play) { Matrix_Push(); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, spEC & 0xFF, -((s16)(this->unk_19C + this->unk_19C) & 511), - 0x100, 0x100, 1, spEC & 0xFF, -((s16)(this->unk_19C + this->unk_19C) & 511), 0x100, - 0x100)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, spEC & 0xFF, -((s16)(this->unk_19C + this->unk_19C) & 511), + 0x100, 0x100, 1, spEC & 0xFF, -((s16)(this->unk_19C + this->unk_19C) & 511), 0x100, + 0x100, 10, -2, 10, -2)); Matrix_Translate(0.0f, this->unk_194 * 230.0f, 0.0f, MTXMODE_APPLY); xzScale = (((f32)this->unk_1AE * spE8) / 100.0f) + 1.0f; @@ -1072,8 +1072,8 @@ void DoorWarp1_DrawWarp(DoorWarp1* this, PlayState* play) { spEC *= 2; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, spEC & 0xFF, -((s16)this->unk_19C & 511), 0x100, 0x100, 1, - spEC & 0xFF, -((s16)this->unk_19C & 511), 0x100, 0x100)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, spEC & 0xFF, -((s16)this->unk_19C & 511), 0x100, 0x100, 1, + spEC & 0xFF, -((s16)this->unk_19C & 511), 0x100, 0x100, 10, -1, 10, -1)); Matrix_Translate(0.0f, this->unk_198 * 60.0f, 0.0f, MTXMODE_APPLY); diff --git a/soh/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c b/soh/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c index 1f562f92c..17cbbd7d1 100644 --- a/soh/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c +++ b/soh/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c @@ -121,16 +121,16 @@ void EfcErupc_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, this->unk_14C * 1, this->unk_14E * -4, 32, 64, 1, - this->unk_14C * 4, this->unk_14E * -20, 64, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, this->unk_14C * 1, this->unk_14E * -4, 32, 64, 1, + this->unk_14C * 4, this->unk_14E * -20, 64, 64, 1, -4, 4, -20)); - gSPSegment( - POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, this->unk_150 * -4, 16, 128, 1, 0, this->unk_150 * 12, 32, 32)); + gSPSegment(POLY_XLU_DISP++, 0x09, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, this->unk_150 * -4, 16, 128, 1, 0, this->unk_150 * 12, 32, + 32, 0, -4, 0, 12)); - gSPSegment( - POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, this->unk_150 * -4, 16, 128, 1, 0, this->unk_150 * 12, 32, 32)); + gSPSegment(POLY_XLU_DISP++, 0x0A, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, this->unk_150 * -4, 16, 128, 1, 0, this->unk_150 * 12, 32, + 32, 0, -4, 0, 12)); Matrix_Push(); Matrix_Scale(0.8f, 0.8f, 0.8f, MTXMODE_APPLY); diff --git a/soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c b/soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c index 4f16a0608..e287aecb9 100644 --- a/soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c +++ b/soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c @@ -489,9 +489,9 @@ void EnBa_Draw(Actor* thisx, PlayState* play) { Matrix_Push(); gSPSegment(POLY_OPA_DISP++, 0x0C, mtx); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_809B8118[this->actor.params])); - gSPSegment( - POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 16, 16, 1, 0, (play->gameplayFrames * -10) % 128, 32, 32)); + gSPSegment(POLY_OPA_DISP++, 0x09, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 16, 16, 1, 0, (play->gameplayFrames * -10) % 128, 32, + 32, 0, 0, 0, -10)); for (i = 0; i < 14; i++, mtx++) { FrameInterpolation_RecordOpenChild(this, this->epoch + i * 25); @@ -518,9 +518,9 @@ void EnBa_Draw(Actor* thisx, PlayState* play) { gSPDisplayList(POLY_OPA_DISP++, object_bxa_DL_000890); } else { gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (play->gameplayFrames * 2) % 128, - (play->gameplayFrames * 2) % 128, 32, 32, 1, (play->gameplayFrames * -5) % 128, - (play->gameplayFrames * -5) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (play->gameplayFrames * 2) % 128, + (play->gameplayFrames * 2) % 128, 32, 32, 1, (play->gameplayFrames * -5) % 128, + (play->gameplayFrames * -5) % 128, 32, 32, 2, 2, -5, -5)); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 125, 100, 255); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_OPA_DISP++, object_bxa_DL_001D80); diff --git a/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c index 424f94a1c..c9c6ca953 100644 --- a/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -1329,11 +1329,11 @@ void EnBb_Draw(Actor* thisx, PlayState* play) { if (this->actor.params != ENBB_WHITE) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, - ((play->gameplayFrames + (this->flameScrollMod * 10)) * - (-20 - (this->flameScrollMod * -2))) % - 0x200, - 0x20, 0x80)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, + ((play->gameplayFrames + (this->flameScrollMod * 10)) * + (-20 - (this->flameScrollMod * -2))) % + 0x200, + 0x20, 0x80, 0, 0, 0, (-20 - (this->flameScrollMod * -2)))); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, this->flamePrimBlue, this->flamePrimAlpha); gDPSetEnvColor(POLY_XLU_DISP++, this->flameEnvColor.r, this->flameEnvColor.g, this->flameEnvColor.b, 0); Matrix_RotateY(((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) - this->actor.shape.rot.y + 0x8000)) * diff --git a/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c b/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c index 8a180e222..e492ce5bd 100644 --- a/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/soh/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -167,8 +167,9 @@ void EnBlkobj_Draw(Actor* thisx, PlayState* play) { gameplayFrames = play->gameplayFrames % 128; - gSPSegment(POLY_XLU_DISP++, 0x0D, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, gameplayFrames, 0, 32, 32, 1, gameplayFrames, 0, 32, 32)); + gSPSegment( + POLY_XLU_DISP++, 0x0D, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, gameplayFrames, 0, 32, 32, 1, gameplayFrames, 0, 32, 32, 1, 0, 1, 0)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->alpha != 0) { diff --git a/soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c b/soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c index 38d3a9bf1..e268b222e 100644 --- a/soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c +++ b/soh/src/overlays/actors/ovl_En_Bw/z_en_bw.c @@ -815,8 +815,9 @@ s32 EnBw_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po EnBw* this = (EnBw*)thisx; if (limbIndex == 1) { - gSPSegment((*gfx)++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, 0, this->unk_23A, 0x20, 0x20)); + gSPSegment( + (*gfx)++, 0x09, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x20, 1, 0, this->unk_23A, 0x20, 0x20, 0, 0, 0, 1)); if ((this->unk_220 == 1) || (this->unk_220 == 5)) { Matrix_Push(); Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); @@ -883,8 +884,8 @@ void EnBw_Draw(Actor* thisx, PlayState* play2) { gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, (play->gameplayFrames * -20) % 0x200, - 0x20, 0x80)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, (play->gameplayFrames * -20) % 0x200, + 0x20, 0x80, 0, 0, 0, -20)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, 255); Matrix_Scale(this->unk_248 * 0.01f, this->unk_248 * 0.01f, this->unk_248 * 0.01f, MTXMODE_APPLY); Matrix_ReplaceRotation(&play->billboardMtxF); diff --git a/soh/src/overlays/actors/ovl_En_Bx/z_en_bx.c b/soh/src/overlays/actors/ovl_En_Bx/z_en_bx.c index 34ef3565f..b7e515e3d 100644 --- a/soh/src/overlays/actors/ovl_En_Bx/z_en_bx.c +++ b/soh/src/overlays/actors/ovl_En_Bx/z_en_bx.c @@ -215,7 +215,8 @@ void EnBx_Draw(Actor* thisx, PlayState* play) { gSPSegment(POLY_OPA_DISP++, 0x0C, mtx); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_809D2560[this->actor.params & 0x7F])); gSPSegment(POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 16, 16, 1, 0, (play->gameplayFrames * -10) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 16, 16, 1, 0, (play->gameplayFrames * -10) % 128, 32, 32, + 0, 0, 0, -10)); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); if (this->actor.params & 0x80) { diff --git a/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index 0b4f3bf0a..56c4e98bc 100644 --- a/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -980,7 +980,8 @@ void EnClearTag_DrawEffects(PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s8)effect->primColor.r, (s8)effect->primColor.g, (s8)effect->primColor.b, (s8)effect->primColor.a); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, effect->random * -5, 32, 64, 1, 0, 0, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, effect->random * -5, 32, 64, 1, 0, 0, 32, 32, 0, -5, + 0, 0)); Matrix_Translate(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY); @@ -1008,9 +1009,9 @@ void EnClearTag_DrawEffects(PlayState* play) { // Draw the fire effect. gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 200, 20, 0, (s8)effect->primColor.a); - gSPSegment( - POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (effect->random * -15) & 0xFF, 32, 64, 1, 0, 0, 32, 32)); + gSPSegment(POLY_XLU_DISP++, 8, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (effect->random * -15) & 0xFF, 32, 64, 1, 0, 0, 32, + 32, 0, -15, 0, 0)); Matrix_Translate(effect->position.x, effect->position.y, effect->position.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY); diff --git a/soh/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/soh/src/overlays/actors/ovl_En_Dh/z_en_dh.c index 5f09f2987..f3d9d779e 100644 --- a/soh/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/soh/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -572,8 +572,9 @@ void EnDh_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gDPSetEnvColor(POLY_XLU_DISP++, 85, 55, 0, 130); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (play->state.frames * -3) % 0x80, 0, 0x20, 0x40, 1, - (play->state.frames * -10) % 0x80, (play->state.frames * -20) % 0x100, 0x20, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (play->state.frames * -3) % 0x80, 0, 0x20, 0x40, 1, + (play->state.frames * -10) % 0x80, (play->state.frames * -20) % 0x100, 0x20, 0x40, + -3, 0, -10, -20)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 0, 0, 0, this->dirtWaveAlpha); Matrix_Translate(0.0f, -this->actor.shape.yOffset, 0.0f, MTXMODE_APPLY); diff --git a/soh/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c b/soh/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c index 5b5e84584..97d35f3b7 100644 --- a/soh/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c +++ b/soh/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c @@ -115,8 +115,8 @@ void EnDyExtra_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, play->state.frames * 2, 0, 0x20, 0x40, 1, play->state.frames, - play->state.frames * -8, 0x10, 0x10)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, play->state.frames * 2, 0, 0x20, 0x40, 1, play->state.frames, + play->state.frames * -8, 0x10, 0x10, 2, 0, 1, -8)); gDPPipeSync(POLY_XLU_DISP++); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, primColors[this->type].r, primColors[this->type].g, diff --git a/soh/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/soh/src/overlays/actors/ovl_En_Fd/z_en_fd.c index a59c736af..c20ef6e18 100644 --- a/soh/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/soh/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -787,7 +787,8 @@ void EnFd_Draw(Actor* thisx, PlayState* play) { gDPSetEnvColor(POLY_XLU_DISP++, envColors[clampedHealth / 8].r, envColors[clampedHealth / 8].g, envColors[clampedHealth / 8].b, (u8)this->fadeAlpha); gSPSegment(POLY_XLU_DISP++, 0x8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, 0xFF - (u8)(frames * 6), 8, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, 0xFF - (u8)(frames * 6), 8, 0x40, + 0, 0, 0, -6)); gDPPipeSync(POLY_XLU_DISP++); gSPSegment(POLY_XLU_DISP++, 0x9, D_80116280); diff --git a/soh/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c b/soh/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c index be35ab8d8..4e8bed853 100644 --- a/soh/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c +++ b/soh/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c @@ -265,9 +265,9 @@ void EnFdFire_Draw(Actor* thisx, PlayState* play) { Matrix_Scale(1.0f, sp84, 1.0f / sp84, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Gfx_SetupDL_25Xlu(play->state.gfxCtx); - gSPSegment( - POLY_XLU_DISP++, 0x8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, play->state.frames * this->tile2Y, 0x20, 0x80)); + gSPSegment(POLY_XLU_DISP++, 0x8, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, play->state.frames * this->tile2Y, + 0x20, 0x80, 0, 0, 0, this->tile2Y)); gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, primColors[((this->actor.params & 0x8000) >> 0xF)].r, primColors[((this->actor.params & 0x8000) >> 0xF)].g, primColors[((this->actor.params & 0x8000) >> 0xF)].b, diff --git a/soh/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c b/soh/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c index 3bd05c3f6..40024da88 100644 --- a/soh/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c +++ b/soh/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c @@ -735,10 +735,12 @@ void EnFhgFire_Draw(Actor* thisx, PlayState* play) { gDPPipeSync(POLY_XLU_DISP++); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (s16)this->fwork[FHGFIRE_WARP_TEX_1_X], - (s16)this->fwork[FHGFIRE_WARP_TEX_1_Y], 0x40, 0x40, 1, - (s16)this->fwork[FHGFIRE_WARP_TEX_2_X], (s16)this->fwork[FHGFIRE_WARP_TEX_2_Y], - 0x40, 0x40)); + Gfx_TwoTexScrollEx( + play->state.gfxCtx, 0, (s16)this->fwork[FHGFIRE_WARP_TEX_1_X], + (s16)this->fwork[FHGFIRE_WARP_TEX_1_Y], 0x40, 0x40, 1, (s16)this->fwork[FHGFIRE_WARP_TEX_2_X], + (s16)this->fwork[FHGFIRE_WARP_TEX_2_Y], 0x40, 0x40, 25 * this->fwork[FHGFIRE_WARP_TEX_SPEED], + -40 * this->fwork[FHGFIRE_WARP_TEX_SPEED], 5 * this->fwork[FHGFIRE_WARP_TEX_SPEED], + -30 * this->fwork[FHGFIRE_WARP_TEX_SPEED])); gSPDisplayList(POLY_XLU_DISP++, gPhantomWarpDL); } else { osSyncPrintf("FF DRAW 1\n"); diff --git a/soh/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/soh/src/overlays/actors/ovl_En_Fz/z_en_fz.c index fe4f1a914..ccc367fc5 100644 --- a/soh/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/soh/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -737,8 +737,8 @@ void EnFz_Draw(Actor* thisx, PlayState* play) { func_8002ED80(&this->actor, play, 0); Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, play->state.frames & 0x7F, 32, 32, 1, 0, - (2 * play->state.frames) & 0x7F, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, play->state.frames & 0x7F, 32, 32, 1, 0, + (2 * play->state.frames) & 0x7F, 32, 32, 0, 1, 0, 2)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gDPSetCombineLERP(POLY_XLU_DISP++, TEXEL1, PRIMITIVE, PRIM_LOD_FRAC, TEXEL0, TEXEL1, TEXEL0, PRIMITIVE, TEXEL0, PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, COMBINED, 0, ENVIRONMENT, 0); @@ -887,8 +887,8 @@ void EnFz_DrawIceSmoke(EnFz* this, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, iceSmoke->primAlpha); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 3 * (iceSmoke->timer + (3 * i)), - 15 * (iceSmoke->timer + (3 * i)), 32, 64, 1, 0, 0, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 3 * (iceSmoke->timer + (3 * i)), + 15 * (iceSmoke->timer + (3 * i)), 32, 64, 1, 0, 0, 32, 32, 3, 15, 0, 0)); Matrix_Translate(iceSmoke->pos.x, iceSmoke->pos.y, iceSmoke->pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); Matrix_Scale(iceSmoke->xyScale, iceSmoke->xyScale, 1.0f, MTXMODE_APPLY); diff --git a/soh/src/overlays/actors/ovl_En_Gb/z_en_gb.c b/soh/src/overlays/actors/ovl_En_Gb/z_en_gb.c index 372962042..19805266a 100644 --- a/soh/src/overlays/actors/ovl_En_Gb/z_en_gb.c +++ b/soh/src/overlays/actors/ovl_En_Gb/z_en_gb.c @@ -536,8 +536,9 @@ void EnGb_DrawCagedSouls(EnGb* this, PlayState* play) { FrameInterpolation_RecordOpenChild(&this->cagedSouls[i], this->cagedSouls[i].epoch); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, - (u32)(sCagedSoulInfo[idx].timerMultiplier * this->frameTimer) % 512, 32, 128)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, + (u32)(sCagedSoulInfo[idx].timerMultiplier * this->frameTimer) % 512, 32, 128, 0, + 0, 0, sCagedSoulInfo[idx].timerMultiplier)); gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sCagedSoulInfo[idx].texture)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, sCagedSoulInfo[idx].prim.r, sCagedSoulInfo[idx].prim.g, sCagedSoulInfo[idx].prim.b, sCagedSoulInfo[idx].prim.a); diff --git a/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 67b10b3d6..3f1ffb75d 100644 --- a/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -613,7 +613,8 @@ void EnGs_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, -frames * 0x14, 0x20, 0x80)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, -frames * 0x14, 0x20, 0x80, 0, + 0, 0, -0x14)); gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, 255, 255, 0, 255); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); gSPDisplayList(POLY_XLU_DISP++, gEffFire1DL); diff --git a/soh/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c b/soh/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c index 509bfefda..1f66c4a22 100644 --- a/soh/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c +++ b/soh/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c @@ -514,8 +514,9 @@ void EnHonotrap_DrawFlame(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); this->flameScroll -= 20; this->flameScroll &= 0x1FF; - gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, this->flameScroll, 0x20, 0x80)); + gSPSegment( + POLY_XLU_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, this->flameScroll, 0x20, 0x80, 0, 0, 0, -20)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 200, 0, 255); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); Matrix_RotateY((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) - this->actor.shape.rot.y + 0x8000) * diff --git a/soh/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c b/soh/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c index f0e9cf64b..ce2c1540a 100644 --- a/soh/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c +++ b/soh/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c @@ -377,7 +377,8 @@ void EnIceHono_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (play->state.frames * -20) % 512, 32, 128)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (play->state.frames * -20) % 512, 32, 128, + 0, 0, 0, -20)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 170, 255, 255, this->alpha); diff --git a/soh/src/overlays/actors/ovl_En_Light/z_en_light.c b/soh/src/overlays/actors/ovl_En_Light/z_en_light.c index 551f9516c..2f0622236 100644 --- a/soh/src/overlays/actors/ovl_En_Light/z_en_light.c +++ b/soh/src/overlays/actors/ovl_En_Light/z_en_light.c @@ -164,7 +164,8 @@ void EnLight_Draw(Actor* thisx, PlayState* play) { if (this->actor.params >= 0) { gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (this->timer * -20) & 511, 32, 128)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (this->timer * -20) & 511, 32, 128, 0, + 0, 0, -20)); dList = gEffFire1DL; gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, flameParams->primColor.r, flameParams->primColor.g, @@ -172,8 +173,8 @@ void EnLight_Draw(Actor* thisx, PlayState* play) { gDPSetEnvColor(POLY_XLU_DISP++, flameParams->envColor.r, flameParams->envColor.g, flameParams->envColor.b, 0); } else { gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 16, 32, 1, ((this->timer * 2) & 63), - (this->timer * -6) & 127 * 1, 16, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 16, 32, 1, ((this->timer * 2) & 63), + (this->timer * -6) & 127 * 1, 16, 32, 0, 0, 2, -6)); dList = gUnusedCandleDL; gDPSetPrimColor(POLY_XLU_DISP++, 0xC0, 0xC0, 255, 200, 0, 0); diff --git a/soh/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c b/soh/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c index 5ac6ef18c..4f838f5bb 100644 --- a/soh/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c +++ b/soh/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c @@ -333,8 +333,9 @@ void EnMThunder_Draw(Actor* thisx, PlayState* play2) { case 0: case 1: gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0xFF - ((u8)(s32)(this->unk_1B4 * 30) & 0xFF), 0, 0x40, - 0x20, 1, 0xFF - ((u8)(s32)(this->unk_1B4 * 20) & 0xFF), 0, 8, 8)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0xFF - ((u8)(s32)(this->unk_1B4 * 30) & 0xFF), 0, 0x40, + 0x20, 1, 0xFF - ((u8)(s32)(this->unk_1B4 * 20) & 0xFF), 0, 8, 8, -30, 0, -20, + 0)); break; } @@ -422,8 +423,9 @@ void EnMThunder_Draw(Actor* thisx, PlayState* play2) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (play->gameplayFrames * 5) & 0xFF, 0, 0x20, 0x20, 1, - (play->gameplayFrames * 20) & 0xFF, (play->gameplayFrames * phi_t1) & 0xFF, 8, 8)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (play->gameplayFrames * 5) & 0xFF, 0, 0x20, 0x20, 1, + (play->gameplayFrames * 20) & 0xFF, (play->gameplayFrames * phi_t1) & 0xFF, 8, 8, 5, + 0, 20, phi_t1)); gSPDisplayList(POLY_XLU_DISP++, gSpinAttackChargingDL); diff --git a/soh/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c b/soh/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c index cf70efe9f..ed2cfe90d 100644 --- a/soh/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c +++ b/soh/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c @@ -181,8 +181,9 @@ void EnNutsball_Draw(Actor* thisx, PlayState* play) { if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) != 0) { Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), - 32, 32, 1, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), + 32, 32, 1, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), 32, 32, 6, + 6, 6, 6)); Matrix_Scale(25.0f, 25.0f, 25.0f, MTXMODE_APPLY); Matrix_RotateX(thisx->home.rot.z * 9.58738e-05f, MTXMODE_APPLY); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); diff --git a/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c b/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c index 279bc6834..80e3918f7 100644 --- a/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c +++ b/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c @@ -767,9 +767,9 @@ void EnOkuta_Draw(Actor* thisx, PlayState* play) { if (CVarGetInteger(CVAR_ENHANCEMENT("NewDrops"), 0) != 0) { Gfx_SetupDL_25Opa(play->state.gfxCtx); gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6), - 1 * (play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 6), - 1 * (play->state.frames * 6), 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 1 * (play->state.frames * 6), + 1 * (play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 6), + 1 * (play->state.frames * 6), 32, 32, 6, 6, 6, 6)); Matrix_Scale(7.0f, 7.0f, 7.0f, MTXMODE_APPLY); Matrix_RotateX(thisx->home.rot.z * (M_PI / 0x8000), MTXMODE_APPLY); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD); diff --git a/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c index ac13107cf..a493fa945 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c +++ b/soh/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c @@ -789,9 +789,9 @@ void EnPoField_DrawFlame(EnPoField* this, PlayState* play) { if (this->flameTimer != 0) { OPEN_DISPS(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx); - gSPSegment( - POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (play->gameplayFrames * -20) % 512, 32, 128)); + gSPSegment(POLY_XLU_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (play->gameplayFrames * -20) % 512, 32, + 128, 0, 0, 0, -20)); sp4C = this->flameScale * 85000.0f; gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, sp4C); Matrix_Translate(this->flamePosition.x, this->flamePosition.y, this->flamePosition.z, MTXMODE_NEW); @@ -991,8 +991,8 @@ void EnPoField_DrawSoul(Actor* thisx, PlayState* play) { } else { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, - (play->gameplayFrames * info->unk_9) & 0x1FF, 0x20, 0x80)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, + (play->gameplayFrames * info->unk_9) & 0x1FF, 0x20, 0x80, 0, 0, 0, info->unk_9)); gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(info->soulTexture)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, info->primColor.r, info->primColor.g, info->primColor.b, this->lightColor.a); diff --git a/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 3db1613d1..d4b85e267 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -1378,8 +1378,8 @@ void EnPoSisters_Draw(Actor* thisx, PlayState* play) { gSPDisplayList(POLY_OPA_DISP++, gPoSistersTorchDL); } gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, (play->gameplayFrames * -20) % 512, 0x20, - 0x80)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, (play->gameplayFrames * -20) % 512, + 0x20, 0x80, 0, 0, 0, -20)); gDPSetEnvColor(POLY_XLU_DISP++, temp_s1->r, temp_s1->g, temp_s1->b, temp_s1->a); if (this->actionFunc == func_80ADB17C) { if (this->unk_19A < 32) { diff --git a/soh/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/soh/src/overlays/actors/ovl_En_Poh/z_en_poh.c index 7534d112d..2a447d015 100644 --- a/soh/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/soh/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -1187,8 +1187,9 @@ void EnPoh_DrawSoul(Actor* thisx, PlayState* play) { } else { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, - (this->visibilityTimer * this->info->unk_8) % 512U, 0x20, 0x80)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, + (this->visibilityTimer * this->info->unk_8) % 512U, 0x20, 0x80, 0, 0, 0, + this->info->unk_8)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, this->info->primColor.r, this->info->primColor.g, this->info->primColor.b, this->lightColor.a); gDPSetEnvColor(POLY_XLU_DISP++, this->lightColor.r, this->lightColor.g, this->lightColor.b, 255); diff --git a/soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c index 831e11b8c..8c8f3db5e 100644 --- a/soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -854,8 +854,9 @@ void EnRr_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x0C, segMtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (this->scrollTimer * 0) & 0x7F, (this->scrollTimer * 0) & 0x3F, - 32, 16, 1, (this->scrollTimer * 0) & 0x3F, (this->scrollTimer * -6) & 0x7F, 32, 16)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (this->scrollTimer * 0) & 0x7F, (this->scrollTimer * 0) & 0x3F, + 32, 16, 1, (this->scrollTimer * 0) & 0x3F, (this->scrollTimer * -6) & 0x7F, 32, 16, 0, + 0, 0, this->stopScroll ? 0 : -6)); Matrix_Push(); Matrix_Scale((1.0f + this->bodySegs[RR_BASE].scaleMod.x) * this->bodySegs[RR_BASE].scale.x, diff --git a/soh/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c b/soh/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c index 7587b7a8b..cb302e249 100644 --- a/soh/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c +++ b/soh/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c @@ -293,7 +293,8 @@ void EnSiofuki_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); x = gameplayFrames * 15; y = gameplayFrames * -15; - gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TwoTexScroll(play->state.gfxCtx, 0, x, y, 64, 64, 1, x, y, 64, 64)); + gSPSegment(POLY_XLU_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, x, y, 64, 64, 1, x, y, 64, 64, 15, -15, 15, -15)); gSPDisplayList(POLY_XLU_DISP++, object_siofuki_DL_000B70); CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_En_Stream/z_en_stream.c b/soh/src/overlays/actors/ovl_En_Stream/z_en_stream.c index e6aa8df95..28859a4c8 100644 --- a/soh/src/overlays/actors/ovl_En_Stream/z_en_stream.c +++ b/soh/src/overlays/actors/ovl_En_Stream/z_en_stream.c @@ -137,8 +137,8 @@ void EnStream_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); multipliedFrames = frames * 20; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, frames * 30, -multipliedFrames, 0x40, 0x40, 1, multipliedFrames, - -multipliedFrames, 0x40, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, frames * 30, -multipliedFrames, 0x40, 0x40, 1, + multipliedFrames, -multipliedFrames, 0x40, 0x40, 30, -20, 20, -20)); gSPDisplayList(POLY_XLU_DISP++, object_stream_DL_000950); CLOSE_DISPS(play->state.gfxCtx); } diff --git a/soh/src/overlays/actors/ovl_En_Vali/z_en_vali.c b/soh/src/overlays/actors/ovl_En_Vali/z_en_vali.c index 1be09028b..0efccde60 100644 --- a/soh/src/overlays/actors/ovl_En_Vali/z_en_vali.c +++ b/soh/src/overlays/actors/ovl_En_Vali/z_en_vali.c @@ -801,7 +801,7 @@ void EnVali_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TexScroll(play->state.gfxCtx, 0, (127 - (play->gameplayFrames * 12)) % 128, 32, 32)); + Gfx_TexScrollEx(play->state.gfxCtx, 0, (127 - (play->gameplayFrames * 12)) % 128, 32, 32, 0, -12)); if ((this->lightningTimer % 2) != 0) { gSPSegment(POLY_XLU_DISP++, 0x09, D_80B28998); diff --git a/soh/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c b/soh/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c index 7bb5ad8e8..4d6b7d0fc 100644 --- a/soh/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c +++ b/soh/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c @@ -853,8 +853,8 @@ void EnViewer_DrawFireEffects(EnViewer* this2, PlayState* play) { MTXMODE_NEW); Matrix_Scale(this->fireEffects[i].scale, this->fireEffects[i].scale, this->fireEffects[i].scale, MTXMODE_APPLY); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (10 * i - 20 * play->state.frames) % 512, - 32, 128)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, + (10 * i - 20 * play->state.frames) % 512, 32, 128, 0, 0, 0, -20)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 170, 255); gDPSetEnvColor(POLY_XLU_DISP++, 255, 50, 00, 255); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/soh/src/overlays/actors/ovl_Fishing/z_fishing.c b/soh/src/overlays/actors/ovl_Fishing/z_fishing.c index 4d42de65f..805c35242 100644 --- a/soh/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/soh/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -1279,8 +1279,8 @@ void Fishing_DrawEffects(FishingEffect* effect, PlayState* play) { gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 40, 90, 80, effect->alpha); gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, effect->timer + (i * 3), (effect->timer + (i * 3)) * 5, - 32, 64, 1, 0, 0, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, effect->timer + (i * 3), (effect->timer + (i * 3)) * 5, + 32, 64, 1, 0, 0, 32, 32, 1, 5, 0, 0)); Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); @@ -1426,8 +1426,8 @@ void Fishing_DrawStreamSplash(PlayState* play) { OPEN_DISPS(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, play->gameplayFrames * 1, play->gameplayFrames * 8, 32, 64, 1, - -(play->gameplayFrames * 2), 0, 16, 16)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, play->gameplayFrames * 1, play->gameplayFrames * 8, 32, 64, 1, + -(play->gameplayFrames * 2), 0, 16, 16, 1, 8, -2, 0)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, 50); diff --git a/soh/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c b/soh/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c index 4246da479..526932d19 100644 --- a/soh/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c +++ b/soh/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c @@ -231,8 +231,9 @@ void MagicDark_DiamondDraw(Actor* thisx, PlayState* play) { (s32)(this->primAlpha * 0.6f) & 0xFF); gDPSetEnvColor(POLY_XLU_DISP++, Spell_env.r, Spell_env.g, Spell_env.b, 128); gSPDisplayList(POLY_XLU_DISP++, sDiamondMaterialDL); - gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(play->state.gfxCtx, 0, gameplayFrames * 2, gameplayFrames * -4, - 32, 32, 1, 0, gameplayFrames * -16, 64, 32)); + gSPDisplayList(POLY_XLU_DISP++, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, gameplayFrames * 2, gameplayFrames * -4, 32, 32, 1, 0, + gameplayFrames * -16, 64, 32, 2, -4, 0, -16)); gSPDisplayList(POLY_XLU_DISP++, sDiamondModelDL); } diff --git a/soh/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c b/soh/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c index 487c7332f..18fbd3f56 100644 --- a/soh/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c +++ b/soh/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c @@ -249,9 +249,9 @@ void MagicFire_Draw(Actor* thisx, PlayState* play) { gDPSetTileSize(POLY_XLU_DISP++, 1, 0, 0, 252, 252); gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); gSPDisplayList(POLY_XLU_DISP++, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (gameplayFrames * 2) % 512, - 511 - ((gameplayFrames * 5) % 512), 64, 64, 1, (gameplayFrames * 2) % 256, - 255 - ((gameplayFrames * 20) % 256), 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (gameplayFrames * 2) % 512, + 511 - ((gameplayFrames * 5) % 512), 64, 64, 1, (gameplayFrames * 2) % 256, + 255 - ((gameplayFrames * 20) % 256), 32, 32, 2, -5, 2, -20)); gSPDisplayList(POLY_XLU_DISP++, sModelDL); CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c b/soh/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c index e0c340993..fe23ea1a2 100644 --- a/soh/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c +++ b/soh/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c @@ -150,17 +150,17 @@ s32 MagicWind_OverrideLimbDraw(PlayState* play, SkelAnimeCurve* skelCurve, s32 l if (limbIndex == 1) { gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (play->state.frames * 9) & 0xFF, - 0xFF - ((play->state.frames * 0xF) & 0xFF), 0x40, 0x40, 1, - (play->state.frames * 0xF) & 0xFF, 0xFF - ((play->state.frames * 0x1E) & 0xFF), - 0x40, 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (play->state.frames * 9) & 0xFF, + 0xFF - ((play->state.frames * 0xF) & 0xFF), 0x40, 0x40, 1, + (play->state.frames * 0xF) & 0xFF, 0xFF - ((play->state.frames * 0x1E) & 0xFF), + 0x40, 0x40, 9, -0xF, 0xF, -0x1E)); } else if (limbIndex == 2) { gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (play->state.frames * 3) & 0xFF, - 0xFF - ((play->state.frames * 5) & 0xFF), 0x40, 0x40, 1, - (play->state.frames * 6) & 0xFF, 0xFF - ((play->state.frames * 0xA) & 0xFF), 0x40, - 0x40)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, (play->state.frames * 3) & 0xFF, + 0xFF - ((play->state.frames * 5) & 0xFF), 0x40, 0x40, 1, + (play->state.frames * 6) & 0xFF, 0xFF - ((play->state.frames * 0xA) & 0xFF), 0x40, + 0x40, 3, -5, 6, -0xA)); } CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c b/soh/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c index 078d8fc7a..b04348304 100644 --- a/soh/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c +++ b/soh/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c @@ -162,7 +162,8 @@ void ObjDekujr_Draw(Actor* thisx, PlayState* play) { frameCount = play->state.frames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, frameCount % 128, 0, 32, 32, 1, frameCount % 128, 0, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, frameCount % 128, 0, 32, 32, 1, frameCount % 128, 0, 32, 32, 1, + 0, 1, 0)); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, object_dekujr_DL_0032D8); diff --git a/soh/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c b/soh/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c index f7b039581..101191147 100644 --- a/soh/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c +++ b/soh/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c @@ -200,8 +200,8 @@ void ObjIcePoly_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, play->gameplayFrames % 0x100, 0x20, 0x10, 1, 0, - (play->gameplayFrames * 2) % 0x100, 0x40, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, play->gameplayFrames % 0x100, 0x20, 0x10, 1, 0, + (play->gameplayFrames * 2) % 0x100, 0x40, 0x20, 0, 1, 0, 2)); gDPSetEnvColor(POLY_XLU_DISP++, 0, 50, 100, this->alpha); gSPDisplayList(POLY_XLU_DISP++, gEffIceFragment3DL); diff --git a/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index 1b9edc917..622ac7bbe 100644 --- a/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/soh/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -779,8 +779,8 @@ void ObjSwitch_DrawCrystal(ObjSwitch* this, PlayState* play) { gDPSetEnvColor(POLY_OPA_DISP++, this->crystalColor.r, this->crystalColor.g, this->crystalColor.b, 128); gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, this->x1TexScroll, this->y1TexScroll, 0x20, 0x20, 1, - this->x2TexScroll, this->y2TexScroll, 0x20, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, this->x1TexScroll, this->y1TexScroll, 0x20, 0x20, 1, + this->x2TexScroll, this->y2TexScroll, 0x20, 0x20, -1, 1, 1, -1)); gSPDisplayList(POLY_OPA_DISP++, opaDLists[subType]); CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/soh/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index ab81c8421..10ae5895a 100644 --- a/soh/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/soh/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -287,8 +287,8 @@ void ObjSyokudai_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, (this->flameTexScroll * -20) & 0x1FF, - 0x20, 0x80)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, + (this->flameTexScroll * -20) & 0x1FF, 0x20, 0x80, 0, 0, 0, -20)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, 255); diff --git a/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index 2b8cfcb7a..07896733a 100644 --- a/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -934,8 +934,9 @@ void ObjectKankyo_DrawBeams(ObjectKankyo* this2, PlayState* play2) { gDPSetEnvColor(POLY_XLU_DISP++, sBeamEnvColors[i].r, sBeamEnvColors[i].g, sBeamEnvColors[i].b, 128); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, play->state.frames * 5, play->state.frames * 10, 32, - 64, 1, play->state.frames * 5, play->state.frames * 10, 32, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, play->state.frames * 5, play->state.frames * 10, + 32, 64, 1, play->state.frames * 5, play->state.frames * 10, 32, 64, 5, 10, + 5, 10)); gSPDisplayList(POLY_XLU_DISP++, gDemoKekkaiDL_005FF0); FrameInterpolation_RecordCloseChild(); } diff --git a/soh/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/soh/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c index 4fd9226fd..6b8f38b10 100644 --- a/soh/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/soh/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c @@ -156,8 +156,8 @@ void OceffSpot_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, sCylinderMaterialDL); - gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(play->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 32, 1, 0, - scroll * (-8), 32, 32)); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 32, 1, 0, + scroll * (-8), 32, 32, 2, -2, 0, -8)); gSPDisplayList(POLY_XLU_DISP++, sCylinderModelDL); CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/soh/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c index e465f0fa1..0c4174b93 100644 --- a/soh/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/soh/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -138,8 +138,8 @@ void OceffStorm_Draw2(Actor* thisx, PlayState* play) { gDPSetColorDither(POLY_XLU_DISP++, G_CD_NOISE); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 200, 200, 150, this->primColorAlpha); gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); - gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(play->state.gfxCtx, 0, scroll * 8, scroll * 4, 64, 64, 1, - scroll * 4, scroll * 4, 64, 64)); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, scroll * 8, scroll * 4, 64, 64, 1, + scroll * 4, scroll * 4, 64, 64, 8, 4, 4, 4)); gSPWideTextureRectangle(POLY_XLU_DISP++, OTRGetRectDimensionFromLeftEdge(0) << 2, 0, OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH) << 2, 0x03C0, G_TX_RENDERTILE, 0, 0, 0x008C, -0x008C); @@ -167,8 +167,8 @@ void OceffStorm_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, sCylinderMaterialDL); - gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(play->state.gfxCtx, 0, scroll * 4, (0 - scroll) * 8, 32, 32, 1, - scroll * 8, (0 - scroll) * 12, 32, 32)); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, scroll * 4, (0 - scroll) * 8, 32, 32, 1, + scroll * 8, (0 - scroll) * 12, 32, 32, 4, -8, 8, -12)); gSPDisplayList(POLY_XLU_DISP++, sCylinderModelDL); CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/soh/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index a249092ce..ee7efb879 100644 --- a/soh/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/soh/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -122,8 +122,8 @@ void OceffWipe_Draw(Actor* thisx, PlayState* play) { } gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); - gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 - scroll, scroll * (-2), 32, 32, 1, - 0 - scroll, scroll * (-2), 32, 32)); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0 - scroll, scroll * (-2), 32, 32, 1, + 0 - scroll, scroll * (-2), 32, 32, -1, -2, -1, -2)); gSPDisplayList(POLY_XLU_DISP++, sFrustumDL); CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/soh/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c index 909f564fb..3dcf1fe10 100644 --- a/soh/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c +++ b/soh/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c @@ -105,8 +105,8 @@ void OceffWipe2_Draw(Actor* thisx, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, 255); gDPSetEnvColor(POLY_XLU_DISP++, 255, 100, 0, 128); gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); - gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(play->state.gfxCtx, 0, scroll * 6, scroll * (-6), 64, 64, 1, - scroll * (-6), 0, 64, 64)); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, scroll * 6, scroll * (-6), 64, 64, 1, + scroll * (-6), 0, 64, 64, 6, -6, -6, 0)); gSPDisplayList(POLY_XLU_DISP++, sFrustumDL); CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/soh/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c index 7435a584c..aed9f32a9 100644 --- a/soh/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c +++ b/soh/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c @@ -106,8 +106,8 @@ void OceffWipe3_Draw(Actor* thisx, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, 255); gDPSetEnvColor(POLY_XLU_DISP++, 100, 200, 0, 128); gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); - gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(play->state.gfxCtx, 0, scroll * 12, scroll * (-12), 64, 64, 1, - scroll * 8, scroll * (-8), 64, 64)); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, scroll * 12, scroll * (-12), 64, 64, 1, + scroll * 8, scroll * (-8), 64, 64, 12, -12, 8, -8)); gSPDisplayList(POLY_XLU_DISP++, sFrustumDL); CLOSE_DISPS(play->state.gfxCtx); diff --git a/soh/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/soh/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c index 7be82eda8..f0cf6dad0 100644 --- a/soh/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/soh/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c @@ -105,8 +105,8 @@ void OceffWipe4_Draw(Actor* thisx, PlayState* play) { } gSPDisplayList(POLY_XLU_DISP++, sMaterial2DL); - gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(play->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 64, 1, - scroll * (-1), scroll, 32, 32)); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 64, 1, + scroll * (-1), scroll, 32, 32, 2, -2, -1, 1)); // SOH [Port] Index adjust 11 -> 14 (for LUS marker and load texture) to account for our extraction size changes gSPDisplayListOffset(POLY_XLU_DISP++, sMaterial2DL, 11 + 2 + 1); diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 944a7bd82..b652b51e7 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -12497,8 +12497,8 @@ void Player_DrawGameplay(PlayState* play, Player* this, s32 lod, Gfx* cullDList, gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 16, 32, 1, 0, (play->gameplayFrames * -15) % 128, - 16, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 16, 32, 1, 0, (play->gameplayFrames * -15) % 128, + 16, 32, 0, 0, 0, -15)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 255, D_8085486C); gDPSetEnvColor(POLY_XLU_DISP++, 120, 90, 30, 128); gSPDisplayList(POLY_XLU_DISP++, gHoverBootsCircleDL); @@ -12613,8 +12613,8 @@ void Player_Draw(Actor* thisx, PlayState* play2) { f32 scale = (this->av1.actionVar1 >> 1) * 22.0f; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (0 - play->gameplayFrames) % 128, 32, 32, 1, 0, - (play->gameplayFrames * -2) % 128, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (0 - play->gameplayFrames) % 128, 32, 32, 1, 0, + (play->gameplayFrames * -2) % 128, 32, 32, 0, -1, 0, -2)); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/soh/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c b/soh/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c index a0284c01f..89622b099 100644 --- a/soh/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c +++ b/soh/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c @@ -89,9 +89,9 @@ void EffectSsEnFire_Draw(PlayState* play, u32 index, EffectSs* this) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gDPSetEnvColor(POLY_XLU_DISP++, redGreen * 12.7f, 0, 0, 0); gDPSetPrimColor(POLY_XLU_DISP++, 0x0, 0x80, redGreen * 12.7f, redGreen * 12.7f, 0, 255); - gSPSegment( - POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, (this->rScroll * -0x14) & 0x1FF, 0x20, 0x80)); + gSPSegment(POLY_XLU_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, (this->rScroll * -0x14) & 0x1FF, 0x20, + 0x80, 0, 0, 0, -0x14)); if (((this->rFlags & 0x7FFF) != 0) || (this->life < 18)) { gSPDisplayList(POLY_XLU_DISP++, gEffFire2DL); diff --git a/soh/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c b/soh/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c index 3ba96fa69..f301a5d22 100644 --- a/soh/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c +++ b/soh/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c @@ -122,8 +122,8 @@ void EffectSsEnIce_Draw(PlayState* play, u32 index, EffectSs* this) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); func_8002EB44(&this->pos, &play->view.eye, &hiliteLightDir, play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, gameplayFrames & 0xFF, 0x20, 0x10, 1, 0, - (gameplayFrames * 2) & 0xFF, 0x40, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, gameplayFrames & 0xFF, 0x20, 0x10, 1, 0, + (gameplayFrames * 2) & 0xFF, 0x40, 0x20, 0, 1, 0, 2)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA); gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, (u32)alpha); diff --git a/soh/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c b/soh/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c index e260656ab..ab9a549a4 100644 --- a/soh/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c +++ b/soh/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c @@ -61,8 +61,8 @@ void EffectSsFcircle_Draw(PlayState* play, u32 index, EffectSs* this) { gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, play->gameplayFrames % 128, 0, 32, 64, 1, 0, - ((play->gameplayFrames) * -0xF) % 256, 32, 64)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, play->gameplayFrames % 128, 0, 32, 64, 1, 0, + ((play->gameplayFrames) * -0xF) % 256, 32, 64, 1, 0, 0, -0xF)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 220, 0, (this->life * 12.75f)); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); gSPDisplayList(POLY_XLU_DISP++, this->gfx); diff --git a/soh/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c b/soh/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c index 8d130145e..ada355540 100644 --- a/soh/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c +++ b/soh/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c @@ -123,9 +123,9 @@ void EffectSsFireTail_Draw(PlayState* play, u32 index, EffectSs* this) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255); gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0); - gSPSegment( - POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (play->state.frames * -0x14) & 0x1FF, 32, 128)); + gSPSegment(POLY_XLU_DISP++, 0x08, + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, (play->state.frames * -0x14) & 0x1FF, 32, + 128, 0, 0, 0, -0x14)); if (this->rType != 0) { gSPDisplayList(POLY_XLU_DISP++, gEffFire2DL); diff --git a/soh/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c b/soh/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c index 6a3454d38..5e02161fd 100644 --- a/soh/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c +++ b/soh/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c @@ -70,8 +70,8 @@ void EffectSsIcePiece_Draw(PlayState* play, u32 index, EffectSs* this) { gDPSetEnvColor(POLY_XLU_DISP++, 0, 50, 100, (s32)alpha & 0xFF); func_8003435C(&this->pos, play); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (1 * frames) % 256, 0x20, 0x10, 1, 0, (2 * frames) % 256, - 0x40, 0x20)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, (1 * frames) % 256, 0x20, 0x10, 1, 0, (2 * frames) % 256, + 0x40, 0x20, 0, 1, 0, 2)); gSPDisplayList(POLY_XLU_DISP++, gEffIceFragment1DL); CLOSE_DISPS(gfxCtx); diff --git a/soh/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c b/soh/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c index a03e2e882..f4003c686 100644 --- a/soh/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c +++ b/soh/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c @@ -72,7 +72,8 @@ void EffectSsIceSmoke_Draw(PlayState* play, u32 index, EffectSs* this) { gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 235, 235, this->rAlpha); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, this->life * 3, this->life * 15, 32, 64, 1, 0, 0, 32, 32)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, this->life * 3, this->life * 15, 32, 64, 1, 0, 0, 32, 32, + 3, 15, 0, 0)); Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); scale = this->rScale * 0.0001f; diff --git a/soh/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c b/soh/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c index 8f1e49b51..4f1c1997b 100644 --- a/soh/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c +++ b/soh/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c @@ -55,8 +55,8 @@ void EffectSsKFire_Draw(PlayState* play, u32 index, EffectSs* this) { Matrix_Scale(xzScale, yScale, xzScale, MTXMODE_APPLY); Gfx_SetupDL_25Xlu(play->state.gfxCtx); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, play->state.frames * this->rScroll, 0x20, - 0x80)); + Gfx_TwoTexScrollEx(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, play->state.frames * this->rScroll, + 0x20, 0x80, 0, 0, 0, this->rScroll)); if (this->rType >= 100) { gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, this->rAlpha);