#pragma once #include "RE/B/BSScript_Variable.h" #include "RE/B/BSTArray.h" #include "RE/M/MemoryManager.h" namespace RE { namespace BSScript { class IVirtualMachine; template class ArrayWrapper { public: ArrayWrapper() = delete; F4_HEAP_REDEFINE_NEW(ArrayWrapper); private: // members Variable wrappedVar; // 00 }; static_assert(sizeof(ArrayWrapper) == 0x10); template <> class ArrayWrapper { public: ArrayWrapper() = delete; ArrayWrapper(BSScrapArray& a_copy, IVirtualMachine& a_vm) { ReplaceArray(a_copy, a_vm); } F4_HEAP_REDEFINE_NEW(ArrayWrapper); void ReplaceArray(BSScrapArray& a_copy, IVirtualMachine& a_vm) { using func_t = decltype(&ArrayWrapper::ReplaceArray); static REL::Relocation func{ ID::BSScript_ArrayWrapper::ReplaceArray }; return func(this, a_copy, a_vm); } private: // members Variable wrappedVar; // 00 }; static_assert(sizeof(ArrayWrapper) == 0x10); } }