summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorChristopher Leggett <chris@leggett.dev>2023-01-19 03:50:50 -0500
committerGitHub <noreply@github.com>2023-01-19 03:50:50 -0500
commita335aba98729b1933c439f6d5d4939df4fb12708 (patch)
tree4d1ccd5e9154aec2773bab59cccefcec04e16a29 /soh/src/code
parentedceb2d460c2c24b578a496688d8fa9418ca7dfb (diff)
Adds option for showing sequence names on the overlay (#2237)
* Adds option for showing sequence names on the overlay Allows sequences to appear on the overlay in the bottom right corner for a few seconds whenever a new one is loaded into the primary sequence player. This means it does not apply to fanfares or enemy bgm. Fanfares I chose not to display because it would cause a lot of text to display back to back in some areas, and enemy bgm would have some technical challenges with this due to the way it loads. Mainly because the Lost Woods music would load in Goron City the same way (as well as the opposite). * Fixes crash when a sequence without a name is attempted to be displayed. * Removes accidentally committed CMakeSettings.json * Updates CVar_GetS32 to CVarGetInteger
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/audio_load.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/soh/src/code/audio_load.c b/soh/src/code/audio_load.c
index 7883aa405..03542f84f 100644
--- a/soh/src/code/audio_load.c
+++ b/soh/src/code/audio_load.c
@@ -612,6 +612,12 @@ s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
seqPlayer->playerIdx = playerIdx;
AudioSeq_SkipForwardSequence(seqPlayer);
//! @bug missing return (but the return value is not used so it's not UB)
+ if (CVarGetInteger("gSeqNameOverlay", 0) && playerIdx == SEQ_PLAYER_BGM_MAIN) {
+ const char* sequenceName = SfxEditor_GetSequenceName(seqId);
+ if (sequenceName != NULL) {
+ Overlay_DisplayText(5.0f, sequenceName);
+ }
+ }
}
u8* AudioLoad_SyncLoadSeq(s32 seqId) {