Merge branch 'develop/2.1.0' of https://github.com/HackerN64/HackerSM64 into develop/2.1.0-four-controllers-base
This commit is contained in:
commit
50b4ebf051
142 files changed
+20123
-3946
No files matched your search
@@ -124,6 +124,12 @@ endif
|
||||
TEXT_ENGINE := none
|
||||
$(eval $(call validate-option,TEXT_ENGINE,none s2dex_text_engine))
|
||||
|
||||
ifeq ($(TEXT_ENGINE), s2dex_text_engine)
|
||||
DEFINES += S2DEX_GBI_2=1 S2DEX_TEXT_ENGINE=1
|
||||
SRC_DIRS += src/s2d_engine
|
||||
endif
|
||||
# add more text engines here
|
||||
|
||||
#==============================================================================#
|
||||
# Optimization flags #
|
||||
#==============================================================================#
|
||||
@@ -415,14 +421,6 @@ endif
|
||||
|
||||
LIBRARIES := nustd hvqm2 z goddard
|
||||
|
||||
# Text engine
|
||||
ifeq ($(TEXT_ENGINE), s2dex_text_engine)
|
||||
DEFINES += S2DEX_GBI_2=1 S2DEX_TEXT_ENGINE=1
|
||||
LIBRARIES += s2d_engine
|
||||
DUMMY != $(MAKE) -C src/s2d_engine COPY_DIR=$(shell pwd)/lib/ CROSS=$(CROSS)
|
||||
endif
|
||||
# add more text engines here
|
||||
|
||||
LINK_LIBRARIES = $(foreach i,$(LIBRARIES),-l$(i))
|
||||
|
||||
export LD_LIBRARY_PATH=./tools
|
||||
@@ -490,7 +488,6 @@ CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
|
||||
YAY0TOOL := $(TOOLS_DIR)/slienc
|
||||
MIO0TOOL := $(TOOLS_DIR)/mio0
|
||||
RNCPACK := $(TOOLS_DIR)/rncpack
|
||||
ROMALIGN := $(TOOLS_DIR)/romalign
|
||||
FILESIZER := $(TOOLS_DIR)/filesizer
|
||||
N64CKSUM := $(TOOLS_DIR)/n64cksum
|
||||
N64GRAPHICS := $(TOOLS_DIR)/n64graphics
|
||||
@@ -502,6 +499,7 @@ VADPCM_ENC := $(TOOLS_DIR)/vadpcm_enc
|
||||
EXTRACT_DATA_FOR_MIO := $(TOOLS_DIR)/extract_data_for_mio
|
||||
SKYCONV := $(TOOLS_DIR)/skyconv
|
||||
FIXLIGHTS_PY := $(TOOLS_DIR)/fixlights.py
|
||||
FLIPS := $(TOOLS_DIR)/flips
|
||||
ifeq ($(GZIPVER),std)
|
||||
GZIP := gzip
|
||||
else
|
||||
@@ -513,7 +511,6 @@ ifneq (,$(call find-command,armips))
|
||||
else
|
||||
RSPASM := $(TOOLS_DIR)/armips
|
||||
endif
|
||||
ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth
|
||||
EMULATOR = mupen64plus
|
||||
EMU_FLAGS =
|
||||
|
||||
@@ -559,7 +556,6 @@ all: $(ROM)
|
||||
|
||||
clean:
|
||||
$(RM) -r $(BUILD_DIR_BASE)
|
||||
make -C src/s2d_engine clean
|
||||
|
||||
distclean: clean
|
||||
$(PYTHON) extract_assets.py --clean
|
||||
@@ -587,8 +583,11 @@ unf: $(ROM) $(LOADER)
|
||||
|
||||
libultra: $(BUILD_DIR)/libultra.a
|
||||
|
||||
patch: $(ROM)
|
||||
$(FLIPS) --create --bps ./baserom.$(VERSION).z64 $(ROM) $(BUILD_DIR)/$(TARGET_STRING).bps
|
||||
|
||||
# Extra object file dependencies
|
||||
$(BUILD_DIR)/asm/boot.o: $(IPL3_RAW_FILES)
|
||||
$(BUILD_DIR)/asm/ipl3.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/aspMain.o: $(BUILD_DIR)/rsp/audio.bin
|
||||
@@ -735,17 +734,9 @@ $(BUILD_DIR)/%.aifc: $(BUILD_DIR)/%.table %.aiff
|
||||
$(call print,Encoding ADPCM:,$(word 2,$^),$@)
|
||||
$(V)$(VADPCM_ENC) -c $^ $@
|
||||
|
||||
$(ENDIAN_BITWIDTH): $(TOOLS_DIR)/determine-endian-bitwidth.c
|
||||
@$(PRINT) "$(GREEN)Generating endian-bitwidth $(NO_COL)\n"
|
||||
$(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 > $@
|
||||
$(V)$(RM) $@.dummy1
|
||||
$(V)$(RM) $@.dummy2
|
||||
|
||||
$(SOUND_BIN_DIR)/sound_data.ctl: sound/sound_banks/ $(SOUND_BANK_FILES) $(SOUND_SAMPLE_AIFCS) $(ENDIAN_BITWIDTH)
|
||||
$(SOUND_BIN_DIR)/sound_data.ctl: sound/sound_banks/ $(SOUND_BANK_FILES) $(SOUND_SAMPLE_AIFCS)
|
||||
@$(PRINT) "$(GREEN)Generating: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(PYTHON) $(TOOLS_DIR)/assemble_sound.py $(BUILD_DIR)/sound/samples/ sound/sound_banks/ $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/ctl_header $(SOUND_BIN_DIR)/sound_data.tbl $(SOUND_BIN_DIR)/tbl_header $(C_DEFINES) $$(cat $(ENDIAN_BITWIDTH))
|
||||
$(V)$(PYTHON) $(TOOLS_DIR)/assemble_sound.py $(BUILD_DIR)/sound/samples/ sound/sound_banks/ $(SOUND_BIN_DIR)/sound_data.ctl $(SOUND_BIN_DIR)/ctl_header $(SOUND_BIN_DIR)/sound_data.tbl $(SOUND_BIN_DIR)/tbl_header $(C_DEFINES)
|
||||
|
||||
$(SOUND_BIN_DIR)/sound_data.tbl: $(SOUND_BIN_DIR)/sound_data.ctl
|
||||
@true
|
||||
@@ -756,9 +747,9 @@ $(SOUND_BIN_DIR)/ctl_header: $(SOUND_BIN_DIR)/sound_data.ctl
|
||||
$(SOUND_BIN_DIR)/tbl_header: $(SOUND_BIN_DIR)/sound_data.ctl
|
||||
@true
|
||||
|
||||
$(SOUND_BIN_DIR)/sequences.bin: $(SOUND_BANK_FILES) sound/sequences.json $(SOUND_SEQUENCE_DIRS) $(SOUND_SEQUENCE_FILES) $(ENDIAN_BITWIDTH)
|
||||
$(SOUND_BIN_DIR)/sequences.bin: $(SOUND_BANK_FILES) sound/sequences.json $(SOUND_SEQUENCE_DIRS) $(SOUND_SEQUENCE_FILES)
|
||||
@$(PRINT) "$(GREEN)Generating: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(PYTHON) $(TOOLS_DIR)/assemble_sound.py --sequences $@ $(SOUND_BIN_DIR)/sequences_header $(SOUND_BIN_DIR)/bank_sets sound/sound_banks/ sound/sequences.json $(SOUND_SEQUENCE_FILES) $(C_DEFINES) $$(cat $(ENDIAN_BITWIDTH))
|
||||
$(V)$(PYTHON) $(TOOLS_DIR)/assemble_sound.py --sequences $@ $(SOUND_BIN_DIR)/sequences_header $(SOUND_BIN_DIR)/bank_sets sound/sound_banks/ sound/sequences.json $(SOUND_SEQUENCE_FILES) $(C_DEFINES)
|
||||
|
||||
$(SOUND_BIN_DIR)/bank_sets: $(SOUND_BIN_DIR)/sequences.bin
|
||||
@true
|
||||
@@ -864,7 +855,7 @@ $(BUILD_DIR)/sm64_prelim.ld: sm64.ld $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $
|
||||
|
||||
$(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
|
||||
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -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...)
|
||||
@@ -872,13 +863,13 @@ $(BUILD_DIR)/goddard.txt: $(BUILD_DIR)/sm64_prelim.elf
|
||||
|
||||
$(BUILD_DIR)/asm/debug/map.o: asm/debug/map.s $(BUILD_DIR)/sm64_prelim.elf
|
||||
$(call print,Assembling:,$<,$@)
|
||||
$(V)python3 tools/mapPacker.py $(BUILD_DIR)/sm64_prelim.map $(BUILD_DIR)/bin/addr.bin $(BUILD_DIR)/bin/name.bin
|
||||
$(V)python3 tools/mapPacker.py $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/bin/addr.bin $(BUILD_DIR)/bin/name.bin
|
||||
$(V)$(CROSS)gcc -c $(ASMFLAGS) $(foreach i,$(INCLUDE_DIRS),-Wa,-I$(i)) -x assembler-with-cpp -MMD -MF $(BUILD_DIR)/$*.d -o $@ $<
|
||||
|
||||
# Link SM64 ELF file
|
||||
$(ELF): $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/asm/debug/map.o $(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 $(BUILD_DIR)/asm/debug/map.o $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(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) -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 -lrtc
|
||||
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -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 -lrtc
|
||||
|
||||
# Build ROM
|
||||
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
|
||||
|
||||
@@ -27,9 +27,10 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
|
||||
- **Kaze**: Graph node optimisations, automatic optimal collision distance
|
||||
- **Pyro Jay**: Texture improvements, repo banner art, some QoL stuff
|
||||
- **CrashOveride**: creating the [ultrasm64](https://github.com/CrashOveride95/ultrasm64) repo
|
||||
- **falcobuster**: Original coordinate overflow fix (world scale), ASM version of extended bounds
|
||||
- **falcobuster**: Original coordinate overflow fix (world scale), ASM version of extended bounds, emulator detector
|
||||
- **anonymous_moose**: porting falco's extended bounds to decomp
|
||||
- **tuxlovesyou**: `LOAD_MIO0_TEXTURE` macro and moral support
|
||||
- **devwizard**: the PJ64 pre-v3.0 detection part of the emulator detector
|
||||
|
||||
Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
|
||||
|
||||
@@ -82,7 +83,7 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
|
||||
- Many general use defines for object struct members, meant for use in custom object behaviors. Check `include/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/config_rom.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.
|
||||
- There is a `gEmulator` variable to detect console or specific emulators and emulator versions
|
||||
- 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/config_debug.h` in order to boot straight into it, so you can quickly test the level you're working on. *
|
||||
- Allow 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. *
|
||||
@@ -105,7 +106,7 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
|
||||
|
||||
**Neat Misc. Changes:**
|
||||
- Instant Input patch by Wiseguy (Removes all input lag caused by plugins supporting framebuffer)
|
||||
- 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.
|
||||
- This means that you'll have to do your framebuffer effects on buffer 0 for emulator, but NOT for console. You can use the `gEmulator` 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 (64x64) coins, the vanilla coin texture is upgraded to accomodate. *
|
||||
@@ -121,7 +122,7 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
|
||||
- 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.
|
||||
|
||||
- Red Coin Stars now support up to 99 red coins! In addition, multi-area red coin missions can now be created by setting the 2nd behavior paramater of the red coin star to the number of reds required for the star to spawn.
|
||||
# UltraSM64
|
||||
|
||||
- This repo contains a full decompilation of Super Mario 64 (J), (U), (E), and (SH).
|
||||
@@ -135,7 +136,7 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
|
||||
- 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.
|
||||
- Automatic console and emulator detection: Use the `gEmulator` 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.
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
v2.0.8
|
||||
v2.0.9
|
||||
+1
-1
@@ -27,6 +27,6 @@
|
||||
#include "sparkle_animation/model.inc.c"
|
||||
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
#include "src/s2d_engine/config.h"
|
||||
#include "src/s2d_engine/s2d_config.h"
|
||||
#include FONT_C_FILE
|
||||
#endif
|
||||
+126
-107
@@ -4,24 +4,39 @@
|
||||
.set gp=64
|
||||
|
||||
#include "macros.inc"
|
||||
#undef _LANGUAGE_C
|
||||
#include <PR/rcp.h>
|
||||
|
||||
#define PHYS_TO_CART(addr) ((addr) | 0xB0000000)
|
||||
.set CART_ENTRYPOINT, 0x00000008
|
||||
.set CART_CHECKSUM0, 0x00000010
|
||||
.set CART_CHECKSUM1, 0x00000014
|
||||
|
||||
// initial DMEM state
|
||||
.set SP_DMEM_UNK0, 0x040004C0
|
||||
.set SP_DMEM_UNK1, 0x04000774
|
||||
|
||||
// Used for documentation; changing these can and will break your ROM!
|
||||
.set INITIAL_DMA_LEN, 0x00100000
|
||||
.set INITIAL_DMA_ROMPOS, 0x1000
|
||||
|
||||
|
||||
// 0xA0000000-0xBFFFFFFF: KSEG1 direct map non-cache mirror of 0x00000000
|
||||
// 0xA4000000-0xA4000FFF: RSP DMEM
|
||||
|
||||
// 0xA4000000-0xA400003F: ROM header
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
// 0xA4000040-0xA4000B6F: IPL3
|
||||
|
||||
// IPL3 entry point jumped to from IPL2
|
||||
glabel ipl3_entry // 0xA4000040
|
||||
mtc0 $zero, $13
|
||||
mtc0 $zero, $9
|
||||
mtc0 $zero, $11
|
||||
lui $t0, %hi(RI_MODE_REG)
|
||||
addiu $t0, %lo(RI_MODE_REG)
|
||||
lw $t1, 0xc($t0)
|
||||
.ent ipl3_entry
|
||||
mtc0 $zero, C0_CAUSE
|
||||
mtc0 $zero, C0_COUNT
|
||||
mtc0 $zero, C0_COMPARE
|
||||
lui $t0, %hi(PHYS_TO_K1(RI_BASE_REG))
|
||||
addiu $t0, %lo(PHYS_TO_K1(RI_BASE_REG))
|
||||
lw $t1, %lo(RI_SELECT_REG)($t0)
|
||||
bnez $t1, .LA4000410
|
||||
nop
|
||||
addiu $sp, $sp, -0x18
|
||||
@@ -30,24 +45,24 @@ glabel ipl3_entry // 0xA4000040
|
||||
sw $s5, 8($sp)
|
||||
sw $s6, 0xc($sp)
|
||||
sw $s7, 0x10($sp)
|
||||
lui $t0, %hi(RI_MODE_REG)
|
||||
addiu $t0, %lo(RI_MODE_REG)
|
||||
lui $t2, (0xa3f80000 >> 16)
|
||||
lui $t3, (0xa3f00000 >> 16)
|
||||
lui $t4, %hi(MI_MODE_REG)
|
||||
addiu $t4, %lo(MI_MODE_REG)
|
||||
lui $t0, %hi(PHYS_TO_K1(RI_BASE_REG))
|
||||
addiu $t0, %lo(PHYS_TO_K1(RI_BASE_REG))
|
||||
lui $t2, %hi(PHYS_TO_K1(RDRAM_BASE_REG + 0x80000))
|
||||
lui $t3, %hi(PHYS_TO_K1(RDRAM_BASE_REG))
|
||||
lui $t4, %hi(PHYS_TO_K1(MI_BASE_REG))
|
||||
addiu $t4, %lo(PHYS_TO_K1(MI_BASE_REG))
|
||||
ori $t1, $zero, 64
|
||||
sw $t1, 4($t0)
|
||||
sw $t1, %lo(MI_VERSION_REG)($t0)
|
||||
li $s1, 8000
|
||||
.LA400009C:
|
||||
nop
|
||||
addi $s1, $s1, -1
|
||||
bnez $s1, .LA400009C
|
||||
nop
|
||||
sw $zero, 8($t0)
|
||||
ori $t1, $zero, 20
|
||||
sw $t1, 0xc($t0)
|
||||
sw $zero, ($t0)
|
||||
sw $zero, %lo(RI_CURRENT_LOAD_REG)($t0)
|
||||
ori $t1, $zero, 0x14
|
||||
sw $t1, %lo(RI_SELECT_REG)($t0)
|
||||
sw $zero, %lo(RI_MODE_REG)($t0)
|
||||
li $s1, 4
|
||||
.LA40000C0:
|
||||
nop
|
||||
@@ -55,34 +70,34 @@ glabel ipl3_entry // 0xA4000040
|
||||
bnez $s1, .LA40000C0
|
||||
nop
|
||||
ori $t1, $zero, 14
|
||||
sw $t1, ($t0)
|
||||
sw $t1, %lo(RI_MODE_REG)($t0)
|
||||
li $s1, 32
|
||||
.LA40000DC:
|
||||
addi $s1, $s1, -1
|
||||
bnez $s1, .LA40000DC
|
||||
ori $t1, $zero, 271
|
||||
sw $t1, ($t4)
|
||||
ori $t1, $zero, (MI_SET_INIT | 0xF)
|
||||
sw $t1, %lo(MI_MODE_REG)($t4)
|
||||
lui $t1, (0x18082838 >> 16)
|
||||
ori $t1, (0x18082838 & 0xFFFF)
|
||||
sw $t1, 0x8($t2)
|
||||
sw $zero, 0x14($t2)
|
||||
sw $t1, %lo(RDRAM_DELAY_REG)($t2)
|
||||
sw $zero, %lo(RDRAM_REF_ROW_REG)($t2)
|
||||
lui $t1, 0x8000
|
||||
sw $t1, 0x4($t2)
|
||||
sw $t1, %lo(RDRAM_DEVICE_ID_REG)($t2)
|
||||
move $t5, $zero
|
||||
move $t6, $zero
|
||||
lui $t7, (0xA3F00000 >> 16)
|
||||
lui $t7, %hi(PHYS_TO_K1(RDRAM_BASE_REG))
|
||||
move $t8, $zero
|
||||
lui $t9, (0xA3F00000 >> 16)
|
||||
lui $t9, %hi(PHYS_TO_K1(RDRAM_BASE_REG))
|
||||
lui $s6, (0xA0000000 >> 16)
|
||||
move $s7, $zero
|
||||
lui $a2, (0xA3F00000 >> 16)
|
||||
lui $a2, %hi(PHYS_TO_K1(RDRAM_BASE_REG))
|
||||
lui $a3, (0xA0000000 >> 16)
|
||||
move $s2, $zero
|
||||
lui $s4, (0xA0000000 >> 16)
|
||||
addiu $sp, $sp, -0x48
|
||||
move $fp, $sp
|
||||
lui $s0, %hi(MI_VERSION_REG)
|
||||
lw $s0, %lo(MI_VERSION_REG)($s0)
|
||||
lui $s0, %hi(PHYS_TO_K1(MI_VERSION_REG))
|
||||
lw $s0, %lo(PHYS_TO_K1(MI_VERSION_REG))($s0)
|
||||
lui $s1, (0x01010101 >> 16)
|
||||
addiu $s1, (0x01010101 & 0xFFFF)
|
||||
bne $s0, $s1, .LA4000160
|
||||
@@ -103,14 +118,14 @@ glabel ipl3_entry // 0xA4000040
|
||||
nop
|
||||
sw $v0, ($sp)
|
||||
li $t1, 8192
|
||||
sw $t1, ($t4)
|
||||
lw $t3, ($t7)
|
||||
sw $t1, %lo(MI_MODE_REG)($t4)
|
||||
lw $t3, %lo(RDRAM_CONFIG_REG)($t7)
|
||||
lui $t0, 0xf0ff
|
||||
and $t3, $t3, $t0
|
||||
sw $t3, 4($sp)
|
||||
addi $sp, $sp, 8
|
||||
li $t1, 4096
|
||||
sw $t1, ($t4)
|
||||
sw $t1, %lo(MI_MODE_REG)($t4)
|
||||
lui $t0, 0xb019
|
||||
bne $t3, $t0, .LA40001E0
|
||||
nop
|
||||
@@ -130,11 +145,11 @@ glabel ipl3_entry // 0xA4000040
|
||||
add $s4, $s4, $t0
|
||||
.LA40001E8:
|
||||
li $t0, 8192
|
||||
sw $t0, ($t4)
|
||||
lw $t1, 0x24($t7)
|
||||
lw $k0, ($t7)
|
||||
sw $t0, %lo(MI_MODE_REG)($t4)
|
||||
lw $t1, %lo(RDRAM_DEVICE_MANUF_REG)($t7)
|
||||
lw $k0, %lo(RDRAM_CONFIG_REG)($t7)
|
||||
li $t0, 4096
|
||||
sw $t0, ($t4)
|
||||
sw $t0, %lo(MI_MODE_REG)($t4)
|
||||
andi $t1, $t1, 0xffff
|
||||
li $t0, 1280
|
||||
bne $t1, $t0, .LA4000230
|
||||
@@ -162,9 +177,9 @@ glabel ipl3_entry // 0xA4000040
|
||||
nop
|
||||
.LA400025C:
|
||||
li $t0, 0xc4000000
|
||||
sw $t0, 0xc($t2)
|
||||
sw $t0, %lo(RDRAM_MODE_REG)($t2)
|
||||
li $t0, 0x80000000
|
||||
sw $t0, 0x4($t2)
|
||||
sw $t0, %lo(RDRAM_DEVICE_ID_REG)($t2)
|
||||
move $sp, $fp
|
||||
move $v1, $zero
|
||||
.LA4000274:
|
||||
@@ -232,7 +247,7 @@ glabel ipl3_entry // 0xA4000040
|
||||
slt $t0, $v1, $t5
|
||||
bnez $t0, .LA4000274
|
||||
nop
|
||||
lui $t2, %hi(RI_REFRESH_REG)
|
||||
lui $t2, %hi(PHYS_TO_K1(RI_BASE_REG))
|
||||
sll $s2, $s2, 0x13
|
||||
lui $t1, (0x00063634 >> 16)
|
||||
ori $t1, (0x00063634 & 0xFFFF)
|
||||
@@ -253,8 +268,8 @@ glabel ipl3_entry // 0xA4000040
|
||||
lw $s6, 0xc($sp)
|
||||
lw $s7, 0x10($sp)
|
||||
addiu $sp, $sp, 0x18
|
||||
lui $t0, %hi(EXCEPTION_TLB_MISS)
|
||||
addiu $t0, $t0, %lo(EXCEPTION_TLB_MISS)
|
||||
lui $t0, %hi(UT_VEC)
|
||||
addiu $t0, $t0, %lo(UT_VEC)
|
||||
addiu $t1, $t0, 0x4000
|
||||
addiu $t1, $t1, -0x20
|
||||
mtc0 $zero, $28
|
||||
@@ -264,8 +279,8 @@ glabel ipl3_entry // 0xA4000040
|
||||
sltu $at, $t0, $t1
|
||||
bnez $at, .LA40003D8
|
||||
addiu $t0, $t0, 0x20
|
||||
lui $t0, %hi(EXCEPTION_TLB_MISS)
|
||||
addiu $t0, %lo(EXCEPTION_TLB_MISS)
|
||||
lui $t0, %hi(UT_VEC)
|
||||
addiu $t0, %lo(UT_VEC)
|
||||
addiu $t1, $t0, 0x2000
|
||||
addiu $t1, $t1, -0x10
|
||||
.LA40003F8:
|
||||
@@ -276,8 +291,8 @@ glabel ipl3_entry // 0xA4000040
|
||||
b .LA4000458
|
||||
nop
|
||||
.LA4000410:
|
||||
lui $t0, %hi(EXCEPTION_TLB_MISS)
|
||||
addiu $t0, %lo(EXCEPTION_TLB_MISS)
|
||||
lui $t0, %hi(UT_VEC)
|
||||
addiu $t0, %lo(UT_VEC)
|
||||
addiu $t1, $t0, 0x4000
|
||||
addiu $t1, $t1, -0x20
|
||||
mtc0 $zero, $28
|
||||
@@ -287,8 +302,8 @@ glabel ipl3_entry // 0xA4000040
|
||||
sltu $at, $t0, $t1
|
||||
bnez $at, .LA4000428
|
||||
addiu $t0, $t0, 0x20
|
||||
lui $t0, %hi(EXCEPTION_TLB_MISS)
|
||||
addiu $t0, %lo(EXCEPTION_TLB_MISS)
|
||||
lui $t0, %hi(UT_VEC)
|
||||
addiu $t0, %lo(UT_VEC)
|
||||
addiu $t1, $t0, 0x2000
|
||||
addiu $t1, $t1, -0x10
|
||||
.LA4000448:
|
||||
@@ -297,16 +312,16 @@ glabel ipl3_entry // 0xA4000040
|
||||
bnez $at, .LA4000448
|
||||
addiu $t0, $t0, 0x10
|
||||
.LA4000458:
|
||||
lui $t2, %hi(SP_DMEM)
|
||||
addiu $t2, $t2, %lo(SP_DMEM)
|
||||
lui $t2, %hi(PHYS_TO_K1(SP_DMEM_START))
|
||||
addiu $t2, $t2, %lo(PHYS_TO_K1(SP_DMEM_START))
|
||||
lui $t3, 0xfff0
|
||||
lui $t1, 0x0010
|
||||
and $t2, $t2, $t3
|
||||
lui $t0, %hi(SP_DMEM_UNK0)
|
||||
lui $t0, %hi(PHYS_TO_K1(SP_DMEM_UNK0))
|
||||
addiu $t1, -1
|
||||
lui $t3, %hi(SP_DMEM_UNK1)
|
||||
addiu $t0, %lo(SP_DMEM_UNK0)
|
||||
addiu $t3, %lo(SP_DMEM_UNK1)
|
||||
lui $t3, %hi(PHYS_TO_K1(SP_DMEM_UNK1))
|
||||
addiu $t0, %lo(PHYS_TO_K1(SP_DMEM_UNK0))
|
||||
addiu $t3, %lo(PHYS_TO_K1(SP_DMEM_UNK1))
|
||||
and $t0, $t0, $t1
|
||||
and $t3, $t3, $t1
|
||||
lui $t1, 0xa000
|
||||
@@ -320,32 +335,32 @@ glabel ipl3_entry // 0xA4000040
|
||||
addiu $t1, $t1, 4
|
||||
bnez $at, .LA4000498
|
||||
sw $t5, -4($t1)
|
||||
lui $t4, %hi(EXCEPTION_TLB_MISS)
|
||||
addiu $t4, %lo(EXCEPTION_TLB_MISS)
|
||||
lui $t4, %hi(UT_VEC)
|
||||
addiu $t4, %lo(UT_VEC)
|
||||
jr $t4
|
||||
nop
|
||||
lui $t3, %hi(D_B0000008)
|
||||
lw $t1, %lo(D_B0000008)($t3)
|
||||
lui $t3, %hi(PHYS_TO_CART(CART_ENTRYPOINT))
|
||||
lw $t1, %lo(PHYS_TO_CART(CART_ENTRYPOINT))($t3)
|
||||
lui $t2, (0x1FFFFFFF >> 16)
|
||||
ori $t2, (0x1FFFFFFF & 0xFFFF)
|
||||
lui $at, %hi(PI_DRAM_ADDR_REG)
|
||||
lui $at, %hi(PHYS_TO_K1(PI_DRAM_ADDR_REG))
|
||||
and $t1, $t1, $t2
|
||||
sw $t1, %lo(PI_DRAM_ADDR_REG)($at)
|
||||
lui $t0, %hi(PI_STATUS_REG)
|
||||
sw $t1, %lo(PHYS_TO_K1(PI_DRAM_ADDR_REG))($at)
|
||||
lui $t0, %hi(PHYS_TO_K1(PI_STATUS_REG))
|
||||
.LA40004D0:
|
||||
lw $t0, %lo(PI_STATUS_REG)($t0)
|
||||
andi $t0, $t0, 2
|
||||
lw $t0, %lo(PHYS_TO_K1(PI_STATUS_REG))($t0)
|
||||
andi $t0, $t0, PI_STATUS_IO_BUSY
|
||||
bnezl $t0, .LA40004D0
|
||||
lui $t0, %hi(PI_STATUS_REG)
|
||||
li $t0, 0x1000
|
||||
lui $t0, %hi(PHYS_TO_K1(PI_STATUS_REG))
|
||||
li $t0, INITIAL_DMA_ROMPOS
|
||||
add $t0, $t0, $t3
|
||||
and $t0, $t0, $t2
|
||||
lui $at, %hi(PI_CART_ADDR_REG)
|
||||
sw $t0, %lo(PI_CART_ADDR_REG)($at)
|
||||
lui $t2, 0x0010
|
||||
addiu $t2, 0xFFFF
|
||||
lui $at, %hi(PI_WR_LEN_REG)
|
||||
sw $t2, %lo(PI_WR_LEN_REG)($at)
|
||||
lui $at, %hi(PHYS_TO_K1(PI_CART_ADDR_REG))
|
||||
sw $t0, %lo(PHYS_TO_K1(PI_CART_ADDR_REG))($at)
|
||||
li $t2, INITIAL_DMA_LEN
|
||||
addiu $t2, -1
|
||||
lui $at, %hi(PHYS_TO_K1(PI_WR_LEN_REG))
|
||||
sw $t2, %lo(PHYS_TO_K1(PI_WR_LEN_REG))($at)
|
||||
|
||||
.LA4000514:
|
||||
nop
|
||||
@@ -376,13 +391,13 @@ glabel ipl3_entry // 0xA4000040
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
lui $t3, %hi(PI_STATUS_REG)
|
||||
lw $t3, %lo(PI_STATUS_REG)($t3)
|
||||
lui $t3, %hi(PHYS_TO_K1(PI_STATUS_REG))
|
||||
lw $t3, %lo(PHYS_TO_K1(PI_STATUS_REG))($t3)
|
||||
andi $t3, $t3, 0x1
|
||||
bnez $t3, .LA4000514
|
||||
nop
|
||||
lui $t3, %hi(D_B0000008)
|
||||
lw $a0, %lo(D_B0000008)($t3)
|
||||
lui $t3, %hi(PHYS_TO_CART(CART_ENTRYPOINT))
|
||||
lw $a0, %lo(PHYS_TO_CART(CART_ENTRYPOINT))($t3)
|
||||
move $a1, $s6
|
||||
lui $at, (0x5D588B65 >> 16)
|
||||
ori $at, (0x5D588B65 & 0xFFFF)
|
||||
@@ -436,52 +451,54 @@ glabel ipl3_entry // 0xA4000040
|
||||
xor $a3, $t6, $t3
|
||||
xor $t8, $s0, $a2
|
||||
xor $s0, $t8, $t4
|
||||
lui $t3, %hi(D_B0000010)
|
||||
lw $t0, %lo(D_B0000010)($t3)
|
||||
// verifies checksum
|
||||
lui $t3, %hi(PHYS_TO_CART(CART_CHECKSUM0))
|
||||
lw $t0, %lo(PHYS_TO_CART(CART_CHECKSUM0))($t3)
|
||||
bne $a3, $t0, halt
|
||||
nop
|
||||
lw $t0, %lo(D_B0000014)($t3)
|
||||
lw $t0, %lo(PHYS_TO_CART(CART_CHECKSUM1))($t3)
|
||||
bne $s0, $t0, halt
|
||||
nop
|
||||
bal func_A4000690
|
||||
nop
|
||||
|
||||
// In a permanent loop that cannot be exited.
|
||||
halt:
|
||||
bal halt
|
||||
nop
|
||||
|
||||
func_A4000690:
|
||||
lui $t1, %hi(SP_PC)
|
||||
lw $t1, %lo(SP_PC)($t1)
|
||||
lui $t1, %hi(PHYS_TO_K1(SP_PC_REG))
|
||||
lw $t1, %lo(PHYS_TO_K1(SP_PC_REG))($t1)
|
||||
lw $s0, 0x14($sp)
|
||||
lw $ra, 0x1c($sp)
|
||||
beqz $t1, .LA40006BC
|
||||
addiu $sp, $sp, 0x20
|
||||
li $t2, 65
|
||||
lui $at, %hi(SP_STATUS_REG)
|
||||
sw $t2, %lo(SP_STATUS_REG)($at)
|
||||
lui $at, %hi(SP_PC)
|
||||
sw $zero, %lo(SP_PC)($at)
|
||||
lui $at, %hi(PHYS_TO_K1(SP_STATUS_REG))
|
||||
sw $t2, %lo(PHYS_TO_K1(SP_STATUS_REG))($at)
|
||||
lui $at, %hi(PHYS_TO_K1(SP_PC_REG))
|
||||
sw $zero, %lo(PHYS_TO_K1(SP_PC_REG))($at)
|
||||
.LA40006BC:
|
||||
lui $t3, (0x00AAAAAE >> 16)
|
||||
ori $t3, (0x00AAAAAE & 0xFFFF)
|
||||
lui $at, %hi(SP_STATUS_REG)
|
||||
sw $t3, %lo(SP_STATUS_REG)($at)
|
||||
lui $at, %hi(MI_INTR_MASK_REG)
|
||||
lui $at, %hi(PHYS_TO_K1(SP_STATUS_REG))
|
||||
sw $t3, %lo(PHYS_TO_K1(SP_STATUS_REG))($at)
|
||||
lui $at, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
|
||||
li $t0, 1365
|
||||
sw $t0, %lo(MI_INTR_MASK_REG)($at)
|
||||
lui $at, %hi(SI_STATUS_REG)
|
||||
sw $zero, %lo(SI_STATUS_REG)($at)
|
||||
lui $at, %hi(AI_STATUS_REG)
|
||||
sw $zero, %lo(AI_STATUS_REG)($at)
|
||||
lui $at, %hi(MI_MODE_REG)
|
||||
sw $t0, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($at)
|
||||
lui $at, %hi(PHYS_TO_K1(SI_STATUS_REG))
|
||||
sw $zero, %lo(PHYS_TO_K1(SI_STATUS_REG))($at)
|
||||
lui $at, %hi(PHYS_TO_K1(AI_STATUS_REG))
|
||||
sw $zero, %lo(PHYS_TO_K1(AI_STATUS_REG))($at)
|
||||
lui $at, %hi(PHYS_TO_K1(MI_BASE_REG))
|
||||
li $t1, 2048
|
||||
sw $t1, %lo(MI_MODE_REG)($at)
|
||||
sw $t1, %lo(PHYS_TO_K1(MI_BASE_REG))($at)
|
||||
li $t1, 2
|
||||
lui $at, %hi(PI_STATUS_REG)
|
||||
lui $at, %hi(PHYS_TO_K1(PI_STATUS_REG))
|
||||
lui $t0, (0xA0000300 >> 16)
|
||||
ori $t0, (0xA0000300 & 0xFFFF)
|
||||
sw $t1, %lo(PI_STATUS_REG)($at)
|
||||
sw $t1, %lo(PHYS_TO_K1(PI_STATUS_REG))($at)
|
||||
sw $s7, 0x14($t0)
|
||||
sw $s5, 0xc($t0)
|
||||
sw $s3, 0x4($t0)
|
||||
@@ -495,22 +512,22 @@ func_A4000690:
|
||||
addiu $t1, $t1, 0
|
||||
.LA4000730:
|
||||
sw $t1, 0x8($t0)
|
||||
lui $t0, %hi(SP_DMEM)
|
||||
addiu $t0, %lo(SP_DMEM)
|
||||
lui $t0, %hi(PHYS_TO_K1(SP_DMEM_START))
|
||||
addiu $t0, %lo(PHYS_TO_K1(SP_DMEM_START))
|
||||
addi $t1, $t0, 0x1000
|
||||
.LA4000740:
|
||||
addiu $t0, $t0, 4
|
||||
bne $t0, $t1, .LA4000740
|
||||
sw $zero, -4($t0)
|
||||
lui $t0, %hi(SP_IMEM)
|
||||
addiu $t0, %lo(SP_IMEM)
|
||||
lui $t0, %hi(PHYS_TO_K1(SP_IMEM_START))
|
||||
addiu $t0, %lo(PHYS_TO_K1(SP_IMEM_START))
|
||||
addi $t1, $t0, 0x1000
|
||||
.LA4000758:
|
||||
addiu $t0, $t0, 4
|
||||
bne $t0, $t1, .LA4000758
|
||||
sw $zero, -4($t0)
|
||||
lui $t3, %hi(D_B0000008)
|
||||
lw $t1, %lo(D_B0000008)($t3)
|
||||
lui $t3, %hi(PHYS_TO_CART(CART_ENTRYPOINT))
|
||||
lw $t1, %lo(PHYS_TO_CART(CART_ENTRYPOINT))($t3)
|
||||
jr $t1
|
||||
nop
|
||||
nop
|
||||
@@ -747,8 +764,8 @@ func_A4000A40:
|
||||
li $k1, 1
|
||||
bne $a1, $k1, .LA4000AC0
|
||||
sw $t7, ($s5)
|
||||
lui $k0, %hi(MI_MODE_REG)
|
||||
sw $zero, %lo(MI_MODE_REG)($k0)
|
||||
lui $k0, %hi(PHYS_TO_K1(MI_BASE_REG))
|
||||
sw $zero, %lo(PHYS_TO_K1(MI_BASE_REG))($k0)
|
||||
.LA4000AC0:
|
||||
lw $ra, 0x1c($sp)
|
||||
addiu $sp, $sp, 0x28
|
||||
@@ -759,12 +776,12 @@ func_A4000AD0:
|
||||
addiu $sp, $sp, -0x28
|
||||
sw $ra, 0x1c($sp)
|
||||
li $k0, 0x2000
|
||||
lui $k1, %hi(MI_MODE_REG)
|
||||
sw $k0, %lo(MI_MODE_REG)($k1)
|
||||
lui $k1, %hi(PHYS_TO_K1(MI_BASE_REG))
|
||||
sw $k0, %lo(PHYS_TO_K1(MI_BASE_REG))($k1)
|
||||
move $fp, $zero
|
||||
lw $fp, ($s5)
|
||||
li $k0, 0x1000
|
||||
sw $k0, %lo(MI_MODE_REG)($k1)
|
||||
sw $k0, %lo(PHYS_TO_K1(MI_BASE_REG))($k1)
|
||||
li $k1, 0x40
|
||||
and $k1, $k1, $fp
|
||||
srl $k1, $k1, 6
|
||||
@@ -797,6 +814,8 @@ func_A4000AD0:
|
||||
nop
|
||||
nop
|
||||
|
||||
.end ipl3_entry
|
||||
|
||||
// 0xA4000B70-0xA4000FFF: IPL3 Font
|
||||
glabel ipl3_font
|
||||
.incbin "textures/ipl3_raw/ipl3_font_00.ia1"
|
||||
@@ -0,0 +1,14 @@
|
||||
// Used as part of emulator detection. The dynarec core of PJ64 4.0 only updates
|
||||
// the COUNT register in between recompiled functions, so this will return 0 on
|
||||
// PJ64 4.0 dynarec, but will instead return the count factor on other versions.
|
||||
|
||||
.include "macros.inc"
|
||||
.section .text, "ax"
|
||||
.set noreorder
|
||||
|
||||
.balign 32
|
||||
glabel pj64_get_count_factor_asm
|
||||
mfc0 $t0, $9 // $9 is the COUNT register
|
||||
mfc0 $t1, $9
|
||||
jr $ra
|
||||
subu $v0, $t1, $t0
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
.include "macros.inc"
|
||||
.section .text
|
||||
.set noreorder
|
||||
|
||||
.set abi_arg0, $f12
|
||||
|
||||
glabel roundf
|
||||
round.w.s $f0, abi_arg0
|
||||
jr $ra
|
||||
mfc1 $v0, $f0
|
||||
+41
-4
@@ -36,7 +36,7 @@ const u8 small_font_kerning_default[] = {
|
||||
const u16 small_font_offsets_default[] = {
|
||||
/*!*/ 0, /*"*/ 8, /*#*/ 16, /*$*/ 24, /*%*/ 32, /*&*/ 40, /*'*/ 48, /*(*/ 56, /*)*/ 64, /***/ 72, /*+*/ 80, /*,*/ 88, /*-*/ 96, /*.*/ 104, /*/*/ 112,
|
||||
/*0*/ 120, /*1*/ 128, /*2*/ 136, /*3*/ 144, /*4*/ 152, /*5*/ 160, /*6*/ 168, /*7*/ 176, /*8*/ 184, /*9*/ 192, /*:*/ 200, /*;*/ 208, /*<*/ 216, /*=*/ 216,
|
||||
/*>*/ 0, /*?*/ 216, /*@*/ 0, /*A*/ 224, /*B*/ 232, /*C*/ 240, /*D*/ 248, /*E*/ 256, /*F*/ 264, /*G*/ 272, /*H*/ 280, /*I*/ 288, /*J*/ 296, /*K*/ 304,
|
||||
/*>*/ 216, /*?*/ 216, /*@*/ 224, /*A*/ 224, /*B*/ 232, /*C*/ 240, /*D*/ 248, /*E*/ 256, /*F*/ 264, /*G*/ 272, /*H*/ 280, /*I*/ 288, /*J*/ 296, /*K*/ 304,
|
||||
/*L*/ 312, /*M*/ 320, /*N*/ 328, /*O*/ 336, /*P*/ 344, /*Q*/ 352, /*R*/ 360, /*S*/ 368, /*T*/ 376, /*U*/ 384, /*V*/ 392, /*W*/ 400, /*X*/ 408, /*Y*/ 416,
|
||||
/*Z*/ 424, /*[*/ 432, /*\*/ 432, /*]*/ 432, /*^*/ 432, /*_*/ 440, /*`*/ 440, /*a*/ 440, /*b*/ 448, /*c*/ 456, /*d*/ 464, /*e*/ 472, /*f*/ 480, /*g*/ 488,
|
||||
/*h*/ 496, /*i*/ 504, /*j*/ 512, /*k*/ 520, /*l*/ 528, /*m*/ 536, /*n*/ 544, /*o*/ 552, /*p*/ 560, /*q*/ 568, /*r*/ 576, /*s*/ 584, /*t*/ 592, /*u*/ 600,
|
||||
@@ -55,7 +55,7 @@ static const u8 small_font_kerning_outline[] = {
|
||||
const u16 small_font_offsets_outline[] = {
|
||||
/*!*/ 0, /*"*/ 8, /*#*/ 16, /*$*/ 24, /*%*/ 32, /*&*/ 40, /*'*/ 48, /*(*/ 56, /*)*/ 64, /***/ 72, /*+*/ 80, /*,*/ 88, /*-*/ 96, /*.*/ 104, /*/*/ 112,
|
||||
/*0*/ 120, /*1*/ 128, /*2*/ 136, /*3*/ 144, /*4*/ 152, /*5*/ 160, /*6*/ 168, /*7*/ 176, /*8*/ 184, /*9*/ 192, /*:*/ 200, /*;*/ 208, /*<*/ 216, /*=*/ 216,
|
||||
/*>*/ 0, /*?*/ 216, /*@*/ 0, /*A*/ 224, /*B*/ 232, /*C*/ 240, /*D*/ 248, /*E*/ 256, /*F*/ 264, /*G*/ 272, /*H*/ 280, /*I*/ 288, /*J*/ 296, /*K*/ 304,
|
||||
/*>*/ 216, /*?*/ 216, /*@*/ 224, /*A*/ 224, /*B*/ 232, /*C*/ 240, /*D*/ 248, /*E*/ 256, /*F*/ 264, /*G*/ 272, /*H*/ 280, /*I*/ 288, /*J*/ 296, /*K*/ 304,
|
||||
/*L*/ 312, /*M*/ 320, /*N*/ 328, /*O*/ 336, /*P*/ 344, /*Q*/ 352, /*R*/ 360, /*S*/ 368, /*T*/ 376, /*U*/ 384, /*V*/ 392, /*W*/ 400, /*X*/ 408, /*Y*/ 416,
|
||||
/*Z*/ 424, /*[*/ 432, /*\*/ 432, /*]*/ 432, /*^*/ 432, /*_*/ 440, /*`*/ 440, /*a*/ 440, /*b*/ 448, /*c*/ 456, /*d*/ 464, /*e*/ 472, /*f*/ 480, /*g*/ 488,
|
||||
/*h*/ 496, /*i*/ 504, /*j*/ 512, /*k*/ 520, /*l*/ 528, /*m*/ 536, /*n*/ 544, /*o*/ 552, /*p*/ 560, /*q*/ 568, /*r*/ 576, /*s*/ 584, /*t*/ 592, /*u*/ 600,
|
||||
@@ -74,7 +74,7 @@ static const u8 small_font_kerning_plain[] = {
|
||||
const u16 small_font_offsets_plain[] = {
|
||||
/*!*/ 0, /*"*/ 8, /*#*/ 16, /*$*/ 24, /*%*/ 32, /*&*/ 40, /*'*/ 48, /*(*/ 56, /*)*/ 64, /***/ 72, /*+*/ 80, /*,*/ 88, /*-*/ 96, /*.*/ 104, /*/*/ 112,
|
||||
/*0*/ 120, /*1*/ 128, /*2*/ 136, /*3*/ 144, /*4*/ 152, /*5*/ 160, /*6*/ 168, /*7*/ 176, /*8*/ 184, /*9*/ 192, /*:*/ 200, /*;*/ 208, /*<*/ 216, /*=*/ 216,
|
||||
/*>*/ 0, /*?*/ 216, /*@*/ 0, /*A*/ 224, /*B*/ 232, /*C*/ 240, /*D*/ 248, /*E*/ 256, /*F*/ 264, /*G*/ 272, /*H*/ 280, /*I*/ 288, /*J*/ 296, /*K*/ 304,
|
||||
/*>*/ 216, /*?*/ 216, /*@*/ 224, /*A*/ 224, /*B*/ 232, /*C*/ 240, /*D*/ 248, /*E*/ 256, /*F*/ 264, /*G*/ 272, /*H*/ 280, /*I*/ 288, /*J*/ 296, /*K*/ 304,
|
||||
/*L*/ 312, /*M*/ 320, /*N*/ 328, /*O*/ 336, /*P*/ 344, /*Q*/ 352, /*R*/ 360, /*S*/ 368, /*T*/ 376, /*U*/ 384, /*V*/ 392, /*W*/ 400, /*X*/ 408, /*Y*/ 416,
|
||||
/*Z*/ 424, /*[*/ 432, /*\*/ 432, /*]*/ 432, /*^*/ 432, /*_*/ 440, /*`*/ 440, /*a*/ 440, /*b*/ 448, /*c*/ 456, /*d*/ 464, /*e*/ 472, /*f*/ 480, /*g*/ 488,
|
||||
/*h*/ 496, /*i*/ 504, /*j*/ 512, /*k*/ 520, /*l*/ 528, /*m*/ 536, /*n*/ 544, /*o*/ 552, /*p*/ 560, /*q*/ 568, /*r*/ 576, /*s*/ 584, /*t*/ 592, /*u*/ 600,
|
||||
@@ -93,7 +93,7 @@ static const u8 small_font_kerning_vanilla[] = {
|
||||
const u16 small_font_offsets_vanilla[] = {
|
||||
/*!*/ 0, /*"*/ 8, /*#*/ 16, /*$*/ 24, /*%*/ 32, /*&*/ 40, /*'*/ 48, /*(*/ 56, /*)*/ 64, /***/ 72, /*+*/ 80, /*,*/ 88, /*-*/ 96, /*.*/ 104, /*/*/ 112,
|
||||
/*0*/ 120, /*1*/ 128, /*2*/ 136, /*3*/ 144, /*4*/ 152, /*5*/ 160, /*6*/ 168, /*7*/ 176, /*8*/ 184, /*9*/ 192, /*:*/ 200, /*;*/ 208, /*<*/ 216, /*=*/ 216,
|
||||
/*>*/ 0, /*?*/ 216, /*@*/ 0, /*A*/ 224, /*B*/ 232, /*C*/ 240, /*D*/ 248, /*E*/ 256, /*F*/ 264, /*G*/ 272, /*H*/ 280, /*I*/ 288, /*J*/ 296, /*K*/ 304,
|
||||
/*>*/ 216, /*?*/ 216, /*@*/ 224, /*A*/ 224, /*B*/ 232, /*C*/ 240, /*D*/ 248, /*E*/ 256, /*F*/ 264, /*G*/ 272, /*H*/ 280, /*I*/ 288, /*J*/ 296, /*K*/ 304,
|
||||
/*L*/ 312, /*M*/ 320, /*N*/ 328, /*O*/ 336, /*P*/ 344, /*Q*/ 352, /*R*/ 360, /*S*/ 368, /*T*/ 376, /*U*/ 384, /*V*/ 392, /*W*/ 400, /*X*/ 408, /*Y*/ 416,
|
||||
/*Z*/ 424, /*[*/ 432, /*\*/ 432, /*]*/ 432, /*^*/ 432, /*_*/ 440, /*`*/ 440, /*a*/ 440, /*b*/ 448, /*c*/ 456, /*d*/ 464, /*e*/ 472, /*f*/ 480, /*g*/ 488,
|
||||
/*h*/ 496, /*i*/ 504, /*j*/ 512, /*k*/ 520, /*l*/ 528, /*m*/ 536, /*n*/ 544, /*o*/ 552, /*p*/ 560, /*q*/ 568, /*r*/ 576, /*s*/ 584, /*t*/ 592, /*u*/ 600,
|
||||
@@ -2328,6 +2328,23 @@ const Gfx dl_rgba16_text_end[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
const Gfx dl_shade_screen_begin[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetRenderMode(G_RM_CLD_SURF, G_RM_CLD_SURF2),
|
||||
gsDPSetCycleType(G_CYC_1CYCLE),
|
||||
gsDPSetPrimColor(0, 0, 0, 0, 0, 127),
|
||||
gsDPSetCombineMode(G_CC_PRIMITIVE, G_CC_PRIMITIVE),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
const Gfx dl_shade_screen_end[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
|
||||
gsDPSetPrimColor(0, 0, 255, 255, 255, 255),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
// 0x0200EDA8 - 0x0200EDE8
|
||||
static const Vtx vertex_text_bg_box[] = {
|
||||
{{{ 0, -80, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
@@ -2656,6 +2673,25 @@ UNUSED ALIGNED8 static const Texture texture_radial_light[] = {
|
||||
#include "textures/segment2/light_quarter_circle.ia16.inc.c"
|
||||
};
|
||||
|
||||
#ifdef SHARP_TRANSITION_TEXTURES
|
||||
const Texture texture_transition_star_half[] = {
|
||||
#include "textures/segment2/transition_star_half.i8.inc.c"
|
||||
};
|
||||
|
||||
const Texture texture_transition_circle_half[] = {
|
||||
#include "textures/segment2/transition_circle_half.i8.inc.c"
|
||||
};
|
||||
|
||||
const Texture texture_transition_mario[] = {
|
||||
#include "textures/segment2/transition_mario.i8.inc.c"
|
||||
};
|
||||
|
||||
const Texture texture_transition_bowser_half[] = {
|
||||
#include "textures/segment2/transition_bowser_half.i8.inc.c"
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
const Texture texture_transition_star_half[] = {
|
||||
#include "textures/segment2/segment2.0F458.ia8.inc.c"
|
||||
};
|
||||
@@ -2671,6 +2707,7 @@ const Texture texture_transition_mario[] = {
|
||||
const Texture texture_transition_bowser_half[] = {
|
||||
#include "textures/segment2/segment2.11458.ia8.inc.c"
|
||||
};
|
||||
#endif
|
||||
|
||||
const Texture texture_waterbox_water[] = {
|
||||
#include "textures/segment2/segment2.11C58.rgba16.inc.c"
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
-Iinclude/n64
|
||||
-Iinclude
|
||||
-Itextures
|
||||
-Ibuild/us_n64
|
||||
-Isrc
|
||||
|
||||
|
||||
-include include/types.h
|
||||
-include include/n64/ultra64.h
|
||||
-include include/sm64.h
|
||||
-include include/config.h
|
||||
-include include/make_const_nonconst.h
|
||||
-include include/geo_commands.h
|
||||
-include include/level_commands.h
|
||||
-include include/segment_symbols.h
|
||||
-include include/command_macros_base.h
|
||||
-include include/object_constants.h
|
||||
|
||||
|
||||
-DTARGET_N64=1
|
||||
-DVERSION_US=1
|
||||
-DF3DEX_GBI_2=1
|
||||
-DF3DZEX_NON_GBI_2=1
|
||||
-DF3DEX_GBI_SHARED=1
|
||||
-D_LANGUAGE_C=1
|
||||
+16
-16
@@ -86,15 +86,15 @@ enum BehaviorCommands {
|
||||
/*0x0F*/ BHV_CMD_ADD_INT,
|
||||
/*0x10*/ BHV_CMD_SET_INT,
|
||||
/*0x11*/ BHV_CMD_OR_INT,
|
||||
/*0x12*/ BHV_CMD_BIT_CLEAR,
|
||||
/*0x13*/ BHV_CMD_SET_INT_RAND_RSHIFT,
|
||||
/*0x14*/ BHV_CMD_SET_RANDOM_FLOAT,
|
||||
/*0x15*/ BHV_CMD_SET_RANDOM_INT,
|
||||
/*0x16*/ BHV_CMD_ADD_RANDOM_FLOAT,
|
||||
/*0x17*/ BHV_CMD_ADD_INT_RAND_RSHIFT,
|
||||
/*0x18*/ BHV_CMD_NOP_1,
|
||||
/*0x19*/ BHV_CMD_NOP_2,
|
||||
/*0x1A*/ BHV_CMD_NOP_3,
|
||||
/*0x12*/ BHV_CMD_OR_LONG,
|
||||
/*0x13*/ BHV_CMD_BIT_CLEAR,
|
||||
/*0x14*/ BHV_CMD_SET_INT_RAND_RSHIFT,
|
||||
/*0x15*/ BHV_CMD_SET_RANDOM_FLOAT,
|
||||
/*0x16*/ BHV_CMD_SET_RANDOM_INT,
|
||||
/*0x17*/ BHV_CMD_ADD_RANDOM_FLOAT,
|
||||
/*0x18*/ BHV_CMD_ADD_INT_RAND_RSHIFT,
|
||||
/*0x19*/ BHV_CMD_NOP_1,
|
||||
/*0x1A*/ BHV_CMD_NOP_2,
|
||||
/*0x1B*/ BHV_CMD_SET_MODEL,
|
||||
/*0x1C*/ BHV_CMD_SPAWN_CHILD,
|
||||
/*0x1D*/ BHV_CMD_DEACTIVATE,
|
||||
@@ -204,6 +204,12 @@ enum BehaviorCommands {
|
||||
#define OR_INT(field, value) \
|
||||
BC_BBH(BHV_CMD_OR_INT, field, value)
|
||||
|
||||
// Performs a bitwise OR with the specified field and the given (32 bit) integer.
|
||||
// Usually used to set an object's flags which use values above 16 bits.
|
||||
#define OR_LONG(field, value) \
|
||||
BC_BB(BHV_CMD_OR_LONG, field), \
|
||||
BC_W(value)
|
||||
|
||||
// Performs a bit clear with the specified short. Unused in favor of the 32-bit version.
|
||||
#define BIT_CLEAR(field, value) \
|
||||
BC_BBH(BHV_CMD_BIT_CLEAR, field, value)
|
||||
@@ -243,10 +249,6 @@ enum BehaviorCommands {
|
||||
#define CMD_NOP_2(field) \
|
||||
BC_BB(BHV_CMD_NOP_2, field)
|
||||
|
||||
// No operation. Unused.
|
||||
#define CMD_NOP_3(field) \
|
||||
BC_BB(BHV_CMD_NOP_3, field)
|
||||
|
||||
// Sets the current model ID of the object.
|
||||
#define SET_MODEL(modelID) \
|
||||
BC_B0H(BHV_CMD_SET_MODEL, modelID)
|
||||
@@ -300,8 +302,6 @@ enum BehaviorCommands {
|
||||
#define BEGIN_REPEAT_UNUSED(count) \
|
||||
BC_BB(BHV_CMD_BEGIN_REPEAT_UNUSED, count)
|
||||
|
||||
#define OR_LONG(field, value) LOAD_ANIMATIONS(field, value)
|
||||
|
||||
// Loads the animations for the object. <field> is always set to oAnimations.
|
||||
#define LOAD_ANIMATIONS(field, anims) \
|
||||
BC_BB(BHV_CMD_LOAD_ANIMATIONS, field), \
|
||||
@@ -4581,6 +4581,7 @@ const BehaviorScript bhvRedCoin[] = {
|
||||
const BehaviorScript bhvBowserCourseRedCoinStar[] = {
|
||||
BEGIN(OBJ_LIST_LEVEL),
|
||||
OR_INT(oFlags, (OBJ_FLAG_PERSISTENT_RESPAWN | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
CALL_NATIVE(bhv_bowser_course_red_coin_star_init),
|
||||
BEGIN_LOOP(),
|
||||
CALL_NATIVE(bhv_bowser_course_red_coin_star_loop),
|
||||
END_LOOP(),
|
||||
@@ -4862,7 +4863,6 @@ const BehaviorScript bhvOrangeNumber[] = {
|
||||
BEGIN(OBJ_LIST_LEVEL),
|
||||
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
|
||||
BILLBOARD(),
|
||||
SET_HOME(),
|
||||
CALL_NATIVE(bhv_orange_number_init),
|
||||
BEGIN_LOOP(),
|
||||
CALL_NATIVE(bhv_orange_number_loop),
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#include "game/puppycam2.h"
|
||||
///This is the bit that defines where the angles happen. They're basically environment boxes that dictate camera behaviour.
|
||||
///Permaswap is a boolean that simply determines wether or not when the camera changes at this point it stays changed. 0 means it resets when you leave, and 1 means it stays changed.
|
||||
///The camera position fields accept "32767" as an ignore flag.
|
||||
///The script supports anything that does not take an argument. It's reccomended to keep the scripts in puppycam_scripts.inc.c for the sake of cleanliness.
|
||||
///If you do not wish to use a script in the angle, then just leave the field as 0.
|
||||
|
||||
// #define PUPPYCAM_SAMPLES
|
||||
|
||||
struct newcam_hardpos newcam_fixedcam[] =
|
||||
{
|
||||
|
||||
#ifdef PUPPYCAM_SAMPLES
|
||||
// Example Scripts
|
||||
{/*Level ID*/ 16,/*Area ID*/ 1,/*Permaswap*/ 0,/*Mode*/ NC_MODE_FIXED_NOMOVE,/*Script*/ 0, //Standard params.
|
||||
/*X begin*/ -540,/*Y begin*/ 800,/*Z begin*/ -3500, //Where the activation box begins
|
||||
/*X end*/ 540,/*Y end*/ 2000,/*Z end*/ -1500, //Where the activation box ends.
|
||||
/*Cam X*/ 0,/*Cam Y*/ 1500,/*Cam Z*/ -1000, //The position the camera gets placed for NC_MODE_FIXED and NC_MODE_FIXED_NOMOVE
|
||||
/*Look X*/ 0,/*Look Y*/ 800,/*Look Z*/ -2500}, //The position the camera looks at for NC_MODE_FIXED_NOMOVE
|
||||
|
||||
///Another example angle. This activates a script that slowly rotates the camera around the area.
|
||||
{/*Level ID*/ 16,/*Area ID*/ 1,/*Permaswap*/ 0,/*Mode*/ NC_MODE_NOROTATE,/*Script*/ 0, //Standard params.
|
||||
/*X begin*/ 5716,/*Y begin*/ 400,/*Z begin*/ -859, //Where the activation box begins
|
||||
/*X end*/ 6908,/*Y end*/ 1000,/*Z end*/ 62, //Where the activation box ends.
|
||||
/*Cam X*/ 32767,/*Cam Y*/ 32767,/*Cam Z*/ 32767, //The position the camera gets placed for NC_MODE_FIXED and NC_MODE_FIXED_NOMOVE
|
||||
/*Look X*/ 32767,/*Look Y*/ 32767,/*Look Z*/ 32767}, //The position the camera looks at for NC_MODE_FIXED_NOMOVE
|
||||
#endif
|
||||
|
||||
};
|
||||
@@ -336,7 +336,6 @@ index ad9fdb7d..26e1f000 100644
|
||||
@@ -29,6 +29,9 @@
|
||||
#include "puppycam2.h"
|
||||
#include "debug_box.h"
|
||||
#include "vc_check.h"
|
||||
+#ifdef REONUCAM
|
||||
+#include "camera.h"
|
||||
+#endif
|
||||
|
||||
+84
-45
@@ -2,6 +2,56 @@
|
||||
import sys
|
||||
import os
|
||||
import json
|
||||
import subprocess
|
||||
|
||||
ROMS_DIR=os.path.expanduser("~/baseroms/")
|
||||
|
||||
sha1_LUT = {
|
||||
"eu": "4ac5721683d0e0b6bbb561b58a71740845dceea9",
|
||||
"jp": "8a20a5c83d6ceb0f0506cfc9fa20d8f438cafe51",
|
||||
"sh": "3f319ae697533a255a1003d09202379d78d5a2e0",
|
||||
"us": "9bef1128717f958171a4afac3ed78ee2bb4e86ce",
|
||||
}
|
||||
|
||||
sha1_swapLUT = {
|
||||
"eu": "d80ee9eeb6454d53a96ceb6ed0aca3ffde045091",
|
||||
"jp": "1d2579dd5fb1d8263a4bcc063a651a64acc88921",
|
||||
"sh": "2a2b85e94581545ca3c05b8f864b488b141a8a1f",
|
||||
"us": "1002dd7b56aa0a59a9103f1fb3d57d6b161f8da7",
|
||||
}
|
||||
|
||||
def get_rom_candidates():
|
||||
fileArray = [f for f in os.listdir(os.getcwd()) if os.path.isfile(f)]
|
||||
if os.path.exists(ROMS_DIR):
|
||||
fileArray += [os.path.join(ROMS_DIR, f) for f in os.listdir(ROMS_DIR) if os.path.isfile(os.path.join(ROMS_DIR, f))]
|
||||
|
||||
foundVersions = {}
|
||||
|
||||
for f in fileArray:
|
||||
try:
|
||||
p = subprocess.Popen(
|
||||
["sha1sum", f],
|
||||
stdout=subprocess.PIPE
|
||||
)
|
||||
sha1sum = p.communicate()[0].decode('ascii').split()[0]
|
||||
for k, v in sha1_LUT.items():
|
||||
if v == sha1sum:
|
||||
foundVersions[k] = f
|
||||
|
||||
for k, v in sha1_swapLUT.items():
|
||||
if v == sha1sum: # the ROM is swapped!
|
||||
subprocess.run(
|
||||
[
|
||||
"dd","conv=swab",
|
||||
"if=%s" % f,
|
||||
"of=/tmp/baserom.%s.swapped.z64" % k
|
||||
],
|
||||
stderr=subprocess.PIPE,
|
||||
)
|
||||
foundVersions[k] = "/tmp/baserom.%s.swapped.z64" % k
|
||||
except Exception as e:
|
||||
continue
|
||||
return foundVersions
|
||||
|
||||
|
||||
def read_asset_map():
|
||||
@@ -18,25 +68,6 @@ def read_local_asset_list(f):
|
||||
ret.append(line.strip())
|
||||
return ret
|
||||
|
||||
|
||||
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"]:
|
||||
return True
|
||||
if version <= 3 and asset == "textures/cave/hmc_textures.01800.rgba16.png":
|
||||
return True
|
||||
if version <= 2 and asset == "textures/inside/inside_castle_textures.09000.rgba16.png":
|
||||
return True
|
||||
if version <= 1 and asset.endswith(".m64"):
|
||||
return True
|
||||
if version <= 0 and asset.endswith(".aiff"):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def remove_file(fname):
|
||||
os.remove(fname)
|
||||
print("deleting", fname)
|
||||
@@ -76,13 +107,6 @@ def main():
|
||||
clean_assets(local_asset_file)
|
||||
sys.exit(0)
|
||||
|
||||
all_langs = ["jp", "us", "eu", "sh"]
|
||||
if not langs or not all(a in all_langs for a in langs):
|
||||
langs_str = " ".join("[" + lang + "]" for lang in all_langs)
|
||||
print("Usage: " + sys.argv[0] + " " + langs_str)
|
||||
print("For each version, baserom.<version>.z64 must exist")
|
||||
sys.exit(1)
|
||||
|
||||
asset_map = read_asset_map()
|
||||
all_assets = []
|
||||
any_missing_assets = False
|
||||
@@ -101,8 +125,30 @@ def main():
|
||||
# the list of old assets either.
|
||||
return
|
||||
|
||||
romLUT = get_rom_candidates()
|
||||
|
||||
|
||||
# verify the correct rom
|
||||
for lang in langs:
|
||||
if lang not in romLUT:
|
||||
print("[%s] Error: No %s ROM detected in this folder."
|
||||
% (sys.argv[0], lang.upper())
|
||||
)
|
||||
if len(romLUT.items()) > 0:
|
||||
print()
|
||||
print("Detected ROMS:")
|
||||
for k,v in romLUT.items():
|
||||
print(" %s ROM found at: %s" % (k.upper(), v))
|
||||
sys.exit(1)
|
||||
|
||||
all_langs = ["jp", "us", "eu", "sh"]
|
||||
if not langs or not all(a in all_langs for a in langs):
|
||||
langs_str = " ".join("[" + lang + "]" for lang in all_langs)
|
||||
print("Usage: " + sys.argv[0] + " " + langs_str)
|
||||
print("For each version, its ROM file must exist in this folder")
|
||||
sys.exit(1)
|
||||
|
||||
# Late imports (to optimize startup perf)
|
||||
import subprocess
|
||||
import hashlib
|
||||
import tempfile
|
||||
from collections import defaultdict
|
||||
@@ -119,7 +165,7 @@ def main():
|
||||
todo = defaultdict(lambda: [])
|
||||
for (asset, data, exists) in all_assets:
|
||||
# Leave existing assets alone if they have a compatible version.
|
||||
if exists and not asset_needs_update(asset, local_version):
|
||||
if exists:
|
||||
continue
|
||||
|
||||
meta = data[:-2]
|
||||
@@ -134,25 +180,16 @@ def main():
|
||||
# Load ROMs
|
||||
roms = {}
|
||||
for lang in langs:
|
||||
fname = "baserom." + lang + ".z64"
|
||||
romname = romLUT[lang]
|
||||
try:
|
||||
with open(fname, "rb") as f:
|
||||
with open(romname, "rb") as f:
|
||||
roms[lang] = f.read()
|
||||
except Exception as e:
|
||||
print("Failed to open " + fname + "! " + str(e))
|
||||
sys.exit(1)
|
||||
sha1 = hashlib.sha1(roms[lang]).hexdigest()
|
||||
with open("sm64." + lang + ".sha1", "r") as f:
|
||||
expected_sha1 = f.read().split()[0]
|
||||
if sha1 != expected_sha1:
|
||||
print(
|
||||
fname
|
||||
+ " has the wrong hash! Found "
|
||||
+ sha1
|
||||
+ ", expected "
|
||||
+ expected_sha1
|
||||
)
|
||||
print("Failed to open " + romname + "! " + str(e))
|
||||
sys.exit(1)
|
||||
# There used to be an SHA1 check here,
|
||||
# but it's unnecessary since we detect the
|
||||
# presence of the correct roms automatically
|
||||
|
||||
# Make sure tools exist
|
||||
subprocess.check_call(
|
||||
@@ -165,14 +202,16 @@ def main():
|
||||
|
||||
# Import new assets
|
||||
for key in keys:
|
||||
|
||||
assets = todo[key]
|
||||
lang, mio0 = key
|
||||
romname = romLUT[lang]
|
||||
if mio0 == "@sound":
|
||||
rom = roms[lang]
|
||||
args = [
|
||||
"python3",
|
||||
"tools/disassemble_sound.py",
|
||||
"baserom." + lang + ".z64",
|
||||
romname,
|
||||
]
|
||||
def append_args(key):
|
||||
size, locs = asset_map["@sound " + key + " " + lang]
|
||||
@@ -199,7 +238,7 @@ def main():
|
||||
"-d",
|
||||
"-o",
|
||||
str(mio0),
|
||||
"baserom." + lang + ".z64",
|
||||
romname,
|
||||
"-",
|
||||
],
|
||||
check=True,
|
||||
|
||||
@@ -21,6 +21,15 @@
|
||||
*/
|
||||
// #define DISABLE_MARIO_PITCH_SHIFTING
|
||||
|
||||
/**
|
||||
* Enables the additional spacial processing that takes place with sound effects in vanilla.
|
||||
* SM64's implementation of this isn't the best, which causes some sounds like the waterfall in castle grounds to sound more unpleasant than necessary.
|
||||
* This is not the same thing as enabling stereo audio, but it does represent the sole differences between the Stereo and Headset sound options.
|
||||
* Because of this, the Headset sound option will also not appear in the file select menu with this disabled.
|
||||
* Leaving this disabled may also be slightly beneficial for CPU performance.
|
||||
*/
|
||||
// #define ENABLE_STEREO_HEADSET_EFFECTS
|
||||
|
||||
/**
|
||||
* Increase audio heap size to allow for larger/more custom sequences/banks/sfx to be imported without causing issues (not supported for SH).
|
||||
* Note that this is REQUIRED in order to use the extended 0C audio bank. Do not disable this if you're planning on using it.
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
/**
|
||||
* 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.
|
||||
* Regardless of whether this setting is enabled or not, you can use gEmulator to wrap your own code in a console check.
|
||||
*/
|
||||
#define AUTO_LOD
|
||||
|
||||
@@ -133,3 +133,30 @@
|
||||
* NOTE: When this is enabled, The 49th hardcoded rectangle shadow will act as a regular circular shadow, due to Mario's shadow ID being 99 in vanilla.
|
||||
*/
|
||||
#define LEGACY_SHADOW_IDS
|
||||
|
||||
|
||||
/**
|
||||
* Limits the horizontal fov on emulator like on console. May break viewport widescreen hacks.
|
||||
*/
|
||||
// #define HORIZONTAL_CULLING_ON_EMULATOR
|
||||
|
||||
/**
|
||||
* Makes objects bellow the screen be culled.
|
||||
*/
|
||||
#define VERTICAL_CULLING
|
||||
|
||||
/**
|
||||
* If the first command of an object´s geolayout is not GEO_CULLING_RADIUS, DEFAULT_CULLING_RADIUS
|
||||
* will be used instead.
|
||||
*/
|
||||
#define DEFAULT_CULLING_RADIUS 300
|
||||
|
||||
/**
|
||||
* Eases the textured screen transitions to make them look smoother.
|
||||
*/
|
||||
#define EASE_IN_OUT_TRANSITIONS
|
||||
|
||||
/**
|
||||
* Makes use of the tex edge render mode to deliver smooth transition textures
|
||||
*/
|
||||
// #define SHARP_TRANSITION_TEXTURES
|
||||
@@ -17,7 +17,13 @@
|
||||
#define EXIT_COURSE_WHILE_MOVING
|
||||
|
||||
/**
|
||||
* Decides which level, area and warp ID the "Exit Course" option takes you to (has no effect if you disable Exit Course).
|
||||
* Decides whether to treat exiting course as if the player had died.
|
||||
* If enabled, the player will get warped to the failure warp node when selecting EXIT COURSE. (Has no effect if you disable Exit Course)
|
||||
*/
|
||||
// #define DEATH_ON_EXIT_COURSE
|
||||
|
||||
/**
|
||||
* Decides which level, area and warp ID the "Exit Course" option takes you to (has no effect if you disable Exit Course or enable DEATH_ON_EXIT_COURSE).
|
||||
* Ensure that the warp exists, or else the game will crash.
|
||||
*/
|
||||
#define EXIT_COURSE_LEVEL LEVEL_CASTLE
|
||||
|
||||
@@ -73,6 +73,7 @@ enum LevelCommands {
|
||||
/*0x3E*/ LEVEL_CMD_CHANGE_AREA_SKYBOX,
|
||||
/*0x3F*/ LEVEL_CMD_PUPPYLIGHT_ENVIRONMENT,
|
||||
/*0x40*/ LEVEL_CMD_PUPPYLIGHT_NODE,
|
||||
/*0x41*/ LEVEL_CMD_SET_ECHO,
|
||||
};
|
||||
|
||||
enum LevelActs {
|
||||
@@ -448,6 +449,9 @@ enum GoddardScene {
|
||||
#define STOP_MUSIC(fadeOutTime) \
|
||||
CMD_BBH(LEVEL_CMD_FADEOUT_MUSIC, 0x04, fadeOutTime)
|
||||
|
||||
#define SET_ECHO(console, emulator) \
|
||||
CMD_BBBB(LEVEL_CMD_SET_ECHO, 0x04, console, emulator)
|
||||
|
||||
#define MACRO_OBJECTS(objList) \
|
||||
CMD_BBH(LEVEL_CMD_SET_MACRO_OBJECTS, 0x08, 0x0000), \
|
||||
CMD_PTR(objList)
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
* General data types for R4300
|
||||
*/
|
||||
|
||||
#ifndef _LANGUAGE_ASSEMBLY
|
||||
typedef signed char s8;
|
||||
typedef unsigned char u8;
|
||||
typedef signed short int s16;
|
||||
@@ -76,7 +77,7 @@ typedef volatile s8 vs8;
|
||||
typedef volatile s16 vs16;
|
||||
typedef volatile s32 vs32;
|
||||
typedef volatile s64 vs64;
|
||||
|
||||
#endif // _LANGUAGE_ASSEMBLY
|
||||
|
||||
/*************************************************************************
|
||||
* Common definitions
|
||||
|
||||
@@ -797,6 +797,9 @@
|
||||
#define /*0x0F8*/ oRespawnerMinSpawnDist OBJECT_FIELD_F32(0x1C)
|
||||
#define /*0x0FC*/ oRespawnerBehaviorToRespawn OBJECT_FIELD_CVPTR(0x1D)
|
||||
|
||||
/* Orange Number */
|
||||
#define /*0x110*/ oOrangeNumberOffset OBJECT_FIELD_S32(0x22)
|
||||
|
||||
/* Openable Grill */
|
||||
#define /*0x088*/ oOpenableGrillIsOpen OBJECT_FIELD_S32(0x00)
|
||||
#define /*0x0F4*/ oOpenableGrillFloorSwitchObj OBJECT_FIELD_OBJ(0x1B)
|
||||
@@ -998,6 +1001,7 @@
|
||||
/* Hidden Star */
|
||||
// Secrets/Red Coins
|
||||
#define /*0x0F4*/ oHiddenStarTriggerCounter OBJECT_FIELD_S32(0x1B)
|
||||
#define /*0x0F8*/ oHiddenStarTriggerTotal OBJECT_FIELD_S32(0x1C)
|
||||
|
||||
/* Sealed Door Star */
|
||||
#define /*0x108*/ oUnlockDoorStarState OBJECT_FIELD_U32(0x20)
|
||||
|
||||
@@ -282,8 +282,12 @@
|
||||
.endm
|
||||
|
||||
.macro chan_stereoheadseteffects a
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
.byte 0xd0
|
||||
.byte \a
|
||||
#else
|
||||
// Feel free to hijack this command for something else if it's not being used!
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro chan_setnoteallocationpolicy a
|
||||
@@ -684,7 +688,7 @@
|
||||
// envelope commands
|
||||
|
||||
.macro envelope_disable a
|
||||
.byte 0x0, 0x0
|
||||
.byte 0xff, 0xfc
|
||||
.byte \a >> 8, \a & 0xff
|
||||
.endm
|
||||
|
||||
|
||||
+446
-452
@@ -9,9 +9,9 @@
|
||||
// Fourth Byte (Upper Nibble): More bitflags
|
||||
// Fourth Byte (Lower Nibble): Sound Status (this is set to SOUND_STATUS_PLAYING when passed to the audio driver.)
|
||||
#define SOUND_ARG_LOAD(bank, soundID, priority, flags) (\
|
||||
((u32) (bank) << 28) | \
|
||||
((u32) (soundID) << 16) | \
|
||||
((u32) (priority) << 8) | \
|
||||
((u32) (bank) << SOUNDARGS_SHIFT_BANK) | \
|
||||
((u32) (soundID) << SOUNDARGS_SHIFT_SOUNDID) | \
|
||||
((u32) (priority) << SOUNDARGS_SHIFT_PRIORITY) | \
|
||||
(flags) | \
|
||||
SOUND_STATUS_WAITING)
|
||||
|
||||
@@ -95,7 +95,7 @@ enum SoundBank {
|
||||
#define SOUND_TERRAIN_SAND 7
|
||||
|
||||
// silence
|
||||
#define NO_SOUND 0
|
||||
#define NO_SOUND 0x00000000
|
||||
|
||||
/**
|
||||
* The table below defines all sounds that exist in the game, and which flags
|
||||
@@ -107,492 +107,486 @@ enum SoundBank {
|
||||
/* Terrain sounds */
|
||||
// Terrain-dependent moving sounds; a value 0-7 is added to the sound ID before
|
||||
// playing. See higher up for the different terrain types.
|
||||
#define SOUND_ACTION_TERRAIN_JUMP /* 0x04008080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x00, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TERRAIN_LANDING /* 0x04088080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x08, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TERRAIN_STEP /* 0x06108080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x10, 0x80, SOUND_VIBRATO | SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TERRAIN_BODY_HIT_GROUND /* 0x04188080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x18, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TERRAIN_STEP_TIPTOE /* 0x06208080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x20, 0x80, SOUND_VIBRATO | SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TERRAIN_STUCK_IN_GROUND /* 0x04488080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x48, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TERRAIN_HEAVY_LANDING /* 0x04608080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x60, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TERRAIN_JUMP /* 0x04008081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x00, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TERRAIN_LANDING /* 0x04088081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x08, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TERRAIN_STEP /* 0x06108081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x10, 0x80, SOUND_VIBRATO | SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TERRAIN_BODY_HIT_GROUND /* 0x04188081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x18, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TERRAIN_STEP_TIPTOE /* 0x06208081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x20, 0x80, SOUND_VIBRATO | SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TERRAIN_STUCK_IN_GROUND /* 0x04488081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x48, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TERRAIN_HEAVY_LANDING /* 0x04608081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x60, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
|
||||
#define SOUND_ACTION_METAL_JUMP /* 0x04289080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x28, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_LANDING /* 0x04299080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x29, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_STEP /* 0x042A9080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2A, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_HEAVY_LANDING /* 0x042B9080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2B, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_CLAP_HANDS_COLD /* 0x062C0080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2C, 0x00, SOUND_VIBRATO | SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_HANGING_STEP /* 0x042DA080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2D, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_QUICKSAND_STEP /* 0x042E0080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2E, 0x00, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_STEP_TIPTOE /* 0x042F9080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2F, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_WATER_PLUNGE /* 0x0430C080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x30, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_SWIM_SURFACE /* 0x04316080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x31, 0x60, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_WATER_JUMP /* 0x04328080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x32, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_SWIM /* 0x04338080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x33, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_FLUTTER_KICK /* 0x04348080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x34, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_THROW /* 0x04358080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x35, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_KEY_SWISH /* 0x04368080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x36, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_SPIN /* 0x04378080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x37, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TWIRL /* 0x04388080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x38, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // same sound as spin
|
||||
#define SOUND_ACTION_CLIMB_UP_TREE /* 0x043A8080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3A, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_CLIMB_DOWN_TREE /* 0x003B0000 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3B, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ACTION_UNK3C /* 0x003C0000 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3C, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ACTION_TAKE_OFF_CAP /* 0x043D8080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3D, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_PUT_ON_CAP /* 0x043E8080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_PAT_BACK /* 0x043F8080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_BRUSH_HAIR /* 0x04408080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x40, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_CLIMB_UP_POLE /* 0x04418080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x41, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_METAL_BONK /* 0x04428080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x42, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_UNSTUCK_FROM_GROUND /* 0x04438080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x43, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_HIT /* 0x0444C080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x44, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_HIT_2 /* 0x0444B080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x44, 0xB0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_HIT_3 /* 0x0444A080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x44, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_BONK /* 0x0445A080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x45, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_SHRINK_INTO_BBH /* 0x0446A080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x46, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_SWIM_FAST /* 0x0447A080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x47, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_JUMP_WATER /* 0x04509080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x50, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_LAND_WATER /* 0x04519080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x51, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_STEP_WATER /* 0x04529080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x52, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_UNK53 /* 0x00530000 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x53, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ACTION_UNK54 /* 0x00540000 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x54, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ACTION_UNK55 /* 0x00550000 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x55, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ACTION_FLYING_FAST /* 0x04568080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x56, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // "swoop"?, unverified
|
||||
#define SOUND_ACTION_TELEPORT /* 0x0457C080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x57, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_SNUFFIT_BULLET_HIT_METAL /* 0x0458A080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x58, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_BOUNCE_OFF_OBJECT /* 0x0459B080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x59, 0xB0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_SIDE_FLIP_UNK /* 0x045A8080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5A, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_READ_SIGN /* 0x045BFF80 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5B, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_KEY_UNKNOWN45C /* 0x045C8080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5C, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_UNK5D /* 0x005D0000 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5D, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ACTION_INTRO_UNK45E /* 0x045E8080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_INTRO_UNK45F /* 0x045F8080 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_METAL_JUMP /* 0x04289081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x28, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_LANDING /* 0x04299081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x29, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_STEP /* 0x042A9081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2A, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_HEAVY_LANDING /* 0x042B9081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2B, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_CLAP_HANDS_COLD /* 0x062C0081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2C, 0x00, SOUND_VIBRATO | SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_HANGING_STEP /* 0x042DA081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2D, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_QUICKSAND_STEP /* 0x042E0081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2E, 0x00, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_STEP_TIPTOE /* 0x042F9081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2F, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_WATER_PLUNGE /* 0x0430C081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x30, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_SWIM_SURFACE /* 0x04316081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x31, 0x60, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_WATER_JUMP /* 0x04328081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x32, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_SWIM /* 0x04338081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x33, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_FLUTTER_KICK /* 0x04348081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x34, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_THROW /* 0x04358081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x35, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_KEY_SWISH /* 0x04368081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x36, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_SPIN /* 0x04378081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x37, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_TWIRL /* 0x04388081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x38, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // same sound as spin
|
||||
#define SOUND_ACTION_CLIMB_UP_TREE /* 0x043A8081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3A, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_CLIMB_DOWN_TREE /* 0x003B0001 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3B, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ACTION_UNK3C /* 0x003C0001 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3C, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ACTION_TAKE_OFF_CAP /* 0x043D8081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3D, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_PUT_ON_CAP /* 0x043E8081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_PAT_BACK /* 0x043F8081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_BRUSH_HAIR /* 0x04408081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x40, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_CLIMB_UP_POLE /* 0x04418081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x41, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_METAL_BONK /* 0x04428081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x42, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_UNSTUCK_FROM_GROUND /* 0x04438081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x43, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_HIT /* 0x0444C081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x44, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_HIT_2 /* 0x0444B081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x44, 0xB0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_HIT_3 /* 0x0444A081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x44, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_BONK /* 0x0445A081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x45, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_SHRINK_INTO_BBH /* 0x0446A081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x46, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_SWIM_FAST /* 0x0447A081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x47, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_JUMP_WATER /* 0x04509081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x50, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_LAND_WATER /* 0x04519081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x51, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_METAL_STEP_WATER /* 0x04529081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x52, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_UNK53 /* 0x00530001 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x53, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ACTION_UNK54 /* 0x00540001 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x54, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ACTION_UNK55 /* 0x00550001 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x55, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ACTION_FLYING_FAST /* 0x04568081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x56, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // "swoop"?, unverified
|
||||
#define SOUND_ACTION_TELEPORT /* 0x0457C081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x57, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_SNUFFIT_BULLET_HIT_METAL /* 0x0458A081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x58, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_BOUNCE_OFF_OBJECT /* 0x0459B081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x59, 0xB0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_SIDE_FLIP_UNK /* 0x045A8081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5A, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_READ_SIGN /* 0x045BFF81 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5B, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_ACTION_KEY_UNKNOWN45C /* 0x045C8081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5C, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_UNK5D /* 0x005D0001 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5D, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ACTION_INTRO_UNK45E /* 0x045E8081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_ACTION_INTRO_UNK45F /* 0x045F8081 */ SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
|
||||
/* Moving Sound Effects */
|
||||
|
||||
// Terrain-dependent moving sounds; a value 0-7 is added to the sound ID before
|
||||
// playing. See higher up for the different terrain types.
|
||||
#define SOUND_MOVING_TERRAIN_SLIDE /* 0x14000000 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x00, 0x00, SOUND_NO_PRIORITY_LOSS)
|
||||
#define SOUND_MOVING_TERRAIN_RIDING_SHELL /* 0x14200000 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x20, 0x00, SOUND_NO_PRIORITY_LOSS)
|
||||
#define SOUND_MOVING_TERRAIN_SLIDE /* 0x14000001 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x00, 0x00, SOUND_NO_PRIORITY_LOSS)
|
||||
#define SOUND_MOVING_TERRAIN_RIDING_SHELL /* 0x14200001 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x20, 0x00, SOUND_NO_PRIORITY_LOSS)
|
||||
|
||||
#define SOUND_MOVING_LAVA_BURN /* 0x14100000 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x10, 0x00, SOUND_NO_PRIORITY_LOSS) // ?
|
||||
#define SOUND_MOVING_SLIDE_DOWN_POLE /* 0x14110000 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x11, 0x00, SOUND_NO_PRIORITY_LOSS) // ?
|
||||
#define SOUND_MOVING_SLIDE_DOWN_TREE /* 0x14128000 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x12, 0x80, SOUND_NO_PRIORITY_LOSS)
|
||||
#define SOUND_MOVING_QUICKSAND_DEATH /* 0x14140000 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x14, 0x00, SOUND_NO_PRIORITY_LOSS)
|
||||
#define SOUND_MOVING_SHOCKED /* 0x14160000 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x16, 0x00, SOUND_NO_PRIORITY_LOSS)
|
||||
#define SOUND_MOVING_FLYING /* 0x14170000 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x17, 0x00, SOUND_NO_PRIORITY_LOSS)
|
||||
#define SOUND_MOVING_ALMOST_DROWNING /* 0x1C180000 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x18, 0x00, SOUND_NO_PRIORITY_LOSS | SOUND_CONSTANT_FREQUENCY)
|
||||
#define SOUND_MOVING_AIM_CANNON /* 0x1D192000 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x19, 0x20, SOUND_NO_VOLUME_LOSS | SOUND_NO_PRIORITY_LOSS | SOUND_CONSTANT_FREQUENCY)
|
||||
#define SOUND_MOVING_UNK1A /* 0x101A0000 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x1A, 0x00, 0) // ?, unused
|
||||
#define SOUND_MOVING_RIDING_SHELL_LAVA /* 0x14280000 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x28, 0x00, SOUND_NO_PRIORITY_LOSS)
|
||||
#define SOUND_MOVING_LAVA_BURN /* 0x14100001 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x10, 0x00, SOUND_NO_PRIORITY_LOSS) // ?
|
||||
#define SOUND_MOVING_SLIDE_DOWN_POLE /* 0x14110001 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x11, 0x00, SOUND_NO_PRIORITY_LOSS) // ?
|
||||
#define SOUND_MOVING_SLIDE_DOWN_TREE /* 0x14128001 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x12, 0x80, SOUND_NO_PRIORITY_LOSS)
|
||||
#define SOUND_MOVING_QUICKSAND_DEATH /* 0x14140001 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x14, 0x00, SOUND_NO_PRIORITY_LOSS)
|
||||
#define SOUND_MOVING_SHOCKED /* 0x14160001 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x16, 0x00, SOUND_NO_PRIORITY_LOSS)
|
||||
#define SOUND_MOVING_FLYING /* 0x14170001 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x17, 0x00, SOUND_NO_PRIORITY_LOSS)
|
||||
#define SOUND_MOVING_ALMOST_DROWNING /* 0x1C180001 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x18, 0x00, SOUND_NO_PRIORITY_LOSS | SOUND_CONSTANT_FREQUENCY)
|
||||
#define SOUND_MOVING_AIM_CANNON /* 0x1D192001 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x19, 0x20, SOUND_NO_VOLUME_LOSS | SOUND_NO_PRIORITY_LOSS | SOUND_CONSTANT_FREQUENCY)
|
||||
#define SOUND_MOVING_UNK1A /* 0x101A0001 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x1A, 0x00, 0) // ?, unused
|
||||
#define SOUND_MOVING_RIDING_SHELL_LAVA /* 0x14280001 */ SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x28, 0x00, SOUND_NO_PRIORITY_LOSS)
|
||||
|
||||
/* Mario Sound Effects */
|
||||
// A random number 0-2 is added to the sound ID before playing, producing Yah/Wah/Hoo
|
||||
#define SOUND_MARIO_YAH_WAH_HOO /* 0x24008080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x00, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_HOOHOO /* 0x24038080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x03, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_YAHOO /* 0x24048080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x04, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_UH /* 0x24058080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x05, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_HRMM /* 0x24068080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x06, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_WAH2 /* 0x24078080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x07, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_WHOA /* 0x24088080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x08, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_EEUH /* 0x24098080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x09, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_ATTACKED /* 0x240AFF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0A, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_OOOF /* 0x240B8080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0B, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_OOOF2 /* 0x240BD080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0B, 0xD0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_HERE_WE_GO /* 0x240C8080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0C, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_YAWNING /* 0x240D8080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0D, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_SNORING1 /* 0x240E8080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_SNORING2 /* 0x240F8080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_WAAAOOOW /* 0x2410C080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x10, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_HAHA /* 0x24118080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x11, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_HAHA_WATER /* 0x2411F080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x11, 0xF0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_UH_LEDGE_CLIMB_FAST /* 0x2413D080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x13, 0xD0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_UH_LONG_JUMP_LAND /* 0x24138080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x13, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_ON_FIRE /* 0x2414A080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x14, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_DYING /* 0x2415FF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x15, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_PANTING_COLD /* 0x24168080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x16, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_YAH_WAH_HOO /* 0x24008081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x00, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_HOOHOO /* 0x24038081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x03, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_YAHOO /* 0x24048081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x04, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_UH /* 0x24058081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x05, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_HRMM /* 0x24068081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x06, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_WAH2 /* 0x24078081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x07, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_WHOA /* 0x24088081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x08, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_EEUH /* 0x24098081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x09, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_ATTACKED /* 0x240AFF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0A, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_OOOF /* 0x240B8081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0B, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_OOOF2 /* 0x240BD081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0B, 0xD0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_HERE_WE_GO /* 0x240C8081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0C, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_YAWNING /* 0x240D8081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0D, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_SNORING1 /* 0x240E8081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_SNORING2 /* 0x240F8081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x0F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_WAAAOOOW /* 0x2410C081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x10, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_HAHA /* 0x24118081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x11, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_HAHA_WATER /* 0x2411F081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x11, 0xF0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_UH_LEDGE_CLIMB_FAST /* 0x2413D081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x13, 0xD0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_UH_LONG_JUMP_LAND /* 0x24138081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x13, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_ON_FIRE /* 0x2414A081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x14, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_DYING /* 0x2415FF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x15, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MARIO_PANTING_COLD /* 0x24168081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x16, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
|
||||
// A random number 0-2 is added to the sound ID before playing
|
||||
#define SOUND_MARIO_PANTING /* 0x24188080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x18, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_PANTING /* 0x24188081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x18, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
|
||||
#define SOUND_MARIO_COUGHING1 /* 0x241B8080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x1B, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_COUGHING2 /* 0x241C8080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x1C, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_COUGHING3 /* 0x241D8080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x1D, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_PUNCH_YAH /* 0x241E8080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x1E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_PUNCH_HOO /* 0x241F8080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x1F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_MAMA_MIA /* 0x24208080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x20, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_OKEY_DOKEY /* 0x20210000 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x21, 0x00, 0) // unused
|
||||
#define SOUND_MARIO_GROUND_POUND_WAH /* 0x24228080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x22, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_DROWNING /* 0x2423F080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x23, 0xF0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_PUNCH_WAH /* 0x24248080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x24, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_COUGHING1 /* 0x241B8081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x1B, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_COUGHING2 /* 0x241C8081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x1C, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_COUGHING3 /* 0x241D8081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x1D, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_PUNCH_YAH /* 0x241E8081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x1E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_PUNCH_HOO /* 0x241F8081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x1F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_MAMA_MIA /* 0x24208081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x20, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_OKEY_DOKEY /* 0x20210001 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x21, 0x00, 0) // unused
|
||||
#define SOUND_MARIO_GROUND_POUND_WAH /* 0x24228081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x22, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_DROWNING /* 0x2423F081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x23, 0xF0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_PUNCH_WAH /* 0x24248081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x24, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
|
||||
/* Mario Sound Effects (US/EU only) */
|
||||
#define SOUND_PEACH_DEAR_MARIO /* 0x2428FF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x28, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_DEAR_MARIO /* 0x2428FF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x28, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
|
||||
// A random number 0-4 is added to the sound ID before playing, producing one of
|
||||
// Yahoo! (60% chance), Waha! (20%), or Yippee! (20%).
|
||||
#define SOUND_MARIO_YAHOO_WAHA_YIPPEE /* 0x242B8080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x2B, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_YAHOO_WAHA_YIPPEE /* 0x242B8081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x2B, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
|
||||
#define SOUND_MARIO_DOH /* 0x24308080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x30, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_GAME_OVER /* 0x2431FF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x31, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_HELLO /* 0x2432FF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x32, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_PRESS_START_TO_PLAY /* 0x2433FFA0 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x33, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_NO_ECHO | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_TWIRL_BOUNCE /* 0x24348080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x34, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_SNORING3 /* 0x2435FF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x35, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_SO_LONGA_BOWSER /* 0x24368080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x36, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_IMA_TIRED /* 0x24378080 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x37, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_DOH /* 0x24308081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x30, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_GAME_OVER /* 0x2431FF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x31, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_HELLO /* 0x2432FF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x32, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_PRESS_START_TO_PLAY /* 0x2433FFA1 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x33, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_NO_ECHO | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_TWIRL_BOUNCE /* 0x24348081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x34, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_SNORING3 /* 0x2435FF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x35, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_SO_LONGA_BOWSER /* 0x24368081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x36, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MARIO_IMA_TIRED /* 0x24378081 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x37, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
|
||||
/* Princess Peach Sound Effects (US/EU only) */
|
||||
#define SOUND_PEACH_MARIO /* 0x2438FF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x38, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_POWER_OF_THE_STARS /* 0x2439FF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x39, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_THANKS_TO_YOU /* 0x243AFF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x3A, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_THANK_YOU_MARIO /* 0x243BFF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x3B, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_SOMETHING_SPECIAL /* 0x243CFF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x3C, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_BAKE_A_CAKE /* 0x243DFF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x3D, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_FOR_MARIO /* 0x243EFF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x3E, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_MARIO2 /* 0x243FFF80 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x3F, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_MARIO /* 0x2438FF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x38, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_POWER_OF_THE_STARS /* 0x2439FF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x39, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_THANKS_TO_YOU /* 0x243AFF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x3A, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_THANK_YOU_MARIO /* 0x243BFF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x3B, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_SOMETHING_SPECIAL /* 0x243CFF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x3C, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_BAKE_A_CAKE /* 0x243DFF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x3D, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_FOR_MARIO /* 0x243EFF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x3E, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_PEACH_MARIO2 /* 0x243FFF81 */ SOUND_ARG_LOAD(SOUND_BANK_VOICE, 0x3F, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE)
|
||||
|
||||
/* General Sound Effects */
|
||||
#define SOUND_GENERAL_ACTIVATE_CAP_SWITCH /* 0x30008080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x00, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_FLAME_OUT /* 0x30038080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x03, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_OPEN_WOOD_DOOR /* 0x3004C080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x04, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CLOSE_WOOD_DOOR /* 0x3005C080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x05, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_OPEN_IRON_DOOR /* 0x3006C080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x06, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CLOSE_IRON_DOOR /* 0x3007C080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x07, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BUBBLES /* 0x30080000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x08, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_MOVING_WATER /* 0x30090080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x09, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_WING_FLAP /* 0x300A0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0A, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_QUIET_BUBBLE /* 0x300B0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0B, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_VOLCANO_EXPLOSION /* 0x300C8080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0C, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_QUIET_BUBBLE2 /* 0x300D0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0D, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CASTLE_TRAP_OPEN /* 0x300E8080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0E, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_WALL_EXPLOSION /* 0x300F0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0F, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_COIN /* 0x38118080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x11, 0x80, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_COIN_WATER /* 0x38128080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x12, 0x80, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_SHORT_STAR /* 0x30160090 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x16, 0x00, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BIG_CLOCK /* 0x30170080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x17, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_LOUD_POUND /* 0x30180000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x18, 0x00, 0) // _TERRAIN?, unverified, unused
|
||||
#define SOUND_GENERAL_LOUD_POUND2 /* 0x30190000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x19, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHORT_POUND1 /* 0x301A0000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1A, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHORT_POUND2 /* 0x301B0000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1B, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHORT_POUND3 /* 0x301C0000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1C, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHORT_POUND4 /* 0x301D0000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1D, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHORT_POUND5 /* 0x301E0000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1E, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHORT_POUND6 /* 0x301F0000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1F, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_OPEN_CHEST /* 0x31208080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x20, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_OPEN_CHEST_WATER /* 0x31228080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x22, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BOX_LANDING_UNUSED /* 0x30240080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x24, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_SMALL_BOX_LANDING /* 0x32240080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x24, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_UNKNOWN1 /* 0x30250080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x25, 0x00, SOUND_DISCRETE) // unverified, unused
|
||||
#define SOUND_GENERAL_ROLLING_LOG /* 0x32250080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x25, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CLAM_SHELL_OPEN /* 0x30264080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x26, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CLAM_SHELL_CLOSE /* 0x30274080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x27, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_PAINTING_EJECT /* 0x39280080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x28, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_LEVEL_SELECT_CHANGE /* 0x302B0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2B, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_PLATFORM /* 0x302D8080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2D, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_DONUT_PLATFORM_EXPLOSION /* 0x302E2080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2E, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_BOWSER_BOMB_EXPLOSION /* 0x312F0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2F, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#if defined(VERSION_JP)
|
||||
#define SOUND_GENERAL_COIN_SPURT /* 0x30300080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x00, SOUND_DISCRETE) // unverified
|
||||
#elif defined(VERSION_US)
|
||||
#define SOUND_GENERAL_COIN_SPURT /* 0x38300080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x00, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
|
||||
#else
|
||||
#define SOUND_GENERAL_COIN_SPURT /* 0x38302080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x20, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
|
||||
#endif
|
||||
#define SOUND_GENERAL_EXPLOSION6 /* 0x30310000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x31, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_UNK32 /* 0x30320000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x32, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_DRAWBRIDGE_LOWER /* 0x30344080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x34, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_DRAWBRIDGE_RAISE /* 0x30354080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x35, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_COIN_DROP /* 0x30364080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x36, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BOWSER_KEY_LAND /* 0x38378080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x37, 0x80, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_PENDULUM_SWING /* 0x30380080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x38, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_CHAIN_CHOMP1 /* 0x30390080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x39, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CHAIN_CHOMP2 /* 0x303A0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3A, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_DOOR_TURN_KEY /* 0x303B0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3B, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_MOVING_IN_SAND /* 0x303C0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3C, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_ELEVATOR_WOBBLE_LOWPRIO /* 0x303D0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3D, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_KICKABLE_BOARD_FALL /* 0x303D8080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3D, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_MOVING_PLATFORM_SWITCH /* 0x303E0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3E, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_CAGE_OPEN /* 0x303FA080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3F, 0xA0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_QUIET_POUND1_LOWPRIO /* 0x30400080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x40, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_QUIET_POUND1 /* 0x30404080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x40, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BREAK_BOX /* 0x3041C080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x41, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_DOOR_INSERT_KEY /* 0x30420080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x42, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_VOLCANO_TRAP_FALL /* 0x30430080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x43, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BIG_POUND /* 0x30440080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x44, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_VOLCANO_TRAP_RISE /* 0x30450080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x45, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_TOX_BOX_MOVE /* 0x30468080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x46, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CANNON_UP /* 0x30478080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x47, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_GRINDEL_ROLL /* 0x30480080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x48, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_EXPLOSION7 /* 0x30490000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x49, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHAKE_COFFIN /* 0x304A0000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4A, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_RACE_GUN_SHOT /* 0x314D4080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4D, 0x40, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_STAR_DOOR_OPEN /* 0x304EC080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4E, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_STAR_DOOR_CLOSE /* 0x304FC080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4F, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_POUND_ROCK /* 0x30560080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x56, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_STAR_APPEARS /* 0x3057FF90 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x57, 0xFF, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_COLLECT_1UP /* 0x3058FF80 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x58, 0xFF, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_BUTTON_PRESS_LOWPRIO /* 0x305A0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BUTTON_PRESS /* 0x305A4080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BUTTON_PRESS_2_LOWPRIO /* 0x315A0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BUTTON_PRESS_2 /* 0x315A4080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x40, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_ELEVATOR_MOVE /* 0x305B0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5B, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_ELEVATOR_MOVE_2 /* 0x315B0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5B, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_SWISH_AIR_UNUSED /* 0x305C0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5C, 0x00, SOUND_DISCRETE) // unverified, unused
|
||||
#define SOUND_GENERAL_HAUNTED_CHAIR_SWISH_AIR /* 0x315C0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5C, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_HAUNTED_CHAIR_SPIN /* 0x305D0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5D, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BOO_CAGE_SOFT_LANDING /* 0x305E0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5E, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_HAUNTED_CHAIR_FALL /* 0x305F0080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5F, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BOWSER_PLATFORM_UNUSED /* 0x30628080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x62, 0x80, SOUND_DISCRETE) // unverified, unused
|
||||
#define SOUND_GENERAL_BOWSER_PLATFORM_FALL /* 0x31628080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x62, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_HEART_SPIN /* 0x3064C080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x64, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_POUND_WOOD_POST /* 0x3065C080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x65, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_WATER_LEVEL_TRIG /* 0x30668080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x66, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_SWITCH_DOOR_OPEN /* 0x3067A080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x67, 0xA0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_RED_COIN /* 0x30689080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x68, 0x90, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BIRDS_FLY_AWAY /* 0x30690080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x69, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_ELEVATOR_LAND /* 0x306B8080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6B, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CRAZY_BOX_BOING_SLOW /* 0x306C4080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6C, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_MONEYBAG_BOING_LOWPRIO /* 0x306D2080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6D, 0x20, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CRAZY_BOX_BOING_FAST /* 0x306D4080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6D, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_YOSHI_WALK /* 0x306E2080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6E, 0x20, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_ENEMY_ALERT1 /* 0x306F3080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6F, 0x30, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_YOSHI_TALK /* 0x30703080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x70, 0x30, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_SPLATTERING /* 0x30713080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x71, 0x30, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BOING3_UNUSED /* 0x30720000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x72, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_GRAND_STAR /* 0x30730080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x73, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_GRAND_STAR_JUMP /* 0x30740080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x74, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BOAT_ROCK /* 0x30750080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x75, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_VANISH_SFX /* 0x30762080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x76, 0x20, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_ACTIVATE_CAP_SWITCH /* 0x30008081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x00, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_FLAME_OUT /* 0x30038081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x03, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_OPEN_WOOD_DOOR /* 0x3004C081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x04, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CLOSE_WOOD_DOOR /* 0x3005C081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x05, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_OPEN_IRON_DOOR /* 0x3006C081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x06, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CLOSE_IRON_DOOR /* 0x3007C081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x07, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BUBBLES /* 0x30080001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x08, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_MOVING_WATER /* 0x30090081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x09, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_WING_FLAP /* 0x300A0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0A, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_QUIET_BUBBLE /* 0x300B0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0B, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_VOLCANO_EXPLOSION /* 0x300C8081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0C, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_QUIET_BUBBLE2 /* 0x300D0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0D, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CASTLE_TRAP_OPEN /* 0x300E8081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0E, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_WALL_EXPLOSION /* 0x300F0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0F, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_COIN /* 0x38118081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x11, 0x80, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_COIN_WATER /* 0x38128081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x12, 0x80, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_SHORT_STAR /* 0x30160091 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x16, 0x00, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BIG_CLOCK /* 0x30170081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x17, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_LOUD_POUND /* 0x30180001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x18, 0x00, 0) // _TERRAIN?, unverified, unused
|
||||
#define SOUND_GENERAL_LOUD_POUND2 /* 0x30190001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x19, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHORT_POUND1 /* 0x301A0001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1A, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHORT_POUND2 /* 0x301B0001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1B, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHORT_POUND3 /* 0x301C0001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1C, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHORT_POUND4 /* 0x301D0001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1D, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHORT_POUND5 /* 0x301E0001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1E, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHORT_POUND6 /* 0x301F0001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1F, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_OPEN_CHEST /* 0x31208081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x20, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_OPEN_CHEST_WATER /* 0x31228081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x22, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BOX_LANDING_UNUSED /* 0x30240081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x24, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_SMALL_BOX_LANDING /* 0x32240081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x24, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_UNKNOWN1 /* 0x30250081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x25, 0x00, SOUND_DISCRETE) // unverified, unused
|
||||
#define SOUND_GENERAL_ROLLING_LOG /* 0x32250081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x25, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CLAM_SHELL_OPEN /* 0x30264081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x26, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CLAM_SHELL_CLOSE /* 0x30274081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x27, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_PAINTING_EJECT /* 0x39280081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x28, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_LEVEL_SELECT_CHANGE /* 0x302B0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2B, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_PLATFORM /* 0x302D8081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2D, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_DONUT_PLATFORM_EXPLOSION /* 0x302E2081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2E, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_BOWSER_BOMB_EXPLOSION /* 0x312F0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2F, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_COIN_SPURT /* 0x38300081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x00, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_EXPLOSION6 /* 0x30310001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x31, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_UNK32 /* 0x30320001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x32, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_DRAWBRIDGE_LOWER /* 0x30344081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x34, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_DRAWBRIDGE_RAISE /* 0x30354081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x35, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_COIN_DROP /* 0x30364081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x36, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BOWSER_KEY_LAND /* 0x38378081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x37, 0x80, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_PENDULUM_SWING /* 0x30380081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x38, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_CHAIN_CHOMP1 /* 0x30390081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x39, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CHAIN_CHOMP2 /* 0x303A0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3A, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_DOOR_TURN_KEY /* 0x303B0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3B, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_MOVING_IN_SAND /* 0x303C0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3C, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_ELEVATOR_WOBBLE_LOWPRIO /* 0x303D0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3D, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_KICKABLE_BOARD_FALL /* 0x303D8081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3D, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_MOVING_PLATFORM_SWITCH /* 0x303E0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3E, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_CAGE_OPEN /* 0x303FA081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3F, 0xA0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_QUIET_POUND1_LOWPRIO /* 0x30400081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x40, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_QUIET_POUND1 /* 0x30404081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x40, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BREAK_BOX /* 0x3041C081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x41, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_DOOR_INSERT_KEY /* 0x30420081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x42, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_VOLCANO_TRAP_FALL /* 0x30430081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x43, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BIG_POUND /* 0x30440081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x44, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_VOLCANO_TRAP_RISE /* 0x30450081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x45, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_TOX_BOX_MOVE /* 0x30468081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x46, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CANNON_UP /* 0x30478081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x47, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_GRINDEL_ROLL /* 0x30480081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x48, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_EXPLOSION7 /* 0x30490001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x49, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_SHAKE_COFFIN /* 0x304A0001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4A, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_RACE_GUN_SHOT /* 0x314D4081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4D, 0x40, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_STAR_DOOR_OPEN /* 0x304EC081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4E, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_STAR_DOOR_CLOSE /* 0x304FC081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4F, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_POUND_ROCK /* 0x30560081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x56, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_STAR_APPEARS /* 0x3057FF91 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x57, 0xFF, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_COLLECT_1UP /* 0x3058FF81 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x58, 0xFF, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL_BUTTON_PRESS_LOWPRIO /* 0x305A0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BUTTON_PRESS /* 0x305A4081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BUTTON_PRESS_2_LOWPRIO /* 0x315A0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BUTTON_PRESS_2 /* 0x315A4081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x40, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_ELEVATOR_MOVE /* 0x305B0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5B, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_ELEVATOR_MOVE_2 /* 0x315B0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5B, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_SWISH_AIR_UNUSED /* 0x305C0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5C, 0x00, SOUND_DISCRETE) // unverified, unused
|
||||
#define SOUND_GENERAL_HAUNTED_CHAIR_SWISH_AIR /* 0x315C0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5C, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_HAUNTED_CHAIR_SPIN /* 0x305D0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5D, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BOO_CAGE_SOFT_LANDING /* 0x305E0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5E, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_HAUNTED_CHAIR_FALL /* 0x305F0081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5F, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BOWSER_PLATFORM_UNUSED /* 0x30628081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x62, 0x80, SOUND_DISCRETE) // unverified, unused
|
||||
#define SOUND_GENERAL_BOWSER_PLATFORM_FALL /* 0x31628081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x62, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_HEART_SPIN /* 0x3064C081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x64, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_POUND_WOOD_POST /* 0x3065C081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x65, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_WATER_LEVEL_TRIG /* 0x30668081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x66, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_SWITCH_DOOR_OPEN /* 0x3067A081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x67, 0xA0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_RED_COIN /* 0x30689081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x68, 0x90, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BIRDS_FLY_AWAY /* 0x30690081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x69, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_ELEVATOR_LAND /* 0x306B8081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6B, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CRAZY_BOX_BOING_SLOW /* 0x306C4081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6C, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_MONEYBAG_BOING_LOWPRIO /* 0x306D2081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6D, 0x20, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_CRAZY_BOX_BOING_FAST /* 0x306D4081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6D, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_YOSHI_WALK /* 0x306E2081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6E, 0x20, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_ENEMY_ALERT1 /* 0x306F3081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6F, 0x30, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_YOSHI_TALK /* 0x30703081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x70, 0x30, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_SPLATTERING /* 0x30713081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x71, 0x30, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BOING3_UNUSED /* 0x30720001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x72, 0x00, 0) // unverified, unused
|
||||
#define SOUND_GENERAL_GRAND_STAR /* 0x30730081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x73, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_GRAND_STAR_JUMP /* 0x30740081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x74, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_BOAT_ROCK /* 0x30750081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x75, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_GENERAL_VANISH_SFX /* 0x30762081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x76, 0x20, SOUND_DISCRETE) // unverified
|
||||
|
||||
/* Environment Sound Effects */
|
||||
#define SOUND_ENV_WATERFALL1 /* 0x40000000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x00, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_WATERFALL2 /* 0x40010000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x01, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_ELEVATOR1 /* 0x40020000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x02, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_DRONING1 /* 0x41030000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x03, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
|
||||
#define SOUND_ENV_DRONING2 /* 0x40040000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x04, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_WIND1 /* 0x40050000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x05, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_MOVING_SAND_SNOW /* 0x40060000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x06, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ENV_UNK07 /* 0x40070000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x07, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ENV_ELEVATOR2 /* 0x40080000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x08, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_WATER /* 0x40090000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x09, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_BOWLING_BALL_ROLL /* 0x400A0000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0A, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_BOAT_ROCKING1 /* 0x400B0000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0B, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_ELEVATOR3 /* 0x400C0000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0C, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_ELEVATOR4 /* 0x400D0000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0D, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_HAUNTED_BOOKSHELF_RECEDE /* 0x410D0000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0D, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
|
||||
#define SOUND_ENV_MOVINGSAND /* 0x400E0000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0E, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_MERRY_GO_ROUND_CREAKING /* 0x400F4000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0F, 0x40, 0) // unverified
|
||||
#define SOUND_ENV_WIND2 /* 0x40108000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x10, 0x80, 0) // unverified
|
||||
#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_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
|
||||
#define SOUND_ENV_WATERFALL1 /* 0x40000001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x00, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_WATERFALL2 /* 0x40010001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x01, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_ELEVATOR1 /* 0x40020001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x02, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_DRONING1 /* 0x41030001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x03, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
|
||||
#define SOUND_ENV_DRONING2 /* 0x40040001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x04, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_WIND1 /* 0x40050001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x05, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_MOVING_SAND_SNOW /* 0x40060001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x06, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ENV_UNK07 /* 0x40070001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x07, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ENV_ELEVATOR2 /* 0x40080001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x08, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_WATER /* 0x40090001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x09, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_BOWLING_BALL_ROLL /* 0x400A0001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0A, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_BOAT_ROCKING1 /* 0x400B0001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0B, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_ELEVATOR3 /* 0x400C0001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0C, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_ELEVATOR4 /* 0x400D0001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0D, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_HAUNTED_BOOKSHELF_RECEDE /* 0x410D0001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0D, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
|
||||
#define SOUND_ENV_MOVINGSAND /* 0x400E0001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0E, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_MERRY_GO_ROUND_CREAKING /* 0x400F4001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0F, 0x40, 0) // unverified
|
||||
#define SOUND_ENV_WIND2 /* 0x40108001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x10, 0x80, 0) // unverified
|
||||
#define SOUND_ENV_UNK12 /* 0x40120001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x12, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ENV_SLIDING /* 0x40130001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x13, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_STAR /* 0x40140011 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x14, 0x00, SOUND_LOWER_BACKGROUND_MUSIC) // unverified
|
||||
#define SOUND_ENV_MOVING_BIG_PLATFORM /* 0x41150001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x15, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
|
||||
#define SOUND_ENV_WATER_DRAIN /* 0x41160001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x16, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
|
||||
#define SOUND_ENV_METAL_BOX_PUSH /* 0x40178001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x17, 0x80, 0) // unverified
|
||||
#define SOUND_ENV_SINK_QUICKSAND /* 0x40188001 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x18, 0x80, 0) // unverified
|
||||
|
||||
/* Object Sound Effects */
|
||||
#define SOUND_OBJ_SUSHI_SHARK_WATER_SOUND /* 0x50008080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x00, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_MRI_SHOOT /* 0x50010080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x01, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BABY_PENGUIN_WALK /* 0x50020080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x02, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOWSER_WALK /* 0x50030080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x03, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOWSER_TAIL_PICKUP /* 0x50050080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x05, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOWSER_DEFEATED /* 0x50060080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x06, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOWSER_SPINNING /* 0x50070080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x07, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOWSER_INHALING /* 0x50080080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x08, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BIG_PENGUIN_WALK /* 0x50098080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x09, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOO_BOUNCE_TOP /* 0x500A0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0A, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOO_LAUGH_SHORT /* 0x500B0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0B, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_THWOMP /* 0x500CA080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0C, 0xA0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_CANNON_RISE /* 0x500DF080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0D, 0xF0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_CANNON_TURN /* 0x500EF080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0E, 0xF0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_CANNON_BARREL_PITCH /* 0x500FF080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0F, 0xF0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_JUMP_WALK_WATER /* 0x50120000 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x12, 0x00, 0) // unverified, unused
|
||||
#define SOUND_OBJ_BOMP_SLIDE /* 0x50130080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x13, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_MRI_DEATH /* 0x50140080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x14, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_POUNDING1 /* 0x50155080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x15, 0x50, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_KING_BOBOMB_POUNDING1_HIGHPRIO /* 0x50158080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x15, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_WHOMP /* 0x50166080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x16, 0x60, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KING_BOBOMB /* 0x50168080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x16, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BULLY_METAL /* 0x50178080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x17, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_BULLY_EXPLODE_UNUSED /* 0x5018A080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x18, 0xA0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_BULLY_EXPLODE_LAVA /* 0x5118A080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x18, 0xA0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_POUNDING_CANNON /* 0x501A5080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1A, 0x50, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_BULLY_WALK_SMALL /* 0x501B3080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1B, 0x30, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_GRAB_MARIO /* 0x501D8080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1D, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_RELEASE_MARIO /* 0x501EA080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1E, 0xA0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_BABY_PENGUIN_DIVE /* 0x501F4080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1F, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_GOOMBA_WALK /* 0x50200080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x20, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_UKIKI_CHATTER_LONG /* 0x50210080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x21, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_MONTY_MOLE_ATTACK /* 0x50220080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x22, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_EVIL_LAKITU_THROW /* 0x50222080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x22, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_UNK23 /* 0x50230000 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x23, 0x00, 0) // unverified, unused
|
||||
#define SOUND_OBJ_DYING_ENEMY1 /* 0x50244080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x24, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WATER_BOMB_CANNON /* 0x50254080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x25, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_DYING_ENEMY2 /* 0x50260000 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x26, 0x00, 0) // unverified, unused
|
||||
#define SOUND_OBJ_BOBOMB_WALK /* 0x50270080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x27, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_SOMETHING_LANDING /* 0x50288080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x28, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_DIVING_IN_WATER /* 0x5029A080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x29, 0xA0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_SNOW_SAND1 /* 0x502A0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2A, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_SNOW_SAND2 /* 0x502B0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2B, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_DEFAULT_DEATH /* 0x502C8080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2C, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BIG_PENGUIN_YELL /* 0x502D0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2D, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WATER_BOMB_BOUNCING /* 0x502E8080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2E, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_GOOMBA_ALERT /* 0x502F0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2F, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WIGGLER_JUMP /* 0x502F6080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2F, 0x60, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_STOMPED /* 0x50308080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x30, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_SWOOP_FLAP /* 0x50310080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x31, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_DIVING_INTO_WATER /* 0x50324080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x32, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_PIRANHA_PLANT_SHRINK /* 0x50334080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x33, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KOOPA_THE_QUICK_WALK /* 0x50342080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x34, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KOOPA_WALK /* 0x50350080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x35, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BULLY_WALK_LARGE /* 0x50366080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x36, 0x60, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_DORRIE /* 0x50376080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x37, 0x60, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOWSER_LAUGH /* 0x50388080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x38, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_UKIKI_CHATTER_SHORT /* 0x50390080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x39, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_UKIKI_CHATTER_IDLE /* 0x503A0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3A, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_UKIKI_STEP_DEFAULT /* 0x503B0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3B, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_UKIKI_STEP_LEAVES /* 0x503C0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3C, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KOOPA_TALK /* 0x503DA080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3D, 0xA0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KOOPA_DAMAGE /* 0x503EA080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3E, 0xA0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KLEPTO_TURN /* 0x503F4080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3F, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_KLEPTO_ATTACKED /* 0x50406080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x40, 0x60, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_KING_BOBOMB_TALK /* 0x50410080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x41, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KING_BOBOMB_JUMP /* 0x50468080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x46, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KING_WHOMP_DEATH /* 0x5147C080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x47, 0xC0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOO_LAUGH_LONG /* 0x50480080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x48, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_EEL_UNUSED /* 0x504A0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4A, 0x00, SOUND_DISCRETE) // unverified, unused
|
||||
#define SOUND_OBJ_EEL_EXIT_CAVE /* 0x524A0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4A, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_EYEROK_SHOW_EYE /* 0x524B0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4B, 0x00, SOUND_VIBRATO | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_MR_BLIZZARD_ALERT /* 0x504C0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4C, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_SNUFIT_SHOOT /* 0x504D0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4D, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_SKEETER_WALK /* 0x504E0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4E, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WALKING_WATER /* 0x504F0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4F, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_BIRD_CHIRP3 /* 0x50514000 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x51, 0x40, 0)
|
||||
#define SOUND_OBJ_PIRANHA_PLANT_APPEAR /* 0x50542080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x54, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_FLAME_BLOWN /* 0x50558080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x55, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_MAD_PIANO_CHOMPING /* 0x52564080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x56, 0x40, SOUND_VIBRATO | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOBOMB_BUDDY_TALK /* 0x50584080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x58, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_SPINY_LAND /* 0x50591080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x59, 0x10, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_WIGGLER_HIGH_PITCH /* 0x505C4080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5C, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_HEAVEHO_TOSSED /* 0x505D4080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5D, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WIGGLER_DEATH /* 0x505E0000 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5E, 0x00, 0) // unverified, unused
|
||||
#define SOUND_OBJ_BOWSER_INTRO_LAUGH /* 0x505F8090 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5F, 0x80, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_ENEMY_DEATH_HIGH /* 0x5060B080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x60, 0xB0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_ENEMY_DEATH_LOW /* 0x5061B080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x61, 0xB0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_SWOOP_DEATH /* 0x5062B080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x62, 0xB0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KOOPA_FLYGUY_DEATH /* 0x5063B080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x63, 0xB0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_POKEY_DEATH /* 0x5063C080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x63, 0xC0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_SNOWMAN_BOUNCE /* 0x5064C080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x64, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_SNOWMAN_EXPLODE /* 0x5065D080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x65, 0xD0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_POUNDING_LOUD /* 0x50684080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x68, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_MIPS_RABBIT /* 0x506A0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6A, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_MIPS_RABBIT_WATER /* 0x506C0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6C, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_EYEROK_EXPLODE /* 0x506D0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6D, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_CHUCKYA_DEATH /* 0x516E0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6E, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WIGGLER_TALK /* 0x506F0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6F, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WIGGLER_ATTACKED /* 0x50706080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x70, 0x60, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WIGGLER_LOW_PITCH /* 0x50712080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x71, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_SNUFIT_SKEETER_DEATH /* 0x5072C080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x72, 0xC0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BUBBA_CHOMP /* 0x50734080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x73, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_ENEMY_DEFEAT_SHRINK /* 0x50744080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x74, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_SUSHI_SHARK_WATER_SOUND /* 0x50008081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x00, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_MRI_SHOOT /* 0x50010081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x01, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BABY_PENGUIN_WALK /* 0x50020081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x02, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOWSER_WALK /* 0x50030081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x03, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOWSER_TAIL_PICKUP /* 0x50050081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x05, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOWSER_DEFEATED /* 0x50060081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x06, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOWSER_SPINNING /* 0x50070081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x07, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOWSER_INHALING /* 0x50080081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x08, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BIG_PENGUIN_WALK /* 0x50098081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x09, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOO_BOUNCE_TOP /* 0x500A0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0A, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOO_LAUGH_SHORT /* 0x500B0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0B, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_THWOMP /* 0x500CA081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0C, 0xA0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_CANNON_RISE /* 0x500DF081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0D, 0xF0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_CANNON_TURN /* 0x500EF081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0E, 0xF0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_CANNON_BARREL_PITCH /* 0x500FF081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0F, 0xF0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_JUMP_WALK_WATER /* 0x50120001 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x12, 0x00, 0) // unverified, unused
|
||||
#define SOUND_OBJ_BOMP_SLIDE /* 0x50130081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x13, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_MRI_DEATH /* 0x50140081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x14, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_POUNDING1 /* 0x50155081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x15, 0x50, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_KING_BOBOMB_POUNDING1_HIGHPRIO /* 0x50158081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x15, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_WHOMP /* 0x50166081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x16, 0x60, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KING_BOBOMB /* 0x50168081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x16, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BULLY_METAL /* 0x50178081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x17, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_BULLY_EXPLODE_UNUSED /* 0x5018A081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x18, 0xA0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_BULLY_EXPLODE_LAVA /* 0x5118A081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x18, 0xA0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_POUNDING_CANNON /* 0x501A5081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1A, 0x50, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_BULLY_WALK_SMALL /* 0x501B3081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1B, 0x30, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_GRAB_MARIO /* 0x501D8081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1D, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_RELEASE_MARIO /* 0x501EA081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1E, 0xA0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_BABY_PENGUIN_DIVE /* 0x501F4081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1F, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_GOOMBA_WALK /* 0x50200081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x20, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_UKIKI_CHATTER_LONG /* 0x50210081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x21, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_MONTY_MOLE_ATTACK /* 0x50220081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x22, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_EVIL_LAKITU_THROW /* 0x50222081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x22, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_UNK23 /* 0x50230001 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x23, 0x00, 0) // unverified, unused
|
||||
#define SOUND_OBJ_DYING_ENEMY1 /* 0x50244081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x24, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WATER_BOMB_CANNON /* 0x50254081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x25, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_DYING_ENEMY2 /* 0x50260001 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x26, 0x00, 0) // unverified, unused
|
||||
#define SOUND_OBJ_BOBOMB_WALK /* 0x50270081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x27, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_SOMETHING_LANDING /* 0x50288081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x28, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_DIVING_IN_WATER /* 0x5029A081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x29, 0xA0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_SNOW_SAND1 /* 0x502A0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2A, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_SNOW_SAND2 /* 0x502B0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2B, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_DEFAULT_DEATH /* 0x502C8081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2C, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BIG_PENGUIN_YELL /* 0x502D0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2D, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WATER_BOMB_BOUNCING /* 0x502E8081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2E, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_GOOMBA_ALERT /* 0x502F0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2F, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WIGGLER_JUMP /* 0x502F6081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2F, 0x60, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_STOMPED /* 0x50308081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x30, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_SWOOP_FLAP /* 0x50310081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x31, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_DIVING_INTO_WATER /* 0x50324081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x32, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_PIRANHA_PLANT_SHRINK /* 0x50334081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x33, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KOOPA_THE_QUICK_WALK /* 0x50342081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x34, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KOOPA_WALK /* 0x50350081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x35, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BULLY_WALK_LARGE /* 0x50366081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x36, 0x60, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_DORRIE /* 0x50376081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x37, 0x60, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOWSER_LAUGH /* 0x50388081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x38, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_UKIKI_CHATTER_SHORT /* 0x50390081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x39, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_UKIKI_CHATTER_IDLE /* 0x503A0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3A, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_UKIKI_STEP_DEFAULT /* 0x503B0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3B, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_UKIKI_STEP_LEAVES /* 0x503C0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3C, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KOOPA_TALK /* 0x503DA081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3D, 0xA0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KOOPA_DAMAGE /* 0x503EA081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3E, 0xA0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KLEPTO_TURN /* 0x503F4081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3F, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_KLEPTO_ATTACKED /* 0x50406081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x40, 0x60, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_KING_BOBOMB_TALK /* 0x50410081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x41, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KING_BOBOMB_JUMP /* 0x50468081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x46, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KING_WHOMP_DEATH /* 0x5147C081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x47, 0xC0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOO_LAUGH_LONG /* 0x50480081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x48, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_EEL_UNUSED /* 0x504A0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4A, 0x00, SOUND_DISCRETE) // unverified, unused
|
||||
#define SOUND_OBJ_EEL_EXIT_CAVE /* 0x524A0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4A, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_EYEROK_SHOW_EYE /* 0x524B0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4B, 0x00, SOUND_VIBRATO | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_MR_BLIZZARD_ALERT /* 0x504C0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4C, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_SNUFIT_SHOOT /* 0x504D0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4D, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_SKEETER_WALK /* 0x504E0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4E, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WALKING_WATER /* 0x504F0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4F, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_BIRD_CHIRP3 /* 0x50514001 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x51, 0x40, 0)
|
||||
#define SOUND_OBJ_PIRANHA_PLANT_APPEAR /* 0x50542081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x54, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_FLAME_BLOWN /* 0x50558081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x55, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_MAD_PIANO_CHOMPING /* 0x52564081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x56, 0x40, SOUND_VIBRATO | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BOBOMB_BUDDY_TALK /* 0x50584081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x58, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_SPINY_LAND /* 0x50591081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x59, 0x10, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_WIGGLER_HIGH_PITCH /* 0x505C4081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5C, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_HEAVEHO_TOSSED /* 0x505D4081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5D, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WIGGLER_DEATH /* 0x505E0001 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5E, 0x00, 0) // unverified, unused
|
||||
#define SOUND_OBJ_BOWSER_INTRO_LAUGH /* 0x505F8091 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5F, 0x80, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_ENEMY_DEATH_HIGH /* 0x5060B081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x60, 0xB0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_ENEMY_DEATH_LOW /* 0x5061B081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x61, 0xB0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_SWOOP_DEATH /* 0x5062B081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x62, 0xB0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_KOOPA_FLYGUY_DEATH /* 0x5063B081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x63, 0xB0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_POKEY_DEATH /* 0x5063C081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x63, 0xC0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_SNOWMAN_BOUNCE /* 0x5064C081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x64, 0xC0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_SNOWMAN_EXPLODE /* 0x5065D081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x65, 0xD0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_POUNDING_LOUD /* 0x50684081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x68, 0x40, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_MIPS_RABBIT /* 0x506A0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6A, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_MIPS_RABBIT_WATER /* 0x506C0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6C, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_OBJ_EYEROK_EXPLODE /* 0x506D0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6D, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_CHUCKYA_DEATH /* 0x516E0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6E, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WIGGLER_TALK /* 0x506F0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6F, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WIGGLER_ATTACKED /* 0x50706081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x70, 0x60, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_WIGGLER_LOW_PITCH /* 0x50712081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x71, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_SNUFIT_SKEETER_DEATH /* 0x5072C081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x72, 0xC0, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_BUBBA_CHOMP /* 0x50734081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x73, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ_ENEMY_DEFEAT_SHRINK /* 0x50744081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x74, 0x40, SOUND_DISCRETE)
|
||||
|
||||
#define SOUND_AIR_BOWSER_SPIT_FIRE /* 0x60000000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x00, 0x00, 0)
|
||||
#define SOUND_AIR_UNK01 /* 0x60010000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x01, 0x00, 0) // ?, unused
|
||||
#define SOUND_AIR_LAKITU_FLY /* 0x60028000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x02, 0x80, 0)
|
||||
#define SOUND_AIR_LAKITU_FLY_HIGHPRIO /* 0x6002FF00 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x02, 0xFF, 0)
|
||||
#define SOUND_AIR_AMP_BUZZ /* 0x60034000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x03, 0x40, 0)
|
||||
#define SOUND_AIR_BLOW_FIRE /* 0x60048000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x04, 0x80, 0)
|
||||
#define SOUND_AIR_BLOW_WIND /* 0x60044000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x04, 0x40, 0)
|
||||
#define SOUND_AIR_ROUGH_SLIDE /* 0x60050000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x05, 0x00, 0)
|
||||
#define SOUND_AIR_HEAVEHO_MOVE /* 0x60064000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x06, 0x40, 0)
|
||||
#define SOUND_AIR_UNK07 /* 0x60070000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x07, 0x00, 0) // ?, unused
|
||||
#define SOUND_AIR_BOBOMB_LIT_FUSE /* 0x60086000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x08, 0x60, 0)
|
||||
#define SOUND_AIR_HOWLING_WIND /* 0x60098000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x09, 0x80, 0)
|
||||
#define SOUND_AIR_CHUCKYA_MOVE /* 0x600A4000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x0A, 0x40, 0)
|
||||
#define SOUND_AIR_PEACH_TWINKLE /* 0x600B4000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x0B, 0x40, 0)
|
||||
#define SOUND_AIR_CASTLE_OUTDOORS_AMBIENT /* 0x60104000 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x10, 0x40, 0)
|
||||
#define SOUND_AIR_BOWSER_SPIT_FIRE /* 0x60000001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x00, 0x00, 0)
|
||||
#define SOUND_AIR_UNK01 /* 0x60010001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x01, 0x00, 0) // ?, unused
|
||||
#define SOUND_AIR_LAKITU_FLY /* 0x60028001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x02, 0x80, 0)
|
||||
#define SOUND_AIR_LAKITU_FLY_HIGHPRIO /* 0x6002FF01 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x02, 0xFF, 0)
|
||||
#define SOUND_AIR_AMP_BUZZ /* 0x60034001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x03, 0x40, 0)
|
||||
#define SOUND_AIR_BLOW_FIRE /* 0x60048001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x04, 0x80, 0)
|
||||
#define SOUND_AIR_BLOW_WIND /* 0x60044001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x04, 0x40, 0)
|
||||
#define SOUND_AIR_ROUGH_SLIDE /* 0x60050001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x05, 0x00, 0)
|
||||
#define SOUND_AIR_HEAVEHO_MOVE /* 0x60064001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x06, 0x40, 0)
|
||||
#define SOUND_AIR_UNK07 /* 0x60070001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x07, 0x00, 0) // ?, unused
|
||||
#define SOUND_AIR_BOBOMB_LIT_FUSE /* 0x60086001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x08, 0x60, 0)
|
||||
#define SOUND_AIR_HOWLING_WIND /* 0x60098001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x09, 0x80, 0)
|
||||
#define SOUND_AIR_CHUCKYA_MOVE /* 0x600A4001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x0A, 0x40, 0)
|
||||
#define SOUND_AIR_PEACH_TWINKLE /* 0x600B4001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x0B, 0x40, 0)
|
||||
#define SOUND_AIR_CASTLE_OUTDOORS_AMBIENT /* 0x60104001 */ SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x10, 0x40, 0)
|
||||
|
||||
/* Menu Sound Effects */
|
||||
#define SOUND_MENU_CHANGE_SELECT /* 0x7000F880 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x00, 0xF8, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_REVERSE_PAUSE /* 0x70010000 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x01, 0x00, 0) // unverified, unused
|
||||
#define SOUND_MENU_PAUSE_UNUSED /* 0x7002F080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x02, 0xF0, SOUND_DISCRETE) // unused
|
||||
#define SOUND_MENU_PAUSE_OPEN /* 0x7002FF80 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x02, 0xFF, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_PAUSE_CLOSE /* 0x7003FF80 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x03, 0xFF, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_MESSAGE_APPEAR /* 0x70040080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x04, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_MESSAGE_DISAPPEAR /* 0x70050080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x05, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_CAMERA_ZOOM_IN /* 0x70060080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x06, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_CAMERA_ZOOM_OUT /* 0x70070080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x07, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_PINCH_MARIO_FACE /* 0x70080080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x08, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_LET_GO_MARIO_FACE /* 0x70090080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x09, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_HAND_APPEAR /* 0x700A0080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0A, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_HAND_DISAPPEAR /* 0x700B0080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0B, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_UNK0C_FLAG_UNKNOWN1 /* 0x700C0080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0C, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MENU_POWER_METER /* 0x700D0080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0D, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MENU_CAMERA_BUZZ /* 0x700E0080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0E, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_CAMERA_TURN /* 0x700F0080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0F, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_UNK10 /* 0x70100000 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x10, 0x00, 0) // unverified, unused
|
||||
#define SOUND_MENU_CLICK_FILE_SELECT /* 0x70110080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x11, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_MESSAGE_NEXT_PAGE /* 0x70130080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x13, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MENU_COIN_ITS_A_ME_MARIO /* 0x70140080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x14, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_YOSHI_GAIN_LIVES /* 0x70150080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x15, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_ENTER_PIPE /* 0x7016A080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x16, 0xA0, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_EXIT_PIPE /* 0x7017A080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x17, 0xA0, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_BOWSER_LAUGH /* 0x70188080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x18, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_ENTER_HOLE /* 0x71198080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x19, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MENU_CLICK_CHANGE_VIEW /* 0x701A8080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1A, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MENU_CAMERA_UNUSED1 /* 0x701B0000 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1B, 0x00, 0) // unverified, unused
|
||||
#define SOUND_MENU_CAMERA_UNUSED2 /* 0x701C0000 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1C, 0x00, 0) // unverified, unused
|
||||
#define SOUND_MENU_MARIO_CASTLE_WARP /* 0x701DB080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1D, 0xB0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MENU_STAR_SOUND /* 0x701EFF80 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1E, 0xFF, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_THANK_YOU_PLAYING_MY_GAME /* 0x701FFF80 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1F, 0xFF, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_READ_A_SIGN /* 0x70200000 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x20, 0x00, 0) // unverified, unused
|
||||
#define SOUND_MENU_EXIT_A_SIGN /* 0x70210000 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x21, 0x00, 0) // unverified, unused
|
||||
#define SOUND_MENU_HIGH_SCORE /* 0x70222080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x22, 0x20, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MENU_STAR_SOUND_OKEY_DOKEY /* 0x7023FF80 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x23, 0xFF, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_STAR_SOUND_LETS_A_GO /* 0x7024FF80 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x24, 0xFF, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_CHANGE_SELECT /* 0x7000F881 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x00, 0xF8, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_REVERSE_PAUSE /* 0x70010001 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x01, 0x00, 0) // unverified, unused
|
||||
#define SOUND_MENU_PAUSE_UNUSED /* 0x7002F081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x02, 0xF0, SOUND_DISCRETE) // unused
|
||||
#define SOUND_MENU_PAUSE_OPEN /* 0x7002FF81 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x02, 0xFF, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_PAUSE_CLOSE /* 0x7003FF81 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x03, 0xFF, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_MESSAGE_APPEAR /* 0x70040081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x04, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_MESSAGE_DISAPPEAR /* 0x70050081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x05, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_CAMERA_ZOOM_IN /* 0x70060081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x06, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_CAMERA_ZOOM_OUT /* 0x70070081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x07, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_PINCH_MARIO_FACE /* 0x70080081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x08, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_LET_GO_MARIO_FACE /* 0x70090081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x09, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_HAND_APPEAR /* 0x700A0081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0A, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_HAND_DISAPPEAR /* 0x700B0081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0B, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_UNK0C_FLAG_UNKNOWN1 /* 0x700C0081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0C, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MENU_POWER_METER /* 0x700D0081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0D, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MENU_CAMERA_BUZZ /* 0x700E0081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0E, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_CAMERA_TURN /* 0x700F0081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0F, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_UNK10 /* 0x70100001 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x10, 0x00, 0) // unverified, unused
|
||||
#define SOUND_MENU_CLICK_FILE_SELECT /* 0x70110081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x11, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_MESSAGE_NEXT_PAGE /* 0x70130081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x13, 0x00, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MENU_COIN_ITS_A_ME_MARIO /* 0x70140081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x14, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_YOSHI_GAIN_LIVES /* 0x70150081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x15, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_ENTER_PIPE /* 0x7016A081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x16, 0xA0, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_EXIT_PIPE /* 0x7017A081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x17, 0xA0, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_BOWSER_LAUGH /* 0x70188081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x18, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_ENTER_HOLE /* 0x71198081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x19, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_MENU_CLICK_CHANGE_VIEW /* 0x701A8081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1A, 0x80, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MENU_CAMERA_UNUSED1 /* 0x701B0001 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1B, 0x00, 0) // unverified, unused
|
||||
#define SOUND_MENU_CAMERA_UNUSED2 /* 0x701C0001 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1C, 0x00, 0) // unverified, unused
|
||||
#define SOUND_MENU_MARIO_CASTLE_WARP /* 0x701DB081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1D, 0xB0, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MENU_STAR_SOUND /* 0x701EFF81 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1E, 0xFF, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_THANK_YOU_PLAYING_MY_GAME /* 0x701FFF81 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1F, 0xFF, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_READ_A_SIGN /* 0x70200001 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x20, 0x00, 0) // unverified, unused
|
||||
#define SOUND_MENU_EXIT_A_SIGN /* 0x70210001 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x21, 0x00, 0) // unverified, unused
|
||||
#define SOUND_MENU_HIGH_SCORE /* 0x70222081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x22, 0x20, SOUND_DISCRETE) // unverified
|
||||
#define SOUND_MENU_STAR_SOUND_OKEY_DOKEY /* 0x7023FF81 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x23, 0xFF, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_STAR_SOUND_LETS_A_GO /* 0x7024FF81 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x24, 0xFF, SOUND_DISCRETE)
|
||||
|
||||
// US/EU only; an index between 0-7 or 0-4 is added to the sound ID before
|
||||
// playing, producing the same sound with different pitch.
|
||||
#define SOUND_MENU_COLLECT_RED_COIN /* 0x78289080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x28, 0x90, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE)
|
||||
#define SOUND_MENU_COLLECT_SECRET /* 0x70302080 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x30, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_MENU_COLLECT_RED_COIN /* 0x78289081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x28, 0x90, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE)
|
||||
#define SOUND_MENU_COLLECT_SECRET /* 0x70302081 */ SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x30, 0x20, SOUND_DISCRETE)
|
||||
|
||||
// Channel 8 loads sounds from the same place as channel 3, making it possible
|
||||
// to play two channel 3 sounds at once (since just one sound from each channel
|
||||
// can play at a given time).
|
||||
#define SOUND_GENERAL2_BOBOMB_EXPLOSION /* 0x802E2080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x2E, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_PURPLE_SWITCH /* 0x803EC080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x3E, 0xC0, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_ROTATING_BLOCK_CLICK /* 0x80400080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x40, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_SPINDEL_ROLL /* 0x80482080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x48, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_PYRAMID_TOP_SPIN /* 0x814BE080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x4B, 0xE0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_PYRAMID_TOP_EXPLOSION /* 0x814CF080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x4C, 0xF0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_BIRD_CHIRP2 /* 0x80504000 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x50, 0x40, 0)
|
||||
#define SOUND_GENERAL2_SWITCH_TICK_FAST /* 0x8054F010 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x54, 0xF0, SOUND_LOWER_BACKGROUND_MUSIC)
|
||||
#define SOUND_GENERAL2_SWITCH_TICK_SLOW /* 0x8055F010 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x55, 0xF0, SOUND_LOWER_BACKGROUND_MUSIC)
|
||||
#define SOUND_GENERAL2_STAR_APPEARS /* 0x8057FF90 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x57, 0xFF, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_ROTATING_BLOCK_ALERT /* 0x80590080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x59, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_BOWSER_EXPLODE /* 0x80600080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x60, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_BOWSER_KEY /* 0x80610080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x61, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_1UP_APPEAR /* 0x8063D080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x63, 0xD0, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_RIGHT_ANSWER /* 0x806AA080 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x6A, 0xA0, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_BOBOMB_EXPLOSION /* 0x802E2081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x2E, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_PURPLE_SWITCH /* 0x803EC081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x3E, 0xC0, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_ROTATING_BLOCK_CLICK /* 0x80400081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x40, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_SPINDEL_ROLL /* 0x80482081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x48, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_PYRAMID_TOP_SPIN /* 0x814BE081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x4B, 0xE0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_PYRAMID_TOP_EXPLOSION /* 0x814CF081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x4C, 0xF0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_BIRD_CHIRP2 /* 0x80504001 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x50, 0x40, 0)
|
||||
#define SOUND_GENERAL2_SWITCH_TICK_FAST /* 0x8054F011 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x54, 0xF0, SOUND_LOWER_BACKGROUND_MUSIC)
|
||||
#define SOUND_GENERAL2_SWITCH_TICK_SLOW /* 0x8055F011 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x55, 0xF0, SOUND_LOWER_BACKGROUND_MUSIC)
|
||||
#define SOUND_GENERAL2_STAR_APPEARS /* 0x8057FF91 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x57, 0xFF, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_ROTATING_BLOCK_ALERT /* 0x80590081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x59, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_BOWSER_EXPLODE /* 0x80600081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x60, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_BOWSER_KEY /* 0x80610081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x61, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_1UP_APPEAR /* 0x8063D081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x63, 0xD0, SOUND_DISCRETE)
|
||||
#define SOUND_GENERAL2_RIGHT_ANSWER /* 0x806AA081 */ SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x6A, 0xA0, SOUND_DISCRETE)
|
||||
|
||||
// Channel 9 loads sounds from the same place as channel 5.
|
||||
#define SOUND_OBJ2_BOWSER_ROAR /* 0x90040080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x04, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_PIRANHA_PLANT_BITE /* 0x90105080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x10, 0x50, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_PIRANHA_PLANT_DYING /* 0x90116080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x11, 0x60, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_BOWSER_PUZZLE_PIECE_MOVE /* 0x90192080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x19, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_SMALL_BULLY_ATTACKED /* 0x901C0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x1C, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_KING_BOBOMB_DAMAGE /* 0x91424080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x42, 0x40, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_SCUTTLEBUG_WALK /* 0x90434080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x43, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_SCUTTLEBUG_ALERT /* 0x90444080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x44, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_BABY_PENGUIN_YELL /* 0x90450080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x45, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_SWOOP_WAKE_UP /* 0x90490080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x49, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_BIRD_CHIRP1 /* 0x90524000 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x52, 0x40, 0)
|
||||
#define SOUND_OBJ2_LARGE_BULLY_ATTACKED /* 0x90570080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x57, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_EYEROK_SOUND_SHORT /* 0x935A0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x5A, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_VIBRATO | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_WHOMP_SOUND_SHORT /* 0x935AC080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x5A, 0xC0, SOUND_NO_VOLUME_LOSS | SOUND_VIBRATO | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_EYEROK_SOUND_LONG /* 0x925B0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x5B, 0x00, SOUND_VIBRATO | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_BOWSER_TELEPORT /* 0x90668080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x66, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_MONTY_MOLE_APPEAR /* 0x90678080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x67, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_BOSS_DIALOG_GRUNT /* 0x90694080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x69, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_MRI_SPINNING /* 0x906B0080 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x6B, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_BOWSER_ROAR /* 0x90040081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x04, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_PIRANHA_PLANT_BITE /* 0x90105081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x10, 0x50, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_PIRANHA_PLANT_DYING /* 0x90116081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x11, 0x60, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_BOWSER_PUZZLE_PIECE_MOVE /* 0x90192081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x19, 0x20, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_SMALL_BULLY_ATTACKED /* 0x901C0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x1C, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_KING_BOBOMB_DAMAGE /* 0x91424081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x42, 0x40, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_SCUTTLEBUG_WALK /* 0x90434081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x43, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_SCUTTLEBUG_ALERT /* 0x90444081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x44, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_BABY_PENGUIN_YELL /* 0x90450081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x45, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_SWOOP_WAKE_UP /* 0x90490081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x49, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_BIRD_CHIRP1 /* 0x90524001 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x52, 0x40, 0)
|
||||
#define SOUND_OBJ2_LARGE_BULLY_ATTACKED /* 0x90570081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x57, 0x00, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_EYEROK_SOUND_SHORT /* 0x935A0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x5A, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_VIBRATO | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_WHOMP_SOUND_SHORT /* 0x935AC081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x5A, 0xC0, SOUND_NO_VOLUME_LOSS | SOUND_VIBRATO | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_EYEROK_SOUND_LONG /* 0x925B0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x5B, 0x00, SOUND_VIBRATO | SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_BOWSER_TELEPORT /* 0x90668081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x66, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_MONTY_MOLE_APPEAR /* 0x90678081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x67, 0x80, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_BOSS_DIALOG_GRUNT /* 0x90694081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x69, 0x40, SOUND_DISCRETE)
|
||||
#define SOUND_OBJ2_MRI_SPINNING /* 0x906B0081 */ SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x6B, 0x00, SOUND_DISCRETE)
|
||||
|
||||
#endif // SOUNDS_H
|
||||
+47
-53
@@ -4,62 +4,56 @@
|
||||
#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")
|
||||
#define NC_CAMX_EN _("Camera Sensitivity")
|
||||
#define NC_INVERTX_EN _("Invert Camera")
|
||||
#define NC_CAMC_EN _("Camera Auto Turn")
|
||||
#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_FR _("Sensibilite")
|
||||
#define NC_INVERTX_FR _("Camera invertir")
|
||||
#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")
|
||||
#define NC_CAMX_DE _("Camera Sensitivity")
|
||||
#define NC_INVERTX_DE _("Invert Camera")
|
||||
#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
|
||||
|
||||
|
||||
@@ -508,7 +508,7 @@ const Collision wdw_seg7_area_1_collision[] = {
|
||||
COL_VERTEX(-3839, 1300, 1249),
|
||||
COL_VERTEX(3103, 1428, 3681),
|
||||
COL_VERTEX(3681, 1428, 3681),
|
||||
COL_TRI_INIT(SURFACE_DEFAULT, 583),
|
||||
COL_TRI_INIT(SURFACE_DEFAULT, 582),
|
||||
COL_TRI(161, 193, 194),
|
||||
COL_TRI(165, 195, 193),
|
||||
COL_TRI(165, 193, 161),
|
||||
@@ -784,7 +784,8 @@ const Collision wdw_seg7_area_1_collision[] = {
|
||||
COL_TRI(288, 320, 445),
|
||||
COL_TRI(288, 59, 62),
|
||||
COL_TRI(286, 320, 288),
|
||||
COL_TRI(190, 189, 192),
|
||||
// HackerSM64: denorm removed
|
||||
// COL_TRI(190, 189, 192),
|
||||
COL_TRI(289, 188, 190),
|
||||
COL_TRI(290, 291, 451),
|
||||
COL_TRI(291, 447, 144),
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
4ac5721683d0e0b6bbb561b58a71740845dceea9 build/eu/sm64.eu.z64
|
||||
@@ -1 +0,0 @@
|
||||
8a20a5c83d6ceb0f0506cfc9fa20d8f438cafe51 build/jp/sm64.jp.z64
|
||||
@@ -97,7 +97,7 @@ SECTIONS
|
||||
BEGIN_SEG(boot, 0x04000000)
|
||||
{
|
||||
KEEP(BUILD_DIR/asm/rom_header.o(.text*));
|
||||
KEEP(BUILD_DIR/asm/boot.o(.text*));
|
||||
KEEP(BUILD_DIR/asm/ipl3.o(.text*));
|
||||
}
|
||||
END_SEG(boot)
|
||||
|
||||
@@ -160,13 +160,15 @@ SECTIONS
|
||||
#ifdef EEP
|
||||
KEEP(BUILD_DIR/asm/vc_bin.o(.text*));
|
||||
#endif
|
||||
KEEP(BUILD_DIR/asm/pj64_get_count_factor_asm.o(.text*));
|
||||
KEEP(BUILD_DIR/asm/round.o(.text*));
|
||||
|
||||
BUILD_DIR/src/boot*.o(.text*);
|
||||
BUILD_DIR/src/hvqm*.o(.text*);
|
||||
BUILD_DIR/src/usb*.o(.text*);
|
||||
BUILD_DIR/src/audio*.o(.text*);
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
lib/libs2d_engine.a:*(.text*);
|
||||
BUILD_DIR/src/s2d_engine*.o(.text*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(.text*);
|
||||
*/libnustd.a:*.o(.text*);
|
||||
@@ -188,7 +190,7 @@ SECTIONS
|
||||
BUILD_DIR/src/boot*.o(.*data*);
|
||||
BUILD_DIR/src/audio*.o(.*data*);
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
lib/libs2d_engine.a:*(.*data*);
|
||||
BUILD_DIR/src/s2d_engine*.o(.*data*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(.data*);
|
||||
*/libhvqm2.a:*.o(.data*);
|
||||
@@ -204,7 +206,7 @@ SECTIONS
|
||||
BUILD_DIR/src/usb*.o(.rodata*);
|
||||
BUILD_DIR/src/audio*.o(.rodata*);
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
lib/libs2d_engine.a:*(.rodata*);
|
||||
BUILD_DIR/src/s2d_engine*.o(.rodata*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(.rodata*);
|
||||
*/libgcc.a:*.o(.rodata*);
|
||||
@@ -221,7 +223,7 @@ SECTIONS
|
||||
BUILD_DIR/src/usb*.o(.*bss*);
|
||||
BUILD_DIR/src/audio*.o(.*bss*);
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
lib/libs2d_engine.a:*(.*bss*);
|
||||
BUILD_DIR/src/s2d_engine*.o(.*bss*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(COMMON);
|
||||
*/ULTRALIB.a:*.o(.scommon);
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
3f319ae697533a255a1003d09202379d78d5a2e0 build/sh/sm64.sh.z64
|
||||
@@ -1 +0,0 @@
|
||||
9bef1128717f958171a4afac3ed78ee2bb4e86ce build/us/sm64.us.z64
|
||||
@@ -205,6 +205,54 @@
|
||||
[1, 32700],
|
||||
[32700, 29430],
|
||||
"hang"
|
||||
],
|
||||
"envelope34": [
|
||||
[2, 32700],
|
||||
[1, 32700],
|
||||
[32700, 29430],
|
||||
"hang"
|
||||
],
|
||||
"envelope35": [
|
||||
[2, 32700],
|
||||
[1, 32700],
|
||||
[32700, 29430],
|
||||
"hang"
|
||||
],
|
||||
"envelope36": [
|
||||
[2, 32700],
|
||||
[202, 0],
|
||||
[1, 0],
|
||||
"hang"
|
||||
],
|
||||
"envelope37": [
|
||||
[2, 32700],
|
||||
[1, 32700],
|
||||
[32700, 29430],
|
||||
"hang"
|
||||
],
|
||||
"envelope38": [
|
||||
[2, 32700],
|
||||
[1, 32700],
|
||||
[32700, 29430],
|
||||
"hang"
|
||||
],
|
||||
"envelope39": [
|
||||
[2, 32700],
|
||||
[145, 7597],
|
||||
[343, 0],
|
||||
"hang"
|
||||
],
|
||||
"envelope40": [
|
||||
[2, 32700],
|
||||
[1, 32700],
|
||||
[32700, 29430],
|
||||
"hang"
|
||||
],
|
||||
"envelope41": [
|
||||
[2, 32700],
|
||||
[187, 0],
|
||||
[32700, 0],
|
||||
"hang"
|
||||
]
|
||||
},
|
||||
"instruments": {
|
||||
@@ -263,7 +311,7 @@
|
||||
"sound": "3C_acoustic_guitar",
|
||||
"sound_hi": "3D"
|
||||
},
|
||||
"Jingles": {
|
||||
"Sleigh Bells": {
|
||||
"release_rate": 208,
|
||||
"envelope": "envelope10",
|
||||
"sound": "2F_sleigh_bells"
|
||||
@@ -334,7 +382,7 @@
|
||||
"sound": "46_pizzicato_strings_1",
|
||||
"sound_hi": "47_pizzicato_strings_2"
|
||||
},
|
||||
"Cello": {
|
||||
"Trombone": {
|
||||
"release_rate": 119,
|
||||
"envelope": "envelope18",
|
||||
"sound": "2D_trombone"
|
||||
@@ -422,12 +470,12 @@
|
||||
"sound": "33_kick_drum_2",
|
||||
"sound_hi": {"sample": "32_metal_rimshot", "tuning": 2.828428}
|
||||
},
|
||||
"Music Box": {
|
||||
"Melodic Tom": {
|
||||
"release_rate": 119,
|
||||
"envelope": "envelope28",
|
||||
"sound": "1D"
|
||||
},
|
||||
"Melodic Tom": {
|
||||
"Melodic Tom 2": {
|
||||
"release_rate": 34,
|
||||
"envelope": "envelope0",
|
||||
"sound": "1D"
|
||||
@@ -442,7 +490,7 @@
|
||||
"envelope": "envelope0",
|
||||
"sound": {"sample": "1D", "tuning": 0.793701}
|
||||
},
|
||||
"Organ": {
|
||||
"Accordion 2": {
|
||||
"release_rate": 208,
|
||||
"envelope": "envelope0",
|
||||
"sound": "2E_accordion"
|
||||
@@ -452,7 +500,7 @@
|
||||
"envelope": "envelope1",
|
||||
"sound": "36_sawtooth_synth"
|
||||
},
|
||||
"Saw Wave": {
|
||||
"Square Synth": {
|
||||
"release_rate": 208,
|
||||
"envelope": "envelope2",
|
||||
"sound": "37_square_synth"
|
||||
@@ -462,7 +510,7 @@
|
||||
"envelope": "envelope21",
|
||||
"sound": "29_orchestra_hit"
|
||||
},
|
||||
"Trumpet": {
|
||||
"Brass 2": {
|
||||
"release_rate": 208,
|
||||
"envelope": "envelope1",
|
||||
"sound": "19_brass"
|
||||
@@ -472,37 +520,83 @@
|
||||
"envelope": "envelope30",
|
||||
"sound": "18_timpani"
|
||||
},
|
||||
"Drump Sample 26": {
|
||||
"Drum Sample 26": {
|
||||
"release_rate": 10,
|
||||
"normal_range_lo": 18,
|
||||
"envelope": "envelope31",
|
||||
"sound_lo": "12_snare_drum_1",
|
||||
"sound": "13_snare_drum_2"
|
||||
},
|
||||
"Drump Sample 27": {
|
||||
"Drum Sample 27": {
|
||||
"release_rate": 10,
|
||||
"normal_range_lo": 18,
|
||||
"envelope": "envelope32",
|
||||
"sound_lo": "12_snare_drum_1",
|
||||
"sound": "13_snare_drum_2"
|
||||
},
|
||||
"Xylophone": {
|
||||
"Music Box": {
|
||||
"release_rate": 119,
|
||||
"envelope": "envelope28",
|
||||
"sound": "3A_music_box"
|
||||
},
|
||||
"Church Organ": {
|
||||
"Synth Voice 2": {
|
||||
"release_rate": 19,
|
||||
"normal_range_hi": 50,
|
||||
"envelope": "envelope0",
|
||||
"sound": {"sample": "1B_organ_2", "tuning": 1.0},
|
||||
"sound_hi": "1B_organ_2"
|
||||
},
|
||||
"Bells": {
|
||||
"Sleigh Bells 2": {
|
||||
"release_rate": 208,
|
||||
"envelope": "envelope33",
|
||||
"sound": "2F_sleigh_bells"
|
||||
},
|
||||
"Strings Ensemble": {
|
||||
"release_rate": 24,
|
||||
"normal_range_lo": 42,
|
||||
"envelope": "envelope34",
|
||||
"sound_lo": "14_strings_5",
|
||||
"sound": "15_strings_4"
|
||||
},
|
||||
"Trumpet": {
|
||||
"release_rate": 67,
|
||||
"envelope": "envelope35",
|
||||
"sound": "17_trumpet"
|
||||
},
|
||||
"Harpsichord": {
|
||||
"release_rate": 255,
|
||||
"envelope": "envelope36",
|
||||
"sound": "27_harpsichord"
|
||||
},
|
||||
"Monk Choir": {
|
||||
"release_rate": 10,
|
||||
"envelope": "envelope37",
|
||||
"sound": "3E_monk_choir"
|
||||
},
|
||||
"Low Bell": {
|
||||
"release_rate": 10,
|
||||
"envelope": "envelope38",
|
||||
"sound": "3F"
|
||||
},
|
||||
"High Bell": {
|
||||
"release_rate": 10,
|
||||
"envelope": "envelope39",
|
||||
"sound": "40_bell"
|
||||
},
|
||||
"Harmonica": {
|
||||
"release_rate": 19,
|
||||
"envelope": "envelope40",
|
||||
"sound": "43_harmonica"
|
||||
},
|
||||
"Percussion Loop": {
|
||||
"release_rate": 100,
|
||||
"normal_range_lo": 55,
|
||||
"normal_range_hi": 56,
|
||||
"envelope": "envelope41",
|
||||
"sound_lo": "2A",
|
||||
"sound": "2B",
|
||||
"sound_hi": "2C"
|
||||
},
|
||||
"percussion": [
|
||||
{"release_rate": 10, "pan": 62, "envelope": "envelope11", "sound": {"sample": "06_kick_drum_1", "tuning": 0.210224}},
|
||||
{"release_rate": 10, "pan": 62, "envelope": "envelope11", "sound": {"sample": "06_kick_drum_1", "tuning": 0.2227245}},
|
||||
@@ -580,7 +674,7 @@
|
||||
"Pan Flute",
|
||||
"Strings",
|
||||
"Acoustic Guitar",
|
||||
"Jingles",
|
||||
"Sleigh Bells",
|
||||
"Hi-Hat",
|
||||
"Crash Cymbal",
|
||||
"Triangle&Cabasa",
|
||||
@@ -591,7 +685,7 @@
|
||||
"Acoustic Bass",
|
||||
"Snare Clap",
|
||||
"Pizzicato Strings",
|
||||
"Cello",
|
||||
"Trombone",
|
||||
"Choir Ooh",
|
||||
"Sitar Drone",
|
||||
"Sitar",
|
||||
@@ -607,20 +701,28 @@
|
||||
"Orchestra Hit",
|
||||
"Recorder",
|
||||
"Drum Sample 18",
|
||||
"Music Box",
|
||||
"Melodic Tom",
|
||||
"Melodic Tom 2",
|
||||
"Steel Guitar",
|
||||
"Pah",
|
||||
"Organ",
|
||||
"Accordion 2",
|
||||
"Synth Bass",
|
||||
"Saw Wave",
|
||||
"Square Synth",
|
||||
"Orchestra Hit 2",
|
||||
"Trumpet",
|
||||
"Brass 2",
|
||||
"Timpani",
|
||||
"Drump Sample 26",
|
||||
"Drump Sample 27",
|
||||
"Xylophone",
|
||||
"Church Organ",
|
||||
"Bells"
|
||||
"Drum Sample 26",
|
||||
"Drum Sample 27",
|
||||
"Music Box",
|
||||
"Synth Voice 2",
|
||||
"Sleigh Bells 2",
|
||||
"Strings Ensemble",
|
||||
"Trumpet",
|
||||
"Harpsichord",
|
||||
"Monk Choir",
|
||||
"Low Bell",
|
||||
"High Bell",
|
||||
"Harmonica",
|
||||
"Percussion Loop"
|
||||
]
|
||||
}
|
||||
+88
-158
@@ -43,7 +43,7 @@ struct AudioSessionSettingsEU gAudioSessionPresets[] = {
|
||||
|
||||
#ifdef BETTER_REVERB
|
||||
// Each entry represents an array of variable audio buffer sizes / delays for each respective filter.
|
||||
u32 delaysArr[][NUM_ALLPASS] = {
|
||||
u32 sReverbDelaysArr[][NUM_ALLPASS] = {
|
||||
{ /* 0 */
|
||||
4, 4, 4,
|
||||
4, 4, 4,
|
||||
@@ -65,8 +65,7 @@ u32 delaysArr[][NUM_ALLPASS] = {
|
||||
};
|
||||
|
||||
// Each entry represents an array of multipliers applied to the final output of each group of 3 filters.
|
||||
// These values are u8s in spirit, but are set as s32 values to slightly increase performance during calculations.
|
||||
s32 reverbMultsArr[][NUM_ALLPASS / 3] = {
|
||||
u8 sReverbMultsArr[][NUM_ALLPASS / 3] = {
|
||||
/* 0 */ {0x00, 0x00, 0x00, 0x00},
|
||||
/* 1 */ {0xD7, 0x6F, 0x36, 0x22},
|
||||
/* 2 */ {0xCF, 0x73, 0x38, 0x1F},
|
||||
@@ -75,11 +74,11 @@ s32 reverbMultsArr[][NUM_ALLPASS / 3] = {
|
||||
/**
|
||||
* Format:
|
||||
* - useLightweightSettings (Reduce some runtime configurability options in favor of a slight speed boost during processing; Light configurability settings are found in synthesis.h)
|
||||
* - downsampleRate (Higher values exponentially reduce the number of input samples to process, improving perfomance at cost of quality)
|
||||
* - downsampleRate (Higher values exponentially reduce the number of input samples to process, improving perfomance at cost of quality; number <= 0 signifies use of vanilla reverb)
|
||||
* - isMono (Only process reverb on the left channel and share it with the right channel, improving performance at cost of quality)
|
||||
* - filterCount (Number of filters to process data with; in general, more filters means higher quality at the cost of performance demand; always 3 with light settings)
|
||||
*
|
||||
* - windowSize (Size of circular reverb buffer; higher values work better for a more open soundscape, lower is better for a more compact sound)
|
||||
* - windowSize (Size of circular reverb buffer; higher values work better for a more open soundscape, lower is better for a more compact sound; value of 0 disables all reverb)
|
||||
* - gain (Amount of audio retransmitted into the circular reverb buffer, emulating decay; higher values represent a lengthier decay period)
|
||||
* - gainIndex (Advanced parameter; used to tune the outputs of every first two of three filters; overridden when using light settings)
|
||||
* - reverbIndex (Advanced parameter; used to tune the incoming output of every third filter; overridden when using light settings)
|
||||
@@ -94,55 +93,98 @@ s32 reverbMultsArr[][NUM_ALLPASS / 3] = {
|
||||
*/
|
||||
struct BetterReverbSettings gBetterReverbSettings[] = {
|
||||
{ /* Preset 0 - Vanilla Reverb [Default Preset] */
|
||||
.useLightweightSettings = FALSE, // Ignored with vanilla reverb
|
||||
.downsampleRate = -1, // Signifies use of vanilla reverb
|
||||
.isMono = FALSE, // Ignored with vanilla reverb
|
||||
.filterCount = NUM_ALLPASS, // Ignored with vanilla reverb
|
||||
.useLightweightSettings = FALSE, // Ignored with vanilla reverb
|
||||
.downsampleRate = -1, // Signifies use of vanilla reverb
|
||||
.isMono = FALSE, // Ignored with vanilla reverb
|
||||
.filterCount = NUM_ALLPASS, // Ignored with vanilla reverb
|
||||
|
||||
.windowSize = -1, // Use vanilla preset window size
|
||||
.gain = -1, // Use vanilla preset gain value
|
||||
.gainIndex = 0x00, // Ignored with vanilla reverb
|
||||
.reverbIndex = 0x00, // Ignored with vanilla reverb
|
||||
.windowSize = -1, // Use vanilla preset window size
|
||||
.gain = -1, // Use vanilla preset gain value
|
||||
.gainIndex = 0x00, // Ignored with vanilla reverb
|
||||
.reverbIndex = 0x00, // Ignored with vanilla reverb
|
||||
|
||||
.delaysL = delaysArr[0], // Ignored with vanilla reverb
|
||||
.delaysR = delaysArr[0], // Ignored with vanilla reverb
|
||||
.reverbMultsL = reverbMultsArr[0], // Ignored with vanilla reverb
|
||||
.reverbMultsR = reverbMultsArr[0], // Ignored with vanilla reverb
|
||||
.delaysL = sReverbDelaysArr[0], // Ignored with vanilla reverb
|
||||
.delaysR = sReverbDelaysArr[0], // Ignored with vanilla reverb
|
||||
.reverbMultsL = sReverbMultsArr[0], // Ignored with vanilla reverb
|
||||
.reverbMultsR = sReverbMultsArr[0], // Ignored with vanilla reverb
|
||||
},
|
||||
{ /* Preset 1 - Sample Console Configuration */
|
||||
.useLightweightSettings = TRUE,
|
||||
.downsampleRate = 2,
|
||||
.isMono = FALSE,
|
||||
.filterCount = (NUM_ALLPASS - 9), // Ignored with lightweight settings
|
||||
.filterCount = (NUM_ALLPASS - 9), // Ignored with lightweight settings
|
||||
|
||||
.windowSize = 0x0E00,
|
||||
.gain = 0x43FF,
|
||||
.gainIndex = 0xA0, // Ignored with lightweight settings
|
||||
.reverbIndex = 0x30, // Ignored with lightweight settings
|
||||
.gain = 0x2FFF,
|
||||
.gainIndex = 0xA0, // Ignored with lightweight settings
|
||||
.reverbIndex = 0x30, // Ignored with lightweight settings
|
||||
|
||||
.delaysL = delaysArr[1],
|
||||
.delaysR = delaysArr[2],
|
||||
.reverbMultsL = reverbMultsArr[1], // Ignored with lightweight settings
|
||||
.reverbMultsR = reverbMultsArr[2], // Ignored with lightweight settings
|
||||
.delaysL = sReverbDelaysArr[1],
|
||||
.delaysR = sReverbDelaysArr[2],
|
||||
.reverbMultsL = sReverbMultsArr[1], // Ignored with lightweight settings
|
||||
.reverbMultsR = sReverbMultsArr[2], // Ignored with lightweight settings
|
||||
},
|
||||
{ /* Preset 2 - Sample Emulator Configuration (RCVI Hack Only) */
|
||||
{ /* Preset 2 - Sample Emulator Configuration (RCVI Hack or Emulator CPU Overclocking Required!) */
|
||||
.useLightweightSettings = FALSE,
|
||||
.downsampleRate = 1,
|
||||
.isMono = FALSE,
|
||||
.filterCount = NUM_ALLPASS,
|
||||
|
||||
.windowSize = 0x0E00,
|
||||
.gain = 0x28FF,
|
||||
.gain = 0x2AFF,
|
||||
.gainIndex = 0xA0,
|
||||
.reverbIndex = 0x60,
|
||||
.reverbIndex = 0x40,
|
||||
|
||||
.delaysL = delaysArr[1],
|
||||
.delaysR = delaysArr[2],
|
||||
.reverbMultsL = reverbMultsArr[1],
|
||||
.reverbMultsR = reverbMultsArr[2],
|
||||
.delaysL = sReverbDelaysArr[1],
|
||||
.delaysR = sReverbDelaysArr[2],
|
||||
.reverbMultsL = sReverbMultsArr[1],
|
||||
.reverbMultsR = sReverbMultsArr[2],
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
// Used for A/B comparisons and preset configuration debugging alongside Puppyprint Debug
|
||||
struct BetterReverbSettings gDebugBetterReverbSettings[2] = {
|
||||
{ /* Preset A */
|
||||
.useLightweightSettings = FALSE,
|
||||
.downsampleRate = 2,
|
||||
.isMono = FALSE,
|
||||
.filterCount = (NUM_ALLPASS - 9),
|
||||
|
||||
.windowSize = 0x0E00,
|
||||
.gain = 0x2FFF,
|
||||
.gainIndex = 0xA0,
|
||||
.reverbIndex = 0x30,
|
||||
|
||||
.delaysL = sReverbDelaysArr[1],
|
||||
.delaysR = sReverbDelaysArr[2],
|
||||
.reverbMultsL = sReverbMultsArr[1],
|
||||
.reverbMultsR = sReverbMultsArr[2],
|
||||
},
|
||||
{ /* Preset B */
|
||||
.useLightweightSettings = FALSE,
|
||||
.downsampleRate = 2,
|
||||
.isMono = FALSE,
|
||||
.filterCount = (NUM_ALLPASS - 9),
|
||||
|
||||
.windowSize = 0x0E00,
|
||||
.gain = 0x2FFF,
|
||||
.gainIndex = 0xA0,
|
||||
.reverbIndex = 0x30,
|
||||
|
||||
.delaysL = sReverbDelaysArr[1],
|
||||
.delaysR = sReverbDelaysArr[2],
|
||||
.reverbMultsL = sReverbMultsArr[1],
|
||||
.reverbMultsR = sReverbMultsArr[2],
|
||||
},
|
||||
};
|
||||
#endif // PUPPYPRINT_DEBUG
|
||||
|
||||
STATIC_ASSERT(ARRAY_COUNT(gBetterReverbSettings) > 0, "gBetterReverbSettings must contain presets!");
|
||||
STATIC_ASSERT(ARRAY_COUNT(sReverbDelaysArr) > 0, "sReverbDelaysArr must not be empty!");
|
||||
STATIC_ASSERT(ARRAY_COUNT(sReverbMultsArr) > 0, "sReverbMultsArr must not be empty!");
|
||||
|
||||
#endif // BETTER_REVERB
|
||||
|
||||
// Format:
|
||||
// - frequency
|
||||
@@ -613,8 +655,10 @@ u16 gHeadsetPanQuantization[0x10] = {
|
||||
0x40, 0x40, 0x30, 0x30, 0x20, 0x20, 0x10, 0, 0, 0,
|
||||
};
|
||||
#elif !defined(VERSION_SH)
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
u16 gHeadsetPanQuantization[10] = { 0x40, 0x30, 0x20, 0x10, 0, 0, 0, 0, 0, 0 };
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
s16 euUnknownData_80301950[64] = {
|
||||
@@ -623,6 +667,7 @@ s16 euUnknownData_80301950[64] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
// Linearly interpolated between
|
||||
// f(0/2 * 127) = 1
|
||||
// f(1/2 * 127) = 1/sqrt(2)
|
||||
@@ -668,6 +713,7 @@ f32 gStereoPanVolume[128] = {
|
||||
0.242161f, 0.253295f, 0.264429f, 0.275563f, 0.286697f, 0.297831f, 0.308965f, 0.320098f, 0.331232f,
|
||||
0.342366f, 0.3535f
|
||||
};
|
||||
#endif
|
||||
|
||||
// gDefaultVolume[k] = cos(pi/2 * k / 127)
|
||||
f32 gDefaultPanVolume[128] = {
|
||||
@@ -689,131 +735,7 @@ f32 gDefaultPanVolume[128] = {
|
||||
};
|
||||
|
||||
#if defined(VERSION_JP) || defined(VERSION_US)
|
||||
// gVolRampingLhs136[k] = 2^16 * max(1, (256*k)^(1/17)
|
||||
f32 gVolRampingLhs136[128] = {
|
||||
65536.0f, 90811.555f, 94590.766f, 96873.96f, 98527.26f, 99829.06f, 100905.47f,
|
||||
101824.61f, 102627.57f, 103341.086f, 103983.55f, 104568.164f, 105104.75f, 105600.8f,
|
||||
106062.14f, 106493.46f, 106898.52f, 107280.414f, 107641.73f, 107984.62f, 108310.93f,
|
||||
108622.23f, 108919.875f, 109205.055f, 109478.8f, 109742.0f, 109995.48f, 110239.94f,
|
||||
110476.02f, 110704.305f, 110925.3f, 111139.45f, 111347.21f, 111548.945f, 111745.0f,
|
||||
111935.7f, 112121.35f, 112302.2f, 112478.51f, 112650.51f, 112818.4f, 112982.38f,
|
||||
113142.66f, 113299.37f, 113452.69f, 113602.766f, 113749.734f, 113893.73f, 114034.87f,
|
||||
114173.26f, 114309.02f, 114442.26f, 114573.055f, 114701.5f, 114827.69f, 114951.695f,
|
||||
115073.6f, 115193.47f, 115311.375f, 115427.39f, 115541.56f, 115653.96f, 115764.63f,
|
||||
115873.64f, 115981.04f, 116086.86f, 116191.164f, 116293.99f, 116395.38f, 116495.38f,
|
||||
116594.02f, 116691.34f, 116787.39f, 116882.19f, 116975.77f, 117068.17f, 117159.414f,
|
||||
117249.54f, 117338.57f, 117426.53f, 117513.45f, 117599.35f, 117684.266f, 117768.2f,
|
||||
117851.195f, 117933.266f, 118014.44f, 118094.72f, 118174.14f, 118252.71f, 118330.46f,
|
||||
118407.4f, 118483.55f, 118558.914f, 118633.53f, 118707.4f, 118780.54f, 118852.97f,
|
||||
118924.695f, 118995.74f, 119066.11f, 119135.82f, 119204.88f, 119273.31f, 119341.125f,
|
||||
119408.32f, 119474.92f, 119540.93f, 119606.36f, 119671.22f, 119735.52f, 119799.28f,
|
||||
119862.5f, 119925.195f, 119987.36f, 120049.02f, 120110.18f, 120170.84f, 120231.016f,
|
||||
120290.71f, 120349.945f, 120408.7f, 120467.016f, 120524.875f, 120582.3f, 120639.28f,
|
||||
120695.84f, 120751.984f
|
||||
};
|
||||
|
||||
// gVolRampingRhs136[k] = 1 / max(1, (256*k)^(1/17))
|
||||
f32 gVolRampingRhs136[128] = {
|
||||
1.0f, 0.72167f, 0.692837f, 0.676508f, 0.665156f, 0.656482f, 0.649479f, 0.643616f, 0.638581f,
|
||||
0.634172f, 0.630254f, 0.62673f, 0.62353f, 0.620601f, 0.617902f, 0.615399f, 0.613067f, 0.610885f,
|
||||
0.608835f, 0.606901f, 0.605073f, 0.603339f, 0.60169f, 0.600119f, 0.598618f, 0.597183f, 0.595806f,
|
||||
0.594485f, 0.593215f, 0.591991f, 0.590812f, 0.589674f, 0.588573f, 0.587509f, 0.586478f, 0.585479f,
|
||||
0.58451f, 0.583568f, 0.582654f, 0.581764f, 0.580898f, 0.580055f, 0.579233f, 0.578432f, 0.57765f,
|
||||
0.576887f, 0.576142f, 0.575414f, 0.574701f, 0.574005f, 0.573323f, 0.572656f, 0.572002f, 0.571361f,
|
||||
0.570733f, 0.570118f, 0.569514f, 0.568921f, 0.568339f, 0.567768f, 0.567207f, 0.566656f, 0.566114f,
|
||||
0.565582f, 0.565058f, 0.564543f, 0.564036f, 0.563537f, 0.563046f, 0.562563f, 0.562087f, 0.561618f,
|
||||
0.561156f, 0.560701f, 0.560253f, 0.559811f, 0.559375f, 0.558945f, 0.558521f, 0.558102f, 0.557689f,
|
||||
0.557282f, 0.55688f, 0.556483f, 0.556091f, 0.555704f, 0.555322f, 0.554944f, 0.554571f, 0.554203f,
|
||||
0.553839f, 0.553479f, 0.553123f, 0.552772f, 0.552424f, 0.55208f, 0.55174f, 0.551404f, 0.551071f,
|
||||
0.550742f, 0.550417f, 0.550095f, 0.549776f, 0.549461f, 0.549148f, 0.548839f, 0.548534f, 0.548231f,
|
||||
0.547931f, 0.547634f, 0.54734f, 0.547048f, 0.54676f, 0.546474f, 0.546191f, 0.54591f, 0.545632f,
|
||||
0.545357f, 0.545084f, 0.544813f, 0.544545f, 0.54428f, 0.544016f, 0.543755f, 0.543496f, 0.543239f,
|
||||
0.542985f, 0.542732f
|
||||
};
|
||||
|
||||
// gVolRampingLhs144[k] = 2^16 * max(1, (256*k)^(1/18))
|
||||
f32 gVolRampingLhs144[128] = {
|
||||
65536.0f, 89180.734f, 92681.9f, 94793.33f, 96320.52f, 97522.02f, 98514.84f,
|
||||
99362.14f, 100101.99f, 100759.16f, 101350.664f, 101888.74f, 102382.46f, 102838.75f,
|
||||
103263.016f, 103659.58f, 104031.914f, 104382.89f, 104714.88f, 105029.89f, 105329.61f,
|
||||
105615.5f, 105888.81f, 106150.63f, 106401.914f, 106643.49f, 106876.12f, 107100.44f,
|
||||
107317.05f, 107526.47f, 107729.17f, 107925.6f, 108116.125f, 108301.12f, 108480.88f,
|
||||
108655.72f, 108825.91f, 108991.68f, 109153.28f, 109310.914f, 109464.77f, 109615.04f,
|
||||
109761.88f, 109905.46f, 110045.92f, 110183.41f, 110318.02f, 110449.91f, 110579.17f,
|
||||
110705.914f, 110830.234f, 110952.234f, 111071.99f, 111189.59f, 111305.12f, 111418.64f,
|
||||
111530.23f, 111639.95f, 111747.875f, 111854.05f, 111958.54f, 112061.4f, 112162.67f,
|
||||
112262.42f, 112360.68f, 112457.51f, 112552.93f, 112647.0f, 112739.76f, 112831.23f,
|
||||
112921.46f, 113010.484f, 113098.33f, 113185.02f, 113270.61f, 113355.11f, 113438.555f,
|
||||
113520.97f, 113602.375f, 113682.805f, 113762.27f, 113840.81f, 113918.44f, 113995.18f,
|
||||
114071.055f, 114146.08f, 114220.266f, 114293.65f, 114366.24f, 114438.06f, 114509.12f,
|
||||
114579.44f, 114649.02f, 114717.91f, 114786.086f, 114853.586f, 114920.42f, 114986.6f,
|
||||
115052.14f, 115117.055f, 115181.34f, 115245.04f, 115308.13f, 115370.65f, 115432.59f,
|
||||
115493.98f, 115554.81f, 115615.11f, 115674.875f, 115734.12f, 115792.85f, 115851.08f,
|
||||
115908.82f, 115966.07f, 116022.85f, 116079.16f, 116135.01f, 116190.4f, 116245.35f,
|
||||
116299.87f, 116353.945f, 116407.6f, 116460.84f, 116513.67f, 116566.09f, 116618.125f,
|
||||
116669.76f, 116721.01f
|
||||
};
|
||||
|
||||
// gVolRampingRhs144[k] = 1 / max(1, (256*k)^(1/18))
|
||||
f32 gVolRampingRhs144[128] = {
|
||||
1.0f, 0.734867f, 0.707107f, 0.691357f, 0.680395f, 0.672012f, 0.66524f, 0.659567f, 0.654692f,
|
||||
0.650422f, 0.646626f, 0.643211f, 0.64011f, 0.637269f, 0.634651f, 0.632223f, 0.629961f, 0.627842f,
|
||||
0.625852f, 0.623975f, 0.622199f, 0.620515f, 0.618913f, 0.617387f, 0.615929f, 0.614533f, 0.613196f,
|
||||
0.611912f, 0.610677f, 0.609487f, 0.60834f, 0.607233f, 0.606163f, 0.605128f, 0.604125f, 0.603153f,
|
||||
0.60221f, 0.601294f, 0.600403f, 0.599538f, 0.598695f, 0.597874f, 0.597074f, 0.596294f, 0.595533f,
|
||||
0.59479f, 0.594064f, 0.593355f, 0.592661f, 0.591983f, 0.591319f, 0.590669f, 0.590032f, 0.589408f,
|
||||
0.588796f, 0.588196f, 0.587608f, 0.58703f, 0.586463f, 0.585906f, 0.58536f, 0.584822f, 0.584294f,
|
||||
0.583775f, 0.583265f, 0.582762f, 0.582268f, 0.581782f, 0.581303f, 0.580832f, 0.580368f, 0.579911f,
|
||||
0.57946f, 0.579017f, 0.578579f, 0.578148f, 0.577722f, 0.577303f, 0.576889f, 0.576481f, 0.576078f,
|
||||
0.575681f, 0.575289f, 0.574902f, 0.574519f, 0.574142f, 0.573769f, 0.5734f, 0.573036f, 0.572677f,
|
||||
0.572321f, 0.57197f, 0.571623f, 0.57128f, 0.57094f, 0.570605f, 0.570273f, 0.569945f, 0.56962f,
|
||||
0.569299f, 0.568981f, 0.568667f, 0.568355f, 0.568047f, 0.567743f, 0.567441f, 0.567142f, 0.566846f,
|
||||
0.566553f, 0.566263f, 0.565976f, 0.565692f, 0.56541f, 0.565131f, 0.564854f, 0.56458f, 0.564309f,
|
||||
0.56404f, 0.563773f, 0.563509f, 0.563247f, 0.562987f, 0.56273f, 0.562475f, 0.562222f, 0.561971f,
|
||||
0.561722f, 0.561476f
|
||||
};
|
||||
|
||||
// gVolRampingLhs128[k] = 2^16 * max(1, (256*k)^(1/16))
|
||||
f32 gVolRampingLhs128[128] = {
|
||||
65536.0f, 92681.9f, 96785.28f, 99269.31f, 101070.33f, 102489.78f, 103664.336f,
|
||||
104667.914f, 105545.09f, 106324.92f, 107027.39f, 107666.84f, 108253.95f, 108796.87f,
|
||||
109301.95f, 109774.29f, 110217.98f, 110636.39f, 111032.33f, 111408.164f, 111765.9f,
|
||||
112107.234f, 112433.66f, 112746.46f, 113046.766f, 113335.555f, 113613.72f, 113882.02f,
|
||||
114141.164f, 114391.77f, 114634.414f, 114869.58f, 115097.74f, 115319.31f, 115534.68f,
|
||||
115744.19f, 115948.16f, 116146.875f, 116340.625f, 116529.66f, 116714.195f, 116894.46f,
|
||||
117070.64f, 117242.945f, 117411.52f, 117576.55f, 117738.17f, 117896.54f, 118051.77f,
|
||||
118204.0f, 118353.35f, 118499.92f, 118643.83f, 118785.16f, 118924.01f, 119060.47f,
|
||||
119194.625f, 119326.555f, 119456.336f, 119584.03f, 119709.71f, 119833.445f, 119955.29f,
|
||||
120075.31f, 120193.555f, 120310.08f, 120424.94f, 120538.17f, 120649.836f, 120759.97f,
|
||||
120868.62f, 120975.82f, 121081.62f, 121186.05f, 121289.14f, 121390.94f, 121491.47f,
|
||||
121590.766f, 121688.87f, 121785.79f, 121881.57f, 121976.24f, 122069.82f, 122162.33f,
|
||||
122253.805f, 122344.266f, 122433.73f, 122522.23f, 122609.77f, 122696.4f, 122782.11f,
|
||||
122866.93f, 122950.89f, 123033.99f, 123116.26f, 123197.72f, 123278.37f, 123358.24f,
|
||||
123437.34f, 123515.69f, 123593.3f, 123670.19f, 123746.36f, 123821.84f, 123896.63f,
|
||||
123970.76f, 124044.23f, 124117.04f, 124189.23f, 124260.78f, 124331.73f, 124402.07f,
|
||||
124471.83f, 124540.99f, 124609.59f, 124677.63f, 124745.12f, 124812.055f, 124878.47f,
|
||||
124944.34f, 125009.71f, 125074.57f, 125138.92f, 125202.79f, 125266.164f, 125329.06f,
|
||||
125391.5f, 125453.47f
|
||||
};
|
||||
|
||||
// gVolRampingRhs128[k] = 1 / max(1, (256*k)^(1/16))
|
||||
f32 gVolRampingRhs128[128] = {
|
||||
1.0f, 0.707107f, 0.677128f, 0.660184f, 0.64842f, 0.639439f, 0.632194f, 0.626133f, 0.620929f,
|
||||
0.616375f, 0.612329f, 0.608693f, 0.605391f, 0.60237f, 0.599587f, 0.597007f, 0.594604f, 0.592355f,
|
||||
0.590243f, 0.588251f, 0.586369f, 0.584583f, 0.582886f, 0.581269f, 0.579725f, 0.578247f, 0.576832f,
|
||||
0.575473f, 0.574166f, 0.572908f, 0.571696f, 0.570525f, 0.569394f, 0.5683f, 0.567241f, 0.566214f,
|
||||
0.565218f, 0.564251f, 0.563311f, 0.562398f, 0.561508f, 0.560642f, 0.559799f, 0.558976f, 0.558173f,
|
||||
0.55739f, 0.556625f, 0.555877f, 0.555146f, 0.554431f, 0.553732f, 0.553047f, 0.552376f, 0.551719f,
|
||||
0.551075f, 0.550443f, 0.549823f, 0.549216f, 0.548619f, 0.548033f, 0.547458f, 0.546892f, 0.546337f,
|
||||
0.545791f, 0.545254f, 0.544726f, 0.544206f, 0.543695f, 0.543192f, 0.542696f, 0.542209f, 0.541728f,
|
||||
0.541255f, 0.540788f, 0.540329f, 0.539876f, 0.539429f, 0.538988f, 0.538554f, 0.538125f, 0.537702f,
|
||||
0.537285f, 0.536873f, 0.536467f, 0.536065f, 0.535669f, 0.535277f, 0.534891f, 0.534509f, 0.534131f,
|
||||
0.533759f, 0.53339f, 0.533026f, 0.532666f, 0.53231f, 0.531958f, 0.53161f, 0.531266f, 0.530925f,
|
||||
0.530588f, 0.530255f, 0.529926f, 0.529599f, 0.529277f, 0.528957f, 0.528641f, 0.528328f, 0.528018f,
|
||||
0.527711f, 0.527407f, 0.527106f, 0.526808f, 0.526513f, 0.52622f, 0.525931f, 0.525644f, 0.525359f,
|
||||
0.525077f, 0.524798f, 0.524522f, 0.524247f, 0.523975f, 0.523706f, 0.523439f, 0.523174f, 0.522911f,
|
||||
0.522651f, 0.522393f
|
||||
};
|
||||
#include "volramping.c.in"
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_SH
|
||||
@@ -1034,6 +956,14 @@ s16 gAiBufferLengths[NUMAIBUFFERS];
|
||||
|
||||
u32 gAudioRandom;
|
||||
|
||||
#ifdef BETTER_REVERB
|
||||
u8 gBetterReverbPresetCount = ARRAY_COUNT(gBetterReverbSettings);
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
u8 gReverbDelaysArrCount = ARRAY_COUNT(sReverbDelaysArr);
|
||||
u8 gReverbMultsArrCount = ARRAY_COUNT(sReverbMultsArr);
|
||||
#endif // PUPPYPRINT_DEBUG
|
||||
#endif // BETTER_REVERB
|
||||
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
s32 gAudioErrorFlags;
|
||||
#endif
|
||||
|
||||
+25
-7
@@ -22,6 +22,10 @@
|
||||
#endif
|
||||
|
||||
#ifdef EXPAND_AUDIO_HEAP
|
||||
// Vanilla US/JP uses 7; Vanilla EU opts for 10 here effectively, though that one gets generated at runtime and doesn't use this value.
|
||||
// Total memory usage is calculated by 24*(2^VOL_RAMPING_EXPONENT) bytes. This is not technically on the heap, but it's memory nonetheless.
|
||||
#define VOL_RAMPING_EXPONENT 9
|
||||
|
||||
#define PERSISTENT_SEQ_MEM 0x8200
|
||||
#define PERSISTENT_BANK_MEM 0xDC00
|
||||
#define TEMPORARY_SEQ_MEM 0xE800
|
||||
@@ -29,6 +33,8 @@
|
||||
#define MAX_NUM_SOUNDBANKS 0x100
|
||||
#define EXT_AUDIO_INIT_POOL_SIZE 0x2000
|
||||
#else
|
||||
#define VOL_RAMPING_EXPONENT 7
|
||||
|
||||
#define PERSISTENT_SEQ_MEM 0x4100
|
||||
#define PERSISTENT_BANK_MEM 0x6E00
|
||||
#define TEMPORARY_SEQ_MEM 0x7400
|
||||
@@ -48,8 +54,16 @@ extern struct AudioSessionSettings gAudioSessionSettings;
|
||||
extern struct ReverbSettingsUS gReverbSettings[18];
|
||||
#endif
|
||||
#ifdef BETTER_REVERB
|
||||
extern u8 gBetterReverbPresetCount;
|
||||
extern struct BetterReverbSettings gBetterReverbSettings[];
|
||||
#endif
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
extern struct BetterReverbSettings gDebugBetterReverbSettings[2];
|
||||
extern u32 sReverbDelaysArr[][NUM_ALLPASS];
|
||||
extern u8 sReverbMultsArr[][NUM_ALLPASS / 3];
|
||||
extern u8 gReverbDelaysArrCount;
|
||||
extern u8 gReverbMultsArrCount;
|
||||
#endif // PUPPYPRINT_DEBUG
|
||||
#endif // BETTER_REVERB
|
||||
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
extern f32 gPitchBendFrequencyScale[256];
|
||||
@@ -81,18 +95,22 @@ extern s16 euUnknownData_80301950[64];
|
||||
extern struct NoteSubEu gZeroNoteSub;
|
||||
extern struct NoteSubEu gDefaultNoteSub;
|
||||
#else
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
extern u16 gHeadsetPanQuantization[10];
|
||||
#endif
|
||||
#endif
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
extern f32 gHeadsetPanVolume[128];
|
||||
extern f32 gStereoPanVolume[128];
|
||||
#endif
|
||||
extern f32 gDefaultPanVolume[128];
|
||||
|
||||
extern f32 gVolRampingLhs136[128];
|
||||
extern f32 gVolRampingRhs136[128];
|
||||
extern f32 gVolRampingLhs144[128];
|
||||
extern f32 gVolRampingRhs144[128];
|
||||
extern f32 gVolRampingLhs128[128];
|
||||
extern f32 gVolRampingRhs128[128];
|
||||
extern f32 gVolRampingLhs136[1 << VOL_RAMPING_EXPONENT];
|
||||
extern f32 gVolRampingRhs136[1 << VOL_RAMPING_EXPONENT];
|
||||
extern f32 gVolRampingLhs144[1 << VOL_RAMPING_EXPONENT];
|
||||
extern f32 gVolRampingRhs144[1 << VOL_RAMPING_EXPONENT];
|
||||
extern f32 gVolRampingLhs128[1 << VOL_RAMPING_EXPONENT];
|
||||
extern f32 gVolRampingRhs128[1 << VOL_RAMPING_EXPONENT];
|
||||
|
||||
// non-constant .data
|
||||
extern s16 gTatumsPerBeat;
|
||||
|
||||
+13
-2
@@ -353,7 +353,9 @@ void adsr_init(struct AdsrState *adsr, struct AdsrEnvelope *envelope, UNUSED s16
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
f32 adsr_update(struct AdsrState *adsr) {
|
||||
#else
|
||||
s32 adsr_update(struct AdsrState *adsr) {
|
||||
s32 adsr_update(struct Note *note) {
|
||||
struct AdsrState *adsr = ¬e->adsr;
|
||||
u8 isInit = FALSE;
|
||||
#endif
|
||||
u8 action = adsr->action;
|
||||
u8 state = adsr->state;
|
||||
@@ -362,6 +364,10 @@ s32 adsr_update(struct AdsrState *adsr) {
|
||||
return 0;
|
||||
|
||||
case ADSR_STATE_INITIAL:
|
||||
isInit = TRUE;
|
||||
// fallthrough
|
||||
|
||||
case ADSR_STATE_RESTART:
|
||||
#if defined(VERSION_JP) || defined(VERSION_US)
|
||||
adsr->current = adsr->initial;
|
||||
adsr->target = adsr->initial;
|
||||
@@ -401,7 +407,7 @@ s32 adsr_update(struct AdsrState *adsr) {
|
||||
break;
|
||||
#endif
|
||||
case ADSR_RESTART:
|
||||
adsr->state = ADSR_STATE_INITIAL;
|
||||
adsr->state = ADSR_STATE_RESTART;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -422,6 +428,11 @@ s32 adsr_update(struct AdsrState *adsr) {
|
||||
adsr->target = adsr->target * adsr->target;
|
||||
adsr->velocity = (adsr->target - adsr->current) / adsr->delay;
|
||||
#else // !(VERSION_EU || VERSION_SH)
|
||||
if (adsr->delay <= 0) {
|
||||
adsr->delay = 1;
|
||||
note->initFullVelocity = isInit;
|
||||
}
|
||||
|
||||
adsr->target = BSWAP16(adsr->envelope[adsr->envIndex].arg);
|
||||
adsr->velocity = ((adsr->target - adsr->current) << 0x10) / adsr->delay;
|
||||
#endif // !(VERSION_EU || VERSION_SH)
|
||||
|
||||
+4
-3
@@ -15,7 +15,8 @@ enum ADSRStates {
|
||||
ADSR_STATE_HANG,
|
||||
ADSR_STATE_DECAY,
|
||||
ADSR_STATE_RELEASE,
|
||||
ADSR_STATE_SUSTAIN
|
||||
ADSR_STATE_SUSTAIN,
|
||||
ADSR_STATE_RESTART
|
||||
};
|
||||
|
||||
enum ADSRActions {
|
||||
@@ -25,10 +26,10 @@ enum ADSRActions {
|
||||
};
|
||||
|
||||
enum ADSRDelays {
|
||||
ADSR_DISABLE = 0,
|
||||
ADSR_HANG = -1,
|
||||
ADSR_GOTO = -2,
|
||||
ADSR_RESTART = -3,
|
||||
ADSR_DISABLE = -4,
|
||||
};
|
||||
|
||||
enum VibratoModes {
|
||||
@@ -52,7 +53,7 @@ void adsr_init(struct AdsrState *adsr, struct AdsrEnvelope *envelope, s16 *volOu
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
f32 adsr_update(struct AdsrState *adsr);
|
||||
#else
|
||||
s32 adsr_update(struct AdsrState *adsr);
|
||||
s32 adsr_update(struct Note *note);
|
||||
#endif
|
||||
|
||||
#endif // AUDIO_EFFECTS_H
|
||||
+19
-12
@@ -232,7 +232,7 @@ struct MusicDynamic sMusicDynamics[8] = {
|
||||
#define STUB_LEVEL(_0, _1, _2, _3, echo1, echo2, echo3, _7, _8) { echo1, echo2, echo3 },
|
||||
#define DEFINE_LEVEL(_0, _1, _2, _3, _4, _5, echo1, echo2, echo3, _9, _10) { echo1, echo2, echo3 },
|
||||
|
||||
u8 sLevelAreaReverbs[LEVEL_COUNT][3] = {
|
||||
s8 sLevelAreaReverbs[LEVEL_COUNT][3] = {
|
||||
{ 0x00, 0x00, 0x00 }, // LEVEL_NONE
|
||||
#include "levels/level_defines.h"
|
||||
};
|
||||
@@ -1138,7 +1138,8 @@ static f32 get_sound_freq_scale(u8 bank, u8 item) {
|
||||
static u32 get_sound_reverb(UNUSED u8 bank, UNUSED u8 soundIndex, u8 channelIndex) {
|
||||
u8 area;
|
||||
u8 level;
|
||||
u8 reverb;
|
||||
s8 areaEcho;
|
||||
s16 reverb;
|
||||
|
||||
// Disable level reverb if NO_ECHO is set
|
||||
if (sSoundBanks[bank][soundIndex].soundBits & SOUND_NO_ECHO) {
|
||||
@@ -1152,18 +1153,27 @@ static u32 get_sound_reverb(UNUSED u8 bank, UNUSED u8 soundIndex, u8 channelInde
|
||||
}
|
||||
}
|
||||
|
||||
// reverb = reverb adjustment + level reverb + a volume-dependent value
|
||||
areaEcho = sLevelAreaReverbs[level][area];
|
||||
|
||||
if (gAreaData[gCurrAreaIndex].useEchoOverride && !(sSoundBanks[bank][soundIndex].soundBits & SOUND_NO_ECHO)) {
|
||||
areaEcho = gAreaData[gCurrAreaIndex].echoOverride;
|
||||
}
|
||||
|
||||
// reverb = reverb adjustment + level reverb (or level script override value) + a volume-dependent value
|
||||
// The volume-dependent value is 0 when volume is at maximum, and raises to
|
||||
// LOW_VOLUME_REVERB when the volume is 0
|
||||
reverb = (u8)(u8) gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->soundScriptIO[5]
|
||||
+ sLevelAreaReverbs[level][area]
|
||||
+ ((1.0f - gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume)
|
||||
* LOW_VOLUME_REVERB);
|
||||
reverb = (s16) ((u8) gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->soundScriptIO[5]) + areaEcho;
|
||||
|
||||
if (reverb > 0x7f) {
|
||||
// NOTE: In some cases, it may be better to apply this after ensuring reverb is non-negative so the result doesn't end up sounding way too dry.
|
||||
// This has been left as-is however because in most cases where negative reverb is even used, this is probably desirable anyway.
|
||||
reverb += (s16) ((1.0f - gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume) * LOW_VOLUME_REVERB);
|
||||
|
||||
if (reverb < 0 || areaEcho <= -0x80) {
|
||||
reverb = 0;
|
||||
} else if (reverb > 0x7f) {
|
||||
reverb = 0x7f;
|
||||
}
|
||||
return reverb;
|
||||
return (u8) reverb;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1985,7 +1995,6 @@ void sound_init(void) {
|
||||
sLowerBackgroundMusicVolume = FALSE;
|
||||
sSoundBanksThatLowerBackgroundMusic = 0;
|
||||
sCurrentBackgroundMusicSeqId = 0xff;
|
||||
gSoundMode = SOUND_MODE_STEREO;
|
||||
sBackgroundMusicQueueSize = 0;
|
||||
sBackgroundMusicMaxTargetVolume = TARGET_VOLUME_UNSET;
|
||||
D_80332120 = 0;
|
||||
@@ -2187,9 +2196,7 @@ void play_music(u8 player, u16 seqArgs, u16 fadeTimer) {
|
||||
|
||||
// Abort if the queue is already full.
|
||||
if (sBackgroundMusicQueueSize >= MAX_BACKGROUND_MUSIC_QUEUE_SIZE) {
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
append_puppyprint_log("Sequence queue full, aborting.");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "level_table.h"
|
||||
|
||||
// Sequence arguments, passed to seq_player_play_sequence. seqId may be bit-OR'ed with
|
||||
// SEQ_VARIATION; this will load the same sequence, but set a variation
|
||||
@@ -34,6 +35,8 @@ extern f32 gGlobalSoundSource[3];
|
||||
// defined in data.c, used by the game
|
||||
extern u32 gAudioRandom;
|
||||
|
||||
extern s8 sLevelAreaReverbs[LEVEL_COUNT][3];
|
||||
|
||||
struct SPTask *create_next_audio_frame_task(void);
|
||||
void play_sound(s32 soundBits, f32 *pos);
|
||||
void audio_signal_game_loop_tick(void);
|
||||
|
||||
+25
-19
@@ -6,9 +6,8 @@
|
||||
#include "synthesis.h"
|
||||
#include "seqplayer.h"
|
||||
#include "effects.h"
|
||||
#include "game/game_init.h"
|
||||
#include "game/emutest.h"
|
||||
#include "game/puppyprint.h"
|
||||
#include "game/vc_check.h"
|
||||
#include "game/debug.h"
|
||||
#include "string.h"
|
||||
|
||||
@@ -1048,8 +1047,20 @@ void init_reverb_us(s32 presetId) {
|
||||
s32 reverbWindowSize = gReverbSettings[presetId].windowSize;
|
||||
gReverbDownsampleRate = gReverbSettings[presetId].downsampleRate;
|
||||
#ifdef BETTER_REVERB
|
||||
// This will likely crash if given an invalid preset value. Adding a safety check here isn't worth the usability interference.
|
||||
struct BetterReverbSettings *betterReverbPreset = &gBetterReverbSettings[gBetterReverbPreset];
|
||||
struct BetterReverbSettings *betterReverbPreset = &gBetterReverbSettings[gBetterReverbPresetValue];
|
||||
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
if ((s8) gBetterReverbPresetValue < 0 && (s8) gBetterReverbPresetValue >= -ARRAY_COUNT(gDebugBetterReverbSettings)) {
|
||||
betterReverbPreset = &gDebugBetterReverbSettings[ARRAY_COUNT(gDebugBetterReverbSettings) + (s8) gBetterReverbPresetValue];
|
||||
} else if (gBetterReverbPresetValue >= gBetterReverbPresetCount) {
|
||||
#else
|
||||
if (gBetterReverbPresetValue >= gBetterReverbPresetCount) {
|
||||
#endif
|
||||
aggress(gBetterReverbPresetCount > 0, "No BETTER_REVERB presets exist!");
|
||||
|
||||
assert(gBetterReverbPresetValue < gBetterReverbPresetCount, "BETTER_REVERB preset value exceeds total number of available presets!");
|
||||
betterReverbPreset = &gBetterReverbSettings[0];
|
||||
}
|
||||
|
||||
betterReverbLightweight = betterReverbPreset->useLightweightSettings;
|
||||
betterReverbDownsampleRate = betterReverbPreset->downsampleRate;
|
||||
@@ -1058,8 +1069,8 @@ void init_reverb_us(s32 presetId) {
|
||||
betterReverbWindowsSize = betterReverbPreset->windowSize;
|
||||
betterReverbRevIndex = betterReverbPreset->reverbIndex;
|
||||
betterReverbGainIndex = betterReverbPreset->gainIndex;
|
||||
gReverbMultsL = betterReverbPreset->reverbMultsL;
|
||||
gReverbMultsR = betterReverbPreset->reverbMultsR;
|
||||
gReverbMults[SYNTH_CHANNEL_LEFT] = betterReverbPreset->reverbMultsL;
|
||||
gReverbMults[SYNTH_CHANNEL_RIGHT] = betterReverbPreset->reverbMultsR;
|
||||
|
||||
if (betterReverbDownsampleRate <= 0) {
|
||||
toggleBetterReverb = FALSE;
|
||||
@@ -1071,9 +1082,10 @@ void init_reverb_us(s32 presetId) {
|
||||
|
||||
if (betterReverbWindowsSize >= 0) {
|
||||
reverbWindowSize = betterReverbWindowsSize;
|
||||
if (reverbWindowSize < (DEFAULT_LEN_2CH * 2) && betterReverbWindowsSize != 0) // Minimum window size to not overflow
|
||||
reverbWindowSize = (DEFAULT_LEN_2CH * 2);
|
||||
reverbWindowSize /= gReverbDownsampleRate;
|
||||
if (reverbWindowSize < DEFAULT_LEN_2CH && betterReverbWindowsSize != 0) // Minimum window size to not overflow
|
||||
reverbWindowSize = DEFAULT_LEN_2CH;
|
||||
reverbWindowSize = ALIGN16(reverbWindowSize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1138,7 +1150,7 @@ void init_reverb_us(s32 presetId) {
|
||||
if (!gSynthesisReverb.useReverb)
|
||||
toggleBetterReverb = FALSE;
|
||||
|
||||
if (betterReverbPreset->gain > 0)
|
||||
if (betterReverbPreset->gain >= 0)
|
||||
gSynthesisReverb.reverbGain = (u16) betterReverbPreset->gain;
|
||||
|
||||
if (!sAudioIsInitialized)
|
||||
@@ -1158,7 +1170,7 @@ void audio_reset_session(s32 reverbPresetId) {
|
||||
if (gAudioLoadLock != AUDIO_LOCK_UNINITIALIZED) {
|
||||
gAudioLoadLock = AUDIO_LOCK_LOADING;
|
||||
|
||||
if (!gIsVC) {
|
||||
if (!(gEmulator & EMU_WIIVC)) {
|
||||
gAudioFrameCount = 0;
|
||||
while (gAudioFrameCount < 1) {
|
||||
// spin
|
||||
@@ -1312,7 +1324,7 @@ void audio_reset_session(void) {
|
||||
gAudioBufferParameters.minAiBufferLength *= gAudioBufferParameters.presetUnk4;
|
||||
gAudioBufferParameters.updatesPerFrame *= gAudioBufferParameters.presetUnk4;
|
||||
|
||||
if (gIsConsole)
|
||||
if (gEmulator & EMU_CONSOLE)
|
||||
gMaxSimultaneousNotes = MAX_SIMULTANEOUS_NOTES_CONSOLE;
|
||||
else
|
||||
gMaxSimultaneousNotes = MAX_SIMULTANEOUS_NOTES_EMULATOR;
|
||||
@@ -1339,7 +1351,7 @@ void audio_reset_session(void) {
|
||||
gMinAiBufferLength = gSamplesPerFrameTarget - 0x10;
|
||||
gAudioUpdatesPerFrame = updatesPerFrame = gSamplesPerFrameTarget / 160 + 1;
|
||||
|
||||
if (gIsConsole)
|
||||
if (gEmulator & EMU_CONSOLE)
|
||||
gMaxSimultaneousNotes = MAX_SIMULTANEOUS_NOTES_CONSOLE;
|
||||
else
|
||||
gMaxSimultaneousNotes = MAX_SIMULTANEOUS_NOTES_EMULATOR;
|
||||
@@ -1437,13 +1449,7 @@ void audio_reset_session(void) {
|
||||
gAudioLoadLock = AUDIO_LOCK_NOT_LOADING;
|
||||
}
|
||||
#endif
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
#ifdef PUPPYPRINT_DEBUG_CYCLES
|
||||
append_puppyprint_log("Audio Initialised in %dc.", (s32)(osGetTime() - first));
|
||||
#else
|
||||
append_puppyprint_log("Audio Initialised in %dus.", (s32)OS_CYCLES_TO_USEC(osGetTime() - first));
|
||||
#endif
|
||||
#endif
|
||||
append_puppyprint_log("Audio Initialised in %d" PP_CYCLE_STRING ".", (s32)PP_CYCLE_CONV(osGetTime() - first));
|
||||
|
||||
sAudioIsInitialized = TRUE;
|
||||
}
|
||||
|
||||
@@ -140,9 +140,11 @@ void *alloc_bank_or_seq(struct SoundMultiPool *arg0, s32 arg1, s32 size, s32 arg
|
||||
void *get_bank_or_seq(struct SoundMultiPool *arg0, s32 arg1, s32 id);
|
||||
#endif
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
void init_reverb_eu(void);
|
||||
s32 audio_shut_down_and_reset_step(void);
|
||||
void audio_reset_session(void);
|
||||
#else
|
||||
void init_reverb_us(s32 presetId);
|
||||
void audio_reset_session(s32 reverbPresetId);
|
||||
#endif
|
||||
void discard_bank(s32 bankId);
|
||||
|
||||
+53
-46
@@ -420,7 +420,11 @@ struct SequenceChannel {
|
||||
/*0x00, 0x00*/ u8 stopScript : 1;
|
||||
/*0x00, 0x00*/ u8 stopSomething2 : 1; // sets SequenceChannelLayer.stopSomething
|
||||
/*0x00, 0x00*/ u8 hasInstrument : 1;
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
/*0x00, 0x00*/ u8 stereoHeadsetEffects : 1;
|
||||
#else
|
||||
/*0x00, 0x00*/ u8 paddingBit : 1;
|
||||
#endif
|
||||
/*0x00, ????*/ u8 largeNotes : 1; // notes specify duration and velocity
|
||||
/*0x00, ????*/ u8 unused : 1; // never read, set to 0
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
@@ -662,54 +666,57 @@ struct vNote {
|
||||
}; // size = 0xC0
|
||||
struct Note {
|
||||
/* U/J, EU */
|
||||
/*0x00*/ u8 enabled : 1;
|
||||
/*0x00*/ u8 needsInit : 1;
|
||||
/*0x00*/ u8 restart : 1;
|
||||
/*0x00*/ u8 finished : 1;
|
||||
/*0x00*/ u8 envMixerNeedsInit : 1;
|
||||
/*0x00*/ u8 stereoStrongRight : 1;
|
||||
/*0x00*/ u8 stereoStrongLeft : 1;
|
||||
/*0x00*/ u8 stereoHeadsetEffects : 1;
|
||||
/*0x01*/ u8 usesHeadsetPanEffects;
|
||||
/*0x02*/ u8 unk2;
|
||||
/*0x03*/ u8 sampleDmaIndex;
|
||||
/*0x04, 0x30*/ u8 priority;
|
||||
/*0x05*/ u8 sampleCount; // 0, 8, 16, 32 or 64
|
||||
/*0x06*/ u8 instOrWave;
|
||||
/*0x07*/ u8 bankId; // in NoteSubEu on EU
|
||||
/*0x00*/ u8 enabled : 1;
|
||||
/*0x00*/ u8 needsInit : 1;
|
||||
/*0x00*/ u8 restart : 1;
|
||||
/*0x00*/ u8 finished : 1;
|
||||
/*0x00*/ u8 envMixerNeedsInit : 1;
|
||||
/*0x00*/ u8 initFullVelocity : 1;
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
/*0x00*/ u8 stereoHeadsetEffects : 1;
|
||||
/*0x00*/ u8 usesHeadsetPanEffects : 1;
|
||||
/*0x01*/ u8 stereoStrongRight : 1;
|
||||
/*0x01*/ u8 stereoStrongLeft : 1;
|
||||
#else
|
||||
/* */ u8 pad0[0x01];
|
||||
#endif
|
||||
/*0x02*/ u8 sampleDmaIndex;
|
||||
/*0x03*/ u8 priority;
|
||||
/*0x04*/ u8 sampleCount; // 0, 8, 16, 32 or 64
|
||||
/*0x05*/ u8 instOrWave;
|
||||
/*0x06*/ u8 bankId; // in NoteSubEu on EU
|
||||
/*0x07*/ u8 reverbVol; // Q1.7
|
||||
/*0x08*/ s16 adsrVolScale;
|
||||
/* */ u8 pad1[2];
|
||||
/*0x0C, 0xB3*/ u16 headsetPanRight;
|
||||
/*0x0E, 0xB4*/ u16 headsetPanLeft;
|
||||
/*0x10*/ u16 prevHeadsetPanRight;
|
||||
/*0x12*/ u16 prevHeadsetPanLeft;
|
||||
/*0x14*/ s32 samplePosInt;
|
||||
/*0x18, 0x38*/ f32 portamentoFreqScale;
|
||||
/*0x1C, 0x3C*/ f32 vibratoFreqScale;
|
||||
/*0x20*/ u16 samplePosFrac;
|
||||
/* */ u8 pad2[2];
|
||||
/*0x24*/ struct AudioBankSound *sound;
|
||||
/*0x28, 0x40*/ struct SequenceChannelLayer *prevParentLayer;
|
||||
/*0x2C, 0x44*/ struct SequenceChannelLayer *parentLayer;
|
||||
/*0x30, 0x48*/ struct SequenceChannelLayer *wantedParentLayer;
|
||||
/*0x34*/ struct NoteSynthesisBuffers *synthesisBuffers;
|
||||
/*0x38*/ f32 frequency;
|
||||
/*0x3C*/ u16 targetVolLeft; // Q1.15, but will always be non-negative
|
||||
/*0x3E*/ u16 targetVolRight; // Q1.15, but will always be non-negative
|
||||
/*0x40*/ u8 reverbVol; // Q1.7
|
||||
/*0x41*/ u8 unused1; // never read, set to 0x3f
|
||||
/* */ u8 pad3[2];
|
||||
/*0x44*/ struct NoteAttributes attributes;
|
||||
/*0x54, 0x58*/ struct AdsrState adsr;
|
||||
/*0x74, 0x7C*/ struct Portamento portamento;
|
||||
/*0x84, 0x8C*/ struct VibratoState vibratoState;
|
||||
/*0x0A*/ u16 samplePosFrac;
|
||||
/*0x0C*/ s32 samplePosInt;
|
||||
/*0x10*/ f32 portamentoFreqScale;
|
||||
/*0x14*/ f32 vibratoFreqScale;
|
||||
/*0x18*/ struct AudioBankSound *sound;
|
||||
/*0x1C*/ struct SequenceChannelLayer *prevParentLayer;
|
||||
/*0x20*/ struct SequenceChannelLayer *parentLayer;
|
||||
/*0x24*/ struct SequenceChannelLayer *wantedParentLayer;
|
||||
/*0x28*/ struct NoteSynthesisBuffers *synthesisBuffers;
|
||||
/*0x2C*/ f32 frequency;
|
||||
/*0x30*/ u16 targetVolLeft; // Q1.15, but will always be non-negative
|
||||
/*0x32*/ u16 targetVolRight; // Q1.15, but will always be non-negative
|
||||
/*0x34*/ struct NoteAttributes attributes;
|
||||
/*0x44*/ struct AdsrState adsr;
|
||||
/*0x64*/ struct Portamento portamento;
|
||||
/*0x74*/ struct VibratoState vibratoState;
|
||||
/*0x8C*/ struct AudioListItem listItem;
|
||||
/*0x9C*/ s16 curVolLeft; // Q1.15, but will always be non-negative
|
||||
/*0x9E*/ s16 curVolRight; // Q1.15, but will always be non-negative
|
||||
/*0xA0*/ s16 reverbVolShifted; // Q1.15
|
||||
/*0xA2*/ s16 unused2; // never read, set to 0
|
||||
/*0xA4, 0x00*/ struct AudioListItem listItem;
|
||||
/* */ u8 pad4[0xc];
|
||||
}; // size = 0xC0
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
/*0xA2*/ u16 headsetPanRight;
|
||||
/*0xA4*/ u16 headsetPanLeft;
|
||||
/*0xA6*/ u16 prevHeadsetPanRight;
|
||||
/*0xA8*/ u16 prevHeadsetPanLeft;
|
||||
/* */ u8 align16Padding[0x06];
|
||||
#else
|
||||
/* */ u8 align16Padding[0x0E];
|
||||
#endif
|
||||
}; // size = 0xB0
|
||||
#endif
|
||||
|
||||
struct NoteSynthesisBuffers {
|
||||
@@ -742,8 +749,8 @@ struct BetterReverbSettings {
|
||||
u8 reverbIndex;
|
||||
u32 *delaysL;
|
||||
u32 *delaysR;
|
||||
s32 *reverbMultsL;
|
||||
s32 *reverbMultsR;
|
||||
u8 *reverbMultsL;
|
||||
u8 *reverbMultsR;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
+1
-2
@@ -86,7 +86,7 @@ s16 gTempoInternalToExternal;
|
||||
s8 gAudioUpdatesPerFrame;
|
||||
#endif
|
||||
|
||||
s8 gSoundMode;
|
||||
s8 gSoundMode = SOUND_MODE_STEREO;
|
||||
|
||||
#if defined(VERSION_EU)
|
||||
s8 gAudioUpdatesPerFrame;
|
||||
@@ -855,7 +855,6 @@ void audio_init() {
|
||||
gAudioFrameCount = 0;
|
||||
gAudioTaskIndex = 0;
|
||||
gCurrAiBufferIndex = 0;
|
||||
gSoundMode = 0;
|
||||
gAudioTask = NULL;
|
||||
gAudioTasks[0].task.t.data_size = 0;
|
||||
gAudioTasks[1].task.t.data_size = 0;
|
||||
|
||||
@@ -578,7 +578,7 @@ void process_notes(void) {
|
||||
}
|
||||
}
|
||||
|
||||
adsr_update(¬e->adsr);
|
||||
adsr_update(note);
|
||||
note_vibrato_update(note);
|
||||
attributes = ¬e->attributes;
|
||||
if (note->priority == NOTE_PRIORITY_STOPPING) {
|
||||
@@ -1156,7 +1156,9 @@ s32 note_init_for_layer(struct Note *note, struct SequenceChannelLayer *seqLayer
|
||||
}
|
||||
|
||||
note->bankId = seqLayer->seqChannel->bankId;
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
note->stereoHeadsetEffects = seqLayer->seqChannel->stereoHeadsetEffects;
|
||||
#endif
|
||||
note->sound = seqLayer->sound;
|
||||
seqLayer->status = SOUND_LOAD_STATUS_DISCARDABLE; // "loaded"
|
||||
seqLayer->note = note;
|
||||
@@ -1410,9 +1412,12 @@ void note_init_all(void) {
|
||||
note->noteSubEu = gZeroNoteSub;
|
||||
#else
|
||||
note->enabled = FALSE;
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
note->stereoStrongRight = FALSE;
|
||||
note->stereoStrongLeft = FALSE;
|
||||
note->stereoHeadsetEffects = FALSE;
|
||||
note->usesHeadsetPanEffects = FALSE;
|
||||
#endif
|
||||
#endif
|
||||
note->priority = NOTE_PRIORITY_DISABLED;
|
||||
#ifdef VERSION_SH
|
||||
@@ -1426,13 +1431,12 @@ void note_init_all(void) {
|
||||
note->vibratoState.active = FALSE;
|
||||
#else
|
||||
note->reverbVol = 0;
|
||||
note->usesHeadsetPanEffects = FALSE;
|
||||
note->initFullVelocity = FALSE;
|
||||
note->sampleCount = 0;
|
||||
note->instOrWave = 0;
|
||||
note->targetVolLeft = 0;
|
||||
note->targetVolRight = 0;
|
||||
note->frequency = 0.0f;
|
||||
note->unused1 = 0x3f;
|
||||
note->vibratoState.activeFlags = VIBMODE_NONE;
|
||||
#endif
|
||||
note->attributes.velocity = 0.0f;
|
||||
|
||||
@@ -27,7 +27,9 @@ void sequence_channel_init(struct SequenceChannel *seqChannel) {
|
||||
seqChannel->stopScript = FALSE;
|
||||
seqChannel->stopSomething2 = FALSE;
|
||||
seqChannel->hasInstrument = FALSE;
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
seqChannel->stereoHeadsetEffects = FALSE;
|
||||
#endif
|
||||
seqChannel->transposition = 0;
|
||||
seqChannel->largeNotes = FALSE;
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
@@ -1867,7 +1869,12 @@ void sequence_channel_process_script(struct SequenceChannel *seqChannel) {
|
||||
#endif
|
||||
|
||||
case 0xd0: // chan_stereoheadseteffects
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
seqChannel->stereoHeadsetEffects = m64_read_u8(state);
|
||||
#else
|
||||
// NOTE: Vanilla music does not use 0xd0, so this is safe to repurpose entirely when ENABLE_STEREO_HEADSET_EFFECTS is disabled.
|
||||
m64_read_u8(state);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 0xd1: // chan_setnoteallocationpolicy
|
||||
|
||||
+224
-248
@@ -38,30 +38,27 @@
|
||||
aSetBuffer(pkt, 0, 0, c + DMEM_ADDR_WET_RIGHT_CH, d); \
|
||||
aSaveBuffer(pkt, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.ringBuffer.right + (off)));
|
||||
|
||||
#define VOLRAMPING_MASK (~(0x8000 | ((1 << (15 - VOL_RAMPING_EXPONENT)) - 1)))
|
||||
|
||||
|
||||
#ifdef BETTER_REVERB
|
||||
// Do not touch these values manually, unless you want potential for problems.
|
||||
u8 gBetterReverbPreset = 0;
|
||||
u8 gBetterReverbPresetValue = 0;
|
||||
u8 toggleBetterReverb = FALSE;
|
||||
u8 betterReverbLightweight = FALSE;
|
||||
u8 monoReverb;
|
||||
s8 betterReverbDownsampleRate;
|
||||
static u8 reverbMultsL[NUM_ALLPASS / 3] = {0};
|
||||
static u8 reverbMultsR[NUM_ALLPASS / 3] = {0};
|
||||
static s32 allpassIdxL[NUM_ALLPASS] = {0};
|
||||
static s32 allpassIdxR[NUM_ALLPASS] = {0};
|
||||
static s32 delaysL[NUM_ALLPASS] = {0};
|
||||
static s32 delaysR[NUM_ALLPASS] = {0};
|
||||
static s32 **delayBufsL;
|
||||
static s32 **delayBufsR;
|
||||
static s32 lastDelayLightL;
|
||||
static s32 lastDelayLightR;
|
||||
static s32 reverbMults[SYNTH_CHANNEL_STEREO_COUNT][NUM_ALLPASS / 3] = {0};
|
||||
static s32 allpassIdx[SYNTH_CHANNEL_STEREO_COUNT][NUM_ALLPASS] = {0};
|
||||
static s32 betterReverbDelays[SYNTH_CHANNEL_STEREO_COUNT][NUM_ALLPASS] = {0};
|
||||
static s32 lastDelayLight[SYNTH_CHANNEL_STEREO_COUNT];
|
||||
static s16 **delayBufs[SYNTH_CHANNEL_STEREO_COUNT];
|
||||
u8 *gReverbMults[SYNTH_CHANNEL_STEREO_COUNT];
|
||||
s32 reverbLastFilterIndex;
|
||||
s32 reverbFilterCount;
|
||||
s32 betterReverbWindowsSize;
|
||||
s32 betterReverbRevIndex; // This one is okay to adjust whenever
|
||||
s32 betterReverbGainIndex; // This one is okay to adjust whenever
|
||||
s32 *gReverbMultsL;
|
||||
s32 *gReverbMultsR;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -81,11 +78,15 @@ u64 *note_apply_headset_pan_effects(u64 *cmd, struct NoteSubEu *noteSubEu, struc
|
||||
#else
|
||||
u64 *synthesis_process_notes(s16 *aiBuf, s32 bufLen, u64 *cmd);
|
||||
u64 *load_wave_samples(u64 *cmd, struct Note *note, s32 nSamplesToLoad);
|
||||
u64 *process_envelope(u64 *cmd, struct Note *note, s32 nSamples, u16 inBuf, s32 headsetPanSettings,
|
||||
u32 flags);
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
u64 *process_envelope(u64 *cmd, struct Note *note, s32 nSamples, u16 inBuf, s32 headsetPanSettings);
|
||||
u64 *process_envelope_inner(u64 *cmd, struct Note *note, s32 nSamples, u16 inBuf,
|
||||
s32 headsetPanSettings, struct VolumeChange *vol);
|
||||
u64 *note_apply_headset_pan_effects(u64 *cmd, struct Note *note, s32 bufLen, s32 flags, s32 leftRight);
|
||||
#else
|
||||
u64 *process_envelope(u64 *cmd, struct Note *note, s32 nSamples, u16 inBuf);
|
||||
u64 *process_envelope_inner(u64 *cmd, struct Note *note, s32 nSamples, u16 inBuf, struct VolumeChange *vol);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_EU
|
||||
@@ -97,149 +98,99 @@ u8 sAudioSynthesisPad[0x20];
|
||||
#endif
|
||||
|
||||
#ifdef BETTER_REVERB
|
||||
static void reverb_samples(s16 *outSampleL, s16 *outSampleR, s32 inSampleL, s32 inSampleR) {
|
||||
s32 *curDelaySampleL;
|
||||
s32 *curDelaySampleR;
|
||||
s32 historySampleL;
|
||||
s32 historySampleR;
|
||||
s32 outTmpL = 0;
|
||||
s32 outTmpR = 0;
|
||||
s32 tmpCarryoverL = ((delayBufsL[reverbLastFilterIndex][allpassIdxL[reverbLastFilterIndex]] * betterReverbRevIndex) >> 8) + inSampleL;
|
||||
s32 tmpCarryoverR = ((delayBufsR[reverbLastFilterIndex][allpassIdxR[reverbLastFilterIndex]] * betterReverbRevIndex) >> 8) + inSampleR;
|
||||
s32 i = 0;
|
||||
s32 j = 0;
|
||||
s32 k = 0;
|
||||
static void reverb_samples(s16 *start, s16 *end, s16 *downsampleBuffer, s32 channel) {
|
||||
s16 *curDelaySample;
|
||||
s32 historySample;
|
||||
s32 tmpCarryover;
|
||||
s32 outSampleTotal;
|
||||
s32 i;
|
||||
s32 j;
|
||||
s32 k;
|
||||
|
||||
for (; i <= reverbLastFilterIndex; ++i, ++j) {
|
||||
curDelaySampleL = &delayBufsL[i][allpassIdxL[i]];
|
||||
curDelaySampleR = &delayBufsR[i][allpassIdxR[i]];
|
||||
historySampleL = *curDelaySampleL;
|
||||
historySampleR = *curDelaySampleR;
|
||||
s32 downsampleIncrement = gReverbDownsampleRate;
|
||||
s32 *delaysLocal = betterReverbDelays[channel];
|
||||
s32 *reverbMultsLocal = reverbMults[channel];
|
||||
s32 *allpassIdxLocal = allpassIdx[channel];
|
||||
s16 **delayBufsLocal = delayBufs[channel];
|
||||
|
||||
if (j == 2) {
|
||||
j = -1;
|
||||
outTmpL += (historySampleL * reverbMultsL[k ]) >> 8;
|
||||
outTmpR += (historySampleR * reverbMultsR[k++]) >> 8;
|
||||
*curDelaySampleL = tmpCarryoverL;
|
||||
*curDelaySampleR = tmpCarryoverR;
|
||||
if (i != reverbLastFilterIndex) {
|
||||
tmpCarryoverL = ((historySampleL * betterReverbRevIndex) >> 8)/* + inSampleL*/;
|
||||
tmpCarryoverR = ((historySampleR * betterReverbRevIndex) >> 8)/* + inSampleR*/;
|
||||
s32 lastFilterIndex = reverbLastFilterIndex;
|
||||
s32 revIndex = betterReverbRevIndex;
|
||||
s32 gainIndex = betterReverbGainIndex;
|
||||
|
||||
// Set j outside of the loop only. Because we're forcing filter count to always be a multiple of 3, we can count on j always being 0 when exiting the second for loop.
|
||||
j = 0;
|
||||
|
||||
for (; start < end; start++, downsampleBuffer += downsampleIncrement) {
|
||||
tmpCarryover = ((delayBufsLocal[lastFilterIndex][allpassIdxLocal[lastFilterIndex]] * revIndex) >> 8) + *downsampleBuffer;
|
||||
outSampleTotal = 0;
|
||||
i = 0;
|
||||
k = 0;
|
||||
|
||||
for (; i <= lastFilterIndex; ++i, ++j) {
|
||||
curDelaySample = &delayBufsLocal[i][allpassIdxLocal[i]];
|
||||
historySample = *curDelaySample;
|
||||
|
||||
if (j == 2) {
|
||||
j = -1;
|
||||
outSampleTotal += ((historySample * reverbMultsLocal[k++]) >> 8);
|
||||
*curDelaySample = CLAMP_S16(tmpCarryover);
|
||||
if (i != lastFilterIndex)
|
||||
tmpCarryover = ((historySample * revIndex) >> 8)/* + *downsampleBuffer*/;
|
||||
} else {
|
||||
tmpCarryover += (historySample * (-gainIndex)) >> 8;
|
||||
*curDelaySample = CLAMP_S16(tmpCarryover);
|
||||
tmpCarryover = ((tmpCarryover * gainIndex) >> 8) + historySample;
|
||||
}
|
||||
} else {
|
||||
*curDelaySampleL = ((historySampleL * (-betterReverbGainIndex)) >> 8) + tmpCarryoverL;
|
||||
*curDelaySampleR = ((historySampleR * (-betterReverbGainIndex)) >> 8) + tmpCarryoverR;
|
||||
tmpCarryoverL = ((*curDelaySampleL * betterReverbGainIndex) >> 8) + historySampleL;
|
||||
tmpCarryoverR = ((*curDelaySampleR * betterReverbGainIndex) >> 8) + historySampleR;
|
||||
|
||||
if (++allpassIdxLocal[i] == delaysLocal[i]) allpassIdxLocal[i] = 0;
|
||||
}
|
||||
|
||||
if (++allpassIdxL[i] == delaysL[i]) allpassIdxL[i] = 0;
|
||||
if (++allpassIdxR[i] == delaysR[i]) allpassIdxR[i] = 0;
|
||||
*start = CLAMP_S16(outSampleTotal);
|
||||
}
|
||||
|
||||
*outSampleL = CLAMP_S16(outTmpL);
|
||||
*outSampleR = CLAMP_S16(outTmpR);
|
||||
}
|
||||
|
||||
static void reverb_mono_sample(s16 *outSample, s32 inSample) {
|
||||
s32 *curDelaySample;
|
||||
s32 historySample;
|
||||
s32 outTmp = 0;
|
||||
s32 tmpCarryover = ((delayBufsL[reverbLastFilterIndex][allpassIdxL[reverbLastFilterIndex]] * betterReverbRevIndex) >> 8) + inSample;
|
||||
s32 i = 0;
|
||||
s32 j = 0;
|
||||
s32 k = 0;
|
||||
|
||||
for (; i <= reverbLastFilterIndex; ++i, ++j) {
|
||||
curDelaySample = &delayBufsL[i][allpassIdxL[i]];
|
||||
historySample = *curDelaySample;
|
||||
|
||||
if (j == 2) {
|
||||
j = -1;
|
||||
outTmp += ((historySample * reverbMultsL[k++]) >> 8);
|
||||
*curDelaySample = tmpCarryover;
|
||||
if (i != reverbLastFilterIndex)
|
||||
tmpCarryover = ((historySample * betterReverbRevIndex) >> 8)/* + inSample*/;
|
||||
} else {
|
||||
*curDelaySample = ((historySample * (-betterReverbGainIndex)) >> 8) + tmpCarryover;
|
||||
tmpCarryover = ((*curDelaySample * betterReverbGainIndex) >> 8) + historySample;
|
||||
}
|
||||
|
||||
if (++allpassIdxL[i] == delaysL[i]) allpassIdxL[i] = 0;
|
||||
}
|
||||
|
||||
*outSample = CLAMP_S16(outTmp);
|
||||
}
|
||||
|
||||
// Light reverb processing functions!
|
||||
#define FILTERS_MINUS_1 (BETTER_REVERB_FILTER_COUNT_LIGHT - 1)
|
||||
static void reverb_samples_light(s16 *outSampleL, s16 *outSampleR, s32 inSampleL, s32 inSampleR) {
|
||||
s32 *curDelaySampleL;
|
||||
s32 *curDelaySampleR;
|
||||
s32 historySampleL;
|
||||
s32 historySampleR;
|
||||
s32 tmpCarryoverL = (((delayBufsL[FILTERS_MINUS_1][allpassIdxL[FILTERS_MINUS_1]] * BETTER_REVERB_REVERB_INDEX_LIGHT) >> 8) + inSampleL);
|
||||
s32 tmpCarryoverR = (((delayBufsR[FILTERS_MINUS_1][allpassIdxR[FILTERS_MINUS_1]] * BETTER_REVERB_REVERB_INDEX_LIGHT) >> 8) + inSampleR);
|
||||
s32 i = 0;
|
||||
|
||||
for (; i < FILTERS_MINUS_1; ++i) {
|
||||
curDelaySampleL = &delayBufsL[i][allpassIdxL[i]];
|
||||
curDelaySampleR = &delayBufsR[i][allpassIdxR[i]];
|
||||
historySampleL = *curDelaySampleL;
|
||||
historySampleR = *curDelaySampleR;
|
||||
|
||||
*curDelaySampleL = (((historySampleL * (-BETTER_REVERB_GAIN_INDEX_LIGHT)) >> 8) + tmpCarryoverL);
|
||||
*curDelaySampleR = (((historySampleR * (-BETTER_REVERB_GAIN_INDEX_LIGHT)) >> 8) + tmpCarryoverR);
|
||||
tmpCarryoverL = (((*curDelaySampleL * BETTER_REVERB_GAIN_INDEX_LIGHT) >> 8) + historySampleL);
|
||||
tmpCarryoverR = (((*curDelaySampleR * BETTER_REVERB_GAIN_INDEX_LIGHT) >> 8) + historySampleR);
|
||||
|
||||
if (++allpassIdxL[i] == delaysL[i]) allpassIdxL[i] = 0;
|
||||
if (++allpassIdxR[i] == delaysR[i]) allpassIdxR[i] = 0;
|
||||
}
|
||||
|
||||
curDelaySampleL = &delayBufsL[FILTERS_MINUS_1][allpassIdxL[FILTERS_MINUS_1]];
|
||||
curDelaySampleR = &delayBufsR[FILTERS_MINUS_1][allpassIdxR[FILTERS_MINUS_1]];
|
||||
historySampleL = ((*curDelaySampleL * BETTER_REVERB_MULTIPLE_LIGHT) >> 8); // outTmpL variable not needed, as there is no sample addition happening here. Not really a history sample though.
|
||||
historySampleR = ((*curDelaySampleR * BETTER_REVERB_MULTIPLE_LIGHT) >> 8); // outTmpR variable not needed, as there is no sample addition happening here. Not really a history sample though.
|
||||
*curDelaySampleL = tmpCarryoverL;
|
||||
*curDelaySampleR = tmpCarryoverR;
|
||||
|
||||
if (++allpassIdxL[FILTERS_MINUS_1] == lastDelayLightL) allpassIdxL[FILTERS_MINUS_1] = 0;
|
||||
if (++allpassIdxR[FILTERS_MINUS_1] == lastDelayLightR) allpassIdxR[FILTERS_MINUS_1] = 0;
|
||||
|
||||
*outSampleL = CLAMP_S16(historySampleL);
|
||||
*outSampleR = CLAMP_S16(historySampleR);
|
||||
}
|
||||
|
||||
static void reverb_mono_sample_light(s16 *outSample, s32 inSample) {
|
||||
s32 *curDelaySample;
|
||||
static void reverb_samples_light(s16 *start, s16 *end, s16 *downsampleBuffer, s32 channel) {
|
||||
s16 *curDelaySample;
|
||||
s32 historySample;
|
||||
s32 tmpCarryover = (((delayBufsL[FILTERS_MINUS_1][allpassIdxL[FILTERS_MINUS_1]] * BETTER_REVERB_REVERB_INDEX_LIGHT) >> 8) + inSample);
|
||||
s32 i = 0;
|
||||
s32 tmpCarryover;
|
||||
s32 i;
|
||||
|
||||
for (; i < FILTERS_MINUS_1; ++i) {
|
||||
curDelaySample = &delayBufsL[i][allpassIdxL[i]];
|
||||
historySample = *curDelaySample;
|
||||
s32 downsampleIncrement = gReverbDownsampleRate;
|
||||
s32 *delaysLocal = betterReverbDelays[channel];
|
||||
s32 *allpassIdxLocal = allpassIdx[channel];
|
||||
s32 lastDelayLightLocal = lastDelayLight[channel];
|
||||
s16 **delayBufsLocal = delayBufs[channel];
|
||||
|
||||
*curDelaySample = (((historySample * (-BETTER_REVERB_GAIN_INDEX_LIGHT)) >> 8) + tmpCarryover);
|
||||
tmpCarryover = (((*curDelaySample * BETTER_REVERB_GAIN_INDEX_LIGHT) >> 8) + historySample);
|
||||
for (; start < end; start++, downsampleBuffer += downsampleIncrement) {
|
||||
tmpCarryover = (((delayBufsLocal[FILTERS_MINUS_1][allpassIdxLocal[FILTERS_MINUS_1]] * BETTER_REVERB_REVERB_INDEX_LIGHT) >> 8) + *downsampleBuffer);
|
||||
i = 0;
|
||||
|
||||
if (++allpassIdxL[i] == delaysL[i]) allpassIdxL[i] = 0;
|
||||
for (; i < FILTERS_MINUS_1; ++i) {
|
||||
curDelaySample = &delayBufsLocal[i][allpassIdxLocal[i]];
|
||||
historySample = *curDelaySample;
|
||||
|
||||
tmpCarryover += ((historySample * (-BETTER_REVERB_GAIN_INDEX_LIGHT)) >> 8);
|
||||
*curDelaySample = CLAMP_S16(tmpCarryover);
|
||||
tmpCarryover = ((tmpCarryover * BETTER_REVERB_GAIN_INDEX_LIGHT) >> 8) + historySample;
|
||||
|
||||
if (++allpassIdxLocal[i] == delaysLocal[i]) allpassIdxLocal[i] = 0;
|
||||
}
|
||||
|
||||
curDelaySample = &delayBufsLocal[FILTERS_MINUS_1][allpassIdxLocal[FILTERS_MINUS_1]];
|
||||
historySample = ((*curDelaySample * BETTER_REVERB_MULTIPLE_LIGHT) >> 8); // outSampleTotal variable not needed, as there is no sample addition happening here. Not really a history sample though.
|
||||
*curDelaySample = CLAMP_S16(tmpCarryover);
|
||||
|
||||
if (++allpassIdxLocal[FILTERS_MINUS_1] == lastDelayLightLocal) allpassIdxLocal[FILTERS_MINUS_1] = 0;
|
||||
|
||||
*start = CLAMP_S16(historySample);
|
||||
}
|
||||
|
||||
curDelaySample = &delayBufsL[FILTERS_MINUS_1][allpassIdxL[FILTERS_MINUS_1]];
|
||||
historySample = ((*curDelaySample * BETTER_REVERB_MULTIPLE_LIGHT) >> 8); // outTmp variable not needed, as there is no sample addition happening here. Not really a history sample though.
|
||||
*curDelaySample = tmpCarryover;
|
||||
|
||||
if (++allpassIdxL[FILTERS_MINUS_1] == lastDelayLightL) allpassIdxL[FILTERS_MINUS_1] = 0;
|
||||
|
||||
*outSample = CLAMP_S16(historySample);
|
||||
}
|
||||
#undef FILTERS_MINUS_1
|
||||
|
||||
void initialize_better_reverb_buffers(void) {
|
||||
delayBufsL = (s32**) soundAlloc(&gBetterReverbPool, BETTER_REVERB_PTR_SIZE);
|
||||
delayBufsR = &delayBufsL[NUM_ALLPASS];
|
||||
delayBufs[SYNTH_CHANNEL_LEFT] = (s16**) soundAlloc(&gBetterReverbPool, BETTER_REVERB_PTR_SIZE);
|
||||
delayBufs[SYNTH_CHANNEL_RIGHT] = &delayBufs[SYNTH_CHANNEL_LEFT][NUM_ALLPASS];
|
||||
}
|
||||
|
||||
void set_better_reverb_buffers(u32 *inputDelaysL, u32 *inputDelaysR) {
|
||||
@@ -250,7 +201,7 @@ void set_better_reverb_buffers(u32 *inputDelaysL, u32 *inputDelaysR) {
|
||||
if (betterReverbLightweight)
|
||||
filterCount = BETTER_REVERB_FILTER_COUNT_LIGHT;
|
||||
|
||||
gBetterReverbPool.cur = gBetterReverbPool.start + ALIGN16(BETTER_REVERB_PTR_SIZE); // Reset reverb data pool
|
||||
gBetterReverbPool.cur = gBetterReverbPool.start + BETTER_REVERB_PTR_SIZE; // Reset reverb data pool
|
||||
|
||||
// Don't bother setting any buffers if BETTER_REVERB is disabled
|
||||
if (!toggleBetterReverb)
|
||||
@@ -259,21 +210,20 @@ void set_better_reverb_buffers(u32 *inputDelaysL, u32 *inputDelaysR) {
|
||||
// NOTE: Using filterCount over NUM_ALLPASS will report less memory usage with fewer filters, but poses an additional
|
||||
// risk to anybody testing on console with performance compromises, as emulator can be easily overlooked.
|
||||
for (i = 0; i < filterCount; ++i) {
|
||||
delaysL[i] = (s32) (inputDelaysL[i] / gReverbDownsampleRate);
|
||||
delaysR[i] = (s32) (inputDelaysR[i] / gReverbDownsampleRate);
|
||||
delayBufsL[i] = soundAlloc(&gBetterReverbPool, delaysL[i] * sizeof(s32));
|
||||
bufOffset += delaysL[i];
|
||||
delayBufsR[i] = soundAlloc(&gBetterReverbPool, delaysR[i] * sizeof(s32));
|
||||
bufOffset += delaysR[i];
|
||||
betterReverbDelays[SYNTH_CHANNEL_LEFT][i] = (s32) (inputDelaysL[i] / gReverbDownsampleRate);
|
||||
betterReverbDelays[SYNTH_CHANNEL_RIGHT][i] = (s32) (inputDelaysR[i] / gReverbDownsampleRate);
|
||||
delayBufs[SYNTH_CHANNEL_LEFT][i] = soundAlloc(&gBetterReverbPool, betterReverbDelays[SYNTH_CHANNEL_LEFT][i] * sizeof(s16));
|
||||
bufOffset += betterReverbDelays[SYNTH_CHANNEL_LEFT][i];
|
||||
delayBufs[SYNTH_CHANNEL_RIGHT][i] = soundAlloc(&gBetterReverbPool, betterReverbDelays[SYNTH_CHANNEL_RIGHT][i] * sizeof(s16));
|
||||
bufOffset += betterReverbDelays[SYNTH_CHANNEL_RIGHT][i];
|
||||
}
|
||||
|
||||
aggress(bufOffset * sizeof(s32) <= BETTER_REVERB_SIZE - ALIGN16(BETTER_REVERB_PTR_SIZE), "BETTER_REVERB_SIZE is too small for this preset!");
|
||||
aggress(bufOffset * sizeof(s16) <= BETTER_REVERB_SIZE - BETTER_REVERB_PTR_SIZE, "BETTER_REVERB_SIZE is too small for this preset!");
|
||||
|
||||
lastDelayLightL = delaysL[filterCount-1];
|
||||
lastDelayLightR = delaysR[filterCount-1];
|
||||
lastDelayLight[SYNTH_CHANNEL_LEFT] = betterReverbDelays[SYNTH_CHANNEL_LEFT][filterCount-1];
|
||||
lastDelayLight[SYNTH_CHANNEL_RIGHT] = betterReverbDelays[SYNTH_CHANNEL_RIGHT][filterCount-1];
|
||||
|
||||
bzero(allpassIdxL, sizeof(allpassIdxL));
|
||||
bzero(allpassIdxR, sizeof(allpassIdxR));
|
||||
bzero(allpassIdx, sizeof(allpassIdx));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -376,81 +326,57 @@ void prepare_reverb_ring_buffer(s32 chunkLen, u32 updateIndex) {
|
||||
}
|
||||
#ifdef BETTER_REVERB
|
||||
else if (toggleBetterReverb) {
|
||||
s32 firstLoopMax;
|
||||
s32 secondLoopMax;
|
||||
s32 loopCounts[2];
|
||||
|
||||
s16 *betterReverbDownsampleBuffers[SYNTH_CHANNEL_STEREO_COUNT][ARRAY_COUNT(loopCounts)]; // StartA and StartB for both channels
|
||||
s16 *betterReverbSampleBuffers[SYNTH_CHANNEL_STEREO_COUNT][ARRAY_COUNT(loopCounts)]; // Output reverb buffers
|
||||
void (*reverbFunc)(s16*, s16*, s16*, s32) = betterReverbLightweight ? reverb_samples_light : reverb_samples; // Function pointers for both heavy and lightweight reverb functions
|
||||
|
||||
item = &gSynthesisReverb.items[gSynthesisReverb.curFrame][updateIndex];
|
||||
dstPos = item->startPos;
|
||||
firstLoopMax = ((item->lengthA / 2) + item->startPos);
|
||||
secondLoopMax = (item->lengthB / 2);
|
||||
loopCounts[0] = item->lengthA / 2;
|
||||
loopCounts[1] = item->lengthB / 2;
|
||||
|
||||
// This block could be simplified probably with function pointers or rewriting reverb_mono_sample to support L and R individually. Another idea would be to process more than one sample at a time
|
||||
// for each function call. In practice with HackerSM64, these ideas either aren't super trivial to implement efficiently or don't benefit performance at all, so I'm leaving this as it is for now.
|
||||
if (betterReverbLightweight) {
|
||||
if (gSoundMode == SOUND_MODE_MONO || monoReverb) {
|
||||
if (gReverbDownsampleRate != 1) {
|
||||
osInvalDCache(item->toDownsampleLeft, DEFAULT_LEN_2CH);
|
||||
for (srcPos = 0; dstPos < firstLoopMax; srcPos += gReverbDownsampleRate, dstPos++)
|
||||
reverb_mono_sample_light(&gSynthesisReverb.ringBuffer.left[dstPos], ((s32) item->toDownsampleLeft[srcPos] + (s32) item->toDownsampleRight[srcPos]) / 2);
|
||||
bcopy(&gSynthesisReverb.ringBuffer.left[item->startPos], &gSynthesisReverb.ringBuffer.right[item->startPos], (dstPos - item->startPos) * sizeof(s16));
|
||||
if (gReverbDownsampleRate != 1) {
|
||||
// NOTE: / HACKERSM64 TODO: Commenting this check seems to improve runtime by about 100 microseconds (per 30fps frame),
|
||||
// but idk enough about why it was added here in vanilla to comfortably remove it. Is it supposed to act as an
|
||||
// optimization (that isn't actually an optimization) or is it a safety measure since it's loaded from the RSP?
|
||||
osInvalDCache(item->toDownsampleLeft, DEFAULT_LEN_2CH);
|
||||
}
|
||||
|
||||
betterReverbSampleBuffers[SYNTH_CHANNEL_LEFT][0] = &gSynthesisReverb.ringBuffer.left[item->startPos];
|
||||
betterReverbSampleBuffers[SYNTH_CHANNEL_LEFT][1] = &gSynthesisReverb.ringBuffer.left[0];
|
||||
betterReverbSampleBuffers[SYNTH_CHANNEL_RIGHT][0] = &gSynthesisReverb.ringBuffer.right[item->startPos];
|
||||
betterReverbSampleBuffers[SYNTH_CHANNEL_RIGHT][1] = &gSynthesisReverb.ringBuffer.right[0];
|
||||
if (gReverbDownsampleRate > 1) {
|
||||
betterReverbDownsampleBuffers[SYNTH_CHANNEL_LEFT][0] = &item->toDownsampleLeft[0];
|
||||
betterReverbDownsampleBuffers[SYNTH_CHANNEL_LEFT][1] = &item->toDownsampleLeft[loopCounts[0] * gReverbDownsampleRate];
|
||||
betterReverbDownsampleBuffers[SYNTH_CHANNEL_RIGHT][0] = &item->toDownsampleRight[0];
|
||||
betterReverbDownsampleBuffers[SYNTH_CHANNEL_RIGHT][1] = &item->toDownsampleRight[loopCounts[0] * gReverbDownsampleRate];
|
||||
} else {
|
||||
betterReverbDownsampleBuffers[SYNTH_CHANNEL_LEFT][0] = betterReverbSampleBuffers[SYNTH_CHANNEL_LEFT][0];
|
||||
betterReverbDownsampleBuffers[SYNTH_CHANNEL_LEFT][1] = betterReverbSampleBuffers[SYNTH_CHANNEL_LEFT][1];
|
||||
betterReverbDownsampleBuffers[SYNTH_CHANNEL_RIGHT][0] = betterReverbSampleBuffers[SYNTH_CHANNEL_RIGHT][0];
|
||||
betterReverbDownsampleBuffers[SYNTH_CHANNEL_RIGHT][1] = betterReverbSampleBuffers[SYNTH_CHANNEL_RIGHT][1];
|
||||
}
|
||||
|
||||
for (dstPos = 0; dstPos < secondLoopMax; srcPos += gReverbDownsampleRate, dstPos++)
|
||||
reverb_mono_sample_light(&gSynthesisReverb.ringBuffer.left[dstPos], ((s32) item->toDownsampleLeft[srcPos] + (s32) item->toDownsampleRight[srcPos]) / 2);
|
||||
bcopy(gSynthesisReverb.ringBuffer.left, gSynthesisReverb.ringBuffer.right, dstPos * sizeof(s16));
|
||||
} else {
|
||||
for (; dstPos < firstLoopMax; dstPos++)
|
||||
reverb_mono_sample_light(&gSynthesisReverb.ringBuffer.left[dstPos], ((s32) gSynthesisReverb.ringBuffer.left[dstPos] + (s32) gSynthesisReverb.ringBuffer.right[dstPos]) / 2);
|
||||
bcopy(&gSynthesisReverb.ringBuffer.left[item->startPos], &gSynthesisReverb.ringBuffer.right[item->startPos], (dstPos - item->startPos) * sizeof(s16));
|
||||
|
||||
for (dstPos = 0; dstPos < secondLoopMax; dstPos++)
|
||||
reverb_mono_sample_light(&gSynthesisReverb.ringBuffer.left[dstPos], ((s32) gSynthesisReverb.ringBuffer.left[dstPos] + (s32) gSynthesisReverb.ringBuffer.right[dstPos]) / 2);
|
||||
bcopy(gSynthesisReverb.ringBuffer.left, gSynthesisReverb.ringBuffer.right, dstPos * sizeof(s16));
|
||||
}
|
||||
} else {
|
||||
if (gReverbDownsampleRate != 1) {
|
||||
osInvalDCache(item->toDownsampleLeft, DEFAULT_LEN_2CH);
|
||||
for (srcPos = 0; dstPos < firstLoopMax; srcPos += gReverbDownsampleRate, dstPos++)
|
||||
reverb_samples_light(&gSynthesisReverb.ringBuffer.left[dstPos], &gSynthesisReverb.ringBuffer.right[dstPos], item->toDownsampleLeft[srcPos], item->toDownsampleRight[srcPos]);
|
||||
for (dstPos = 0; dstPos < secondLoopMax; srcPos += gReverbDownsampleRate, dstPos++)
|
||||
reverb_samples_light(&gSynthesisReverb.ringBuffer.left[dstPos], &gSynthesisReverb.ringBuffer.right[dstPos], item->toDownsampleLeft[srcPos], item->toDownsampleRight[srcPos]);
|
||||
} else {
|
||||
for (; dstPos < firstLoopMax; dstPos++)
|
||||
reverb_samples_light(&gSynthesisReverb.ringBuffer.left[dstPos], &gSynthesisReverb.ringBuffer.right[dstPos], gSynthesisReverb.ringBuffer.left[dstPos], gSynthesisReverb.ringBuffer.right[dstPos]);
|
||||
for (dstPos = 0; dstPos < secondLoopMax; dstPos++)
|
||||
reverb_samples_light(&gSynthesisReverb.ringBuffer.left[dstPos], &gSynthesisReverb.ringBuffer.right[dstPos], gSynthesisReverb.ringBuffer.left[dstPos], gSynthesisReverb.ringBuffer.right[dstPos]);
|
||||
if (gSoundMode == SOUND_MODE_MONO || monoReverb) {
|
||||
for (srcPos = 0; srcPos < ARRAY_COUNT(loopCounts); srcPos++) { // LengthA and LengthB processing
|
||||
s16 *downsampleBufferL = betterReverbDownsampleBuffers[SYNTH_CHANNEL_LEFT][srcPos];
|
||||
s16 *downsampleBufferR = betterReverbDownsampleBuffers[SYNTH_CHANNEL_RIGHT][srcPos];
|
||||
for (dstPos = 0; dstPos < loopCounts[srcPos]; dstPos += gReverbDownsampleRate) { // Individual sample processing
|
||||
downsampleBufferL[dstPos] = ((s32) downsampleBufferL[dstPos] + (s32) downsampleBufferR[dstPos]) >> 1; // Merge stereo samples into left channel
|
||||
}
|
||||
}
|
||||
for (srcPos = 0; srcPos < ARRAY_COUNT(loopCounts); srcPos++) { // LengthA and LengthB processing
|
||||
// Call core reverb processing function, either reverb_samples() or reverb_samples_light()
|
||||
(*reverbFunc)(betterReverbSampleBuffers[SYNTH_CHANNEL_LEFT][srcPos], betterReverbSampleBuffers[SYNTH_CHANNEL_LEFT][srcPos] + loopCounts[srcPos], betterReverbDownsampleBuffers[SYNTH_CHANNEL_LEFT][srcPos], SYNTH_CHANNEL_LEFT);
|
||||
bcopy(betterReverbSampleBuffers[SYNTH_CHANNEL_LEFT][srcPos], betterReverbSampleBuffers[SYNTH_CHANNEL_RIGHT][srcPos], loopCounts[srcPos] * sizeof(s16));
|
||||
}
|
||||
} else {
|
||||
if (gSoundMode == SOUND_MODE_MONO || monoReverb) {
|
||||
if (gReverbDownsampleRate != 1) {
|
||||
osInvalDCache(item->toDownsampleLeft, DEFAULT_LEN_2CH);
|
||||
for (srcPos = 0; dstPos < firstLoopMax; srcPos += gReverbDownsampleRate, dstPos++)
|
||||
reverb_mono_sample(&gSynthesisReverb.ringBuffer.left[dstPos], ((s32) item->toDownsampleLeft[srcPos] + (s32) item->toDownsampleRight[srcPos]) / 2);
|
||||
bcopy(&gSynthesisReverb.ringBuffer.left[item->startPos], &gSynthesisReverb.ringBuffer.right[item->startPos], (dstPos - item->startPos) * sizeof(s16));
|
||||
|
||||
for (dstPos = 0; dstPos < secondLoopMax; srcPos += gReverbDownsampleRate, dstPos++)
|
||||
reverb_mono_sample(&gSynthesisReverb.ringBuffer.left[dstPos], ((s32) item->toDownsampleLeft[srcPos] + (s32) item->toDownsampleRight[srcPos]) / 2);
|
||||
bcopy(gSynthesisReverb.ringBuffer.left, gSynthesisReverb.ringBuffer.right, dstPos * sizeof(s16));
|
||||
} else {
|
||||
for (; dstPos < firstLoopMax; dstPos++)
|
||||
reverb_mono_sample(&gSynthesisReverb.ringBuffer.left[dstPos], ((s32) gSynthesisReverb.ringBuffer.left[dstPos] + (s32) gSynthesisReverb.ringBuffer.right[dstPos]) / 2);
|
||||
bcopy(&gSynthesisReverb.ringBuffer.left[item->startPos], &gSynthesisReverb.ringBuffer.right[item->startPos], (dstPos - item->startPos) * sizeof(s16));
|
||||
|
||||
for (dstPos = 0; dstPos < secondLoopMax; dstPos++)
|
||||
reverb_mono_sample(&gSynthesisReverb.ringBuffer.left[dstPos], ((s32) gSynthesisReverb.ringBuffer.left[dstPos] + (s32) gSynthesisReverb.ringBuffer.right[dstPos]) / 2);
|
||||
bcopy(gSynthesisReverb.ringBuffer.left, gSynthesisReverb.ringBuffer.right, dstPos * sizeof(s16));
|
||||
}
|
||||
} else {
|
||||
if (gReverbDownsampleRate != 1) {
|
||||
osInvalDCache(item->toDownsampleLeft, DEFAULT_LEN_2CH);
|
||||
for (srcPos = 0; dstPos < firstLoopMax; srcPos += gReverbDownsampleRate, dstPos++)
|
||||
reverb_samples(&gSynthesisReverb.ringBuffer.left[dstPos], &gSynthesisReverb.ringBuffer.right[dstPos], item->toDownsampleLeft[srcPos], item->toDownsampleRight[srcPos]);
|
||||
for (dstPos = 0; dstPos < secondLoopMax; srcPos += gReverbDownsampleRate, dstPos++)
|
||||
reverb_samples(&gSynthesisReverb.ringBuffer.left[dstPos], &gSynthesisReverb.ringBuffer.right[dstPos], item->toDownsampleLeft[srcPos], item->toDownsampleRight[srcPos]);
|
||||
} else {
|
||||
for (; dstPos < firstLoopMax; dstPos++)
|
||||
reverb_samples(&gSynthesisReverb.ringBuffer.left[dstPos], &gSynthesisReverb.ringBuffer.right[dstPos], gSynthesisReverb.ringBuffer.left[dstPos], gSynthesisReverb.ringBuffer.right[dstPos]);
|
||||
for (dstPos = 0; dstPos < secondLoopMax; dstPos++)
|
||||
reverb_samples(&gSynthesisReverb.ringBuffer.left[dstPos], &gSynthesisReverb.ringBuffer.right[dstPos], gSynthesisReverb.ringBuffer.left[dstPos], gSynthesisReverb.ringBuffer.right[dstPos]);
|
||||
for (dstPos = 0; dstPos < SYNTH_CHANNEL_STEREO_COUNT; dstPos++) { // left and right channels
|
||||
for (srcPos = 0; srcPos < ARRAY_COUNT(loopCounts); srcPos++) { // LengthA and LengthB processing
|
||||
// Call core reverb processing function, either reverb_samples() or reverb_samples_light()
|
||||
(*reverbFunc)(betterReverbSampleBuffers[dstPos][srcPos], betterReverbSampleBuffers[dstPos][srcPos] + loopCounts[srcPos], betterReverbDownsampleBuffers[dstPos][srcPos], dstPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -601,18 +527,18 @@ u64 *synthesis_execute(u64 *cmdBuf, s32 *writtenCmds, s16 *aiBuf, s32 bufLen) {
|
||||
|
||||
reverbLastFilterIndex = reverbFilterCount - 1;
|
||||
|
||||
// Update reverbMultsL every audio frame just in case gReverbMults is ever to change.
|
||||
if (gReverbMultsL != NULL && gReverbMultsR != NULL) {
|
||||
// Update reverbMults every audio frame just in case gReverbMults is ever to change.
|
||||
if (gReverbMults[SYNTH_CHANNEL_LEFT] != NULL && gReverbMults[SYNTH_CHANNEL_RIGHT] != NULL) {
|
||||
for (i = 0; i < filterCountDiv3; ++i) {
|
||||
reverbMultsL[i] = gReverbMultsL[i];
|
||||
reverbMultsR[i] = gReverbMultsR[i];
|
||||
reverbMults[SYNTH_CHANNEL_LEFT][i] = gReverbMults[SYNTH_CHANNEL_LEFT][i];
|
||||
reverbMults[SYNTH_CHANNEL_RIGHT][i] = gReverbMults[SYNTH_CHANNEL_RIGHT][i];
|
||||
}
|
||||
}
|
||||
|
||||
// If there's only one reverb multiplier set, adjust these to match so one channel doesn't end up potentially overpowering the other.
|
||||
if (filterCountDiv3 == 1) {
|
||||
reverbMultsL[0] = (reverbMultsR[0] + reverbMultsL[0]) / 2;
|
||||
reverbMultsR[0] = reverbMultsL[0];
|
||||
reverbMults[SYNTH_CHANNEL_LEFT][0] = (reverbMults[SYNTH_CHANNEL_RIGHT][0] + reverbMults[SYNTH_CHANNEL_LEFT][0]) / 2;
|
||||
reverbMults[SYNTH_CHANNEL_RIGHT][0] = reverbMults[SYNTH_CHANNEL_LEFT][0];
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -844,9 +770,9 @@ u64 *synthesis_do_one_audio_update(s16 *aiBuf, s32 bufLen, u64 *cmd, s32 updateI
|
||||
aResample(cmd++, gSynthesisReverb.resampleFlags, (u16) gSynthesisReverb.resampleRate, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.resampleStateLeft));
|
||||
aSetBuffer(cmd++, 0, t4 + DMEM_ADDR_WET_RIGHT_CH, DMEM_ADDR_RIGHT_CH, bufLen << 1);
|
||||
aResample(cmd++, gSynthesisReverb.resampleFlags, (u16) gSynthesisReverb.resampleRate, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.resampleStateRight));
|
||||
aSetBuffer(cmd++, 0, 0, 0, DEFAULT_LEN_2CH);
|
||||
aMix(cmd++, 0, /*gain*/ 0x8000 + gSynthesisReverb.reverbGain, /*in*/ DMEM_ADDR_LEFT_CH, /*out*/ DMEM_ADDR_LEFT_CH);
|
||||
aDMEMMove(cmd++, DMEM_ADDR_LEFT_CH, DMEM_ADDR_WET_LEFT_CH, DEFAULT_LEN_2CH);
|
||||
aSetBuffer(cmd++, 0, 0, 0, DEFAULT_LEN_2CH);
|
||||
aMix(cmd++, 0, /*gain*/ 0x8000 + gSynthesisReverb.reverbGain, /*in*/ DMEM_ADDR_WET_LEFT_CH, /*out*/ DMEM_ADDR_WET_LEFT_CH);
|
||||
}
|
||||
|
||||
AUDIO_PROFILER_SWITCH(PROFILER_TIME_SUB_AUDIO_SYNTHESIS_ENVELOPE_REVERB, PROFILER_TIME_SUB_AUDIO_SYNTHESIS_PROCESSING);
|
||||
@@ -921,7 +847,9 @@ u64 *synthesis_process_notes(s16 *aiBuf, s32 bufLen, u64 *cmd) {
|
||||
s32 nSamplesToProcess; // sp10c/a0, spE0
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
s32 leftRight;
|
||||
#endif
|
||||
s32 s3;
|
||||
s32 s5; //s4
|
||||
|
||||
@@ -1206,7 +1134,12 @@ u64 *synthesis_process_notes(s16 *aiBuf, s32 bufLen, u64 *cmd) {
|
||||
|
||||
switch (flags) {
|
||||
case A_INIT: // = 1
|
||||
sp130 = 0;
|
||||
/**
|
||||
* !NOTE: Removing this seems to produce a more accurate waveform, however I have no idea why Nintendo decided to add this originally.
|
||||
* I can only speculate (and hope) that this was just an oversight on their part and this has no reason to exist, given my testing.
|
||||
* I'm leaving it commented out here just in case though.
|
||||
*/
|
||||
// sp130 = 0;
|
||||
s5 = s0 * 2 + s5;
|
||||
break;
|
||||
|
||||
@@ -1332,6 +1265,7 @@ u64 *synthesis_process_notes(s16 *aiBuf, s32 bufLen, u64 *cmd) {
|
||||
aResample(cmd++, flags, resamplingRateFixedPoint, VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->finalResampleState));
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
#ifdef VERSION_EU
|
||||
if (noteSubEu->headsetPanRight != 0 || synthesisState->prevHeadsetPanRight != 0) {
|
||||
leftRight = 1;
|
||||
@@ -1351,7 +1285,7 @@ u64 *synthesis_process_notes(s16 *aiBuf, s32 bufLen, u64 *cmd) {
|
||||
#ifdef VERSION_EU
|
||||
cmd = process_envelope(cmd, noteSubEu, synthesisState, bufLen, 0, leftRight, flags);
|
||||
#else
|
||||
cmd = process_envelope(cmd, note, bufLen, 0, leftRight, flags);
|
||||
cmd = process_envelope(cmd, note, bufLen, 0, leftRight);
|
||||
#endif
|
||||
AUDIO_PROFILER_SWITCH(PROFILER_TIME_SUB_AUDIO_SYNTHESIS_ENVELOPE_REVERB, PROFILER_TIME_SUB_AUDIO_SYNTHESIS_PROCESSING);
|
||||
|
||||
@@ -1363,6 +1297,11 @@ u64 *synthesis_process_notes(s16 *aiBuf, s32 bufLen, u64 *cmd) {
|
||||
if (note->usesHeadsetPanEffects) {
|
||||
cmd = note_apply_headset_pan_effects(cmd, note, bufLen * 2, flags, leftRight);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
AUDIO_PROFILER_SWITCH(PROFILER_TIME_SUB_AUDIO_SYNTHESIS_PROCESSING, PROFILER_TIME_SUB_AUDIO_SYNTHESIS_ENVELOPE_REVERB);
|
||||
cmd = process_envelope(cmd, note, bufLen, 0);
|
||||
AUDIO_PROFILER_SWITCH(PROFILER_TIME_SUB_AUDIO_SYNTHESIS_ENVELOPE_REVERB, PROFILER_TIME_SUB_AUDIO_SYNTHESIS_PROCESSING);
|
||||
#endif
|
||||
}
|
||||
#ifndef VERSION_EU
|
||||
@@ -1419,20 +1358,38 @@ u64 *load_wave_samples(u64 *cmd, struct Note *note, s32 nSamplesToLoad) {
|
||||
#endif
|
||||
|
||||
#ifndef VERSION_EU
|
||||
u64 *process_envelope(u64 *cmd, struct Note *note, s32 nSamples, u16 inBuf, s32 headsetPanSettings,
|
||||
UNUSED u32 flags) {
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
u64 *process_envelope(u64 *cmd, struct Note *note, s32 nSamples, u16 inBuf, s32 headsetPanSettings) {
|
||||
#else
|
||||
u64 *process_envelope(u64 *cmd, struct Note *note, s32 nSamples, u16 inBuf) {
|
||||
#endif
|
||||
struct VolumeChange vol;
|
||||
vol.sourceLeft = note->curVolLeft;
|
||||
vol.sourceRight = note->curVolRight;
|
||||
if (note->initFullVelocity) {
|
||||
note->initFullVelocity = FALSE;
|
||||
vol.sourceLeft = note->targetVolLeft;
|
||||
vol.sourceRight = note->targetVolRight;
|
||||
} else {
|
||||
vol.sourceLeft = note->curVolLeft;
|
||||
vol.sourceRight = note->curVolRight;
|
||||
}
|
||||
vol.targetLeft = note->targetVolLeft;
|
||||
vol.targetRight = note->targetVolRight;
|
||||
note->curVolLeft = vol.targetLeft;
|
||||
note->curVolRight = vol.targetRight;
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
return process_envelope_inner(cmd, note, nSamples, inBuf, headsetPanSettings, &vol);
|
||||
#else
|
||||
return process_envelope_inner(cmd, note, nSamples, inBuf, &vol);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
u64 *process_envelope_inner(u64 *cmd, struct Note *note, s32 nSamples, u16 inBuf,
|
||||
s32 headsetPanSettings, struct VolumeChange *vol) {
|
||||
#else
|
||||
u64 *process_envelope_inner(u64 *cmd, struct Note *note, s32 nSamples, u16 inBuf,
|
||||
struct VolumeChange *vol) {
|
||||
#endif
|
||||
u8 mixerFlags;
|
||||
s32 rampLeft, rampRight;
|
||||
#elif defined(VERSION_EU)
|
||||
@@ -1463,6 +1420,7 @@ u64 *process_envelope(u64 *cmd, struct NoteSubEu *note, struct NoteSynthesisStat
|
||||
// in, dry left, count without A_AUX flag.
|
||||
// dry right, wet left, wet right with A_AUX flag.
|
||||
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
if (note->usesHeadsetPanEffects) {
|
||||
aClearBuffer(cmd++, DMEM_ADDR_NOTE_PAN_TEMP, DEFAULT_LEN_1CH);
|
||||
|
||||
@@ -1502,6 +1460,10 @@ u64 *process_envelope(u64 *cmd, struct NoteSubEu *note, struct NoteSynthesisStat
|
||||
aSetBuffer(cmd++, A_AUX, DMEM_ADDR_RIGHT_CH, DMEM_ADDR_WET_LEFT_CH, DMEM_ADDR_WET_RIGHT_CH);
|
||||
}
|
||||
}
|
||||
#else
|
||||
aSetBuffer(cmd++, 0, inBuf, DMEM_ADDR_LEFT_CH, nSamples * 2);
|
||||
aSetBuffer(cmd++, A_AUX, DMEM_ADDR_RIGHT_CH, DMEM_ADDR_WET_LEFT_CH, DMEM_ADDR_WET_RIGHT_CH);
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_EU
|
||||
if (targetLeft == sourceLeft && targetRight == sourceRight && !note->envMixerNeedsInit) {
|
||||
@@ -1522,17 +1484,17 @@ u64 *process_envelope(u64 *cmd, struct NoteSubEu *note, struct NoteSynthesisStat
|
||||
// but with discretizations of targetVol, sourceVol and arg2.
|
||||
switch (nSamples) {
|
||||
case 128:
|
||||
rampLeft = gVolRampingLhs128[vol->targetLeft >> 8] * gVolRampingRhs128[vol->sourceLeft >> 8];
|
||||
rampRight = gVolRampingLhs128[vol->targetRight >> 8] * gVolRampingRhs128[vol->sourceRight >> 8];
|
||||
rampLeft = gVolRampingLhs128[vol->targetLeft >> (15 - VOL_RAMPING_EXPONENT)] * gVolRampingRhs128[vol->sourceLeft >> (15 - VOL_RAMPING_EXPONENT)];
|
||||
rampRight = gVolRampingLhs128[vol->targetRight >> (15 - VOL_RAMPING_EXPONENT)] * gVolRampingRhs128[vol->sourceRight >> (15 - VOL_RAMPING_EXPONENT)];
|
||||
break;
|
||||
case 144:
|
||||
rampLeft = gVolRampingLhs144[vol->targetLeft >> 8] * gVolRampingRhs144[vol->sourceLeft >> 8];
|
||||
rampRight = gVolRampingLhs144[vol->targetRight >> 8] * gVolRampingRhs144[vol->sourceRight >> 8];
|
||||
rampLeft = gVolRampingLhs144[vol->targetLeft >> (15 - VOL_RAMPING_EXPONENT)] * gVolRampingRhs144[vol->sourceLeft >> (15 - VOL_RAMPING_EXPONENT)];
|
||||
rampRight = gVolRampingLhs144[vol->targetRight >> (15 - VOL_RAMPING_EXPONENT)] * gVolRampingRhs144[vol->sourceRight >> (15 - VOL_RAMPING_EXPONENT)];
|
||||
break;
|
||||
case 136:
|
||||
default:
|
||||
rampLeft = gVolRampingLhs136[vol->targetLeft >> 8] * gVolRampingRhs136[vol->sourceLeft >> 8];
|
||||
rampRight = gVolRampingLhs136[vol->targetRight >> 8] * gVolRampingRhs136[vol->sourceRight >> 8];
|
||||
rampLeft = gVolRampingLhs136[vol->targetLeft >> (15 - VOL_RAMPING_EXPONENT)] * gVolRampingRhs136[vol->sourceLeft >> (15 - VOL_RAMPING_EXPONENT)];
|
||||
rampRight = gVolRampingLhs136[vol->targetRight >> (15 - VOL_RAMPING_EXPONENT)] * gVolRampingRhs136[vol->sourceRight >> (15 - VOL_RAMPING_EXPONENT)];
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@@ -1553,6 +1515,7 @@ u64 *process_envelope(u64 *cmd, struct NoteSubEu *note, struct NoteSynthesisStat
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
#ifdef VERSION_EU
|
||||
if (gUseReverb && note->reverbVol != 0) {
|
||||
aEnvMixer(cmd++, mixerFlags | A_AUX,
|
||||
@@ -1588,9 +1551,16 @@ u64 *process_envelope(u64 *cmd, struct NoteSubEu *note, struct NoteSynthesisStat
|
||||
/*out*/ DMEM_ADDR_RIGHT_CH);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (gSynthesisReverb.useReverb && note->reverbVol != 0) {
|
||||
mixerFlags |= A_AUX;
|
||||
}
|
||||
aEnvMixer(cmd++, mixerFlags, VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->mixEnvelopeState));
|
||||
#endif
|
||||
return cmd;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
#ifdef VERSION_EU
|
||||
u64 *note_apply_headset_pan_effects(u64 *cmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *note, s32 bufLen, s32 flags, s32 leftRight) {
|
||||
#else
|
||||
@@ -1686,6 +1656,7 @@ u64 *note_apply_headset_pan_effects(u64 *cmd, struct Note *note, s32 bufLen, s32
|
||||
|
||||
return cmd;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef VERSION_EU
|
||||
// Moved to playback.c in EU
|
||||
@@ -1695,7 +1666,6 @@ void note_init_volume(struct Note *note) {
|
||||
note->targetVolRight = 0;
|
||||
note->reverbVol = 0;
|
||||
note->reverbVolShifted = 0;
|
||||
note->unused2 = 0;
|
||||
note->curVolLeft = 1;
|
||||
note->curVolRight = 1;
|
||||
note->frequency = 0.0f;
|
||||
@@ -1704,7 +1674,12 @@ void note_init_volume(struct Note *note) {
|
||||
void note_set_vel_pan_reverb(struct Note *note, f32 velocity, f32 pan, u8 reverbVol) {
|
||||
f32 volLeft, volRight;
|
||||
s32 panIndex = (s32)(pan * 127.5f) & 127;
|
||||
if (note->stereoHeadsetEffects && gSoundMode == SOUND_MODE_HEADSET) {
|
||||
|
||||
if (gSoundMode == SOUND_MODE_MONO) {
|
||||
volLeft = 0.707f;
|
||||
volRight = 0.707f;
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
} else if (note->stereoHeadsetEffects && gSoundMode == SOUND_MODE_HEADSET) {
|
||||
s8 smallPanIndex;
|
||||
s8 temp = (s8)(pan * 10.0f);
|
||||
if (temp < 9) {
|
||||
@@ -1734,9 +1709,7 @@ void note_set_vel_pan_reverb(struct Note *note, f32 velocity, f32 pan, u8 reverb
|
||||
}
|
||||
note->stereoStrongRight = strongRight;
|
||||
note->stereoStrongLeft = strongLeft;
|
||||
} else if (gSoundMode == SOUND_MODE_MONO) {
|
||||
volLeft = 0.707f;
|
||||
volRight = 0.707f;
|
||||
#endif
|
||||
} else {
|
||||
volLeft = gDefaultPanVolume[panIndex];
|
||||
volRight = gDefaultPanVolume[127 - panIndex];
|
||||
@@ -1745,8 +1718,8 @@ void note_set_vel_pan_reverb(struct Note *note, f32 velocity, f32 pan, u8 reverb
|
||||
if (velocity < 0) {
|
||||
velocity = 0;
|
||||
}
|
||||
note->targetVolLeft = (u16)(s32)(velocity * volLeft) & ~0x80FF;
|
||||
note->targetVolRight = (u16)(s32)(velocity * volRight) & ~0x80FF;
|
||||
note->targetVolLeft = (u16)(s32)(velocity * volLeft) & VOLRAMPING_MASK;
|
||||
note->targetVolRight = (u16)(s32)(velocity * volRight) & VOLRAMPING_MASK;
|
||||
if (note->targetVolLeft == 0) {
|
||||
note->targetVolLeft++;
|
||||
}
|
||||
@@ -1772,13 +1745,16 @@ void note_enable(struct Note *note) {
|
||||
note->needsInit = TRUE;
|
||||
note->restart = FALSE;
|
||||
note->finished = FALSE;
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
note->stereoStrongRight = FALSE;
|
||||
note->stereoStrongLeft = FALSE;
|
||||
note->usesHeadsetPanEffects = FALSE;
|
||||
note->initFullVelocity = FALSE;
|
||||
note->headsetPanLeft = 0;
|
||||
note->headsetPanRight = 0;
|
||||
note->prevHeadsetPanRight = 0;
|
||||
note->prevHeadsetPanLeft = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void note_disable(struct Note *note) {
|
||||
|
||||
+11
-6
@@ -17,6 +17,12 @@
|
||||
#define MAX_UPDATES_PER_FRAME 4
|
||||
#endif
|
||||
|
||||
enum ChannelIndexes {
|
||||
SYNTH_CHANNEL_LEFT,
|
||||
SYNTH_CHANNEL_RIGHT,
|
||||
SYNTH_CHANNEL_STEREO_COUNT,
|
||||
};
|
||||
|
||||
#ifdef BETTER_REVERB
|
||||
|
||||
#define REVERB_WINDOW_SIZE_MAX 0x2000
|
||||
@@ -25,13 +31,13 @@
|
||||
/* ------------ BETTER REVERB GENERAL PARAMETERS ------------ */
|
||||
|
||||
#define NUM_ALLPASS 12 // Maximum number of delay filters to use with better reverb; do not change this value if you don't know what you're doing.
|
||||
#define BETTER_REVERB_PTR_SIZE ALIGN16(NUM_ALLPASS * sizeof(s32*) * 2) // Allocation space consumed by dynamically allocated pointers
|
||||
#define BETTER_REVERB_PTR_SIZE ALIGN16(NUM_ALLPASS * sizeof(s16*) * SYNTH_CHANNEL_STEREO_COUNT) // Allocation space consumed by dynamically allocated pointers
|
||||
|
||||
// Size determined by (all delaysL/R values * 8) / (2 ^ Minimum Downsample Factor).
|
||||
// Minimum size requirement determined by ((all delaysL and delaysR values) / (2 ^ (downsampleRate - 1)) * sizeof(s16) + BETTER_REVERB_PTR_SIZE).
|
||||
// The default value can be increased or decreased in conjunction with the values in delaysL/R.
|
||||
// This can be significantly decreased if a downsample rate of 1 is not being used or if filter count is less than NUM_ALLPASS,
|
||||
// as this default is configured to handle the emulator RCVI settings.
|
||||
#define BETTER_REVERB_SIZE ALIGN16(0x1E000 + BETTER_REVERB_PTR_SIZE)
|
||||
#define BETTER_REVERB_SIZE ALIGN16(0xEDE0 + BETTER_REVERB_PTR_SIZE)
|
||||
|
||||
|
||||
/* ------ BETTER REVERB LIGHTWEIGHT PARAMETER OVERRIDES ------ */
|
||||
@@ -48,7 +54,7 @@
|
||||
/* ------------ BETTER REVERB EXTERNED VARIABLES ------------ */
|
||||
|
||||
extern u8 toggleBetterReverb;
|
||||
extern u8 gBetterReverbPreset;
|
||||
extern u8 gBetterReverbPresetValue;
|
||||
extern u8 betterReverbLightweight;
|
||||
extern s8 betterReverbDownsampleRate;
|
||||
extern u8 monoReverb;
|
||||
@@ -56,8 +62,7 @@ extern s32 reverbFilterCount;
|
||||
extern s32 betterReverbWindowsSize;
|
||||
extern s32 betterReverbRevIndex;
|
||||
extern s32 betterReverbGainIndex;
|
||||
extern s32 *gReverbMultsL;
|
||||
extern s32 *gReverbMultsR;
|
||||
extern u8 *gReverbMults[SYNTH_CHANNEL_STEREO_COUNT];
|
||||
|
||||
|
||||
/* ------------ BETTER REVERB EXTERNED FUNCTIONS ------------ */
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
+3
-27
@@ -15,7 +15,6 @@
|
||||
#include "game/main.h"
|
||||
#include "game/rumble_init.h"
|
||||
#include "game/version.h"
|
||||
#include "game/vc_check.h"
|
||||
#ifdef UNF
|
||||
#include "usb/usb.h"
|
||||
#include "usb/debug.h"
|
||||
@@ -23,8 +22,7 @@
|
||||
#include "game/puppyprint.h"
|
||||
#include "game/puppylights.h"
|
||||
#include "game/profiling.h"
|
||||
|
||||
#include "game/vc_check.h"
|
||||
#include "game/emutest.h"
|
||||
|
||||
// Message IDs
|
||||
enum MessageIDs {
|
||||
@@ -318,21 +316,6 @@ void alert_rcp_hung_up(void) {
|
||||
error("RCP is HUNG UP!! Oh! MY GOD!!");
|
||||
}
|
||||
|
||||
void check_cache_emulation() {
|
||||
// Disable interrupts to ensure that nothing evicts the variable from cache while we're using it.
|
||||
u32 saved = __osDisableInt();
|
||||
// Create a variable with an initial value of 1. This value will remain cached.
|
||||
volatile u8 sCachedValue = 1;
|
||||
// Overwrite the variable directly in RDRAM without going through cache.
|
||||
// This should preserve its value of 1 in dcache if dcache is emulated correctly.
|
||||
*(u8*)(K0_TO_K1(&sCachedValue)) = 0;
|
||||
// Read the variable back from dcache, if it's still 1 then cache is emulated correctly.
|
||||
// If it's zero, then dcache is not emulated correctly.
|
||||
gCacheEmulated = sCachedValue;
|
||||
// Restore interrupts
|
||||
__osRestoreInt(saved);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increment the first and last values of the stack.
|
||||
* If they're different, that means an error has occured, so trigger a crash.
|
||||
@@ -366,7 +349,7 @@ void thread3_main(UNUSED void *arg) {
|
||||
setup_mesg_queues();
|
||||
alloc_pool();
|
||||
load_engine_code_segment();
|
||||
gIsVC = IS_VC();
|
||||
detect_emulator();
|
||||
#ifndef UNF
|
||||
crash_screen_init();
|
||||
#endif
|
||||
@@ -384,14 +367,8 @@ void thread3_main(UNUSED void *arg) {
|
||||
osSyncPrintf("Linker : %s\n", __linker__);
|
||||
#endif
|
||||
|
||||
if (IO_READ(DPC_CLOCK_REG) == 0) {
|
||||
gIsConsole = FALSE;
|
||||
if (!(gEmulator & EMU_CONSOLE)) {
|
||||
gBorderHeight = BORDER_HEIGHT_EMULATOR;
|
||||
if (!gIsVC) {
|
||||
check_cache_emulation();
|
||||
} else {
|
||||
gCacheEmulated = FALSE;
|
||||
}
|
||||
#ifdef RCVI_HACK
|
||||
VI.comRegs.vSync = 525*20;
|
||||
change_vi(&VI, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
@@ -400,7 +377,6 @@ void thread3_main(UNUSED void *arg) {
|
||||
osViSetSpecialFeatures(OS_VI_GAMMA_OFF);
|
||||
#endif
|
||||
} else {
|
||||
gIsConsole = TRUE;
|
||||
gBorderHeight = BORDER_HEIGHT_CONSOLE;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
|
||||
@@ -419,42 +419,6 @@ void *load_segment_decompress(s32 segment, u8 *srcStart, u8 *srcEnd) {
|
||||
return dest;
|
||||
}
|
||||
|
||||
void *load_segment_decompress_heap(u32 segment, u8 *srcStart, u8 *srcEnd) {
|
||||
UNUSED void *dest = NULL;
|
||||
|
||||
#ifdef GZIP
|
||||
u32 compSize = (srcEnd - 4 - srcStart);
|
||||
#else
|
||||
u32 compSize = ALIGN16(srcEnd - srcStart);
|
||||
#endif
|
||||
u8 *compressed = main_pool_alloc(compSize, MEMORY_POOL_RIGHT);
|
||||
#ifdef GZIP
|
||||
// Decompressed size from end of gzip
|
||||
u32 *size = (u32 *) (compressed + compSize);
|
||||
#endif
|
||||
if (compressed != NULL) {
|
||||
#ifdef UNCOMPRESSED
|
||||
dma_read(gDecompressionHeap, srcStart, srcEnd);
|
||||
#else
|
||||
dma_read(compressed, srcStart, srcEnd);
|
||||
#endif
|
||||
#ifdef GZIP
|
||||
expand_gzip(compressed, gDecompressionHeap, compSize, (u32)size);
|
||||
#elif RNC1
|
||||
Propack_UnpackM1(compressed, gDecompressionHeap);
|
||||
#elif RNC2
|
||||
Propack_UnpackM2(compressed, gDecompressionHeap);
|
||||
#elif YAY0
|
||||
slidstart(compressed, gDecompressionHeap);
|
||||
#elif MIO0
|
||||
decompress(compressed, gDecompressionHeap);
|
||||
#endif
|
||||
set_segment_base_addr(segment, gDecompressionHeap);
|
||||
main_pool_free(compressed);
|
||||
}
|
||||
return gDecompressionHeap;
|
||||
}
|
||||
|
||||
void load_engine_code_segment(void) {
|
||||
void *startAddr = (void *) _engineSegmentStart;
|
||||
u32 totalSize = _engineSegmentEnd - _engineSegmentStart;
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "config.h"
|
||||
#include "audio/synthesis.h"
|
||||
|
||||
ALIGNED8 u8 gDecompressionHeap[0xD000];
|
||||
ALIGNED16 u8 gAudioHeap[DOUBLE_SIZE_ON_64_BIT(AUDIO_HEAP_SIZE)];
|
||||
|
||||
ALIGNED8 u8 gIdleThreadStack[THREAD1_STACK];
|
||||
@@ -20,14 +19,8 @@ ALIGNED8 u8 gThread5Stack[THREAD5_STACK];
|
||||
ALIGNED8 u8 gThread6Stack[THREAD6_STACK];
|
||||
#endif
|
||||
// 0x400 bytes
|
||||
#if UNF
|
||||
ALIGNED16 u8 gGfxSPTaskStack[SP_DRAM_STACK_SIZE8];
|
||||
ALIGNED16 u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE];
|
||||
#else
|
||||
// 0xc00 bytes for f3dex, 0x900 otherwise
|
||||
ALIGNED8 u8 gGfxSPTaskStack[SP_DRAM_STACK_SIZE8];
|
||||
ALIGNED8 u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE];
|
||||
#endif // UNF
|
||||
__attribute__((aligned(32))) u8 gGfxSPTaskStack[SP_DRAM_STACK_SIZE8];
|
||||
__attribute__((aligned(32))) u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE];
|
||||
// 0x200 bytes
|
||||
ALIGNED8 struct SaveBuffer gSaveBuffer;
|
||||
// 0x190a0 bytes
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
#include "config.h"
|
||||
#include "audio/data.h"
|
||||
|
||||
extern u8 gDecompressionHeap[];
|
||||
|
||||
extern u8 gAudioHeap[DOUBLE_SIZE_ON_64_BIT(AUDIO_HEAP_SIZE)];
|
||||
|
||||
extern u8 gIdleThreadStack[THREAD1_STACK];
|
||||
|
||||
@@ -359,7 +359,7 @@ static s32 bhv_cmd_set_int_unused(void) {
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
|
||||
// Command 0x14: Sets the specified field to a random float in the given range.
|
||||
// Command 0x15: Sets the specified field to a random float in the given range.
|
||||
// Usage: SET_RANDOM_FLOAT(field, min, range)
|
||||
static s32 bhv_cmd_set_random_float(void) {
|
||||
u8 field = BHV_CMD_GET_2ND_U8(0);
|
||||
@@ -372,7 +372,7 @@ static s32 bhv_cmd_set_random_float(void) {
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
|
||||
// Command 0x15: Sets the specified field to a random integer in the given range.
|
||||
// Command 0x16: Sets the specified field to a random integer in the given range.
|
||||
// Usage: SET_RANDOM_INT(field, min, range)
|
||||
static s32 bhv_cmd_set_random_int(void) {
|
||||
u8 field = BHV_CMD_GET_2ND_U8(0);
|
||||
@@ -385,7 +385,7 @@ static s32 bhv_cmd_set_random_int(void) {
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
|
||||
// Command 0x13: Gets a random short, right shifts it the specified amount and adds min to it, then sets the specified field to that value.
|
||||
// Command 0x14: Gets a random short, right shifts it the specified amount and adds min to it, then sets the specified field to that value.
|
||||
// Usage: SET_INT_RAND_RSHIFT(field, min, rshift)
|
||||
static s32 bhv_cmd_set_int_rand_rshift(void) {
|
||||
u8 field = BHV_CMD_GET_2ND_U8(0);
|
||||
@@ -398,7 +398,7 @@ static s32 bhv_cmd_set_int_rand_rshift(void) {
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
|
||||
// Command 0x16: Adds a random float in the given range to the specified field.
|
||||
// Command 0x17: Adds a random float in the given range to the specified field.
|
||||
// Usage: ADD_RANDOM_FLOAT(field, min, range)
|
||||
static s32 bhv_cmd_add_random_float(void) {
|
||||
u8 field = BHV_CMD_GET_2ND_U8(0);
|
||||
@@ -411,7 +411,7 @@ static s32 bhv_cmd_add_random_float(void) {
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
|
||||
// Command 0x17: Gets a random short, right shifts it the specified amount and adds min to it, then adds the value to the specified field. Unused.
|
||||
// Command 0x18: Gets a random short, right shifts it the specified amount and adds min to it, then adds the value to the specified field. Unused.
|
||||
// Usage: ADD_INT_RAND_RSHIFT(field, min, rshift)
|
||||
static s32 bhv_cmd_add_int_rand_rshift(void) {
|
||||
u8 field = BHV_CMD_GET_2ND_U8(0);
|
||||
@@ -463,7 +463,20 @@ static s32 bhv_cmd_or_int(void) {
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
|
||||
// Command 0x12: Performs a bit clear with the specified short. Unused.
|
||||
// Command 0x12: Performs a bitwise OR with the specified field and the given (32 bit) integer.
|
||||
// Usually used to set an object's flags which use values above 16 bits.
|
||||
// Usage: OR_LONG(field, value)
|
||||
static s32 bhv_cmd_or_long(void) {
|
||||
u8 field = BHV_CMD_GET_2ND_U8(0);
|
||||
u32 value = BHV_CMD_GET_U32(1);
|
||||
|
||||
cur_obj_or_int(field, value);
|
||||
|
||||
gCurBhvCommand += 2;
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
|
||||
// Command 0x13: Performs a bit clear with the specified short. Unused.
|
||||
// Usage: BIT_CLEAR(field, value)
|
||||
static s32 bhv_cmd_bit_clear(void) {
|
||||
u8 field = BHV_CMD_GET_2ND_U8(0);
|
||||
@@ -510,7 +523,7 @@ static s32 bhv_cmd_drop_to_floor(void) {
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
|
||||
// Command 0x18: No operation. Unused.
|
||||
// Command 0x19: No operation. Unused.
|
||||
// Usage: CMD_NOP_1(field)
|
||||
static s32 bhv_cmd_nop_1(void) {
|
||||
UNUSED u8 field = BHV_CMD_GET_2ND_U8(0);
|
||||
@@ -520,15 +533,6 @@ static s32 bhv_cmd_nop_1(void) {
|
||||
}
|
||||
|
||||
// Command 0x1A: No operation. Unused.
|
||||
// Usage: CMD_NOP_3(field)
|
||||
static s32 bhv_cmd_nop_3(void) {
|
||||
UNUSED u8 field = BHV_CMD_GET_2ND_U8(0);
|
||||
|
||||
gCurBhvCommand++;
|
||||
return BHV_PROC_CONTINUE;
|
||||
}
|
||||
|
||||
// Command 0x19: No operation. Unused.
|
||||
// Usage: CMD_NOP_2(field)
|
||||
static s32 bhv_cmd_nop_2(void) {
|
||||
UNUSED u8 field = BHV_CMD_GET_2ND_U8(0);
|
||||
@@ -773,6 +777,7 @@ static BhvCommandProc BehaviorCmdTable[] = {
|
||||
/*BHV_CMD_ADD_INT */ bhv_cmd_add_int,
|
||||
/*BHV_CMD_SET_INT */ bhv_cmd_set_int,
|
||||
/*BHV_CMD_OR_INT */ bhv_cmd_or_int,
|
||||
/*BHV_CMD_OR_LONG */ bhv_cmd_or_long,
|
||||
/*BHV_CMD_BIT_CLEAR */ bhv_cmd_bit_clear,
|
||||
/*BHV_CMD_SET_INT_RAND_RSHIFT */ bhv_cmd_set_int_rand_rshift,
|
||||
/*BHV_CMD_SET_RANDOM_FLOAT */ bhv_cmd_set_random_float,
|
||||
@@ -781,7 +786,6 @@ static BhvCommandProc BehaviorCmdTable[] = {
|
||||
/*BHV_CMD_ADD_INT_RAND_RSHIFT */ bhv_cmd_add_int_rand_rshift,
|
||||
/*BHV_CMD_NOP_1 */ bhv_cmd_nop_1,
|
||||
/*BHV_CMD_NOP_2 */ bhv_cmd_nop_2,
|
||||
/*BHV_CMD_NOP_3 */ bhv_cmd_nop_3,
|
||||
/*BHV_CMD_SET_MODEL */ bhv_cmd_set_model,
|
||||
/*BHV_CMD_SPAWN_CHILD */ bhv_cmd_spawn_child,
|
||||
/*BHV_CMD_DEACTIVATE */ bhv_cmd_deactivate,
|
||||
|
||||
@@ -261,7 +261,7 @@ void geo_layout_cmd_node_perspective(void) {
|
||||
gGeoLayoutCommand += 4 << CMD_SIZE_SHIFT;
|
||||
}
|
||||
|
||||
graphNode = init_graph_node_perspective(gGraphNodePool, NULL, (f32) fov, near, far, frustumFunc, 0);
|
||||
graphNode = init_graph_node_perspective(gGraphNodePool, NULL, (f32) fov, near, far, frustumFunc);
|
||||
|
||||
register_scene_graph_node(&graphNode->fnNode.node);
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ init_graph_node_ortho_projection(struct AllocOnlyPool *pool, struct GraphNodeOrt
|
||||
struct GraphNodePerspective *init_graph_node_perspective(struct AllocOnlyPool *pool,
|
||||
struct GraphNodePerspective *graphNode,
|
||||
f32 fov, u16 near, u16 far,
|
||||
GraphNodeFunc nodeFunc, s32 unused) {
|
||||
GraphNodeFunc nodeFunc) {
|
||||
if (pool != NULL) {
|
||||
graphNode = alloc_only_pool_alloc(pool, sizeof(struct GraphNodePerspective));
|
||||
}
|
||||
@@ -83,7 +83,6 @@ struct GraphNodePerspective *init_graph_node_perspective(struct AllocOnlyPool *p
|
||||
graphNode->near = near;
|
||||
graphNode->far = far;
|
||||
graphNode->fnNode.func = nodeFunc;
|
||||
graphNode->unused = unused;
|
||||
|
||||
if (nodeFunc != NULL) {
|
||||
nodeFunc(GEO_CONTEXT_CREATE, &graphNode->fnNode.node, pool);
|
||||
|
||||
@@ -131,10 +131,13 @@ struct GraphNodeOrthoProjection {
|
||||
*/
|
||||
struct GraphNodePerspective {
|
||||
/*0x00*/ struct FnGraphNode fnNode;
|
||||
/*0x18*/ s32 unused;
|
||||
/*0x1C*/ f32 fov; // horizontal field of view in degrees
|
||||
/*0x20*/ u16 near; // near clipping plane
|
||||
/*0x22*/ u16 far; // far clipping plane
|
||||
/*0x18*/ f32 fov; // horizontal field of view in degrees
|
||||
/*0x1C*/ u16 near; // near clipping plane
|
||||
/*0x1E*/ u16 far; // far clipping plane
|
||||
/*0x20*/ f32 halfFovHorizontal;
|
||||
#ifdef VERTICAL_CULLING
|
||||
/*0x24*/ f32 halfFovVertical;
|
||||
#endif
|
||||
};
|
||||
|
||||
/** An entry in the master list. It is a linked list of display lists
|
||||
@@ -369,7 +372,7 @@ void init_scene_graph_node_links(struct GraphNode *graphNode, s32 type);
|
||||
|
||||
struct GraphNodeRoot *init_graph_node_root (struct AllocOnlyPool *pool, struct GraphNodeRoot *graphNode, s16 areaIndex, s16 x, s16 y, s16 width, s16 height);
|
||||
struct GraphNodeOrthoProjection *init_graph_node_ortho_projection (struct AllocOnlyPool *pool, struct GraphNodeOrthoProjection *graphNode, f32 scale);
|
||||
struct GraphNodePerspective *init_graph_node_perspective (struct AllocOnlyPool *pool, struct GraphNodePerspective *graphNode, f32 fov, u16 near, u16 far, GraphNodeFunc nodeFunc, s32 unused);
|
||||
struct GraphNodePerspective *init_graph_node_perspective (struct AllocOnlyPool *pool, struct GraphNodePerspective *graphNode, f32 fov, u16 near, u16 far, GraphNodeFunc nodeFunc);
|
||||
struct GraphNodeStart *init_graph_node_start (struct AllocOnlyPool *pool, struct GraphNodeStart *graphNode);
|
||||
struct GraphNodeMasterList *init_graph_node_master_list (struct AllocOnlyPool *pool, struct GraphNodeMasterList *graphNode, s16 on);
|
||||
struct GraphNodeLevelOfDetail *init_graph_node_render_range (struct AllocOnlyPool *pool, struct GraphNodeLevelOfDetail *graphNode, s16 minDistance, s16 maxDistance);
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "game/puppycam2.h"
|
||||
#include "game/puppyprint.h"
|
||||
#include "game/puppylights.h"
|
||||
#include "game/emutest.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
@@ -309,7 +310,7 @@ static void level_cmd_load_mario_head(void) {
|
||||
}
|
||||
|
||||
static void level_cmd_load_yay0_texture(void) {
|
||||
load_segment_decompress_heap(CMD_GET(s16, 2), CMD_GET(void *, 4), CMD_GET(void *, 8));
|
||||
load_segment_decompress(CMD_GET(s16, 2), CMD_GET(void *, 4), CMD_GET(void *, 8));
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
}
|
||||
|
||||
@@ -740,7 +741,7 @@ static void level_cmd_set_music(void) {
|
||||
if (sCurrAreaIndex != -1) {
|
||||
gAreas[sCurrAreaIndex].musicParam = CMD_GET(s16, 2);
|
||||
#ifdef BETTER_REVERB
|
||||
if (gIsConsole)
|
||||
if (gEmulator & EMU_CONSOLE)
|
||||
gAreas[sCurrAreaIndex].betterReverbPreset = CMD_GET(u8, 4);
|
||||
else
|
||||
gAreas[sCurrAreaIndex].betterReverbPreset = CMD_GET(u8, 5);
|
||||
@@ -753,10 +754,10 @@ static void level_cmd_set_music(void) {
|
||||
static void level_cmd_set_menu_music(void) {
|
||||
#ifdef BETTER_REVERB
|
||||
// Must come before set_background_music()
|
||||
if (gIsConsole)
|
||||
gBetterReverbPreset = CMD_GET(u8, 4);
|
||||
if (gEmulator & EMU_CONSOLE)
|
||||
gBetterReverbPresetValue = CMD_GET(u8, 4);
|
||||
else
|
||||
gBetterReverbPreset = CMD_GET(u8, 5);
|
||||
gBetterReverbPresetValue = CMD_GET(u8, 5);
|
||||
#endif
|
||||
set_background_music(0, CMD_GET(s16, 2), 0);
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
@@ -826,9 +827,7 @@ static void level_cmd_puppyvolume(void) {
|
||||
if ((sPuppyVolumeStack[gPuppyVolumeCount] = mem_pool_alloc(gPuppyMemoryPool, sizeof(struct sPuppyVolume))) == NULL) {
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
gPuppyError |= PUPPY_ERROR_POOL_FULL;
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
append_puppyprint_log("Puppycamera volume allocation failed.");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -876,9 +875,7 @@ static void level_cmd_puppylight_node(void) {
|
||||
#ifdef PUPPYLIGHTS
|
||||
gPuppyLights[gNumLights] = mem_pool_alloc(gLightsPool, sizeof(struct PuppyLight));
|
||||
if (gPuppyLights[gNumLights] == NULL) {
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
append_puppyprint_log("Puppylight allocation failed.");
|
||||
#endif
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
return;
|
||||
}
|
||||
@@ -908,6 +905,17 @@ static void level_cmd_puppylight_node(void) {
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
}
|
||||
|
||||
static void level_cmd_set_echo(void) {
|
||||
if (sCurrAreaIndex >= 0 && sCurrAreaIndex < AREA_COUNT) {
|
||||
gAreaData[sCurrAreaIndex].useEchoOverride = TRUE;
|
||||
if (gEmulator & EMU_CONSOLE)
|
||||
gAreaData[sCurrAreaIndex].echoOverride = CMD_GET(s8, 2);
|
||||
else
|
||||
gAreaData[sCurrAreaIndex].echoOverride = CMD_GET(s8, 3);
|
||||
}
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
}
|
||||
|
||||
static void (*LevelScriptJumpTable[])(void) = {
|
||||
/*LEVEL_CMD_LOAD_AND_EXECUTE */ level_cmd_load_and_execute,
|
||||
/*LEVEL_CMD_EXIT_AND_EXECUTE */ level_cmd_exit_and_execute,
|
||||
@@ -974,6 +982,7 @@ static void (*LevelScriptJumpTable[])(void) = {
|
||||
/*LEVEL_CMD_CHANGE_AREA_SKYBOX */ level_cmd_change_area_skybox,
|
||||
/*LEVEL_CMD_PUPPYLIGHT_ENVIRONMENT */ level_cmd_puppylight_environment,
|
||||
/*LEVEL_CMD_PUPPYLIGHT_NODE */ level_cmd_puppylight_node,
|
||||
/*LEVEL_CMD_SET_ECHO */ level_cmd_set_echo,
|
||||
};
|
||||
|
||||
struct LevelCommand *level_script_execute(struct LevelCommand *cmd) {
|
||||
|
||||
+3
-11
@@ -1277,7 +1277,6 @@ s32 anim_spline_poll(Vec3f result) {
|
||||
* RAYCASTING *
|
||||
**************************************************/
|
||||
|
||||
#define RAY_OFFSET 30.0f /* How many units to extrapolate surfaces when testing for a raycast */
|
||||
#define RAY_STEPS 4 /* How many steps to do when casting rays, default to quartersteps. */
|
||||
|
||||
/**
|
||||
@@ -1299,14 +1298,6 @@ s32 ray_surface_intersect(Vec3f orig, Vec3f dir, f32 dir_length, struct Surface
|
||||
vec3s_to_vec3f(v0, surface->vertex1);
|
||||
vec3s_to_vec3f(v1, surface->vertex2);
|
||||
vec3s_to_vec3f(v2, surface->vertex3);
|
||||
// Get surface normal and extend it by RAY_OFFSET.
|
||||
Vec3f norm;
|
||||
surface_normal_to_vec3f(norm, surface);
|
||||
vec3_mul_val(norm, RAY_OFFSET);
|
||||
// Move the face forward by RAY_OFFSET.
|
||||
vec3f_add(v0, norm);
|
||||
vec3f_add(v1, norm);
|
||||
vec3f_add(v2, norm);
|
||||
// Make 'e1' (edge 1) the vector from vertex 0 to vertex 1.
|
||||
Vec3f e1;
|
||||
vec3f_diff(e1, v1, v0);
|
||||
@@ -1406,7 +1397,7 @@ void find_surface_on_ray_cell(s32 cellX, s32 cellZ, Vec3f orig, Vec3f normalized
|
||||
}
|
||||
}
|
||||
|
||||
void find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Vec3f hit_pos, s32 flags) {
|
||||
f32 find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Vec3f hit_pos, s32 flags) {
|
||||
Vec3f normalized_dir;
|
||||
f32 step;
|
||||
s32 i;
|
||||
@@ -1434,7 +1425,7 @@ void find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Ve
|
||||
// Don't do DDA if straight down
|
||||
if ((normalized_dir[1] >= NEAR_ONE) || (normalized_dir[1] <= -NEAR_ONE)) {
|
||||
find_surface_on_ray_cell(cellX, cellZ, orig, normalized_dir, dir_length, hit_surface, hit_pos, &max_length, flags);
|
||||
return;
|
||||
return max_length;
|
||||
}
|
||||
|
||||
// Get cells we cross using DDA
|
||||
@@ -1465,6 +1456,7 @@ void find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Ve
|
||||
find_surface_on_ray_cell(cellPrevX, cellZ, orig, normalized_dir, dir_length, hit_surface, hit_pos, &max_length, flags);
|
||||
}
|
||||
}
|
||||
return max_length;
|
||||
}
|
||||
|
||||
// Constructs a float in registers, which can be faster than gcc's default of loading a float from rodata.
|
||||
|
||||
+35
-19
@@ -451,27 +451,13 @@ extern f32 gSineTable[];
|
||||
|
||||
#define ABS(x) (((x) > 0) ? (x) : -(x))
|
||||
|
||||
/// From Wiseguy
|
||||
ALWAYS_INLINE s32 roundf(f32 in) {
|
||||
f32 tmp;
|
||||
s32 out;
|
||||
__asm__("round.w.s %0,%1" : "=f" (tmp) : "f" (in ));
|
||||
__asm__("mfc1 %0,%1" : "=r" (out) : "f" (tmp));
|
||||
return out;
|
||||
}
|
||||
extern s32 roundf(f32);
|
||||
// backwards compatibility
|
||||
#define round_float(in) roundf(in)
|
||||
|
||||
/// Absolute value
|
||||
ALWAYS_INLINE f32 absf(f32 in) {
|
||||
f32 out;
|
||||
__asm__("abs.s %0,%1" : "=f" (out) : "f" (in));
|
||||
return out;
|
||||
}
|
||||
ALWAYS_INLINE s32 absi(s32 in) {
|
||||
return ABS(in);
|
||||
}
|
||||
#define abss absi
|
||||
#define absf ABS
|
||||
#define absi ABS
|
||||
#define abss ABS
|
||||
|
||||
#define FLT_IS_NONZERO(x) (absf(x) > NEAR_ZERO)
|
||||
|
||||
@@ -606,6 +592,36 @@ f32 atan2f(f32 a, f32 b);
|
||||
void spline_get_weights(Vec4f result, f32 t, UNUSED s32 c);
|
||||
void anim_spline_init(Vec4s *keyFrames);
|
||||
s32 anim_spline_poll(Vec3f result);
|
||||
void find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Vec3f hit_pos, s32 flags);
|
||||
f32 find_surface_on_ray(Vec3f orig, Vec3f dir, struct Surface **hit_surface, Vec3f hit_pos, s32 flags);
|
||||
|
||||
ALWAYS_INLINE f32 remap(f32 x, f32 fromA, f32 toA, f32 fromB, f32 toB) {
|
||||
return (x - fromA) / (toA - fromA) * (toB - fromB) + fromB;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE f32 lerpf(f32 from, f32 to, f32 amount) {
|
||||
return (from + (to - from) * amount);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE f32 to_smoothstop(f32 x) {
|
||||
f32 sq = sqr(1.0f - x);
|
||||
return 1.0f - sq;
|
||||
}
|
||||
|
||||
// Commonly known as ease-in
|
||||
ALWAYS_INLINE f32 smoothstart(f32 from, f32 to, f32 amount) {
|
||||
return lerpf(from, to, sqr(amount));
|
||||
}
|
||||
|
||||
// Commonly known as ease-out
|
||||
ALWAYS_INLINE f32 smoothstop(f32 from, f32 to, f32 amount) {
|
||||
return lerpf(from, to, to_smoothstop(amount));
|
||||
}
|
||||
|
||||
// Commonly known as ease-in-out
|
||||
ALWAYS_INLINE f32 smoothstep(f32 from, f32 to, f32 amount) {
|
||||
amount = sqr(amount) * (3.0f - 2.0f * amount);
|
||||
|
||||
return lerpf(from, to, amount);
|
||||
}
|
||||
|
||||
#endif // MATH_UTIL_H
|
||||
+32
-17
@@ -14,6 +14,7 @@
|
||||
#include "game/object_list_processor.h"
|
||||
#include "surface_load.h"
|
||||
#include "game/puppyprint.h"
|
||||
#include "game/debug.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
@@ -119,6 +120,7 @@ static void clear_static_surfaces(void) {
|
||||
*/
|
||||
static void add_surface_to_cell(s32 dynamic, s32 cellX, s32 cellZ, struct Surface *surface) {
|
||||
struct SurfaceNode *list;
|
||||
s32 priority;
|
||||
s32 sortDir = 1; // highest to lowest, then insertion order (water and floors)
|
||||
s32 listIndex;
|
||||
|
||||
@@ -134,6 +136,7 @@ static void add_surface_to_cell(s32 dynamic, s32 cellX, s32 cellZ, struct Surfac
|
||||
sortDir = 0; // insertion order
|
||||
}
|
||||
|
||||
s32 surfacePriority = surface->upperY * sortDir;
|
||||
|
||||
struct SurfaceNode *newNode = alloc_surface_node(dynamic);
|
||||
newNode->surface = surface;
|
||||
@@ -155,18 +158,14 @@ static void add_surface_to_cell(s32 dynamic, s32 cellX, s32 cellZ, struct Surfac
|
||||
}
|
||||
|
||||
// Loop until we find the appropriate place for the surface in the list.
|
||||
if (listIndex == SPATIAL_PARTITION_WATER) {
|
||||
s32 surfacePriority = surface->upperY * sortDir;
|
||||
s32 priority;
|
||||
while (list->next != NULL) {
|
||||
priority = list->next->surface->upperY * sortDir;
|
||||
while (list->next != NULL) {
|
||||
priority = list->next->surface->upperY * sortDir;
|
||||
|
||||
if (surfacePriority > priority) {
|
||||
break;
|
||||
}
|
||||
|
||||
list = list->next;
|
||||
if (surfacePriority > priority) {
|
||||
break;
|
||||
}
|
||||
|
||||
list = list->next;
|
||||
}
|
||||
|
||||
newNode->next = list->next;
|
||||
@@ -273,6 +272,7 @@ static struct Surface *read_surface_data(TerrainData *vertexData, TerrainData **
|
||||
|
||||
f32 mag = (sqr(n[0]) + sqr(n[1]) + sqr(n[2]));
|
||||
// This will never need to be run for custom levels because Fast64 does this step before exporting.
|
||||
// assert(mag >= NEAR_ZERO, "Denorm tri was found.");
|
||||
#ifdef ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS
|
||||
if (mag < NEAR_ZERO) {
|
||||
return NULL;
|
||||
@@ -568,6 +568,8 @@ void load_area_terrain(s32 index, TerrainData *data, RoomData *surfaceRooms, s16
|
||||
void clear_dynamic_surfaces(void) {
|
||||
PUPPYPRINT_GET_SNAPSHOT();
|
||||
if (!(gTimeStopState & TIME_STOP_ACTIVE)) {
|
||||
clear_dynamic_surface_references();
|
||||
|
||||
gSurfacesAllocated = gNumStaticSurfaces;
|
||||
gSurfaceNodesAllocated = gNumStaticSurfaceNodes;
|
||||
gDynamicSurfacePoolEnd = gDynamicSurfacePool;
|
||||
@@ -697,13 +699,11 @@ static TerrainData sVertexData[600];
|
||||
void load_object_collision_model(void) {
|
||||
PUPPYPRINT_GET_SNAPSHOT();
|
||||
TerrainData *collisionData = o->collisionData;
|
||||
f32 marioDist = o->oDistanceToMario;
|
||||
|
||||
// On an object's first frame, the distance is set to 19000.0f.
|
||||
// If the distance hasn't been updated, update it now.
|
||||
if (o->oDistanceToMario == 19000.0f) {
|
||||
marioDist = dist_between_objects(o, gMarioObject);
|
||||
}
|
||||
f32 sqrLateralDist;
|
||||
vec3f_get_lateral_dist_squared(&o->oPosVec, &gMarioObject->oPosVec, &sqrLateralDist);
|
||||
|
||||
f32 verticalMarioDiff = gMarioObject->oPosY - o->oPosY;
|
||||
|
||||
#ifdef AUTO_COLLISION_DISTANCE
|
||||
if (!(o->oFlags & OBJ_FLAG_DONT_CALC_COLL_DIST)) {
|
||||
@@ -716,11 +716,17 @@ void load_object_collision_model(void) {
|
||||
if (o->oCollisionDistance > o->oDrawingDistance) {
|
||||
o->oDrawingDistance = o->oCollisionDistance;
|
||||
}
|
||||
|
||||
s32 inColRadius = (
|
||||
(sqrLateralDist < sqr(o->oCollisionDistance))
|
||||
&& (verticalMarioDiff > 0 || verticalMarioDiff > -o->oCollisionDistance)
|
||||
&& (verticalMarioDiff < 0 || verticalMarioDiff < o->oCollisionDistance + 2000.f)
|
||||
);
|
||||
|
||||
// Update if no Time Stop, in range, and in the current room.
|
||||
if (
|
||||
!(gTimeStopState & TIME_STOP_ACTIVE)
|
||||
&& (marioDist < o->oCollisionDistance)
|
||||
&& inColRadius
|
||||
&& !(o->activeFlags & ACTIVE_FLAG_IN_DIFFERENT_ROOM)
|
||||
) {
|
||||
collisionData++;
|
||||
@@ -731,6 +737,15 @@ void load_object_collision_model(void) {
|
||||
load_object_surfaces(&collisionData, sVertexData, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
f32 marioDist = o->oDistanceToMario;
|
||||
|
||||
// On an object's first frame, the distance is set to 19000.0f.
|
||||
// If the distance hasn't been updated, update it now.
|
||||
if (marioDist == 19000.0f) {
|
||||
marioDist = dist_between_objects(o, gMarioObject);
|
||||
}
|
||||
|
||||
COND_BIT((marioDist < o->oDrawingDistance), o->header.gfx.node.flags, GRAPH_RENDER_ACTIVE);
|
||||
profiler_collision_update(first);
|
||||
}
|
||||
|
||||
+39
-14
@@ -26,6 +26,9 @@
|
||||
#include "debug_box.h"
|
||||
#include "engine/colors.h"
|
||||
#include "profiling.h"
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
#include "s2d_engine/init.h"
|
||||
#endif
|
||||
|
||||
struct SpawnInfo gPlayerSpawnInfos[1];
|
||||
struct GraphNode *gGraphNodePointers[MODEL_ID_COUNT];
|
||||
@@ -205,6 +208,8 @@ void clear_areas(void) {
|
||||
gAreaData[i].dialog[1] = DIALOG_NONE;
|
||||
gAreaData[i].musicParam = 0;
|
||||
gAreaData[i].musicParam2 = 0;
|
||||
gAreaData[i].useEchoOverride = FALSE;
|
||||
gAreaData[i].echoOverride = 0;
|
||||
#ifdef BETTER_REVERB
|
||||
gAreaData[i].betterReverbPreset = 0;
|
||||
#endif
|
||||
@@ -344,22 +349,34 @@ void play_transition(s16 transType, s16 time, Color red, Color green, Color blue
|
||||
gWarpTransition.data.endTexX = SCREEN_CENTER_X;
|
||||
gWarpTransition.data.endTexY = SCREEN_CENTER_Y;
|
||||
|
||||
gWarpTransition.data.texTimer = 0;
|
||||
gWarpTransition.data.angleSpeed = DEGREES(0);
|
||||
|
||||
s16 fullRadius = GFX_DIMENSIONS_FULL_RADIUS;
|
||||
|
||||
// HackerSM64: this fixes the pop-in with texture transition, comment out this switch
|
||||
// statement if you want to restore the original full radius.
|
||||
switch (transType){
|
||||
case WARP_TRANSITION_TYPE_BOWSER:
|
||||
case WARP_TRANSITION_FADE_INTO_BOWSER:
|
||||
fullRadius *= 4;
|
||||
break;
|
||||
|
||||
case WARP_TRANSITION_FADE_FROM_MARIO:
|
||||
case WARP_TRANSITION_FADE_INTO_MARIO:
|
||||
|
||||
case WARP_TRANSITION_FADE_FROM_STAR:
|
||||
case WARP_TRANSITION_FADE_INTO_STAR:
|
||||
fullRadius *= 1.5f;
|
||||
break;
|
||||
}
|
||||
|
||||
if (transType & WARP_TRANSITION_FADE_INTO) { // Is the image fading in?
|
||||
gWarpTransition.data.startTexRadius = GFX_DIMENSIONS_FULL_RADIUS;
|
||||
if (transType >= WARP_TRANSITION_FADES_INTO_LARGE) {
|
||||
gWarpTransition.data.endTexRadius = 16;
|
||||
} else {
|
||||
gWarpTransition.data.endTexRadius = 0;
|
||||
}
|
||||
gWarpTransition.data.startTexRadius = fullRadius;
|
||||
gWarpTransition.data.endTexRadius = 0;
|
||||
|
||||
} else { // The image is fading out. (Reverses start & end circles)
|
||||
if (transType >= WARP_TRANSITION_FADES_FROM_LARGE) {
|
||||
gWarpTransition.data.startTexRadius = 16;
|
||||
} else {
|
||||
gWarpTransition.data.startTexRadius = 0;
|
||||
}
|
||||
gWarpTransition.data.endTexRadius = GFX_DIMENSIONS_FULL_RADIUS;
|
||||
gWarpTransition.data.startTexRadius = 0;
|
||||
gWarpTransition.data.endTexRadius = fullRadius;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -414,7 +431,7 @@ void render_game(void) {
|
||||
|
||||
if (gWarpTransition.isActive) {
|
||||
if (gWarpTransDelay == 0) {
|
||||
gWarpTransition.isActive = !render_screen_transition(0, gWarpTransition.type, gWarpTransition.time,
|
||||
gWarpTransition.isActive = !render_screen_transition(gWarpTransition.type, gWarpTransition.time,
|
||||
&gWarpTransition.data);
|
||||
if (!gWarpTransition.isActive) {
|
||||
if (gWarpTransition.type & WARP_TRANSITION_FADE_INTO) {
|
||||
@@ -427,6 +444,14 @@ void render_game(void) {
|
||||
gWarpTransDelay--;
|
||||
}
|
||||
}
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
s2d_init();
|
||||
|
||||
// place any custom text engine code here if not using deferred prints
|
||||
|
||||
s2d_handle_deferred();
|
||||
s2d_stop();
|
||||
#endif
|
||||
} else {
|
||||
render_text_labels();
|
||||
#ifdef PUPPYPRINT
|
||||
|
||||
+4
-2
@@ -73,8 +73,10 @@ struct Area {
|
||||
/*0x34*/ u8 dialog[2]; // Level start dialog number (set by level script cmd 0x30)
|
||||
/*0x36*/ u16 musicParam;
|
||||
/*0x38*/ u16 musicParam2;
|
||||
/*0x3A*/ u8 useEchoOverride; // Should area echo be overridden using echoOverride?
|
||||
/*0x3B*/ s8 echoOverride; // Value used to override the area echo values defined in level_defines.h
|
||||
#ifdef BETTER_REVERB
|
||||
/*0x3A*/ u8 betterReverbPreset;
|
||||
/*0x3C*/ u8 betterReverbPreset;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -91,7 +93,7 @@ struct WarpTransitionData {
|
||||
/*0x0C*/ s16 endTexX;
|
||||
/*0x0E*/ s16 endTexY;
|
||||
|
||||
/*0x10*/ s16 texTimer; // always 0, does seems to affect transition when disabled
|
||||
/*0x10*/ s16 angleSpeed;
|
||||
};
|
||||
|
||||
enum WarpTransitionFadeDirections {
|
||||
|
||||
@@ -380,6 +380,7 @@ void bhv_hidden_red_coin_star_init(void);
|
||||
void bhv_hidden_red_coin_star_loop(void);
|
||||
void bhv_red_coin_init(void);
|
||||
void bhv_red_coin_loop(void);
|
||||
void bhv_bowser_course_red_coin_star_init(void);
|
||||
void bhv_bowser_course_red_coin_star_loop(void);
|
||||
void bhv_hidden_star_init(void);
|
||||
void bhv_hidden_star_loop(void);
|
||||
|
||||
@@ -47,12 +47,24 @@ void bhv_hidden_star_trigger_loop(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void bhv_bowser_course_red_coin_star_init(void) {
|
||||
if (o->oBehParams2ndByte != 0) {
|
||||
o->oHiddenStarTriggerTotal = o->oBehParams2ndByte;
|
||||
o->oHiddenStarTriggerCounter = gRedCoinsCollected;
|
||||
}
|
||||
else {
|
||||
s16 numRedCoinsRemaining = count_objects_with_behavior(bhvRedCoin);
|
||||
o->oHiddenStarTriggerTotal = numRedCoinsRemaining + gRedCoinsCollected;
|
||||
o->oHiddenStarTriggerCounter = o->oHiddenStarTriggerTotal - numRedCoinsRemaining;
|
||||
}
|
||||
}
|
||||
|
||||
void bhv_bowser_course_red_coin_star_loop(void) {
|
||||
gRedCoinsCollected = o->oHiddenStarTriggerCounter;
|
||||
|
||||
switch (o->oAction) {
|
||||
case 0:
|
||||
if (o->oHiddenStarTriggerCounter == 8) {
|
||||
if (o->oHiddenStarTriggerCounter == o->oHiddenStarTriggerTotal) {
|
||||
o->oAction = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -361,7 +361,7 @@ void bhv_klepto_update(void) {
|
||||
if (o->oAnimState == KLEPTO_ANIM_STATE_HOLDING_CAP) {
|
||||
save_file_clear_flags(SAVE_FLAG_CAP_ON_KLEPTO);
|
||||
spawn_object(o, MODEL_MARIOS_CAP, bhvNormalCap);
|
||||
} else if (o->oAnimState == KLEPTO_ANIM_STATE_HOLDING_STAR) {
|
||||
} else if (o->oAnimState == KLEPTO_ANIM_STATE_HOLDING_STAR || o->oAnimState == KLEPTO_ANIM_STATE_HOLDING_TRANSPARENT_STAR) {
|
||||
spawn_default_star(-5550.0f, 300.0f, -930.0f);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
void bhv_orange_number_init(void) {
|
||||
o->oAnimState = o->oBehParams2ndByte;
|
||||
o->oVelY = 26.0f;
|
||||
o->oHomeY = o->oPosY;
|
||||
}
|
||||
|
||||
void bhv_orange_number_loop(void) {
|
||||
@@ -16,6 +17,13 @@ void bhv_orange_number_loop(void) {
|
||||
o->oVelY = 14.0f;
|
||||
}
|
||||
|
||||
s32 offsetX, offsetZ;
|
||||
offsetX = o->oOrangeNumberOffset * sins(gCamera->nextYaw + 0x4000);
|
||||
offsetZ = o->oOrangeNumberOffset * coss(gCamera->nextYaw + 0x4000);
|
||||
|
||||
o->oPosX = o->oHomeX + offsetX;
|
||||
o->oPosZ = o->oHomeZ + offsetZ;
|
||||
|
||||
if (o->oTimer == 35) {
|
||||
struct Object *sparkleObj = spawn_object(o, MODEL_SPARKLES, bhvCoinSparklesSpawner);
|
||||
sparkleObj->oPosY -= 30.0f;
|
||||
|
||||
@@ -50,18 +50,35 @@ void bhv_red_coin_loop(void) {
|
||||
o->parentObj->oHiddenStarTriggerCounter++;
|
||||
|
||||
// Spawn the orange number counter, as long as it isn't the last coin.
|
||||
if (o->parentObj->oHiddenStarTriggerCounter != 8) {
|
||||
spawn_orange_number(o->parentObj->oHiddenStarTriggerCounter, 0, 0, 0);
|
||||
if (o->parentObj->oHiddenStarTriggerCounter != o->parentObj->oHiddenStarTriggerTotal) {
|
||||
// Cap visible count to 99
|
||||
if (o->parentObj->oHiddenStarTriggerCounter > 99) {
|
||||
spawn_orange_number(9, 28, 0, 0);
|
||||
spawn_orange_number(9, -28, 0, 0);
|
||||
}
|
||||
else if (o->parentObj->oHiddenStarTriggerCounter >= 10) {
|
||||
spawn_orange_number(o->parentObj->oHiddenStarTriggerCounter % 10, 28, 0, 0);
|
||||
spawn_orange_number(o->parentObj->oHiddenStarTriggerCounter / 10, -28, 0, 0);
|
||||
}
|
||||
else {
|
||||
spawn_orange_number(o->parentObj->oHiddenStarTriggerCounter, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef JP_RED_COIN_SOUND
|
||||
// For JP version, play an identical sound for all coins.
|
||||
create_sound_spawner(SOUND_GENERAL_RED_COIN);
|
||||
#else
|
||||
// On all versions but the JP version, each coin collected plays a higher noise.
|
||||
play_sound(SOUND_MENU_COLLECT_RED_COIN
|
||||
+ (((u8) o->parentObj->oHiddenStarTriggerCounter - 1) << 16),
|
||||
gGlobalSoundSource);
|
||||
if (o->parentObj->oHiddenStarTriggerTotal - o->parentObj->oHiddenStarTriggerCounter > 7) {
|
||||
// Play the first red coin sound until it gets to the final 8
|
||||
play_sound(SOUND_MENU_COLLECT_RED_COIN, gGlobalSoundSource);
|
||||
}
|
||||
else {
|
||||
// On all versions but the JP version, each coin collected plays a higher noise.
|
||||
play_sound(SOUND_MENU_COLLECT_RED_COIN
|
||||
+ (((u8) 7 - (o->parentObj->oHiddenStarTriggerTotal - o->parentObj->oHiddenStarTriggerCounter)) << 16),
|
||||
gGlobalSoundSource);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -157,14 +157,27 @@ void bhv_hidden_red_coin_star_init(void) {
|
||||
spawn_object(o, MODEL_TRANSPARENT_STAR, bhvRedCoinStarMarker);
|
||||
}
|
||||
|
||||
s16 numRedCoinsRemaining = count_objects_with_behavior(bhvRedCoin);
|
||||
if (numRedCoinsRemaining == 0) {
|
||||
starObj = spawn_object_abs_with_rot(o, 0, MODEL_STAR, bhvStar, o->oPosX, o->oPosY, o->oPosZ, 0, 0, 0);
|
||||
starObj->oBehParams = o->oBehParams;
|
||||
o->activeFlags = ACTIVE_FLAG_DEACTIVATED;
|
||||
// check if bparam2 specifies a total number of coins that should spawn the star
|
||||
if (o->oBehParams2ndByte != 0) {
|
||||
o->oHiddenStarTriggerTotal = o->oBehParams2ndByte;
|
||||
o->oHiddenStarTriggerCounter = gRedCoinsCollected;
|
||||
if (o->oHiddenStarTriggerCounter >= o->oHiddenStarTriggerTotal) {
|
||||
starObj = spawn_object_abs_with_rot(o, 0, MODEL_STAR, bhvStar, o->oPosX, o->oPosY, o->oPosZ, 0, 0, 0);
|
||||
starObj->oBehParams = o->oBehParams;
|
||||
o->activeFlags = ACTIVE_FLAG_DEACTIVATED;
|
||||
}
|
||||
}
|
||||
|
||||
o->oHiddenStarTriggerCounter = 8 - numRedCoinsRemaining;
|
||||
else {
|
||||
s16 numRedCoinsRemaining = count_objects_with_behavior(bhvRedCoin);
|
||||
if (numRedCoinsRemaining == 0) {
|
||||
starObj = spawn_object_abs_with_rot(o, 0, MODEL_STAR, bhvStar, o->oPosX, o->oPosY, o->oPosZ, 0, 0, 0);
|
||||
starObj->oBehParams = o->oBehParams;
|
||||
o->activeFlags = ACTIVE_FLAG_DEACTIVATED;
|
||||
}
|
||||
o->oHiddenStarTriggerTotal = numRedCoinsRemaining + gRedCoinsCollected;
|
||||
o->oHiddenStarTriggerCounter = o->oHiddenStarTriggerTotal - numRedCoinsRemaining;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void bhv_hidden_red_coin_star_loop(void) {
|
||||
@@ -172,7 +185,7 @@ void bhv_hidden_red_coin_star_loop(void) {
|
||||
|
||||
switch (o->oAction) {
|
||||
case HIDDEN_STAR_ACT_INACTIVE:
|
||||
if (o->oHiddenStarTriggerCounter == 8) {
|
||||
if (o->oHiddenStarTriggerCounter == o->oHiddenStarTriggerTotal) {
|
||||
o->oAction = HIDDEN_STAR_ACT_ACTIVE;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
#include "emutest.h"
|
||||
|
||||
#include <PR/os_internal_reg.h>
|
||||
#include <PR/os_internal_si.h>
|
||||
#include <PR/os_message.h>
|
||||
#include <PR/os_pi.h>
|
||||
#include <PR/R4300.h>
|
||||
#include <ultra64.h>
|
||||
#include <string.h>
|
||||
#include "emutest_vc.h"
|
||||
#include "types.h"
|
||||
|
||||
extern OSMesgQueue gSIEventMesgQueue;
|
||||
extern u8 __osContPifRam[];
|
||||
extern u8 __osContLastCmd;
|
||||
extern void __osSiGetAccess(void);
|
||||
extern void __osSiRelAccess(void);
|
||||
extern void __osPiGetAccess(void);
|
||||
extern void __osPiRelAccess(void);
|
||||
|
||||
enum Emulator gEmulator = EMU_CONSOLE;
|
||||
|
||||
u32 pj64_get_count_factor_asm(void); // defined in asm/pj64_get_count_factor_asm.s
|
||||
|
||||
static inline u32 check_count_factor() {
|
||||
const u32 saved = __osDisableInt();
|
||||
const u32 cf = pj64_get_count_factor_asm();
|
||||
__osRestoreInt(saved);
|
||||
return cf;
|
||||
}
|
||||
|
||||
static inline enum Emulator get_pj64_version() {
|
||||
// When calling this function, we know that the emulator is some version of Project 64,
|
||||
// and it isn't using the PJ64 4.0 interpreter core. Figure out which version it is.
|
||||
|
||||
// PJ64 4.0 dynarec core doesn't update the COUNT register correctly within recompiled functions
|
||||
if (check_count_factor() == 0) {
|
||||
return EMU_PROJECT64_4;
|
||||
}
|
||||
|
||||
// Instead of implementing this PIF command correctly, PJ64 versions prior to 3.0 just have
|
||||
// a set of hardcoded values for some requests. At least one of these hardcoded values has a
|
||||
// typo in it, making it give an incorrect result.
|
||||
__osSiGetAccess();
|
||||
u32 *pifRam32 = (u32*)__osContPifRam;
|
||||
for (s32 i = 0; i < 15; i++) pifRam32[i] = 0;
|
||||
pifRam32[15] = 2;
|
||||
|
||||
const u8 cicTest[] = {
|
||||
0x0F, 0x0F,
|
||||
0xEC, 0x3C, 0xB6, 0x76, 0xB8, 0x1D, 0xBB, 0x8F,
|
||||
0x6B, 0x3A, 0x80, 0xEC, 0xED, 0xEA, 0x5B
|
||||
};
|
||||
|
||||
memcpy(&__osContPifRam[46], cicTest, 17);
|
||||
|
||||
__osSiRawStartDma(OS_WRITE, __osContPifRam);
|
||||
osRecvMesg(&gSIEventMesgQueue, NULL, OS_MESG_BLOCK);
|
||||
__osContLastCmd = 254;
|
||||
|
||||
__osSiRawStartDma(OS_READ, __osContPifRam);
|
||||
osRecvMesg(&gSIEventMesgQueue, NULL, OS_MESG_BLOCK);
|
||||
const u8 pifCheck = __osContPifRam[54];
|
||||
__osSiRelAccess();
|
||||
|
||||
// check for the typo'd byte
|
||||
return (pifCheck == 0xB0) ? EMU_PROJECT64_1_OR_2 : EMU_PROJECT64_3;
|
||||
}
|
||||
|
||||
static u8 check_cache_emulation() {
|
||||
// Disable interrupts to ensure that nothing evicts the variable from cache while we're using it.
|
||||
u32 saved = __osDisableInt();
|
||||
// Create a variable with an initial value of 1. This value will remain cached.
|
||||
volatile u8 sCachedValue = 1;
|
||||
// Overwrite the variable directly in RDRAM without going through cache.
|
||||
// This should preserve its value of 1 in dcache if dcache is emulated correctly.
|
||||
*(u8*)(K0_TO_K1(&sCachedValue)) = 0;
|
||||
// Read the variable back from dcache, if it's still 1 then cache is emulated correctly.
|
||||
// If it's zero, then dcache is not emulated correctly.
|
||||
const u8 cacheEmulated = sCachedValue;
|
||||
// Restore interrupts
|
||||
__osRestoreInt(saved);
|
||||
return cacheEmulated;
|
||||
}
|
||||
|
||||
void detect_emulator() {
|
||||
if ((u32)IO_READ(DPC_PIPEBUSY_REG) | (u32)IO_READ(DPC_TMEM_REG) | (u32)IO_READ(DPC_BUFBUSY_REG)) {
|
||||
gEmulator = EMU_CONSOLE;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* This check forces RTZ bug on vc
|
||||
* If console is N64/adequate Emu round-to-nearest (RTN) rounding mode is used
|
||||
* If console is VC round-to-zero (RTZ) mode is used
|
||||
*
|
||||
* The double value 0.9999999999999999 used is 0x3FEFFFFFFFFFFFFF in binary
|
||||
* Exponent=01111111110, Mantissa=1111111111111111111111111111111111111111111111111111
|
||||
* RTZ will output not 1.0f, RTN will output exactly 1.0f
|
||||
*/
|
||||
if (1.0f != round_double_to_float(0.9999999999999999)) {
|
||||
gEmulator = EMU_WIIVC;
|
||||
return;
|
||||
}
|
||||
|
||||
// Perform a read from unmapped PIF ram.
|
||||
// On console and well behaved emulators, this echos back the lower half of
|
||||
// the requested memory address, repeating it if a whole word is requested.
|
||||
// So in this case, it should result in 0x01040104
|
||||
u32 magic;
|
||||
osPiReadIo(0x1fd00104u, &magic);
|
||||
if (magic == 0u) {
|
||||
// Older versions of mupen (and pre-2.12 ParallelN64) just always read 0
|
||||
gEmulator = EMU_MUPEN_OLD;
|
||||
return;
|
||||
} else if (magic != 0x01040104u) {
|
||||
// cen64 does... something. The result is consistent, but not what it should be
|
||||
gEmulator = EMU_CEN64;
|
||||
return;
|
||||
}
|
||||
|
||||
__osPiGetAccess();
|
||||
while (IO_READ(PI_STATUS_REG) & (PI_STATUS_DMA_BUSY|PI_STATUS_IO_BUSY));
|
||||
const u16 halfMagic = *((volatile u16*)0xbfd00106u);
|
||||
__osPiRelAccess();
|
||||
|
||||
// Now do a halfword read instead.
|
||||
switch (halfMagic) {
|
||||
// This is the correct result (echo back the lower half of the requested address)
|
||||
case 0x0106: {
|
||||
// Test to see if the libpl emulator extension is present.
|
||||
osPiWriteIo(0x1ffb0000u, 0u);
|
||||
osPiReadIo(0x1ffb0000u, &magic);
|
||||
if (magic == 0x00500000u) {
|
||||
// libpl is supported. Must be ParallelN64
|
||||
gEmulator = EMU_PARALLELN64;
|
||||
return;
|
||||
}
|
||||
|
||||
// If the cache is emulated, it's Ares
|
||||
if (check_cache_emulation()) {
|
||||
gEmulator = EMU_ARES;
|
||||
return;
|
||||
}
|
||||
|
||||
// its the Project64 4.0 interpreter core
|
||||
gEmulator = EMU_PROJECT64_4;
|
||||
return;
|
||||
}
|
||||
// This looks like it should be the expected result considering what we got when we
|
||||
// requested the whole word, but that's actually wrong. Later versions of mupen
|
||||
// (and the Simple64 fork of it) get this wrong.
|
||||
case 0x0104:
|
||||
gEmulator = check_cache_emulation() ? EMU_SIMPLE64 : EMU_MUPEN64PLUS_NEXT;
|
||||
return;
|
||||
// If reading a word gives the correct response, but reading a halfword always gives 0,
|
||||
// then we are dealing with some version of Project 64. Call into this helper function
|
||||
// to find out which version we're dealing with.
|
||||
case 0x0000:
|
||||
gEmulator = get_pj64_version();
|
||||
return;
|
||||
// No known emulator gives any other value. If we somehow manage to get here, just return 0
|
||||
default:
|
||||
gEmulator = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
#ifndef EMUTEST_H
|
||||
#define EMUTEST_H
|
||||
|
||||
enum Emulator {
|
||||
EMU_WIIVC = 0x0001,
|
||||
EMU_PROJECT64_ANY = 0x001E,
|
||||
EMU_PROJECT64_1_OR_2 = 0x0006, // PJ64 1.6 or similar (up to 2.3)
|
||||
EMU_PROJECT64_3 = 0x0008, // PJ64 3.X
|
||||
EMU_PROJECT64_4 = 0x0010, // PJ64 4.0 or later
|
||||
EMU_MUPEN_BASED = 0x0060, // mupen64plus or pre-2.12 paralleln64, but NOT simple64 or new paralleln64
|
||||
EMU_MUPEN_OLD = 0x0020, // Nemu64 and pre-2.12 paralleln64 will also get detected as this
|
||||
EMU_MUPEN64PLUS_NEXT = 0x040,
|
||||
EMU_CEN64 = 0x0080,
|
||||
EMU_SIMPLE64 = 0x0100,
|
||||
EMU_PARALLELN64 = 0x0200, // ParallelN64 2.12 or later
|
||||
EMU_ARES = 0x0400,
|
||||
EMU_CONSOLE = 0x0800
|
||||
};
|
||||
|
||||
// initializes gEmulator
|
||||
extern void detect_emulator();
|
||||
|
||||
/* gEmulator is an enum that identifies the current emulator.
|
||||
* The enum values work as a bitfield, so you can use the & and | operators
|
||||
* to test for multiple emulators or versions at once.
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* Test for any version of PJ64:
|
||||
* if (gEmulator & EMU_PROJECT64_ANY)
|
||||
*
|
||||
* Test for only PJ64 < 3.0:
|
||||
* if (gEmulator & EMU_PROJECT64_1_OR_2)
|
||||
*
|
||||
* Test for Console, Ares, or ParallelN64:
|
||||
* if (gEmulator & (EMU_CONSOLE | EMU_ARES | EMU_PARALLELN64))
|
||||
*/
|
||||
extern enum Emulator gEmulator;
|
||||
|
||||
// Included for backwards compatibility when upgrading from HackerSM64 2.0
|
||||
#define gIsConsole ((gEmulator & EMU_CONSOLE) != 0)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,5 @@
|
||||
#include "emutest_vc.h"
|
||||
|
||||
f32 round_double_to_float(f64 v) {
|
||||
return v;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef EMUTEST_VC_H
|
||||
#define EMUTEST_VC_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
__attribute__((externally_visible))
|
||||
extern f32 round_double_to_float(f64 v);
|
||||
|
||||
#endif
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
__asm__(
|
||||
".section \".rodata\", \"a\", @progbits\n"
|
||||
".balign 16\n"
|
||||
".global fast_font\n"
|
||||
"fast_font:\n"
|
||||
".incbin \"src/game/newfont2_swapped.bin\"\n"
|
||||
|
||||
+13
-10
@@ -28,9 +28,12 @@
|
||||
#include "puppyprint.h"
|
||||
#include "puppycam2.h"
|
||||
#include "debug_box.h"
|
||||
#include "vc_check.h"
|
||||
#include "vc_ultra.h"
|
||||
#include "profiling.h"
|
||||
#include "emutest.h"
|
||||
|
||||
// Emulators that the Instant Input patch should not be applied to
|
||||
#define INSTANT_INPUT_BLACKLIST (EMU_CONSOLE | EMU_WIIVC | EMU_ARES | EMU_SIMPLE64 | EMU_CEN64)
|
||||
|
||||
// Gfx handlers
|
||||
struct SPTask *gGfxSPTask;
|
||||
@@ -43,8 +46,6 @@ struct Controller gControllers[MAXCONTROLLERS];
|
||||
OSContStatus gControllerStatuses[MAXCONTROLLERS];
|
||||
OSContPadEx gControllerPads[MAXCONTROLLERS];
|
||||
u8 gControllerBits = 0b0000;
|
||||
u8 gIsConsole = TRUE; // Needs to be initialized before audio_reset_session is called
|
||||
u8 gCacheEmulated = TRUE;
|
||||
u8 gBorderHeight;
|
||||
#ifdef VANILLA_STYLE_CUSTOM_DEBUG
|
||||
u8 gCustomDebugMode;
|
||||
@@ -402,8 +403,8 @@ void render_init(void) {
|
||||
|
||||
// Skip incrementing the initial framebuffer index on emulators so that they display immediately as the Gfx task finishes
|
||||
// VC probably emulates osViSwapBuffer accurately so instant patch breaks VC compatibility
|
||||
// Currently, Ares passes the cache emulation test and has issues with single buffering so disable it there as well.
|
||||
if (gIsConsole || gIsVC || gCacheEmulated) {
|
||||
// Currently, Ares and Simple64 have issues with single buffering so disable it there as well.
|
||||
if (gEmulator & INSTANT_INPUT_BLACKLIST) {
|
||||
sRenderingFramebuffer++;
|
||||
}
|
||||
gGlobalTimer++;
|
||||
@@ -442,7 +443,7 @@ void display_and_vsync(void) {
|
||||
osRecvMesg(&gGameVblankQueue, &gMainReceivedMesg, OS_MESG_BLOCK);
|
||||
#endif
|
||||
// Skip swapping buffers on inaccurate emulators other than VC so that they display immediately as the Gfx task finishes
|
||||
if (gIsConsole || gIsVC || gCacheEmulated) {
|
||||
if (gEmulator & INSTANT_INPUT_BLACKLIST) {
|
||||
if (++sRenderedFramebuffer == 3) {
|
||||
sRenderedFramebuffer = 0;
|
||||
}
|
||||
@@ -646,7 +647,7 @@ void init_controllers(void) {
|
||||
#ifdef EEP
|
||||
// strangely enough, the EEPROM probe for save data is done in this function.
|
||||
// save pak detection?
|
||||
gEepromProbe = gIsVC
|
||||
gEepromProbe = (gEmulator & EMU_WIIVC)
|
||||
? osEepromProbeVC(&gSIEventMesgQueue)
|
||||
: osEepromProbe (&gSIEventMesgQueue);
|
||||
#endif
|
||||
@@ -680,9 +681,11 @@ void init_controllers(void) {
|
||||
#if (MAX_NUM_PLAYERS >= 2)
|
||||
//! Some flashcarts (eg. ED64p) don't let you start a ROM with a GameCube controller in port 1,
|
||||
// so if port 1 is an N64 controller and port 2 is a GC controller, swap them.
|
||||
if (gIsConsole) {
|
||||
if (__osControllerTypes[0] == CONT_TYPE_N64
|
||||
&& __osControllerTypes[1] == CONT_TYPE_GCN) {
|
||||
if (gEmulator & EMU_CONSOLE) {
|
||||
if (
|
||||
__osControllerTypes[0] == CONT_TYPE_N64 &&
|
||||
__osControllerTypes[1] == CONT_TYPE_GCN
|
||||
) {
|
||||
struct Controller temp = gControllers[0];
|
||||
gControllers[0] = gControllers[1];
|
||||
gControllers[1] = temp;
|
||||
|
||||
@@ -47,8 +47,6 @@ extern Gfx *gDisplayListHead;
|
||||
extern u8 *gGfxPoolEnd;
|
||||
extern struct GfxPool *gGfxPool;
|
||||
extern u8 gControllerBits;
|
||||
extern u8 gIsConsole;
|
||||
extern u8 gCacheEmulated;
|
||||
extern u8 gBorderHeight;
|
||||
#ifdef VANILLA_STYLE_CUSTOM_DEBUG
|
||||
extern u8 gCustomDebugMode;
|
||||
|
||||
@@ -36,31 +36,6 @@ static s16 sFlyingCarpetRippleTimer = 0;
|
||||
|
||||
s8 gFlyingCarpetState;
|
||||
|
||||
/**
|
||||
* Create a vertex with the given parameters and insert it into `vtx` at
|
||||
* position `n`.
|
||||
*
|
||||
* Texture coordinates are s10.5 fixed-point, which means you should left-shift the actual coordinates by 5.
|
||||
*/
|
||||
#ifndef GBI_FLOATS
|
||||
void make_vertex(Vtx *vtx, s32 n, s16 x, s16 y, s16 z, s16 tx, s16 ty, u8 r, u8 g, u8 b, u8 a) {
|
||||
#else
|
||||
void make_vertex(Vtx *vtx, s32 n, f32 x, f32 y, f32 z, s16 tx, s16 ty, u8 r, u8 g, u8 b, u8 a) {
|
||||
#endif
|
||||
vtx[n].v.ob[0] = x;
|
||||
vtx[n].v.ob[1] = y;
|
||||
vtx[n].v.ob[2] = z;
|
||||
|
||||
vtx[n].v.flag = 0;
|
||||
|
||||
vtx[n].v.tc[0] = tx;
|
||||
vtx[n].v.tc[1] = ty;
|
||||
|
||||
vtx[n].v.cn[0] = r;
|
||||
vtx[n].v.cn[1] = g;
|
||||
vtx[n].v.cn[2] = b;
|
||||
vtx[n].v.cn[3] = a;
|
||||
}
|
||||
|
||||
#define NUM_STARS_REQUIRED_FOR_WING_CAP_LIGHT 10
|
||||
/**
|
||||
|
||||
+44
-9
@@ -12,15 +12,50 @@ enum FlyingCarpetState {
|
||||
|
||||
extern s8 gFlyingCarpetState;
|
||||
|
||||
#ifndef GBI_FLOATS
|
||||
extern void make_vertex(
|
||||
Vtx *vtx, s32 n, s16 x, s16 y, s16 z, s16 tx, s16 ty, u8 r, u8 g, u8 b, u8 a
|
||||
);
|
||||
#else
|
||||
extern void make_vertex(
|
||||
Vtx *vtx, s32 n, f32 x, f32 y, f32 z, s16 tx, s16 ty, u8 r, u8 g, u8 b, u8 a
|
||||
);
|
||||
#endif
|
||||
/**
|
||||
* Create a vertex with the given parameters and insert it into `vtx` at
|
||||
* position `n`.
|
||||
*
|
||||
* Texture coordinates are s10.5 fixed-point, which means you should left-shift the actual coordinates by 5.
|
||||
*/
|
||||
ALWAYS_INLINE void make_vertex(Vtx *vtx, s32 n, s16 x, s16 y, s16 z, s16 tx, s16 ty, u8 r, u8 g, u8 b, u8 a) {
|
||||
vtx[n].v.ob[0] = x;
|
||||
vtx[n].v.ob[1] = y;
|
||||
vtx[n].v.ob[2] = z;
|
||||
|
||||
vtx[n].v.flag = 0;
|
||||
|
||||
vtx[n].v.tc[0] = tx;
|
||||
vtx[n].v.tc[1] = ty;
|
||||
|
||||
vtx[n].v.cn[0] = r;
|
||||
vtx[n].v.cn[1] = g;
|
||||
vtx[n].v.cn[2] = b;
|
||||
vtx[n].v.cn[3] = a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a colourless vertex with the given parameters and insert it into `vtx` at
|
||||
* position `n`.
|
||||
*
|
||||
* Texture coordinates are s10.5 fixed-point, which means you should left-shift the actual coordinates by 5.
|
||||
*/
|
||||
ALWAYS_INLINE void make_simple_vertex(Vtx *vtx, s32 n, s16 x, s16 y, s16 z, s16 tx, s16 ty) {
|
||||
vtx[n].v.ob[0] = x;
|
||||
vtx[n].v.ob[1] = y;
|
||||
vtx[n].v.ob[2] = z;
|
||||
|
||||
vtx[n].v.flag = 0;
|
||||
|
||||
vtx[n].v.tc[0] = tx;
|
||||
vtx[n].v.tc[1] = ty;
|
||||
|
||||
vtx[n].v.cn[0] = 255;
|
||||
vtx[n].v.cn[1] = 255;
|
||||
vtx[n].v.cn[2] = 255;
|
||||
vtx[n].v.cn[3] = 255;
|
||||
}
|
||||
|
||||
extern Gfx *geo_exec_inside_castle_light(s32 callContext, struct GraphNode *node, UNUSED Mat4 mtx);
|
||||
extern Gfx *geo_exec_flying_carpet_timer_update(s32 callContext, struct GraphNode *node, UNUSED Mat4 mtx);
|
||||
extern Gfx *geo_exec_flying_carpet_create(s32 callContext, struct GraphNode *node, UNUSED Mat4 mtx);
|
||||
|
||||
+37
-15
@@ -1174,7 +1174,7 @@ void render_dialog_entries(void) {
|
||||
case DIALOG_STATE_VERTICAL:
|
||||
gDialogBoxOpenTimer = 0.0f;
|
||||
|
||||
if (gPlayer1Controller->buttonPressed & (A_BUTTON | B_BUTTON | START_BUTTON | D_CBUTTONS | R_CBUTTONS | D_JPAD | R_JPAD)) {
|
||||
if (gPlayer1Controller->buttonPressed & (A_BUTTON | B_BUTTON)) {
|
||||
if (gLastDialogPageStrPos == -1) {
|
||||
handle_special_dialog_text(gDialogID);
|
||||
gDialogBoxState = DIALOG_STATE_CLOSING;
|
||||
@@ -1468,20 +1468,14 @@ void change_dialog_camera_angle(void) {
|
||||
}
|
||||
|
||||
void shade_screen(void) {
|
||||
create_dl_translation_matrix(MENU_MTX_PUSH, GFX_DIMENSIONS_FROM_LEFT_EDGE(0), SCREEN_HEIGHT, 0);
|
||||
Gfx* dlHead = gDisplayListHead;
|
||||
|
||||
// This is a bit weird. It reuses the dialog text box (width 130, height -80),
|
||||
// so scale to at least fit the screen.
|
||||
#ifdef WIDESCREEN
|
||||
create_dl_scale_matrix(MENU_MTX_NOPUSH,
|
||||
GFX_DIMENSIONS_ASPECT_RATIO * SCREEN_HEIGHT / 130.0f, 3.0f, 1.0f);
|
||||
#else
|
||||
create_dl_scale_matrix(MENU_MTX_NOPUSH, 2.6f, 3.4f, 1.0f);
|
||||
#endif
|
||||
gSPDisplayList(dlHead++, dl_shade_screen_begin);
|
||||
gDPFillRectangle(dlHead++, GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(0), gBorderHeight,
|
||||
(GFX_DIMENSIONS_RECT_FROM_RIGHT_EDGE(0) - 1), ((SCREEN_HEIGHT - gBorderHeight) - 1));
|
||||
gSPDisplayList(dlHead++, dl_shade_screen_end);
|
||||
|
||||
gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, 110);
|
||||
gSPDisplayList(gDisplayListHead++, dl_draw_text_bg_box);
|
||||
gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
|
||||
gDisplayListHead = dlHead;
|
||||
}
|
||||
|
||||
void print_animated_red_coin(s16 x, s16 y) {
|
||||
@@ -1518,8 +1512,36 @@ void print_animated_red_coin(s16 x, s16 y) {
|
||||
void render_pause_red_coins(void) {
|
||||
s8 x;
|
||||
|
||||
for (x = 0; x < gRedCoinsCollected; x++) {
|
||||
print_animated_red_coin(GFX_DIMENSIONS_FROM_RIGHT_EDGE(30) - x * 20, 16);
|
||||
if (gRedCoinsCollected <= 9) {
|
||||
for (x = 0; x < gRedCoinsCollected; x++) {
|
||||
print_animated_red_coin(GFX_DIMENSIONS_FROM_RIGHT_EDGE(30) - x * 20, 16);
|
||||
}
|
||||
}
|
||||
else {
|
||||
print_animated_red_coin(GFX_DIMENSIONS_FROM_RIGHT_EDGE(108), 16);
|
||||
Mtx *mtx;
|
||||
|
||||
mtx = alloc_display_list(sizeof(*mtx));
|
||||
if (mtx == NULL) {
|
||||
return;
|
||||
}
|
||||
guOrtho(mtx, 0.0f, SCREEN_WIDTH, 0.0f, SCREEN_HEIGHT, -10.0f, 10.0f, 1.0f);
|
||||
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(mtx), G_MTX_PROJECTION | G_MTX_LOAD | G_MTX_NOPUSH);
|
||||
gSPDisplayList(gDisplayListHead++, dl_hud_img_begin);
|
||||
|
||||
s8 redCoinCount = gRedCoinsCollected;
|
||||
if (redCoinCount > 99) {
|
||||
redCoinCount = 99;
|
||||
}
|
||||
|
||||
add_glyph_texture(GLYPH_MULTIPLY);
|
||||
render_textrect(GFX_DIMENSIONS_FROM_RIGHT_EDGE(100), 16, 0);
|
||||
add_glyph_texture(char_to_glyph_index((char) (48 + (redCoinCount / 10))));
|
||||
render_textrect(GFX_DIMENSIONS_FROM_RIGHT_EDGE(86), 16, 0);
|
||||
add_glyph_texture(char_to_glyph_index((char) (48 + (redCoinCount % 10))));
|
||||
render_textrect(GFX_DIMENSIONS_FROM_RIGHT_EDGE(86), 16, 1);
|
||||
|
||||
gSPDisplayList(gDisplayListHead++, dl_hud_img_end);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+12
-4
@@ -418,6 +418,8 @@ u32 mario_check_object_grab(struct MarioState *m) {
|
||||
if (facingDYaw >= -0x5555 && facingDYaw <= 0x5555) {
|
||||
m->faceAngle[1] = m->interactObj->oMoveAngleYaw;
|
||||
m->usedObj = m->interactObj;
|
||||
m->pos[1] = m->floorHeight;
|
||||
m->vel[1] = 0.0f;
|
||||
result = set_mario_action(m, ACT_PICKING_UP_BOWSER, 0);
|
||||
}
|
||||
} else {
|
||||
@@ -1707,11 +1709,14 @@ u32 check_read_sign(struct MarioState *m, struct Object *obj) {
|
||||
&& abs_angle_diff(mario_obj_angle_to_object(m, obj), m->faceAngle[1]) <= SIGN_RANGE
|
||||
) {
|
||||
#ifdef DIALOG_INDICATOR
|
||||
struct Object *orangeNumber;
|
||||
if (obj->behavior == segmented_to_virtual(bhvSignOnWall)) {
|
||||
spawn_object_relative(ORANGE_NUMBER_A, 0, 180, 32, obj, MODEL_NUMBER, bhvOrangeNumber);
|
||||
orangeNumber = spawn_object_relative(ORANGE_NUMBER_A, 0, 180, 32, obj, MODEL_NUMBER, bhvOrangeNumber);
|
||||
} else {
|
||||
spawn_object_relative(ORANGE_NUMBER_A, 0, 160, 8, obj, MODEL_NUMBER, bhvOrangeNumber);
|
||||
orangeNumber = spawn_object_relative(ORANGE_NUMBER_A, 0, 160, 8, obj, MODEL_NUMBER, bhvOrangeNumber);
|
||||
}
|
||||
orangeNumber->oHomeX = orangeNumber->oPosX;
|
||||
orangeNumber->oHomeZ = orangeNumber->oPosZ;
|
||||
#endif
|
||||
if (m->input & READ_MASK) {
|
||||
#else
|
||||
@@ -1742,11 +1747,14 @@ u32 check_npc_talk(struct MarioState *m, struct Object *obj) {
|
||||
&& abs_angle_diff(mario_obj_angle_to_object(m, obj), m->faceAngle[1]) <= SIGN_RANGE
|
||||
) {
|
||||
#ifdef DIALOG_INDICATOR
|
||||
struct Object *orangeNumber;
|
||||
if (obj->behavior == segmented_to_virtual(bhvYoshi)) {
|
||||
spawn_object_relative(ORANGE_NUMBER_A, 0, 256, 64, obj, MODEL_NUMBER, bhvOrangeNumber);
|
||||
orangeNumber = spawn_object_relative(ORANGE_NUMBER_A, 0, 256, 64, obj, MODEL_NUMBER, bhvOrangeNumber);
|
||||
} else {
|
||||
spawn_object_relative(ORANGE_NUMBER_A, 0, 160, 0, obj, MODEL_NUMBER, bhvOrangeNumber);
|
||||
orangeNumber = spawn_object_relative(ORANGE_NUMBER_A, 0, 160, 0, obj, MODEL_NUMBER, bhvOrangeNumber);
|
||||
}
|
||||
orangeNumber->oHomeX = orangeNumber->oPosX;
|
||||
orangeNumber->oHomeZ = orangeNumber->oPosZ;
|
||||
#endif
|
||||
if (m->input & READ_MASK) {
|
||||
#else
|
||||
|
||||
+34
-15
@@ -178,6 +178,16 @@ u32 pressed_pause(void) {
|
||||
u32 dialogActive = get_dialog_id() >= 0;
|
||||
u32 intangible = (gMarioState->action & ACT_FLAG_INTANGIBLE) != 0;
|
||||
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
#ifdef BETTER_REVERB
|
||||
if (sPPDebugPage == PUPPYPRINT_PAGE_RAM || sPPDebugPage == PUPPYPRINT_PAGE_LEVEL_SELECT || sPPDebugPage == PUPPYPRINT_PAGE_BETTER_REVERB) {
|
||||
#else
|
||||
if (sPPDebugPage == PUPPYPRINT_PAGE_RAM || sPPDebugPage == PUPPYPRINT_PAGE_LEVEL_SELECT) {
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!intangible && !dialogActive && !gWarpTransition.isActive && sDelayedWarpOp == WARP_OP_NONE
|
||||
&& (gPlayer1Controller->buttonPressed & START_BUTTON)) {
|
||||
return TRUE;
|
||||
@@ -397,7 +407,7 @@ void init_mario_after_warp(void) {
|
||||
|
||||
if (gCurrDemoInput == NULL) {
|
||||
#ifdef BETTER_REVERB
|
||||
gBetterReverbPreset = gCurrentArea->betterReverbPreset;
|
||||
gBetterReverbPresetValue = gCurrentArea->betterReverbPreset;
|
||||
#endif
|
||||
set_background_music(gCurrentArea->musicParam, gCurrentArea->musicParam2, 0);
|
||||
|
||||
@@ -428,9 +438,7 @@ void init_mario_after_warp(void) {
|
||||
}
|
||||
#endif
|
||||
#ifndef DISABLE_EXIT_COURSE
|
||||
if (sWarpDest.levelNum == EXIT_COURSE_LEVEL && sWarpDest.areaIdx == EXIT_COURSE_AREA
|
||||
&& sWarpDest.nodeId == EXIT_COURSE_NODE
|
||||
) {
|
||||
if (sWarpDest.arg == WARP_FLAG_EXIT_COURSE) {
|
||||
play_sound(SOUND_MENU_MARIO_CASTLE_WARP, gGlobalSoundSource);
|
||||
}
|
||||
#endif
|
||||
@@ -511,7 +519,7 @@ void warp_credits(void) {
|
||||
|
||||
if (gCurrCreditsEntry == NULL || gCurrCreditsEntry == sCreditsSequence) {
|
||||
#ifdef BETTER_REVERB
|
||||
gBetterReverbPreset = gCurrentArea->betterReverbPreset;
|
||||
gBetterReverbPresetValue = gCurrentArea->betterReverbPreset;
|
||||
#endif
|
||||
set_background_music(gCurrentArea->musicParam, gCurrentArea->musicParam2, 0);
|
||||
}
|
||||
@@ -608,6 +616,8 @@ s16 music_unchanged_through_warp(s16 arg) {
|
||||
void initiate_warp(s16 destLevel, s16 destArea, s16 destWarpNode, s32 warpFlags) {
|
||||
if (destWarpNode >= WARP_NODE_CREDITS_MIN) {
|
||||
sWarpDest.type = WARP_TYPE_CHANGE_LEVEL;
|
||||
} else if (warpFlags == WARP_FLAG_EXIT_COURSE) {
|
||||
sWarpDest.type = WARP_TYPE_CHANGE_LEVEL;
|
||||
} else if (destLevel != gCurrLevelNum) {
|
||||
sWarpDest.type = WARP_TYPE_CHANGE_LEVEL;
|
||||
} else if (destArea != gCurrentArea->index) {
|
||||
@@ -1008,7 +1018,11 @@ s32 play_mode_normal(void) {
|
||||
check_instant_warp();
|
||||
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
#ifdef BETTER_REVERB
|
||||
if (sPPDebugPage != PUPPYPRINT_PAGE_RAM && sPPDebugPage != PUPPYPRINT_PAGE_LEVEL_SELECT && sPPDebugPage != PUPPYPRINT_PAGE_BETTER_REVERB) {
|
||||
#else
|
||||
if (sPPDebugPage != PUPPYPRINT_PAGE_RAM && sPPDebugPage != PUPPYPRINT_PAGE_LEVEL_SELECT) {
|
||||
#endif
|
||||
if (sTimerRunning && gHudDisplay.timer < 17999) {
|
||||
gHudDisplay.timer++;
|
||||
}
|
||||
@@ -1026,7 +1040,11 @@ s32 play_mode_normal(void) {
|
||||
#endif
|
||||
if (gCurrentArea != NULL) {
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
if (sPPDebugPage != PUPPYPRINT_PAGE_RAM && sPPDebugPage != PUPPYPRINT_PAGE_LEVEL_SELECT) {
|
||||
#ifdef BETTER_REVERB
|
||||
if (sPPDebugPage != PUPPYPRINT_PAGE_RAM && sPPDebugPage != PUPPYPRINT_PAGE_LEVEL_SELECT && sPPDebugPage != PUPPYPRINT_PAGE_BETTER_REVERB) {
|
||||
#else
|
||||
if (sPPDebugPage != PUPPYPRINT_PAGE_RAM && sPPDebugPage != PUPPYPRINT_PAGE_LEVEL_SELECT) {
|
||||
#endif
|
||||
update_camera(gCurrentArea->camera);
|
||||
}
|
||||
#else
|
||||
@@ -1069,9 +1087,16 @@ s32 play_mode_paused(void) {
|
||||
if (gDebugLevelSelect) {
|
||||
fade_into_special_warp(WARP_SPECIAL_LEVEL_SELECT, 1);
|
||||
} else {
|
||||
initiate_warp(EXIT_COURSE_LEVEL, EXIT_COURSE_AREA, EXIT_COURSE_NODE, WARP_FLAGS_NONE);
|
||||
#ifdef DEATH_ON_EXIT_COURSE
|
||||
raise_background_noise(1);
|
||||
gCameraMovementFlags &= ~CAM_MOVE_PAUSE_SCREEN;
|
||||
set_play_mode(PLAY_MODE_NORMAL);
|
||||
level_trigger_warp(gMarioState, WARP_OP_DEATH);
|
||||
#else
|
||||
initiate_warp(EXIT_COURSE_LEVEL, EXIT_COURSE_AREA, EXIT_COURSE_NODE, WARP_FLAG_EXIT_COURSE);
|
||||
fade_into_special_warp(WARP_SPECIAL_NONE, 0);
|
||||
gSavedCourseNum = COURSE_NONE;
|
||||
#endif
|
||||
}
|
||||
|
||||
gCameraMovementFlags &= ~CAM_MOVE_PAUSE_SCREEN;
|
||||
@@ -1268,7 +1293,7 @@ s32 init_level(void) {
|
||||
|
||||
if (gCurrDemoInput == NULL) {
|
||||
#ifdef BETTER_REVERB
|
||||
gBetterReverbPreset = gCurrentArea->betterReverbPreset;
|
||||
gBetterReverbPresetValue = gCurrentArea->betterReverbPreset;
|
||||
#endif
|
||||
set_background_music(gCurrentArea->musicParam, gCurrentArea->musicParam2, 0);
|
||||
}
|
||||
@@ -1287,13 +1312,7 @@ s32 init_level(void) {
|
||||
puppylights_allocate();
|
||||
#endif
|
||||
|
||||
#ifdef PUPPYPRINT_DEBUG
|
||||
#ifdef PUPPYPRINT_DEBUG_CYCLES
|
||||
append_puppyprint_log("Level loaded in %dc", (s32)(osGetTime() - first));
|
||||
#else
|
||||
append_puppyprint_log("Level loaded in %dus", (s32)(OS_CYCLES_TO_USEC(osGetTime() - first)));
|
||||
#endif
|
||||
#endif
|
||||
append_puppyprint_log("Level loaded in %d" PP_CYCLE_STRING ".", (s32)(PP_CYCLE_CONV(osGetTime() - first)));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,11 +40,12 @@ enum SpecialWarpDestinations {
|
||||
WARP_SPECIAL_NONE = 0,
|
||||
};
|
||||
|
||||
enum WarpDoorFlags {
|
||||
enum WarpFlags {
|
||||
WARP_FLAGS_NONE = (0 << 0), // 0x00
|
||||
WARP_FLAG_DOOR_PULLED = (1 << 0), // 0x01
|
||||
WARP_FLAG_DOOR_FLIP_MARIO = (1 << 1), // 0x02
|
||||
WARP_FLAG_DOOR_IS_WARP = (1 << 2), // 0x04
|
||||
WARP_FLAG_EXIT_COURSE = (1 << 3), // 0x08
|
||||
};
|
||||
|
||||
enum MarioSpawnType {
|
||||
|
||||
@@ -242,8 +242,10 @@ void stop_and_set_height_to_floor(struct MarioState *m) {
|
||||
mario_set_forward_vel(m, 0.0f);
|
||||
m->vel[1] = 0.0f;
|
||||
|
||||
//! This is responsible for some downwarps.
|
||||
m->pos[1] = m->floorHeight;
|
||||
// HackerSM64 2.1: This check fixes the ledgegrab downwarp after being pushed off a ledge.
|
||||
if (m->pos[1] <= m->floorHeight + 160.0f) {
|
||||
m->pos[1] = m->floorHeight;
|
||||
}
|
||||
|
||||
vec3f_copy(marioObj->header.gfx.pos, m->pos);
|
||||
vec3s_set(marioObj->header.gfx.angle, 0, m->faceAngle[1], 0);
|
||||
@@ -259,9 +261,10 @@ s32 stationary_ground_step(struct MarioState *m) {
|
||||
if (takeStep) {
|
||||
stepResult = perform_ground_step(m);
|
||||
} else {
|
||||
//! TODO - This is responsible for many stationary downwarps but is
|
||||
// important for stuff like catching Bowser in midair, figure out a good way to fix
|
||||
m->pos[1] = m->floorHeight;
|
||||
// HackerSM64 2.1: This check prevents the downwarps that plagued stationary actions.
|
||||
if (m->pos[1] <= m->floorHeight + 160.0f) {
|
||||
m->pos[1] = m->floorHeight;
|
||||
}
|
||||
|
||||
vec3f_copy(marioObj->header.gfx.pos, m->pos);
|
||||
vec3s_set(marioObj->header.gfx.angle, 0, m->faceAngle[1], 0);
|
||||
|
||||
@@ -60,13 +60,11 @@ u32 main_pool_pop_state(void);
|
||||
void *load_segment(s32 segment, u8 *srcStart, u8 *srcEnd, u32 side, u8 *bssStart, u8 *bssEnd);
|
||||
void *load_to_fixed_pool_addr(u8 *destAddr, u8 *srcStart, u8 *srcEnd);
|
||||
void *load_segment_decompress(s32 segment, u8 *srcStart, u8 *srcEnd);
|
||||
void *load_segment_decompress_heap(u32 segment, u8 *srcStart, u8 *srcEnd);
|
||||
void load_engine_code_segment(void);
|
||||
#else
|
||||
#define load_segment(...)
|
||||
#define load_to_fixed_pool_addr(...)
|
||||
#define load_segment_decompress(...)
|
||||
#define load_segment_decompress_heap(...)
|
||||
#define load_engine_code_segment(...)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -691,6 +691,9 @@ void spawn_orange_number(s8 behParam, s16 relX, s16 relY, s16 relZ) {
|
||||
|
||||
struct Object *orangeNumber = spawn_object_relative(behParam, relX, relY, relZ, o, MODEL_NUMBER, bhvOrangeNumber);
|
||||
orangeNumber->oPosY += 25.0f;
|
||||
orangeNumber->oOrangeNumberOffset = relX;
|
||||
orangeNumber->oHomeX = o->oPosX;
|
||||
orangeNumber->oHomeZ = o->oPosZ;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -616,6 +616,22 @@ UNUSED static u16 unused_get_elapsed_time(u64 *cycleCounts, s32 index) {
|
||||
return time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all floors tied to dynamic collision, as they become invalid once the dynamic
|
||||
* surfaces are cleared.
|
||||
*
|
||||
* NOTE: Checking over the full object pool is slower than checking against the linked lists of active
|
||||
* objects until the active object pool is around half capacity, after which, this is faster.
|
||||
* Change this function to use a linked list instead if you add any additional logic here whatsoever.
|
||||
*/
|
||||
void clear_dynamic_surface_references(void) {
|
||||
for (s32 i = 0; i < OBJECT_POOL_CAPACITY; i++) {
|
||||
if (gObjectPool[i].oFloor && gObjectPool[i].oFloor->flags & SURFACE_FLAG_DYNAMIC) {
|
||||
gObjectPool[i].oFloor = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update all objects. This includes script execution, object collision detection,
|
||||
* and object surface management.
|
||||
|
||||
@@ -141,6 +141,7 @@ void set_object_respawn_info_bits(struct Object *obj, u8 bits);
|
||||
void unload_objects_from_area(UNUSED s32 unused, s32 areaIndex);
|
||||
void spawn_objects_from_info(UNUSED s32 unused, struct SpawnInfo *spawnInfo);
|
||||
void clear_objects(void);
|
||||
void clear_dynamic_surface_references(void);
|
||||
void update_objects(UNUSED s32 unused);
|
||||
|
||||
|
||||
|
||||
@@ -34,5 +34,8 @@ void print_text_fmt_int(s32 x, s32 y, const char *str, s32 n);
|
||||
void print_text(s32 x, s32 y, const char *str);
|
||||
void print_text_centered(s32 x, s32 y, const char *str);
|
||||
void render_text_labels(void);
|
||||
s32 char_to_glyph_index(char c);
|
||||
void add_glyph_texture(s8 glyphIndex);
|
||||
void render_textrect(s32 x, s32 y, s32 pos);
|
||||
|
||||
#endif // PRINT_H
|
||||
@@ -259,7 +259,7 @@ void profiler_print_times() {
|
||||
|
||||
// audio time is removed from the main thread profiling, so add it back here
|
||||
u32 total_cpu = microseconds[PROFILER_TIME_TOTAL] + microseconds[PROFILER_TIME_AUDIO] * 2;
|
||||
u32 total_rsp = microseconds[PROFILER_TIME_RSP_GFX] + microseconds[PROFILER_TIME_RSP_AUDIO];
|
||||
u32 total_rsp = microseconds[PROFILER_TIME_RSP_GFX] + microseconds[PROFILER_TIME_RSP_AUDIO] * 2;
|
||||
u32 max_rdp = MAX(MAX(microseconds[PROFILER_TIME_TMEM], microseconds[PROFILER_TIME_CMD]), microseconds[PROFILER_TIME_PIPE]);
|
||||
|
||||
sprintf(text_buffer,
|
||||
@@ -309,7 +309,7 @@ void profiler_print_times() {
|
||||
microseconds[PROFILER_TIME_PIPE],
|
||||
total_rsp, total_rsp / 333,
|
||||
microseconds[PROFILER_TIME_RSP_GFX],
|
||||
microseconds[PROFILER_TIME_RSP_AUDIO]
|
||||
microseconds[PROFILER_TIME_RSP_AUDIO] * 2
|
||||
);
|
||||
|
||||
Gfx* dlHead = gDisplayListHead;
|
||||
|
||||
+295
-158
@@ -1,4 +1,4 @@
|
||||
///Puppycam 2.2 by Fazana
|
||||
///Puppycam 2.3 by Fazana
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include <PR/gbi.h>
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "puppyprint.h"
|
||||
#include "debug_box.h"
|
||||
#include "main.h"
|
||||
#include "../../enhancements/puppycam_angles.inc.c"
|
||||
|
||||
#ifdef PUPPYCAM
|
||||
|
||||
@@ -54,27 +55,32 @@ struct MemoryPool *gPuppyMemoryPool;
|
||||
s32 gPuppyError = 0;
|
||||
|
||||
#if defined(VERSION_EU)
|
||||
static unsigned char gPCOptionStringsFR[][64] = {{NC_ANALOGUE_FR}, {NC_CAMX_FR}, {NC_CAMY_FR}, {NC_INVERTX_FR}, {NC_INVERTY_FR}, {NC_CAMC_FR}, {NC_SCHEME_FR}, {NC_WIDE_FR}, {OPTION_LANGUAGE_FR}};
|
||||
static unsigned char gPCOptionStringsDE[][64] = {{NC_ANALOGUE_DE}, {NC_CAMX_DE}, {NC_CAMY_DE}, {NC_INVERTX_DE}, {NC_INVERTY_DE}, {NC_CAMC_DE}, {NC_SCHEME_DE}, {NC_WIDE_DE}, {OPTION_LANGUAGE_DE}};
|
||||
static unsigned char gPCOptionStringsFR[][64] = {{NC_ANALOGUE_FR}, {NC_CAMX_FR}, {NC_INVERTX_FR}, {NC_CAMC_FR}, {NC_SCHEME_FR}, {NC_WIDE_FR}, {OPTION_LANGUAGE_FR}};
|
||||
static unsigned char gPCOptionStringsDE[][64] = {{NC_ANALOGUE_DE}, {NC_CAMX_DE}, {NC_INVERTX_DE}, {NC_CAMC_DE}, {NC_SCHEME_DE}, {NC_WIDE_DE}, {OPTION_LANGUAGE_DE}};
|
||||
static unsigned char gPCFlagStringsFR[][64] = {{OPTION_DISABLED_FR}, {OPTION_ENABLED_FR}, {OPTION_SCHEME1_FR}, {OPTION_SCHEME2_FR}, {OPTION_SCHEME3_FR}, {TEXT_ENGLISH}, {TEXT_FRENCH}, {TEXT_GERMAN},};
|
||||
static unsigned char gPCFlagStringsDE[][64] = {{OPTION_DISABLED_DE}, {OPTION_ENABLED_DE}, {OPTION_SCHEME1_DE}, {OPTION_SCHEME2_DE}, {OPTION_SCHEME3_DE}, {TEXT_ENGLISH}, {TEXT_FRENCH}, {TEXT_GERMAN},};
|
||||
static unsigned char gPCToggleStringsFR[][64] = {{NC_BUTTON_FR}, {NC_BUTTON2_FR}, {NC_OPTION_FR}, {NC_HIGHLIGHT_L}, {NC_HIGHLIGHT_R},};
|
||||
static unsigned char gPCToggleStringsDE[][64] = {{NC_BUTTON_DE}, {NC_BUTTON2_DE}, {NC_OPTION_DE}, {NC_HIGHLIGHT_L}, {NC_HIGHLIGHT_R},};
|
||||
#endif
|
||||
static unsigned char gPCOptionStringsEN[][64] = {{NC_ANALOGUE_EN}, {NC_CAMX_EN}, {NC_CAMY_EN}, {NC_INVERTX_EN}, {NC_INVERTY_EN}, {NC_CAMC_EN}, {NC_SCHEME_EN}, {NC_WIDE_EN}, {OPTION_LANGUAGE_EN}};
|
||||
static unsigned char gPCOptionStringsEN[][64] = {{NC_ANALOGUE_EN}, {NC_CAMX_EN}, {NC_INVERTX_EN}, {NC_CAMC_EN}, {NC_SCHEME_EN}, {NC_WIDE_EN}, {OPTION_LANGUAGE_EN}};
|
||||
static unsigned char gPCFlagStringsEN[][64] = {{OPTION_DISABLED_EN}, {OPTION_ENABLED_EN}, {OPTION_SCHEME1_EN}, {OPTION_SCHEME2_EN}, {OPTION_SCHEME3_EN}, {TEXT_ENGLISH}, {TEXT_FRENCH}, {TEXT_GERMAN},};
|
||||
static unsigned char gPCToggleStringsEN[][64] = {{NC_BUTTON_EN}, {NC_BUTTON2_EN}, {NC_OPTION_EN}, {NC_HIGHLIGHT_L}, {NC_HIGHLIGHT_R},};
|
||||
|
||||
static unsigned char (*gPCOptionStringsPtr)[][64] = (unsigned char (*)[][64])&gPCOptionStringsEN;
|
||||
static unsigned char (*gPCFlagStringsPtr )[][64] = (unsigned char (*)[][64])&gPCFlagStringsEN;
|
||||
static unsigned char (*gPCToggleStringsPtr)[][64] = (unsigned char (*)[][64])&gPCToggleStringsEN;
|
||||
|
||||
#define OPT 32 //Just a temp thing
|
||||
enum PuppyCamOptionNames {
|
||||
OPTION_STRING_ANALOGUE,
|
||||
OPTION_STRING_SENSITIVITY,
|
||||
OPTION_STRING_INVERT,
|
||||
OPTION_STRING_AUTOROTATE,
|
||||
OPTION_STRING_INPUTTYPE,
|
||||
OPTION_STRING_WIDESCREEN,
|
||||
OPTION_STRING_LANGUAGE
|
||||
};
|
||||
|
||||
static unsigned char (*gPCOptionStringsPtr)[OPT][64] = (unsigned char (*)[OPT][64])&gPCOptionStringsEN;
|
||||
static unsigned char (*gPCFlagStringsPtr )[OPT][64] = (unsigned char (*)[OPT][64])&gPCFlagStringsEN;
|
||||
static unsigned char (*gPCToggleStringsPtr)[OPT][64] = (unsigned char (*)[OPT][64])&gPCToggleStringsEN;
|
||||
|
||||
|
||||
struct gPCOptionStruct
|
||||
{
|
||||
struct gPCOptionStruct {
|
||||
u8 gPCOptionName; //This is the position in the newcam_options text array. It doesn't have to directly correlate with its position in the struct
|
||||
s16 *gPCOptionVar; //This is the value that the option is going to directly affect.
|
||||
u8 gPCOptionStart; //This is where the text array will start. Set it to 255 to have it be ignored.
|
||||
@@ -84,18 +90,16 @@ struct gPCOptionStruct
|
||||
|
||||
static const struct gPCOptionStruct gPCOptions[] = { //If the min and max are 0 and 1, then the value text is used, otherwise it's ignored.
|
||||
#ifdef WIDE
|
||||
{/*Option Name*/ 7, /*Option Variable*/ &gConfig.widescreen, /*Option Value Text Start*/ 0, /*Option Minimum*/ FALSE, /*Option Maximum*/ TRUE},
|
||||
{/*Option Name*/ OPTION_STRING_WIDESCREEN, /*Option Variable*/ &gConfig.widescreen, /*Option Value Text Start*/ 0, /*Option Minimum*/ FALSE, /*Option Maximum*/ TRUE},
|
||||
#endif
|
||||
#if MULTILANG
|
||||
{/*Option Name*/ 8, /*Option Variable*/ &gInGameLanguage, /*Option Value Text Start*/ 4, /*Option Minimum*/ 1, /*Option Maximum*/ 3},
|
||||
{/*Option Name*/ OPTION_STRING_LANGUAGE, /*Option Variable*/ &gInGameLanguage, /*Option Value Text Start*/ 4, /*Option Minimum*/ 1, /*Option Maximum*/ 3},
|
||||
#endif
|
||||
{/*Option Name*/ 0, /*Option Variable*/ &gPuppyCam.options.analogue, /*Option Value Text Start*/ 0, /*Option Minimum*/ FALSE, /*Option Maximum*/ TRUE},
|
||||
{/*Option Name*/ 6, /*Option Variable*/ &gPuppyCam.options.inputType, /*Option Value Text Start*/ 2, /*Option Minimum*/ 0, /*Option Maximum*/ 2},
|
||||
{/*Option Name*/ 1, /*Option Variable*/ &gPuppyCam.options.sensitivityX, /*Option Value Text Start*/ 255, /*Option Minimum*/ 10, /*Option Maximum*/ 500},
|
||||
{/*Option Name*/ 2, /*Option Variable*/ &gPuppyCam.options.sensitivityY, /*Option Value Text Start*/ 255, /*Option Minimum*/ 10, /*Option Maximum*/ 500},
|
||||
{/*Option Name*/ 3, /*Option Variable*/ &gPuppyCam.options.invertX, /*Option Value Text Start*/ 0, /*Option Minimum*/ FALSE, /*Option Maximum*/ TRUE},
|
||||
{/*Option Name*/ 4, /*Option Variable*/ &gPuppyCam.options.invertY, /*Option Value Text Start*/ 0, /*Option Minimum*/ FALSE, /*Option Maximum*/ TRUE},
|
||||
{/*Option Name*/ 5, /*Option Variable*/ &gPuppyCam.options.turnAggression, /*Option Value Text Start*/ 255, /*Option Minimum*/ 0, /*Option Maximum*/ 100},
|
||||
{/*Option Name*/ OPTION_STRING_ANALOGUE, /*Option Variable*/ &gPuppyCam.options.analogue, /*Option Value Text Start*/ 0, /*Option Minimum*/ FALSE, /*Option Maximum*/ TRUE},
|
||||
{/*Option Name*/ OPTION_STRING_INPUTTYPE, /*Option Variable*/ &gPuppyCam.options.inputType, /*Option Value Text Start*/ 2, /*Option Minimum*/ 0, /*Option Maximum*/ 2},
|
||||
{/*Option Name*/ OPTION_STRING_SENSITIVITY, /*Option Variable*/ &gPuppyCam.options.sensitivityX, /*Option Value Text Start*/ 255, /*Option Minimum*/ 1, /*Option Maximum*/ 10},
|
||||
{/*Option Name*/ OPTION_STRING_INVERT, /*Option Variable*/ &gPuppyCam.options.invertX, /*Option Value Text Start*/ 0, /*Option Minimum*/ FALSE, /*Option Maximum*/ TRUE},
|
||||
{/*Option Name*/ OPTION_STRING_AUTOROTATE, /*Option Variable*/ &gPuppyCam.options.turnHelper, /*Option Value Text Start*/ 0, /*Option Minimum*/ FALSE, /*Option Maximum*/ TRUE},
|
||||
};
|
||||
|
||||
u8 gPCOptionCap = sizeof(gPCOptions) / sizeof(struct gPCOptionStruct); //How many options there are in newcam_uptions.
|
||||
@@ -128,13 +132,11 @@ static void puppycam_analogue_stick(void) {
|
||||
}
|
||||
|
||||
void puppycam_default_config(void) {
|
||||
gPuppyCam.options.invertX = 1;
|
||||
gPuppyCam.options.invertY = 1;
|
||||
gPuppyCam.options.sensitivityX = 100;
|
||||
gPuppyCam.options.sensitivityY = 100;
|
||||
gPuppyCam.options.turnAggression = 50;
|
||||
gPuppyCam.options.analogue = 0;
|
||||
gPuppyCam.options.inputType = 1;
|
||||
gPuppyCam.options.invertX = FALSE;
|
||||
gPuppyCam.options.sensitivityX = 5;
|
||||
gPuppyCam.options.analogue = FALSE;
|
||||
gPuppyCam.options.inputType = INPUT_SINGLE_PRESS;
|
||||
gPuppyCam.options.turnHelper = TRUE;
|
||||
}
|
||||
|
||||
// Initial setup. Ran at the beginning of the game and never again.
|
||||
@@ -149,7 +151,7 @@ void puppycam_boot(void) {
|
||||
gPuppyCam.stickN[1] = 0;
|
||||
gPuppyMemoryPool = mem_pool_init(MAX_PUPPYCAM_VOLUMES * sizeof(struct sPuppyVolume), MEMORY_POOL_LEFT);
|
||||
gPuppyVolumeCount = 0;
|
||||
gPuppyCam.enabled = 1;
|
||||
gPuppyCam.enabled = TRUE;
|
||||
|
||||
puppycam_get_save();
|
||||
}
|
||||
@@ -199,7 +201,7 @@ void puppycam_activate_cutscene(s32 (*scene)(), s32 lockinput) {
|
||||
// If you've read camera.c this will look familiar.
|
||||
// It takes the next 4 spline points and extrapolates a curvature based positioning of the camera vector that's passed through.
|
||||
// It's a standard B spline
|
||||
static void puppycam_evaluate_spline(f32 progress, Vec3s cameraPos, Vec3f spline1, Vec3f spline2, Vec3f spline3, Vec3f spline4) {
|
||||
static void puppycam_evaluate_spline(f32 progress, Vec3f cameraPos, Vec3f spline1, Vec3f spline2, Vec3f spline3, Vec3f spline4) {
|
||||
f32 tempP[4];
|
||||
|
||||
if (progress > 1.0f) {
|
||||
@@ -478,6 +480,80 @@ void puppycam_reset_values(void) {
|
||||
gPuppyCam.splineProgress = 0;
|
||||
}
|
||||
|
||||
static void create_puppycam1_nodes(void) {
|
||||
u32 i, flagsAdd, flagsRemove;
|
||||
Vec3s pos, diff;
|
||||
struct sPuppyAngles *tempAngle;
|
||||
u32 numNodes = sizeof(newcam_fixedcam) / sizeof(struct newcam_hardpos);
|
||||
if (numNodes == 0) {
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < numNodes; i++) {
|
||||
if (newcam_fixedcam[i].newcam_hard_levelID != gCurrLevelNum || newcam_fixedcam[i].newcam_hard_areaID != gCurrAreaIndex)
|
||||
continue;
|
||||
if ((sPuppyVolumeStack[gPuppyVolumeCount] = mem_pool_alloc(gPuppyMemoryPool, sizeof(struct sPuppyVolume))) == NULL) {
|
||||
gPuppyError |= PUPPY_ERROR_POOL_FULL;
|
||||
append_puppyprint_log("Puppycamera volume allocation failed.");
|
||||
return;
|
||||
}
|
||||
if ((tempAngle = mem_pool_alloc(gPuppyMemoryPool, sizeof(struct sPuppyVolume))) == NULL)
|
||||
return;
|
||||
pos[0] = (newcam_fixedcam[i].newcam_hard_X1 + newcam_fixedcam[i].newcam_hard_X2) / 2;
|
||||
pos[1] = (newcam_fixedcam[i].newcam_hard_Y1 + newcam_fixedcam[i].newcam_hard_Y2) / 2;
|
||||
pos[2] = (newcam_fixedcam[i].newcam_hard_Z1 + newcam_fixedcam[i].newcam_hard_Z2) / 2;
|
||||
diff[0] = ABS(newcam_fixedcam[i].newcam_hard_X1 - newcam_fixedcam[i].newcam_hard_X2);
|
||||
diff[1] = ABS(newcam_fixedcam[i].newcam_hard_Y1 - newcam_fixedcam[i].newcam_hard_Y2);
|
||||
diff[2] = ABS(newcam_fixedcam[i].newcam_hard_Z1 - newcam_fixedcam[i].newcam_hard_Z2);
|
||||
vec3s_copy(sPuppyVolumeStack[gPuppyVolumeCount]->pos, pos);
|
||||
vec3s_copy(sPuppyVolumeStack[gPuppyVolumeCount]->radius, diff);
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->rot = 0; // Doesn't support rotation.
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->func = newcam_fixedcam[i].newcam_hard_script;
|
||||
tempAngle->yaw = PUPPY_NULL;
|
||||
tempAngle->pitch = PUPPY_NULL;
|
||||
tempAngle->zoom = PUPPY_NULL;
|
||||
tempAngle->pos[0] = newcam_fixedcam[i].newcam_hard_camX;
|
||||
tempAngle->pos[1] = newcam_fixedcam[i].newcam_hard_camY;
|
||||
tempAngle->pos[2] = newcam_fixedcam[i].newcam_hard_camZ;
|
||||
tempAngle->focus[0] = newcam_fixedcam[i].newcam_hard_lookX;
|
||||
tempAngle->focus[1] = newcam_fixedcam[i].newcam_hard_lookY;
|
||||
tempAngle->focus[2] = newcam_fixedcam[i].newcam_hard_lookZ;
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->angles = tempAngle;
|
||||
switch (newcam_fixedcam[i].newcam_hard_modeset) {
|
||||
case NC_MODE_FIXED:
|
||||
flagsAdd = 0;
|
||||
flagsRemove = PUPPYCAM_BEHAVIOUR_TURN_HELPER | PUPPYCAM_BEHAVIOUR_INPUT_NORMAL | PUPPYCAM_BEHAVIOUR_INPUT_4DIR |
|
||||
PUPPYCAM_BEHAVIOUR_INPUT_8DIR | PUPPYCAM_BEHAVIOUR_INPUT_2D;
|
||||
break;
|
||||
case NC_MODE_FIXED_NOTURN:
|
||||
flagsAdd = 0;
|
||||
flagsRemove = PUPPYCAM_BEHAVIOUR_PITCH_ROTATION | PUPPYCAM_BEHAVIOUR_YAW_ROTATION |
|
||||
PUPPYCAM_BEHAVIOUR_TURN_HELPER | PUPPYCAM_BEHAVIOUR_INPUT_NORMAL | PUPPYCAM_BEHAVIOUR_INPUT_4DIR |
|
||||
PUPPYCAM_BEHAVIOUR_INPUT_8DIR | PUPPYCAM_BEHAVIOUR_INPUT_2D;
|
||||
break;
|
||||
case NC_MODE_NOROTATE:
|
||||
flagsAdd = 0;
|
||||
flagsRemove = PUPPYCAM_BEHAVIOUR_PITCH_ROTATION | PUPPYCAM_BEHAVIOUR_YAW_ROTATION;
|
||||
break;
|
||||
case NC_MODE_FIXED_NOMOVE:
|
||||
flagsAdd = 0;
|
||||
flagsRemove = PUPPYCAM_BEHAVIOUR_X_MOVEMENT | PUPPYCAM_BEHAVIOUR_Y_MOVEMENT | PUPPYCAM_BEHAVIOUR_Z_MOVEMENT;
|
||||
break;
|
||||
default:
|
||||
flagsAdd = 0;
|
||||
flagsRemove = 0;
|
||||
break;
|
||||
}
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->flagsAdd = flagsAdd;
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->flagsRemove = flagsRemove;
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->flagPersistance = newcam_fixedcam[i].newcam_hard_permaswap;
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->shape = PUPPYVOLUME_SHAPE_BOX;
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->room = -1;
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->fov = 45;
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->area = newcam_fixedcam[i].newcam_hard_areaID;
|
||||
gPuppyVolumeCount++;
|
||||
}
|
||||
}
|
||||
|
||||
// Set up values. Runs on level load.
|
||||
void puppycam_init(void) {
|
||||
if (gMarioState->marioObj) {
|
||||
@@ -493,7 +569,6 @@ void puppycam_init(void) {
|
||||
#endif
|
||||
gPuppyCam.flags = gPuppyCam.intendedFlags;
|
||||
gPuppyCam.zoom = gPuppyCam.zoomPoints[1];
|
||||
gPuppyCam.zoomSet = 1;
|
||||
gPuppyCam.zoomTarget = gPuppyCam.zoom;
|
||||
gPuppyCam.yaw = gMarioState->faceAngle[1] + 0x8000;
|
||||
gPuppyCam.yawTarget = gPuppyCam.yaw;
|
||||
@@ -514,15 +589,16 @@ void puppycam_init(void) {
|
||||
gPuppyCam.mode3Flags = PUPPYCAM_MODE3_ZOOMED_MED;
|
||||
gPuppyCam.debugFlags = PUPPYDEBUG_LOCK_CONTROLS;
|
||||
puppycam_reset_values();
|
||||
create_puppycam1_nodes();
|
||||
}
|
||||
|
||||
void puppycam_input_pitch(void) {
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_PITCH_ROTATION) {
|
||||
// Handles vertical inputs.
|
||||
if (gPlayer1Controller->buttonDown & U_CBUTTONS || gPuppyCam.stick2[1] != 0) {
|
||||
gPuppyCam.pitchAcceleration -= 50 * (gPuppyCam.options.sensitivityY / 100.f);
|
||||
gPuppyCam.pitchAcceleration += 50;
|
||||
} else if (gPlayer1Controller->buttonDown & D_CBUTTONS || gPuppyCam.stick2[1] != 0) {
|
||||
gPuppyCam.pitchAcceleration += 50 * (gPuppyCam.options.sensitivityY / 100.f);
|
||||
gPuppyCam.pitchAcceleration -= 50;
|
||||
} else {
|
||||
gPuppyCam.pitchAcceleration = 0;
|
||||
}
|
||||
@@ -530,34 +606,23 @@ void puppycam_input_pitch(void) {
|
||||
|
||||
// When Mario's moving, his pitch is clamped pretty aggressively, so this exists so you can shift your view up and down momentarily at an actually usable range, rather than the otherwise baby range.
|
||||
if (gMarioState->action & ACT_FLAG_MOVING && (gPuppyCam.pitch >= 0x3800 || gPuppyCam.pitch <= 0x2000)) {
|
||||
gPuppyCam.moveFlagAdd = 8;
|
||||
gPuppyCam.movementPitchVel = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void puppycam_input_zoom(void) {
|
||||
// Handles R button zooming.
|
||||
if (gPlayer1Controller->buttonPressed & R_TRIG && gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_ZOOM_CHANGE) {
|
||||
gPuppyCam.zoomSet++;
|
||||
|
||||
if (gPuppyCam.zoomSet >= 3) {
|
||||
gPuppyCam.zoomSet = 0;
|
||||
}
|
||||
gPuppyCam.zoomTarget = gPuppyCam.zoomPoints[gPuppyCam.zoomSet];
|
||||
play_sound(SOUND_MENU_CLICK_CHANGE_VIEW,gGlobalSoundSource);
|
||||
}
|
||||
}
|
||||
|
||||
void puppycam_input_centre(void) {
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_FREE) {
|
||||
return;
|
||||
}
|
||||
s32 inputDefault = L_TRIG;
|
||||
if (gPuppyCam.options.inputType == 2) {
|
||||
inputDefault = R_TRIG;
|
||||
s32 inputDefault;
|
||||
if (gPuppyCam.options.inputType != INPUT_CLASSIC) {
|
||||
inputDefault = gPlayer1Controller->buttonPressed & L_TRIG || gPlayer1Controller->buttonPressed & R_TRIG;
|
||||
} else {
|
||||
inputDefault = gPlayer1Controller->buttonPressed & R_TRIG;
|
||||
}
|
||||
// Handles L button centering.
|
||||
if (gPlayer1Controller->buttonPressed & inputDefault && gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_YAW_ROTATION &&
|
||||
if (inputDefault && gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_YAW_ROTATION &&
|
||||
!(gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_INPUT_8DIR) && !(gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_INPUT_4DIR) && !(gPlayer1Controller->buttonDown & U_JPAD)) {
|
||||
gPuppyCam.yawTarget = gMarioState->faceAngle[1] + 0x8000;
|
||||
play_sound(SOUND_MENU_CLICK_CHANGE_VIEW,gGlobalSoundSource);
|
||||
@@ -567,18 +632,18 @@ void puppycam_input_centre(void) {
|
||||
// The default control scheme. Hold the button down to turn the camera, and double tap to turn quickly.
|
||||
static void puppycam_input_hold_preset1(f32 ivX) {
|
||||
if (!gPuppyCam.options.analogue && gPlayer1Controller->buttonPressed & L_CBUTTONS && gPuppyCam.framesSinceC[0] <= 5) {
|
||||
gPuppyCam.yawTarget -= 0x4000 * ivX;
|
||||
gPuppyCam.yawTarget += 0x4000 * ivX;
|
||||
play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource);
|
||||
} else if (!gPuppyCam.options.analogue && gPlayer1Controller->buttonPressed & R_CBUTTONS && gPuppyCam.framesSinceC[1] <= 5) {
|
||||
gPuppyCam.yawTarget += 0x4000 * ivX;
|
||||
gPuppyCam.yawTarget -= 0x4000 * ivX;
|
||||
play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource);
|
||||
}
|
||||
|
||||
if ((gPlayer1Controller->buttonDown & L_CBUTTONS && !gPuppyCam.options.analogue) || gPuppyCam.stick2[0] != 0) {
|
||||
gPuppyCam.yawAcceleration -= 75 * (gPuppyCam.options.sensitivityX / 100.f);
|
||||
gPuppyCam.yawAcceleration += 75 * (gPuppyCam.options.sensitivityX / 5.0f);
|
||||
gPuppyCam.framesSinceC[0] = 0;
|
||||
} else if ((gPlayer1Controller->buttonDown & R_CBUTTONS && !gPuppyCam.options.analogue) || gPuppyCam.stick2[0] != 0) {
|
||||
gPuppyCam.yawAcceleration += 75*(gPuppyCam.options.sensitivityX / 100.f);
|
||||
gPuppyCam.yawAcceleration -= 75*(gPuppyCam.options.sensitivityX / 5.0f);
|
||||
gPuppyCam.framesSinceC[1] = 0;
|
||||
} else {
|
||||
gPuppyCam.yawAcceleration = 0;
|
||||
@@ -592,29 +657,29 @@ static void puppycam_input_hold_preset2(f32 ivX) {
|
||||
if (gPlayer1Controller->buttonPressed & R_CBUTTONS) gPuppyCam.framesSinceC[1] = 0;
|
||||
// These handle when you release the button
|
||||
if ((!(gPlayer1Controller->buttonDown & L_CBUTTONS)) && gPuppyCam.framesSinceC[0] <= 5) {
|
||||
gPuppyCam.yawTarget -= 0x3000 * ivX;
|
||||
gPuppyCam.yawTarget += 0x3000 * ivX;
|
||||
play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource);
|
||||
gPuppyCam.framesSinceC[0] = 6;
|
||||
}
|
||||
|
||||
if ((!(gPlayer1Controller->buttonDown & R_CBUTTONS)) && gPuppyCam.framesSinceC[1] <= 5) {
|
||||
gPuppyCam.yawTarget += 0x3000 * ivX;
|
||||
gPuppyCam.yawTarget -= 0x3000 * ivX;
|
||||
play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource);
|
||||
gPuppyCam.framesSinceC[1] = 6;
|
||||
}
|
||||
|
||||
// Handles continuous movement as normal, as long as the button's held.
|
||||
if (gPlayer1Controller->buttonDown & L_CBUTTONS) {
|
||||
gPuppyCam.yawAcceleration -= 75 * (gPuppyCam.options.sensitivityX / 100.f);
|
||||
gPuppyCam.yawAcceleration += 75 * (gPuppyCam.options.sensitivityX / 5.0f);
|
||||
} else if (gPlayer1Controller->buttonDown & R_CBUTTONS) {
|
||||
gPuppyCam.yawAcceleration += 75 * (gPuppyCam.options.sensitivityX / 100.f);
|
||||
gPuppyCam.yawAcceleration -= 75 * (gPuppyCam.options.sensitivityX / 5.0f);
|
||||
} else {
|
||||
gPuppyCam.yawAcceleration = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Another alternative control scheme. This one aims to mimic the parallel camera scheme down to the last bit from the original game.
|
||||
static void puppycam_input_hold_preset3(void) {
|
||||
static void puppycam_input_hold_preset3(f32 ivX) {
|
||||
f32 stickMag[2] = {gPlayer1Controller->rawStickX*0.65f, gPlayer1Controller->rawStickY*0.2f};
|
||||
// Just in case it happens to be nonzero.
|
||||
gPuppyCam.yawAcceleration = 0;
|
||||
@@ -628,31 +693,35 @@ static void puppycam_input_hold_preset3(void) {
|
||||
|
||||
// Handles continuous movement as normal, as long as the button's held.
|
||||
if (ABS(gPlayer1Controller->rawStickX) > DEADZONE) {
|
||||
gPuppyCam.yawAcceleration -= (gPuppyCam.options.sensitivityX / 100.f) * stickMag[0];
|
||||
gPuppyCam.yawAcceleration = gPlayer1Controller->rawStickX;
|
||||
} else {
|
||||
gPuppyCam.yawAcceleration = 0;
|
||||
}
|
||||
if (ABS(gPlayer1Controller->rawStickY) > DEADZONE) {
|
||||
gPuppyCam.pitchAcceleration -= (gPuppyCam.options.sensitivityY / 100.f) * stickMag[1];
|
||||
gPuppyCam.pitchAcceleration = gPlayer1Controller->rawStickY * 2.0f;
|
||||
} else {
|
||||
gPuppyCam.pitchAcceleration = approach_f32_asymptotic(gPuppyCam.pitchAcceleration, 0, DECELERATION);
|
||||
gPuppyCam.pitchAcceleration = 0;
|
||||
}
|
||||
|
||||
} else {
|
||||
if ((gPlayer1Controller->buttonPressed & L_TRIG) && (gPuppyCam.yawTarget % 0x2000)) {
|
||||
gPuppyCam.yawTarget += 0x2000 - gPuppyCam.yawTarget % 0x2000;
|
||||
}
|
||||
|
||||
if (gPuppyCam.mode3Flags & PUPPYCAM_MODE3_ZOOMED_MED) gPuppyCam.pitchTarget = approach_s32(gPuppyCam.pitchTarget, 0x3800, 0x200, 0x200);
|
||||
if (gPuppyCam.mode3Flags & PUPPYCAM_MODE3_ZOOMED_OUT) gPuppyCam.pitchTarget = approach_s32(gPuppyCam.pitchTarget, 0x3000, 0x200, 0x200);
|
||||
if (gPuppyCam.mode3Flags & PUPPYCAM_MODE3_ZOOMED_OUT) {
|
||||
gPuppyCam.pitchTarget = approach_s32(gPuppyCam.pitchTarget, 0x3300, 0x200, 0x200);
|
||||
} else {
|
||||
gPuppyCam.pitchTarget = approach_s32(gPuppyCam.pitchTarget, 0x3800, 0x200, 0x200);
|
||||
}
|
||||
|
||||
if ((gPlayer1Controller->buttonPressed & L_CBUTTONS && !gPuppyCam.options.analogue) || (gPuppyCam.stick2[0] > DEADZONE && !gPuppyCam.stickN[0])) {
|
||||
gPuppyCam.stickN[0] = 1;
|
||||
gPuppyCam.yawTarget -= 0x2000;
|
||||
gPuppyCam.stickN[0] = 1;
|
||||
gPuppyCam.yawTarget += 0x2000 * ivX;
|
||||
play_sound(SOUND_MENU_CAMERA_TURN,gGlobalSoundSource);
|
||||
}
|
||||
if ((gPlayer1Controller->buttonPressed & R_CBUTTONS && !gPuppyCam.options.analogue) || (gPuppyCam.stick2[0] < -DEADZONE && !gPuppyCam.stickN[0])) {
|
||||
gPuppyCam.stickN[0] = 1;
|
||||
gPuppyCam.yawTarget += 0x2000;
|
||||
gPuppyCam.stickN[0] = 1;
|
||||
gPuppyCam.yawTarget -= 0x2000 * ivX;
|
||||
play_sound(SOUND_MENU_CAMERA_TURN,gGlobalSoundSource);
|
||||
}
|
||||
}
|
||||
@@ -663,7 +732,8 @@ static void puppycam_input_hold_preset3(void) {
|
||||
gPuppyCam.stickN[1] = 1;
|
||||
gPuppyCam.mode3Flags |= PUPPYCAM_MODE3_ZOOMED_IN;
|
||||
gPuppyCam.mode3Flags &= ~PUPPYCAM_MODE3_ZOOMED_MED;
|
||||
gPuppyCam.zoomTarget = 200;
|
||||
gPuppyCam.pitchTarget = 0x4000;
|
||||
gPuppyCam.zoomTarget = 80;
|
||||
gPuppyCam.mode3Flags |= PUPPYCAM_MODE3_ENTER_FIRST_PERSON;
|
||||
|
||||
play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource);
|
||||
@@ -675,7 +745,7 @@ static void puppycam_input_hold_preset3(void) {
|
||||
|
||||
play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource);
|
||||
}
|
||||
} else if ((gPlayer1Controller->buttonPressed & D_CBUTTONS && !gPuppyCam.options.analogue) || (gPuppyCam.stick2[1] < -DEADZONE && !gPuppyCam.stickN[1])) { // Otherwise handle zooming out.
|
||||
} else if ((gPlayer1Controller->buttonPressed & D_CBUTTONS && !gPuppyCam.options.analogue) || (gPuppyCam.stick2[1] < -DEADZONE && !gPuppyCam.stickN[1])) { // Otherwise handle zooming out.
|
||||
if (gPuppyCam.mode3Flags & PUPPYCAM_MODE3_ZOOMED_MED) {
|
||||
gPuppyCam.stickN[1] = 1;
|
||||
gPuppyCam.mode3Flags |= PUPPYCAM_MODE3_ZOOMED_OUT;
|
||||
@@ -685,14 +755,16 @@ static void puppycam_input_hold_preset3(void) {
|
||||
play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gGlobalSoundSource);
|
||||
}
|
||||
}
|
||||
if ((gPlayer1Controller->buttonPressed & D_CBUTTONS && !gPuppyCam.options.analogue) || (gPuppyCam.stick2[1] < -DEADZONE && !gPuppyCam.stickN[1]) ||
|
||||
gPlayer1Controller->buttonPressed & B_BUTTON || gPlayer1Controller->buttonPressed & A_BUTTON) {
|
||||
if (((gPlayer1Controller->buttonPressed & D_CBUTTONS && !gPuppyCam.options.analogue) || (gPuppyCam.stick2[1] < -DEADZONE && !gPuppyCam.stickN[1]) ||
|
||||
gPlayer1Controller->buttonPressed & B_BUTTON || gPlayer1Controller->buttonPressed & A_BUTTON) && gPlayer1Controller->stickMag < DEADZONE) {
|
||||
if (gPuppyCam.mode3Flags & PUPPYCAM_MODE3_ZOOMED_IN) {
|
||||
gPuppyCam.stickN[1] = 1;
|
||||
gPuppyCam.mode3Flags |= PUPPYCAM_MODE3_ZOOMED_MED;
|
||||
gPuppyCam.mode3Flags &= ~PUPPYCAM_MODE3_ZOOMED_IN;
|
||||
gPuppyCam.zoomTarget = gPuppyCam.zoomPoints[1];
|
||||
gPuppyCam.mode3Flags &= ~PUPPYCAM_MODE3_ENTER_FIRST_PERSON;
|
||||
gPuppyCam.pitch = 0x4000;
|
||||
gPuppyCam.pitchTarget = 0x4000;
|
||||
|
||||
play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gGlobalSoundSource);
|
||||
}
|
||||
@@ -701,15 +773,14 @@ static void puppycam_input_hold_preset3(void) {
|
||||
|
||||
// Handles C Button inputs for modes that have held inputs, rather than presses.
|
||||
static void puppycam_input_hold(void) {
|
||||
f32 ivX = ((gPuppyCam.options.invertX * 2) - 1) * (gPuppyCam.options.sensitivityX / 100.f);
|
||||
f32 ivY = ((gPuppyCam.options.invertY * 2) - 1) * (gPuppyCam.options.sensitivityY / 100.f);
|
||||
f32 ivX = ((gPuppyCam.options.invertX * 2) - 1);
|
||||
s8 stickMag[2] = {100, 100};
|
||||
|
||||
if (gPuppyCam.intendedFlags & PUPPYCAM_BEHAVIOUR_FREE) {
|
||||
gPuppyCam.flags = PUPPYCAM_BEHAVIOUR_FREE | PUPPYCAM_BEHAVIOUR_YAW_ROTATION | PUPPYCAM_BEHAVIOUR_PITCH_ROTATION;
|
||||
}
|
||||
// Analogue Camera stuff. If it fails to find an input, then it just sets stickmag to 100, which after calculations means the value goes unchanged.
|
||||
if (gPuppyCam.options.analogue && gPuppyCam.options.inputType != 2) {
|
||||
if (gPuppyCam.options.analogue && gPuppyCam.options.inputType != INPUT_CLASSIC) {
|
||||
stickMag[0] = gPuppyCam.stick2[0] * 1.25f;
|
||||
stickMag[1] = gPuppyCam.stick2[1] * 1.25f;
|
||||
}
|
||||
@@ -718,32 +789,36 @@ static void puppycam_input_hold(void) {
|
||||
if (!(gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_YAW_ROTATION)) {
|
||||
return;
|
||||
}
|
||||
if ((!gPuppyCam.options.analogue || gPuppyCam.options.inputType == 2) && !(gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_FREE)) {
|
||||
if ((!gPuppyCam.options.analogue || gPuppyCam.options.inputType == INPUT_CLASSIC) && !(gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_FREE)) {
|
||||
switch (gPuppyCam.options.inputType) {
|
||||
default: puppycam_input_hold_preset1(ivX); puppycam_input_pitch(); puppycam_input_zoom(); puppycam_input_centre(); break;
|
||||
case 1: puppycam_input_hold_preset2(ivX); puppycam_input_pitch(); puppycam_input_zoom(); puppycam_input_centre(); break;
|
||||
case 2: puppycam_input_hold_preset3(); puppycam_input_centre(); break;
|
||||
default: puppycam_input_hold_preset1(ivX); puppycam_input_pitch(); puppycam_input_centre(); break;
|
||||
case INPUT_SINGLE_PRESS: puppycam_input_hold_preset2(ivX); puppycam_input_pitch(); puppycam_input_centre(); break;
|
||||
case INPUT_CLASSIC: puppycam_input_hold_preset3(ivX); puppycam_input_centre(); break;
|
||||
}
|
||||
} else {
|
||||
puppycam_input_hold_preset1(ivX);
|
||||
puppycam_input_pitch();
|
||||
puppycam_input_zoom();
|
||||
puppycam_input_centre();
|
||||
}
|
||||
|
||||
if (gPuppyCam.options.inputType != INPUT_CLASSIC) {
|
||||
gPuppyCam.mode3Flags |= PUPPYCAM_MODE3_ZOOMED_MED;
|
||||
gPuppyCam.mode3Flags &= ~PUPPYCAM_MODE3_ZOOMED_IN;
|
||||
gPuppyCam.zoomTarget = gPuppyCam.zoomPoints[1];
|
||||
gPuppyCam.mode3Flags &= ~PUPPYCAM_MODE3_ENTER_FIRST_PERSON;
|
||||
}
|
||||
|
||||
gPuppyCam.framesSinceC[0]++;
|
||||
gPuppyCam.framesSinceC[1]++;
|
||||
|
||||
gPuppyCam.yawAcceleration = CLAMP(gPuppyCam.yawAcceleration, -100, 100);
|
||||
|
||||
gPuppyCam.yawTarget += (12 * gPuppyCam.yawAcceleration * ivX) * (stickMag[0] * 0.01f);
|
||||
gPuppyCam.pitchTarget += ((4 + gPuppyCam.moveFlagAdd) * gPuppyCam.pitchAcceleration * ivY) * (stickMag[1] * 0.01f);
|
||||
gPuppyCam.yawTarget += (12 * gPuppyCam.yawAcceleration * (ivX * (gPuppyCam.options.sensitivityX / 5.0f))) * (stickMag[0] * 0.01f);
|
||||
gPuppyCam.pitchTarget += ((3 + gPuppyCam.movementPitchVel) * gPuppyCam.pitchAcceleration) * (stickMag[1] * 0.01f);
|
||||
}
|
||||
|
||||
// Handles C Button inputs for modes that have pressed inputs, rather than held.
|
||||
static void puppycam_input_press(void) {
|
||||
f32 ivX = ((gPuppyCam.options.invertX * 2) - 1) * (gPuppyCam.options.sensitivityX / 100.f);
|
||||
f32 ivY = ((gPuppyCam.options.invertY * 2) - 1) * (gPuppyCam.options.sensitivityY / 100.f);
|
||||
s8 stickMag = 0;
|
||||
|
||||
// Analogue Camera stuff. If it fails to find an input, then it just sets stickmag to 100, which after calculations means the value goes unchanged.
|
||||
@@ -762,9 +837,9 @@ static void puppycam_input_press(void) {
|
||||
if ((gPlayer1Controller->buttonPressed & L_CBUTTONS && !gPuppyCam.options.analogue) || (gPuppyCam.stickN[0] == 0 && gPuppyCam.stick2[0] < -DEADZONE)) {
|
||||
gPuppyCam.stickN[0] = 1;
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_INPUT_8DIR) {
|
||||
gPuppyCam.yawTarget -= 0x2000 * ivX;
|
||||
gPuppyCam.yawTarget -= 0x2000;
|
||||
} else {
|
||||
gPuppyCam.yawTarget -= 0x4000 * ivX;
|
||||
gPuppyCam.yawTarget -= 0x4000;
|
||||
}
|
||||
play_sound(SOUND_MENU_CAMERA_ZOOM_IN,gGlobalSoundSource);
|
||||
}
|
||||
@@ -772,16 +847,15 @@ static void puppycam_input_press(void) {
|
||||
if ((gPlayer1Controller->buttonPressed & R_CBUTTONS && !gPuppyCam.options.analogue) || (gPuppyCam.stickN[0] == 0 && gPuppyCam.stick2[0] > DEADZONE)) {
|
||||
gPuppyCam.stickN[0] = 1;
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_INPUT_8DIR) {
|
||||
gPuppyCam.yawTarget += 0x2000 * ivX;
|
||||
gPuppyCam.yawTarget += 0x2000;
|
||||
} else {
|
||||
gPuppyCam.yawTarget += 0x4000 * ivX;
|
||||
gPuppyCam.yawTarget += 0x4000;
|
||||
}
|
||||
play_sound(SOUND_MENU_CAMERA_ZOOM_IN,gGlobalSoundSource);
|
||||
}
|
||||
puppycam_input_pitch();
|
||||
puppycam_input_zoom();
|
||||
puppycam_input_centre();
|
||||
gPuppyCam.pitchTarget += ((4 + gPuppyCam.moveFlagAdd) * gPuppyCam.pitchAcceleration * ivY) * (stickMag * 0.01f);
|
||||
gPuppyCam.pitchTarget += ((3 + gPuppyCam.movementPitchVel) * gPuppyCam.pitchAcceleration) * (stickMag * 0.01f);
|
||||
}
|
||||
|
||||
void puppycam_debug_view(void) {
|
||||
@@ -831,31 +905,38 @@ void puppycam_debug_view(void) {
|
||||
static void puppycam_view_panning(void) {
|
||||
s32 expectedPanX, expectedPanZ;
|
||||
s32 height = gPuppyCam.targetObj->oPosY;
|
||||
s32 panEx = (gPuppyCam.zoomTarget >= 1000) * 160; //Removes the basic panning when idling if the zoom level is at the closest.
|
||||
f32 slideSpeed = 1;
|
||||
//Removes the basic panning when idling if the zoom level is at the closest.
|
||||
s32 panEx = ((gPuppyCam.zoomTarget >= 1000) * 200) * (1.0f + MIN(gMarioState->forwardVel / 16.0f, 2.0f));
|
||||
f32 slideSpeed = 1.0f;
|
||||
|
||||
f32 panMulti = CLAMP(gPuppyCam.zoom / (f32)gPuppyCam.zoomPoints[2], 0.f, 1.f);
|
||||
if (gPuppyCam.options.inputType == 2) {
|
||||
panMulti /= 2;
|
||||
if (gPuppyCam.options.inputType == INPUT_CLASSIC) {
|
||||
panMulti /= 2.0f;
|
||||
}
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_PANSHIFT && gMarioState->action != ACT_HOLDING_BOWSER && gMarioState->action != ACT_SLEEPING && gMarioState->action != ACT_START_SLEEPING) {
|
||||
if (gMarioState->action & ACT_FLAG_BUTT_OR_STOMACH_SLIDE) {
|
||||
slideSpeed = 10;
|
||||
slideSpeed = 10.0f;
|
||||
} else if (gMarioState->action & ACT_FLAG_MOVING) {
|
||||
slideSpeed = MIN(gMarioState->forwardVel / 12.0f, 3.0f);
|
||||
}
|
||||
expectedPanX = LENSIN(panEx + (200 * (gMarioState->forwardVel / 320.f)), gMarioState->faceAngle[1]) * panMulti;
|
||||
expectedPanZ = LENCOS(panEx + (200 * (gMarioState->forwardVel / 320.f)), gMarioState->faceAngle[1]) * panMulti;
|
||||
f32 speedMul = panEx + (400.0f * CLAMP(gMarioState->forwardVel / 320.0f, 0.25f, 1.0f));
|
||||
expectedPanX = LENCOS(LENSIN(speedMul, gMarioState->faceAngle[1] - gPuppyCam.yaw) * panMulti, ABS(gPuppyCam.yaw));
|
||||
expectedPanZ = LENSIN(LENCOS(speedMul, gMarioState->faceAngle[1]) * panMulti, ABS(gPuppyCam.yaw));
|
||||
|
||||
gPuppyCam.pan[0] = approach_f32_asymptotic(gPuppyCam.pan[0], expectedPanX, 0.02f*slideSpeed);
|
||||
gPuppyCam.pan[2] = approach_f32_asymptotic(gPuppyCam.pan[2], expectedPanZ, 0.02f*slideSpeed);
|
||||
gPuppyCam.pan[0] = approach_f32_asymptotic(gPuppyCam.pan[0], expectedPanX, 0.01f * slideSpeed);
|
||||
gPuppyCam.pan[2] = approach_f32_asymptotic(gPuppyCam.pan[2], expectedPanZ, 0.01f * slideSpeed);
|
||||
if (gMarioState->vel[1] == 0.0f) {
|
||||
f32 panFloor = CLAMP(find_floor_height((s16)(gPuppyCam.targetObj->oPosX+expectedPanX), (s16)(gPuppyCam.targetObj->oPosY + 200),
|
||||
(s16)(gPuppyCam.targetObj->oPosZ+expectedPanZ)), gPuppyCam.targetObj->oPosY - 50,gPuppyCam.targetObj->oPosY + 50);
|
||||
// If the floor is lower than 150 units below Mario, then ignore the Y value and tilt the camera instead.
|
||||
if (panFloor <= gPuppyCam.targetObj->oPosY - 150) {
|
||||
panFloor = gPuppyCam.targetObj->oPosY;
|
||||
gPuppyCam.edgePitch = approach_s32(gPuppyCam.edgePitch, -0x2000, 0x80, 0x80);
|
||||
s32 forwardPanX = LENSIN(250.0f, gPuppyCam.yaw + 0x8000);
|
||||
s32 forwardPanZ = LENCOS(250.0f, gPuppyCam.yaw + 0x8000);
|
||||
s32 ledgeHeight = find_floor_height((s16)(gPuppyCam.targetObj->oPosX+forwardPanX), (s16)(gPuppyCam.targetObj->oPosY + 200), (s16)(gPuppyCam.targetObj->oPosZ+forwardPanZ));
|
||||
if (ABS(ledgeHeight - gPuppyCam.targetObj->oPosY) > 150 && ledgeHeight != FLOOR_LOWER_LIMIT && !(gMarioState->action & ACT_FLAG_SWIMMING) && !(gMarioState->action & ACT_FLAG_AIR)) {
|
||||
ledgeHeight = gPuppyCam.targetObj->oPosY;
|
||||
gPuppyCam.edgePitch = approach_f32_asymptotic(gPuppyCam.edgePitch, -0x2000, 0.05f);
|
||||
} else {
|
||||
gPuppyCam.edgePitch = approach_s32(gPuppyCam.edgePitch, 0, 0x100, 0x100);
|
||||
gPuppyCam.edgePitch = approach_f32_asymptotic(gPuppyCam.edgePitch, 0, 0.05f);
|
||||
}
|
||||
gPuppyCam.pan[1] = approach_f32_asymptotic(gPuppyCam.pan[1], panFloor - height, 0.025f);
|
||||
} else {
|
||||
@@ -1002,10 +1083,10 @@ void puppycam_projection_behaviours(void) {
|
||||
|
||||
// This will only be executed if Mario's the target. If it's not, it'll reset the
|
||||
if (gPuppyCam.targetObj == gMarioState->marioObj) {
|
||||
if ((gPuppyCam.options.turnAggression > 0 && gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_TURN_HELPER && !(gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_INPUT_8DIR) &&
|
||||
gMarioState->vel[1] == 0.0f && !(gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_INPUT_4DIR) && gPuppyCam.options.inputType != 2) || gMarioState->action == ACT_SHOT_FROM_CANNON || gMarioState->action == ACT_FLYING) { // Holy hell this is getting spicy.
|
||||
if (((gPuppyCam.options.turnHelper || gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_TURN_HELPER) && !(gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_INPUT_8DIR) &&
|
||||
gMarioState->vel[1] == 0.0f && !(gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_INPUT_4DIR) && gPuppyCam.options.inputType != INPUT_CLASSIC) || gMarioState->action == ACT_SHOT_FROM_CANNON || gMarioState->action == ACT_FLYING) { // Holy hell this is getting spicy.
|
||||
// With turn aggression enabled, or if Mario's sliding, adjust the camera view behind mario.
|
||||
if (gPuppyCam.options.turnAggression > 0 || gMarioState->action & ACT_FLAG_BUTT_OR_STOMACH_SLIDE || gMarioState->action == ACT_SHOT_FROM_CANNON || gMarioState->action == ACT_FLYING) {
|
||||
if (gPuppyCam.options.turnHelper || gMarioState->action & ACT_FLAG_BUTT_OR_STOMACH_SLIDE || gMarioState->action == ACT_SHOT_FROM_CANNON || gMarioState->action == ACT_FLYING) {
|
||||
if (gMarioState->action & ACT_FLAG_BUTT_OR_STOMACH_SLIDE) {
|
||||
turnRate = 4; // If he's sliding, do it 4x as fast.
|
||||
}
|
||||
@@ -1015,7 +1096,7 @@ void puppycam_projection_behaviours(void) {
|
||||
// It also scales with forward velocity, so it's a gradual effect as he speeds up.
|
||||
if ((ABS(gPlayer1Controller->rawStickX) > 20 && !(gMarioState->action & ACT_FLAG_BUTT_OR_STOMACH_SLIDE)) || (gMarioState->action == ACT_SHOT_FROM_CANNON) ||
|
||||
(gMarioState->action & ACT_FLAG_BUTT_OR_STOMACH_SLIDE && (s16)ABS(((gPuppyCam.yaw + 0x8000) % 0xFFFF - 0x8000) - ((gMarioState->faceAngle[1]) % 0xFFFF - 0x8000)) < 0x3000 ))
|
||||
gPuppyCam.yawTarget = approach_angle(gPuppyCam.yawTarget, (gMarioState->faceAngle[1] + 0x8000), ((gPuppyCam.options.turnAggression * 10) * ABS(gMarioState->forwardVel / 32) * turnMag * turnRate));
|
||||
gPuppyCam.yawTarget = approach_angle(gPuppyCam.yawTarget, (gMarioState->faceAngle[1] + 0x8000), ((0x200) * ABS(gMarioState->forwardVel / 32) * turnMag * turnRate));
|
||||
}
|
||||
} else { //If none of the above is true, it'll attempt to do this instead.
|
||||
// If the camera's in these modes, snap the yaw to prevent desync.
|
||||
@@ -1035,21 +1116,24 @@ void puppycam_projection_behaviours(void) {
|
||||
gPuppyCam.targetFloorHeight = CLAMP(find_floor_height(gPuppyCam.targetObj->oPosX, gPuppyCam.targetObj->oPosY, gPuppyCam.targetObj->oPosZ), gPuppyCam.targetObj->oPosY-350, gPuppyCam.targetObj->oPosY+300);
|
||||
gPuppyCam.lastTargetFloorHeight = approach_f32_asymptotic(gPuppyCam.lastTargetFloorHeight , gPuppyCam.targetFloorHeight
|
||||
, CLAMP((absf(gMarioState->vel[1]) - 17.f) / 200.f, 0, 0.1f)
|
||||
+ CLAMP((absf(gPuppyCam.targetFloorHeight - gPuppyCam.lastTargetFloorHeight) - 30.f) / 300.f, 0, 0.1f));
|
||||
+ CLAMP((absf(gPuppyCam.targetFloorHeight - gPuppyCam.lastTargetFloorHeight)) / 300.f, 0, 0.1f));
|
||||
|
||||
if (gMarioState->action == ACT_SLEEPING || gMarioState->action == ACT_START_SLEEPING) {
|
||||
gPuppyCam.zoom = approach_f32_asymptotic(gPuppyCam.zoom,gPuppyCam.zoomPoints[0],0.01f);
|
||||
} else if ((gMarioState->action & ACT_FLAG_SWIMMING_OR_FLYING && gMarioState->waterLevel-100 - gMarioState->pos[1] > 5) || gMarioState->action == ACT_FLYING) {
|
||||
// When moving underwater or flying, the camera will zoom in on Mayro.
|
||||
gPuppyCam.zoom = approach_f32_asymptotic(gPuppyCam.zoom, MAX(gPuppyCam.zoomTarget/1.5f, gPuppyCam.zoomPoints[0]), 0.2f);
|
||||
gPuppyCam.zoom = approach_f32_asymptotic(gPuppyCam.zoom, 500, 0.2f);
|
||||
} else {
|
||||
gPuppyCam.zoom = approach_f32_asymptotic(gPuppyCam.zoom,gPuppyCam.zoomTarget, 0.2f);
|
||||
if (gPuppyCam.options.inputType != INPUT_CLASSIC) {
|
||||
gPuppyCam.zoom = approach_f32_asymptotic(gPuppyCam.zoom, 500 + CLAMP((0x4000 - gPuppyCam.pitch)/10, 0, 1250), 0.35f);
|
||||
} else {
|
||||
gPuppyCam.zoom = approach_f32_asymptotic(gPuppyCam.zoom, gPuppyCam.zoomTarget, 0.15f);
|
||||
}
|
||||
}
|
||||
// Attempts at automatic adjustment that only apply when moving or jumping.
|
||||
if (gMarioState->action & ACT_FLAG_MOVING || gMarioState->action & ACT_FLAG_AIR || (gMarioState->action & ACT_FLAG_SWIMMING && !gMarioState->waterLevel-100 - gMarioState->pos[1] > 5 && gMarioState->forwardVel != 0.0f)) {
|
||||
if (gMarioState->action & ACT_FLAG_MOVING || gMarioState->action & ACT_FLAG_AIR || gMarioState->action & ACT_FLAG_ON_POLE || (gMarioState->action & ACT_FLAG_SWIMMING && !gMarioState->waterLevel-100 - gMarioState->pos[1] > 5 && gMarioState->forwardVel != 0.0f)) {
|
||||
// Clamp the height when moving. You can still look up and down to a reasonable degree but it readjusts itself the second you let go.
|
||||
if (gPuppyCam.pitchTarget > 0x3800) gPuppyCam.pitchTarget = approach_f32_asymptotic(gPuppyCam.pitchTarget, 0x3800, 0.2f);
|
||||
if (gPuppyCam.pitchTarget < 0x2000) gPuppyCam.pitchTarget = approach_f32_asymptotic(gPuppyCam.pitchTarget, 0x2000, 0.2f);
|
||||
}
|
||||
|
||||
// Applies a light outward zoom to the camera when moving. Sets it back to 0 when not moving.
|
||||
@@ -1060,14 +1144,22 @@ void puppycam_projection_behaviours(void) {
|
||||
}
|
||||
|
||||
// Zooms the camera in further when underwater.
|
||||
if (gPuppyCam.pitch > 0x38C0 && ABS(gPuppyCam.swimPitch) < 100) {
|
||||
gPuppyCam.zoom = approach_f32_asymptotic((f32)gPuppyCam.zoom, 250.0f, CLAMP((f32)((gPuppyCam.pitch - 0x38C0) / 3072.0f), 0.0f, 1.0f));
|
||||
if (gPuppyCam.pitch > 0x38C0 && ABS(gPuppyCam.swimPitch) < 100 && !(gPuppyCam.mode3Flags & PUPPYCAM_MODE3_ZOOMED_IN)) {
|
||||
gPuppyCam.zoom = approach_f32_asymptotic((f32)gPuppyCam.zoom, 250.0f, CLAMP((f32)((gPuppyCam.pitch - 0x38C0) / 16384.0f), 0.0f, 1.0f));
|
||||
}
|
||||
|
||||
if (!(gMarioState->action & ACT_FLAG_SWIMMING_OR_FLYING)) {
|
||||
gPuppyCam.floorY[0] = softClamp(gPuppyCam.targetObj->oPosY - gPuppyCam.lastTargetFloorHeight, -180, 300);
|
||||
gPuppyCam.floorY[1] = softClamp(gPuppyCam.targetObj->oPosY - gPuppyCam.lastTargetFloorHeight, -180, 350);
|
||||
gPuppyCam.swimPitch = approach_f32_asymptotic(gPuppyCam.swimPitch,0,0.2f);
|
||||
// Move the floor values upwards if moving and looking up, this makes the camera bias the view upwards.
|
||||
if (gMarioState->forwardVel > 0.0f && gPuppyCam.pitch >= 0x3A00) {
|
||||
f32 speedMul = CLAMP(gMarioState->forwardVel / 32.0f, 0.0f, 1.0f);
|
||||
gPuppyCam.floorY[0] += ((0x3A00 - gPuppyCam.pitch) / 24) * speedMul;
|
||||
gPuppyCam.floorY[1] += ((0x3A00 - gPuppyCam.pitch) / 64) * speedMul;
|
||||
// Disable collision because it shouldn't trigger intentionally at this distance anyway.
|
||||
gPuppyCam.flags &= ~PUPPYCAM_BEHAVIOUR_COLLISION;
|
||||
}
|
||||
} else {
|
||||
gPuppyCam.floorY[0] = 0;
|
||||
gPuppyCam.floorY[1] = 0;
|
||||
@@ -1117,7 +1209,7 @@ void puppycam_shake(UNUSED s16 x, UNUSED s16 y, UNUSED s16 z) {
|
||||
// The centrepiece behind the input side of PuppyCam. The C buttons branch off.
|
||||
static void puppycam_input_core(void) {
|
||||
puppycam_analogue_stick();
|
||||
gPuppyCam.moveFlagAdd = 0;
|
||||
gPuppyCam.movementPitchVel = 0;
|
||||
|
||||
// Decide which input for left and right C buttons to use based on behaviour type.
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_INPUT_NORMAL || gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_FREE) {
|
||||
@@ -1131,7 +1223,8 @@ static void puppycam_input_core(void) {
|
||||
static void puppycam_projection(void) {
|
||||
Vec3s targetPos, targetPos2, targetPos3;
|
||||
s16 pitchTotal;
|
||||
s32 panD = (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_PANSHIFT) / 8192;
|
||||
f32 tempSin;
|
||||
f32 panD = (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_PANSHIFT) / 8192;
|
||||
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_FREE) {
|
||||
puppycam_reset_values();
|
||||
@@ -1145,8 +1238,8 @@ static void puppycam_projection(void) {
|
||||
gPuppyCam.pitch = CLAMP(gPuppyCam.pitch, 0x1000, 0x7000);
|
||||
gPuppyCam.pitchTarget = CLAMP(gPuppyCam.pitchTarget, 0x1000, 0x7000);
|
||||
// These are the base rotations going to be used.
|
||||
gPuppyCam.yaw = gPuppyCam.yawTarget - approach_f32_asymptotic((s16)(gPuppyCam.yawTarget - gPuppyCam.yaw ), 0, 0.3335f);
|
||||
gPuppyCam.pitch = gPuppyCam.pitchTarget - approach_f32_asymptotic((s16)(gPuppyCam.pitchTarget - gPuppyCam.pitch), 0, 0.3335f);
|
||||
gPuppyCam.yaw = gPuppyCam.yawTarget - approach_f32_asymptotic((s16)(gPuppyCam.yawTarget - gPuppyCam.yaw ), 0, 0.5f);
|
||||
gPuppyCam.pitch = gPuppyCam.pitchTarget - approach_f32_asymptotic((s16)(gPuppyCam.pitchTarget - gPuppyCam.pitch), 0, 0.5f);
|
||||
// This adds the pitch effect when underwater, which is capped so it doesn't get out of control. If you're not swimming, swimpitch is 0, so it's normal.
|
||||
pitchTotal = CLAMP(gPuppyCam.pitch+(gPuppyCam.swimPitch*10)+gPuppyCam.edgePitch + gPuppyCam.terrainPitch, 800, 0x7800);
|
||||
|
||||
@@ -1167,14 +1260,30 @@ static void puppycam_projection(void) {
|
||||
}
|
||||
|
||||
gPuppyCam.targetDist[1] = gPuppyCam.targetDist[0] + gPuppyCam.zoom+gPuppyCam.moveZoom;
|
||||
#ifdef ENABLE_DEBUG_FREE_MOVE
|
||||
if (gMarioState->action == ACT_DEBUG_FREE_MOVE) gPuppyCam.targetDist[1] = MAX(gPuppyCam.targetDist[1] * 1.1f, 500);
|
||||
#endif
|
||||
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_X_MOVEMENT) gPuppyCam.focus[0] = targetPos3[0] + gPuppyCam.shake[0] + (gPuppyCam.pan[0] * gPuppyCam.targetDist[1] / gPuppyCam.zoomPoints[2]) * panD;
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_Y_MOVEMENT) gPuppyCam.focus[1] = targetPos3[1] + gPuppyCam.shake[1] + (gPuppyCam.pan[1] * gPuppyCam.targetDist[1] / gPuppyCam.zoomPoints[2]) + gPuppyCam.povHeight - gPuppyCam.floorY[0] + (gPuppyCam.swimPitch / 10);
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_Z_MOVEMENT) gPuppyCam.focus[2] = targetPos3[2] + gPuppyCam.shake[2] + (gPuppyCam.pan[2] * gPuppyCam.targetDist[1] / gPuppyCam.zoomPoints[2]) * panD;
|
||||
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_X_MOVEMENT) gPuppyCam.pos[0] = gPuppyCam.targetObj->oPosX + LENSIN(LENSIN(gPuppyCam.targetDist[1], pitchTotal), gPuppyCam.yaw) + gPuppyCam.shake[0];
|
||||
#ifdef ENABLE_DEBUG_FREE_MOVE
|
||||
if (gMarioState->action == ACT_DEBUG_FREE_MOVE) vec3_copy_y_off(gPuppyCam.focus, gMarioState->pos, 160.0f);
|
||||
#endif
|
||||
|
||||
tempSin = LENSIN(gPuppyCam.targetDist[1], pitchTotal);
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_X_MOVEMENT) gPuppyCam.pos[0] = gPuppyCam.targetObj->oPosX + LENSIN(tempSin, gPuppyCam.yaw) + gPuppyCam.shake[0];
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_Y_MOVEMENT) gPuppyCam.pos[1] = gPuppyCam.targetObj->oPosY + gPuppyCam.povHeight + LENCOS(gPuppyCam.targetDist[1], pitchTotal) + gPuppyCam.shake[1] - gPuppyCam.floorY[1];
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_Z_MOVEMENT) gPuppyCam.pos[2] = gPuppyCam.targetObj->oPosZ + LENCOS(LENSIN(gPuppyCam.targetDist[1], pitchTotal), gPuppyCam.yaw) + gPuppyCam.shake[2];
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_Z_MOVEMENT) gPuppyCam.pos[2] = gPuppyCam.targetObj->oPosZ + LENCOS(tempSin, gPuppyCam.yaw) + gPuppyCam.shake[2];
|
||||
|
||||
// To improve precision in first person, apply an offset to the focus position so it's not noticably jerky.
|
||||
if (gPuppyCam.mode3Flags & PUPPYCAM_MODE3_ENTER_FIRST_PERSON && gPuppyCam.zoom < 400 && gPuppyCam.zoomTarget < 100) {
|
||||
f32 zoomDist = LENSIN(1000.0f, pitchTotal);
|
||||
gPuppyCam.focus[0] = gPuppyCam.targetObj->oPosX + LENSIN(zoomDist, gPuppyCam.yaw + 0x8000) + gPuppyCam.shake[0];
|
||||
gPuppyCam.focus[1] = gPuppyCam.targetObj->oPosY + (gPuppyCam.povHeight * 2) + LENCOS(1000.0f, gPuppyCam.pitch) + gPuppyCam.shake[1];
|
||||
gPuppyCam.focus[2] = gPuppyCam.targetObj->oPosZ + LENCOS(zoomDist, gPuppyCam.yaw + 0x8000) + gPuppyCam.shake[2];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1218,8 +1327,6 @@ static void puppycam_script(void) {
|
||||
if (volume.angles->zoom != PUPPY_NULL) {
|
||||
gPuppyCam.zoomTarget = volume.angles->zoom;
|
||||
gPuppyCam.zoom = gPuppyCam.zoomTarget;
|
||||
|
||||
gPuppyCam.flags &= ~PUPPYCAM_BEHAVIOUR_ZOOM_CHANGE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1242,53 +1349,79 @@ static void puppycam_script(void) {
|
||||
|
||||
// Handles collision detection using ray casting.
|
||||
static void puppycam_collision(void) {
|
||||
struct WallCollisionData wall0, wall1;
|
||||
struct Surface *surf[2];
|
||||
Vec3f camdir[2];
|
||||
Vec3f hitpos[2];
|
||||
Vec3f target[2];
|
||||
s16 pitchTotal = CLAMP(gPuppyCam.pitch+(gPuppyCam.swimPitch * 10) + gPuppyCam.edgePitch + gPuppyCam.terrainPitch, 800, 0x7800);
|
||||
s32 dist[2];
|
||||
|
||||
if (gPuppyCam.targetObj == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct Surface *surf[2] = {NULL, NULL};
|
||||
|
||||
Vec3f dirToCam;
|
||||
Vec3f hitpos[2];
|
||||
Vec3f target[2];
|
||||
f32 dist[2] = {0};
|
||||
// the distance from surface the camera should be. note: should NOT be greater than ~50 due to mario's hitbox
|
||||
const f32 surfOffset = 15.0f;
|
||||
// how far the raycast should extend, goes the current zoom dist plus the surfOffset (and a little bit more for safety)
|
||||
f32 colCheckDist = gPuppyCam.zoom + (surfOffset * 2.0f);
|
||||
|
||||
// The ray, starting from the top
|
||||
vec3_copy_y_off(target[0], &gPuppyCam.targetObj->oPosVec, (gPuppyCam.povHeight) - CLAMP(gPuppyCam.targetObj->oPosY - gPuppyCam.targetFloorHeight, 0, 300));
|
||||
vec3_copy_y_off(target[0], &gPuppyCam.targetObj->oPosVec, 120);
|
||||
// The ray, starting from the bottom
|
||||
vec3_copy_y_off(target[1], &gPuppyCam.targetObj->oPosVec, (gPuppyCam.povHeight * 0.4f));
|
||||
vec3_copy_y_off(target[1], &gPuppyCam.targetObj->oPosVec, 30);
|
||||
|
||||
camdir[0][0] = LENSIN(LENSIN(gPuppyCam.zoomTarget, pitchTotal), gPuppyCam.yaw) + gPuppyCam.shake[0];
|
||||
camdir[0][1] = LENCOS(gPuppyCam.zoomTarget, pitchTotal) + gPuppyCam.shake[1];
|
||||
camdir[0][2] = LENCOS(LENSIN(gPuppyCam.zoomTarget, pitchTotal), gPuppyCam.yaw) + gPuppyCam.shake[2];
|
||||
// Get the direction from mario's head to the camera
|
||||
vec3_diff(dirToCam, gPuppyCam.pos, target[0]);
|
||||
vec3f_normalize(dirToCam);
|
||||
// Get the vector from mario's head to the camera plus the extra check dist
|
||||
Vec3f vecToCam;
|
||||
vec3_prod_val(vecToCam, dirToCam, colCheckDist);
|
||||
|
||||
vec3_copy(camdir[1], camdir[0]);
|
||||
dist[0] = find_surface_on_ray(target[0], vecToCam, &surf[0], hitpos[0], RAYCAST_FIND_FLOOR | RAYCAST_FIND_CEIL | RAYCAST_FIND_WALL);
|
||||
dist[1] = find_surface_on_ray(target[1], vecToCam, &surf[1], hitpos[1], RAYCAST_FIND_FLOOR | RAYCAST_FIND_CEIL | RAYCAST_FIND_WALL);
|
||||
|
||||
find_surface_on_ray(target[0], camdir[0], &surf[0], hitpos[0], RAYCAST_FIND_FLOOR | RAYCAST_FIND_CEIL | RAYCAST_FIND_WALL);
|
||||
find_surface_on_ray(target[1], camdir[1], &surf[1], hitpos[1], RAYCAST_FIND_FLOOR | RAYCAST_FIND_CEIL | RAYCAST_FIND_WALL);
|
||||
resolve_and_return_wall_collisions(hitpos[0], 0.0f, 25.0f, &wall0);
|
||||
resolve_and_return_wall_collisions(hitpos[1], 0.0f, 25.0f, &wall1);
|
||||
dist[0] = ((target[0][0] - hitpos[0][0]) * (target[0][0] - hitpos[0][0]) + (target[0][1] - hitpos[0][1]) * (target[0][1] - hitpos[0][1]) + (target[0][2] - hitpos[0][2]) * (target[0][2] - hitpos[0][2]));
|
||||
dist[1] = ((target[1][0] - hitpos[1][0]) * (target[1][0] - hitpos[1][0]) + (target[1][1] - hitpos[1][1]) * (target[1][1] - hitpos[1][1]) + (target[1][2] - hitpos[1][2]) * (target[1][2] - hitpos[1][2]));
|
||||
// set collision distance to the current distance from mario to cam
|
||||
gPuppyCam.collisionDistance = colCheckDist;
|
||||
|
||||
gPuppyCam.collisionDistance = gPuppyCam.zoomTarget;
|
||||
if (surf[0] || surf[1]) {
|
||||
// use the further distance between the two surfaces to be less aggressive
|
||||
f32 closestDist = MAX(dist[0], dist[1]);
|
||||
// Cap it at the zoom dist so it doesn't go further than necessary
|
||||
closestDist = MIN(closestDist, gPuppyCam.zoom);
|
||||
if (closestDist - surfOffset <= gPuppyCam.zoom) {
|
||||
closestDist -= surfOffset;
|
||||
// Allow the camera to ride right up next to the wall (mario's wall radius is 50u so this is safe)
|
||||
closestDist = MAX(closestDist, 50);
|
||||
vec3_mul_val(dirToCam, closestDist);
|
||||
vec3_sum(gPuppyCam.pos, target[0], dirToCam);
|
||||
|
||||
if (surf[0] && surf[1]) {
|
||||
gPuppyCam.collisionDistance = sqrtf(MAX(dist[0], dist[1]));
|
||||
if (gPuppyCam.zoom > gPuppyCam.collisionDistance) {
|
||||
gPuppyCam.zoom = MIN(gPuppyCam.collisionDistance, gPuppyCam.zoomTarget);
|
||||
if (gPuppyCam.zoom - gPuppyCam.zoomTarget < 5) {
|
||||
if (dist[0] >= dist[1]) {
|
||||
vec3_copy(gPuppyCam.pos, hitpos[0]);
|
||||
} else {
|
||||
vec3_copy_y_off(gPuppyCam.pos, hitpos[1], (gPuppyCam.povHeight * 0.6f));
|
||||
}
|
||||
// If the camera is uncomfortably close to the wall, move it up a bit
|
||||
if (closestDist < 250 && gPuppyCam.pitch < 0x2000) {
|
||||
// lerp from 0 to 250
|
||||
gPuppyCam.pos[1] += remap(CLAMP(closestDist, 50, 255), 255, 50, 0, 250);
|
||||
}
|
||||
}
|
||||
}
|
||||
#define START_DIST 500
|
||||
#define END_DIST 250
|
||||
gPuppyCam.opacity = CLAMP((f32)(((gPuppyCam.zoom - END_DIST) / 255.0f) * (START_DIST - END_DIST)), 0, 255);
|
||||
|
||||
// Transparency based on mario dist to cam
|
||||
#define TRANS_START_DIST 200
|
||||
#define TRANS_END_DIST 100
|
||||
f32 goalOpa = 255;
|
||||
// Get the new dist between cam and mario
|
||||
vec3_diff(dirToCam, gPuppyCam.pos, target[0]);
|
||||
f32 realDist = vec3_sumsq(dirToCam);
|
||||
if (realDist < sqr(TRANS_START_DIST)) {
|
||||
realDist = sqrtf(realDist);
|
||||
// lerp from 127 to 0
|
||||
goalOpa = CLAMP((f32)(((realDist - TRANS_END_DIST) / 255.0f) * (TRANS_START_DIST - TRANS_END_DIST)), 0, 127);
|
||||
}
|
||||
// approach fast if significant diff
|
||||
f32 approachRate = absf(goalOpa - (f32)gPuppyCam.opacity) * 0.2f;
|
||||
// give a min approach speed
|
||||
approachRate = MAX(approachRate, 255/8);
|
||||
// approach the new goal opacity
|
||||
gPuppyCam.opacity = approach_f32_symmetric(gPuppyCam.opacity, goalOpa, approachRate);
|
||||
#undef TRANS_START_DIST
|
||||
#undef TRANS_END_DIST
|
||||
}
|
||||
|
||||
extern Vec3f sOldPosition;
|
||||
@@ -1356,7 +1489,11 @@ void puppycam_loop(void) {
|
||||
if (gPuppyCam.flags & PUPPYCAM_BEHAVIOUR_COLLISION) {
|
||||
puppycam_collision();
|
||||
} else {
|
||||
gPuppyCam.opacity = 255;
|
||||
if (gPuppyCam.mode3Flags & PUPPYCAM_MODE3_ZOOMED_IN) {
|
||||
gPuppyCam.opacity = approach_f32_asymptotic(gPuppyCam.opacity, 0, 0.15f);
|
||||
} else {
|
||||
gPuppyCam.opacity = 255;
|
||||
}
|
||||
}
|
||||
} else if (gPuppyCam.cutscene) {
|
||||
gPuppyCam.opacity = 255;
|
||||
|
||||
+62
-8
@@ -47,11 +47,9 @@ struct gPuppyOptions
|
||||
{
|
||||
s16 analogue;
|
||||
s16 sensitivityX;
|
||||
s16 sensitivityY;
|
||||
s16 invertX;
|
||||
s16 invertY;
|
||||
s16 turnAggression;
|
||||
s16 inputType;
|
||||
s16 turnHelper;
|
||||
};
|
||||
|
||||
struct gPuppyStruct
|
||||
@@ -63,13 +61,12 @@ struct gPuppyStruct
|
||||
s16 pitchTarget; // Vertical Direction that pitch tries to be.
|
||||
f32 pitchAcceleration; // Vertical Direction that sets pitchTarget.
|
||||
s16 zoom; // How far the camera is currently zoomed out
|
||||
u8 zoomSet; // The current setting of which zoompoint to set the target to.
|
||||
s16 zoomTarget; // The value that zoom tries to be.
|
||||
s16 zoomPoints[3]; // An array containing distances.
|
||||
s16 targetFloorHeight; // Mario's current floor height
|
||||
s16 lastTargetFloorHeight; // Mirror's mario's floor height when his velocity is not above 0.
|
||||
Vec3s pos; // Where the camera is
|
||||
Vec3s focus; // Where the camera's looking
|
||||
Vec3f pos; // Where the camera is
|
||||
Vec3f focus; // Where the camera's looking
|
||||
Vec3s pan; // An offset of the camera's focus
|
||||
s32 intendedFlags; // The flagset the camera tries to be when it's not held hostage.
|
||||
s32 flags; // Behaviour flags that affect different properties of the camera's behaviour
|
||||
@@ -90,7 +87,7 @@ struct gPuppyStruct
|
||||
s16 edgePitch; // Pitch adjustment that's applied when stood near an edge. All pitch adjustment is clamped.
|
||||
s16 moveZoom; // A small zoom value that's added on top of the regular zoom when moving. It's pretty subtle, but gives the feeling of a bit of speed.
|
||||
u8 mode3Flags; // A flagset for classic mode.
|
||||
u8 moveFlagAdd; // A bit that multiplies movement rate of axes when moving, to centre them faster.
|
||||
u8 movementPitchVel; // A bit that multiplies movement rate of axes when moving, to centre them faster.
|
||||
s16 targetDist[2]; // Used with secondary view targets to smooth out the between status.
|
||||
s16 intendedTerrainPitch; // The pitch that the game wants the game to tilt towards, following the terrain.
|
||||
s16 terrainPitch; // The pitch the game tilts towards, when following terrain inclines.
|
||||
@@ -122,9 +119,9 @@ struct sPuppyAngles
|
||||
//Structurally, it's exactly the same as CutsceneSplinePoint
|
||||
struct sPuppySpline
|
||||
{
|
||||
Vec3s pos; // The vector pos of the spline index itself.
|
||||
s8 index; // The index of the spline. Ends with -1
|
||||
u8 speed; // The amount of frames it takes to get through this index.
|
||||
Vec3s pos; // The vector pos of the spline index itself.
|
||||
};
|
||||
|
||||
//A bounding volume for activating puppycamera scripts and angles.
|
||||
@@ -198,4 +195,61 @@ extern s32 puppycam_move_spline(struct sPuppySpline splinePos[], struct sPuppySp
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Backwards compatability additions from Puppycam 1.
|
||||
* This adds support for the original volume format, so you can directly import them in
|
||||
* without having to make any further changes.
|
||||
* Naturally, because it's the old format, they will be severely more limited in flexibility.
|
||||
*/
|
||||
#define NC_FLAG_XTURN PUPPYCAM_BEHAVIOUR_YAW_ROTATION
|
||||
#define NC_FLAG_YTURN PUPPYCAM_BEHAVIOUR_PITCH_ROTATION
|
||||
#define NC_FLAG_ZOOM 0 // Stub
|
||||
#define NC_FLAG_8D PUPPYCAM_BEHAVIOUR_INPUT_8DIR
|
||||
#define NC_FLAG_4D PUPPYCAM_BEHAVIOUR_INPUT_4DIR
|
||||
#define NC_FLAG_2D PUPPYCAM_BEHAVIOUR_INPUT_2D
|
||||
#define NC_FLAG_FOCUSX PUPPYCAM_BEHAVIOUR_X_MOVEMENT
|
||||
#define NC_FLAG_FOCUSY PUPPYCAM_BEHAVIOUR_Y_MOVEMENT
|
||||
#define NC_FLAG_FOCUSZ PUPPYCAM_BEHAVIOUR_Z_MOVEMENT
|
||||
#define NC_FLAG_POSX PUPPYCAM_BEHAVIOUR_X_MOVEMENT
|
||||
#define NC_FLAG_POSY PUPPYCAM_BEHAVIOUR_Y_MOVEMENT
|
||||
#define NC_FLAG_POSZ PUPPYCAM_BEHAVIOUR_Z_MOVEMENT
|
||||
#define NC_FLAG_COLLISION PUPPYCAM_BEHAVIOUR_COLLISION
|
||||
#define NC_FLAG_SLIDECORRECT 0 // Stub
|
||||
|
||||
#define NC_MODE_NORMAL 1
|
||||
#define NC_MODE_SLIDE 2
|
||||
#define NC_MODE_FIXED 3
|
||||
#define NC_MODE_2D 4
|
||||
#define NC_MODE_8D 5
|
||||
#define NC_MODE_FIXED_NOMOVE 6
|
||||
#define NC_MODE_FIXED_NOTURN 7
|
||||
#define NC_MODE_NOROTATE 8
|
||||
|
||||
enum PuppyCamInput {
|
||||
INPUT_DOUBLE_TAP,
|
||||
INPUT_SINGLE_PRESS,
|
||||
INPUT_CLASSIC
|
||||
};
|
||||
|
||||
struct newcam_hardpos {
|
||||
u8 newcam_hard_levelID;
|
||||
u8 newcam_hard_areaID;
|
||||
u8 newcam_hard_permaswap;
|
||||
u16 newcam_hard_modeset;
|
||||
void *newcam_hard_script;
|
||||
s16 newcam_hard_X1;
|
||||
s16 newcam_hard_Y1;
|
||||
s16 newcam_hard_Z1;
|
||||
s16 newcam_hard_X2;
|
||||
s16 newcam_hard_Y2;
|
||||
s16 newcam_hard_Z2;
|
||||
s16 newcam_hard_camX;
|
||||
s16 newcam_hard_camY;
|
||||
s16 newcam_hard_camZ;
|
||||
s16 newcam_hard_lookX;
|
||||
s16 newcam_hard_lookY;
|
||||
s16 newcam_hard_lookZ;
|
||||
};
|
||||
extern struct newcam_hardpos newcam_fixedcam[];
|
||||
|
||||
#endif // PUPPYCAM2_H
|
||||
+499
-11
@@ -26,7 +26,9 @@ a modern game engine's developer's console.
|
||||
#include <ultra64.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "seq_ids.h"
|
||||
#include "game_init.h"
|
||||
#include "sound_init.h"
|
||||
#include "memory.h"
|
||||
#include "print.h"
|
||||
#include "string.h"
|
||||
@@ -40,7 +42,9 @@ a modern game engine's developer's console.
|
||||
#include "object_list_processor.h"
|
||||
#include "engine/surface_load.h"
|
||||
#include "audio/data.h"
|
||||
#include "audio/external.h"
|
||||
#include "audio/heap.h"
|
||||
#include "audio/load.h"
|
||||
#include "hud.h"
|
||||
#include "debug_box.h"
|
||||
#include "color_presets.h"
|
||||
@@ -447,7 +451,7 @@ void print_console_log(void) {
|
||||
finish_blank_box();
|
||||
|
||||
for (u8 i = 0; i < LOG_BUFFER_SIZE; i++) {
|
||||
if (consoleLogTable[i] == NULL) {
|
||||
if (consoleLogTable[i][0] == '\0') {
|
||||
continue;
|
||||
}
|
||||
print_small_text_light(16, (LINE_HEIGHT - (i * 12)), consoleLogTable[i], PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_DEFAULT);
|
||||
@@ -599,6 +603,378 @@ void puppyprint_level_select_menu(void) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BETTER_REVERB
|
||||
|
||||
#define DEBUG_REVERB_PRESET_COUNT ARRAY_COUNT(gDebugBetterReverbSettings)
|
||||
|
||||
enum BetterReverbDebugFields {
|
||||
PPREVERB_USE_LIGHTWEIGHT,
|
||||
PPREVERB_DOWNSAMPLE_RATE,
|
||||
PPREVERB_IS_MONO,
|
||||
PPREVERB_FILTER_COUNT,
|
||||
PPREVERB_WINDOW_SIZE,
|
||||
PPREVERB_GAIN,
|
||||
PPREVERB_GAIN_INDEX,
|
||||
PPREVERB_REVERB_INDEX,
|
||||
PPREVERB_DELAYS_L,
|
||||
PPREVERB_DELAYS_R,
|
||||
PPREVERB_REVERB_MULTS_L,
|
||||
PPREVERB_REVERB_MULTS_R,
|
||||
PPREVERB_AREA_ECHO,
|
||||
PPREVERB_TOTAL,
|
||||
};
|
||||
|
||||
struct BetterReverbDebugSizes {
|
||||
u8 treatAsEntryCount;
|
||||
u8 bytes;
|
||||
s32 entryMinimum;
|
||||
s32 entryMaximum;
|
||||
};
|
||||
|
||||
static struct BetterReverbDebugSizes maxReverbEntrySizes[PPREVERB_TOTAL] = {
|
||||
{.treatAsEntryCount = TRUE, .bytes = 1, .entryMinimum = 0, .entryMaximum = 1}, // useLightweightSettings
|
||||
{.treatAsEntryCount = TRUE, .bytes = 1, .entryMinimum = -1, .entryMaximum = 5}, // downsampleRate (seems to work up to 7 before things are audibly dangerous, but I suspect it's still unsafe)
|
||||
{.treatAsEntryCount = TRUE, .bytes = 1, .entryMinimum = 0, .entryMaximum = 1}, // isMono
|
||||
{.treatAsEntryCount = TRUE, .bytes = 1, .entryMinimum = 3, .entryMaximum = NUM_ALLPASS}, // filterCount
|
||||
{.treatAsEntryCount = FALSE, .bytes = 2, .entryMinimum = -1, .entryMaximum = 0x7FFF}, // windowSize
|
||||
{.treatAsEntryCount = FALSE, .bytes = 2, .entryMinimum = -1, .entryMaximum = 0x7FFF}, // gain
|
||||
{.treatAsEntryCount = FALSE, .bytes = 1, .entryMinimum = 0, .entryMaximum = 0xFF}, // gainIndex
|
||||
{.treatAsEntryCount = FALSE, .bytes = 1, .entryMinimum = 0, .entryMaximum = 0xFF}, // reverbIndex
|
||||
{.treatAsEntryCount = TRUE, .bytes = 1, .entryMinimum = 0, .entryMaximum = 1}, // delaysL
|
||||
{.treatAsEntryCount = TRUE, .bytes = 1, .entryMinimum = 0, .entryMaximum = 1}, // delaysR
|
||||
{.treatAsEntryCount = TRUE, .bytes = 1, .entryMinimum = 0, .entryMaximum = 1}, // reverbMultsL
|
||||
{.treatAsEntryCount = TRUE, .bytes = 1, .entryMinimum = 0, .entryMaximum = 1}, // reverbMultsR
|
||||
{.treatAsEntryCount = FALSE, .bytes = 1, .entryMinimum = -0x80, .entryMaximum = 0x7F}, // area echo (not part of struct)
|
||||
};
|
||||
|
||||
#define REVERB_TOP_PRIO(x) (((x) | (0xFF << SOUNDARGS_SHIFT_PRIORITY)) & ~SOUND_NO_ECHO)
|
||||
static u32 betterReverbSfx[] = {
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_YAH_WAH_HOO),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_YAH_WAH_HOO + (1 << 16)),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_YAH_WAH_HOO + (2 << 16)),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_HOOHOO),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_YAHOO),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_UH),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_HRMM),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_WAH2),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_WHOA),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_EEUH),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_ATTACKED),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_OOOF),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_HERE_WE_GO),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_YAWNING),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_WAAAOOOW),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_HAHA),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_UH_LEDGE_CLIMB_FAST),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_ON_FIRE),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_DYING),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_PANTING_COLD),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_PANTING),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_MAMA_MIA),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_DROWNING),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_YAHOO_WAHA_YIPPEE),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_YAHOO_WAHA_YIPPEE + (3 << 16)),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_YAHOO_WAHA_YIPPEE + (4 << 16)),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_DOH),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_GAME_OVER),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_HELLO),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_PRESS_START_TO_PLAY),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_TWIRL_BOUNCE),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_SO_LONGA_BOWSER),
|
||||
REVERB_TOP_PRIO(SOUND_MARIO_IMA_TIRED),
|
||||
};
|
||||
#undef REVERB_TOP_PRIO
|
||||
|
||||
static s8 ppAreaEchos[DEBUG_REVERB_PRESET_COUNT] = {0};
|
||||
|
||||
static s32 ppReverbSide = 0;
|
||||
static s32 ppReverbSelectY = 0;
|
||||
|
||||
s32 better_reverb_get_or_set_field(u8 shouldSet, s32 xIndex, s32 yIndex, s32 valueToSet) {
|
||||
s32 ret = 0;
|
||||
|
||||
if (shouldSet) {
|
||||
if (valueToSet < maxReverbEntrySizes[yIndex].entryMinimum) {
|
||||
valueToSet = maxReverbEntrySizes[yIndex].entryMinimum;
|
||||
} else if (valueToSet > maxReverbEntrySizes[yIndex].entryMaximum) {
|
||||
valueToSet = maxReverbEntrySizes[yIndex].entryMaximum;
|
||||
}
|
||||
|
||||
switch(yIndex) {
|
||||
case PPREVERB_USE_LIGHTWEIGHT:
|
||||
gDebugBetterReverbSettings[xIndex].useLightweightSettings = valueToSet;
|
||||
break;
|
||||
case PPREVERB_DOWNSAMPLE_RATE:
|
||||
gDebugBetterReverbSettings[xIndex].downsampleRate = valueToSet;
|
||||
break;
|
||||
case PPREVERB_IS_MONO:
|
||||
gDebugBetterReverbSettings[xIndex].isMono = valueToSet;
|
||||
break;
|
||||
case PPREVERB_FILTER_COUNT:
|
||||
gDebugBetterReverbSettings[xIndex].filterCount = valueToSet;
|
||||
break;
|
||||
case PPREVERB_WINDOW_SIZE:
|
||||
gDebugBetterReverbSettings[xIndex].windowSize = valueToSet;
|
||||
break;
|
||||
case PPREVERB_GAIN:
|
||||
gDebugBetterReverbSettings[xIndex].gain = valueToSet;
|
||||
break;
|
||||
case PPREVERB_GAIN_INDEX:
|
||||
gDebugBetterReverbSettings[xIndex].gainIndex = valueToSet;
|
||||
break;
|
||||
case PPREVERB_REVERB_INDEX:
|
||||
gDebugBetterReverbSettings[xIndex].reverbIndex = valueToSet;
|
||||
break;
|
||||
case PPREVERB_DELAYS_L:
|
||||
gDebugBetterReverbSettings[xIndex].delaysL = sReverbDelaysArr[valueToSet];
|
||||
break;
|
||||
case PPREVERB_DELAYS_R:
|
||||
gDebugBetterReverbSettings[xIndex].delaysR = sReverbDelaysArr[valueToSet];
|
||||
break;
|
||||
case PPREVERB_REVERB_MULTS_L:
|
||||
gDebugBetterReverbSettings[xIndex].reverbMultsL = sReverbMultsArr[valueToSet];
|
||||
break;
|
||||
case PPREVERB_REVERB_MULTS_R:
|
||||
gDebugBetterReverbSettings[xIndex].reverbMultsR = sReverbMultsArr[valueToSet];
|
||||
break;
|
||||
case PPREVERB_AREA_ECHO:
|
||||
if (gCurrentArea != NULL && !gCurrentArea->useEchoOverride) {
|
||||
u8 level = gCurrLevelNum;
|
||||
u8 area = gCurrAreaIndex - 1;
|
||||
if (level > LEVEL_MAX) {
|
||||
level = LEVEL_MAX;
|
||||
}
|
||||
if (area > 2) {
|
||||
area = 2;
|
||||
}
|
||||
|
||||
gCurrentArea->echoOverride = sLevelAreaReverbs[level][area];
|
||||
gCurrentArea->useEchoOverride = TRUE;
|
||||
|
||||
for (u32 i = 0; i < DEBUG_REVERB_PRESET_COUNT; i++) {
|
||||
ppAreaEchos[i] = gCurrentArea->echoOverride;
|
||||
}
|
||||
}
|
||||
ppAreaEchos[xIndex] = valueToSet;
|
||||
break;
|
||||
|
||||
ret = valueToSet;
|
||||
}
|
||||
} else {
|
||||
switch(yIndex) {
|
||||
case PPREVERB_USE_LIGHTWEIGHT:
|
||||
ret = gDebugBetterReverbSettings[xIndex].useLightweightSettings;
|
||||
break;
|
||||
case PPREVERB_DOWNSAMPLE_RATE:
|
||||
ret = gDebugBetterReverbSettings[xIndex].downsampleRate;
|
||||
break;
|
||||
case PPREVERB_IS_MONO:
|
||||
ret = gDebugBetterReverbSettings[xIndex].isMono;
|
||||
break;
|
||||
case PPREVERB_FILTER_COUNT:
|
||||
ret = gDebugBetterReverbSettings[xIndex].filterCount;
|
||||
break;
|
||||
case PPREVERB_WINDOW_SIZE:
|
||||
ret = gDebugBetterReverbSettings[xIndex].windowSize;
|
||||
break;
|
||||
case PPREVERB_GAIN:
|
||||
ret = gDebugBetterReverbSettings[xIndex].gain;
|
||||
break;
|
||||
case PPREVERB_GAIN_INDEX:
|
||||
ret = gDebugBetterReverbSettings[xIndex].gainIndex;
|
||||
break;
|
||||
case PPREVERB_REVERB_INDEX:
|
||||
ret = gDebugBetterReverbSettings[xIndex].reverbIndex;
|
||||
break;
|
||||
case PPREVERB_DELAYS_L:
|
||||
ret = (u32) ((u8*) gDebugBetterReverbSettings[xIndex].delaysL - (u8*) &sReverbDelaysArr[0][0]) / sizeof(sReverbDelaysArr[0]);
|
||||
break;
|
||||
case PPREVERB_DELAYS_R:
|
||||
ret = (u32) ((u8*) gDebugBetterReverbSettings[xIndex].delaysR - (u8*) &sReverbDelaysArr[0][0]) / sizeof(sReverbDelaysArr[0]);
|
||||
break;
|
||||
case PPREVERB_REVERB_MULTS_L:
|
||||
ret = (u32) ((u8*) gDebugBetterReverbSettings[xIndex].reverbMultsL - (u8*) &sReverbMultsArr[0][0]) / sizeof(sReverbMultsArr[0]);
|
||||
break;
|
||||
case PPREVERB_REVERB_MULTS_R:
|
||||
ret = (u32) ((u8*) gDebugBetterReverbSettings[xIndex].reverbMultsR - (u8*) &sReverbMultsArr[0][0]) / sizeof(sReverbMultsArr[0]);
|
||||
break;
|
||||
case PPREVERB_AREA_ECHO:
|
||||
if (gCurrentArea != NULL && !gCurrentArea->useEchoOverride) {
|
||||
u8 level = gCurrLevelNum;
|
||||
u8 area = gCurrAreaIndex - 1;
|
||||
if (level > LEVEL_MAX) {
|
||||
level = LEVEL_MAX;
|
||||
}
|
||||
if (area > 2) {
|
||||
area = 2;
|
||||
}
|
||||
|
||||
gCurrentArea->echoOverride = sLevelAreaReverbs[level][area];
|
||||
gCurrentArea->useEchoOverride = TRUE;
|
||||
|
||||
for (u32 i = 0; i < DEBUG_REVERB_PRESET_COUNT; i++) {
|
||||
ppAreaEchos[i] = gCurrentArea->echoOverride;
|
||||
}
|
||||
}
|
||||
ret = ppAreaEchos[xIndex];
|
||||
break;
|
||||
}
|
||||
|
||||
if (ret < maxReverbEntrySizes[yIndex].entryMinimum) {
|
||||
ret = maxReverbEntrySizes[yIndex].entryMinimum;
|
||||
} else if (ret > maxReverbEntrySizes[yIndex].entryMaximum) {
|
||||
ret = maxReverbEntrySizes[yIndex].entryMaximum;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void better_reverb_preset_menu(void) {
|
||||
char textBytes[16];
|
||||
s32 printValue;
|
||||
s32 x;
|
||||
s32 y;
|
||||
|
||||
prepare_blank_box();
|
||||
render_blank_box_rounded(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 0, 127);
|
||||
finish_blank_box();
|
||||
|
||||
print_set_envcolour(63, 159, 127, 255),
|
||||
print_small_text(SCREEN_WIDTH/2, SCREEN_HEIGHT - 48, "<COL_3FFF9FFF>D-Pad Up/Down:<COL_--------> Scroll, <COL_3FFF9FFF>Start:<COL_--------> Switch Preset A/B", PRINT_TEXT_ALIGN_CENTRE, PRINT_ALL, FONT_OUTLINE);
|
||||
print_set_envcolour(63, 159, 127, 255),
|
||||
print_small_text(SCREEN_WIDTH/2, SCREEN_HEIGHT - 36, "<COL_3FFF9FFF>D-Pad L/R:<COL_--------> Fine Adjustment, <COL_3FFF9FFF>Z/R:<COL_--------> Coarse Adjustment", PRINT_TEXT_ALIGN_CENTRE, PRINT_ALL, FONT_OUTLINE);
|
||||
print_set_envcolour(63, 159, 127, 255),
|
||||
print_small_text(SCREEN_WIDTH/2, SCREEN_HEIGHT - 24, "<COL_3FFF9FFF>A:<COL_--------> Apply Selected Preset, <COL_3FFF9FFF>B:<COL_--------> Preview SFX", PRINT_TEXT_ALIGN_CENTRE, PRINT_ALL, FONT_OUTLINE);
|
||||
|
||||
x = 32;
|
||||
y = 16;
|
||||
for (s32 j = 0; j < PPREVERB_TOTAL; j++) {
|
||||
y += 12;
|
||||
if (j == ppReverbSelectY) {
|
||||
print_set_envcolour(255, 255, 159, 255);
|
||||
} else {
|
||||
print_set_envcolour(191, 159, 191, 255);
|
||||
}
|
||||
switch(j) {
|
||||
case PPREVERB_USE_LIGHTWEIGHT:
|
||||
print_small_text_light(x, y, "Lightweight:", PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
break;
|
||||
case PPREVERB_DOWNSAMPLE_RATE:
|
||||
print_small_text_light(x, y, "Downsample Rate:", PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
break;
|
||||
case PPREVERB_IS_MONO:
|
||||
print_small_text_light(x, y, "Mono:", PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
break;
|
||||
case PPREVERB_FILTER_COUNT:
|
||||
print_small_text_light(x, y, "Filter Count:", PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
break;
|
||||
case PPREVERB_WINDOW_SIZE:
|
||||
print_small_text_light(x, y, "Window Size:", PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
break;
|
||||
case PPREVERB_GAIN:
|
||||
print_small_text_light(x, y, "Gain:", PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
break;
|
||||
case PPREVERB_GAIN_INDEX:
|
||||
print_small_text_light(x, y, "Gain Index:", PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
break;
|
||||
case PPREVERB_REVERB_INDEX:
|
||||
print_small_text_light(x, y, "Reverb Index:", PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
break;
|
||||
case PPREVERB_DELAYS_L:
|
||||
print_small_text_light(x, y, "Delays L:", PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
break;
|
||||
case PPREVERB_DELAYS_R:
|
||||
print_small_text_light(x, y, "Delays R:", PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
break;
|
||||
case PPREVERB_REVERB_MULTS_L:
|
||||
print_small_text_light(x, y, "Reverb Mults L:", PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
break;
|
||||
case PPREVERB_REVERB_MULTS_R:
|
||||
print_small_text_light(x, y, "Reverb Mults R:", PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
break;
|
||||
case PPREVERB_AREA_ECHO:
|
||||
print_small_text_light(x, y, "Area Echo:", PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (s32 i = 0; i < DEBUG_REVERB_PRESET_COUNT; i++) {
|
||||
s32 windowSize = better_reverb_get_or_set_field(FALSE, i, PPREVERB_WINDOW_SIZE, 0);
|
||||
s32 downsampleRate = better_reverb_get_or_set_field(FALSE, i, PPREVERB_DOWNSAMPLE_RATE, 0);
|
||||
s32 isLightweight = better_reverb_get_or_set_field(FALSE, i, PPREVERB_USE_LIGHTWEIGHT, 0);
|
||||
x = (SCREEN_WIDTH/2) + (i * 84);
|
||||
y = 12;
|
||||
if (i == ppReverbSide) {
|
||||
print_set_envcolour(255, 255, 159, 255);
|
||||
} else {
|
||||
print_set_envcolour(191, 159, 191, 255);
|
||||
}
|
||||
sprintf(textBytes, "PRESET %c", 'A' + i);
|
||||
print_small_text_light(x, y, textBytes, PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
y += 4;
|
||||
for (s32 j = 0; j < PPREVERB_TOTAL; j++) {
|
||||
y += 12;
|
||||
printValue = better_reverb_get_or_set_field(FALSE, i, j, 0);
|
||||
if (i == ppReverbSide && j == ppReverbSelectY) {
|
||||
print_set_envcolour(255, 159, 0, 255);
|
||||
} else if (windowSize == 0) { // All reverb disabled
|
||||
if (j == PPREVERB_WINDOW_SIZE) {
|
||||
print_set_envcolour(255, 255, 255, 255);
|
||||
} else {
|
||||
print_set_envcolour(95, 95, 95, 255);
|
||||
}
|
||||
} else if (downsampleRate <= 0) { // Vanilla reverb
|
||||
switch(j) {
|
||||
case PPREVERB_DOWNSAMPLE_RATE:
|
||||
case PPREVERB_WINDOW_SIZE:
|
||||
case PPREVERB_GAIN:
|
||||
case PPREVERB_AREA_ECHO:
|
||||
print_set_envcolour(255, 255, 255, 255);
|
||||
break;
|
||||
default:
|
||||
print_set_envcolour(95, 95, 95, 255);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (isLightweight) { // Lightweight reverb
|
||||
switch(j) {
|
||||
case PPREVERB_FILTER_COUNT:
|
||||
case PPREVERB_GAIN_INDEX:
|
||||
case PPREVERB_REVERB_INDEX:
|
||||
case PPREVERB_REVERB_MULTS_L:
|
||||
case PPREVERB_REVERB_MULTS_R:
|
||||
print_set_envcolour(95, 95, 95, 255);
|
||||
break;
|
||||
default:
|
||||
print_set_envcolour(255, 255, 255, 255);
|
||||
break;
|
||||
|
||||
}
|
||||
} else { // Standard reverb
|
||||
print_set_envcolour(255, 255, 255, 255);
|
||||
}
|
||||
|
||||
if (maxReverbEntrySizes[j].bytes == 2) {
|
||||
sprintf(textBytes, "0x%04X", (u16) printValue);
|
||||
} else if (!maxReverbEntrySizes[j].treatAsEntryCount) {
|
||||
sprintf(textBytes, "0x%02X", (u8) printValue);
|
||||
} else if (j == PPREVERB_USE_LIGHTWEIGHT || j == PPREVERB_IS_MONO) {
|
||||
if (printValue == 0) {
|
||||
sprintf(textBytes, "FALSE");
|
||||
} else {
|
||||
sprintf(textBytes, "TRUE");
|
||||
}
|
||||
} else {
|
||||
sprintf(textBytes, "%d", printValue);
|
||||
}
|
||||
|
||||
print_small_text_light(x, y, textBytes, PRINT_TEXT_ALIGN_LEFT, PRINT_ALL, FONT_OUTLINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
u8 gLastWarpID = 0;
|
||||
|
||||
void puppyprint_render_general_vars(void) {
|
||||
@@ -650,18 +1026,21 @@ void puppyprint_render_general_vars(void) {
|
||||
|
||||
struct PuppyPrintPage ppPages[] = {
|
||||
#ifdef USE_PROFILER
|
||||
{&puppyprint_render_standard, "Profiler"},
|
||||
{&puppyprint_render_minimal, "Minimal"},
|
||||
[PUPPYPRINT_PAGE_PROFILER] = {&puppyprint_render_standard, "Profiler"},
|
||||
[PUPPYPRINT_PAGE_MINIMAL] = {&puppyprint_render_minimal, "Minimal"},
|
||||
#endif
|
||||
{&puppyprint_render_general_vars, "General"},
|
||||
{&print_audio_overview, "Audio"},
|
||||
{&print_ram_overview, "Segments"},
|
||||
{&puppyprint_render_collision, "Collision"},
|
||||
{&print_console_log, "Log"},
|
||||
{&puppyprint_level_select_menu, "Level Select"},
|
||||
{&render_coverage_map, "Coverage"},
|
||||
[PUPPYPRINT_PAGE_GENERAL] = {&puppyprint_render_general_vars, "General"},
|
||||
[PUPPYPRINT_PAGE_AUDIO] = {&print_audio_overview, "Audio"},
|
||||
[PUPPYPRINT_PAGE_RAM] = {&print_ram_overview, "Segments"},
|
||||
[PUPPYPRINT_PAGE_COLLISION] = {&puppyprint_render_collision, "Collision"},
|
||||
[PUPPYPRINT_PAGE_LOG] = {&print_console_log, "Log"},
|
||||
[PUPPYPRINT_PAGE_LEVEL_SELECT] = {&puppyprint_level_select_menu, "Level Select"},
|
||||
[PUPPYPRINT_PAGE_COVERAGE] = {&render_coverage_map, "Coverage"},
|
||||
#ifdef PUPPYCAM
|
||||
{&puppycamera_debug_view, "Unlock Camera"},
|
||||
[PUPPYPRINT_PAGE_CAMERA] = {&puppycamera_debug_view, "Unlock Camera"},
|
||||
#endif
|
||||
#ifdef BETTER_REVERB
|
||||
[PUPPYPRINT_PAGE_BETTER_REVERB] = {&better_reverb_preset_menu, "Reverb Config"},
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -810,6 +1189,115 @@ void puppyprint_profiler_process(void) {
|
||||
gPPSegScroll += 4;
|
||||
}
|
||||
}
|
||||
#ifdef BETTER_REVERB
|
||||
if (sPPDebugPage == PUPPYPRINT_PAGE_BETTER_REVERB)
|
||||
{
|
||||
s32 grabbedValue = better_reverb_get_or_set_field(FALSE, ppReverbSide, ppReverbSelectY, 0);
|
||||
|
||||
// These only need to be done once, but not really worth optimizing tbh
|
||||
maxReverbEntrySizes[PPREVERB_DELAYS_L].entryMaximum = gReverbDelaysArrCount - 1;
|
||||
maxReverbEntrySizes[PPREVERB_DELAYS_R].entryMaximum = gReverbDelaysArrCount - 1;
|
||||
maxReverbEntrySizes[PPREVERB_REVERB_MULTS_L].entryMaximum = gReverbMultsArrCount - 1;
|
||||
maxReverbEntrySizes[PPREVERB_REVERB_MULTS_R].entryMaximum = gReverbMultsArrCount - 1;
|
||||
|
||||
if (gPlayer1Controller->buttonPressed & (A_BUTTON | B_BUTTON)) {
|
||||
u8 betterReverbLastPreset = gBetterReverbPresetValue;
|
||||
|
||||
if (gCurrentArea != NULL) {
|
||||
gCurrentArea->useEchoOverride = TRUE;
|
||||
gBetterReverbPresetValue = (u8)(s8) (ppReverbSide - DEBUG_REVERB_PRESET_COUNT);
|
||||
gCurrentArea->echoOverride = ppAreaEchos[ppReverbSide];
|
||||
}
|
||||
|
||||
if (sAudioIsInitialized) {
|
||||
if (gAudioLoadLock != AUDIO_LOCK_UNINITIALIZED) {
|
||||
gAudioLoadLock = AUDIO_LOCK_LOADING;
|
||||
|
||||
init_reverb_us(0);
|
||||
|
||||
if (gAudioLoadLock != AUDIO_LOCK_UNINITIALIZED) {
|
||||
gAudioLoadLock = AUDIO_LOCK_NOT_LOADING;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gBetterReverbPresetValue = betterReverbLastPreset;
|
||||
|
||||
if (gPlayer1Controller->buttonPressed & B_BUTTON) {
|
||||
u32 sound = random_u16() % ARRAY_COUNT(betterReverbSfx);
|
||||
play_sound(betterReverbSfx[sound], gGlobalSoundSource);
|
||||
} else { // A_BUTTON
|
||||
sPPDebugPage = 0;
|
||||
}
|
||||
} else if (gPlayer1Controller->buttonPressed & L_JPAD) {
|
||||
if (ppReverbSelectY == PPREVERB_FILTER_COUNT) {
|
||||
grabbedValue -= 3;
|
||||
} else if ((ppReverbSelectY == PPREVERB_WINDOW_SIZE || ppReverbSelectY == PPREVERB_GAIN) && grabbedValue > 0 && grabbedValue <= 0x80) {
|
||||
grabbedValue = 0;
|
||||
} else {
|
||||
if (maxReverbEntrySizes[ppReverbSelectY].bytes == 2) {
|
||||
grabbedValue -= 0x80;
|
||||
} else {
|
||||
grabbedValue -= 0x1;
|
||||
}
|
||||
}
|
||||
|
||||
better_reverb_get_or_set_field(TRUE, ppReverbSide, ppReverbSelectY, grabbedValue);
|
||||
} else if (gPlayer1Controller->buttonPressed & R_JPAD) {
|
||||
if (ppReverbSelectY == PPREVERB_FILTER_COUNT) {
|
||||
grabbedValue += 3;
|
||||
} else if ((ppReverbSelectY == PPREVERB_WINDOW_SIZE || ppReverbSelectY == PPREVERB_GAIN) && grabbedValue < 0) {
|
||||
grabbedValue = 0;
|
||||
} else {
|
||||
if (maxReverbEntrySizes[ppReverbSelectY].bytes == 2) {
|
||||
grabbedValue += 0x80;
|
||||
} else {
|
||||
grabbedValue += 0x1;
|
||||
}
|
||||
}
|
||||
|
||||
better_reverb_get_or_set_field(TRUE, ppReverbSide, ppReverbSelectY, grabbedValue);
|
||||
} else if (gPlayer1Controller->buttonPressed & Z_TRIG) {
|
||||
if (ppReverbSelectY == PPREVERB_FILTER_COUNT) {
|
||||
grabbedValue -= 3;
|
||||
} else if ((ppReverbSelectY == PPREVERB_WINDOW_SIZE || ppReverbSelectY == PPREVERB_GAIN) && grabbedValue > 0 && grabbedValue <= 0x800) {
|
||||
grabbedValue = 0;
|
||||
} else {
|
||||
if (maxReverbEntrySizes[ppReverbSelectY].bytes == 2) {
|
||||
grabbedValue -= 0x800;
|
||||
} else if (!maxReverbEntrySizes[ppReverbSelectY].treatAsEntryCount) {
|
||||
grabbedValue -= 0x10;
|
||||
} else {
|
||||
grabbedValue -= 0x1;
|
||||
}
|
||||
}
|
||||
|
||||
better_reverb_get_or_set_field(TRUE, ppReverbSide, ppReverbSelectY, grabbedValue);
|
||||
} else if (gPlayer1Controller->buttonPressed & R_TRIG) {
|
||||
if (ppReverbSelectY == PPREVERB_FILTER_COUNT) {
|
||||
grabbedValue += 3;
|
||||
} else if ((ppReverbSelectY == PPREVERB_WINDOW_SIZE || ppReverbSelectY == PPREVERB_GAIN) && grabbedValue < 0) {
|
||||
grabbedValue = 0;
|
||||
} else {
|
||||
if (maxReverbEntrySizes[ppReverbSelectY].bytes == 2) {
|
||||
grabbedValue += 0x800;
|
||||
} else if (!maxReverbEntrySizes[ppReverbSelectY].treatAsEntryCount) {
|
||||
grabbedValue += 0x10;
|
||||
} else {
|
||||
grabbedValue += 0x1;
|
||||
}
|
||||
}
|
||||
|
||||
better_reverb_get_or_set_field(TRUE, ppReverbSide, ppReverbSelectY, grabbedValue);
|
||||
} else if (gPlayer1Controller->buttonPressed & D_JPAD) {
|
||||
ppReverbSelectY = (ppReverbSelectY + 1) % PPREVERB_TOTAL;
|
||||
} else if (gPlayer1Controller->buttonPressed & U_JPAD) {
|
||||
ppReverbSelectY = (ppReverbSelectY + PPREVERB_TOTAL - 1) % PPREVERB_TOTAL;
|
||||
} else if (gPlayer1Controller->buttonPressed & START_BUTTON) {
|
||||
ppReverbSide = (ppReverbSide + 1) % DEBUG_REVERB_PRESET_COUNT;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
profiler_update(PROFILER_TIME_PUPPYPRINT2, osGetCount() - first);
|
||||
}
|
||||
|
||||
+16
-2
@@ -13,10 +13,21 @@
|
||||
#define PUPPYPRINT_ADD_COUNTER(x) x++
|
||||
#define PUPPYPRINT_GET_SNAPSHOT() u32 first = osGetCount()
|
||||
#define PUPPYPRINT_GET_SNAPSHOT_TYPE(type) u32 first = profiler_get_delta(type)
|
||||
void append_puppyprint_log(const char *str, ...);
|
||||
#else
|
||||
#define PUPPYPRINT_ADD_COUNTER(x)
|
||||
#define PUPPYPRINT_GET_SNAPSHOT()
|
||||
#define PUPPYPRINT_GET_SNAPSHOT_TYPE(type)
|
||||
#define append_puppyprint_log(...)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PUPPYPRINT_DEBUG_CYCLES
|
||||
#define PP_CYCLE_CONV(x) (x)
|
||||
#define PP_CYCLE_STRING " cycles"
|
||||
#else
|
||||
#define PP_CYCLE_CONV(x) OS_CYCLES_TO_USEC(x)
|
||||
#define PP_CYCLE_STRING "us"
|
||||
#endif
|
||||
|
||||
struct PPTextFont {
|
||||
@@ -83,8 +94,12 @@ enum PPPages {
|
||||
PUPPYPRINT_PAGE_COLLISION,
|
||||
PUPPYPRINT_PAGE_LOG,
|
||||
PUPPYPRINT_PAGE_LEVEL_SELECT,
|
||||
PUPPYPRINT_PAGE_COVERAGE,
|
||||
#ifdef PUPPYCAM
|
||||
PUPPYPRINT_PAGE_CAMERA
|
||||
PUPPYPRINT_PAGE_CAMERA,
|
||||
#endif
|
||||
#ifdef BETTER_REVERB
|
||||
PUPPYPRINT_PAGE_BETTER_REVERB,
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -130,7 +145,6 @@ extern void prepare_blank_box(void);
|
||||
extern void finish_blank_box(void);
|
||||
extern void render_blank_box(s32 x1, s32 y1, s32 x2, s32 y2, u8 r, u8 g, u8 b, u8 a);
|
||||
extern void render_blank_box_rounded(s32 x1, s32 y1, s32 x2, s32 y2, u8 r, u8 g, u8 b, u8 a);
|
||||
extern void append_puppyprint_log(const char *str, ...);
|
||||
extern char consoleLogTable[LOG_BUFFER_SIZE][255];
|
||||
extern void print_small_text_buffered(s32 x, s32 y, const char *str, u8 align, s32 amount, u8 font);
|
||||
extern void puppyprint_print_deferred(void);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "behavior_data.h"
|
||||
#include "string.h"
|
||||
#include "color_presets.h"
|
||||
#include "emutest.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "config/config_world.h"
|
||||
@@ -267,31 +268,26 @@ static struct RenderPhase sRenderPhases[] = {
|
||||
[RENDER_PHASE_ZEX_BEFORE_SILHOUETTE] = {
|
||||
.startLayer = LAYER_FIRST,
|
||||
.endLayer = LAYER_LAST_BEFORE_SILHOUETTE,
|
||||
.ucode = GRAPH_NODE_UCODE_DEFAULT,
|
||||
},
|
||||
|
||||
[RENDER_PHASE_ZEX_SILHOUETTE] = {
|
||||
.startLayer = LAYER_SILHOUETTE_FIRST,
|
||||
.endLayer = LAYER_SILHOUETTE_LAST,
|
||||
.ucode = GRAPH_NODE_UCODE_DEFAULT,
|
||||
},
|
||||
|
||||
[RENDER_PHASE_ZEX_NON_SILHOUETTE] = {
|
||||
.startLayer = LAYER_SILHOUETTE_FIRST,
|
||||
.endLayer = LAYER_SILHOUETTE_LAST,
|
||||
.ucode = GRAPH_NODE_UCODE_DEFAULT,
|
||||
},
|
||||
|
||||
[RENDER_PHASE_ZEX_OCCLUDE_SILHOUETTE] = {
|
||||
.startLayer = LAYER_OCCLUDE_SILHOUETTE_FIRST,
|
||||
.endLayer = LAYER_OCCLUDE_SILHOUETTE_LAST,
|
||||
.ucode = GRAPH_NODE_UCODE_DEFAULT,
|
||||
},
|
||||
|
||||
[RENDER_PHASE_ZEX_AFTER_SILHOUETTE] = {
|
||||
.startLayer = LAYER_OCCLUDE_SILHOUETTE_FIRST,
|
||||
.endLayer = LAYER_LAST,
|
||||
.ucode = GRAPH_NODE_UCODE_DEFAULT,
|
||||
},
|
||||
|
||||
#else
|
||||
@@ -319,7 +315,7 @@ void switch_ucode(s32 ucode) {
|
||||
break;
|
||||
case GRAPH_NODE_UCODE_REJ:
|
||||
// Use .rej Microcode, skip sub-pixel processing on console
|
||||
if (gIsConsole) {
|
||||
if (gEmulator & EMU_CONSOLE) {
|
||||
gSPLoadUcodeL(gDisplayListHead++, gspF3DLX2_Rej_fifo); // F3DLX2_Rej
|
||||
} else {
|
||||
gSPLoadUcodeL(gDisplayListHead++, gspF3DEX2_Rej_fifo); // F3DEX2_Rej
|
||||
@@ -571,6 +567,28 @@ void geo_process_perspective(struct GraphNodePerspective *node) {
|
||||
sAspectRatio = 4.0f / 3.0f; // 1.33333f
|
||||
#endif
|
||||
|
||||
// The reason this is not divided as an integer is to prevent an integer division.
|
||||
f32 vHalfFov = ( (f32) ((node->fov * 4096) + 8192) ) / 45.f;
|
||||
|
||||
// We need to account for aspect ratio changes by multiplying by the widescreen horizontal stretch
|
||||
// (normally 1.775).
|
||||
f32 hHalfFov = vHalfFov * sAspectRatio;
|
||||
|
||||
node->halfFovHorizontal = tans(hHalfFov);
|
||||
|
||||
#ifdef VERTICAL_CULLING
|
||||
node->halfFovVertical = tans(vHalfFov);
|
||||
#endif
|
||||
|
||||
#ifndef HORIZONTAL_CULLING_ON_EMULATOR
|
||||
// If an emulator is detected, use a large value for the half fov
|
||||
// horizontal value to account for viewport widescreen hacks.
|
||||
|
||||
if(!(gEmulator & EMU_CONSOLE)){
|
||||
node->halfFovHorizontal = 9999.0f;
|
||||
}
|
||||
#endif
|
||||
|
||||
guPerspective(mtx, &perspNorm, node->fov, sAspectRatio, node->near / WORLD_SCALE, node->far / WORLD_SCALE, 1.0f);
|
||||
gSPPerspNormalize(gDisplayListHead++, perspNorm);
|
||||
|
||||
@@ -597,7 +615,7 @@ static f32 get_dist_from_camera(Vec3f pos) {
|
||||
*/
|
||||
void geo_process_level_of_detail(struct GraphNodeLevelOfDetail *node) {
|
||||
#ifdef AUTO_LOD
|
||||
f32 distanceFromCam = gIsConsole ? get_dist_from_camera(gMatStack[gMatStackIndex][3]) : 50.0f;
|
||||
f32 distanceFromCam = (gEmulator & EMU_CONSOLE) ? get_dist_from_camera(gMatStack[gMatStackIndex][3]) : 50.0f;
|
||||
#else
|
||||
f32 distanceFromCam = get_dist_from_camera(gMatStack[gMatStackIndex][3]);
|
||||
#endif
|
||||
@@ -1020,23 +1038,24 @@ void geo_process_shadow(struct GraphNodeShadow *node) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether an object is in view to determine whether it should be drawn.
|
||||
* Check whether an object is in view to determine whether if it should be drawn.
|
||||
* This is known as frustum culling.
|
||||
* It checks whether the object is far away, very close / behind the camera,
|
||||
* or horizontally out of view. It does not check whether it is vertically
|
||||
* out of view. It assumes a sphere of 300 units around the object's position
|
||||
* unless the object has a culling radius node that specifies otherwise.
|
||||
*
|
||||
* It checks whether the object is far away, very close or behind the camera and
|
||||
* vertically or horizontally out of view.
|
||||
* The radius used is specified in DEFAULT_CULLING_RADIUS unless the object
|
||||
* has a culling radius node that specifies another value.
|
||||
*
|
||||
* The matrix parameter should be the top of the matrix stack, which is the
|
||||
* object's transformation matrix times the camera 'look-at' matrix. The math
|
||||
* is counter-intuitive, but it checks column 3 (translation vector) of this
|
||||
* matrix to determine where the origin (0,0,0) in object space will be once
|
||||
* transformed to camera space (x+ = right, y+ = up, z = 'coming out the screen').
|
||||
*
|
||||
* In 3D graphics, you typically model the world as being moved in front of a
|
||||
* static camera instead of a moving camera through a static world, which in
|
||||
* this case simplifies calculations. Note that the perspective matrix is not
|
||||
* on the matrix stack, so there are still calculations with the fov to compute
|
||||
* the slope of the lines of the frustum.
|
||||
* the slope of the lines of the frustum, these are done once during geo_process_perspective.
|
||||
*
|
||||
* z-
|
||||
*
|
||||
@@ -1051,10 +1070,6 @@ void geo_process_shadow(struct GraphNodeShadow *node) {
|
||||
* Since (0,0,0) is unaffected by rotation, columns 0, 1 and 2 are ignored.
|
||||
*/
|
||||
s32 obj_is_in_view(struct GraphNodeObject *node) {
|
||||
if (node->node.flags & GRAPH_RENDER_INVISIBLE) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
struct GraphNode *geo = node->sharedChild;
|
||||
|
||||
s16 cullingRadius;
|
||||
@@ -1062,43 +1077,38 @@ s32 obj_is_in_view(struct GraphNodeObject *node) {
|
||||
if (geo != NULL && geo->type == GRAPH_NODE_TYPE_CULLING_RADIUS) {
|
||||
cullingRadius = ((struct GraphNodeCullingRadius *) geo)->cullingRadius;
|
||||
} else {
|
||||
cullingRadius = 300;
|
||||
cullingRadius = DEFAULT_CULLING_RADIUS;
|
||||
}
|
||||
|
||||
// Don't render if the object is close to or behind the camera
|
||||
if (node->cameraToObject[2] > -100.0f + cullingRadius) {
|
||||
// Check whether the object is not too far away or too close / behind the camera.
|
||||
// This makes the HOLP not update when the camera is far away, and it
|
||||
// makes PU travel safe when the camera is locked on the main map.
|
||||
// If Mario were rendered with a depth over 65536 it would cause overflow
|
||||
// when converting the transformation matrix to a fixed point matrix.
|
||||
f32 cameraToObjectDepth = node->cameraToObject[2];
|
||||
|
||||
#define VALID_DEPTH_MIDDLE (-20100.f / 2.f)
|
||||
#define VALID_DEPTH_RANGE (19900 / 2.f)
|
||||
if (absf(cameraToObjectDepth - VALID_DEPTH_MIDDLE) >= VALID_DEPTH_RANGE + cullingRadius) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//! This makes the HOLP not update when the camera is far away, and it
|
||||
// makes PU travel safe when the camera is locked on the main map.
|
||||
// If Mario were rendered with a depth over 65536 it would cause overflow
|
||||
// when converting the transformation matrix to a fixed point matrix.
|
||||
if (node->cameraToObject[2] < -20000.0f - cullingRadius) {
|
||||
#ifdef VERTICAL_CULLING
|
||||
f32 vScreenEdge = -cameraToObjectDepth * gCurGraphNodeCamFrustum->halfFovVertical;
|
||||
|
||||
// Unlike with horizontal culling, we only check if the object is bellow the screen
|
||||
// to prevent shadows from being culled.
|
||||
if (node->cameraToObject[1] < -vScreenEdge - cullingRadius) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// half of the fov in in-game angle units instead of degrees
|
||||
s16 halfFov = (((((gCurGraphNodeCamFrustum->fov * sAspectRatio) / 2.0f) + 1.0f) * 32768.0f) / 180.0f) + 0.5f;
|
||||
#endif
|
||||
|
||||
f32 hScreenEdge = -cameraToObjectDepth * gCurGraphNodeCamFrustum->halfFovHorizontal;
|
||||
|
||||
f32 hScreenEdge = -node->cameraToObject[2] * tans(halfFov);
|
||||
// -matrix[3][2] is the depth, which gets multiplied by tan(halfFov) to get
|
||||
// the amount of units between the center of the screen and the horizontal edge
|
||||
// given the distance from the object to the camera.
|
||||
|
||||
// This multiplication should really be performed on 4:3 as well,
|
||||
// but the issue will be more apparent on widescreen.
|
||||
// HackerSM64: This multiplication is done regardless of aspect ratio to fix object pop-in on the edges of the screen (which happens at 4:3 too)
|
||||
// hScreenEdge *= GFX_DIMENSIONS_ASPECT_RATIO;
|
||||
|
||||
// Check whether the object is horizontally in view
|
||||
if (node->cameraToObject[0] > hScreenEdge + cullingRadius) {
|
||||
if (absf(node->cameraToObject[0]) > hScreenEdge + cullingRadius) {
|
||||
return FALSE;
|
||||
}
|
||||
if (node->cameraToObject[0] < -hScreenEdge - cullingRadius) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1137,14 +1147,25 @@ void visualise_object_hitbox(struct Object *node) {
|
||||
*/
|
||||
void geo_process_object(struct Object *node) {
|
||||
if (node->header.gfx.areaIndex == gCurGraphNodeRoot->areaIndex) {
|
||||
if (node->header.gfx.throwMatrix != NULL) {
|
||||
mtxf_scale_vec3f(gMatStack[gMatStackIndex + 1], *node->header.gfx.throwMatrix, node->header.gfx.scale);
|
||||
} else if (node->header.gfx.node.flags & GRAPH_RENDER_BILLBOARD) {
|
||||
mtxf_billboard(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex],
|
||||
node->header.gfx.pos, node->header.gfx.scale, gCurGraphNodeCamera->roll);
|
||||
} else {
|
||||
mtxf_rotate_zxy_and_translate(gMatStack[gMatStackIndex + 1], node->header.gfx.pos, node->header.gfx.angle);
|
||||
mtxf_scale_vec3f(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex + 1], node->header.gfx.scale);
|
||||
s32 isInvisible = (node->header.gfx.node.flags & GRAPH_RENDER_INVISIBLE);
|
||||
s32 noThrowMatrix = (node->header.gfx.throwMatrix == NULL);
|
||||
|
||||
// If the throw matrix is null and the object is invisible, there is no need
|
||||
// to update billboarding, scale, rotation, etc.
|
||||
// This still updates translation since it is needed for sound.
|
||||
if (isInvisible && noThrowMatrix) {
|
||||
mtxf_translate(gMatStack[gMatStackIndex + 1], node->header.gfx.pos);
|
||||
}
|
||||
else{
|
||||
if (!noThrowMatrix) {
|
||||
mtxf_scale_vec3f(gMatStack[gMatStackIndex + 1], *node->header.gfx.throwMatrix, node->header.gfx.scale);
|
||||
} else if (node->header.gfx.node.flags & GRAPH_RENDER_BILLBOARD) {
|
||||
mtxf_billboard(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex],
|
||||
node->header.gfx.pos, node->header.gfx.scale, gCurGraphNodeCamera->roll);
|
||||
} else {
|
||||
mtxf_rotate_zxy_and_translate(gMatStack[gMatStackIndex + 1], node->header.gfx.pos, node->header.gfx.angle);
|
||||
mtxf_scale_vec3f(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex + 1], node->header.gfx.scale);
|
||||
}
|
||||
}
|
||||
|
||||
node->header.gfx.throwMatrix = &gMatStack[++gMatStackIndex];
|
||||
@@ -1154,7 +1175,8 @@ void geo_process_object(struct Object *node) {
|
||||
if (node->header.gfx.animInfo.curAnim != NULL) {
|
||||
geo_set_animation_globals(&node->header.gfx.animInfo, (node->header.gfx.node.flags & GRAPH_RENDER_HAS_ANIMATION) != 0);
|
||||
}
|
||||
if (obj_is_in_view(&node->header.gfx)) {
|
||||
|
||||
if (!isInvisible && obj_is_in_view(&node->header.gfx)) {
|
||||
gMatStackIndex--;
|
||||
inc_mat_stack();
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "level_commands.h"
|
||||
#include "rumble_init.h"
|
||||
#include "config.h"
|
||||
#include "emutest.h"
|
||||
#ifdef SRAM
|
||||
#include "sram.h"
|
||||
#endif
|
||||
@@ -55,7 +56,6 @@ s8 gLevelToCourseNumTable[] = {
|
||||
STATIC_ASSERT(ARRAY_COUNT(gLevelToCourseNumTable) == LEVEL_COUNT - 1,
|
||||
"change this array if you are adding levels");
|
||||
#ifdef EEP
|
||||
#include "vc_check.h"
|
||||
#include "vc_ultra.h"
|
||||
|
||||
/**
|
||||
@@ -76,7 +76,7 @@ static s32 read_eeprom_data(void *buffer, s32 size) {
|
||||
block_until_rumble_pak_free();
|
||||
#endif
|
||||
triesLeft--;
|
||||
status = gIsVC
|
||||
status = (gEmulator & EMU_WIIVC)
|
||||
? osEepromLongReadVC(&gSIEventMesgQueue, offset, buffer, size)
|
||||
: osEepromLongRead (&gSIEventMesgQueue, offset, buffer, size);
|
||||
#if ENABLE_RUMBLE
|
||||
@@ -106,7 +106,7 @@ static s32 write_eeprom_data(void *buffer, s32 size) {
|
||||
block_until_rumble_pak_free();
|
||||
#endif
|
||||
triesLeft--;
|
||||
status = gIsVC
|
||||
status = (gEmulator & EMU_WIIVC)
|
||||
? osEepromLongWriteVC(&gSIEventMesgQueue, offset, buffer, size)
|
||||
: osEepromLongWrite (&gSIEventMesgQueue, offset, buffer, size);
|
||||
#if ENABLE_RUMBLE
|
||||
|
||||
+240
-188
@@ -13,150 +13,8 @@
|
||||
#include "segment2.h"
|
||||
#include "sm64.h"
|
||||
|
||||
u8 sTransitionColorFadeCount[4] = { 0 };
|
||||
u16 sTransitionTextureFadeCount[2] = { 0 };
|
||||
|
||||
s32 set_and_reset_transition_fade_timer(s8 fadeTimer, u8 transTime) {
|
||||
s32 reset = FALSE;
|
||||
|
||||
sTransitionColorFadeCount[fadeTimer]++;
|
||||
|
||||
if (sTransitionColorFadeCount[fadeTimer] == transTime) {
|
||||
sTransitionColorFadeCount[fadeTimer] = 0;
|
||||
sTransitionTextureFadeCount[fadeTimer] = 0;
|
||||
reset = TRUE;
|
||||
}
|
||||
return reset;
|
||||
}
|
||||
|
||||
u8 set_transition_color_fade_alpha(s8 fadeType, s8 fadeTimer, u8 transTime) {
|
||||
u8 time = 0;
|
||||
|
||||
switch (fadeType) {
|
||||
case COLOR_TRANS_FADE_INTO_COLOR:
|
||||
time = (f32) sTransitionColorFadeCount[fadeTimer] * 255.0 / (f32)(transTime - 1) + 0.5; // fade in
|
||||
break;
|
||||
case COLOR_TRANS_FADE_FROM_COLOR:
|
||||
time = (1.0 - sTransitionColorFadeCount[fadeTimer] / (f32)(transTime - 1)) * 255.0 + 0.5; // fade out
|
||||
break;
|
||||
}
|
||||
return time;
|
||||
}
|
||||
|
||||
Vtx *vertex_transition_color(struct WarpTransitionData *transData, u8 alpha) {
|
||||
Vtx *verts = alloc_display_list(4 * sizeof(*verts));
|
||||
u8 r = transData->red;
|
||||
u8 g = transData->green;
|
||||
u8 b = transData->blue;
|
||||
|
||||
if (verts != NULL) {
|
||||
make_vertex(verts, 0, GFX_DIMENSIONS_FROM_LEFT_EDGE(0), 0, -1, 0, 0, r, g, b, alpha);
|
||||
make_vertex(verts, 1, GFX_DIMENSIONS_FROM_RIGHT_EDGE(0), 0, -1, 0, 0, r, g, b, alpha);
|
||||
make_vertex(verts, 2, GFX_DIMENSIONS_FROM_RIGHT_EDGE(0), SCREEN_HEIGHT, -1, 0, 0, r, g, b, alpha);
|
||||
make_vertex(verts, 3, GFX_DIMENSIONS_FROM_LEFT_EDGE(0), SCREEN_HEIGHT, -1, 0, 0, r, g, b, alpha);
|
||||
}
|
||||
return verts;
|
||||
}
|
||||
|
||||
s32 dl_transition_color(s8 fadeTimer, u8 transTime, struct WarpTransitionData *transData, u8 alpha) {
|
||||
Vtx *verts = vertex_transition_color(transData, alpha);
|
||||
|
||||
if (verts != NULL) {
|
||||
gSPDisplayList(gDisplayListHead++, dl_proj_mtx_fullscreen);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2);
|
||||
gSPVertex(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(verts), 4, 0);
|
||||
gSPDisplayList(gDisplayListHead++, dl_draw_quad_verts_0123);
|
||||
gSPDisplayList(gDisplayListHead++, dl_screen_transition_end);
|
||||
}
|
||||
return set_and_reset_transition_fade_timer(fadeTimer, transTime);
|
||||
}
|
||||
|
||||
s32 render_fade_transition_from_color(s8 fadeTimer, u8 transTime, struct WarpTransitionData *transData) {
|
||||
u8 alpha = set_transition_color_fade_alpha(COLOR_TRANS_FADE_FROM_COLOR, fadeTimer, transTime);
|
||||
|
||||
return dl_transition_color(fadeTimer, transTime, transData, alpha);
|
||||
}
|
||||
|
||||
s32 render_fade_transition_into_color(s8 fadeTimer, u8 transTime, struct WarpTransitionData *transData) {
|
||||
u8 alpha = set_transition_color_fade_alpha(COLOR_TRANS_FADE_INTO_COLOR, fadeTimer, transTime);
|
||||
|
||||
return dl_transition_color(fadeTimer, transTime, transData, alpha);
|
||||
}
|
||||
|
||||
s16 calc_tex_transition_radius(s8 fadeTimer, s8 transTime, struct WarpTransitionData *transData) {
|
||||
f32 texRadius = transData->endTexRadius - transData->startTexRadius;
|
||||
f32 radiusTime = sTransitionColorFadeCount[fadeTimer] * texRadius / (f32)(transTime - 1);
|
||||
f32 result = transData->startTexRadius + radiusTime;
|
||||
|
||||
return (s16)(result + 0.5f);
|
||||
}
|
||||
|
||||
f32 calc_tex_transition_time(s8 fadeTimer, s8 transTime, struct WarpTransitionData *transData) {
|
||||
f32 startX = transData->startTexX;
|
||||
f32 startY = transData->startTexY;
|
||||
f32 endX = transData->endTexX;
|
||||
f32 endY = transData->endTexY;
|
||||
f32 sqrtfXY = sqrtf((startX - endX) * (startX - endX) + (startY - endY) * (startY - endY));
|
||||
f32 result = (f32) sTransitionColorFadeCount[fadeTimer] * sqrtfXY / (f32)(transTime - 1);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
u16 convert_tex_transition_angle_to_pos(struct WarpTransitionData *transData) {
|
||||
f32 x = transData->endTexX - transData->startTexX;
|
||||
f32 y = transData->endTexY - transData->startTexY;
|
||||
|
||||
return atan2s(x, y);
|
||||
}
|
||||
|
||||
s16 center_tex_transition_x(struct WarpTransitionData *transData, f32 texTransTime, u16 texTransPos) {
|
||||
f32 x = transData->startTexX + coss(texTransPos) * texTransTime;
|
||||
|
||||
return (s16)(x + 0.5);
|
||||
}
|
||||
|
||||
s16 center_tex_transition_y(struct WarpTransitionData *transData, f32 texTransTime, u16 texTransPos) {
|
||||
f32 y = transData->startTexY + sins(texTransPos) * texTransTime;
|
||||
|
||||
return (s16)(y + 0.5);
|
||||
}
|
||||
|
||||
void make_tex_transition_vertex(Vtx *verts, s32 n, s8 fadeTimer, struct WarpTransitionData *transData, s16 centerTransX, s16 centerTransY,
|
||||
s16 texRadius1, s16 texRadius2, s16 tx, s16 ty) {
|
||||
u8 r = transData->red;
|
||||
u8 g = transData->green;
|
||||
u8 b = transData->blue;
|
||||
u16 zeroTimer = sTransitionTextureFadeCount[fadeTimer];
|
||||
f32 centerX = texRadius1 * coss(zeroTimer) - texRadius2 * sins(zeroTimer) + centerTransX;
|
||||
f32 centerY = texRadius1 * sins(zeroTimer) + texRadius2 * coss(zeroTimer) + centerTransY;
|
||||
s16 x = roundf(centerX);
|
||||
s16 y = roundf(centerY);
|
||||
|
||||
make_vertex(verts, n, x, y, -1, tx * 32, ty * 32, r, g, b, 255);
|
||||
}
|
||||
|
||||
void load_tex_transition_vertex(Vtx *verts, s8 fadeTimer, struct WarpTransitionData *transData, s16 centerTransX, s16 centerTransY,
|
||||
s16 texTransRadius, s8 transTexType) {
|
||||
switch (transTexType) {
|
||||
case TRANS_TYPE_MIRROR:
|
||||
make_tex_transition_vertex(verts, 0, fadeTimer, transData, centerTransX, centerTransY, -texTransRadius, -texTransRadius, -31, 63);
|
||||
make_tex_transition_vertex(verts, 1, fadeTimer, transData, centerTransX, centerTransY, texTransRadius, -texTransRadius, 31, 63);
|
||||
make_tex_transition_vertex(verts, 2, fadeTimer, transData, centerTransX, centerTransY, texTransRadius, texTransRadius, 31, 0);
|
||||
make_tex_transition_vertex(verts, 3, fadeTimer, transData, centerTransX, centerTransY, -texTransRadius, texTransRadius, -31, 0);
|
||||
break;
|
||||
case TRANS_TYPE_CLAMP:
|
||||
make_tex_transition_vertex(verts, 0, fadeTimer, transData, centerTransX, centerTransY, -texTransRadius, -texTransRadius, 0, 63);
|
||||
make_tex_transition_vertex(verts, 1, fadeTimer, transData, centerTransX, centerTransY, texTransRadius, -texTransRadius, 63, 63);
|
||||
make_tex_transition_vertex(verts, 2, fadeTimer, transData, centerTransX, centerTransY, texTransRadius, texTransRadius, 63, 0);
|
||||
make_tex_transition_vertex(verts, 3, fadeTimer, transData, centerTransX, centerTransY, -texTransRadius, texTransRadius, 0, 0);
|
||||
break;
|
||||
}
|
||||
make_tex_transition_vertex(verts, 4, fadeTimer, transData, centerTransX, centerTransY, -2000, -2000, 0, 0);
|
||||
make_tex_transition_vertex(verts, 5, fadeTimer, transData, centerTransX, centerTransY, 2000, -2000, 0, 0);
|
||||
make_tex_transition_vertex(verts, 6, fadeTimer, transData, centerTransX, centerTransY, 2000, 2000, 0, 0);
|
||||
make_tex_transition_vertex(verts, 7, fadeTimer, transData, centerTransX, centerTransY, -2000, 2000, 0, 0);
|
||||
}
|
||||
u8 sTransitionFadeTimer = 0;
|
||||
u16 sTransitionTextureAngle = 0;
|
||||
|
||||
void *sTextureTransitionID[] = {
|
||||
texture_transition_star_half,
|
||||
@@ -165,108 +23,302 @@ void *sTextureTransitionID[] = {
|
||||
texture_transition_bowser_half,
|
||||
};
|
||||
|
||||
s32 render_textured_transition(s8 fadeTimer, s8 transTime, struct WarpTransitionData *transData, s8 texID, s8 transTexType) {
|
||||
f32 texTransTime = calc_tex_transition_time(fadeTimer, transTime, transData);
|
||||
u16 texTransPos = convert_tex_transition_angle_to_pos(transData);
|
||||
s16 centerTransX = center_tex_transition_x(transData, texTransTime, texTransPos);
|
||||
s16 centerTransY = center_tex_transition_y(transData, texTransTime, texTransPos);
|
||||
s16 texTransRadius = calc_tex_transition_radius(fadeTimer, transTime, transData);
|
||||
Vtx *verts = alloc_display_list(8 * sizeof(*verts));
|
||||
s32 set_and_reset_transition_fade_timer(u8 transTime) {
|
||||
sTransitionFadeTimer++;
|
||||
|
||||
if (sTransitionFadeTimer >= transTime) {
|
||||
sTransitionFadeTimer = 0;
|
||||
sTransitionTextureAngle = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void make_tex_transition_vertex(Vtx *verts, s32 n, f32 centerTransX, f32 centerTransY,
|
||||
f32 vertX, f32 vertY, s16 tx, s16 ty) {
|
||||
// Rotate around the center
|
||||
s16 angle = sTransitionTextureAngle;
|
||||
f32 x = vertX * coss(angle) - vertY * sins(angle) + centerTransX;
|
||||
f32 y = vertX * sins(angle) + vertY * coss(angle) + centerTransY;
|
||||
|
||||
s16 roundedX = roundf(x);
|
||||
s16 roundedY = roundf(y);
|
||||
|
||||
make_simple_vertex(verts, n, roundedX, roundedY, -1, tx * 32, ty * 32);
|
||||
}
|
||||
|
||||
#define SOLID_COL_RADIUS 2000
|
||||
void make_tex_transition_vertices(Vtx *verts, f32 centerTransX, f32 centerTransY, f32 texTransRadius,
|
||||
s8 transTexType) {
|
||||
|
||||
s16 leftUV, rightUV, downUV, upUV;
|
||||
|
||||
if (transTexType == TRANS_TYPE_MIRROR) {
|
||||
leftUV = -31;
|
||||
rightUV = 31;
|
||||
downUV = 0;
|
||||
upUV = 63;
|
||||
}
|
||||
else {
|
||||
leftUV = 0;
|
||||
rightUV = 63;
|
||||
downUV = 0;
|
||||
upUV = 63;
|
||||
}
|
||||
|
||||
// Shape texture
|
||||
make_tex_transition_vertex(verts, 0, centerTransX, centerTransY, -texTransRadius, -texTransRadius, leftUV, upUV);
|
||||
make_tex_transition_vertex(verts, 1, centerTransX, centerTransY, texTransRadius, -texTransRadius, rightUV, upUV);
|
||||
make_tex_transition_vertex(verts, 2, centerTransX, centerTransY, texTransRadius, texTransRadius, rightUV, downUV);
|
||||
make_tex_transition_vertex(verts, 3, centerTransX, centerTransY, -texTransRadius, texTransRadius, leftUV, downUV);
|
||||
|
||||
// Solid color
|
||||
make_tex_transition_vertex(verts, 4, centerTransX, centerTransY, -SOLID_COL_RADIUS, -SOLID_COL_RADIUS, 0, 0);
|
||||
make_tex_transition_vertex(verts, 5, centerTransX, centerTransY, SOLID_COL_RADIUS, -SOLID_COL_RADIUS, 0, 0);
|
||||
make_tex_transition_vertex(verts, 6, centerTransX, centerTransY, SOLID_COL_RADIUS, SOLID_COL_RADIUS, 0, 0);
|
||||
make_tex_transition_vertex(verts, 7, centerTransX, centerTransY, -SOLID_COL_RADIUS, SOLID_COL_RADIUS, 0, 0);
|
||||
}
|
||||
|
||||
f32 calc_tex_transition_radius(s8 transTime, struct WarpTransitionData *transData) {
|
||||
f32 amount = (f32) sTransitionFadeTimer / (f32) (transTime - 1);
|
||||
|
||||
#ifdef EASE_IN_OUT_TRANSITIONS
|
||||
return smoothstep(transData->startTexRadius, transData->endTexRadius, amount);
|
||||
#else
|
||||
return lerpf(transData->startTexRadius, transData->endTexRadius, amount);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
f32 center_tex_transition_x(struct WarpTransitionData *transData, f32 posDistance, u16 texTransDir) {
|
||||
f32 x = transData->startTexX + coss(texTransDir) * posDistance;
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
f32 center_tex_transition_y(struct WarpTransitionData *transData, f32 posDistance, u16 texTransDir) {
|
||||
f32 y = transData->startTexY + sins(texTransDir) * posDistance;
|
||||
|
||||
return y;
|
||||
}
|
||||
|
||||
f32 calc_tex_transition_pos_distance(s8 transTime, struct WarpTransitionData *transData) {
|
||||
f32 startX = transData->startTexX;
|
||||
f32 startY = transData->startTexY;
|
||||
f32 endX = transData->endTexX;
|
||||
f32 endY = transData->endTexY;
|
||||
|
||||
f32 distance = sqrtf(sqr(startX - endX) + sqr(startY - endY));
|
||||
|
||||
f32 amount = (f32) sTransitionFadeTimer / (f32)(transTime - 1);
|
||||
|
||||
return distance * amount;
|
||||
}
|
||||
|
||||
u16 calc_tex_transition_direction(struct WarpTransitionData *transData) {
|
||||
f32 x = transData->endTexX - transData->startTexX;
|
||||
f32 y = transData->endTexY - transData->startTexY;
|
||||
|
||||
return atan2s(x, y);
|
||||
}
|
||||
|
||||
/*
|
||||
* Called during render_screen_transition.
|
||||
* Handles shape transitions (such as the star, circle and Mario and bowser´s heads).
|
||||
*/
|
||||
s32 render_textured_transition(s8 transTime, struct WarpTransitionData *transData, s8 texID, s8 transTexType) {
|
||||
u16 texTransDir = calc_tex_transition_direction(transData);
|
||||
|
||||
f32 posDistance = calc_tex_transition_pos_distance(transTime, transData);
|
||||
f32 centerTransX = center_tex_transition_x(transData, posDistance, texTransDir);
|
||||
f32 centerTransY = center_tex_transition_y(transData, posDistance, texTransDir);
|
||||
|
||||
f32 texTransRadius = calc_tex_transition_radius(transTime, transData);
|
||||
Vtx *verts = alloc_display_list(8 * sizeof(Vtx));
|
||||
|
||||
|
||||
if (verts != NULL) {
|
||||
load_tex_transition_vertex(verts, fadeTimer, transData, centerTransX, centerTransY, texTransRadius, transTexType);
|
||||
make_tex_transition_vertices(verts, centerTransX, centerTransY, texTransRadius, transTexType);
|
||||
gSPDisplayList(gDisplayListHead++, dl_proj_mtx_fullscreen);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
|
||||
|
||||
u8 r = transData->red;
|
||||
u8 g = transData->green;
|
||||
u8 b = transData->blue;
|
||||
gDPSetPrimColor(gDisplayListHead++, 0, 0, r, g, b, 255);
|
||||
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_OPA_SURF, G_RM_AA_OPA_SURF2);
|
||||
|
||||
gSPVertex(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(verts), 8, 0);
|
||||
gSPDisplayList(gDisplayListHead++, dl_transition_draw_filled_region);
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||
|
||||
gDPSetCombineLERP(gDisplayListHead++, 0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0,
|
||||
0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0);
|
||||
|
||||
#ifdef SHARP_TRANSITION_TEXTURES
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_TEX_EDGE, G_RM_AA_TEX_EDGE2);
|
||||
s32 textureType = G_IM_FMT_I;
|
||||
#else
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2);
|
||||
s32 textureType = G_IM_FMT_IA;
|
||||
#endif
|
||||
|
||||
gDPSetTextureFilter(gDisplayListHead++, G_TF_BILERP);
|
||||
|
||||
switch (transTexType) {
|
||||
case TRANS_TYPE_MIRROR:
|
||||
gDPLoadTextureBlock(gDisplayListHead++, sTextureTransitionID[texID], G_IM_FMT_IA, G_IM_SIZ_8b, 32, 64, 0,
|
||||
G_TX_WRAP | G_TX_MIRROR, G_TX_WRAP | G_TX_MIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
break;
|
||||
case TRANS_TYPE_CLAMP:
|
||||
gDPLoadTextureBlock(gDisplayListHead++, sTextureTransitionID[texID], G_IM_FMT_IA, G_IM_SIZ_8b, 64, 64, 0,
|
||||
G_TX_CLAMP, G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
break;
|
||||
case TRANS_TYPE_MIRROR:
|
||||
gDPLoadTextureBlock(gDisplayListHead++, sTextureTransitionID[texID], textureType, G_IM_SIZ_8b, 32, 64, 0,
|
||||
G_TX_WRAP | G_TX_MIRROR, G_TX_WRAP | G_TX_MIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
break;
|
||||
case TRANS_TYPE_CLAMP:
|
||||
gDPLoadTextureBlock(gDisplayListHead++, sTextureTransitionID[texID], textureType, G_IM_SIZ_8b, 64, 64, 0,
|
||||
G_TX_CLAMP, G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
break;
|
||||
}
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gSPVertex(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(verts), 4, 0);
|
||||
gSPDisplayList(gDisplayListHead++, dl_draw_quad_verts_0123);
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF);
|
||||
gSPDisplayList(gDisplayListHead++, dl_screen_transition_end);
|
||||
sTransitionTextureFadeCount[fadeTimer] += transData->texTimer;
|
||||
sTransitionTextureAngle += transData->angleSpeed;
|
||||
}
|
||||
return set_and_reset_transition_fade_timer(fadeTimer, transTime);
|
||||
return set_and_reset_transition_fade_timer(transTime);
|
||||
}
|
||||
|
||||
s32 render_screen_transition(s8 fadeTimer, s8 transType, u8 transTime, struct WarpTransitionData *transData) {
|
||||
Vtx *vertex_transition_color() {
|
||||
Vtx *verts = alloc_display_list(4 * sizeof(Vtx));
|
||||
|
||||
if (verts != NULL) {
|
||||
make_simple_vertex(verts, 0, GFX_DIMENSIONS_FROM_LEFT_EDGE(0), 0, -1, 0, 0);
|
||||
make_simple_vertex(verts, 1, GFX_DIMENSIONS_FROM_RIGHT_EDGE(0), 0, -1, 0, 0);
|
||||
make_simple_vertex(verts, 2, GFX_DIMENSIONS_FROM_RIGHT_EDGE(0), SCREEN_HEIGHT, -1, 0, 0);
|
||||
make_simple_vertex(verts, 3, GFX_DIMENSIONS_FROM_LEFT_EDGE(0), SCREEN_HEIGHT, -1, 0, 0);
|
||||
}
|
||||
return verts;
|
||||
}
|
||||
|
||||
s32 dl_transition_color(u8 transTime, struct WarpTransitionData *transData, u8 alpha) {
|
||||
Vtx *verts = vertex_transition_color();
|
||||
|
||||
if (verts != NULL) {
|
||||
u8 r = transData->red;
|
||||
u8 g = transData->green;
|
||||
u8 b = transData->blue;
|
||||
gDPSetPrimColor(gDisplayListHead++, 0, 0, r, g, b, alpha);
|
||||
|
||||
gSPDisplayList(gDisplayListHead++, dl_proj_mtx_fullscreen);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_XLU_SURF, G_RM_AA_XLU_SURF2);
|
||||
gSPVertex(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(verts), 4, 0);
|
||||
gSPDisplayList(gDisplayListHead++, dl_draw_quad_verts_0123);
|
||||
gSPDisplayList(gDisplayListHead++, dl_screen_transition_end);
|
||||
}
|
||||
return set_and_reset_transition_fade_timer(transTime);
|
||||
}
|
||||
|
||||
u8 set_transition_color_fade_alpha(s8 fadeType, u8 transTime) {
|
||||
u8 time = 0;
|
||||
f32 amount = (f32) sTransitionFadeTimer / (f32) (transTime - 1);
|
||||
switch (fadeType) {
|
||||
case COLOR_TRANS_FADE_INTO_COLOR:
|
||||
time = lerpf(0.f, 255.0f, amount);
|
||||
break;
|
||||
case COLOR_TRANS_FADE_FROM_COLOR:
|
||||
time = lerpf(255.0f, 0.f, amount);
|
||||
break;
|
||||
}
|
||||
return roundf(time);
|
||||
}
|
||||
|
||||
s32 render_fade_transition_from_color(u8 transTime, struct WarpTransitionData *transData) {
|
||||
u8 alpha = set_transition_color_fade_alpha(COLOR_TRANS_FADE_FROM_COLOR, transTime);
|
||||
|
||||
return dl_transition_color(transTime, transData, alpha);
|
||||
}
|
||||
|
||||
s32 render_fade_transition_into_color(u8 transTime, struct WarpTransitionData *transData) {
|
||||
u8 alpha = set_transition_color_fade_alpha(COLOR_TRANS_FADE_INTO_COLOR, transTime);
|
||||
|
||||
return dl_transition_color(transTime, transData, alpha);
|
||||
}
|
||||
|
||||
/*
|
||||
* Called during rendering if gWarpTransition.isActive is on.
|
||||
* Handles solid colour transitions and shape transitions
|
||||
* (such as the star, circle and Mario and bowser´s heads).
|
||||
*/
|
||||
s32 render_screen_transition(s8 transType, u8 transTime, struct WarpTransitionData *transData) {
|
||||
switch (transType) {
|
||||
case WARP_TRANSITION_FADE_FROM_COLOR:
|
||||
return render_fade_transition_from_color(fadeTimer, transTime, transData);
|
||||
return render_fade_transition_from_color(transTime, transData);
|
||||
break;
|
||||
case WARP_TRANSITION_FADE_INTO_COLOR:
|
||||
return render_fade_transition_into_color(fadeTimer, transTime, transData);
|
||||
return render_fade_transition_into_color(transTime, transData);
|
||||
break;
|
||||
|
||||
case WARP_TRANSITION_FADE_FROM_STAR:
|
||||
return render_textured_transition(fadeTimer, transTime, transData, TEX_TRANS_STAR, TRANS_TYPE_MIRROR);
|
||||
return render_textured_transition(transTime, transData, TEX_TRANS_STAR, TRANS_TYPE_MIRROR);
|
||||
break;
|
||||
case WARP_TRANSITION_FADE_INTO_STAR:
|
||||
return render_textured_transition(fadeTimer, transTime, transData, TEX_TRANS_STAR, TRANS_TYPE_MIRROR);
|
||||
return render_textured_transition(transTime, transData, TEX_TRANS_STAR, TRANS_TYPE_MIRROR);
|
||||
break;
|
||||
|
||||
case WARP_TRANSITION_FADE_FROM_CIRCLE:
|
||||
return render_textured_transition(fadeTimer, transTime, transData, TEX_TRANS_CIRCLE, TRANS_TYPE_MIRROR);
|
||||
return render_textured_transition(transTime, transData, TEX_TRANS_CIRCLE, TRANS_TYPE_MIRROR);
|
||||
break;
|
||||
case WARP_TRANSITION_FADE_INTO_CIRCLE:
|
||||
return render_textured_transition(fadeTimer, transTime, transData, TEX_TRANS_CIRCLE, TRANS_TYPE_MIRROR);
|
||||
return render_textured_transition(transTime, transData, TEX_TRANS_CIRCLE, TRANS_TYPE_MIRROR);
|
||||
break;
|
||||
|
||||
case WARP_TRANSITION_FADE_FROM_MARIO:
|
||||
return render_textured_transition(fadeTimer, transTime, transData, TEX_TRANS_MARIO, TRANS_TYPE_CLAMP);
|
||||
return render_textured_transition(transTime, transData, TEX_TRANS_MARIO, TRANS_TYPE_CLAMP);
|
||||
break;
|
||||
case WARP_TRANSITION_FADE_INTO_MARIO:
|
||||
return render_textured_transition(fadeTimer, transTime, transData, TEX_TRANS_MARIO, TRANS_TYPE_CLAMP);
|
||||
return render_textured_transition(transTime, transData, TEX_TRANS_MARIO, TRANS_TYPE_CLAMP);
|
||||
break;
|
||||
|
||||
case WARP_TRANSITION_FADE_FROM_BOWSER:
|
||||
return render_textured_transition(fadeTimer, transTime, transData, TEX_TRANS_BOWSER, TRANS_TYPE_MIRROR);
|
||||
return render_textured_transition(transTime, transData, TEX_TRANS_BOWSER, TRANS_TYPE_MIRROR);
|
||||
break;
|
||||
case WARP_TRANSITION_FADE_INTO_BOWSER:
|
||||
return render_textured_transition(fadeTimer, transTime, transData, TEX_TRANS_BOWSER, TRANS_TYPE_MIRROR);
|
||||
return render_textured_transition(transTime, transData, TEX_TRANS_BOWSER, TRANS_TYPE_MIRROR);
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Gfx *render_cannon_circle_base(void) {
|
||||
#ifdef WIDESCREEN
|
||||
Vtx *verts = alloc_display_list(8 * sizeof(*verts));
|
||||
Gfx *dlist = alloc_display_list(20 * sizeof(*dlist));
|
||||
Vtx *verts = alloc_display_list(8 * sizeof(Vtx));
|
||||
Gfx *dlist = alloc_display_list(20 * sizeof(Gfx));
|
||||
#else
|
||||
Vtx *verts = alloc_display_list(4 * sizeof(*verts));
|
||||
Gfx *dlist = alloc_display_list(16 * sizeof(*dlist));
|
||||
Vtx *verts = alloc_display_list(4 * sizeof(Vtx));
|
||||
Gfx *dlist = alloc_display_list(16 * sizeof(Gfx));
|
||||
#endif
|
||||
Gfx *g = dlist;
|
||||
|
||||
if (verts != NULL && dlist != NULL) {
|
||||
make_vertex(verts, 0, 0, 0, -1, -1152, 1824, 0, 0, 0, 255);
|
||||
make_vertex(verts, 1, SCREEN_WIDTH, 0, -1, 1152, 1824, 0, 0, 0, 255);
|
||||
make_vertex(verts, 2, SCREEN_WIDTH, SCREEN_HEIGHT, -1, 1152, 192, 0, 0, 0, 255);
|
||||
make_vertex(verts, 3, 0, SCREEN_HEIGHT, -1, -1152, 192, 0, 0, 0, 255);
|
||||
gDPSetPrimColor(gDisplayListHead++, 0, 0, 0, 0, 0, 255);
|
||||
|
||||
make_simple_vertex(verts, 0, 0, 0, -1, -1152, 1824);
|
||||
make_simple_vertex(verts, 1, SCREEN_WIDTH, 0, -1, 1152, 1824);
|
||||
make_simple_vertex(verts, 2, SCREEN_WIDTH, SCREEN_HEIGHT, -1, 1152, 192);
|
||||
make_simple_vertex(verts, 3, 0, SCREEN_HEIGHT, -1, -1152, 192);
|
||||
|
||||
#ifdef WIDESCREEN
|
||||
// Render black rectangles outside the 4:3 area.
|
||||
make_vertex(verts, 4, GFX_DIMENSIONS_FROM_LEFT_EDGE(0), 0, -1, 0, 0, 0, 0, 0, 255);
|
||||
make_vertex(verts, 5, GFX_DIMENSIONS_FROM_RIGHT_EDGE(0), 0, -1, 0, 0, 0, 0, 0, 255);
|
||||
make_vertex(verts, 6, GFX_DIMENSIONS_FROM_RIGHT_EDGE(0), SCREEN_HEIGHT, -1, 0, 0, 0, 0, 0, 255);
|
||||
make_vertex(verts, 7, GFX_DIMENSIONS_FROM_LEFT_EDGE(0), SCREEN_HEIGHT, -1, 0, 0, 0, 0, 0, 255);
|
||||
make_simple_vertex(verts, 4, GFX_DIMENSIONS_FROM_LEFT_EDGE(0), 0, -1, 0, 0, 0);
|
||||
make_simple_vertex(verts, 5, GFX_DIMENSIONS_FROM_RIGHT_EDGE(0), 0, -1, 0, 0, 0);
|
||||
make_simple_vertex(verts, 6, GFX_DIMENSIONS_FROM_RIGHT_EDGE(0), SCREEN_HEIGHT, -1, 0, 0);
|
||||
make_simple_vertex(verts, 7, GFX_DIMENSIONS_FROM_LEFT_EDGE(0), SCREEN_HEIGHT, -1, 0, 0);
|
||||
#endif
|
||||
|
||||
gSPDisplayList(g++, dl_proj_mtx_fullscreen);
|
||||
gDPSetCombineMode(g++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||
gDPSetCombineMode(g++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
gDPSetTextureFilter(g++, G_TF_BILERP);
|
||||
gDPLoadTextureBlock(g++, sTextureTransitionID[TEX_TRANS_CIRCLE], G_IM_FMT_IA, G_IM_SIZ_8b, 32, 64, 0,
|
||||
G_TX_WRAP | G_TX_MIRROR, G_TX_WRAP | G_TX_MIRROR, 5, 6, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
@@ -24,7 +24,7 @@ enum ColorTransitionFade {
|
||||
COLOR_TRANS_FADE_FROM_COLOR,
|
||||
};
|
||||
|
||||
s32 render_screen_transition(s8 fadeTimer, s8 transType, u8 transTime, struct WarpTransitionData *transData);
|
||||
s32 render_screen_transition(s8 transType, u8 transTime, struct WarpTransitionData *transData);
|
||||
Gfx *geo_cannon_circle_base(s32 callContext, struct GraphNode *node, UNUSED Mat4 mtx);
|
||||
|
||||
#endif // SCREEN_TRANSITION_H
|
||||
@@ -54,6 +54,8 @@ extern Gfx dl_ia_text_tex_settings[];
|
||||
extern Gfx dl_rgba16_load_tex_block[];
|
||||
extern void *main_credits_font_lut[];
|
||||
extern Texture *main_hud_camera_lut[6];
|
||||
extern Gfx dl_shade_screen_begin[];
|
||||
extern Gfx dl_shade_screen_end[];
|
||||
extern Gfx dl_draw_text_bg_box[];
|
||||
extern Gfx dl_draw_triangle[];
|
||||
extern void *seg2_dialog_table[];
|
||||
|
||||
@@ -36,7 +36,11 @@ static u16 sCurrentCapMusic = MUSIC_NONE;
|
||||
#ifdef ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS
|
||||
static u8 sPlayingInfiniteStairs = FALSE;
|
||||
#endif
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
static s16 sSoundMenuModeToSoundMode[3] = { SOUND_MODE_STEREO, SOUND_MODE_MONO, SOUND_MODE_HEADSET };
|
||||
#else
|
||||
static s16 sSoundMenuModeToSoundMode[2] = { SOUND_MODE_STEREO, SOUND_MODE_MONO };
|
||||
#endif
|
||||
// Only the 20th array element is used.
|
||||
static u32 sMenuSoundsExtra[] = {
|
||||
SOUND_MOVING_TERRAIN_SLIDE + (0 << 16),
|
||||
|
||||
@@ -94,6 +94,7 @@ void clear_object_lists(struct ObjectNode *objLists) {
|
||||
void unload_object(struct Object *obj) {
|
||||
obj->activeFlags = ACTIVE_FLAG_DEACTIVATED;
|
||||
obj->prevObj = NULL;
|
||||
obj->oFloor = NULL;
|
||||
|
||||
obj->header.gfx.throwMatrix = NULL;
|
||||
stop_sounds_from_source(obj->header.gfx.cameraToObject);
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#include "vc_check.h"
|
||||
|
||||
u8 gIsVC = FALSE;
|
||||
|
||||
// literally return what was passed
|
||||
f32 round_double_to_float(f64 v)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
#ifndef VC_CHECK_H
|
||||
#define VC_CHECK_H
|
||||
|
||||
#include "sm64.h"
|
||||
|
||||
extern u8 gIsVC;
|
||||
|
||||
// This function must not be inlined by the compiler so I move it to a different C file
|
||||
f32 round_double_to_float(f64);
|
||||
|
||||
/*
|
||||
* This check forces RTZ bug on vc
|
||||
* If console is N64/adequate Emu round-to-nearest (RTN) rounding mode is used
|
||||
* If console is VC round-to-zero (RTZ) mode is used
|
||||
*
|
||||
* The double value 0.9999999999999999 used is 0x3FEFFFFFFFFFFFFF in binary
|
||||
* Exponent=01111111110, Mantissa=1111111111111111111111111111111111111111111111111111
|
||||
* RTZ will output not 1.0f, RTN will output exactly 1.0f
|
||||
*/
|
||||
#define IS_VC() (1.0f != round_double_to_float(0.9999999999999999))
|
||||
|
||||
#endif
|
||||
+26
-1
@@ -119,7 +119,11 @@ unsigned char textCopyFileButton[] = { TEXT_COPY_FILE_BUTTON };
|
||||
|
||||
unsigned char textEraseFileButton[] = { TEXT_ERASE_FILE_BUTTON };
|
||||
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
unsigned char textSoundModes[][8] = { { TEXT_STEREO }, { TEXT_MONO }, { TEXT_HEADSET } };
|
||||
#else
|
||||
unsigned char textSoundModes[][8] = { { TEXT_STEREO }, { TEXT_MONO } };
|
||||
#endif
|
||||
|
||||
#if MULTILANG
|
||||
unsigned char textLanguageSelect[][17] = { { TEXT_LANGUAGE_SELECT } };
|
||||
@@ -788,6 +792,7 @@ void check_erase_menu_clicked_buttons(struct Object *eraseButton) {
|
||||
* Render buttons for the sound mode menu.
|
||||
*/
|
||||
void render_sound_mode_menu_buttons(struct Object *soundModeButton) {
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
// Stereo option button
|
||||
sMainMenuButtons[MENU_BUTTON_STEREO] = spawn_object_rel_with_rot(
|
||||
soundModeButton, MODEL_MAIN_MENU_GENERIC_BUTTON, bhvMenuButton, 533, SOUND_BUTTON_Y, -100, 0x0, -0x8000, 0x0);
|
||||
@@ -800,6 +805,16 @@ void render_sound_mode_menu_buttons(struct Object *soundModeButton) {
|
||||
sMainMenuButtons[MENU_BUTTON_HEADSET] = spawn_object_rel_with_rot(
|
||||
soundModeButton, MODEL_MAIN_MENU_GENERIC_BUTTON, bhvMenuButton, -533, SOUND_BUTTON_Y, -100, 0x0, -0x8000, 0x0);
|
||||
sMainMenuButtons[MENU_BUTTON_HEADSET]->oMenuButtonScale = MENU_BUTTON_SCALE;
|
||||
#else
|
||||
// Stereo option button
|
||||
sMainMenuButtons[MENU_BUTTON_STEREO] = spawn_object_rel_with_rot(
|
||||
soundModeButton, MODEL_MAIN_MENU_GENERIC_BUTTON, bhvMenuButton, 355, SOUND_BUTTON_Y, -100, 0x0, -0x8000, 0x0);
|
||||
sMainMenuButtons[MENU_BUTTON_STEREO]->oMenuButtonScale = MENU_BUTTON_SCALE;
|
||||
// Mono option button
|
||||
sMainMenuButtons[MENU_BUTTON_MONO] = spawn_object_rel_with_rot(
|
||||
soundModeButton, MODEL_MAIN_MENU_GENERIC_BUTTON, bhvMenuButton, -355, SOUND_BUTTON_Y, -100, 0x0, -0x8000, 0x0);
|
||||
sMainMenuButtons[MENU_BUTTON_MONO]->oMenuButtonScale = MENU_BUTTON_SCALE;
|
||||
#endif
|
||||
|
||||
#if MULTILANG
|
||||
// English option button
|
||||
@@ -841,8 +856,12 @@ void check_sound_mode_menu_clicked_buttons(struct Object *soundModeButton) {
|
||||
if (check_clicked_button(buttonX, buttonY, 22.0f) == TRUE) {
|
||||
// If sound mode button clicked, select it and define sound mode
|
||||
// The check will always be true because of the group configured above (In JP & US)
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
if (buttonID == MENU_BUTTON_STEREO || buttonID == MENU_BUTTON_MONO
|
||||
|| buttonID == MENU_BUTTON_HEADSET) {
|
||||
#else
|
||||
if (buttonID == MENU_BUTTON_STEREO || buttonID == MENU_BUTTON_MONO) {
|
||||
#endif
|
||||
if (soundModeButton->oMenuButtonActionPhase == SOUND_MODE_PHASE_MAIN) {
|
||||
play_sound(SOUND_MENU_CLICK_FILE_SELECT, gGlobalSoundSource);
|
||||
#if ENABLE_RUMBLE
|
||||
@@ -1150,7 +1169,9 @@ void bhv_menu_button_manager_loop(void) {
|
||||
// exiting the Options menu, as a result they added a return button
|
||||
case MENU_BUTTON_STEREO: return_to_main_menu(MENU_BUTTON_SOUND_MODE, sMainMenuButtons[MENU_BUTTON_STEREO ]); break;
|
||||
case MENU_BUTTON_MONO: return_to_main_menu(MENU_BUTTON_SOUND_MODE, sMainMenuButtons[MENU_BUTTON_MONO ]); break;
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
case MENU_BUTTON_HEADSET: return_to_main_menu(MENU_BUTTON_SOUND_MODE, sMainMenuButtons[MENU_BUTTON_HEADSET]); break;
|
||||
#endif
|
||||
}
|
||||
|
||||
sClickPos[0] = -10000;
|
||||
@@ -1782,7 +1803,11 @@ void print_sound_mode_menu_strings(void) {
|
||||
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
|
||||
|
||||
// Print sound mode names
|
||||
for (mode = 0, textX = 90; mode < 3; textX += 70, mode++) {
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
for (mode = 0, textX = 87; mode < ARRAY_COUNT(textSoundModes); textX += 74, mode++) {
|
||||
#else
|
||||
for (mode = 0, textX = 111; mode < ARRAY_COUNT(textSoundModes); textX += 99, mode++) {
|
||||
#endif
|
||||
if (mode == sSoundMode) {
|
||||
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha);
|
||||
} else {
|
||||
|
||||
@@ -81,7 +81,9 @@ enum MenuButtonTypes {
|
||||
MENU_BUTTON_OPTION_MIN,
|
||||
MENU_BUTTON_STEREO = MENU_BUTTON_OPTION_MIN,
|
||||
MENU_BUTTON_MONO,
|
||||
#ifdef ENABLE_STEREO_HEADSET_EFFECTS
|
||||
MENU_BUTTON_HEADSET,
|
||||
#endif
|
||||
|
||||
#if MULTILANG
|
||||
// Language Menu
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
# Makefile for s2d_engine.a
|
||||
|
||||
TARGET = libs2d_engine.a
|
||||
|
||||
default: all
|
||||
|
||||
BUILD_DIR ?= build
|
||||
DUMMY != mkdir -p $(BUILD_DIR)
|
||||
|
||||
C_FILES = $(wildcard ./*.c)
|
||||
O_FILES = $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o))
|
||||
|
||||
CC = $(CROSS)gcc
|
||||
AR = $(CROSS)ar
|
||||
|
||||
INCLUDE_BASE := ../../
|
||||
I_DIRS = src include/n64/PR include/n64 include/libc include .
|
||||
FULL_I_DIRS = $(addprefix $(INCLUDE_BASE),$(I_DIRS))
|
||||
I_FLAGS = $(foreach i,$(FULL_I_DIRS),-I$(i))
|
||||
|
||||
TARGET_CFLAGS = -nostdinc -I include/libc -DTARGET_N64 -DF3DEX_GBI_2
|
||||
CFLAGS := -Wall $(TARGET_CFLAGS) $(I_FLAGS) -fno-stack-protector -march=vr4300 -mtune=vr4300 -mfix4300 -mabi=32 -mno-shared -G 0 -fno-PIC -mno-abicalls -fno-zero-initialized-in-bss -fno-toplevel-reorder -Wno-missing-braces
|
||||
|
||||
|
||||
all: $(BUILD_DIR)/$(TARGET)
|
||||
|
||||
clean:
|
||||
rm -r build/
|
||||
|
||||
COPY_DIR := none
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
ifeq ($(COPY_DIR),none)
|
||||
$(error S2DEX Text Engine: No COPY_DIR defined!)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(BUILD_DIR)/$(TARGET): $(O_FILES)
|
||||
$(AR) rcs -o $@ $(O_FILES)
|
||||
cp $@ $(COPY_DIR)
|
||||
|
||||
$(BUILD_DIR)/%.o: %.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true
|
||||
Loaded 100 of 142 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user