Implemented HookCalls/MakeCalls templates

* same as SafeWriteBatch, only accept address arrays due to no support
for list initialization in VS2010.
This commit is contained in:
NovaRain
2020-04-11 08:19:32 +08:00
parent 1f8b3636f3
commit 73ccba22bf
22 changed files with 334 additions and 331 deletions
+2 -2
View File
@@ -576,8 +576,8 @@ void SoundInit() {
if (int allowDShowSound = GetConfigInt("Sound", "AllowDShowSound", 0) > 0) {
MakeJump(0x4AD499, soundLoad_hack);
HookCall(0x44E80A, gmovie_play_hook_stop); // only play looping music
HookCall(0x445280, gmovie_play_hook_stop);
const DWORD gmoviePlayStopAddr[] = {0x44E80A, 0x445280};
HookCalls(gmovie_play_hook_stop, gmoviePlayStopAddr); // only play looping music
if (allowDShowSound > 1) {
HookCall(0x450851, gsound_background_play_hook);
}