feat(sound): use better name for static

This commit is contained in:
fallenoak committed 2025-11-29 11:50:00 -06:00
1 parent 965a85c8ef
commit 10c17fefe7
2 files changed
+5 -5

No files matched your search

+4 -4
View File
@@ -13,7 +13,7 @@
TSGrowableArray<SOUNDKITDEF*> SI2::s_SoundKitDefs;
TSHashTable<SOUNDKITLOOKUP, HASHKEY_CONSTSTRI> SI2::s_SoundKitLookupTable;
char SI2::s_SoundCategory[32][18] = {
char SI2::s_ChannelGroupNames[32][18] = {
"SFX",
"MUSIC",
"AMBIENCE",
@@ -322,7 +322,7 @@ int32_t SI2::PlaySoundKit(int32_t id, int32_t a2, SOUNDKITOBJECT* object, SoundK
// TODO
if (!std::strcmp(SI2::s_SoundCategory[properties->m_type], "SFX")) {
if (!std::strcmp(SI2::s_ChannelGroupNames[properties->m_type], "SFX")) {
static auto enableSFXVar = CVar::Lookup("Sound_EnableSFX");
if (!enableSFXVar || !enableSFXVar->GetInt()) {
@@ -331,8 +331,8 @@ int32_t SI2::PlaySoundKit(int32_t id, int32_t a2, SOUNDKITOBJECT* object, SoundK
}
if (
!std::strcmp(SI2::s_SoundCategory[properties->m_type], "MUSIC")
|| !strcmp(SI2::s_SoundCategory[properties->m_type], "SCRIPTMUSIC")
!std::strcmp(SI2::s_ChannelGroupNames[properties->m_type], "MUSIC")
|| !strcmp(SI2::s_ChannelGroupNames[properties->m_type], "SCRIPTMUSIC")
) {
static auto enableMusicVar = CVar::Lookup("Sound_EnableMusic");
+1 -1
View File
@@ -18,7 +18,7 @@ class SI2 {
static FrameScript_Method s_ScriptFunctions[NUM_SCRIPT_FUNCTIONS_SI2];
static TSGrowableArray<SOUNDKITDEF*> s_SoundKitDefs;
static TSHashTable<SOUNDKITLOOKUP, HASHKEY_CONSTSTRI> s_SoundKitLookupTable;
static char s_SoundCategory[32][18];
static char s_ChannelGroupNames[32][18];
// Static functions
static int32_t CreditsMusicUpdate(const void* data, void* param);