[Materials] Remove unnecessary workarounds

This commit is contained in:
momo5502 2017-05-29 10:56:35 +02:00
parent f6a242c6b7
commit d57bbbec18
2 changed files with 0 additions and 32 deletions

View File

@ -2,7 +2,6 @@
namespace Components
{
std::mutex Materials::TechsetMutex;
int Materials::ImageNameLength;
Utils::Hook Materials::ImageVersionCheckHook;
@ -151,22 +150,6 @@ namespace Components
#endif
void Materials::OverrideTechsets()
{
std::lock_guard<std::mutex> _(Materials::TechsetMutex);
Utils::Hook::Call<void()>(0x522D00)(); // Material_OverrideTechniqueSets
}
void Materials::MaterialSort()
{
std::lock_guard<std::mutex> _(Materials::TechsetMutex);
if (!*reinterpret_cast<bool*>(0x69F9AFD))
{
Utils::Hook::Call<void()>(0x523A20)(); // Material_Sort
}
}
Materials::Materials()
{
Materials::ImageNameLength = 7;
@ -189,18 +172,6 @@ namespace Components
// Debug material comparison
Utils::Hook::Set<void*>(0x523894, Materials::MaterialComparePrint);
// Don't compare remapped techsets
Utils::Hook::Set<BYTE>(0x523490, 0xEB);
Utils::Hook::Set<BYTE>(0x5234A0, 0xEB);
// Synchronize material sorting
//Utils::Hook(0x50AAFE, Materials::MaterialSort, HOOK_CALL).install()->quick();
// Synchronize techset remapping
//Utils::Hook(0x50AAD8, Materials::OverrideTechsets, HOOK_CALL).install()->quick();
//Utils::Hook(0x518BB8, Materials::OverrideTechsets, HOOK_CALL).install()->quick();
//Utils::Hook(0x5BC791, Materials::OverrideTechsets, HOOK_CALL).install()->quick();
#ifdef DEBUG
if (Flags::HasFlag("dump"))
{

View File

@ -15,7 +15,6 @@ namespace Components
static int FormatImagePath(char* buffer, size_t size, int, int, const char* image);
private:
static std::mutex TechsetMutex;
static int ImageNameLength;
static Utils::Hook ImageVersionCheckHook;
@ -34,7 +33,5 @@ namespace Components
#endif
static int MaterialComparePrint(Game::Material* m1, Game::Material* m2);
static void OverrideTechsets();
static void MaterialSort();
};
}