core: Add Insurgency support for amd64 Windows (#1295)

* Add basic Insurgency support on Windows x64

This allows SourceMod to load on x64 Insurgency. There are still a lot of variable truncation warnings that have to be dealt with.

* Fix 32bit builds

* Compile MySQL extension as well

The hack for __iob_func being removed from the core runtime, but required by the old mysql we're building against can be simplified a lot due to the `_ReturnAddress` intrinsic available since MSVC 2015.

* Don't include the offset we want to extract in the signature
This commit is contained in:
peace-maker
2020-08-06 19:53:06 -07:00
committed by GitHub
parent c5619f887d
commit 510bd261f8
13 changed files with 117 additions and 83 deletions
+5
View File
@@ -66,7 +66,12 @@ void InitializeValveGlobals()
{
return;
}
#ifdef PLATFORM_X86
g_ppGameRules = *reinterpret_cast<void ***>(addr + offset);
#else
int32_t varOffset = *(int32_t *) ((unsigned char *) addr + offset);
g_ppGameRules = *reinterpret_cast<void ***>((unsigned char *) addr + offset + sizeof(int32_t) + varOffset);
#endif
}
}