Skip to content

Add support for IA palettes - #2789

Merged
Dragorn421 merged 1 commit into
zeldaret:mainfrom
Dragorn421:assets_support_ia_palettes
Aug 4, 2026
Merged

Add support for IA palettes#2789
Dragorn421 merged 1 commit into
zeldaret:mainfrom
Dragorn421:assets_support_ia_palettes

Conversation

@Dragorn421

Copy link
Copy Markdown
Collaborator

Currently ci images are hardcoded in build_from_png as using rgba16 palettes. This adds support for choosing between a rgba16/ia16 palette by using a ci[48]_{rgba16,ia16} suffix. The simple ci[48] suffix remains used for extraction and is synonym to ci[48]_rgba16.

Inspired by fast64 PR Fast-64/fast64#719


Testing this feature was done thus:

Details
diff --git a/assets/objects/object_link_child/object_link_child.c b/assets/objects/object_link_child/object_link_child.c
index a7062de65..2dc1d6006 100644
--- a/assets/objects/object_link_child/object_link_child.c
+++ b/assets/objects/object_link_child/object_link_child.c
@@ -197,7 +197,7 @@ u64 gLinkChildSlingshotSeedTex[TEX_LEN(u64, gLinkChildSlingshotSeedTex_WIDTH, gL
 };
 
 u64 gLinkChildHandTLUT[] = {
-#include "assets/objects/object_link_child/gLinkChildHandTex.tlut.rgba16.inc.c"
+#include "assets/objects/object_link_child/gMyTestTLUT.tlut.ia16.inc.c"
 };
 
 u64 gLinkChildSwordsTLUT[] = {
@@ -215,7 +215,7 @@ u64 gLinkChildSwordTLUT[] = {
 #define gLinkChildHandTex_WIDTH 16
 #define gLinkChildHandTex_HEIGHT 16
 u64 gLinkChildHandTex[TEX_LEN(u64, gLinkChildHandTex_WIDTH, gLinkChildHandTex_HEIGHT, 8)] = {
-#include "assets/objects/object_link_child/gLinkChildHandTex.ci8.inc.c"
+#include "assets/objects/object_link_child/gLinkChildHandTex.ci8_ia16.tlut_gMyTestTLUT.inc.c"
 };
 
 #define gLinkChildKokiriSwordSheathTex_WIDTH 16

+ cp extracted/VERSION/assets/objects/object_link_child/gLinkChildHandTex.ci8.png assets/objects/object_link_child/gLinkChildHandTex.ci8_ia16.tlut_gMyTestTLUT.png

+ changing gsDPSetTextureLUT(G_TT_RGBA16) to gsDPSetTextureLUT(G_TT_IA16) in extracted/VERSION/assets/objects/object_link_child/gLinkChildLeftFistAndBoomerangNearDL.inc.c (bad; don't modify extracted!)

then building and in-game hold the boomerang to see link's gray hand up close

This tests the "shared tlut" path in build_from_png. very similarly the single tlut user path can be tested (and it works too!)

@Dragorn421 Dragorn421 added the One approval Has one approval, can be merged in 48 hours if nothing else comes up label Aug 1, 2026
@Dragorn421
Dragorn421 merged commit 6b7c0a8 into zeldaret:main Aug 4, 2026
19 checks passed
@Dragorn421
Dragorn421 deleted the assets_support_ia_palettes branch August 4, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

One approval Has one approval, can be merged in 48 hours if nothing else comes up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants