diff --git a/src/sound/SI2.cpp b/src/sound/SI2.cpp index b3bd4ce..7bd8a56 100644 --- a/src/sound/SI2.cpp +++ b/src/sound/SI2.cpp @@ -9,6 +9,14 @@ TSGrowableArray SI2::s_SoundKitDefs; TSHashTable SI2::s_SoundKitLookupTable; +SOUNDKITDEF* SI2::GetSoundKitDef(int32_t id) { + if (id >= SI2::s_SoundKitDefs.Count() || id <= 0) { + return nullptr; + } + + return SI2::s_SoundKitDefs[id]; +} + int32_t SI2::Init(int32_t a1) { // TODO // if (CmdLineGetBool(26)) { diff --git a/src/sound/SI2.hpp b/src/sound/SI2.hpp index 3eb6ae9..9c78edd 100644 --- a/src/sound/SI2.hpp +++ b/src/sound/SI2.hpp @@ -19,6 +19,7 @@ class SI2 { static TSHashTable s_SoundKitLookupTable; // Static functions + static SOUNDKITDEF* GetSoundKitDef(int32_t id); static int32_t Init(int32_t a1); static void InitSoundKitDefs(); static void InitSoundKitGroups();