Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash sound effect #841

Open
wants to merge 6 commits into
base: develop/3.0.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/sounds.h
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ enum SoundBank {
#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)
#define SOUND_MENU_CRITICAL_ERROR SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x40, 0xFF, SOUND_DISCRETE)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment with the hex for this, to be consistent with the other sounds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hex in general within that file should be removed to be consistent with the repo. Those addresses don’t even line up with anything since they’re from decomp.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind I realize it’s just a magic number not an address lmao


// 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.
Expand Down
36 changes: 36 additions & 0 deletions sound/sequences/00_sound_player.s
Original file line number Diff line number Diff line change
Expand Up @@ -6986,6 +6986,42 @@ sound_ref .sound_menu_power_meter
sound_ref .sound_menu_camera_buzz
sound_ref .sound_menu_camera_turn

// Crash screen error sfx

sound_ref .sound_menu_critical_error
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not have any whitespace above it; I can see this very easily causing problems for people. (Just add that comment to the same sound_ref line.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.


.envelope_critical_error:
envelope_line 1 32760
envelope_line 128 0
envelope_line 500 500
envelope_goto 4
Comment on lines +6993 to +6997
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This envelope is extremely scuffed. The 500 500 line is taking the sound from 0 and actually adding to it first off (so just remove that line). Secondly, that goto line is very bad news; please use a hang for that instead.

Also this should be moved to the bottom of the file, where envelopes go.


.layer_critical_error_0:
layer_note1 3, 0x3f, 115
layer_end

.layer_critical_error_1:
layer_note1 15, 0x3f, 115
layer_end

.layer_critical_error_2:
layer_note1 34, 0x3f, 115
layer_end

.layer_critical_error_3:
layer_note1 39, 0x3f, 115
layer_end
Comment on lines +6999 to +7013
Copy link
Collaborator

@gheskett gheskett Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move these below the channel definition, for consistency with the rest of the file. Also given the jumpscare nature of this sound, I'd lower the velocities on these just a bit (like 103 maybe? Might need to see a video example or something that compares against the old sound in a proper gameplay context).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s not that loud, and is especially less jumpscare than the current sound.


.sound_menu_critical_error:
chan_setbank 9
chan_setinstr 0
chan_setenvelope .envelope_critical_error
chan_setlayer 0, .layer_critical_error_0
chan_setlayer 1, .layer_critical_error_1
chan_setlayer 2, .layer_critical_error_2
chan_setlayer 3, .layer_critical_error_3
chan_end

.sound_menu_change_select:
chan_setbank 9
chan_setinstr 1
Expand Down
2 changes: 1 addition & 1 deletion src/game/crash_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ void thread2_crash_screen(UNUSED void *arg) {
stop_background_music(sBackgroundMusicQueue[0].seqId);
audio_signal_game_loop_tick();
crash_screen_sleep(200);
play_sound(SOUND_MARIO_WAAAOOOW, gGlobalSoundSource);
play_sound(SOUND_MENU_CRITICAL_ERROR, gGlobalSoundSource);
audio_signal_game_loop_tick();
crash_screen_sleep(200);
continue;
Expand Down
6 changes: 0 additions & 6 deletions src/game/game_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,12 +831,6 @@ void thread5_game_loop(UNUSED void *arg) {
// amount of free space remaining.
print_text_fmt_int(180, 20, "BUF %d", gGfxPoolEnd - (u8 *) gDisplayListHead);
}
#endif
#if 0
if (gPlayer1Controller->buttonPressed & L_TRIG) {
osStartThread(&hvqmThread);
osRecvMesg(&gDmaMesgQueue, NULL, OS_MESG_BLOCK);
}
#endif
}
}