From d57bbbec182641199943c2ecc1e3f590d31c9271 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 29 May 2017 10:56:35 +0200 Subject: [PATCH] [Materials] Remove unnecessary workarounds --- src/Components/Modules/Materials.cpp | 29 ---------------------------- src/Components/Modules/Materials.hpp | 3 --- 2 files changed, 32 deletions(-) diff --git a/src/Components/Modules/Materials.cpp b/src/Components/Modules/Materials.cpp index e5cd5031..f8eb3ab4 100644 --- a/src/Components/Modules/Materials.cpp +++ b/src/Components/Modules/Materials.cpp @@ -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 _(Materials::TechsetMutex); - Utils::Hook::Call(0x522D00)(); // Material_OverrideTechniqueSets - } - - void Materials::MaterialSort() - { - std::lock_guard _(Materials::TechsetMutex); - - if (!*reinterpret_cast(0x69F9AFD)) - { - Utils::Hook::Call(0x523A20)(); // Material_Sort - } - } - Materials::Materials() { Materials::ImageNameLength = 7; @@ -189,18 +172,6 @@ namespace Components // Debug material comparison Utils::Hook::Set(0x523894, Materials::MaterialComparePrint); - // Don't compare remapped techsets - Utils::Hook::Set(0x523490, 0xEB); - Utils::Hook::Set(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")) { diff --git a/src/Components/Modules/Materials.hpp b/src/Components/Modules/Materials.hpp index f5204385..55d479fa 100644 --- a/src/Components/Modules/Materials.hpp +++ b/src/Components/Modules/Materials.hpp @@ -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(); }; }