You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
HackerSM64 Release: v2.3.0
Merge pull request #815 from HackerN64/develop/2.3.0
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2149,3 +2149,6 @@ lib/libs2d_engine.a
|
||||
|
||||
# :Zone_Identifier files
|
||||
*Zone.Identifier
|
||||
|
||||
# user-specific config file
|
||||
include/config/config_local.h
|
||||
|
||||
19
Makefile
19
Makefile
@@ -269,7 +269,7 @@ BUILD_DIR_BASE := build
|
||||
# BUILD_DIR is the location where all build artifacts are placed
|
||||
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE)
|
||||
|
||||
COMPRESS ?= rnc1
|
||||
COMPRESS ?= yay0
|
||||
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp))
|
||||
ifeq ($(COMPRESS),gzip)
|
||||
DEFINES += GZIP=1
|
||||
@@ -399,6 +399,9 @@ GODDARD_C_FILES := $(foreach dir,$(GODDARD_SRC_DIRS),$(wildcard $(dir)/*.c))
|
||||
S_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.s))
|
||||
GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c
|
||||
|
||||
# Ignore all .inc.c files
|
||||
C_FILES := $(filter-out %.inc.c,$(C_FILES))
|
||||
|
||||
# Sound files
|
||||
SOUND_BANK_FILES := $(wildcard sound/sound_banks/*.json)
|
||||
SOUND_SAMPLE_DIRS := $(wildcard sound/samples/*)
|
||||
@@ -441,6 +444,8 @@ else ifneq ($(call find-command,mips-linux-gnu-ld),)
|
||||
CROSS := mips-linux-gnu-
|
||||
else ifneq ($(call find-command,mips64-linux-gnu-ld),)
|
||||
CROSS := mips64-linux-gnu-
|
||||
else ifneq ($(call find-command,mips64-none-elf-ld),)
|
||||
CROSS := mips64-none-elf-
|
||||
else ifneq ($(call find-command,mips-ld),)
|
||||
CROSS := mips-
|
||||
else
|
||||
@@ -548,7 +553,13 @@ ifneq (,$(call find-command,armips))
|
||||
else
|
||||
RSPASM := $(TOOLS_DIR)/armips
|
||||
endif
|
||||
EMULATOR = mupen64plus
|
||||
|
||||
ifneq (,$(call find-command,wslview))
|
||||
EMULATOR = "/mnt/c/Program Files (x86)/parallel-launcher/parallel-launcher.exe"
|
||||
else
|
||||
EMULATOR = parallel-launcher
|
||||
endif
|
||||
|
||||
EMU_FLAGS =
|
||||
|
||||
ifneq (,$(call find-command,wslview))
|
||||
@@ -769,7 +780,7 @@ endif
|
||||
|
||||
$(BUILD_DIR)/%.table: %.aiff
|
||||
$(call print,Extracting codebook:,$<,$@)
|
||||
$(V)$(AIFF_EXTRACT_CODEBOOK) $< >$@
|
||||
$(V)$(AIFF_EXTRACT_CODEBOOK) $< $@
|
||||
|
||||
$(BUILD_DIR)/%.aifc: $(BUILD_DIR)/%.table %.aiff
|
||||
$(call print,Encoding ADPCM:,$(word 2,$^),$@)
|
||||
@@ -913,7 +924,7 @@ $(BUILD_DIR)/asm/debug/map.o: asm/debug/map.s $(BUILD_DIR)/sm64_prelim.elf
|
||||
# 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) $(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 $(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
|
||||
|
||||
# Build ROM
|
||||
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.2.0
|
||||
v2.3.0
|
||||
|
||||
@@ -2474,6 +2474,7 @@ static const Vtx vertex_billboard_num[] = {
|
||||
// 0x0200EFF0 - 0x0200F038
|
||||
const Gfx dl_billboard_num_begin[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetTextureFilter(G_TF_POINT),
|
||||
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
|
||||
gsSPClearGeometryMode(G_LIGHTING),
|
||||
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, (G_TX_WRAP | G_TX_NOMIRROR), G_TX_NOMASK, G_TX_NOLOD, (G_TX_WRAP | G_TX_NOMIRROR), G_TX_NOMASK, G_TX_NOLOD),
|
||||
@@ -2490,6 +2491,7 @@ const Gfx dl_billboard_num_end[] = {
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_OFF),
|
||||
gsDPPipeSync(),
|
||||
gsDPSetTextureFilter(G_TF_BILERP),
|
||||
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||
gsSPSetGeometryMode(G_LIGHTING),
|
||||
gsSPEndDisplayList(),
|
||||
|
||||
@@ -2694,7 +2694,7 @@ const BehaviorScript bhvSushiShark[] = {
|
||||
|
||||
const BehaviorScript bhvJrbSlidingBox[] = {
|
||||
BEGIN(OBJ_LIST_SURFACE),
|
||||
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
|
||||
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_NO_AUTO_DISPLACEMENT),
|
||||
LOAD_COLLISION_DATA(jrb_seg7_collision_floating_box),
|
||||
SET_HOME(),
|
||||
BEGIN_LOOP(),
|
||||
@@ -5437,11 +5437,7 @@ const BehaviorScript bhvTTCPendulum[] = {
|
||||
|
||||
const BehaviorScript bhvTTCTreadmill[] = {
|
||||
BEGIN(OBJ_LIST_SURFACE),
|
||||
#ifdef PLATFORM_DISPLACEMENT_2
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_VELOCITY_PLATFORM)),
|
||||
#else
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
#endif
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE | OBJ_FLAG_NO_AUTO_DISPLACEMENT)),
|
||||
SET_FLOAT(oCollisionDistance, 750),
|
||||
CALL_NATIVE(bhv_ttc_treadmill_init),
|
||||
DELAY(1),
|
||||
|
||||
@@ -177,9 +177,15 @@ def main():
|
||||
# presence of the correct roms automatically
|
||||
|
||||
# Make sure tools exist
|
||||
subprocess.check_call(
|
||||
["make", "-s", "-C", "tools/", "n64graphics", "skyconv", "mio0", "aifc_decode"]
|
||||
)
|
||||
tools = [ "n64graphics", "skyconv", "mio0", "aifc_decode" ]
|
||||
if os.name == 'nt':
|
||||
tools = [tool + ".exe" for tool in tools]
|
||||
make = "mingw32-make"
|
||||
else:
|
||||
make = "make"
|
||||
|
||||
cmd = [make, "-s", "-C", "tools/"] + tools
|
||||
subprocess.check_call(cmd)
|
||||
|
||||
# Go through the assets in roughly alphabetical order (but assets in the same
|
||||
# mio0 file still go together).
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
#include "config/config_objects.h"
|
||||
#include "config/config_rom.h"
|
||||
|
||||
// Local config - include a gitignore'd config file that's specific to just the user (if the file exists)
|
||||
#if __has_include("config/config_local.h")
|
||||
#include "config/config_local.h"
|
||||
#endif
|
||||
|
||||
/* WARNING: Compatibility safeguards - don't remove this file unless you know what you're doing */
|
||||
// WARNING: Compatibility safeguards - don't remove this file unless you know what you're doing
|
||||
#include "config/config_safeguards.h"
|
||||
|
||||
@@ -136,14 +136,8 @@
|
||||
*/
|
||||
#define BUGFIX_DIALOG_TIME_STOP
|
||||
|
||||
/**
|
||||
* Enables Platform Displacement 2, an upgrade to the physics involving moving platforms and how Mario interacts with them.
|
||||
*/
|
||||
#define PLATFORM_DISPLACEMENT_2
|
||||
|
||||
/**
|
||||
* Inertia defines; allow Mario to preserve his momemtum when leaving moving platforms.
|
||||
* These require Platform Displacement 2 to be enabled.
|
||||
*/
|
||||
#define MARIO_INERTIA_UPWARD
|
||||
// #define MARIO_INERTIA_LATERAL
|
||||
|
||||
@@ -47,7 +47,7 @@ enum ObjFlags {
|
||||
OBJ_FLAG_1000 = (1 << 12), // 0x00001000
|
||||
OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO = (1 << 13), // 0x00002000
|
||||
OBJ_FLAG_PERSISTENT_RESPAWN = (1 << 14), // 0x00004000
|
||||
OBJ_FLAG_VELOCITY_PLATFORM = (1 << 15), // 0x00008000
|
||||
OBJ_FLAG_NO_AUTO_DISPLACEMENT = (1 << 15), // 0x00008000
|
||||
OBJ_FLAG_DONT_CALC_COLL_DIST = (1 << 16), // 0x00010000
|
||||
OBJ_FLAG_SILHOUETTE = (1 << 19), // 0x00080000
|
||||
OBJ_FLAG_OCCLUDE_SILHOUETTE = (1 << 20), // 0x00100000
|
||||
|
||||
@@ -36,15 +36,27 @@ enum SoundBank {
|
||||
SOUND_BANK_MENU,
|
||||
SOUND_BANK_GENERAL2,
|
||||
SOUND_BANK_OBJ2,
|
||||
SOUND_BANK_CUSTOM_FOREGROUND_1,
|
||||
SOUND_BANK_CUSTOM_FOREGROUND_2,
|
||||
SOUND_BANK_CUSTOM_FOREGROUND_3,
|
||||
SOUND_BANK_CUSTOM_BACKGROUND_1,
|
||||
SOUND_BANK_CUSTOM_BACKGROUND_2,
|
||||
SOUND_BANK_CUSTOM_BACKGROUND_3,
|
||||
|
||||
SOUND_BANK_COUNT
|
||||
};
|
||||
|
||||
#define SOUND_BANKS_ALL_BITS 0xffff
|
||||
#define SOUND_BANKS_ALL ((1 << SOUND_BANK_COUNT) - 1)
|
||||
|
||||
#define SOUND_BANKS_FOREGROUND (\
|
||||
(1 << SOUND_BANK_ACTION) |\
|
||||
(1 << SOUND_BANK_VOICE) |\
|
||||
(1 << SOUND_BANK_MENU))
|
||||
(1 << SOUND_BANK_MENU) |\
|
||||
(1 << SOUND_BANK_CUSTOM_FOREGROUND_1) |\
|
||||
(1 << SOUND_BANK_CUSTOM_FOREGROUND_2) |\
|
||||
(1 << SOUND_BANK_CUSTOM_FOREGROUND_3))
|
||||
|
||||
#define SOUND_BANKS_BACKGROUND (SOUND_BANKS_ALL & ~SOUND_BANKS_FOREGROUND)
|
||||
#define SOUND_BANKS_DISABLED_DURING_INTRO_CUTSCENE (\
|
||||
(1 << SOUND_BANK_ENV) |\
|
||||
@@ -589,4 +601,6 @@ enum SoundBank {
|
||||
#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)
|
||||
|
||||
// Add defines for sounds using extra custom banks here!
|
||||
|
||||
#endif // SOUNDS_H
|
||||
|
||||
Submodule lib/libpl updated: cfc74e5898...f03352e5a2
BIN
lib/librtc.a
BIN
lib/librtc.a
Binary file not shown.
20
sm64.ld
20
sm64.ld
@@ -175,10 +175,9 @@ SECTIONS
|
||||
#ifdef LIBPL
|
||||
BUILD_DIR/lib/libpl*.o(.text*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(.text*);
|
||||
*ULTRALIB.a:*.o(.text*);
|
||||
*/libnustd.a:*.o(.text*);
|
||||
*/libgcc.a:*.o(.text*);
|
||||
*/librtc.a:*.o(.text*);
|
||||
*libgcc.a:*.o(.text*);
|
||||
*/libz.a:*.o(.text*);
|
||||
*/libhvqm2.a:*.o(.text*);
|
||||
lib/rspboot.o(.text*);
|
||||
@@ -198,9 +197,8 @@ SECTIONS
|
||||
#ifdef LIBPL
|
||||
BUILD_DIR/lib/libpl*.o(.*data*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(.data*);
|
||||
*ULTRALIB.a:*.o(.data*);
|
||||
*/libhvqm2.a:*.o(.data*);
|
||||
*/librtc.a:*.o(.data*);
|
||||
*/libz.a:*.o(.data*);
|
||||
#include "rspdata.inc.ld"
|
||||
BUILD_DIR/lib/aspMain.o(.data*);
|
||||
@@ -217,9 +215,8 @@ SECTIONS
|
||||
#ifdef LIBPL
|
||||
BUILD_DIR/lib/libpl*.o(.rodata*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(.rodata*);
|
||||
*/libgcc.a:*.o(.rodata*);
|
||||
*/librtc.a:*.o(.rodata*);
|
||||
*ULTRALIB.a:*.o(.rodata*);
|
||||
*libgcc.a:*.o(.rodata*);
|
||||
*/libz.a:*.o(.rodata*);
|
||||
|
||||
lib/PR/hvqm/hvqm2sp1.o(.rodata*);
|
||||
@@ -237,11 +234,10 @@ SECTIONS
|
||||
#ifdef LIBPL
|
||||
BUILD_DIR/lib/libpl*.o(.*bss*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(COMMON);
|
||||
*/ULTRALIB.a:*.o(.scommon);
|
||||
*/ULTRALIB.a:*.o(.*bss*);
|
||||
*ULTRALIB.a:*.o(COMMON);
|
||||
*ULTRALIB.a:*.o(.scommon);
|
||||
*ULTRALIB.a:*.o(.*bss*);
|
||||
*/libhvqm2.a:*.o(.bss*);
|
||||
*/librtc.a:*.o(.bss*);
|
||||
*/libz.a:*.o(.bss*);
|
||||
. = ALIGN(0x8);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ seq_setmutescale 0
|
||||
seq_setvol 127
|
||||
#endif
|
||||
seq_settempo 120
|
||||
seq_initchannels 0x3ff
|
||||
seq_initchannels 0xffff
|
||||
seq_startchannel 0, .channel0
|
||||
seq_startchannel 1, .channel1
|
||||
seq_startchannel 2, .channel2
|
||||
@@ -23,6 +23,12 @@ seq_startchannel 6, .channel6
|
||||
seq_startchannel 7, .channel7
|
||||
seq_startchannel 8, .channel38
|
||||
seq_startchannel 9, .channel59
|
||||
seq_startchannel 10, .channelA
|
||||
seq_startchannel 11, .channelB
|
||||
seq_startchannel 12, .channelC
|
||||
seq_startchannel 13, .channelD
|
||||
seq_startchannel 14, .channelE
|
||||
seq_startchannel 15, .channelF
|
||||
.seq_loop:
|
||||
seq_delay 20000
|
||||
seq_jump .seq_loop
|
||||
@@ -71,6 +77,72 @@ chan_stereoheadseteffects 1
|
||||
chan_setdyntable .channel59_table
|
||||
chan_jump .main_loop_023589
|
||||
|
||||
.channelA:
|
||||
chan_largenoteson
|
||||
chan_setinstr 0
|
||||
chan_setpanmix 127
|
||||
chan_setnotepriority 14
|
||||
chan_setval 0
|
||||
chan_iowriteval 5
|
||||
chan_stereoheadseteffects 1
|
||||
chan_setdyntable .channelA_table
|
||||
chan_jump .main_loop_023589
|
||||
|
||||
.channelB:
|
||||
chan_largenoteson
|
||||
chan_setinstr 0
|
||||
chan_setpanmix 127
|
||||
chan_setnotepriority 14
|
||||
chan_setval 0
|
||||
chan_iowriteval 5
|
||||
chan_stereoheadseteffects 1
|
||||
chan_setdyntable .channelB_table
|
||||
chan_jump .main_loop_023589
|
||||
|
||||
.channelC:
|
||||
chan_largenoteson
|
||||
chan_setinstr 0
|
||||
chan_setpanmix 127
|
||||
chan_setnotepriority 14
|
||||
chan_setval 0
|
||||
chan_iowriteval 5
|
||||
chan_stereoheadseteffects 1
|
||||
chan_setdyntable .channelC_table
|
||||
chan_jump .main_loop_023589
|
||||
|
||||
.channelD:
|
||||
chan_largenoteson
|
||||
chan_setinstr 0
|
||||
chan_setpanmix 127
|
||||
chan_setnotepriority 14
|
||||
chan_setval 0
|
||||
chan_iowriteval 5
|
||||
chan_stereoheadseteffects 1
|
||||
chan_setdyntable .channelD_table
|
||||
chan_jump .main_loop_023589
|
||||
|
||||
.channelE:
|
||||
chan_largenoteson
|
||||
chan_setinstr 0
|
||||
chan_setpanmix 127
|
||||
chan_setnotepriority 14
|
||||
chan_setval 0
|
||||
chan_iowriteval 5
|
||||
chan_stereoheadseteffects 1
|
||||
chan_setdyntable .channelE_table
|
||||
chan_jump .main_loop_023589
|
||||
|
||||
.channelF:
|
||||
chan_largenoteson
|
||||
chan_setinstr 0
|
||||
chan_setpanmix 127
|
||||
chan_setnotepriority 14
|
||||
chan_setval 0
|
||||
chan_iowriteval 5
|
||||
chan_stereoheadseteffects 1
|
||||
chan_setdyntable .channelF_table
|
||||
chan_jump .main_loop_023589
|
||||
|
||||
// Main loop for standard, non-continuous sound effects
|
||||
.main_loop_023589:
|
||||
chan_hang
|
||||
@@ -7903,6 +7975,31 @@ layer_note0 38, 0x3, 127, 127
|
||||
layer_delay 0x2a
|
||||
layer_jump .layer_32B7
|
||||
|
||||
|
||||
.channelA_table:
|
||||
// Add custom sounds for Channel A here!
|
||||
|
||||
|
||||
.channelB_table:
|
||||
// Add custom sounds for Channel B here!
|
||||
|
||||
|
||||
.channelC_table:
|
||||
// Add custom sounds for Channel C here!
|
||||
|
||||
|
||||
.channelD_table:
|
||||
// Add custom sounds for Channel D here!
|
||||
|
||||
|
||||
.channelE_table:
|
||||
// Add custom sounds for Channel E here!
|
||||
|
||||
|
||||
.channelF_table:
|
||||
// Add custom sounds for Channel F here!
|
||||
|
||||
|
||||
.align 2, 0
|
||||
.envelope_32C4:
|
||||
envelope_line 7 20000
|
||||
|
||||
@@ -313,10 +313,10 @@ STATIC_ASSERT(ARRAY_COUNT(sBackgroundMusicDefaultVolume) == SEQ_COUNT,
|
||||
|
||||
u8 sCurrentBackgroundMusicSeqId = SEQUENCE_NONE;
|
||||
u8 sMusicDynamicDelay = 0;
|
||||
u8 sSoundBankUsedListBack[SOUND_BANK_COUNT] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
u8 sSoundBankFreeListFront[SOUND_BANK_COUNT] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
|
||||
u8 sNumSoundsInBank[SOUND_BANK_COUNT] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // only used for debugging
|
||||
u8 sMaxChannelsForSoundBank[SOUND_BANK_COUNT] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
|
||||
u8 sSoundBankUsedListBack[SOUND_BANK_COUNT] = {[0 ... SOUND_BANK_COUNT-1] = 0};
|
||||
u8 sSoundBankFreeListFront[SOUND_BANK_COUNT] = {[0 ... SOUND_BANK_COUNT-1] = 1};
|
||||
u8 sNumSoundsInBank[SOUND_BANK_COUNT] = {[0 ... SOUND_BANK_COUNT-1] = 0}; // only used for debugging
|
||||
u8 sMaxChannelsForSoundBank[SOUND_BANK_COUNT] = {[0 ... SOUND_BANK_COUNT-1] = 1};
|
||||
|
||||
// sBackgroundMusicMaxTargetVolume and sBackgroundMusicTargetVolume use the 0x80
|
||||
// bit to indicate that they are set, and the rest of the bits for the actual value
|
||||
@@ -347,8 +347,7 @@ struct UnkStruct80343D00 D_SH_80343D00;
|
||||
#endif
|
||||
|
||||
struct Sound sSoundRequests[0x100];
|
||||
// Curiously, this has size 3, despite SEQUENCE_PLAYERS == 4 on EU
|
||||
struct ChannelVolumeScaleFade D_80360928[3][CHANNELS_MAX];
|
||||
struct ChannelVolumeScaleFade D_80360928[SEQUENCE_PLAYERS][CHANNELS_MAX];
|
||||
u8 sUsedChannelsForSoundBank[SOUND_BANK_COUNT];
|
||||
u8 sCurrentSound[SOUND_BANK_COUNT][MAX_CHANNELS_PER_SOUND_BANK]; // index into sSoundBanks
|
||||
|
||||
@@ -1341,12 +1340,7 @@ static void update_game_sound(void) {
|
||||
get_sound_reverb(bank, soundIndex, channelIndex);
|
||||
#endif
|
||||
break;
|
||||
case SOUND_BANK_GENERAL:
|
||||
case SOUND_BANK_ENV:
|
||||
case SOUND_BANK_OBJ:
|
||||
case SOUND_BANK_AIR:
|
||||
case SOUND_BANK_GENERAL2:
|
||||
case SOUND_BANK_OBJ2:
|
||||
default:
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
func_802ad770(0x05020000 | ((channelIndex & 0xff) << 8),
|
||||
get_sound_reverb(bank, soundIndex, channelIndex));
|
||||
@@ -1507,12 +1501,7 @@ static void update_game_sound(void) {
|
||||
get_sound_reverb(bank, soundIndex, channelIndex);
|
||||
#endif
|
||||
break;
|
||||
case SOUND_BANK_GENERAL:
|
||||
case SOUND_BANK_ENV:
|
||||
case SOUND_BANK_OBJ:
|
||||
case SOUND_BANK_AIR:
|
||||
case SOUND_BANK_GENERAL2:
|
||||
case SOUND_BANK_OBJ2:
|
||||
default:
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
func_802ad770(0x05020000 | ((channelIndex & 0xff) << 8),
|
||||
get_sound_reverb(bank, soundIndex, channelIndex));
|
||||
@@ -1952,7 +1941,7 @@ void sound_init(void) {
|
||||
|
||||
for (i = 0; i < SOUND_BANK_COUNT; i++) {
|
||||
// Set each sound in the bank to STOPPED
|
||||
for (j = 0; j < 40; j++) {
|
||||
for (j = 0; j < ARRAY_COUNT(sSoundBanks[0]); j++) {
|
||||
sSoundBanks[i][j].soundStatus = SOUND_STATUS_STOPPED;
|
||||
}
|
||||
|
||||
@@ -1972,7 +1961,7 @@ void sound_init(void) {
|
||||
sSoundBanks[i][0].next = 0xff;
|
||||
|
||||
// Set free list to contain every sound slot
|
||||
for (j = 1; j < 40 - 1; j++) {
|
||||
for (j = 1; j < ARRAY_COUNT(sSoundBanks[0]) - 1; j++) {
|
||||
sSoundBanks[i][j].prev = j - 1;
|
||||
sSoundBanks[i][j].next = j + 1;
|
||||
}
|
||||
@@ -1980,7 +1969,7 @@ void sound_init(void) {
|
||||
sSoundBanks[i][j].next = 0xff;
|
||||
}
|
||||
|
||||
for (j = 0; j < 3; j++) {
|
||||
for (j = 0; j < SEQUENCE_PLAYERS; j++) {
|
||||
for (i = 0; i < CHANNELS_MAX; i++) {
|
||||
D_80360928[j][i].remainingFrames = 0;
|
||||
}
|
||||
@@ -2371,9 +2360,9 @@ void play_secondary_music(u8 seqId, u8 bgMusicVolume, u8 volume, u16 fadeTimer)
|
||||
|
||||
/**
|
||||
* Called from threads: thread5_game_loop
|
||||
* Seems to be related to music fading based on position, such as sleeping Piranha Plants, BBH Merry-Go-Round, and Endless Stairs
|
||||
* Plays the primary music and stops playing the secondary music. Call it to cancel the above function.
|
||||
*/
|
||||
void func_80321080(u16 fadeTimer) {
|
||||
void stop_secondary_music(u16 fadeTimer) {
|
||||
if (sBackgroundMusicTargetVolume != TARGET_VOLUME_UNSET) {
|
||||
sBackgroundMusicTargetVolume = TARGET_VOLUME_UNSET;
|
||||
D_80332120 = 0;
|
||||
|
||||
@@ -62,7 +62,7 @@ void fadeout_background_music(u16 seqId, u16 fadeOut);
|
||||
void drop_queued_background_music(void);
|
||||
u32 get_current_background_music(void);
|
||||
void play_secondary_music(u8 seqId, u8 bgMusicVolume, u8 volume, u16 fadeTimer);
|
||||
void func_80321080(u16 fadeTimer);
|
||||
void stop_secondary_music(u16 fadeTimer);
|
||||
void func_803210D4(u16 fadeOutTime);
|
||||
void play_course_clear(s32 isKey);
|
||||
void play_peachs_jingle(void);
|
||||
|
||||
@@ -1062,6 +1062,7 @@ void init_reverb_us(s32 presetId) {
|
||||
betterReverbPreset = &gBetterReverbSettings[0];
|
||||
}
|
||||
|
||||
activeBetterReverbPreset = gBetterReverbPresetValue;
|
||||
betterReverbLightweight = betterReverbPreset->useLightweightSettings;
|
||||
betterReverbDownsampleRate = betterReverbPreset->downsampleRate;
|
||||
monoReverb = betterReverbPreset->isMono;
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#ifdef BETTER_REVERB
|
||||
// Do not touch these values manually, unless you want potential for problems.
|
||||
u8 gBetterReverbPresetValue = 0;
|
||||
u8 activeBetterReverbPreset = 0;
|
||||
u8 toggleBetterReverb = FALSE;
|
||||
u8 betterReverbLightweight = FALSE;
|
||||
u8 monoReverb;
|
||||
|
||||
@@ -55,6 +55,7 @@ enum ChannelIndexes {
|
||||
|
||||
extern u8 toggleBetterReverb;
|
||||
extern u8 gBetterReverbPresetValue;
|
||||
extern u8 activeBetterReverbPreset;
|
||||
extern u8 betterReverbLightweight;
|
||||
extern s8 betterReverbDownsampleRate;
|
||||
extern u8 monoReverb;
|
||||
|
||||
@@ -523,8 +523,6 @@ static void level_cmd_create_warp_node(void) {
|
||||
warpNode->node.destArea = CMD_GET(u8, 4);
|
||||
warpNode->node.destNode = CMD_GET(u8, 5);
|
||||
|
||||
warpNode->object = NULL;
|
||||
|
||||
warpNode->next = gAreas[sCurrAreaIndex].warpNodes;
|
||||
gAreas[sCurrAreaIndex].warpNodes = warpNode;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user