diff --git a/include/z64.h b/include/z64.h index b6103fd34f..c58f05cbdc 100644 --- a/include/z64.h +++ b/include/z64.h @@ -1486,6 +1486,9 @@ typedef struct { /* 0x14 */ char unk_14[0x1C]; // unused } GfxPrint; // size = 0x30 +#define GFX_CHAR_X_SPACING 8 +#define GFX_CHAR_Y_SPACING 8 + #define GFXP_UNUSED "\x8E" #define GFXP_UNUSED_CHAR 0x8E #define GFXP_HIRAGANA "\x8D" diff --git a/src/code/PreRender.c b/src/code/PreRender.c index 3983361e86..95ecc9e090 100644 --- a/src/code/PreRender.c +++ b/src/code/PreRender.c @@ -259,7 +259,7 @@ void func_800C1FA4(PreRender* this, Gfx** gfxp) { gDPPipeSync(gfx++); gDPSetBlendColor(gfx++, 255, 255, 255, 8); - gDPSetPrimDepth(gfx++, -1, -1); + gDPSetPrimDepth(gfx++, 0xFFFF, 0xFFFF); gDPSetOtherMode(gfx++, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, diff --git a/src/code/code_800ACE70.c b/src/code/code_800ACE70.c index e221627779..a7252904d8 100644 --- a/src/code/code_800ACE70.c +++ b/src/code/code_800ACE70.c @@ -68,7 +68,7 @@ void func_800ACE98(struct_801664F0* this, Gfx** gfxp) { Gfx* gfx = *gfxp; gDPPipeSync(gfx++); - gDPSetPrimDepth(gfx++, -1, -1); + gDPSetPrimDepth(gfx++, 0xFFFF, 0xFFFF); if (this->setScissor == true) { gDPSetScissor(gfx++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); diff --git a/src/code/code_800AD920.c b/src/code/code_800AD920.c index 2f60901a10..3bc30b1c5d 100644 --- a/src/code/code_800AD920.c +++ b/src/code/code_800AD920.c @@ -50,8 +50,8 @@ void func_800AD958(struct_80166500* this, Gfx** gfxp) { gDPLoadTextureBlock(gfx++, tex, fmt, G_IM_SIZ_16b, SCREEN_WIDTH, height, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gfx++, 0, (y) << 2, (SCREEN_WIDTH << 2), (y + height) << 2, G_TX_RENDERTILE, 0, 0, - (1 << 10), (1 << 10)); + gSPTextureRectangle(gfx++, 0, y << 2, SCREEN_WIDTH << 2, (y + height) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, + 1 << 10); tex += SCREEN_WIDTH * height; } diff --git a/src/code/gfxprint.c b/src/code/gfxprint.c index 397e330e8a..7cd7a2a243 100644 --- a/src/code/gfxprint.c +++ b/src/code/gfxprint.c @@ -142,12 +142,12 @@ void GfxPrint_Setup(GfxPrint* this) { gDPSetCombineMode(this->dList++, G_CC_DECALRGBA, G_CC_DECALRGBA); gDPLoadTextureBlock_4b(this->dList++, sGfxPrintFontData, G_IM_FMT_CI, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gDPLoadTLUT(this->dList++, 64, 256, sGfxPrintFontTLUT); + gDPLoadTLUT(this->dList++, 64, 0x100, sGfxPrintFontTLUT); for (i = 1; i < 4; i++) { gDPSetTile(this->dList++, G_IM_FMT_CI, G_IM_SIZ_4b, 1, 0, i * 2, i, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(this->dList++, i * 2, 0, 0, 60, 1020); + gDPSetTileSize(this->dList++, i * 2, 0, 0, 15 << 2, 255 << 2); } gDPSetColor(this->dList++, G_SETPRIMCOLOR, this->color.rgba); @@ -155,12 +155,12 @@ void GfxPrint_Setup(GfxPrint* this) { gDPLoadMultiTile_4b(this->dList++, sGfxPrintRainbowData, 0, 1, G_IM_FMT_CI, 2, 8, 0, 0, 1, 7, 4, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 1, 3, G_TX_NOLOD, G_TX_NOLOD); - gDPLoadTLUT(this->dList++, 16, 320, sGfxPrintRainbowTLUT); + gDPLoadTLUT(this->dList++, 16, 0x140, sGfxPrintRainbowTLUT); for (i = 1; i < 4; i++) { gDPSetTile(this->dList++, G_IM_FMT_CI, G_IM_SIZ_4b, 1, 0, i * 2 + 1, 4, G_TX_NOMIRROR | G_TX_WRAP, 3, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, 1, G_TX_NOLOD); - gDPSetTileSize(this->dList++, i * 2 + 1, 0, 0, 4, 28); + gDPSetTileSize(this->dList++, i * 2 + 1, 0, 0, 1 << 2, 7 << 2); } } @@ -174,17 +174,17 @@ void GfxPrint_SetColor(GfxPrint* this, u32 r, u32 g, u32 b, u32 a) { } void GfxPrint_SetPosPx(GfxPrint* this, s32 x, s32 y) { - this->posX = this->baseX + (x * 4); - this->posY = this->baseY + (y * 4); + this->posX = this->baseX + (x << 2); + this->posY = this->baseY + (y << 2); } void GfxPrint_SetPos(GfxPrint* this, s32 x, s32 y) { - GfxPrint_SetPosPx(this, x * 8, y * 8); + GfxPrint_SetPosPx(this, x * GFX_CHAR_X_SPACING, y * GFX_CHAR_Y_SPACING); } void GfxPrint_SetBasePosPx(GfxPrint* this, s32 x, s32 y) { - this->baseX = x * 4; - this->baseY = y * 4; + this->baseX = x << 2; + this->baseY = y << 2; } void GfxPrint_PrintCharImpl(GfxPrint* this, u8 c) { @@ -197,7 +197,7 @@ void GfxPrint_PrintCharImpl(GfxPrint* this, u8 c) { if (this->flags & GFXP_FLAG_RAINBOW) { gDPSetTextureLUT(this->dList++, G_TT_RGBA16); gDPSetCycleType(this->dList++, G_CYC_2CYCLE); - gDPSetRenderMode(this->dList++, G_RM_OPA_CI, G_RM_XLU_SURF2); + gDPSetRenderMode(this->dList++, G_RM_PASS, G_RM_XLU_SURF2); gDPSetCombineMode(this->dList++, G_CC_INTERFERENCE, G_CC_PASS2); } else { gDPSetTextureLUT(this->dList++, G_TT_IA16); @@ -223,21 +223,21 @@ void GfxPrint_PrintCharImpl(GfxPrint* this, u8 c) { } if (this->flags & GFXP_FLAG_ENLARGE) { - gSPTextureRectangle(this->dList++, (this->posX) << 1, (this->posY) << 1, (this->posX + 32) << 1, + gSPTextureRectangle(this->dList++, this->posX << 1, this->posY << 1, (this->posX + 32) << 1, (this->posY + 32) << 1, tile, (u16)(c & 4) * 64, (u16)(c >> 3) * 256, 1 << 9, 1 << 9); } else { gSPTextureRectangle(this->dList++, this->posX, this->posY, this->posX + 32, this->posY + 32, tile, (u16)(c & 4) * 64, (u16)(c >> 3) * 256, 1 << 10, 1 << 10); } - this->posX += 32; + this->posX += GFX_CHAR_X_SPACING << 2; } void GfxPrint_PrintChar(GfxPrint* this, u8 c) { u8 charParam = c; if (c == ' ') { - this->posX += 32; + this->posX += GFX_CHAR_X_SPACING << 2; } else if (c > ' ' && c < 0x7F) { GfxPrint_PrintCharImpl(this, charParam); } else if (c >= 0xA0 && c < 0xE0) { @@ -254,7 +254,7 @@ void GfxPrint_PrintChar(GfxPrint* this, u8 c) { case '\0': break; case '\n': - this->posY += 32; + this->posY += GFX_CHAR_Y_SPACING << 2; FALLTHROUGH; case '\r': this->posX = this->baseX; diff --git a/src/code/speed_meter.c b/src/code/speed_meter.c index d94a92387c..59fe130678 100644 --- a/src/code/speed_meter.c +++ b/src/code/speed_meter.c @@ -22,11 +22,11 @@ SpeedMeterTimeEntry sSpeedMeterTimeEntryArray[] = { { &D_8016A540, 0, 8, GPACK_RGBA5551(0, 255, 0, 1) }, { &D_8016A548, 0, 10, GPACK_RGBA5551(255, 0, 255, 1) }, }; -#define DrawRec(gfx, color, ulx, uly, lrx, lry) \ +#define gDrawRect(gfx, color, ulx, uly, lrx, lry) \ gDPPipeSync(gfx); \ gDPSetFillColor(gfx, ((color) << 16) | (color)); \ gDPFillRectangle(gfx, (ulx), (uly), (lrx), (lry)); \ - gDPPipeSync(gfx); + gDPPipeSync(gfx) void SpeedMeter_InitImpl(SpeedMeter* this, u32 arg1, u32 y) { LogUtils_CheckNullPointer("this", this, "../speed_meter.c", 181); @@ -83,15 +83,15 @@ void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx) { G_TD_CLAMP | G_TP_NONE | G_CYC_FILL | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2); - DrawRec(gfx++, GPACK_RGBA5551(0, 0, 255, 1), baseX + 64 * 0, uly, baseX + 64 * 1, lry); - DrawRec(gfx++, GPACK_RGBA5551(0, 255, 0, 1), baseX + 64 * 1, uly, baseX + 64 * 2, lry); - DrawRec(gfx++, GPACK_RGBA5551(255, 0, 0, 1), baseX + 64 * 2, uly, baseX + 64 * 3, lry); - DrawRec(gfx++, GPACK_RGBA5551(255, 0, 255, 1), baseX + 64 * 3, uly, baseX + 64 * 4, lry); + gDrawRect(gfx++, GPACK_RGBA5551(0, 0, 255, 1), baseX + 64 * 0, uly, baseX + 64 * 1, lry); + gDrawRect(gfx++, GPACK_RGBA5551(0, 255, 0, 1), baseX + 64 * 1, uly, baseX + 64 * 2, lry); + gDrawRect(gfx++, GPACK_RGBA5551(255, 0, 0, 1), baseX + 64 * 2, uly, baseX + 64 * 3, lry); + gDrawRect(gfx++, GPACK_RGBA5551(255, 0, 255, 1), baseX + 64 * 3, uly, baseX + 64 * 4, lry); sSpeedMeterTimeEntryPtr = &sSpeedMeterTimeEntryArray[0]; for (i = 0; i < ARRAY_COUNT(sSpeedMeterTimeEntryArray); i++) { - DrawRec(gfx++, sSpeedMeterTimeEntryPtr->color, baseX, lry + sSpeedMeterTimeEntryPtr->y, - sSpeedMeterTimeEntryPtr->x, lry + sSpeedMeterTimeEntryPtr->y + 1); + gDrawRect(gfx++, sSpeedMeterTimeEntryPtr->color, baseX, lry + sSpeedMeterTimeEntryPtr->y, + sSpeedMeterTimeEntryPtr->x, lry + sSpeedMeterTimeEntryPtr->y + 1); sSpeedMeterTimeEntryPtr++; } gDPPipeSync(gfx++); @@ -140,8 +140,8 @@ void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, GraphicsContext* gfxC G_AC_NONE | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2); usedOff = ((this->lrx - this->ulx) * this->val) / this->maxval + this->ulx; - DrawRec(gfx++, this->backColor, usedOff, this->uly, this->lrx, this->lry); - DrawRec(gfx++, this->foreColor, this->ulx, this->uly, usedOff, this->lry); + gDrawRect(gfx++, this->backColor, usedOff, this->uly, this->lrx, this->lry); + gDrawRect(gfx++, this->foreColor, this->ulx, this->uly, usedOff, this->lry); gDPPipeSync(gfx++); diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 762514dcdc..d70e755761 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1321,11 +1321,10 @@ Gfx* func_8002E830(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* View_ErrorCheckEyePosition(correctedEyeX, eye->y, eye->z); guLookAtHilite(&D_8015BBA8, lookAt, *hilite, correctedEyeX, eye->y, eye->z, object->x, object->y, object->z, 0.0f, - 1.0f, 0.0f, lightDir->x, lightDir->y, lightDir->z, lightDir->x, lightDir->y, lightDir->z, 0x10, - 0x10); + 1.0f, 0.0f, lightDir->x, lightDir->y, lightDir->z, lightDir->x, lightDir->y, lightDir->z, 16, 16); gSPLookAt(gfx++, lookAt); - gDPSetHilite1Tile(gfx++, 1, *hilite, 0x10, 0x10); + gDPSetHilite1Tile(gfx++, 1, *hilite, 16, 16); return gfx; } @@ -1377,7 +1376,7 @@ void func_8002EBCC(Actor* actor, PlayState* play, s32 flag) { OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 4384); - gDPSetHilite1Tile(displayListHead++, 1, hilite, 0x10, 0x10); + gDPSetHilite1Tile(displayListHead++, 1, hilite, 16, 16); gSPEndDisplayList(displayListHead); gSPSegment(POLY_OPA_DISP++, 0x07, displayList); @@ -1403,7 +1402,7 @@ void func_8002ED80(Actor* actor, PlayState* play, s32 flag) { OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 4429); - gDPSetHilite1Tile(displayListHead++, 1, hilite, 0x10, 0x10); + gDPSetHilite1Tile(displayListHead++, 1, hilite, 16, 16); gSPEndDisplayList(displayListHead); gSPSegment(POLY_XLU_DISP++, 0x07, displayList); diff --git a/src/code/z_draw.c b/src/code/z_draw.c index 4343e52507..68b8784441 100644 --- a/src/code/z_draw.c +++ b/src/code/z_draw.c @@ -414,8 +414,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); Matrix_Push(); Matrix_Translate(-8.0f, -2.0f, 0.0f, MTXMODE_APPLY); Matrix_ReplaceRotation(&play->billboardMtxF); @@ -439,8 +440,9 @@ void GetItem_DrawPoes(PlayState* play, s16 drawId) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 641), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); Matrix_Push(); Matrix_ReplaceRotation(&play->billboardMtxF); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 656), G_MTX_MODELVIEW | G_MTX_LOAD); @@ -464,8 +466,9 @@ void GetItem_DrawFairy(PlayState* play, s16 drawId) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 683), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); Matrix_Push(); Matrix_ReplaceRotation(&play->billboardMtxF); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 698), G_MTX_MODELVIEW | G_MTX_LOAD); @@ -482,7 +485,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 723), G_MTX_MODELVIEW | G_MTX_LOAD); @@ -506,8 +509,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 760), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); @@ -550,8 +554,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, -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)); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 845), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -573,8 +578,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 878), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -588,8 +594,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 901), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -603,8 +610,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 924), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -618,8 +626,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 947), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); @@ -708,8 +717,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1074), G_MTX_MODELVIEW | G_MTX_LOAD); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); @@ -778,8 +788,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_draw.c", 1173), 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/src/code/z_fbdemo_circle.c b/src/code/z_fbdemo_circle.c index e7dacb84d4..36460e9188 100644 --- a/src/code/z_fbdemo_circle.c +++ b/src/code/z_fbdemo_circle.c @@ -74,12 +74,12 @@ void TransitionCircle_Start(void* thisx) { this->color.rgba = this->appearanceType == TCA_WAVE ? RGBA8(0, 0, 0, 255) : RGBA8(160, 160, 160, 255); } if (this->direction != 0) { - this->texY = 0; + this->texY = (s32)(0.0 * (1 << 2)); if (this->colorType == TCC_SPECIAL) { - this->texY = 0xFA; + this->texY = (s32)(62.5 * (1 << 2)); } } else { - this->texY = 0x1F4; + this->texY = (s32)(125.0 * (1 << 2)); if (this->appearanceType == TCA_RIPPLE) { Audio_PlaySfxGeneral(NA_SE_OC_SECRET_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); @@ -112,20 +112,20 @@ void TransitionCircle_Update(void* thisx, s32 updateRate) { } } this->texY += this->speed * 3 / updateRate; - if (this->texY >= 0x1F4) { - this->texY = 0x1F4; + if (this->texY >= (s32)(125.0 * (1 << 2))) { + this->texY = (s32)(125.0 * (1 << 2)); this->isDone = true; } } else { this->texY -= this->speed * 3 / updateRate; if (this->colorType != TCC_SPECIAL) { - if (this->texY <= 0) { - this->texY = 0; + if (this->texY <= (s32)(0.0 * (1 << 2))) { + this->texY = (s32)(0.0 * (1 << 2)); this->isDone = true; } } else { - if (this->texY < 0xFB) { - this->texY = 0xFA; + if (this->texY <= (s32)(62.5 * (1 << 2))) { + this->texY = (s32)(62.5 * (1 << 2)); this->isDone = true; } } @@ -146,7 +146,7 @@ void TransitionCircle_Draw(void* thisx, Gfx** gfxP) { this->frame ^= 1; gDPPipeSync(gfx++); - texScroll = Gfx_BranchTexScroll(&gfx, this->texX, this->texY, 0x10, 0x40); + texScroll = Gfx_BranchTexScroll(&gfx, this->texX, this->texY, 16, 64); gSPSegment(gfx++, 9, texScroll); gSPSegment(gfx++, 8, this->texture); gDPSetColor(gfx++, G_SETPRIMCOLOR, this->color.rgba); diff --git a/src/code/z_fbdemo_wipe1.c b/src/code/z_fbdemo_wipe1.c index 6a4d094477..16b4fc2e41 100644 --- a/src/code/z_fbdemo_wipe1.c +++ b/src/code/z_fbdemo_wipe1.c @@ -42,12 +42,12 @@ void TransitionWipe_Start(void* thisx) { this->isDone = false; if (this->direction) { - this->texY = 0x14D; + this->texY = (s32)(83.25 * (1 << 2)); } else { - this->texY = 0x264; + this->texY = (s32)(153.0 * (1 << 2)); } - guPerspective(&this->projection, &this->normal, 60.0f, (4.0 / 3.0f), 10.0f, 12800.0f, 1.0f); + guPerspective(&this->projection, &this->normal, 60.0f, 4.0 / 3.0f, 10.0f, 12800.0f, 1.0f); guLookAt(&this->lookAt, 0.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f); } @@ -66,14 +66,14 @@ void TransitionWipe_Update(void* thisx, s32 updateRate) { if (this->direction != 0) { this->texY += (((void)0, gSaveContext.transWipeSpeed) * 3) / updateRate; - if (this->texY >= 0x264) { - this->texY = 0x264; + if (this->texY >= (s32)(153.0 * (1 << 2))) { + this->texY = (s32)(153.0 * (1 << 2)); this->isDone = true; } } else { this->texY -= (((void)0, gSaveContext.transWipeSpeed) * 3) / updateRate; - if (this->texY <= 0x14D) { - this->texY = 0x14D; + if (this->texY <= (s32)(83.25 * (1 << 2))) { + this->texY = (s32)(83.25 * (1 << 2)); this->isDone = true; } } @@ -123,9 +123,9 @@ void TransitionWipe_SetType(void* thisx, s32 type) { } if (this->direction != 0) { - this->texY = 0x14D; + this->texY = (s32)(83.25 * (1 << 2)); } else { - this->texY = 0x264; + this->texY = (s32)(153.0 * (1 << 2)); } } diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index 9457cf7d61..e35a1e3781 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -2477,8 +2477,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (u32)sp96 % 4096, 0, 512, 32, 1, (u32)sp94 % 4096, + 4095 - ((u32)sp92 % 4096), 256, 64)); gDPSetTextureLUT(POLY_XLU_DISP++, G_TT_NONE); gSPDisplayList(POLY_XLU_DISP++, gFieldSandstormDL); diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 5eb16c94d0..2f696f2e20 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -1131,8 +1131,8 @@ Gfx* Gfx_TextureIA8(Gfx* displayListHead, void* texture, s16 textureWidth, s16 t G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(displayListHead++, rectLeft * 4, rectTop * 4, (rectLeft + rectWidth) * 4, - (rectTop + rectHeight) * 4, G_TX_RENDERTILE, 0, 0, dsdx, dtdy); + gSPTextureRectangle(displayListHead++, rectLeft << 2, rectTop << 2, (rectLeft + rectWidth) << 2, + (rectTop + rectHeight) << 2, G_TX_RENDERTILE, 0, 0, dsdx, dtdy); return displayListHead; } @@ -1143,8 +1143,8 @@ Gfx* Gfx_TextureI8(Gfx* displayListHead, void* texture, s16 textureWidth, s16 te G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(displayListHead++, rectLeft * 4, rectTop * 4, (rectLeft + rectWidth) * 4, - (rectTop + rectHeight) * 4, G_TX_RENDERTILE, 0, 0, dsdx, dtdy); + gSPTextureRectangle(displayListHead++, rectLeft << 2, rectTop << 2, (rectLeft + rectWidth) << 2, + (rectTop + rectHeight) << 2, G_TX_RENDERTILE, 0, 0, dsdx, dtdy); return displayListHead; } @@ -2623,8 +2623,8 @@ void Magic_DrawMeter(PlayState* play) { gDPLoadTextureBlock(OVERLAY_DISP++, gMagicMeterEndTex, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 16, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 3, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(OVERLAY_DISP++, ((R_MAGIC_METER_X + gSaveContext.magicCapacity) + 8) << 2, magicMeterY << 2, - ((R_MAGIC_METER_X + gSaveContext.magicCapacity) + 16) << 2, (magicMeterY + 16) << 2, + gSPTextureRectangle(OVERLAY_DISP++, (R_MAGIC_METER_X + gSaveContext.magicCapacity + 8) << 2, magicMeterY << 2, + (R_MAGIC_METER_X + gSaveContext.magicCapacity + 16) << 2, (magicMeterY + 16) << 2, G_TX_RENDERTILE, 256, 0, 1 << 10, 1 << 10); gDPPipeSync(OVERLAY_DISP++); @@ -2636,7 +2636,7 @@ void Magic_DrawMeter(PlayState* play) { // Yellow part of the meter indicating the amount of magic to be subtracted gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 250, 250, 0, interfaceCtx->magicAlpha); - gDPLoadMultiBlock_4b(OVERLAY_DISP++, gMagicMeterFillTex, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0, + gDPLoadMultiBlock_4b(OVERLAY_DISP++, gMagicMeterFillTex, 0x0000, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -2657,7 +2657,7 @@ void Magic_DrawMeter(PlayState* play) { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_MAGIC_FILL_COLOR(0), R_MAGIC_FILL_COLOR(1), R_MAGIC_FILL_COLOR(2), interfaceCtx->magicAlpha); - gDPLoadMultiBlock_4b(OVERLAY_DISP++, gMagicMeterFillTex, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0, + gDPLoadMultiBlock_4b(OVERLAY_DISP++, gMagicMeterFillTex, 0x0000, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -2725,7 +2725,7 @@ void Interface_DrawItemButtons(PlayState* play) { Player* player = GET_PLAYER(play); PauseContext* pauseCtx = &play->pauseCtx; s16 temp; // Used as both an alpha value and a button index - s16 dxdy; + s16 texCoordScale; s16 width; s16 height; @@ -2768,9 +2768,9 @@ void Interface_DrawItemButtons(PlayState* play) { // Start Button Texture, Color & Label gDPPipeSync(OVERLAY_DISP++); gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 120, 120, 120, interfaceCtx->startAlpha); - gSPTextureRectangle(OVERLAY_DISP++, startButtonLeftPos[gSaveContext.language] << 2, 68, - (startButtonLeftPos[gSaveContext.language] + 22) << 2, 156, G_TX_RENDERTILE, 0, 0, 1462, - 1462); + gSPTextureRectangle(OVERLAY_DISP++, startButtonLeftPos[gSaveContext.language] << 2, 17 << 2, + (startButtonLeftPos[gSaveContext.language] + 22) << 2, 39 << 2, G_TX_RENDERTILE, 0, 0, + (s32)(1.4277344 * (1 << 10)), (s32)(1.4277344 * (1 << 10))); gDPPipeSync(OVERLAY_DISP++); gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->startAlpha); gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 0); @@ -2781,13 +2781,14 @@ void Interface_DrawItemButtons(PlayState* play) { DO_ACTION_TEX_WIDTH, DO_ACTION_TEX_HEIGHT, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - dxdy = (1 << 10) / (R_START_LABEL_DD(gSaveContext.language) / 100.0f); + texCoordScale = (1 << 10) / (R_START_LABEL_DD(gSaveContext.language) / 100.0f); width = DO_ACTION_TEX_WIDTH / (R_START_LABEL_DD(gSaveContext.language) / 100.0f); height = DO_ACTION_TEX_HEIGHT / (R_START_LABEL_DD(gSaveContext.language) / 100.0f); - gSPTextureRectangle( - OVERLAY_DISP++, R_START_LABEL_X(gSaveContext.language) << 2, - R_START_LABEL_Y(gSaveContext.language) << 2, (R_START_LABEL_X(gSaveContext.language) + width) << 2, - (R_START_LABEL_Y(gSaveContext.language) + height) << 2, G_TX_RENDERTILE, 0, 0, dxdy, dxdy); + gSPTextureRectangle(OVERLAY_DISP++, R_START_LABEL_X(gSaveContext.language) << 2, + R_START_LABEL_Y(gSaveContext.language) << 2, + (R_START_LABEL_X(gSaveContext.language) + width) << 2, + (R_START_LABEL_Y(gSaveContext.language) + height) << 2, G_TX_RENDERTILE, 0, 0, + texCoordScale, texCoordScale); } } diff --git a/src/code/z_rcp.c b/src/code/z_rcp.c index 8d188c8276..cac3ee7ddb 100644 --- a/src/code/z_rcp.c +++ b/src/code/z_rcp.c @@ -1365,7 +1365,7 @@ Gfx* Gfx_BranchTexScroll(Gfx** gfxp, u32 x, u32 y, s32 width, s32 height) { Gfx* displayList = Graph_DlistAlloc(gfxp, 3 * sizeof(Gfx)); gDPTileSync(displayList); - gDPSetTileSize(displayList + 1, 0, x, y, (x + ((width - 1) << 2)), (y + ((height - 1) << 2))); + gDPSetTileSize(displayList + 1, G_TX_RENDERTILE, x, y, x + ((width - 1) << 2), y + ((height - 1) << 2)); gSPEndDisplayList(displayList + 2); return displayList; @@ -1382,11 +1382,11 @@ Gfx* func_80094E78(GraphicsContext* gfxCtx, u32 x, u32 y) { Gfx* Gfx_TexScroll(GraphicsContext* gfxCtx, u32 x, u32 y, s32 width, s32 height) { Gfx* displayList = Graph_Alloc(gfxCtx, 3 * sizeof(Gfx)); - x %= 2048; - y %= 2048; + x %= 512 << 2; + y %= 512 << 2; gDPTileSync(displayList); - gDPSetTileSize(displayList + 1, 0, x, y, (x + ((width - 1) << 2)), (y + ((height - 1) << 2))); + gDPSetTileSize(displayList + 1, G_TX_RENDERTILE, x, y, x + ((width - 1) << 2), y + ((height - 1) << 2)); gSPEndDisplayList(displayList + 2); return displayList; @@ -1396,15 +1396,15 @@ Gfx* Gfx_TwoTexScroll(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 wi u32 y2, s32 width2, s32 height2) { Gfx* displayList = Graph_Alloc(gfxCtx, 5 * sizeof(Gfx)); - x1 %= 2048; - y1 %= 2048; - x2 %= 2048; - y2 %= 2048; + x1 %= 512 << 2; + y1 %= 512 << 2; + x2 %= 512 << 2; + y2 %= 512 << 2; gDPTileSync(displayList); - gDPSetTileSize(displayList + 1, tile1, x1, y1, (x1 + ((width1 - 1) << 2)), (y1 + ((height1 - 1) << 2))); + gDPSetTileSize(displayList + 1, tile1, x1, y1, x1 + ((width1 - 1) << 2), y1 + ((height1 - 1) << 2)); gDPTileSync(displayList + 2); - gDPSetTileSize(displayList + 3, tile2, x2, y2, (x2 + ((width2 - 1) << 2)), (y2 + ((height2 - 1) << 2))); + gDPSetTileSize(displayList + 3, tile2, x2, y2, x2 + ((width2 - 1) << 2), y2 + ((height2 - 1) << 2)); gSPEndDisplayList(displayList + 4); return displayList; @@ -1414,15 +1414,15 @@ Gfx* Gfx_TwoTexScrollEnvColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1 u32 x2, u32 y2, s32 width2, s32 height2, s32 r, s32 g, s32 b, s32 a) { Gfx* displayList = Graph_Alloc(gfxCtx, 6 * sizeof(Gfx)); - x1 %= 2048; - y1 %= 2048; - x2 %= 2048; - y2 %= 2048; + x1 %= 512 << 2; + y1 %= 512 << 2; + x2 %= 512 << 2; + y2 %= 512 << 2; gDPTileSync(displayList); - gDPSetTileSize(displayList + 1, tile1, x1, y1, (x1 + ((width1 - 1) << 2)), (y1 + ((height1 - 1) << 2))); + gDPSetTileSize(displayList + 1, tile1, x1, y1, x1 + ((width1 - 1) << 2), y1 + ((height1 - 1) << 2)); gDPTileSync(displayList + 2); - gDPSetTileSize(displayList + 3, tile2, x2, y2, (x2 + ((width2 - 1) << 2)), (y2 + ((height2 - 1) << 2))); + gDPSetTileSize(displayList + 3, tile2, x2, y2, x2 + ((width2 - 1) << 2), y2 + ((height2 - 1) << 2)); gDPSetEnvColor(displayList + 4, r, g, b, a); gSPEndDisplayList(displayList + 5); diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index 6580f81728..3d99aa6187 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -116,8 +116,9 @@ void Scene_DrawConfigYdan(PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 4763); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - (gameplayFrames % 128), + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); @@ -134,7 +135,7 @@ void Scene_DrawConfigYdanBoss(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (gameplayFrames * 2) % 256, 0, 64, 32, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 2) % 256, 0, 64, 32, 1, 0, (gameplayFrames * 2) % 128, 64, 32)); gDPPipeSync(POLY_XLU_DISP++); @@ -163,10 +164,10 @@ void Scene_DrawConfigDdan(PlayState* play) { gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gDCEntranceTextures[((void)0, gSaveContext.nightFlag)])); 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 1) % 256, 0, 64, 32, 1, 0, (gameplayFrames * 1) % 128, 64, 32)); gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, (gameplayFrames * 2) % 128, 32, 32)); gDPPipeSync(POLY_OPA_DISP++); @@ -257,16 +258,19 @@ void Scene_DrawConfigKakusiana(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 64, 256, 16)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - (gameplayFrames % 128), + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 1) % 128, 32, 32)); + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); gSPSegment(POLY_XLU_DISP++, 0x0C, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 50) % 2048, 8, 512, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); + gSPSegment( + POLY_OPA_DISP++, 0x0D, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 64, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); @@ -289,11 +293,12 @@ void Scene_DrawConfigKenjyanoma(PlayState* play) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - (gameplayFrames * 1) % 128, + (gameplayFrames * 1) % 256, 32, 64, 1, 0, 0, 32, 128)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -311,11 +316,13 @@ void Scene_DrawConfigGreatFairyFountain(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 3) % 256, 32, 64, 1, gameplayFrames % 128, (gameplayFrames * 3) % 256, + 32, 64)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, + 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -350,8 +357,9 @@ void Scene_DrawConfigFairyFountain(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); gDPPipeSync(POLY_OPA_DISP++); @@ -372,11 +380,11 @@ void Scene_DrawConfigHakadan(PlayState* play) { if (play->sceneNum == SCENE_HAKADAN_BS) { gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (gameplayFrames * 2) % 128, 0, 32, 32, 1, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 2) % 128, 0, 32, 32, 1, (gameplayFrames * 2) % 128, 0, 32, 32)); } else { gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (gameplayFrames * 2) % 128, 0, 32, 32, 1, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 2) % 128, 0, 32, 32, 1, (gameplayFrames * 2) % 128, 0, 32, 32)); } @@ -430,54 +438,54 @@ void Scene_DrawConfigMizusin(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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, + 32, 32, 0, 0, 0, spAC)); } 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, + 32, 32, 0, 0, 0, 255)); } 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, + 32, 32, 0, 0, 0, 160)); } 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, + 32, 32, 0, 0, 0, spAC)); } 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, + 32, 32, 0, 0, 0, 255)); } 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, + 32, 32, 0, 0, 0, 160)); } 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, + 32, 32, 0, 0, 0, 160)); 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, + 32, 32, 0, 0, 0, 180)); } 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 1) % 128, 0, 32, 32, + 1, 0, 0, 32, 32, 0, 0, 0, 160 + (s32)((spAC / 200.0f) * 95.0f))); 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 3, 0, 32, 32, 1, 0, 0, + 32, 32, 0, 0, 0, 185 + (s32)((spAC / 200.0f) * 70.0f))); } 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, gameplayFrames * 1, 32, + 32, 1, 0, 127 - (gameplayFrames * 1), 32, 32, 0, 0, 0, 128)); 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 4, 0, 32, 32, 1, + gameplayFrames * 4, 0, 32, 32, 0, 0, 0, 128)); CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5644); } @@ -489,7 +497,7 @@ void Scene_DrawConfigMizusinBs(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, play->roomCtx.unk_74[0]); @@ -521,8 +529,9 @@ void Scene_DrawConfigHairalNiwa(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, + 32, 32)); if (play->sceneNum == SCENE_HAIRAL_NIWA) { gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 10) % 256, 32, 64)); @@ -552,13 +561,14 @@ void Scene_DrawConfigGanonCastleExterior(PlayState* play) { if (play->sceneNum == SCENE_GANON_TOU) { gSPSegment(POLY_XLU_DISP++, 0x09, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 256, 64, 64)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 255 - (gameplayFrames * 1) % 256, 64, 64, 1, + 0, (gameplayFrames * 1) % 256, 64, 64)); } 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 255 - (gameplayFrames * 1) % 128, + (gameplayFrames * 1) % 128, 32, 32, 1, (gameplayFrames * 1) % 128, + (gameplayFrames * 1) % 128, 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -604,13 +614,13 @@ void Scene_DrawConfigGanonFinal(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 512, 64, 128, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 512, 64, 128, 1, 0, 511 - (gameplayFrames * 1) % 512, 64, 128)); gSPSegment(POLY_OPA_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 256, 32, 64, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 256, 32, 64, 1, 0, 255 - (gameplayFrames * 1) % 256, 32, 64)); gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 20) % 2048, 16, 512, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 20) % 2048, 16, 512, 1, 0, (gameplayFrames * 30) % 2048, 16, 512)); gDPPipeSync(POLY_OPA_DISP++); @@ -649,11 +659,13 @@ void Scene_DrawConfigIceDoukuto(PlayState* play) { gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sIceCavernEntranceTextures[((void)0, 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -672,14 +684,14 @@ void Scene_DrawConfigHakaanaOuke(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 1) % 64, 256, 16)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 60) % 2048, 8, 512, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 60) % 2048, 8, 512, 1, 0, (gameplayFrames * 50) % 2048, 8, 512)); gSPSegment(POLY_OPA_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 127 - (gameplayFrames * 1) % 128, 0, 32, 32, 1, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - (gameplayFrames * 1) % 128, 0, 32, 32, 1, (gameplayFrames * 1) % 128, 0, 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 1023 - (gameplayFrames * 6) % 1024, 16, 256, 1, + 0, 1023 - (gameplayFrames * 3) % 1024, 16, 256)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -696,11 +708,13 @@ void Scene_DrawConfigHyliaLabo(PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6201); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 32, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); gDPPipeSync(POLY_OPA_DISP++); @@ -719,8 +733,9 @@ void Scene_DrawConfigCalmWater(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -746,11 +761,13 @@ void Scene_DrawConfigMen(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sGTGEntranceTextures[((void)0, 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -765,15 +782,15 @@ Gfx* Gfx_TwoTexScrollPrimColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y u32 x2, u32 y2, s32 width2, s32 height2, s32 r, s32 g, s32 b, s32 a) { Gfx* displayList = Graph_Alloc(gfxCtx, 10 * sizeof(Gfx)); - x1 %= 2048; - y1 %= 2048; - x2 %= 2048; - y2 %= 2048; + x1 %= 512 << 2; + y1 %= 512 << 2; + x2 %= 512 << 2; + y2 %= 512 << 2; gDPTileSync(displayList); - gDPSetTileSize(displayList + 1, tile1, x1, y1, (x1 + ((width1 - 1) << 2)), (y1 + ((height1 - 1) << 2))); + gDPSetTileSize(displayList + 1, tile1, x1, y1, x1 + ((width1 - 1) << 2), y1 + ((height1 - 1) << 2)); gDPTileSync(displayList + 2); - gDPSetTileSize(displayList + 3, tile2, x2, y2, (x2 + ((width2 - 1) << 2)), (y2 + ((height2 - 1) << 2))); + gDPSetTileSize(displayList + 3, tile2, x2, y2, x2 + ((width2 - 1) << 2), y2 + ((height2 - 1) << 2)); gDPSetPrimColor(displayList + 4, 0, 0, r, g, b, a); gSPEndDisplayList(displayList + 5); @@ -810,7 +827,8 @@ void Scene_DrawConfigBowling(PlayState* play) { 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++, 0x0B, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 127 - (gameplayFrames * 3) % 128, 32, 32, 1, 0, 0, 32, 32)); + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 127 - (gameplayFrames * 3) % 128, 32, 32, 1, 0, + 0, 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -881,8 +899,8 @@ void Scene_DrawConfigMahouya(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, (gameplayFrames * 3) % 128, 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 1023 - (gameplayFrames * 3) % 1024, 16, 256, 1, + 0, 1023 - (gameplayFrames * 6) % 1024, 16, 256)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -909,11 +927,13 @@ void Scene_DrawConfigBmori1(PlayState* play) { gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sForestTempleEntranceTextures[((void)0, 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -948,11 +968,13 @@ void Scene_DrawConfigSpot00(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, + 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 10) % 128, 32, 32, 1, gameplayFrames % 128, + (gameplayFrames * 10) % 128, 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1009,14 +1031,17 @@ void Scene_DrawConfigSpot03(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 6) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 6) % 128, + 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, + 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1044,11 +1069,13 @@ void Scene_DrawConfigSpot04(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 10) % 128, 32, 32, 1, gameplayFrames % 128, + (gameplayFrames * 10) % 128, 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1076,8 +1103,8 @@ void Scene_DrawConfigSpot04(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (s16)(-play->roomCtx.unk_74[0] * 0.02f), 32, 16, + 1, 0, (s16)(-play->roomCtx.unk_74[0] * 0.02f), 32, 16)); CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7044); } @@ -1093,11 +1120,11 @@ void Scene_DrawConfigSpot06(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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames, gameplayFrames, 32, 32, 1, + 0, 0, 32, 32, 0, 0, 0, play->roomCtx.unk_74[0] + 168)); 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, -gameplayFrames, -gameplayFrames, 32, 32, + 1, 0, 0, 16, 64, 0, 0, 0, play->roomCtx.unk_74[0] + 168)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 128); @@ -1121,7 +1148,8 @@ void Scene_DrawConfigSpot07(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 64, 32, 1, 0, var, 64, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1138,13 +1166,14 @@ void Scene_DrawConfigSpot08(PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7161); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 1) % 128, 0, 32, 32, 1, 0, 0, 32, 32)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 255 - (gameplayFrames * 2) % 256, 64, 64, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 255 - (gameplayFrames * 2) % 256, 64, 64, 1, 0, 255 - (gameplayFrames * 2) % 256, 64, 64)); gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); gDPPipeSync(POLY_OPA_DISP++); @@ -1163,21 +1192,22 @@ void Scene_DrawConfigSpot09(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 3) % 1024, 32, 256, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 3) % 1024, 32, 256, 1, 0, (gameplayFrames * 3) % 1024, 32, 256)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 256, 64, 64, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 256, 64, 64, 1, 0, (gameplayFrames * 1) % 256, 64, 64)); gSPSegment(POLY_XLU_DISP++, 0x0A, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 2) % 128, 32, 32, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 2) % 128, 32, 32, 1, 0, (gameplayFrames * 2) % 128, 32, 32)); gSPSegment(POLY_OPA_DISP++, 0x0B, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 32, 1, 0, 127 - (gameplayFrames * 3) % 128, 32, 32)); + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 32, 1, 0, + 127 - (gameplayFrames * 3) % 128, 32, 32)); gSPSegment(POLY_XLU_DISP++, 0x0C, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 128, 32, 32, 1, 0, (gameplayFrames * 1) % 128, 32, 32)); gSPSegment(POLY_XLU_DISP++, 0x0D, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (gameplayFrames * 1) % 64, 16, 16, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (gameplayFrames * 1) % 64, 16, 16, 1, 0, (gameplayFrames * 1) % 64, 16, 16)); gDPPipeSync(POLY_OPA_DISP++); @@ -1197,12 +1227,12 @@ void Scene_DrawConfigSpot10(PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7274); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames % 128, 0, 32, 16, 1, + gameplayFrames % 128, 0, 32, 16)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, gameplayFrames % 128, + 32, 32, 1, gameplayFrames % 128, gameplayFrames % 128, 32, 32)); gDPPipeSync(POLY_XLU_DISP++); gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); @@ -1227,8 +1257,9 @@ void Scene_DrawConfigSpot11(PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7323); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 32, 1, 0, 127 - gameplayFrames % 128, 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1258,12 +1289,12 @@ void Scene_DrawConfigSpot13(PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7385); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, gameplayFrames % 128, 32, 32, 1, 0, + gameplayFrames % 128, 32, 32)); + gSPSegment(POLY_XLU_DISP++, 0x09, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, gameplayFrames % 128, 32, 32, 1, 0, + gameplayFrames % 128, 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1281,11 +1312,13 @@ void Scene_DrawConfigSpot15(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 10) % 128, 32, 32, 1, gameplayFrames % 128, + (gameplayFrames * 10) % 128, 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 3) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 3) % 128, + 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1341,9 +1374,9 @@ void Scene_DrawConfigSpot17(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, gameplayFrames % 128, 32, 32, 1, 0, + gameplayFrames % 128, 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, sp6F, sp6E, 255, 128); @@ -1366,8 +1399,8 @@ void Scene_DrawConfigSpot18(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 127 - gameplayFrames % 128, 32, 32, 1, + gameplayFrames % 128, 0, 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); @@ -1408,11 +1441,12 @@ void Scene_DrawConfigHidan(PlayState* play) { gameplayFrames = play->gameplayFrames; gSPSegment(POLY_OPA_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 127 - gameplayFrames % 128, 32, 32, 1, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 127 - gameplayFrames % 128, 32, 32, 1, 127 - gameplayFrames % 128, 0, 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 3) % 128, + 127 - (gameplayFrames * 6) % 128, 32, 32, 1, (gameplayFrames * 6) % 128, + 127 - (gameplayFrames * 3) % 128, 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 64); @@ -1436,11 +1470,12 @@ void Scene_DrawConfigBdan(PlayState* play) { gameplayFrames = play->gameplayFrames; if (play->sceneNum == SCENE_BDAN) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames % 128, + (gameplayFrames * 2) % 128, 32, 32, 1, 127 - gameplayFrames % 128, + (gameplayFrames * 2) % 128, 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 255 - (gameplayFrames * 4) % 256, 32, 64, 1, + 0, 255 - (gameplayFrames * 4) % 256, 32, 64)); } else { gSPSegment( POLY_OPA_DISP++, 0x08, @@ -1509,14 +1544,17 @@ void Scene_DrawConfigGanontika(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 1) % 512, 32, 128, 1, gameplayFrames % 128, + (gameplayFrames * 1) % 512, 32, 128)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - gameplayFrames % 128, + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index 3a86840708..75bcbb3da6 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -240,8 +240,8 @@ void ArrowFire_Draw(Actor* thisx, PlayState* play2) { 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)); + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 255 - (stateFrames * 2) % 256, 0, 64, 32, + 1, 255 - stateFrames % 256, 511 - (stateFrames * 10) % 512, 64, 64)); gSPDisplayList(POLY_XLU_DISP++, sModelDL); CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_fire.c", 682); diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index 40bfcc4ace..5745e9b439 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -239,8 +239,8 @@ void ArrowIce_Draw(Actor* thisx, PlayState* play) { 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)); + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 128, 32, + 1, 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 10) % 512, 4, 16)); gSPDisplayList(POLY_XLU_DISP++, sModelDL); CLOSE_DISPS(play->state.gfxCtx, "../z_arrow_ice.c", 676); diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 292bceb96d..b3ed9c2c25 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -237,7 +237,7 @@ void ArrowLight_Draw(Actor* thisx, PlayState* play) { 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 511 - (stateFrames * 5) % 512, 0, 4, 32, 1, 511 - (stateFrames * 10) % 512, 511 - (stateFrames * 30) % 512, 8, 16)); gSPDisplayList(POLY_XLU_DISP++, sModelDL); diff --git a/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c b/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c index b1923c28a7..26c91bd2e7 100644 --- a/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c +++ b/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c @@ -332,7 +332,7 @@ void BgGanonOtyuka_Draw(Actor* thisx, PlayState* play) { if ((platform->dyna.actor.projectedPos.z > -30.0f) && (platform->flashState != FLASH_NONE)) { gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, platform->flashTimer * 4, 0, 32, 64, 1, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, platform->flashTimer * 4, 0, 32, 64, 1, platform->flashTimer * 4, 0, 32, 64)); gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, platform->flashPrimColorR, platform->flashPrimColorG, diff --git a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c index 3bc57deb0b..9051a1137d 100644 --- a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c +++ b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c @@ -106,7 +106,7 @@ void BgGjyoBridge_Draw(Actor* thisx, PlayState* play) { Gfx_TexScroll(play->state.gfxCtx, play->gameplayFrames & 127, play->gameplayFrames * -3 & 127, 32, 32)); gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, -play->gameplayFrames & 127, 32, 32, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, -play->gameplayFrames & 127, 32, 32, 1, 0, play->gameplayFrames & 127, 32, 32)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_bg_gjyo_bridge.c", 281), diff --git a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c index 7b060071e8..55db2c7ceb 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c +++ b/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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, + (this->vScrollTimer * -20) & 0x1FF, 0x20, 0x80)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, 255); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); diff --git a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c index 9b79115faa..54c2baf4cc 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c +++ b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c @@ -232,7 +232,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, this->fireScroll & 127, 0, 32, 64, 1, 0, (this->fireScroll * -15) & 0xFF, 32, 64)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_bg_haka_tubo.c", 497), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c index 6c1a7bdadd..ffa7069056 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c +++ b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c @@ -122,8 +122,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, play->gameplayFrames % 128, + play->gameplayFrames % 128, 32, 32, 1, 0, (0 - play->gameplayFrames) % 128, 32, 32)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_bg_haka_water.c", 312), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c index a90c1b49db..a29c9e2ba3 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c @@ -249,7 +249,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, this->texScroll & 0x7F, 0, 0x20, 0x40, 1, 0, (this->texScroll * -0xF) & 0xFF, 0x20, 0x40)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_bg_hidan_curtain.c", 698), diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c index f44f1d2308..3d4c02ea79 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c @@ -265,7 +265,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, play->gameplayFrames % 0x80, 0, 0x20, 0x40, 1, 0, (u8)(play->gameplayFrames * -15), 0x20, 0x40)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_bg_hidan_fwbig.c", 660), diff --git a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c index fa32c3c456..a33b969926 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c +++ b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c @@ -410,7 +410,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, -play->gameplayFrames & 0x7F, -play->gameplayFrames & 0x7F, 0x20, 0x20, 1, -play->gameplayFrames & 0x7F, play->gameplayFrames & 0x7F, 0x20, 0x20)); gSPDisplayList(POLY_XLU_DISP++, object_ice_objects_DL_0006F0); @@ -418,10 +418,10 @@ void BgIceShelter_Draw(Actor* thisx, PlayState* play2) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, play->gameplayFrames & 0xFF, 0x40, 0x40, + 1, 0, -play->gameplayFrames & 0xFF, 0x40, 0x40)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, -play->gameplayFrames & 0xFF, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, -play->gameplayFrames & 0xFF, play->gameplayFrames & 0xFF, 0x40, 0x40, 1, play->gameplayFrames & 0xFF, play->gameplayFrames & 0xFF, 0x40, 0x40)); gSPDisplayList(POLY_XLU_DISP++, object_ice_objects_DL_0012A0); diff --git a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c index 209da226a2..b12b244980 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c +++ b/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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, 1 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, + 0x20, 0, 0, 0, this->scrollAlpha1)); 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, 1 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, + 0x20, 0, 0, 0, this->scrollAlpha2)); 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, 1 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, + 0x20, 0, 0, 0, this->scrollAlpha3)); 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, 3 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, + 0x20, 0, 0, 0, this->scrollAlpha4)); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_bg_mizu_bwall.c", 1129), 2); if (this->dList != NULL) { diff --git a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c index 4db250ef3f..1da79726a6 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c @@ -368,20 +368,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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, frames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, + 0, 0, this->scrollAlpha1)); 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, frames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, + 0, 0, this->scrollAlpha2)); 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, frames * 1, 0, 32, 32, 1, 0, 0, 32, 32, 0, + 0, 0, this->scrollAlpha3)); 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_TwoTexScrollEnvColor(play->state.gfxCtx, G_TX_RENDERTILE, frames * 3, 0, 32, 32, 1, 0, 0, 32, 32, 0, + 0, 0, this->scrollAlpha4)); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_bg_mizu_movebg.c", 788), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c index ab73a8b905..6dfa50286a 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c @@ -333,8 +333,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, -gameplayFrames * 1, gameplayFrames * 1, 32, 32, 1, + 0, -gameplayFrames * 1, 32, 32)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_bg_mizu_water.c", 749), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c index 1e01c5b5ab..a0120c9940 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c +++ b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c @@ -174,8 +174,9 @@ 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0x7F - (gameplayFrames & 0x7F), + gameplayFrames % 0x80, 0x20, 0x20, 1, gameplayFrames & 0x7F, gameplayFrames % 0x80, + 0x20, 0x20)); gSPDisplayList(POLY_XLU_DISP++, gMoriIdomizuWaterDL); diff --git a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c index 8700d03e72..27ca8a858c 100644 --- a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c +++ b/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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 64, 1, 0, + (this->flameTextureScroll * -20) & 0x1FF, 32, 128)); 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/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index 62c119924a..905f8acec1 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -273,7 +273,7 @@ void BgSpot00Hanebasi_DrawTorches(Actor* thisx, PlayState* play2) { for (i = 0; i < 2; i++) { gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 64, 1, 0, ((play->gameplayFrames + i) * -20) & 0x1FF, 32, 128)); Matrix_Translate((i == 0) ? 260.0f : -260.0f, 128.0f, 690.0f, MTXMODE_NEW); diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c index 232548a4be..b21a9403e0 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c +++ b/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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - frames % 128, frames & 0x7F, 32, 32, 1, + frames % 128, frames & 0x7F, 32, 32)); gSPDisplayList(POLY_XLU_DISP++, gKakarikoWellWaterDL); diff --git a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c index b49f32de5b..39e2ff3f6e 100644 --- a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c @@ -316,8 +316,8 @@ void func_808AD450(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_bg_spot02_objects.c", 795), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 2 * this->timer, -3 * this->timer, 32, 64, + 1, 4 * this->timer, -6 * this->timer, 32, 64)); gDPPipeSync(POLY_XLU_DISP++); gSPDisplayList(POLY_XLU_DISP++, object_spot02_objects_DL_0013F0); gDPPipeSync(POLY_XLU_DISP++); diff --git a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c index 538f7cf91e..9edeb4611d 100644 --- a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c +++ b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c @@ -127,9 +127,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, gameplayFrames * 5, 64, 64, 1, 0, + gameplayFrames * 5, 64, 64)); gSPDisplayList(POLY_XLU_DISP++, object_spot03_object_DL_000B20); @@ -142,7 +142,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 1, gameplayFrames * 3, 64, 64, 1, -gameplayFrames, gameplayFrames * 3, 64, 64)); gSPDisplayList(POLY_XLU_DISP++, object_spot03_object_DL_001580); diff --git a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index 8ea8fd1a73..285b215df0 100644 --- a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -437,11 +437,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, -gameplayFrames, gameplayFrames, 32, 32, 1, + gameplayFrames, gameplayFrames, 32, 32)); gSPSegment(POLY_XLU_DISP++, 0x09, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, -gameplayFrames, gameplayFrames * 6, 32, 32, 1, gameplayFrames, - gameplayFrames * 6, 32, 32)); + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, -gameplayFrames, gameplayFrames * 6, 32, 32, 1, + gameplayFrames, gameplayFrames * 6, 32, 32)); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128); diff --git a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c index 37fc793165..ddbba36a83 100644 --- a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c +++ b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c @@ -87,26 +87,27 @@ void BgSpot07Taki_Draw(Actor* thisx, PlayState* play) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, ((frames * -1) & 0x7F), ((frames * 1) & 0x7F), 32, + 32, 1, ((frames * 1) & 0x7F), ((frames * 1) & 0x7F), 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, ((frames * -1) & 0x7F), + ((frames * -3) & 0xFF), 64, 64, 1, ((frames * 1) & 0x7F), + ((frames * -3) & 0xFF), 64, 64)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, frames * 0, ((frames * 3) & 0x1FF), 32, + 128, 1, frames * 0, ((frames * 3) & 0x1FF), 32, 128)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, frames * 0, ((frames * -1) & 0x7F), 32, 32, + 1, frames * 0, ((frames * -1) & 0x7F), 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, frames * 0, ((frames * 3) & 0x1FF), 32, + 128, 1, frames * 0, ((frames * 3) & 0x1FF), 32, 128)); gSPDisplayList(POLY_XLU_DISP++, object_spot07_object_DL_000BE0); } } else if (this->dyna.actor.params == 0) { diff --git a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c index 5b5bad82ae..e95a64b427 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c @@ -155,8 +155,9 @@ void BgSpot11Oasis_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_bg_spot11_oasis.c", 331), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 127 - (gameplayFrames % 128), + (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, + 32, 32)); gSPDisplayList(POLY_XLU_DISP++, gDesertColossusOasisDL); CLOSE_DISPS(play->state.gfxCtx, "../z_bg_spot11_oasis.c", 346); } diff --git a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c index 5ab34704da..4294777fde 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c @@ -131,7 +131,8 @@ void BgSpot16Doughnut_Draw(Actor* thisx, PlayState* play) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, scroll * (-1), 0, 16, 32, 1, scroll, + scroll * (-2), 16, 32)); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, this->envColorAlpha); gSPDisplayList(POLY_XLU_DISP++, gDeathMountainCloudCircleFieryDL); } else { diff --git a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c index 9ca92f8a6c..7002d631a0 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c +++ b/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, "../z_bg_spot17_funen.c", 161), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (0 - play->gameplayFrames) & 0x7F, 0x20, 0x20, + 1, 0, (0 - play->gameplayFrames) & 0x7F, 0x20, 0x20)); gSPDisplayList(POLY_XLU_DISP++, gCraterSmokeConeDL); if (1) {} diff --git a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c index 2b4cc10539..eed307b0e9 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c +++ b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c @@ -149,8 +149,8 @@ void func_808BA2CC(BgTokiHikari* this, PlayState* play) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, -2 * (play->gameplayFrames & 0x7F), 0, 0x20, 0x40, + 1, (play->gameplayFrames & 0x7F) * 4, 0, 0x20, 0x40)); gSPDisplayList(POLY_XLU_DISP++, object_toki_objects_DL_000880); Matrix_Pop(); diff --git a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c index f1f291a337..901dc9287e 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c @@ -180,8 +180,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, -play->gameplayFrames % 128, + play->gameplayFrames % 128, 0x20, 0x20, 1, play->gameplayFrames % 128, + play->gameplayFrames % 128, 0x20, 0x20)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_bg_ydan_hasi.c", 592), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gDTWaterPlaneDL); diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index bf90e88f71..d7d3f2b136 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -1826,7 +1826,7 @@ 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], + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (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)); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255); diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index da50375666..bd0faab46c 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -1200,7 +1200,7 @@ 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], + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (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)); diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index 8fe9f07952..b522e6565f 100644 --- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -3375,9 +3375,9 @@ void BossGanon_DrawShock(BossGanon* this, PlayState* play) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 64, 1, 0, + (this->unk_1A2 + i) * -15, 32, 64)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 200, 255, 170, 255); gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 0, 128); gSPDisplayList(POLY_XLU_DISP++, gDorfShockGlowDL); @@ -3446,8 +3446,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, this->unk_1A2 * -2, 0, 0x40, 0x40, 1, 0, + this->unk_1A2 * 0xA, 0x40, 0x40)); 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); @@ -3463,13 +3463,14 @@ void BossGanon_DrawBigMagicCharge(BossGanon* this, PlayState* play) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, 0, this->unk_1A2 * -4, + 0x20, 0x20)); gSPDisplayList(POLY_XLU_DISP++, gDorfBigMagicBGCircleDL); // 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, this->unk_1A2 * 2, this->unk_1A2 * -0x14, 0x40, 0x40)); gSPDisplayList(POLY_XLU_DISP++, gDorfDotDL); @@ -3576,8 +3577,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, this->unk_1A2 * -8, 0, 0x20, 0x40, 1, + this->unk_1A2 * -4, this->unk_1A2 * -8, 0x20, 0x20)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 100, 0, 200, (s8)this->fwork[GDF_VORTEX_ALPHA]); gDPSetEnvColor(POLY_XLU_DISP++, 130, 0, 0, 128); @@ -4936,8 +4937,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, eff->timer * 4, 0, 32, 64, 1, + eff->timer * 2, eff->timer * -20, 32, 32)); 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, "../z_boss_ganon.c", 11121), @@ -4954,8 +4955,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, eff->timer * 4, 0, 32, 64, 1, + eff->timer * 2, eff->timer * -20, 32, 32)); 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, "../z_boss_ganon.c", 11165), @@ -4972,8 +4973,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (eff->timer * 100), 0, 64, 32, 1, + (eff->timer * 100), 0, 64, 32)); 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); @@ -4990,9 +4991,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 32, 1, eff->timer * 2, + eff->timer * -20, 64, 64)); 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/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index ae461f65c8..ccb443ea55 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -2398,7 +2398,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 32, 1, play->gameplayFrames * 18, 0, + 32, 32)); 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); @@ -2419,7 +2420,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (s32)play->gameplayFrames, 0, 32, 64, 1, -play->gameplayFrames * 2, -play->gameplayFrames * 8, 32, 32)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 200, 0, (s8)this->unk_324); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128); @@ -2730,8 +2731,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, this->unk_19C * -8, 0, 32, 64, 1, + this->unk_19C * -4, this->unk_19C * -8, 32, 32)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, (s16)this->unk_37C); gDPSetEnvColor(POLY_XLU_DISP++, 255, 200, 0, 128); Matrix_Translate(sZelda->actor.world.pos.x + 100.0f, sZelda->actor.world.pos.y + 35.0f + 7.0f, diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 679820a71e..948e2649ba 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -2572,8 +2572,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (s16)this->waterTex1x, (s16)this->waterTex1y, 32, + 32, 1, (s16)this->waterTex2x, (s16)this->waterTex2y, 32, 32)); gDPPipeSync(POLY_XLU_DISP++); @@ -2603,13 +2603,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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, sMorphaTent1->work[MO_TENT_VAR_TIMER] * 5, 0, + 32, 32, 1, 0, sMorphaTent1->work[MO_TENT_VAR_TIMER] * -10, 32, 32)); Matrix_RotateX(this->work[MO_TENT_MOVE_TIMER] * 0.5f, MTXMODE_APPLY); Matrix_RotateZ(this->work[MO_TENT_MOVE_TIMER] * 0.8f, MTXMODE_APPLY); @@ -2678,8 +2678,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (s16)sMorphaTent1->waterTex1x, + (s16)sMorphaTent1->waterTex1y, 32, 32, 1, (s16)sMorphaTent1->waterTex2x, + (s16)sMorphaTent1->waterTex2y, 32, 32)); sp8C = this->subCamAt.x - this->subCamEye.x; sp88 = this->subCamAt.y - this->subCamEye.y; @@ -2721,7 +2722,7 @@ void BossMo_DrawCore(Actor* thisx, PlayState* play) { void BossMo_DrawTent(Actor* thisx, PlayState* play) { s32 pad; BossMo* this = (BossMo*)thisx; - u16 scroll; + u16 texCoordScale; OPEN_DISPS(play->state.gfxCtx, "../z_boss_mo.c", 6958); if (1) {} @@ -2731,12 +2732,13 @@ 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); 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; - gSPTexture(POLY_XLU_DISP++, scroll, scroll, 0, G_TX_RENDERTILE, G_ON); + texCoordScale = (s16)(Math_SinS(this->work[MO_TENT_VAR_TIMER] * 0xB00) * 30.0f) + 350; + gSPTexture(POLY_XLU_DISP++, texCoordScale, texCoordScale, 0, G_TX_RENDERTILE, G_ON); if (this->drawActor) { BossMo_DrawTentacle(this, play); diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 72cd6b88d2..6c92dc49f3 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -3155,8 +3155,8 @@ void BossSst_DrawEffects(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, play->gameplayFrames % 256, 0x20, 0x10, + 1, 0, (play->gameplayFrames * 2) % 256, 0x40, 0x20)); gDPSetEnvColor(POLY_XLU_DISP++, 0, 50, 100, this->effects[0].alpha); gSPDisplayList(POLY_XLU_DISP++, gBongoIceCrystalDL); @@ -3185,8 +3185,8 @@ void BossSst_DrawEffects(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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, play->gameplayFrames % 128, 0, 0x20, 0x40, + 1, 0, (play->gameplayFrames * -15) % 256, 0x20, 0x40)); for (i = 0; i < 3; i++, scaleY -= 0.001f) { effect = &this->effects[i]; diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index 88bb6ae71d..271e9d73bc 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -3274,8 +3274,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, + (u32)this->workf[UNK_F16] & 0x3F, (this->work[CS_TIMER_2] * 4) & 0x3F, 0x10, 0x10)); Matrix_Push(); Matrix_RotateY(this->workf[UNK_F15], MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6423), @@ -3285,7 +3285,7 @@ void func_80941BC0(BossTw* this, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6427), 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, (s16)this->workf[UNK_F9]); @@ -3312,7 +3312,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (-this->work[CS_TIMER_1]) & 0x7F, 0, 0x20, 0x20, 1, (this->work[CS_TIMER_1] * 2) & 0x7F, 0, 0x20, 0x20)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6497), G_MTX_LOAD | G_MTX_MODELVIEW | G_MTX_NOPUSH); @@ -3325,7 +3325,7 @@ void func_80942180(BossTw* this, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 6514), 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 80, 0, 0, (s16)this->workf[KM_GD_SMOKE_A]); @@ -3334,8 +3334,8 @@ void func_80942180(BossTw* this, PlayState* play) { gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_018FC0)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (-this->work[CS_TIMER_1] * 3) & 0x7F, 0, 0x20, + 0x20, 1, 0, (-this->work[CS_TIMER_1] * 10) & 0xFF, 0x20, 0x40)); 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); @@ -3356,8 +3356,8 @@ void func_809426F0(BossTw* this, PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_boss_tw.c", 6587); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (u8)(-this->work[CS_TIMER_2] * 15), 0x20, 0x40, + 1, 0, 0, 0x40, 0x40)); 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, @@ -3390,7 +3390,8 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, + ((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)); Matrix_Scale(0.4f, 0.4f, 0.4f, MTXMODE_APPLY); Matrix_ReplaceRotation(&play->billboardMtxF); @@ -3494,7 +3495,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (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)); @@ -3505,7 +3506,7 @@ void BossTw_Draw(Actor* thisx, PlayState* play2) { (s16)this->workf[INNR_CRWN_TX_Y1] & 0xFF, 0x20, 0x40)); } else { gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (s16)this->workf[INNR_CRWN_TX_X1] & 0x7F, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (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)); @@ -3586,22 +3587,22 @@ 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, 0, + -this->work[CS_TIMER_1] * 0xF, 0x20, 0x40)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, 0, + -this->work[CS_TIMER_1] * 0xA, 0x20, 0x40)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, + this->work[CS_TIMER_1], -this->work[CS_TIMER_1] * 7, 0x20, 0x40)); break; case 15: case 31: @@ -3719,16 +3720,17 @@ void BossTw_ShieldChargeDraw(BossTw* this, PlayState* play) { gDPSetEnvColor(POLY_XLU_DISP++, 255, 245, 255, temp_a0); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01E0E0)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (this->work[CS_TIMER_1] * 2) * temp_t0, + 0, 0x20, 0x20, 1, (-this->work[CS_TIMER_1] * 2) * temp_t0, 0, 0x20, 0x20)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 100, 20, 0, (s16)D_8094C854); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01E020)); } else { gDPSetEnvColor(POLY_XLU_DISP++, 225, 255, 255, temp_a0); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01E3A0)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, + (-this->work[CS_TIMER_1] * 5) * temp_t0, 0x20, 0x40, 1, + (this->work[CS_TIMER_1] * 4) * temp_t0, 0, 0x20, 0x20)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 175, 205, 195, (s16)D_8094C854); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01E2C0)); } @@ -3763,8 +3765,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, this->work[CS_TIMER_1] * D_8094C872, 0x20, + 0x40, 1, 0, this->work[CS_TIMER_1] * D_8094C872, 0x20, 0x20)); gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01E9F0)); } @@ -3779,9 +3781,9 @@ void BossTw_SpawnPortalDraw(BossTw* this, PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_boss_tw.c", 7546); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, -this->work[CS_TIMER_1] * 15, 0x20, 0x40, 1, 0, + 0, 0x40, 0x40)); Matrix_Push(); @@ -3835,7 +3837,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, -sKoumePtr->work[CS_TIMER_1] * 2, 0, 0x20, 0x20, 1, -sKoumePtr->work[CS_TIMER_1] * 2, 0, 0x20, 0x40)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s16)this->workf[UNK_F18] / 2); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_tw.c", 7694), @@ -3843,7 +3845,7 @@ void func_80944C50(BossTw* this, PlayState* play) { gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01F238)); gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, -sKoumePtr->work[CS_TIMER_1] * 5, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, -sKoumePtr->work[CS_TIMER_1] * 5, -sKoumePtr->work[CS_TIMER_1] * 2, 0x20, 0x40, 1, 0, -sKoumePtr->work[CS_TIMER_1] * 2, 0x10, 0x10)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s16)(this->workf[UNK_F18] * 0.3f)); @@ -4442,9 +4444,9 @@ void BossTw_BlastDraw(Actor* thisx, PlayState* play2) { gDPSetEnvColor(POLY_XLU_DISP++, 255, 215, 255, 128); for (i = 9; i >= 0; 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_TwoTexScroll( + play->state.gfxCtx, G_TX_RENDERTILE, ((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)); tailIdx = ((this->work[TAIL_IDX] - i) + 30) % 30; Matrix_Translate(this->blastTailPos[tailIdx].x, this->blastTailPos[tailIdx].y, this->blastTailPos[tailIdx].z, MTXMODE_NEW); @@ -4466,9 +4468,9 @@ void BossTw_BlastDraw(Actor* thisx, PlayState* play2) { gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01A998)); for (i = 9; i >= 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_TwoTexScroll( + play->state.gfxCtx, G_TX_RENDERTILE, ((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)); tailIdx = ((this->work[TAIL_IDX] - i) + 30) % 30; Matrix_Translate(this->blastTailPos[tailIdx].x, this->blastTailPos[tailIdx].y, this->blastTailPos[tailIdx].z, MTXMODE_NEW); @@ -4506,9 +4508,9 @@ void BossTw_DrawDeathBall(Actor* thisx, PlayState* play2) { for (i = 9; i >= 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_TwoTexScroll( + play->state.gfxCtx, G_TX_RENDERTILE, (((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)); tailIdx = ((this->work[TAIL_IDX] - i) + 30) % 30; Matrix_Translate(this->blastTailPos[tailIdx].x, this->blastTailPos[tailIdx].y, this->blastTailPos[tailIdx].z, MTXMODE_NEW); @@ -4526,9 +4528,9 @@ void BossTw_DrawDeathBall(Actor* thisx, PlayState* play2) { for (i = 9; i >= 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_TwoTexScroll( + play->state.gfxCtx, G_TX_RENDERTILE, (((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)); tailIdx = ((this->work[TAIL_IDX] - i) + 30) % 30; Matrix_Translate(this->blastTailPos[tailIdx].x, this->blastTailPos[tailIdx].y, this->blastTailPos[tailIdx].z, MTXMODE_NEW); @@ -4934,7 +4936,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (currentEffect->frame * 3) & 0x7F, (currentEffect->frame * 15) & 0xFF, 0x20, 0x40, 1, 0, 0, 0x20, 0x20)); Matrix_Translate(currentEffect->pos.x, currentEffect->pos.y, currentEffect->pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); @@ -4959,7 +4961,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (currentEffect->frame * 3) & 0x7F, (currentEffect->frame * 15) & 0xFF, 0x20, 0x40, 1, 0, 0, 0x20, 0x20)); Matrix_Translate(currentEffect->pos.x, currentEffect->pos.y, currentEffect->pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); @@ -4982,7 +4984,7 @@ void BossTw_DrawEffects(PlayState* play) { } gSPSegment(POLY_XLU_DISP++, 0xD, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, currentEffect->frame & 0x7F, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, currentEffect->frame & 0x7F, (currentEffect->frame * 8) & 0xFF, 0x20, 0x40, 1, (currentEffect->frame * -2) & 0x7F, 0, 0x10, 0x10)); @@ -5028,8 +5030,9 @@ void BossTw_DrawEffects(PlayState* play) { if (materialFlag == 0) { gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(object_tw_DL_01AA50)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, 0, 0x20, 0x20)); materialFlag++; BossTw_InitRand(1, 0x71AC, 0x263A); } @@ -5078,7 +5081,7 @@ void BossTw_DrawEffects(PlayState* play) { } gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (currentEffect->frame * 3) & 0x7F, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (currentEffect->frame * 3) & 0x7F, (-currentEffect->frame * 15) & 0xFF, 0x20, 0x40, 1, 0, 0, 0x20, 0x20)); Matrix_Translate(currentEffect->pos.x, currentEffect->pos.y, currentEffect->pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 370bd5d124..cc26b44039 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -2870,9 +2870,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 8, 16, 1, 0, + (play->gameplayFrames * -2) % 64, 16, 16)); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, this->bodyGlow); Matrix_RotateX(-M_PI / 2, MTXMODE_APPLY); } else if ((limbIndex >= 10) && (limbIndex < 20)) { @@ -2923,8 +2923,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (play->gameplayFrames * 10) % 128, 16, 32, + 1, 0, (play->gameplayFrames * 5) % 128, 16, 32)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_va.c", 4232), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gBarinadeDL_008D70); @@ -3150,8 +3150,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (play->gameplayFrames * 10) % 32, 16, 32, 1, + 0, (play->gameplayFrames * -5) % 32, 16, 32)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_va.c", 4508), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, gBarinadeDL_000FA0); @@ -3200,11 +3200,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 8, 16, 1, 0, + (play->gameplayFrames * -10) % 16, 16, 16)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (play->gameplayFrames * -10) % 32, + 16, 0x20, 1, 0, (play->gameplayFrames * -5) % 32, 16, 32)); SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, BossVa_BodyOverrideLimbDraw, BossVa_BodyPostLimbDraw, this); } diff --git a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c index 8353e66de4..4dbb754143 100644 --- a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c +++ b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c @@ -566,7 +566,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0x7FFF - ((timer1 * 8) & 0x7FFF), 16, 512, 1, 0, 0x7FFF - ((timer1 * 8) & 0x7FFF), 16, 32)); { @@ -633,8 +633,9 @@ 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (0xFFF - (timer1 * 6)) & 0xFFF, + (timer1 * 12) & 0xFFF, 128, 64, 1, (0xFFF - (timer1 * 6)) & 0xFFF, + (timer1 * 12) & 0xFFF, 64, 32)); 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, "../z_demo_6k.c", 1189), @@ -734,7 +735,7 @@ void func_80968B70(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_6k.c", 1322), 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0xFF - ((timer2 * 2) & 0xFF), 0, 32, 32, 1, 0xFF - ((timer2 * 2) & 0xFF), (timer2 * 15) & 0x3FF, 16, 64)); if (this->timer2 < 40) { diff --git a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index b14f228626..2af79ba80d 100644 --- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -1676,21 +1676,21 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (frames * 4) % 256, (256 - ((frames * 2) % 256)) - 1, 64, 64, 1, (frames * 2) % 256, (256 - (frames % 256)) - 1, 16, 16)); break; case DEMO_EFFECT_JEWEL_GORON: gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (frames * 4) % 128, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (frames * 4) % 128, (256 - ((frames * 2) % 256)) - 1, 32, 64, 1, (frames * 2) % 256, (256 - (frames % 256)) - 1, 16, 8)); break; case DEMO_EFFECT_JEWEL_ZORA: gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (frames * 4) % 256, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (frames * 4) % 256, (256 - ((frames * 2) % 256)) - 1, 32, 32, 1, (frames * 2) % 256, (256 - (frames % 256)) - 1, 16, 16)); break; @@ -1740,8 +1740,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (frames * 2) % 512, 512 - (frames % 512) - 1, 128, + 128, 1, 512 - ((frames * 2) % 512) - 1, 0, 64, 64)); Matrix_Push(); Matrix_RotateY(0.0f, MTXMODE_APPLY); Matrix_RotateX(DEG_TO_RAD(11), MTXMODE_APPLY); @@ -1784,7 +1784,8 @@ void DemoEffect_DrawFireBall(Actor* thisx, PlayState* play) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 32, 1, 0, + 128 - ((frames * 20) % 128) - 1, 32, 32)); gSPDisplayList(POLY_XLU_DISP++, gCreationFireBallDL); CLOSE_DISPS(play->state.gfxCtx, "../z_demo_effect.c", 2723); } @@ -1814,10 +1815,10 @@ 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (frames * 4) % 512, 0, 128, 64, 1, + (frames * 2) % 256, 512 - ((frames * 70) % 512) - 1, 64, 32)); gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 16, 96, 1, (frames * 10) % 256, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 16, 96, 1, (frames * 10) % 256, 256 - ((frames * 30) % 512) - 1, 8, 32)); gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, this->primXluColor[0], this->primXluColor[1], this->primXluColor[2], 255); @@ -1926,8 +1927,8 @@ void DemoEffect_DrawLgtShower(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 2927), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (frames * 5) % 1024, 0, 256, 64, 1, + (frames * 10) % 128, 512 - ((frames * 50) % 512), 32, 16)); gSPDisplayList(POLY_XLU_DISP++, gEnliveningLightDL); CLOSE_DISPS(play->state.gfxCtx, "../z_demo_effect.c", 2942); } @@ -1948,8 +1949,8 @@ void DemoEffect_DrawLightRing(Actor* thisx, PlayState* play2) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 2963), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (frames * 5) % 64, 512 - ((frames * 2) % 512) - 1, + 16, 128, 1, 0, 0, 8, 1024)); gSPDisplayList(POLY_XLU_DISP++, gGoldenGoddessLightRingDL); CLOSE_DISPS(play->state.gfxCtx, "../z_demo_effect.c", 2978); @@ -1975,8 +1976,8 @@ void DemoEffect_DrawTriforceSpot(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 3011), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 256 - ((frames * 4) % 256) - 1, 64, 64, + 1, 0, 256 - ((frames * 2) % 256) - 1, 64, 32)); 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); @@ -1997,7 +1998,8 @@ void DemoEffect_DrawTriforceSpot(Actor* thisx, PlayState* play) { Matrix_RotateY(BINANG_TO_RAD(this->triforceSpot.rotation), MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 3053), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 16, 1, 0, 0, 16, 8)); 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); @@ -2008,7 +2010,8 @@ void DemoEffect_DrawTriforceSpot(Actor* thisx, PlayState* play) { Matrix_RotateY(BINANG_TO_RAD(this->triforceSpot.rotation), MTXMODE_APPLY); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 3085), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 16, 1, 0, 0, 16, 8)); gDPSetPrimColor(POLY_OPA_DISP++, 128, 128, 255, 255, 160, 255); gDPSetEnvColor(POLY_OPA_DISP++, 170, 140, 0, 255); gSPDisplayList(POLY_OPA_DISP++, gTriforceDL); @@ -2048,8 +2051,9 @@ s32 DemoEffect_OverrideLimbDrawTimeWarp(PlayState* play, SkelCurve* skelCurve, s 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (frames * 6) % 1024, + 256 - ((frames * 16) % 256) - 1, 256, 64, 1, (frames * 4) % 512, + 128 - ((frames * 12) % 128) - 1, 128, 32)); CLOSE_DISPS(play->state.gfxCtx, "../z_demo_effect.c", 3172); if (limbIndex == 0) { diff --git a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c index 594a595515..60bcf5cddf 100644 --- a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c +++ b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c @@ -295,16 +295,17 @@ void DemoKekkai_DrawTrialBarrier(Actor* thisx, PlayState* play2) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_kekkai.c", 639), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, frames * 5, frames * -10, 0x20, 0x20, 1, + frames * 5, frames * -10, 0x20, 0x20)); gSPDisplayList(POLY_XLU_DISP++, gTrialBarrierOrbDL); Matrix_Pop(); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_kekkai.c", 656), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, frames, frames, 0x20, 0x20)); gSPDisplayList(POLY_XLU_DISP++, gTrialBarrierFloorDL); gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0x00, 0x80, sEnergyColors[colorIndex + 0], sEnergyColors[colorIndex + 1], @@ -312,8 +313,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, frames * 5, frames * -10, 0x20, 0x20, 1, + frames * 5, frames * -10, 0x20, 0x40)); gSPDisplayList(POLY_XLU_DISP++, gTrialBarrierEnergyDL); CLOSE_DISPS(play->state.gfxCtx, "../z_demo_kekkai.c", 696); } @@ -331,8 +332,8 @@ void DemoKekkai_DrawTowerBarrier(Actor* thisx, PlayState* play) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, scroll * 2, scroll * -4, 0x20, 0x40, 1, scroll * 2, + scroll * -4, 0x20, 0x40)); gSPDisplayList(POLY_XLU_DISP++, gTowerBarrierDL); CLOSE_DISPS(play->state.gfxCtx, "../z_demo_kekkai.c", 722); } diff --git a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c index ab341b403c..a00db2d38b 100644 --- a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c +++ b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c @@ -112,12 +112,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0x3FF - ((unk_14E * 5) & 0x3FF), 16, + 256, 1, 0, 255 - ((unk_14E * 5) & 255), 32, 32)); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0x3FF - ((unk_14E * 5) & 0x3FF), 16, + 256, 1, 0, 255 - ((unk_14E * 5) & 255), 32, 32)); gSPDisplayList(POLY_XLU_DISP++, D_809934B8); } diff --git a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c index dd1eadb1ed..82a1acab8e 100644 --- a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c +++ b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c @@ -137,7 +137,7 @@ s32 DemoTreLgt_OverrideLimbDraw(PlayState* play, SkelCurve* skelCurve, s32 limbI OPEN_DISPS(play->state.gfxCtx, "../z_demo_tre_lgt.c", 423); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (play->state.frames * 2) % 256, 0, 64, 32, 1, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (play->state.frames * 2) % 256, 0, 64, 32, 1, (play->state.frames * -2) % 256, 0, 64, 32)); if (limbIndex == 1) { diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index adc36a539e..0c8b8034fd 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -967,9 +967,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 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)); Matrix_Translate(0.0f, this->unk_194 * 230.0f, 0.0f, MTXMODE_APPLY); xzScale = (((f32)this->unk_1AE * spE8) / 100.0f) + 1.0f; @@ -1004,8 +1004,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, spEC & 0xFF, -((s16)this->unk_19C & 511), + 0x100, 0x100, 1, spEC & 0xFF, -((s16)this->unk_19C & 511), 0x100, 0x100)); Matrix_Translate(0.0f, this->unk_198 * 60.0f, 0.0f, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c index 19be1612aa..648c2ba1b9 100644 --- a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c +++ b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c @@ -119,16 +119,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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, this->unk_14C * 1, this->unk_14E * -4, 32, 64, 1, this->unk_14C * 4, this->unk_14E * -20, 64, 64)); - 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, this->unk_150 * -4, 16, 128, 1, 0, + this->unk_150 * 12, 32, 32)); - 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, this->unk_150 * -4, 16, 128, 1, 0, + this->unk_150 * 12, 32, 32)); Matrix_Push(); Matrix_Scale(0.8f, 0.8f, 0.8f, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_En_Ba/z_en_ba.c b/src/overlays/actors/ovl_En_Ba/z_en_ba.c index a5f5e32671..c2996b1109 100644 --- a/src/overlays/actors/ovl_En_Ba/z_en_ba.c +++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.c @@ -484,9 +484,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 16, 16, 1, 0, + (play->gameplayFrames * -10) % 128, 32, 32)); for (i = 0; i < 14; i++, mtx++) { Matrix_Translate(this->unk_158[i].x, this->unk_158[i].y, this->unk_158[i].z, MTXMODE_NEW); Matrix_RotateZYX(this->unk_2A8[i].x, this->unk_2A8[i].y, this->unk_2A8[i].z, MTXMODE_APPLY); @@ -510,7 +510,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (play->gameplayFrames * 2) % 128, (play->gameplayFrames * 2) % 128, 32, 32, 1, (play->gameplayFrames * -5) % 128, (play->gameplayFrames * -5) % 128, 32, 32)); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 125, 100, 255); diff --git a/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/src/overlays/actors/ovl_En_Bb/z_en_bb.c index 3f7e11aac3..04919ca125 100644 --- a/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -1327,7 +1327,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, ((play->gameplayFrames + (this->flameScrollMod * 10)) * (-20 - (this->flameScrollMod * -2))) % 0x200, diff --git a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c index 7378c8ef3d..01e6474f6d 100644 --- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -156,8 +156,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames, 0, 32, 32, 1, gameplayFrames, 0, 32, 32)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_blkobj.c", 363), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/overlays/actors/ovl_En_Bw/z_en_bw.c b/src/overlays/actors/ovl_En_Bw/z_en_bw.c index 824bbce091..454cd26a5d 100644 --- a/src/overlays/actors/ovl_En_Bw/z_en_bw.c +++ b/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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x20, 1, 0, this->unk_23A, 0x20, 0x20)); if ((this->unk_220 == 1) || (this->unk_220 == 5)) { Matrix_Push(); Matrix_Scale(1.0f, 1.0f, 1.0f, MTXMODE_APPLY); @@ -884,8 +885,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, + (play->gameplayFrames * -20) % 0x200, 0x20, 0x80)); 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/src/overlays/actors/ovl_En_Bx/z_en_bx.c b/src/overlays/actors/ovl_En_Bx/z_en_bx.c index 91564562e8..e0693d0f3b 100644 --- a/src/overlays/actors/ovl_En_Bx/z_en_bx.c +++ b/src/overlays/actors/ovl_En_Bx/z_en_bx.c @@ -212,7 +212,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 16, 16, 1, 0, + (play->gameplayFrames * -10) % 128, 32, 32)); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_bx.c", 478), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index d72850a7b3..793301d853 100644 --- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -957,8 +957,9 @@ void EnClearTag_DrawEffects(PlayState* play) { 128); 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)); + gSPSegment( + POLY_XLU_DISP++, 8, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, effect->random * -5, 32, 64, 1, 0, 0, 32, 32)); 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); @@ -983,9 +984,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (effect->random * -15) & 0xFF, 32, 64, + 1, 0, 0, 32, 32)); 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/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/src/overlays/actors/ovl_En_Dh/z_en_dh.c index c00117084a..587ca0bd15 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -569,8 +569,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (play->state.frames * -3) % 0x80, 0, 0x20, + 0x40, 1, (play->state.frames * -10) % 0x80, (play->state.frames * -20) % 0x100, + 0x20, 0x40)); 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/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c index 26b9308daa..e6a4a37501 100644 --- a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c +++ b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c @@ -113,8 +113,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, play->state.frames * 2, 0, 0x20, 0x40, 1, + play->state.frames, play->state.frames * -8, 0x10, 0x10)); gDPPipeSync(POLY_XLU_DISP++); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_dy_extra.c", 307), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/src/overlays/actors/ovl_En_Fd/z_en_fd.c index 688229b035..3b7703f7c3 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -779,7 +779,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, + 0xFF - (u8)(frames * 6), 8, 0x40)); gDPPipeSync(POLY_XLU_DISP++); gSPSegment(POLY_XLU_DISP++, 0x9, D_80116280); diff --git a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c index dd21184ae5..be6238d397 100644 --- a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c +++ b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c @@ -268,9 +268,9 @@ void EnFdFire_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_fd_fire.c", 623), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, + play->state.frames * this->tile2Y, 0x20, 0x80)); 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/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c index a5c2c1c957..eeb95d2b1d 100644 --- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c +++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c @@ -739,7 +739,7 @@ void EnFhgFire_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_fhg_fire.c", 1833), 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], + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (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)); diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index a6882bfb8f..74907881be 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -727,7 +727,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, play->state.frames & 0x7F, 32, 32, 1, 0, (2 * play->state.frames) & 0x7F, 32, 32)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_fz.c", 1183), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -874,7 +874,7 @@ void EnFz_DrawEffects(EnFz* this, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, effect->primAlpha); gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 3 * (effect->timer + (3 * i)), + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 3 * (effect->timer + (3 * i)), 15 * (effect->timer + (3 * i)), 32, 64, 1, 0, 0, 32, 32)); Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); diff --git a/src/overlays/actors/ovl_En_Gb/z_en_gb.c b/src/overlays/actors/ovl_En_Gb/z_en_gb.c index affb5f0f48..f91d4da7be 100644 --- a/src/overlays/actors/ovl_En_Gb/z_en_gb.c +++ b/src/overlays/actors/ovl_En_Gb/z_en_gb.c @@ -524,7 +524,7 @@ void EnGb_DrawCagedSouls(EnGb* this, PlayState* play) { s32 idx = this->cagedSouls[i].infoIdx; gSPSegment(POLY_XLU_DISP++, 0x08, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 64, 1, 0, (u32)(sCagedSoulInfo[idx].timerMultiplier * this->frameTimer) % 512, 32, 128)); 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, diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 858443281d..39877c50ba 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -601,7 +601,8 @@ void EnGs_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_en_gs.c", 1087), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, -frames * 0x14, + 0x20, 0x80)); 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/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c index 0a3943b94d..024ead6217 100644 --- a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c +++ b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c @@ -521,8 +521,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, this->flameScroll, 0x20, 0x80)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 200, 0, 255); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); Matrix_RotateY(BINANG_TO_RAD((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) - this->actor.shape.rot.y + 0x8000)), diff --git a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c index 83cba8a6f6..9cae00c9f9 100644 --- a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c +++ b/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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 64, 1, 0, + (play->state.frames * -20) % 512, 32, 128)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 170, 255, 255, this->alpha); diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.c b/src/overlays/actors/ovl_En_Light/z_en_light.c index db54898f82..f3c155d5ee 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.c +++ b/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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 64, 1, 0, (this->timer * -20) & 511, + 32, 128)); dList = gEffFire1DL; gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, flameParams->primColor.r, flameParams->primColor.g, @@ -172,7 +173,7 @@ 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), + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 16, 32, 1, ((this->timer * 2) & 63), (this->timer * -6) & 127 * 1, 16, 32)); dList = gUnusedCandleDL; diff --git a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c index 2c7cb84ff6..3b2f699e1b 100644 --- a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c +++ b/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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, + 0xFF - ((u8)(s32)(this->unk_1B4 * 30) & 0xFF), 0, 0x40, 0x20, 1, + 0xFF - ((u8)(s32)(this->unk_1B4 * 20) & 0xFF), 0, 8, 8)); break; } @@ -387,8 +388,8 @@ void EnMThunder_Draw(Actor* thisx, PlayState* play2) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (play->gameplayFrames * 5) & 0xFF, 0, 0x20, 0x20, + 1, (play->gameplayFrames * 20) & 0xFF, (play->gameplayFrames * phi_t1) & 0xFF, 8, 8)); gSPDisplayList(POLY_XLU_DISP++, gSpinAttackChargingDL); diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c index 854cb7f2b4..e885641de2 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -280,14 +280,15 @@ void EnMag_DrawEffectTextures(Gfx** gfxp, void* maskTex, void* effectTex, s16 ma s16 rectHeight, u16 dsdx, u16 dtdy, u16 shifts, u16 shiftt, u16 flag, EnMag* this) { Gfx* gfx = *gfxp; - gDPLoadMultiBlock_4b(gfx++, maskTex, 0x0000, 0, G_IM_FMT_I, maskWidth, maskHeight, 0, G_TX_NOMIRROR | G_TX_WRAP, - G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + gDPLoadMultiBlock_4b(gfx++, maskTex, 0x0000, G_TX_RENDERTILE, G_IM_FMT_I, maskWidth, maskHeight, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, + G_TX_NOLOD); if (!flag) { gDPLoadMultiBlock(gfx++, effectTex, 0x0100, 1, G_IM_FMT_I, G_IM_SIZ_8b, effectWidth, effectHeight, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, 5, shifts, shiftt); - gDPSetTileSize(gfx++, 1, 0, this->effectScroll & 0x7F, 0x7C, (this->effectScroll & 0x7F) + 0x7C); + gDPSetTileSize(gfx++, 1, 0, this->effectScroll & 0x7F, 31 << 2, (31 << 2) + (this->effectScroll & 0x7F)); } gSPTextureRectangle(gfx++, rectLeft << 2, rectTop << 2, (rectLeft + rectWidth) << 2, (rectTop + rectHeight) << 2, @@ -471,7 +472,7 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxp) { G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gfx++, 312, 792, 952, 856, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); + gSPTextureRectangle(gfx++, 78 << 2, 198 << 2, 238 << 2, 214 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } if (gSaveContext.fileNum == 0xFEDC) { diff --git a/src/overlays/actors/ovl_En_Ny/z_en_ny.c b/src/overlays/actors/ovl_En_Ny/z_en_ny.c index c3e5d7c4b6..0e375719dd 100644 --- a/src/overlays/actors/ovl_En_Ny/z_en_ny.c +++ b/src/overlays/actors/ovl_En_Ny/z_en_ny.c @@ -574,7 +574,7 @@ void EnNy_DrawDeathEffect(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_en_ny.c", 900); Gfx_SetupDL_25Opa(play->state.gfxCtx); - gDPSetEnvColor(POLY_OPA_DISP++, 0x00, 0x00, 0x00, 0xFF); + gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); gDPSetRenderMode(POLY_OPA_DISP++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2); gDPPipeSync(POLY_OPA_DISP++); for (i = 0; i < 8; i++) { diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index 2b70d4e60d..ec41e1acc3 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -2264,7 +2264,7 @@ void EnOssan_DrawCursor(PlayState* play, EnOssan* this, f32 x, f32 y, f32 z, u8 void EnOssan_DrawTextRec(PlayState* play, s32 r, s32 g, s32 b, s32 a, f32 x, f32 y, f32 z, s32 s, s32 t, f32 dx, f32 dy) { - f32 unk; + f32 texCoordScale; s32 ulx, uly, lrx, lry; f32 w, h; s32 dsdx, dtdy; @@ -2275,9 +2275,9 @@ void EnOssan_DrawTextRec(PlayState* play, s32 r, s32 g, s32 b, s32 a, f32 x, f32 w = 8.0f * z; h = 12.0f * z; - unk = (1.0f / z) * 1024; - dsdx = unk * dx; - dtdy = dy * unk; + texCoordScale = (1.0f / z) * 1024; + dsdx = texCoordScale * dx; + dtdy = dy * texCoordScale; ulx = (x - w) * 4.0f; uly = (y - h) * 4.0f; diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c index 5c1ffda408..688f1d8853 100644 --- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c +++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c @@ -777,9 +777,9 @@ void EnPoField_DrawFlame(EnPoField* this, PlayState* play) { if (this->flameTimer != 0) { OPEN_DISPS(play->state.gfxCtx, "../z_en_po_field.c", 1669); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 64, 1, 0, + (play->gameplayFrames * -20) % 512, 32, 128)); 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); @@ -985,7 +985,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, (play->gameplayFrames * info->unk_9) & 0x1FF, 0x20, 0x80)); 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, diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 2047e8e0b2..e1b0f7f1dc 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -1372,8 +1372,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, + (play->gameplayFrames * -20) % 512, 0x20, 0x80)); 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/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index dbcc878df0..37331f17bb 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -1184,7 +1184,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, (this->visibilityTimer * this->info->unk_8) % 512U, 0x20, 0x80)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, this->info->primColor.r, this->info->primColor.g, this->info->primColor.b, this->lightColor.a); diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/src/overlays/actors/ovl_En_Rr/z_en_rr.c index 8f888b887a..75908ef3c1 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (this->scrollTimer * 0) & 0x7F, + (this->scrollTimer * 0) & 0x3F, 32, 16, 1, (this->scrollTimer * 0) & 0x3F, + (this->scrollTimer * -6) & 0x7F, 32, 16)); Matrix_Push(); Matrix_Scale((1.0f + this->bodySegs[RR_BASE].scaleMod.x) * this->bodySegs[RR_BASE].scale.x, diff --git a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c index 08f38d5d0d..541c01db41 100644 --- a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c +++ b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c @@ -289,7 +289,8 @@ void EnSiofuki_Draw(Actor* thisx, PlayState* play) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, x, y, 64, 64, 1, x, y, 64, 64)); gSPDisplayList(POLY_XLU_DISP++, object_siofuki_DL_000B70); CLOSE_DISPS(play->state.gfxCtx, "../z_en_siofuki.c", 674); diff --git a/src/overlays/actors/ovl_En_Stream/z_en_stream.c b/src/overlays/actors/ovl_En_Stream/z_en_stream.c index 9934941fd5..9d2bf23751 100644 --- a/src/overlays/actors/ovl_En_Stream/z_en_stream.c +++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.c @@ -137,8 +137,8 @@ void EnStream_Draw(Actor* thisx, PlayState* play) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, frames * 30, -multipliedFrames, 0x40, 0x40, 1, + multipliedFrames, -multipliedFrames, 0x40, 0x40)); gSPDisplayList(POLY_XLU_DISP++, object_stream_DL_000950); CLOSE_DISPS(play->state.gfxCtx, "../z_en_stream.c", 310); } diff --git a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c index c5dddfa324..56cbfcbd85 100644 --- a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c +++ b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c @@ -847,8 +847,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 64, 1, 0, + (10 * i - 20 * play->state.frames) % 512, 32, 128)); 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, "../z_en_viewer.c", 2027), diff --git a/src/overlays/actors/ovl_En_Vm/z_en_vm.c b/src/overlays/actors/ovl_En_Vm/z_en_vm.c index a01b62855f..f873ca4c0d 100644 --- a/src/overlays/actors/ovl_En_Vm/z_en_vm.c +++ b/src/overlays/actors/ovl_En_Vm/z_en_vm.c @@ -430,7 +430,7 @@ void EnVm_Update(Actor* thisx, PlayState* play) { } this->actionFunc(this, play); - this->beamTexScroll += 0xC; + this->beamTexScroll += 3 << 2; if (this->actor.colChkInfo.health != 0 && this->unk_21C != 2) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_BIMOS_ROLL_HEAD - SFX_FLAG); diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index f3b1d0ca9c..e91e607d08 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -1237,8 +1237,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, effect->timer + (i * 3), + (effect->timer + (i * 3)) * 5, 32, 64, 1, 0, 0, 32, 32)); Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); @@ -1379,8 +1379,8 @@ void Fishing_DrawStreamSplash(PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_fishing.c", 2572); 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, play->gameplayFrames * 1, play->gameplayFrames * 8, + 32, 64, 1, -(play->gameplayFrames * 2), 0, 16, 16)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 225, 235, 50); diff --git a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c index 22d591cd9b..345a7a07a2 100644 --- a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c +++ b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c @@ -230,8 +230,9 @@ void MagicDark_DiamondDraw(Actor* thisx, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 170, 255, 255, (s32)(this->primAlpha * 0.6f) & 0xFF); gDPSetEnvColor(POLY_XLU_DISP++, 0, 100, 255, 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, gameplayFrames * 2, gameplayFrames * -4, + 32, 32, 1, 0, gameplayFrames * -16, 64, 32)); gSPDisplayList(POLY_XLU_DISP++, sDiamondModelDL); } diff --git a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c index bfc38a295b..437526fa80 100644 --- a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c +++ b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c @@ -246,10 +246,10 @@ void MagicFire_Draw(Actor* thisx, PlayState* play) { G_TX_NOMIRROR | G_TX_WRAP, 6, 6, 15, G_TX_NOLOD); gDPSetTile(POLY_XLU_DISP++, G_IM_FMT_I, G_IM_SIZ_8b, 8, 0, 1, 0, G_TX_NOMIRROR | G_TX_WRAP, 6, 14, G_TX_NOMIRROR | G_TX_WRAP, 6, 14); - gDPSetTileSize(POLY_XLU_DISP++, 1, 0, 0, 252, 252); + gDPSetTileSize(POLY_XLU_DISP++, 1, 0, 0, 63 << 2, 63 << 2); gSPDisplayList(POLY_XLU_DISP++, sMaterialDL); gSPDisplayList(POLY_XLU_DISP++, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (gameplayFrames * 2) % 512, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (gameplayFrames * 2) % 512, 511 - ((gameplayFrames * 5) % 512), 64, 64, 1, (gameplayFrames * 2) % 256, 255 - ((gameplayFrames * 20) % 256), 32, 32)); gSPDisplayList(POLY_XLU_DISP++, sModelDL); diff --git a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c index aea488b2c6..b7b3f72680 100644 --- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c +++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c @@ -150,14 +150,14 @@ s32 MagicWind_OverrideLimbDraw(PlayState* play, SkelCurve* skelCurve, s32 limbIn if (limbIndex == 1) { gSPSegment(POLY_XLU_DISP++, 8, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (play->state.frames * 9) & 0xFF, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (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)); } else if (limbIndex == 2) { gSPSegment(POLY_XLU_DISP++, 9, - Gfx_TwoTexScroll(play->state.gfxCtx, 0, (play->state.frames * 3) & 0xFF, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, (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)); diff --git a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c index 010aace524..4b2294116d 100644 --- a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c +++ b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c @@ -160,7 +160,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, frameCount % 128, 0, 32, 32, 1, frameCount % 128, + 0, 32, 32)); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_obj_dekujr.c", 399), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, object_dekujr_DL_0032D8); diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c index d21d0cf131..21adad8da3 100644 --- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c +++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c @@ -200,7 +200,7 @@ void ObjIcePoly_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_obj_ice_poly.c", 428), 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, play->gameplayFrames % 0x100, 0x20, 0x10, 1, 0, (play->gameplayFrames * 2) % 0x100, 0x40, 0x20)); gDPSetEnvColor(POLY_XLU_DISP++, 0, 50, 100, this->alpha); gSPDisplayList(POLY_XLU_DISP++, gEffIceFragment3DL); diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index ea0e824e65..43d4c81ae2 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -780,8 +780,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, this->x1TexScroll, this->y1TexScroll, 0x20, 0x20, + 1, this->x2TexScroll, this->y2TexScroll, 0x20, 0x20)); gSPDisplayList(POLY_OPA_DISP++, opaDLists[subType]); CLOSE_DISPS(play->state.gfxCtx, "../z_obj_switch.c", 1533); diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index 35de4b893b..b620726e36 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -286,8 +286,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, + (this->flameTexScroll * -20) & 0x1FF, 0x20, 0x80)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, 255); diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index 2b2ecfeedd..1a57aece48 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -941,8 +941,9 @@ void ObjectKankyo_DrawBeams(Actor* thisx, 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, "../z_object_kankyo.c", 1586), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, play->state.frames * 5, + play->state.frames * 10, 32, 64, 1, play->state.frames * 5, + play->state.frames * 10, 32, 64)); gSPDisplayList(POLY_XLU_DISP++, gDemoKekkaiDL_005FF0); } } diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c index 09ed4dbec6..51a45d6cd0 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/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, "../z_oceff_spot.c", 469), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, scroll * 2, scroll * (-2), 32, + 32, 1, 0, scroll * (-8), 32, 32)); gSPDisplayList(POLY_XLU_DISP++, sCylinderModelDL); CLOSE_DISPS(play->state.gfxCtx, "../z_oceff_spot.c", 485); diff --git a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c index 8b6447e69e..31f3e2ed76 100644 --- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -137,10 +137,10 @@ 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)); - gSPTextureRectangle(POLY_XLU_DISP++, 0, 0, (SCREEN_WIDTH << 2), (SCREEN_HEIGHT << 2), G_TX_RENDERTILE, 0, 0, 140, - (1 << 15) | (31 << 10) | 884); + gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, scroll * 8, scroll * 4, 64, + 64, 1, scroll * 4, scroll * 4, 64, 64)); + gSPTextureRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH << 2, SCREEN_HEIGHT << 2, G_TX_RENDERTILE, 0, 0, + (s32)(0.13671875 * (1 << 10)), (s32)(-0.13671875 * (1 << 10))); CLOSE_DISPS(play->state.gfxCtx, "../z_oceff_storm.c", 477); } @@ -166,8 +166,8 @@ void OceffStorm_Draw(Actor* thisx, PlayState* play) { 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, scroll * 4, (0 - scroll) * 8, + 32, 32, 1, scroll * 8, (0 - scroll) * 12, 32, 32)); gSPDisplayList(POLY_XLU_DISP++, sCylinderModelDL); CLOSE_DISPS(play->state.gfxCtx, "../z_oceff_storm.c", 512); diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index dac291b034..06ce3449fe 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -120,8 +120,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0 - scroll, scroll * (-2), 32, + 32, 1, 0 - scroll, scroll * (-2), 32, 32)); gSPDisplayList(POLY_XLU_DISP++, sFrustumDL); CLOSE_DISPS(play->state.gfxCtx, "../z_oceff_wipe.c", 398); diff --git a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c index 8878cfeb1d..2bb9247696 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c +++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c @@ -102,8 +102,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, scroll * 6, scroll * (-6), 64, + 64, 1, scroll * (-6), 0, 64, 64)); gSPDisplayList(POLY_XLU_DISP++, sFrustumDL); CLOSE_DISPS(play->state.gfxCtx, "../z_oceff_wipe2.c", 417); diff --git a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c index 92dba716fd..3a05b14d07 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c +++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c @@ -103,8 +103,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, scroll * 12, scroll * (-12), + 64, 64, 1, scroll * 8, scroll * (-8), 64, 64)); gSPDisplayList(POLY_XLU_DISP++, sFrustumDL); CLOSE_DISPS(play->state.gfxCtx, "../z_oceff_wipe3.c", 370); diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c index fc323b7153..69e79ad1a4 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, scroll * 2, scroll * (-2), 32, + 64, 1, scroll * (-1), scroll, 32, 32)); gSPDisplayList(POLY_XLU_DISP++, &sMaterial2DL[11]); CLOSE_DISPS(play->state.gfxCtx, "../z_oceff_wipe4.c", 344); diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 5990fdaef4..e335eea240 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -10645,8 +10645,8 @@ void Player_DrawGameplay(PlayState* play, Player* this, s32 lod, Gfx* cullDList, gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_player.c", 19317), 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 16, 32, 1, 0, + (play->gameplayFrames * -15) % 128, 16, 32)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 255, D_8085486C); gDPSetEnvColor(POLY_XLU_DISP++, 120, 90, 30, 128); gSPDisplayList(POLY_XLU_DISP++, gHoverBootsCircleDL); @@ -10733,8 +10733,8 @@ void Player_Draw(Actor* thisx, PlayState* play2) { f32 scale = (this->unk_84F >> 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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (0 - play->gameplayFrames) % 128, 32, + 32, 1, 0, (play->gameplayFrames * -2) % 128, 32, 32)); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_player.c", 19459), diff --git a/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c b/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c index addd4e8bea..c1ff85de48 100644 --- a/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c +++ b/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c @@ -90,9 +90,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, + (this->rScroll * -0x14) & 0x1FF, 0x20, 0x80)); if (((this->rFlags & 0x7FFF) != 0) || (this->life < 18)) { gSPDisplayList(POLY_XLU_DISP++, gEffFire2DL); diff --git a/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c b/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c index 038cb3755c..91d056a820 100644 --- a/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c +++ b/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c @@ -123,7 +123,7 @@ 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, gameplayFrames & 0xFF, 0x20, 0x10, 1, 0, (gameplayFrames * 2) & 0xFF, 0x40, 0x20)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA); diff --git a/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c b/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c index ebe3213e6c..e407d44b4b 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c +++ b/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c @@ -62,7 +62,7 @@ void EffectSsFcircle_Draw(PlayState* play, u32 index, EffectSs* this) { 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, + Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, play->gameplayFrames % 128, 0, 32, 64, 1, 0, ((play->gameplayFrames) * -0xF) % 256, 32, 64)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 220, 0, (this->life * 12.75f)); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); diff --git a/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c b/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c index df915ca025..03fd761ec3 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c +++ b/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c @@ -124,9 +124,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 32, 64, 1, 0, + (play->state.frames * -0x14) & 0x1FF, 32, 128)); if (this->rType != 0) { gSPDisplayList(POLY_XLU_DISP++, gEffFire2DL); diff --git a/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c b/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c index cf5c0de759..92c3cc1793 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c +++ b/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c @@ -71,8 +71,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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, (1 * frames) % 256, 0x20, 0x10, 1, 0, + (2 * frames) % 256, 0x40, 0x20)); gSPDisplayList(POLY_XLU_DISP++, gEffIceFragment1DL); CLOSE_DISPS(gfxCtx, "../z_eff_ice_piece.c", 209); diff --git a/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c b/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c index d79e5d9861..1cd7beecc0 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c +++ b/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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, this->life * 3, this->life * 15, 32, 64, 1, 0, + 0, 32, 32)); 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/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c b/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c index b5666bf040..bcc7e86d63 100644 --- a/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c +++ b/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_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, + play->state.frames * this->rScroll, 0x20, 0x80)); if (this->rType >= 100) { gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, this->rAlpha); diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index 6ee600802c..58bd49fb92 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -1684,7 +1684,8 @@ void FileSelect_Main(GameState* thisx) { gDPLoadTextureBlock(POLY_OPA_DISP++, controlsTextures[gSaveContext.language], G_IM_FMT_IA, G_IM_SIZ_8b, 144, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(POLY_OPA_DISP++, 0x0168, 0x0330, 0x03A8, 0x0370, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400); + gSPTextureRectangle(POLY_OPA_DISP++, 90 << 2, 204 << 2, 234 << 2, 220 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, + 1 << 10); } gDPPipeSync(POLY_OPA_DISP++); diff --git a/src/overlays/gamestates/ovl_title/z_title.c b/src/overlays/gamestates/ovl_title/z_title.c index 846989e0c3..8b1c0e0061 100644 --- a/src/overlays/gamestates/ovl_title/z_title.c +++ b/src/overlays/gamestates/ovl_title/z_title.c @@ -91,7 +91,7 @@ void ConsoleLogo_Draw(ConsoleLogoState* this) { Gfx_SetupDL_39Opa(this->state.gfxCtx); gDPPipeSync(POLY_OPA_DISP++); gDPSetCycleType(POLY_OPA_DISP++, G_CYC_2CYCLE); - gDPSetRenderMode(POLY_OPA_DISP++, G_RM_XLU_SURF2, G_RM_OPA_CI | CVG_DST_WRAP); + gDPSetRenderMode(POLY_OPA_DISP++, G_RM_PASS, G_RM_CLD_SURF2); gDPSetCombineLERP(POLY_OPA_DISP++, TEXEL1, PRIMITIVE, ENV_ALPHA, TEXEL0, 0, 0, 0, TEXEL0, PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, COMBINED, 0, PRIMITIVE, 0); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 170, 255, 255, 255); @@ -105,7 +105,7 @@ void ConsoleLogo_Draw(ConsoleLogoState* this) { G_IM_SIZ_8b, 192, 2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gDPSetTileSize(POLY_OPA_DISP++, 1, this->uls, (this->ult & 0x7F) - idx * 4, 0, 0); + gDPSetTileSize(POLY_OPA_DISP++, 1, this->uls, (this->ult & 0x7F) - (idx << 2), 0, 0); gSPTextureRectangle(POLY_OPA_DISP++, 97 << 2, y << 2, 289 << 2, (y + 2) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c index 336a8dea03..b77afa0ce0 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c @@ -2227,26 +2227,26 @@ void KaleidoScope_DrawGameOver(PlayState* play) { VREG(89) -= 2; - gDPLoadMultiBlock(POLY_OPA_DISP++, gGameOverP1Tex, 0, 0, G_IM_FMT_IA, G_IM_SIZ_8b, 64, 32, 0, + gDPLoadMultiBlock(POLY_OPA_DISP++, gGameOverP1Tex, 0x0000, G_TX_RENDERTILE, G_IM_FMT_IA, G_IM_SIZ_8b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gDPLoadMultiBlock(POLY_OPA_DISP++, gGameOverMaskTex, 256, 1, G_IM_FMT_IA, G_IM_SIZ_8b, 64, 32, 0, + gDPLoadMultiBlock(POLY_OPA_DISP++, gGameOverMaskTex, 0x0100, 1, G_IM_FMT_IA, G_IM_SIZ_8b, 64, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, 5, G_TX_NOLOD, G_TX_NOLOD); - gDPSetTileSize(POLY_OPA_DISP++, 1, 0, VREG(89) & 0x7F, 252, (VREG(89) & 0x7F) + 0x7C); + gDPSetTileSize(POLY_OPA_DISP++, 1, 0, VREG(89) & 0x7F, 63 << 2, (31 << 2) + (VREG(89) & 0x7F)); gSPTextureRectangle(POLY_OPA_DISP++, VREG(87) << 2, VREG(88) << 2, (VREG(87) + 64) << 2, (VREG(88) + 32) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); - gDPLoadMultiBlock(POLY_OPA_DISP++, gGameOverP2Tex, 0, 0, G_IM_FMT_IA, G_IM_SIZ_8b, 64, 32, 0, + gDPLoadMultiBlock(POLY_OPA_DISP++, gGameOverP2Tex, 0x0000, G_TX_RENDERTILE, G_IM_FMT_IA, G_IM_SIZ_8b, 64, 32, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle(POLY_OPA_DISP++, (VREG(87) + 64) << 2, VREG(88) << 2, (VREG(87) + 128) << 2, (VREG(88) + 32) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); - gDPLoadMultiBlock(POLY_OPA_DISP++, gGameOverP3Tex, 0, 0, G_IM_FMT_IA, G_IM_SIZ_8b, 64, 32, 0, + gDPLoadMultiBlock(POLY_OPA_DISP++, gGameOverP3Tex, 0x0000, G_TX_RENDERTILE, G_IM_FMT_IA, G_IM_SIZ_8b, 64, 32, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle(POLY_OPA_DISP++, (VREG(87) + 128) << 2, VREG(88) << 2, (VREG(87) + 192) << 2,