feat(sound): add SI2::GetSoundKitDef

This commit is contained in:
fallenoak 2025-11-22 13:35:16 -06:00
parent 55e67b0dbf
commit e437d89d4f
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 9 additions and 0 deletions

View File

@ -9,6 +9,14 @@
TSGrowableArray<SOUNDKITDEF*> SI2::s_SoundKitDefs;
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) {
// TODO
// if (CmdLineGetBool(26)) {

View File

@ -19,6 +19,7 @@ class SI2 {
static TSHashTable<SOUNDKITLOOKUP, HASHKEY_CONSTSTRI> s_SoundKitLookupTable;
// Static functions
static SOUNDKITDEF* GetSoundKitDef(int32_t id);
static int32_t Init(int32_t a1);
static void InitSoundKitDefs();
static void InitSoundKitGroups();