Sound effect tables now support up to 255 sounds instead of 128 (#465)

This commit is contained in:
Gregory Heskett authored and GitHub committed 2022-09-21 18:51:31 -05:00
1 parent 1af9f2b94a
commit c0e00beaf7
2 files changed
+9 -7

No files matched your search

+2
View File
@@ -7,6 +7,7 @@
#include "external.h"
#include "playback.h"
#include "synthesis.h"
#include "game/debug.h"
#include "game/main.h"
#include "game/level_update.h"
#include "game/object_list_processor.h"
@@ -696,6 +697,7 @@ struct SPTask *create_next_audio_frame_task(void) {
* Called from threads: thread5_game_loop
*/
void play_sound(s32 soundBits, f32 *pos) {
assert(((soundBits & SOUNDARGS_MASK_SOUNDID) >> SOUNDARGS_SHIFT_SOUNDID) != 0xff, "Sfx tables do not support a sound id of 0xff!");
sSoundRequests[sSoundRequestCount].soundBits = soundBits;
sSoundRequests[sSoundRequestCount].position = pos;
sSoundRequestCount++;