mirror of https://github.com/n64decomp/mk64.git
Labelling of some hard-coded addr to syms (#294)
* Updated final displaylist symbol * Cleaned up loader script * Random changes * Various naming and decomp
This commit is contained in:
parent
889520b045
commit
8d118db0b2
137
Makefile
137
Makefile
|
@ -163,7 +163,7 @@ INCLUDE_CFLAGS := -I include -I $(BUILD_DIR) -I $(BUILD_DIR)/include -I src -I .
|
|||
GRUCODE_CFLAGS = -DF3DEX_GBI -D_LANGUAGE_C
|
||||
|
||||
# Check code syntax with host compiler
|
||||
CC_CHECK := gcc -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) -std=gnu90 -w -Wall -Wextra -Wno-format-security -Wno-main -DNON_MATCHING -DAVOID_UB $(VERSION_CFLAGS) $(GRUCODE_CFLAGS)
|
||||
CC_CHECK := gcc -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) -std=gnu90 -Wall -Wextra -Wno-format-security -Wno-main -DNON_MATCHING -DAVOID_UB $(VERSION_CFLAGS) $(GRUCODE_CFLAGS)
|
||||
|
||||
ASFLAGS = -march=vr4300 -mabi=32 -I include -I $(BUILD_DIR) --defsym F3DEX_GBI=1
|
||||
CFLAGS = -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn -signed $(OPT_FLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) $(VERSION_CFLAGS) $(MIPSISET) $(GRUCODE_CFLAGS)
|
||||
|
@ -186,6 +186,8 @@ MIO0TOOL = $(TOOLS_DIR)/mio0
|
|||
N64CKSUM = $(TOOLS_DIR)/n64cksum
|
||||
N64GRAPHICS = $(TOOLS_DIR)/n64graphics
|
||||
DLPACKER = $(TOOLS_DIR)/displaylist_packer
|
||||
DLSYMGEN = $(PYTHON) $(TOOLS_DIR)/generate_segment_headers.py
|
||||
MODELSYMGEN = $(PYTHON) $(TOOLS_DIR)/generate_vertice_count.py
|
||||
BIN2C = $(PYTHON) $(TOOLS_DIR)/bin2c.py
|
||||
EXTRACT_DATA_FOR_MIO := $(TOOLS_DIR)/extract_data_for_mio
|
||||
EMULATOR = mupen64plus
|
||||
|
@ -204,7 +206,7 @@ default: all
|
|||
MAKEFILE_SPLIT = Makefile.split
|
||||
include $(MAKEFILE_SPLIT)
|
||||
|
||||
all: $(BUILD_DIR)/$(TARGET).z64
|
||||
all: $(BUILD_DIR)/$(TARGET).z64 $(COURSE_MODEL_TARGETS)
|
||||
ifeq ($(COMPARE),1)
|
||||
@$(SHA1SUM) -c $(TARGET).sha1
|
||||
endif
|
||||
|
@ -302,6 +304,62 @@ $(BUILD_DIR)/src/common_textures.inc.o: src/common_textures.inc.c $(TEXTURE_FILE
|
|||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
$(PYTHON) tools/set_o32abi_bit.py $@
|
||||
|
||||
COURSE_MODEL_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/model.inc.mio0.o)
|
||||
COURSE_PACKED_DL := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/packed_dl.inc.bin)
|
||||
COURSE_PACKED_DL_O := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/packed_dl.inc.bin)
|
||||
|
||||
|
||||
|
||||
#$(info $(COURSE_PACKED_DL))
|
||||
$(COURSE_PACKED_DL):
|
||||
$(LD) -t -e 0 -Ttext=07000000 -Map $(@D)/packed.inc.elf.map -o $(@D)/packed.inc.elf $(@D)/packed.inc.o --no-check-sections
|
||||
# Generate header for packed displaylists
|
||||
$(DLSYMGEN)
|
||||
$(V)$(EXTRACT_DATA_FOR_MIO) $(@D)/packed.inc.elf $(@D)/packed.inc.bin
|
||||
$(DLPACKER) $(@D)/packed.inc.bin $(@D)/packed_dl.inc.bin
|
||||
|
||||
# Elf the course data to include symbol addresses then convert to binary and compress to mio0. The mio0 file is converted to an object file so that the linker can link it.
|
||||
$(COURSE_MODEL_TARGETS) : $(BUILD_DIR)/%/model.inc.mio0.o : %/model.inc.c $(COURSE_PACKED_DL)
|
||||
$(LD) -t -e 0 -Ttext=0F000000 -Map $(@D)/model.inc.elf.map -o $(@D)/model.inc.elf $(@D)/model.inc.o --no-check-sections
|
||||
# Generate model vertice count header
|
||||
$(MODELSYMGEN)
|
||||
$(V)$(EXTRACT_DATA_FOR_MIO) $(@D)/model.inc.elf $(@D)/model.inc.bin
|
||||
$(MIO0TOOL) -c $(@D)/model.inc.bin $(@D)/model.inc.mio0
|
||||
printf ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\n.incbin \"$(@D)/model.inc.mio0\"\n\n.balign 4\n\nglabel d_course_$(lastword $(subst /, ,$*))_packed\n\n.incbin \"$(@D)/packed_dl.inc.bin\"\n\n.balign 0x10\n" > $(@D)/model.inc.mio0.s
|
||||
$(AS) $(ASFLAGS) -o $@ $(@D)/model.inc.mio0.s
|
||||
|
||||
#################### Compile course vertex to mio0 #####################
|
||||
#################### Compile course displaylists to mio0 #####################
|
||||
COURSE_DL_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_data.inc.mio0.o)
|
||||
|
||||
COURSE_TEXTURE_FILES := $(foreach dir,textures/courses,$(subst .png, , $(wildcard $(dir)/*)))
|
||||
COURSE_TLUT := $(foreach dir,textures/courses/tlut,$(subst .png, , $(wildcard $(dir)/*)))
|
||||
COURSE_TLUT2 := $(foreach dir,textures/courses/tlut2,$(subst .png, , $(wildcard $(dir)/*)))
|
||||
COURSE_TLUT3 := $(foreach dir,textures/courses/tlut3,$(subst .png, , $(wildcard $(dir)/*)))
|
||||
#RAINBOW_ROAD_TEXTURE_FILES := $(foreach dir,textures/courses/rainbow_road,$(subst .png, , $(wildcard $(dir)/*)))
|
||||
|
||||
$(COURSE_TEXTURE_FILES):
|
||||
$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8
|
||||
|
||||
$(COURSE_TLUT):
|
||||
$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8 -c $(lastword $(subst ., ,$(subst .$(lastword $(subst ., ,$(COURSE_TLUT))), ,$(COURSE_TLUT)))) -p $(BUILD_DIR)/$@.tlut.inc.c
|
||||
|
||||
$(COURSE_TLUT2):
|
||||
$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8 -c $(lastword $(subst ., ,$(subst .$(lastword $(subst ., ,$(COURSE_TLUT2))), ,$(COURSE_TLUT2)))) -p $(BUILD_DIR)/$@.tlut.inc.c -m 0xFFFF
|
||||
|
||||
$(COURSE_TLUT3):
|
||||
$(N64GRAPHICS) -Z $(BUILD_DIR)/$@.inc.c -g $@.png -s u8 -c rgba16 -f ci8 -p textures/courses/$(basename $(notdir $@)).png
|
||||
# tluts
|
||||
|
||||
$(COURSE_DL_TARGETS): $(BUILD_DIR)/%/course_data.inc.mio0.o : %/course_data.inc.c $(BUILD_DIR)/%/course_data.inc.o $(COURSE_TEXTURE_FILES) $(COURSE_TLUT) $(COURSE_TLUT2) $(COURSE_TLUT3)
|
||||
# todo: Clean this up if possible. Not really worth the time though.
|
||||
$(LD) -t -e 0 -Ttext=06000000 -Map $(@D)/course_data.inc.elf.map -o $(@D)/course_data.inc.elf $(@D)/course_data.inc.o --no-check-sections
|
||||
$(V)$(EXTRACT_DATA_FOR_MIO) $(@D)/course_data.inc.elf $(@D)/course_data.inc.bin
|
||||
$(MIO0TOOL) -c $(@D)/course_data.inc.bin $(@D)/course_data.inc.mio0
|
||||
printf ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\n.incbin \"$(@D)/course_data.inc.mio0\"\n\n" > $(@D)/course_data.inc.mio0.s
|
||||
$(AS) $(ASFLAGS) -o $@ $(@D)/course_data.inc.mio0.s
|
||||
|
||||
|
||||
$(BUILD_DIR)/%.o: %.c
|
||||
@$(CC_CHECK) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
@ -344,81 +402,6 @@ ifeq ($(COMPILER),ido)
|
|||
$(BUILD_DIR)/src/audio/external.o: OPT_FLAGS := -O2 -framepointer
|
||||
endif
|
||||
|
||||
#################### Compile course vertex to mio0 #####################
|
||||
|
||||
COURSE_PACKED_DL := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/packed_dl.inc.bin)
|
||||
|
||||
COURSE_MODEL_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/model.inc.mio0.o)
|
||||
|
||||
#$(info $(COURSE_PACKED_DL))
|
||||
$(COURSE_PACKED_DL):
|
||||
$(LD) -t -e 0 -Ttext=07000000 -Map $(@D)/packed.inc.elf.map -o $(@D)/packed.inc.elf $(@D)/packed.inc.o --no-check-sections
|
||||
$(V)$(EXTRACT_DATA_FOR_MIO) $(@D)/packed.inc.elf $(@D)/packed.inc.bin
|
||||
$(DLPACKER) $(@D)/packed.inc.bin $(@D)/packed_dl.inc.bin
|
||||
|
||||
# Elf the course data to include symbol addresses then convert to binary and compress to mio0. The mio0 file is converted to an object file so that the linker can link it.
|
||||
$(COURSE_MODEL_TARGETS) : $(BUILD_DIR)/%/model.inc.mio0.o : %/model.inc.c $(COURSE_PACKED_DL)
|
||||
$(LD) -t -e 0 -Ttext=0F000000 -Map $(@D)/model.inc.elf.map -o $(@D)/model.inc.elf $(@D)/model.inc.o --no-check-sections
|
||||
$(V)$(EXTRACT_DATA_FOR_MIO) $(@D)/model.inc.elf $(@D)/model.inc.bin
|
||||
$(MIO0TOOL) -c $(@D)/model.inc.bin $(@D)/model.inc.mio0
|
||||
printf ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\n.incbin \"$(@D)/model.inc.mio0\"\n\n.balign 4\n\nglabel d_course_$(lastword $(subst /, ,$*))_packed\n\n.incbin \"$(@D)/packed_dl.inc.bin\"\n" > $(@D)/model.inc.mio0.s
|
||||
$(AS) $(ASFLAGS) -o $@ $(@D)/model.inc.mio0.s
|
||||
|
||||
#################### Compile course displaylists to mio0 #####################
|
||||
COURSE_DL_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_data.inc.mio0.o)
|
||||
|
||||
COURSE_TEXTURE_FILES := $(foreach dir,textures/courses,$(subst .png, , $(wildcard $(dir)/*)))
|
||||
COURSE_TLUT := $(foreach dir,textures/courses/tlut,$(subst .png, , $(wildcard $(dir)/*)))
|
||||
COURSE_TLUT2 := $(foreach dir,textures/courses/tlut2,$(subst .png, , $(wildcard $(dir)/*)))
|
||||
COURSE_TLUT3 := $(foreach dir,textures/courses/tlut3,$(subst .png, , $(wildcard $(dir)/*)))
|
||||
#RAINBOW_ROAD_TEXTURE_FILES := $(foreach dir,textures/courses/rainbow_road,$(subst .png, , $(wildcard $(dir)/*)))
|
||||
|
||||
$(COURSE_TEXTURE_FILES):
|
||||
$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8
|
||||
|
||||
$(COURSE_TLUT):
|
||||
$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8 -c $(lastword $(subst ., ,$(subst .$(lastword $(subst ., ,$(COURSE_TLUT))), ,$(COURSE_TLUT)))) -p $(BUILD_DIR)/$@.tlut.inc.c
|
||||
|
||||
$(COURSE_TLUT2):
|
||||
$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8 -c $(lastword $(subst ., ,$(subst .$(lastword $(subst ., ,$(COURSE_TLUT2))), ,$(COURSE_TLUT2)))) -p $(BUILD_DIR)/$@.tlut.inc.c -m 0xFFFF
|
||||
|
||||
$(COURSE_TLUT3):
|
||||
$(N64GRAPHICS) -Z $(BUILD_DIR)/$@.inc.c -g $@.png -s u8 -c rgba16 -f ci8 -p textures/courses/$(basename $(notdir $@)).png
|
||||
# tluts
|
||||
# $(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8 -c $(lastword $(subst ., ,$(subst .$(lastword $(subst ., ,$(COURSE_TLUT2))), ,$(COURSE_TLUT2)))) -p $(BUILD_DIR)/$@.tlut.inc.c -m 0xFFFF
|
||||
|
||||
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/rainbow_road/neon_mushroom.rgba16.ci8.inc.c -g textures/courses/rainbow_road/neon_mushroom4.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/rainbow_road_neon_mushroom4_tlut.rgba16.png
|
||||
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/rainbow_road/neon_mario.rgba16.ci8.inc.c -g textures/courses/rainbow_road/neon_mario5.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/rainbow_road_neon_mario5_tlut.rgba16.png
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/rainbow_road/neon_boo.rgba16.ci8.inc.c -g textures/courses/rainbow_road/neon_boo5.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/rainbow_road_neon_boo5_tlut.rgba16.png
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/rainbow_road/neon_peach.rgba16.ci8.inc.c -g textures/courses/rainbow_road/neon_peach.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/rainbow_road_neon_peach_tlut.rgba16.png
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/rainbow_road/neon_luigi.rgba16.ci8.inc.c -g textures/courses/rainbow_road/neon_luigi.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/rainbow_road_neon_luigi_tlut.rgba16.png
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/rainbow_road/neon_donkey_kong.rgba16.ci8.inc.c -g textures/courses/rainbow_road/neon_donkey_kong.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/rainbow_road_neon_donkey_kong_tlut.rgba16.png
|
||||
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/rainbow_road/neon_yoshi.rgba16.ci8.inc.c -g textures/courses/rainbow_road/neon_yoshi.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/rainbow_road_neon_yoshi_tlut.rgba16.png
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/rainbow_road/neon_bowser.rgba16.ci8.inc.c -g textures/courses/rainbow_road/neon_bowser.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/rainbow_road_neon_bowser_tlut.rgba16.png
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/rainbow_road/neon_wario.rgba16.ci8.inc.c -g textures/courses/rainbow_road/neon_wario.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/rainbow_road_neon_wario_tlut.rgba16.png
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/rainbow_road/neon_toad.rgba16.ci8.inc.c -g textures/courses/rainbow_road/neon_toad.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/rainbow_road_neon_toad_tlut.rgba16.png
|
||||
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/koopa_troopa_beach/crab1.rgba16.ci8.inc.c -g textures/courses/koopa_troopa_beach/crab1.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/koopa_troopa_beach_crab_tlut.rgba16.png
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/koopa_troopa_beach/crab2.rgba16.ci8.inc.c -g textures/courses/koopa_troopa_beach/crab2.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/koopa_troopa_beach_crab_tlut.rgba16.png
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/koopa_troopa_beach/crab3.rgba16.ci8.inc.c -g textures/courses/koopa_troopa_beach/crab3.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/koopa_troopa_beach_crab_tlut.rgba16.png
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/koopa_troopa_beach/crab4.rgba16.ci8.inc.c -g textures/courses/koopa_troopa_beach/crab4.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/koopa_troopa_beach_crab_tlut.rgba16.png
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/koopa_troopa_beach/crab5.rgba16.ci8.inc.c -g textures/courses/koopa_troopa_beach/crab5.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/koopa_troopa_beach_crab_tlut.rgba16.png
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/koopa_troopa_beach/crab6.rgba16.ci8.inc.c -g textures/courses/koopa_troopa_beach/crab6.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/koopa_troopa_beach_crab_tlut.rgba16.png
|
||||
# $(N64GRAPHICS) -Z $(BUILD_DIR)/textures/courses/koopa_troopa_beach/crab7.rgba16.ci8.inc.c -g textures/courses/koopa_troopa_beach/crab7.rgba16.ci8.png -s u8 -c rgba16 -f ci8 -p textures/courses/koopa_troopa_beach_crab_tlut.rgba16.png
|
||||
# $(info RUNNING)
|
||||
# $(error "Forced error")
|
||||
|
||||
$(COURSE_DL_TARGETS): $(BUILD_DIR)/%/course_data.inc.mio0.o : %/course_data.inc.c $(BUILD_DIR)/%/course_data.inc.o $(COURSE_TEXTURE_FILES) $(COURSE_TLUT) $(COURSE_TLUT2) $(COURSE_TLUT3)
|
||||
# todo: Clean this up if possible. Not really worth the time though.
|
||||
$(LD) -t -e 0 -Ttext=06000000 -Map $(@D)/course_data.inc.elf.map -o $(@D)/course_data.inc.elf $(@D)/course_data.inc.o --no-check-sections
|
||||
$(V)$(EXTRACT_DATA_FOR_MIO) $(@D)/course_data.inc.elf $(@D)/course_data.inc.bin
|
||||
$(MIO0TOOL) -c $(@D)/course_data.inc.bin $(@D)/course_data.inc.mio0
|
||||
printf ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\n.incbin \"$(@D)/course_data.inc.mio0\"\n\n" > $(@D)/course_data.inc.mio0.s
|
||||
$(AS) $(ASFLAGS) -o $@ $(@D)/course_data.inc.mio0.s
|
||||
|
||||
#################### STAFF GHOSTS #####################
|
||||
|
||||
# trophy_model.inc.c
|
||||
|
|
|
@ -171,4 +171,3 @@ $(BUILD_DIR)/src/trophy_model.inc.elf: SEGMENT_ADDRESS := 0x0B000000
|
|||
$(BUILD_DIR)/courses/star_cup/sherbet_land/gfx.inc.elf: SEGMENT_ADDRESS := 0x06000000
|
||||
$(BUILD_DIR)/courses/star_cup/wario_stadium/gfx.inc.elf: SEGMENT_ADDRESS := 0x06000000
|
||||
$(BUILD_DIR)/courses/mushroom_cup/luigi_raceway/gfx.inc.elf: SEGMENT_ADDRESS := 0x06000000
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
import re
|
||||
|
||||
# Define the regex query to match the hex values
|
||||
regex_query = r'0x07[0-9a-fA-F]{6}'
|
||||
|
||||
# Define a function to process each match
|
||||
def process_match(match):
|
||||
offset = int(match.group(0)[4:], 16)
|
||||
return f"d_course_big_donut_packed_dl_{hex(offset)[2:].upper()}"
|
||||
|
||||
# Open the input file
|
||||
with open("courses/battle/big_donut/packed.inc.c", "r") as f:
|
||||
# Read the file contents
|
||||
file_content = f.read()
|
||||
|
||||
# Use re.sub() to find and replace all matches in the file content
|
||||
modified_content = re.sub(regex_query, process_match, file_content)
|
||||
|
||||
# Print the modified content to console
|
||||
print(modified_content)
|
|
@ -1,71 +0,0 @@
|
|||
glabel func_8002A5F4
|
||||
/* 02B1F4 8002A5F4 27BDFFF0 */ addiu $sp, $sp, -0x10
|
||||
/* 02B1F8 8002A5F8 C7A40020 */ lwc1 $f4, 0x20($sp)
|
||||
/* 02B1FC 8002A5FC F7B40008 */ sdc1 $f20, 8($sp)
|
||||
/* 02B200 8002A600 4485A000 */ mtc1 $a1, $f20
|
||||
/* 02B204 8002A604 46002187 */ neg.s $f6, $f4
|
||||
/* 02B208 8002A608 AFA7001C */ sw $a3, 0x1c($sp)
|
||||
/* 02B20C 8002A60C 4606A03C */ c.lt.s $f20, $f6
|
||||
/* 02B210 8002A610 C48E0000 */ lwc1 $f14, ($a0)
|
||||
/* 02B214 8002A614 C4900004 */ lwc1 $f16, 4($a0)
|
||||
/* 02B218 8002A618 C4920008 */ lwc1 $f18, 8($a0)
|
||||
/* 02B21C 8002A61C C4C00000 */ lwc1 $f0, ($a2)
|
||||
/* 02B220 8002A620 C4C20004 */ lwc1 $f2, 4($a2)
|
||||
/* 02B224 8002A624 C4CC0008 */ lwc1 $f12, 8($a2)
|
||||
/* 02B228 8002A628 46007387 */ neg.s $f14, $f14
|
||||
/* 02B22C 8002A62C 46008407 */ neg.s $f16, $f16
|
||||
/* 02B230 8002A630 45000021 */ bc1f .L8002A6B8
|
||||
/* 02B234 8002A634 46009487 */ neg.s $f18, $f18
|
||||
/* 02B238 8002A638 46007202 */ mul.s $f8, $f14, $f0
|
||||
/* 02B23C 8002A63C 00000000 */ nop
|
||||
/* 02B240 8002A640 46028282 */ mul.s $f10, $f16, $f2
|
||||
/* 02B244 8002A644 460A4100 */ add.s $f4, $f8, $f10
|
||||
/* 02B248 8002A648 460C9182 */ mul.s $f6, $f18, $f12
|
||||
/* 02B24C 8002A64C C7AA001C */ lwc1 $f10, 0x1c($sp)
|
||||
/* 02B250 8002A650 46062500 */ add.s $f20, $f4, $f6
|
||||
/* 02B254 8002A654 460EA202 */ mul.s $f8, $f20, $f14
|
||||
/* 02B258 8002A658 00000000 */ nop
|
||||
/* 02B25C 8002A65C 460A4102 */ mul.s $f4, $f8, $f10
|
||||
/* 02B260 8002A660 00000000 */ nop
|
||||
/* 02B264 8002A664 460EA182 */ mul.s $f6, $f20, $f14
|
||||
/* 02B268 8002A668 46060201 */ sub.s $f8, $f0, $f6
|
||||
/* 02B26C 8002A66C 4610A182 */ mul.s $f6, $f20, $f16
|
||||
/* 02B270 8002A670 46044281 */ sub.s $f10, $f8, $f4
|
||||
/* 02B274 8002A674 E4CA0000 */ swc1 $f10, ($a2)
|
||||
/* 02B278 8002A678 C7A8001C */ lwc1 $f8, 0x1c($sp)
|
||||
/* 02B27C 8002A67C 46083102 */ mul.s $f4, $f6, $f8
|
||||
/* 02B280 8002A680 00000000 */ nop
|
||||
/* 02B284 8002A684 4610A282 */ mul.s $f10, $f20, $f16
|
||||
/* 02B288 8002A688 460A1181 */ sub.s $f6, $f2, $f10
|
||||
/* 02B28C 8002A68C 4612A282 */ mul.s $f10, $f20, $f18
|
||||
/* 02B290 8002A690 46043201 */ sub.s $f8, $f6, $f4
|
||||
/* 02B294 8002A694 E4C80004 */ swc1 $f8, 4($a2)
|
||||
/* 02B298 8002A698 C7A6001C */ lwc1 $f6, 0x1c($sp)
|
||||
/* 02B29C 8002A69C 46065102 */ mul.s $f4, $f10, $f6
|
||||
/* 02B2A0 8002A6A0 00000000 */ nop
|
||||
/* 02B2A4 8002A6A4 4612A202 */ mul.s $f8, $f20, $f18
|
||||
/* 02B2A8 8002A6A8 46086281 */ sub.s $f10, $f12, $f8
|
||||
/* 02B2AC 8002A6AC 46045181 */ sub.s $f6, $f10, $f4
|
||||
/* 02B2B0 8002A6B0 10000011 */ b .L8002A6F8
|
||||
/* 02B2B4 8002A6B4 E4C60008 */ swc1 $f6, 8($a2)
|
||||
.L8002A6B8:
|
||||
/* 02B2B8 8002A6B8 46007202 */ mul.s $f8, $f14, $f0
|
||||
/* 02B2BC 8002A6BC 00000000 */ nop
|
||||
/* 02B2C0 8002A6C0 46028282 */ mul.s $f10, $f16, $f2
|
||||
/* 02B2C4 8002A6C4 460A4100 */ add.s $f4, $f8, $f10
|
||||
/* 02B2C8 8002A6C8 460C9182 */ mul.s $f6, $f18, $f12
|
||||
/* 02B2CC 8002A6CC 46062500 */ add.s $f20, $f4, $f6
|
||||
/* 02B2D0 8002A6D0 460EA202 */ mul.s $f8, $f20, $f14
|
||||
/* 02B2D4 8002A6D4 46080281 */ sub.s $f10, $f0, $f8
|
||||
/* 02B2D8 8002A6D8 4610A102 */ mul.s $f4, $f20, $f16
|
||||
/* 02B2DC 8002A6DC 00000000 */ nop
|
||||
/* 02B2E0 8002A6E0 4612A202 */ mul.s $f8, $f20, $f18
|
||||
/* 02B2E4 8002A6E4 E4CA0000 */ swc1 $f10, ($a2)
|
||||
/* 02B2E8 8002A6E8 46041181 */ sub.s $f6, $f2, $f4
|
||||
/* 02B2EC 8002A6EC 46086281 */ sub.s $f10, $f12, $f8
|
||||
/* 02B2F0 8002A6F0 E4C60004 */ swc1 $f6, 4($a2)
|
||||
/* 02B2F4 8002A6F4 E4CA0008 */ swc1 $f10, 8($a2)
|
||||
.L8002A6F8:
|
||||
/* 02B2F8 8002A6F8 D7B40008 */ ldc1 $f20, 8($sp)
|
||||
/* 02B2FC 8002A6FC 03E00008 */ jr $ra
|
||||
/* 02B300 8002A700 27BD0010 */ addiu $sp, $sp, 0x10
|
|
@ -1,73 +0,0 @@
|
|||
glabel func_802AC114
|
||||
/* 115724 802AC114 27BDFFF0 */ addiu $sp, $sp, -0x10
|
||||
/* 115728 802AC118 F7B40008 */ sdc1 $f20, 8($sp)
|
||||
/* 11572C 802AC11C 4485A000 */ mtc1 $a1, $f20
|
||||
/* 115730 802AC120 3C01C00C */ li $at, 0xC00C0000 # -2.187500
|
||||
/* 115734 802AC124 44813800 */ mtc1 $at, $f7
|
||||
/* 115738 802AC128 44803000 */ mtc1 $zero, $f6
|
||||
/* 11573C 802AC12C 4600A121 */ cvt.d.s $f4, $f20
|
||||
/* 115740 802AC130 AFA7001C */ sw $a3, 0x1c($sp)
|
||||
/* 115744 802AC134 4626203C */ c.lt.d $f4, $f6
|
||||
/* 115748 802AC138 C48E0000 */ lwc1 $f14, ($a0)
|
||||
/* 11574C 802AC13C C4900004 */ lwc1 $f16, 4($a0)
|
||||
/* 115750 802AC140 C4920008 */ lwc1 $f18, 8($a0)
|
||||
/* 115754 802AC144 C4C00000 */ lwc1 $f0, ($a2)
|
||||
/* 115758 802AC148 C4C20004 */ lwc1 $f2, 4($a2)
|
||||
/* 11575C 802AC14C C4CC0008 */ lwc1 $f12, 8($a2)
|
||||
/* 115760 802AC150 46007387 */ neg.s $f14, $f14
|
||||
/* 115764 802AC154 46008407 */ neg.s $f16, $f16
|
||||
/* 115768 802AC158 45000021 */ bc1f .L802AC1E0
|
||||
/* 11576C 802AC15C 46009487 */ neg.s $f18, $f18
|
||||
/* 115770 802AC160 46007202 */ mul.s $f8, $f14, $f0
|
||||
/* 115774 802AC164 3C013F00 */ li $at, 0x3F000000 # 0.500000
|
||||
/* 115778 802AC168 46028282 */ mul.s $f10, $f16, $f2
|
||||
/* 11577C 802AC16C 460A4100 */ add.s $f4, $f8, $f10
|
||||
/* 115780 802AC170 460C9182 */ mul.s $f6, $f18, $f12
|
||||
/* 115784 802AC174 44815000 */ mtc1 $at, $f10
|
||||
/* 115788 802AC178 46062500 */ add.s $f20, $f4, $f6
|
||||
/* 11578C 802AC17C 460EA202 */ mul.s $f8, $f20, $f14
|
||||
/* 115790 802AC180 00000000 */ nop
|
||||
/* 115794 802AC184 460A4102 */ mul.s $f4, $f8, $f10
|
||||
/* 115798 802AC188 00000000 */ nop
|
||||
/* 11579C 802AC18C 460EA182 */ mul.s $f6, $f20, $f14
|
||||
/* 1157A0 802AC190 46060201 */ sub.s $f8, $f0, $f6
|
||||
/* 1157A4 802AC194 4610A182 */ mul.s $f6, $f20, $f16
|
||||
/* 1157A8 802AC198 46044281 */ sub.s $f10, $f8, $f4
|
||||
/* 1157AC 802AC19C 44814000 */ mtc1 $at, $f8
|
||||
/* 1157B0 802AC1A0 00000000 */ nop
|
||||
/* 1157B4 802AC1A4 46083102 */ mul.s $f4, $f6, $f8
|
||||
/* 1157B8 802AC1A8 E4CA0000 */ swc1 $f10, ($a2)
|
||||
/* 1157BC 802AC1AC 4610A282 */ mul.s $f10, $f20, $f16
|
||||
/* 1157C0 802AC1B0 460A1181 */ sub.s $f6, $f2, $f10
|
||||
/* 1157C4 802AC1B4 4612A282 */ mul.s $f10, $f20, $f18
|
||||
/* 1157C8 802AC1B8 46043201 */ sub.s $f8, $f6, $f4
|
||||
/* 1157CC 802AC1BC 44813000 */ mtc1 $at, $f6
|
||||
/* 1157D0 802AC1C0 00000000 */ nop
|
||||
/* 1157D4 802AC1C4 46065102 */ mul.s $f4, $f10, $f6
|
||||
/* 1157D8 802AC1C8 E4C80004 */ swc1 $f8, 4($a2)
|
||||
/* 1157DC 802AC1CC 4612A202 */ mul.s $f8, $f20, $f18
|
||||
/* 1157E0 802AC1D0 46086281 */ sub.s $f10, $f12, $f8
|
||||
/* 1157E4 802AC1D4 46045181 */ sub.s $f6, $f10, $f4
|
||||
/* 1157E8 802AC1D8 10000011 */ b .L802AC220
|
||||
/* 1157EC 802AC1DC E4C60008 */ swc1 $f6, 8($a2)
|
||||
.L802AC1E0:
|
||||
/* 1157F0 802AC1E0 46007202 */ mul.s $f8, $f14, $f0
|
||||
/* 1157F4 802AC1E4 00000000 */ nop
|
||||
/* 1157F8 802AC1E8 46028282 */ mul.s $f10, $f16, $f2
|
||||
/* 1157FC 802AC1EC 460A4100 */ add.s $f4, $f8, $f10
|
||||
/* 115800 802AC1F0 460C9182 */ mul.s $f6, $f18, $f12
|
||||
/* 115804 802AC1F4 46062500 */ add.s $f20, $f4, $f6
|
||||
/* 115808 802AC1F8 460EA202 */ mul.s $f8, $f20, $f14
|
||||
/* 11580C 802AC1FC 46080281 */ sub.s $f10, $f0, $f8
|
||||
/* 115810 802AC200 4610A102 */ mul.s $f4, $f20, $f16
|
||||
/* 115814 802AC204 00000000 */ nop
|
||||
/* 115818 802AC208 4612A202 */ mul.s $f8, $f20, $f18
|
||||
/* 11581C 802AC20C E4CA0000 */ swc1 $f10, ($a2)
|
||||
/* 115820 802AC210 46041181 */ sub.s $f6, $f2, $f4
|
||||
/* 115824 802AC214 46086281 */ sub.s $f10, $f12, $f8
|
||||
/* 115828 802AC218 E4C60004 */ swc1 $f6, 4($a2)
|
||||
/* 11582C 802AC21C E4CA0008 */ swc1 $f10, 8($a2)
|
||||
.L802AC220:
|
||||
/* 115830 802AC220 D7B40008 */ ldc1 $f20, 8($sp)
|
||||
/* 115834 802AC224 03E00008 */ jr $ra
|
||||
/* 115838 802AC228 27BD0010 */ addiu $sp, $sp, 0x10
|
|
@ -3,6 +3,7 @@
|
|||
#include <PR/gbi.h>
|
||||
#include <actor_types.h>
|
||||
#include <course.h>
|
||||
#include <types.h>
|
||||
|
||||
Gfx d_course_big_donut_packed_dl_0[] =
|
||||
{
|
||||
|
@ -76,19 +77,19 @@ Gfx d_course_big_donut_packed_dl_0[] =
|
|||
|
||||
Gfx d_course_big_donut_packed_dl_210[] =
|
||||
{
|
||||
gsSPDisplayList(0x07000000),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx d_course_big_donut_packed_dl_220[] =
|
||||
{
|
||||
gsSPDisplayList(0x07000210),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_210),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx d_course_big_donut_packed_dl_230[] =
|
||||
{
|
||||
gsSPDisplayList(0x07000220),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_220),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
|
@ -164,7 +165,7 @@ Gfx d_course_big_donut_packed_dl_240[] =
|
|||
|
||||
Gfx d_course_big_donut_packed_dl_450[] =
|
||||
{
|
||||
gsSPDisplayList(0x07000240),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_240),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
|
@ -378,7 +379,7 @@ Gfx d_course_big_donut_packed_dl_460[] =
|
|||
|
||||
Gfx d_course_big_donut_packed_dl_AC0[] =
|
||||
{
|
||||
gsSPDisplayList(0x07000460),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_460),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
|
@ -466,8 +467,8 @@ Gfx d_course_big_donut_packed_dl_B58[] =
|
|||
|
||||
Gfx d_course_big_donut_packed_dl_D20[] =
|
||||
{
|
||||
gsSPDisplayList(0x07000B58),
|
||||
gsSPDisplayList(0x07000AD0),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_B58),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_AD0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
|
@ -499,7 +500,7 @@ Gfx d_course_big_donut_packed_dl_D38[] =
|
|||
|
||||
Gfx d_course_big_donut_packed_dl_DE8[] =
|
||||
{
|
||||
gsSPDisplayList(0x07000D38),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_D38),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
|
@ -589,27 +590,25 @@ Gfx d_course_big_donut_packed_dl_F90[] =
|
|||
|
||||
Gfx d_course_big_donut_packed_dl_1018[] =
|
||||
{
|
||||
gsSPDisplayList(0x07000F90),
|
||||
gsSPDisplayList(0x07000F08),
|
||||
gsSPDisplayList(0x07000E80),
|
||||
gsSPDisplayList(0x07000DF8),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_F90),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_F08),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_E80),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_DF8),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx d_course_big_donut_packed_dl_1040[] =
|
||||
{
|
||||
gsSPDisplayList(0x07001018),
|
||||
gsSPDisplayList(0x07000DE8),
|
||||
gsSPDisplayList(0x07000D20),
|
||||
gsSPDisplayList(0x07000AC0),
|
||||
gsSPDisplayList(0x07000450),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_1018),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_DE8),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_D20),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_AC0),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_450),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx d_course_big_donut_packed_dl_1070[] =
|
||||
{
|
||||
gsSPDisplayList(0x07001040),
|
||||
gsSPDisplayList(d_course_big_donut_packed_dl_1040),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_big_donut_packed_dl_tail[] = { 0xFF, 0, 0, 0, 0, 0, 0, 0 };
|
||||
};
|
|
@ -814,5 +814,3 @@ Gfx d_course_block_fort_packed_dl_15D0[] =
|
|||
{
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_block_fort_packed_tail[] = {0xFF, 15, 0, 0, 0, 0, 0, 0};
|
||||
|
|
|
@ -273,5 +273,3 @@ Gfx d_course_double_deck_packed_dl_748[] =
|
|||
{
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_double_deck_packed_tail[] = { 0xFF, 9, 0, 0, 0, 0, 0, 0 };
|
||||
|
|
|
@ -627,5 +627,3 @@ Gfx d_course_skyscraper_packed_dl_1110[] =
|
|||
gsSPDisplayList(0x070010D8),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_skyscraper_packed_tail[] = { 0xFF, 7, 0, 0, 0, 0, 0, 0 };
|
||||
|
|
|
@ -1,34 +1,8 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include "types.h"
|
||||
|
||||
/*
|
||||
#include "courses/mushroom_cup/luigi_raceway/model.inc.c"
|
||||
#include "courses/mushroom_cup/moo_moo_farm/model.inc.c"
|
||||
#include "courses/mushroom_cup/koopa_beach/model.inc.c"
|
||||
#include "courses/mushroom_cup/kalimari_desert/model.inc.c"
|
||||
|
||||
#include "courses/flower_cup/toads_turnpike/model.inc.c"
|
||||
#include "courses/flower_cup/frappe_snowland/model.inc.c"
|
||||
#include "courses/flower_cup/choco_mountain/model.inc.c"
|
||||
#include "courses/flower_cup/mario_raceway/model.inc.c"
|
||||
|
||||
#include "courses/star_cup/wario_stadium/model.inc.c"
|
||||
#include "courses/star_cup/sherbet_land/model.inc.c"
|
||||
#include "courses/star_cup/royal_raceway/model.inc.c"
|
||||
#include "courses/star_cup/bowsers_castle/model.inc.c"
|
||||
|
||||
#include "courses/special_cup/dks_jungle_parkway/model.inc.c"
|
||||
#include "courses/special_cup/yoshi_valley/model.inc.c"
|
||||
#include "courses/special_cup/banshee_boardwalk/model.inc.c"
|
||||
#include "courses/special_cup/rainbow_road/model.inc.c"
|
||||
|
||||
#include "courses/battle/block_fort/model.inc.c"
|
||||
#include "courses/battle/big_donut/model.inc.c"
|
||||
#include "courses/battle/double_deck/model.inc.c"
|
||||
#include "courses/battle/skyscraper/model.inc.c"
|
||||
*/
|
||||
|
||||
#include <vertice_count_gen.h>
|
||||
#include <packed_displaylist_symbols_gen.h>
|
||||
|
||||
extern u32 _course_mario_raceway_dl_mio0SegmentRomStart[];
|
||||
extern u32 _course_mario_raceway_dl_mio0SegmentRomEnd[];
|
||||
|
@ -210,217 +184,160 @@ extern u32 _course_big_donut_offsetsSegmentRomEnd[];
|
|||
extern u32 d_course_big_donut_packed[];
|
||||
extern u32 big_donut_textures[];
|
||||
|
||||
/*
|
||||
extern mk64_Vtx d_course_mario_raceway_vertex[];
|
||||
extern mk64_Vtx d_course_choco_mountain_vertex[];
|
||||
extern mk64_Vtx d_course_bowsers_castle_vertex[];
|
||||
extern mk64_Vtx d_course_banshee_boardwalk_vertex[];
|
||||
extern mk64_Vtx d_course_yoshi_valley_vertex[];
|
||||
extern mk64_Vtx d_course_frappe_snowland_vertex[];
|
||||
extern mk64_Vtx d_course_koopa_troopa_beach_vertex[];
|
||||
extern mk64_Vtx d_course_royal_raceway_vertex[];
|
||||
extern mk64_Vtx d_course_luigi_raceway_vertex[];
|
||||
extern mk64_Vtx d_course_moo_moo_farm_vertex[];
|
||||
extern mk64_Vtx d_course_toads_turnpike_vertex[];
|
||||
extern mk64_Vtx d_course_kalimari_desert_vertex[];
|
||||
extern mk64_Vtx d_course_sherbet_land_vertex[];
|
||||
extern mk64_Vtx d_course_rainbow_road_vertex[];
|
||||
extern mk64_Vtx d_course_wario_stadium_vertex[];
|
||||
extern mk64_Vtx d_course_block_fort_vertex[];
|
||||
extern mk64_Vtx d_course_skyscraper_vertex[];
|
||||
extern mk64_Vtx d_course_double_deck_vertex[];
|
||||
extern mk64_Vtx d_course_dks_jungle_parkway_vertex[];
|
||||
extern mk64_Vtx d_course_big_donut_vertex[];
|
||||
/**
|
||||
* vertex_count is generated from tools/generate_vertice_count.py
|
||||
* It takes the size of the vertex variable from objdump using the model.inc.elf file.
|
||||
* From there it divides the size by fourteen bytes (the size of a single vertex).
|
||||
* It then generates the header file with definitions of vertex_count.
|
||||
* This tool is ran during the compile process.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The address of the final displaylist is generated and calculated by tools/generate_segment_headers.py
|
||||
* It always refers to a gsSPEndDisplayList command.
|
||||
*/
|
||||
#define GET_OFFSET(val) (val - 0x8) - 0x07000000
|
||||
|
||||
|
||||
// 0x008284D0, 0x0082B620, 0x0088FA10, 0x0089B510, 0x0088CD70, 0x0088D070, 0x0F000000, 0x0000167D, 0x0F0096F4, 0x00006930, 0x09000000, 0x00000000
|
||||
struct courseTable gCourseTable[] = {{
|
||||
_course_mario_raceway_dl_mio0SegmentRomStart, _course_mario_raceway_dl_mio0SegmentRomEnd,
|
||||
_mario_raceway_vertexSegmentRomStart, _mario_raceway_vertexSegmentRomEnd,
|
||||
_course_mario_raceway_offsetsSegmentRomStart, _course_mario_raceway_offsetsSegmentRomEnd,
|
||||
d_course_mario_raceway_vertex, 0x0000167D,
|
||||
d_course_mario_raceway_packed, 0x00006930,
|
||||
d_course_mario_raceway_vertex, d_course_mario_raceway_vertex_count,
|
||||
d_course_mario_raceway_packed, GET_OFFSET(d_course_mario_raceway_packed_end),
|
||||
mario_raceway_textures, (u16) 0, (u16) 0x0000,
|
||||
}, {
|
||||
_course_choco_mountain_dl_mio0SegmentRomStart, _course_choco_mountain_dl_mio0SegmentRomEnd,
|
||||
_choco_mountain_vertexSegmentRomStart, _choco_mountain_vertexSegmentRomEnd,
|
||||
_course_choco_mountain_offsetsSegmentRomStart, _course_choco_mountain_offsetsSegmentRomEnd,
|
||||
d_course_choco_mountain_vertex, 0x000015B8,
|
||||
d_course_choco_mountain_packed, 0x00005AE8,
|
||||
d_course_choco_mountain_vertex, d_course_choco_mountain_vertex_count,
|
||||
d_course_choco_mountain_packed, GET_OFFSET(d_course_choco_mountain_packed_end),
|
||||
choco_mountain_textures, 1, 0x0000,
|
||||
}, {
|
||||
_course_bowsers_castle_dl_mio0SegmentRomStart, _course_bowsers_castle_dl_mio0SegmentRomEnd,
|
||||
_bowsers_castle_vertexSegmentRomStart, _bowsers_castle_vertexSegmentRomEnd,
|
||||
_course_bowsers_castle_offsetsSegmentRomStart, _course_bowsers_castle_offsetsSegmentRomEnd,
|
||||
d_course_bowsers_castle_vertex, 0x00002537,
|
||||
d_course_bowsers_castle_packed, 0x00009918,
|
||||
d_course_bowsers_castle_vertex, d_course_bowsers_castle_vertex_count,
|
||||
d_course_bowsers_castle_packed, GET_OFFSET(d_course_bowsers_castle_packed_end),
|
||||
bowsers_castle_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_banshee_boardwalk_dl_mio0SegmentRomStart, _course_banshee_boardwalk_dl_mio0SegmentRomEnd,
|
||||
_banshee_boardwalk_vertexSegmentRomStart, _banshee_boardwalk_vertexSegmentRomEnd,
|
||||
_course_banshee_boardwalk_offsetsSegmentRomStart, _course_banshee_boardwalk_offsetsSegmentRomEnd,
|
||||
d_course_banshee_boardwalk_vertex, 0x00001351,
|
||||
d_course_banshee_boardwalk_packed, 0x00007340,
|
||||
d_course_banshee_boardwalk_vertex, d_course_banshee_boardwalk_vertex_count,
|
||||
d_course_banshee_boardwalk_packed, GET_OFFSET(d_course_banshee_boardwalk_packed_end),
|
||||
banshee_boardwalk_textures, 1, 0x0000,
|
||||
}, {
|
||||
_course_yoshi_valley_dl_mio0SegmentRomStart, _course_yoshi_valley_dl_mio0SegmentRomEnd,
|
||||
_yoshi_valley_vertexSegmentRomStart, _yoshi_valley_vertexSegmentRomEnd,
|
||||
_course_yoshi_valley_offsetsSegmentRomStart, _course_yoshi_valley_offsetsSegmentRomEnd,
|
||||
d_course_yoshi_valley_vertex, 0x00000E88,
|
||||
d_course_yoshi_valley_packed, 0x00008158,
|
||||
d_course_yoshi_valley_vertex, d_course_yoshi_valley_vertex_count,
|
||||
d_course_yoshi_valley_packed, GET_OFFSET(d_course_yoshi_valley_packed_end),
|
||||
yoshi_valley_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_frappe_snowland_dl_mio0SegmentRomStart, _course_frappe_snowland_dl_mio0SegmentRomEnd,
|
||||
_frappe_snowland_vertexSegmentRomStart, _frappe_snowland_vertexSegmentRomEnd,
|
||||
_course_frappe_snowland_offsetsSegmentRomStart, _course_frappe_snowland_offsetsSegmentRomEnd,
|
||||
d_course_frappe_snowland_vertex, 0x00001599,
|
||||
d_course_frappe_snowland_packed, 0x00006648,
|
||||
d_course_frappe_snowland_vertex, d_course_frappe_snowland_vertex_count,
|
||||
d_course_frappe_snowland_packed, GET_OFFSET(d_course_frappe_snowland_packed_end),
|
||||
frappe_snowland_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_koopa_troopa_beach_dl_mio0SegmentRomStart, _course_koopa_troopa_beach_dl_mio0SegmentRomEnd,
|
||||
_koopa_troopa_beach_vertexSegmentRomStart, _koopa_troopa_beach_vertexSegmentRomEnd,
|
||||
_course_koopa_troopa_beach_offsetsSegmentRomStart, _course_koopa_troopa_beach_offsetsSegmentRomEnd,
|
||||
d_course_koopa_troopa_beach_vertex, 0x000024A0,
|
||||
d_course_koopa_troopa_beach_packed, 0x0000B2B8,
|
||||
d_course_koopa_troopa_beach_vertex, d_course_koopa_troopa_beach_vertex_count,
|
||||
d_course_koopa_troopa_beach_packed, GET_OFFSET(d_course_koopa_troopa_beach_packed_end),
|
||||
koopa_troopa_beach_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_royal_raceway_dl_mio0SegmentRomStart, _course_royal_raceway_dl_mio0SegmentRomEnd,
|
||||
_royal_raceway_vertexSegmentRomStart, _royal_raceway_vertexSegmentRomEnd,
|
||||
_course_royal_raceway_offsetsSegmentRomStart, _course_royal_raceway_offsetsSegmentRomEnd,
|
||||
d_course_royal_raceway_vertex, 0x00002072,
|
||||
d_course_royal_raceway_packed, 0x0000B128,
|
||||
d_course_royal_raceway_vertex, d_course_royal_raceway_vertex_count,
|
||||
d_course_royal_raceway_packed, GET_OFFSET(d_course_royal_raceway_packed_end),
|
||||
royal_raceway_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_luigi_raceway_dl_mio0SegmentRomStart, _course_luigi_raceway_dl_mio0SegmentRomEnd,
|
||||
_luigi_raceway_vertexSegmentRomStart, _luigi_raceway_vertexSegmentRomEnd,
|
||||
_course_luigi_raceway_offsetsSegmentRomStart, _course_luigi_raceway_offsetsSegmentRomEnd,
|
||||
d_course_luigi_raceway_vertex, 0x00001730,
|
||||
d_course_luigi_raceway_packed, 0x0000C738,
|
||||
d_course_luigi_raceway_vertex, d_course_luigi_raceway_vertex_count,
|
||||
d_course_luigi_raceway_packed, GET_OFFSET(d_course_luigi_raceway_packed_end),
|
||||
luigi_raceway_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_moo_moo_farm_dl_mio0SegmentRomStart, _course_moo_moo_farm_dl_mio0SegmentRomEnd,
|
||||
_moo_moo_farm_vertexSegmentRomStart, _moo_moo_farm_vertexSegmentRomEnd,
|
||||
_course_moo_moo_farm_offsetsSegmentRomStart, _course_moo_moo_farm_offsetsSegmentRomEnd,
|
||||
d_course_moo_moo_farm_vertex, 0x00001F24,
|
||||
d_course_moo_moo_farm_packed, 0x00006738,
|
||||
d_course_moo_moo_farm_vertex, d_course_moo_moo_farm_vertex_count,
|
||||
d_course_moo_moo_farm_packed, GET_OFFSET(d_course_moo_moo_farm_packed_end),
|
||||
moo_moo_farm_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_toads_turnpike_dl_mio0SegmentRomStart, _course_toads_turnpike_dl_mio0SegmentRomEnd,
|
||||
_toads_turnpike_vertexSegmentRomStart, _toads_turnpike_vertexSegmentRomEnd,
|
||||
_course_toads_turnpike_offsetsSegmentRomStart, _course_toads_turnpike_offsetsSegmentRomEnd,
|
||||
d_course_toads_turnpike_vertex, 0x000018D7,
|
||||
d_course_toads_turnpike_packed, 0x00006B10,
|
||||
d_course_toads_turnpike_vertex, d_course_toads_turnpike_vertex_count,
|
||||
d_course_toads_turnpike_packed, GET_OFFSET(d_course_toads_turnpike_packed_end),
|
||||
toads_turnpike_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_kalimari_desert_dl_mio0SegmentRomStart, _course_kalimari_desert_dl_mio0SegmentRomEnd,
|
||||
_kalimari_desert_vertexSegmentRomStart, _kalimari_desert_vertexSegmentRomEnd,
|
||||
_course_kalimari_desert_offsetsSegmentRomStart, _course_kalimari_desert_offsetsSegmentRomEnd,
|
||||
d_course_kalimari_desert_vertex, 0x000018F9,
|
||||
d_course_kalimari_desert_packed, 0x0000A678,
|
||||
d_course_kalimari_desert_vertex, d_course_kalimari_desert_vertex_count,
|
||||
d_course_kalimari_desert_packed, GET_OFFSET(d_course_kalimari_desert_packed_end),
|
||||
kalimari_desert_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_sherbet_land_dl_mio0SegmentRomStart, _course_sherbet_land_dl_mio0SegmentRomEnd,
|
||||
_sherbet_land_vertexSegmentRomStart, _sherbet_land_vertexSegmentRomEnd,
|
||||
_course_sherbet_land_offsetsSegmentRomStart, _course_sherbet_land_offsetsSegmentRomEnd,
|
||||
d_course_sherbet_land_vertex, 0x00000A76,
|
||||
d_course_sherbet_land_packed, 0x00003850,
|
||||
d_course_sherbet_land_vertex, d_course_sherbet_land_vertex_count,
|
||||
d_course_sherbet_land_packed, GET_OFFSET(d_course_sherbet_land_packed_end),
|
||||
sherbet_land_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_rainbow_road_dl_mio0SegmentRomStart, _course_rainbow_road_dl_mio0SegmentRomEnd,
|
||||
_rainbow_road_vertexSegmentRomStart, _rainbow_road_vertexSegmentRomEnd,
|
||||
_course_rainbow_road_offsetsSegmentRomStart, _course_rainbow_road_offsetsSegmentRomEnd,
|
||||
d_course_rainbow_road_vertex, 0x00000C27,
|
||||
d_course_rainbow_road_packed, 0x00002100,
|
||||
d_course_rainbow_road_vertex, d_course_rainbow_road_vertex_count,
|
||||
d_course_rainbow_road_packed, GET_OFFSET(d_course_rainbow_road_packed_end),
|
||||
rainbow_road_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_wario_stadium_dl_mio0SegmentRomStart, _course_wario_stadium_dl_mio0SegmentRomEnd,
|
||||
_wario_stadium_vertexSegmentRomStart, _wario_stadium_vertexSegmentRomEnd,
|
||||
_course_wario_stadium_offsetsSegmentRomStart, _course_wario_stadium_offsetsSegmentRomEnd,
|
||||
d_course_wario_stadium_vertex, 0x000017B3,
|
||||
d_course_wario_stadium_packed, 0x0000A4B8,
|
||||
d_course_wario_stadium_vertex, d_course_wario_stadium_vertex_count,
|
||||
d_course_wario_stadium_packed, GET_OFFSET(d_course_wario_stadium_packed_end),
|
||||
wario_stadium_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_block_fort_dl_mio0SegmentRomStart, _course_block_fort_dl_mio0SegmentRomEnd,
|
||||
_block_fort_vertexSegmentRomStart, _block_fort_vertexSegmentRomEnd,
|
||||
_course_block_fort_offsetsSegmentRomStart, _course_block_fort_offsetsSegmentRomEnd,
|
||||
d_course_block_fort_vertex, 0x00000440,
|
||||
d_course_block_fort_packed, 0x000015D0,
|
||||
d_course_block_fort_vertex, d_course_block_fort_vertex_count,
|
||||
d_course_block_fort_packed, GET_OFFSET(d_course_block_fort_packed_end),
|
||||
block_fort_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_skyscraper_dl_mio0SegmentRomStart, _course_skyscraper_dl_mio0SegmentRomEnd,
|
||||
_skyscraper_vertexSegmentRomStart, _skyscraper_vertexSegmentRomEnd,
|
||||
_course_skyscraper_offsetsSegmentRomStart, _course_skyscraper_offsetsSegmentRomEnd,
|
||||
d_course_skyscraper_vertex, 0x0000043E,
|
||||
d_course_skyscraper_packed, 0x00001118,
|
||||
d_course_skyscraper_vertex, d_course_skyscraper_vertex_count,
|
||||
d_course_skyscraper_packed, GET_OFFSET(d_course_skyscraper_packed_end),
|
||||
skyscraper_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_double_deck_dl_mio0SegmentRomStart, _course_double_deck_dl_mio0SegmentRomEnd,
|
||||
_double_deck_vertexSegmentRomStart, _double_deck_vertexSegmentRomEnd,
|
||||
_course_double_deck_offsetsSegmentRomStart, _course_double_deck_offsetsSegmentRomEnd,
|
||||
d_course_double_deck_vertex, 0x0000022B,
|
||||
d_course_double_deck_packed, 0x00000748,
|
||||
d_course_double_deck_vertex, d_course_double_deck_vertex_count,
|
||||
d_course_double_deck_packed, GET_OFFSET(d_course_double_deck_packed_end),
|
||||
double_deck_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_dks_jungle_parkway_dl_mio0SegmentRomStart, _course_dks_jungle_parkway_dl_mio0SegmentRomEnd,
|
||||
_dks_jungle_parkway_vertexSegmentRomStart, _dks_jungle_parkway_vertexSegmentRomEnd,
|
||||
_course_dks_jungle_parkway_offsetsSegmentRomStart, _course_dks_jungle_parkway_offsetsSegmentRomEnd,
|
||||
d_course_dks_jungle_parkway_vertex, 0x0000162F,
|
||||
d_course_dks_jungle_parkway_packed, 0x00009C20,
|
||||
d_course_dks_jungle_parkway_vertex, d_course_dks_jungle_parkway_vertex_count,
|
||||
d_course_dks_jungle_parkway_packed, GET_OFFSET(d_course_dks_jungle_parkway_packed_end),
|
||||
dks_jungle_parkway_textures, 0, 0x0000,
|
||||
}, {
|
||||
_course_big_donut_dl_mio0SegmentRomStart, _course_big_donut_dl_mio0SegmentRomEnd,
|
||||
_big_donut_vertexSegmentRomStart, _big_donut_vertexSegmentRomEnd,
|
||||
_course_big_donut_offsetsSegmentRomStart, _course_big_donut_offsetsSegmentRomEnd,
|
||||
d_course_big_donut_vertex, 0x0000048D,
|
||||
d_course_big_donut_packed, 0x00001078,
|
||||
d_course_big_donut_vertex, d_course_big_donut_vertex_count,
|
||||
d_course_big_donut_packed, GET_OFFSET(d_course_big_donut_packed_end),
|
||||
big_donut_textures, 0, 0x0000,
|
||||
}};
|
||||
|
||||
/*
|
||||
mk_course mario_raceway, 0x0000167D, 0x00006930, 0
|
||||
mk_course choco_mountain, 0x000015B8, 0x00005AE8, 1
|
||||
mk_course bowsers_castle, 0x00002537, 0x00009918, 0
|
||||
mk_course banshee_boardwalk, 0x00001351, 0x00007340, 1
|
||||
mk_course yoshi_valley, 0x00000E88, 0x00008158, 0
|
||||
mk_course frappe_snowland, 0x00001599, 0x00006648, 0
|
||||
mk_course koopa_troopa_beach, 0x000024A0, 0x0000B2B8, 0
|
||||
mk_course royal_raceway, 0x00002072, 0x0000B128, 0
|
||||
mk_course luigi_raceway, 0x00001730, 0x0000C738, 0
|
||||
mk_course moo_moo_farm, 0x00001F24, 0x00006738, 0
|
||||
mk_course toads_turnpike, 0x000018D7, 0x00006B10, 0
|
||||
mk_course kalimari_desert, 0x000018F9, 0x0000A678, 0
|
||||
mk_course sherbet_land, 0x00000A76, 0x00003850, 0
|
||||
mk_course rainbow_road, 0x00000C27, 0x00002100, 0
|
||||
mk_course wario_stadium, 0x000017B3, 0x0000A4B8, 0
|
||||
mk_course block_fort, 0x00000440, 0x000015D0, 0
|
||||
mk_course skyscraper, 0x0000043E, 0x00001118, 0
|
||||
mk_course double_deck, 0x0000022B, 0x00000748, 0
|
||||
mk_course dks_jungle_parkway, 0x0000162F, 0x00009C20, 0
|
||||
mk_course big_donut, 0x0000048D, 0x00001078, 0
|
||||
*/
|
||||
|
||||
/*
|
||||
# Course data table 122390 / 802B8D80
|
||||
glabel gCourseTable
|
||||
.word 0x008284D0, 0x0082B620, 0x0088FA10, 0x0089B510, 0x0088CD70, 0x0088D070, 0x0F000000, 0x0000167D, 0x0F0096F4, 0x00006930, 0x09000000, 0x00000000
|
||||
.word 0x0082B620, 0x0082DF40, 0x0089B510, 0x008A7640, 0x0088D070, 0x0088D340, 0x0F000000, 0x000015B8, 0x0F00A0B4, 0x00005AE8, 0x09000000, 0x00010000
|
||||
.word 0x0082DF40, 0x00831DC0, 0x008A7640, 0x008B9630, 0x0088D340, 0x0088D6C0, 0x0F000000, 0x00002537, 0x0F00E368, 0x00009918, 0x09000000, 0x00000000
|
||||
.word 0x00831DC0, 0x00835BA0, 0x008B9630, 0x008C2510, 0x0088D6C0, 0x0088D9C0, 0x0F000000, 0x00001351, 0x0F0068E8, 0x00007340, 0x09000000, 0x00010000
|
||||
.word 0x00835BA0, 0x0083F740, 0x008C2510, 0x008CC900, 0x0088D9C0, 0x0088DAB0, 0x0F000000, 0x00000E88, 0x0F007D90, 0x00008158, 0x09000000, 0x00000000
|
||||
.word 0x0083F740, 0x00842E40, 0x008CC900, 0x008D8E50, 0x0088DAB0, 0x0088DB40, 0x0F000000, 0x00001599, 0x0F009D24, 0x00006648, 0x09000000, 0x00000000
|
||||
.word 0x00842E40, 0x0084ABD0, 0x008D8E50, 0x008EC390, 0x0088DB40, 0x0088DC50, 0x0F000000, 0x000024A0, 0x0F00FD78, 0x0000B2B8, 0x09000000, 0x00000000
|
||||
.word 0x0084ABD0, 0x0084E8E0, 0x008EC390, 0x008FE640, 0x0088DC50, 0x0088E120, 0x0F000000, 0x00002072, 0x0F00EC60, 0x0000B128, 0x09000000, 0x00000000
|
||||
.word 0x0084E8E0, 0x00852E20, 0x008FE640, 0x0090B3E0, 0x0088E120, 0x0088E590, 0x0F000000, 0x00001730, 0x0F009800, 0x0000C738, 0x09000000, 0x00000000
|
||||
.word 0x00852E20, 0x00857E80, 0x0090B3E0, 0x0091B980, 0x0088E590, 0x0088E8D0, 0x0F000000, 0x00001F24, 0x0F00DAEC, 0x00006738, 0x09000000, 0x00000000
|
||||
.word 0x00857E80, 0x008666A0, 0x0091B980, 0x00928C70, 0x0088E8D0, 0x0088ECD0, 0x0F000000, 0x000018D7, 0x0F00A5D0, 0x00006B10, 0x09000000, 0x00000000
|
||||
.word 0x008666A0, 0x0086ECF0, 0x00928C70, 0x00936FD0, 0x0088ECD0, 0x0088EFB0, 0x0F000000, 0x000018F9, 0x0F00B394, 0x0000A678, 0x09000000, 0x00000000
|
||||
.word 0x0086ECF0, 0x00872A00, 0x00936FD0, 0x0093CC60, 0x0088EFB0, 0x0088F2A0, 0x0F000000, 0x00000A76, 0x0F0049F8, 0x00003850, 0x09000000, 0x00000000
|
||||
.word 0x00872A00, 0x008804A0, 0x0093CC60, 0x009438C0, 0x0088F2A0, 0x0088F300, 0x0F000000, 0x00000C27, 0x0F005A5C, 0x00002100, 0x09000000, 0x00000000
|
||||
.word 0x008804A0, 0x00885630, 0x009438C0, 0x00951780, 0x0088F300, 0x0088F600, 0x0F000000, 0x000017B3, 0x0F00A9CC, 0x0000A4B8, 0x09000000, 0x00000000
|
||||
.word 0x00885630, 0x00885780, 0x00951780, 0x00953890, 0x0088F600, 0x0088F680, 0x0F000000, 0x00000440, 0x0F0018D8, 0x000015D0, 0x09000000, 0x00000000
|
||||
.word 0x00885780, 0x008858A0, 0x00953890, 0x00955620, 0x0088F680, 0x0088F800, 0x0F000000, 0x0000043E, 0x0F001678, 0x00001118, 0x09000000, 0x00000000
|
||||
.word 0x008858A0, 0x00885A10, 0x00955620, 0x00956670, 0x0088F800, 0x0088F830, 0x0F000000, 0x0000022B, 0x0F000CD4, 0x00000748, 0x09000000, 0x00000000
|
||||
.word 0x00885A10, 0x0088CC50, 0x00956670, 0x00963EF0, 0x0088F830, 0x0088F9C0, 0x0F000000, 0x0000162F, 0x0F00A45C, 0x00009C20, 0x09000000, 0x00000000
|
||||
.word 0x0088CC50, 0x0088CD70, 0x00963EF0, 0x00966260, 0x0088F9C0, 0x0088FA10, 0x0F000000, 0x0000048D, 0x0F001B84, 0x00001078, 0x09000000, 0x00000000
|
||||
*/
|
||||
|
|
|
@ -3421,5 +3421,3 @@ Gfx d_course_choco_mountain_packed_dl_5AE0[] =
|
|||
gsSPDisplayList(0x07005A98),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_choco_mountain_packed_tail[] = { 0xFF, 4, 0, 0, 0, 0, 0, 0 };
|
||||
|
|
|
@ -3841,5 +3841,3 @@ Gfx d_course_frappe_snowland_packed_dl_6638[] =
|
|||
gsSPDisplayList(0x07002670),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_frappe_snowland_packed_tail[] = { 0xFF, 11, 0, 0, 0, 0, 0, 0};
|
||||
|
|
|
@ -4062,5 +4062,3 @@ Gfx d_course_mario_raceway_packed_dl_6928[] =
|
|||
gsSPDisplayList(0x070068C0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_mario_raceway_packed_dl_tail[] = { 0xFF, 15, 0, 0, 0, 0, 0, 0 };
|
||||
|
|
|
@ -3898,5 +3898,3 @@ Gfx d_course_toads_turnpike_packed_dl_6B08[] =
|
|||
gsSPDisplayList(0x07006AD8),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_toads_turnpike_packed_tail[10] = { 0xFF, 10, 0, 0, 0, 0 };
|
||||
|
|
|
@ -6551,5 +6551,3 @@ Gfx d_course_kalimari_desert_packed_dl_A670[] =
|
|||
gsSPDisplayList(0x0700A5F0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_kalimari_desert_packed_tail[] = { 0xFF, 6, 0, 0, 0, 0, 0, 0 };
|
||||
|
|
|
@ -117,6 +117,7 @@ Gfx d_course_koopa_troopa_beach_packed_dl_2C0[] =
|
|||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// Unused waterfall bubbling effect?
|
||||
Gfx d_course_koopa_troopa_beach_packed_dl_2E8[] =
|
||||
{
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
|
@ -148,6 +149,7 @@ Gfx d_course_koopa_troopa_beach_packed_dl_368[] =
|
|||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
|
||||
Gfx d_course_koopa_troopa_beach_packed_dl_380[] =
|
||||
{
|
||||
gsSPDisplayList(0x07000368),
|
||||
|
@ -5946,6 +5948,7 @@ Gfx d_course_koopa_troopa_beach_packed_dl_9CC0[] =
|
|||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// waterfall?
|
||||
Gfx d_course_koopa_troopa_beach_packed_dl_9CD0[] =
|
||||
{
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
|
@ -5967,6 +5970,7 @@ Gfx d_course_koopa_troopa_beach_packed_dl_9CD0[] =
|
|||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// Waterfall pool?
|
||||
Gfx d_course_koopa_troopa_beach_packed_dl_9D58[] =
|
||||
{
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
|
@ -6955,5 +6959,3 @@ Gfx d_course_koopa_troopa_beach_packed_dl_B2B0[] =
|
|||
gsSPDisplayList(0x0700B230),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_koopa_troopa_beach_packed_dl_tail[] = { 0xFF, 14, 0, 0, 0, 0, 0, 0 };
|
||||
|
|
|
@ -7811,5 +7811,3 @@ Gfx d_course_luigi_raceway_packed_dl_C730[] =
|
|||
gsSPDisplayList(0x0700C668),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_luigi_raceway_packed_tail[] = { 0xFF, 9, 0, 0, 0, 0, 0, 0 };
|
||||
|
|
|
@ -4227,5 +4227,3 @@ Gfx d_course_moo_moo_farm_packed_dl_6730[] =
|
|||
gsSPDisplayList(0x070066D0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_moo_moo_farm_packed_tail[] = { 0xFF, 15, 0, 0, 0, 0, 0, 0 };
|
||||
|
|
|
@ -4460,5 +4460,3 @@ Gfx d_course_banshee_boardwalk_packed_dl_7338[] =
|
|||
gsSPDisplayList(0x070072B8),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_banshee_boardwalk_packed_dl_tail[] = { 0xFF, 1, 0, 0, 0, 0, 0, 0 };
|
||||
|
|
|
@ -6569,4 +6569,4 @@ struct CourseAddrUnkStruct d_course_dks_jungle_parkway_addr[] = {
|
|||
{{ 0x070037C0 }, { 0xFFFF4000 }},
|
||||
{{ 0x07003758 }, { 0xFFFF0000 }},
|
||||
{{ 0x00000000 }, { 0x00000000 }},
|
||||
};
|
||||
};
|
||||
|
|
|
@ -5812,5 +5812,3 @@ Gfx d_course_dks_jungle_parkway_packed_dl_9C18[] =
|
|||
gsSPDisplayList(0x07009BA8),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_dks_jungle_parkway_packed_tail[] = { 0xFF, 6, 0, 0, 0, 0, 0, 0 };
|
||||
|
|
|
@ -1204,5 +1204,3 @@ Gfx d_course_rainbow_road_packed_dl_20F8[] =
|
|||
gsSPDisplayList(0x070020D0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_rainbow_road_packed_tail[] = { 0xFF, 2, 0, 0, 0, 0, 0, 0};
|
|
@ -11267,4 +11267,4 @@ struct CourseAddrUnkStruct d_course_yoshi_valley_addr[] = {
|
|||
{{ 0x0600CAD8 }, { 0x0600CEC8 }},
|
||||
{{ 0x0600D018 }, { 0x0600D3D0 }},
|
||||
{{ 0x0600D1E8 }, { 0x0600D540 }},
|
||||
};
|
||||
};
|
||||
|
|
|
@ -5099,5 +5099,3 @@ Gfx d_course_yoshi_valley_packed_dl_8150[] =
|
|||
gsSPDisplayList(0x07008110),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_yoshi_valley_packed_tail[] = { 0xFF, 15, 0, 0, 0, 0, 0, 0};
|
|
@ -5603,5 +5603,3 @@ Gfx d_course_bowsers_castle_packed_dl_9910[] =
|
|||
gsSPDisplayList(0x07009830),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_bowsers_castle_packed_tail[] = { 0xFF, 14, 0, 0, 0, 0, 0, 0 };
|
|
@ -6965,5 +6965,3 @@ Gfx d_course_royal_raceway_packed_dl_B120[] =
|
|||
gsSPDisplayList(0x0700B040),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_royal_raceway_packed_tail[] = { 0xFF, 13, 0, 0, 0, 0, 0, 0 };
|
||||
|
|
|
@ -2210,5 +2210,3 @@ Gfx d_course_sherbet_land_packed_dl_3848[] =
|
|||
gsSPDisplayList(0x070037E0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_sherbet_land_packed_tail[] = { 0xFF, 15, 0, 0, 0, 0, 0, 0};
|
||||
|
|
|
@ -6315,5 +6315,3 @@ Gfx d_course_wario_stadium_packed_dl_A4A8[] =
|
|||
gsSPDisplayList(0x070047D8),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
u8 d_course_wario_stadium_packed_tail[] = { 0xFF, 15, 0, 0, 0, 0, 0, 0 };
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,44 @@
|
|||
// Generated by tools/generate_vertice_count.py
|
||||
|
||||
#include <macros.h>
|
||||
|
||||
#define d_course_rainbow_road_vertex_count 0x00000C27
|
||||
|
||||
#define d_course_yoshi_valley_vertex_count 0x00000E88
|
||||
|
||||
#define d_course_banshee_boardwalk_vertex_count 0x00001351
|
||||
|
||||
#define d_course_dks_jungle_parkway_vertex_count 0x0000162F
|
||||
|
||||
#define d_course_skyscraper_vertex_count 0x0000043E
|
||||
|
||||
#define d_course_block_fort_vertex_count 0x00000440
|
||||
|
||||
#define d_course_double_deck_vertex_count 0x0000022B
|
||||
|
||||
#define d_course_big_donut_vertex_count 0x0000048D
|
||||
|
||||
#define d_course_mario_raceway_vertex_count 0x0000167D
|
||||
|
||||
#define d_course_toads_turnpike_vertex_count 0x000018D7
|
||||
|
||||
#define d_course_choco_mountain_vertex_count 0x000015B8
|
||||
|
||||
#define d_course_frappe_snowland_vertex_count 0x00001599
|
||||
|
||||
#define d_course_kalimari_desert_vertex_count 0x000018F9
|
||||
|
||||
#define d_course_luigi_raceway_vertex_count 0x00001730
|
||||
|
||||
#define d_course_moo_moo_farm_vertex_count 0x00001F24
|
||||
|
||||
#define d_course_koopa_troopa_beach_vertex_count 0x000024A0
|
||||
|
||||
#define d_course_sherbet_land_vertex_count 0x00000A76
|
||||
|
||||
#define d_course_wario_stadium_vertex_count 0x000017B3
|
||||
|
||||
#define d_course_royal_raceway_vertex_count 0x00002072
|
||||
|
||||
#define d_course_bowsers_castle_vertex_count 0x00002537
|
||||
|
15
mk64.ld
15
mk64.ld
|
@ -46,6 +46,14 @@ OUTPUT_ARCH (mips)
|
|||
. = ALIGN(0x10); \
|
||||
} \
|
||||
END_SEG(name)
|
||||
|
||||
#define COURSE_PACKED_SEG(dir, name) \
|
||||
BEGIN_SEG(name, 0x07000000) \
|
||||
{ \
|
||||
BUILD_DIR/courses/dir/packed.inc.mio0.o(.data); \
|
||||
. = ALIGN(0x10); \
|
||||
} \
|
||||
END_SEG(name)
|
||||
|
||||
#define BEGIN_NOLOAD(name) \
|
||||
_##name##SegNoloadStart = ADDR(.name.noload); \
|
||||
|
@ -476,7 +484,7 @@ SECTIONS
|
|||
|
||||
/* TODO: 0x825800 -> 0x8028B230 (0x100) ...
|
||||
0x828400 -> 0x8028DE30 (0xD0) */
|
||||
BEGIN_SEG(data_821D10, 0x0C000000)
|
||||
BEGIN_SEG(data_821D10, 0x0B000000)
|
||||
{
|
||||
BUILD_DIR/src/trophy_model.inc.mio0.o(.data);
|
||||
. = ALIGN(0x10);
|
||||
|
@ -534,8 +542,8 @@ SECTIONS
|
|||
COURSE_OFFSETS_SEG(course_dks_jungle_parkway_offsets, 0x09000000)
|
||||
COURSE_OFFSETS_SEG(course_big_donut_offsets, 0x09000000)
|
||||
|
||||
/* Segment 0xF Course Geography */
|
||||
|
||||
/* Segment 0xF Course Geography (0x4 uncompressed) and Segment 0x7 Packed Displaylists */
|
||||
|
||||
COURSE_VERT_SEG(flower_cup/mario_raceway,mario_raceway_vertex)
|
||||
COURSE_VERT_SEG(flower_cup/choco_mountain,choco_mountain_vertex)
|
||||
COURSE_VERT_SEG(star_cup/bowsers_castle,bowsers_castle_vertex)
|
||||
|
@ -578,7 +586,6 @@ SECTIONS
|
|||
}
|
||||
END_SEG(instrument_sets)
|
||||
|
||||
|
||||
/* Discard everything not specifically mentioned above. */
|
||||
/DISCARD/ :
|
||||
{
|
||||
|
|
|
@ -1176,8 +1176,7 @@ void func_8002A194(Player *player, f32 arg1, f32 arg2, f32 arg3) {
|
|||
GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002A194.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit bece1d6db17040749f77dbbd090363cc6fb926f9
|
||||
// Near identical to func_802AC114 in memory.c
|
||||
void func_8002A5F4(Vec3f arg0, f32 arg1, Vec3f arg2, f32 arg3, f32 arg4) {
|
||||
f32 temp_f0;
|
||||
f32 temp_f2;
|
||||
|
@ -1186,6 +1185,9 @@ void func_8002A5F4(Vec3f arg0, f32 arg1, Vec3f arg2, f32 arg3, f32 arg4) {
|
|||
f32 temp_f16;
|
||||
f32 temp_f18;
|
||||
f32 temp_f20;
|
||||
f32 tmp1;
|
||||
f32 tmp2;
|
||||
f32 tmp3;
|
||||
|
||||
temp_f0 = arg2[0];
|
||||
temp_f2 = arg2[1];
|
||||
|
@ -1194,19 +1196,19 @@ void func_8002A5F4(Vec3f arg0, f32 arg1, Vec3f arg2, f32 arg3, f32 arg4) {
|
|||
temp_f16 = -arg0[1];
|
||||
temp_f18 = -arg0[2];
|
||||
temp_f20 = (temp_f14 * temp_f0) + (temp_f16 * temp_f2) + (temp_f18 * temp_f12);
|
||||
tmp1 = temp_f0 - (temp_f20 * temp_f14);
|
||||
tmp2 = temp_f2 - (temp_f20 * temp_f16);
|
||||
tmp3 = temp_f12 - (temp_f20 * temp_f18);
|
||||
if (arg1 < -arg4) {
|
||||
arg2[0] = temp_f0 - (temp_f20 * temp_f14) - (temp_f20 * temp_f14 * arg3);
|
||||
arg2[1] = temp_f2 - (temp_f20 * temp_f16) - (temp_f20 * temp_f16 * arg3);
|
||||
arg2[2] = temp_f12 - (temp_f20 * temp_f18) - (temp_f20 * temp_f18 * arg3);
|
||||
arg2[0] = tmp1 - (temp_f20 * temp_f14 * arg3);
|
||||
arg2[1] = tmp2 - (temp_f20 * temp_f16 * arg3);
|
||||
arg2[2] = tmp3 - (temp_f20 * temp_f18 * arg3);
|
||||
} else {
|
||||
arg2[0] = temp_f0 - (temp_f20 * temp_f14);
|
||||
arg2[1] = temp_f2 - (temp_f20 * temp_f16);
|
||||
arg2[2] = temp_f12 - (temp_f20 * temp_f18);
|
||||
arg2[0] = tmp1;
|
||||
arg2[1] = tmp2;
|
||||
arg2[2] = tmp3;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002A5F4.s")
|
||||
#endif
|
||||
|
||||
void func_8002A704(Player *player, s8 arg1) {
|
||||
player->unk_0BC |= 0x2000;
|
||||
|
|
|
@ -227,23 +227,23 @@ void func_8003F46C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
|
|||
return;
|
||||
} else {
|
||||
switch (gCurrentCourseId) {
|
||||
case 0:
|
||||
case COURSE_MARIO_RACEWAY:
|
||||
func_8003E048(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
break;
|
||||
case 1:
|
||||
case 6:
|
||||
case COURSE_CHOCO_MOUNTAIN:
|
||||
case COURSE_KOOPA_BEACH:
|
||||
func_8003E37C(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
break;
|
||||
case 2:
|
||||
case COURSE_BOWSER_CASTLE:
|
||||
func_8003E6EC(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
break;
|
||||
case 8:
|
||||
case COURSE_LUIGI_RACEWAY:
|
||||
func_8003E9EC(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
break;
|
||||
case 14:
|
||||
case COURSE_WARIO_STADIUM:
|
||||
func_8003EE2C(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
break;
|
||||
case 18:
|
||||
case COURSE_DK_JUNGLE:
|
||||
func_8003F138(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -280,7 +280,7 @@ UNUSED Vtx D_02007B38[] = {
|
|||
{{{ 0, 0, 0}, 0, { 0, 448}, {0xff, 0x00, 0x00, 0xff}}},
|
||||
};
|
||||
|
||||
// Todo: Place all theces vertices in a single array
|
||||
// Todo: Place all these vertices in a single array
|
||||
// Access the correct vertex using sym[value]
|
||||
Vtx D_02007BB8[] = {
|
||||
{{{ 0, 65520, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
|
|
38
src/memory.c
38
src/memory.c
|
@ -239,7 +239,7 @@ UNUSED void *load_segment(s32 segment, u8 *srcStart, u8 *srcEnd, u32 side) {
|
|||
}
|
||||
|
||||
// Similar to sm64 load_to_fixed_pool_addr?
|
||||
void *func_802A8190(s32 arg0, s32 arg1) {
|
||||
UNUSED void *func_802A8190(s32 arg0, s32 arg1) {
|
||||
//u32 srcSize = ALIGN16(srcEnd - srcStart);
|
||||
//u32 destSize = ALIGN16((u8 *) sPoolListHeadR - destAddr);
|
||||
u32 addr;
|
||||
|
@ -1331,12 +1331,12 @@ GLOBAL_ASM("asm/non_matchings/memory/func_802AA88C.s")
|
|||
|
||||
s32 load_course(s32 courseId) {
|
||||
UNUSED s32 pad[4];
|
||||
s32 temp_v0;
|
||||
u32 *temp_v0;
|
||||
u32 *dlRomStart;
|
||||
u32 *dlRomEnd;
|
||||
u32 *vertexRomStart;
|
||||
u32 *vertexRomEnd;
|
||||
s32 sp4C;
|
||||
s32 pad2;
|
||||
s32 gamestate;
|
||||
u32 *textures;
|
||||
mk64_Vtx *vertexStart;
|
||||
|
@ -1348,6 +1348,7 @@ s32 load_course(s32 courseId) {
|
|||
s32 offsetRomStart;
|
||||
s32 offsetRomEnd;
|
||||
|
||||
// Pointers to rom offsets
|
||||
gamestate = gGamestate;
|
||||
dlRomStart = gCourseTable[courseId].dlRomStart;
|
||||
dlRomEnd = gCourseTable[courseId].dlRomEnd;
|
||||
|
@ -1368,12 +1369,13 @@ s32 load_course(s32 courseId) {
|
|||
gHeapEndPtr = SEG_8028DF00;
|
||||
}
|
||||
set_segment_base_addr(9, func_802A7D70(offsetRomStart, offsetRomEnd));
|
||||
|
||||
if (gGamestate != ENDING_SEQUENCE) {
|
||||
set_segment_base_addr(6, func_802AA88C(dlRomStart, dlRomEnd));
|
||||
}
|
||||
prevLoadedAddress_saved = gPrevLoadedAddress;
|
||||
temp_v0 = func_802A82E4((u8 *)vertexRomStart, (u8 *)vertexRomEnd);
|
||||
sp4C = temp_v0;
|
||||
|
||||
set_segment_base_addr(0xF, (void *)temp_v0);
|
||||
func_802A87A8(vertexStart, vertexCount);
|
||||
display_list_unpack(packedStart, finalDL, unknown1);
|
||||
|
@ -1382,7 +1384,8 @@ s32 load_course(s32 courseId) {
|
|||
return temp_v0;
|
||||
}
|
||||
|
||||
void func_802AAA70(uintptr_t addr) {
|
||||
// Used for the choco mountain guard rail
|
||||
void nullify_displaylist(uintptr_t addr) {
|
||||
s32 segment = SEGMENT_NUMBER2(addr);
|
||||
s32 offset = SEGMENT_OFFSET(addr);
|
||||
|
||||
|
@ -1390,7 +1393,7 @@ void func_802AAA70(uintptr_t addr) {
|
|||
|
||||
macro = VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
|
||||
macro->words.w0 = G_ENDDL << 24;
|
||||
macro->words.w1 = G_SPNOOP;
|
||||
macro->words.w1 = 0;
|
||||
}
|
||||
|
||||
void func_802AAAAC(UnkActorInner *arg0) {
|
||||
|
@ -2136,8 +2139,6 @@ void func_802AC098(UnkActorInner *arg0, f32 *velocity) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit bece1d6db17040749f77dbbd090363cc6fb926f9
|
||||
void func_802AC114(Vec3f arg0, f32 arg1, Vec3f arg2, f32 arg3) {
|
||||
f32 temp_f0;
|
||||
f32 temp_f12;
|
||||
|
@ -2146,6 +2147,9 @@ void func_802AC114(Vec3f arg0, f32 arg1, Vec3f arg2, f32 arg3) {
|
|||
f32 temp_f18;
|
||||
f32 temp_f20;
|
||||
f32 temp_f2;
|
||||
f32 tmp1;
|
||||
f32 tmp2;
|
||||
f32 tmp3;
|
||||
|
||||
temp_f0 = arg2[0];
|
||||
temp_f2 = arg2[1];
|
||||
|
@ -2154,19 +2158,19 @@ void func_802AC114(Vec3f arg0, f32 arg1, Vec3f arg2, f32 arg3) {
|
|||
temp_f16 = -arg0[1];
|
||||
temp_f18 = -arg0[2];
|
||||
temp_f20 = (temp_f14 * temp_f0) + (temp_f16 * temp_f2) + (temp_f18 * temp_f12);
|
||||
tmp1 = temp_f0 - (temp_f20 * temp_f14);
|
||||
tmp2 = temp_f2 - (temp_f20 * temp_f16);
|
||||
tmp3 = temp_f12 - (temp_f20 * temp_f18);
|
||||
if (arg1 < -3.5) {
|
||||
arg2[0] = temp_f0 - (temp_f20 * temp_f14) - (0.5f * temp_f14 * temp_f20);
|
||||
arg2[1] = temp_f2 - (temp_f20 * temp_f16) - (0.5f * temp_f16 * temp_f20);
|
||||
arg2[2] = temp_f12 - (temp_f20 * temp_f18) - (0.5f * temp_f18 * temp_f20);
|
||||
arg2[0] = tmp1 - (temp_f20 * temp_f14 * 0.5f);
|
||||
arg2[1] = tmp2 - (temp_f20 * temp_f16 * 0.5f);
|
||||
arg2[2] = tmp3 - (temp_f20 * temp_f18 * 0.5f);
|
||||
} else {
|
||||
arg2[0] = temp_f0 - (temp_f20 * temp_f14);
|
||||
arg2[1] = temp_f2 - (temp_f20 * temp_f16);
|
||||
arg2[2] = temp_f12 - (temp_f20 * temp_f18);
|
||||
arg2[0] = tmp1;
|
||||
arg2[1] = tmp2;
|
||||
arg2[2] = tmp3;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/memory/func_802AC114.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit bece1d6db17040749f77dbbd090363cc6fb926f9
|
||||
|
|
|
@ -86,7 +86,7 @@ void func_802A8EA8(Gfx*, u8, u8);
|
|||
void func_802A8F14(Gfx*, u8, u8);
|
||||
void func_802A94D8(Gfx*, u8, u8);
|
||||
void func_802A9544(Gfx*, u8, u8);
|
||||
void func_802AAA70(uintptr_t);
|
||||
void nullify_displaylist(uintptr_t);
|
||||
void func_802AAAAC(UnkActorInner*);
|
||||
s8 func_802ABD10(u16);
|
||||
s16 func_802ABD40(u16);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <common_structs.h>
|
||||
#include <defines.h>
|
||||
#include <types.h>
|
||||
#include <packed_displaylist_symbols_gen.h>
|
||||
#include "actors.h"
|
||||
#include "math_util.h"
|
||||
#include "memory.h"
|
||||
|
@ -177,14 +178,14 @@ void load_surface_map(s32 arg0, struct UnkStruct_800DC5EC *arg1) {
|
|||
}
|
||||
|
||||
void func_80291198(void) {
|
||||
gSPDisplayList(gDisplayListHead++, 0x07001140);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_packed_dl_1140);
|
||||
}
|
||||
|
||||
void func_802911C4(void) {
|
||||
if (gScreenModeSelection == SCREEN_MODE_1P) {
|
||||
gSPDisplayList(gDisplayListHead++, 0x070008E8);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_packed_dl_8E8);
|
||||
} else {
|
||||
gSPDisplayList(gDisplayListHead++, 0x07002D68);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_packed_dl_2D68);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -434,7 +435,7 @@ block_9:
|
|||
temp_v1_18->words.w1 = 0;
|
||||
temp_v1_18->words.w0 = 0xE7000000;
|
||||
return;
|
||||
case 6: /* switch 1 */
|
||||
case COURSE_KOOPA_BEACH: /* switch 1 */
|
||||
temp_v1_19 = gDisplayListHead;
|
||||
gDisplayListHead = temp_v1_19 + 8;
|
||||
temp_v1_19->words.w1 = 0;
|
||||
|
@ -967,7 +968,7 @@ void render_mario_raceway(struct UnkStruct_800DC5EC *arg0) {
|
|||
if (func_80290C20(arg0->camera) == 1) {
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07003050);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_packed_dl_3050);
|
||||
}
|
||||
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
|
@ -1050,19 +1051,19 @@ void render_mario_raceway(struct UnkStruct_800DC5EC *arg0) {
|
|||
}
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07003508);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07003240);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070014A0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_packed_dl_3508);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_packed_dl_3240);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_packed_dl_14A0);
|
||||
|
||||
load_surface_map(mario_raceway_dls, arg0);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000450);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000240);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_packed_dl_450);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_packed_dl_240);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070000E0);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000160);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_packed_dl_E0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_packed_dl_160);
|
||||
}
|
||||
|
||||
void render_choco_mountain(struct UnkStruct_800DC5EC *arg0) {
|
||||
|
@ -1074,7 +1075,7 @@ void render_choco_mountain(struct UnkStruct_800DC5EC *arg0) {
|
|||
if (func_80290C20(arg0->camera) == 1) {
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07004608);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_packed_dl_4608);
|
||||
}
|
||||
gDPSetCycleType(gDisplayListHead++, G_CYC_2CYCLE);
|
||||
gDPSetFogColor(gDisplayListHead++, D_801625EC, D_801625F4, D_801625F0, 0xFF);
|
||||
|
@ -1086,10 +1087,10 @@ void render_choco_mountain(struct UnkStruct_800DC5EC *arg0) {
|
|||
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07005A70);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000828);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070008E0);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07005868);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_packed_dl_5A70);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_packed_dl_828);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_packed_dl_8E0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_packed_dl_5868);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
|
||||
load_surface_map(choco_mountain_dls, arg0);
|
||||
|
@ -1097,10 +1098,10 @@ void render_choco_mountain(struct UnkStruct_800DC5EC *arg0) {
|
|||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_TEX_EDGE2);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_PASS2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000448);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070005D8);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_packed_dl_448);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_packed_dl_5D8);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000718);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_packed_dl_718);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_FOG);
|
||||
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
|
@ -1116,7 +1117,7 @@ void render_bowsers_castle(struct UnkStruct_800DC5EC *arg0) {
|
|||
if (func_80290C20(arg0->camera) == 1) {
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07006A80);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_bowsers_castle_packed_dl_6A80);
|
||||
}
|
||||
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
|
@ -1130,7 +1131,7 @@ void render_bowsers_castle(struct UnkStruct_800DC5EC *arg0) {
|
|||
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000248);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_bowsers_castle_packed_dl_248);
|
||||
}
|
||||
|
||||
void render_banshee_boardwalk(struct UnkStruct_800DC5EC *arg0) {
|
||||
|
@ -1142,7 +1143,7 @@ void render_banshee_boardwalk(struct UnkStruct_800DC5EC *arg0) {
|
|||
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07007228);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_banshee_boardwalk_packed_dl_7228);
|
||||
|
||||
gSPFogPosition(gDisplayListHead++, D_802B87B0, D_802B87B4);
|
||||
|
||||
|
@ -1156,9 +1157,9 @@ void render_banshee_boardwalk(struct UnkStruct_800DC5EC *arg0) {
|
|||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07005CD0);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07004E60);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070069B0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_banshee_boardwalk_packed_dl_5CD0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_banshee_boardwalk_packed_dl_4E60);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_banshee_boardwalk_packed_dl_69B0);
|
||||
|
||||
load_surface_map(banshee_boardwalk_dls, arg0);
|
||||
|
||||
|
@ -1167,12 +1168,12 @@ void render_banshee_boardwalk(struct UnkStruct_800DC5EC *arg0) {
|
|||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_SHADING_SMOOTH);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000580);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000060);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000540);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_banshee_boardwalk_packed_dl_580);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_banshee_boardwalk_packed_dl_60);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_banshee_boardwalk_packed_dl_540);
|
||||
|
||||
if (camera->pos[1] < -20.0f) {
|
||||
gSPDisplayList(gDisplayListHead++, 0x07006310);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_banshee_boardwalk_packed_dl_6310);
|
||||
}
|
||||
spA8[0] = camera->pos[0];
|
||||
spA8[1] = -82.0f;
|
||||
|
@ -1203,7 +1204,7 @@ void render_frappe_snowland(struct UnkStruct_800DC5EC *arg0) {
|
|||
if (func_80290C20(arg0->camera) == 1) {
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070065E0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_frappe_snowland_packed_dl_65E0);
|
||||
}
|
||||
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
|
@ -1221,16 +1222,16 @@ void render_koopa_troopa_beach(struct UnkStruct_800DC5EC *arg0) {
|
|||
if (func_80290C20(arg0->camera) == 1) {
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07009CC0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_koopa_troopa_beach_packed_dl_9CC0);
|
||||
}
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07009688);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_koopa_troopa_beach_packed_dl_9688);
|
||||
load_surface_map(koopa_troopa_beach_dls, arg0);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070002C0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_koopa_troopa_beach_packed_dl_2C0);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
}
|
||||
|
@ -1244,20 +1245,20 @@ void render_royal_raceway(struct UnkStruct_800DC5EC *arg0) {
|
|||
if (func_80290C20(arg0->camera) == 1) {
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x0700B030);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_royal_raceway_packed_dl_B030);
|
||||
}
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x0700A648);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_royal_raceway_packed_dl_A648);
|
||||
|
||||
load_surface_map(royal_raceway_dls, arg0);
|
||||
|
||||
gSPDisplayList(gDisplayListHead++, 0x070011A8);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_royal_raceway_packed_dl_11A8);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070008A0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_royal_raceway_packed_dl_8A0);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
}
|
||||
|
||||
|
@ -1274,7 +1275,7 @@ void render_luigi_raceway(struct UnkStruct_800DC5EC *arg0) {
|
|||
if (func_80290C20(arg0->camera) == 1) {
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07009EC0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_luigi_raceway_packed_dl_9EC0);
|
||||
}
|
||||
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
|
@ -1284,8 +1285,8 @@ void render_luigi_raceway(struct UnkStruct_800DC5EC *arg0) {
|
|||
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070000E0);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000068);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_luigi_raceway_packed_dl_E0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_luigi_raceway_packed_dl_68);
|
||||
|
||||
D_800DC5DC = 88;
|
||||
D_800DC5E0 = 72;
|
||||
|
@ -1337,8 +1338,8 @@ void render_moo_moo_farm(struct UnkStruct_800DC5EC *arg0) {
|
|||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07004DF8);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07005640);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_packed_dl_4DF8);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_packed_dl_5640);
|
||||
gSPFogPosition(gDisplayListHead++, D_802B87B0, D_802B87B4);
|
||||
|
||||
load_surface_map(moo_moo_farm_dls, arg0);
|
||||
|
@ -1363,11 +1364,11 @@ void render_moo_moo_farm(struct UnkStruct_800DC5EC *arg0) {
|
|||
|
||||
if ((temp_s0 >= 16) && (temp_s0 < 24)) {
|
||||
if ((temp_s1 == 2) || (temp_s1 == 3))
|
||||
gSPDisplayList(gDisplayListHead++, 0x07005410);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_packed_dl_5410);
|
||||
|
||||
} else if (temp_s0 < 9) {
|
||||
if (temp_s1 == 2)
|
||||
gSPDisplayList(gDisplayListHead++, 0x07005410);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_packed_dl_5410);
|
||||
|
||||
}
|
||||
if (temp_s0 < 4) {
|
||||
|
@ -1387,7 +1388,7 @@ void render_moo_moo_farm(struct UnkStruct_800DC5EC *arg0) {
|
|||
}
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070010C0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_packed_dl_10C0);
|
||||
}
|
||||
|
||||
void render_toads_turnpike(struct UnkStruct_800DC5EC *arg0) {
|
||||
|
@ -1408,9 +1409,9 @@ void render_toads_turnpike(struct UnkStruct_800DC5EC *arg0) {
|
|||
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_TEX_EDGE2);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_PASS2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000000);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000068);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070000D8);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_toads_turnpike_packed_dl_0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_toads_turnpike_packed_dl_68);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_toads_turnpike_packed_dl_D8);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_FOG);
|
||||
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
|
||||
}
|
||||
|
@ -1426,20 +1427,20 @@ void render_kalimari_desert(struct UnkStruct_800DC5EC *arg0) {
|
|||
if (func_80290C20(arg0->camera) == 1) {
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070071C8);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_packed_dl_71C8);
|
||||
}
|
||||
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
load_surface_map(kalimari_desert_dls, arg0);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07001ED8);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07001B18);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07008330);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_packed_dl_1ED8);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_packed_dl_1B18);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_packed_dl_8330);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000998);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000270);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_packed_dl_998);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_packed_dl_270);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
}
|
||||
|
||||
|
@ -1473,7 +1474,7 @@ void render_wario_stadium(struct UnkStruct_800DC5EC *arg0) {
|
|||
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x0700A0C8);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_wario_stadium_packed_dl_A0C8);
|
||||
|
||||
}
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATERGBA, G_CC_MODULATERGBA);
|
||||
|
@ -1481,11 +1482,11 @@ void render_wario_stadium(struct UnkStruct_800DC5EC *arg0) {
|
|||
|
||||
load_surface_map(wario_stadium_dls, arg0);
|
||||
|
||||
gSPDisplayList(gDisplayListHead++, 0x0700A228);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_wario_stadium_packed_dl_A228);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000A88);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_wario_stadium_packed_dl_A88);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
|
||||
D_800DC5DC = 88;
|
||||
|
@ -1530,7 +1531,7 @@ void render_block_fort(struct UnkStruct_800DC5EC *arg0) {
|
|||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070015C0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_block_fort_packed_dl_15C0);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1539,15 +1540,15 @@ void render_skyscraper(struct UnkStruct_800DC5EC *arg0) {
|
|||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000FE8);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000C60);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000B70);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070006B8);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000570);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_skyscraper_packed_dl_FE8);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_skyscraper_packed_dl_C60);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_skyscraper_packed_dl_B70);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_skyscraper_packed_dl_6B8);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_skyscraper_packed_dl_570);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070010C8);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_skyscraper_packed_dl_10C8);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000258);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_skyscraper_packed_dl_258);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1558,7 +1559,7 @@ void render_double_deck(struct UnkStruct_800DC5EC *arg0) {
|
|||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000738);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_double_deck_packed_dl_738);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
}
|
||||
|
||||
|
@ -1574,7 +1575,7 @@ void render_dks_jungle_parkway(struct UnkStruct_800DC5EC *arg0) {
|
|||
gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x070092D8);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_dks_jungle_parkway_packed_dl_92D8);
|
||||
}
|
||||
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
|
@ -1596,75 +1597,74 @@ void render_big_donut(struct UnkStruct_800DC5EC *arg0) {
|
|||
if (func_80290C20(arg0->camera) == 1) {
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000DE8);
|
||||
|
||||
gSPDisplayList(gDisplayListHead++, d_course_big_donut_packed_dl_DE8);
|
||||
}
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000450);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000AC0);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000D20);
|
||||
gSPDisplayList(gDisplayListHead++, 0x07000230);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_big_donut_packed_dl_450);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_big_donut_packed_dl_AC0);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_big_donut_packed_dl_D20);
|
||||
gSPDisplayList(gDisplayListHead++, d_course_big_donut_packed_dl_230);
|
||||
}
|
||||
|
||||
void func_8029569C(void) {
|
||||
switch (gCurrentCourseId) {
|
||||
case 0:
|
||||
case COURSE_MARIO_RACEWAY:
|
||||
gSPDisplayList(gDisplayListHead++, D_06009348);
|
||||
break;
|
||||
case 1:
|
||||
case COURSE_CHOCO_MOUNTAIN:
|
||||
gSPDisplayList(gDisplayListHead++, D_060071B0);
|
||||
break;
|
||||
case 2:
|
||||
case COURSE_BOWSER_CASTLE:
|
||||
gSPDisplayList(gDisplayListHead++, D_06009148);
|
||||
break;
|
||||
case 3:
|
||||
case COURSE_BANSHEE_BOARDWALK:
|
||||
gSPDisplayList(gDisplayListHead++, D_0600B308);
|
||||
break;
|
||||
case 4:
|
||||
case COURSE_YOSHI_VALLEY:
|
||||
gSPDisplayList(gDisplayListHead++, D_06018020);
|
||||
break;
|
||||
case 5:
|
||||
case COURSE_FRAPPE_SNOWLAND:
|
||||
gSPDisplayList(gDisplayListHead++, D_060076A0);
|
||||
break;
|
||||
case 6:
|
||||
case COURSE_KOOPA_BEACH:
|
||||
gSPDisplayList(gDisplayListHead++, D_06018D68);
|
||||
break;
|
||||
case 7:
|
||||
case COURSE_ROYAL_RACEWAY:
|
||||
gSPDisplayList(gDisplayListHead++, D_0600D8E8);
|
||||
break;
|
||||
case 8:
|
||||
case COURSE_LUIGI_RACEWAY:
|
||||
gSPDisplayList(gDisplayListHead++, D_0600FD40);
|
||||
break;
|
||||
case 9:
|
||||
case COURSE_MOO_MOO_FARM:
|
||||
gSPDisplayList(gDisplayListHead++, D_06014088);
|
||||
break;
|
||||
case 10:
|
||||
case COURSE_TOADS_TURNPIKE:
|
||||
gSPDisplayList(gDisplayListHead++, D_06023930);
|
||||
break;
|
||||
case 11:
|
||||
case COURSE_KALAMARI_DESERT:
|
||||
gSPDisplayList(gDisplayListHead++, D_06022E00);
|
||||
break;
|
||||
case 12:
|
||||
case COURSE_SHERBET_LAND:
|
||||
gSPDisplayList(gDisplayListHead++, D_06009AE8);
|
||||
break;
|
||||
case 13:
|
||||
case COURSE_RAINBOW_ROAD:
|
||||
gSPDisplayList(gDisplayListHead++, D_06016220);
|
||||
break;
|
||||
case 14:
|
||||
case COURSE_WARIO_STADIUM:
|
||||
gSPDisplayList(gDisplayListHead++, D_0600CA78);
|
||||
break;
|
||||
case 15:
|
||||
case COURSE_BLOCK_FORT:
|
||||
gSPDisplayList(gDisplayListHead++, D_sherbet_land_06000000);
|
||||
break;
|
||||
case 16:
|
||||
case COURSE_SKYSCRAPER:
|
||||
gSPDisplayList(gDisplayListHead++, D_sherbet_land_06000000);
|
||||
break;
|
||||
case 17:
|
||||
case COURSE_DOUBLE_DECK:
|
||||
gSPDisplayList(gDisplayListHead++, D_sherbet_land_06000000);
|
||||
break;
|
||||
case 18:
|
||||
case COURSE_DK_JUNGLE:
|
||||
gSPDisplayList(gDisplayListHead++, D_06013C30);
|
||||
break;
|
||||
case 19:
|
||||
case COURSE_BIG_DONUT:
|
||||
gSPDisplayList(gDisplayListHead++, D_sherbet_land_06000000);
|
||||
break;
|
||||
}
|
||||
|
@ -1679,64 +1679,64 @@ void func_80295A38(struct UnkStruct_800DC5EC *arg0) {
|
|||
}
|
||||
|
||||
switch (gCurrentCourseId) {
|
||||
case 0:
|
||||
case COURSE_MARIO_RACEWAY:
|
||||
render_mario_raceway(arg0);
|
||||
break;
|
||||
case 1:
|
||||
case COURSE_CHOCO_MOUNTAIN:
|
||||
render_choco_mountain(arg0);
|
||||
break;
|
||||
case 2:
|
||||
case COURSE_BOWSER_CASTLE:
|
||||
render_bowsers_castle(arg0);
|
||||
break;
|
||||
case 3:
|
||||
case COURSE_BANSHEE_BOARDWALK:
|
||||
render_banshee_boardwalk(arg0);
|
||||
break;
|
||||
case 4:
|
||||
case COURSE_YOSHI_VALLEY:
|
||||
render_yoshi_valley(arg0);
|
||||
break;
|
||||
case 5:
|
||||
case COURSE_FRAPPE_SNOWLAND:
|
||||
render_frappe_snowland(arg0);
|
||||
break;
|
||||
case 6:
|
||||
case COURSE_KOOPA_BEACH:
|
||||
render_koopa_troopa_beach(arg0);
|
||||
break;
|
||||
case 7:
|
||||
case COURSE_ROYAL_RACEWAY:
|
||||
render_royal_raceway(arg0);
|
||||
break;
|
||||
case 8:
|
||||
case COURSE_LUIGI_RACEWAY:
|
||||
render_luigi_raceway(arg0);
|
||||
break;
|
||||
case 9:
|
||||
case COURSE_MOO_MOO_FARM:
|
||||
render_moo_moo_farm(arg0);
|
||||
break;
|
||||
case 10:
|
||||
case COURSE_TOADS_TURNPIKE:
|
||||
render_toads_turnpike(arg0);
|
||||
break;
|
||||
case 11:
|
||||
case COURSE_KALAMARI_DESERT:
|
||||
render_kalimari_desert(arg0);
|
||||
break;
|
||||
case 12:
|
||||
case COURSE_SHERBET_LAND:
|
||||
render_sherbet_land(arg0);
|
||||
break;
|
||||
case 13:
|
||||
case COURSE_RAINBOW_ROAD:
|
||||
render_rainbow_road(arg0);
|
||||
break;
|
||||
case 14:
|
||||
case COURSE_WARIO_STADIUM:
|
||||
render_wario_stadium(arg0);
|
||||
break;
|
||||
case 15:
|
||||
case COURSE_BLOCK_FORT:
|
||||
render_block_fort(arg0);
|
||||
break;
|
||||
case 16:
|
||||
case COURSE_SKYSCRAPER:
|
||||
render_skyscraper(arg0);
|
||||
break;
|
||||
case 17:
|
||||
case COURSE_DOUBLE_DECK:
|
||||
render_double_deck(arg0);
|
||||
break;
|
||||
case 18:
|
||||
case COURSE_DK_JUNGLE:
|
||||
render_dks_jungle_parkway(arg0);
|
||||
break;
|
||||
case 19:
|
||||
case COURSE_BIG_DONUT:
|
||||
render_big_donut(arg0);
|
||||
break;
|
||||
}
|
||||
|
@ -1797,11 +1797,11 @@ void func_80295D88(void) {
|
|||
D_800DC5C8 = 0;
|
||||
switch (gCurrentCourseId) {
|
||||
case COURSE_MARIO_RACEWAY:
|
||||
func_802AF588(0x07001140);
|
||||
func_802AF588(d_course_mario_raceway_packed_dl_1140);
|
||||
if (gScreenModeSelection == SCREEN_MODE_1P) {
|
||||
func_802AF588(0x070008E8);
|
||||
func_802AF588(d_course_mario_raceway_packed_dl_8E8);
|
||||
} else {
|
||||
func_802AF588(0x07002D68);
|
||||
func_802AF588(d_course_mario_raceway_packed_dl_2D68);
|
||||
}
|
||||
func_80290CAC(&D_06009650);
|
||||
func_80295C6C();
|
||||
|
@ -1816,13 +1816,15 @@ void func_80295D88(void) {
|
|||
D_802B87B4 = 0x3E8;
|
||||
D_802B87D4 = 0x71C;
|
||||
D_802B87D0 = 0xE38;
|
||||
|
||||
// Spawn guardrail only for CC_50 and time trials.
|
||||
if ((gCCSelection != CC_50) && (gModeSelection != TIME_TRIALS)) {
|
||||
func_802AAA70(0x07000000);
|
||||
func_802AAA70(0x07000098);
|
||||
func_802AAA70(0x07000178);
|
||||
func_802AAA70(0x07000280);
|
||||
func_802AAA70(0x07000340);
|
||||
func_802AAA70(0x070003C8);
|
||||
nullify_displaylist(d_course_choco_mountain_packed_dl_0);
|
||||
nullify_displaylist(d_course_choco_mountain_packed_dl_98);
|
||||
nullify_displaylist(d_course_choco_mountain_packed_dl_178);
|
||||
nullify_displaylist(d_course_choco_mountain_packed_dl_280);
|
||||
nullify_displaylist(d_course_choco_mountain_packed_dl_340);
|
||||
nullify_displaylist(d_course_choco_mountain_packed_dl_3C8);
|
||||
}
|
||||
func_80290CAC(&D_060072D0);
|
||||
func_802B5CAC(0x238E, 0x31C7, D_8015F590);
|
||||
|
@ -1832,7 +1834,7 @@ void func_80295D88(void) {
|
|||
case COURSE_BOWSER_CASTLE:
|
||||
func_80290CAC(&D_060093D8);
|
||||
func_80295C6C();
|
||||
func_802AF8BC(0x07001350, 0x32, 0, 0, 0);
|
||||
func_802AF8BC(d_course_bowsers_castle_packed_dl_1350, 0x32, 0, 0, 0);
|
||||
D_8015F8E4 = -50.0f;
|
||||
break;
|
||||
case COURSE_BANSHEE_BOARDWALK:
|
||||
|
@ -1842,7 +1844,7 @@ void func_80295D88(void) {
|
|||
D_801625F0 = 0;
|
||||
func_80290CAC(D_0600B458);
|
||||
func_80295C6C();
|
||||
func_802AF8BC(0x07000878, 128, 0, 0, 0);
|
||||
func_802AF8BC(d_course_banshee_boardwalk_packed_dl_878, 128, 0, 0, 0);
|
||||
D_8015F8E4 = -80.0f;
|
||||
break;
|
||||
case COURSE_YOSHI_VALLEY:
|
||||
|
@ -1859,10 +1861,10 @@ void func_80295D88(void) {
|
|||
case COURSE_KOOPA_BEACH:
|
||||
func_80290CAC(D_06018FD8);
|
||||
func_80295C6C();
|
||||
func_802AF8BC(0x0700ADE0, -0x6A, 255, 255, 255);
|
||||
func_802AF8BC(0x0700A540, -0x6A, 255, 255, 255);
|
||||
func_802AF8BC(0x07009E70, -0x6A, 255, 255, 255);
|
||||
func_802AF8BC(0x07000358, -0x6A, 255, 255, 255);
|
||||
func_802AF8BC(d_course_koopa_troopa_beach_packed_dl_ADE0, -0x6A, 255, 255, 255);
|
||||
func_802AF8BC(d_course_koopa_troopa_beach_packed_dl_A540, -0x6A, 255, 255, 255);
|
||||
func_802AF8BC(d_course_koopa_troopa_beach_packed_dl_9E70, -0x6A, 255, 255, 255);
|
||||
func_802AF8BC(d_course_koopa_troopa_beach_packed_dl_358, -0x6A, 255, 255, 255);
|
||||
break;
|
||||
case COURSE_ROYAL_RACEWAY:
|
||||
func_80290CAC(D_0600DC28);
|
||||
|
@ -1898,48 +1900,48 @@ void func_80295D88(void) {
|
|||
func_80290CAC(D_06009C20);
|
||||
func_80295C6C();
|
||||
D_8015F8E4 = -18.0f;
|
||||
func_802AF8BC(0x07001EB8, -0x4C, 255, 255, 255);
|
||||
func_802AF8BC(0x07002308, -0x6A, 255, 255, 255);
|
||||
func_802AF8BC(d_course_sherbet_land_packed_dl_1EB8, -0x4C, 255, 255, 255);
|
||||
func_802AF8BC(d_course_sherbet_land_packed_dl_2308, -0x6A, 255, 255, 255);
|
||||
break;
|
||||
case COURSE_RAINBOW_ROAD:
|
||||
D_800DC5C8 = 1;
|
||||
func_80290CAC(D_06016440);
|
||||
func_80295C6C();
|
||||
D_8015F8E4 = 0.0f;
|
||||
func_802AF8BC(0x07002068, -0x6A, 255, 255, 255);
|
||||
func_802AF8BC(0x07001E18, -0x6A, 255, 255, 255);
|
||||
func_802AF8BC(0x07001318, 255, 255, 255, 0);
|
||||
func_802AF8BC(d_course_rainbow_road_packed_dl_2068, -0x6A, 255, 255, 255);
|
||||
func_802AF8BC(d_course_rainbow_road_packed_dl_1E18, -0x6A, 255, 255, 255);
|
||||
func_802AF8BC(d_course_rainbow_road_packed_dl_1318, 255, 255, 255, 0);
|
||||
if (gGamestate != CREDITS_SEQUENCE) {
|
||||
func_802AF8BC(0x07001FB8, -0x6A, 255, 255, 255);
|
||||
func_802AF8BC(d_course_rainbow_road_packed_dl_1FB8, -0x6A, 255, 255, 255);
|
||||
}
|
||||
break;
|
||||
case COURSE_WARIO_STADIUM:
|
||||
func_80290CAC(D_0600CC38);
|
||||
func_80295C6C();
|
||||
D_8015F8E4 = D_8015F6EE - 10.0f;
|
||||
func_802AF8BC(0x07000C50, 100, 255, 255, 255);
|
||||
func_802AF8BC(0x07000BD8, 100, 255, 255, 255);
|
||||
func_802AF8BC(0x07000B60, 100, 255, 255, 255);
|
||||
func_802AF8BC(0x07000AE8, 100, 255, 255, 255);
|
||||
func_802AF8BC(0x07000CC8, 100, 255, 255, 255);
|
||||
func_802AF8BC(0x07000D50, 100, 255, 255, 255);
|
||||
func_802AF8BC(0x07000DD0, 100, 255, 255, 255);
|
||||
func_802AF8BC(0x07000E48, 100, 255, 255, 255);
|
||||
func_802AF8BC(d_course_wario_stadium_packed_dl_C50, 100, 255, 255, 255);
|
||||
func_802AF8BC(d_course_wario_stadium_packed_dl_BD8, 100, 255, 255, 255);
|
||||
func_802AF8BC(d_course_wario_stadium_packed_dl_B60, 100, 255, 255, 255);
|
||||
func_802AF8BC(d_course_wario_stadium_packed_dl_AE8, 100, 255, 255, 255);
|
||||
func_802AF8BC(d_course_wario_stadium_packed_dl_CC8, 100, 255, 255, 255);
|
||||
func_802AF8BC(d_course_wario_stadium_packed_dl_D50, 100, 255, 255, 255);
|
||||
func_802AF8BC(d_course_wario_stadium_packed_dl_DD0, 100, 255, 255, 255);
|
||||
func_802AF8BC(d_course_wario_stadium_packed_dl_E48, 100, 255, 255, 255);
|
||||
break;
|
||||
case COURSE_BLOCK_FORT:
|
||||
func_802AF5AC(0x070015C0, 1);
|
||||
func_802AF5AC(d_course_block_fort_packed_dl_15C0, 1);
|
||||
func_80295C6C();
|
||||
D_8015F8E4 = D_8015F6EE - 10.0f;
|
||||
break;
|
||||
case COURSE_SKYSCRAPER:
|
||||
func_802AF5AC(0x07001110, 1);
|
||||
func_802AF5AC(0x07000258, 1);
|
||||
func_802AF5AC(d_course_skyscraper_packed_dl_1110, 1);
|
||||
func_802AF5AC(d_course_skyscraper_packed_dl_258, 1);
|
||||
func_80295C6C();
|
||||
|
||||
D_8015F8E4 = -480.0f;
|
||||
break;
|
||||
case COURSE_DOUBLE_DECK:
|
||||
func_802AF5AC(0x07000738, 1);
|
||||
func_802AF5AC(d_course_double_deck_packed_dl_738, 1);
|
||||
func_80295C6C();
|
||||
D_8015F8E4 = D_8015F6EE - 10.0f;
|
||||
break;
|
||||
|
@ -1947,14 +1949,14 @@ void func_80295D88(void) {
|
|||
func_80290CAC(D_06014338);
|
||||
func_80295C6C();
|
||||
D_8015F8E4 = -475.0f;
|
||||
func_802AF8BC(0x07003FA8, 120, 255, 255, 255);
|
||||
func_802AF8BC(d_course_dks_jungle_parkway_packed_dl_3FA8, 120, 255, 255, 255);
|
||||
break;
|
||||
case COURSE_BIG_DONUT:
|
||||
func_802AF5AC(0x07001018, 6);
|
||||
func_802AF5AC(0x07000450, 6);
|
||||
func_802AF5AC(0x07000AC0, 6);
|
||||
func_802AF5AC(0x07000B58, 6);
|
||||
func_802AF5AC(0x07000230, 6);
|
||||
func_802AF5AC(d_course_big_donut_packed_dl_1018, 6);
|
||||
func_802AF5AC(d_course_big_donut_packed_dl_450, 6);
|
||||
func_802AF5AC(d_course_big_donut_packed_dl_AC0, 6);
|
||||
func_802AF5AC(d_course_big_donut_packed_dl_B58, 6);
|
||||
func_802AF5AC(d_course_big_donut_packed_dl_230, 6);
|
||||
func_80295C6C();
|
||||
D_8015F8E4 = 100.0f;
|
||||
break;
|
||||
|
@ -1971,8 +1973,8 @@ void func_802966A0(void) {
|
|||
if (D_8015F8E4 > 0.0f) { D_8015F8E8 *= -1.0f; }
|
||||
}
|
||||
D_8015F8E4 += D_8015F8E8;
|
||||
D_802B87BC += 9;
|
||||
|
||||
D_802B87BC += 9;
|
||||
if (D_802B87BC > 255) {
|
||||
D_802B87BC = 0;
|
||||
}
|
||||
|
@ -1980,15 +1982,17 @@ void func_802966A0(void) {
|
|||
if (D_802B87C4 > 255) {
|
||||
D_802B87C4 = 0;
|
||||
}
|
||||
func_802AF7B4(0x07009D58, 0, D_802B87BC);
|
||||
func_802AF7B4(0x07009CD0, 0, D_802B87C4);
|
||||
// waterfall animation
|
||||
func_802AF7B4(d_course_koopa_troopa_beach_packed_dl_9D58, 0, D_802B87BC);
|
||||
func_802AF7B4(d_course_koopa_troopa_beach_packed_dl_9CD0, 0, D_802B87C4);
|
||||
D_802B87CC = random_int(300) / 40;
|
||||
if (D_802B87C8 < 0) {
|
||||
D_802B87C8 = random_int(300) / 40;
|
||||
} else {
|
||||
D_802B87C8 = -(random_int(300) / 40);
|
||||
}
|
||||
func_802AF7B4(0x070002E8, D_802B87C8, D_802B87CC);
|
||||
// Waterfall bubbling effect? (unused)
|
||||
func_802AF7B4(d_course_koopa_troopa_beach_packed_dl_2E8, D_802B87C8, D_802B87CC);
|
||||
break;
|
||||
case COURSE_BANSHEE_BOARDWALK:
|
||||
D_802B87BC++;
|
||||
|
@ -2003,24 +2007,24 @@ void func_802966A0(void) {
|
|||
if (D_802B87BC < 0) {
|
||||
D_802B87BC = 0xFF;
|
||||
}
|
||||
func_802AF7B4(0x0700A6A8, 0, D_802B87BC);
|
||||
func_802AF7B4(0x0700A648, 0, D_802B87BC);
|
||||
func_802AF7B4(d_course_royal_raceway_packed_dl_A6A8, 0, D_802B87BC);
|
||||
func_802AF7B4(d_course_royal_raceway_packed_dl_A648, 0, D_802B87BC);
|
||||
break;
|
||||
case COURSE_DK_JUNGLE:
|
||||
D_802B87BC += 2;
|
||||
if (D_802B87BC > 255) {
|
||||
D_802B87BC = 0;
|
||||
}
|
||||
func_802AF7B4(0x07003DD0, 0, D_802B87BC);
|
||||
func_802AF7B4(0x07003E40, 0, D_802B87BC);
|
||||
func_802AF7B4(0x07003EB0, 0, D_802B87BC);
|
||||
func_802AF7B4(0x07003F30, 0, D_802B87BC);
|
||||
func_802AF7B4(0x070036A8, 0, D_802B87BC);
|
||||
func_802AF7B4(d_course_dks_jungle_parkway_packed_dl_3DD0, 0, D_802B87BC);
|
||||
func_802AF7B4(d_course_dks_jungle_parkway_packed_dl_3E40, 0, D_802B87BC);
|
||||
func_802AF7B4(d_course_dks_jungle_parkway_packed_dl_3EB0, 0, D_802B87BC);
|
||||
func_802AF7B4(d_course_dks_jungle_parkway_packed_dl_3F30, 0, D_802B87BC);
|
||||
func_802AF7B4(d_course_dks_jungle_parkway_packed_dl_36A8, 0, D_802B87BC);
|
||||
D_802B87C4 -= 20;
|
||||
if (D_802B87C4 < 0) {
|
||||
D_802B87C4 = 0xFF;
|
||||
}
|
||||
func_802AF7B4(0x07009880, 0, D_802B87C4);
|
||||
func_802AF7B4(d_course_dks_jungle_parkway_packed_dl_9880, 0, D_802B87C4);
|
||||
func_80298C94();
|
||||
break;
|
||||
}
|
||||
|
@ -2029,11 +2033,11 @@ void func_802966A0(void) {
|
|||
void func_802969F8(void) {
|
||||
|
||||
switch(gCurrentCourseId) {
|
||||
case 9:
|
||||
case COURSE_MOO_MOO_FARM:
|
||||
D_8015F702 = 0;
|
||||
D_8015F700 = 200;
|
||||
break;
|
||||
case 6:
|
||||
case COURSE_KOOPA_BEACH:
|
||||
D_8015F8E8 = -0.1f;
|
||||
D_8015F8E4 = 0.0f;
|
||||
break;
|
||||
|
|
|
@ -235,18 +235,10 @@ void pack(FILE *input_file, FILE *output_file) {
|
|||
case 0xB6:
|
||||
data[count++] = 0x57;
|
||||
break;
|
||||
case 0xFF:
|
||||
data[count++] = 0xFF;
|
||||
if (cmd) {
|
||||
p1 = ARG1(cmd);
|
||||
if (p1 <= 32) {
|
||||
for (i = 0; i < p1; i++) {
|
||||
data[count++] = 0x00;
|
||||
}
|
||||
}
|
||||
}
|
||||
goto eos; // end of switch
|
||||
break;
|
||||
//case 0xFF:
|
||||
// data[count++] = 0xFF;
|
||||
// goto eos; // end of switch
|
||||
// break;
|
||||
default:
|
||||
printf("Error: Unknown Opcode: 0x%X\n", opCode);
|
||||
printf("Opcode written to file as 0xEE\n");
|
||||
|
@ -256,8 +248,8 @@ void pack(FILE *input_file, FILE *output_file) {
|
|||
|
||||
offset += 4;
|
||||
}
|
||||
eos: ;
|
||||
|
||||
//eos: ;
|
||||
data[count++] = 0xFF;
|
||||
size_t num_elements_written = fwrite(data, sizeof(uint8_t), count, output_file);
|
||||
if (num_elements_written != count) {
|
||||
printf("Failed to write data to file.\n");
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
import subprocess
|
||||
|
||||
# This script generates headers for course segmented packed displaylist data
|
||||
|
||||
dir_path = "build/us/courses/"
|
||||
output_file = "include/packed_displaylist_symbols_gen.h"
|
||||
|
||||
sym_list = []
|
||||
|
||||
# Run objdump for each packed.inc.elf file in courses/
|
||||
for filename in subprocess.check_output(f"find {dir_path} -name packed.inc.elf", shell=True).decode().splitlines():
|
||||
file_output = subprocess.check_output(f"objdump -t {filename} | grep ' .data\| .bss' | awk '$6 != \"\" {{print $1, $5, $6}}'", shell=True)
|
||||
file_output = file_output.decode()
|
||||
|
||||
# Create temporary list of (addr, name) tuples from file_output
|
||||
sym_list_tmp = []
|
||||
for line in file_output.splitlines():
|
||||
addr, size, name = line.split()
|
||||
# Skip lines with the .data directive
|
||||
if (name == ".data"):
|
||||
continue
|
||||
|
||||
sym_list_tmp.append((addr, size, name))
|
||||
|
||||
# Sort the tmp list
|
||||
sym_list_tmp = sorted(sym_list_tmp, key=lambda x: x[0])
|
||||
|
||||
# Generate the final displaylist symbol for courses
|
||||
# Take the last addr and add its size
|
||||
end_addr = '0{:X}'.format(int(sym_list_tmp[-1][0], 16) + int(sym_list_tmp[-1][1], 16))
|
||||
|
||||
end_name = sym_list_tmp[-1][2].split("dl_")[0] + "end"
|
||||
|
||||
sym_list_tmp.append((end_addr, '0', end_name))
|
||||
|
||||
# Magic number to insert a newline after every file.
|
||||
sym_list_tmp.append((0xFFFFFFFF, '0',"newline"))
|
||||
# Copy to the main list
|
||||
sym_list.extend(sym_list_tmp)
|
||||
|
||||
# Write includes and defines to the header file
|
||||
with open(output_file, "w") as f:
|
||||
|
||||
# Write comments
|
||||
f.write("// Generated by tools/generate_segment_headers.py\n\n")
|
||||
|
||||
# Write includes
|
||||
f.write("#include <macros.h>\n\n")
|
||||
|
||||
# Write #define statements to header file
|
||||
for addr, size, name in sym_list:
|
||||
# Add two newlines for readability
|
||||
if (name == "newline"):
|
||||
f.write("\n\n")
|
||||
continue
|
||||
f.write(f"#define {name} ((uintptr_t) 0x{addr.upper()})\n")
|
|
@ -0,0 +1,34 @@
|
|||
import sys
|
||||
import subprocess
|
||||
|
||||
# This script generates vertice count for course geography used in the courseTable.
|
||||
|
||||
dir_path = "build/us/courses/"
|
||||
output_file = "include/vertice_count_gen.h"
|
||||
|
||||
sym_list = []
|
||||
output = ""
|
||||
|
||||
# Run objdump for each model.inc.elf file in courses/
|
||||
for filename in subprocess.check_output(f"find {dir_path} -name model.inc.elf", shell=True).decode().splitlines():
|
||||
file_output = subprocess.check_output(f"objdump -t {filename} | grep ' .data\| .bss' | awk '$6 != \"\" {{print $5, $6}}'", shell=True)
|
||||
output += file_output.decode()
|
||||
|
||||
# Write includes and defines to the header file
|
||||
with open(output_file, "w") as f:
|
||||
|
||||
# Write comments
|
||||
f.write("// Generated by tools/generate_vertice_count.py\n\n")
|
||||
|
||||
# Write includes
|
||||
f.write("#include <macros.h>\n\n")
|
||||
|
||||
# Write defines
|
||||
for line in output.splitlines():
|
||||
addr, name = line.split()
|
||||
if (name == ".data"):
|
||||
continue
|
||||
|
||||
# (size / 14) -> fill with zeros to make complete u32 -> toUppercase()
|
||||
# One vertice = 14 bytes. objdump outputs the size. Divide size by 14.
|
||||
f.write(f"#define {name}_count 0x{hex(int(addr, 16) // 14)[2:].zfill(8).upper()}\n\n")
|
Loading…
Reference in New Issue