mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(sound): add SI2::GetSoundKitID
This commit is contained in:
parent
e437d89d4f
commit
0998e542a3
@ -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)) {
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user