feat(sound): use better name for static

This commit is contained in:
fallenoak 2025-11-29 11:50:00 -06:00
parent 965a85c8ef
commit 10c17fefe7
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 5 additions and 5 deletions

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");

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);