From 50554c5bd06d0ee4de7833fe747f203e510238c2 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Sat, 22 Nov 2025 22:45:14 -0600 Subject: [PATCH] feat(sound): add SI2::s_SoundCategory --- src/sound/SI2.cpp | 21 +++++++++++++++++++++ src/sound/SI2.hpp | 1 + 2 files changed, 22 insertions(+) diff --git a/src/sound/SI2.cpp b/src/sound/SI2.cpp index 0e02e40..15fe9a8 100644 --- a/src/sound/SI2.cpp +++ b/src/sound/SI2.cpp @@ -9,6 +9,27 @@ TSGrowableArray SI2::s_SoundKitDefs; TSHashTable SI2::s_SoundKitLookupTable; +char SI2::s_SoundCategory[32][18] = { + "SFX", + "MUSIC", + "AMBIENCE", + "CINEMATIC", + "SCRIPTSOUND", + "SCRIPTMUSIC", + "RACIALCINEMATIC", + "SFX", + "SFX", + "SFX", + "SFX", + "SFX", + "SFX", + "SFX", + "SFX", + "SFX", + "SFX", + "SFX", +}; + SOUNDKITDEF* SI2::GetSoundKitDef(int32_t id) { if (id >= SI2::s_SoundKitDefs.Count() || id <= 0) { return nullptr; diff --git a/src/sound/SI2.hpp b/src/sound/SI2.hpp index aa16593..49fdc20 100644 --- a/src/sound/SI2.hpp +++ b/src/sound/SI2.hpp @@ -16,6 +16,7 @@ class SI2 { static FrameScript_Method s_ScriptFunctions[NUM_SCRIPT_FUNCTIONS_SI2]; static TSGrowableArray s_SoundKitDefs; static TSHashTable s_SoundKitLookupTable; + static char s_SoundCategory[32][18]; // Static functions static SOUNDKITDEF* GetSoundKitDef(int32_t id);