diff --git a/assets/xml/textures/icon_item_field_static.xml b/assets/xml/textures/icon_item_field_static.xml index ed991406b5..1d94ffda11 100644 --- a/assets/xml/textures/icon_item_field_static.xml +++ b/assets/xml/textures/icon_item_field_static.xml @@ -1,6 +1,6 @@ - + diff --git a/include/functions.h b/include/functions.h index 6b1a781722..a86a774322 100644 --- a/include/functions.h +++ b/include/functions.h @@ -1162,7 +1162,7 @@ Gfx* Gfx_EnvColor(GraphicsContext* gfxCtx, s32 r, s32 g, s32 b, s32 a); void func_80095248(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b); void func_80095974(GraphicsContext* gfxCtx); void func_80095AA0(PlayState* play, Room* room, Input* input, s32 arg3); -void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 mode0, +void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tlutMode, u16 tlutCount, f32 offsetX, f32 offsetY); void func_80096FD4(PlayState* play, Room* room); u32 func_80096FE8(PlayState* play, RoomContext* roomCtx); diff --git a/include/z64scene.h b/include/z64scene.h index dfa23e0534..208794eec6 100644 --- a/include/z64scene.h +++ b/include/z64scene.h @@ -103,7 +103,7 @@ typedef struct { /* 0x16 */ u16 height; /* 0x18 */ u8 fmt; /* 0x19 */ u8 siz; - /* 0x1A */ u16 mode0; + /* 0x1A */ u16 tlutMode; /* 0x1C */ u16 tlutCount; } MeshHeader1Single; // size = 0x20 @@ -117,7 +117,7 @@ typedef struct { /* 0x12 */ u16 height; /* 0x14 */ u8 fmt; /* 0x15 */ u8 siz; - /* 0x16 */ u16 mode0; + /* 0x16 */ u16 tlutMode; /* 0x18 */ u16 tlutCount; } BgImage; // size = 0x1C diff --git a/src/code/z_room.c b/src/code/z_room.c index 469eb6cbcf..5b1a2c0534 100644 --- a/src/code/z_room.c +++ b/src/code/z_room.c @@ -271,7 +271,7 @@ s32 Room_DecodeJpeg(void* data) { return 0; } -void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 mode0, +void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tlutMode, u16 tlutCount, f32 offsetX, f32 offsetY) { Gfx* gfx = *gfxP; uObjBg* bg; @@ -306,7 +306,7 @@ void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 hei bg->b.frameW = width * (1 << 2); bg->b.frameH = height * (1 << 2); guS2DInitBg(bg); - gDPSetOtherMode(gfx++, mode0 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_COPY | G_PM_NPRIMITIVE, + gDPSetOtherMode(gfx++, tlutMode | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_COPY | G_PM_NPRIMITIVE, G_AC_THRESHOLD | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2); gSPBgRectCopy(gfx++, bg); @@ -317,8 +317,8 @@ void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 hei bg->s.scaleH = 1 << 10; bg->s.imageYorig = bg->b.imageY; gDPSetOtherMode(gfx++, - mode0 | 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, + tlutMode | G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TL_TILE | + G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_THRESHOLD | G_ZS_PIXEL | AA_EN | CVG_DST_CLAMP | ZMODE_OPA | CVG_X_ALPHA | ALPHA_CVG_SEL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_BL, G_BL_1MA) | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_BL, G_BL_1MA)); @@ -371,7 +371,7 @@ void Room_Draw1Single(PlayState* play, Room* room, u32 flags) { Camera_GetSkyboxOffset(&offset, activeCam); Room_DrawBackground2D(&gfx, meshHeader1Single->source, meshHeader1Single->tlut, meshHeader1Single->width, meshHeader1Single->height, meshHeader1Single->fmt, - meshHeader1Single->siz, meshHeader1Single->mode0, meshHeader1Single->tlutCount, + meshHeader1Single->siz, meshHeader1Single->tlutMode, meshHeader1Single->tlutCount, (offset.x + offset.z) * 1.2f + offset.y * 0.6f, offset.y * 2.4f + (offset.x + offset.z) * 0.3f); POLY_OPA_DISP = gfx; @@ -465,7 +465,7 @@ void Room_Draw1Multi(PlayState* play, Room* room, u32 flags) { gfx = POLY_OPA_DISP; Camera_GetSkyboxOffset(&offset, activeCam); Room_DrawBackground2D(&gfx, bgImage->source, bgImage->tlut, bgImage->width, bgImage->height, - bgImage->fmt, bgImage->siz, bgImage->mode0, bgImage->tlutCount, + bgImage->fmt, bgImage->siz, bgImage->tlutMode, bgImage->tlutCount, (offset.x + offset.z) * 1.2f + offset.y * 0.6f, offset.y * 2.4f + (offset.x + offset.z) * 0.3f); POLY_OPA_DISP = gfx; diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c index 4761593145..a7fd363e62 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c @@ -526,17 +526,16 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) { gSP1Quadrangle(POLY_OPA_DISP++, j, j + 2, j + 3, j + 1, 0); } else if (HREG(15) == 1) { - Gfx* sp1CC = POLY_OPA_DISP; - void* mapImage = gWorldMapImageTex; + Gfx* gfx = POLY_OPA_DISP; - gSPLoadUcodeL(sp1CC++, gspS2DEX2d_fifo); + gSPLoadUcodeL(gfx++, gspS2DEX2d_fifo); - Room_DrawBackground2D(&sp1CC, mapImage, gWorldMapImageTLUT, 216, 128, G_IM_FMT_CI, G_IM_SIZ_8b, 0x8000, 256, - HREG(13) / 100.0f, HREG(14) / 100.0f); + Room_DrawBackground2D(&gfx, gWorldMapImageTex, gWorldMapImageTLUT, 216, 128, G_IM_FMT_CI, G_IM_SIZ_8b, + G_TT_RGBA16, 256, HREG(13) / 100.0f, HREG(14) / 100.0f); - gSPLoadUcode(sp1CC++, SysUcode_GetUCode(), SysUcode_GetUCodeData()); + gSPLoadUcode(gfx++, SysUcode_GetUCode(), SysUcode_GetUCodeData()); - POLY_OPA_DISP = sp1CC; + POLY_OPA_DISP = gfx; } if (HREG(15) == 2) {