From ed404043f29c1912bddac69bd0b62bc450eba3ff Mon Sep 17 00:00:00 2001 From: Tyler McGavran Date: Sun, 2 Jul 2023 22:41:07 -0400 Subject: [PATCH] Migrate player emblemb assets (#326) * Migrate player emblem assets Can't find these textures being used anywhere, might be leftovers from an earlier time in the game's development. Signed-off-by: Taggerung --- assets.json | 2 -- assets/include/player_emblems.mk | 31 +++++++++++++++++++++++++++++++ assets/player_emblems.json | 7 +++++++ src/common_textures.inc.c | 17 ++++++++++++++--- 4 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 assets/include/player_emblems.mk create mode 100644 assets/player_emblems.json diff --git a/assets.json b/assets.json index e029306d1..c694b78fa 100644 --- a/assets.json +++ b/assets.json @@ -330,8 +330,6 @@ "textures/common/132B50_16258.i4.png": {"meta":{"dims":[64,64]}, "offsets": {"us":["0x132B50", "0x16258"]}}, "textures/common/132B50_16A58.i4.png": {"meta":{"dims":[64,64]}, "offsets": {"us":["0x132B50", "0x16A58"]}}, -"textures/common/tlut/132B50_17458.rgba16.ci8.png": {"meta":{"dims":[64,128], "pal":"0x17258"}, "offsets": {"us":["0x132B50", "0x17458"]}}, - "textures/common/132B50_28DD8.rgba16.png": {"meta":{"dims":[32,16]}, "offsets": {"us":["0x132B50", "0x28DD8"]}}, "textures/common/132B50_291D8.rgba16.png": {"meta":{"dims":[16,16]}, "offsets": {"us":["0x132B50", "0x291D8"]}}, diff --git a/assets/include/player_emblems.mk b/assets/include/player_emblems.mk new file mode 100644 index 000000000..594d15702 --- /dev/null +++ b/assets/include/player_emblems.mk @@ -0,0 +1,31 @@ +PLAYER_EMBLEM_DIR := assets/player_emblems + +PLAYER_EMBLEM_PALETTE := $(PLAYER_EMBLEM_DIR)/gTLUTPlayerEmblem.png + +PLAYER_EMBLEM_PNGS := \ +$(PLAYER_EMBLEM_DIR)/gTexturePlayerEmblem1p.png \ +$(PLAYER_EMBLEM_DIR)/gTexturePlayerEmblem2p.png \ +$(PLAYER_EMBLEM_DIR)/gTexturePlayerEmblem3p.png \ +$(PLAYER_EMBLEM_DIR)/gTexturePlayerEmblem4p.png + +PLAYER_EMBLEM_EXPORT_SENTINEL := $(PLAYER_EMBLEM_DIR)/.export + +$(BUILD_DIR)/src/common_textures.inc.o: $(PLAYER_EMBLEM_PNGS:%.png=%.inc.c) $(PLAYER_EMBLEM_PALETTE:%.png=%.inc.c) + +$(PLAYER_EMBLEM_PNGS:%.png=%.inc.c): %.inc.c : %.png + $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(PLAYER_EMBLEM_PALETTE) + +$(PLAYER_EMBLEM_PALETTE:%.png=%.inc.c): %.inc.c : %.png + $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 + +$(PLAYER_EMBLEM_PNGS) $(PLAYER_EMBLEM_PALETTE): $(PLAYER_EMBLEM_EXPORT_SENTINEL) ; + +$(PLAYER_EMBLEM_EXPORT_SENTINEL): $(ASSET_DIR)/player_emblems.json + $(ASSET_EXTRACT) $(BASEROM) $< + touch $@ + +.PHONY: distclean_player_emblems +distclean_player_emblems: + rm -rf $(PLAYER_EMBLEM_DIR) + +distclean_assets: distclean_player_emblems diff --git a/assets/player_emblems.json b/assets/player_emblems.json new file mode 100644 index 000000000..69f8ff02d --- /dev/null +++ b/assets/player_emblems.json @@ -0,0 +1,7 @@ +{ +"gTLUTPlayerEmblem": {"output_dir": "player_emblems", "rom_offset": "0x132B50", "block_offset": "0x17258", "width": 16, "height": 16, "type": "rgba16"}, +"gTexturePlayerEmblem1p": {"output_dir": "player_emblems", "rom_offset": "0x132B50", "block_offset": "0x17458", "width": 64, "height": 32, "type": "ci8", "tlut": "gTLUTPlayerEmblem"}, +"gTexturePlayerEmblem2p": {"output_dir": "player_emblems", "rom_offset": "0x132B50", "block_offset": "0x17C58", "width": 64, "height": 32, "type": "ci8", "tlut": "gTLUTPlayerEmblem"}, +"gTexturePlayerEmblem3p": {"output_dir": "player_emblems", "rom_offset": "0x132B50", "block_offset": "0x18458", "width": 64, "height": 32, "type": "ci8", "tlut": "gTLUTPlayerEmblem"}, +"gTexturePlayerEmblem4p": {"output_dir": "player_emblems", "rom_offset": "0x132B50", "block_offset": "0x18C58", "width": 64, "height": 32, "type": "ci8", "tlut": "gTLUTPlayerEmblem"} +} diff --git a/src/common_textures.inc.c b/src/common_textures.inc.c index ff4f68c78..56600a1bf 100644 --- a/src/common_textures.inc.c +++ b/src/common_textures.inc.c @@ -2548,12 +2548,23 @@ s8 D_0D016A58[] = { // tlut for 1p, 2p, 3p, 4p u8 D_0D017258[] = { - #include "textures/common/tlut/132B50_17458.rgba16.ci8.tlut.inc.c" + #include "assets/player_emblems/gTLUTPlayerEmblem.inc.c" }; // 1p, 2p, 3p, 4p -u8 D_0D017458[] = { - #include "textures/common/tlut/132B50_17458.rgba16.ci8.inc.c" +u8 D_0D017458[][2048] = { + { + #include "assets/player_emblems/gTexturePlayerEmblem1p.inc.c" + }, + { + #include "assets/player_emblems/gTexturePlayerEmblem2p.inc.c" + }, + { + #include "assets/player_emblems/gTexturePlayerEmblem3p.inc.c" + }, + { + #include "assets/player_emblems/gTexturePlayerEmblem4p.inc.c" + }, }; // font tlut for 12345678