Add SET_ECHO level script command + minor BETTER_REVERB refactoring (#591)

* Add SET_ECHO level script command + minor BETTER_REVERB refactoring

* Add Puppyprint debug page for trying out different BETTER_REVERB presets and configurations

Also fix a missing Puppyprint enum that was causing issues

* Modify Puppyprint BETTER_REVERB page + other minor improvements

* Swap order of RSP commands to allow reverb downsampling to sound more similar to that of without downsampling
This commit is contained in:
Gregory Heskett
2023-06-28 15:15:38 -04:00
committed by GitHub
parent e2cf2d5119
commit 37787dffc9
16 changed files with 688 additions and 70 deletions

View File

@@ -754,9 +754,9 @@ static void level_cmd_set_menu_music(void) {
#ifdef BETTER_REVERB
// Must come before set_background_music()
if (gIsConsole)
gBetterReverbPreset = CMD_GET(u8, 4);
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;
@@ -904,6 +904,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 (gIsConsole)
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,
@@ -970,6 +981,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) {