mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 08:42: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];
|
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) {
|
int32_t SI2::Init(int32_t a1) {
|
||||||
// TODO
|
// TODO
|
||||||
// if (CmdLineGetBool(26)) {
|
// if (CmdLineGetBool(26)) {
|
||||||
|
|||||||
@ -2,10 +2,9 @@
|
|||||||
#define SOUND_SI2_HPP
|
#define SOUND_SI2_HPP
|
||||||
|
|
||||||
#include "sound/SI2Script.hpp"
|
#include "sound/SI2Script.hpp"
|
||||||
#include "storm/hash/Hashkey.hpp"
|
|
||||||
#include "storm/hash/TSHashTable.hpp"
|
|
||||||
#include "ui/Types.hpp"
|
#include "ui/Types.hpp"
|
||||||
#include <storm/Array.hpp>
|
#include <storm/Array.hpp>
|
||||||
|
#include <storm/Hash.hpp>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
class SOUNDKITDEF;
|
class SOUNDKITDEF;
|
||||||
@ -20,6 +19,7 @@ class SI2 {
|
|||||||
|
|
||||||
// Static functions
|
// Static functions
|
||||||
static SOUNDKITDEF* GetSoundKitDef(int32_t id);
|
static SOUNDKITDEF* GetSoundKitDef(int32_t id);
|
||||||
|
static int32_t GetSoundKitID(const char* name);
|
||||||
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();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user