Merge https://github.com/Reonu/HackerSM64 into skybox
This commit is contained in:
commit
93f163fb56
303 files changed
+14225
-6428
No files matched your search
@@ -84,3 +84,5 @@ lib/libs2d_engine.a
|
||||
|
||||
!/lib/PR/hvqm/*.o
|
||||
|
||||
# .orig files
|
||||
*.orig
|
||||
@@ -1,3 +1,49 @@
|
||||
Refresh 14
|
||||
|
||||
1.) Label whomp and some object fields (#1174)
|
||||
2.) Generate MIO0 object files using binutils `ld` instead of `as` (#1173)
|
||||
3.) Bowser documentation (#1166)
|
||||
4.) Fix comment syntax in 00_sound_player.0 (#1172)
|
||||
5.) Rename in-game menu variables (#1163)
|
||||
6.) Document double red coin sound and JP sound glitch (#1170)
|
||||
7.) Document different bug in external.c (#1168)
|
||||
8.) updated names/types of octagonal platform data (#1164)
|
||||
9.) Label a number of unnamed variables. (#1169)
|
||||
10.) Document JP PU sound glitch (#1167)
|
||||
11.) Set model ids to spawn_triangle_break_particles (#1165)
|
||||
12.) Fix borders in clear_frame_buffer (#1162)
|
||||
13.) Fix seq header files for 64-bit (#1161)
|
||||
14.) Game_init.c remaining doc (#1158)
|
||||
15.) Label a couple static variables in sound_init.c (#1159)
|
||||
16.) Properly define dialog values (status, flags, cutscenes) (#1153)
|
||||
17.) Label all of amp's assets. (#1018)
|
||||
18.) Split audio/synthesis.c into Shindou/non-Shindou files (#1144)
|
||||
19.) Avoid CC_CHECK warnings when using gcc (#1157)
|
||||
20.) level_select_menu.c => title_screen.c (#1152)
|
||||
21.) Use C preprocessor on assembly files (#1126)
|
||||
22.) Replace output_level_headers.py with sed equivalent (#1109)
|
||||
23.) Fix CC_CHECK warnings related to unused symbols and UB (#1155)
|
||||
24.) Define remaining floor lower limit values (#1147)
|
||||
25.) use r+b mode for libultra.a patch tool (#1148)
|
||||
26.) Use proper values for gPrevFrameObjectCount ifs (#1146)
|
||||
27.) Some minor bowser.inc.c labelling. (#1150)
|
||||
28.) fix king bob-omb texture pointers (#1145)
|
||||
29.) Split audio/load.c into Shindou/non-Shindou files (#1143)
|
||||
30.) Small Shindou audio cleanups (#1142)
|
||||
31.) Fix endians in ALSeqData (#1141)
|
||||
32.) Document S8 decoder rsp operation and some more (#1139)
|
||||
33.) Fix Shindou synthesis_process_note fake match (#1140)
|
||||
34.) More audio documentation, for the new rsp code and other fixes (#1138)
|
||||
35.) Build fixes for macOS: cpp, clang, recomp, aiff_extract_codebook (#1135)
|
||||
36.) Add ENABLE_RUMBLE to config.h (#1122)
|
||||
37.) Reduce recomp memory consumption by using smaller disassembly blocks (#1128)
|
||||
38.) Makefile fixes (#1123)
|
||||
39.) Update README.md
|
||||
40.) Update README.md
|
||||
41.) Reflect current decompilation status
|
||||
42.) Allow both archives and ELF objects to be patched (#1127)
|
||||
43.) Remove WIP mention in README for sh version.
|
||||
|
||||
Refresh 13 2
|
||||
|
||||
- No more nonmatchings remain for all builds including Shindou.
|
||||
|
||||
@@ -38,8 +38,9 @@ endif
|
||||
|
||||
# COMPILER - selects the C compiler to use
|
||||
# gcc - uses the GNU C Compiler
|
||||
# clang - uses clang C/C++ frontend for LLVM
|
||||
COMPILER ?= gcc
|
||||
$(eval $(call validate-option,COMPILER,gcc))
|
||||
$(eval $(call validate-option,COMPILER,gcc clang))
|
||||
|
||||
|
||||
# LIBGCCDIR - selects the libgcc configuration for checking for dividing by zero
|
||||
@@ -66,7 +67,7 @@ endif
|
||||
|
||||
DEFINES += NO_ERRNO_H=1 NO_GZIP=1
|
||||
|
||||
COMPRESS ?= yay0
|
||||
COMPRESS ?= rnc1
|
||||
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp))
|
||||
ifeq ($(COMPRESS),gzip)
|
||||
DEFINES += GZIP=1
|
||||
@@ -115,9 +116,10 @@ TARGET := sm64.$(VERSION)
|
||||
# f3d_new - default for EU and Shindou versions
|
||||
# f3dex -
|
||||
# f3dex2 -
|
||||
# l3dex2 - F3DEX2 version that only renders in wireframe
|
||||
# f3dzex - newer, experimental microcode used in Animal Crossing
|
||||
# super3d - extremely experimental version of Fast3D lacking many features for speed
|
||||
$(eval $(call validate-option,GRUCODE,f3d_old f3dex f3dex2 f3dex2pl f3d_new f3dzex super3d))
|
||||
$(eval $(call validate-option,GRUCODE,f3d_old f3dex f3dex2 f3dex2pl f3d_new f3dzex super3d l3dex2))
|
||||
|
||||
ifeq ($(GRUCODE),f3d_old)
|
||||
DEFINES += F3D_OLD=1
|
||||
@@ -127,6 +129,8 @@ else ifeq ($(GRUCODE),f3dex) # Fast3DEX
|
||||
DEFINES += F3DEX_GBI=1 F3DEX_GBI_SHARED=1
|
||||
else ifeq ($(GRUCODE),f3dex2) # Fast3DEX2
|
||||
DEFINES += F3DEX_GBI_2=1 F3DEX_GBI_SHARED=1
|
||||
else ifeq ($(GRUCODE),l3dex2) # Line3DEX2
|
||||
DEFINES += L3DEX2_GBI=1 L3DEX2_ALONE=1 F3DEX_GBI_2=1 F3DEX_GBI_SHARED=1
|
||||
else ifeq ($(GRUCODE),f3dex2pl) # Fast3DEX2_PosLight
|
||||
DEFINES += F3DEX2PL_GBI=1 F3DEX_GBI_2=1 F3DEX_GBI_SHARED=1
|
||||
else ifeq ($(GRUCODE),f3dzex) # Fast3DZEX (2.08J / Animal Forest - Dōbutsu no Mori)
|
||||
@@ -153,7 +157,12 @@ LINK_LIBRARIES = $(foreach i,$(LIBRARIES),-l$(i))
|
||||
ifeq ($(COMPILER),gcc)
|
||||
NON_MATCHING := 1
|
||||
MIPSISET := -mips3
|
||||
OPT_FLAGS := -O2 -g
|
||||
OPT_FLAGS := -O2
|
||||
else ifeq ($(COMPILER),clang)
|
||||
NON_MATCHING := 1
|
||||
# clang doesn't support ABI 'o32' for 'mips3'
|
||||
MIPSISET := -mips2
|
||||
OPT_FLAGS := -O2
|
||||
endif
|
||||
|
||||
|
||||
@@ -286,6 +295,10 @@ ifeq ($(filter clean distclean print-%,$(MAKECMDGOALS)),)
|
||||
ifeq ($(DUMMY),FAIL)
|
||||
$(error Failed to extract assets)
|
||||
endif
|
||||
DUMMY != $(PYTHON) extract_assets.py jp >&2 || echo FAIL
|
||||
ifeq ($(DUMMY),FAIL)
|
||||
$(error Failed to extract assets)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Make tools if out of date
|
||||
@@ -317,7 +330,7 @@ ACTOR_DIR := actors
|
||||
LEVEL_DIRS := $(patsubst levels/%,%,$(dir $(wildcard levels/*/header.h)))
|
||||
|
||||
# Directories containing source files
|
||||
SRC_DIRS += src src/game src/engine src/audio src/menu src/buffers actors levels bin data assets asm lib sound
|
||||
SRC_DIRS += src src/boot src/game src/engine src/audio src/menu src/buffers actors levels bin data assets asm lib sound
|
||||
LIBZ_SRC_DIRS := src/libz
|
||||
GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists
|
||||
BIN_DIRS := bin bin/$(VERSION)
|
||||
@@ -385,6 +398,10 @@ export LD_LIBRARY_PATH=./tools
|
||||
AS := $(CROSS)as
|
||||
ifeq ($(COMPILER),gcc)
|
||||
CC := $(CROSS)gcc
|
||||
$(BUILD_DIR)/actors/%.o: OPT_FLAGS := -O2 -mlong-calls
|
||||
$(BUILD_DIR)/levels/%.o: OPT_FLAGS := -O2 -mlong-calls
|
||||
else ifeq ($(COMPILER),clang)
|
||||
CC := clang
|
||||
endif
|
||||
# Prefer gcc's cpp if installed on the system
|
||||
ifneq (,$(call find-command,cpp-10))
|
||||
@@ -417,10 +434,13 @@ DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES)
|
||||
# C compiler options
|
||||
CFLAGS = -G 0 $(OPT_FLAGS) $(TARGET_CFLAGS) $(MIPSISET) $(DEF_INC_CFLAGS)
|
||||
ifeq ($(COMPILER),gcc)
|
||||
CFLAGS += -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-missing-braces
|
||||
CFLAGS += -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-missing-braces -fno-jump-tables
|
||||
else ifeq ($(COMPILER),clang)
|
||||
CFLAGS += -target mips -mabi=32 -G 0 -mhard-float -fomit-frame-pointer -fno-stack-protector -fno-common -I include -I src/ -I $(BUILD_DIR)/include -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra -Wno-missing-braces -fno-jump-tables
|
||||
else
|
||||
CFLAGS += -non_shared -Wab,-r4300_mul -Xcpluscomm -Xfullwarn -signed -32
|
||||
endif
|
||||
ASMFLAGS = -G 0 $(OPT_FLAGS) $(TARGET_CFLAGS) -mips3 $(DEF_INC_CFLAGS) -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra
|
||||
|
||||
ASFLAGS := -march=vr4300 -mabi=32 $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d))
|
||||
RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d)))
|
||||
@@ -474,8 +494,8 @@ YELLOW := \033[0;33m
|
||||
BLINK := \033[33;5m
|
||||
endif
|
||||
|
||||
# Use Objcopy instead of extract_data_for_mio
|
||||
ifeq ($(COMPILER),gcc)
|
||||
# For non-IDO, use objcopy instead of extract_data_for_mio
|
||||
ifneq ($(COMPILER),ido)
|
||||
EXTRACT_DATA_FOR_MIO := $(OBJCOPY) -O binary --only-section=.data
|
||||
endif
|
||||
|
||||
@@ -492,6 +512,9 @@ all: $(ROM)
|
||||
ifeq ($(COMPARE),1)
|
||||
@$(PRINT) "$(GREEN)Checking if ROM matches.. $(NO_COL)\n"
|
||||
@$(SHA1SUM) --quiet -c $(TARGET).sha1 && $(PRINT) "$(TARGET): $(GREEN)OK$(NO_COL)\n" || ($(PRINT) "$(YELLOW)Building the ROM file has succeeded, but does not match the original ROM.\nThis is expected, and not an error, if you are making modifications.\nTo silence this message, use 'make COMPARE=0.' $(NO_COL)\n" && false)
|
||||
else
|
||||
@$(SHA1SUM) $(ROM)
|
||||
@$(PRINT) "${GREEN}Build succeeded.$(NO_COL)\n"
|
||||
endif
|
||||
|
||||
clean:
|
||||
@@ -515,17 +538,18 @@ $(BUILD_DIR)/asm/boot.o: $(IPL3_RAW_FILES)
|
||||
$(BUILD_DIR)/src/game/crash_screen.o: $(CRASH_TEXTURE_C_FILES)
|
||||
$(BUILD_DIR)/src/game/version.o: $(BUILD_DIR)/src/game/version_data.h
|
||||
$(BUILD_DIR)/lib/rsp.o: $(BUILD_DIR)/rsp/rspboot.bin $(BUILD_DIR)/rsp/fast3d.bin $(BUILD_DIR)/rsp/audio.bin
|
||||
$(SOUND_BIN_DIR)/sound_data.o: $(SOUND_BIN_DIR)/sound_data.ctl.inc.c $(SOUND_BIN_DIR)/sound_data.tbl.inc.c $(SOUND_BIN_DIR)/sequences.bin.inc.c $(SOUND_BIN_DIR)/bank_sets.inc.c
|
||||
$(SOUND_BIN_DIR)/sound_data.o: $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/sound_data.tbl $(SOUND_BIN_DIR)/sequences.bin $(SOUND_BIN_DIR)/bank_sets
|
||||
$(BUILD_DIR)/levels/scripts.o: $(BUILD_DIR)/include/level_headers.h
|
||||
|
||||
ifeq ($(VERSION),sh)
|
||||
$(BUILD_DIR)/src/audio/load.o: $(SOUND_BIN_DIR)/bank_sets.inc.c $(SOUND_BIN_DIR)/sequences_header.inc.c $(SOUND_BIN_DIR)/ctl_header.inc.c $(SOUND_BIN_DIR)/tbl_header.inc.c
|
||||
$(BUILD_DIR)/src/audio/load_sh.o: $(SOUND_BIN_DIR)/bank_sets.inc.c $(SOUND_BIN_DIR)/sequences_header.inc.c $(SOUND_BIN_DIR)/ctl_header.inc.c $(SOUND_BIN_DIR)/tbl_header.inc.c
|
||||
endif
|
||||
|
||||
$(CRASH_TEXTURE_C_FILES): TEXTURE_ENCODING := u32
|
||||
|
||||
ifeq ($(COMPILER),gcc)
|
||||
$(BUILD_DIR)/src/libz/%.o: OPT_FLAGS := -Os
|
||||
$(BUILD_DIR)/src/libz/%.o: CFLAGS += -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-pointer-sign
|
||||
endif
|
||||
|
||||
ifeq ($(VERSION),eu)
|
||||
@@ -565,6 +589,7 @@ $(BUILD_DIR)/include/text_strings.h: $(BUILD_DIR)/include/text_menu_strings.h
|
||||
$(BUILD_DIR)/src/menu/file_select.o: $(BUILD_DIR)/include/text_strings.h
|
||||
$(BUILD_DIR)/src/menu/star_select.o: $(BUILD_DIR)/include/text_strings.h
|
||||
$(BUILD_DIR)/src/game/ingame_menu.o: $(BUILD_DIR)/include/text_strings.h
|
||||
$(BUILD_DIR)/src/game/puppycam2.o: $(BUILD_DIR)/include/text_strings.h
|
||||
|
||||
|
||||
#==============================================================================#
|
||||
@@ -638,7 +663,7 @@ $(BUILD_DIR)/%.table: %.aiff
|
||||
$(V)$(AIFF_EXTRACT_CODEBOOK) $< >$@
|
||||
|
||||
$(BUILD_DIR)/%.aifc: $(BUILD_DIR)/%.table %.aiff
|
||||
$(call print,Encoding VADPCM:,$<,$@)
|
||||
$(call print,Encoding ADPCM:,$(word 2,$^),$@)
|
||||
$(V)$(VADPCM_ENC) -c $^ $@
|
||||
|
||||
$(ENDIAN_BITWIDTH): $(TOOLS_DIR)/determine-endian-bitwidth.c
|
||||
@@ -646,8 +671,8 @@ $(ENDIAN_BITWIDTH): $(TOOLS_DIR)/determine-endian-bitwidth.c
|
||||
$(V)$(CC) -c $(CFLAGS) -o $@.dummy2 $< 2>$@.dummy1; true
|
||||
$(V)grep -o 'msgbegin --endian .* --bitwidth .* msgend' $@.dummy1 > $@.dummy2
|
||||
$(V)head -n1 <$@.dummy2 | cut -d' ' -f2-5 > $@
|
||||
@$(RM) $@.dummy1
|
||||
@$(RM) $@.dummy2
|
||||
$(V)$(RM) $@.dummy1
|
||||
$(V)$(RM) $@.dummy2
|
||||
|
||||
$(SOUND_BIN_DIR)/sound_data.ctl: sound/sound_banks/ $(SOUND_BANK_FILES) $(SOUND_SAMPLE_AIFCS) $(ENDIAN_BITWIDTH)
|
||||
@$(PRINT) "$(GREEN)Generating: $(BLUE)$@ $(NO_COL)\n"
|
||||
@@ -683,7 +708,7 @@ $(SOUND_BIN_DIR)/%.m64: $(SOUND_BIN_DIR)/%.o
|
||||
|
||||
# Convert binary file to a comma-separated list of byte values for inclusion in C code
|
||||
$(BUILD_DIR)/%.inc.c: $(BUILD_DIR)/%
|
||||
$(call print,Piping:,$<,$@)
|
||||
$(call print,Converting to C:,$<,$@)
|
||||
$(V)hexdump -v -e '1/1 "0x%X,"' $< > $@
|
||||
$(V)echo >> $@
|
||||
|
||||
@@ -714,7 +739,7 @@ $(BUILD_DIR)/text/%/define_text.inc.c: text/define_text.inc.c text/%/courses.h t
|
||||
# Level headers
|
||||
$(BUILD_DIR)/include/level_headers.h: levels/level_headers.h.in
|
||||
$(call print,Preprocessing level headers:,$<,$@)
|
||||
$(V)$(CPP) $(CPPFLAGS) -I . levels/level_headers.h.in | $(PYTHON) $(TOOLS_DIR)/output_level_headers.py > $(BUILD_DIR)/include/level_headers.h
|
||||
$(V)$(CPP) $(CPPFLAGS) -I . $< | sed -E 's|(.+)|#include "\1"|' > $@
|
||||
|
||||
# Generate version_data.h
|
||||
$(BUILD_DIR)/src/game/version_data.h: tools/make_version.sh
|
||||
@@ -736,11 +761,7 @@ $(BUILD_DIR)/%.o: $(BUILD_DIR)/%.c
|
||||
# Assemble assembly code
|
||||
$(BUILD_DIR)/%.o: %.s
|
||||
$(call print,Assembling:,$<,$@)
|
||||
$(V)$(CC) -c $(CFLAGS) $(foreach i,$(INCLUDE_DIRS),-Wa,-I$(i)) -x assembler-with-cpp -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
|
||||
|
||||
$(BUILD_DIR)/sound/sequences/00_sound_player.o: sound/sequences/00_sound_player.s
|
||||
$(call print,Assembling:,$<,$@)
|
||||
$(V)$(AS) $(ASFLAGS) -MD $(BUILD_DIR)/sound/sequences/00_sound_player.d -o $@ $<
|
||||
$(V)$(CROSS)gcc -c $(ASMFLAGS) $(foreach i,$(INCLUDE_DIRS),-Wa,-I$(i)) -x assembler-with-cpp -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
|
||||
|
||||
# Assemble RSP assembly code
|
||||
$(BUILD_DIR)/rsp/%.bin $(BUILD_DIR)/rsp/%_data.bin: rsp/%.s
|
||||
@@ -748,7 +769,7 @@ $(BUILD_DIR)/rsp/%.bin $(BUILD_DIR)/rsp/%_data.bin: rsp/%.s
|
||||
$(V)$(RSPASM) -sym $@.sym $(RSPASMFLAGS) -strequ CODE_FILE $(BUILD_DIR)/rsp/$*.bin -strequ DATA_FILE $(BUILD_DIR)/rsp/$*_data.bin $<
|
||||
|
||||
# Run linker script through the C preprocessor
|
||||
$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT)
|
||||
$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) $(BUILD_DIR)/goddard.txt
|
||||
$(call print,Preprocessing linker script:,$<,$@)
|
||||
$(V)$(CPP) $(CPPFLAGS) -DBUILD_DIR=$(BUILD_DIR) -MMD -MP -MT $@ -MF $@.d -o $@ $<
|
||||
|
||||
@@ -762,15 +783,34 @@ $(BUILD_DIR)/libz.a: $(LIBZ_O_FILES)
|
||||
@$(PRINT) "$(GREEN)Linking libz: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(AR) rcs -o $@ $(LIBZ_O_FILES)
|
||||
|
||||
# SS2: Goddard rules to get size
|
||||
$(BUILD_DIR)/sm64_prelim.ld: sm64.ld $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/libgoddard.a $(BUILD_DIR)/libz.a
|
||||
$(call print,Preprocessing preliminary linker script:,$<,$@)
|
||||
$(V)$(CPP) $(CPPFLAGS) -DPRELIMINARY=1 -DBUILD_DIR=$(BUILD_DIR) -MMD -MP -MT $@ -MF $@.d -o $@ $<
|
||||
|
||||
$(BUILD_DIR)/sm64_prelim.elf: $(BUILD_DIR)/sm64_prelim.ld
|
||||
@$(PRINT) "$(GREEN)Linking Preliminary ELF file: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T undefined_syms.txt -T $< -Map $(BUILD_DIR)/sm64_prelim.map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc
|
||||
|
||||
$(BUILD_DIR)/goddard.txt: $(BUILD_DIR)/sm64_prelim.elf
|
||||
$(call print,Getting Goddard size...)
|
||||
$(V)python3 tools/getGoddardSize.py $(BUILD_DIR)/sm64_prelim.map $(VERSION)
|
||||
|
||||
# Link SM64 ELF file
|
||||
$(ELF): $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) undefined_syms.txt $(BUILD_DIR)/libz.a $(BUILD_DIR)/libgoddard.a
|
||||
$(ELF): $(BUILD_DIR)/sm64_prelim.elf $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) undefined_syms.txt $(BUILD_DIR)/libz.a $(BUILD_DIR)/libgoddard.a
|
||||
@$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc
|
||||
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -T goddard.txt -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc
|
||||
|
||||
# Build ROM
|
||||
$(ROM): $(ELF)
|
||||
$(call print,Building ROM:,$<,$@)
|
||||
$(V)$(OBJCOPY) --pad-to=0x800000 --gap-fill=0xFF $< $@ -O binary
|
||||
ifeq ($(CONSOLE),n64)
|
||||
$(V)$(OBJCOPY) --pad-to=0x101000 --gap-fill=0xFF $< $@ -O binary
|
||||
else ifeq ($(CONSOLE),bb)
|
||||
$(V)$(OBJCOPY) --gap-fill=0x00 $< $@ -O binary
|
||||
$(V)dd if=$@ of=tmp bs=16K conv=sync
|
||||
$(V)mv tmp $@
|
||||
endif
|
||||
$(V)$(N64CKSUM) $@
|
||||
|
||||
$(BUILD_DIR)/$(TARGET).objdump: $(ELF)
|
||||
|
||||
+7
-7
@@ -161,8 +161,8 @@ endef
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
ifneq ($(MAKECMDGOALS),distclean)
|
||||
$(BUILD_DIR)/level_rules.mk: levels/level_rules.mk levels/level_defines.h
|
||||
@$(PRINT) "$(GREEN)Preprocessing level make rules: $(BLUE)$@ $(NO_COL)\n"
|
||||
@$(CPP) $(VERSION_CFLAGS) -I . -o $@ $<
|
||||
$(call print,Preprocessing level make rules:,$<,$@)
|
||||
$(V)$(CPP) $(CPPFLAGS) $(VERSION_CFLAGS) -I . -o $@ $<
|
||||
include $(BUILD_DIR)/level_rules.mk
|
||||
endif
|
||||
endif
|
||||
@@ -179,11 +179,11 @@ $(eval $(call level_rules,menu,generic)) # Menu (File Select)
|
||||
|
||||
# Ending cake textures are generated in a special way
|
||||
$(BUILD_DIR)/levels/ending/cake_eu.inc.c: levels/ending/cake_eu.png
|
||||
@$(PRINT) "$(GREEN)Splitting $(YELLOW)$< $(GREEN)to: $(BLUE)$@ $(NO_COL)\n"
|
||||
@$(SKYCONV) --type cake-eu --split $^ $(BUILD_DIR)/levels/ending
|
||||
$(call print,Splitting:,$<,$@)
|
||||
$(V)$(SKYCONV) --type cake-eu --split $^ $(BUILD_DIR)/levels/ending
|
||||
$(BUILD_DIR)/levels/ending/cake.inc.c: levels/ending/cake.png
|
||||
@$(PRINT) "$(GREEN)Splitting $(YELLOW)$< $(GREEN)to: $(BLUE)$@ $(NO_COL)\n"
|
||||
@$(SKYCONV) --type cake --split $^ $(BUILD_DIR)/levels/ending
|
||||
$(call print,Splitting:,$<,$@)
|
||||
$(V)$(SKYCONV) --type cake --split $^ $(BUILD_DIR)/levels/ending
|
||||
|
||||
# --------------------------------------
|
||||
# Texture Bin Rules
|
||||
@@ -250,7 +250,7 @@ $(BUILD_DIR)/bin/eu/translation_fr.elf: SEGMENT_ADDRESS := 0x19000000
|
||||
# --------------------------------------
|
||||
|
||||
$(BUILD_DIR)/bin/%_skybox.c: textures/skyboxes/%.png
|
||||
$(V)$(PRINT) "$(GREEN)Splitting $(YELLOW)$< $(GREEN)to: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(call print,Splitting:,$<,$@)
|
||||
$(V)$(SKYCONV) --type sky --split $^ $(BUILD_DIR)/bin
|
||||
|
||||
$(BUILD_DIR)/bin/%_skybox.elf: SEGMENT_ADDRESS := 0x0A000000
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
# UltraSM64-extbounds
|
||||
#  HackerSM64 
|
||||
**AFTER CLONING THE REPO, CHECK OUT THE `include/config.h` FILE BEFORE ANYTHING ELSE! IT THERE'S A LOT OF STUFF IN THIS REPO THAT CAN BE TOGGLED THERE.**
|
||||
|
||||
HackerSM64 now has a discord server! https://discord.gg/brETAakcXr
|
||||
|
||||
This repo needs BOTH an US ROM and a JP ROM in order to build. Place baserom.us.z64 in the repo as usual and ALSO place baserom.jp.z64
|
||||
|
||||
This repo needs gcc in order to be able to build it. To install it, run `sudo apt install gcc-mips-linux-gnu`
|
||||
|
||||
This is a fork of the ultrasm64 repo by CrashOveride which includes the following commonly used patches (patches marked with `*` are toggleable in `config.h`):
|
||||
|
||||
**Lighting Engine by Wiseguy**
|
||||
- Lighting Engine is available on a separate branch `(lighting-engine)`. Instructions on how to use it are in the readme of that branch.
|
||||
|
||||
**Puppycam**
|
||||
- Puppycam is available on the master branch now, you can toogle it in config.h. *
|
||||
|
||||
**Collision:**
|
||||
- Slope fix and exposed ceilings fix
|
||||
- No false ledgegrabs fix *
|
||||
@@ -17,6 +27,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
|
||||
- Platform Displacement 2 by Arthurtilly *
|
||||
- Water Surface Type patch by thecozies
|
||||
- Rounded corners by FramePerfection, merged by Cheezepin
|
||||
- Automatically calculate the optimal collision distance for an object based on its vertices, by Kaze *
|
||||
|
||||
**Common Hack Changes:**
|
||||
- Better extended boundaries by anonymous_moose
|
||||
@@ -27,27 +38,41 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
|
||||
- Nonstop stars *
|
||||
- Removed course-specific camera processing *
|
||||
- You can increase the number of frames that you have to perform a firsty *
|
||||
- Ability to set Mario's movement speed when hanging from a ceiling *
|
||||
- Tighter hanging controls (mario will face the direction of the analog stick directly while hanging from a ceiling) *
|
||||
- reonucam3: custom camera by me. This is included as a .patch file in the enhancements folder, you need to apply it if you want this camera.
|
||||
This video shows a rundown of the features: https://youtu.be/TQNkznX9Z3k
|
||||
|
||||
**Hacker QOL:**
|
||||
- Global, non-level based, star IDs (off by default) *
|
||||
- FPS counter (use the function `print_fps(x,y)` anywhere that runs code every frame)
|
||||
- Debug mode: prints mario's coordinates, angle and speed, and a FPS counter.
|
||||
- Automatic console/emulator detection. If emulator is detected, LODs are disabled. *
|
||||
- Ability to configure whether there's a 100 coin star at all and how many coins are required to spawn it *
|
||||
- Ability to easily change the warp that EXIT COURSE takes you to via config.h, or disable it entirely
|
||||
- 16 bit model IDs by someone2639. This means you can have up to 65536 models (lol)
|
||||
- Ability to easily change the warp that EXIT COURSE takes you to via config.h, or disable it entirely. *
|
||||
- 16 bit model IDs by someone2639. This means you can have up to 65536 models (lol). You can set the maximum number of model IDs in `config.h`.
|
||||
- Apply_patch.sh improved
|
||||
- Removed the ifdef hell in `file_select.c` and `ingame_menu.c`
|
||||
- Added Blake's custom function for object model stuff: `obj_set_model` and `obj_has_model`
|
||||
- The "far" variable is now u16, allowing you to increase the farclip (the max distance at which geometry is rendered). However, when increasing the farclip, make sure to increase the nearclip by the same ratio, or rendering will break on console and LLE plugins.
|
||||
- Many general use defines for object struct members, meant for use in custom object behaviors. Check `object_fields.h` for more info on this. (By MrComit)
|
||||
- Included `actors/group0.c` in `behavior_data.c`
|
||||
- The internal ROM name is now set with a define in `config.h` to make it simpler
|
||||
- There is a `gIsConsole` variable that is 1 when running on console and 0 when running on emulator. This way you can wrap your code in a console check.
|
||||
- Expanded audio heap allows for a larger concurrent note count and the importing of more m64 sequences and sound banks (By ArcticJaguar725) *
|
||||
- You can set a test level in config.h in order to boot straight into it, so you can quickly test the level you're working on. *
|
||||
- Allows all surfaces in the game to have a `force` parameter. Activating this doesn't REQUIRE you to set `force` for every surface: If you don't set, it will default to 0x0000 rather than crashing. Increases RAM usage of collision. *
|
||||
- The clown font includes the entire English alphabet.
|
||||
- Colored ia4 text support. Format: `"@XXXXXXXX[YOUR TEXT]@--------"` (By ArcticJaguar725)
|
||||
- Example Text: `"@FF0000FFRED @00FF00FFGREEN @0000FFFFBLUE @FFFFFF00INVISIBLE @--------NORMAL"`
|
||||
- NOTE: It is not mandatory to reset the text color with `"@--------"`, but text will need to be recolored each time it scrolls in a dialog box, or the custom color will reset.
|
||||
- Toggle visiblity of collision surfaces and object hitboxes with Visual Surface Debug. `config.h` has VISUAL_DEBUG which can be turned on to enable this feature.
|
||||
|
||||
**Other Bugfixes:**
|
||||
- Castle music fix (Fixes the castle music sometimes triggering after getting a dialog) *
|
||||
- bparam4 fix (the game no longer uses bparam4 to check if an object is mario and therefore you can safely use it)
|
||||
- Instant warp offset fix (makes the instant warp offset work even when warping to a different area) *
|
||||
- haveyourcake, also known as cake screen fix. Made by Wiseguy and ported/PR'd by Cheezepin
|
||||
- Tree particle fix (Whether a tree uses snow particles or not is decided via the model IDs instead of the course number)
|
||||
- Tree particle fix (Whether a tree uses snow particles or not is decided via the model IDs instead of the course number) *
|
||||
- Coordinate overflow fix by falcobuster. Your levels will render correctly on console and LLE emulators even when using 2x or 4x bounds, while not hurting anything on HLE plugins. *This is automatic now, you don't have to set WORLD_SCALE manually.*
|
||||
- A couple vanilla texture fixes
|
||||
- Smoke fix (the smoke texture uses the correct texture format)
|
||||
@@ -57,7 +82,15 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
|
||||
- This means that you'll have to do your framebuffer effects on buffer 0 for emulator, but NOT for console. You can use the `gIsConsole` variable to check for console when doing your framebuffer effects.
|
||||
- Widescreen (16:9) support toggleable by pressing `L` in the pause menu. *
|
||||
- S2DEX engine by someone2639! To use it, compile with `make TEXT_ENGINE=s2dex_text_engine` or just set `TEXT_ENGINE` to `s2dex_text_engine` in the makefile.
|
||||
- ia8 coins (64x64), the vanilla coin texture is upgraded to accomodate.
|
||||
- ia8 coins (64x64), the vanilla coin texture is upgraded to accomodate. *
|
||||
- Skybox size modifier. You can have 2x, 3x and 4x size skyboxes (you can select the skybox size in `config.h`.) Please note that this might affect console performance, especially 4x mode. 2x or 3x mode is recommended if aiming for console. By CowQuack *
|
||||
- You can set the black border size to different values for console and emulator. It's set to 0 by default for both. *
|
||||
- This repo supports much better implementation of reverb over vanilla's fake echo reverb. Great for caves or eerie levels, as well as just a better audio experience in general. See `audio/synthesis.c` for more configuration info. (By ArcticJaguar725) *
|
||||
- Fazana's "puppyprint" text engine. *
|
||||
- Use `print_small_text` to print normal text. The two last params are aligment and how many characters to print (-1 means PRINT_ALL).
|
||||
- Use `render_multi_image` to draw large texture rectangles consisting of multiple images on the screen.
|
||||
- More info in `puppyprint.c`
|
||||
- Wiseguy's Farcall TLB mapping allows to store executable code inside uncompressed segments, that can be loaded and ran as needed, instead of it having to be loaded at all times. See `farcall.h` in the include folder for instructions and details.
|
||||
|
||||
# UltraSM64
|
||||
|
||||
@@ -70,6 +103,10 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
|
||||
- Newer compression options are supported.
|
||||
- UNFLoader (flashcart USB library) is supported, allowing for debugging on EverDrive/64Drive.
|
||||
- It has been patched with someone2639's shiftable segments patch
|
||||
- Wiseguy's instant input patch has been added to allow for less input lag on emulation (Does not affect console)
|
||||
This does mean that any framebuffer effects will have to be done on buffer 0 if targeting emulators
|
||||
- Automatic console and emulator detection: Use the `gIsConsole` variable to wrap your code in an emulator check.
|
||||
- Separate defines for emulator and console black border height.
|
||||
- Getting HVQM FMV support to work with the game is WIP.
|
||||
|
||||
Requirements are the same as regular SM64, however a GCC MIPS cross compiler is also required. If you're on Debian-like Linux, you can use the ``gcc-mips-linux-gnu`` package. The toolchain that comes with my SDK is also supported.
|
||||
@@ -92,21 +129,28 @@ The repository supports targeting the iQue Player in addition to the N64. The iQ
|
||||
To target iQue, run make with the ``CONSOLE=bb`` argument.
|
||||
|
||||
## Compression
|
||||
The repository supports using DEFLATE compression instead of Nintendo's Yay0. This boasts a better compression ratio, but at a slight cost to load times.
|
||||
|
||||
The repo also supports RNC (Rob Northen Compression). RNC has two methods.
|
||||
|
||||
Method 1 is designed to compress as small as possible, while method 2 is designed so that decompression is as fast as possible.
|
||||
|
||||
Method 1 is the current default, and is the best all-rounder in terms of speed and ratio.
|
||||
|
||||
Both methods are fast. Method 1 has better compression than 2, so I suggest using method 1 if using RNC.
|
||||
|
||||
To switch to RNC, run make with either ``COMPRESS=rnc1`` or ``COMPRESS=rnc2``, depending on preferred method.
|
||||
|
||||
The repository also supports using DEFLATE compression. This boasts a better compression ratio, but at a slight cost to load times.
|
||||
On average I'd estimate that the bottleneck on decompression is about 1-2 seconds.
|
||||
|
||||
To switch to gzip, run make with the ``COMPRESS=gzip`` argument.
|
||||
|
||||
The repo also supports gziping with ``libdeflate-gzip``. This compresses at a slightly better ratio than standard ``gzip``, with no real downside from a decompression standpoint.
|
||||
To use ``libdeflate-gzip``, first clone the [repo](https://github.com/ebiggers/libdeflate), then make and make install it.
|
||||
|
||||
To use ``libdeflate-gzip``, first clone the [repo](https://github.com/ebiggers/libdeflate), then `make` and `make install` it.
|
||||
|
||||
Then run make for sm64 with ``GZIPVER=libdef`` in addition to ``COMPRESS=gzip``
|
||||
|
||||
The repo also supports RNC (Rob Northen Compression). RNC has two methods.
|
||||
Method 1 is designed to compress as small as possible, while method 2 is designed so that decompression is as fast as possible.
|
||||
|
||||
Both methods are fast. Method 1 has better compression than 2, so I suggest using method 1 if using RNC.
|
||||
To switch to RNC, run make with either ``COMPRESS=rnc1`` or ``COMPRESS=rnc2``, depending on preferred method.
|
||||
|
||||
The repo also supports building a ROM with no compression.
|
||||
This is not recommended as it increases ROM size significantly, with little point other than load times decreased to almost nothing.
|
||||
To switch to no compression, run make with the ``COMPRESS=uncomp`` argument.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// 0x08003E30
|
||||
static const s16 amp_seg8_animvalue_08003E30[] = {
|
||||
static const s16 dAmpAnimValue[] = {
|
||||
0x0000, 0x0000, 0x0D79, 0x1AF2, 0x286B, 0x35E4, 0x435D, 0x50D6,
|
||||
0x5E50, 0x6BC9, 0x7942, 0x86BE, 0x9437, 0xA1B0, 0xAF2A, 0xBCA3,
|
||||
0xCA1C, 0xD795, 0xE50E, 0xF287, 0x1872, 0x0000, 0x1AF2, 0x35E4,
|
||||
@@ -23,8 +22,7 @@ static const s16 amp_seg8_animvalue_08003E30[] = {
|
||||
0xC001, 0x3FFF,
|
||||
};
|
||||
|
||||
// 0x08003F74
|
||||
static const u16 amp_seg8_animindex_08003F74[] = {
|
||||
static const u16 dAmpAnimIndex[] = {
|
||||
0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000,
|
||||
0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x00A1,
|
||||
0x0001, 0x0000, 0x0013, 0x008D, 0x0001, 0x00A0,
|
||||
@@ -40,15 +38,14 @@ static const u16 amp_seg8_animindex_08003F74[] = {
|
||||
0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x004E,
|
||||
};
|
||||
|
||||
// 0x0800401C
|
||||
static const struct Animation amp_seg8_anim_0800401C = {
|
||||
static const struct Animation dAmpAnimation = {
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0x13,
|
||||
ANIMINDEX_NUMPARTS(amp_seg8_animindex_08003F74),
|
||||
amp_seg8_animvalue_08003E30,
|
||||
amp_seg8_animindex_08003F74,
|
||||
ANIMINDEX_NUMPARTS(dAmpAnimIndex),
|
||||
dAmpAnimValue,
|
||||
dAmpAnimIndex,
|
||||
0,
|
||||
};
|
||||
@@ -1 +1 @@
|
||||
#include "anim_0800401C.inc.c"
|
||||
#include "animation.inc.c"
|
||||
@@ -1,4 +1,3 @@
|
||||
// 0x08004034
|
||||
const struct Animation *const amp_seg8_anims_08004034[] = {
|
||||
&_seg8_anim_0800401C,
|
||||
const struct Animation *const dAmpAnimsList[] = {
|
||||
&dAmpAnimation,
|
||||
};
|
||||
@@ -1,19 +1,18 @@
|
||||
// 0x0F000028
|
||||
const GeoLayout amp_geo[] = {
|
||||
const GeoLayout dAmpGeo[] = {
|
||||
GEO_SHADOW(SHADOW_CIRCLE_4_VERTS, 0xC8, 100),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_SCALE(0x00, 16384),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002C88),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpEyeDl),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002BA0),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpElectricityDl),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
@@ -21,7 +20,7 @@ const GeoLayout amp_geo[] = {
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002BA0),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpElectricityDl),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
@@ -29,7 +28,7 @@ const GeoLayout amp_geo[] = {
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002BA0),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpElectricityDl),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
@@ -37,16 +36,16 @@ const GeoLayout amp_geo[] = {
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002BA0),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpElectricityDl),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002D70),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpMouthDl),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_BILLBOARD(),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_DISPLAY_LIST(LAYER_ALPHA, amp_seg8_dl_08002E58),
|
||||
GEO_DISPLAY_LIST(LAYER_ALPHA, dAmpBodyDl),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
|
||||
+93
-124
@@ -1,27 +1,22 @@
|
||||
// Amp
|
||||
|
||||
// 0x08000F18
|
||||
ALIGNED8 static const Texture amp_seg8_texture_08000F18[] = {
|
||||
ALIGNED8 static const Texture dAmpElectricityTexture[] = {
|
||||
#include "actors/amp/amp_electricity.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x08001318
|
||||
ALIGNED8 static const Texture amp_seg8_texture_08001318[] = {
|
||||
ALIGNED8 static const Texture dAmpEyesTexture[] = {
|
||||
#include "actors/amp/amp_eyes.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x08001B18
|
||||
ALIGNED8 static const Texture amp_seg8_texture_08001B18[] = {
|
||||
ALIGNED8 static const Texture dAmpBodyTexture[] = {
|
||||
#include "actors/amp/amp_body.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x08002318
|
||||
ALIGNED8 static const Texture amp_seg8_texture_08002318[] = {
|
||||
ALIGNED8 static const Texture dAmpMouthTexture[] = {
|
||||
#include "actors/amp/amp_mouth.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x08002B18
|
||||
static const Vtx amp_seg8_vertex_08002B18[] = {
|
||||
static const Vtx dAmpElectricityVertices[] = {
|
||||
{{{ 224, 0, -89}, 0, { 0, 480}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 187, 149, 0}, 0, { 223, 1078}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 224, 0, 90}, 0, { 479, 478}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
@@ -29,18 +24,16 @@ static const Vtx amp_seg8_vertex_08002B18[] = {
|
||||
{{{ 224, 0, -89}, 0, { 0, 478}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08002B68 - 0x08002BA0
|
||||
const Gfx amp_seg8_dl_08002B68[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, amp_seg8_texture_08000F18),
|
||||
const Gfx dAmpElectricitySubDl[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dAmpElectricityTexture),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPVertex(amp_seg8_vertex_08002B18, 5, 0),
|
||||
gsSPVertex(dAmpElectricityVertices, 5, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 2, 3, 4, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x08002BA0 - 0x08002C10
|
||||
const Gfx amp_seg8_dl_08002BA0[] = {
|
||||
const Gfx dAmpElectricityDl[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK),
|
||||
@@ -49,7 +42,7 @@ const Gfx amp_seg8_dl_08002BA0[] = {
|
||||
gsDPTileSync(),
|
||||
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 4, G_TX_NOLOD),
|
||||
gsDPSetTileSize(0, 0, 0, (16 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(amp_seg8_dl_08002B68),
|
||||
gsSPDisplayList(dAmpElectricitySubDl),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
@@ -57,26 +50,23 @@ const Gfx amp_seg8_dl_08002BA0[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x08002C10
|
||||
static const Vtx amp_seg8_vertex_08002C10[] = {
|
||||
static const Vtx dAmpEyeVertices[] = {
|
||||
{{{ 68, 72, 158}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -27, -71, 164}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 68, -71, 158}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -27, 72, 164}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08002C50 - 0x08002C88
|
||||
const Gfx amp_seg8_dl_08002C50[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, amp_seg8_texture_08001318),
|
||||
const Gfx dAmpEyeSubDl[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dAmpEyesTexture),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPVertex(amp_seg8_vertex_08002C10, 4, 0),
|
||||
gsSPVertex(dAmpEyeVertices, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x08002C88 - 0x08002CF8
|
||||
const Gfx amp_seg8_dl_08002C88[] = {
|
||||
const Gfx dAmpEyeDl[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
@@ -85,7 +75,7 @@ const Gfx amp_seg8_dl_08002C88[] = {
|
||||
gsDPTileSync(),
|
||||
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(amp_seg8_dl_08002C50),
|
||||
gsSPDisplayList(dAmpEyeSubDl),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
@@ -93,26 +83,23 @@ const Gfx amp_seg8_dl_08002C88[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x08002CF8
|
||||
static const Vtx amp_seg8_vertex_08002CF8[] = {
|
||||
static const Vtx dAmpMouthVertices[] = {
|
||||
{{{ -29, 72, 164}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -124, -71, 121}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -29, -71, 164}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -124, 72, 121}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08002D38 - 0x08002D70
|
||||
const Gfx amp_seg8_dl_08002D38[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, amp_seg8_texture_08002318),
|
||||
const Gfx dAmpMouthSubDl[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dAmpMouthTexture),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPVertex(amp_seg8_vertex_08002CF8, 4, 0),
|
||||
gsSPVertex(dAmpMouthVertices, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x08002D70 - 0x08002DE0
|
||||
const Gfx amp_seg8_dl_08002D70[] = {
|
||||
const Gfx dAmpMouthDl[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
@@ -121,7 +108,7 @@ const Gfx amp_seg8_dl_08002D70[] = {
|
||||
gsDPTileSync(),
|
||||
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(amp_seg8_dl_08002D38),
|
||||
gsSPDisplayList(dAmpMouthSubDl),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
@@ -129,26 +116,23 @@ const Gfx amp_seg8_dl_08002D70[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x08002DE0
|
||||
static const Vtx amp_seg8_vertex_08002DE0[] = {
|
||||
static const Vtx dAmpBodyVertices[] = {
|
||||
{{{ -39, -39, 0}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 40, 40, 0}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ -39, 40, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 40, -39, 0}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08002E20 - 0x08002E58
|
||||
const Gfx amp_seg8_dl_08002E20[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, amp_seg8_texture_08001B18),
|
||||
const Gfx dAmpBodySubDl[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dAmpBodyTexture),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||
gsSPVertex(amp_seg8_vertex_08002DE0, 4, 0),
|
||||
gsSPVertex(dAmpBodyVertices, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x08002E58 - 0x08002EC8
|
||||
const Gfx amp_seg8_dl_08002E58[] = {
|
||||
const Gfx dAmpBodyDl[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
@@ -157,7 +141,7 @@ const Gfx amp_seg8_dl_08002E58[] = {
|
||||
gsDPTileSync(),
|
||||
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
|
||||
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPDisplayList(amp_seg8_dl_08002E20),
|
||||
gsSPDisplayList(dAmpBodySubDl),
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
@@ -165,15 +149,18 @@ const Gfx amp_seg8_dl_08002E58[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x08002EC8
|
||||
static const Lights1 amp_seg8_lights_08002EC8 = gdSPDefLights1(
|
||||
/**
|
||||
* Everything beyond this point is unused, and seems to be an attempt at a 3D modelled
|
||||
* amp. The model and attempt are overall slightly buggy, with misread lights and a slightly
|
||||
* broken model.
|
||||
*/
|
||||
|
||||
UNUSED static const Lights1 dAmpUnused3DLights = gdSPDefLights1(
|
||||
0x33, 0x3f, 0x00,
|
||||
0xcf, 0xff, 0x00, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// //! Another malformed entry: Vertex interpreted as light
|
||||
// 0x08002EE0
|
||||
static const Vtx amp_seg8_vertex_08002EE0[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx01[] = {
|
||||
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
|
||||
{{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
|
||||
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
|
||||
@@ -182,8 +169,7 @@ static const Vtx amp_seg8_vertex_08002EE0[] = {
|
||||
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08002F40
|
||||
static const Vtx amp_seg8_vertex_08002F40[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx02[] = {
|
||||
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
|
||||
{{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
|
||||
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
|
||||
@@ -192,8 +178,7 @@ static const Vtx amp_seg8_vertex_08002F40[] = {
|
||||
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08002FA0
|
||||
static const Vtx amp_seg8_vertex_08002FA0[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx03[] = {
|
||||
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
|
||||
{{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
|
||||
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
|
||||
@@ -202,8 +187,7 @@ static const Vtx amp_seg8_vertex_08002FA0[] = {
|
||||
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08003000
|
||||
static const Vtx amp_seg8_vertex_08003000[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx04[] = {
|
||||
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}},
|
||||
{{{ 240, 160, 0}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}},
|
||||
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}},
|
||||
@@ -212,8 +196,7 @@ static const Vtx amp_seg8_vertex_08003000[] = {
|
||||
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08003060
|
||||
static const Vtx amp_seg8_vertex_08003060[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx05[] = {
|
||||
{{{ -184, -54, -54}, 0, { 0, 0}, {0x8b, 0xde, 0xde, 0x00}}},
|
||||
{{{ -184, -76, 0}, 0, { 0, 0}, {0x8b, 0xd0, 0x00, 0x00}}},
|
||||
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
|
||||
@@ -232,8 +215,7 @@ static const Vtx amp_seg8_vertex_08003060[] = {
|
||||
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08003160
|
||||
static const Vtx amp_seg8_vertex_08003160[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx06[] = {
|
||||
{{{ -184, 0, -76}, 0, { 0, 0}, {0x8b, 0x00, 0xd0, 0xff}}},
|
||||
{{{ -184, -54, -54}, 0, { 0, 0}, {0x8b, 0xde, 0xde, 0x00}}},
|
||||
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
|
||||
@@ -252,8 +234,7 @@ static const Vtx amp_seg8_vertex_08003160[] = {
|
||||
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08003260
|
||||
static const Vtx amp_seg8_vertex_08003260[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx07[] = {
|
||||
{{{ -184, 54, -54}, 0, { 0, 0}, {0x8b, 0x22, 0xde, 0xff}}},
|
||||
{{{ -184, 0, -76}, 0, { 0, 0}, {0x8b, 0x00, 0xd0, 0x00}}},
|
||||
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
|
||||
@@ -272,8 +253,7 @@ static const Vtx amp_seg8_vertex_08003260[] = {
|
||||
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08003360
|
||||
static const Vtx amp_seg8_vertex_08003360[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx08[] = {
|
||||
{{{ -184, 76, 0}, 0, { 0, 0}, {0x8b, 0x30, 0x00, 0xff}}},
|
||||
{{{ -184, 54, -54}, 0, { 0, 0}, {0x8b, 0x22, 0xde, 0x00}}},
|
||||
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
|
||||
@@ -292,8 +272,7 @@ static const Vtx amp_seg8_vertex_08003360[] = {
|
||||
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08003460
|
||||
static const Vtx amp_seg8_vertex_08003460[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx09[] = {
|
||||
{{{ -184, 54, 54}, 0, { 0, 0}, {0x8b, 0x22, 0x22, 0xff}}},
|
||||
{{{ -184, 76, 0}, 0, { 0, 0}, {0x8b, 0x30, 0x00, 0x00}}},
|
||||
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
|
||||
@@ -312,8 +291,7 @@ static const Vtx amp_seg8_vertex_08003460[] = {
|
||||
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08003560
|
||||
static const Vtx amp_seg8_vertex_08003560[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx10[] = {
|
||||
{{{ -184, 0, 76}, 0, { 0, 0}, {0x8b, 0x00, 0x30, 0xff}}},
|
||||
{{{ -184, 54, 54}, 0, { 0, 0}, {0x8b, 0x22, 0x22, 0x00}}},
|
||||
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
|
||||
@@ -332,8 +310,7 @@ static const Vtx amp_seg8_vertex_08003560[] = {
|
||||
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08003660
|
||||
static const Vtx amp_seg8_vertex_08003660[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx11[] = {
|
||||
{{{ -184, -54, 54}, 0, { 0, 0}, {0x8b, 0xde, 0x22, 0xff}}},
|
||||
{{{ -184, 0, 76}, 0, { 0, 0}, {0x8b, 0x00, 0x30, 0x00}}},
|
||||
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
|
||||
@@ -352,8 +329,7 @@ static const Vtx amp_seg8_vertex_08003660[] = {
|
||||
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08003760
|
||||
static const Vtx amp_seg8_vertex_08003760[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx12[] = {
|
||||
{{{ -184, -76, 0}, 0, { 0, 0}, {0x8b, 0xd0, 0x00, 0xff}}},
|
||||
{{{ -184, -54, 54}, 0, { 0, 0}, {0x8b, 0xde, 0x22, 0x00}}},
|
||||
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
|
||||
@@ -372,70 +348,63 @@ static const Vtx amp_seg8_vertex_08003760[] = {
|
||||
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08003860
|
||||
static const Vtx amp_seg8_vertex_08003860[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx13[] = {
|
||||
{{{ -37, 90, 205}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}},
|
||||
{{{ -129, 90, 163}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}},
|
||||
{{{ -129, -90, 163}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}},
|
||||
{{{ -37, -90, 205}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x080038A0
|
||||
static const Vtx amp_seg8_vertex_080038A0[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx14[] = {
|
||||
{{{ 112, -7, 182}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}},
|
||||
{{{ 66, -139, 162}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}},
|
||||
{{{ 175, -77, 98}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}},
|
||||
};
|
||||
|
||||
// 0x080038D0
|
||||
static const Vtx amp_seg8_vertex_080038D0[] = {
|
||||
UNUSED static const Vtx dAmpUnused3DVtx15[] = {
|
||||
{{{ 63, 90, 198}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}},
|
||||
{{{ -35, 90, 205}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}},
|
||||
{{{ -35, -90, 205}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}},
|
||||
{{{ 63, -90, 198}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0xff}}},
|
||||
};
|
||||
|
||||
// 0x08003910 - 0x08003940
|
||||
const Gfx amp_seg8_dl_08003910[] = {
|
||||
gsSPLight(&_seg8_lights_08002EC8.l, 1),
|
||||
gsSPLight(&_seg8_lights_08002EC8.a, 2),
|
||||
gsSPVertex(amp_seg8_vertex_08002EE0, 6, 0),
|
||||
UNUSED const Gfx dAmpUnused3DElectricDl1[] = {
|
||||
gsSPLight(&dAmpUnused3DLights.l, 1),
|
||||
gsSPLight(&dAmpUnused3DLights.a, 2),
|
||||
gsSPVertex(dAmpUnused3DVtx01, 6, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x08003940 - 0x08003970
|
||||
const Gfx amp_seg8_dl_08003940[] = {
|
||||
gsSPLight(&_seg8_lights_08002EC8.l, 1),
|
||||
gsSPLight(&_seg8_lights_08002EC8.a, 2),
|
||||
gsSPVertex(amp_seg8_vertex_08002F40, 6, 0),
|
||||
UNUSED const Gfx dAmpUnused3DElectricDl2[] = {
|
||||
gsSPLight(&dAmpUnused3DLights.l, 1),
|
||||
gsSPLight(&dAmpUnused3DLights.a, 2),
|
||||
gsSPVertex(dAmpUnused3DVtx02, 6, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x08003970 - 0x080039A0
|
||||
const Gfx amp_seg8_dl_08003970[] = {
|
||||
gsSPLight(&_seg8_lights_08002EC8.l, 1),
|
||||
gsSPLight(&_seg8_lights_08002EC8.a, 2),
|
||||
gsSPVertex(amp_seg8_vertex_08002FA0, 6, 0),
|
||||
UNUSED const Gfx dAmpUnused3DElectricDl3[] = {
|
||||
gsSPLight(&dAmpUnused3DLights.l, 1),
|
||||
gsSPLight(&dAmpUnused3DLights.a, 2),
|
||||
gsSPVertex(dAmpUnused3DVtx03, 6, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x080039A0 - 0x080039D0
|
||||
const Gfx amp_seg8_dl_080039A0[] = {
|
||||
gsSPLight(&_seg8_lights_08002EC8.l, 1),
|
||||
gsSPLight(&_seg8_lights_08002EC8.a, 2),
|
||||
gsSPVertex(amp_seg8_vertex_08003000, 6, 0),
|
||||
UNUSED const Gfx dAmpUnused3DElectricDl4[] = {
|
||||
gsSPLight(&dAmpUnused3DLights.l, 1),
|
||||
gsSPLight(&dAmpUnused3DLights.a, 2),
|
||||
gsSPVertex(dAmpUnused3DVtx04, 6, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x080039D0 - 0x08003DA8
|
||||
const Gfx amp_seg8_dl_080039D0[] = {
|
||||
gsSPLight((const u8*)amp_seg8_vertex_08002EE0 + 0x8, 1),
|
||||
gsSPLight((const u8*)amp_seg8_vertex_08002EE0, 2),
|
||||
gsSPVertex(amp_seg8_vertex_08003060, 16, 0),
|
||||
UNUSED const Gfx dAmpUnused3DModelDl[] = {
|
||||
//! Vertex interpreted as light
|
||||
gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1),
|
||||
gsSPLight((const u8*)dAmpUnused3DVtx01, 2),
|
||||
gsSPVertex(dAmpUnused3DVtx05, 16, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
|
||||
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
|
||||
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
|
||||
@@ -443,7 +412,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
|
||||
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
|
||||
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
|
||||
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
|
||||
gsSPVertex(amp_seg8_vertex_08003160, 16, 0),
|
||||
gsSPVertex(dAmpUnused3DVtx06, 16, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
|
||||
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
|
||||
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
|
||||
@@ -451,7 +420,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
|
||||
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
|
||||
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
|
||||
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
|
||||
gsSPVertex(amp_seg8_vertex_08003260, 16, 0),
|
||||
gsSPVertex(dAmpUnused3DVtx07, 16, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
|
||||
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
|
||||
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
|
||||
@@ -459,7 +428,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
|
||||
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
|
||||
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
|
||||
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
|
||||
gsSPVertex(amp_seg8_vertex_08003360, 16, 0),
|
||||
gsSPVertex(dAmpUnused3DVtx08, 16, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
|
||||
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
|
||||
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
|
||||
@@ -467,7 +436,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
|
||||
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
|
||||
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
|
||||
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
|
||||
gsSPVertex(amp_seg8_vertex_08003460, 16, 0),
|
||||
gsSPVertex(dAmpUnused3DVtx09, 16, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
|
||||
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
|
||||
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
|
||||
@@ -475,7 +444,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
|
||||
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
|
||||
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
|
||||
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
|
||||
gsSPVertex(amp_seg8_vertex_08003560, 16, 0),
|
||||
gsSPVertex(dAmpUnused3DVtx10, 16, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
|
||||
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
|
||||
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
|
||||
@@ -483,7 +452,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
|
||||
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
|
||||
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
|
||||
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
|
||||
gsSPVertex(amp_seg8_vertex_08003660, 16, 0),
|
||||
gsSPVertex(dAmpUnused3DVtx11, 16, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
|
||||
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
|
||||
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
|
||||
@@ -491,7 +460,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
|
||||
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
|
||||
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
|
||||
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
|
||||
gsSPVertex(amp_seg8_vertex_08003760, 16, 0),
|
||||
gsSPVertex(dAmpUnused3DVtx12, 16, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
|
||||
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
|
||||
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
|
||||
@@ -502,29 +471,29 @@ const Gfx amp_seg8_dl_080039D0[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x08003DA8 - 0x08003DD8
|
||||
const Gfx amp_seg8_dl_08003DA8[] = {
|
||||
gsSPLight((const u8*)amp_seg8_vertex_08002EE0 + 0x8, 1),
|
||||
gsSPLight((const u8*)amp_seg8_vertex_08002EE0, 2),
|
||||
gsSPVertex(amp_seg8_vertex_08003860, 4, 0),
|
||||
UNUSED const Gfx dAmpUnused3DElectricDl5[] = {
|
||||
//! Vertex interpreted as light
|
||||
gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1),
|
||||
gsSPLight((const u8*)dAmpUnused3DVtx01, 2),
|
||||
gsSPVertex(dAmpUnused3DVtx13, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x08003DD8 - 0x08003E00
|
||||
const Gfx amp_seg8_dl_08003DD8[] = {
|
||||
gsSPLight((const u8*)amp_seg8_vertex_08002EE0 + 0x8, 1),
|
||||
gsSPLight((const u8*)amp_seg8_vertex_08002EE0, 2),
|
||||
gsSPVertex(amp_seg8_vertex_080038A0, 3, 0),
|
||||
UNUSED const Gfx dAmpUnused3DElectricDl6[] = {
|
||||
//! Vertex interpreted as light
|
||||
gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1),
|
||||
gsSPLight((const u8*)dAmpUnused3DVtx01, 2),
|
||||
gsSPVertex(dAmpUnused3DVtx14, 3, 0),
|
||||
gsSP1Triangle( 0, 1, 2, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x08003E00 - 0x08003E30
|
||||
const Gfx amp_seg8_dl_08003E00[] = {
|
||||
gsSPLight((const u8*)amp_seg8_vertex_08002EE0 + 0x8, 1),
|
||||
gsSPLight((const u8*)amp_seg8_vertex_08002EE0, 2),
|
||||
gsSPVertex(amp_seg8_vertex_080038D0, 4, 0),
|
||||
UNUSED const Gfx dAmpUnused3DElectricDl7[] = {
|
||||
//! Vertex interpreted as light
|
||||
gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1),
|
||||
gsSPLight((const u8*)dAmpUnused3DVtx01, 2),
|
||||
gsSPVertex(dAmpUnused3DVtx15, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
@@ -180,7 +180,7 @@ static const Lights1 bobomb_seg8_lights_08022E00 = gdSPDefLights1(
|
||||
);
|
||||
|
||||
// Unreferenced light group
|
||||
static const Lights1 bobomb_lights_unused = gdSPDefLights1(
|
||||
UNUSED static const Lights1 bobomb_lights_unused = gdSPDefLights1(
|
||||
0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
// 0x060576FC
|
||||
|
||||
const s16 dBowserFlamesOrientationValues[] = {
|
||||
// posX, posY, posZ, rotY, rotX
|
||||
0, 280, 80, 0x00E9, 0x1A96,
|
||||
0, 278, 83, 0x00EC, 0x1C7F,
|
||||
0, 273, 92, 0x00F9, 0x20BF,
|
||||
0, 268, 102, 0x010F, 0x2519,
|
||||
0, 263, 109, 0x011D, 0x2751,
|
||||
0, 263, 110, 0x011C, 0x2714,
|
||||
0, 265, 106, 0x0112, 0x2601,
|
||||
0, 268, 102, 0x0109, 0x24C0,
|
||||
0, 271, 96, 0x00FF, 0x2358,
|
||||
0, 274, 90, 0x00F7, 0x21CB,
|
||||
0, 277, 84, 0x00EE, 0x201C,
|
||||
0, 280, 78, 0x00E7, 0x1E4E,
|
||||
0, 284, 71, 0x00DF, 0x1C64,
|
||||
0, 288, 63, 0x00D9, 0x1A61,
|
||||
0, 291, 56, 0x00D3, 0x184B,
|
||||
0, 295, 48, 0x00CF, 0x1622,
|
||||
0, 298, 40, 0x00CA, 0x13E9,
|
||||
0, 301, 32, 0x00C7, 0x11A5,
|
||||
0, 304, 23, 0x00C4, 0x0F59,
|
||||
0, 308, 15, 0x00C1, 0x0D08,
|
||||
0, 311, 7, 0x00C0, 0x0AB5,
|
||||
0, 313, 0, 0x00C0, 0x0863,
|
||||
0, 315, -8, 0x00BF, 0x0615,
|
||||
0, 317, -15, 0x00CE, 0x03A3,
|
||||
0, 319, -22, 0x00F8, 0x00ED,
|
||||
0, 320, -29, 0x0131, 0xFFFF,
|
||||
0, 322, -36, 0x0172, 0xFFFF,
|
||||
0, 322, -40, 0x01B5, 0xFFFF,
|
||||
0, 323, -45, 0x01ED, 0xFFFF,
|
||||
0, 323, -48, 0x0213, 0xFFFF,
|
||||
0, 323, -51, 0x0219, 0xFFFF,
|
||||
0, 323, -52, 0x01F2, 0xFFFF,
|
||||
0, 323, -51, 0x018F, 0xFFFF,
|
||||
0, 323, -49, 0x00E5, 0xFFFF,
|
||||
0, 322, -45, 0xFFFF, 0xFFFF,
|
||||
0, 320, -35, 0xFFFF, 0xFFFF,
|
||||
0, 317, -23, 0xFFFF, 0xFFFF,
|
||||
0, 312, -7, 0xFFFF, 0xFFFF,
|
||||
0, 306, 11, 0xFFFF, 0xFFFF,
|
||||
0, 299, 31, 0xFFFF, 0xFFFF,
|
||||
0, 288, 51, 0xFFFF, 0xFFFF,
|
||||
0, 278, 70, 0xFFFF, 0xFFFF,
|
||||
0, 267, 89, 0xFFFF, 0xFFFF,
|
||||
0, 256, 106, 0xFFFF, 0x023A,
|
||||
0, 244, 120, 0xFFFF, 0x04AA,
|
||||
0, 236, 132, 0xFFFF, 0x069F,
|
||||
0, 229, 139, 0xFFFF, 0x0803,
|
||||
0, 224, 144, 0xFFFF, 0x08C0,
|
||||
0, 222, 147, 0xFFFF, 0x0928,
|
||||
0, 221, 148, 0xFFFF, 0x099D,
|
||||
0, 221, 149, 0xFFFF, 0x0A16,
|
||||
0, 221, 150, 0xFFFF, 0x0A8D,
|
||||
0, 221, 150, 0xFFFF, 0x0AF6,
|
||||
0, 222, 150, 0xFFFF, 0x0B4A,
|
||||
0, 222, 150, 0xFFFF, 0x0B84,
|
||||
0, 222, 149, 0x020A, 0x0BA0,
|
||||
0, 223, 149, 0x0524, 0x0B9E,
|
||||
0, 225, 148, 0x07EC, 0x0B84,
|
||||
0, 226, 147, 0x0A3F, 0x0B57,
|
||||
0, 227, 145, 0x0BFB, 0x0B1F,
|
||||
0, 228, 144, 0x0D00, 0x0AE5,
|
||||
0, 230, 142, 0x0D6F, 0x0AA0,
|
||||
0, 232, 140, 0x0D8B, 0x0A48,
|
||||
0, 233, 138, 0x0D5D, 0x09DE,
|
||||
0, 236, 136, 0x0CED, 0x096A,
|
||||
0, 238, 134, 0x0C49, 0x08EA,
|
||||
0, 239, 132, 0x0B76, 0x0863,
|
||||
0, 241, 130, 0x0A80, 0x07D9,
|
||||
0, 244, 128, 0x0970, 0x074E,
|
||||
0, 246, 125, 0x084E, 0x06C7,
|
||||
0, 248, 122, 0x0723, 0x0649,
|
||||
0, 251, 120, 0x05F8, 0x05D7,
|
||||
0, 253, 117, 0x04D6, 0x0579,
|
||||
0, 254, 114, 0x03C3, 0x0532,
|
||||
0, 256, 111, 0x02C9, 0x0509,
|
||||
0, 259, 108, 0x01F0, 0x0504,
|
||||
0, 261, 105, 0x0141, 0x0525,
|
||||
0, 262, 103, 0x00C3, 0x0572,
|
||||
0, 264, 100, 0x006E, 0x0619,
|
||||
0, 267, 97, 0x0032, 0x0734,
|
||||
0, 268, 95, 0x000C, 0x08AF,
|
||||
0, 269, 93, 0xFFFF, 0x0A74,
|
||||
0, 272, 90, 0xFFFF, 0x0C70,
|
||||
0, 273, 88, 0xFFFF, 0x0E8E,
|
||||
0, 274, 86, 0x0014, 0x10B6,
|
||||
0, 275, 84, 0x0032, 0x12DA,
|
||||
0, 277, 82, 0x0056, 0x14E1,
|
||||
0, 277, 82, 0x007E, 0x16B9,
|
||||
0, 278, 80, 0x00A4, 0x184B,
|
||||
0, 278, 80, 0x00C6, 0x1983,
|
||||
0, 279, 80, 0x00DF, 0x1A4D,
|
||||
0, 280, 80, 0x00E9, 0x1A96,
|
||||
0, 0, 0, 0x0000, 0x0000,
|
||||
};
|
||||
@@ -1,96 +0,0 @@
|
||||
// 0x060576FC
|
||||
const s16 bowser_seg6_unkmoveshorts_060576FC[] = {
|
||||
0x0000, 0x0118, 0x0050, 0x00E9, 0x1A96,
|
||||
0x0000, 0x0116, 0x0053, 0x00EC, 0x1C7F,
|
||||
0x0000, 0x0111, 0x005C, 0x00F9, 0x20BF,
|
||||
0x0000, 0x010C, 0x0066, 0x010F, 0x2519,
|
||||
0x0000, 0x0107, 0x006D, 0x011D, 0x2751,
|
||||
0x0000, 0x0107, 0x006E, 0x011C, 0x2714,
|
||||
0x0000, 0x0109, 0x006A, 0x0112, 0x2601,
|
||||
0x0000, 0x010C, 0x0066, 0x0109, 0x24C0,
|
||||
0x0000, 0x010F, 0x0060, 0x00FF, 0x2358,
|
||||
0x0000, 0x0112, 0x005A, 0x00F7, 0x21CB,
|
||||
0x0000, 0x0115, 0x0054, 0x00EE, 0x201C,
|
||||
0x0000, 0x0118, 0x004E, 0x00E7, 0x1E4E,
|
||||
0x0000, 0x011C, 0x0047, 0x00DF, 0x1C64,
|
||||
0x0000, 0x0120, 0x003F, 0x00D9, 0x1A61,
|
||||
0x0000, 0x0123, 0x0038, 0x00D3, 0x184B,
|
||||
0x0000, 0x0127, 0x0030, 0x00CF, 0x1622,
|
||||
0x0000, 0x012A, 0x0028, 0x00CA, 0x13E9,
|
||||
0x0000, 0x012D, 0x0020, 0x00C7, 0x11A5,
|
||||
0x0000, 0x0130, 0x0017, 0x00C4, 0x0F59,
|
||||
0x0000, 0x0134, 0x000F, 0x00C1, 0x0D08,
|
||||
0x0000, 0x0137, 0x0007, 0x00C0, 0x0AB5,
|
||||
0x0000, 0x0139, 0x0000, 0x00C0, 0x0863,
|
||||
0x0000, 0x013B, 0xFFF8, 0x00BF, 0x0615,
|
||||
0x0000, 0x013D, 0xFFF1, 0x00CE, 0x03A3,
|
||||
0x0000, 0x013F, 0xFFEA, 0x00F8, 0x00ED,
|
||||
0x0000, 0x0140, 0xFFE3, 0x0131, 0xFFFF,
|
||||
0x0000, 0x0142, 0xFFDC, 0x0172, 0xFFFF,
|
||||
0x0000, 0x0142, 0xFFD8, 0x01B5, 0xFFFF,
|
||||
0x0000, 0x0143, 0xFFD3, 0x01ED, 0xFFFF,
|
||||
0x0000, 0x0143, 0xFFD0, 0x0213, 0xFFFF,
|
||||
0x0000, 0x0143, 0xFFCD, 0x0219, 0xFFFF,
|
||||
0x0000, 0x0143, 0xFFCC, 0x01F2, 0xFFFF,
|
||||
0x0000, 0x0143, 0xFFCD, 0x018F, 0xFFFF,
|
||||
0x0000, 0x0143, 0xFFCF, 0x00E5, 0xFFFF,
|
||||
0x0000, 0x0142, 0xFFD3, 0xFFFF, 0xFFFF,
|
||||
0x0000, 0x0140, 0xFFDD, 0xFFFF, 0xFFFF,
|
||||
0x0000, 0x013D, 0xFFE9, 0xFFFF, 0xFFFF,
|
||||
0x0000, 0x0138, 0xFFF9, 0xFFFF, 0xFFFF,
|
||||
0x0000, 0x0132, 0x000B, 0xFFFF, 0xFFFF,
|
||||
0x0000, 0x012B, 0x001F, 0xFFFF, 0xFFFF,
|
||||
0x0000, 0x0120, 0x0033, 0xFFFF, 0xFFFF,
|
||||
0x0000, 0x0116, 0x0046, 0xFFFF, 0xFFFF,
|
||||
0x0000, 0x010B, 0x0059, 0xFFFF, 0xFFFF,
|
||||
0x0000, 0x0100, 0x006A, 0xFFFF, 0x023A,
|
||||
0x0000, 0x00F4, 0x0078, 0xFFFF, 0x04AA,
|
||||
0x0000, 0x00EC, 0x0084, 0xFFFF, 0x069F,
|
||||
0x0000, 0x00E5, 0x008B, 0xFFFF, 0x0803,
|
||||
0x0000, 0x00E0, 0x0090, 0xFFFF, 0x08C0,
|
||||
0x0000, 0x00DE, 0x0093, 0xFFFF, 0x0928,
|
||||
0x0000, 0x00DD, 0x0094, 0xFFFF, 0x099D,
|
||||
0x0000, 0x00DD, 0x0095, 0xFFFF, 0x0A16,
|
||||
0x0000, 0x00DD, 0x0096, 0xFFFF, 0x0A8D,
|
||||
0x0000, 0x00DD, 0x0096, 0xFFFF, 0x0AF6,
|
||||
0x0000, 0x00DE, 0x0096, 0xFFFF, 0x0B4A,
|
||||
0x0000, 0x00DE, 0x0096, 0xFFFF, 0x0B84,
|
||||
0x0000, 0x00DE, 0x0095, 0x020A, 0x0BA0,
|
||||
0x0000, 0x00DF, 0x0095, 0x0524, 0x0B9E,
|
||||
0x0000, 0x00E1, 0x0094, 0x07EC, 0x0B84,
|
||||
0x0000, 0x00E2, 0x0093, 0x0A3F, 0x0B57,
|
||||
0x0000, 0x00E3, 0x0091, 0x0BFB, 0x0B1F,
|
||||
0x0000, 0x00E4, 0x0090, 0x0D00, 0x0AE5,
|
||||
0x0000, 0x00E6, 0x008E, 0x0D6F, 0x0AA0,
|
||||
0x0000, 0x00E8, 0x008C, 0x0D8B, 0x0A48,
|
||||
0x0000, 0x00E9, 0x008A, 0x0D5D, 0x09DE,
|
||||
0x0000, 0x00EC, 0x0088, 0x0CED, 0x096A,
|
||||
0x0000, 0x00EE, 0x0086, 0x0C49, 0x08EA,
|
||||
0x0000, 0x00EF, 0x0084, 0x0B76, 0x0863,
|
||||
0x0000, 0x00F1, 0x0082, 0x0A80, 0x07D9,
|
||||
0x0000, 0x00F4, 0x0080, 0x0970, 0x074E,
|
||||
0x0000, 0x00F6, 0x007D, 0x084E, 0x06C7,
|
||||
0x0000, 0x00F8, 0x007A, 0x0723, 0x0649,
|
||||
0x0000, 0x00FB, 0x0078, 0x05F8, 0x05D7,
|
||||
0x0000, 0x00FD, 0x0075, 0x04D6, 0x0579,
|
||||
0x0000, 0x00FE, 0x0072, 0x03C3, 0x0532,
|
||||
0x0000, 0x0100, 0x006F, 0x02C9, 0x0509,
|
||||
0x0000, 0x0103, 0x006C, 0x01F0, 0x0504,
|
||||
0x0000, 0x0105, 0x0069, 0x0141, 0x0525,
|
||||
0x0000, 0x0106, 0x0067, 0x00C3, 0x0572,
|
||||
0x0000, 0x0108, 0x0064, 0x006E, 0x0619,
|
||||
0x0000, 0x010B, 0x0061, 0x0032, 0x0734,
|
||||
0x0000, 0x010C, 0x005F, 0x000C, 0x08AF,
|
||||
0x0000, 0x010D, 0x005D, 0xFFFF, 0x0A74,
|
||||
0x0000, 0x0110, 0x005A, 0xFFFF, 0x0C70,
|
||||
0x0000, 0x0111, 0x0058, 0xFFFF, 0x0E8E,
|
||||
0x0000, 0x0112, 0x0056, 0x0014, 0x10B6,
|
||||
0x0000, 0x0113, 0x0054, 0x0032, 0x12DA,
|
||||
0x0000, 0x0115, 0x0052, 0x0056, 0x14E1,
|
||||
0x0000, 0x0115, 0x0052, 0x007E, 0x16B9,
|
||||
0x0000, 0x0116, 0x0050, 0x00A4, 0x184B,
|
||||
0x0000, 0x0116, 0x0050, 0x00C6, 0x1983,
|
||||
0x0000, 0x0117, 0x0050, 0x00DF, 0x1A4D,
|
||||
0x0000, 0x0118, 0x0050, 0x00E9, 0x1A96,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
};
|
||||
+18
-22
@@ -110,10 +110,10 @@ const GeoLayout bowser_geo_0000D8[] = {
|
||||
const GeoLayout bowser_geo_000424[] = {
|
||||
GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0x9B, 400),
|
||||
GEO_OPEN_NODE(),
|
||||
#ifdef VERSION_JP
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040210),
|
||||
#else
|
||||
#if BUGFIX_BOWSER_FADING_OUT
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040358),
|
||||
#else
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040210),
|
||||
#endif
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, -89, -2, -18, NULL),
|
||||
@@ -200,10 +200,10 @@ const GeoLayout bowser_geo_000424[] = {
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603A4E8),
|
||||
GEO_CLOSE_NODE(),
|
||||
#ifdef VERSION_JP
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B8D0),
|
||||
#else
|
||||
#if BUGFIX_BOWSER_FADING_OUT
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B948),
|
||||
#else
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B8D0),
|
||||
#endif
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
@@ -226,10 +226,10 @@ const GeoLayout bowser_geo_000424[] = {
|
||||
const GeoLayout bowser_geo_000770[] = {
|
||||
GEO_NODE_START(),
|
||||
GEO_OPEN_NODE(),
|
||||
#ifdef VERSION_JP
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040210),
|
||||
#else
|
||||
#if BUGFIX_BOWSER_FADING_OUT
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040358),
|
||||
#else
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040210),
|
||||
#endif
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, -89, -2, -18, NULL),
|
||||
@@ -316,10 +316,10 @@ const GeoLayout bowser_geo_000770[] = {
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603A4E8),
|
||||
GEO_CLOSE_NODE(),
|
||||
#ifdef VERSION_JP
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B8D0),
|
||||
#else
|
||||
#if BUGFIX_BOWSER_FADING_OUT
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B948),
|
||||
#else
|
||||
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B8D0),
|
||||
#endif
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
@@ -341,7 +341,7 @@ const GeoLayout bowser_geo_000770[] = {
|
||||
#ifndef VERSION_JP
|
||||
// 0x0D000AB8
|
||||
const GeoLayout bowser_shadow_geo[] = {
|
||||
GEO_SHADOW(0x00, 0x9B, 400),
|
||||
GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0x9B, 400),
|
||||
GEO_RETURN(),
|
||||
};
|
||||
#endif
|
||||
@@ -351,11 +351,10 @@ const GeoLayout bowser_geo[] = {
|
||||
GEO_NODE_START(),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ASM(0, geo_update_layer_transparency),
|
||||
#ifdef VERSION_JP
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
#endif
|
||||
#ifndef VERSION_JP
|
||||
GEO_SWITCH_CASE(3, geo_switch_anim_state),
|
||||
#else
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
#endif
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_NODE_START(),
|
||||
@@ -384,19 +383,16 @@ const GeoLayout bowser_geo[] = {
|
||||
};
|
||||
|
||||
// 0x0D000B18 / 0B40
|
||||
const GeoLayout bowser2_geo[] = {
|
||||
const GeoLayout bowser_geo_no_shadow[] = {
|
||||
GEO_NODE_START(),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ASM(0, geo_update_layer_transparency),
|
||||
|
||||
#ifdef VERSION_JP
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
#endif
|
||||
#ifndef VERSION_JP
|
||||
GEO_SWITCH_CASE(3, geo_switch_anim_state),
|
||||
#else
|
||||
GEO_SWITCH_CASE(2, geo_switch_anim_state),
|
||||
#endif
|
||||
GEO_OPEN_NODE(),
|
||||
|
||||
GEO_NODE_START(),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ASM(0, geo_bits_bowser_coloring),
|
||||
|
||||
@@ -52,13 +52,13 @@ ALIGNED8 static const Texture bowser_seg6_texture_06025C38[] = {
|
||||
|
||||
// unreferenced, seen in pre-Spaceworld 1995 B-roll footage build
|
||||
// 0x06026438
|
||||
ALIGNED8 static const Texture bowser_seg6_texture_06026438[] = {
|
||||
UNUSED ALIGNED8 static const Texture bowser_seg6_texture_06026438[] = {
|
||||
#include "actors/bowser/bowser_blue_eye_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// unreferenced (stubbed texture? possibly original texture for mouth)
|
||||
// 0x06027438
|
||||
ALIGNED8 static const Texture bowser_seg6_texture_06027438[] = {
|
||||
UNUSED ALIGNED8 static const Texture bowser_seg6_texture_06027438[] = {
|
||||
#include "actors/bowser/bowser_mouth_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
@@ -1184,7 +1184,7 @@ const Gfx bowser_seg6_dl_0603B8D0[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
#ifndef VERSION_JP
|
||||
#if BUGFIX_BOWSER_FADING_OUT
|
||||
// 0x0603B948 - 0x0603B9C8
|
||||
const Gfx bowser_seg6_dl_0603B948[] = {
|
||||
gsDPPipeSync(),
|
||||
@@ -2870,7 +2870,7 @@ const Gfx bowser_seg6_dl_06040210[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
#ifndef VERSION_JP
|
||||
#if BUGFIX_BOWSER_FADING_OUT
|
||||
// 0x06040358 - 0x06040428
|
||||
const Gfx bowser_seg6_dl_06040358[] = {
|
||||
gsDPPipeSync(),
|
||||
|
||||
@@ -14,7 +14,7 @@ ALIGNED8 static const Texture bubba_seg5_texture_05000008[] = {
|
||||
|
||||
// unused eye texture, assumed leftover from when actor file was copied from bub
|
||||
// 0x05000408
|
||||
ALIGNED8 static const Texture bubba_seg5_texture_05000408[] = {
|
||||
UNUSED ALIGNED8 static const Texture bubba_seg5_texture_05000408[] = {
|
||||
#include "actors/bubba/bubba_eyes_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ ALIGNED8 static const Texture chair_seg5_texture_05004060[] = {
|
||||
|
||||
// unreferenced
|
||||
// 0x05004460
|
||||
ALIGNED8 static const Texture chair_seg5_texture_05004460[] = {
|
||||
UNUSED ALIGNED8 static const Texture chair_seg5_texture_05004460[] = {
|
||||
#include "actors/chair/chair_surface_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
|
||||
@@ -5,39 +5,39 @@ const GeoLayout chilly_chief_geo[] = {
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_SCALE(0, 0x7333),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 75, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 75, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 146, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 146, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, chilly_chief_seg6_dl_06002B30),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, chilly_chief_seg6_dl_06002B30),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, -75, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, -75, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 146, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 146, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, chilly_chief_seg6_dl_06002BC8),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, chilly_chief_seg6_dl_06002BC8),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_BILLBOARD(),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_DISPLAY_LIST(LAYER_ALPHA, chilly_chief_seg6_dl_06002D88),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, chilly_chief_seg6_dl_06002C60),
|
||||
GEO_ANIMATED_PART(4, 0, 0, 0, chilly_chief_seg6_dl_06003010),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, chilly_chief_seg6_dl_06002C60),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, chilly_chief_seg6_dl_06003010),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
@@ -51,39 +51,39 @@ const GeoLayout chilly_chief_big_geo[] = {
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_SCALE(0, 0xE666),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 75, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 75, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 146, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 146, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, chilly_chief_seg6_dl_06002B30),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, chilly_chief_seg6_dl_06002B30),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, -75, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, -75, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 146, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 146, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, chilly_chief_seg6_dl_06002BC8),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, chilly_chief_seg6_dl_06002BC8),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_BILLBOARD(),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_DISPLAY_LIST(LAYER_ALPHA, chilly_chief_seg6_dl_06002EF0),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, chilly_chief_seg6_dl_06002C60),
|
||||
GEO_ANIMATED_PART(4, 0, 0, 0, chilly_chief_seg6_dl_06003010),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, chilly_chief_seg6_dl_06002C60),
|
||||
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, chilly_chief_seg6_dl_06003010),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
|
||||
+6
-18
@@ -4,24 +4,12 @@
|
||||
#include "types.h"
|
||||
|
||||
// amp
|
||||
extern const GeoLayout amp_geo[];
|
||||
extern const Gfx amp_seg8_dl_08002B68[];
|
||||
extern const Gfx amp_seg8_dl_08002BA0[];
|
||||
extern const Gfx amp_seg8_dl_08002C50[];
|
||||
extern const Gfx amp_seg8_dl_08002C88[];
|
||||
extern const Gfx amp_seg8_dl_08002D38[];
|
||||
extern const Gfx amp_seg8_dl_08002D70[];
|
||||
extern const Gfx amp_seg8_dl_08002E20[];
|
||||
extern const Gfx amp_seg8_dl_08002E58[];
|
||||
extern const Gfx amp_seg8_dl_08003910[];
|
||||
extern const Gfx amp_seg8_dl_08003940[];
|
||||
extern const Gfx amp_seg8_dl_08003970[];
|
||||
extern const Gfx amp_seg8_dl_080039A0[];
|
||||
extern const Gfx amp_seg8_dl_080039D0[];
|
||||
extern const Gfx amp_seg8_dl_08003DA8[];
|
||||
extern const Gfx amp_seg8_dl_08003DD8[];
|
||||
extern const Gfx amp_seg8_dl_08003E00[];
|
||||
extern const struct Animation *const amp_seg8_anims_08004034[];
|
||||
extern const GeoLayout dAmpGeo[];
|
||||
extern const Gfx dAmpElectricityDl[];
|
||||
extern const Gfx dAmpEyeDl[];
|
||||
extern const Gfx dAmpMouthDl[];
|
||||
extern const Gfx dAmpBodyDl[];
|
||||
extern const struct Animation *const dAmpAnimsList[];
|
||||
|
||||
// blue_coin_switch
|
||||
extern const GeoLayout blue_coin_switch_geo[];
|
||||
|
||||
@@ -13,7 +13,6 @@ UNUSED static const u64 binid_0 = 0;
|
||||
|
||||
#include "wiggler_body/model.inc.c"
|
||||
#include "wiggler_body/anims/data.inc.c"
|
||||
#include "wiggler_body/geo.inc.c"
|
||||
#include "wiggler_body/anims/table.inc.c"
|
||||
|
||||
#include "wiggler_head/model.inc.c"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "group11.h"
|
||||
|
||||
#include "bubba/geo.inc.c"
|
||||
#include "wiggler_body/geo.inc.c"
|
||||
#include "wiggler_head/geo.inc.c"
|
||||
#include "lakitu_enemy/geo.inc.c"
|
||||
#include "spiny_egg/geo.inc.c"
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ UNUSED static const u64 binid_2 = 2;
|
||||
#include "bowser/model.inc.c"
|
||||
#include "bowser/anims/data.inc.c"
|
||||
#include "bowser/anims/table.inc.c"
|
||||
#include "bowser/flames_pos.inc.c"
|
||||
#include "bowser/flames_data.inc.c"
|
||||
UNUSED static const u64 binid_3 = 3;
|
||||
|
||||
#include "bomb/model.inc.c"
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ extern const GeoLayout bowser_geo_000424[];
|
||||
extern const GeoLayout bowser_geo_000770[];
|
||||
extern const GeoLayout bowser_shadow_geo[];
|
||||
extern const GeoLayout bowser_geo[];
|
||||
extern const GeoLayout bowser2_geo[];
|
||||
extern const GeoLayout bowser_geo_no_shadow[];
|
||||
extern const Gfx bowser_seg6_dl_06039110[];
|
||||
extern const Gfx bowser_seg6_dl_060391C8[];
|
||||
extern const Gfx bowser_seg6_dl_06039260[];
|
||||
@@ -90,7 +90,7 @@ extern const Gfx bowser_seg6_dl_06043548[];
|
||||
extern const Gfx bowser_seg6_dl_06043648[];
|
||||
extern const Gfx bowser_seg6_dl_06043698[];
|
||||
extern const struct Animation *const bowser_seg6_anims_06057690[];
|
||||
extern const s16 bowser_seg6_unkmoveshorts_060576FC[];
|
||||
extern const s16 dBowserFlamesOrientationValues[];
|
||||
|
||||
// bowser_flame
|
||||
extern const GeoLayout bowser_flames_geo[];
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
#include "chillychief/model.inc.c"
|
||||
#include "chillychief/anims/data.inc.c"
|
||||
#include "chillychief/geo.inc.c"
|
||||
#include "chillychief/anims/table.inc.c"
|
||||
UNUSED static const u64 binid_0 = 0;
|
||||
|
||||
|
||||
@@ -7,4 +7,5 @@
|
||||
#include "common1.h"
|
||||
#include "group16.h"
|
||||
|
||||
#include "chillychief/geo.inc.c"
|
||||
#include "moneybag/geo.inc.c"
|
||||
@@ -14,7 +14,6 @@ UNUSED static const u64 binid_0 = 0;
|
||||
|
||||
#include "manta/model.inc.c"
|
||||
#include "manta/anims/data.inc.c"
|
||||
#include "manta/geo.inc.c"
|
||||
#include "manta/anims/table.inc.c"
|
||||
UNUSED static const u64 binid_1 = 1;
|
||||
|
||||
|
||||
@@ -8,5 +8,6 @@
|
||||
#include "group4.h"
|
||||
|
||||
#include "clam_shell/geo.inc.c"
|
||||
#include "manta/geo.inc.c"
|
||||
#include "sushi/geo.inc.c"
|
||||
#include "unagi/geo.inc.c"
|
||||
@@ -41,7 +41,7 @@ ALIGNED8 static const Texture haunted_cage_seg5_texture_0500DA88[] = {
|
||||
// also could be some sort of shader mask from much earlier in development, considering
|
||||
// Big Boo's Haunt was a very very early level.
|
||||
// 0x0500E288
|
||||
ALIGNED8 static const Texture haunted_cage_seg5_texture_0500E288[] = {
|
||||
UNUSED ALIGNED8 static const Texture haunted_cage_seg5_texture_0500E288[] = {
|
||||
#include "actors/haunted_cage/bbh_cage_garbage.rgba16.inc.c"
|
||||
};
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
// Heave Ho
|
||||
|
||||
// Unreferenced light group
|
||||
static const Lights1 heave_ho_lights_unused1 = gdSPDefLights1(
|
||||
UNUSED static const Lights1 heave_ho_lights_unused1 = gdSPDefLights1(
|
||||
0x2c, 0x2c, 0x2c,
|
||||
0xb2, 0xb2, 0xb2, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// Unreferenced light group
|
||||
static const Lights1 heave_ho_lights_unused2 = gdSPDefLights1(
|
||||
UNUSED static const Lights1 heave_ho_lights_unused2 = gdSPDefLights1(
|
||||
0x3f, 0x38, 0x00,
|
||||
0xff, 0xe3, 0x00, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// Unreferenced light group
|
||||
static const Lights1 heave_ho_lights_unused3 = gdSPDefLights1(
|
||||
UNUSED static const Lights1 heave_ho_lights_unused3 = gdSPDefLights1(
|
||||
0x3f, 0x00, 0x00,
|
||||
0xff, 0x00, 0x00, 0x28, 0x28, 0x28
|
||||
);
|
||||
@@ -31,13 +31,13 @@ static const Lights1 heave_ho_seg5_lights_0500E980 = gdSPDefLights1(
|
||||
);
|
||||
|
||||
// Unreferenced light group
|
||||
static const Lights1 heave_ho_lights_unused4 = gdSPDefLights1(
|
||||
UNUSED static const Lights1 heave_ho_lights_unused4 = gdSPDefLights1(
|
||||
0x3b, 0x38, 0x21,
|
||||
0xec, 0xe3, 0x84, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// Unreferenced light group
|
||||
static const Lights1 heave_ho_lights_unused5 = gdSPDefLights1(
|
||||
UNUSED static const Lights1 heave_ho_lights_unused5 = gdSPDefLights1(
|
||||
0x32, 0x32, 0x32,
|
||||
0xc8, 0xc8, 0xc8, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
@@ -31,12 +31,12 @@ UNUSED static const Lights1 king_bobomb_lights_unused5 = gdSPDefLights1(
|
||||
);
|
||||
|
||||
// 0x05000078
|
||||
ALIGNED8 static const Texture king_bobomb_seg5_texture_05000078[] = {
|
||||
UNUSED ALIGNED8 static const Texture king_bobomb_seg5_texture_05000078[] = {
|
||||
#include "actors/king_bobomb/bob-omb_buddy_left_side_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x05001078
|
||||
ALIGNED8 static const Texture king_bobomb_seg5_texture_05001078[] = {
|
||||
UNUSED ALIGNED8 static const Texture king_bobomb_seg5_texture_05001078[] = {
|
||||
#include "actors/king_bobomb/bob-omb_buddy_right_side_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ ALIGNED8 static const Texture king_bobomb_seg5_texture_05002078[] = {
|
||||
};
|
||||
|
||||
// 0x05002878
|
||||
ALIGNED8 static const Texture king_bobomb_seg5_texture_05002878[] = {
|
||||
UNUSED ALIGNED8 static const Texture king_bobomb_seg5_texture_05002878[] = {
|
||||
#include "actors/king_bobomb/king_bob-omb_body_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
@@ -55,6 +55,11 @@ ALIGNED8 static const Texture king_bobomb_seg5_texture_05004878[] = {
|
||||
#include "actors/king_bobomb/king_bob-omb_eyes.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x05005078 - Unused
|
||||
UNUSED ALIGNED8 static const Texture king_bobomb_seg5_texture_05005078[] = {
|
||||
#include "actors/king_bobomb/king_bob-omb_eyes_blink.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// 0x05005878
|
||||
ALIGNED8 static const Texture king_bobomb_seg5_texture_05005878[] = {
|
||||
#include "actors/king_bobomb/king_bob-omb_hand.rgba16.inc.c"
|
||||
@@ -66,7 +71,7 @@ ALIGNED8 static const Texture king_bobomb_seg5_texture_05006078[] = {
|
||||
};
|
||||
|
||||
// 0x05006478
|
||||
ALIGNED8 static const Texture king_bobomb_seg5_texture_05006478[] = {
|
||||
UNUSED ALIGNED8 static const Texture king_bobomb_seg5_texture_05006478[] = {
|
||||
#include "actors/king_bobomb/bob-omb_buddy_body_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
// Koopa Flag
|
||||
|
||||
// 0x06000000
|
||||
static const Lights1 koopa_flag_seg6_lights_06000000 = gdSPDefLights1(
|
||||
UNUSED static const Lights1 koopa_flag_seg6_lights_06000000 = gdSPDefLights1(
|
||||
0x00, 0x1b, 0x00,
|
||||
0x00, 0x6e, 0x00, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// 0x06000018
|
||||
static const Lights1 koopa_flag_seg6_lights_06000018 = gdSPDefLights1(
|
||||
UNUSED static const Lights1 koopa_flag_seg6_lights_06000018 = gdSPDefLights1(
|
||||
0x3f, 0x39, 0x15,
|
||||
0xff, 0xe6, 0x57, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
// 0x06000030
|
||||
static const Lights1 koopa_flag_seg6_lights_06000030 = gdSPDefLights1(
|
||||
UNUSED static const Lights1 koopa_flag_seg6_lights_06000030 = gdSPDefLights1(
|
||||
0x2b, 0x15, 0x01,
|
||||
0xac, 0x54, 0x05, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Lakitu (Cameraman)
|
||||
|
||||
// 0x06000000
|
||||
ALIGNED8 static const Texture lakitu_seg6_texture_06000000[] = {
|
||||
UNUSED ALIGNED8 static const Texture lakitu_seg6_texture_06000000[] = {
|
||||
#include "actors/lakitu_cameraman/lakitu_cameraman_cloud_face_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ UNUSED static const Lights1 lakitu_enemy_lights_unused2 = gdSPDefLights1(
|
||||
|
||||
// Unreferenced texture
|
||||
// 0x0500ECE0
|
||||
ALIGNED8 static const Texture lakitu_enemy_seg5_texture_0500ECE0[] = {
|
||||
UNUSED ALIGNED8 static const Texture lakitu_enemy_seg5_texture_0500ECE0[] = {
|
||||
#include "actors/lakitu_enemy/lakitu_enemy_cloud_face_unused.rgba16.inc.c"
|
||||
};
|
||||
|
||||
|
||||
+23
-23
@@ -2,56 +2,56 @@
|
||||
const GeoLayout manta_seg5_geo_05008D14[] = {
|
||||
GEO_SCALE(0, 16384),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, manta_seg5_dl_05006750),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, manta_seg5_dl_05006750),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 440, 220, 6, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 440, 220, 6, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, manta_seg5_dl_05005358),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, manta_seg5_dl_05005358),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 220, 0, 0, manta_seg5_dl_050055A8),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 220, 0, 0, manta_seg5_dl_050055A8),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 180, 0, 0, manta_seg5_dl_05005768),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 180, 0, 0, manta_seg5_dl_05005768),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(1, 440, -220, 6, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 440, -220, 6, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, manta_seg5_dl_05005C38),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, manta_seg5_dl_05005C38),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 220, 0, 0, manta_seg5_dl_05005E88),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 220, 0, 0, manta_seg5_dl_05005E88),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 180, 0, 0, manta_seg5_dl_05006048),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 180, 0, 0, manta_seg5_dl_05006048),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, manta_seg5_dl_05006C08),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, manta_seg5_dl_05006C08),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 168, 0, 0, manta_seg5_dl_05006B70),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 168, 0, 0, manta_seg5_dl_05006B70),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 236, 0, 0, manta_seg5_dl_05006B08),
|
||||
GEO_ANIMATED_PART(1, 236, 0, 0, manta_seg5_dl_05004E90),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 236, 0, 0, manta_seg5_dl_05006B08),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 236, 0, 0, manta_seg5_dl_05004E90),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(1, 688, 120, -6, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 688, 120, -6, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, manta_seg5_dl_05005038),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, manta_seg5_dl_05005038),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(1, 668, 170, 6, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 668, 170, 6, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, manta_seg5_dl_05004DB8),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, manta_seg5_dl_05004DB8),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(1, 688, -120, -6, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 688, -120, -6, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, manta_seg5_dl_05005918),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, manta_seg5_dl_05005918),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(1, 668, -170, 6, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 668, -170, 6, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, manta_seg5_dl_05004A70),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, manta_seg5_dl_05004A70),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
|
||||
@@ -13,7 +13,7 @@ static const Lights1 manta_seg5_lights_05001770 = gdSPDefLights1(
|
||||
);
|
||||
|
||||
// Unreferenced light group
|
||||
static const Lights1 manta_lights_unused = gdSPDefLights1(
|
||||
UNUSED static const Lights1 manta_lights_unused = gdSPDefLights1(
|
||||
0x3f, 0x3f, 0x35,
|
||||
0xff, 0xff, 0xd7, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
@@ -78,13 +78,13 @@ ALIGNED8 static const Texture mario_texture_eyes_closed[] = {
|
||||
|
||||
// Unreferenced
|
||||
// 0x04004890
|
||||
ALIGNED8 static const Texture mario_texture_eyes_closed_unused1[] = {
|
||||
UNUSED ALIGNED8 static const Texture mario_texture_eyes_closed_unused1[] = {
|
||||
#include "actors/mario/mario_eyes_closed_unused_0.rgba16.inc.c"
|
||||
};
|
||||
|
||||
// Unreferenced
|
||||
// 0x04005090
|
||||
ALIGNED8 static const Texture mario_texture_eyes_closed_unused2[] = {
|
||||
UNUSED ALIGNED8 static const Texture mario_texture_eyes_closed_unused2[] = {
|
||||
#include "actors/mario/mario_eyes_closed_unused_1.rgba16.inc.c"
|
||||
};
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ const GeoLayout wiggler_body_geo[] = {
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_SCALE(0, 16384),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_BILLBOARD(),
|
||||
GEO_OPEN_NODE(),
|
||||
@@ -14,23 +14,23 @@ const GeoLayout wiggler_body_geo[] = {
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, -31, 0, 51, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, -31, 0, 51, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, wiggler_seg5_dl_0500BE98),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, wiggler_seg5_dl_0500BE98),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 39, 0, 0, wiggler_seg5_dl_0500BE10),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 39, 0, 0, wiggler_seg5_dl_0500BE10),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 41, 0, 0, wiggler_seg5_dl_0500BCB8),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 41, 0, 0, wiggler_seg5_dl_0500BCB8),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_ANIMATED_PART(1, -31, 0, -49, NULL),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, -31, 0, -49, NULL),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 0, 0, 0, wiggler_seg5_dl_0500C100),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, wiggler_seg5_dl_0500C100),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 39, 0, 0, wiggler_seg5_dl_0500C078),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 39, 0, 0, wiggler_seg5_dl_0500C078),
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_ANIMATED_PART(1, 41, 0, 0, wiggler_seg5_dl_0500BF20),
|
||||
GEO_ANIMATED_PART(LAYER_OPAQUE, 41, 0, 0, wiggler_seg5_dl_0500BF20),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
|
||||
@@ -237,7 +237,7 @@ static const Vtx wiggler_seg5_vertex_0500D228[] = {
|
||||
};
|
||||
|
||||
// Unused vertices? what are these? [D318]
|
||||
static const Vtx wiggler_seg5_vertex_0500D318[] = {
|
||||
UNUSED static const Vtx wiggler_seg5_vertex_0500D318[] = {
|
||||
{{{ 92, 51, 0}, 0, { 0, 0}, {0x5d, 0x55, 0x00, 0x00}}},
|
||||
{{{ 87, 46, -28}, 0, { 0, 0}, {0x5a, 0x53, 0xe1, 0x00}}},
|
||||
{{{ 49, 88, -28}, 0, { 0, 0}, {0x5a, 0x53, 0xe1, 0x00}}},
|
||||
|
||||
+11
-11
@@ -1,21 +1,21 @@
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
// assembler directives
|
||||
.set noat // allow manual use of $at
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
# 0xA0000000-0xBFFFFFFF: KSEG1 direct map non-cache mirror of 0x00000000
|
||||
# 0xA4000000-0xA4000FFF: RSP DMEM
|
||||
// 0xA0000000-0xBFFFFFFF: KSEG1 direct map non-cache mirror of 0x00000000
|
||||
// 0xA4000000-0xA4000FFF: RSP DMEM
|
||||
|
||||
# 0xA4000000-0xA400003F: ROM header
|
||||
// 0xA4000000-0xA400003F: ROM header
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
# 0xA4000040-0xA4000B6F: IPL3
|
||||
// 0xA4000040-0xA4000B6F: IPL3
|
||||
|
||||
# IPL3 entry point jumped to from IPL2
|
||||
glabel ipl3_entry # 0xA4000040
|
||||
// IPL3 entry point jumped to from IPL2
|
||||
glabel ipl3_entry // 0xA4000040
|
||||
mtc0 $zero, $13
|
||||
mtc0 $zero, $9
|
||||
mtc0 $zero, $11
|
||||
@@ -797,7 +797,7 @@ func_A4000AD0:
|
||||
nop
|
||||
nop
|
||||
|
||||
# 0xA4000B70-0xA4000FFF: IPL3 Font
|
||||
// 0xA4000B70-0xA4000FFF: IPL3 Font
|
||||
glabel ipl3_font
|
||||
.incbin "textures/ipl3_raw/ipl3_font_00.ia1"
|
||||
.incbin "textures/ipl3_raw/ipl3_font_01.ia1"
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
// assembler directives
|
||||
.set noat // allow manual use of $at
|
||||
.set noreorder // don't insert nops after branches
|
||||
.set gp=64
|
||||
|
||||
.include "macros.inc"
|
||||
#include "macros.inc"
|
||||
|
||||
|
||||
.section .text, "ax"
|
||||
@@ -25,4 +25,4 @@ entry_point:
|
||||
lui $sp, %hi(gIdleThreadStack) # Set the high half of the stack pointer to that of the idle thread stack
|
||||
addiu $t2, %lo(main_func) # Get the low half of the init function address
|
||||
jr $t2 # Jump to the init function
|
||||
addiu $sp, %lo(gIdleThreadStack) # Set the low half of the stack pointer to that of the idle thread stack
|
||||
addiu $sp, %lo(gIdleThreadStack) # Set the low half of the stack pointer to that of the idle thread stack
|
||||
+18
-15
@@ -2,7 +2,7 @@
|
||||
* Super Mario 64 ROM header
|
||||
* Only the first 0x18 bytes matter to the console.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
.byte 0x80, 0x37, 0x12, 0x40 /* PI BSD Domain 1 register */
|
||||
.word 0x0000000F /* Clockrate setting*/
|
||||
.word entry_point /* Entrypoint */
|
||||
@@ -14,22 +14,25 @@
|
||||
.word 0x00000000 /* Checksum 2 */
|
||||
.word 0x00000000 /* Unknown */
|
||||
.word 0x00000000 /* Unknown */
|
||||
.if VERSION_SH == 1
|
||||
.ascii "SUPERMARIO64 " /* Internal ROM name */
|
||||
.else
|
||||
.ascii "SUPER MARIO 64 " /* Internal ROM name */
|
||||
.endif
|
||||
.ascii INTERNAL_ROM_NAME /* Internal ROM name */
|
||||
.word 0x00000000 /* Unknown */
|
||||
.word 0x0000004E /* Cartridge */
|
||||
.ascii "SM" /* Cartridge ID */
|
||||
.ascii "ED" /* Cartridge ID */
|
||||
|
||||
/* Region */
|
||||
.if VERSION_US == 1
|
||||
.ascii "E" /* NTSC-U (North America) */
|
||||
.elseif (VERSION_JP == 1 || VERSION_SH == 1)
|
||||
#if defined(VERSION_JP) || defined(VERSION_SH)
|
||||
.ascii "J" /* NTSC-J (Japan) */
|
||||
.else
|
||||
.ascii "P" /* PAL (Europe) */
|
||||
.endif
|
||||
|
||||
.byte 0x00 /* Version */
|
||||
#else
|
||||
.ascii "E" /* NTSC-U (North America) */
|
||||
#endif
|
||||
#if defined(SRAM)
|
||||
.byte 0x30 /* Version */
|
||||
#elif defined(EEP16K)
|
||||
.byte 0x20 /* Version */
|
||||
#elif defined(SRAM768K)
|
||||
.byte 0x40 /* Version */
|
||||
#elif defined(FLASHRAM)
|
||||
.byte 0x50 /* Version */
|
||||
#else
|
||||
.byte 0x10 /* Version */
|
||||
#endif
|
||||
+3
-2
@@ -266,8 +266,9 @@
|
||||
"actors/king_bobomb/king_bob-omb_arm.rgba16.png": [32,32,2048,{"jp":[1257760,8312],"us":[1264928,8312],"eu":[1136896,8312],"sh":[1113408,8312]}],
|
||||
"actors/king_bobomb/king_bob-omb_body_unused.rgba16.png": [64,64,8192,{"jp":[1257760,10360],"us":[1264928,10360],"eu":[1136896,10360],"sh":[1113408,10360]}],
|
||||
"actors/king_bobomb/king_bob-omb_crown_rim.rgba16.png": [32,16,1024,{"jp":[1257760,24696],"us":[1264928,24696],"eu":[1136896,24696],"sh":[1113408,24696]}],
|
||||
"actors/king_bobomb/king_bob-omb_eyes.rgba16.png": [32,64,4096,{"jp":[1257760,18552],"us":[1264928,18552],"eu":[1136896,18552],"sh":[1113408,18552]}],
|
||||
"actors/king_bobomb/king_bob-omb_hand.rgba16.png": [32,32,2048,{"jp":[1215456,64],"us":[1222624,64],"eu":[1094592,64],"sh":[1071104,64]}],
|
||||
"actors/king_bobomb/king_bob-omb_eyes.rgba16.png": [32,32,2048,{"jp":[1257760,18552],"us":[1264928,18552],"eu":[1136896,18552],"sh":[1113408,18552]}],
|
||||
"actors/king_bobomb/king_bob-omb_eyes_blink.rgba16.png": [32,32,2048,{"jp":[1257760,20600],"us":[1264928,20600],"eu":[1136896,20600],"sh":[1113408,20600]}],
|
||||
"actors/king_bobomb/king_bob-omb_hand.rgba16.png": [32,32,2048,{"jp":[1257760,22648],"us":[1264928,22648],"eu":[1136896,22648],"sh":[1113408,22648]}],
|
||||
"actors/king_bobomb/king_bob-omb_left_side.rgba16.png": [32,64,4096,{"jp":[1257760,33912],"us":[1264928,33912],"eu":[1136896,33912],"sh":[1113408,33912]}],
|
||||
"actors/king_bobomb/king_bob-omb_right_side.rgba16.png": [32,64,4096,{"jp":[1257760,38008],"us":[1264928,38008],"eu":[1136896,38008],"sh":[1113408,38008]}],
|
||||
"actors/klepto/klepto_beak.rgba16.png": [32,64,4096,{"jp":[1327760,4104],"us":[1334928,4104],"eu":[1206896,4104],"sh":[1183408,4104]}],
|
||||
|
||||
+22
-62
@@ -9,6 +9,11 @@
|
||||
#include "make_const_nonconst.h"
|
||||
|
||||
// SM64 (US/JP/EU/SH) Segment 02
|
||||
#ifdef PUPPYPRINT
|
||||
ALIGNED8 const Texture small_font[] = {
|
||||
#include "textures/segment2/custom_text.i4.inc.c"
|
||||
};
|
||||
#endif
|
||||
|
||||
ALIGNED8 static const Texture texture_hud_char_0[] = {
|
||||
#include "textures/segment2/segment2.00000.rgba16.inc.c"
|
||||
@@ -86,11 +91,9 @@ ALIGNED8 static const Texture texture_hud_char_I[] = {
|
||||
#include "textures/segment2/segment2.02400.rgba16.inc.c"
|
||||
};
|
||||
|
||||
#if defined(VERSION_JP) || defined(VERSION_SH)
|
||||
ALIGNED8 static const Texture texture_hud_char_J[] = {
|
||||
#include "textures/segment2/segment2.02600.rgba16.inc.c"
|
||||
};
|
||||
#endif
|
||||
|
||||
ALIGNED8 static const Texture texture_hud_char_K[] = {
|
||||
#include "textures/segment2/segment2.02800.rgba16.inc.c"
|
||||
@@ -116,11 +119,9 @@ ALIGNED8 static const Texture texture_hud_char_P[] = {
|
||||
#include "textures/segment2/segment2.03200.rgba16.inc.c"
|
||||
};
|
||||
|
||||
#if defined(VERSION_JP) || defined(VERSION_SH)
|
||||
ALIGNED8 static const Texture texture_hud_char_Q[] = {
|
||||
#include "textures/segment2/segment2.03400.rgba16.inc.c"
|
||||
};
|
||||
#endif
|
||||
|
||||
ALIGNED8 static const Texture texture_hud_char_R[] = {
|
||||
#include "textures/segment2/segment2.03600.rgba16.inc.c"
|
||||
@@ -138,31 +139,25 @@ ALIGNED8 static const Texture texture_hud_char_U[] = {
|
||||
#include "textures/segment2/segment2.03C00.rgba16.inc.c"
|
||||
};
|
||||
|
||||
#if defined(VERSION_JP) || defined(VERSION_EU) || defined(VERSION_SH)
|
||||
ALIGNED8 static const Texture texture_hud_char_V[] = {
|
||||
#include "textures/segment2/segment2.03E00.rgba16.inc.c"
|
||||
};
|
||||
#endif
|
||||
|
||||
ALIGNED8 static const Texture texture_hud_char_W[] = {
|
||||
#include "textures/segment2/segment2.04000.rgba16.inc.c"
|
||||
};
|
||||
|
||||
#if defined(VERSION_JP) || defined(VERSION_SH)
|
||||
ALIGNED8 static const Texture texture_hud_char_X[] = {
|
||||
#include "textures/segment2/segment2.04200.rgba16.inc.c"
|
||||
};
|
||||
#endif
|
||||
|
||||
ALIGNED8 static const Texture texture_hud_char_Y[] = {
|
||||
#include "textures/segment2/segment2.04400.rgba16.inc.c"
|
||||
};
|
||||
|
||||
#if defined(VERSION_JP) || defined(VERSION_EU) || defined(VERSION_SH)
|
||||
ALIGNED8 static const Texture texture_hud_char_Z[] = {
|
||||
#include "textures/segment2/segment2.04600.rgba16.inc.c"
|
||||
};
|
||||
#endif
|
||||
|
||||
ALIGNED8 static const Texture texture_hud_char_apostrophe[] = {
|
||||
#include "textures/segment2/segment2.04800.rgba16.inc.c"
|
||||
@@ -178,7 +173,6 @@ ALIGNED8 static const Texture texture_hud_char_umlaut[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_JP) || defined(VERSION_SH)
|
||||
ALIGNED8 static const Texture texture_hud_char_exclamation[] = {
|
||||
#include "textures/segment2/segment2.04C00.rgba16.inc.c"// JP !
|
||||
};
|
||||
@@ -198,7 +192,6 @@ ALIGNED8 static const Texture texture_hud_char_ampersand[] = {
|
||||
ALIGNED8 static const Texture texture_hud_char_percent[] = {
|
||||
#include "textures/segment2/segment2.05400.rgba16.inc.c"// JP %
|
||||
};
|
||||
#endif
|
||||
|
||||
ALIGNED8 static const Texture texture_hud_char_multiply[] = {
|
||||
#include "textures/segment2/segment2.05600.rgba16.inc.c"
|
||||
@@ -216,11 +209,9 @@ ALIGNED8 static const Texture texture_hud_char_star[] = {
|
||||
#include "textures/segment2/segment2.05C00.rgba16.inc.c"
|
||||
};
|
||||
|
||||
#if defined(VERSION_JP) || defined(VERSION_SH)
|
||||
ALIGNED8 static const Texture texture_hud_char_decimal_point[] = {
|
||||
#include "textures/segment2/segment2.05E00.rgba16.inc.c"
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_JP) || defined(VERSION_SH)
|
||||
ALIGNED8 static const Texture texture_hud_char_beta_key[] = {
|
||||
@@ -1827,16 +1818,16 @@ const Texture *const main_hud_lut[] = {
|
||||
texture_hud_char_4, texture_hud_char_5, texture_hud_char_6, texture_hud_char_7,
|
||||
texture_hud_char_8, texture_hud_char_9, texture_hud_char_A, texture_hud_char_B,
|
||||
texture_hud_char_C, texture_hud_char_D, texture_hud_char_E, texture_hud_char_F,
|
||||
texture_hud_char_G, texture_hud_char_H, texture_hud_char_I, 0x0,
|
||||
texture_hud_char_G, texture_hud_char_H, texture_hud_char_I, texture_hud_char_J,
|
||||
texture_hud_char_K, texture_hud_char_L, texture_hud_char_M, texture_hud_char_N,
|
||||
texture_hud_char_O, texture_hud_char_P, 0x0, texture_hud_char_R,
|
||||
texture_hud_char_S, texture_hud_char_T, texture_hud_char_U, 0x0,
|
||||
texture_hud_char_W, 0x0, texture_hud_char_Y, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0,
|
||||
texture_hud_char_O, texture_hud_char_P, texture_hud_char_Q, texture_hud_char_R,
|
||||
texture_hud_char_S, texture_hud_char_T, texture_hud_char_U, texture_hud_char_V,
|
||||
texture_hud_char_W, texture_hud_char_X, texture_hud_char_Y, texture_hud_char_Z,
|
||||
texture_hud_char_exclamation, texture_hud_char_double_exclamation, texture_hud_char_question, texture_hud_char_ampersand,
|
||||
texture_hud_char_percent, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, texture_hud_char_multiply, texture_hud_char_coin,
|
||||
texture_hud_char_mario_head, texture_hud_char_star, 0x0, 0x0,
|
||||
texture_hud_char_mario_head, texture_hud_char_star, texture_hud_char_decimal_point, 0x0,
|
||||
texture_hud_char_apostrophe, texture_hud_char_double_quote,
|
||||
#else
|
||||
texture_hud_char_0, texture_hud_char_1, texture_hud_char_2, texture_hud_char_3,
|
||||
@@ -2097,14 +2088,8 @@ const Gfx dl_hud_img_begin[] = {
|
||||
gsDPSetTexturePersp(G_TP_NONE),
|
||||
gsDPSetAlphaCompare(G_AC_THRESHOLD),
|
||||
gsDPSetBlendColor(255, 255, 255, 255),
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
gsDPSetRenderMode(G_RM_NOOP, G_RM_NOOP2),
|
||||
#endif
|
||||
#ifdef VERSION_EU
|
||||
gsDPSetTextureFilter(G_TF_POINT),
|
||||
#elif defined(VERSION_JP) || defined(VERSION_US)
|
||||
gsDPSetRenderMode(G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2),
|
||||
#endif
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
@@ -2124,13 +2109,8 @@ const Gfx dl_hud_img_end[] = {
|
||||
gsDPSetTexturePersp(G_TP_PERSP),
|
||||
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
|
||||
gsDPSetAlphaCompare(G_AC_NONE),
|
||||
#ifdef VERSION_EU
|
||||
gsDPSetTextureFilter(G_TF_BILERP),
|
||||
#endif
|
||||
gsDPSetCycleType(G_CYC_1CYCLE),
|
||||
#if defined(VERSION_JP) || defined(VERSION_US)
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||
#endif
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
@@ -2186,7 +2166,6 @@ const Gfx dl_draw_text_bg_box[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
#ifndef VERSION_EU
|
||||
// 0x0200EE28 - 0x0200EE68
|
||||
static const Vtx vertex_ia8_char[] = {
|
||||
#if defined(VERSION_JP) || defined(VERSION_SH)
|
||||
@@ -2201,21 +2180,8 @@ static const Vtx vertex_ia8_char[] = {
|
||||
{{{ 0, 16, 0}, 0, { 480, 256}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
#endif
|
||||
};
|
||||
// !EU
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_EU
|
||||
// 0x020073B0
|
||||
const Gfx dl_ia_text_begin[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetTexturePersp(G_TP_NONE),
|
||||
gsDPSetCombineMode(G_CC_FADEA, G_CC_FADEA),
|
||||
gsDPSetEnvColor(255, 255, 255, 255),
|
||||
gsDPSetRenderMode(G_RM_XLU_SURF, G_RM_XLU_SURF2),
|
||||
gsDPSetTextureFilter(G_TF_POINT),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x020073E8 - 0x02007418
|
||||
const Gfx dl_ia_text_tex_settings[] = {
|
||||
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_MIRROR, 3, G_TX_NOLOD, G_TX_WRAP | G_TX_MIRROR, 4, G_TX_NOLOD),
|
||||
@@ -2223,21 +2189,14 @@ const Gfx dl_ia_text_tex_settings[] = {
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, ((16 * 8 + G_IM_SIZ_4b_INCR) >> G_IM_SIZ_4b_SHIFT) - 1, CALC_DXT(16, G_IM_SIZ_4b_BYTES)),
|
||||
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_4b, 1, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_MIRROR, 3, G_TX_NOLOD, G_TX_WRAP | G_TX_MIRROR, 4, G_TX_NOLOD),
|
||||
gsDPSetTileSize(0, 0, 0, (16 - 1) << G_TEXTURE_IMAGE_FRAC, (8 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPVertex(vertex_ia8_char, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
#endif
|
||||
|
||||
// 0x02007418 - 0x02007450
|
||||
const Gfx dl_ia_text_end[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetTexturePersp(G_TP_PERSP),
|
||||
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsDPSetEnvColor(255, 255, 255, 255),
|
||||
gsDPSetTextureFilter(G_TF_BILERP),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
#elif defined(VERSION_US)
|
||||
#if defined(VERSION_US) || defined(VERSION_EU)
|
||||
const Gfx dl_ia_text_begin[] = {
|
||||
gsDPPipeSync(),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
@@ -2248,7 +2207,9 @@ const Gfx dl_ia_text_begin[] = {
|
||||
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_US
|
||||
const Gfx dl_ia_text_tex_settings[] = {
|
||||
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 3, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 4, G_TX_NOLOD),
|
||||
gsDPLoadSync(),
|
||||
@@ -2259,8 +2220,9 @@ const Gfx dl_ia_text_tex_settings[] = {
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
#endif
|
||||
|
||||
#else
|
||||
#if defined(VERSION_JP) || defined(VERSION_SH)
|
||||
// 0x0200EE68 - 0x0200EEA8
|
||||
const Gfx dl_ia_text_begin[] = {
|
||||
gsDPPipeSync(),
|
||||
@@ -2286,7 +2248,6 @@ const Gfx dl_ia_text_tex_settings[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef VERSION_EU
|
||||
// 0x0200EEF0 - 0x0200EF30
|
||||
const Gfx dl_ia_text_end[] = {
|
||||
gsDPPipeSync(),
|
||||
@@ -2298,7 +2259,6 @@ const Gfx dl_ia_text_end[] = {
|
||||
gsDPSetTextureFilter(G_TF_BILERP),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
#endif
|
||||
|
||||
// 0x0200EF30 - 0x0200EF60
|
||||
static const Vtx vertex_triangle[] = {
|
||||
@@ -2498,7 +2458,7 @@ const Texture texture_waterbox_lava[] = {
|
||||
};
|
||||
|
||||
// Unreferenced light group
|
||||
static const Lights1 segment2_lights_unused = gdSPDefLights1(
|
||||
UNUSED static const Lights1 segment2_lights_unused = gdSPDefLights1(
|
||||
0x40, 0x40, 0x40,
|
||||
0xff, 0xff, 0xff, 0x28, 0x28, 0x28
|
||||
);
|
||||
|
||||
@@ -220,6 +220,7 @@
|
||||
'ィ' = 0xD6
|
||||
'ゥ' = 0xD7
|
||||
'ォ' = 0xD8
|
||||
'@' = 0xDF
|
||||
'[%]' = 0xE0
|
||||
'(' = 0xE1
|
||||
'(' = 0xE1
|
||||
|
||||
@@ -1966,6 +1966,7 @@ const BehaviorScript bhvBowser[] = {
|
||||
SPAWN_CHILD(/*Model*/ MODEL_NONE, /*Behavior*/ bhvBowserBodyAnchor),
|
||||
SPAWN_CHILD(/*Model*/ MODEL_BOWSER_BOMB_CHILD_OBJ, /*Behavior*/ bhvBowserFlameSpawn),
|
||||
SPAWN_OBJ(/*Model*/ MODEL_NONE, /*Behavior*/ bhvBowserTailAnchor),
|
||||
// Beta leftover that spawn 50 coins when Bowser is defeated
|
||||
SET_INT(oNumLootCoins, 50),
|
||||
SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0),
|
||||
SET_HOME(),
|
||||
@@ -3024,7 +3025,7 @@ const BehaviorScript bhvHiddenStaircaseStep[] = {
|
||||
END_LOOP(),
|
||||
};
|
||||
|
||||
const BehaviorScript bhvBooBossSpawnedBridge[] = {
|
||||
const BehaviorScript bhvBooStaircase[] = {
|
||||
BEGIN(OBJ_LIST_SURFACE),
|
||||
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
|
||||
LOAD_COLLISION_DATA(bbh_seg7_collision_staircase_step),
|
||||
@@ -3032,7 +3033,7 @@ const BehaviorScript bhvBooBossSpawnedBridge[] = {
|
||||
SET_FLOAT(oCollisionDistance, 1000),
|
||||
SET_HOME(),
|
||||
BEGIN_LOOP(),
|
||||
CALL_NATIVE(bhv_boo_boss_spawned_bridge_loop),
|
||||
CALL_NATIVE(bhv_boo_staircase),
|
||||
CALL_NATIVE(load_object_collision_model),
|
||||
END_LOOP(),
|
||||
};
|
||||
@@ -3142,7 +3143,7 @@ const BehaviorScript bhvUnusedFakeStar[] = {
|
||||
};
|
||||
|
||||
// What is this?
|
||||
static const BehaviorScript unused_1[] = {
|
||||
UNUSED static const BehaviorScript unused_1[] = {
|
||||
BREAK(),
|
||||
BREAK(),
|
||||
BREAK(),
|
||||
@@ -3506,7 +3507,7 @@ UNUSED static const u64 behavior_data_unused_0 = 0;
|
||||
const BehaviorScript bhvMario[] = {
|
||||
BEGIN(OBJ_LIST_PLAYER),
|
||||
SET_INT(oIntangibleTimer, 0),
|
||||
OR_INT(oFlags, OBJ_FLAG_0100),
|
||||
OR_INT(oFlags, OBJ_FLAG_PLAYER),
|
||||
OR_INT(oUnk94, 0x0001),
|
||||
SET_HITBOX(/*Radius*/ 37, /*Height*/ 160),
|
||||
BEGIN_LOOP(),
|
||||
@@ -3630,7 +3631,7 @@ const BehaviorScript bhvMenuButton[] = {
|
||||
|
||||
const BehaviorScript bhvMenuButtonManager[] = {
|
||||
BEGIN(OBJ_LIST_LEVEL),
|
||||
OR_INT(oFlags, (OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM | OBJ_FLAG_0020 | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
OR_INT(oFlags, (OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM | OBJ_FLAG_UPDATE_TRANSFORM_FOR_THROW_MATRIX | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
CALL_NATIVE(bhv_menu_button_manager_init),
|
||||
BEGIN_LOOP(),
|
||||
SET_INT(oIntangibleTimer, 0),
|
||||
@@ -3852,7 +3853,7 @@ const BehaviorScript bhvSignOnWall[] = {
|
||||
const BehaviorScript bhvHomingAmp[] = {
|
||||
BEGIN(OBJ_LIST_GENACTOR),
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_MOVE_XZ_USING_FVEL | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
LOAD_ANIMATIONS(oAnimations, amp_seg8_anims_08004034),
|
||||
LOAD_ANIMATIONS(oAnimations, dAmpAnimsList),
|
||||
ANIMATE(0),
|
||||
SET_FLOAT(oGraphYOffset, 40),
|
||||
SET_INT(oIntangibleTimer, 0),
|
||||
@@ -3865,7 +3866,7 @@ const BehaviorScript bhvHomingAmp[] = {
|
||||
const BehaviorScript bhvCirclingAmp[] = {
|
||||
BEGIN(OBJ_LIST_GENACTOR),
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_MOVE_XZ_USING_FVEL | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
LOAD_ANIMATIONS(oAnimations, amp_seg8_anims_08004034),
|
||||
LOAD_ANIMATIONS(oAnimations, dAmpAnimsList),
|
||||
ANIMATE(0),
|
||||
SET_FLOAT(oGraphYOffset, 40),
|
||||
SET_INT(oIntangibleTimer, 0),
|
||||
@@ -4827,7 +4828,7 @@ const BehaviorScript bhvHidden1upInPoleSpawner[] = {
|
||||
|
||||
const BehaviorScript bhvControllablePlatform[] = {
|
||||
BEGIN(OBJ_LIST_SURFACE),
|
||||
OR_INT(oFlags, (OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM | OBJ_FLAG_0020 | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
OR_INT(oFlags, (OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM | OBJ_FLAG_UPDATE_TRANSFORM_FOR_THROW_MATRIX | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
LOAD_COLLISION_DATA(hmc_seg7_collision_controllable_platform),
|
||||
SET_HOME(),
|
||||
CALL_NATIVE(bhv_controllable_platform_init),
|
||||
|
||||
+17
-17
@@ -1,13 +1,13 @@
|
||||
diff --git a/asm/crash.s b/asm/crash.s
|
||||
new file mode 100644
|
||||
index 00000000..0b2a5574
|
||||
index 00000000..033bf952
|
||||
--- /dev/null
|
||||
+++ b/asm/crash.s
|
||||
@@ -0,0 +1,153 @@
|
||||
+# SM64 Crash Handler
|
||||
+# See Readme below.
|
||||
+// SM64 Crash Handler
|
||||
+// See Readme below.
|
||||
+
|
||||
+.include "macros.inc"
|
||||
+#include "macros.inc"
|
||||
+
|
||||
+/* ---------------------------------------------------------------
|
||||
+ * IMPORTANT README:
|
||||
@@ -58,7 +58,7 @@ index 00000000..0b2a5574
|
||||
+ sw $a3, %lo(nAssertStopProgram)($at)
|
||||
+ beqz $a3, .end_2
|
||||
+ nop
|
||||
+ syscall # trigger crash screen
|
||||
+ syscall // trigger crash screen
|
||||
+.end_2:
|
||||
+ jr $ra
|
||||
+ nop
|
||||
@@ -75,15 +75,15 @@ index 00000000..0b2a5574
|
||||
+ jr $ra
|
||||
+ mfc0 $v0, COP0_BADVADDR
|
||||
+
|
||||
+# If the error code field of cop0's cause register is non-zero,
|
||||
+# draw crash details to the screen and hang
|
||||
+#
|
||||
+# If there wasn't an error, continue to the original handler
|
||||
+// If the error code field of cop0's cause register is non-zero,
|
||||
+// draw crash details to the screen and hang
|
||||
+
|
||||
+// If there wasn't an error, continue to the original handler
|
||||
+
|
||||
+glabel __crash_handler_entry
|
||||
+ mfc0 $k1, COP0_CAUSE
|
||||
+ andi $k1, $k1, (0x1F << 2)
|
||||
+ beqzl $k1, .end2 # exit if ExCode is 0
|
||||
+ beqzl $k1, .end2 // exit if ExCode is 0
|
||||
+ lui $k0, %hi(__osException)
|
||||
+ la $k0, exceptionRegContext
|
||||
+ sd $zero, 0x018 ($k0)
|
||||
@@ -116,7 +116,7 @@ index 00000000..0b2a5574
|
||||
+ sd $sp, 0x0F0 ($k0)
|
||||
+ sd $fp, 0x0F8 ($k0)
|
||||
+ sd $ra, 0x100 ($k0)
|
||||
+ # cop unusable exception fired twice on startup so we'll ignore it for now
|
||||
+ // cop unusable exception fired twice on startup so we'll ignore it for now
|
||||
+ li $t0, (0x0B << 2)
|
||||
+ beq $k1, $t0, .end
|
||||
+ nop
|
||||
@@ -155,14 +155,14 @@ index 00000000..0b2a5574
|
||||
+ lui $k0, %hi(__osException)
|
||||
+ .end2:
|
||||
+ addiu $k0, $k0, %lo(__osException)
|
||||
+ jr $k0 # run the original handler
|
||||
+ jr $k0 // run the original handler
|
||||
+ nop
|
||||
diff --git a/lib/asm/__osExceptionPreamble.s b/lib/asm/__osExceptionPreamble.s
|
||||
index e14928ce..4d12129e 100644
|
||||
index c3b97993..c552a485 100644
|
||||
--- a/lib/asm/__osExceptionPreamble.s
|
||||
+++ b/lib/asm/__osExceptionPreamble.s
|
||||
@@ -18,8 +18,8 @@
|
||||
.endif
|
||||
@@ -11,8 +11,8 @@
|
||||
#endif
|
||||
|
||||
glabel __osExceptionPreamble
|
||||
- lui $k0, %hi(__osException)
|
||||
@@ -173,10 +173,10 @@ index e14928ce..4d12129e 100644
|
||||
nop
|
||||
|
||||
diff --git a/sm64.ld b/sm64.ld
|
||||
index f80f5b4d..569344bc 100755
|
||||
index 7d9b5b4a..c7bb81b9 100755
|
||||
--- a/sm64.ld
|
||||
+++ b/sm64.ld
|
||||
@@ -116,6 +116,7 @@ SECTIONS
|
||||
@@ -117,6 +117,7 @@ SECTIONS
|
||||
BUILD_DIR/src/game/rendering_graph_node.o(.text);
|
||||
BUILD_DIR/src/game/profiler.o(.text);
|
||||
BUILD_DIR/asm/decompress.o(.text);
|
||||
|
||||
@@ -2,10 +2,10 @@ diff --git a/src/game/area.c b/src/game/area.c
|
||||
index af9d0156..c68a7f6e 100644
|
||||
--- a/src/game/area.c
|
||||
+++ b/src/game/area.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "engine/geo_layout.h"
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "save_file.h"
|
||||
#include "level_table.h"
|
||||
#include "dialog_ids.h"
|
||||
+#include "debug_box.h"
|
||||
|
||||
struct SpawnInfo gPlayerSpawnInfos[1];
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
diff --git a/src/game/game_init.c b/src/game/game_init.c
|
||||
index b6334688..62ed106c 100644
|
||||
index b961ca52..531231cf 100644
|
||||
--- a/src/game/game_init.c
|
||||
+++ b/src/game/game_init.c
|
||||
@@ -59,6 +59,47 @@ struct DemoInput *gCurrDemoInput = NULL; // demo input sequence
|
||||
u16 gDemoInputListID = 0;
|
||||
struct DemoInput gRecordedDemoInput = { 0 }; // possibly removed in EU. TODO: Check
|
||||
@@ -82,6 +82,47 @@ struct DemoInput gRecordedDemoInput = { 0 };
|
||||
// Display
|
||||
// ----------------------------------------------------------------------------------------------------
|
||||
|
||||
+// SDK states that 1 cycle takes about 21.33 nanoseconds
|
||||
+#define SECONDS_PER_CYCLE 0.00000002133f
|
||||
@@ -48,9 +48,9 @@ index b6334688..62ed106c 100644
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* Initializes the Reality Display Processor (RDP).
|
||||
* This function initializes settings such as texture filtering mode,
|
||||
@@ -633,5 +674,7 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
* Sets the initial RDP (Reality Display Processor) rendering settings.
|
||||
*/
|
||||
@@ -694,5 +735,7 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
// amount of free space remaining.
|
||||
print_text_fmt_int(180, 20, "BUF %d", gGfxPoolEnd - (u8 *) gDisplayListHead);
|
||||
}
|
||||
|
||||
@@ -13,16 +13,16 @@ index 00000000..e60550ab
|
||||
+extern enum ConsoleType get_console_type(void);
|
||||
diff --git a/lib/asm/skGetId.s b/lib/asm/skGetId.s
|
||||
new file mode 100644
|
||||
index 00000000..8fb4c449
|
||||
index 00000000..58e7d4f9
|
||||
--- /dev/null
|
||||
+++ b/lib/asm/skGetId.s
|
||||
@@ -0,0 +1,18 @@
|
||||
+# Code by stuckpixel
|
||||
+// Code by stuckpixel
|
||||
+
|
||||
+.set noreorder
|
||||
+.set gp=64
|
||||
+
|
||||
+.include "macros.inc"
|
||||
+#include "macros.inc"
|
||||
+
|
||||
+glabel skGetId
|
||||
+ li $v0, 0
|
||||
@@ -36,10 +36,10 @@ index 00000000..8fb4c449
|
||||
+ nop
|
||||
+ nop
|
||||
diff --git a/lib/src/__osViSwapContext.c b/lib/src/__osViSwapContext.c
|
||||
index b9d364b1..fa149b5d 100644
|
||||
index 990cb11f..22756e91 100644
|
||||
--- a/lib/src/__osViSwapContext.c
|
||||
+++ b/lib/src/__osViSwapContext.c
|
||||
@@ -52,7 +52,9 @@ void __osViSwapContext() {
|
||||
@@ -54,7 +54,9 @@ void __osViSwapContext() {
|
||||
HW_REG(VI_INTR_REG, u32) = s0->fldRegs[field].vIntr;
|
||||
HW_REG(VI_X_SCALE_REG, u32) = s1->unk20;
|
||||
HW_REG(VI_Y_SCALE_REG, u32) = s1->unk2c;
|
||||
@@ -269,7 +269,7 @@ index 1a86477b..a94f8721 100644
|
||||
return sp34;
|
||||
}
|
||||
diff --git a/lib/src/osInitialize.c b/lib/src/osInitialize.c
|
||||
index ea247636..4adb45cb 100644
|
||||
index ba73024b..6deaf407 100644
|
||||
--- a/lib/src/osInitialize.c
|
||||
+++ b/lib/src/osInitialize.c
|
||||
@@ -1,6 +1,7 @@
|
||||
@@ -280,7 +280,7 @@ index ea247636..4adb45cb 100644
|
||||
|
||||
#define PIF_ADDR_START (void *) 0x1FC007FC
|
||||
|
||||
@@ -54,6 +55,7 @@ void osInitialize(void) {
|
||||
@@ -51,6 +52,7 @@ void osInitialize(void) {
|
||||
UNUSED u32 eu_sp30;
|
||||
#endif
|
||||
UNUSED u32 sp2c;
|
||||
@@ -289,24 +289,24 @@ index ea247636..4adb45cb 100644
|
||||
__osSetSR(__osGetSR() | 0x20000000);
|
||||
__osSetFpcCsr(0x01000800);
|
||||
diff --git a/sm64.ld b/sm64.ld
|
||||
index f80f5b4d..e53d4e40 100755
|
||||
index 7d9b5b4a..be853a3b 100755
|
||||
--- a/sm64.ld
|
||||
+++ b/sm64.ld
|
||||
@@ -300,6 +300,8 @@ SECTIONS
|
||||
#ifdef VERSION_SH
|
||||
BUILD_DIR/libultra.a:unk_shindou_file_3.o(.text)
|
||||
@@ -306,6 +306,8 @@ SECTIONS
|
||||
#if ENABLE_RUMBLE
|
||||
BUILD_DIR/libultra.a:unk_shindou_file_3.o(.text);
|
||||
#endif
|
||||
+ BUILD_DIR/libultra.a:consoleType.o(.text)
|
||||
+ BUILD_DIR/libultra.a:skGetId.o(.text)
|
||||
BUILD_DIR/lib/rsp.o(.text);
|
||||
#else
|
||||
BUILD_DIR/src/game*.o(.text);
|
||||
@@ -410,6 +412,8 @@ SECTIONS
|
||||
BUILD_DIR/libultra.a:__osGetCause.o(.text);
|
||||
BUILD_DIR/libultra.a:__osAtomicDec.o(.text);
|
||||
BUILD_DIR/libultra.a:guLookAtRef.o(.text); /* Fast3DEX2 only */
|
||||
+ BUILD_DIR/libultra.a:consoleType.o(.text);
|
||||
+ BUILD_DIR/libultra.a:skGetId.o(.text);
|
||||
@@ -428,6 +430,8 @@ SECTIONS
|
||||
#if ENABLE_RUMBLE
|
||||
BUILD_DIR/libultra.a:unk_shindou_file_3.o(.text);
|
||||
#endif
|
||||
+ BUILD_DIR/libultra.a:consoleType.o(.text)
|
||||
+ BUILD_DIR/libultra.a:skGetId.o(.text)
|
||||
BUILD_DIR/lib/rsp.o(.text);
|
||||
#endif
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index f81fd27b..318140f2 100644
|
||||
index f50b7622..124c7ec6 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -419,6 +419,7 @@ $(BUILD_DIR)/include/text_strings.h: $(BUILD_DIR)/include/text_menu_strings.h
|
||||
@@ -478,6 +478,7 @@ $(BUILD_DIR)/include/text_strings.h: $(BUILD_DIR)/include/text_menu_strings.h
|
||||
$(BUILD_DIR)/src/menu/file_select.o: $(BUILD_DIR)/include/text_strings.h
|
||||
$(BUILD_DIR)/src/menu/star_select.o: $(BUILD_DIR)/include/text_strings.h
|
||||
$(BUILD_DIR)/src/game/ingame_menu.o: $(BUILD_DIR)/include/text_strings.h
|
||||
+$(BUILD_DIR)/src/game/mem_error_screen.o: $(BUILD_DIR)/include/text_strings.h
|
||||
+$(BUILD_DIR)/src/boot/mem_error_screen.o: $(BUILD_DIR)/include/text_strings.h
|
||||
|
||||
|
||||
#==============================================================================#
|
||||
diff --git a/include/segments.h b/include/segments.h
|
||||
index a8c1bf97..84c3d7a4 100644
|
||||
index a97d6ee8..186c968e 100644
|
||||
--- a/include/segments.h
|
||||
+++ b/include/segments.h
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef SEGMENTS_H
|
||||
#define SEGMENTS_H
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
+/* Use expansion pack RAM */
|
||||
+#define USE_EXT_RAM 1
|
||||
@@ -58,7 +58,7 @@ index 17c773ed..677a5ae9 100644
|
||||
+ JUMP(/*target*/ level_script_entry_error_screen),
|
||||
+};
|
||||
diff --git a/levels/intro/geo.c b/levels/intro/geo.c
|
||||
index 7a297fe7..71b16442 100644
|
||||
index 30a87806..6bf7b79a 100644
|
||||
--- a/levels/intro/geo.c
|
||||
+++ b/levels/intro/geo.c
|
||||
@@ -15,6 +15,24 @@
|
||||
@@ -100,7 +100,7 @@ index 99277e86..04797cd7 100644
|
||||
+
|
||||
#endif
|
||||
diff --git a/levels/intro/script.c b/levels/intro/script.c
|
||||
index a130cc04..926c0d09 100644
|
||||
index 04b8fc4c..ca9058c4 100644
|
||||
--- a/levels/intro/script.c
|
||||
+++ b/levels/intro/script.c
|
||||
@@ -18,6 +18,21 @@
|
||||
@@ -137,19 +137,19 @@ index d41a91c8..7d047236 100644
|
||||
|
||||
struct LevelCommand *level_script_execute(struct LevelCommand *cmd);
|
||||
|
||||
diff --git a/src/game/main.c b/src/game/main.c
|
||||
index 9615f25a..e2d7b3d4 100644
|
||||
--- a/src/game/main.c
|
||||
+++ b/src/game/main.c
|
||||
diff --git a/src/boot/main.c b/src/boot/main.c
|
||||
index 1a9d9e7e..f4f7a9e5 100644
|
||||
--- a/src/boot/main.c
|
||||
+++ b/src/boot/main.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "segments.h"
|
||||
#include "main.h"
|
||||
#include "rumble_init.h"
|
||||
#include "game/main.h"
|
||||
#include "game/rumble_init.h"
|
||||
+#include "mem_error_screen.h"
|
||||
|
||||
// Message IDs
|
||||
#define MESG_SP_COMPLETE 100
|
||||
@@ -127,6 +128,10 @@ void alloc_pool(void) {
|
||||
@@ -131,6 +132,10 @@ void alloc_pool(void) {
|
||||
void *start = (void *) SEG_POOL_START;
|
||||
void *end = (void *) SEG_POOL_END;
|
||||
|
||||
@@ -160,7 +160,7 @@ index 9615f25a..e2d7b3d4 100644
|
||||
main_pool_init(start, end);
|
||||
gEffectsMemoryPool = mem_pool_init(0x4000, MEMORY_POOL_LEFT);
|
||||
}
|
||||
@@ -332,7 +337,10 @@ void thread3_main(UNUSED void *arg) {
|
||||
@@ -336,7 +341,10 @@ void thread3_main(UNUSED void *arg) {
|
||||
create_thread(&gSoundThread, 4, thread4_sound, NULL, gThread4Stack + 0x2000, 20);
|
||||
osStartThread(&gSoundThread);
|
||||
|
||||
@@ -172,11 +172,11 @@ index 9615f25a..e2d7b3d4 100644
|
||||
osStartThread(&gGameLoopThread);
|
||||
|
||||
while (TRUE) {
|
||||
diff --git a/src/game/mem_error_screen.c b/src/game/mem_error_screen.c
|
||||
diff --git a/src/boot/mem_error_screen.c b/src/boot/mem_error_screen.c
|
||||
new file mode 100644
|
||||
index 00000000..81efaf91
|
||||
index 00000000..f432927c
|
||||
--- /dev/null
|
||||
+++ b/src/game/mem_error_screen.c
|
||||
+++ b/src/boot/mem_error_screen.c
|
||||
@@ -0,0 +1,104 @@
|
||||
+/* clang-format off */
|
||||
+/*
|
||||
@@ -274,15 +274,14 @@ index 00000000..81efaf91
|
||||
+
|
||||
+ addr = segmented_to_virtual(level_script_entry_error_screen);
|
||||
+
|
||||
+ rendering_init();
|
||||
+ render_init();
|
||||
+
|
||||
+ while (1) {
|
||||
+ config_gfx_pool();
|
||||
+ select_gfx_pool();
|
||||
+ addr = level_script_execute(addr);
|
||||
+ display_and_vsync();
|
||||
+ }
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/game/mem_error_screen.h b/src/game/mem_error_screen.h
|
||||
new file mode 100644
|
||||
index 00000000..9fbff34c
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/src/game/game_init.c b/src/game/game_init.c
|
||||
index b6334688..9363074b 100644
|
||||
index b961ca52..adfde049 100644
|
||||
--- a/src/game/game_init.c
|
||||
+++ b/src/game/game_init.c
|
||||
@@ -11,6 +11,7 @@
|
||||
@@ -10,9 +10,9 @@ index b6334688..9363074b 100644
|
||||
#include "profiler.h"
|
||||
#include "save_file.h"
|
||||
#include "seq_ids.h"
|
||||
@@ -335,6 +336,45 @@ void display_and_vsync(void) {
|
||||
gGlobalTimer++;
|
||||
}
|
||||
@@ -386,6 +387,45 @@ void display_and_vsync(void) {
|
||||
// Controls
|
||||
// ----------------------------------------------------------------------------------------------------
|
||||
|
||||
+/*
|
||||
+ * This enhancement allows you to record gameplay demos for the mario head screen.
|
||||
@@ -24,7 +24,7 @@ index b6334688..9363074b 100644
|
||||
+ *
|
||||
+*/
|
||||
+
|
||||
+#include "../src/game/mario.h"
|
||||
+#include "mario.h"
|
||||
+
|
||||
+#define DEMOREC_STATUS_NOT_RECORDING 0
|
||||
+#define DEMOREC_STATUS_PREPARING 1
|
||||
@@ -53,15 +53,15 @@ index b6334688..9363074b 100644
|
||||
+struct DemoInput* gRecordedInputsPtr = (struct DemoInput*)gRecordedInputs;
|
||||
+struct DemoInput gRecordedDemoInputCopy;
|
||||
+
|
||||
// this function records distinct inputs over a 255-frame interval to RAM locations and was likely
|
||||
// used to record the demo sequences seen in the final game. This function is unused.
|
||||
static void record_demo(void) {
|
||||
@@ -368,6 +408,118 @@ static void record_demo(void) {
|
||||
/**
|
||||
* This function records distinct inputs over a 255-frame interval to RAM locations and was likely
|
||||
* used to record the demo sequences seen in the final game. This function is unused.
|
||||
@@ -420,6 +460,118 @@ UNUSED static void record_demo(void) {
|
||||
gRecordedDemoInput.timer++;
|
||||
}
|
||||
|
||||
+void record_new_demo_input(void) {
|
||||
+ if(gRecordedDemoInput.timer == 1 && gRecordedDemoInputCopy.timer > 0) {
|
||||
+ if (gRecordedDemoInput.timer == 1 && gRecordedDemoInputCopy.timer > 0) {
|
||||
+ gRecordedInputs[gNumOfRecordedInputs].timer = gRecordedDemoInputCopy.timer;
|
||||
+ gRecordedInputs[gNumOfRecordedInputs + 1].timer = 0;
|
||||
+ gRecordedInputs[gNumOfRecordedInputs].rawStickX = gRecordedDemoInputCopy.rawStickX;
|
||||
@@ -86,13 +86,13 @@ index b6334688..9363074b 100644
|
||||
+void recording(void) {
|
||||
+
|
||||
+ // Force-stop when someone makes too many inputs.
|
||||
+ if(gNumOfRecordedInputs + 1 > DEMOREC_MAX_INPUTS) {
|
||||
+ if (gNumOfRecordedInputs + 1 > DEMOREC_MAX_INPUTS) {
|
||||
+ gRecordingStatus = DEMOREC_STATUS_STOPPING;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ copy_gRecordedDemoInput();
|
||||
+ record_demo(); // Defined in game.c
|
||||
+ record_demo();
|
||||
+ record_new_demo_input();
|
||||
+}
|
||||
+
|
||||
@@ -112,10 +112,10 @@ index b6334688..9363074b 100644
|
||||
+ case DEMOREC_STATUS_NOT_RECORDING:
|
||||
+ break;
|
||||
+ case DEMOREC_STATUS_PREPARING:
|
||||
+ if(gMarioObject != NULL && gCurrLevelNum >= 5) { // If the game is in an active level
|
||||
+ if (gMarioObject != NULL && gCurrLevelNum != LEVEL_NONE) { // If the game is in an active level
|
||||
+ gRecordingStatus = DEMOREC_STATUS_RECORDING;
|
||||
+
|
||||
+ // A bit of a hack, but it works.
|
||||
+ // First 4 values in demo inputs are used to define level ID
|
||||
+ gNumOfRecordedInputs = 1;
|
||||
+ gRecordedInputs[0].timer = gCurrLevelNum;
|
||||
+ gRecordedInputs[0].rawStickX = 0;
|
||||
@@ -127,7 +127,7 @@ index b6334688..9363074b 100644
|
||||
+ recording();
|
||||
+ break;
|
||||
+ case DEMOREC_STATUS_DONE:
|
||||
+ if(gDoneDelay > DEMOREC_DONE_DELAY)
|
||||
+ if (gDoneDelay > DEMOREC_DONE_DELAY)
|
||||
+ gRecordingStatus = DEMOREC_STATUS_NOT_RECORDING;
|
||||
+ else
|
||||
+ gDoneDelay++;
|
||||
@@ -159,8 +159,8 @@ index b6334688..9363074b 100644
|
||||
+ // so the debug level select is used for that.
|
||||
+ gDebugLevelSelect = TRUE;
|
||||
+
|
||||
+ if(gPlayer1Controller->buttonPressed & L_TRIG) {
|
||||
+ if(gRecordingStatus == DEMOREC_STATUS_NOT_RECORDING) {
|
||||
+ if (gPlayer1Controller->buttonPressed & L_TRIG) {
|
||||
+ if (gRecordingStatus == DEMOREC_STATUS_NOT_RECORDING) {
|
||||
+ gRecordingStatus = DEMOREC_STATUS_PREPARING;
|
||||
+ } else if (gRecordingStatus == DEMOREC_STATUS_RECORDING) {
|
||||
+ gRecordingStatus = DEMOREC_STATUS_STOPPING;
|
||||
@@ -172,12 +172,12 @@ index b6334688..9363074b 100644
|
||||
+ print_status();
|
||||
+}
|
||||
+
|
||||
// take the updated controller struct and calculate
|
||||
// the new x, y, and distance floats.
|
||||
void adjust_analog_stick(struct Controller *controller) {
|
||||
@@ -623,6 +775,7 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
/**
|
||||
* Take the updated controller struct and calculate the new x, y, and distance floats.
|
||||
*/
|
||||
@@ -684,6 +836,7 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
audio_game_loop_tick();
|
||||
config_gfx_pool();
|
||||
select_gfx_pool();
|
||||
read_controller_inputs();
|
||||
+ recordingDemo();
|
||||
addr = level_script_execute(addr);
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
diff --git a/src/game/camera.c b/src/game/camera.c
|
||||
index 13d3fe2..be49880 100644
|
||||
--- a/src/game/camera.c
|
||||
+++ b/src/game/camera.c
|
||||
@@ -259,6 +259,7 @@ s16 sCameraSoundFlags;
|
||||
* Stores what C-Buttons are pressed this frame.
|
||||
*/
|
||||
u16 sCButtonsPressed;
|
||||
+u16 stoppedMovingCamera;
|
||||
/**
|
||||
* A copy of gDialogID, the dialog displayed during the cutscene.
|
||||
*/
|
||||
@@ -433,6 +434,9 @@ u8 sFramesSinceCutsceneEnded = 0;
|
||||
* 3 = Dialog doesn't have a response
|
||||
*/
|
||||
u8 sCutsceneDialogResponse = 0;
|
||||
+u8 stickReset = 1;
|
||||
+u8 cButtonCounter;
|
||||
+u8 lastCameraMove;
|
||||
struct PlayerCameraState *sMarioCamState = &gPlayerCameraState[0];
|
||||
struct PlayerCameraState *sLuigiCamState = &gPlayerCameraState[1];
|
||||
u32 unused8032D008 = 0;
|
||||
@@ -442,6 +446,9 @@ Vec3f sUnusedModeBasePosition_3 = { 646.0f, 143.0f, -1513.0f };
|
||||
Vec3f sUnusedModeBasePosition_4 = { 646.0f, 143.0f, -1513.0f };
|
||||
Vec3f sUnusedModeBasePosition_5 = { 646.0f, 143.0f, -1513.0f };
|
||||
|
||||
+#define MOVED_LEFT 1
|
||||
+#define MOVED_RIGHT 2
|
||||
+
|
||||
s32 update_radial_camera(struct Camera *c, Vec3f, Vec3f);
|
||||
s32 update_outward_radial_camera(struct Camera *c, Vec3f, Vec3f);
|
||||
s32 update_behind_mario_camera(struct Camera *c, Vec3f, Vec3f);
|
||||
@@ -1176,14 +1183,39 @@ void mode_8_directions_camera(struct Camera *c) {
|
||||
|
||||
radial_camera_input(c, 0.f);
|
||||
|
||||
- if (gPlayer1Controller->buttonPressed & R_CBUTTONS) {
|
||||
- s8DirModeYawOffset += DEGREES(45);
|
||||
- play_sound_cbutton_side();
|
||||
- }
|
||||
- if (gPlayer1Controller->buttonPressed & L_CBUTTONS) {
|
||||
- s8DirModeYawOffset -= DEGREES(45);
|
||||
- play_sound_cbutton_side();
|
||||
+ if (gPlayer1Controller->buttonDown & L_CBUTTONS) {
|
||||
+ s8DirModeYawOffset -= DEGREES(4);
|
||||
+ cButtonCounter++;
|
||||
+ stoppedMovingCamera = 0;
|
||||
+ lastCameraMove = MOVED_LEFT;
|
||||
+
|
||||
+ }
|
||||
+ else if (gPlayer1Controller->buttonDown & R_CBUTTONS) {
|
||||
+ s8DirModeYawOffset += DEGREES(4);
|
||||
+ cButtonCounter++;
|
||||
+ stoppedMovingCamera = 0;
|
||||
+ lastCameraMove = MOVED_RIGHT;
|
||||
+ }
|
||||
+ else if (gPlayer2Controller->rawStickX) {
|
||||
+ s8DirModeYawOffset += DEGREES(gPlayer2Controller->rawStickX * 4 / 64);
|
||||
+ } else {
|
||||
+ stoppedMovingCamera = 1;
|
||||
+ }
|
||||
+
|
||||
+ if (stoppedMovingCamera == 1) {
|
||||
+ if ((cButtonCounter < 5) && (cButtonCounter > 0)) {
|
||||
+ if (lastCameraMove == MOVED_RIGHT) {
|
||||
+ s8DirModeYawOffset += DEGREES(45);
|
||||
+ cButtonCounter = 0;
|
||||
+ } else {
|
||||
+ s8DirModeYawOffset -= DEGREES(45);
|
||||
+ cButtonCounter = 0;
|
||||
+ }
|
||||
+ } else {
|
||||
+ cButtonCounter = 0;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
|
||||
lakitu_zoom(400.f, 0x900);
|
||||
c->nextYaw = update_8_directions_camera(c, c->focus, pos);
|
||||
@@ -2760,7 +2792,7 @@ s32 mode_c_up_camera(struct Camera *c) {
|
||||
sPanDistance = 0.f;
|
||||
|
||||
// Exit C-Up mode
|
||||
- if (gPlayer1Controller->buttonPressed & (A_BUTTON | B_BUTTON | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS)) {
|
||||
+ if ((gPlayer1Controller->buttonPressed & (A_BUTTON | B_BUTTON | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS)) || (gPlayer2Controller->rawStickY < -10)) {
|
||||
exit_c_up(c);
|
||||
}
|
||||
return 0;
|
||||
@@ -3015,14 +3047,11 @@ void update_camera(struct Camera *c) {
|
||||
// Only process R_TRIG if 'fixed' is not selected in the menu
|
||||
if (cam_select_alt_mode(0) == CAM_SELECTION_MARIO) {
|
||||
if (gPlayer1Controller->buttonPressed & R_TRIG) {
|
||||
- if (set_cam_angle(0) == CAM_ANGLE_LAKITU) {
|
||||
- set_cam_angle(CAM_ANGLE_MARIO);
|
||||
- } else {
|
||||
- set_cam_angle(CAM_ANGLE_LAKITU);
|
||||
- }
|
||||
+ s8DirModeYawOffset = gMarioState->faceAngle[1]-0x8000;
|
||||
+ play_sound_rbutton_changed();
|
||||
}
|
||||
}
|
||||
- play_sound_if_cam_switched_to_lakitu_or_mario();
|
||||
+ //play_sound_if_cam_switched_to_lakitu_or_mario();
|
||||
}
|
||||
|
||||
// Initialize the camera
|
||||
@@ -3865,7 +3894,7 @@ s32 find_c_buttons_pressed(u16 currentState, u16 buttonsPressed, u16 buttonsDown
|
||||
currentState &= ~R_CBUTTONS;
|
||||
}
|
||||
|
||||
- if (buttonsPressed & U_CBUTTONS) {
|
||||
+ if ((buttonsPressed & U_CBUTTONS)) {
|
||||
currentState |= U_CBUTTONS;
|
||||
currentState &= ~D_CBUTTONS;
|
||||
}
|
||||
@@ -4816,19 +4845,19 @@ void play_camera_buzz_if_c_sideways(void) {
|
||||
}
|
||||
|
||||
void play_sound_cbutton_up(void) {
|
||||
- play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource);
|
||||
+ //play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource);
|
||||
}
|
||||
|
||||
void play_sound_cbutton_down(void) {
|
||||
- play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gGlobalSoundSource);
|
||||
+ //play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gGlobalSoundSource);
|
||||
}
|
||||
|
||||
void play_sound_cbutton_side(void) {
|
||||
- play_sound(SOUND_MENU_CAMERA_TURN, gGlobalSoundSource);
|
||||
+ //play_sound(SOUND_MENU_CAMERA_TURN, gGlobalSoundSource);
|
||||
}
|
||||
|
||||
void play_sound_button_change_blocked(void) {
|
||||
- play_sound(SOUND_MENU_CAMERA_BUZZ, gGlobalSoundSource);
|
||||
+ //play_sound(SOUND_MENU_CAMERA_BUZZ, gGlobalSoundSource);
|
||||
}
|
||||
|
||||
void play_sound_rbutton_changed(void) {
|
||||
@@ -4925,7 +4954,7 @@ s32 radial_camera_input(struct Camera *c, UNUSED f32 unused) {
|
||||
}
|
||||
|
||||
// Zoom in / enter C-Up
|
||||
- if (gPlayer1Controller->buttonPressed & U_CBUTTONS) {
|
||||
+ if (((gPlayer1Controller->buttonPressed & U_CBUTTONS) || (gPlayer2Controller->rawStickY > 40)) && (stickReset)) {
|
||||
if (gCameraMovementFlags & CAM_MOVE_ZOOMED_OUT) {
|
||||
gCameraMovementFlags &= ~CAM_MOVE_ZOOMED_OUT;
|
||||
play_sound_cbutton_up();
|
||||
@@ -4935,7 +4964,7 @@ s32 radial_camera_input(struct Camera *c, UNUSED f32 unused) {
|
||||
}
|
||||
|
||||
// Zoom out
|
||||
- if (gPlayer1Controller->buttonPressed & D_CBUTTONS) {
|
||||
+ if ((gPlayer1Controller->buttonPressed & D_CBUTTONS) || (gPlayer2Controller->rawStickY < -40)) {
|
||||
if (gCameraMovementFlags & CAM_MOVE_ZOOMED_OUT) {
|
||||
gCameraMovementFlags |= CAM_MOVE_ALREADY_ZOOMED_OUT;
|
||||
#ifndef VERSION_JP
|
||||
@@ -4946,7 +4975,11 @@ s32 radial_camera_input(struct Camera *c, UNUSED f32 unused) {
|
||||
play_sound_cbutton_down();
|
||||
}
|
||||
}
|
||||
-
|
||||
+ if ((gPlayer2Controller->rawStickY > 40) || (gPlayer2Controller->rawStickY < -40)) {
|
||||
+ stickReset = 0;
|
||||
+ } else {
|
||||
+ stickReset = 1;
|
||||
+ }
|
||||
//! returning uninitialized variable
|
||||
return dummy;
|
||||
}
|
||||
diff --git a/src/game/hud.c b/src/game/hud.c
|
||||
index f11b626..003a634 100644
|
||||
--- a/src/game/hud.c
|
||||
+++ b/src/game/hud.c
|
||||
@@ -506,7 +506,7 @@ void render_hud(void) {
|
||||
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_CAMERA_AND_POWER) {
|
||||
render_hud_power_meter();
|
||||
- render_hud_camera_status();
|
||||
+ //render_hud_camera_status();
|
||||
}
|
||||
|
||||
if (hudDisplayFlags & HUD_DISPLAY_FLAG_TIMER) {
|
||||
@@ -0,0 +1,585 @@
|
||||
diff --git a/include/text_strings.h.in b/include/text_strings.h.in
|
||||
index 711d4562..f1c83171 100644
|
||||
--- a/include/text_strings.h.in
|
||||
+++ b/include/text_strings.h.in
|
||||
@@ -93,6 +93,12 @@
|
||||
#define TEXT_HUD_WIDE_INFO _("PLEASE CONFIGURE YOUR DISPLAY OR YOUR EMULATOR TO\nSTRETCH THE IMAGE TO 16:9")
|
||||
#endif
|
||||
|
||||
+#define TEXT_CAM_INFO_SLOWEST _("CAM SPEED: SLOWEST")
|
||||
+#define TEXT_CAM_INFO_SLOW _("CAM SPEED: SLOW")
|
||||
+#define TEXT_CAM_INFO_MEDIUM _("CAM SPEED: MEDIUM")
|
||||
+#define TEXT_CAM_INFO_FAST _("CAM SPEED: FAST")
|
||||
+#define TEXT_CAM_INFO_FASTEST _("CAM SPEED: FASTEST")
|
||||
+
|
||||
#if defined(VERSION_JP) || defined(VERSION_SH)
|
||||
|
||||
/**
|
||||
diff --git a/src/game/camera.c b/src/game/camera.c
|
||||
index 25b27983..2ff11930 100644
|
||||
--- a/src/game/camera.c
|
||||
+++ b/src/game/camera.c
|
||||
@@ -98,6 +98,7 @@ Vec3f sPlayer2FocusOffset;
|
||||
* The pitch used for the credits easter egg.
|
||||
*/
|
||||
s16 sCreditsPlayer2Pitch;
|
||||
+s16 rButtonCounter2;
|
||||
/**
|
||||
* The yaw used for the credits easter egg.
|
||||
*/
|
||||
@@ -107,6 +108,7 @@ s16 sCreditsPlayer2Yaw;
|
||||
*/
|
||||
u8 sFramesPaused;
|
||||
|
||||
+
|
||||
extern struct CameraFOVStatus sFOVState;
|
||||
extern struct TransitionInfo sModeTransition;
|
||||
extern struct PlayerGeometry sMarioGeometry;
|
||||
@@ -259,6 +261,7 @@ s16 sCameraSoundFlags;
|
||||
* Stores what C-Buttons are pressed this frame.
|
||||
*/
|
||||
u16 sCButtonsPressed;
|
||||
+u16 rButtonCounter;
|
||||
/**
|
||||
* A copy of gDialogID, the dialog displayed during the cutscene.
|
||||
*/
|
||||
@@ -437,6 +440,7 @@ u8 sFramesSinceCutsceneEnded = 0;
|
||||
* 3 = Dialog doesn't have a response
|
||||
*/
|
||||
u8 sCutsceneDialogResponse = DIALOG_RESPONSE_NONE;
|
||||
+u8 stickReset = 1;
|
||||
struct PlayerCameraState *sMarioCamState = &gPlayerCameraState[0];
|
||||
struct PlayerCameraState *sLuigiCamState = &gPlayerCameraState[1];
|
||||
u32 unused8032D008 = 0;
|
||||
@@ -755,6 +759,7 @@ void set_camera_height(struct Camera *c, f32 goalHeight) {
|
||||
UNUSED s16 action = sMarioCamState->action;
|
||||
f32 baseOff = 125.f;
|
||||
f32 camCeilHeight = find_ceil(c->pos[0], gLakituState.goalPos[1] - 50.f, c->pos[2], &surface);
|
||||
+ f32 approachRate = 20.0f;
|
||||
|
||||
if (sMarioCamState->action & ACT_FLAG_HANGING) {
|
||||
marioCeilHeight = sMarioGeometry.currCeilHeight;
|
||||
@@ -790,7 +795,8 @@ void set_camera_height(struct Camera *c, f32 goalHeight) {
|
||||
c->pos[1] = goalHeight;
|
||||
}
|
||||
}
|
||||
- approach_camera_height(c, goalHeight, 20.f);
|
||||
+ approachRate += ABS(c->pos[1] - goalHeight) / 20;
|
||||
+ approach_camera_height(c, goalHeight, approachRate);
|
||||
if (camCeilHeight != CELL_HEIGHT_LIMIT) {
|
||||
camCeilHeight -= baseOff;
|
||||
if ((c->pos[1] > camCeilHeight && sMarioGeometry.currFloorHeight + baseOff < camCeilHeight)
|
||||
@@ -934,9 +940,25 @@ s32 update_8_directions_camera(struct Camera *c, Vec3f focus, Vec3f pos) {
|
||||
UNUSED f32 unused1;
|
||||
UNUSED f32 unused2;
|
||||
UNUSED f32 unused3;
|
||||
- f32 yOff = 125.f;
|
||||
+ f32 yOff;
|
||||
f32 baseDist = 1000.f;
|
||||
|
||||
+ if (gMarioState->action & ACT_FLAG_SWIMMING) {
|
||||
+ yOff = -125.f;
|
||||
+ } else {
|
||||
+ yOff = 125.f;
|
||||
+ }
|
||||
+
|
||||
+ if ((gPlayer1Controller->buttonDown & R_TRIG) && (gPlayer1Controller->buttonDown & U_CBUTTONS)) {
|
||||
+ gKeepCliffCam = 1;
|
||||
+ pitch = DEGREES(60);
|
||||
+ } else if (((gPlayer1Controller->buttonDown & U_CBUTTONS) || (gPlayer1Controller->buttonDown & R_TRIG)) && gKeepCliffCam) {
|
||||
+ pitch = DEGREES(60);
|
||||
+ } else {
|
||||
+ gKeepCliffCam = 0;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
sAreaYaw = camYaw;
|
||||
calc_y_to_curr_floor(&posY, 1.f, 200.f, &focusY, 0.9f, 200.f);
|
||||
focus_on_mario(focus, pos, posY + yOff, focusY + yOff, sLakituDist + baseDist, pitch, camYaw);
|
||||
@@ -1170,6 +1192,28 @@ void mode_radial_camera(struct Camera *c) {
|
||||
pan_ahead_of_player(c);
|
||||
}
|
||||
|
||||
+// Returns the camera speed based on the user's camera speed setting
|
||||
+f32 set_camera_speed(void) {
|
||||
+ switch(gCameraSpeed) {
|
||||
+ case 0:
|
||||
+ return 0.5f;
|
||||
+ break;
|
||||
+ case 1:
|
||||
+ return 1;
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ return 1.5;
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ return 2;
|
||||
+ break;
|
||||
+ case 4:
|
||||
+ return 3.5;
|
||||
+ break;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* A mode that only has 8 camera angles, 45 degrees apart
|
||||
*/
|
||||
@@ -1177,42 +1221,59 @@ void mode_8_directions_camera(struct Camera *c) {
|
||||
Vec3f pos;
|
||||
UNUSED u8 unused[8];
|
||||
s16 oldAreaYaw = sAreaYaw;
|
||||
+ // Get the camera speed based on the user's setting
|
||||
+ f32 cameraSpeed = set_camera_speed();
|
||||
|
||||
radial_camera_input(c, 0.f);
|
||||
|
||||
- if (gPlayer1Controller->buttonPressed & R_CBUTTONS) {
|
||||
- s8DirModeYawOffset += DEGREES(45);
|
||||
- play_sound_cbutton_side();
|
||||
- }
|
||||
- if (gPlayer1Controller->buttonPressed & L_CBUTTONS) {
|
||||
- s8DirModeYawOffset -= DEGREES(45);
|
||||
- play_sound_cbutton_side();
|
||||
+ if ((gPlayer1Controller->buttonPressed & L_CBUTTONS) && !(gPlayer1Controller->buttonDown & R_TRIG)) {
|
||||
+ s8DirModeBaseYaw -= DEGREES(45);
|
||||
+ } else if ((gPlayer1Controller->buttonPressed & R_CBUTTONS) && !(gPlayer1Controller->buttonDown & R_TRIG)) {
|
||||
+ s8DirModeBaseYaw += DEGREES(45);
|
||||
+ } else if (gPlayer2Controller->rawStickX) {
|
||||
+ s8DirModeBaseYaw += DEGREES(gPlayer2Controller->rawStickX * 4 / 64); // Analog camera support (Use the "Dual Analog" input mode in Parallel Launcher)
|
||||
}
|
||||
-#ifdef PARALLEL_LAKITU_CAM
|
||||
- // extra functionality
|
||||
- else if (gPlayer1Controller->buttonPressed & U_JPAD) {
|
||||
- s8DirModeYawOffset = 0;
|
||||
- s8DirModeYawOffset = gMarioState->faceAngle[1]-0x8000;
|
||||
- }
|
||||
- else if (gPlayer1Controller->buttonDown & L_JPAD) {
|
||||
- s8DirModeYawOffset -= DEGREES(2);
|
||||
- }
|
||||
- else if (gPlayer1Controller->buttonDown & R_JPAD) {
|
||||
- s8DirModeYawOffset += DEGREES(2);
|
||||
+
|
||||
+ if (gPlayer1Controller->buttonDown & R_TRIG) {
|
||||
+ if (gPlayer1Controller->buttonDown & L_CBUTTONS) {
|
||||
+ s8DirModeBaseYaw -= DEGREES(cameraSpeed);
|
||||
+ } else if (gPlayer1Controller->buttonDown & R_CBUTTONS) {
|
||||
+ s8DirModeBaseYaw += DEGREES(cameraSpeed);
|
||||
+ }
|
||||
+ rButtonCounter++; // This increses whenever R is held.
|
||||
+ } else {
|
||||
+ if (rButtonCounter > 0 && rButtonCounter <= 5 && !((gPlayer1Controller->buttonDown & L_CBUTTONS) || (gPlayer1Controller->buttonDown & R_CBUTTONS) || (gMarioState->action & ACT_FLAG_SWIMMING_OR_FLYING))) {
|
||||
+ // This centers the camera behind mario. It triggers when you let go of R in less than 5 frames.
|
||||
+ s8DirModeYawOffset = 0;
|
||||
+ s8DirModeBaseYaw = gMarioState->faceAngle[1]-0x8000;
|
||||
+ gMarioState->area->camera->yaw = s8DirModeBaseYaw;
|
||||
+ play_sound_rbutton_changed();
|
||||
+ }
|
||||
+ rButtonCounter = 0;
|
||||
+ }
|
||||
+ if (gPlayer1Controller->buttonPressed & R_TRIG) {
|
||||
+ if (rButtonCounter2 <= 5) {
|
||||
+ set_cam_angle(CAM_ANGLE_MARIO); // Enter mario cam if R is pressed 2 times in less than 5 frames
|
||||
+ rButtonCounter2 = 6;
|
||||
+ } else {
|
||||
+ rButtonCounter2 = 0;
|
||||
+ }
|
||||
+ } else {
|
||||
+ rButtonCounter2++;
|
||||
}
|
||||
- else if (gPlayer1Controller->buttonPressed & D_JPAD) {
|
||||
- s8DirModeYawOffset = s8DirModeYawOffset&0xE000;
|
||||
+ if (gPlayer1Controller->buttonPressed & D_JPAD) {
|
||||
+ s8DirModeBaseYaw = (s8DirModeBaseYaw + 0x1000) & 0xE000; // Lock the camera to the nearest 45deg axis
|
||||
}
|
||||
-#endif
|
||||
|
||||
lakitu_zoom(400.f, 0x900);
|
||||
c->nextYaw = update_8_directions_camera(c, c->focus, pos);
|
||||
+ set_camera_height(c, pos[1]);
|
||||
c->pos[0] = pos[0];
|
||||
c->pos[2] = pos[2];
|
||||
sAreaYawChange = sAreaYaw - oldAreaYaw;
|
||||
- set_camera_height(c, pos[1]);
|
||||
}
|
||||
|
||||
+
|
||||
/**
|
||||
* Updates the camera in outward radial mode.
|
||||
* sModeOffsetYaw is calculated in radial_camera_move, which calls offset_yaw_outward_radial
|
||||
@@ -2116,7 +2177,7 @@ s16 update_default_camera(struct Camera *c) {
|
||||
gLakituState.goalPos[1],
|
||||
gLakituState.goalPos[2], &ceil);
|
||||
s16 yawDir;
|
||||
-
|
||||
+
|
||||
handle_c_button_movement(c);
|
||||
vec3f_get_dist_and_angle(sMarioCamState->pos, c->pos, &dist, &pitch, &yaw);
|
||||
|
||||
@@ -3036,6 +3097,8 @@ void update_lakitu(struct Camera *c) {
|
||||
void update_camera(struct Camera *c) {
|
||||
UNUSED u8 unused[24];
|
||||
|
||||
+ extern s16 s8DirModeBaseYaw;
|
||||
+
|
||||
gCamera = c;
|
||||
update_camera_hud_status(c);
|
||||
if (c->cutscene == 0 &&
|
||||
@@ -3046,14 +3109,13 @@ void update_camera(struct Camera *c) {
|
||||
// Only process R_TRIG if 'fixed' is not selected in the menu
|
||||
if (cam_select_alt_mode(0) == CAM_SELECTION_MARIO) {
|
||||
if (gPlayer1Controller->buttonPressed & R_TRIG) {
|
||||
- if (set_cam_angle(0) == CAM_ANGLE_LAKITU) {
|
||||
- set_cam_angle(CAM_ANGLE_MARIO);
|
||||
- } else {
|
||||
+ if (set_cam_angle(0) == CAM_ANGLE_MARIO) {
|
||||
+ s8DirModeBaseYaw = ((gMarioState->faceAngle[1]-0x8000) + 0x1000) & 0xE000;
|
||||
set_cam_angle(CAM_ANGLE_LAKITU);
|
||||
}
|
||||
}
|
||||
}
|
||||
- play_sound_if_cam_switched_to_lakitu_or_mario();
|
||||
+ //play_sound_if_cam_switched_to_lakitu_or_mario();
|
||||
}
|
||||
|
||||
// Initialize the camera
|
||||
@@ -3356,7 +3418,6 @@ void init_camera(struct Camera *c) {
|
||||
struct Surface *floor = 0;
|
||||
Vec3f marioOffset;
|
||||
s32 i;
|
||||
-
|
||||
sCreditsPlayer2Pitch = 0;
|
||||
sCreditsPlayer2Yaw = 0;
|
||||
gPrevLevel = gCurrLevelArea / 16;
|
||||
@@ -4901,15 +4962,15 @@ void play_camera_buzz_if_c_sideways(void) {
|
||||
}
|
||||
|
||||
void play_sound_cbutton_up(void) {
|
||||
- play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource);
|
||||
+ //play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gGlobalSoundSource);
|
||||
}
|
||||
|
||||
void play_sound_cbutton_down(void) {
|
||||
- play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gGlobalSoundSource);
|
||||
+ //play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gGlobalSoundSource);
|
||||
}
|
||||
|
||||
void play_sound_cbutton_side(void) {
|
||||
- play_sound(SOUND_MENU_CAMERA_TURN, gGlobalSoundSource);
|
||||
+ //play_sound(SOUND_MENU_CAMERA_TURN, gGlobalSoundSource);
|
||||
}
|
||||
|
||||
void play_sound_button_change_blocked(void) {
|
||||
@@ -5013,7 +5074,7 @@ s32 radial_camera_input(struct Camera *c, UNUSED f32 unused) {
|
||||
}
|
||||
|
||||
// Zoom in / enter C-Up
|
||||
- if (gPlayer1Controller->buttonPressed & U_CBUTTONS) {
|
||||
+ if (((gPlayer1Controller->buttonPressed & U_CBUTTONS) || (gPlayer2Controller->rawStickY > 40)) && (stickReset) && !(gPlayer1Controller->buttonDown & R_TRIG)) {
|
||||
if (gCameraMovementFlags & CAM_MOVE_ZOOMED_OUT) {
|
||||
gCameraMovementFlags &= ~CAM_MOVE_ZOOMED_OUT;
|
||||
play_sound_cbutton_up();
|
||||
@@ -5023,7 +5084,7 @@ s32 radial_camera_input(struct Camera *c, UNUSED f32 unused) {
|
||||
}
|
||||
|
||||
// Zoom out
|
||||
- if (gPlayer1Controller->buttonPressed & D_CBUTTONS) {
|
||||
+ if ((gPlayer1Controller->buttonPressed & D_CBUTTONS) || (gPlayer2Controller->rawStickY < -40)) {
|
||||
if (gCameraMovementFlags & CAM_MOVE_ZOOMED_OUT) {
|
||||
gCameraMovementFlags |= CAM_MOVE_ALREADY_ZOOMED_OUT;
|
||||
#ifndef VERSION_JP
|
||||
@@ -5035,6 +5096,12 @@ s32 radial_camera_input(struct Camera *c, UNUSED f32 unused) {
|
||||
}
|
||||
}
|
||||
|
||||
+ if ((gPlayer2Controller->rawStickY > 40) || (gPlayer2Controller->rawStickY < -40)) {
|
||||
+ stickReset = 0;
|
||||
+ } else {
|
||||
+ stickReset = 1;
|
||||
+ }
|
||||
+
|
||||
//! returning uninitialized variable
|
||||
return dummy;
|
||||
}
|
||||
@@ -5600,7 +5667,7 @@ void set_camera_mode_8_directions(struct Camera *c) {
|
||||
if (c->mode != CAMERA_MODE_8_DIRECTIONS) {
|
||||
c->mode = CAMERA_MODE_8_DIRECTIONS;
|
||||
sStatusFlags &= ~CAM_FLAG_SMOOTH_MOVEMENT;
|
||||
- s8DirModeBaseYaw = 0;
|
||||
+ s8DirModeBaseYaw = ((gMarioState->faceAngle[1]-0x8000) + 0x1000) & 0xE000;
|
||||
s8DirModeYawOffset = 0;
|
||||
}
|
||||
}
|
||||
diff --git a/src/game/game_init.c b/src/game/game_init.c
|
||||
index 317e33bf..6687016d 100644
|
||||
--- a/src/game/game_init.c
|
||||
+++ b/src/game/game_init.c
|
||||
@@ -51,6 +51,11 @@ u8 gBorderHeight;
|
||||
#ifdef CUSTOM_DEBUG
|
||||
u8 gCustomDebugMode;
|
||||
#endif
|
||||
+u8 gCameraSpeed = 2;
|
||||
+u8 gWaterCamOverride;
|
||||
+u8 gFlyingCamOverride;
|
||||
+u8 gKeepCliffCam;
|
||||
+s32 gCliffTimer;
|
||||
#ifdef EEP
|
||||
s8 gEepromProbe;
|
||||
#endif
|
||||
@@ -739,6 +744,7 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
|
||||
play_music(SEQ_PLAYER_SFX, SEQUENCE_ARGS(0, SEQ_SOUND_PLAYER), 0);
|
||||
set_sound_mode(save_file_get_sound_mode());
|
||||
+ gCameraSpeed = (save_file_get_camera_speed());
|
||||
#ifdef WIDE
|
||||
gWidescreen = save_file_get_widescreen_mode();
|
||||
#endif
|
||||
diff --git a/src/game/game_init.h b/src/game/game_init.h
|
||||
index 84a31755..817c58df 100644
|
||||
--- a/src/game/game_init.h
|
||||
+++ b/src/game/game_init.h
|
||||
@@ -45,6 +45,10 @@ extern u8 gIsConsole;
|
||||
#ifdef WIDE
|
||||
extern s16 gWidescreen;
|
||||
#endif
|
||||
+extern u8 gCameraSpeed;
|
||||
+extern u8 gWaterCamOverride;
|
||||
+extern u8 gFlyingCamOverride;
|
||||
+extern u8 gKeepCliffCam;
|
||||
extern u8 gBorderHeight;
|
||||
#ifdef CUSTOM_DEBUG
|
||||
extern u8 gCustomDebugMode;
|
||||
diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c
|
||||
index 6cbfd8e1..01dd4de8 100644
|
||||
--- a/src/game/ingame_menu.c
|
||||
+++ b/src/game/ingame_menu.c
|
||||
@@ -59,6 +59,12 @@ void *languageTable[][3] =
|
||||
#endif
|
||||
};
|
||||
|
||||
+u8 textCamInfoSlowest[] = { TEXT_CAM_INFO_SLOWEST };
|
||||
+u8 textCamInfoSlow[] = { TEXT_CAM_INFO_SLOW };
|
||||
+u8 textCamInfoMedium[] = { TEXT_CAM_INFO_MEDIUM };
|
||||
+u8 textCamInfoFast[] = { TEXT_CAM_INFO_FAST};
|
||||
+u8 textCamInfoFastest[] = { TEXT_CAM_INFO_FASTEST };
|
||||
+
|
||||
extern u8 gLastCompletedCourseNum;
|
||||
extern u8 gLastCompletedStarNum;
|
||||
|
||||
@@ -1504,6 +1510,45 @@ void reset_red_coins_collected(void) {
|
||||
gRedCoinsCollected = 0;
|
||||
}
|
||||
|
||||
+void render_camera_speed_setting(void) {
|
||||
+ gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
|
||||
+ gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha);
|
||||
+ switch (gCameraSpeed) {
|
||||
+ case 0:
|
||||
+ print_generic_string(190, 20, textCamInfoSlowest);
|
||||
+ break;
|
||||
+ case 1:
|
||||
+ print_generic_string(190, 20, textCamInfoSlow);
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ print_generic_string(190, 20, textCamInfoMedium);
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ print_generic_string(190, 20, textCamInfoFast);
|
||||
+ break;
|
||||
+ case 4:
|
||||
+ print_generic_string(190, 20, textCamInfoFastest);
|
||||
+ break;
|
||||
+ }
|
||||
+ gSPDisplayList(gDisplayListHead++, dl_ia_text_end);
|
||||
+
|
||||
+ if (gPlayer1Controller->buttonPressed & R_JPAD) {
|
||||
+ if (gCameraSpeed < 4) {
|
||||
+ gCameraSpeed += 1;
|
||||
+ } else {
|
||||
+ gCameraSpeed = 0;
|
||||
+ }
|
||||
+ save_file_set_camera_speed(gCameraSpeed);
|
||||
+ } else if (gPlayer1Controller->buttonPressed & L_JPAD) {
|
||||
+ if (gCameraSpeed > 0) {
|
||||
+ gCameraSpeed -= 1;
|
||||
+ } else {
|
||||
+ gCameraSpeed = 4;
|
||||
+ }
|
||||
+ save_file_set_camera_speed(gCameraSpeed);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void change_dialog_camera_angle(void) {
|
||||
if (cam_select_alt_mode(0) == CAM_SELECTION_MARIO) {
|
||||
gDialogCameraAngleIndex = CAM_SELECTION_MARIO;
|
||||
@@ -1942,6 +1987,11 @@ s16 render_pause_courses_and_castle(void) {
|
||||
}
|
||||
#if defined(WIDE) && !defined(PUPPYCAM)
|
||||
render_widescreen_setting();
|
||||
+ render_camera_speed_setting();
|
||||
+ if (gPlayer1Controller->buttonPressed & L_TRIG){
|
||||
+ gWidescreen ^= 1;
|
||||
+ save_file_set_widescreen_mode(gWidescreen);
|
||||
+ }
|
||||
#endif
|
||||
if (gDialogTextAlpha < 250) {
|
||||
gDialogTextAlpha += 25;
|
||||
diff --git a/src/game/mario.c b/src/game/mario.c
|
||||
index 31e97bce..29b5e9c4 100644
|
||||
--- a/src/game/mario.c
|
||||
+++ b/src/game/mario.c
|
||||
@@ -1468,32 +1468,39 @@ void update_mario_inputs(struct MarioState *m) {
|
||||
void set_submerged_cam_preset_and_spawn_bubbles(struct MarioState *m) {
|
||||
f32 heightBelowWater;
|
||||
s16 camPreset;
|
||||
+ extern s16 s8DirModeBaseYaw;
|
||||
+ if (!gWaterCamOverride) {
|
||||
+ if ((m->action & ACT_GROUP_MASK) == ACT_GROUP_SUBMERGED) {
|
||||
+ heightBelowWater = (f32)(m->waterLevel - 80) - m->pos[1];
|
||||
+ camPreset = m->area->camera->mode;
|
||||
+ if (m->action & ACT_FLAG_METAL_WATER) {
|
||||
+ if (camPreset != CAMERA_MODE_CLOSE) {
|
||||
+ set_camera_mode(m->area->camera, CAMERA_MODE_CLOSE, 1);
|
||||
+ }
|
||||
+ } else {
|
||||
+ if ((heightBelowWater > 800.0f) && (camPreset != CAMERA_MODE_BEHIND_MARIO)) {
|
||||
+ set_camera_mode(m->area->camera, CAMERA_MODE_BEHIND_MARIO, 1);
|
||||
+ }
|
||||
|
||||
- if ((m->action & ACT_GROUP_MASK) == ACT_GROUP_SUBMERGED) {
|
||||
- heightBelowWater = (f32)(m->waterLevel - 80) - m->pos[1];
|
||||
- camPreset = m->area->camera->mode;
|
||||
-
|
||||
- if (m->action & ACT_FLAG_METAL_WATER) {
|
||||
- if (camPreset != CAMERA_MODE_CLOSE) {
|
||||
- set_camera_mode(m->area->camera, CAMERA_MODE_CLOSE, 1);
|
||||
- }
|
||||
- } else {
|
||||
- if ((heightBelowWater > 800.0f) && (camPreset != CAMERA_MODE_BEHIND_MARIO)) {
|
||||
- set_camera_mode(m->area->camera, CAMERA_MODE_BEHIND_MARIO, 1);
|
||||
- }
|
||||
-
|
||||
- if ((heightBelowWater < 400.0f) && (camPreset != CAMERA_MODE_WATER_SURFACE)) {
|
||||
- set_camera_mode(m->area->camera, CAMERA_MODE_WATER_SURFACE, 1);
|
||||
- }
|
||||
+ if ((heightBelowWater < 400.0f) && (camPreset != CAMERA_MODE_WATER_SURFACE)) {
|
||||
+ set_camera_mode(m->area->camera, CAMERA_MODE_WATER_SURFACE, 1);
|
||||
+ }
|
||||
|
||||
- // As long as Mario isn't drowning or at the top
|
||||
- // of the water with his head out, spawn bubbles.
|
||||
- if (!(m->action & ACT_FLAG_INTANGIBLE)) {
|
||||
- if ((m->pos[1] < (f32)(m->waterLevel - 160)) || (m->faceAngle[0] < -0x800)) {
|
||||
- m->particleFlags |= PARTICLE_BUBBLE;
|
||||
+ // As long as Mario isn't drowning or at the top
|
||||
+ // of the water with his head out, spawn bubbles.
|
||||
+ if (!(m->action & ACT_FLAG_INTANGIBLE)) {
|
||||
+ if ((m->pos[1] < (f32)(m->waterLevel - 160)) || (m->faceAngle[0] < -0x800)) {
|
||||
+ m->particleFlags |= PARTICLE_BUBBLE;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
+ } else {
|
||||
+ set_camera_mode(m->area->camera, CAMERA_MODE_8_DIRECTIONS, 1);
|
||||
+ }
|
||||
+ if ((gPlayer1Controller->buttonPressed & R_TRIG) && (m->action & ACT_FLAG_SWIMMING)) {
|
||||
+ s8DirModeBaseYaw = ((gMarioState->faceAngle[1]-0x8000) + 0x1000) & 0xE000;
|
||||
+ gWaterCamOverride ^= 1;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c
|
||||
index ce6467ef..c7e998c1 100644
|
||||
--- a/src/game/mario_actions_airborne.c
|
||||
+++ b/src/game/mario_actions_airborne.c
|
||||
@@ -1736,6 +1736,10 @@ s32 act_shot_from_cannon(struct MarioState *m) {
|
||||
s32 act_flying(struct MarioState *m) {
|
||||
s16 startPitch = m->faceAngle[0];
|
||||
|
||||
+ if (gPlayer1Controller->buttonPressed & R_TRIG) {
|
||||
+ gFlyingCamOverride ^= 1;
|
||||
+ }
|
||||
+
|
||||
if (m->input & INPUT_Z_PRESSED) {
|
||||
if (m->area->camera->mode == CAMERA_MODE_BEHIND_MARIO) {
|
||||
set_camera_mode(m->area->camera, m->area->camera->defMode, 1);
|
||||
@@ -1750,8 +1754,10 @@ s32 act_flying(struct MarioState *m) {
|
||||
return set_mario_action(m, ACT_FREEFALL, 0);
|
||||
}
|
||||
|
||||
- if (m->area->camera->mode != CAMERA_MODE_BEHIND_MARIO) {
|
||||
+ if (!gFlyingCamOverride) {
|
||||
set_camera_mode(m->area->camera, CAMERA_MODE_BEHIND_MARIO, 1);
|
||||
+ } else {
|
||||
+ set_camera_mode(m->area->camera, CAMERA_MODE_8_DIRECTIONS, 1);
|
||||
}
|
||||
|
||||
if (m->actionState == 0) {
|
||||
@@ -1933,7 +1939,7 @@ s32 act_flying_triple_jump(struct MarioState *m) {
|
||||
}
|
||||
|
||||
if (m->vel[1] < 4.0f) {
|
||||
- if (m->area->camera->mode != CAMERA_MODE_BEHIND_MARIO) {
|
||||
+ if ((m->area->camera->mode != CAMERA_MODE_BEHIND_MARIO) && (!gFlyingCamOverride)) {
|
||||
set_camera_mode(m->area->camera, CAMERA_MODE_BEHIND_MARIO, 1);
|
||||
}
|
||||
|
||||
@@ -1944,7 +1950,7 @@ s32 act_flying_triple_jump(struct MarioState *m) {
|
||||
set_mario_action(m, ACT_FLYING, 1);
|
||||
}
|
||||
|
||||
- if (m->actionTimer++ == 10 && m->area->camera->mode != CAMERA_MODE_BEHIND_MARIO) {
|
||||
+ if (m->actionTimer++ == 10 && m->area->camera->mode != CAMERA_MODE_BEHIND_MARIO && (!gFlyingCamOverride)) {
|
||||
set_camera_mode(m->area->camera, CAMERA_MODE_BEHIND_MARIO, 1);
|
||||
}
|
||||
|
||||
diff --git a/src/game/save_file.c b/src/game/save_file.c
|
||||
index bcdcdbaf..3f0b8ca1 100644
|
||||
--- a/src/game/save_file.c
|
||||
+++ b/src/game/save_file.c
|
||||
@@ -673,6 +673,12 @@ u8 save_file_get_widescreen_mode(void) {
|
||||
return gSaveBuffer.menuData[0].wideMode;
|
||||
}
|
||||
|
||||
+void save_file_set_camera_speed(u8 speed) {
|
||||
+ gSaveBuffer.menuData[0].cameraSpeedSetting = speed;
|
||||
+ gMainMenuDataModified = TRUE;
|
||||
+ save_main_menu_data();
|
||||
+}
|
||||
+
|
||||
void save_file_set_widescreen_mode(u8 mode) {
|
||||
gSaveBuffer.menuData[0].wideMode = mode;
|
||||
|
||||
@@ -685,6 +691,10 @@ u16 save_file_get_sound_mode(void) {
|
||||
return gSaveBuffer.menuData[0].soundMode;
|
||||
}
|
||||
|
||||
+u8 save_file_get_camera_speed(void) {
|
||||
+ return gSaveBuffer.menuData[0].cameraSpeedSetting;
|
||||
+}
|
||||
+
|
||||
void save_file_move_cap_to_default_location(void) {
|
||||
if (save_file_get_flags() & SAVE_FLAG_CAP_ON_GROUND) {
|
||||
switch (gSaveBuffer.files[gCurrSaveFileNum - 1][0].capLevel) {
|
||||
diff --git a/src/game/save_file.h b/src/game/save_file.h
|
||||
index 64cf0c63..085ec1d9 100644
|
||||
--- a/src/game/save_file.h
|
||||
+++ b/src/game/save_file.h
|
||||
@@ -63,6 +63,7 @@ struct MainMenuSaveData
|
||||
#ifdef WIDE
|
||||
u8 wideMode: 1;
|
||||
#endif
|
||||
+ u8 cameraSpeedSetting: 3;
|
||||
|
||||
#ifdef VERSION_EU
|
||||
u8 language: 2;
|
||||
@@ -178,6 +179,8 @@ u16 save_file_get_sound_mode(void);
|
||||
u8 save_file_get_widescreen_mode(void);
|
||||
void save_file_set_widescreen_mode(u8 mode);
|
||||
#endif
|
||||
+u8 save_file_get_camera_speed(void);
|
||||
+void save_file_set_camera_speed(u8 speed);
|
||||
void save_file_move_cap_to_default_location(void);
|
||||
|
||||
void disable_warp_checkpoint(void);
|
||||
+3
-1
@@ -20,6 +20,8 @@ def read_local_asset_list(f):
|
||||
|
||||
|
||||
def asset_needs_update(asset, version):
|
||||
if version <= 6 and asset in ["actors/king_bobomb/king_bob-omb_eyes.rgba16.png", "actors/king_bobomb/king_bob-omb_hand.rgba16.png"]:
|
||||
return True
|
||||
if version <= 5 and asset == "textures/spooky/bbh_textures.00800.rgba16.png":
|
||||
return True
|
||||
if version <= 4 and asset in ["textures/mountain/ttm_textures.01800.rgba16.png", "textures/mountain/ttm_textures.05800.rgba16.png"]:
|
||||
@@ -59,7 +61,7 @@ def clean_assets(local_asset_file):
|
||||
def main():
|
||||
# In case we ever need to change formats of generated files, we keep a
|
||||
# revision ID in the local asset file.
|
||||
new_version = 6
|
||||
new_version = 7
|
||||
|
||||
try:
|
||||
local_asset_file = open(".assets-local.txt")
|
||||
|
||||
+2
-2
@@ -10,10 +10,10 @@ endif
|
||||
# Strip gzip header
|
||||
$(BUILD_DIR)/%.szp: $(BUILD_DIR)/%.gz
|
||||
$(call print,Converting:,$<,$@)
|
||||
$(V)dd bs=10 skip=1 if=$< of=$(<:.gz=.gz.strip)
|
||||
$(V)dd bs=10 skip=1 if=$< of=$(<:.gz=.gz.strip) status=none
|
||||
$(V)$(FILESIZER) $(<:.gz=.gz.strip) $@ `stat --format="%s" $(<:.gz=.bin)`
|
||||
|
||||
# convert binary szp to object file
|
||||
$(BUILD_DIR)/%.szp.o: $(BUILD_DIR)/%.szp
|
||||
$(call print,Converting GZIP to ELF:,$<,$@)
|
||||
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@
|
||||
$(V)$(LD) -r -b binary $< -o $@
|
||||
@@ -261,7 +261,7 @@ extern const BehaviorScript bhvBoo[];
|
||||
extern const BehaviorScript bhvMerryGoRoundBoo[];
|
||||
extern const BehaviorScript bhvGhostHuntBoo[];
|
||||
extern const BehaviorScript bhvHiddenStaircaseStep[];
|
||||
extern const BehaviorScript bhvBooBossSpawnedBridge[];
|
||||
extern const BehaviorScript bhvBooStaircase[];
|
||||
extern const BehaviorScript bhvBbhTiltingTrapPlatform[];
|
||||
extern const BehaviorScript bhvHauntedBookshelf[];
|
||||
extern const BehaviorScript bhvMeshElevator[];
|
||||
|
||||
+81
-30
@@ -1,13 +1,13 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
// ULTRASM64-EXTBOUNDS CONFIG FLAGS NEAR BOTTOM
|
||||
// HACKERSM64 CONFIG DEFINES NEAR BOTTOM
|
||||
/**
|
||||
* @file config.h
|
||||
* A catch-all file for configuring various bugfixes and other settings (maybe eventually) in SM64
|
||||
*/
|
||||
|
||||
// Bug Fixes
|
||||
// --| US Version Nintendo Bug Fixes
|
||||
// --| Post-JP Version Nintendo Bug Fixes
|
||||
/// Fixes bug where obtaining over 999 coins sets the number of lives to 999 (or -25)
|
||||
#define BUGFIX_MAX_LIVES (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
/// Fixes bug where the Boss music won't fade out after defeating King Bob-omb
|
||||
@@ -21,6 +21,16 @@
|
||||
#define BUGFIX_PIRANHA_PLANT_SLEEP_DAMAGE (0 || VERSION_US || VERSION_SH)
|
||||
/// Fixes bug where it shows a star when you grab a key in bowser battle stages
|
||||
#define BUGFIX_STAR_BOWSER_KEY (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
/// Fixes bug that enables Mario in time stop even if is not ready to speak
|
||||
#define BUGFIX_DIALOG_TIME_STOP (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
/// Fixes bug that causes Mario to still collide with Bowser in BITS after his defeat
|
||||
#define BUGFIX_BOWSER_COLLIDE_BITS_DEAD (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
/// Fixes bug where Bowser wouldn't reset his speed when fallen off (and adds missing checks)
|
||||
#define BUGFIX_BOWSER_FALLEN_OFF_STAGE (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
/// Fixes bug where Bowser would look weird while fading out
|
||||
#define BUGFIX_BOWSER_FADING_OUT (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
/// Removes multi-language cake screen
|
||||
#define EU_CUSTOM_CAKE_FIX 1
|
||||
|
||||
// Support Rumble Pak
|
||||
// Currently not recommended, as it may cause random crashes.
|
||||
@@ -35,20 +45,25 @@
|
||||
|
||||
// Border Height Define for NTSC Versions
|
||||
#ifdef TARGET_N64
|
||||
#ifndef VERSION_EU
|
||||
#define BORDER_HEIGHT 0
|
||||
#else
|
||||
#define BORDER_HEIGHT 0
|
||||
#endif
|
||||
#else
|
||||
// What's the point of having a border?
|
||||
#define BORDER_HEIGHT 0
|
||||
// Size of the black border at the top and bottom of the screen. You can set it to different values for console and emulator.
|
||||
// There is generally no reason to have a value other than 0 for emulator. As for console, it provides a (small) performance boost.
|
||||
#define BORDER_HEIGHT_CONSOLE 0
|
||||
#define BORDER_HEIGHT_EMULATOR 0
|
||||
|
||||
#endif
|
||||
|
||||
// -- ultrasm64-extbounds specific settings --
|
||||
// -- HackerSM64 specific settings --
|
||||
|
||||
// TEST LEVEL
|
||||
// Uncomment this define and set a test level in order to boot straight into said level.
|
||||
// This allows you to quickly test the level you're working on.
|
||||
// If you want the game to boot normally, just comment out the define again.
|
||||
//#define TEST_LEVEL LEVEL_BOB
|
||||
|
||||
// COMMON HACK CHANGES
|
||||
// Internal ROM name. NEEDS TO BE **EXACTLY** 20 CHARACTERS. Can't be 19 characters, can't be 21 characters. You can fill it with spaces.
|
||||
// The end quote should be here: "
|
||||
#define INTERNAL_ROM_NAME "SUPERMARIO64 "
|
||||
// Disable lives and hide the lives counter
|
||||
#define DISABLE_LIVES
|
||||
// Skip peach letter cutscene
|
||||
@@ -57,41 +72,57 @@
|
||||
#define CASTLE_MUSIC_FIX
|
||||
// Remove course specific camera processing
|
||||
#define CAMERA_FIX
|
||||
// Change the movement speed when hanging from a ceiling (the vanilla value is 4.f)
|
||||
#define HANGING_SPEED 12.f
|
||||
// Makes Mario face the direction of the analog stick directly while hanging from a ceiling, without doing "semicircles"
|
||||
#define TIGHTER_HANGING_CONTROLS
|
||||
// Makes Mario turn around instantly when moving on the ground
|
||||
//#define SUPER_RESPONSIVE_CONTROLS
|
||||
// Disables fall damage
|
||||
#define NO_FALL_DAMAGE
|
||||
// Disables the scream that mario makes when falling off a great height (this is separate from actual fall damage)
|
||||
//#define NO_FALL_DAMAGE_SOUND
|
||||
// Number of coins to spawn the "100 coin" star. If you remove the define altogether, then there won't be a 100 coin star at all.
|
||||
#define X_COIN_STAR 100
|
||||
// Platform displacement 2 also known as momentum patch. Makes Mario keep the momemtum from moving platforms. Breaks treadmills.
|
||||
// Platform displacement 2 also known as momentum patch. Makes Mario keep the momemtum from moving platforms. Doesn't break treadmills anymore!
|
||||
#define PLATFORM_DISPLACEMENT_2
|
||||
// Stars don't kick you out of the level
|
||||
// #define NON_STOP_STARS
|
||||
//#define NON_STOP_STARS
|
||||
// Uncomment this if you want global star IDs (useful for creating an open world hack ala MVC)
|
||||
//#define GLOBAL_STAR_IDS
|
||||
// Uncomment this if you want to skip the title screen (Super Mario 64 logo)
|
||||
//#define SKIP_TITLE_SCREEN
|
||||
// Uncomment this if you want to keep the mario head and not skip it
|
||||
//#define KEEP_MARIO_HEAD
|
||||
// Makes the coins ia8 64x64 instead of ia16 32x32. Uses new i8 textures so that vanilla coins look better.
|
||||
#define IA8_COINS
|
||||
|
||||
|
||||
// HACKER QOL
|
||||
// Enable widescreen (16:9) support
|
||||
#define WIDE
|
||||
// When this option is enabled, LODs will ONLY work on console.
|
||||
// When this option is disabled, LODs will work regardless of whether console or emulator is used.
|
||||
// Regardless of whether this setting is enabled or not, you can use gIsConsole to wrap your own code in a console check.
|
||||
#define AUTO_LOD
|
||||
// Increase the maximum pole length (it will treat bparam1 and bparam2 as a single value)
|
||||
#define LONGER_POLES
|
||||
// Disable AA (Recommended: it changes nothing on emulator, and it makes console run better)
|
||||
#define DISABLE_AA
|
||||
// Enables "parallel lakitu camera" or "aglab cam" which lets you move the camera smoothly with the dpad
|
||||
#define PARALLEL_LAKITU_CAM
|
||||
// Allows Mario to ledgegrab sloped floors
|
||||
#define NO_FALSE_LEDGEGRABS
|
||||
// Adds multiple languages to the game. Just a placeholder for the most part, because it only works with EU, and must be enabled with EU.
|
||||
#define MULTILANG (0 || VERSION_EU)
|
||||
// Enables Puppy Camera 2, a rewritten camera that can be freely configured and modified.
|
||||
//#define PUPPYCAM
|
||||
// Automatically calculate the optimal collision distance for an object based on its vertices.
|
||||
#define AUTO_COLLISION_DISTANCE
|
||||
|
||||
|
||||
// HACKER QOL
|
||||
// Increase the maximum pole length (it will treat bparam1 and bparam2 as a single value)
|
||||
#define LONGER_POLES
|
||||
// Number of possible unique model ID's (keep it higher than 256)
|
||||
#define MODEL_ID_COUNT 256
|
||||
// Increase audio heap size to allow for more concurrent notes to be played and for more custom sequences/banks to be imported (does nothing with EU and SH versions)
|
||||
#define EXPAND_AUDIO_HEAP
|
||||
// Allow all surfaces types to have force, (doesn't require setting force, just allows it to be optional).
|
||||
#define ALL_SURFACES_HAVE_FORCE
|
||||
// Custom debug mode. Press DPAD left to show the debug UI. Press DPAD right to enter the noclip mode.
|
||||
//#define CUSTOM_DEBUG
|
||||
// Include Puppyprint, a display library for text and large images. Also includes a custom, enhanced performance profiler.
|
||||
//#define PUPPYPRINT
|
||||
#define PUPPYPRINT_DEBUG 0
|
||||
// Visual debug enables some collision visuals. Tapping Right on the dpad will cycle between visual hitboxes, visual surfaces, both, and neither.
|
||||
// If puppyprint is enabled, then this can be cycled only while the screen is active.
|
||||
//#define VISUAL_DEBUG
|
||||
|
||||
// BUG/GAME QOL FIXES
|
||||
// Fix instant warp offset not working when warping across different areas
|
||||
@@ -122,9 +153,29 @@
|
||||
#define EXIT_COURSE_NODE 0x1F
|
||||
|
||||
// OTHER ENHANCEMENTS
|
||||
//Skybox size modifier, changing this will add support for larger skybox images. NOTE: Vanilla skyboxes may break if you change this option. Be sure to rescale them accordingly.
|
||||
//Whenever you change this, make sure to run "make -C tools clean" to rebuild the skybox tool (alternatively go into skyconv.c and change the file in any way (like adding/deleting a space) to specifically rebuild that tool).
|
||||
// Enable widescreen (16:9) support
|
||||
#define WIDE
|
||||
// Skybox size modifier, changing this will add support for larger skybox images. NOTE: Vanilla skyboxes may break if you change this option. Be sure to rescale them accordingly.
|
||||
// Whenever you change this, make sure to run "make -C tools clean" to rebuild the skybox tool (alternatively go into skyconv.c and change the file in any way (like adding/deleting a space) to specifically rebuild that tool).
|
||||
// When increasing this, you should probably also increase the GFX pool size. (the GFX_POOL_SIZE define in src/game/game_init.h)
|
||||
#define SKYBOX_SIZE 1
|
||||
// When this option is enabled, LODs will ONLY work on console.
|
||||
// When this option is disabled, LODs will work regardless of whether console or emulator is used.
|
||||
// Regardless of whether this setting is enabled or not, you can use gIsConsole to wrap your own code in a console check.
|
||||
#define AUTO_LOD
|
||||
// Disable AA (Recommended: it changes nothing on emulator, and it makes console run better)
|
||||
#define DISABLE_AA
|
||||
// Makes the coins ia8 64x64 instead of ia16 32x32. Uses new ia8 textures so that vanilla coins look better.
|
||||
#define IA8_COINS
|
||||
// Use a much better implementation of reverb over vanilla's fake echo reverb. Great for caves or eerie levels, as well as just a better audio experience in general.
|
||||
// Reverb parameters can be configured in audio/synthesis.c to meet desired aesthetic/performance needs. Currently US/JP only.
|
||||
//#define BETTER_REVERB
|
||||
// Collision data is the type that the collision system uses. All data by default is stored as an s16, but you may change it to s32.
|
||||
// Naturally, that would double the size of all collision data, but would allow you to use 32 bit values instead of 16.
|
||||
// Rooms are s8 in vanilla, but if you somehow have more than 255 rooms, you may raise this number.
|
||||
// Currently, they *must* say as s8, because the room tables generated by literally anything are explicitly u8 and don't use a macro, making this currently infeasable.
|
||||
#define COLLISION_DATA_TYPE s16
|
||||
#define ROOM_DATA_TYPE s8
|
||||
|
||||
// If you want to change the extended boundaries mode, go to engine/extended_bounds.h and change EXTENDED_BOUNDS_MODE
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define DIALOG_IDS_H
|
||||
|
||||
enum DialogId {
|
||||
DIALOG_NONE = -1,
|
||||
DIALOG_000,
|
||||
DIALOG_001,
|
||||
DIALOG_002,
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
// EU changes most text to arrays for each language. This define allows these
|
||||
// differences to be combined.
|
||||
#ifdef VERSION_EU
|
||||
#define LANGUAGE_ARRAY(cmd) cmd[LANGUAGE_FUNCTION]
|
||||
//#define LANGUAGE_ARRAY(cmd) cmd[LANGUAGE_FUNCTION]
|
||||
#define LANGUAGE_ARRAY(cmd) cmd
|
||||
#else
|
||||
#define LANGUAGE_ARRAY(cmd) cmd
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
#ifndef __FARCALL_H__
|
||||
#define __FARCALL_H__
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define farcall(x) x
|
||||
#define far __attribute__(( long_call ))
|
||||
#pragma GCC diagnostic ignored "-Wattributes" // Workaround for a bug that produces errant warnings in gcc
|
||||
#define near __attribute(( near ))
|
||||
#else
|
||||
#define farcall(x) (*(&(x)))
|
||||
#define far
|
||||
#define near
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
How to use:
|
||||
|
||||
Simply place any code you want in any groupX_geo.c or any level's script.c (see the first note for a potential gotcha when using code in level script segments).
|
||||
|
||||
To call segment code from normal code or vice versa (or segment code from other segmented code)
|
||||
- Add `#include "farcall.h"` to the given file
|
||||
- Declare any functions that are not in that file like so (with far)
|
||||
`far void print_text(s32, s32, const char*);`
|
||||
- Call any functions that are not in the file like so:
|
||||
`farcall(print_text)(10, 10 "test");`
|
||||
|
||||
If you forget any of the above 3 steps, you will get an error during linking your ROM that looks something like:
|
||||
`script.c:(.text+0x24): relocation truncated to fit: R_MIPS_26 against ...`
|
||||
So if you see that error, make sure you've followed the above three steps.
|
||||
|
||||
If you're using gcc, you don't need to use farcall to call far functions, as declaring a function as far is enough.
|
||||
|
||||
Additionally if using gcc, you don't need to declare any functions as far in segmented code due to a change in the makefile.
|
||||
Instead, you can declare local functions as `near` to optimize local calls, but this is not required.
|
||||
|
||||
If you have code in a groupX_geo.c file, you must load it in level scripts by doing LOAD_RAW_WITH_CODE instead of the normal LOAD_RAW.
|
||||
This has two extra arguments, which should be passed as `_groupX_geoSegmentNoloadStart` and `_groupX_geoSegmentNoloadEnd`.
|
||||
For example, if you added code to group3's geo segment:
|
||||
|
||||
LOAD_RAW_WITH_CODE(0x0C, _group3_geoSegmentRomStart, _group3_geoSegmentRomEnd, _group3_geoSegmentNoloadStart, _group3_geoSegmentNoloadEnd),
|
||||
|
||||
For convenience, included is a new header: src/game/obj_behaviors_2_nonstatic.h. In addition to effectively removing
|
||||
the static keyword from object_behaviors_2.c, this header defines prototypes for all functions in that file. This
|
||||
allows you to reference those functions elsewhere, which is convenient for segmented behavior callbacks.
|
||||
|
||||
Notes:
|
||||
- As of right now, Fast64 will not retain LOAD_RAW_WITH_CODE commands in the level script.
|
||||
This means that you will have to readd those on each export, but this may change in a future Fast64 version.
|
||||
The same is true for any code in the level file, so I suggest making a code.inc.c file in the level's folder
|
||||
and adding an `#include "levels/x/code.inc.c"` into the level script file.
|
||||
That include will also be wiped on each export, but is easy enough to add after an export.
|
||||
- Variables in segments will get reset to their defaults every time a segment is loaded.
|
||||
Use variables declared in normal code and extern them if this isn't desirable.
|
||||
- Because of the limited number of TLB entries, at most 256kB of segmented memory can be mapped with this patch.
|
||||
If you want to be sure that everything is being mapped, use the TLB entries view in PJ64 2.4's debugger.
|
||||
- TLB mapping requires at least 4kB alignment, so memory allocations for segments with code are automatically padded to meet this alignment.
|
||||
This means that potentially up to 4kB of RAM can be wasted when a given segment with code is loaded.
|
||||
This should be far less than the potential savings from using this patch, but is something that should be kept in mind.
|
||||
*/
|
||||
+192
-37
@@ -56,13 +56,14 @@
|
||||
|
||||
#define A_ADDMIXER 4
|
||||
#define A_RESAMPLE_ZOH 6
|
||||
#define A_INTERL 17
|
||||
#define A_DMEMMOVE2 16
|
||||
#define A_DOWNSAMPLE_HALF 17
|
||||
#define A_ENVSETUP1 18
|
||||
#define A_ENVMIXER 19
|
||||
#define A_LOADBUFF 20
|
||||
#define A_SAVEBUFF 21
|
||||
#define A_ENVSETUP2 22
|
||||
#define A_UNK_23 23
|
||||
#define A_S8DEC 23
|
||||
#define A_HILOGAIN 24
|
||||
#define A_UNK_25 25
|
||||
#define A_DUPLICATE 26
|
||||
@@ -306,6 +307,8 @@ typedef short ENVMIX_STATE[40];
|
||||
* address is later used as parameter, the 8 high bits will be an index
|
||||
* to the segment table and the lower 24 bits are added to the base address
|
||||
* stored in the segment table for this entry. The result is the physical address.
|
||||
* With the newer rsp audio code, this segment table is not used. The address is
|
||||
* used directly instead.
|
||||
*
|
||||
* Transfers to/from DRAM are executed using DMA and hence follow these restrictions:
|
||||
* All DRAM addresses should be aligned by 8 bytes, or they will be
|
||||
@@ -349,14 +352,6 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (uintptr_t)(s); \
|
||||
}
|
||||
|
||||
#define aADPCM_23(pkt, f, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_UNK_23, 24, 8) | _SHIFTL(f, 16, 8); \
|
||||
_a->words.w1 = (uintptr_t)(s); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Not used in SM64.
|
||||
*/
|
||||
@@ -570,15 +565,6 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
|
||||
}
|
||||
|
||||
#define aInterl(pkt, f, i, o, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_INTERL, 24, 8) | _SHIFTL(f, 16, 8) | \
|
||||
_SHIFTL(i, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets internal volume parameters.
|
||||
* See aEnvMixer for more info.
|
||||
@@ -663,12 +649,50 @@ typedef short ENVMIX_STATE[40];
|
||||
#undef aEnvMixer
|
||||
#undef aInterleave
|
||||
|
||||
// New or modified operations in the new audio microcode below
|
||||
|
||||
/**
|
||||
* Decompresses S8 data.
|
||||
* Possible flags: A_INIT and A_LOOP.
|
||||
*
|
||||
* First set up internal data in DMEM:
|
||||
* aSetLoop(cmd++, physicalAddressOfLoopState) (if A_LOOP is set)
|
||||
*
|
||||
* Then before this command, call:
|
||||
* aSetBuffer(cmd++, 0, in, out, count)
|
||||
*
|
||||
* Note: count will be rounded up to the nearest multiple of 32 bytes.
|
||||
*
|
||||
* S8 decompression works by expanding s8 bytes into s16 numbers,
|
||||
* by performing a left shift of 8 steps.
|
||||
*
|
||||
* Before the algorithm starts, the previous 16 samples are loaded according to flag:
|
||||
* A_INIT: all zeros
|
||||
* A_LOOP: the address set by aSetLoop
|
||||
* no flags: the DRAM address in the s parameter
|
||||
* These 16 samples are immediately copied to the destination address.
|
||||
*
|
||||
* The result of "count" bytes will be written after these 16 initial samples.
|
||||
* The last 16 samples written to the destination will also be written to
|
||||
* the state address in DRAM.
|
||||
*/
|
||||
#define aS8Dec(pkt, f, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_S8DEC, 24, 8) | _SHIFTL(f, 16, 8); \
|
||||
_a->words.w1 = (uintptr_t)(s); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Mix two tracks by simple clamped addition.
|
||||
*
|
||||
* s: DMEM source track 1
|
||||
* d: DMEM source track 2 and destination
|
||||
* c: number of bytes to write (rounded down to 16 byte alignment)
|
||||
* c: number of bytes to write
|
||||
*
|
||||
* Note: count is first rounded down to the nearest multiple of 16 bytes
|
||||
* and then rounded up to the nearest multiple of 64 bytes.
|
||||
*/
|
||||
#define aAddMixer(pkt, s, d, c) \
|
||||
{ \
|
||||
@@ -726,6 +750,28 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (_SHIFTL(d, 16, 16) | _SHIFTL(0x80, 0, 16)); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Copies memory in DMEM, second version.
|
||||
*
|
||||
* Copies t * c bytes from address i to address o.
|
||||
*
|
||||
* Note: count is first rounded up to the nearest multiple of 32 bytes,
|
||||
* before the multiplication by t.
|
||||
*
|
||||
* Note: This acts as memcpy where 32 bytes are moved at a time, therefore
|
||||
* if input and output overlap, output address should be less than input address.
|
||||
*
|
||||
* Not used in SM64.
|
||||
*/
|
||||
#define aDMEMMove2(pkt, t, i, o, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_DMEMMOVE2, 24, 8) | \
|
||||
_SHIFTL(t, 16, 8) | _SHIFTL(i, 0, 16); \
|
||||
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Fast resample.
|
||||
*
|
||||
@@ -734,14 +780,37 @@ typedef short ENVMIX_STATE[40];
|
||||
*
|
||||
* This works like the other resample command but just takes the "nearest" sample,
|
||||
* instead of a function of the four nearest samples.
|
||||
*
|
||||
* Initially the current position is calculated as (in << 16) + startFract.
|
||||
* For every sample to create, the value is simply taken from the sample
|
||||
* at address ((position >> 17) << 1). Then the current position is incremented
|
||||
* by (pitch << 2).
|
||||
*
|
||||
* Note: count represents the number of output bytes to create, and is
|
||||
* rounded up to the nearest multiple of 8 bytes.
|
||||
*/
|
||||
#define aResampleZoh(pkt, pitch, start_fract) \
|
||||
#define aResampleZoh(pkt, pitch, startFract) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_RESAMPLE_ZOH, 24, 8) | \
|
||||
_SHIFTL(pitch, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(start_fract, 0, 16); \
|
||||
_a->words.w1 = _SHIFTL(startFract, 0, 16); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Fast downsampling by taking every other sample, discarding others.
|
||||
*
|
||||
* Note: nSamples refers to the number of output samples to create, and
|
||||
* is first rounded up to the nearest multiple of 8.
|
||||
*/
|
||||
#define aDownsampleHalf(pkt, nSamples, i, o) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_DOWNSAMPLE_HALF, 24, 8) | \
|
||||
_SHIFTL(nSamples, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -764,39 +833,87 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
|
||||
}
|
||||
|
||||
#define aEnvSetup1(pkt, a, b, c, d) \
|
||||
/*
|
||||
* See aEnvMixer for more info.
|
||||
*/
|
||||
#define aEnvSetup1(pkt, initialVolReverb, rampReverb, rampLeft, rampRight) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_ENVSETUP1, 24, 8) | \
|
||||
_SHIFTL(a, 16, 8) | _SHIFTL(b, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(c, 16, 16) | _SHIFTL(d, 0, 16); \
|
||||
_SHIFTL(initialVolReverb, 16, 8) | \
|
||||
_SHIFTL(rampReverb, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(rampLeft, 16, 16) | \
|
||||
_SHIFTL(rampRight, 0, 16); \
|
||||
}
|
||||
|
||||
#define aEnvSetup2(pkt, volLeft, volRight) \
|
||||
/*
|
||||
* See aEnvMixer for more info.
|
||||
*/
|
||||
#define aEnvSetup2(pkt, initialVolLeft, initialVolRight) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_ENVSETUP2, 24, 8); \
|
||||
_a->words.w1 = _SHIFTL(volLeft, 16, 16) | \
|
||||
_SHIFTL(volRight, 0, 16); \
|
||||
_a->words.w1 = _SHIFTL(initialVolLeft, 16, 16) | \
|
||||
_SHIFTL(initialVolRight, 0, 16); \
|
||||
}
|
||||
|
||||
#define aEnvMixer(pkt, inBuf, nSamples, bit1, bit2, bit3, dryLeft, dryRight, wetLeft, wetRight) \
|
||||
/*
|
||||
* Mixes an envelope with mono sound into 4 channels.
|
||||
*
|
||||
* To allow for many parameters, a sequence of aEnvSetup1, aEnvSetup2,
|
||||
* aEnvMixer shall always be called.
|
||||
*
|
||||
* The function works in blocks of 8 samples.
|
||||
* However, nSamples is rounded up to the nearest multiple of 16 samples.
|
||||
*
|
||||
* For each sample in a block:
|
||||
* 1. sampleLeft = in * volLeft * (negLeft ? -1 : 1)
|
||||
* 2. sampleRight = in * volRight * (negRight ? -1 : 1)
|
||||
* 3. dryLeft += sampleLeft
|
||||
* 4. dryRight += sampleRight
|
||||
* 5. if swapReverb: swap sampleLeft and sampleRight
|
||||
* 6. wetLeft += sampleLeft * volReverb
|
||||
* 7. wetRight += sampleRight * volReverb
|
||||
*
|
||||
* After each block, all vol variables are added by their corresponding
|
||||
* ramp value.
|
||||
*
|
||||
* Each volume variable is treated as a UQ0.16 number. Make sure
|
||||
* the ramp additions don't overflow, or wrapping will occur.
|
||||
* The initialVolReverb parameter is only 8 bits, but will be left
|
||||
* shifted 8 bits by the rsp.
|
||||
*/
|
||||
#define aEnvMixer(pkt, inBuf, nSamples, swapReverb, negLeft, negRight, \
|
||||
dryLeft, dryRight, wetLeft, wetRight) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_ENVMIXER, 24, 8) | \
|
||||
_SHIFTL((inBuf) >> 4, 16, 8) | \
|
||||
_SHIFTL(nSamples, 8, 8)) | \
|
||||
_SHIFTL(bit1, 2, 1) | _SHIFTL(bit2, 1, 1) | \
|
||||
_SHIFTL(bit3, 0, 1); \
|
||||
_SHIFTL(swapReverb, 2, 1) | _SHIFTL(negLeft, 1, 1) |\
|
||||
_SHIFTL(negRight, 0, 1); \
|
||||
_a->words.w1 = _SHIFTL((dryLeft) >> 4, 24, 8) | \
|
||||
_SHIFTL((dryRight) >> 4, 16, 8) | \
|
||||
_SHIFTL((wetLeft) >> 4, 8, 8) | \
|
||||
_SHIFTL((wetRight) >> 4, 0, 8); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Interleaves two mono channels into stereo.
|
||||
*
|
||||
* The count refers to the size of each input. Hence 2 * count bytes
|
||||
* will be written out.
|
||||
*
|
||||
* A left sample will be placed before the right sample.
|
||||
* All addresses (output, left, right) are DMEM addresses.
|
||||
*
|
||||
* Note: count will be rounded up to the nearest multiple of 8 bytes.
|
||||
* The previous version of this function rounded up to the nearest
|
||||
* multiple of 16 bytes.
|
||||
*/
|
||||
#define aInterleave(pkt, o, l, r, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
@@ -806,7 +923,26 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \
|
||||
}
|
||||
|
||||
// countOrBuf meaning depends on flag
|
||||
/*
|
||||
* Linear filter function.
|
||||
*
|
||||
* Calculates out[i] = sum all elements in the vector in[i..i-7] * filter[0..7],
|
||||
* where "*" represents dot multiplication. The input/output contains s16
|
||||
* samples and filter contains Q1.15 signed fixed point numbers.
|
||||
* Every result sample is rounded and clamped.
|
||||
*
|
||||
* First initiate by calling with the flag f set to 2, countOrBuf contains
|
||||
* the length in bytes that shall be processed in the next call. The addr
|
||||
* parameter shall contain the DRAM address to the filter table (16 bytes).
|
||||
* The count will be rounded up to the nearest multiple of 16 bytes.
|
||||
*
|
||||
* The aFilter function shall then be called in direct succession, with flag
|
||||
* set to either 0 or 1. The countOrBuf parameter shall contain the DMEM
|
||||
* address for the input/output. The addr parameter shall contain the DRAM
|
||||
* address for the state, containing the last previous 8 input samples.
|
||||
* The state is always written to upon exit, but is only read at entry if
|
||||
* the flag is 0 (otherwise all-zero samples are used instead).
|
||||
*/
|
||||
#define aFilter(pkt, f, countOrBuf, addr) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
@@ -816,22 +952,41 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (uintptr_t)(addr); \
|
||||
}
|
||||
|
||||
#define aHilogain(pkt, id, buflen, i) \
|
||||
/*
|
||||
* Modifies the volume of samples using a simple UQ4.4 gain multiplier.
|
||||
*
|
||||
* Performs the following:
|
||||
*
|
||||
* 1. Count c is rounded up to 32 byte alignment
|
||||
* 2. g is a u8 that contains a UQ4.4 number
|
||||
* 3. Modify each sample s, so that s = clamp_s16(s * g >> 4)
|
||||
*/
|
||||
#define aHiLoGain(pkt, g, buflen, i) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_HILOGAIN, 24, 8) | \
|
||||
_SHIFTL((id), 16, 8) | _SHIFTL((buflen), 0, 16); \
|
||||
_SHIFTL((g), 16, 8) | _SHIFTL((buflen), 0, 16); \
|
||||
_a->words.w1 = _SHIFTL((i), 16, 16); \
|
||||
}
|
||||
|
||||
#define aUnknown25(pkt, f, g, i, o) \
|
||||
/*
|
||||
* Performs the following:
|
||||
*
|
||||
* 1. Count c is rounded up to 64 byte alignment
|
||||
* 2. f is added to i
|
||||
* 3. i and o are from now treated as s16 pointers
|
||||
* 4. 32 s16 samples are loaded from i to tbl
|
||||
* 5. for (u32 idx = 0; idx * sizeof(s16) < c; idx++)
|
||||
* o[idx] = clamp_s16((s32)o[idx] * (s32)tbl[idx % 32]);
|
||||
*/
|
||||
#define aUnknown25(pkt, f, c, o, i) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_UNK_25, 24, 8) | \
|
||||
_SHIFTL((f), 16, 8) | _SHIFTL((g), 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL((i), 16, 16) | _SHIFTL((o), 0, 16); \
|
||||
_SHIFTL((f), 16, 8) | _SHIFTL((c), 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL((o), 16, 16) | _SHIFTL((i), 0, 16); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,7 +8,8 @@ typedef struct
|
||||
u8 *offset;
|
||||
s32 len;
|
||||
#ifdef VERSION_SH
|
||||
s8 magic[2]; // tbl: 0x0204, otherwise: 0x0203
|
||||
s8 medium;
|
||||
s8 magic; // tbl: 0x04, otherwise: 0x03
|
||||
|
||||
// for ctl (else zeros):
|
||||
union {
|
||||
@@ -38,7 +39,9 @@ typedef struct
|
||||
#ifdef VERSION_SH
|
||||
s16 unk2;
|
||||
u8 *data;
|
||||
#if !IS_64_BIT
|
||||
s32 pad[2];
|
||||
#endif
|
||||
#endif
|
||||
ALSeqData seqArray[1];
|
||||
} ALSeqFile;
|
||||
|
||||
@@ -49,16 +49,36 @@
|
||||
CMD_PTR(entry)
|
||||
#else
|
||||
#define EXECUTE(seg, script, scriptEnd, entry) \
|
||||
CMD_BBH(0x00, 0x10, seg), \
|
||||
CMD_BBH(0x00, 0x18, seg), \
|
||||
CMD_PTR(script), \
|
||||
CMD_PTR(scriptEnd), \
|
||||
CMD_PTR(entry)
|
||||
CMD_PTR(entry), \
|
||||
CMD_PTR(NULL), \
|
||||
CMD_PTR(NULL)
|
||||
|
||||
#define EXIT_AND_EXECUTE(seg, script, scriptEnd, entry) \
|
||||
CMD_BBH(0x01, 0x10, seg), \
|
||||
CMD_BBH(0x01, 0x18, seg), \
|
||||
CMD_PTR(script), \
|
||||
CMD_PTR(scriptEnd), \
|
||||
CMD_PTR(entry)
|
||||
CMD_PTR(entry), \
|
||||
CMD_PTR(NULL), \
|
||||
CMD_PTR(NULL)
|
||||
|
||||
#define EXECUTE_WITH_CODE(seg, script, scriptEnd, entry, bssStart, bssEnd) \
|
||||
CMD_BBH(0x00, 0x18, seg), \
|
||||
CMD_PTR(script), \
|
||||
CMD_PTR(scriptEnd), \
|
||||
CMD_PTR(entry), \
|
||||
CMD_PTR(bssStart), \
|
||||
CMD_PTR(bssEnd)
|
||||
|
||||
#define EXIT_AND_EXECUTE_WITH_CODE(seg, script, scriptEnd, entry, bssStart, bssEnd) \
|
||||
CMD_BBH(0x01, 0x18, seg), \
|
||||
CMD_PTR(script), \
|
||||
CMD_PTR(scriptEnd), \
|
||||
CMD_PTR(entry), \
|
||||
CMD_PTR(bssStart), \
|
||||
CMD_PTR(bssEnd)
|
||||
#endif
|
||||
|
||||
#define EXIT() \
|
||||
@@ -160,9 +180,18 @@
|
||||
CMD_PTR(romEnd)
|
||||
|
||||
#define LOAD_RAW(seg, romStart, romEnd) \
|
||||
CMD_BBH(0x17, 0x0C, seg), \
|
||||
CMD_BBH(0x17, 0x14, seg), \
|
||||
CMD_PTR(romStart), \
|
||||
CMD_PTR(romEnd)
|
||||
CMD_PTR(romEnd), \
|
||||
CMD_PTR(0), \
|
||||
CMD_PTR(0)
|
||||
|
||||
#define LOAD_RAW_WITH_CODE(seg, romStart, romEnd, bssStart, bssEnd) \
|
||||
CMD_BBH(0x17, 0x14, seg), \
|
||||
CMD_PTR(romStart), \
|
||||
CMD_PTR(romEnd), \
|
||||
CMD_PTR(bssStart), \
|
||||
CMD_PTR(bssEnd)
|
||||
|
||||
#define LOAD_YAY0(seg, romStart, romEnd) \
|
||||
CMD_BBH(0x18, 0x0C, seg), \
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Assembly Macros
|
||||
/* Assembly Macros */
|
||||
|
||||
.set K0BASE, 0x80000000
|
||||
.set K1BASE, 0xA0000000
|
||||
|
||||
+3
-3
@@ -410,12 +410,12 @@
|
||||
|
||||
// second set of actor bins, (0x64-0x73)
|
||||
// group 12
|
||||
#define MODEL_BOWSER 0x64 // bowser_geo - 2nd geo loaded is bowser_geo_000424, starts with shadow command
|
||||
#define MODEL_BOWSER 0x64 // bowser_geo
|
||||
#define MODEL_BOWSER_BOMB_CHILD_OBJ 0x65 // bowser_bomb_geo - Spawns as a chill object in bowser's behavior command, causing an explosion if it touches a bomb
|
||||
#define MODEL_BOWSER_SMOKE 0x66 // bowser_impact_smoke_geo
|
||||
#define MODEL_BOWSER_FLAMES 0x67 // bowser_flames_geo
|
||||
#define MODEL_BOWSER_WAVE 0x68 // invisible_bowser_accessory_geo
|
||||
#define MODEL_BOWSER2 0x69 // bowser2_geo - 2nd geo loaded is bowser_geo_000770, starts with node command, only difference
|
||||
#define MODEL_BOWSER_NO_SHADOW 0x69 // bowser_geo_no_shadow
|
||||
|
||||
// group 13
|
||||
#define MODEL_BUB 0x64 // cheep_cheep_geo
|
||||
@@ -531,7 +531,7 @@
|
||||
#define MODEL_KOOPA_WITHOUT_SHELL 0xBF // koopa_without_shell_geo
|
||||
#define MODEL_GOOMBA 0xC0 // goomba_geo
|
||||
#define MODEL_SEAWEED 0xC1 // seaweed_geo
|
||||
#define MODEL_AMP 0xC2 // amp_geo
|
||||
#define MODEL_AMP 0xC2 // dAmpGeo
|
||||
#define MODEL_BOBOMB_BUDDY 0xC3 // bobomb_buddy_geo
|
||||
// find me
|
||||
// find me
|
||||
|
||||
+192
-37
@@ -56,13 +56,14 @@
|
||||
|
||||
#define A_ADDMIXER 4
|
||||
#define A_RESAMPLE_ZOH 6
|
||||
#define A_INTERL 17
|
||||
#define A_DMEMMOVE2 16
|
||||
#define A_DOWNSAMPLE_HALF 17
|
||||
#define A_ENVSETUP1 18
|
||||
#define A_ENVMIXER 19
|
||||
#define A_LOADBUFF 20
|
||||
#define A_SAVEBUFF 21
|
||||
#define A_ENVSETUP2 22
|
||||
#define A_UNK_23 23
|
||||
#define A_S8DEC 23
|
||||
#define A_HILOGAIN 24
|
||||
#define A_UNK_25 25
|
||||
#define A_DUPLICATE 26
|
||||
@@ -306,6 +307,8 @@ typedef short ENVMIX_STATE[40];
|
||||
* address is later used as parameter, the 8 high bits will be an index
|
||||
* to the segment table and the lower 24 bits are added to the base address
|
||||
* stored in the segment table for this entry. The result is the physical address.
|
||||
* With the newer rsp audio code, this segment table is not used. The address is
|
||||
* used directly instead.
|
||||
*
|
||||
* Transfers to/from DRAM are executed using DMA and hence follow these restrictions:
|
||||
* All DRAM addresses should be aligned by 8 bytes, or they will be
|
||||
@@ -349,14 +352,6 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (uintptr_t)(s); \
|
||||
}
|
||||
|
||||
#define aADPCM_23(pkt, f, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_UNK_23, 24, 8) | _SHIFTL(f, 16, 8); \
|
||||
_a->words.w1 = (uintptr_t)(s); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Not used in SM64.
|
||||
*/
|
||||
@@ -570,15 +565,6 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
|
||||
}
|
||||
|
||||
#define aInterl(pkt, f, i, o, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_INTERL, 24, 8) | _SHIFTL(f, 16, 8) | \
|
||||
_SHIFTL(i, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets internal volume parameters.
|
||||
* See aEnvMixer for more info.
|
||||
@@ -663,12 +649,50 @@ typedef short ENVMIX_STATE[40];
|
||||
#undef aEnvMixer
|
||||
#undef aInterleave
|
||||
|
||||
// New or modified operations in the new audio microcode below
|
||||
|
||||
/**
|
||||
* Decompresses S8 data.
|
||||
* Possible flags: A_INIT and A_LOOP.
|
||||
*
|
||||
* First set up internal data in DMEM:
|
||||
* aSetLoop(cmd++, physicalAddressOfLoopState) (if A_LOOP is set)
|
||||
*
|
||||
* Then before this command, call:
|
||||
* aSetBuffer(cmd++, 0, in, out, count)
|
||||
*
|
||||
* Note: count will be rounded up to the nearest multiple of 32 bytes.
|
||||
*
|
||||
* S8 decompression works by expanding s8 bytes into s16 numbers,
|
||||
* by performing a left shift of 8 steps.
|
||||
*
|
||||
* Before the algorithm starts, the previous 16 samples are loaded according to flag:
|
||||
* A_INIT: all zeros
|
||||
* A_LOOP: the address set by aSetLoop
|
||||
* no flags: the DRAM address in the s parameter
|
||||
* These 16 samples are immediately copied to the destination address.
|
||||
*
|
||||
* The result of "count" bytes will be written after these 16 initial samples.
|
||||
* The last 16 samples written to the destination will also be written to
|
||||
* the state address in DRAM.
|
||||
*/
|
||||
#define aS8Dec(pkt, f, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_S8DEC, 24, 8) | _SHIFTL(f, 16, 8); \
|
||||
_a->words.w1 = (uintptr_t)(s); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Mix two tracks by simple clamped addition.
|
||||
*
|
||||
* s: DMEM source track 1
|
||||
* d: DMEM source track 2 and destination
|
||||
* c: number of bytes to write (rounded down to 16 byte alignment)
|
||||
* c: number of bytes to write
|
||||
*
|
||||
* Note: count is first rounded down to the nearest multiple of 16 bytes
|
||||
* and then rounded up to the nearest multiple of 64 bytes.
|
||||
*/
|
||||
#define aAddMixer(pkt, s, d, c) \
|
||||
{ \
|
||||
@@ -726,6 +750,28 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (_SHIFTL(d, 16, 16) | _SHIFTL(0x80, 0, 16)); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Copies memory in DMEM, second version.
|
||||
*
|
||||
* Copies t * c bytes from address i to address o.
|
||||
*
|
||||
* Note: count is first rounded up to the nearest multiple of 32 bytes,
|
||||
* before the multiplication by t.
|
||||
*
|
||||
* Note: This acts as memcpy where 32 bytes are moved at a time, therefore
|
||||
* if input and output overlap, output address should be less than input address.
|
||||
*
|
||||
* Not used in SM64.
|
||||
*/
|
||||
#define aDMEMMove2(pkt, t, i, o, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_DMEMMOVE2, 24, 8) | \
|
||||
_SHIFTL(t, 16, 8) | _SHIFTL(i, 0, 16); \
|
||||
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Fast resample.
|
||||
*
|
||||
@@ -734,14 +780,37 @@ typedef short ENVMIX_STATE[40];
|
||||
*
|
||||
* This works like the other resample command but just takes the "nearest" sample,
|
||||
* instead of a function of the four nearest samples.
|
||||
*
|
||||
* Initially the current position is calculated as (in << 16) + startFract.
|
||||
* For every sample to create, the value is simply taken from the sample
|
||||
* at address ((position >> 17) << 1). Then the current position is incremented
|
||||
* by (pitch << 2).
|
||||
*
|
||||
* Note: count represents the number of output bytes to create, and is
|
||||
* rounded up to the nearest multiple of 8 bytes.
|
||||
*/
|
||||
#define aResampleZoh(pkt, pitch, start_fract) \
|
||||
#define aResampleZoh(pkt, pitch, startFract) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_RESAMPLE_ZOH, 24, 8) | \
|
||||
_SHIFTL(pitch, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(start_fract, 0, 16); \
|
||||
_a->words.w1 = _SHIFTL(startFract, 0, 16); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Fast downsampling by taking every other sample, discarding others.
|
||||
*
|
||||
* Note: nSamples refers to the number of output samples to create, and
|
||||
* is first rounded up to the nearest multiple of 8.
|
||||
*/
|
||||
#define aDownsampleHalf(pkt, nSamples, i, o) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_DOWNSAMPLE_HALF, 24, 8) | \
|
||||
_SHIFTL(nSamples, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -764,39 +833,87 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
|
||||
}
|
||||
|
||||
#define aEnvSetup1(pkt, a, b, c, d) \
|
||||
/*
|
||||
* See aEnvMixer for more info.
|
||||
*/
|
||||
#define aEnvSetup1(pkt, initialVolReverb, rampReverb, rampLeft, rampRight) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_ENVSETUP1, 24, 8) | \
|
||||
_SHIFTL(a, 16, 8) | _SHIFTL(b, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(c, 16, 16) | _SHIFTL(d, 0, 16); \
|
||||
_SHIFTL(initialVolReverb, 16, 8) | \
|
||||
_SHIFTL(rampReverb, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(rampLeft, 16, 16) | \
|
||||
_SHIFTL(rampRight, 0, 16); \
|
||||
}
|
||||
|
||||
#define aEnvSetup2(pkt, volLeft, volRight) \
|
||||
/*
|
||||
* See aEnvMixer for more info.
|
||||
*/
|
||||
#define aEnvSetup2(pkt, initialVolLeft, initialVolRight) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_ENVSETUP2, 24, 8); \
|
||||
_a->words.w1 = _SHIFTL(volLeft, 16, 16) | \
|
||||
_SHIFTL(volRight, 0, 16); \
|
||||
_a->words.w1 = _SHIFTL(initialVolLeft, 16, 16) | \
|
||||
_SHIFTL(initialVolRight, 0, 16); \
|
||||
}
|
||||
|
||||
#define aEnvMixer(pkt, inBuf, nSamples, bit1, bit2, bit3, dryLeft, dryRight, wetLeft, wetRight) \
|
||||
/*
|
||||
* Mixes an envelope with mono sound into 4 channels.
|
||||
*
|
||||
* To allow for many parameters, a sequence of aEnvSetup1, aEnvSetup2,
|
||||
* aEnvMixer shall always be called.
|
||||
*
|
||||
* The function works in blocks of 8 samples.
|
||||
* However, nSamples is rounded up to the nearest multiple of 16 samples.
|
||||
*
|
||||
* For each sample in a block:
|
||||
* 1. sampleLeft = in * volLeft * (negLeft ? -1 : 1)
|
||||
* 2. sampleRight = in * volRight * (negRight ? -1 : 1)
|
||||
* 3. dryLeft += sampleLeft
|
||||
* 4. dryRight += sampleRight
|
||||
* 5. if swapReverb: swap sampleLeft and sampleRight
|
||||
* 6. wetLeft += sampleLeft * volReverb
|
||||
* 7. wetRight += sampleRight * volReverb
|
||||
*
|
||||
* After each block, all vol variables are added by their corresponding
|
||||
* ramp value.
|
||||
*
|
||||
* Each volume variable is treated as a UQ0.16 number. Make sure
|
||||
* the ramp additions don't overflow, or wrapping will occur.
|
||||
* The initialVolReverb parameter is only 8 bits, but will be left
|
||||
* shifted 8 bits by the rsp.
|
||||
*/
|
||||
#define aEnvMixer(pkt, inBuf, nSamples, swapReverb, negLeft, negRight, \
|
||||
dryLeft, dryRight, wetLeft, wetRight) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_ENVMIXER, 24, 8) | \
|
||||
_SHIFTL((inBuf) >> 4, 16, 8) | \
|
||||
_SHIFTL(nSamples, 8, 8)) | \
|
||||
_SHIFTL(bit1, 2, 1) | _SHIFTL(bit2, 1, 1) | \
|
||||
_SHIFTL(bit3, 0, 1); \
|
||||
_SHIFTL(swapReverb, 2, 1) | _SHIFTL(negLeft, 1, 1) |\
|
||||
_SHIFTL(negRight, 0, 1); \
|
||||
_a->words.w1 = _SHIFTL((dryLeft) >> 4, 24, 8) | \
|
||||
_SHIFTL((dryRight) >> 4, 16, 8) | \
|
||||
_SHIFTL((wetLeft) >> 4, 8, 8) | \
|
||||
_SHIFTL((wetRight) >> 4, 0, 8); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Interleaves two mono channels into stereo.
|
||||
*
|
||||
* The count refers to the size of each input. Hence 2 * count bytes
|
||||
* will be written out.
|
||||
*
|
||||
* A left sample will be placed before the right sample.
|
||||
* All addresses (output, left, right) are DMEM addresses.
|
||||
*
|
||||
* Note: count will be rounded up to the nearest multiple of 8 bytes.
|
||||
* The previous version of this function rounded up to the nearest
|
||||
* multiple of 16 bytes.
|
||||
*/
|
||||
#define aInterleave(pkt, o, l, r, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
@@ -806,7 +923,26 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \
|
||||
}
|
||||
|
||||
// countOrBuf meaning depends on flag
|
||||
/*
|
||||
* Linear filter function.
|
||||
*
|
||||
* Calculates out[i] = sum all elements in the vector in[i..i-7] * filter[0..7],
|
||||
* where "*" represents dot multiplication. The input/output contains s16
|
||||
* samples and filter contains Q1.15 signed fixed point numbers.
|
||||
* Every result sample is rounded and clamped.
|
||||
*
|
||||
* First initiate by calling with the flag f set to 2, countOrBuf contains
|
||||
* the length in bytes that shall be processed in the next call. The addr
|
||||
* parameter shall contain the DRAM address to the filter table (16 bytes).
|
||||
* The count will be rounded up to the nearest multiple of 16 bytes.
|
||||
*
|
||||
* The aFilter function shall then be called in direct succession, with flag
|
||||
* set to either 0 or 1. The countOrBuf parameter shall contain the DMEM
|
||||
* address for the input/output. The addr parameter shall contain the DRAM
|
||||
* address for the state, containing the last previous 8 input samples.
|
||||
* The state is always written to upon exit, but is only read at entry if
|
||||
* the flag is 0 (otherwise all-zero samples are used instead).
|
||||
*/
|
||||
#define aFilter(pkt, f, countOrBuf, addr) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
@@ -816,22 +952,41 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (uintptr_t)(addr); \
|
||||
}
|
||||
|
||||
#define aHilogain(pkt, id, buflen, i) \
|
||||
/*
|
||||
* Modifies the volume of samples using a simple UQ4.4 gain multiplier.
|
||||
*
|
||||
* Performs the following:
|
||||
*
|
||||
* 1. Count c is rounded up to 32 byte alignment
|
||||
* 2. g is a u8 that contains a UQ4.4 number
|
||||
* 3. Modify each sample s, so that s = clamp_s16(s * g >> 4)
|
||||
*/
|
||||
#define aHiLoGain(pkt, g, buflen, i) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_HILOGAIN, 24, 8) | \
|
||||
_SHIFTL((id), 16, 8) | _SHIFTL((buflen), 0, 16); \
|
||||
_SHIFTL((g), 16, 8) | _SHIFTL((buflen), 0, 16); \
|
||||
_a->words.w1 = _SHIFTL((i), 16, 16); \
|
||||
}
|
||||
|
||||
#define aUnknown25(pkt, f, g, i, o) \
|
||||
/*
|
||||
* Performs the following:
|
||||
*
|
||||
* 1. Count c is rounded up to 64 byte alignment
|
||||
* 2. f is added to i
|
||||
* 3. i and o are from now treated as s16 pointers
|
||||
* 4. 32 s16 samples are loaded from i to tbl
|
||||
* 5. for (u32 idx = 0; idx * sizeof(s16) < c; idx++)
|
||||
* o[idx] = clamp_s16((s32)o[idx] * (s32)tbl[idx % 32]);
|
||||
*/
|
||||
#define aUnknown25(pkt, f, c, o, i) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_UNK_25, 24, 8) | \
|
||||
_SHIFTL((f), 16, 8) | _SHIFTL((g), 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL((i), 16, 16) | _SHIFTL((o), 0, 16); \
|
||||
_SHIFTL((f), 16, 8) | _SHIFTL((c), 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL((o), 16, 16) | _SHIFTL((i), 0, 16); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+80
-72
@@ -76,13 +76,13 @@
|
||||
*
|
||||
* IMPLEMENTATION NOTE:
|
||||
* There is another group of RDP commands that includes the triangle commands
|
||||
* generated by the RSP code. These are the raw commands the rasterizer
|
||||
* hardware chews on, with slope info, etc. They will follow the RDP
|
||||
* generated by the RSP code. These are the raw commands the rasterizer
|
||||
* hardware chews on, with slope info, etc. They will follow the RDP
|
||||
* ordering...
|
||||
*
|
||||
* IMPLEMENTATION NOTE:
|
||||
* The RDP hardware has some of these bit patterns wired up. If the hardware
|
||||
* changes, we must adjust this table, likewise we can't change/add things
|
||||
* The RDP hardware has some of these bit patterns wired up. If the hardware
|
||||
* changes, we must adjust this table, likewise we can't change/add things
|
||||
* once the hardware is frozen. (actually, the RDP hardware only looks at
|
||||
* the lower 6 bits of the command byte)
|
||||
*
|
||||
@@ -206,7 +206,7 @@
|
||||
#define G_TEXRECT 0xe4 /* -28 */
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* The following commands are the "generated" RDP commands; the user
|
||||
* never sees them, the RSP microcode generates them.
|
||||
*
|
||||
@@ -326,7 +326,7 @@
|
||||
*
|
||||
* DO NOT USE THE LOW 8 BITS OF GEOMETRYMODE:
|
||||
* The weird bit-ordering is for the micro-code: the lower byte
|
||||
* can be OR'd in with G_TRI_SHADE (11001100) to construct
|
||||
* can be OR'd in with G_TRI_SHADE (11001100) to construct
|
||||
* the triangle command directly. Don't break it...
|
||||
*
|
||||
* DO NOT USE THE HIGH 8 BITS OF GEOMETRYMODE:
|
||||
@@ -340,7 +340,7 @@
|
||||
* appropriately and use primcolor to see anything.
|
||||
*
|
||||
* G_SHADING_SMOOTH enabled means use all 3 colors of the triangle.
|
||||
* If it is not set, then do 'flat shading', where only one vertex color
|
||||
* If it is not set, then do 'flat shading', where only one vertex color
|
||||
* is used (and all 3 vertices are set to that same color by the ucode)
|
||||
* See the man page for gSP1Triangle().
|
||||
*
|
||||
@@ -718,154 +718,162 @@
|
||||
#define G_BL_1 2
|
||||
#define G_BL_0 3
|
||||
|
||||
#ifdef DISABLE_AA
|
||||
#define AA_DEF
|
||||
#define RD_DEF
|
||||
#else
|
||||
#define AA_DEF AA_EN |
|
||||
#define RD_DEF IM_RD |
|
||||
#endif
|
||||
|
||||
#define GBL_c1(m1a, m1b, m2a, m2b) \
|
||||
(m1a) << 30 | (m1b) << 26 | (m2a) << 22 | (m2b) << 18
|
||||
#define GBL_c2(m1a, m1b, m2a, m2b) \
|
||||
(m1a) << 28 | (m1b) << 24 | (m2a) << 20 | (m2b) << 16
|
||||
|
||||
#define RM_AA_ZB_OPA_SURF(clk) \
|
||||
AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \
|
||||
AA_DEF Z_CMP | Z_UPD | RD_DEF CVG_DST_CLAMP | \
|
||||
ZMODE_OPA | ALPHA_CVG_SEL | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
#define RM_RA_ZB_OPA_SURF(clk) \
|
||||
AA_EN | Z_CMP | Z_UPD | CVG_DST_CLAMP | \
|
||||
AA_DEF Z_CMP | Z_UPD | CVG_DST_CLAMP | \
|
||||
ZMODE_OPA | ALPHA_CVG_SEL | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
#define RM_AA_ZB_XLU_SURF(clk) \
|
||||
AA_EN | Z_CMP | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | \
|
||||
AA_DEF Z_CMP | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | \
|
||||
FORCE_BL | ZMODE_XLU | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_ZB_OPA_DECAL(clk) \
|
||||
AA_EN | Z_CMP | IM_RD | CVG_DST_WRAP | ALPHA_CVG_SEL | \
|
||||
AA_DEF Z_CMP | RD_DEF CVG_DST_WRAP | ALPHA_CVG_SEL | \
|
||||
ZMODE_DEC | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
#define RM_RA_ZB_OPA_DECAL(clk) \
|
||||
AA_EN | Z_CMP | CVG_DST_WRAP | ALPHA_CVG_SEL | \
|
||||
AA_DEF Z_CMP | CVG_DST_WRAP | ALPHA_CVG_SEL | \
|
||||
ZMODE_DEC | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
#define RM_AA_ZB_XLU_DECAL(clk) \
|
||||
AA_EN | Z_CMP | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | \
|
||||
AA_DEF Z_CMP | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | \
|
||||
FORCE_BL | ZMODE_DEC | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_ZB_OPA_INTER(clk) \
|
||||
AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \
|
||||
AA_DEF Z_CMP | Z_UPD | RD_DEF CVG_DST_CLAMP | \
|
||||
ALPHA_CVG_SEL | ZMODE_INTER | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
#define RM_RA_ZB_OPA_INTER(clk) \
|
||||
AA_EN | Z_CMP | Z_UPD | CVG_DST_CLAMP | \
|
||||
AA_DEF Z_CMP | Z_UPD | CVG_DST_CLAMP | \
|
||||
ALPHA_CVG_SEL | ZMODE_INTER | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
#define RM_AA_ZB_XLU_INTER(clk) \
|
||||
AA_EN | Z_CMP | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | \
|
||||
AA_DEF Z_CMP | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | \
|
||||
FORCE_BL | ZMODE_INTER | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_ZB_XLU_LINE(clk) \
|
||||
AA_EN | Z_CMP | IM_RD | CVG_DST_CLAMP | CVG_X_ALPHA | \
|
||||
AA_DEF Z_CMP | IM_RD | CVG_DST_CLAMP | CVG_X_ALPHA | \
|
||||
ALPHA_CVG_SEL | FORCE_BL | ZMODE_XLU | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_ZB_DEC_LINE(clk) \
|
||||
AA_EN | Z_CMP | IM_RD | CVG_DST_SAVE | CVG_X_ALPHA | \
|
||||
AA_DEF Z_CMP | IM_RD | CVG_DST_SAVE | CVG_X_ALPHA | \
|
||||
ALPHA_CVG_SEL | FORCE_BL | ZMODE_DEC | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_ZB_TEX_EDGE(clk) \
|
||||
AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \
|
||||
AA_EN | Z_CMP | Z_UPD | RD_DEF CVG_DST_CLAMP | \
|
||||
CVG_X_ALPHA | ALPHA_CVG_SEL | ZMODE_OPA | TEX_EDGE | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
#define RM_AA_ZB_TEX_INTER(clk) \
|
||||
AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \
|
||||
AA_DEF Z_CMP | Z_UPD | RD_DEF CVG_DST_CLAMP | \
|
||||
CVG_X_ALPHA | ALPHA_CVG_SEL | ZMODE_INTER | TEX_EDGE | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
#define RM_AA_ZB_SUB_SURF(clk) \
|
||||
AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_FULL | \
|
||||
AA_DEF Z_CMP | Z_UPD | IM_RD | CVG_DST_FULL | \
|
||||
ZMODE_OPA | ALPHA_CVG_SEL | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
#define RM_AA_ZB_PCL_SURF(clk) \
|
||||
AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \
|
||||
AA_DEF Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \
|
||||
ZMODE_OPA | G_AC_DITHER | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_ZB_OPA_TERR(clk) \
|
||||
AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \
|
||||
AA_DEF Z_CMP | Z_UPD | RD_DEF CVG_DST_CLAMP | \
|
||||
ZMODE_OPA | ALPHA_CVG_SEL | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_ZB_TEX_TERR(clk) \
|
||||
AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_CLAMP | \
|
||||
AA_DEF Z_CMP | Z_UPD | RD_DEF CVG_DST_CLAMP | \
|
||||
CVG_X_ALPHA | ALPHA_CVG_SEL | ZMODE_OPA | TEX_EDGE | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_ZB_SUB_TERR(clk) \
|
||||
AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_FULL | \
|
||||
AA_DEF Z_CMP | Z_UPD | IM_RD | CVG_DST_FULL | \
|
||||
ZMODE_OPA | ALPHA_CVG_SEL | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
|
||||
#define RM_AA_OPA_SURF(clk) \
|
||||
AA_EN | IM_RD | CVG_DST_CLAMP | \
|
||||
AA_DEF RD_DEF CVG_DST_CLAMP | \
|
||||
ZMODE_OPA | ALPHA_CVG_SEL | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
#define RM_RA_OPA_SURF(clk) \
|
||||
AA_EN | CVG_DST_CLAMP | \
|
||||
AA_DEF CVG_DST_CLAMP | \
|
||||
ZMODE_OPA | ALPHA_CVG_SEL | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
#define RM_AA_XLU_SURF(clk) \
|
||||
AA_EN | IM_RD | CVG_DST_WRAP | CLR_ON_CVG | FORCE_BL | \
|
||||
AA_DEF IM_RD | CVG_DST_WRAP | CLR_ON_CVG | FORCE_BL | \
|
||||
ZMODE_OPA | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_XLU_LINE(clk) \
|
||||
AA_EN | IM_RD | CVG_DST_CLAMP | CVG_X_ALPHA | \
|
||||
AA_DEF IM_RD | CVG_DST_CLAMP | CVG_X_ALPHA | \
|
||||
ALPHA_CVG_SEL | FORCE_BL | ZMODE_OPA | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_DEC_LINE(clk) \
|
||||
AA_EN | IM_RD | CVG_DST_FULL | CVG_X_ALPHA | \
|
||||
AA_DEF IM_RD | CVG_DST_FULL | CVG_X_ALPHA | \
|
||||
ALPHA_CVG_SEL | FORCE_BL | ZMODE_OPA | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_TEX_EDGE(clk) \
|
||||
AA_EN | IM_RD | CVG_DST_CLAMP | \
|
||||
AA_EN | RD_DEF CVG_DST_CLAMP | \
|
||||
CVG_X_ALPHA | ALPHA_CVG_SEL | ZMODE_OPA | TEX_EDGE | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
#define RM_AA_SUB_SURF(clk) \
|
||||
AA_EN | IM_RD | CVG_DST_FULL | \
|
||||
AA_DEF IM_RD | CVG_DST_FULL | \
|
||||
ZMODE_OPA | ALPHA_CVG_SEL | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
#define RM_AA_PCL_SURF(clk) \
|
||||
AA_EN | IM_RD | CVG_DST_CLAMP | \
|
||||
AA_DEF IM_RD | CVG_DST_CLAMP | \
|
||||
ZMODE_OPA | G_AC_DITHER | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_OPA_TERR(clk) \
|
||||
AA_EN | IM_RD | CVG_DST_CLAMP | \
|
||||
AA_DEF RD_DEF CVG_DST_CLAMP | \
|
||||
ZMODE_OPA | ALPHA_CVG_SEL | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_TEX_TERR(clk) \
|
||||
AA_EN | IM_RD | CVG_DST_CLAMP | \
|
||||
AA_DEF RD_DEF CVG_DST_CLAMP | \
|
||||
CVG_X_ALPHA | ALPHA_CVG_SEL | ZMODE_OPA | TEX_EDGE | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
#define RM_AA_SUB_TERR(clk) \
|
||||
AA_EN | IM_RD | CVG_DST_FULL | \
|
||||
AA_DEF IM_RD | CVG_DST_FULL | \
|
||||
ZMODE_OPA | ALPHA_CVG_SEL | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
@@ -874,27 +882,27 @@
|
||||
Z_CMP | Z_UPD | CVG_DST_FULL | ALPHA_CVG_SEL | \
|
||||
ZMODE_OPA | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
|
||||
#define RM_ZB_XLU_SURF(clk) \
|
||||
Z_CMP | IM_RD | CVG_DST_FULL | FORCE_BL | ZMODE_XLU | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
|
||||
#define RM_ZB_OPA_DECAL(clk) \
|
||||
Z_CMP | CVG_DST_FULL | ALPHA_CVG_SEL | ZMODE_DEC | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)
|
||||
|
||||
|
||||
#define RM_ZB_XLU_DECAL(clk) \
|
||||
Z_CMP | IM_RD | CVG_DST_FULL | FORCE_BL | ZMODE_DEC | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
|
||||
#define RM_ZB_CLD_SURF(clk) \
|
||||
Z_CMP | IM_RD | CVG_DST_SAVE | FORCE_BL | ZMODE_XLU | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
|
||||
#define RM_ZB_OVL_SURF(clk) \
|
||||
Z_CMP | IM_RD | CVG_DST_SAVE | FORCE_BL | ZMODE_DEC | \
|
||||
GBL_c##clk(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA)
|
||||
|
||||
|
||||
#define RM_ZB_PCL_SURF(clk) \
|
||||
Z_CMP | Z_UPD | CVG_DST_FULL | ZMODE_OPA | \
|
||||
G_AC_DITHER | \
|
||||
@@ -1151,7 +1159,7 @@
|
||||
* element, we can't depend on the C compiler to align things
|
||||
* properly.
|
||||
*
|
||||
* 64-bit structure alignment is enforced by wrapping structures with
|
||||
* 64-bit structure alignment is enforced by wrapping structures with
|
||||
* unions that contain a dummy "long long int". Why this works is
|
||||
* explained in the ANSI C Spec, or on page 186 of the second edition
|
||||
* of K&R, "The C Programming Language".
|
||||
@@ -1223,14 +1231,14 @@ typedef struct {
|
||||
/* 20 bytes for above */
|
||||
|
||||
/* padding to bring structure size to 64 bit allignment */
|
||||
char dummy[4];
|
||||
char dummy[4];
|
||||
|
||||
} uSprite_t;
|
||||
|
||||
typedef union {
|
||||
typedef union {
|
||||
uSprite_t s;
|
||||
|
||||
/* Need to make sure this is 64 bit aligned */
|
||||
/* Need to make sure this is 64 bit aligned */
|
||||
long long int force_structure_allignment[3];
|
||||
} uSprite;
|
||||
|
||||
@@ -1315,7 +1323,7 @@ typedef union {
|
||||
*/
|
||||
#ifdef F3DEX_GBI_2
|
||||
/* 0,4 are reserved by G_MTX */
|
||||
# define G_MV_MMTX 2
|
||||
# define G_MV_MMTX 2
|
||||
# define G_MV_PMTX 6
|
||||
# define G_MV_VIEWPORT 8
|
||||
# define G_MV_LIGHT 10
|
||||
@@ -1373,7 +1381,7 @@ typedef union {
|
||||
|
||||
/*
|
||||
* These are offsets from the address in the dmem table
|
||||
*/
|
||||
*/
|
||||
#define G_MWO_NUMLIGHT 0x00
|
||||
#define G_MWO_CLIP_RNX 0x04
|
||||
#define G_MWO_CLIP_RNY 0x0c
|
||||
@@ -1455,7 +1463,7 @@ typedef union {
|
||||
*
|
||||
* Note: only directional (infinite) lights are currently supported.
|
||||
*
|
||||
* Note: the weird order is for the DMEM alignment benefit of
|
||||
* Note: the weird order is for the DMEM alignment benefit of
|
||||
* the microcode.
|
||||
*
|
||||
*/
|
||||
@@ -1775,7 +1783,7 @@ typedef struct {
|
||||
|
||||
/*
|
||||
* Textured rectangles are 128 bits not 64 bits
|
||||
*/
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned long w0;
|
||||
unsigned long w1;
|
||||
@@ -1933,7 +1941,7 @@ typedef union {
|
||||
gsDma1p(G_VTX, v, sizeof(Vtx)*(n), ((n)-1)<<4|(v0))
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef F3DEX_GBI_2
|
||||
# define gSPViewport(pkt, v) \
|
||||
gDma2p((pkt), G_MOVEMEM, (v), sizeof(Vp), G_MV_VIEWPORT, 0)
|
||||
@@ -2192,7 +2200,7 @@ typedef union {
|
||||
|
||||
/***
|
||||
*** 1 Triangle
|
||||
***/
|
||||
***/
|
||||
#define gSP1Triangle(pkt, v0, v1, v2, flag) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
@@ -2368,7 +2376,7 @@ typedef union {
|
||||
* Insert values into Matrix
|
||||
*
|
||||
* where = element of matrix (byte offset)
|
||||
* num = new element (32 bit value replacing 2 int or 2 frac matrix
|
||||
* num = new element (32 bit value replacing 2 int or 2 frac matrix
|
||||
* componants
|
||||
*/
|
||||
#ifdef F3DEX_GBI_2
|
||||
@@ -2396,7 +2404,7 @@ typedef union {
|
||||
#define gsSPForceMatrix(mptr) \
|
||||
gsDma2p(G_MOVEMEM,(mptr),sizeof(Mtx),G_MV_MATRIX,0), \
|
||||
gsMoveWd(G_MW_FORCEMTX,0,0x00010000)
|
||||
|
||||
|
||||
#else /* F3DEX_GBI_2 */
|
||||
#define gSPForceMatrix(pkt, mptr) \
|
||||
{ \
|
||||
@@ -2444,7 +2452,7 @@ typedef union {
|
||||
/*
|
||||
* gSPBranchLessZ Branch DL if (vtx.z) less than or equal (zval).
|
||||
*
|
||||
* dl = DL branch to
|
||||
* dl = DL branch to
|
||||
* vtx = Vertex
|
||||
* zval = Screen depth
|
||||
* near = Near plane
|
||||
@@ -2491,7 +2499,7 @@ typedef union {
|
||||
/*
|
||||
* gSPBranchLessZraw Branch DL if (vtx.z) less than or equal (raw zval).
|
||||
*
|
||||
* dl = DL branch to
|
||||
* dl = DL branch to
|
||||
* vtx = Vertex
|
||||
* zval = Raw value of screen depth
|
||||
*/
|
||||
@@ -2592,7 +2600,7 @@ typedef union {
|
||||
#define NUMLIGHTS_7 7
|
||||
/*
|
||||
* n should be one of: NUMLIGHTS_0, NUMLIGHTS_1, ..., NUMLIGHTS_7
|
||||
* NOTE: in addition to the number of directional lights specified,
|
||||
* NOTE: in addition to the number of directional lights specified,
|
||||
* there is always 1 ambient light
|
||||
*/
|
||||
#define gSPNumLights(pkt, n) \
|
||||
@@ -2604,7 +2612,7 @@ typedef union {
|
||||
#define LIGHT_2 2
|
||||
#define LIGHT_3 3
|
||||
#define LIGHT_4 4
|
||||
#define LIGHT_5 5
|
||||
#define LIGHT_5 5
|
||||
#define LIGHT_6 6
|
||||
#define LIGHT_7 7
|
||||
#define LIGHT_8 8
|
||||
@@ -2829,7 +2837,7 @@ typedef union {
|
||||
* min, max: range 0 to 1000: 0=nearplane, 1000=farplane
|
||||
* min is where fog begins (usually less than max and often 0)
|
||||
* max is where fog is thickest (usually 1000)
|
||||
*
|
||||
*
|
||||
*/
|
||||
#define gSPFogFactor(pkt, fm, fo) \
|
||||
gMoveWd(pkt, G_MW_FOG, G_MWO_FOG, \
|
||||
@@ -2869,7 +2877,7 @@ typedef union {
|
||||
_SHIFTL((level),11,3) | _SHIFTL((tile),8,3) | _SHIFTL((on),1,7)),\
|
||||
(_SHIFTL((s),16,16) | _SHIFTL((t),0,16)) \
|
||||
}}
|
||||
/*
|
||||
/*
|
||||
* Different version of SPTexture macro, has an additional parameter
|
||||
* which is currently reserved in the microcode.
|
||||
*/
|
||||
@@ -2908,7 +2916,7 @@ typedef union {
|
||||
_SHIFTL((level),11,3)|_SHIFTL((tile),8,3)|_SHIFTL((on),0,8)), \
|
||||
(_SHIFTL((s),16,16)|_SHIFTL((t),0,16)) \
|
||||
}}
|
||||
/*
|
||||
/*
|
||||
* Different version of SPTexture macro, has an additional parameter
|
||||
* which is currently reserved in the microcode.
|
||||
*/
|
||||
@@ -3135,7 +3143,7 @@ typedef union {
|
||||
gsSPSetOtherMode(G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 2, mode)
|
||||
#endif
|
||||
|
||||
/* 'blendmask' is not supported anymore.
|
||||
/* 'blendmask' is not supported anymore.
|
||||
* The bits are reserved for future use.
|
||||
* Fri May 26 13:45:55 PDT 1995
|
||||
*/
|
||||
@@ -3341,7 +3349,7 @@ typedef union {
|
||||
*
|
||||
* This command makes all othermode parameters set.
|
||||
* Do not use this command in the same DL with another g*SPSetOtherMode DLs.
|
||||
*
|
||||
*
|
||||
* [Usage]
|
||||
* gDPSetOtherMode(pkt, modeA, modeB)
|
||||
*
|
||||
@@ -3594,9 +3602,9 @@ typedef union {
|
||||
((height)-1) << G_TEXTURE_IMAGE_FRAC) \
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Allow tmem address and render tile to be specified.
|
||||
* The S at the end means odd lines are already word Swapped
|
||||
* The S at the end means odd lines are already word Swapped
|
||||
*/
|
||||
#define gDPLoadMultiBlockS(pkt, timg, tmem, rtile, fmt, siz, width, \
|
||||
height, pal, cms, cmt, masks, maskt, shifts, shiftt) \
|
||||
@@ -3812,13 +3820,13 @@ typedef union {
|
||||
((width)-1) << G_TEXTURE_IMAGE_FRAC, \
|
||||
((height)-1) << G_TEXTURE_IMAGE_FRAC)
|
||||
|
||||
/*
|
||||
/*
|
||||
* Allows tmem and render tile to be specified. Useful when loading
|
||||
* several tiles at a time.
|
||||
*
|
||||
* Here is the static form of the pre-swapped texture block loading
|
||||
* See gDPLoadTextureBlockS() for reference. Basically, just don't
|
||||
* calculate DxT, use 0
|
||||
* calculate DxT, use 0
|
||||
*/
|
||||
|
||||
#define gsDPLoadMultiBlockS(timg, tmem, rtile, fmt, siz, width, height, \
|
||||
@@ -3902,7 +3910,7 @@ typedef union {
|
||||
}
|
||||
|
||||
/*
|
||||
* 4-bit load block. Allows tmem and render tile to be specified. Useful when
|
||||
* 4-bit load block. Allows tmem and render tile to be specified. Useful when
|
||||
* loading multiple tiles. The S means odd lines are already word swapped.
|
||||
*/
|
||||
#define gDPLoadMultiBlock_4bS(pkt, timg, tmem, rtile, fmt, width, height,\
|
||||
@@ -4337,7 +4345,7 @@ typedef union {
|
||||
G_IM_FMT_RGBA, G_IM_SIZ_16b, 4*16, 1, \
|
||||
pal, 0, 0, 0, 0, 0, 0)
|
||||
|
||||
#endif /* _HW_VERSION_1 */
|
||||
#endif /* _HW_VERSION_1 */
|
||||
|
||||
/*
|
||||
* Load a 256-entry palette (for 8-bit CI textures)
|
||||
@@ -4379,7 +4387,7 @@ typedef union {
|
||||
gsDPLoadSync(), \
|
||||
gsDPLoadTLUTCmd(G_TX_LOADTILE, 255), \
|
||||
gsDPPipeSync()
|
||||
|
||||
|
||||
#else /* **** WORKAROUND hardware 1 load_tlut bug ****** */
|
||||
|
||||
#define gsDPLoadTLUT_pal256(dram) \
|
||||
@@ -4434,7 +4442,7 @@ typedef union {
|
||||
G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, count, \
|
||||
0, 0, 0, 0, 0, 0, 0)
|
||||
|
||||
#endif /* _HW_VERSION_1 */
|
||||
#endif /* _HW_VERSION_1 */
|
||||
|
||||
#define gDPSetScissor(pkt, mode, ulx, uly, lrx, lry) \
|
||||
{ \
|
||||
@@ -4611,7 +4619,7 @@ typedef union {
|
||||
}}
|
||||
|
||||
/* Notice that textured rectangles are 128-bit commands, therefore
|
||||
* gsDPTextureRectangle() should not be used in display lists
|
||||
* gsDPTextureRectangle() should not be used in display lists
|
||||
* under normal circumstances (use gsSPTextureRectangle()).
|
||||
* That is also why there is no gDPTextureRectangle() macros.
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,8 @@ typedef struct
|
||||
u8 *offset;
|
||||
s32 len;
|
||||
#ifdef VERSION_SH
|
||||
s8 magic[2]; // tbl: 0x0204, otherwise: 0x0203
|
||||
s8 medium;
|
||||
s8 magic; // tbl: 0x04, otherwise: 0x03
|
||||
|
||||
// for ctl (else zeros):
|
||||
union {
|
||||
@@ -38,7 +39,9 @@ typedef struct
|
||||
#ifdef VERSION_SH
|
||||
s16 unk2;
|
||||
u8 *data;
|
||||
#if !IS_64_BIT
|
||||
s32 pad[2];
|
||||
#endif
|
||||
#endif
|
||||
ALSeqData seqArray[1];
|
||||
} ALSeqFile;
|
||||
|
||||
+137
-33
@@ -28,23 +28,26 @@
|
||||
#define RESPAWN_INFO_DONT_RESPAWN 0xFF
|
||||
|
||||
/* oFlags */
|
||||
#define OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE (1 << 0) // 0x00000001
|
||||
#define OBJ_FLAG_MOVE_XZ_USING_FVEL (1 << 1) // 0x00000002
|
||||
#define OBJ_FLAG_MOVE_Y_WITH_TERMINAL_VEL (1 << 2) // 0x00000004
|
||||
#define OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW (1 << 3) // 0x00000008
|
||||
#define OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE (1 << 4) // 0x00000010
|
||||
#define OBJ_FLAG_0020 (1 << 5) // 0x00000020
|
||||
#define OBJ_FLAG_COMPUTE_DIST_TO_MARIO (1 << 6) // 0x00000040
|
||||
#define OBJ_FLAG_ACTIVE_FROM_AFAR (1 << 7) // 0x00000080
|
||||
#define OBJ_FLAG_0100 (1 << 8) // 0x00000100
|
||||
#define OBJ_FLAG_TRANSFORM_RELATIVE_TO_PARENT (1 << 9) // 0x00000200
|
||||
#define OBJ_FLAG_HOLDABLE (1 << 10) // 0x00000400
|
||||
#define OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM (1 << 11) // 0x00000800
|
||||
#define OBJ_FLAG_1000 (1 << 12) // 0x00001000
|
||||
#define OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO (1 << 13) // 0x00002000
|
||||
#define OBJ_FLAG_PERSISTENT_RESPAWN (1 << 14) // 0x00004000
|
||||
#define OBJ_FLAG_8000 (1 << 15) // 0x00008000
|
||||
#define OBJ_FLAG_30 (1 << 30) // 0x40000000
|
||||
#define OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE (1 << 0) // 0x00000001
|
||||
#define OBJ_FLAG_MOVE_XZ_USING_FVEL (1 << 1) // 0x00000002
|
||||
#define OBJ_FLAG_MOVE_Y_WITH_TERMINAL_VEL (1 << 2) // 0x00000004
|
||||
#define OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW (1 << 3) // 0x00000008
|
||||
#define OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE (1 << 4) // 0x00000010
|
||||
#define OBJ_FLAG_UPDATE_TRANSFORM_FOR_THROW_MATRIX (1 << 5) // 0x00000020
|
||||
#define OBJ_FLAG_COMPUTE_DIST_TO_MARIO (1 << 6) // 0x00000040
|
||||
#define OBJ_FLAG_ACTIVE_FROM_AFAR (1 << 7) // 0x00000080
|
||||
#define OBJ_FLAG_PLAYER (1 << 8) // 0x00000100
|
||||
#define OBJ_FLAG_TRANSFORM_RELATIVE_TO_PARENT (1 << 9) // 0x00000200
|
||||
#define OBJ_FLAG_HOLDABLE (1 << 10) // 0x00000400
|
||||
#define OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM (1 << 11) // 0x00000800
|
||||
#define OBJ_FLAG_1000 (1 << 12) // 0x00001000
|
||||
#define OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO (1 << 13) // 0x00002000
|
||||
#define OBJ_FLAG_PERSISTENT_RESPAWN (1 << 14) // 0x00004000
|
||||
#define OBJ_FLAG_8000 (1 << 15) // 0x00008000
|
||||
#ifdef AUTO_COLLISION_DISTANCE
|
||||
#define OBJ_FLAG_DONT_CALC_COLL_DIST (1 << 16) // 0x00010000
|
||||
#endif
|
||||
#define OBJ_FLAG_HITBOX_WAS_SET (1 << 30) // 0x40000000
|
||||
|
||||
/* oHeldState */
|
||||
#define HELD_FREE 0
|
||||
@@ -53,23 +56,18 @@
|
||||
#define HELD_DROPPED 3
|
||||
|
||||
/* oDialogState */
|
||||
#define DIALOG_UNK1_ENABLE_TIME_STOP 0
|
||||
#define DIALOG_UNK1_INTERRUPT_MARIO_ACTION 1
|
||||
#define DIALOG_UNK1_BEGIN_DIALOG 2
|
||||
#define DIALOG_UNK1_AWAIT_DIALOG 3
|
||||
#define DIALOG_UNK1_DISABLE_TIME_STOP 4
|
||||
#define DIALOG_STATUS_ENABLE_TIME_STOP 0
|
||||
#define DIALOG_STATUS_INTERRUPT 1
|
||||
#define DIALOG_STATUS_START_DIALOG 2
|
||||
#define DIALOG_STATUS_STOP_DIALOG 3
|
||||
#define DIALOG_STATUS_DISABLE_TIME_STOP 4
|
||||
|
||||
#define DIALOG_UNK1_FLAG_DEFAULT (1 << 1) // 0x02
|
||||
#define DIALOG_UNK1_FLAG_RESPONSE (1 << 2) // 0x04
|
||||
#define DIALOG_UNK1_FLAG_4 (1 << 4) // 0x10
|
||||
|
||||
#define DIALOG_UNK2_ENABLE_TIME_STOP 0
|
||||
#define DIALOG_UNK2_TURN_AND_INTERRUPT_MARIO_ACTION 1
|
||||
#define DIALOG_UNK2_AWAIT_DIALOG 2
|
||||
#define DIALOG_UNK2_END_DIALOG 3
|
||||
|
||||
#define DIALOG_UNK2_FLAG_0 (1 << 0) // 0x01
|
||||
#define DIALOG_UNK2_LEAVE_TIME_STOP_ENABLED (1 << 4) // 0x10
|
||||
#define DIALOG_FLAG_NONE 0
|
||||
#define DIALOG_FLAG_TURN_TO_MARIO (1 << 0) // 0x01 // cutscene only
|
||||
#define DIALOG_FLAG_TEXT_DEFAULT (1 << 1) // 0x02
|
||||
#define DIALOG_FLAG_TEXT_RESPONSE (1 << 2) // 0x04 // non-cutscene only
|
||||
#define DIALOG_FLAG_UNK_CAPSWITCH (1 << 3) // 0x08 // not defined
|
||||
#define DIALOG_FLAG_TIME_STOP_ENABLED (1 << 4) // 0x10
|
||||
|
||||
/* oMoveFlags */
|
||||
#define OBJ_MOVE_LANDED (1 << 0) // 0x0001
|
||||
@@ -191,6 +189,112 @@
|
||||
#define BOBOMB_BUDDY_HAS_NOT_TALKED 0
|
||||
#define BOBOMB_BUDDY_HAS_TALKED 2
|
||||
|
||||
/* Bowser */
|
||||
/* Tail oAction */
|
||||
#define BOWSER_ACT_TAIL_DEFAULT 0
|
||||
#define BOWSER_ACT_TAIL_THROWN 1
|
||||
#define BOWSER_ACT_TAIL_TOUCHED_MARIO 2
|
||||
/* oAction */
|
||||
#define BOWSER_ACT_DEFAULT 0
|
||||
#define BOWSER_ACT_THROWN 1
|
||||
#define BOWSER_ACT_JUMP_ONTO_STAGE 2
|
||||
#define BOWSER_ACT_DANCE 3
|
||||
#define BOWSER_ACT_DEAD 4
|
||||
#define BOWSER_ACT_WAIT 5
|
||||
#define BOWSER_ACT_INTRO_WALK 6
|
||||
#define BOWSER_ACT_CHARGE_MARIO 7
|
||||
#define BOWSER_ACT_SPIT_FIRE_INTO_SKY 8
|
||||
#define BOWSER_ACT_SPIT_FIRE_ONTO_FLOOR 9
|
||||
#define BOWSER_ACT_HIT_EDGE 10
|
||||
#define BOWSER_ACT_TURN_FROM_EDGE 11
|
||||
#define BOWSER_ACT_HIT_MINE 12
|
||||
#define BOWSER_ACT_BIG_JUMP 13
|
||||
#define BOWSER_ACT_WALK_TO_MARIO 14
|
||||
#define BOWSER_ACT_BREATH_FIRE 15
|
||||
#define BOWSER_ACT_TELEPORT 16
|
||||
#define BOWSER_ACT_QUICK_JUMP 17
|
||||
#define BOWSER_ACT_UNUSED_SLOW_WALK 18
|
||||
#define BOWSER_ACT_TILT_LAVA_PLATFORM 19
|
||||
/* Animations */
|
||||
#define BOWSER_ANIM_STAND_UP 0
|
||||
#define BOWSER_ANIM_STAND_UP_UNUSED 1 // slightly different
|
||||
#define BOWSER_ANIM_SHAKING 2
|
||||
#define BOWSER_ANIM_GRABBED 3
|
||||
#define BOWSER_ANIM_BROKEN 4 // broken animation
|
||||
#define BOWSER_ANIM_FALL_DOWN 5 // unused
|
||||
#define BOWSER_ANIM_BREATH 6
|
||||
#define BOWSER_ANIM_JUMP 7 // unused, short jump, replaced by start/stop
|
||||
#define BOWSER_ANIM_JUMP_STOP 8
|
||||
#define BOWSER_ANIM_JUMP_START 9
|
||||
#define BOWSER_ANIM_DANCE 10
|
||||
#define BOWSER_ANIM_BREATH_UP 11
|
||||
#define BOWSER_ANIM_IDLE 12
|
||||
#define BOWSER_ANIM_SLOW_GAIT 13
|
||||
#define BOWSER_ANIM_LOOK_DOWN_STOP_WALK 14
|
||||
#define BOWSER_ANIM_LOOK_UP_START_WALK 15
|
||||
#define BOWSER_ANIM_FLIP_DOWN 16
|
||||
#define BOWSER_ANIM_LAY_DOWN 17
|
||||
#define BOWSER_ANIM_RUN_START 18
|
||||
#define BOWSER_ANIM_RUN 19
|
||||
#define BOWSER_ANIM_RUN_STOP 20
|
||||
#define BOWSER_ANIM_RUN_SLIP 21
|
||||
#define BOWSER_ANIM_BREATH_QUICK 22
|
||||
#define BOWSER_ANIM_EDGE_MOVE 23
|
||||
#define BOWSER_ANIM_EDGE_STOP 24
|
||||
#define BOWSER_ANIM_FLIP 25
|
||||
#define BOWSER_ANIM_STAND_UP_FROM_FLIP 26
|
||||
/* oBehParams2ndByte */
|
||||
#define BOWSER_BP_BITDW 0
|
||||
#define BOWSER_BP_BITFS 1
|
||||
#define BOWSER_BP_BITS 2
|
||||
/* oBowserCamAct */
|
||||
#define BOWSER_CAM_ACT_IDLE 0
|
||||
#define BOWSER_CAM_ACT_WALK 1
|
||||
#define BOWSER_CAM_ACT_END 2
|
||||
/* oBowserStatus */
|
||||
#define BOWSER_STATUS_ANGLE_MARIO (1 << 1) // 0x00000002
|
||||
#define BOWSER_STATUS_ANGLE_CENTRE (1 << 2) // 0x00000004
|
||||
#define BOWSER_STATUS_DIST_MARIO (1 << 3) // 0x00000008
|
||||
#define BOWSER_STATUS_DIST_CENTRE (1 << 4) // 0x00000010
|
||||
#define BOWSER_STATUS_BIG_JUMP (1 << 16) // 0x00010000
|
||||
#define BOWSER_STATUS_FIRE_SKY (1 << 17) // 0x00020000
|
||||
/* oBowserGrabbedStatus */
|
||||
#define BOWSER_GRAB_STATUS_NONE 0
|
||||
#define BOWSER_GRAB_STATUS_GRABBED 1
|
||||
#define BOWSER_GRAB_STATUS_HOLDING 2
|
||||
/* oSubAction */
|
||||
#define BOWSER_SUB_ACT_DEAD_FLY_BACK 0
|
||||
#define BOWSER_SUB_ACT_DEAD_BOUNCE 1
|
||||
#define BOWSER_SUB_ACT_DEAD_WAIT 2
|
||||
#define BOWSER_SUB_ACT_DEAD_DEFAULT_END 3
|
||||
#define BOWSER_SUB_ACT_DEAD_DEFAULT_END_OVER 4
|
||||
#define BOWSER_SUB_ACT_DEAD_FINAL_END 10
|
||||
#define BOWSER_SUB_ACT_DEAD_FINAL_END_OVER 11
|
||||
|
||||
#define BOWSER_SUB_ACT_CHARGE_START 0
|
||||
#define BOWSER_SUB_ACT_CHARGE_RUN 1
|
||||
#define BOWSER_SUB_ACT_CHARGE_END 2
|
||||
#define BOWSER_SUB_ACT_CHARGE_SLIP 3
|
||||
|
||||
#define BOWSER_SUB_ACT_TELEPORT_START 0
|
||||
#define BOWSER_SUB_ACT_TELEPORT_MOVE 1
|
||||
#define BOWSER_SUB_ACT_TELEPORT_STOP 2
|
||||
|
||||
#define BOWSER_SUB_ACT_HIT_MINE_START 0
|
||||
#define BOWSER_SUB_ACT_HIT_MINE_FALL 1
|
||||
#define BOWSER_SUB_ACT_HIT_MINE_STOP 2
|
||||
|
||||
#define BOWSER_SUB_ACT_JUMP_ON_STAGE_IDLE 0
|
||||
#define BOWSER_SUB_ACT_JUMP_ON_STAGE_START 1
|
||||
#define BOWSER_SUB_ACT_JUMP_ON_STAGE_LAND 2
|
||||
#define BOWSER_SUB_ACT_JUMP_ON_STAGE_STOP 3
|
||||
|
||||
/* Bowser Bits Platform*/
|
||||
/* oAction */
|
||||
#define BOWSER_BITS_PLAT_ACT_START 0
|
||||
#define BOWSER_BITS_PLAT_ACT_CHECK 1
|
||||
#define BOWSER_BITS_PLAT_ACT_FALL 2
|
||||
|
||||
/* Fish Spawer */
|
||||
/* oAction */
|
||||
#define FISH_SPAWNER_ACT_SPAWN 0
|
||||
|
||||
+24
-20
@@ -65,8 +65,8 @@
|
||||
#define /*0x0B4*/ oVelZ OBJECT_FIELD_F32(0x0B)
|
||||
#define /*0x0B8*/ oForwardVel OBJECT_FIELD_F32(0x0C)
|
||||
#define /*0x0B8*/ oForwardVelS32 OBJECT_FIELD_S32(0x0C)
|
||||
#define /*0x0BC*/ oUnkBC OBJECT_FIELD_F32(0x0D)
|
||||
#define /*0x0C0*/ oUnkC0 OBJECT_FIELD_F32(0x0E)
|
||||
#define /*0x0BC*/ oLeftVel OBJECT_FIELD_F32(0x0D)
|
||||
#define /*0x0C0*/ oUpVel OBJECT_FIELD_F32(0x0E)
|
||||
#define /*0x0C4*/ O_MOVE_ANGLE_INDEX 0x0F
|
||||
#define /*0x0C4*/ O_MOVE_ANGLE_PITCH_INDEX (O_MOVE_ANGLE_INDEX + 0)
|
||||
#define /*0x0C4*/ O_MOVE_ANGLE_YAW_INDEX (O_MOVE_ANGLE_INDEX + 1)
|
||||
@@ -274,24 +274,24 @@
|
||||
#define /*0x0FC*/ oBBallSpawnerPeriodMinus1 OBJECT_FIELD_S32(0x1D)
|
||||
|
||||
/* Bowser */
|
||||
#define /*0x088*/ oBowserUnk88 OBJECT_FIELD_S32(0x00)
|
||||
#define /*0x0F4*/ oBowserUnkF4 OBJECT_FIELD_S32(0x1B)
|
||||
#define /*0x0F8*/ oBowserUnkF8 OBJECT_FIELD_S32(0x1C)
|
||||
#define /*0x088*/ oBowserCamAct OBJECT_FIELD_S32(0x00)
|
||||
#define /*0x0F4*/ oBowserStatus OBJECT_FIELD_S32(0x1B)
|
||||
#define /*0x0F8*/ oBowserTimer OBJECT_FIELD_S32(0x1C)
|
||||
#define /*0x0FC*/ oBowserDistToCentre OBJECT_FIELD_F32(0x1D)
|
||||
#define /*0x106*/ oBowserUnk106 OBJECT_FIELD_S16(0x1F, 1)
|
||||
#define /*0x108*/ oBowserUnk108 OBJECT_FIELD_S16(0x20, 0)
|
||||
#define /*0x106*/ oBowserBitsJustJump OBJECT_FIELD_S16(0x1F, 1)
|
||||
#define /*0x108*/ oBowserRandSplitFloor OBJECT_FIELD_S16(0x20, 0)
|
||||
#define /*0x10A*/ oBowserHeldAnglePitch OBJECT_FIELD_S16(0x20, 1)
|
||||
#define /*0x10D*/ oBowserHeldAngleVelYaw OBJECT_FIELD_S16(0x21, 0)
|
||||
#define /*0x10E*/ oBowserUnk10E OBJECT_FIELD_S16(0x21, 1)
|
||||
#define /*0x110*/ oBowserUnk110 OBJECT_FIELD_S16(0x22, 0)
|
||||
#define /*0x10E*/ oBowserGrabbedStatus OBJECT_FIELD_S16(0x21, 1)
|
||||
#define /*0x110*/ oBowserIsReacting OBJECT_FIELD_S16(0x22, 0)
|
||||
#define /*0x112*/ oBowserAngleToCentre OBJECT_FIELD_S16(0x22, 1)
|
||||
#define /*0x1AC*/ oBowserUnk1AC OBJECT_FIELD_S16(0x49, 0)
|
||||
#define /*0x1AE*/ oBowserUnk1AE OBJECT_FIELD_S16(0x49, 1)
|
||||
#define /*0x1AC*/ oBowserTargetOpacity OBJECT_FIELD_S16(0x49, 0)
|
||||
#define /*0x1AE*/ oBowserEyesTimer OBJECT_FIELD_S16(0x49, 1)
|
||||
#define /*0x1B0*/ oBowserEyesShut OBJECT_FIELD_S16(0x4A, 0)
|
||||
#define /*0x1B2*/ oBowserUnk1B2 OBJECT_FIELD_S16(0x4A, 1)
|
||||
#define /*0x1B2*/ oBowserRainbowLight OBJECT_FIELD_S16(0x4A, 1)
|
||||
|
||||
/* Bowser Shockwave */
|
||||
#define /*0x0F4*/ oBowserShockWaveUnkF4 OBJECT_FIELD_F32(0x1B)
|
||||
#define /*0x0F4*/ oBowserShockWaveScale OBJECT_FIELD_F32(0x1B)
|
||||
|
||||
/* Black Smoke Bowser */
|
||||
#define /*0x0F4*/ oBlackSmokeBowserUnkF4 OBJECT_FIELD_F32(0x1B)
|
||||
@@ -497,7 +497,7 @@
|
||||
/* Flame */
|
||||
#define /*0x0F4*/ oFlameScale OBJECT_FIELD_F32(0x1B)
|
||||
#define /*0x0F8*/ oFlameSpeedTimerOffset OBJECT_FIELD_S32(0x1C)
|
||||
#define /*0x0FC*/ oFlameUnkFC OBJECT_FIELD_F32(0x1D)
|
||||
#define /*0x0FC*/ oFlameUnusedRand OBJECT_FIELD_F32(0x1D)
|
||||
#define /*0x100*/ oFlameBowser OBJECT_FIELD_OBJ(0x1E)
|
||||
|
||||
/* Blue Flame */
|
||||
@@ -626,7 +626,7 @@
|
||||
#define /*0x0F4*/ oKoopaRaceEndpointRaceBegun OBJECT_FIELD_S32(0x1B)
|
||||
#define /*0x0F8*/ oKoopaRaceEndpointKoopaFinished OBJECT_FIELD_S32(0x1C)
|
||||
#define /*0x0FC*/ oKoopaRaceEndpointRaceStatus OBJECT_FIELD_S32(0x1D)
|
||||
#define /*0x100*/ oKoopaRaceEndpointUnk100 OBJECT_FIELD_S32(0x1E)
|
||||
#define /*0x100*/ oKoopaRaceEndpointDialog OBJECT_FIELD_S32(0x1E)
|
||||
#define /*0x104*/ oKoopaRaceEndpointRaceEnded OBJECT_FIELD_S32(0x1F)
|
||||
|
||||
/* Koopa Shell Flame */
|
||||
@@ -770,10 +770,14 @@
|
||||
#define /*0x0F8*/ oPitouneUnkF8 OBJECT_FIELD_F32(0x1C)
|
||||
#define /*0x0FC*/ oPitouneUnkFC OBJECT_FIELD_F32(0x1D)
|
||||
|
||||
/* Platform */
|
||||
#define /*0x0F4*/ oPlatformTimer OBJECT_FIELD_S32(0x1B)
|
||||
#define /*0x0F8*/ oPlatformUnkF8 OBJECT_FIELD_OBJ(0x1C)
|
||||
#define /*0x0FC*/ oPlatformUnkFC OBJECT_FIELD_S32(0x1D)
|
||||
/* Falling Rising Bitfs Platform */
|
||||
#define /*0x0F4*/ oBitfsPlatformTimer OBJECT_FIELD_S32(0x1B)
|
||||
|
||||
/* Falling Bowser Bits Platform */
|
||||
#define /*0x0F8*/ oBitsPlatformBowser OBJECT_FIELD_OBJ(0x1C)
|
||||
#define /*0x0FC*/ oBitsPlatformTimer OBJECT_FIELD_S32(0x1D)
|
||||
|
||||
/* WF Platform */
|
||||
#define /*0x10C*/ oPlatformUnk10C OBJECT_FIELD_F32(0x21)
|
||||
#define /*0x110*/ oPlatformUnk110 OBJECT_FIELD_F32(0x22)
|
||||
|
||||
@@ -877,7 +881,7 @@
|
||||
// 0x1D-0x21 reserved for pathing
|
||||
|
||||
/* Snowman's Head */
|
||||
#define /*0x0F4*/ oSnowmansHeadUnkF4 OBJECT_FIELD_S32(0x1B)
|
||||
#define /*0x0F4*/ oSnowmansHeadDialogActive OBJECT_FIELD_S32(0x1B)
|
||||
|
||||
/* Snowman Wind Blowing */
|
||||
#define /*0x0F4*/ oSLSnowmanWindOriginalYaw OBJECT_FIELD_S32(0x1B)
|
||||
|
||||
@@ -6,13 +6,19 @@
|
||||
extern u8 _##name##SegmentRomStart[]; \
|
||||
extern u8 _##name##SegmentRomEnd[];
|
||||
|
||||
#define DECLARE_NOLOAD(name) \
|
||||
extern u8 _##name##SegmentBssStart[]; \
|
||||
extern u8 _##name##SegmentBssEnd[];
|
||||
|
||||
#define DECLARE_ACTOR_SEGMENT(name) \
|
||||
DECLARE_SEGMENT(name##_mio0) \
|
||||
DECLARE_SEGMENT(name##_yay0) \
|
||||
DECLARE_SEGMENT(name##_geo)
|
||||
DECLARE_SEGMENT(name##_geo) \
|
||||
DECLARE_NOLOAD(name##_geo)
|
||||
|
||||
#define DECLARE_LEVEL_SEGMENT(name) \
|
||||
DECLARE_SEGMENT(name) \
|
||||
DECLARE_NOLOAD(name) \
|
||||
DECLARE_SEGMENT(name##_segment_7)
|
||||
|
||||
DECLARE_ACTOR_SEGMENT(common0)
|
||||
@@ -39,9 +45,11 @@ DECLARE_ACTOR_SEGMENT(group17)
|
||||
DECLARE_SEGMENT(entry)
|
||||
DECLARE_SEGMENT(engine)
|
||||
DECLARE_SEGMENT(behavior)
|
||||
DECLARE_NOLOAD(behavior)
|
||||
DECLARE_SEGMENT(scripts)
|
||||
DECLARE_SEGMENT(goddard)
|
||||
DECLARE_SEGMENT(framebuffers)
|
||||
DECLARE_SEGMENT(assets)
|
||||
extern u8 _goddardSegmentStart[];
|
||||
extern u8 _engineSegmentStart[];
|
||||
extern u8 _engineSegmentBssEnd[];
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
*/
|
||||
|
||||
#define SEG_POOL_START _framebuffersSegmentBssEnd // 0x0165000 in size
|
||||
#define SEG_GODDARD SEG_POOL_START + 0x113000
|
||||
|
||||
#define POOL_SIZE RAM_END - SEG_POOL_START
|
||||
|
||||
#endif // SEGMENTS_H
|
||||
@@ -6,6 +6,8 @@
|
||||
#define SEQ_BASE_ID 0x7f
|
||||
#define SEQ_VARIATION 0x80
|
||||
|
||||
#define SEQ_MENU_GAME_OVER (SEQ_MENU_TITLE_SCREEN | SEQ_VARIATION)
|
||||
|
||||
enum SeqId {
|
||||
SEQ_SOUND_PLAYER, // 0x00
|
||||
SEQ_EVENT_CUTSCENE_COLLECT_STAR, // 0x01
|
||||
|
||||
+19
-19
@@ -1,7 +1,7 @@
|
||||
# Macros for disassembled sequence files. This file was automatically generated by seq_decoder.py.
|
||||
# To regenerate it, run: ./tools/seq_decoder.py --emit-asm-macros >seq_macros.inc
|
||||
// Macros for disassembled sequence files. This file was automatically generated by seq_decoder.py.
|
||||
// To regenerate it, run: ./tools/seq_decoder.py --emit-asm-macros > include/seq_macros.inc
|
||||
|
||||
# seq commands
|
||||
// seq commands
|
||||
|
||||
.macro seq_testchdisabled a
|
||||
.byte 0x0 + \a
|
||||
@@ -155,7 +155,7 @@
|
||||
.byte 0xff
|
||||
.endm
|
||||
|
||||
.ifdef VERSION_SH
|
||||
#ifdef VERSION_SH
|
||||
|
||||
.macro seq_unreservenotes
|
||||
.byte 0xf0
|
||||
@@ -166,9 +166,9 @@
|
||||
.byte \a
|
||||
.endm
|
||||
|
||||
.else
|
||||
#else
|
||||
|
||||
.ifdef VERSION_EU
|
||||
#ifdef VERSION_EU
|
||||
|
||||
.macro seq_unreservenotes
|
||||
.byte 0xf0
|
||||
@@ -179,7 +179,7 @@
|
||||
.byte \a
|
||||
.endm
|
||||
|
||||
.else
|
||||
#else
|
||||
|
||||
.macro seq_unreservenotes
|
||||
.byte 0xf1
|
||||
@@ -190,11 +190,11 @@
|
||||
.byte \a
|
||||
.endm
|
||||
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.endif
|
||||
#endif
|
||||
|
||||
# chan commands
|
||||
// chan commands
|
||||
|
||||
.macro chan_startchannel a, b
|
||||
.byte 0x10 + \a
|
||||
@@ -462,7 +462,7 @@
|
||||
var_long \a
|
||||
.endm
|
||||
|
||||
.ifdef VERSION_SH
|
||||
#ifdef VERSION_SH
|
||||
|
||||
.macro chan_setnotepriority a
|
||||
.byte 0xe9
|
||||
@@ -495,7 +495,7 @@
|
||||
.byte 0x90 + \a
|
||||
.endm
|
||||
|
||||
.else
|
||||
#else
|
||||
|
||||
.macro chan_testlayerfinished a
|
||||
.byte 0x0 + \a
|
||||
@@ -514,7 +514,7 @@
|
||||
.byte 0xa0 + \a
|
||||
.endm
|
||||
|
||||
.ifdef VERSION_EU
|
||||
#ifdef VERSION_EU
|
||||
|
||||
.macro chan_setnotepriority a
|
||||
.byte 0xe9
|
||||
@@ -530,7 +530,7 @@
|
||||
.byte \a
|
||||
.endm
|
||||
|
||||
.else
|
||||
#else
|
||||
|
||||
.macro chan_setnotepriority a
|
||||
.byte 0x60 + \a
|
||||
@@ -545,11 +545,11 @@
|
||||
.byte \a
|
||||
.endm
|
||||
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.endif
|
||||
#endif
|
||||
|
||||
# layer commands
|
||||
// layer commands
|
||||
|
||||
.macro layer_note0 a, b, c, d
|
||||
.byte 0x0 + \a
|
||||
@@ -659,7 +659,7 @@
|
||||
.byte \c
|
||||
.endm
|
||||
|
||||
# envelope commands
|
||||
// envelope commands
|
||||
|
||||
.macro envelope_disable a
|
||||
.byte 0x0, 0x0
|
||||
@@ -686,7 +686,7 @@
|
||||
.byte \b >> 8, \b & 0xff
|
||||
.endm
|
||||
|
||||
# other commands
|
||||
// other commands
|
||||
|
||||
.macro var_long x
|
||||
.byte (0x80 | (\x & 0x7f00) >> 8), (\x & 0xff)
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@
|
||||
#define INPUT_A_DOWN 0x0080
|
||||
#define INPUT_IN_POISON_GAS 0x0100
|
||||
#define INPUT_IN_WATER 0x0200
|
||||
#define INPUT_UNKNOWN_10 0x0400
|
||||
#define INPUT_STOMPED 0x0400
|
||||
#define INPUT_INTERACT_OBJ_GRABBABLE 0x0800
|
||||
#define INPUT_UNKNOWN_12 0x1000
|
||||
#define INPUT_B_PRESSED 0x2000
|
||||
|
||||
+1
-1
@@ -386,7 +386,7 @@
|
||||
#define SOUND_ENV_UNK12 /* 0x40120000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x12, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ENV_SLIDING /* 0x40130000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x13, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_STAR /* 0x40140010 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x14, 0x00, SOUND_LOWER_BACKGROUND_MUSIC) // unverified
|
||||
#define SOUND_ENV_UNKNOWN4 /* 0x41150000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x15, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
|
||||
#define SOUND_ENV_MOVING_BIG_PLATFORM /* 0x41150000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x15, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
|
||||
#define SOUND_ENV_WATER_DRAIN /* 0x41160000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x16, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
|
||||
#define SOUND_ENV_METAL_BOX_PUSH /* 0x40178000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x17, 0x80, 0) // unverified
|
||||
#define SOUND_ENV_SINK_QUICKSAND /* 0x40188000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x18, 0x80, 0) // unverified
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef SURFACE_TERRAINS_H
|
||||
#define SURFACE_TERRAINS_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
// Surface Types
|
||||
#define SURFACE_DEFAULT 0x0000 // Environment default
|
||||
#define SURFACE_BURNING 0x0001 // Lava / Frostbite (in SL), but is used mostly for Lava
|
||||
@@ -202,7 +204,11 @@
|
||||
#define COL_TRI_INIT(surfType, triNum) surfType, triNum
|
||||
|
||||
// Collision Tri
|
||||
#ifdef ALL_SURFACES_HAVE_FORCE
|
||||
#define COL_TRI(v1, v2, v3) v1, v2, v3, 0
|
||||
#else
|
||||
#define COL_TRI(v1, v2, v3) v1, v2, v3
|
||||
#endif
|
||||
|
||||
// Collision Tri With Special Params
|
||||
#define COL_TRI_SPECIAL(v1, v2, v3, param) v1, v2, v3, param
|
||||
|
||||
@@ -3,6 +3,66 @@
|
||||
|
||||
#include "text_menu_strings.h"
|
||||
|
||||
#if defined(PUPPYCAM)
|
||||
#define NC_CAMX_EN _("Camera X Sensitivity")
|
||||
#define NC_CAMY_EN _("Camera Y Sensitivity")
|
||||
#define NC_INVERTX_EN _("Invert X Axis")
|
||||
#define NC_INVERTY_EN _("Invert Y Axis")
|
||||
#define NC_CAMC_EN _("Camera Centre Speed")
|
||||
#define NC_ANALOGUE_EN _("Analogue Camera")
|
||||
#define NC_SCHEME_EN _("Control Scheme")
|
||||
#define OPTION_ENABLED_EN _("Enabled")
|
||||
#define OPTION_DISABLED_EN _("Disabled")
|
||||
#define OPTION_SCHEME1_EN _("Double Tap")
|
||||
#define OPTION_SCHEME2_EN _("Single Press")
|
||||
#define OPTION_SCHEME3_EN _("Classic")
|
||||
#define OPTION_LANGUAGE_EN _("Language")
|
||||
#define NC_WIDE_EN _("Widescreen")
|
||||
#define NC_HIGHLIGHT_L _(">")
|
||||
#define NC_HIGHLIGHT_R _("<")
|
||||
#define NC_BUTTON_EN _("[R]: Options")
|
||||
#define NC_BUTTON2_EN _("[R]: Return")
|
||||
#define NC_OPTION_EN _("OPTIONS")
|
||||
|
||||
#if MULTILANG
|
||||
#define NC_CAMX_FR _("Sensibilite sur l'axe X")
|
||||
#define NC_CAMY_FR _("Sensibilite sur l'axe Y")
|
||||
#define NC_INVERTX_FR _("Invertir Axe X")
|
||||
#define NC_INVERTY_FR _("Invertir Axe Y")
|
||||
#define NC_CAMC_FR _("Vitesse de Centrage")
|
||||
#define NC_ANALOGUE_FR _("Camera Analogue")
|
||||
#define NC_SCHEME_FR _("Control Scheme")
|
||||
#define OPTION_ENABLED_FR _("Active")
|
||||
#define OPTION_DISABLED_FR _("Desactive")
|
||||
#define OPTION_SCHEME1_FR _("Double Tap")
|
||||
#define OPTION_SCHEME2_FR _("Single Press")
|
||||
#define OPTION_SCHEME3_FR _("Classic")
|
||||
#define OPTION_LANGUAGE_FR _("Language")
|
||||
#define NC_WIDE_FR _("Widescreen")
|
||||
#define NC_BUTTON_FR _("[R]: Options")
|
||||
#define NC_BUTTON2_FR _("[R]: Retournez")
|
||||
#define NC_OPTION_FR _("OPTIONS")
|
||||
|
||||
#define NC_CAMX_DE _("Camera X Sensitivity")
|
||||
#define NC_CAMY_DE _("Camera Y Sensitivity")
|
||||
#define NC_INVERTY_DE _("Invert Y Axis")
|
||||
#define NC_INVERTX_DE _("Invert X Axis")
|
||||
#define NC_CAMC_DE _("Camera Centre Speed")
|
||||
#define NC_ANALOGUE_DE _("Analogue Camera")
|
||||
#define NC_SCHEME_DE _("Control Scheme")
|
||||
#define OPTION_ENABLED_DE _("Enabled")
|
||||
#define OPTION_DISABLED_DE _("Disabled")
|
||||
#define OPTION_SCHEME1_DE _("Double Tap")
|
||||
#define OPTION_SCHEME2_DE _("Single Press")
|
||||
#define OPTION_SCHEME3_DE _("Classic")
|
||||
#define OPTION_LANGUAGE_DE _("Language")
|
||||
#define NC_WIDE_DE _("Widescreen")
|
||||
#define NC_BUTTON_DE _("[R]: Options")
|
||||
#define NC_BUTTON2_DE _("[R]: Return")
|
||||
#define NC_OPTION_DE _("OPTIONS")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Global Symbols
|
||||
*/
|
||||
@@ -26,12 +86,10 @@
|
||||
#define TEXT_HUD_CONGRATULATIONS _("CONGRATULATIONS") // Course Complete Text, Bowser Courses
|
||||
|
||||
//Widescreen stuff
|
||||
#ifdef WIDE
|
||||
#if defined(WIDE) && !defined(PUPPYCAM)
|
||||
#define TEXT_HUD_CURRENT_RATIO_43 _("ASPECT RATIO: 4:3")
|
||||
#define TEXT_HUD_CURRENT_RATIO_169 _("ASPECT RATIO: 16:9")
|
||||
#define TEXT_HUD_PRESS_L _("PRESS L TO SWITCH")
|
||||
#define TEXT_HUD_WIDE_INFO _("PLEASE CONFIGURE YOUR DISPLAY OR YOUR EMULATOR TO")
|
||||
#define TEXT_HUD_WIDE_INFO2 _("STRETCH THE IMAGE TO 16:9")
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_JP) || defined(VERSION_SH)
|
||||
@@ -233,7 +291,12 @@
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_EU
|
||||
|
||||
#define TEXT_ENGLISH _("ENGLISH")
|
||||
#define TEXT_FRENCH _("FRANÇAIS")
|
||||
#define TEXT_GERMAN _("DEUTSCH")
|
||||
|
||||
#if MULTILANG
|
||||
|
||||
/**
|
||||
* File Select Text
|
||||
@@ -317,10 +380,6 @@
|
||||
#define TEXT_MONO_DE _("MONO")
|
||||
#define TEXT_HEADSET_DE _("PHONES")
|
||||
|
||||
#define TEXT_ENGLISH _("ENGLISH")
|
||||
#define TEXT_FRENCH _("FRANÇAIS")
|
||||
#define TEXT_GERMAN _("DEUTSCH")
|
||||
|
||||
#define TEXT_HI_SCORE_FR _("MEILLEUR SCORE")
|
||||
#define TEXT_HI_SCORE_DE _("BESTLEISTUNG")
|
||||
|
||||
|
||||
+12
-30
@@ -32,7 +32,7 @@ struct Controller
|
||||
/*0x14*/ OSContStatus *statusData;
|
||||
/*0x18*/ OSContPad *controllerData;
|
||||
#if ENABLE_RUMBLE
|
||||
/*0x1C*/ int port;
|
||||
/*0x1C*/ s32 port;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -49,12 +49,15 @@ typedef uintptr_t GeoLayout;
|
||||
typedef uintptr_t LevelScript;
|
||||
typedef s16 Movtex;
|
||||
typedef s16 MacroObject;
|
||||
typedef s16 Collision;
|
||||
typedef COLLISION_DATA_TYPE Collision; //Collision is by default an s16, but it's best to have it match the type of COLLISION_DATA_TYPE
|
||||
typedef s16 Trajectory;
|
||||
typedef s16 PaintingData;
|
||||
typedef uintptr_t BehaviorScript;
|
||||
typedef u8 Texture;
|
||||
typedef u16 ModelID;
|
||||
typedef COLLISION_DATA_TYPE TerrainData;
|
||||
typedef ROOM_DATA_TYPE RoomData;
|
||||
typedef TerrainData Vec3t[3];
|
||||
|
||||
enum SpTaskState {
|
||||
SPTASK_STATE_NOT_STARTED,
|
||||
@@ -229,15 +232,15 @@ struct Waypoint
|
||||
|
||||
struct Surface
|
||||
{
|
||||
/*0x00*/ s16 type;
|
||||
/*0x02*/ s16 force;
|
||||
/*0x00*/ TerrainData type;
|
||||
/*0x02*/ TerrainData force;
|
||||
/*0x04*/ s8 flags;
|
||||
/*0x05*/ s8 room;
|
||||
/*0x05*/ RoomData room;
|
||||
/*0x06*/ s16 lowerY;
|
||||
/*0x08*/ s16 upperY;
|
||||
/*0x0A*/ Vec3s vertex1;
|
||||
/*0x10*/ Vec3s vertex2;
|
||||
/*0x16*/ Vec3s vertex3;
|
||||
/*0x0A*/ Vec3t vertex1;
|
||||
/*0x10*/ Vec3t vertex2;
|
||||
/*0x16*/ Vec3t vertex3;
|
||||
/*0x1C*/ struct {
|
||||
f32 x;
|
||||
f32 y;
|
||||
@@ -263,27 +266,6 @@ struct MarioBodyState
|
||||
u8 padding[4];
|
||||
};
|
||||
|
||||
struct OffsetSizePair
|
||||
{
|
||||
u32 offset;
|
||||
u32 size;
|
||||
};
|
||||
|
||||
struct MarioAnimDmaRelatedThing
|
||||
{
|
||||
u32 count;
|
||||
u8 *srcAddr;
|
||||
struct OffsetSizePair anim[1]; // dynamic size
|
||||
};
|
||||
|
||||
struct MarioAnimation
|
||||
{
|
||||
struct MarioAnimDmaRelatedThing *animDmaTable;
|
||||
u8 *currentAnimAddr;
|
||||
struct Animation *targetAnim;
|
||||
u8 padding[4];
|
||||
};
|
||||
|
||||
struct MarioState
|
||||
{
|
||||
/*0x00*/ u16 unk00;
|
||||
@@ -329,7 +311,7 @@ struct MarioState
|
||||
/*0x94*/ struct PlayerCameraState *statusForCamera;
|
||||
/*0x98*/ struct MarioBodyState *marioBodyState;
|
||||
/*0x9C*/ struct Controller *controller;
|
||||
/*0xA0*/ struct MarioAnimation *animation;
|
||||
/*0xA0*/ struct DmaHandlerList *animList;
|
||||
/*0xA4*/ u32 collidedObjInteractTypes;
|
||||
/*0xA8*/ s16 numCoins;
|
||||
/*0xAA*/ s16 numStars;
|
||||
|
||||
@@ -177,7 +177,7 @@ static const Vtx bitfs_seg7_vertex_07003340[] = {
|
||||
// TODO: what is this?
|
||||
// Possibly vertices for a perfect triangle, but flag seems to be used here.
|
||||
// 0x070033B0 - 0x070033E0
|
||||
static const s16 bitfs_seg7_todo_070033B0[] = {
|
||||
UNUSED static const s16 bitfs_seg7_todo_070033B0[] = {
|
||||
0x0080, 0x0100, 0x0000, 0x0000, 0x03de, 0x0000, 0xFFFF, 0xFFFF,
|
||||
0xFF81, 0x0100, 0x0000, 0x0000, 0xFBE4, 0x0000, 0xFFFF, 0xFFFF,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x07DA, 0xFFFF, 0xFFFF,
|
||||
|
||||
@@ -21,7 +21,9 @@ const GeoLayout ending_geo_000050[] = {
|
||||
GEO_OPEN_NODE(),
|
||||
GEO_NODE_ORTHO(100),
|
||||
GEO_OPEN_NODE(),
|
||||
#ifdef VERSION_EU
|
||||
GEO_BACKGROUND_COLOR(0x0001),
|
||||
#endif
|
||||
GEO_ASM(0, geo_exec_cake_end_screen),
|
||||
GEO_CLOSE_NODE(),
|
||||
GEO_CLOSE_NODE(),
|
||||
|
||||
@@ -8,9 +8,13 @@ extern const GeoLayout ending_geo_000050[];
|
||||
|
||||
// leveldata
|
||||
extern const Gfx dl_cake_end_screen[];
|
||||
#ifndef EU_CUSTOM_CAKE_FIX
|
||||
extern const Gfx dl_cake_end_screen_eu_070296F8[];
|
||||
extern const Gfx dl_cake_end_screen_eu_07029768[];
|
||||
extern const Gfx dl_cake_end_screen_eu_070297D8[];
|
||||
#else
|
||||
extern const Gfx dl_cake_end_screen_eu_fix[];
|
||||
#endif
|
||||
extern const Gfx dl_cake_end_screen[];
|
||||
|
||||
// script
|
||||
|
||||
@@ -200,6 +200,7 @@ static const Gfx dl_cake_end_eu_070296D8[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
#ifndef EU_CUSTOM_CAKE_FIX
|
||||
// 0x070296F8 - 0x07029768
|
||||
const Gfx dl_cake_end_screen_eu_070296F8[] = {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_eu_38),
|
||||
@@ -242,6 +243,13 @@ const Gfx dl_cake_end_screen_eu_070297D8[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
#else
|
||||
const Gfx dl_cake_end_screen_eu_fix[] = {
|
||||
gsSPDisplayList(dl_cake_end_eu_070296D8),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
#endif
|
||||
|
||||
// VERSION_EU
|
||||
#else
|
||||
|
||||
|
||||
+10
-2
@@ -7,11 +7,19 @@
|
||||
|
||||
#include "make_const_nonconst.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
extern const LevelScript level_main_scripts_entry[];
|
||||
const LevelScript level_script_entry[] = {
|
||||
INIT_LEVEL(),
|
||||
SLEEP(/*frames*/ 2),
|
||||
BLACKOUT(/*active*/ FALSE),
|
||||
SET_REG(/*value*/ 0),
|
||||
#ifdef TEST_LEVEL
|
||||
SET_REG(TEST_LEVEL),
|
||||
EXECUTE(/*seg*/ 0x15, _scriptsSegmentRomStart, _scriptsSegmentRomEnd, level_main_scripts_entry),
|
||||
#else
|
||||
SET_REG(0),
|
||||
EXECUTE(/*seg*/ 0x14, /*script*/ _introSegmentRomStart, /*scriptEnd*/ _introSegmentRomEnd, /*entry*/ level_intro_splash_screen),
|
||||
#endif
|
||||
JUMP(/*target*/ level_script_entry),
|
||||
};
|
||||
};
|
||||
+14
-12
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "game/area.h"
|
||||
#include "game/level_update.h"
|
||||
#include "menu/level_select_menu.h"
|
||||
#include "menu/title_screen.h"
|
||||
|
||||
#include "levels/scripts.h"
|
||||
#include "levels/menu/header.h"
|
||||
@@ -17,13 +17,15 @@
|
||||
|
||||
#include "make_const_nonconst.h"
|
||||
#include "levels/intro/header.h"
|
||||
#include "farcall.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "game/print.h"
|
||||
|
||||
const LevelScript level_intro_splash_screen[] = {
|
||||
INIT_LEVEL(),
|
||||
#ifdef SKIP_TITLE_SCREEN
|
||||
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_mario_head_regular),
|
||||
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_mario_head_regular, _introSegmentBssStart, _introSegmentBssEnd),
|
||||
#endif
|
||||
FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd),
|
||||
LOAD_RAW(/*seg*/ 0x13, _behaviorSegmentRomStart, _behaviorSegmentRomEnd),
|
||||
@@ -38,14 +40,14 @@ const LevelScript level_intro_splash_screen[] = {
|
||||
// Start animation
|
||||
LOAD_AREA(/*area*/ 1),
|
||||
|
||||
CALL(/*arg*/ 0, /*func*/ lvl_intro_update),
|
||||
CALL(/*arg*/ LVL_INTRO_PLAY_ITS_A_ME_MARIO, /*func*/ lvl_intro_update),
|
||||
SLEEP(/*frames*/ 75),
|
||||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0x00, 0x00, 0x00),
|
||||
SLEEP(/*frames*/ 16),
|
||||
CMD2A(/*unk2*/ 1),
|
||||
CLEAR_LEVEL(),
|
||||
SLEEP(/*frames*/ 2),
|
||||
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_mario_head_regular),
|
||||
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_mario_head_regular, _introSegmentBssStart, _introSegmentBssEnd),
|
||||
};
|
||||
|
||||
const LevelScript level_intro_mario_head_regular[] = {
|
||||
@@ -69,10 +71,10 @@ const LevelScript level_intro_mario_head_regular[] = {
|
||||
SLEEP(/*frames*/ 2),
|
||||
BLACKOUT(/*active*/ FALSE),
|
||||
LOAD_AREA(/*area*/ 1),
|
||||
SET_MENU_MUSIC(/*seq*/ 0x0002),
|
||||
SET_MENU_MUSIC(/*seq*/ SEQ_MENU_TITLE_SCREEN),
|
||||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
|
||||
SLEEP(/*frames*/ 20),
|
||||
CALL_LOOP(/*arg*/ 1, /*func*/ lvl_intro_update),
|
||||
CALL_LOOP(/*arg*/ LVL_INTRO_REGULAR, /*func*/ lvl_intro_update),
|
||||
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1),
|
||||
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2),
|
||||
JUMP(script_intro_L4),
|
||||
@@ -96,10 +98,10 @@ const LevelScript level_intro_mario_head_dizzy[] = {
|
||||
SLEEP(/*frames*/ 2),
|
||||
BLACKOUT(/*active*/ FALSE),
|
||||
LOAD_AREA(/*area*/ 1),
|
||||
SET_MENU_MUSIC(/*seq*/ 0x0082),
|
||||
SET_MENU_MUSIC(/*seq*/ SEQ_MENU_GAME_OVER),
|
||||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
|
||||
SLEEP(/*frames*/ 20),
|
||||
CALL_LOOP(/*arg*/ 2, /*func*/ lvl_intro_update),
|
||||
CALL_LOOP(/*arg*/ LVL_INTRO_GAME_OVER, /*func*/ lvl_intro_update),
|
||||
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1),
|
||||
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2),
|
||||
JUMP(script_intro_L4),
|
||||
@@ -118,10 +120,10 @@ const LevelScript level_intro_entry_4[] = {
|
||||
|
||||
FREE_LEVEL_POOL(),
|
||||
LOAD_AREA(/*area*/ 1),
|
||||
SET_MENU_MUSIC(/*seq*/ 0x0002),
|
||||
SET_MENU_MUSIC(/*seq*/ SEQ_MENU_TITLE_SCREEN),
|
||||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
|
||||
SLEEP(/*frames*/ 16),
|
||||
CALL_LOOP(/*arg*/ 3, /*func*/ lvl_intro_update),
|
||||
CALL_LOOP(/*arg*/ LVL_INTRO_LEVEL_SELECT, /*func*/ lvl_intro_update),
|
||||
JUMP_IF(/*op*/ OP_EQ, /*arg*/ -1, script_intro_L5),
|
||||
JUMP(script_intro_L3),
|
||||
};
|
||||
@@ -143,7 +145,7 @@ const LevelScript script_intro_L2[] = {
|
||||
SLEEP(/*frames*/ 16),
|
||||
CLEAR_LEVEL(),
|
||||
SLEEP(/*frames*/ 2),
|
||||
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_4),
|
||||
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_4, _introSegmentBssStart, _introSegmentBssEnd),
|
||||
};
|
||||
|
||||
const LevelScript script_intro_L3[] = {
|
||||
@@ -169,5 +171,5 @@ const LevelScript script_intro_L5[] = {
|
||||
SLEEP(/*frames*/ 16),
|
||||
CLEAR_LEVEL(),
|
||||
SLEEP(/*frames*/ 2),
|
||||
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_splash_screen),
|
||||
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_splash_screen, _introSegmentBssStart, _introSegmentBssEnd),
|
||||
};
|
||||
@@ -14,7 +14,7 @@ ALIGNED8 static const Texture lll_seg7_texture_07001000[] = {
|
||||
};
|
||||
|
||||
// 0x07001800 - 0x07002000
|
||||
ALIGNED8 static const Texture lll_seg7_texture_07001800[] = {
|
||||
UNUSED ALIGNED8 static const Texture lll_seg7_texture_07001800[] = {
|
||||
#include "levels/lll/3.rgba16.inc.c"
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ ALIGNED8 static const Texture lll_seg7_texture_07003000[] = {
|
||||
};
|
||||
|
||||
// 0x07003800 - 0x07004000
|
||||
ALIGNED8 static const Texture lll_seg7_texture_07003800[] = {
|
||||
UNUSED ALIGNED8 static const Texture lll_seg7_texture_07003800[] = {
|
||||
#include "levels/lll/7.rgba16.inc.c"
|
||||
};
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ const LevelScript level_main_menu_entry_1[] = {
|
||||
|
||||
FREE_LEVEL_POOL(),
|
||||
LOAD_AREA(/*area*/ 1),
|
||||
SET_MENU_MUSIC(/*seq*/ 0x0021),
|
||||
SET_MENU_MUSIC(/*seq*/ SEQ_MENU_FILE_SELECT),
|
||||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
|
||||
CALL(/*arg*/ 0, /*func*/ lvl_init_menu_values_and_cursor_pos),
|
||||
CALL_LOOP(/*arg*/ 0, /*func*/ lvl_update_obj_and_load_file_selected),
|
||||
|
||||
+17
-17
@@ -44,14 +44,14 @@ static const LevelScript script_exec_level_table[2
|
||||
#undef DEFINE_LEVEL
|
||||
#undef STUB_LEVEL
|
||||
|
||||
static const LevelScript script_L1[4];
|
||||
static const LevelScript script_L2[4];
|
||||
static const LevelScript goto_mario_head_regular[4];
|
||||
static const LevelScript goto_mario_head_dizzy[4];
|
||||
static const LevelScript script_L5[4];
|
||||
static const LevelScript script_L1[6];
|
||||
static const LevelScript script_L2[6];
|
||||
static const LevelScript goto_mario_head_regular[6];
|
||||
static const LevelScript goto_mario_head_dizzy[6];
|
||||
static const LevelScript script_L5[6];
|
||||
|
||||
#define STUB_LEVEL(_0, _1, _2, _3, _4, _5, _6, _7, _8)
|
||||
#define DEFINE_LEVEL(_0, _1, _2, folder, _4, _5, _6, _7, _8, _9, _10) static const LevelScript script_exec_ ## folder [4 + 1];
|
||||
#define DEFINE_LEVEL(_0, _1, _2, folder, _4, _5, _6, _7, _8, _9, _10) static const LevelScript script_exec_ ## folder [6 + 1];
|
||||
|
||||
#include "level_defines.h"
|
||||
|
||||
@@ -61,9 +61,9 @@ static const LevelScript script_L5[4];
|
||||
const LevelScript level_main_scripts_entry[] = {
|
||||
LOAD_YAY0(/*seg*/ 0x04, _group0_yay0SegmentRomStart, _group0_yay0SegmentRomEnd),
|
||||
LOAD_YAY0(/*seg*/ 0x03, _common1_yay0SegmentRomStart, _common1_yay0SegmentRomEnd),
|
||||
LOAD_RAW( /*seg*/ 0x17, _group0_geoSegmentRomStart, _group0_geoSegmentRomEnd),
|
||||
LOAD_RAW( /*seg*/ 0x16, _common1_geoSegmentRomStart, _common1_geoSegmentRomEnd),
|
||||
LOAD_RAW( /*seg*/ 0x13, _behaviorSegmentRomStart, _behaviorSegmentRomEnd),
|
||||
LOAD_RAW_WITH_CODE( /*seg*/ 0x17, _group0_geoSegmentRomStart, _group0_geoSegmentRomEnd, _group0_geoSegmentBssStart, _group0_geoSegmentBssEnd),
|
||||
LOAD_RAW_WITH_CODE( /*seg*/ 0x16, _common1_geoSegmentRomStart, _common1_geoSegmentRomEnd, _common1_geoSegmentBssStart, _common1_geoSegmentBssEnd),
|
||||
LOAD_RAW_WITH_CODE( /*seg*/ 0x13, _behaviorSegmentRomStart, _behaviorSegmentRomEnd, _behaviorSegmentBssStart, _behaviorSegmentBssEnd),
|
||||
ALLOC_LEVEL_POOL(),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_MARIO, mario_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_SMOKE, smoke_geo),
|
||||
@@ -127,23 +127,23 @@ const LevelScript level_main_scripts_entry[] = {
|
||||
};
|
||||
|
||||
static const LevelScript script_L1[] = {
|
||||
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_splash_screen),
|
||||
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_splash_screen, _introSegmentBssStart, _introSegmentBssEnd),
|
||||
};
|
||||
|
||||
static const LevelScript script_L2[] = {
|
||||
EXIT_AND_EXECUTE(/*seg*/ 0x0E, _endingSegmentRomStart, _endingSegmentRomEnd, level_ending_entry),
|
||||
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x0E, _endingSegmentRomStart, _endingSegmentRomEnd, level_ending_entry, _endingSegmentBssStart, _endingSegmentBssEnd),
|
||||
};
|
||||
|
||||
static const LevelScript goto_mario_head_regular[] = {
|
||||
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_mario_head_regular),
|
||||
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_mario_head_regular, _introSegmentBssStart, _introSegmentBssEnd),
|
||||
};
|
||||
|
||||
static const LevelScript goto_mario_head_dizzy[] = {
|
||||
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_mario_head_dizzy),
|
||||
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_mario_head_dizzy, _introSegmentBssStart, _introSegmentBssEnd),
|
||||
};
|
||||
|
||||
static const LevelScript script_L5[] = {
|
||||
EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_4),
|
||||
EXIT_AND_EXECUTE_WITH_CODE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_4, _introSegmentBssStart, _introSegmentBssEnd),
|
||||
};
|
||||
|
||||
// Include the level jumptable.
|
||||
@@ -161,7 +161,7 @@ static const LevelScript script_exec_level_table[] = {
|
||||
|
||||
#define DEFINE_LEVEL(_0, _1, _2, folder, _4, _5, _6, _7, _8, _9, _10) \
|
||||
static const LevelScript script_exec_ ## folder [] = { \
|
||||
EXECUTE(0x0E, _ ## folder ## SegmentRomStart, _ ## folder ## SegmentRomEnd, level_ ## folder ## _entry), \
|
||||
EXECUTE_WITH_CODE(0x0E, _ ## folder ## SegmentRomStart, _ ## folder ## SegmentRomEnd, level_ ## folder ## _entry, _ ## folder ## SegmentBssStart, _ ## folder ## SegmentBssEnd), \
|
||||
RETURN(), \
|
||||
};
|
||||
|
||||
@@ -171,7 +171,7 @@ static const LevelScript script_exec_ ## folder [] = { \
|
||||
|
||||
const LevelScript script_func_global_1[] = {
|
||||
LOAD_MODEL_FROM_GEO(MODEL_BLUE_COIN_SWITCH, blue_coin_switch_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_AMP, amp_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_AMP, dAmpGeo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_PURPLE_SWITCH, purple_switch_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_CHECKERBOARD_PLATFORM, checkerboard_platform_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_BREAKABLE_BOX, breakable_box_geo),
|
||||
@@ -297,7 +297,7 @@ const LevelScript script_func_global_13[] = {
|
||||
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_SMOKE, bowser_impact_smoke_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_FLAMES, bowser_flames_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_WAVE, invisible_bowser_accessory_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_BOWSER2, bowser2_geo),
|
||||
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_NO_SHADOW, bowser_geo_no_shadow),
|
||||
RETURN(),
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define SCRIPTS_H
|
||||
|
||||
#include "types.h"
|
||||
#include "game/puppycam2.h"
|
||||
|
||||
// scripts
|
||||
extern const LevelScript level_main_scripts_entry[];
|
||||
|
||||
@@ -19,7 +19,7 @@ ALIGNED8 static const Texture ssl_seg7_texture_07001800[] = {
|
||||
};
|
||||
|
||||
// 0x07002000 - 0x07002800
|
||||
ALIGNED8 static const Texture ssl_seg7_texture_07002000[] = {
|
||||
UNUSED ALIGNED8 static const Texture ssl_seg7_texture_07002000[] = {
|
||||
#include "levels/ssl/4.rgba16.inc.c"
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ $(BUILD_DIR)/%.szp: $(BUILD_DIR)/%.bin
|
||||
# convert binary szp to object file
|
||||
$(BUILD_DIR)/%.szp.o: $(BUILD_DIR)/%.szp
|
||||
$(call print,Converting MIO0 to ELF:,$<,$@)
|
||||
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@
|
||||
$(V)$(LD) -r -b binary $< -o $@
|
||||
+1
-1
@@ -10,4 +10,4 @@ fi
|
||||
|
||||
#echo "Replace $1 with $2?"
|
||||
#read
|
||||
grep -rl "$1" text/**/*.{c,h} assets/**/*.c enhancements/*.patch lib/**/*.{c,h,s} asm/**/*.s bin/**/*.c data/*.c levels/**/*.{c,h} actors/**/*.c src/**/*.{c,h} include/**/*.{h,in} undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g"
|
||||
grep -rl "$1" text/**/*.{c,h} assets/**/*.c enhancements/*.patch lib/**/*.{c,h,s} asm/**/*.s bin/**/*.c data/*.c levels/**/*.{c,h} actors/**/*.{c,h} src/**/*.{c,h} include/**/*.{h,in} undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g"
|
||||
+1
-1
@@ -6,4 +6,4 @@ $(BUILD_DIR)/%.szp: $(BUILD_DIR)/%.bin
|
||||
# convert binary szp to object file
|
||||
$(BUILD_DIR)/%.szp.o: $(BUILD_DIR)/%.szp
|
||||
$(call print,Converting RNC1 to ELF:,$<,$@)
|
||||
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@
|
||||
$(V)$(LD) -r -b binary $< -o $@
|
||||
+1
-1
@@ -6,4 +6,4 @@ $(BUILD_DIR)/%.szp: $(BUILD_DIR)/%.bin
|
||||
# convert binary szp to object file
|
||||
$(BUILD_DIR)/%.szp.o: $(BUILD_DIR)/%.szp
|
||||
$(call print,Converting RNC2 to ELF:,$<,$@)
|
||||
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@
|
||||
$(V)$(LD) -r -b binary $< -o $@
|
||||
+20
-20
@@ -53,15 +53,15 @@ dispatchTable:
|
||||
jumpTableEntry cmd_SPNOOP
|
||||
jumpTableEntry cmd_SETLOOP
|
||||
|
||||
jumpTableEntry cmd_17e4
|
||||
jumpTableEntry cmd_INTERL
|
||||
jumpTableEntry cmd_DMEMMOVE2
|
||||
jumpTableEntry cmd_DOWNSAMPLE_HALF
|
||||
jumpTableEntry cmd_ENVSETUP1
|
||||
jumpTableEntry cmd_ENVMIXER
|
||||
|
||||
jumpTableEntry cmd_LOADBUFF
|
||||
jumpTableEntry cmd_SAVEBUFF
|
||||
jumpTableEntry cmd_ENVSETUP2
|
||||
jumpTableEntry cmd_1b78
|
||||
jumpTableEntry cmd_S8DEC
|
||||
|
||||
jumpTableEntry cmd_HILOGAIN
|
||||
jumpTableEntry cmd_1c7c
|
||||
@@ -938,12 +938,12 @@ cmd_RESAMPLE:
|
||||
.endif
|
||||
addi $8, $8, -8
|
||||
.ifdef VERSION_SH
|
||||
sdv $v16[0], 0x00($8)
|
||||
sdv $v16[0], 0x00($8)
|
||||
.endif
|
||||
@@audio_c410c:
|
||||
lsv $v23[14], 0x08($23) // saved pitch_accumulator
|
||||
.ifdef VERSION_SH
|
||||
ldv $v16[0], 0x00($8)
|
||||
ldv $v16[0], 0x00($8)
|
||||
.else
|
||||
ldv $v16[0], 0x00($23) // saved next 4 unprocessed samples
|
||||
sdv $v16[0], 0x00($8) // store them before the input samples
|
||||
@@ -1100,8 +1100,8 @@ cmd_RESAMPLE:
|
||||
mtc0 $zero, SP_SEMAPHORE
|
||||
|
||||
.ifdef VERSION_SH
|
||||
cmd_17e4:
|
||||
srl $t7, $k0, 16
|
||||
cmd_DMEMMOVE2:
|
||||
srl $t7, $k0, 16
|
||||
andi $t7, $t7, 0xff
|
||||
andi $t5, $k0, 0xffff
|
||||
srl $t6, $t9, 0x10
|
||||
@@ -1150,7 +1150,7 @@ cmd_DUPLICATE:
|
||||
j cmd_SPNOOP
|
||||
nop
|
||||
|
||||
cmd_INTERL:
|
||||
cmd_DOWNSAMPLE_HALF:
|
||||
andi $t4, $k0, 0xffff
|
||||
andi $t6, $t9, 0xffff
|
||||
srl $t5, $t9, 0x10
|
||||
@@ -1606,24 +1606,24 @@ cmd_MIXER:
|
||||
j cmd_SPNOOP
|
||||
nop
|
||||
|
||||
cmd_1b78:
|
||||
lhu $13, 0x0(r24)
|
||||
cmd_S8DEC:
|
||||
lhu $13, (audio_in_buf)(r24)
|
||||
vxor $v2, $v2, $v2
|
||||
lhu $14, 0x2(r24)
|
||||
lhu $14, (audio_out_buf)(r24)
|
||||
vxor $v3, $v3, $v3
|
||||
lhu $12, 0x4(r24)
|
||||
lhu $12, (audio_count)(r24)
|
||||
sll $17, $25, 8
|
||||
srl $17, $17, 8
|
||||
sqv $v2[0], 0x0(r14)
|
||||
srl $17, $17, 8 // state addr
|
||||
sqv $v2[0], 0x0(r14) // store 0 to first 16 samples if A_INIT
|
||||
sqv $v3[0], 0x10(r14)
|
||||
srl $1, $26, 16
|
||||
andi $1, $1, 0x1
|
||||
bgtz $1, @audio_4001bd8
|
||||
bgtz $1, @audio_4001bd8 // A_INIT
|
||||
srl $1, $26, 16
|
||||
andi $1, $1, 0x2
|
||||
beq $0, $1, @audio_4001bbc
|
||||
beq $0, $1, @audio_4001bbc // A_LOOP
|
||||
addi $2, $17, 0x0
|
||||
lw $2, 0x10(r24)
|
||||
lw $2, (audio_loop_value)(r24)
|
||||
@audio_4001bbc:
|
||||
addi $1, $14, 0x0
|
||||
jal dma_read_start
|
||||
@@ -1635,10 +1635,10 @@ cmd_1b78:
|
||||
mtc0 $0, sp_semaphore
|
||||
@audio_4001bd8:
|
||||
addi $14, $14, 0x20
|
||||
beq $12, $0, @audio_4001c04
|
||||
beq $12, $0, @audio_4001c04 // this of very few ops allows count=0
|
||||
nop
|
||||
@audio_4001be4:
|
||||
lpv $v2[0], 0x0(r13)
|
||||
lpv $v2[0], 0x0(r13) // load each byte to upper 8 bits per elem
|
||||
lpv $v3[0], 0x8(r13)
|
||||
addi $13, $13, 0x10
|
||||
addi $12, $12, 0xffe0
|
||||
@@ -1647,7 +1647,7 @@ cmd_1b78:
|
||||
bgtz $12, @audio_4001be4
|
||||
addi $14, $14, 0x20
|
||||
@audio_4001c04:
|
||||
addi $1, $14, 0xffe0
|
||||
addi $1, $14, 0xffe0 // write last 16 samples to the state
|
||||
addi $2, $17, 0x0
|
||||
jal dma_write_start
|
||||
addi $3, $0, 0x1f
|
||||
|
||||
@@ -52,10 +52,20 @@ OUTPUT_ARCH (mips)
|
||||
END_SEG(name##_segment_7) \
|
||||
BEGIN_SEG(name, 0x0E000000) \
|
||||
{ \
|
||||
KEEP(BUILD_DIR/levels/name/script.o(.data)); \
|
||||
KEEP(BUILD_DIR/levels/name/geo.o(.data)); \
|
||||
KEEP(BUILD_DIR/levels/name/script.o(.*data*)); \
|
||||
KEEP(BUILD_DIR/levels/name/script.o(.text)); \
|
||||
KEEP(BUILD_DIR/levels/name/script.o(.rodata*)); \
|
||||
KEEP(BUILD_DIR/levels/name/geo.o(.*data*)); \
|
||||
KEEP(BUILD_DIR/levels/name/geo.o(.text)); \
|
||||
KEEP(BUILD_DIR/levels/name/geo.o(.rodata*)); \
|
||||
} \
|
||||
END_SEG(name)
|
||||
END_SEG(name) \
|
||||
BEGIN_NOLOAD(name) \
|
||||
{ \
|
||||
KEEP(BUILD_DIR/levels/name/script.o(.bss*)); \
|
||||
KEEP(BUILD_DIR/levels/name/geo.o(.bss*)); \
|
||||
} \
|
||||
END_NOLOAD(name)
|
||||
|
||||
#define STANDARD_OBJECTS(name, segAddr, geoAddr) \
|
||||
BEGIN_SEG(name##_yay0, segAddr) \
|
||||
@@ -66,9 +76,16 @@ OUTPUT_ARCH (mips)
|
||||
END_SEG(name##_yay0) \
|
||||
BEGIN_SEG(name##_geo, geoAddr) \
|
||||
{ \
|
||||
KEEP(BUILD_DIR/actors/name##_geo.o(.data)); \
|
||||
KEEP(BUILD_DIR/actors/name##_geo.o(.*data*)); \
|
||||
KEEP(BUILD_DIR/actors/name##_geo.o(.rodata*)); \
|
||||
KEEP(BUILD_DIR/actors/name##_geo.o(.text)); \
|
||||
} \
|
||||
END_SEG(name##_geo) \
|
||||
BEGIN_NOLOAD(name##_geo) \
|
||||
{ \
|
||||
KEEP(BUILD_DIR/actors/name##_geo.o(.bss*)); \
|
||||
} \
|
||||
END_NOLOAD(name##_geo) \
|
||||
_##name##_mio0SegmentRomStart = _##name##_yay0SegmentRomStart; \
|
||||
_##name##_mio0SegmentRomEnd = _##name##_yay0SegmentRomEnd;
|
||||
|
||||
@@ -131,9 +148,8 @@ SECTIONS
|
||||
{
|
||||
KEEP(BUILD_DIR/asm/entry.o(.text));
|
||||
|
||||
BUILD_DIR/src/game*.o(.text);
|
||||
BUILD_DIR/src/boot*.o(.text);
|
||||
BUILD_DIR/src/hvqm*.o(.text);
|
||||
BUILD_DIR/src/gdb*.o(.text);
|
||||
BUILD_DIR/src/usb*.o(.text);
|
||||
BUILD_DIR/src/audio*.o(.text);
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
@@ -152,8 +168,7 @@ SECTIONS
|
||||
lib/PR/hvqm/hvqm2sp1.o(.text);
|
||||
|
||||
/* data */
|
||||
BUILD_DIR/src/game*.o(.*data*);
|
||||
BUILD_DIR/src/gdb*.o(.*data*);
|
||||
BUILD_DIR/src/boot*.o(.*data*);
|
||||
BUILD_DIR/src/usb*.o(.*data*);
|
||||
BUILD_DIR/src/audio*.o(.*data*);
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
@@ -171,8 +186,7 @@ SECTIONS
|
||||
lib/PR/hvqm/hvqm2sp1.o(.data*);
|
||||
|
||||
/* rodata */
|
||||
BUILD_DIR/src/game*.o(.rodata*);
|
||||
BUILD_DIR/src/gdb*.o(.*rodata*);
|
||||
BUILD_DIR/src/boot*.o(.rodata*);
|
||||
BUILD_DIR/src/usb*.o(.rodata*);
|
||||
BUILD_DIR/src/audio*.o(.rodata*);
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
@@ -190,11 +204,13 @@ SECTIONS
|
||||
lib/PR/hvqm/hvqm2sp1.o(.rodata*);
|
||||
}
|
||||
END_SEG(main)
|
||||
#ifndef PRELIMINARY
|
||||
ASSERT((_mainSegmentRomEnd <= 0x101000), "Error: Please shrink your main segment to under 1MB.")
|
||||
#endif
|
||||
BEGIN_NOLOAD(main)
|
||||
{
|
||||
BUILD_DIR/src/game*.o(.*bss*);
|
||||
BUILD_DIR/src/boot*.o(.*bss*);
|
||||
BUILD_DIR/src/hvqm*.o(.*bss*);
|
||||
BUILD_DIR/src/gdb*.o(.*bss*);
|
||||
BUILD_DIR/src/usb*.o(.*bss*);
|
||||
BUILD_DIR/src/audio*.o(.*bss*);
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
@@ -215,29 +231,29 @@ SECTIONS
|
||||
}
|
||||
END_NOLOAD(main)
|
||||
|
||||
/*ASSERT((. <= SEG_ENGINE), "Error: main segment extended into engine.")*/
|
||||
|
||||
. = _mainSegmentBssEnd;
|
||||
|
||||
BEGIN_SEG(engine, .)
|
||||
{
|
||||
BUILD_DIR/src/game*.o(.text);
|
||||
BUILD_DIR/src/engine*.o(.text);
|
||||
/* data */
|
||||
BUILD_DIR/src/game*.o(.*data*);
|
||||
BUILD_DIR/src/engine*.o(.data*);
|
||||
BUILD_DIR/src/engine*.o(.sdata*);
|
||||
/* rodata */
|
||||
BUILD_DIR/src/game*.o(.rodata*);
|
||||
BUILD_DIR/src/engine*.o(.rodata*);
|
||||
}
|
||||
END_SEG(engine)
|
||||
BEGIN_NOLOAD(engine)
|
||||
{
|
||||
BUILD_DIR/src/game*.o(.*bss*);
|
||||
BUILD_DIR/src/engine*.o(.bss*);
|
||||
. = ALIGN(0x40);
|
||||
}
|
||||
END_NOLOAD(engine)
|
||||
|
||||
/*ASSERT((. <= SEG_FRAMEBUFFERS), "Error: engine segment extended into framebuffers.")*/
|
||||
|
||||
. = _engineSegmentBssEnd;
|
||||
BEGIN_NOLOAD(framebuffers)
|
||||
{
|
||||
@@ -250,10 +266,11 @@ SECTIONS
|
||||
|
||||
__expansionRamStart = 0x80400000;
|
||||
#ifndef USE_EXT_RAM
|
||||
ASSERT((. <= __expansionRamStart), "Error: RDRAM expanded into Expansion RAM, despite Expansion RAM not being defined.")
|
||||
#ifndef PRELIMINARY
|
||||
ASSERT((. <= __expansionRamStart), "Error: RDRAM expanded into Expansion RAM, despite Expansion RAM not being defined.")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
BEGIN_SEG(entry, 0x10000000)
|
||||
{
|
||||
BUILD_DIR/levels/entry.o(.data);
|
||||
@@ -297,65 +314,84 @@ SECTIONS
|
||||
/* use segmented addressing for behaviors */
|
||||
BEGIN_SEG(behavior, 0x13000000)
|
||||
{
|
||||
KEEP(BUILD_DIR/data/behavior_data.o(.data));
|
||||
KEEP(BUILD_DIR/data/behavior_data.o(.data*));
|
||||
KEEP(BUILD_DIR/data/behavior_data.o(.rodata*));
|
||||
KEEP(BUILD_DIR/data/behavior_data.o(.text));
|
||||
}
|
||||
END_SEG(behavior)
|
||||
BEGIN_NOLOAD(behavior)
|
||||
{
|
||||
KEEP(BUILD_DIR/data/behavior_data.o(.bss*));
|
||||
}
|
||||
END_NOLOAD(behavior)
|
||||
|
||||
|
||||
/* 0x8016F000 21D7D0-255EC0 [386F0] */
|
||||
BEGIN_SEG(goddard, SEG_GODDARD)
|
||||
BEGIN_SEG(goddard, RAM_END - GODDARD_SIZE)
|
||||
{
|
||||
BUILD_DIR/src/menu*.o(.text);
|
||||
BUILD_DIR/src/menu*.o(.data*);
|
||||
BUILD_DIR/src/menu*.o(.rodata*);
|
||||
#ifdef KEEP_MARIO_HEAD
|
||||
BUILD_DIR/libgoddard.a:*.o(.text);
|
||||
/* goddard subsystem data */
|
||||
BUILD_DIR/libgoddard.a:gd_main.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:draw_objects.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:objects.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:particles.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:dynlist_proc.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:debug_utils.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:joints.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:shape_helper.o(.data*);
|
||||
BUILD_DIR/libgoddard.a:renderer.o(.data*);
|
||||
/* goddard subsystem rodata */
|
||||
BUILD_DIR/libgoddard.a:gd_main.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:gd_memory.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:draw_objects.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:objects.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:skin_movement.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:particles.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:dynlist_proc.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:old_menu.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:debug_utils.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:joints.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:skin.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:gd_math.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:shape_helper.o(.rodata*);
|
||||
BUILD_DIR/libgoddard.a:renderer.o(.rodata*);
|
||||
#endif
|
||||
KEEP(BUILD_DIR/src/menu*.o(.text));
|
||||
KEEP(BUILD_DIR/src/menu*.o(.data*));
|
||||
KEEP(BUILD_DIR/src/menu*.o(.rodata*));
|
||||
#ifdef KEEP_MARIO_HEAD
|
||||
KEEP(BUILD_DIR/libgoddard.a:*.o(.text));
|
||||
KEEP(BUILD_DIR/libgoddard.a:gd_main.o(.data*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:draw_objects.o(.data*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:objects.o(.data*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:particles.o(.data*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:dynlist_proc.o(.data*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:debug_utils.o(.data*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:joints.o(.data*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:shape_helper.o(.data*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:renderer.o(.data*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:gd_main.o(.rodata*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:gd_memory.o(.rodata*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:draw_objects.o(.rodata*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:objects.o(.rodata*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:skin_movement.o(.rodata*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:particles.o(.rodata*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:dynlist_proc.o(.rodata*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:old_menu.o(.rodata*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:debug_utils.o(.rodata*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:joints.o(.rodata*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:skin.o(.rodata*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:gd_math.o(.rodata*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:shape_helper.o(.rodata*));
|
||||
KEEP(BUILD_DIR/libgoddard.a:renderer.o(.rodata*));
|
||||
#endif
|
||||
. = ALIGN(16);
|
||||
}
|
||||
END_SEG(goddard)
|
||||
BEGIN_NOLOAD(goddard)
|
||||
{
|
||||
BUILD_DIR/src/menu*.o(.bss*);
|
||||
#ifdef KEEP_MARIO_HEAD
|
||||
BUILD_DIR/libgoddard.a:*.o(.bss*);
|
||||
#endif
|
||||
KEEP(BUILD_DIR/src/menu*.o(.bss*));
|
||||
#ifdef KEEP_MARIO_HEAD
|
||||
KEEP(BUILD_DIR/libgoddard.a:*.o(.bss*));
|
||||
#endif
|
||||
. = ALIGN(16);
|
||||
}
|
||||
END_NOLOAD(goddard)
|
||||
|
||||
ASSERT((. <= (SEG_POOL_START + POOL_SIZE)), "Error: extended past pool end.")
|
||||
|
||||
#ifndef PRELIMINARY
|
||||
ASSERT((. <= (SEG_POOL_START + POOL_SIZE)), "Error: extended past pool end.")
|
||||
#endif
|
||||
#ifdef PRELIMINARY
|
||||
GODDARD_SIZE = SIZEOF(.goddard) + SIZEOF(.goddard.noload);
|
||||
#endif
|
||||
|
||||
/* 0x268020 0x268020-0 [0] */
|
||||
BEGIN_SEG(intro, 0x14000000)
|
||||
{
|
||||
KEEP(BUILD_DIR/levels/intro/script.o(.data));
|
||||
KEEP(BUILD_DIR/levels/intro/script.o(.*data));
|
||||
KEEP(BUILD_DIR/levels/intro/script.o(.rodata*));
|
||||
KEEP(BUILD_DIR/levels/intro/script.o(.text));
|
||||
KEEP(BUILD_DIR/levels/intro/geo.o(.data));
|
||||
}
|
||||
END_SEG(intro)
|
||||
BEGIN_NOLOAD(intro)
|
||||
{
|
||||
KEEP(BUILD_DIR/levels/intro/script.o(.bss*));
|
||||
}
|
||||
END_NOLOAD(intro)
|
||||
BEGIN_SEG(intro_segment_7, 0x07000000)
|
||||
{
|
||||
KEEP(BUILD_DIR/levels/intro/leveldata.szp.o(.data));
|
||||
|
||||
+129
-126
@@ -1,22 +1,16 @@
|
||||
.include "seq_macros.inc"
|
||||
#include "seq_macros.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 0
|
||||
|
||||
sequence_start:
|
||||
|
||||
.ifdef VERSION_SH
|
||||
.set VERSION_EU_SH, 1
|
||||
.endif
|
||||
.ifdef VERSION_EU
|
||||
.set VERSION_EU_SH, 1
|
||||
.endif
|
||||
|
||||
seq_setmutebhv 0x60
|
||||
seq_setmutescale 0
|
||||
.ifdef VERSION_SH
|
||||
#ifdef VERSION_SH
|
||||
seq_setvol 100
|
||||
.else
|
||||
#else
|
||||
seq_setvol 127
|
||||
.endif
|
||||
#endif
|
||||
seq_settempo 120
|
||||
seq_initchannels 0x3ff
|
||||
seq_startchannel 0, .channel0
|
||||
@@ -77,7 +71,7 @@ chan_stereoheadseteffects 1
|
||||
chan_setdyntable .channel59_table
|
||||
chan_jump .main_loop_023589
|
||||
|
||||
# Main loop for standard, non-continuous sound effects
|
||||
// Main loop for standard, non-continuous sound effects
|
||||
.main_loop_023589:
|
||||
chan_delay1
|
||||
chan_ioreadval 0
|
||||
@@ -91,17 +85,17 @@ chan_iowriteval 5
|
||||
chan_ioreadval 4
|
||||
chan_dyncall
|
||||
|
||||
# keep looping until layer 0 finishes or we are told to stop or to play something else
|
||||
// keep looping until layer 0 finishes or we are told to stop or to play something else
|
||||
.poll_023589:
|
||||
chan_delay1
|
||||
chan_ioreadval 0
|
||||
chan_bltz .skip_023589 # if we have a signal:
|
||||
chan_beqz .force_stop_023589 # told to stop
|
||||
chan_jump .start_playing_023589 # told to play something else
|
||||
chan_bltz .skip_023589 // if we have a signal:
|
||||
chan_beqz .force_stop_023589 // told to stop
|
||||
chan_jump .start_playing_023589 // told to play something else
|
||||
.skip_023589:
|
||||
chan_testlayerfinished 0
|
||||
chan_beqz .poll_023589 # if layer 0 hasn't finished, keep polling
|
||||
chan_jump .main_loop_023589 # otherwise go back to the main loop
|
||||
chan_beqz .poll_023589 // if layer 0 hasn't finished, keep polling
|
||||
chan_jump .main_loop_023589 // otherwise go back to the main loop
|
||||
.force_stop_023589:
|
||||
chan_freelayer 0
|
||||
chan_freelayer 1
|
||||
@@ -144,7 +138,7 @@ chan_stereoheadseteffects 1
|
||||
chan_setdyntable .channel6_table
|
||||
chan_jump .main_loop_146
|
||||
|
||||
# Main loop for moving, env and air sound effects, which play continuously
|
||||
// Main loop for moving, env and air sound effects, which play continuously
|
||||
.main_loop_146:
|
||||
chan_delay1
|
||||
chan_ioreadval 0
|
||||
@@ -159,7 +153,7 @@ chan_iowriteval 5
|
||||
chan_ioreadval 4
|
||||
chan_dyncall
|
||||
|
||||
# keep looping until we are told to stop or to play something else
|
||||
// keep looping until we are told to stop or to play something else
|
||||
.poll_146:
|
||||
chan_delay1
|
||||
chan_ioreadval 0
|
||||
@@ -181,7 +175,7 @@ chan_iowriteval 5
|
||||
chan_stereoheadseteffects 1
|
||||
chan_setdyntable .channel7_table
|
||||
|
||||
# Loop for menu sound effects
|
||||
// Loop for menu sound effects
|
||||
.main_loop_7:
|
||||
chan_delay1
|
||||
chan_ioreadval 0
|
||||
@@ -198,19 +192,19 @@ chan_setpanmix 127
|
||||
chan_ioreadval 4
|
||||
chan_dyncall
|
||||
|
||||
# keep looping until layer 0 finishes or we are told to stop or to play something else
|
||||
// keep looping until layer 0 finishes or we are told to stop or to play something else
|
||||
.poll_7:
|
||||
chan_delay1
|
||||
chan_ioreadval 0
|
||||
chan_bltz .skip_7 # if we have a signal:
|
||||
chan_beqz .force_stop_7 # told to stop
|
||||
chan_bltz .skip_7 // if we have a signal:
|
||||
chan_beqz .force_stop_7 // told to stop
|
||||
chan_unreservenotes
|
||||
chan_jump .start_playing_7 # told to play something else
|
||||
chan_jump .start_playing_7 // told to play something else
|
||||
.skip_7:
|
||||
chan_testlayerfinished 0
|
||||
chan_beqz .poll_7 # if layer 0 hasn't finished, keep polling
|
||||
chan_beqz .poll_7 // if layer 0 hasn't finished, keep polling
|
||||
chan_unreservenotes
|
||||
chan_jump .main_loop_7 # otherwise go back to the main loop
|
||||
chan_jump .main_loop_7 // otherwise go back to the main loop
|
||||
.force_stop_7:
|
||||
chan_freelayer 0
|
||||
chan_freelayer 1
|
||||
@@ -218,7 +212,7 @@ chan_freelayer 2
|
||||
chan_unreservenotes
|
||||
chan_jump .main_loop_7
|
||||
|
||||
# Delay for a number of ticks (1-255) in an interruptible manner.
|
||||
// Delay for a number of ticks (1-255) in an interruptible manner.
|
||||
.delay:
|
||||
chan_writeseq_nextinstr 0, 1
|
||||
chan_loop 20
|
||||
@@ -233,15 +227,15 @@ chan_end
|
||||
chan_setpanmix 127
|
||||
chan_setvolscale 127
|
||||
chan_setvibratoextent 0
|
||||
chan_ioreadval 1 # IO slots 0-3 are reset to -1 when read; restore the value
|
||||
chan_ioreadval 1 // IO slots 0-3 are reset to -1 when read; restore the value
|
||||
chan_iowriteval 0
|
||||
chan_break # break out of the loop
|
||||
chan_break # force the caller to return immediately
|
||||
chan_break // break out of the loop
|
||||
chan_break // force the caller to return immediately
|
||||
chan_end
|
||||
|
||||
# Set reverb in way that takes area echo level and volume into account. This
|
||||
# is done by writing to IO slot 5 and letting get_sound_reverb in external.c
|
||||
# do the necessary math.
|
||||
// Set reverb in way that takes area echo level and volume into account. This
|
||||
// is done by writing to IO slot 5 and letting get_sound_reverb in external.c
|
||||
// do the necessary math.
|
||||
.set_reverb:
|
||||
chan_writeseq_nextinstr 0, 1
|
||||
chan_setreverb 10
|
||||
@@ -342,15 +336,15 @@ sound_ref .sound_action_bounce_off_object
|
||||
sound_ref .chan_7ED
|
||||
sound_ref .sound_action_read_sign
|
||||
sound_ref .chan_810
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
sound_ref .sound_action_jump_default
|
||||
sound_ref .sound_action_jump_default
|
||||
sound_ref .sound_action_jump_default
|
||||
.else
|
||||
#else
|
||||
sound_ref .chan_828
|
||||
sound_ref .sound_action_intro_unk45e
|
||||
sound_ref .sound_action_intro_unk45f
|
||||
.endif
|
||||
#endif
|
||||
sound_ref .sound_action_heavy_landing_default
|
||||
sound_ref .sound_action_heavy_landing_grass
|
||||
sound_ref .sound_action_heavy_landing_water
|
||||
@@ -988,7 +982,7 @@ layer_portamento 0x81, 42, 255
|
||||
layer_note1 37, 0x1e, 105
|
||||
layer_end
|
||||
|
||||
.sound_action_climb_down_tree: # unused
|
||||
.sound_action_climb_down_tree: // unused
|
||||
chan_setbank 0
|
||||
chan_setinstr 1
|
||||
chan_setlayer 0, .layer_579
|
||||
@@ -999,7 +993,7 @@ layer_portamento 0x81, 44, 255
|
||||
layer_note1 40, 0xb4, 100
|
||||
layer_end
|
||||
|
||||
.chan_582: # unused
|
||||
.chan_582: // unused
|
||||
chan_setbank 0
|
||||
chan_setinstr 2
|
||||
chan_setlayer 0, .layer_58A
|
||||
@@ -1418,8 +1412,8 @@ layer_note1 39, 0xa, 127
|
||||
layer_note1 42, 0x8, 127
|
||||
layer_end
|
||||
|
||||
.ifndef VERSION_JP
|
||||
.chan_828: # unused
|
||||
#ifndef VERSION_JP
|
||||
.chan_828: // unused
|
||||
chan_setbank 7
|
||||
chan_setinstr 3
|
||||
chan_setlayer 0, .layer_83C
|
||||
@@ -1464,7 +1458,7 @@ layer_end
|
||||
.layer_871:
|
||||
layer_transpose 8
|
||||
layer_jump .layer_776
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.sound_action_heavy_landing_default:
|
||||
chan_call .heavy_landing_common
|
||||
@@ -2029,7 +2023,7 @@ sound_ref .sound_mario_punch_wah
|
||||
sound_ref .sound_mario_uh
|
||||
sound_ref .sound_mario_hrmm
|
||||
sound_ref .sound_mario_wah2
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
sound_ref .sound_mario_jump_hoo
|
||||
sound_ref .sound_mario_jump_hoo
|
||||
sound_ref .sound_mario_jump_hoo
|
||||
@@ -2046,7 +2040,7 @@ sound_ref .sound_mario_wah2
|
||||
sound_ref .sound_mario_jump_hoo
|
||||
sound_ref .sound_mario_jump_hoo
|
||||
sound_ref .sound_mario_jump_hoo
|
||||
.else
|
||||
#else
|
||||
sound_ref .sound_peach_dear_mario
|
||||
sound_ref .sound_mario_jump_hoo
|
||||
sound_ref .sound_mario_jump_hoo
|
||||
@@ -2071,7 +2065,7 @@ sound_ref .sound_mario_wah2
|
||||
sound_ref .sound_peach_bake_a_cake
|
||||
sound_ref .sound_peach_for_mario
|
||||
sound_ref .sound_peach_mario2
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.sound_mario_jump_hoo:
|
||||
chan_setbank 8
|
||||
@@ -2080,9 +2074,9 @@ chan_setlayer 0, .layer_C3C
|
||||
chan_end
|
||||
|
||||
.layer_C3C:
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
layer_transpose 2
|
||||
.endif
|
||||
#endif
|
||||
layer_portamento 0x82, 41, 127
|
||||
layer_note1 37, 0x14, 127
|
||||
layer_end
|
||||
@@ -2119,9 +2113,9 @@ chan_setlayer 0, .layer_C6C
|
||||
chan_end
|
||||
|
||||
.layer_C6C:
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
layer_transpose 1
|
||||
.endif
|
||||
#endif
|
||||
layer_portamento 0x82, 44, 200
|
||||
layer_note1 39, 0x30, 127
|
||||
layer_end
|
||||
@@ -2482,7 +2476,7 @@ chan_end
|
||||
layer_transpose -1
|
||||
layer_jump .layer_C4E
|
||||
|
||||
.ifndef VERSION_JP
|
||||
#ifndef VERSION_JP
|
||||
.sound_peach_dear_mario:
|
||||
chan_setbank 10
|
||||
chan_setinstr 15
|
||||
@@ -2697,9 +2691,9 @@ layer_jump .layer_C4E
|
||||
.layer_F8A:
|
||||
layer_note1 39, 0x50, 127
|
||||
layer_end
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.ifdef VERSION_EU_SH
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
.chan_unused_F9A_eu:
|
||||
chan_setbank 8
|
||||
chan_setinstr 0
|
||||
@@ -2709,7 +2703,7 @@ layer_jump .layer_C4E
|
||||
.layer_FA2_eu:
|
||||
layer_delay 0x5
|
||||
layer_end
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.channel38_table:
|
||||
sound_ref .sound_general_activate_cap_switch
|
||||
@@ -2830,7 +2824,7 @@ sound_ref .sound_general_boing3
|
||||
sound_ref .sound_general_grand_star
|
||||
sound_ref .sound_general_grand_star_jump
|
||||
sound_ref .sound_general_boat_rock
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
sound_ref .sound_menu_enter_hole
|
||||
sound_ref .sound_menu_enter_hole
|
||||
sound_ref .sound_menu_enter_hole
|
||||
@@ -2841,7 +2835,7 @@ sound_ref .sound_general_boat_rock
|
||||
sound_ref .sound_general_bubbles
|
||||
sound_ref .sound_menu_enter_hole
|
||||
sound_ref .sound_menu_enter_hole
|
||||
.else
|
||||
#else
|
||||
sound_ref .sound_general_vanish_sfx
|
||||
sound_ref .sound_menu_enter_hole
|
||||
sound_ref .sound_general_red_coin
|
||||
@@ -2852,7 +2846,7 @@ sound_ref .sound_general_boat_rock
|
||||
sound_ref .sound_general_boing2
|
||||
sound_ref .sound_general_yoshi_walk
|
||||
sound_ref .sound_general_enemy_alert1
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.sound_general_activate_cap_switch:
|
||||
chan_setbank 5
|
||||
@@ -3408,17 +3402,17 @@ chan_setbank 9
|
||||
chan_setinstr 3
|
||||
chan_setval 40
|
||||
chan_call .set_reverb
|
||||
.ifdef VERSION_SH
|
||||
#ifdef VERSION_SH
|
||||
chan_setreverb 40
|
||||
.endif
|
||||
#endif
|
||||
chan_setlayer 0, .layer_141A
|
||||
chan_end
|
||||
|
||||
.layer_141A:
|
||||
layer_transpose 24
|
||||
.ifdef VERSION_SH
|
||||
#ifdef VERSION_SH
|
||||
layer_note1 51, 0xc, 90
|
||||
.endif
|
||||
#endif
|
||||
layer_note1 39, 0x4, 90
|
||||
layer_note1 51, 0xc, 90
|
||||
layer_note1 39, 0x4, 50
|
||||
@@ -3487,18 +3481,18 @@ layer_end
|
||||
|
||||
.sound_general_chain_chomp2:
|
||||
chan_setbank 7
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
chan_setinstr 8
|
||||
.else
|
||||
#else
|
||||
chan_setinstr 14
|
||||
.endif
|
||||
#endif
|
||||
chan_setval 15
|
||||
chan_call .set_reverb
|
||||
chan_setlayer 0, .layer_14C6
|
||||
chan_setlayer 1, .layer_14E3
|
||||
.ifndef VERSION_JP
|
||||
#ifndef VERSION_JP
|
||||
chan_setlayer 2, .layer_14E3
|
||||
.endif
|
||||
#endif
|
||||
chan_setval 1
|
||||
chan_call .delay
|
||||
chan_setenvelope .envelope_3368
|
||||
@@ -3507,11 +3501,11 @@ chan_setinstr 7
|
||||
chan_setval 13
|
||||
chan_call .delay
|
||||
chan_setbank 7
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
chan_setinstr 8
|
||||
.else
|
||||
#else
|
||||
chan_setinstr 14
|
||||
.endif
|
||||
#endif
|
||||
chan_end
|
||||
|
||||
.layer_14C6:
|
||||
@@ -3527,12 +3521,12 @@ layer_end
|
||||
|
||||
.layer_14E3:
|
||||
layer_loop 2
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
layer_portamento 0x81, 36, 255
|
||||
layer_note1 24, 0x18, 127
|
||||
.else
|
||||
#else
|
||||
layer_note1 34, 0x19, 100
|
||||
.endif
|
||||
#endif
|
||||
layer_loopend
|
||||
layer_end
|
||||
|
||||
@@ -4154,24 +4148,27 @@ layer_note1 31, 0x14, 127
|
||||
layer_end
|
||||
|
||||
.sound_general_red_coin:
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
chan_setbank 9
|
||||
chan_setinstr 3
|
||||
chan_setlayer 0, .layer_1909
|
||||
chan_setlayer 1, .layer_1902
|
||||
chan_setlayer 2, .layer_1907
|
||||
.else
|
||||
.ifdef VERSION_EU_SH
|
||||
#else
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
chan_setbank 9
|
||||
chan_setinstr 3
|
||||
.else
|
||||
#else
|
||||
chan_setinstr 128
|
||||
.endif
|
||||
#endif
|
||||
chan_setenvelope .envelope_3378
|
||||
// Small bugfix: .main_loop_023589 expects layer 0 to live the longest.
|
||||
// I don't think this actually makes any audible difference given the
|
||||
// silence at the end.
|
||||
chan_setlayer 0, .layer_1907
|
||||
chan_setlayer 1, .layer_1902
|
||||
chan_setlayer 2, .layer_1909
|
||||
.endif
|
||||
#endif
|
||||
chan_end
|
||||
|
||||
.layer_1902:
|
||||
@@ -4191,6 +4188,12 @@ layer_note0 58, 0x10, 100, 80
|
||||
layer_note0 58, 0x10, 60, 80
|
||||
layer_note0 58, 0x10, 40, 80
|
||||
layer_note0 58, 0x10, 25, 80
|
||||
// This small delay should not have any effect, but decreases the probability of
|
||||
// encountering double red coin glitch. Without it, layer 0 finishes in 1.04
|
||||
// seconds, and with some bad luck around scheduling/lag the sound spawner with
|
||||
// a lifetime of 30 frames that creates the sound may deactivate on the same
|
||||
// frame. That leads to double sound glitch on JP, see src/audio/external.c.
|
||||
// With the delay, the same thing can still happen but requires more CPU lag.
|
||||
layer_delay 0xa
|
||||
layer_end
|
||||
|
||||
@@ -4422,7 +4425,7 @@ layer_portamento 0x81, 36, 40
|
||||
layer_note1 41, 0xc, 127
|
||||
layer_end
|
||||
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
.sound_general_boat_rock:
|
||||
chan_setbank 9
|
||||
chan_setinstr 0
|
||||
@@ -4438,7 +4441,7 @@ layer_end
|
||||
layer_portamento 0x1, 32, 0x7f
|
||||
layer_note1 60, 0x28, 100
|
||||
layer_end
|
||||
.else
|
||||
#else
|
||||
.sound_general_boat_rock:
|
||||
chan_setbank 4
|
||||
chan_setinstr 2
|
||||
@@ -4476,7 +4479,7 @@ layer_end
|
||||
layer_portamento 0x81, 19, 255
|
||||
layer_note1 31, 0x32, 115
|
||||
layer_end
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.channel4_table:
|
||||
sound_ref .sound_env_waterfall1
|
||||
@@ -4525,21 +4528,21 @@ chan_setbank 5
|
||||
chan_setinstr 1
|
||||
chan_setval 25
|
||||
chan_call .set_reverb
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
chan_setenvelope .envelope_32E4
|
||||
.else
|
||||
#else
|
||||
chan_setenvelope .envelope_32C4
|
||||
.endif
|
||||
#endif
|
||||
chan_setlayer 0, .layer_1B53
|
||||
chan_end
|
||||
|
||||
.layer_1B53:
|
||||
layer_somethingon
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
layer_delay 0x6
|
||||
.else
|
||||
#else
|
||||
layer_delay 0x4
|
||||
.endif
|
||||
#endif
|
||||
.layer_1B56:
|
||||
layer_note1 41, 0x12c, 95
|
||||
layer_jump .layer_1B56
|
||||
@@ -4694,11 +4697,11 @@ chan_end
|
||||
|
||||
.layer_1C69:
|
||||
layer_portamento 0x81, 15, 255
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
layer_note1 11, 0x1f4, 100
|
||||
.else
|
||||
#else
|
||||
layer_note1 11, 0x1f4, 127
|
||||
.endif
|
||||
#endif
|
||||
layer_end
|
||||
|
||||
.sound_env_elevator3:
|
||||
@@ -5374,11 +5377,11 @@ chan_end
|
||||
|
||||
.layer_20D2:
|
||||
layer_portamento 0x81, 44, 255
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
layer_note1 36, 0x18, 90
|
||||
.else
|
||||
#else
|
||||
layer_note1 36, 0x18, 115
|
||||
.endif
|
||||
#endif
|
||||
layer_delay 0x32
|
||||
layer_end
|
||||
|
||||
@@ -5398,13 +5401,13 @@ layer_note1 31, 0x26, 127
|
||||
layer_end
|
||||
|
||||
.layer_20F4:
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
layer_note1 38, 0x8, 120
|
||||
layer_note1 33, 0x1e, 120
|
||||
.else
|
||||
#else
|
||||
layer_note1 38, 0x8, 127
|
||||
layer_note1 33, 0x1e, 127
|
||||
.endif
|
||||
#endif
|
||||
layer_end
|
||||
|
||||
.sound_obj_bully_metal:
|
||||
@@ -6989,7 +6992,7 @@ sound_ref .sound_menu_thank_you_playing_my_game
|
||||
sound_ref .sound_menu_read_a_sign
|
||||
sound_ref .sound_menu_exit_a_sign
|
||||
sound_ref .sound_menu_mario_castle_warp2
|
||||
.ifdef VERSION_JP
|
||||
#ifdef VERSION_JP
|
||||
sound_ref .sound_menu_message_next_page
|
||||
sound_ref .sound_menu_coin_its_a_me_mario
|
||||
sound_ref .sound_menu_yoshi_gain_lives
|
||||
@@ -7003,7 +7006,7 @@ sound_ref .sound_menu_mario_castle_warp2
|
||||
sound_ref .sound_menu_mario_castle_warp
|
||||
sound_ref .sound_menu_star_sound
|
||||
sound_ref .sound_menu_change_select
|
||||
.else
|
||||
#else
|
||||
sound_ref .sound_menu_star_sound_okey_dokey
|
||||
sound_ref .sound_menu_star_sound_lets_a_go
|
||||
sound_ref .sound_menu_yoshi_gain_lives
|
||||
@@ -7033,7 +7036,7 @@ sound_ref .sound_menu_mario_castle_warp2
|
||||
sound_ref .sound_menu_power_meter
|
||||
sound_ref .sound_menu_camera_buzz
|
||||
sound_ref .sound_menu_camera_turn
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.sound_menu_change_select:
|
||||
chan_setbank 9
|
||||
@@ -7506,13 +7509,13 @@ layer_end
|
||||
chan_reservenotes 4
|
||||
chan_setbank 9
|
||||
chan_setinstr 2
|
||||
.ifdef VERSION_SH
|
||||
#ifdef VERSION_SH
|
||||
chan_setval 15
|
||||
.set EXIT_PIPE_NOTE_VELOCITY, 106
|
||||
.else
|
||||
#else
|
||||
chan_setval 30
|
||||
.set EXIT_PIPE_NOTE_VELOCITY, 126
|
||||
.endif
|
||||
#endif
|
||||
chan_call .set_reverb
|
||||
chan_setenvelope .envelope_3464
|
||||
chan_setdecayrelease 220
|
||||
@@ -7774,7 +7777,7 @@ chan_setlayer 0, .layer_3041
|
||||
chan_setlayer 1, .layer_2FC9
|
||||
chan_end
|
||||
|
||||
.ifndef VERSION_JP
|
||||
#ifndef VERSION_JP
|
||||
.sound_menu_star_sound_okey_dokey:
|
||||
chan_setbank 4
|
||||
chan_setinstr 14
|
||||
@@ -7828,33 +7831,33 @@ chan_end
|
||||
.layer_3146:
|
||||
layer_delay 0x6
|
||||
|
||||
.ifdef VERSION_SH
|
||||
#ifdef VERSION_SH
|
||||
.set RED_COIN_NOTE_VELOCITY_SUB, 10
|
||||
.else
|
||||
#else
|
||||
.set RED_COIN_NOTE_VELOCITY_SUB, 0
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.layer_3148:
|
||||
layer_call .transpose_by_coin_index
|
||||
layer_note0 46, 0xc, 75 - RED_COIN_NOTE_VELOCITY_SUB, 20
|
||||
layer_note0 45, 0xc, 75 - RED_COIN_NOTE_VELOCITY_SUB, 20
|
||||
layer_note0 46, 0xc, 75 - RED_COIN_NOTE_VELOCITY_SUB, 20
|
||||
layer_note0 58, 0x10, 80 - RED_COIN_NOTE_VELOCITY_SUB, 80
|
||||
layer_note0 58, 0x10, 45 - RED_COIN_NOTE_VELOCITY_SUB, 80
|
||||
layer_note0 58, 0x10, 20 - RED_COIN_NOTE_VELOCITY_SUB, 80
|
||||
layer_note0 58, 0x10, 15 - RED_COIN_NOTE_VELOCITY_SUB, 80
|
||||
layer_note0 46, 0xc, (75 - RED_COIN_NOTE_VELOCITY_SUB), 20
|
||||
layer_note0 45, 0xc, (75 - RED_COIN_NOTE_VELOCITY_SUB), 20
|
||||
layer_note0 46, 0xc, (75 - RED_COIN_NOTE_VELOCITY_SUB), 20
|
||||
layer_note0 58, 0x10, (80 - RED_COIN_NOTE_VELOCITY_SUB), 80
|
||||
layer_note0 58, 0x10, (45 - RED_COIN_NOTE_VELOCITY_SUB), 80
|
||||
layer_note0 58, 0x10, (20 - RED_COIN_NOTE_VELOCITY_SUB), 80
|
||||
layer_note0 58, 0x10, (15 - RED_COIN_NOTE_VELOCITY_SUB), 80
|
||||
|
||||
layer_end
|
||||
|
||||
.layer_3168:
|
||||
layer_call .transpose_by_coin_index
|
||||
layer_note0 41, 0xc, 75 - RED_COIN_NOTE_VELOCITY_SUB, 20
|
||||
layer_note0 40, 0xc, 75 - RED_COIN_NOTE_VELOCITY_SUB, 20
|
||||
layer_note0 41, 0xc, 75 - RED_COIN_NOTE_VELOCITY_SUB, 20
|
||||
layer_note0 53, 0x10, 80 - RED_COIN_NOTE_VELOCITY_SUB, 80
|
||||
layer_note0 53, 0x10, 45 - RED_COIN_NOTE_VELOCITY_SUB, 80
|
||||
layer_note0 53, 0x10, 20 - RED_COIN_NOTE_VELOCITY_SUB, 80
|
||||
layer_note0 53, 0x10, 15 - RED_COIN_NOTE_VELOCITY_SUB, 80
|
||||
layer_note0 41, 0xc, (75 - RED_COIN_NOTE_VELOCITY_SUB), 20
|
||||
layer_note0 40, 0xc, (75 - RED_COIN_NOTE_VELOCITY_SUB), 20
|
||||
layer_note0 41, 0xc, (75 - RED_COIN_NOTE_VELOCITY_SUB), 20
|
||||
layer_note0 53, 0x10, (80 - RED_COIN_NOTE_VELOCITY_SUB), 80
|
||||
layer_note0 53, 0x10, (45 - RED_COIN_NOTE_VELOCITY_SUB), 80
|
||||
layer_note0 53, 0x10, (20 - RED_COIN_NOTE_VELOCITY_SUB), 80
|
||||
layer_note0 53, 0x10, (15 - RED_COIN_NOTE_VELOCITY_SUB), 80
|
||||
layer_end
|
||||
|
||||
.transpose_by_coin_index:
|
||||
@@ -7877,7 +7880,7 @@ chan_end
|
||||
layer_transpose 0
|
||||
layer_note1 32, 0x7f, 115
|
||||
layer_end
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.sound_general_bird_chirp2:
|
||||
chan_setbank 5
|
||||
@@ -8084,14 +8087,14 @@ envelope_line 1 32700
|
||||
envelope_line 10 0
|
||||
envelope_goto 2
|
||||
|
||||
.ifndef VERSION_JP
|
||||
#ifndef VERSION_JP
|
||||
.envelope_3378:
|
||||
envelope_line 3 32700
|
||||
envelope_line 10 30000
|
||||
envelope_line 10 10000
|
||||
envelope_line 100 0
|
||||
envelope_goto 3
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.envelope_338C:
|
||||
envelope_line 1 32700
|
||||
@@ -8150,11 +8153,11 @@ envelope_goto 2
|
||||
.envelope_341C:
|
||||
envelope_line 25 32760
|
||||
envelope_line 60 10000
|
||||
.ifdef VERSION_SH
|
||||
#ifdef VERSION_SH
|
||||
envelope_hang
|
||||
.else
|
||||
#else
|
||||
envelope_goto 2
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.envelope_3428:
|
||||
envelope_line 1 10000
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
unsigned char gSoundDataADSR[] = {
|
||||
#include "sound/sound_data.ctl.inc.c"
|
||||
};
|
||||
|
||||
unsigned char gSoundDataRaw[] = {
|
||||
#include "sound/sound_data.tbl.inc.c"
|
||||
};
|
||||
|
||||
unsigned char gMusicData[] = {
|
||||
#include "sound/sequences.bin.inc.c"
|
||||
};
|
||||
|
||||
#ifndef VERSION_SH
|
||||
unsigned char gBankSetsData[] = {
|
||||
#include "sound/bank_sets.inc.c"
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,21 @@
|
||||
.include "macros.inc"
|
||||
|
||||
.section .data
|
||||
|
||||
glabel gSoundDataADSR
|
||||
.incbin "sound/sound_data.ctl"
|
||||
.balign 16
|
||||
|
||||
glabel gSoundDataRaw
|
||||
.incbin "sound/sound_data.tbl"
|
||||
.balign 16
|
||||
|
||||
glabel gMusicData
|
||||
.incbin "sound/sequences.bin"
|
||||
.balign 16
|
||||
|
||||
#ifndef VERSION_SH
|
||||
glabel gBankSetsData
|
||||
.incbin "sound/bank_sets"
|
||||
.balign 16
|
||||
#endif
|
||||
@@ -126,12 +126,12 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) {
|
||||
u8 sameSound;
|
||||
u8 cmd; // a0 sp3E, EU s2
|
||||
u8 cmdSemitone; // sp3D, t0
|
||||
u16 sp3A; // t2, a0, a1
|
||||
u16 sp3A = 0; // t2, a0, a1
|
||||
f32 tuning; // f0
|
||||
s32 vel; // sp30, t3
|
||||
s32 vel = 0; // sp30, t3
|
||||
s32 usedSemitone; // a1
|
||||
f32 freqScale; // sp28, f0
|
||||
f32 sp24;
|
||||
f32 freqScale = 0.0f; // sp28, f0
|
||||
f32 sp24 = 0.0f;
|
||||
f32 temp_f12;
|
||||
f32 temp_f2;
|
||||
|
||||
|
||||
Loaded 100 of 303 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user