summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorTharo <17233964+Thar0@users.noreply.github.com>2022-07-30 22:49:10 +0100
committerGitHub <noreply@github.com>2022-07-30 17:49:10 -0400
commit455321d2e85af40e5e0d14370dc10593618f3ce2 (patch)
treeb59be0bd805246e01aa903c3df81b5b382512685 /src/code
parentafbc312024100187fa1169ca32723acd338ea85a (diff)
Fix various small gfx issues (#1313)
* Fix various small gfx issues * Use 0xFFFF instead of -1 for max prim depth * More fixed point numbers * scale -> texCoordScale, better cycle 2 render mode in z_title * GFXP_CHAR_* defines renamed to SPACING * Fix some gDPLoadMultiBlock uses
Diffstat (limited to 'src/code')
-rw-r--r--src/code/PreRender.c2
-rw-r--r--src/code/code_800ACE70.c2
-rw-r--r--src/code/code_800AD920.c4
-rw-r--r--src/code/gfxprint.c28
-rw-r--r--src/code/speed_meter.c20
-rw-r--r--src/code/z_actor.c9
-rw-r--r--src/code/z_draw.c57
-rw-r--r--src/code/z_fbdemo_circle.c20
-rw-r--r--src/code/z_fbdemo_wipe1.c18
-rw-r--r--src/code/z_kankyo.c4
-rw-r--r--src/code/z_parameter.c35
-rw-r--r--src/code/z_rcp.c32
-rw-r--r--src/code/z_scene_table.c346
13 files changed, 313 insertions, 264 deletions
diff --git a/src/code/PreRender.c b/src/code/PreRender.c
index 3983361e8..95ecc9e09 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 e22162777..a7252904d 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 2f60901a1..3bc30b1c5 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 397e330e8..7cd7a2a24 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 d94a92387..59fe13067 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 762514dcd..d70e75576 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 4343e5250..68b878444 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 e7dacb84d..36460e918 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 6a4d09447..16b4fc2e4 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 9457cf7d6..e35a1e378 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 5eb16c94d..2f696f2e2 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 8d188c827..cac3ee7dd 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 6580f8172..3d99aa618 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);