feat(sound): add SI2::GetSoundKitDef

This commit is contained in:
fallenoak committed 2025-11-22 13:35:16 -06:00
1 parent 55e67b0dbf
commit e437d89d4f
2 files changed
+9

No files matched your search

+8
View File
@@ -9,6 +9,14 @@
TSGrowableArray<SOUNDKITDEF*> SI2::s_SoundKitDefs; TSGrowableArray<SOUNDKITDEF*> SI2::s_SoundKitDefs;
TSHashTable<SOUNDKITLOOKUP, HASHKEY_CONSTSTRI> SI2::s_SoundKitLookupTable; TSHashTable<SOUNDKITLOOKUP, HASHKEY_CONSTSTRI> 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) { int32_t SI2::Init(int32_t a1) {
// TODO // TODO
// if (CmdLineGetBool(26)) { // if (CmdLineGetBool(26)) {
+1
View File
@@ -19,6 +19,7 @@ class SI2 {
static TSHashTable<SOUNDKITLOOKUP, HASHKEY_CONSTSTRI> s_SoundKitLookupTable; static TSHashTable<SOUNDKITLOOKUP, HASHKEY_CONSTSTRI> s_SoundKitLookupTable;
// Static functions // Static functions
static SOUNDKITDEF* GetSoundKitDef(int32_t id);
static int32_t Init(int32_t a1); static int32_t Init(int32_t a1);
static void InitSoundKitDefs(); static void InitSoundKitDefs();
static void InitSoundKitGroups(); static void InitSoundKitGroups();