mirror of
https://github.com/Haze1337/Sound-Manager.git
synced 2025-12-07 10:28:33 +00:00
Some oopsies
This commit is contained in:
parent
dc95c71688
commit
33827ca7a2
@ -9,7 +9,7 @@
|
|||||||
"windows"
|
"windows"
|
||||||
{
|
{
|
||||||
"signature" "soundscape_flush"
|
"signature" "soundscape_flush"
|
||||||
"read" "73"
|
"read" "93"
|
||||||
}
|
}
|
||||||
"windows64"
|
"windows64"
|
||||||
{
|
{
|
||||||
@ -74,11 +74,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// search "Shared activity collision" to find ActivityList_RegisterSharedActivity and the first function called inside is GetStringID
|
// search "Shared activity collision" to find ActivityList_RegisterSharedActivity and the first function called inside is GetStringID
|
||||||
// CHECKED 2025-02-19
|
// CHECKED 2025-02-20
|
||||||
"CStringRegistry::GetStringID"
|
"CStringRegistry::GetStringID"
|
||||||
{
|
{
|
||||||
"library" "server"
|
"library" "server"
|
||||||
"windows" "\x55\x8B\xEC\x8B\x45\x2A\x83\xEC\x08\x53"
|
"windows" "\x55\x8B\xEC\x83\xEC\x0C\x8B\x45\x2A\x89\x4D\x2A\x53\xBB\xFF\xFF\x00\x00"
|
||||||
"windows64" "\x48\x89\x5C\x24\x2A\x57\x48\x83\xEC\x30\x4C\x89\x7C\x24"
|
"windows64" "\x48\x89\x5C\x24\x2A\x57\x48\x83\xEC\x30\x4C\x89\x7C\x24"
|
||||||
"linux" "@_ZN15CStringRegistry11GetStringIDEPKc"
|
"linux" "@_ZN15CStringRegistry11GetStringIDEPKc"
|
||||||
"linux64" "@_ZN15CStringRegistry11GetStringIDEPKc"
|
"linux64" "@_ZN15CStringRegistry11GetStringIDEPKc"
|
||||||
@ -97,6 +97,15 @@
|
|||||||
"linux" "15"
|
"linux" "15"
|
||||||
"linux64" "24"
|
"linux64" "24"
|
||||||
}
|
}
|
||||||
|
// find in CSoundscapeSystem::GetSoundscapeIndex
|
||||||
|
// CHECKED 2025-02-20
|
||||||
|
"CSoundscapeSystem::m_soundscapes"
|
||||||
|
{
|
||||||
|
"windows" "12"
|
||||||
|
"windows64" "24"
|
||||||
|
"linux" "12"
|
||||||
|
"linux64" "24"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,6 +203,11 @@
|
|||||||
"windows" "16"
|
"windows" "16"
|
||||||
"linux" "17"
|
"linux" "17"
|
||||||
}
|
}
|
||||||
|
"CSoundscapeSystem::m_soundscapes"
|
||||||
|
{
|
||||||
|
"windows" "12"
|
||||||
|
"linux" "12"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,6 +39,7 @@ Address gP_SoundscapeSystem = Address_Null;
|
|||||||
Handle gH_AcceptInput = null;
|
Handle gH_AcceptInput = null;
|
||||||
Handle gH_GetPlayerSlot = null;
|
Handle gH_GetPlayerSlot = null;
|
||||||
Handle gH_GetStringID = null;
|
Handle gH_GetStringID = null;
|
||||||
|
int gI_m_soundscapesOffset = -1;
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
int gI_SilentSoundScape = -1;
|
int gI_SilentSoundScape = -1;
|
||||||
@ -248,6 +249,11 @@ void StartPrepSDKCall_GetStringID(Handle hGameData)
|
|||||||
SetFailState("Could not get address of CSoundscapeSystem pointer.");
|
SetFailState("Could not get address of CSoundscapeSystem pointer.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((gI_m_soundscapesOffset = GameConfGetOffset(hGameData, "CSoundscapeSystem::m_soundscapes")) == -1)
|
||||||
|
{
|
||||||
|
SetFailState("Could not get CSoundscapeSystem::m_soundscapes offset");
|
||||||
|
}
|
||||||
|
|
||||||
StartPrepSDKCall(SDKCall_Raw);
|
StartPrepSDKCall(SDKCall_Raw);
|
||||||
PrepSDKCall_SetFromConf(hGameData, SDKConf_Signature, "CStringRegistry::GetStringID");
|
PrepSDKCall_SetFromConf(hGameData, SDKConf_Signature, "CStringRegistry::GetStringID");
|
||||||
PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);
|
PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);
|
||||||
@ -261,7 +267,7 @@ void StartPrepSDKCall_GetStringID(Handle hGameData)
|
|||||||
|
|
||||||
int GetSoundscapeIndex(const char[] sString)
|
int GetSoundscapeIndex(const char[] sString)
|
||||||
{
|
{
|
||||||
return SDKCall(gH_GetStringID, gP_SoundscapeSystem + view_as<Address>(0xC), sString);
|
return SDKCall(gH_GetStringID, gP_SoundscapeSystem + view_as<Address>(gI_m_soundscapesOffset), sString);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnMapStart()
|
public void OnMapStart()
|
||||||
@ -354,7 +360,7 @@ void HookAcceptInput()
|
|||||||
int offset = GameConfGetOffset(hGameData, "AcceptInput");
|
int offset = GameConfGetOffset(hGameData, "AcceptInput");
|
||||||
delete hGameData;
|
delete hGameData;
|
||||||
|
|
||||||
if(offset == 0)
|
if(offset == -1)
|
||||||
{
|
{
|
||||||
SetFailState("Failed to load \"AcceptInput\", invalid offset.");
|
SetFailState("Failed to load \"AcceptInput\", invalid offset.");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user