From cc33d6171bae397cffdb9d4ef9adb53ee058986c Mon Sep 17 00:00:00 2001 From: Daniel Walls Date: Wed, 18 Jun 2025 20:16:25 -0700 Subject: [PATCH] Add config options for removing bard phoneme audio to save ROM space (#7155) --- data/sound_data.s | 1 + include/config/general.h | 1 + sound/direct_sound_data.inc | 60 ++++++++++++++++++ .../direct_sound_samples/phonemes/shared.aif | Bin 0 -> 54 bytes 4 files changed, 62 insertions(+) create mode 100644 sound/direct_sound_samples/phonemes/shared.aif diff --git a/data/sound_data.s b/data/sound_data.s index 39bef4b332..d1951ecc7c 100644 --- a/data/sound_data.s +++ b/data/sound_data.s @@ -2,6 +2,7 @@ .include "asm/macros/m4a.inc" .include "asm/macros/music_voice.inc" + .include "include/config/general.h" .include "include/config/pokemon.h" .include "sound/voice_groups.inc" .include "sound/keysplit_tables.inc" diff --git a/include/config/general.h b/include/config/general.h index 1bb70ce00d..db01fd22f9 100644 --- a/include/config/general.h +++ b/include/config/general.h @@ -73,6 +73,7 @@ #define COMPETITIVE_PARTY_SYNTAX TRUE // If TRUE, parties are defined in "competitive syntax". #define AUTO_SCROLL_TEXT FALSE // If TRUE, text will automatically scroll to the next line after NUM_FRAMES_AUTO_SCROLL_DELAY. Players can still press A_BUTTON or B_BUTTON to scroll on their own. #define NUM_FRAMES_AUTO_SCROLL_DELAY 49 +#define PHONEMES_SHARED FALSE // If TRUE, bard phonemes all reference the same sound (sound/direct_sound_samples/phonemes/shared.bin) to save ROM space. // Measurement system constants to be used for UNITS #define UNITS_IMPERIAL 0 // Inches, feet, pounds diff --git a/sound/direct_sound_data.inc b/sound/direct_sound_data.inc index 0e4980667c..6b345df53c 100644 --- a/sound/direct_sound_data.inc +++ b/sound/direct_sound_data.inc @@ -6172,6 +6172,64 @@ DirectSoundWaveData_sc88pro_nylon_str_guitar:: DirectSoundWaveData_sd90_special_scream_drive:: .incbin "sound/direct_sound_samples/sd90_special_scream_drive.bin" + +.if PHONEMES_SHARED == TRUE + .align 2 +DirectSoundWaveData_Phoneme_1:: +DirectSoundWaveData_Phoneme_2:: +DirectSoundWaveData_Phoneme_3:: +DirectSoundWaveData_Phoneme_4:: +DirectSoundWaveData_Phoneme_5:: +DirectSoundWaveData_Phoneme_6:: +DirectSoundWaveData_Phoneme_7:: +DirectSoundWaveData_Phoneme_8:: +DirectSoundWaveData_Phoneme_9:: +DirectSoundWaveData_Phoneme_10:: +DirectSoundWaveData_Phoneme_11:: +DirectSoundWaveData_Phoneme_12:: +DirectSoundWaveData_Phoneme_13:: +DirectSoundWaveData_Phoneme_14:: +DirectSoundWaveData_Phoneme_15:: +DirectSoundWaveData_Phoneme_16:: +DirectSoundWaveData_Phoneme_17:: +DirectSoundWaveData_Phoneme_18:: +DirectSoundWaveData_Phoneme_19:: +DirectSoundWaveData_Phoneme_20:: +DirectSoundWaveData_Phoneme_21:: +DirectSoundWaveData_Phoneme_22:: +DirectSoundWaveData_Phoneme_23:: +DirectSoundWaveData_Phoneme_24:: +DirectSoundWaveData_Phoneme_25:: +DirectSoundWaveData_Phoneme_26:: +DirectSoundWaveData_Phoneme_27:: +DirectSoundWaveData_Phoneme_28:: +DirectSoundWaveData_Phoneme_29:: +DirectSoundWaveData_Phoneme_30:: +DirectSoundWaveData_Phoneme_31:: +DirectSoundWaveData_Phoneme_32:: +DirectSoundWaveData_Phoneme_33:: +DirectSoundWaveData_Phoneme_34:: +DirectSoundWaveData_Phoneme_35:: +DirectSoundWaveData_Phoneme_36:: +DirectSoundWaveData_Phoneme_37:: +DirectSoundWaveData_Phoneme_38:: +DirectSoundWaveData_Phoneme_39:: +DirectSoundWaveData_Phoneme_40:: +DirectSoundWaveData_Phoneme_41:: +DirectSoundWaveData_Phoneme_42:: +DirectSoundWaveData_Phoneme_43:: +DirectSoundWaveData_Phoneme_44:: +DirectSoundWaveData_Phoneme_45:: +DirectSoundWaveData_Phoneme_46:: +DirectSoundWaveData_Phoneme_47:: +DirectSoundWaveData_Phoneme_48:: +DirectSoundWaveData_Phoneme_49:: +DirectSoundWaveData_Phoneme_50:: +DirectSoundWaveData_Phoneme_51:: + .incbin "sound/direct_sound_samples/phonemes/shared.bin" + +.else @ PHONEMES_SHARED + .align 2 DirectSoundWaveData_Phoneme_1:: .incbin "sound/direct_sound_samples/phonemes/01.bin" @@ -6376,6 +6434,8 @@ DirectSoundWaveData_Phoneme_50:: DirectSoundWaveData_Phoneme_51:: .incbin "sound/direct_sound_samples/phonemes/51.bin" +.endif @ PHONEMES_SHARED + .align 2 DirectSoundWaveData_sc88pro_accordion_duplicate:: .incbin "sound/direct_sound_samples/sc88pro_accordion_duplicate.bin" diff --git a/sound/direct_sound_samples/phonemes/shared.aif b/sound/direct_sound_samples/phonemes/shared.aif new file mode 100644 index 0000000000000000000000000000000000000000..98c3a19651c140ae2997aa2c90df6cffe1a18fa6 GIT binary patch literal 54 vcmZ?s5AtPTV9;~)baQj|_XV+q7#M*h1A~AA-x?P%iy=7J55(et@E8~X+vx^I literal 0 HcmV?d00001