feat(sound): add SI2::GetSoundKitID

This commit is contained in:
fallenoak 2025-11-22 13:37:48 -06:00
parent e437d89d4f
commit 0998e542a3
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 12 additions and 2 deletions

View File

@ -17,6 +17,16 @@ SOUNDKITDEF* SI2::GetSoundKitDef(int32_t id) {
return SI2::s_SoundKitDefs[id];
}
int32_t SI2::GetSoundKitID(const char* name) {
auto lookup = SI2::s_SoundKitLookupTable.Ptr(name);
if (lookup) {
return lookup->ID;
}
return 0;
}
int32_t SI2::Init(int32_t a1) {
// TODO
// if (CmdLineGetBool(26)) {

View File

@ -2,10 +2,9 @@
#define SOUND_SI2_HPP
#include "sound/SI2Script.hpp"
#include "storm/hash/Hashkey.hpp"
#include "storm/hash/TSHashTable.hpp"
#include "ui/Types.hpp"
#include <storm/Array.hpp>
#include <storm/Hash.hpp>
#include <cstdint>
class SOUNDKITDEF;
@ -20,6 +19,7 @@ class SI2 {
// Static functions
static SOUNDKITDEF* GetSoundKitDef(int32_t id);
static int32_t GetSoundKitID(const char* name);
static int32_t Init(int32_t a1);
static void InitSoundKitDefs();
static void InitSoundKitGroups();