Remove sound bank size table
It's literally useless and saves a step when adding extra sound ID's
This commit is contained in:
1 parent
93693e34e5
commit
6173fe01f2
1 file changed
+4
-17
+4
-17
@@ -324,17 +324,6 @@ 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 };
|
||||
|
||||
// Banks 2 and 7 both grew from 0x30 sounds to 0x40 in size in US.
|
||||
#ifdef VERSION_JP
|
||||
#define BANK27_SIZE 0x30
|
||||
#else
|
||||
#define BANK27_SIZE 0x40
|
||||
#endif
|
||||
u8 sNumSoundsPerBank[SOUND_BANK_COUNT] = {
|
||||
0x70, 0x30, BANK27_SIZE, 0x80, 0x20, 0x80, 0x20, BANK27_SIZE, 0x80, 0x80,
|
||||
};
|
||||
#undef BANK27_SIZE
|
||||
|
||||
// sBackgroundMusicMaxTargetVolume and sBackgroundMusicTargetVolume use the 0x80
|
||||
// bit to indicate that they are set, and the rest of the bits for the actual value
|
||||
#define TARGET_VOLUME_IS_PRESENT_FLAG 0x80
|
||||
@@ -814,17 +803,15 @@ void play_sound(s32 soundBits, f32 *pos) {
|
||||
* Called from threads: thread4_sound, thread5_game_loop (EU only)
|
||||
*/
|
||||
static void process_sound_request(u32 bits, f32 *pos) {
|
||||
u8 bank;
|
||||
u8 soundIndex;
|
||||
u8 counter = 0;
|
||||
u8 soundId;
|
||||
s32 bank;
|
||||
s32 soundIndex;
|
||||
s32 counter = 0;
|
||||
f32 dist;
|
||||
const f32 one = 1.0f;
|
||||
|
||||
bank = (bits & SOUNDARGS_MASK_BANK) >> SOUNDARGS_SHIFT_BANK;
|
||||
soundId = (bits & SOUNDARGS_MASK_SOUNDID) >> SOUNDARGS_SHIFT_SOUNDID;
|
||||
|
||||
if (soundId >= sNumSoundsPerBank[bank] || sSoundBankDisabled[bank]) {
|
||||
if (sSoundBankDisabled[bank]) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user