Clean up some more bin2c calls from the Makefile (#286)

* Remove some bin2c calls from the Makefile

* Found a way to make n64graphics use shared tluts

* Added an option that makes n64graphics operate in a mode where it
 takes an image and tlut (as pngs) and spits out the appropriate
 CI8 indices inc.c form

* Turns out all the TLUTs for Lakitu are kept in one place, far away
 from the textures that use them

* Names some textures and tluts

* Pretty helpful actually, helped identify where a few different
 objects types are initialized. Should be a little useful to
 whoever dives into the object stuff more deeply

* Minor cleanup in n64graphics

* Added some comments, gave more appropriate names to some
 variables.

* Leaving the new mode argument as `-Z` for now

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>

* Textures compile using makefile rules

* Patched n64 graphics memory leak and ci output

* Added memset16safe to initialize ci palettes to magic numbers (transparent pixels).

---------

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
This commit is contained in:
Tyler McGavran 2023-02-07 00:52:34 -05:00 committed by GitHub
parent 533d035875
commit 3a99685c2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 1442 additions and 1564 deletions

235
Makefile
View File

@ -45,8 +45,9 @@ ASM_DIRS := asm asm/audio asm/os asm/os/non_matchings data data/sound_data
COURSE_DIRS := $(shell find courses -mindepth 2 -type d)
TEXTURES_DIR = textures
TEXTURE_DIRS := textures/common
ALL_DIRS = $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(COURSE_DIRS) $(INCLUDE_DIRS) $(ASM_DIRS) $(ALL_KARTS_DIRS) $(TEXTURES_DIR)/raw $(TEXTURES_DIR)/standalone $(TEXTURES_DIR)/startup_logo $(TEXTURES_DIR)/crash_screen $(TEXTURES_DIR)/trophy)
ALL_DIRS = $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(COURSE_DIRS) $(INCLUDE_DIRS) $(ASM_DIRS) $(ALL_KARTS_DIRS) $(TEXTURES_DIR)/raw $(TEXTURES_DIR)/standalone $(TEXTURES_DIR)/startup_logo $(TEXTURES_DIR)/crash_screen $(TEXTURES_DIR)/trophy $(TEXTURE_DIRS) $(TEXTURE_DIRS)/tlut $(TEXTURE_DIRS)/tlut2)
################### Universal Dependencies ###################
@ -223,7 +224,7 @@ $(BUILD_DIR)/%: %.png
$(BUILD_DIR)/textures/%.mio0: $(BUILD_DIR)/textures/%
$(MIO0TOOL) -c $< $@
#################### Compressed Segments #####################
$(BUILD_DIR)/%.mio0: %.bin
@ -258,204 +259,42 @@ $(BUILD_DIR)/src/startup_logo.inc.o: src/startup_logo.inc.c
$(CC) -c $(CFLAGS) -o $@ $<
$(PYTHON) tools/set_o32abi_bit.py $@
TEXTURE_FILES := $(foreach dir,$(TEXTURE_DIRS),$(subst .png, , $(wildcard $(dir)/*)))
#TEXTURE_FILES_C := $(foreach file,$(TEXTURE_FILES),$(BUILD_DIR)/$(file:.png=.inc.c))
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):
$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8
$(info $$var is [$(TEXTURE_FILES_TLUT)])
#$(info $$var is [$(lastword $(subst ., ,$(subst .$(lastword $(subst ., ,$(TEXTURE_FILES_TLUT))), ,$(TEXTURE_FILES_TLUT))))])
# TLUT
$(TEXTURE_FILES_TLUT):
$(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):
$(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
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_00000_tlut.rgba16.inc.c -g textures/132B50_00000_tlut.rgba16.png -f rgba16 -s u8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_00200.rgba16.inc.c -g textures/132B50_00200.rgba16.png -f rgba16 -s u8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_01EE8.rgba16.inc.c -g textures/132B50_01EE8.rgba16.png -f rgba16 -s u8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_03348.rgba16.inc.c -g textures/132B50_03348.rgba16.png -f rgba16 -s u8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_03B48.rgba16.inc.c -g textures/132B50_03B48.rgba16.png -f rgba16 -s u8
$(BIN2C) textures/132B50_04C68_tlut.rgba16.bin $(BUILD_DIR)/textures/132B50_04C68_tlut.rgba16
$(BIN2C) textures/132B50_04E38_tlut.rgba16.bin $(BUILD_DIR)/textures/132B50_04E38_tlut.rgba16
$(BIN2C) textures/132B50_04E68_tlut.rgba16.bin $(BUILD_DIR)/textures/132B50_04E68_tlut.rgba16
$(BIN2C) textures/132B50_05068_tlut.rgba16.bin $(BUILD_DIR)/textures/132B50_05068_tlut.rgba16
#$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_04C68_tlut.rgba16.inc.c -g textures/132B50_04C68_tlut.rgba16.png -f rgba16 -s u8
#$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_04E68_tlut.rgba16.inc.c -g textures/132B50_04E68_tlut.rgba16.png -f rgba16 -s u8
#$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_05068_tlut.rgba16.inc.c -g textures/132B50_05068_tlut.rgba16.png -f rgba16 -s u8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_06A58.i4.inc.c -g textures/132B50_06A58.i4.png -f i4 -s u8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_06AD8.ia8.inc.c -g textures/132B50_06AD8.ia8.png -f ia8 -s u8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_06EF8.rgba16.ci4.inc.c -g textures/132B50_06EF8.rgba16.ci4.png -f ci4 -s u8 -c rgba16 -w 128 -h 32 -p textures/132B50_06ED8_tlut_gen.rgba16.bin
$(BIN2C) textures/132B50_06ED8_tlut.rgba16.bin $(BUILD_DIR)/textures/132B50_06ED8_tlut.rgba16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_08150.ia8.inc.c -g textures/132B50_08150.ia8.png -f ia8 -s u8 -w 100 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_08470.ia8.inc.c -g textures/132B50_08470.ia8.png -f ia8 -s u8 -w 100 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_08790.ia8.inc.c -g textures/132B50_08790.ia8.png -f ia8 -s u8 -w 100 -h 8
$(BUILD_DIR)/src/common_textures.inc.o: src/common_textures.inc.c $(TEXTURE_FILES) $(TEXTURE_FILES_TLUT) $(TEXTURE_FILES_TLUT2)
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_09958.i4.inc.c -g textures/132B50_09958.i4.png -s u8 -w 64 -h 96 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_0A558.i4.inc.c -g textures/132B50_0A558.i4.png -s u8 -w 64 -h 16 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_0A958.rgba16.inc.c -g textures/132B50_0A958.rgba16.png -s u8 -w 32 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_0AB58.rgba16.inc.c -g textures/132B50_0AB58.rgba16.png -s u8 -w 32 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_0AD58.rgba16.inc.c -g textures/132B50_0AD58.rgba16.png -s u8 -w 32 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_0B158.rgba16.inc.c -g textures/132B50_0B158.rgba16.png -s u8 -w 32 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_0B558.rgba16.inc.c -g textures/132B50_0B558.rgba16.png -s u8 -w 32 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_0B958.rgba16.inc.c -g textures/132B50_0B958.rgba16.png -s u8 -w 32 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_0BD58.rgba16.inc.c -g textures/132B50_0BD58.rgba16.png -s u8 -w 32 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_0C158.rgba16.inc.c -g textures/132B50_0C158.rgba16.png -s u8 -w 32 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_0C558.rgba16.inc.c -g textures/132B50_0C558.rgba16.png -s u8 -w 104 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_0D258.i4.inc.c -g textures/132B50_0D258.i4.png -s u8 -w 128 -h 64 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_0E258.i4.inc.c -g textures/132B50_0E258.i4.png -s u8 -w 128 -h 64 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_0F258.i4.inc.c -g textures/132B50_0F258.i4.png -s u8 -w 128 -h 64 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_10258.i4.inc.c -g textures/132B50_10258.i4.png -s u8 -w 128 -h 64 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_11258.i4.inc.c -g textures/132B50_11258.i4.png -s u8 -w 128 -h 64 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_12258.i4.inc.c -g textures/132B50_12258.i4.png -s u8 -w 128 -h 64 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_13258.i4.inc.c -g textures/132B50_13258.i4.png -s u8 -w 128 -h 64 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_14258.i4.inc.c -g textures/132B50_14258.i4.png -s u8 -w 128 -h 64 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_15258.i4.inc.c -g textures/132B50_15258.i4.png -s u8 -w 64 -h 64 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_15A58.i4.inc.c -g textures/132B50_15A58.i4.png -s u8 -w 64 -h 64 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_16258.i4.inc.c -g textures/132B50_16258.i4.png -s u8 -w 64 -h 64 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_16A58.i4.inc.c -g textures/132B50_16A58.i4.png -s u8 -w 64 -h 64 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_17258_tlut.rgba16.inc.c -g textures/132B50_17258_tlut.rgba16.png -s u8 -w 38 -h 6
$(BIN2C) textures/132B50_17458_combined_data.bin $(BUILD_DIR)/textures/132B50_17458_combined_data
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_17458.rgba16.ci8.inc.c -g textures/132B50_17458.rgba16.ci8.png -s u8 -w 64 -h 32 -c rgba16 -p textures/132B50_17258_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_17C58.rgba16.ci8.inc.c -g textures/132B50_17C58.rgba16.ci8.png -s u8 -w 64 -h 32 -c rgba16 -p textures/132B50_17258_tlut.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_18458.rgba16.ci8.inc.c -g textures/132B50_18458.rgba16.ci8.png -s u8 -w 64 -h 32 -c rgba16 -p textures/132B50_17258_tlut.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_18C58.rgba16.ci8.inc.c -g textures/132B50_18C58.rgba16.ci8.png -s u8 -w 64 -h 32 -c rgba16 -p textures/132B50_17258_tlut.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_19458_tlut.rgba16.inc.c -g textures/132B50_19458_tlut.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_19658.rgba16.ci8.inc.c -g textures/132B50_19658.rgba16.ci8.png -s u8 -w 16 -h 16 -c rgba16 -p textures/132B50_19458_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_19758.rgba16.ci8.inc.c -g textures/132B50_19758.rgba16.ci8.png -s u8 -w 16 -h 16 -c rgba16 -p textures/132B50_19458_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_19858.rgba16.ci8.inc.c -g textures/132B50_19858.rgba16.ci8.png -s u8 -w 16 -h 16 -c rgba16 -p textures/132B50_19458_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_19958.rgba16.ci8.inc.c -g textures/132B50_19958.rgba16.ci8.png -s u8 -w 16 -h 16 -c rgba16 -p textures/132B50_19458_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_19A58.rgba16.ci8.inc.c -g textures/132B50_19A58.rgba16.ci8.png -s u8 -w 16 -h 16 -c rgba16 -p textures/132B50_19458_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_19B58.rgba16.ci8.inc.c -g textures/132B50_19B58.rgba16.ci8.png -s u8 -w 16 -h 16 -c rgba16 -p textures/132B50_19458_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_19C58.rgba16.ci8.inc.c -g textures/132B50_19C58.rgba16.ci8.png -s u8 -w 16 -h 16 -c rgba16 -p textures/132B50_19458_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_19D58.rgba16.ci8.inc.c -g textures/132B50_19D58.rgba16.ci8.png -s u8 -w 16 -h 16 -c rgba16 -p textures/132B50_19458_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_1A058.rgba16.ci8.inc.c -g textures/132B50_1A058.rgba16.ci8.png -s u8 -w 8 -h 8 -c rgba16 -p textures/132B50_19E58_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_1A098.rgba16.ci8.inc.c -g textures/132B50_1A098.rgba16.ci8.png -s u8 -w 8 -h 8 -c rgba16 -p textures/132B50_19E58_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_1A0D8.rgba16.ci8.inc.c -g textures/132B50_1A0D8.rgba16.ci8.png -s u8 -w 8 -h 8 -c rgba16 -p textures/132B50_19E58_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_1A118.rgba16.ci8.inc.c -g textures/132B50_1A118.rgba16.ci8.png -s u8 -w 8 -h 8 -c rgba16 -p textures/132B50_19E58_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_1A158.rgba16.ci8.inc.c -g textures/132B50_1A158.rgba16.ci8.png -s u8 -w 8 -h 8 -c rgba16 -p textures/132B50_19E58_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_1A198.rgba16.ci8.inc.c -g textures/132B50_1A198.rgba16.ci8.png -s u8 -w 8 -h 8 -c rgba16 -p textures/132B50_19E58_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_1A1D8.rgba16.ci8.inc.c -g textures/132B50_1A1D8.rgba16.ci8.png -s u8 -w 8 -h 8 -c rgba16 -p textures/132B50_19E58_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_1A218.rgba16.ci8.inc.c -g textures/132B50_1A218.rgba16.ci8.png -s u8 -w 8 -h 8 -c rgba16 -p textures/132B50_19E58_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_1A258.rgba16.ci8.inc.c -g textures/132B50_1A258.rgba16.ci8.png -s u8 -w 8 -h 8 -c rgba16 -p textures/132B50_19E58_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_1A298.rgba16.ci8.inc.c -g textures/132B50_1A298.rgba16.ci8.png -s u8 -w 8 -h 8 -c rgba16 -p textures/132B50_19E58_tlut.rgba16.png
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_1A2D8.ia4.inc.c -g textures/132B50_1A2D8.ia4.png -s u8 -f ia4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTPortraitMario.rgba16.inc.c -g textures/gTLUTPortraitMario.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTPortraitLuigi.rgba16.inc.c -g textures/gTLUTPortraitLuigi.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTPortraitPeach.rgba16.inc.c -g textures/gTLUTPortraitPeach.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTPortraitToad.rgba16.inc.c -g textures/gTLUTPortraitToad.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTPortraitYoshi.rgba16.inc.c -g textures/gTLUTPortraitYoshi.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTPortraitDonkeyKong.rgba16.inc.c -g textures/gTLUTPortraitDonkeyKong.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTPortraitWario.rgba16.inc.c -g textures/gTLUTPortraitWario.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTPortraitBowser.rgba16.inc.c -g textures/gTLUTPortraitBowser.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_1B4D8_tlut.rgba16.inc.c -g textures/132B50_1B4D8_tlut.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTexturePortraitMario.rgba16.ci8.inc.c -g textures/gTexturePortraitMario.rgba16.ci8.png -s u8 -w 32 -h 32 -f ci8 -c rgba16 -p textures/gTLUTPortraitMario.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTexturePortraitLuigi.rgba16.ci8.inc.c -g textures/gTexturePortraitLuigi.rgba16.ci8.png -s u8 -w 32 -h 32 -f ci8 -c rgba16 -p textures/gTLUTPortraitLuigi.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTexturePortraitPeach.rgba16.ci8.inc.c -g textures/gTexturePortraitPeach.rgba16.ci8.png -s u8 -w 32 -h 32 -f ci8 -c rgba16 -p textures/gTLUTPortraitPeach.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTexturePortraitToad.rgba16.ci8.inc.c -g textures/gTexturePortraitToad.rgba16.ci8.png -s u8 -w 32 -h 32 -f ci8 -c rgba16 -p textures/gTLUTPortraitToad.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTexturePortraitYoshi.rgba16.ci8.inc.c -g textures/gTexturePortraitYoshi.rgba16.ci8.png -s u8 -w 32 -h 32 -f ci8 -c rgba16 -p textures/gTLUTPortraitYoshi.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTexturePortraitDonkeyKong.rgba16.ci8.inc.c -g textures/gTexturePortraitDonkeyKong.rgba16.ci8.png -s u8 -w 32 -h 32 -f ci8 -c rgba16 -p textures/gTLUTPortraitDonkeyKong.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTexturePortraitWario.rgba16.ci8.inc.c -g textures/gTexturePortraitWario.rgba16.ci8.png -s u8 -w 32 -h 32 -f ci8 -c rgba16 -p textures/gTLUTPortraitWario.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTexturePortraitBowser.rgba16.ci8.inc.c -g textures/gTexturePortraitBowser.rgba16.ci8.png -s u8 -w 32 -h 32 -f ci8 -c rgba16 -p textures/gTLUTPortraitBowser.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_1D6D8.rgba16.ci8.inc.c -g textures/132B50_1D6D8.rgba16.ci8.png -s u8 -w 64 -h 32 -f ci8 -c rgba16 -p textures/132B50_1B4D8_tlut_gen.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowNone.rgba16.inc.c -g textures/gTLUTItemWindowNone.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowBanana.rgba16.inc.c -g textures/gTLUTItemWindowBanana.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowBananaBunch.rgba16.inc.c -g textures/gTLUTItemWindowBananaBunch.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowMushroom.rgba16.inc.c -g textures/gTLUTItemWindowMushroom.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowDoubleMushroom.rgba16.inc.c -g textures/gTLUTItemWindowDoubleMushroom.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowTripleMushroom.rgba16.inc.c -g textures/gTLUTItemWindowTripleMushroom.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowSuperMushroom.rgba16.inc.c -g textures/gTLUTItemWindowSuperMushroom.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowBlueShell.rgba16.inc.c -g textures/gTLUTItemWindowBlueShell.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowBoo.rgba16.inc.c -g textures/gTLUTItemWindowBoo.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowGreenShell.rgba16.inc.c -g textures/gTLUTItemWindowGreenShell.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowTripleGreenShell.rgba16.inc.c -g textures/gTLUTItemWindowTripleGreenShell.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowRedShell.rgba16.inc.c -g textures/gTLUTItemWindowRedShell.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowTripleRedShell.rgba16.inc.c -g textures/gTLUTItemWindowTripleRedShell.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowStar.rgba16.inc.c -g textures/gTLUTItemWindowStar.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowThunderBolt.rgba16.inc.c -g textures/gTLUTItemWindowThunderBolt.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTLUTItemWindowFakeItemBox.rgba16.inc.c -g textures/gTLUTItemWindowFakeItemBox.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowNone.rgba16.ci8.inc.c -g textures/gTextureItemWindowNone.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowNone.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowBanana.rgba16.ci8.inc.c -g textures/gTextureItemWindowBanana.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowBanana.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowBananaBunch.rgba16.ci8.inc.c -g textures/gTextureItemWindowBananaBunch.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowBananaBunch.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowMushroom.rgba16.ci8.inc.c -g textures/gTextureItemWindowMushroom.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowMushroom.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowDoubleMushroom.rgba16.ci8.inc.c -g textures/gTextureItemWindowDoubleMushroom.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowDoubleMushroom.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowTripleMushroom.rgba16.ci8.inc.c -g textures/gTextureItemWindowTripleMushroom.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowTripleMushroom.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowSuperMushroom.rgba16.ci8.inc.c -g textures/gTextureItemWindowSuperMushroom.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowSuperMushroom.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowBlueShell.rgba16.ci8.inc.c -g textures/gTextureItemWindowBlueShell.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowBlueShell.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowBoo.rgba16.ci8.inc.c -g textures/gTextureItemWindowBoo.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowBoo.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowGreenShell.rgba16.ci8.inc.c -g textures/gTextureItemWindowGreenShell.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowGreenShell.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowTripleGreenShell.rgba16.ci8.inc.c -g textures/gTextureItemWindowTripleGreenShell.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowTripleGreenShell.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowRedShell.rgba16.ci8.inc.c -g textures/gTextureItemWindowRedShell.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowRedShell.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowTripleRedShell.rgba16.ci8.inc.c -g textures/gTextureItemWindowTripleRedShell.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowTripleRedShell.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowStar.rgba16.ci8.inc.c -g textures/gTextureItemWindowStar.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowStar.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowThunderBolt.rgba16.ci8.inc.c -g textures/gTextureItemWindowThunderBolt.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowThunderBolt.rgba16.bin
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/gTextureItemWindowFakeItemBox.rgba16.ci8.inc.c -g textures/gTextureItemWindowFakeItemBox.rgba16.ci8.png -s u8 -w 40 -h 32 -f ci8 -c rgba16 -p textures/gTLUTItemWindowFakeItemBox.rgba16.bin
$(BIN2C) textures/132B50_24ED8_tlut.rgba16.bin $(BUILD_DIR)/textures/132B50_24ED8_tlut.rgba16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_25ED8_tlut.rgba16.inc.c -g textures/132B50_25ED8_tlut.rgba16.png -s u8 -w 16 -h 16
$(BIN2C) textures/132B50_260D8.rgba16.ci8.bin $(BUILD_DIR)/textures/132B50_260D8.rgba16.ci8
$(BIN2C) textures/132B50_26558.rgba16.ci8.bin $(BUILD_DIR)/textures/132B50_26558.rgba16.ci8
$(BIN2C) textures/132B50_269D8.rgba16.ci8.bin $(BUILD_DIR)/textures/132B50_269D8.rgba16.ci8
$(BIN2C) textures/132B50_26E58.rgba16.ci8.bin $(BUILD_DIR)/textures/132B50_26E58.rgba16.ci8
$(BIN2C) textures/132B50_272D8.rgba16.ci8.bin $(BUILD_DIR)/textures/132B50_272D8.rgba16.ci8
$(BIN2C) textures/132B50_27758.rgba16.ci8.bin $(BUILD_DIR)/textures/132B50_27758.rgba16.ci8
$(BIN2C) textures/132B50_27BD8.rgba16.ci8.bin $(BUILD_DIR)/textures/132B50_27BD8.rgba16.ci8
$(BIN2C) textures/132B50_28058.rgba16.ci8.bin $(BUILD_DIR)/textures/132B50_28058.rgba16.ci8
$(BIN2C) textures/132B50_284D8.rgba16.ci8.bin $(BUILD_DIR)/textures/132B50_284D8.rgba16.ci8
$(BIN2C) textures/132B50_28958.rgba16.ci8.bin $(BUILD_DIR)/textures/132B50_28958.rgba16.ci8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_28DD8.rgba16.inc.c -g textures/132B50_28DD8.rgba16.png -s u8 -w 32 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_291D8.rgba16.inc.c -g textures/132B50_291D8.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_293D8.i4.inc.c -g textures/132B50_293D8.i4.png -s u8 -w 16 -h 16 -f i4
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_29458.i8.inc.c -g textures/132B50_29458.i8.png -s u8 -w 32 -h 32 -f i8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_29858.rgba16.ci8.inc.c -g textures/132B50_29858.rgba16.ci8.png -s u8 -w 32 -h 32 -f ci8 -c rgba16 -p textures/132B50_2A858_pal.rgba16.bin
$(BIN2C) textures/132B50_29C58.rgba16.ci8.bin $(BUILD_DIR)/textures/132B50_29C58.rgba16.ci8
$(BIN2C) textures/132B50_2A058.rgba16.ci8.bin $(BUILD_DIR)/textures/132B50_2A058.rgba16.ci8
$(BIN2C) textures/132B50_2A458.rgba16.ci8.bin $(BUILD_DIR)/textures/132B50_2A458.rgba16.ci8
#$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_29C58.rgba16.ci8.inc.c -g textures/132B50_29C58.rgba16.ci8.png -s u8 -w 32 -h 32 -f ci8 -c rgba16 -p textures/a.rgba16.png
#$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2A058.rgba16.ci8.inc.c -g textures/132B50_2A058.rgba16.ci8.png -s u8 -w 32 -h 32 -f ci8 -c rgba16 -p textures/b.rgba16.bin
#$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2A458.rgba16.ci8.inc.c -g textures/132B50_2A458.rgba16.ci8.png -s u8 -w 32 -h 32 -f ci8 -c rgba16 -p textures/c.rgba16.bin
$(BIN2C) textures/132B50_2A858_tlut.rgba16.bin $(BUILD_DIR)/textures/132B50_2A858_tlut.rgba16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2AA58.rgba16.inc.c -g textures/132B50_2AA58.rgba16.png -s u8 -w 16 -h 16
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2AC58.i8.inc.c -g textures/132B50_2AC58.i8.png -s u8 -w 32 -h 32 -f i8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2B058.i8.inc.c -g textures/132B50_2B058.i8.png -s u8 -w 32 -h 32 -f i8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2B458.i8.inc.c -g textures/132B50_2B458.i8.png -s u8 -w 32 -h 32 -f i8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2B858.i8.inc.c -g textures/132B50_2B858.i8.png -s u8 -w 32 -h 32 -f i8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2BC58.i8.inc.c -g textures/132B50_2BC58.i8.png -s u8 -w 32 -h 32 -f i8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2C058.i8.inc.c -g textures/132B50_2C058.i8.png -s u8 -w 32 -h 32 -f i8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2C458.i8.inc.c -g textures/132B50_2C458.i8.png -s u8 -w 32 -h 32 -f i8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2C858.i8.inc.c -g textures/132B50_2C858.i8.png -s u8 -w 32 -h 32 -f i8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2CC58.rgba16.inc.c -g textures/132B50_2CC58.rgba16.png -s u8 -w 8 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2CCD8.rgba16.inc.c -g textures/132B50_2CCD8.rgba16.png -s u8 -w 8 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2CD58.rgba16.inc.c -g textures/132B50_2CD58.rgba16.png -s u8 -w 8 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2CDD8.rgba16.inc.c -g textures/132B50_2CDD8.rgba16.png -s u8 -w 8 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2CE58.rgba16.inc.c -g textures/132B50_2CE58.rgba16.png -s u8 -w 8 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2CED8.rgba16.inc.c -g textures/132B50_2CED8.rgba16.png -s u8 -w 8 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2CF58.rgba16.inc.c -g textures/132B50_2CF58.rgba16.png -s u8 -w 8 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2CFD8.rgba16.inc.c -g textures/132B50_2CFD8.rgba16.png -s u8 -w 8 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2D058.rgba16.inc.c -g textures/132B50_2D058.rgba16.png -s u8 -w 8 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_2D0D8.rgba16.inc.c -g textures/132B50_2D0D8.rgba16.png -s u8 -w 8 -h 8
$(N64GRAPHICS) -i $(BUILD_DIR)/textures/132B50_25ED8_tlut.rgba16.inc.c -g textures/132B50_25ED8_tlut.rgba16.png -s u8
$(N64GRAPHICS) -Z $(BUILD_DIR)/textures/132B50_260D8.rgba16.ci8.inc.c -g textures/132B50_260D8.rgba16.ci8.png -s u8 -w 24 -h 48 -f ci8 -c rgba16 -p textures/132B50_25ED8_tlut.rgba16.png
$(N64GRAPHICS) -Z $(BUILD_DIR)/textures/132B50_26558.rgba16.ci8.inc.c -g textures/132B50_26558.rgba16.ci8.png -s u8 -w 24 -h 48 -f ci8 -c rgba16 -p textures/132B50_25ED8_tlut.rgba16.png
$(N64GRAPHICS) -Z $(BUILD_DIR)/textures/132B50_269D8.rgba16.ci8.inc.c -g textures/132B50_269D8.rgba16.ci8.png -s u8 -w 24 -h 48 -f ci8 -c rgba16 -p textures/132B50_25ED8_tlut.rgba16.png
$(N64GRAPHICS) -Z $(BUILD_DIR)/textures/132B50_26E58.rgba16.ci8.inc.c -g textures/132B50_26E58.rgba16.ci8.png -s u8 -w 24 -h 48 -f ci8 -c rgba16 -p textures/132B50_25ED8_tlut.rgba16.png
$(N64GRAPHICS) -Z $(BUILD_DIR)/textures/132B50_272D8.rgba16.ci8.inc.c -g textures/132B50_272D8.rgba16.ci8.png -s u8 -w 24 -h 48 -f ci8 -c rgba16 -p textures/132B50_25ED8_tlut.rgba16.png
$(N64GRAPHICS) -Z $(BUILD_DIR)/textures/132B50_27758.rgba16.ci8.inc.c -g textures/132B50_27758.rgba16.ci8.png -s u8 -w 24 -h 48 -f ci8 -c rgba16 -p textures/132B50_25ED8_tlut.rgba16.png
$(N64GRAPHICS) -Z $(BUILD_DIR)/textures/132B50_27BD8.rgba16.ci8.inc.c -g textures/132B50_27BD8.rgba16.ci8.png -s u8 -w 24 -h 48 -f ci8 -c rgba16 -p textures/132B50_25ED8_tlut.rgba16.png
$(N64GRAPHICS) -Z $(BUILD_DIR)/textures/132B50_28058.rgba16.ci8.inc.c -g textures/132B50_28058.rgba16.ci8.png -s u8 -w 24 -h 48 -f ci8 -c rgba16 -p textures/132B50_25ED8_tlut.rgba16.png
$(N64GRAPHICS) -Z $(BUILD_DIR)/textures/132B50_284D8.rgba16.ci8.inc.c -g textures/132B50_284D8.rgba16.ci8.png -s u8 -w 24 -h 48 -f ci8 -c rgba16 -p textures/132B50_25ED8_tlut.rgba16.png
$(N64GRAPHICS) -Z $(BUILD_DIR)/textures/132B50_28958.rgba16.ci8.inc.c -g textures/132B50_28958.rgba16.ci8.png -s u8 -w 24 -h 48 -f ci8 -c rgba16 -p textures/132B50_25ED8_tlut.rgba16.png
@$(CC_CHECK) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
$(CC) -c $(CFLAGS) -o $@ $<

View File

@ -42,8 +42,8 @@ glabel func_8004FDB4
/* 050A54 8004FE54 0C012CD7 */ jal func_8004B35C
/* 050A58 8004FE58 240600FF */ li $a2, 255
/* 050A5C 8004FE5C 8E300000 */ lw $s0, ($s1)
/* 050A60 8004FE60 3C0C0D02 */ lui $t4, %hi(gTLUTPortraitMiniBombKart) # $t4, 0xd02
/* 050A64 8004FE64 258CB4D8 */ addiu $t4, %lo(gTLUTPortraitMiniBombKart) # addiu $t4, $t4, -0x4b28
/* 050A60 8004FE60 3C0C0D02 */ lui $t4, %hi(gTLUTPortraitBombKartAndQuestionMark) # $t4, 0xd02
/* 050A64 8004FE64 258CB4D8 */ addiu $t4, %lo(gTLUTPortraitBombKartAndQuestionMark) # addiu $t4, $t4, -0x4b28
/* 050A68 8004FE68 26180008 */ addiu $t8, $s0, 8
/* 050A6C 8004FE6C AE380000 */ sw $t8, ($s1)
/* 050A70 8004FE70 3C19FD10 */ lui $t9, 0xfd10

View File

@ -28,10 +28,10 @@ glabel func_80050C68
/* 0518CC 80050CCC 10400048 */ beqz $v0, .L80050DF0
/* 0518D0 80050CD0 3224FFFF */ andi $a0, $s1, 0xffff
/* 0518D4 80050CD4 3C130D00 */ lui $s3, %hi(D_0D007DB8) # $s3, 0xd00
/* 0518D8 80050CD8 3C140D02 */ lui $s4, %hi(gTLUTPortraitMiniBombKart) # $s4, 0xd02
/* 0518D8 80050CD8 3C140D02 */ lui $s4, %hi(gTLUTPortraitBombKartAndQuestionMark) # $s4, 0xd02
/* 0518DC 80050CDC 3C150D00 */ lui $s5, %hi(D_0D0069E0) # $s5, 0xd00
/* 0518E0 80050CE0 26B569E0 */ addiu $s5, %lo(D_0D0069E0) # addiu $s5, $s5, 0x69e0
/* 0518E4 80050CE4 2694B4D8 */ addiu $s4, %lo(gTLUTPortraitMiniBombKart) # addiu $s4, $s4, -0x4b28
/* 0518E4 80050CE4 2694B4D8 */ addiu $s4, %lo(gTLUTPortraitBombKartAndQuestionMark) # addiu $s4, $s4, -0x4b28
/* 0518E8 80050CE8 26737DB8 */ addiu $s3, %lo(D_0D007DB8) # addiu $s3, $s3, 0x7db8
/* 0518EC 80050CEC 03C02825 */ move $a1, $fp
/* 0518F0 80050CF0 0C0141F6 */ jal func_800507D8
@ -44,8 +44,8 @@ glabel func_80050C68
/* 05190C 80050D0C AC530004 */ sw $s3, 4($v0)
/* 051910 80050D10 AC560000 */ sw $s6, ($v0)
/* 051914 80050D14 8E020000 */ lw $v0, ($s0)
/* 051918 80050D18 3C040D02 */ lui $a0, %hi(gTexturePortraitMiniBombKart) # $a0, 0xd02
/* 05191C 80050D1C 2484D6D8 */ addiu $a0, %lo(gTexturePortraitMiniBombKart) # addiu $a0, $a0, -0x2928
/* 051918 80050D18 3C040D02 */ lui $a0, %hi(gTexturePortraitBombKartAndQuestionMark) # $a0, 0xd02
/* 05191C 80050D1C 2484D6D8 */ addiu $a0, %lo(gTexturePortraitBombKartAndQuestionMark) # addiu $a0, $a0, -0x2928
/* 051920 80050D20 244F0008 */ addiu $t7, $v0, 8
/* 051924 80050D24 AE0F0000 */ sw $t7, ($s0)
/* 051928 80050D28 AC540004 */ sw $s4, 4($v0)

View File

@ -72,8 +72,8 @@ glabel func_80050E34
/* 051B38 80050F38 AC580000 */ sw $t8, ($v0)
/* 051B3C 80050F3C AC590004 */ sw $t9, 4($v0)
/* 051B40 80050F40 8E020000 */ lw $v0, ($s0)
/* 051B44 80050F44 3C180D02 */ lui $t8, %hi(gTLUTPortraitMiniBombKart) # $t8, 0xd02
/* 051B48 80050F48 2718B4D8 */ addiu $t8, %lo(gTLUTPortraitMiniBombKart) # addiu $t8, $t8, -0x4b28
/* 051B44 80050F44 3C180D02 */ lui $t8, %hi(gTLUTPortraitBombKartAndQuestionMark) # $t8, 0xd02
/* 051B48 80050F48 2718B4D8 */ addiu $t8, %lo(gTLUTPortraitBombKartAndQuestionMark) # addiu $t8, $t8, -0x4b28
/* 051B4C 80050F4C 244E0008 */ addiu $t6, $v0, 8
/* 051B50 80050F50 AE0E0000 */ sw $t6, ($s0)
/* 051B54 80050F54 3C0FFD10 */ lui $t7, 0xfd10

View File

@ -56,12 +56,12 @@ glabel func_80059560
/* 05A234 80059634 00003025 */ move $a2, $zero
/* 05A238 80059638 3C073F80 */ lui $a3, 0x3f80
/* 05A23C 8005963C 11200014 */ beqz $t1, .L80059690
/* 05A240 80059640 3C0A0D02 */ lui $t2, %hi(gTLUTPortraitMiniBombKart) # $t2, 0xd02
/* 05A244 80059644 3C0B0D02 */ lui $t3, %hi(gTexturePortraitMiniBombKart) # $t3, 0xd02
/* 05A240 80059640 3C0A0D02 */ lui $t2, %hi(gTLUTPortraitBombKartAndQuestionMark) # $t2, 0xd02
/* 05A244 80059644 3C0B0D02 */ lui $t3, %hi(gTexturePortraitBombKartAndQuestionMark) # $t3, 0xd02
/* 05A248 80059648 3C0C0D00 */ lui $t4, %hi(D_0D005AE0) # $t4, 0xd00
/* 05A24C 8005964C 258C5AE0 */ addiu $t4, %lo(D_0D005AE0) # addiu $t4, $t4, 0x5ae0
/* 05A250 80059650 256BD6D8 */ addiu $t3, %lo(gTexturePortraitMiniBombKart) # addiu $t3, $t3, -0x2928
/* 05A254 80059654 254AB4D8 */ addiu $t2, %lo(gTLUTPortraitMiniBombKart) # addiu $t2, $t2, -0x4b28
/* 05A250 80059650 256BD6D8 */ addiu $t3, %lo(gTexturePortraitBombKartAndQuestionMark) # addiu $t3, $t3, -0x2928
/* 05A254 80059654 254AB4D8 */ addiu $t2, %lo(gTLUTPortraitBombKartAndQuestionMark) # addiu $t2, $t2, -0x4b28
/* 05A258 80059658 240D0020 */ li $t5, 32
/* 05A25C 8005965C 240E0020 */ li $t6, 32
/* 05A260 80059660 240F0020 */ li $t7, 32

View File

@ -222,12 +222,12 @@ glabel L80070AA8
/* 0716B8 80070AB8 11410251 */ beq $t2, $at, .L80071400
/* 0716BC 80070ABC 26313EA0 */ addiu $s1, %lo(D_80183EA0) # addiu $s1, $s1, 0x3ea0
/* 0716C0 80070AC0 8E300000 */ lw $s0, ($s1)
/* 0716C4 80070AC4 3C050600 */ lui $a1, %hi(D_06007BB8) # $a1, 0x600
/* 0716C4 80070AC4 3C050600 */ lui $a1, %hi(gTLUTBat) # $a1, 0x600
/* 0716C8 80070AC8 3C060600 */ lui $a2, %hi(D_06007DB8) # $a2, 0x600
/* 0716CC 80070ACC 240B0040 */ li $t3, 64
/* 0716D0 80070AD0 AFAB0010 */ sw $t3, 0x10($sp)
/* 0716D4 80070AD4 24C67DB8 */ addiu $a2, %lo(D_06007DB8) # addiu $a2, $a2, 0x7db8
/* 0716D8 80070AD8 24A57BB8 */ addiu $a1, %lo(D_06007BB8) # addiu $a1, $a1, 0x7bb8
/* 0716D8 80070AD8 24A57BB8 */ addiu $a1, %lo(gTLUTBat) # addiu $a1, $a1, 0x7bb8
/* 0716DC 80070ADC 24070020 */ li $a3, 32
/* 0716E0 80070AE0 0C01CD11 */ jal func_80073444
/* 0716E4 80070AE4 02002025 */ move $a0, $s0

View File

@ -8,12 +8,12 @@ glabel func_800792D8
/* 079EF0 800792F0 3C018019 */ lui $at, %hi(D_8018D168) # $at, 0x8019
/* 079EF4 800792F4 AC20D168 */ sw $zero, %lo(D_8018D168)($at)
.L800792F8:
/* 079EF8 800792F8 3C050D02 */ lui $a1, %hi(D_0D024ED8) # $a1, 0xd02
/* 079EF8 800792F8 3C050D02 */ lui $a1, %hi(gTLUTLakituCountdown) # $a1, 0xd02
/* 079EFC 800792FC 3C060F06 */ lui $a2, %hi(D_0F05EB50) # $a2, 0xf06
/* 079F00 80079300 240E0048 */ li $t6, 72
/* 079F04 80079304 AFAE0010 */ sw $t6, 0x10($sp)
/* 079F08 80079308 24C6EB50 */ addiu $a2, %lo(D_0F05EB50) # addiu $a2, $a2, -0x14b0
/* 079F0C 8007930C 24A54ED8 */ addiu $a1, %lo(D_0D024ED8) # addiu $a1, $a1, 0x4ed8
/* 079F0C 8007930C 24A54ED8 */ addiu $a1, %lo(gTLUTLakituCountdown) # addiu $a1, $a1, 0x4ed8
/* 079F10 80079310 8FA40028 */ lw $a0, 0x28($sp)
/* 079F14 80079314 0C01CD11 */ jal func_80073444
/* 079F18 80079318 24070038 */ li $a3, 56

View File

@ -4,12 +4,12 @@ glabel func_8007963C
/* 07A244 80079644 AFB00020 */ sw $s0, 0x20($sp)
/* 07A248 80079648 0C01E47C */ jal func_800791F0
/* 07A24C 8007964C 00808025 */ move $s0, $a0
/* 07A250 80079650 3C050D02 */ lui $a1, %hi(D_0D0254D8) # $a1, 0xd02
/* 07A250 80079650 3C050D02 */ lui $a1, %hi(gTLUTLakituCheckeredFlag) # $a1, 0xd02
/* 07A254 80079654 3C060F08 */ lui $a2, %hi(D_0F07E350) # $a2, 0xf08
/* 07A258 80079658 240E0038 */ li $t6, 56
/* 07A25C 8007965C AFAE0010 */ sw $t6, 0x10($sp)
/* 07A260 80079660 24C6E350 */ addiu $a2, %lo(D_0F07E350) # addiu $a2, $a2, -0x1cb0
/* 07A264 80079664 24A554D8 */ addiu $a1, %lo(D_0D0254D8) # addiu $a1, $a1, 0x54d8
/* 07A264 80079664 24A554D8 */ addiu $a1, %lo(gTLUTLakituCheckeredFlag) # addiu $a1, $a1, 0x54d8
/* 07A268 80079668 02002025 */ move $a0, $s0
/* 07A26C 8007966C 0C01CD11 */ jal func_80073444
/* 07A270 80079670 24070048 */ li $a3, 72

View File

@ -5,12 +5,12 @@ glabel func_800799A8
/* 07A5B4 800799B4 00808025 */ move $s0, $a0
/* 07A5B8 800799B8 0C01E47C */ jal func_800791F0
/* 07A5BC 800799BC AFA5002C */ sw $a1, 0x2c($sp)
/* 07A5C0 800799C0 3C050D02 */ lui $a1, %hi(D_0D025CD8) # $a1, 0xd02
/* 07A5C0 800799C0 3C050D02 */ lui $a1, %hi(gTLUTLakituFishing) # $a1, 0xd02
/* 07A5C4 800799C4 3C060F0D */ lui $a2, %hi(D_0F0CCF50) # $a2, 0xf0d
/* 07A5C8 800799C8 240E0048 */ li $t6, 72
/* 07A5CC 800799CC AFAE0010 */ sw $t6, 0x10($sp)
/* 07A5D0 800799D0 24C6CF50 */ addiu $a2, %lo(D_0F0CCF50) # addiu $a2, $a2, -0x30b0
/* 07A5D4 800799D4 24A55CD8 */ addiu $a1, %lo(D_0D025CD8) # addiu $a1, $a1, 0x5cd8
/* 07A5D4 800799D4 24A55CD8 */ addiu $a1, %lo(gTLUTLakituFishing) # addiu $a1, $a1, 0x5cd8
/* 07A5D8 800799D8 02002025 */ move $a0, $s0
/* 07A5DC 800799DC 0C01CD11 */ jal func_80073444
/* 07A5E0 800799E0 24070038 */ li $a3, 56

View File

@ -4,12 +4,12 @@ glabel func_8007A060
/* 07AC68 8007A068 AFB00020 */ sw $s0, 0x20($sp)
/* 07AC6C 8007A06C 0C01E47C */ jal func_800791F0
/* 07AC70 8007A070 00808025 */ move $s0, $a0
/* 07AC74 8007A074 3C050D02 */ lui $a1, %hi(D_0D0256D8) # $a1, 0xd02
/* 07AC74 8007A074 3C050D02 */ lui $a1, %hi(gTLUTLakituSecondLap) # $a1, 0xd02
/* 07AC78 8007A078 3C060F0A */ lui $a2, %hi(D_0F09DB50) # $a2, 0xf0a
/* 07AC7C 8007A07C 240E0038 */ li $t6, 56
/* 07AC80 8007A080 AFAE0010 */ sw $t6, 0x10($sp)
/* 07AC84 8007A084 24C6DB50 */ addiu $a2, %lo(D_0F09DB50) # addiu $a2, $a2, -0x24b0
/* 07AC88 8007A088 24A556D8 */ addiu $a1, %lo(D_0D0256D8) # addiu $a1, $a1, 0x56d8
/* 07AC88 8007A088 24A556D8 */ addiu $a1, %lo(gTLUTLakituSecondLap) # addiu $a1, $a1, 0x56d8
/* 07AC8C 8007A08C 02002025 */ move $a0, $s0
/* 07AC90 8007A090 0C01CD11 */ jal func_80073444
/* 07AC94 8007A094 24070048 */ li $a3, 72

View File

@ -4,12 +4,12 @@ glabel func_8007A228
/* 07AE30 8007A230 AFB00020 */ sw $s0, 0x20($sp)
/* 07AE34 8007A234 0C01E47C */ jal func_800791F0
/* 07AE38 8007A238 00808025 */ move $s0, $a0
/* 07AE3C 8007A23C 3C050D02 */ lui $a1, %hi(D_0D0258D8) # $a1, 0xd02
/* 07AE3C 8007A23C 3C050D02 */ lui $a1, %hi(gTLUTLakituFinalLap) # $a1, 0xd02
/* 07AE40 8007A240 3C060F0B */ lui $a2, %hi(D_0F0AD750) # $a2, 0xf0b
/* 07AE44 8007A244 240E0038 */ li $t6, 56
/* 07AE48 8007A248 AFAE0010 */ sw $t6, 0x10($sp)
/* 07AE4C 8007A24C 24C6D750 */ addiu $a2, %lo(D_0F0AD750) # addiu $a2, $a2, -0x28b0
/* 07AE50 8007A250 24A558D8 */ addiu $a1, %lo(D_0D0258D8) # addiu $a1, $a1, 0x58d8
/* 07AE50 8007A250 24A558D8 */ addiu $a1, %lo(gTLUTLakituFinalLap) # addiu $a1, $a1, 0x58d8
/* 07AE54 8007A254 02002025 */ move $a0, $s0
/* 07AE58 8007A258 0C01CD11 */ jal func_80073444
/* 07AE5C 8007A25C 24070048 */ li $a3, 72

View File

@ -5,12 +5,12 @@ glabel func_8007A3F0
/* 07AFFC 8007A3FC 00808025 */ move $s0, $a0
/* 07B000 8007A400 0C01E47C */ jal func_800791F0
/* 07B004 8007A404 AFA50034 */ sw $a1, 0x34($sp)
/* 07B008 8007A408 3C050D02 */ lui $a1, %hi(D_0D025AD8) # $a1, 0xd02
/* 07B008 8007A408 3C050D02 */ lui $a1, %hi(gTLUTLakituReverse) # $a1, 0xd02
/* 07B00C 8007A40C 3C060F0C */ lui $a2, %hi(D_0F0BD350) # $a2, 0xf0c
/* 07B010 8007A410 240E0038 */ li $t6, 56
/* 07B014 8007A414 AFAE0010 */ sw $t6, 0x10($sp)
/* 07B018 8007A418 24C6D350 */ addiu $a2, %lo(D_0F0BD350) # addiu $a2, $a2, -0x2cb0
/* 07B01C 8007A41C 24A55AD8 */ addiu $a1, %lo(D_0D025AD8) # addiu $a1, $a1, 0x5ad8
/* 07B01C 8007A41C 24A55AD8 */ addiu $a1, %lo(gTLUTLakituReverse) # addiu $a1, $a1, 0x5ad8
/* 07B020 8007A420 02002025 */ move $a0, $s0
/* 07B024 8007A424 0C01CD11 */ jal func_80073444
/* 07B028 8007A428 24070048 */ li $a3, 72

View File

@ -2,14 +2,14 @@ glabel func_8007C5B4
/* 07D1B4 8007C5B4 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 07D1B8 8007C5B8 AFBF0024 */ sw $ra, 0x24($sp)
/* 07D1BC 8007C5BC AFB10020 */ sw $s1, 0x20($sp)
/* 07D1C0 8007C5C0 3C050600 */ lui $a1, %hi(D_06005C80) # $a1, 0x600
/* 07D1C0 8007C5C0 3C050600 */ lui $a1, %hi(gTLUTBoo) # $a1, 0x600
/* 07D1C4 8007C5C4 3C068016 */ lui $a2, %hi(D_80165880) # $a2, 0x8016
/* 07D1C8 8007C5C8 240E0028 */ li $t6, 40
/* 07D1CC 8007C5CC 00808825 */ move $s1, $a0
/* 07D1D0 8007C5D0 AFB0001C */ sw $s0, 0x1c($sp)
/* 07D1D4 8007C5D4 AFAE0010 */ sw $t6, 0x10($sp)
/* 07D1D8 8007C5D8 8CC65880 */ lw $a2, %lo(D_80165880)($a2)
/* 07D1DC 8007C5DC 24A55C80 */ addiu $a1, %lo(D_06005C80) # addiu $a1, $a1, 0x5c80
/* 07D1DC 8007C5DC 24A55C80 */ addiu $a1, %lo(gTLUTBoo) # addiu $a1, $a1, 0x5c80
/* 07D1E0 8007C5E0 0C01CD11 */ jal func_80073444
/* 07D1E4 8007C5E4 24070030 */ li $a3, 48
/* 07D1E8 8007C5E8 001178C0 */ sll $t7, $s1, 3

View File

@ -2,14 +2,14 @@ glabel func_8007CE0C
/* 07DA0C 8007CE0C 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 07DA10 8007CE10 AFBF0024 */ sw $ra, 0x24($sp)
/* 07DA14 8007CE14 AFB10020 */ sw $s1, 0x20($sp)
/* 07DA18 8007CE18 3C050600 */ lui $a1, %hi(D_06005C80) # $a1, 0x600
/* 07DA18 8007CE18 3C050600 */ lui $a1, %hi(gTLUTBoo) # $a1, 0x600
/* 07DA1C 8007CE1C 3C060F0D */ lui $a2, %hi(D_0F0D0E50) # $a2, 0xf0d
/* 07DA20 8007CE20 240E0028 */ li $t6, 40
/* 07DA24 8007CE24 00808825 */ move $s1, $a0
/* 07DA28 8007CE28 AFB0001C */ sw $s0, 0x1c($sp)
/* 07DA2C 8007CE2C AFAE0010 */ sw $t6, 0x10($sp)
/* 07DA30 8007CE30 24C60E50 */ addiu $a2, %lo(D_0F0D0E50) # addiu $a2, $a2, 0xe50
/* 07DA34 8007CE34 24A55C80 */ addiu $a1, %lo(D_06005C80) # addiu $a1, $a1, 0x5c80
/* 07DA34 8007CE34 24A55C80 */ addiu $a1, %lo(gTLUTBoo) # addiu $a1, $a1, 0x5c80
/* 07DA38 8007CE38 0C01CD11 */ jal func_80073444
/* 07DA3C 8007CE3C 24070030 */ li $a3, 48
/* 07DA40 8007CE40 001178C0 */ sll $t7, $s1, 3

View File

@ -44,12 +44,12 @@ glabel func_8007EC30
/* 07F8D4 8007ECD4 0C022E2F */ jal func_8008B8BC
/* 07F8D8 8007ECD8 00003825 */ move $a3, $zero
.L8007ECDC:
/* 07F8DC 8007ECDC 3C050600 */ lui $a1, %hi(D_06006F38) # $a1, 0x600
/* 07F8DC 8007ECDC 3C050600 */ lui $a1, %hi(gTLUTWhomp) # $a1, 0x600
/* 07F8E0 8007ECE0 3C060600 */ lui $a2, %hi(D_06007138) # $a2, 0x600
/* 07F8E4 8007ECE4 24190040 */ li $t9, 64
/* 07F8E8 8007ECE8 AFB90010 */ sw $t9, 0x10($sp)
/* 07F8EC 8007ECEC 24C67138 */ addiu $a2, %lo(D_06007138) # addiu $a2, $a2, 0x7138
/* 07F8F0 8007ECF0 24A56F38 */ addiu $a1, %lo(D_06006F38) # addiu $a1, $a1, 0x6f38
/* 07F8F0 8007ECF0 24A56F38 */ addiu $a1, %lo(gTLUTWhomp) # addiu $a1, $a1, 0x6f38
/* 07F8F4 8007ECF4 02002025 */ move $a0, $s0
/* 07F8F8 8007ECF8 0C01CD11 */ jal func_80073444
/* 07F8FC 8007ECFC 24070010 */ li $a3, 16

View File

@ -2,14 +2,14 @@ glabel func_8007EE5C
/* 07FA5C 8007EE5C 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 07FA60 8007EE60 AFBF0024 */ sw $ra, 0x24($sp)
/* 07FA64 8007EE64 AFB10020 */ sw $s1, 0x20($sp)
/* 07FA68 8007EE68 3C050600 */ lui $a1, %hi(D_06006F38) # $a1, 0x600
/* 07FA68 8007EE68 3C050600 */ lui $a1, %hi(gTLUTWhomp) # $a1, 0x600
/* 07FA6C 8007EE6C 3C060600 */ lui $a2, %hi(D_06007138) # $a2, 0x600
/* 07FA70 8007EE70 240E0040 */ li $t6, 64
/* 07FA74 8007EE74 00808825 */ move $s1, $a0
/* 07FA78 8007EE78 AFB0001C */ sw $s0, 0x1c($sp)
/* 07FA7C 8007EE7C AFAE0010 */ sw $t6, 0x10($sp)
/* 07FA80 8007EE80 24C67138 */ addiu $a2, %lo(D_06007138) # addiu $a2, $a2, 0x7138
/* 07FA84 8007EE84 24A56F38 */ addiu $a1, %lo(D_06006F38) # addiu $a1, $a1, 0x6f38
/* 07FA84 8007EE84 24A56F38 */ addiu $a1, %lo(gTLUTWhomp) # addiu $a1, $a1, 0x6f38
/* 07FA88 8007EE88 0C01CD11 */ jal func_80073444
/* 07FA8C 8007EE8C 24070010 */ li $a3, 16
/* 07FA90 8007EE90 001178C0 */ sll $t7, $s1, 3

View File

@ -2,7 +2,7 @@ glabel func_8007FA08
/* 080608 8007FA08 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 08060C 8007FA0C AFBF002C */ sw $ra, 0x2c($sp)
/* 080610 8007FA10 AFB10028 */ sw $s1, 0x28($sp)
/* 080614 8007FA14 3C050600 */ lui $a1, %hi(D_06006F38) # $a1, 0x600
/* 080614 8007FA14 3C050600 */ lui $a1, %hi(gTLUTWhomp) # $a1, 0x600
/* 080618 8007FA18 3C060600 */ lui $a2, %hi(D_06007138) # $a2, 0x600
/* 08061C 8007FA1C 240E0040 */ li $t6, 64
/* 080620 8007FA20 00808825 */ move $s1, $a0
@ -10,7 +10,7 @@ glabel func_8007FA08
/* 080628 8007FA28 F7B40018 */ sdc1 $f20, 0x18($sp)
/* 08062C 8007FA2C AFAE0010 */ sw $t6, 0x10($sp)
/* 080630 8007FA30 24C67138 */ addiu $a2, %lo(D_06007138) # addiu $a2, $a2, 0x7138
/* 080634 8007FA34 24A56F38 */ addiu $a1, %lo(D_06006F38) # addiu $a1, $a1, 0x6f38
/* 080634 8007FA34 24A56F38 */ addiu $a1, %lo(gTLUTWhomp) # addiu $a1, $a1, 0x6f38
/* 080638 8007FA38 0C01CD11 */ jal func_80073444
/* 08063C 8007FA3C 24070010 */ li $a3, 16
/* 080640 8007FA40 001178C0 */ sll $t7, $s1, 3

View File

@ -2,14 +2,14 @@ glabel func_80080078
/* 080C78 80080078 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 080C7C 8008007C AFBF0024 */ sw $ra, 0x24($sp)
/* 080C80 80080080 AFB10020 */ sw $s1, 0x20($sp)
/* 080C84 80080084 3C050600 */ lui $a1, %hi(D_06006F38) # $a1, 0x600
/* 080C84 80080084 3C050600 */ lui $a1, %hi(gTLUTWhomp) # $a1, 0x600
/* 080C88 80080088 3C060600 */ lui $a2, %hi(D_06007138) # $a2, 0x600
/* 080C8C 8008008C 240E0040 */ li $t6, 64
/* 080C90 80080090 00808825 */ move $s1, $a0
/* 080C94 80080094 AFB0001C */ sw $s0, 0x1c($sp)
/* 080C98 80080098 AFAE0010 */ sw $t6, 0x10($sp)
/* 080C9C 8008009C 24C67138 */ addiu $a2, %lo(D_06007138) # addiu $a2, $a2, 0x7138
/* 080CA0 800800A0 24A56F38 */ addiu $a1, %lo(D_06006F38) # addiu $a1, $a1, 0x6f38
/* 080CA0 800800A0 24A56F38 */ addiu $a1, %lo(gTLUTWhomp) # addiu $a1, $a1, 0x6f38
/* 080CA4 800800A4 0C01CD11 */ jal func_80073444
/* 080CA8 800800A8 24070010 */ li $a3, 16
/* 080CAC 800800AC 001178C0 */ sll $t7, $s1, 3

View File

@ -9,7 +9,7 @@ glabel func_800802C0
/* 080EDC 800802DC AFBF002C */ sw $ra, 0x2c($sp)
/* 080EE0 800802E0 AFB10028 */ sw $s1, 0x28($sp)
/* 080EE4 800802E4 01CF8021 */ addu $s0, $t6, $t7
/* 080EE8 800802E8 3C050600 */ lui $a1, %hi(D_06006F38) # $a1, 0x600
/* 080EE8 800802E8 3C050600 */ lui $a1, %hi(gTLUTWhomp) # $a1, 0x600
/* 080EEC 800802EC 3C060600 */ lui $a2, %hi(D_06007138) # $a2, 0x600
/* 080EF0 800802F0 24180040 */ li $t8, 64
/* 080EF4 800802F4 00808825 */ move $s1, $a0
@ -17,7 +17,7 @@ glabel func_800802C0
/* 080EFC 800802FC A20000D8 */ sb $zero, 0xd8($s0)
/* 080F00 80080300 AFB80010 */ sw $t8, 0x10($sp)
/* 080F04 80080304 24C67138 */ addiu $a2, %lo(D_06007138) # addiu $a2, $a2, 0x7138
/* 080F08 80080308 24A56F38 */ addiu $a1, %lo(D_06006F38) # addiu $a1, $a1, 0x6f38
/* 080F08 80080308 24A56F38 */ addiu $a1, %lo(gTLUTWhomp) # addiu $a1, $a1, 0x6f38
/* 080F0C 8008030C 0C01CD11 */ jal func_80073444
/* 080F10 80080310 24070010 */ li $a3, 16
/* 080F14 80080314 3C013FC0 */ li $at, 0x3FC00000 # 1.500000

View File

@ -2,14 +2,14 @@ glabel func_80080524
/* 081124 80080524 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 081128 80080528 AFBF0024 */ sw $ra, 0x24($sp)
/* 08112C 8008052C AFB10020 */ sw $s1, 0x20($sp)
/* 081130 80080530 3C050600 */ lui $a1, %hi(D_06006F38) # $a1, 0x600
/* 081130 80080530 3C050600 */ lui $a1, %hi(gTLUTWhomp) # $a1, 0x600
/* 081134 80080534 3C060600 */ lui $a2, %hi(D_06007138) # $a2, 0x600
/* 081138 80080538 240E0040 */ li $t6, 64
/* 08113C 8008053C 00808825 */ move $s1, $a0
/* 081140 80080540 AFB0001C */ sw $s0, 0x1c($sp)
/* 081144 80080544 AFAE0010 */ sw $t6, 0x10($sp)
/* 081148 80080548 24C67138 */ addiu $a2, %lo(D_06007138) # addiu $a2, $a2, 0x7138
/* 08114C 8008054C 24A56F38 */ addiu $a1, %lo(D_06006F38) # addiu $a1, $a1, 0x6f38
/* 08114C 8008054C 24A56F38 */ addiu $a1, %lo(gTLUTWhomp) # addiu $a1, $a1, 0x6f38
/* 081150 80080550 0C01CD11 */ jal func_80073444
/* 081154 80080554 24070010 */ li $a3, 16
/* 081158 80080558 001178C0 */ sll $t7, $s1, 3

View File

@ -2,14 +2,14 @@ glabel func_80082A4C
/* 08364C 80082A4C 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 083650 80082A50 AFBF0024 */ sw $ra, 0x24($sp)
/* 083654 80082A54 AFB0001C */ sw $s0, 0x1c($sp)
/* 083658 80082A58 3C050601 */ lui $a1, %hi(D_0600D628) # $a1, 0x601
/* 083658 80082A58 3C050601 */ lui $a1, %hi(gTLUTCrab) # $a1, 0x601
/* 08365C 80082A5C 3C060601 */ lui $a2, %hi(D_0600D828) # $a2, 0x601
/* 083660 80082A60 240E0040 */ li $t6, 64
/* 083664 80082A64 00808025 */ move $s0, $a0
/* 083668 80082A68 AFB10020 */ sw $s1, 0x20($sp)
/* 08366C 80082A6C AFAE0010 */ sw $t6, 0x10($sp)
/* 083670 80082A70 24C6D828 */ addiu $a2, %lo(D_0600D828) # addiu $a2, $a2, -0x27d8
/* 083674 80082A74 24A5D628 */ addiu $a1, %lo(D_0600D628) # addiu $a1, $a1, -0x29d8
/* 083674 80082A74 24A5D628 */ addiu $a1, %lo(gTLUTCrab) # addiu $a1, $a1, -0x29d8
/* 083678 80082A78 0C01CD11 */ jal func_80073444
/* 08367C 80082A7C 24070040 */ li $a3, 64
/* 083680 80082A80 001078C0 */ sll $t7, $s0, 3

View File

@ -3,14 +3,14 @@ glabel func_8008311C
/* 083D20 80083120 AFA5002C */ sw $a1, 0x2c($sp)
/* 083D24 80083124 AFBF0024 */ sw $ra, 0x24($sp)
/* 083D28 80083128 AFB10020 */ sw $s1, 0x20($sp)
/* 083D2C 8008312C 3C050601 */ lui $a1, %hi(D_06014908) # $a1, 0x601
/* 083D30 80083130 3C060601 */ lui $a2, %hi(D_06014B08) # $a2, 0x601
/* 083D2C 8008312C 3C050601 */ lui $a1, %hi(gTLUTHedgehog) # $a1, 0x601
/* 083D30 80083130 3C060601 */ lui $a2, %hi(gTextureHedgehog) # $a2, 0x601
/* 083D34 80083134 240E0040 */ li $t6, 64
/* 083D38 80083138 00808825 */ move $s1, $a0
/* 083D3C 8008313C AFB0001C */ sw $s0, 0x1c($sp)
/* 083D40 80083140 AFAE0010 */ sw $t6, 0x10($sp)
/* 083D44 80083144 24C64B08 */ addiu $a2, %lo(D_06014B08) # addiu $a2, $a2, 0x4b08
/* 083D48 80083148 24A54908 */ addiu $a1, %lo(D_06014908) # addiu $a1, $a1, 0x4908
/* 083D44 80083144 24C64B08 */ addiu $a2, %lo(gTextureHedgehog) # addiu $a2, $a2, 0x4b08
/* 083D48 80083148 24A54908 */ addiu $a1, %lo(gTLUTHedgehog) # addiu $a1, $a1, 0x4908
/* 083D4C 8008314C 0C01CD11 */ jal func_80073444
/* 083D50 80083150 24070040 */ li $a3, 64
/* 083D54 80083154 001178C0 */ sll $t7, $s1, 3
@ -19,11 +19,11 @@ glabel func_8008311C
/* 083D60 80083160 27185C18 */ addiu $t8, %lo(D_80165C18) # addiu $t8, $t8, 0x5c18
/* 083D64 80083164 000F7940 */ sll $t7, $t7, 5
/* 083D68 80083168 01F88021 */ addu $s0, $t7, $t8
/* 083D6C 8008316C 3C190601 */ lui $t9, %hi(D_06014908) # $t9, 0x601
/* 083D70 80083170 3C080601 */ lui $t0, %hi(D_06014B08) # $t0, 0x601
/* 083D6C 8008316C 3C190601 */ lui $t9, %hi(gTLUTHedgehog) # $t9, 0x601
/* 083D70 80083170 3C080601 */ lui $t0, %hi(gTextureHedgehog) # $t0, 0x601
/* 083D74 80083174 3C090D00 */ lui $t1, %hi(D_0D0060B0) # $t1, 0xd00
/* 083D78 80083178 27394908 */ addiu $t9, %lo(D_06014908) # addiu $t9, $t9, 0x4908
/* 083D7C 8008317C 25084B08 */ addiu $t0, %lo(D_06014B08) # addiu $t0, $t0, 0x4b08
/* 083D78 80083178 27394908 */ addiu $t9, %lo(gTLUTHedgehog) # addiu $t9, $t9, 0x4908
/* 083D7C 8008317C 25084B08 */ addiu $t0, %lo(gTextureHedgehog) # addiu $t0, $t0, 0x4b08
/* 083D80 80083180 252960B0 */ addiu $t1, %lo(D_0D0060B0) # addiu $t1, $t1, 0x60b0
/* 083D84 80083184 AE190060 */ sw $t9, 0x60($s0)
/* 083D88 80083188 AE080064 */ sw $t0, 0x64($s0)

View File

@ -2,14 +2,14 @@ glabel func_80083868
/* 084468 80083868 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 08446C 8008386C AFBF0024 */ sw $ra, 0x24($sp)
/* 084470 80083870 AFB10020 */ sw $s1, 0x20($sp)
/* 084474 80083874 3C050600 */ lui $a1, %hi(D_06004B20) # $a1, 0x600
/* 084478 80083878 3C060600 */ lui $a2, %hi(D_06004D20) # $a2, 0x600
/* 084474 80083874 3C050600 */ lui $a1, %hi(gTLUTSnowman) # $a1, 0x600
/* 084478 80083878 3C060600 */ lui $a2, %hi(gTextureSnowmanHead) # $a2, 0x600
/* 08447C 8008387C 240E0040 */ li $t6, 64
/* 084480 80083880 00808825 */ move $s1, $a0
/* 084484 80083884 AFB0001C */ sw $s0, 0x1c($sp)
/* 084488 80083888 AFAE0010 */ sw $t6, 0x10($sp)
/* 08448C 8008388C 24C64D20 */ addiu $a2, %lo(D_06004D20) # addiu $a2, $a2, 0x4d20
/* 084490 80083890 24A54B20 */ addiu $a1, %lo(D_06004B20) # addiu $a1, $a1, 0x4b20
/* 08448C 8008388C 24C64D20 */ addiu $a2, %lo(gTextureSnowmanHead) # addiu $a2, $a2, 0x4d20
/* 084490 80083890 24A54B20 */ addiu $a1, %lo(gTLUTSnowman) # addiu $a1, $a1, 0x4b20
/* 084494 80083894 0C01CD11 */ jal func_80073444
/* 084498 80083898 24070040 */ li $a3, 64
/* 08449C 8008389C 001178C0 */ sll $t7, $s1, 3

View File

@ -2,13 +2,13 @@ glabel func_80083B0C
/* 08470C 80083B0C 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 084710 80083B10 AFBF0024 */ sw $ra, 0x24($sp)
/* 084714 80083B14 AFB00020 */ sw $s0, 0x20($sp)
/* 084718 80083B18 3C050600 */ lui $a1, %hi(D_06004B20) # $a1, 0x600
/* 08471C 80083B1C 3C060600 */ lui $a2, %hi(D_06005D20) # $a2, 0x600
/* 084718 80083B18 3C050600 */ lui $a1, %hi(gTLUTSnowman) # $a1, 0x600
/* 08471C 80083B1C 3C060600 */ lui $a2, %hi(gTextureSnowmanBody) # $a2, 0x600
/* 084720 80083B20 240E0040 */ li $t6, 64
/* 084724 80083B24 00808025 */ move $s0, $a0
/* 084728 80083B28 AFAE0010 */ sw $t6, 0x10($sp)
/* 08472C 80083B2C 24C65D20 */ addiu $a2, %lo(D_06005D20) # addiu $a2, $a2, 0x5d20
/* 084730 80083B30 24A54B20 */ addiu $a1, %lo(D_06004B20) # addiu $a1, $a1, 0x4b20
/* 08472C 80083B2C 24C65D20 */ addiu $a2, %lo(gTextureSnowmanBody) # addiu $a2, $a2, 0x5d20
/* 084730 80083B30 24A54B20 */ addiu $a1, %lo(gTLUTSnowman) # addiu $a1, $a1, 0x4b20
/* 084734 80083B34 0C01CD11 */ jal func_80073444
/* 084738 80083B38 24070040 */ li $a3, 64
/* 08473C 80083B3C 001078C0 */ sll $t7, $s0, 3

File diff suppressed because it is too large Load Diff

View File

@ -6,254 +6,254 @@
.data
glabel gTexturePlayerSelect
.incbin "bin/texture_7FA3C0.rgba16.tkmk00"
.incbin "bin/gTexturePlayerSelect.rgba16.tkmk00"
glabel gTexturePlayerSelect_end
glabel gTextureOption
.incbin "bin/texture_7FAFC0.rgba16.tkmk00"
.incbin "bin/gTextureOption.rgba16.tkmk00"
glabel gTextureOption_end
glabel gTextureNameDK
.incbin "bin/texture_7FB8C0.rgba16.tkmk00"
.incbin "bin/gTextureNameDK.rgba16.tkmk00"
glabel gTextureNameDK_end
glabel gTextureNameToad
.incbin "bin/texture_7FBAC0.rgba16.tkmk00"
.incbin "bin/gTextureNameToad.rgba16.tkmk00"
glabel gTextureNameToad_end
glabel gTextureNameBowser
.incbin "bin/texture_7FBCC0.rgba16.tkmk00"
.incbin "bin/gTextureNameBowser.rgba16.tkmk00"
glabel gTextureNameBowser_end
glabel gTextureNameLuigi
.incbin "bin/texture_7FBEC0.rgba16.tkmk00"
.incbin "bin/gTextureNameLuigi.rgba16.tkmk00"
glabel gTextureNameLuigi_end
glabel gTextureNameMario
.incbin "bin/texture_7FC0C0.rgba16.tkmk00"
.incbin "bin/gTextureNameMario.rgba16.tkmk00"
glabel gTextureNameMario_end
glabel gTextureNamePeach
.incbin "bin/texture_7FC2C0.rgba16.tkmk00"
.incbin "bin/gTextureNamePeach.rgba16.tkmk00"
glabel gTextureNamePeach_end
glabel gTextureNameWario
.incbin "bin/texture_7FC4C0.rgba16.tkmk00"
.incbin "bin/gTextureNameWario.rgba16.tkmk00"
glabel gTextureNameWario_end
glabel gTextureNameYoshi
.incbin "bin/texture_7FC6C0.rgba16.tkmk00"
.incbin "bin/gTextureNameYoshi.rgba16.tkmk00"
glabel gTextureNameYoshi_end
glabel gTextureTitleMarioRaceway
.incbin "bin/texture_7FC8C0.rgba16.tkmk00"
.incbin "bin/gTextureTitleMarioRaceway.rgba16.tkmk00"
glabel gTextureTitleMarioRaceway_end
glabel gTextureTitleChocoMountain
.incbin "bin/texture_7FCDC0.rgba16.tkmk00"
.incbin "bin/gTextureTitleChocoMountain.rgba16.tkmk00"
glabel gTextureTitleChocoMountain_end
glabel gTextureTitleBowsersCastle
.incbin "bin/texture_7FD2C0.rgba16.tkmk00"
.incbin "bin/gTextureTitleBowsersCastle.rgba16.tkmk00"
glabel gTextureTitleBowsersCastle_end
glabel gTextureTitleBansheeBoardwalk
.incbin "bin/texture_7FD7C0.rgba16.tkmk00"
.incbin "bin/gTextureTitleBansheeBoardwalk.rgba16.tkmk00"
glabel gTextureTitleBansheeBoardwalk_end
glabel gTextureTitleYoshiValley
.incbin "bin/texture_7FDDC0.rgba16.tkmk00"
.incbin "bin/gTextureTitleYoshiValley.rgba16.tkmk00"
glabel gTextureTitleYoshiValley_end
glabel gTextureTitleFrappeSnowland
.incbin "bin/texture_7FE1C0.rgba16.tkmk00"
.incbin "bin/gTextureTitleFrappeSnowland.rgba16.tkmk00"
glabel gTextureTitleFrappeSnowland_end
glabel gTextureTitleKoopaTroopaBeach
.incbin "bin/texture_7FE6C0.rgba16.tkmk00"
.incbin "bin/gTextureTitleKoopaTroopaBeach.rgba16.tkmk00"
glabel gTextureTitleKoopaTroopaBeach_end
glabel gTextureTitleRoyalRaceway
.incbin "bin/texture_7FEBC0.rgba16.tkmk00"
.incbin "bin/gTextureTitleRoyalRaceway.rgba16.tkmk00"
glabel gTextureTitleRoyalRaceway_end
glabel gTextureTitleLuigiRaceway
.incbin "bin/texture_7FEFC0.rgba16.tkmk00"
.incbin "bin/gTextureTitleLuigiRaceway.rgba16.tkmk00"
glabel gTextureTitleLuigiRaceway_end
glabel gTextureTitleMooMooFarm
.incbin "bin/texture_7FF3C0.rgba16.tkmk00"
.incbin "bin/gTextureTitleMooMooFarm.rgba16.tkmk00"
glabel gTextureTitleMooMooFarm_end
glabel gTextureTitleToadsTurnpike
.incbin "bin/texture_7FF7C0.rgba16.tkmk00"
.incbin "bin/gTextureTitleToadsTurnpike.rgba16.tkmk00"
glabel gTextureTitleToadsTurnpike_end
glabel gTextureTitleKalimariDesert
.incbin "bin/texture_7FFCC0.rgba16.tkmk00"
.incbin "bin/gTextureTitleKalimariDesert.rgba16.tkmk00"
glabel gTextureTitleKalimariDesert_end
glabel gTextureTitleSherbetLand
.incbin "bin/texture_8000C0.rgba16.tkmk00"
.incbin "bin/gTextureTitleSherbetLand.rgba16.tkmk00"
glabel gTextureTitleSherbetLand_end
glabel gTextureTitleRainbowRoad
.incbin "bin/texture_8004C0.rgba16.tkmk00"
.incbin "bin/gTextureTitleRainbowRoad.rgba16.tkmk00"
glabel gTextureTitleRainbowRoad_end
glabel gTextureTitleWarioStadium
.incbin "bin/texture_8008C0.rgba16.tkmk00"
.incbin "bin/gTextureTitleWarioStadium.rgba16.tkmk00"
glabel gTextureTitleWarioStadium_end
glabel gTextureTitleBlockFort
.incbin "bin/texture_800DC0.rgba16.tkmk00"
.incbin "bin/gTextureTitleBlockFort.rgba16.tkmk00"
glabel gTextureTitleBlockFort_end
glabel gTextureTitleSkyscraper
.incbin "bin/texture_8010C0.rgba16.tkmk00"
.incbin "bin/gTextureTitleSkyscraper.rgba16.tkmk00"
glabel gTextureTitleSkyscraper_end
glabel gTextureTitleDoubleDeck
.incbin "bin/texture_8014C0.rgba16.tkmk00"
.incbin "bin/gTextureTitleDoubleDeck.rgba16.tkmk00"
glabel gTextureTitleDoubleDeck_end
glabel gTextureTitleDKsJungleParkway
.incbin "bin/texture_8018C0.rgba16.tkmk00"
.incbin "bin/gTextureTitleDKsJungleParkway.rgba16.tkmk00"
glabel gTextureTitleDKsJungleParkway_end
glabel gTextureTitleBigDonut
.incbin "bin/texture_801EC0.rgba16.tkmk00"
.incbin "bin/gTextureTitleBigDonut.rgba16.tkmk00"
glabel gTextureTitleBigDonut_end
glabel gTextureMapSelect
.incbin "bin/texture_8021C0.rgba16.tkmk00"
.incbin "bin/gTextureMapSelect.rgba16.tkmk00"
glabel gTextureMapSelect_end
glabel gTextureMenuFlowerCup
.incbin "bin/texture_802DC0.rgba16.tkmk00"
.incbin "bin/gTextureMenuFlowerCup.rgba16.tkmk00"
glabel gTextureMenuFlowerCup_end
glabel gTextureMenuMushroomCup
.incbin "bin/texture_8031C0.rgba16.tkmk00"
.incbin "bin/gTextureMenuMushroomCup.rgba16.tkmk00"
glabel gTextureMenuMushroomCup_end
glabel gTextureMenuStarCup
.incbin "bin/texture_8035C0.rgba16.tkmk00"
.incbin "bin/gTextureMenuStarCup.rgba16.tkmk00"
glabel gTextureMenuStarCup_end
glabel gTextureMenuSpecialCup
.incbin "bin/texture_8039C0.rgba16.tkmk00"
.incbin "bin/gTextureMenuSpecialCup.rgba16.tkmk00"
glabel gTextureMenuSpecialCup_end
glabel gTextureGameSelect
.incbin "bin/texture_803DC0.rgba16.tkmk00"
.incbin "bin/gTextureGameSelect.rgba16.tkmk00"
glabel gTextureGameSelect_end
glabel gTextureMenu1PGame
.incbin "bin/texture_8049C0.rgba16.tkmk00"
.incbin "bin/gTextureMenu1PGame.rgba16.tkmk00"
glabel gTextureMenu1PGame_end
glabel gTextureMenu2PGame
.incbin "bin/texture_804EC0.rgba16.tkmk00"
.incbin "bin/gTextureMenu2PGame.rgba16.tkmk00"
glabel gTextureMenu2PGame_end
glabel gTextureMenu3PGame
.incbin "bin/texture_8055C0.rgba16.tkmk00"
.incbin "bin/gTextureMenu3PGame.rgba16.tkmk00"
glabel gTextureMenu3PGame_end
glabel gTextureMenu4PGame
.incbin "bin/texture_805FC0.rgba16.tkmk00"
.incbin "bin/gTextureMenu4PGame.rgba16.tkmk00"
glabel gTextureMenu4PGame_end
glabel gTextureMenuModeBattle
.incbin "bin/texture_806AC0.rgba16.tkmk00"
.incbin "bin/gTextureMenuModeBattle.rgba16.tkmk00"
glabel gTextureMenuModeBattle_end
glabel gTextureMenuModeTimeTrials
.incbin "bin/texture_806DC0.rgba16.tkmk00"
.incbin "bin/gTextureMenuModeTimeTrials.rgba16.tkmk00"
glabel gTextureMenuModeTimeTrials_end
glabel gTextureMenuModeMarioGP
.incbin "bin/texture_8071C0.rgba16.tkmk00"
.incbin "bin/gTextureMenuModeMarioGP.rgba16.tkmk00"
glabel gTextureMenuModeMarioGP_end
glabel gTextureMenuModeVS
.incbin "bin/texture_8075C0.rgba16.tkmk00"
.incbin "bin/gTextureMenuModeVS.rgba16.tkmk00"
glabel gTextureMenuModeVS_end
glabel gTextureMenuLOption
.incbin "bin/texture_8078C0.rgba16.tkmk00"
.incbin "bin/gTextureMenuLOption.rgba16.tkmk00"
glabel gTextureMenuLOption_end
glabel gTextureMenuRData
.incbin "bin/texture_807BC0.rgba16.tkmk00"
.incbin "bin/gTextureMenuRData.rgba16.tkmk00"
glabel gTextureMenuRData_end
glabel gTextureMenu50cc
.incbin "bin/texture_807EC0.rgba16.tkmk00"
.incbin "bin/gTextureMenu50cc.rgba16.tkmk00"
glabel gTextureMenu50cc_end
glabel gTextureMenu100cc
.incbin "bin/texture_8080C0.rgba16.tkmk00"
.incbin "bin/gTextureMenu100cc.rgba16.tkmk00"
glabel gTextureMenu100cc_end
glabel gTextureMenu150cc
.incbin "bin/texture_8082C0.rgba16.tkmk00"
.incbin "bin/gTextureMenu150cc.rgba16.tkmk00"
glabel gTextureMenu150cc_end
glabel gTextureMenuExtra
.incbin "bin/texture_8084C0.rgba16.tkmk00"
.incbin "bin/gTextureMenuExtra.rgba16.tkmk00"
glabel gTextureMenuExtra_end
glabel gTextureMenuWithoutItem
.incbin "bin/texture_8086C0.rgba16.tkmk00"
.incbin "bin/gTextureMenuWithoutItem.rgba16.tkmk00"
glabel gTextureMenuWithoutItem_end
glabel gTextureMenuWithItem
.incbin "bin/texture_8089C0.rgba16.tkmk00"
.incbin "bin/gTextureMenuWithItem.rgba16.tkmk00"
glabel gTextureMenuWithItem_end
glabel gTextureMenuBegin
.incbin "bin/texture_808CC0.rgba16.tkmk00"
.incbin "bin/gTextureMenuBegin.rgba16.tkmk00"
glabel gTextureMenuBegin_end
glabel gTextureMenuGhost
.incbin "bin/texture_808EC0.rgba16.tkmk00"
.incbin "bin/gTextureMenuGhost.rgba16.tkmk00"
glabel gTextureMenuGhost_end
glabel gTextureMenuData
.incbin "bin/texture_8090C0.rgba16.tkmk00"
.incbin "bin/gTextureMenuData.rgba16.tkmk00"
glabel gTextureMenuData_end
glabel gTextureMenuOK
.incbin "bin/texture_8092C0.rgba16.tkmk00"
.incbin "bin/gTextureMenuOK.rgba16.tkmk00"
glabel gTextureMenuOK_end
glabel gTextureBackgroundBlueSky
.incbin "bin/texture_8094C0.rgba16.tkmk00"
.incbin "bin/gTextureBackgroundBlueSky.rgba16.tkmk00"
glabel gTextureBackgroundBlueSky_end
glabel gTextureBackgroundSunset
.incbin "bin/texture_8162C0.rgba16.tkmk00"
.incbin "bin/gTextureBackgroundSunset.rgba16.tkmk00"
glabel gTextureBackgroundSunset_end
glabel gTextureGreenGoldStripe
.incbin "bin/texture_81F6C0.rgba16.tkmk00"
.incbin "bin/gTextureGreenGoldStripe.rgba16.tkmk00"
glabel gTextureGreenGoldStripe_end
glabel gTextureGoldStripe
.incbin "bin/texture_8202C0.rgba16.tkmk00"
.incbin "bin/gTextureGoldStripe.rgba16.tkmk00"
glabel gTextureGoldStripe_end
glabel gTextureWhiteStripe
.incbin "bin/texture_8209C0.rgba16.tkmk00"
.incbin "bin/gTextureWhiteStripe.rgba16.tkmk00"
glabel gTextureWhiteStripe_end
glabel gTexturePinkBar
.incbin "bin/texture_820AC0.rgba16.tkmk00"
.incbin "bin/gTexturePinkBar.rgba16.tkmk00"
glabel gTexturePinkBar_end
glabel gTextureGoldBar
.incbin "bin/texture_820FC0.rgba16.tkmk00"
.incbin "bin/gTextureGoldBar.rgba16.tkmk00"
glabel gTextureGoldBar_end

View File

@ -17,6 +17,7 @@
#include "code_8008C1D0.h"
#include <sounds.h>
#include "audio/external.h"
#include "common_textures.h"
s32 D_802BA050;
s32 D_802BA054;
@ -374,7 +375,7 @@ void func_802977E4(Player *arg0) {
void func_80297818(void) {
s16 *phi_v0 = &D_802BA060[0];
s16 *phi_v1 = VIRTUAL_TO_PHYSICAL2(gSegmentTable[SEGMENT_NUMBER2(&D_0D004E38)] + SEGMENT_OFFSET(&D_0D004E38));
s16 *phi_v1 = VIRTUAL_TO_PHYSICAL2(gSegmentTable[SEGMENT_NUMBER2(gTLUTGreenShell)] + SEGMENT_OFFSET(gTLUTGreenShell));
s16 temp_a0, temp_a0_2, temp_a0_3, temp_a0_4, temp_a0_5;
s32 i;
for (i = 0; i < 256; i++) {
@ -1253,7 +1254,7 @@ UNUSED s16 D_802B8810[] = {
};
void func_8029A690(Camera *arg0, Mat4 arg1, struct ShellActor *arg2) {
gDPLoadTLUT_pal256(gDisplayListHead++, &D_0D004E38);
gDPLoadTLUT_pal256(gDisplayListHead++, gTLUTGreenShell);
func_8029A3AC(arg0, arg1, arg2);
}
@ -1264,7 +1265,7 @@ void func_8029A75C(Camera *arg0, Mat4 arg1, struct ShellActor *arg2) {
// Middle of a tlut access
void func_8029A828(Camera *arg0, Mat4 arg1, struct ShellActor *arg2) {
gDPLoadTLUT_pal256(gDisplayListHead++, &D_0D004E68[0x1D0]);
gDPLoadTLUT_pal256(gDisplayListHead++, gTLUTBlueShell);
func_8029A3AC(arg0, arg1, arg2);
}

View File

@ -321,9 +321,6 @@ extern Gfx D_0D0031E8[];
extern Gfx D_0D004B48[];
extern Gfx D_0D004BD8[];
extern s8 D_0D004E38[];
extern s8 D_0D004E68[];
extern s8 D_0F04CBE0[];
extern s8 D_0F04CE30[];
extern s8 D_0F04D080[];

View File

@ -3572,7 +3572,7 @@ void func_8004FDB4(f32 arg0, f32 arg1, s16 arg2, s16 arg3, s16 arg4, s32 arg5, s
temp_s0_2 = gDisplayListHead;
gDisplayListHead = temp_s0_2 + 8;
temp_s0_2->words.w0 = 0xFD100000;
temp_s0_2->words.w1 = (u32) gTLUTPortraitMiniBombKart;
temp_s0_2->words.w1 = (u32) gTLUTPortraitBombKartAndQuestionMark;
temp_s0_3 = gDisplayListHead;
gDisplayListHead = temp_s0_3 + 8;
temp_s0_3->words.w1 = 0;
@ -4011,7 +4011,7 @@ void func_80050C68(void) {
temp_v0_2->words.w0 = 0x06000000;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->words.w1 = (u32) gTLUTPortraitMiniBombKart;
temp_v0_3->words.w1 = (u32) gTLUTPortraitBombKartAndQuestionMark;
temp_v0_3->words.w0 = 0xFD100000;
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
@ -4033,7 +4033,7 @@ void func_80050C68(void) {
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->words.w1 = 0;
temp_v0_8->words.w0 = 0xE7000000;
func_800452A4(gTexturePortraitMiniBombKart, 0x00000020, 0x00000020);
func_800452A4(gTexturePortraitBombKartAndQuestionMark, 0x00000020, 0x00000020);
func_80042330(sp88 + 0x20, sp84 + 0x12, 0U, 0.6f);
temp_v0_9 = gDisplayListHead;
gDisplayListHead = temp_v0_9 + 8;
@ -4144,7 +4144,7 @@ void func_80050E34(s32 playerId, s32 arg1) {
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->words.w0 = 0xFD100000;
temp_v0_4->words.w1 = (u32) gTLUTPortraitMiniBombKart;
temp_v0_4->words.w1 = (u32) gTLUTPortraitBombKartAndQuestionMark;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->words.w1 = 0;
@ -5317,7 +5317,7 @@ void func_800536C8(s32 objectIndex) {
func_800534E8(objectIndex);
gSPDisplayList(gDisplayListHead++, D_0D007828);
gDPSetTextureLUT(gDisplayListHead++, G_TT_RGBA16);
gDPLoadTLUT_pal256(gDisplayListHead++, D_06006F38);
gDPLoadTLUT_pal256(gDisplayListHead++, gTLUTWhomp);
func_8004544C(D_80165C18[objectIndex].unk_064, 0x00000010, 0x00000040, 4);
gSPDisplayList(gDisplayListHead++, D_80165C18[objectIndex].unk_070);
}

View File

@ -420,7 +420,7 @@ extern Lights1 D_800E4698;
extern s8 D_800E5670[];
extern s8 D_800E566A[];
extern u8 D_06006F38[]; // Some type of pallette?
extern u8 gTLUTWhomp[]; // Some type of pallette?
extern Gfx *gDisplayListHead;

View File

@ -744,7 +744,7 @@ void func_80059560(s32 playerId) {
if (D_801657E4 == 2) {
temp_v0_2 = &D_8018CA70[playerId];
if ((temp_v0_2->unk_74 != 0) && (D_80165608 != 0)) {
func_80047910((s32) temp_v0_2->unk_6C, (s32) temp_v0_2->unk_6E, 0U, 1.0f, (s32) gTLUTPortraitMiniBombKart, (s32) gTexturePortraitMiniBombKart, D_0D005AE0, 0x00000020, 0x00000020, 0x00000020, 0x00000020);
func_80047910((s32) temp_v0_2->unk_6C, (s32) temp_v0_2->unk_6E, 0U, 1.0f, (s32) gTLUTPortraitBombKartAndQuestionMark, (s32) gTexturePortraitBombKartAndQuestionMark, D_0D005AE0, 0x00000020, 0x00000020, 0x00000020, 0x00000020);
}
}
}

View File

@ -1269,7 +1269,7 @@ void func_80070714(void) {
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
void func_800770F0(s32); /* extern */
extern s32 D_06007BB8;
extern s32 gTLUTBat;
extern s32 D_06007DB8;
extern s16 D_80165750;
extern ? *D_80165758;
@ -1494,7 +1494,7 @@ void func_80070780(void) {
case 3:
if (gGamestate != 9) {
temp_s0_4 = D_80183EA0->unk0;
func_80073444(temp_s0_4, &D_06007BB8, &D_06007DB8, 0x20U, (u16) 0x00000040);
func_80073444(temp_s0_4, &gTLUTBat, &D_06007DB8, 0x20U, (u16) 0x00000040);
temp_v0_5 = &D_80165C18[temp_s0_4];
temp_v0_5->unk_0B2[0] = 0;
temp_v0_5->unk_0B2[1] = 0;

View File

@ -3300,7 +3300,7 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800791F0.s")
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern Vtx D_0D005EB0;
extern s32 D_0D024ED8;
extern s32 gTLUTLakituCountdown;
extern s32 D_0F05EB50;
extern s16 D_801656F0;
extern s32 D_8018D168;
@ -3314,7 +3314,7 @@ void func_800792D8(s32 objectIndex, s32 arg1) {
D_801656F0 = 0;
D_8018D168 = 0;
}
func_80073444(objectIndex, &D_0D024ED8, &D_0F05EB50, 0x38U, (u16) 0x00000048);
func_80073444(objectIndex, &gTLUTLakituCountdown, &D_0F05EB50, 0x38U, (u16) 0x00000048);
temp_v0 = &D_80165C18[objectIndex];
temp_v0->unk_074 = (s32) &D_0D005EB0;
sp24 = temp_v0;
@ -3437,7 +3437,7 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80079380.s")
void func_800791F0(); /* extern */
void func_80086F10(s32, ?, ? *); /* extern */
extern Vtx D_0D006730;
extern s32 D_0D0254D8;
extern s32 gTLUTLakituCheckeredFlag;
extern s32 D_0F07E350;
extern s32 *D_8018C028;
static ? D_800E6834; /* unable to generate initializer */
@ -3446,7 +3446,7 @@ void func_8007963C(s32 objectIndex) {
struct_80165C18_entry *temp_v0;
func_800791F0();
func_80073444(objectIndex, &D_0D0254D8, &D_0F07E350, 0x48U, (u16) 0x00000038);
func_80073444(objectIndex, &gTLUTLakituCheckeredFlag, &D_0F07E350, 0x48U, (u16) 0x00000038);
temp_v0 = &D_80165C18[objectIndex];
temp_v0->unk_074 = (s32) &D_0D006730;
temp_v0->unk_004[2] = 5000.0f;
@ -3541,14 +3541,14 @@ void func_800791F0(); /* extern */
void func_80086E70(s32); /* extern */
void func_800C8F80(u8, ?); /* extern */
extern Vtx D_0D005F30;
extern s32 D_0D025CD8;
extern s32 gTLUTLakituFishing;
extern s32 D_0F0CCF50;
void func_800799A8(s32 objectIndex, u8 arg1) {
struct_80165C18_entry *temp_v0;
func_800791F0();
func_80073444(objectIndex, &D_0D025CD8, &D_0F0CCF50, 0x38U, (u16) 0x00000048);
func_80073444(objectIndex, &gTLUTLakituFishing, &D_0F0CCF50, 0x38U, (u16) 0x00000048);
temp_v0 = &D_80165C18[objectIndex];
temp_v0->unk_074 = (s32) &D_0D005F30;
temp_v0->unk_000 = 0.15f;
@ -3755,7 +3755,7 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80079D44.s")
void func_800791F0(); /* extern */
void func_80086F10(s32, ?, ? *); /* extern */
extern Vtx D_0D006730;
extern s32 D_0D0256D8;
extern s32 gTLUTLakituSecondLap;
extern s32 D_0F09DB50;
extern s32 *D_8018C028;
static ? D_800E694C; /* unable to generate initializer */
@ -3764,7 +3764,7 @@ void func_8007A060(s32 objectIndex) {
struct_80165C18_entry *temp_v0;
func_800791F0();
func_80073444(objectIndex, &D_0D0256D8, &D_0F09DB50, 0x48U, (u16) 0x00000038);
func_80073444(objectIndex, &gTLUTLakituSecondLap, &D_0F09DB50, 0x48U, (u16) 0x00000038);
temp_v0 = &D_80165C18[objectIndex];
temp_v0->unk_074 = (s32) &D_0D006730;
temp_v0->unk_004[2] = 5000.0f;
@ -3828,7 +3828,7 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007A124.s")
void func_800791F0(); /* extern */
void func_80086F10(s32, ?, ? *); /* extern */
extern Vtx D_0D006730;
extern s32 D_0D0258D8;
extern s32 gTLUTLakituFinalLap;
extern s32 D_0F0AD750;
extern s32 *D_8018C028;
static ? D_800E694C; /* unable to generate initializer */
@ -3837,7 +3837,7 @@ void func_8007A228(s32 objectIndex) {
struct_80165C18_entry *temp_v0;
func_800791F0();
func_80073444(objectIndex, &D_0D0258D8, &D_0F0AD750, 0x48U, (u16) 0x00000038);
func_80073444(objectIndex, &gTLUTLakituFinalLap, &D_0F0AD750, 0x48U, (u16) 0x00000038);
temp_v0 = &D_80165C18[objectIndex];
temp_v0->unk_074 = (s32) &D_0D006730;
temp_v0->unk_004[2] = 5000.0f;
@ -3902,7 +3902,7 @@ void func_800791F0(); /* extern */
void func_80086F10(s32, ?, ? *); /* extern */
void func_800C8F80(u8, ?); /* extern */
extern Vtx D_0D006730;
extern s32 D_0D025AD8;
extern s32 gTLUTLakituReverse;
extern s32 D_0F0BD350;
extern s32 *D_8018C028;
static ? D_800E69B0; /* unable to generate initializer */
@ -3912,7 +3912,7 @@ void func_8007A3F0(s32 objectIndex, u8 arg1) {
struct_80165C18_entry *temp_v0;
func_800791F0();
func_80073444(objectIndex, &D_0D025AD8, &D_0F0BD350, 0x48U, (u16) 0x00000038);
func_80073444(objectIndex, &gTLUTLakituReverse, &D_0F0BD350, 0x48U, (u16) 0x00000038);
temp_v0 = &D_80165C18[objectIndex];
temp_v0->unk_074 = (s32) &D_0D006730;
temp_v0->unk_004[2] = 5000.0f;
@ -5038,13 +5038,13 @@ void func_8007C550(s32 objectIndex) {
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s32 D_06005C80;
extern s32 gTLUTBoo;
extern s32 *D_80165880;
void func_8007C5B4(s32 objectIndex) {
struct_80165C18_entry *temp_s0;
func_80073444(objectIndex, &D_06005C80, D_80165880, 0x30U, (u16) 0x00000028);
func_80073444(objectIndex, &gTLUTBoo, D_80165880, 0x30U, (u16) 0x00000028);
temp_s0 = &D_80165C18[objectIndex];
temp_s0->unk_004[0] = 0.0f;
temp_s0->unk_004[1] = 0.0f;
@ -5352,7 +5352,7 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007CC00.s")
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s32 D_06005C80;
extern s32 gTLUTBoo;
extern s32 D_0F0D0E50;
extern void *D_8018CF1C;
@ -5360,7 +5360,7 @@ void func_8007CE0C(s32 objectIndex) {
struct_80165C18_entry *temp_s0;
void *temp_v0;
func_80073444(objectIndex, &D_06005C80, &D_0F0D0E50, 0x30U, (u16) 0x00000028);
func_80073444(objectIndex, &gTLUTBoo, &D_0F0D0E50, 0x30U, (u16) 0x00000028);
temp_s0 = &D_80165C18[objectIndex];
temp_s0->unk_0D2 = 0x1C;
temp_s0->unk_004[0] = 0.0f;
@ -6274,7 +6274,7 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007E63C.s")
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s32 D_06006F38;
extern s32 gTLUTWhomp;
extern s32 D_06007138;
extern ? D_06009088;
@ -6292,7 +6292,7 @@ void func_8007EC30(s32 objectIndex) {
func_8008B888(objectIndex, 0U, 0xC000U, 0U);
func_8008B8BC(objectIndex, 0U, 0xC000U, 0U);
}
func_80073444(objectIndex, &D_06006F38, &D_06007138, 0x10U, (u16) 0x00000040);
func_80073444(objectIndex, &gTLUTWhomp, &D_06007138, 0x10U, (u16) 0x00000040);
temp_s1->unk_070 = (s32) &D_06009088;
temp_s1->unkC8 = 0x000C;
temp_s1->unk_000 = 1.0f;
@ -6353,14 +6353,14 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007ED6C.s")
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s32 D_06006F38;
extern s32 gTLUTWhomp;
extern s32 D_06007138;
extern ? D_06009088;
void func_8007EE5C(s32 objectIndex) {
struct_80165C18_entry *temp_s0;
func_80073444(objectIndex, &D_06006F38, &D_06007138, 0x10U, (u16) 0x00000040);
func_80073444(objectIndex, &gTLUTWhomp, &D_06007138, 0x10U, (u16) 0x00000040);
temp_s0 = &D_80165C18[objectIndex];
temp_s0->unk_070 = (s32) &D_06009088;
temp_s0->unkC8 = 0x000C;
@ -6687,14 +6687,14 @@ void func_8007F8D8(void) {
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s32 D_06006F38;
extern s32 gTLUTWhomp;
extern s32 D_06007138;
extern ? D_06009088;
void func_8007FA08(s32 objectIndex) {
struct_80165C18_entry *temp_s0;
func_80073444(objectIndex, &D_06006F38, &D_06007138, 0x10U, (u16) 0x00000040);
func_80073444(objectIndex, &gTLUTWhomp, &D_06007138, 0x10U, (u16) 0x00000040);
temp_s0 = &D_80165C18[objectIndex];
temp_s0->unk_070 = (s32) &D_06009088;
temp_s0->unkC8 = 0x000C;
@ -6905,7 +6905,7 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007FFC0.s")
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s32 D_06006F38;
extern s32 gTLUTWhomp;
extern s32 D_06007138;
extern ? D_06009088;
@ -6913,7 +6913,7 @@ void func_80080078(s32 objectIndex) {
s16 temp_v0;
struct_80165C18_entry *temp_s0;
func_80073444(objectIndex, &D_06006F38, &D_06007138, 0x10U, (u16) 0x00000040);
func_80073444(objectIndex, &gTLUTWhomp, &D_06007138, 0x10U, (u16) 0x00000040);
temp_s0 = &D_80165C18[objectIndex];
temp_s0->unk_070 = (s32) &D_06009088;
temp_s0->unkC8 = 0x000C;
@ -6992,7 +6992,7 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800801FC.s")
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s32 D_06006F38;
extern s32 gTLUTWhomp;
extern s32 D_06007138;
extern ? D_06009088;
@ -7001,7 +7001,7 @@ void func_800802C0(s32 objectIndex) {
temp_s0 = &D_80165C18[objectIndex];
temp_s0->unk_0D8 = 0;
func_80073444(objectIndex, &D_06006F38, &D_06007138, 0x10U, (u16) 0x00000040);
func_80073444(objectIndex, &gTLUTWhomp, &D_06007138, 0x10U, (u16) 0x00000040);
temp_s0->unk_070 = (s32) &D_06009088;
temp_s0->unk_0D2 = 0;
temp_s0->unkC8 = 0x000C;
@ -7076,7 +7076,7 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80080408.s")
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s32 D_06006F38;
extern s32 gTLUTWhomp;
extern s32 D_06007138;
extern ? D_06009088;
extern s32 gGamestate;
@ -7085,7 +7085,7 @@ void func_80080524(s32 objectIndex) {
s16 temp_v0;
struct_80165C18_entry *temp_s0;
func_80073444(objectIndex, &D_06006F38, &D_06007138, 0x10U, (u16) 0x00000040);
func_80073444(objectIndex, &gTLUTWhomp, &D_06007138, 0x10U, (u16) 0x00000040);
temp_s0 = &D_80165C18[objectIndex];
temp_s0->unk_070 = (s32) &D_06009088;
temp_s0->unkC8 = 0x000C;
@ -8280,13 +8280,13 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80082870.s")
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s32 D_0600D628;
extern s32 gTLUTCrab;
extern s32 D_0600D828;
void func_80082A4C(s32 objectIndex) {
struct_80165C18_entry *temp_s1;
func_80073444(objectIndex, &D_0600D628, &D_0600D828, 0x40U, (u16) 0x00000040);
func_80073444(objectIndex, &gTLUTCrab, &D_0600D828, 0x40U, (u16) 0x00000040);
temp_s1 = &D_80165C18[objectIndex];
temp_s1->unk_0D2 = 0;
temp_s1->unk_000 = 0.15f;
@ -8510,17 +8510,17 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80083080.s")
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s32 D_06014908;
extern s32 D_06014B08;
extern s32 gTLUTHedgehog;
extern s32 gTextureHedgehog;
extern Vtx D_0D0060B0;
void func_8008311C(s32 objectIndex, s32 arg1) {
struct_80165C18_entry *temp_s0;
func_80073444(objectIndex, &D_06014908, &D_06014B08, 0x40U, (u16) 0x00000040);
func_80073444(objectIndex, &gTLUTHedgehog, &gTextureHedgehog, 0x40U, (u16) 0x00000040);
temp_s0 = &D_80165C18[objectIndex];
temp_s0->unk_060 = &D_06014908;
temp_s0->unk_064 = &D_06014B08;
temp_s0->unk_060 = &gTLUTHedgehog;
temp_s0->unk_064 = &gTextureHedgehog;
temp_s0->unk_074 = (s32) &D_0D0060B0;
temp_s0->unk_0D2 = 0;
temp_s0->unk_000 = 0.2f;
@ -8736,14 +8736,14 @@ void func_8008379C(s32 objectIndex) {
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s32 D_06004B20;
extern s32 D_06004D20;
extern s32 gTLUTSnowman;
extern s32 gTextureSnowmanHead;
extern Vtx D_0D0061B0;
void func_80083868(s32 objectIndex) {
struct_80165C18_entry *temp_s0;
func_80073444(objectIndex, &D_06004B20, &D_06004D20, 0x40U, (u16) 0x00000040);
func_80073444(objectIndex, &gTLUTSnowman, &gTextureSnowmanHead, 0x40U, (u16) 0x00000040);
temp_s0 = &D_80165C18[objectIndex];
temp_s0->unk_074 = (s32) &D_0D0061B0;
temp_s0->unk_0D2 = 0;
@ -8826,15 +8826,15 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80083A94.s")
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s32 D_06004B20;
extern s32 D_06005D20;
extern s32 gTLUTSnowman;
extern s32 gTextureSnowmanBody;
extern Vtx D_0D0060B0;
void func_80083B0C(s32 objectIndex) {
struct_80165C18_entry *sp2C;
struct_80165C18_entry *temp_v0;
func_80073444(objectIndex, &D_06004B20, &D_06005D20, 0x40U, (u16) 0x00000040);
func_80073444(objectIndex, &gTLUTSnowman, &gTextureSnowmanBody, 0x40U, (u16) 0x00000040);
temp_v0 = &D_80165C18[objectIndex];
temp_v0->unk_074 = (s32) &D_0D0060B0;
temp_v0->unk_0D2 = 0;

View File

@ -67,9 +67,8 @@ extern s8 D_0D003B48[];
extern Gfx D_0D004B48[];
extern Gfx D_0D004BD8[];
extern s8 D_0D004C68[];
extern s8 D_0D004E38[];
extern s8 D_0D004E68[];
extern s8 D_0D005068[];
extern s8 gTLUTGreenShell[];
extern s8 gTLUTBlueShell[];
extern Vtx D_0D005238[];
extern Vtx D_0D005278[];
extern Gfx D_0D0052B8[];
@ -249,7 +248,7 @@ extern s8 gTLUTPortraitYoshi[];
extern s8 gTLUTPortraitDonkeyKong[];
extern s8 gTLUTPortraitWario[];
extern s8 gTLUTPortraitBowser[];
extern s8 gTLUTPortraitMiniBombKart[];
extern s8 gTLUTPortraitBombKartAndQuestionMark[];
extern s8 gTexturePortraitMario[];
extern s8 gTexturePortraitLuigi[];
extern s8 gTexturePortraitPeach[];
@ -258,7 +257,7 @@ extern s8 gTexturePortraitYoshi[];
extern s8 gTexturePortraitDonkeyKong[];
extern s8 gTexturePortraitWario[];
extern s8 gTexturePortraitBowser[];
extern s8 gTexturePortraitMiniBombKart[];
extern s8 gTexturePortraitBombKartAndQuestionMark[];
extern s8 gTexturePortraitQuestionMark[];
extern s8 gTLUTItemWindowNone[];
extern s8 gTLUTItemWindowBanana[];
@ -292,7 +291,14 @@ extern s8 gTextureItemWindowTripleRedShell[];
extern s8 gTextureItemWindowStar[];
extern s8 gTextureItemWindowThunderBolt[];
extern s8 gTextureItemWindowFakeItemBox[];
extern s8 D_0D024ED8[];
extern s8 gTLUTLakituCountdown[][512];
extern s8 gTLUTLakituCheckeredFlag[];
extern s8 gTLUTLakituSecondLap[];
extern s8 gTLUTLakituFinalLap[];
extern s8 gTLUTLakituReverse[];
extern s8 gTLUTLakituFishing[];
extern s8 D_0D028DD8[];
extern s8 D_0D025ED8[];
extern s8 D_0D0260D8[];
extern s8 D_0D026558[];

File diff suppressed because it is too large Load Diff

View File

@ -21,6 +21,7 @@
#define SCALE_3_8(VAL_) ((VAL_) * 0x24)
#define SCALE_8_3(VAL_) ((VAL_) / 0x24)
unsigned short magicFiller = 0x07FE;
typedef struct
{
@ -287,6 +288,54 @@ int ia2raw(uint8_t *raw, const ia *img, int width, int height, int depth)
return size;
}
/**
* Check 2 rgba structs for equality. 0 if unequal, 1 if equal
**/
int comp_rgba(const rgba left, const rgba right) {
if ((left.red != right.red) || (left.green != right.green) || (left.blue != right.blue) || (left.alpha != right.alpha)) {
return 0;
} else {
return 1;
}
}
/**
* Check if a given rgba (comp) is in a given palette (pal, represented as an array of rgba structs)
* If found, return the index in pal it was found out
* Otherwise, return -1
**/
int get_color_index(const rgba comp, const rgba *pal, int pal_size) {
int pal_idx;
for (pal_idx = 0; pal_idx < pal_size; pal_idx++) {
if (comp_rgba(comp, pal[pal_idx]) == 1) return pal_idx;
}
ERROR("Could not find a color in the palette\n");
ERROR("comp: %x%x%x%x\n", comp.red, comp.green, comp.blue, comp.alpha);
return -1;
}
/**
* Takes an image (img, an array of rgba structs) and a palette (pal, also an array of rgba structs)
* Sets the values of rawci (8 bit color index array) to the appropriate index in pal that each entry in img can be found at
* If a value in img is not found in pal, return 0, indicating an error
* Returns 1 if all values in img are found somewhere in pal
**/
int imgpal2rawci(uint8_t *rawci, const rgba *img, const rgba *pal, int raw_size, int img_size, int pal_size) {
int img_idx;
int pal_idx;
memset(rawci, 0, raw_size);
for (img_idx = 0; img_idx < img_size; img_idx++) {
pal_idx = get_color_index(img[img_idx], pal, pal_size);
if (pal_idx != -1) {
rawci[img_idx] = pal_idx;
} else {
return 0;
}
}
return 1;
}
int i2raw(uint8_t *raw, const ia *img, int width, int height, int depth)
{
int size = (width * height * depth + 7) / 8;
@ -539,7 +588,7 @@ int raw2ci(uint8_t *rawci, palette_t *pal, const uint8_t *raw, int raw_len, int
{
// assign colors to palette
pal->used = 0;
memset(pal->data, 0, sizeof(pal->data));
memset16safe(pal->data, magicFiller, sizeof(pal->data) / sizeof(uint16_t));
int ci_idx = 0;
for (int i = 0; i < raw_len; i += sizeof(uint16_t)) {
uint16_t val = read_u16_be(&raw[i]);
@ -550,6 +599,15 @@ int raw2ci(uint8_t *rawci, palette_t *pal, const uint8_t *raw, int raw_len, int
} else {
switch (ci_depth) {
case 8:
// It appears some palettes have a default index of transparent/0.
// This requires iterating the pal_idx unless the CI really does begin with 0.
if (i == 0) {
pal->data[0] = 0;
if (val != 0) {
rawci[ci_idx] = (uint8_t) ++pal_idx;
break;
}
}
rawci[ci_idx] = (uint8_t)pal_idx;
break;
case 4:
@ -585,6 +643,7 @@ typedef enum
{
MODE_EXPORT,
MODE_IMPORT,
MODE_EXPORT_CI,
} tool_mode;
typedef struct
@ -804,6 +863,15 @@ static int parse_arguments(int argc, char *argv[], graphics_config *config)
if (++i >= argc) return 0;
config->width = strtoul(argv[i], NULL, 0);
break;
case 'Z':
if (++i >= argc) return 0;
config->bin_filename = argv[i];
config->mode = MODE_EXPORT_CI;
break;
case 'm':
if (i++ >= argc) return 0;
magicFiller = strtol(argv[i], NULL, 16);
break;
default:
return 0;
break;
@ -834,6 +902,7 @@ int main(int argc, char *argv[])
{
graphics_config config = default_config;
rgba *imgr;
rgba *palr;
ia *imgi;
FILE *bin_fp;
uint8_t *raw;
@ -841,235 +910,320 @@ int main(int argc, char *argv[])
int length = 0;
int flength;
int res;
int valid = parse_arguments(argc, argv, &config);
if (!valid || !valid_config(&config)) {
print_usage();
exit(EXIT_FAILURE);
}
if (config.mode == MODE_IMPORT) {
if (0 == strcmp("-", config.bin_filename)) {
bin_fp = stdout;
} else {
if (config.bin_truncate) {
bin_fp = fopen(config.bin_filename, "wb");
switch(config.mode){
case MODE_IMPORT:
if (0 == strcmp("-", config.bin_filename)) {
bin_fp = stdout;
} else {
bin_fp = fopen(config.bin_filename, "r+b");
}
}
if (!bin_fp) {
ERROR("Error opening \"%s\"\n", config.bin_filename);
return -1;
}
if (!config.bin_truncate) {
fseek(bin_fp, config.bin_offset, SEEK_SET);
}
switch (config.format.format) {
case IMG_FORMAT_RGBA:
imgr = png2rgba(config.img_filename, &config.width, &config.height);
raw_size = (config.width * config.height * config.format.depth + 7) / 8;
raw = malloc(raw_size);
if (!raw) {
ERROR("Error allocating %u bytes\n", raw_size);
}
length = rgba2raw(raw, imgr, config.width, config.height, config.format.depth);
break;
case IMG_FORMAT_IA:
imgi = png2ia(config.img_filename, &config.width, &config.height);
raw_size = (config.width * config.height * config.format.depth + 7) / 8;
raw = malloc(raw_size);
if (!raw) {
ERROR("Error allocating %u bytes\n", raw_size);
}
length = ia2raw(raw, imgi, config.width, config.height, config.format.depth);
break;
case IMG_FORMAT_I:
imgi = png2ia(config.img_filename, &config.width, &config.height);
raw_size = (config.width * config.height * config.format.depth + 7) / 8;
raw = malloc(raw_size);
if (!raw) {
ERROR("Error allocating %u bytes\n", raw_size);
}
length = i2raw(raw, imgi, config.width, config.height, config.format.depth);
break;
case IMG_FORMAT_CI:
{
palette_t pal = {0};
FILE *pal_fp;
uint8_t *raw16;
int raw16_size;
int raw16_length;
uint8_t *ci;
int ci_length;
int pal_success;
int pal_length;
if (config.pal_truncate) {
pal_fp = fopen(config.pal_filename, "wb");
if (config.bin_truncate) {
bin_fp = fopen(config.bin_filename, "wb");
} else {
pal_fp = fopen(config.pal_filename, "r+b");
bin_fp = fopen(config.bin_filename, "r+b");
}
if (!pal_fp) {
ERROR("Error opening \"%s\"\n", config.pal_filename);
return EXIT_FAILURE;
}
if (!config.pal_truncate) {
fseek(pal_fp, config.bin_offset, SEEK_SET);
}
raw16_size = config.width * config.height * config.pal_format.depth / 8;
raw16 = malloc(raw16_size);
if (!raw16) {
ERROR("Error allocating %d bytes\n", raw16_size);
return EXIT_FAILURE;
}
switch (config.pal_format.format) {
case IMG_FORMAT_RGBA:
imgr = png2rgba(config.img_filename, &config.width, &config.height);
raw16_length = rgba2raw(raw16, imgr, config.width, config.height, config.pal_format.depth);
break;
case IMG_FORMAT_IA:
imgi = png2ia(config.img_filename, &config.width, &config.height);
raw16_length = ia2raw(raw16, imgi, config.width, config.height, config.pal_format.depth);
break;
default:
ERROR("Unsupported palette format: %s\n", format2str(&config.pal_format));
exit(EXIT_FAILURE);
}
// convert raw to palette
pal.max = (1 << config.format.depth);
ci_length = config.width * config.height * config.format.depth / 8;
ci = malloc(ci_length);
pal_success = raw2ci(ci, &pal, raw16, raw16_length, config.format.depth);
if (!pal_success) {
ERROR("Error converting palette\n");
exit(EXIT_FAILURE);
}
// pack the bytes
uint8_t raw_pal[sizeof(pal.data)];
for (int i = 0; i < pal.max; i++) {
write_u16_be(&raw_pal[2*i], pal.data[i]);
}
pal_length = pal.max * sizeof(pal.data[0]);
INFO("Writing 0x%X bytes to offset 0x%X of \"%s\"\n", pal_length, config.pal_offset, config.pal_filename);
flength = fprint_write_output(pal_fp, config.encoding, raw_pal, pal_length);
if (config.encoding == ENCODING_RAW && flength != pal_length) {
ERROR("Error writing %d bytes to \"%s\"\n", pal_length, config.pal_filename);
}
INFO("Wrote 0x%X bytes to \"%s\"\n", flength, config.pal_filename);
raw = ci;
length = ci_length;
free(raw16);
fclose(pal_fp);
break;
}
default:
return EXIT_FAILURE;
}
if (length <= 0) {
ERROR("Error converting to raw format\n");
return EXIT_FAILURE;
}
INFO("Writing 0x%X bytes to offset 0x%X of \"%s\"\n", length, config.bin_offset, config.bin_filename);
flength = fprint_write_output(bin_fp, config.encoding, raw, length);
if (config.encoding == ENCODING_RAW && flength != length) {
ERROR("Error writing %d bytes to \"%s\"\n", length, config.bin_filename);
}
INFO("Wrote 0x%X bytes to \"%s\"\n", flength, config.bin_filename);
if (bin_fp != stdout) {
fclose(bin_fp);
}
if (!bin_fp) {
ERROR("Error opening \"%s\"\n", config.bin_filename);
return -1;
}
if (!config.bin_truncate) {
fseek(bin_fp, config.bin_offset, SEEK_SET);
}
switch (config.format.format) {
case IMG_FORMAT_RGBA:
imgr = png2rgba(config.img_filename, &config.width, &config.height);
raw_size = (config.width * config.height * config.format.depth + 7) / 8;
raw = malloc(raw_size);
if (!raw) {
ERROR("Error allocating %u bytes\n", raw_size);
}
length = rgba2raw(raw, imgr, config.width, config.height, config.format.depth);
break;
case IMG_FORMAT_IA:
imgi = png2ia(config.img_filename, &config.width, &config.height);
raw_size = (config.width * config.height * config.format.depth + 7) / 8;
raw = malloc(raw_size);
if (!raw) {
ERROR("Error allocating %u bytes\n", raw_size);
}
length = ia2raw(raw, imgi, config.width, config.height, config.format.depth);
break;
case IMG_FORMAT_I:
imgi = png2ia(config.img_filename, &config.width, &config.height);
raw_size = (config.width * config.height * config.format.depth + 7) / 8;
raw = malloc(raw_size);
if (!raw) {
ERROR("Error allocating %u bytes\n", raw_size);
}
length = i2raw(raw, imgi, config.width, config.height, config.format.depth);
break;
case IMG_FORMAT_CI:
{
int w = 0;
int h = 0;
int channels = 0;
stbi_uc *data = stbi_load(config.img_filename, &w, &h, &channels, STBI_default);
palette_t pal = {0};
FILE *pal_fp;
uint8_t *raw16;
int raw16_size;
int raw16_length;
uint8_t *ci;
int ci_length;
int pal_success;
int pal_length;
} else {
if (config.width <= 0 || config.height <= 0 || config.format.depth <= 0) {
ERROR("Error: must set position width and height for export\n");
return EXIT_FAILURE;
}
bin_fp = fopen(config.bin_filename, "rb");
if (!bin_fp) {
ERROR("Error opening \"%s\"\n", config.bin_filename);
return -1;
}
raw_size = (config.width * config.height * config.format.depth + 7) / 8;
raw = malloc(raw_size);
if (config.bin_offset > 0) {
fseek(bin_fp, config.bin_offset, SEEK_SET);
}
flength = fread(raw, 1, raw_size, bin_fp);
if (flength != raw_size) {
ERROR("Error reading %d bytes from \"%s\"\n", raw_size, config.bin_filename);
}
switch (config.format.format) {
case IMG_FORMAT_RGBA:
imgr = raw2rgba(raw, config.width, config.height, config.format.depth);
res = rgba2png(config.img_filename, imgr, config.width, config.height);
break;
case IMG_FORMAT_IA:
imgi = raw2ia(raw, config.width, config.height, config.format.depth);
res = ia2png(config.img_filename, imgi, config.width, config.height);
break;
case IMG_FORMAT_I:
imgi = raw2i(raw, config.width, config.height, config.format.depth);
res = ia2png(config.img_filename, imgi, config.width, config.height);
break;
case IMG_FORMAT_CI:
{
FILE *pal_fp;
uint8_t *pal;
uint8_t *raw_fmt;
int pal_size;
if (!data || w <= 0 || h <= 0) {
ERROR("Error reading w/h from img \"%s\"\n", config.img_filename);
return 0;
}
INFO("Extracting %s offset 0x%X, pal.offset 0x%0X, pal.format %s\n", format2str(&config.format),
config.bin_offset, config.pal_offset, format2str(&config.pal_format));
pal_fp = fopen(config.pal_filename, "rb");
if (!pal_fp) {
ERROR("Error opening \"%s\"\n", config.bin_filename);
return EXIT_FAILURE;
}
if (config.pal_offset > 0) {
fseek(pal_fp, config.pal_offset, SEEK_SET);
}
pal_size = sizeof(uint16_t) * (1 << config.format.depth);
INFO("Palette size: %d\n", pal_size);
pal = malloc(pal_size);
flength = fread(pal, 1, pal_size, pal_fp);
if (flength != pal_size) {
ERROR("Error reading %d bytes from \"%s\"\n", pal_size, config.pal_filename);
}
raw_fmt = ci2raw(raw, pal, config.width, config.height, config.format.depth);
switch (config.pal_format.format) {
case IMG_FORMAT_RGBA:
INFO("Converting raw to RGBA16\n");
imgr = raw2rgba(raw_fmt, config.width, config.height, config.pal_format.depth);
res = rgba2png(config.img_filename, imgr, config.width, config.height);
break;
case IMG_FORMAT_IA:
INFO("Converting raw to IA16\n");
imgi = raw2ia(raw_fmt, config.width, config.height, config.pal_format.depth);
res = ia2png(config.img_filename, imgi, config.width, config.height);
break;
default:
ERROR("Unsupported palette format: %s\n", format2str(&config.pal_format));
if (config.pal_truncate) {
pal_fp = fopen(config.pal_filename, "wb");
} else {
pal_fp = fopen(config.pal_filename, "r+b");
}
if (!pal_fp) {
ERROR("Error opening \"%s\"\n", config.pal_filename);
return EXIT_FAILURE;
}
if (!config.pal_truncate) {
fseek(pal_fp, config.bin_offset, SEEK_SET);
}
raw16_size = w * h * config.pal_format.depth / 8;
raw16 = malloc(raw16_size);
if (!raw16) {
ERROR("Error allocating %d bytes\n", raw16_size);
return EXIT_FAILURE;
}
switch (config.pal_format.format) {
case IMG_FORMAT_RGBA:
imgr = png2rgba(config.img_filename, &config.width, &config.height);
raw16_length = rgba2raw(raw16, imgr, config.width, config.height, config.pal_format.depth);
break;
case IMG_FORMAT_IA:
imgi = png2ia(config.img_filename, &config.width, &config.height);
raw16_length = ia2raw(raw16, imgi, config.width, config.height, config.pal_format.depth);
break;
default:
ERROR("Unsupported palette format: %s\n", format2str(&config.pal_format));
exit(EXIT_FAILURE);
}
// convert raw to palette
pal.max = (1 << config.format.depth);
ci_length = config.width * config.height * config.format.depth / 8;
ci = malloc(ci_length);
pal_success = raw2ci(ci, &pal, raw16, raw16_length, config.format.depth);
if (!pal_success) {
ERROR("Error converting palette\n");
exit(EXIT_FAILURE);
}
// pack the bytes
uint8_t raw_pal[sizeof(pal.data)];
for (int i = 0; i < pal.max; i++) {
write_u16_be(&raw_pal[2*i], pal.data[i]);
}
pal_length = pal.max * sizeof(pal.data[0]);
INFO("Writing 0x%X bytes to offset 0x%X of \"%s\"\n", pal_length, config.pal_offset, config.pal_filename);
flength = fprint_write_output(pal_fp, config.encoding, raw_pal, pal_length);
if (config.encoding == ENCODING_RAW && flength != pal_length) {
ERROR("Error writing %d bytes to \"%s\"\n", pal_length, config.pal_filename);
}
INFO("Wrote 0x%X bytes to \"%s\"\n", flength, config.pal_filename);
raw = ci;
length = ci_length;
free(raw16);
fclose(pal_fp);
break;
}
free(raw_fmt);
free(pal);
break;
default:
return EXIT_FAILURE;
}
default:
if (length <= 0) {
ERROR("Error converting to raw format\n");
return EXIT_FAILURE;
}
INFO("Writing 0x%X bytes to offset 0x%X of \"%s\"\n", length, config.bin_offset, config.bin_filename);
flength = fprint_write_output(bin_fp, config.encoding, raw, length);
if (config.encoding == ENCODING_RAW && flength != length) {
ERROR("Error writing %d bytes to \"%s\"\n", length, config.bin_filename);
}
INFO("Wrote 0x%X bytes to \"%s\"\n", flength, config.bin_filename);
if (bin_fp != stdout) {
fclose(bin_fp);
}
break;
case MODE_EXPORT:
if (config.width <= 0 || config.height <= 0 || config.format.depth <= 0) {
ERROR("Error: must set position width and height for export\n");
return EXIT_FAILURE;
}
bin_fp = fopen(config.bin_filename, "rb");
if (!bin_fp) {
ERROR("Error opening \"%s\"\n", config.bin_filename);
return -1;
}
raw_size = (config.width * config.height * config.format.depth + 7) / 8;
raw = malloc(raw_size);
if (config.bin_offset > 0) {
fseek(bin_fp, config.bin_offset, SEEK_SET);
}
flength = fread(raw, 1, raw_size, bin_fp);
if (flength != raw_size) {
ERROR("Error reading %d bytes from \"%s\"\n", raw_size, config.bin_filename);
}
switch (config.format.format) {
case IMG_FORMAT_RGBA:
imgr = raw2rgba(raw, config.width, config.height, config.format.depth);
res = rgba2png(config.img_filename, imgr, config.width, config.height);
break;
case IMG_FORMAT_IA:
imgi = raw2ia(raw, config.width, config.height, config.format.depth);
res = ia2png(config.img_filename, imgi, config.width, config.height);
break;
case IMG_FORMAT_I:
imgi = raw2i(raw, config.width, config.height, config.format.depth);
res = ia2png(config.img_filename, imgi, config.width, config.height);
break;
case IMG_FORMAT_CI:
{
FILE *pal_fp;
uint8_t *pal;
uint8_t *raw_fmt;
int pal_size;
INFO("Extracting %s offset 0x%X, pal.offset 0x%0X, pal.format %s\n", format2str(&config.format),
config.bin_offset, config.pal_offset, format2str(&config.pal_format));
pal_fp = fopen(config.pal_filename, "rb");
if (!pal_fp) {
ERROR("Error opening \"%s\"\n", config.bin_filename);
return EXIT_FAILURE;
}
if (config.pal_offset > 0) {
fseek(pal_fp, config.pal_offset, SEEK_SET);
}
pal_size = sizeof(uint16_t) * (1 << config.format.depth);
INFO("Palette size: %d\n", pal_size);
pal = malloc(pal_size);
flength = fread(pal, 1, pal_size, pal_fp);
if (flength != pal_size) {
ERROR("Error reading %d bytes from \"%s\"\n", pal_size, config.pal_filename);
}
raw_fmt = ci2raw(raw, pal, config.width, config.height, config.format.depth);
switch (config.pal_format.format) {
case IMG_FORMAT_RGBA:
INFO("Converting raw to RGBA16\n");
imgr = raw2rgba(raw_fmt, config.width, config.height, config.pal_format.depth);
res = rgba2png(config.img_filename, imgr, config.width, config.height);
break;
case IMG_FORMAT_IA:
INFO("Converting raw to IA16\n");
imgi = raw2ia(raw_fmt, config.width, config.height, config.pal_format.depth);
res = ia2png(config.img_filename, imgi, config.width, config.height);
break;
default:
ERROR("Unsupported palette format: %s\n", format2str(&config.pal_format));
return EXIT_FAILURE;
}
free(raw_fmt);
free(pal);
break;
}
default:
return EXIT_FAILURE;
}
if (!res) {
ERROR("Error writing to \"%s\"\n", config.img_filename);
return EXIT_FAILURE;
}
break;
case MODE_EXPORT_CI:
{
uint8_t *rawci;
int img_length;
int pal_length;
int ci_length;
int conversion_success;
if (0 == strcmp("-", config.bin_filename)) {
bin_fp = stdout;
} else {
if (config.bin_truncate) {
bin_fp = fopen(config.bin_filename, "wb");
} else {
bin_fp = fopen(config.bin_filename, "r+b");
}
}
if (!bin_fp) {
ERROR("Error opening \"%s\"\n", config.bin_filename);
return -1;
}
if (!config.bin_truncate) {
fseek(bin_fp, config.bin_offset, SEEK_SET);
}
switch (config.pal_format.format) {
case IMG_FORMAT_RGBA:
palr = png2rgba(config.pal_filename, &config.width, &config.height);
break;
default:
ERROR("Unexpected format for the palette: %s\n", format2str(&config.pal_format));
return EXIT_FAILURE;
}
pal_length = config.width * config.height;
/**
* We're kind misusing the config stuff here
* We at first use it to convert the input image into an rgba16 (always 16, not 32)
* But then we re-use it to control the output bin file's size
* The proper thing to do here would be to:
* Expand the config to have separate image and bin file parameters
* Add optional argument(s) to specify the new parameters
* In practice what this means is that, as written, when using the -Z mode you MUST set the -f
* argument to `ci8`. Anything else is erroneous
**/
switch (config.format.format) {
case IMG_FORMAT_CI:
imgr = png2rgba(config.img_filename, &config.width, &config.height);
break;
default:
ERROR("Unexpected format for the image: %s\n", format2str(&config.format));
return EXIT_FAILURE;
}
img_length = config.width * config.height;
ci_length = img_length * config.format.depth / 8;
rawci = malloc(ci_length);
conversion_success = imgpal2rawci(rawci, imgr, palr, ci_length, img_length, pal_length);
if (!conversion_success) {
ERROR("Error converting PNG and TLUT to CI\n");
exit(EXIT_FAILURE);
}
INFO("Writing 0x%X bytes to offset 0x%X of \"%s\"\n", ci_length, config.bin_offset, config.bin_filename);
flength = fprint_write_output(bin_fp, config.encoding, rawci, ci_length);
if (config.encoding == ENCODING_RAW && flength != ci_length) {
ERROR("Error writing %d bytes to \"%s\"\n", ci_length, config.bin_filename);
}
INFO("Wrote 0x%X bytes to \"%s\"\n", flength, config.bin_filename);
if (bin_fp != stdout) {
fclose(bin_fp);
}
free(rawci);
break;
}
if (!res) {
ERROR("Error writing to \"%s\"\n", config.img_filename);
default:
ERROR("Unexpected run mode: %d\n", config.mode);
return EXIT_FAILURE;
}
}
return EXIT_SUCCESS;

View File

@ -37,6 +37,23 @@ float read_f32_be(unsigned char *buf)
return ret.f;
}
void *memset16safe(void *m, uint16_t val, size_t count)
{
char *buf = m;
union
{
uint8_t d8[2];
uint16_t d16;
}u16 = {.d16 = val};
while(count--)
{
*buf++ = u16.d8[0];
*buf++ = u16.d8[1];
}
return m;
}
int is_power2(unsigned int val)
{
while (((val & 1) == 0) && (val > 1)) {

View File

@ -91,6 +91,9 @@ int read_s16_be(unsigned char *buf);
// convert four bytes in big-endian to float
float read_f32_be(unsigned char *buf);
// initialize memory to u16 value
void *memset16safe(void *m, uint16_t val, size_t count);
// determine if value is power of 2
// returns 1 if val is power of 2, 0 otherwise
int is_power2(unsigned int val);

View File

@ -88,9 +88,9 @@ D_06003D30 = 0x06003D30;
D_06004480 = 0x06004480;
D_06004578 = 0x06004578;
D_060047F0 = 0x060047F0;
D_06004B20 = 0x06004B20;
gTLUTSnowman = 0x06004B20;
D_06004BF8 = 0x06004BF8;
D_06004D20 = 0x06004D20;
gTextureSnowmanHead = 0x06004D20;
D_06004DE8 = 0x06004DE8;
D_06004F90 = 0x06004F90;
D_060051D0 = 0x060051D0;
@ -99,8 +99,8 @@ D_06005568 = 0x06005568;
D_060056A0 = 0x060056A0;
D_060057B0 = 0x060057B0;
D_06005908 = 0x06005908;
D_06005C80 = 0x06005C80;
D_06005D20 = 0x06005D20;
gTLUTBoo = 0x06005C80;
gTextureSnowmanBody = 0x06005D20;
D_06005E00 = 0x06005E00;
D_06006738 = 0x06006738;
D_06006800 = 0x06006800;
@ -112,7 +112,7 @@ D_06006C60 = 0x06006C60;
D_06006D20 = 0x06006D20;
D_06006EC0 = 0x06006EC0;
D_06006F20 = 0x06006F20;
D_06006F38 = 0x06006F38;
gTLUTWhomp = 0x06006F38;
D_06006F88 = 0x06006F88;
D_06006FE0 = 0x06006FE0;
D_06007138 = 0x06007138;
@ -136,7 +136,7 @@ D_06007978 = 0x06007978;
D_060079A0 = 0x060079A0;
D_06007B38 = 0x06007B38;
D_06007BA8 = 0x06007BA8;
D_06007BB8 = 0x06007BB8;
gTLUTBat = 0x06007BB8;
D_06007DB8 = 0x06007DB8;
D_06008000 = 0x06008000;
D_06008528 = 0x06008528;
@ -183,7 +183,7 @@ D_0600CB40 = 0x0600CB40;
D_0600CC38 = 0x0600CC38;
D_0600D4A0 = 0x0600D4A0;
D_0600D578 = 0x0600D578;
D_0600D628 = 0x0600D628;
gTLUTCrab = 0x0600D628;
D_0600D780 = 0x0600D780;
D_0600D828 = 0x0600D828;
D_0600D850 = 0x0600D850;
@ -244,8 +244,8 @@ D_060143E0 = 0x060143E0;
D_060144B8 = 0x060144B8;
D_06014794 = 0x06014794;
D_06014798 = 0x06014798;
D_06014908 = 0x06014908;
D_06014B08 = 0x06014B08;
gTLUTHedgehog = 0x06014908;
gTextureHedgehog = 0x06014B08;
D_06015B48 = 0x06015B48;
D_0601610C = 0x0601610C;
D_06016110 = 0x06016110;
@ -348,8 +348,8 @@ D_0D0031E8 = 0x0D0031E8;
D_0D004B48 = 0x0D004B48;
D_0D004BD8 = 0x0D004BD8;
D_0D004C68 = 0x0D004C68;
D_0D004E38 = 0x0D004E38;
D_0D004E68 = 0x0D004E68;
gTLUTGreenShell = 0x0D004E38;
gTLUTBlueShell = 0x0D005038;
D_0D005338 = 0x0D005338;
D_0D005368 = 0x0D005368;
D_0D005470 = 0x0D005470;
@ -489,7 +489,7 @@ gTLUTPortraitYoshi = 0x0D01ACD8;
gTLUTPortraitDonkeyKong = 0x0D01AED8;
gTLUTPortraitWario = 0x0D01B0D8;
gTLUTPortraitBowser = 0x0D01B2D8;
gTLUTPortraitMiniBombKart = 0x0D01B4D8;
gTLUTPortraitBombKartAndQuestionMark = 0x0D01B4D8;
gTexturePortraitMario = 0x0D01B6D8;
gTexturePortraitLuigi = 0x0D01BAD8;
gTexturePortraitPeach = 0x0D01BED8;
@ -498,7 +498,7 @@ gTexturePortraitYoshi = 0x0D01C6D8;
gTexturePortraitDonkeyKong = 0x0D01CAD8;
gTexturePortraitWario = 0x0D01CED8;
gTexturePortraitBowser = 0x0D01D2D8;
gTexturePortraitMiniBombKart = 0x0D01D6D8;
gTexturePortraitBombKartAndQuestionMark = 0x0D01D6D8;
gTexturePortraitQuestionMark = 0x0D01DAD8;
gTLUTItemWindowNone = 0x0D01DED8;
gTLUTItemWindowBanana = 0x0D01E0D8;
@ -532,13 +532,14 @@ gTextureItemWindowTripleRedShell = 0x0D023AD8;
gTextureItemWindowStar = 0x0D023FD8;
gTextureItemWindowThunderBolt = 0x0D0244D8;
gTextureItemWindowFakeItemBox = 0x0D0249D8;
D_0D024ED8 = 0x0D024ED8;
D_0D0254D8 = 0x0D0254D8;
D_0D0256D8 = 0x0D0256D8;
D_0D0258D8 = 0x0D0258D8;
D_0D025AD8 = 0x0D025AD8;
D_0D025CD8 = 0x0D025CD8;
gTLUTLakituCountdown = 0x0D024ED8;
gTLUTLakituCheckeredFlag = 0x0D0254D8;
gTLUTLakituSecondLap = 0x0D0256D8;
gTLUTLakituFinalLap = 0x0D0258D8;
gTLUTLakituReverse = 0x0D025AD8;
gTLUTLakituFishing = 0x0D025CD8;
D_0D028DD8 = 0x0D028DD8;
D_0D0291D8 = 0x0D0291D8;
D_0D0293D8 = 0x0D0293D8;
D_0D029458 = 0x0D029458;
D_0D029858 = 0x0D029858;