Add asset file for some bomb asset (#323)

Yellow bomb, not sure where/if its actually used

Signed-off-by: Taggerung <tyler.taggerung@email.com>
This commit is contained in:
Tyler McGavran 2023-06-30 22:36:49 -04:00 committed by GitHub
parent a966aa1787
commit 74d3ffec0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 18 deletions

View File

@ -204,7 +204,7 @@ TEXTURE_DIRS := textures/common
ALL_DIRS = $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(COURSE_DIRS) include $(ASM_DIRS) $(ALL_KARTS_DIRS) $(TEXTURES_DIR)/raw \
$(TEXTURES_DIR)/standalone $(TEXTURES_DIR)/startup_logo $(TEXTURES_DIR)/crash_screen $(TEXTURES_DIR)/trophy $(TEXTURES_DIR)/courses \
$(TEXTURES_DIR)/courses/tlut $(TEXTURES_DIR)/courses/tlut2 $(TEXTURE_DIRS) $(TEXTURE_DIRS)/tlut $(TEXTURE_DIRS)/tlut2 $(BIN_DIR))
$(TEXTURE_DIRS) $(TEXTURE_DIRS)/tlut $(BIN_DIR))
# file dependencies generated by splitter
MAKEFILE_SPLIT = Makefile.split
@ -461,8 +461,6 @@ TEXTURE_FILES := $(foreach dir,$(TEXTURE_DIRS),$(subst .png, , $(wildcard $(dir)
TEXTURE_FILES_TLUT := $(foreach dir,$(TEXTURE_DIRS)/tlut,$(subst .png, , $(wildcard $(dir)/*)))
TEXTURE_FILES_TLUT2 := $(foreach dir,$(TEXTURE_DIRS)/tlut2,$(subst .png, , $(wildcard $(dir)/*)))
$(TEXTURE_FILES):
$(V)$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8
@ -471,11 +469,8 @@ $(TEXTURE_FILES):
$(TEXTURE_FILES_TLUT):
$(V)$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8 -c $(lastword $(subst ., ,$(subst .$(lastword $(subst ., ,$(TEXTURE_FILES_TLUT))), ,$(TEXTURE_FILES_TLUT)))) -p $(BUILD_DIR)/$@.tlut.inc.c
$(TEXTURE_FILES_TLUT2):
$(V)$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8 -c $(lastword $(subst ., ,$(subst .$(lastword $(subst ., ,$(TEXTURE_FILES_TLUT2))), ,$(TEXTURE_FILES_TLUT2)))) -p $(BUILD_DIR)/$@.tlut.inc.c -m 0xFFFF
# common textures
$(BUILD_DIR)/src/common_textures.inc.o: src/common_textures.inc.c $(TEXTURE_FILES) $(TEXTURE_FILES_TLUT) $(TEXTURE_FILES_TLUT2)
$(BUILD_DIR)/src/common_textures.inc.o: src/common_textures.inc.c $(TEXTURE_FILES) $(TEXTURE_FILES_TLUT)
@$(PRINT) "$(GREEN)Compiling Common Textures: $(BLUE)$@ $(NO_COL)\n"
@$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
$(V)$(CC) -c $(CFLAGS) -o $@ $<
@ -518,7 +513,6 @@ $(COURSE_MODEL_TARGETS) : $(BUILD_DIR)/%/model.inc.mio0.o : %/model.inc.c $(COUR
COURSE_TEXTURE_FILES := $(foreach dir,textures/courses,$(subst .png, , $(wildcard $(dir)/*)))
COURSE_TLUT := $(foreach dir,textures/courses/tlut,$(subst .png, , $(wildcard $(dir)/*)))
COURSE_TLUT2 := $(foreach dir,textures/courses/tlut2,$(subst .png, , $(wildcard $(dir)/*)))
COURSE_DATA_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_data.inc.mio0.o)
COURSE_DATA_TARGETS_O := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_data.inc.o)
@ -529,10 +523,7 @@ $(COURSE_TEXTURE_FILES):
$(COURSE_TLUT):
$(V)$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8 -c $(lastword $(subst ., ,$(subst .$(lastword $(subst ., ,$(COURSE_TLUT))), ,$(COURSE_TLUT)))) -p $(BUILD_DIR)/$@.tlut.inc.c
$(COURSE_TLUT2):
$(V)$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8 -c $(lastword $(subst ., ,$(subst .$(lastword $(subst ., ,$(COURSE_TLUT2))), ,$(COURSE_TLUT2)))) -p $(BUILD_DIR)/$@.tlut.inc.c -m 0xFFFF
$(COURSE_DATA_TARGETS_O): $(BUILD_DIR)/%/course_data.inc.o : %/course_data.inc.c $(COURSE_TEXTURE_FILES) $(COURSE_TLUT) $(COURSE_TLUT2)
$(COURSE_DATA_TARGETS_O): $(BUILD_DIR)/%/course_data.inc.o : %/course_data.inc.c $(COURSE_TEXTURE_FILES) $(COURSE_TLUT)
@$(PRINT) "$(GREEN)Compiling Course Data: $(BLUE)$@ $(NO_COL)\n"
@$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
$(V)$(CC) -c $(CFLAGS) -o $@ $<

View File

@ -345,8 +345,6 @@
"textures/common/132B50_293D8.i4.png": {"meta":{"dims":[16,16]}, "offsets": {"us":["0x132B50", "0x293D8"]}},
"textures/common/132B50_29458.i8.png": {"meta":{"dims":[32,32]}, "offsets": {"us":["0x132B50", "0x29458"]}},
"textures/common/tlut2/132B50_29858.rgba16.ci8.png": {"meta":{"dims":[32,128], "pal":"0x2A858"}, "offsets": {"us":["0x132B50", "0x29858"]}},
"textures/common/132B50_2AA58.rgba16.png": {"meta":{"dims":[16,16]}, "offsets": {"us":["0x132B50", "0x2AA58"]}},
"textures/common/132B50_2AC58.i8.png": {"meta":{"dims":[32,32]}, "offsets": {"us":["0x132B50", "0x2AC58"]}},
"textures/common/132B50_2B058.i8.png": {"meta":{"dims":[32,32]}, "offsets": {"us":["0x132B50", "0x2B058"]}},

7
assets/bomb.json Normal file
View File

@ -0,0 +1,7 @@
{
"gTLUTBomb": {"output_dir": "bomb", "rom_offset": "0x132B50", "block_offset": "0x2A858", "width": 16, "height": 16, "type": "rgba16"},
"gTextureBomb1": {"output_dir": "bomb", "rom_offset": "0x132B50", "block_offset": "0x29858", "width": 32, "height": 32, "type": "ci8", "tlut": "gTLUTBomb"},
"gTextureBomb2": {"output_dir": "bomb", "rom_offset": "0x132B50", "block_offset": "0x29C58", "width": 32, "height": 32, "type": "ci8", "tlut": "gTLUTBomb"},
"gTextureBomb3": {"output_dir": "bomb", "rom_offset": "0x132B50", "block_offset": "0x2A058", "width": 32, "height": 32, "type": "ci8", "tlut": "gTLUTBomb"},
"gTextureBomb4": {"output_dir": "bomb", "rom_offset": "0x132B50", "block_offset": "0x2A458", "width": 32, "height": 32, "type": "ci8", "tlut": "gTLUTBomb"}
}

31
assets/include/bomb.mk Normal file
View File

@ -0,0 +1,31 @@
BOMB_DIR := assets/bomb
BOMB_PALETTE := $(BOMB_DIR)/gTLUTBomb.png
BOMB_FRAMES := \
$(BOMB_DIR)/gTextureBomb1.png \
$(BOMB_DIR)/gTextureBomb2.png \
$(BOMB_DIR)/gTextureBomb3.png \
$(BOMB_DIR)/gTextureBomb4.png
BOMB_EXPORT_SENTINEL := $(BOMB_DIR)/.export
$(BUILD_DIR)/src/common_textures.inc.o: $(BOMB_FRAMES:%.png=%.inc.c) $(BOMB_PALETTE:%.png=%.inc.c)
$(BOMB_FRAMES:%.png=%.inc.c): %.inc.c : %.png
$(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(BOMB_PALETTE)
$(BOMB_PALETTE:%.png=%.inc.c): %.inc.c : %.png
$(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16
$(BOMB_FRAMES) $(BOMB_PALETTE): $(BOMB_EXPORT_SENTINEL) ;
$(BOMB_EXPORT_SENTINEL): $(ASSET_DIR)/bomb.json
$(ASSET_EXTRACT) $(BASEROM) $<
touch $@
.PHONY: distclean_bomb
distclean_bomb:
rm -rf $(BOMB_DIR)
distclean_assets: distclean_bomb

View File

@ -2830,14 +2830,25 @@ s8 D_0D029458[] = {
};
// Uses 2A858 as tlut
s8 D_0D029858[] = {
#include "textures/common/tlut2/132B50_29858.rgba16.ci8.inc.c"
u8 D_0D029858[][1024] = {
{
#include "assets/bomb/gTextureBomb1.inc.c"
},
{
#include "assets/bomb/gTextureBomb2.inc.c"
},
{
#include "assets/bomb/gTextureBomb3.inc.c"
},
{
#include "assets/bomb/gTextureBomb4.inc.c"
},
};
// Special tlut that uses 0xFFFF as a transparent tail instead of 0x0 or 0x07FE.
// tlut for 29858
s8 D_0D02A858[] = {
#include "textures/common/tlut2/132B50_29858.rgba16.ci8.tlut.inc.c"
u8 D_0D02A858[] = {
#include "assets/bomb/gTLUTBomb.inc.c"
};
u8 D_0D02AA58[] = {