#pragma once #include "Wrapper.hpp" #include "Types.hpp" #include "Addresses.hpp" #include "../meta/meta.hpp" #include "../loader/Interface.hpp" #include #define GEODE_APPLY_MODIFY_FOR_FUNCTION(index, convention, className, functionName) \ using base##index = wrap::functionName; \ using derived##index = wrap::functionName; \ if constexpr (derived##index::uuid != nullptr && (void*)base##index::uuid != (void*)derived##index::uuid) { \ Interface::get()->logInfo( \ "Adding hook at function " #className "::" #functionName, \ Severity::Debug \ ); \ Interface::get()->addHook( \ #className "::" #functionName, \ (void*)addresses::address##index() \ ); \ } \ namespace geode::modifier { template class Modify; template class ModifyBase { public: // unordered_map idea ModifyBase() { Derived::apply(); } template friend class Modify; // explicit Modify(Property property) idea }; template class Modify { public: Modify() { static_assert(core::meta::always_false, "Custom Modify not implemented."); } }; #include }