diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 53d10aac4..9dcceea44 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -18,7 +18,7 @@ jobs: if: "!contains(github.event.head_commit.message, 'ci skip')" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Checkout submodules run: | @@ -28,32 +28,27 @@ jobs: # Install dependencies - name: Update apt repositories run: sudo apt-get update - - - name: Install GCC12 - shell: bash - run: | - sudo apt update - sudo apt install gcc-12 g++-12 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 110 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12 - + # Install xmake - name: Setup xmake uses: xmake-io/github-action-setup-xmake@v1 with: - xmake-version: '2.9.3' + xmake-version: '2.9.5' # Update xmake repository (in order to have the file that will be cached) - name: Update xmake repository run: xmake repo --update # Setup compilation mode and install project dependencies + # (continue-on-error + timeout is a temporary solution until sentry-native is fixed; shouldn't affect the building step) - name: Configure xmake and install dependencies - run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --yes + continue-on-error: true + run: timeout 15m xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --yes - # Build the game + # Build the server - name: Build - run: xmake - + run: xmake -y + # Create install #- name: Install # run: xmake install -o packaged diff --git a/.github/workflows/windows-playable-build.yml b/.github/workflows/windows-playable-build.yml new file mode 100644 index 000000000..18f6a42e4 --- /dev/null +++ b/.github/workflows/windows-playable-build.yml @@ -0,0 +1,100 @@ +name: Playable Skyrim Together Build + +on: + workflow_dispatch: + schedule: + # Every Friday at 1:00 p.m. UTC + - cron: '0 13 * * 5' + push: + branches: + - master + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + build: + strategy: + matrix: + os: [windows-latest] + arch: [x64] + mode: [release] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + with: + # We need full history in order to create a build version string (BuildInfo.h) + fetch-depth: 0 + + - name: Checkout submodules + run: | + git submodule sync --recursive + git submodule update --init --force --recursive --depth=1 + + - name: Cache xmake dependencies + uses: actions/cache@v4 + with: + path: ~/AppData/Local/.xmake/packages + key: ${{ runner.os }}-xmake-${{ hashFiles('**/xmake.lua') }} + + # Install xmake + - name: Setup xmake + uses: xmake-io/github-action-setup-xmake@v1 + with: + xmake-version: 2.9.5 + actions-cache-folder: '.xmake-cache' # This doesn't cache dependencies, only xmake itself + actions-cache-key: ${{ matrix.os }} + + - name: Configure xmake and install dependencies + run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --yes -vD + + # Build the game + - name: Build with xmake + run: xmake -y + + # Create distrib + - name: Output STR binaries via xmake + run: xmake install -o distrib + + # Building the Together UI + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: lts/iron + cache-dependency-path: Code/skyrim_ui/pnpm-lock.yaml + cache: 'pnpm' + + - name: Build the UI + run: | + pnpm --prefix Code/skyrim_ui/ install + pnpm --prefix Code/skyrim_ui/ deploy:production + + # Package everything, organize directories + + - name: Package binaries and assets + run: | + mkdir -p str-build/SkyrimTogetherReborn + mv build/windows/${{ matrix.arch }}/${{ matrix.mode }}/* str-build/SkyrimTogetherReborn + cp -Force -Recurse distrib/bin/* str-build/SkyrimTogetherReborn + cp -r Code/skyrim_ui/dist/UI str-build/SkyrimTogetherReborn + cp -r GameFiles/Skyrim/* str-build/ + + - name: Remove unnecessary build files + run: rm str-build/SkyrimTogetherReborn/*.pdb, str-build/SkyrimTogetherReborn/*.lib + + # Upload artifact + + - name: Store version string + run: echo "STR_VERSION=$(git describe --tags)" >> $env:GITHUB_ENV + + - name: Upload playable build + uses: actions/upload-artifact@v4 + with: + name: Skyrim Together Build (${{ env.STR_VERSION }}) + path: str-build/ diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 791ad91ed..5723e146c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -30,7 +30,7 @@ jobs: - name: Setup xmake uses: xmake-io/github-action-setup-xmake@v1 with: - xmake-version: '2.9.3' + xmake-version: '2.9.5' # Install node #- name: Setup nodejs diff --git a/Code/client/CrashHandler.cpp b/Code/client/CrashHandler.cpp index dfe707e3f..986dcb60c 100644 --- a/Code/client/CrashHandler.cpp +++ b/Code/client/CrashHandler.cpp @@ -1,3 +1,4 @@ +#include #include "CrashHandler.h" #include #include @@ -22,58 +23,120 @@ std::string SerializeTimePoint(const time_point& time, const std::string& format LONG WINAPI VectoredExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo) { - static int alreadycrashed = 0; + static int alreadyCrashed = 0; + auto retval = EXCEPTION_CONTINUE_SEARCH; - if (pExceptionInfo->ExceptionRecord->ExceptionCode == 0xC0000005 && alreadycrashed++ == 0) - { - spdlog::error("Crash occurred!"); - MINIDUMP_EXCEPTION_INFORMATION M; - char dumpPath[MAX_PATH]; - - M.ThreadId = GetCurrentThreadId(); - M.ExceptionPointers = pExceptionInfo; - M.ClientPointers = 0; - - std::ostringstream oss; - oss << "crash_" << SerializeTimePoint(std::chrono::system_clock::now(), "UTC_%Y-%m-%d_%H-%M-%S") << ".dmp"; - - GetModuleFileNameA(NULL, dumpPath, sizeof(dumpPath)); - std::filesystem::path modulePath(dumpPath); - auto subPath = modulePath.parent_path(); - - CrashHandler::RemovePreviousDump(subPath); - - subPath /= oss.str(); - - auto hDumpFile = CreateFileA(subPath.string().c_str(), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - // baseline settings from https://stackoverflow.com/a/63123214/5273909 - auto dumpSettings = MiniDumpWithDataSegs | MiniDumpWithProcessThreadData | MiniDumpWithHandleData | MiniDumpWithThreadInfo | - /* - //MiniDumpWithPrivateReadWriteMemory | // this one gens bad dump - MiniDumpWithUnloadedModules | - MiniDumpWithFullMemoryInfo | - MiniDumpWithTokenInformation | - MiniDumpWithPrivateWriteCopyMemory | - */ - 0; + // Serialize + static std::mutex singleThreaded; + const std::lock_guard lock{singleThreaded}; - MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hDumpFile, (MINIDUMP_TYPE)dumpSettings, (pExceptionInfo) ? &M : NULL, NULL, NULL); - - CloseHandle(hDumpFile); + // Check for severe, not continuable and not software-originated exception + if (pExceptionInfo->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && + alreadyCrashed++ == 0) + { + spdlog::critical (__FUNCTION__ ": crash occurred!"); + + spdlog::error(__FUNCTION__ ": exception code is {:x}, at address {}, flags {:x} ", + pExceptionInfo->ExceptionRecord->ExceptionCode, + pExceptionInfo->ExceptionRecord->ExceptionAddress, + pExceptionInfo->ExceptionRecord->ExceptionFlags); + +#if (IS_MASTER) + volatile static bool bMiniDump = false; +#else + volatile static bool bMiniDump = true; +#endif + if (bMiniDump) + { + HANDLE hDumpFile = NULL; + try + { + MINIDUMP_EXCEPTION_INFORMATION M; + char dumpPath[MAX_PATH]; + + M.ThreadId = GetCurrentThreadId(); + M.ExceptionPointers = pExceptionInfo; + M.ClientPointers = 0; + + std::ostringstream oss; + oss << "crash_" << SerializeTimePoint(std::chrono::system_clock::now(), "UTC_%Y-%m-%d_%H-%M-%S") + << ".dmp"; + + GetModuleFileNameA(NULL, dumpPath, sizeof(dumpPath)); + std::filesystem::path modulePath(dumpPath); + auto subPath = modulePath.parent_path(); + + CrashHandler::RemovePreviousDump(subPath); + + subPath /= oss.str(); + + hDumpFile = CreateFileA(subPath.string().c_str(), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, NULL); + + // baseline settings from https://stackoverflow.com/a/63123214/5273909 + auto dumpSettings = MiniDumpWithDataSegs | MiniDumpWithProcessThreadData | MiniDumpWithHandleData | + MiniDumpWithThreadInfo | + /* + //MiniDumpWithPrivateReadWriteMemory | // this one gens bad dump + MiniDumpWithUnloadedModules | + MiniDumpWithFullMemoryInfo | + MiniDumpWithTokenInformation | + MiniDumpWithPrivateWriteCopyMemory | + */ + 0; + + MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hDumpFile, (MINIDUMP_TYPE)dumpSettings, + (pExceptionInfo) ? &M : NULL, NULL, NULL); + } + catch (...) // Mini-dump is best effort only. + { + } + + if (!hDumpFile) + spdlog::critical(__FUNCTION__ ": coredump may have failed."); + else + { + CloseHandle(hDumpFile); + spdlog::critical(__FUNCTION__ ": coredump created -> flush logs."); + } + } - spdlog::error("Coredump created -> flush logs."); spdlog::default_logger()->flush(); - return EXCEPTION_EXECUTE_HANDLER; - } + // Something in STR breaks top-level unhandled exception filters. + // The Win API for them is pretty clunky (non-atomic, not chainable), + // but they can do some important things. If someone actually set one + // they probably meant it; make sure it actually runs. + // This will make more CrashLogger mods work with STR. + + // Get the current unhandled exception filter. If it has changed + // from when STR started up, invoke it here. + LPTOP_LEVEL_EXCEPTION_FILTER pCurrentUnhandledExceptionFilter = SetUnhandledExceptionFilter(CrashHandler::GetOriginalUnhandledExceptionFilter()); + SetUnhandledExceptionFilter(pCurrentUnhandledExceptionFilter); + if (pCurrentUnhandledExceptionFilter != CrashHandler::GetOriginalUnhandledExceptionFilter()) + { + spdlog::critical(__FUNCTION__ ": UnhandledExceptionFilter() workaround triggered."); - return EXCEPTION_CONTINUE_SEARCH; + singleThreaded.unlock(); // Might reenter, but is safe at this point. + if ((*pCurrentUnhandledExceptionFilter)(pExceptionInfo) == EXCEPTION_CONTINUE_EXECUTION) + retval = EXCEPTION_CONTINUE_EXECUTION; + singleThreaded.lock(); + } + } + return retval; } +LPTOP_LEVEL_EXCEPTION_FILTER CrashHandler::m_pUnhandled; CrashHandler::CrashHandler() { - AddVectoredExceptionHandler(1, &VectoredExceptionHandler); + // Record the original (or as close as we can get) top-level unhandled exception handler. + // We grab this so we can see if it is changed, presumably by a mod or even graphics drivers. + // Something in STR breaks unhandled exception handling, so we'll fake it if necessary. + // This is the only way to get the current setting, but the race is small. + m_pUnhandled = SetUnhandledExceptionFilter(NULL); + SetUnhandledExceptionFilter(m_pUnhandled); + + m_handler = AddVectoredExceptionHandler(1, &VectoredExceptionHandler); } CrashHandler::~CrashHandler() diff --git a/Code/client/CrashHandler.h b/Code/client/CrashHandler.h index bd4fe02ab..c2ade17b0 100644 --- a/Code/client/CrashHandler.h +++ b/Code/client/CrashHandler.h @@ -2,9 +2,16 @@ class CrashHandler { -public: + PVOID m_handler; + static LPTOP_LEVEL_EXCEPTION_FILTER m_pUnhandled; // For remembering "original" UnhandledExceptionFilter + + public: CrashHandler(); ~CrashHandler(); static void RemovePreviousDump(std::filesystem::path path); + static inline LPTOP_LEVEL_EXCEPTION_FILTER GetOriginalUnhandledExceptionFilter() + { + return m_pUnhandled; + } }; diff --git a/Code/client/Events/ActivateEvent.h b/Code/client/Events/ActivateEvent.h index b3b64a1fe..02b38448c 100644 --- a/Code/client/Events/ActivateEvent.h +++ b/Code/client/Events/ActivateEvent.h @@ -9,19 +9,6 @@ struct TESBoundObject; */ struct ActivateEvent { -#if TP_FALLOUT4 - ActivateEvent(TESObjectREFR* apObject, Actor* apActivator, TESBoundObject* apObjectToGet, int32_t aCount, bool aDefaultProcessing, bool aFromScript, bool aIsLooping, bool aActivateFlag = false) - : pObject(apObject) - , pActivator(apActivator) - , pObjectToGet(apObjectToGet) - , Count(aCount) - , DefaultProcessing(aDefaultProcessing) - , FromScript(aFromScript) - , IsLooping(aIsLooping) - , ActivateFlag(aActivateFlag) - { - } -#elif TP_SKYRIM64 ActivateEvent(TESObjectREFR* apObject, Actor* apActivator, TESBoundObject* apObjectToGet, int32_t aCount, bool aDefaultProcessing, uint8_t aUnk1, TESObjectREFR::OpenState aPreActivationOpenState, bool aActivateFlag = false) : pObject(apObject) , pActivator(apActivator) @@ -33,20 +20,13 @@ struct ActivateEvent , ActivateFlag(aActivateFlag) { } -#endif TESObjectREFR* pObject; Actor* pActivator; TESBoundObject* pObjectToGet; int32_t Count; bool DefaultProcessing; -#if TP_FALLOUT4 - bool FromScript; - bool IsLooping; -#elif TP_SKYRIM64 uint8_t Unk1; -#endif - TESObjectREFR::OpenState PreActivationOpenState; bool ActivateFlag; }; diff --git a/Code/client/Events/ProjectileLaunchedEvent.h b/Code/client/Events/ProjectileLaunchedEvent.h index 40321fb38..bd1afc903 100644 --- a/Code/client/Events/ProjectileLaunchedEvent.h +++ b/Code/client/Events/ProjectileLaunchedEvent.h @@ -24,16 +24,6 @@ struct ProjectileLaunchedEvent bool AutoAim; bool DeferInitialization; bool ForceConeOfFire; - -#if TP_FALLOUT4 - float ConeOfFireRadiusMult; - bool Tracer; - bool IntentionalMiss; - bool Allow3D; - bool Penetrates; - bool IgnoreNearCollisions; -#else bool UnkBool1; bool UnkBool2; -#endif }; diff --git a/Code/client/Events/RemoveSpellEvent.h b/Code/client/Events/RemoveSpellEvent.h new file mode 100644 index 000000000..0d0e3e0eb --- /dev/null +++ b/Code/client/Events/RemoveSpellEvent.h @@ -0,0 +1,9 @@ +#pragma once + +struct RemoveSpellEvent +{ + RemoveSpellEvent() = default; + + uint32_t TargetId{}; + uint32_t SpellId{}; +}; diff --git a/Code/client/FalloutVM.cpp b/Code/client/FalloutVM.cpp deleted file mode 100644 index a25470bb4..000000000 --- a/Code/client/FalloutVM.cpp +++ /dev/null @@ -1,63 +0,0 @@ -#include -#include "TiltedOnlineApp.h" - -#if TP_FALLOUT4 - -#include - -extern std::unique_ptr g_appInstance; - -struct Main; -struct VMContext -{ - char pad[0x600]; - uint8_t inactive; // 0x600 -}; - -TP_THIS_FUNCTION(TVMUpdate, int, VMContext); -TP_THIS_FUNCTION(TMainLoop, short, Main); -TP_THIS_FUNCTION(TVMDestructor, uintptr_t, void); - -static TVMUpdate* VMUpdate = nullptr; -static TMainLoop* MainLoop = nullptr; -static TVMDestructor* VMDestructor = nullptr; - -int TP_MAKE_THISCALL(HookVMUpdate, VMContext) -{ - if (apThis->inactive == 0) - g_appInstance->Update(); - - return TiltedPhoques::ThisCall(VMUpdate, apThis); -} - -short TP_MAKE_THISCALL(HookMainLoop, Main) -{ - TP_EMPTY_HOOK_PLACEHOLDER; - - return TiltedPhoques::ThisCall(MainLoop, apThis); -} - -uintptr_t TP_MAKE_THISCALL(HookVMDestructor, void) -{ - TP_EMPTY_HOOK_PLACEHOLDER - - return TiltedPhoques::ThisCall(VMDestructor, apThis); -} - -static TiltedPhoques::Initializer s_mainHooks( - []() - { - POINTER_FALLOUT4(TMainLoop, cMainLoop, 633525); - POINTER_FALLOUT4(TVMUpdate, cVMUpdate, 759509); - POINTER_FALLOUT4(TVMDestructor, cVMDestructor, 694341); - - VMUpdate = cVMUpdate.Get(); - MainLoop = cMainLoop.Get(); - VMDestructor = cVMDestructor.Get(); - - TP_HOOK(&VMUpdate, HookVMUpdate); - TP_HOOK(&MainLoop, HookMainLoop); - TP_HOOK(&VMDestructor, HookVMDestructor); - }); - -#endif diff --git a/Code/client/Games/ActorExtension.h b/Code/client/Games/ActorExtension.h index e2d7d4f07..485dbaa00 100644 --- a/Code/client/Games/ActorExtension.h +++ b/Code/client/Games/ActorExtension.h @@ -21,6 +21,6 @@ struct ActorExtension ActionEvent LatestAnimation{}; size_t GraphDescriptorHash = 0; -private: + private: uint32_t onlineFlags{0}; }; diff --git a/Code/client/Games/Animation.cpp b/Code/client/Games/Animation.cpp index 0c243f436..80dcc1ad4 100644 --- a/Code/client/Games/Animation.cpp +++ b/Code/client/Games/Animation.cpp @@ -59,18 +59,11 @@ uint8_t TP_MAKE_THISCALL(HookPerformAction, ActorMediator, TESActionData* apActi return res; } -#if TP_FALLOUT4 - // Let the ActionInstantInitializeGraphToBaseState event go through - if (apAction->action->formID == 0x5704c) - return TiltedPhoques::ThisCall(RealPerformAction, apThis, apAction); -#endif - return 0; } ActorMediator* ActorMediator::Get() noexcept { - POINTER_FALLOUT4(ActorMediator*, s_actorMediator, 1358859); POINTER_SKYRIMSE(ActorMediator*, s_actorMediator, 403567); return *(s_actorMediator.Get()); @@ -116,7 +109,6 @@ bool ActorMediator::ForceAction(TESActionData* apAction) noexcept POINTER_SKYRIMSE(TAnimationStep, PerformComplexAction, 38953); POINTER_SKYRIMSE(void*, qword_142F271B8, 403566); - POINTER_FALLOUT4(TAnimationStep, PerformComplexAction, 1445653); uint8_t result = 0; auto pActor = static_cast(apAction->actor); @@ -124,9 +116,7 @@ bool ActorMediator::ForceAction(TESActionData* apAction) noexcept { result = TiltedPhoques::ThisCall(PerformComplexAction, this, apAction); -#if TP_SKYRIM64 ApplyAnimationVariables(*qword_142F271B8.Get(), apAction); -#endif } return result; @@ -175,7 +165,6 @@ BGSActionData::BGSActionData(uint32_t aParam1, Actor* apActor, BGSAction* apActi TESActionData::TESActionData(uint32_t aParam1, Actor* apActor, BGSAction* apAction, TESObjectREFR* apTarget) : BGSActionData(aParam1, apActor, apAction, apTarget) { - POINTER_FALLOUT4(void*, s_vtbl, 780201); POINTER_SKYRIMSE(void*, s_vtbl, 188603); someFlag = false; @@ -192,7 +181,6 @@ TESActionData::~TESActionData() static TiltedPhoques::Initializer s_animationHook( []() { - POINTER_FALLOUT4(TPerformAction, performAction, 502377); POINTER_SKYRIMSE(TPerformAction, performAction, 38949); RealPerformAction = performAction.Get(); diff --git a/Code/client/Games/Animation/IAnimationGraphManagerHolder.h b/Code/client/Games/Animation/IAnimationGraphManagerHolder.h index ecbf0352c..43c6dd146 100644 --- a/Code/client/Games/Animation/IAnimationGraphManagerHolder.h +++ b/Code/client/Games/Animation/IAnimationGraphManagerHolder.h @@ -9,11 +9,6 @@ struct IAnimationGraphManagerHolder virtual bool SendAnimationEvent(BSFixedString* apAnimEvent); -#if TP_FALLOUT4 - virtual void sub_2a(); - virtual void sub_2c(); -#endif - virtual bool GetBSAnimationGraph(BSAnimationGraphManager** aPtr) const; virtual uint32_t sub_3(); virtual uint32_t sub_4(); @@ -29,10 +24,6 @@ struct IAnimationGraphManagerHolder virtual uint32_t sub_E(); virtual uint32_t sub_F(); -#if TP_FALLOUT4 - virtual uint32_t sub_12(); -#endif - virtual bool GetVariableFloat(BSFixedString* apVariable, float* apReturn); virtual bool GetVariableInt(BSFixedString* apVariable, uint32_t* apReturn); virtual bool GetVariableBool(BSFixedString* apVariable, bool* apReturn); diff --git a/Code/client/Games/BGSCreatedObjectManager.cpp b/Code/client/Games/BGSCreatedObjectManager.cpp index cc4d5125f..546b5579a 100644 --- a/Code/client/Games/BGSCreatedObjectManager.cpp +++ b/Code/client/Games/BGSCreatedObjectManager.cpp @@ -3,6 +3,5 @@ BGSCreatedObjectManager* BGSCreatedObjectManager::Get() noexcept { POINTER_SKYRIMSE(BGSCreatedObjectManager*, pObjManager, 400320); - POINTER_FALLOUT4(BGSCreatedObjectManager*, pObjManager, 1000679); return *pObjManager.Get(); } diff --git a/Code/client/Games/Fallout4/AI/AIProcess.h b/Code/client/Games/Fallout4/AI/AIProcess.h deleted file mode 100644 index d69fcbe79..000000000 --- a/Code/client/Games/Fallout4/AI/AIProcess.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -struct MiddleProcess; - -struct AIProcess -{ - void KnockExplosion(Actor* apActor, const NiPoint3* aSourceLocation, float afMagnitude); - - uint8_t unk0[0x8]; - MiddleProcess* middleProcess; -}; - -static_assert(offsetof(AIProcess, middleProcess) == 0x8); diff --git a/Code/client/Games/Fallout4/Actor.cpp b/Code/client/Games/Fallout4/Actor.cpp deleted file mode 100644 index b4dab2e95..000000000 --- a/Code/client/Games/Fallout4/Actor.cpp +++ /dev/null @@ -1,465 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include - -#include - -TP_THIS_FUNCTION(TActorConstructor, Actor*, Actor, uint8_t aUnk); -TP_THIS_FUNCTION(TActorConstructor2, Actor*, Actor, volatile int** aRefCount, uint8_t aUnk); -TP_THIS_FUNCTION(TActorDestructor, void*, Actor); - -static TActorConstructor* RealActorConstructor; -static TActorConstructor2* RealActorConstructor2; -static TActorDestructor* RealActorDestructor; - -Actor* TP_MAKE_THISCALL(HookActorContructor, Actor, uint8_t aUnk) -{ - TP_EMPTY_HOOK_PLACEHOLDER; - - const auto pActor = TiltedPhoques::ThisCall(RealActorConstructor, apThis, aUnk); - - return pActor; -} - -Actor* TP_MAKE_THISCALL(HookActorContructor2, Actor, volatile int** aRefCount, uint8_t aUnk) -{ - TP_EMPTY_HOOK_PLACEHOLDER; - - const auto pActor = TiltedPhoques::ThisCall(RealActorConstructor2, apThis, aRefCount, aUnk); - - return pActor; -} - -void* TP_MAKE_THISCALL(HookActorDestructor, Actor) -{ - // TODO: Actor dtor sometimes has garbage actor, causing a crash - return TiltedPhoques::ThisCall(RealActorDestructor, apThis); -} - -GamePtr Actor::New() noexcept -{ - const auto pActor = Memory::Allocate(); - - TiltedPhoques::ThisCall(HookActorContructor, pActor, uint8_t(1)); - - return pActor; -} - -TESForm* Actor::GetEquippedWeapon(uint32_t aSlotId) const noexcept -{ - using TGetEquippedWeapon = TESForm*(__fastcall)(void*, void*, const Actor*, uint32_t); - - POINTER_FALLOUT4(TGetEquippedWeapon, s_getEquippedWeapon, 811140); - - return s_getEquippedWeapon(nullptr, nullptr, this, aSlotId); -} - -Factions Actor::GetFactions() const noexcept -{ - Factions result; - - auto& modSystem = World::Get().GetModSystem(); - - auto* pNpc = Cast(baseForm); - if (pNpc) - { - auto& factions = pNpc->actorData.factions; - - for (auto i = 0u; i < factions.length; ++i) - { - Faction faction; - - modSystem.GetServerModId(factions[i].faction->formID, faction.Id); - faction.Rank = factions[i].rank; - - result.NpcFactions.push_back(faction); - } - } - - auto* pFactionExtras = Cast(extraData->GetByType(ExtraDataType::Faction)); - if (pFactionExtras) - { - for (auto i = 0u; i < pFactionExtras->entries.length; ++i) - { - Faction faction; - - modSystem.GetServerModId(pFactionExtras->entries[i].faction->formID, faction.Id); - faction.Rank = pFactionExtras->entries[i].rank; - - result.ExtraFactions.push_back(faction); - } - } - - return result; -} - -ActorValues Actor::GetEssentialActorValues() noexcept -{ - ActorValues actorValues; - - int essentialValues[] = {ActorValueInfo::kHealth}; - - for (auto i : essentialValues) - { - ActorValueInfo* pActorValueInfo = GetActorValueInfo(i); - float value = actorValueOwner.GetValue(pActorValueInfo); - actorValues.ActorValuesList.insert({i, value}); - float maxValue = actorValueOwner.GetMaxValue(pActorValueInfo); - actorValues.ActorMaxValuesList.insert({i, maxValue}); - } - - ActorValueInfo* pActorValueInfoRads = GetActorValueInfo(ActorValueInfo::kRads); - float valueRads = actorValueOwner.GetValue(pActorValueInfoRads); - actorValues.ActorValuesList.insert({ActorValueInfo::kRads, valueRads}); - ActorValueInfo* pActorValueInfoRadsMax = GetActorValueInfo(ActorValueInfo::kRadHealthMax); - float valueRadsMax = actorValueOwner.GetValue(pActorValueInfoRadsMax); - actorValues.ActorValuesList.insert({ActorValueInfo::kRadHealthMax, valueRadsMax}); - - return actorValues; -} - -// use this for fallout 4 projectile launching -void* Actor::GetCurrentWeapon(void* apResult, uint32_t aEquipIndex) noexcept -{ - TP_THIS_FUNCTION(TGetCurrentWeapon, void*, Actor, void* apResult, uint32_t aEquipIndex); - POINTER_FALLOUT4(TGetCurrentWeapon, getCurrentWeapon, 1277202); - return TiltedPhoques::ThisCall(getCurrentWeapon, this, apResult, aEquipIndex); -} - -float Actor::GetActorValue(uint32_t aId) const noexcept -{ - ActorValueInfo* pActorValueInfo = GetActorValueInfo(aId); - return actorValueOwner.GetValue(pActorValueInfo); -} - -float Actor::GetActorPermanentValue(uint32_t aId) const noexcept -{ - ActorValueInfo* pActorValueInfo = GetActorValueInfo(aId); - return actorValueOwner.GetMaxValue(pActorValueInfo); -} - -Inventory Actor::GetActorInventory() const noexcept -{ - return GetInventory(); -} - -Inventory Actor::GetEquipment() const noexcept -{ - Inventory inventory = GetInventory(); - inventory.RemoveByFilter([](const auto& entry) { return !entry.IsWorn(); }); - return inventory; -} - -void Actor::SetActorValue(uint32_t aId, float aValue) noexcept -{ - ActorValueInfo* pActorValueInfo = GetActorValueInfo(aId); - actorValueOwner.SetValue(pActorValueInfo, aValue); -} - -void Actor::ForceActorValue(ActorValueOwner::ForceMode aMode, uint32_t aId, float aValue) noexcept -{ - const float current = GetActorValue(aId); - ActorValueInfo* pActorValueInfo = GetActorValueInfo(aId); - actorValueOwner.ForceCurrent(aMode, pActorValueInfo, aValue - current); -} - -void Actor::SetActorValues(const ActorValues& acActorValues) noexcept -{ - for (auto& value : acActorValues.ActorMaxValuesList) - { - ActorValueInfo* pActorValueInfo = GetActorValueInfo(value.first); - float current = actorValueOwner.GetValue(pActorValueInfo); - actorValueOwner.ForceCurrent(ActorValueOwner::ForceMode::PERMANENT, pActorValueInfo, value.second - current); - } - - for (auto& value : acActorValues.ActorValuesList) - { - ActorValueInfo* pActorValueInfo = GetActorValueInfo(value.first); - if (value.first == ActorValueInfo::kRads || value.first == ActorValueInfo::kRadHealthMax) - actorValueOwner.SetValue(pActorValueInfo, value.second); - float current = actorValueOwner.GetValue(pActorValueInfo); - actorValueOwner.ForceCurrent(ActorValueOwner::ForceMode::DAMAGE, pActorValueInfo, value.second - current); - } -} - -void Actor::SetFactions(const Factions& acFactions) noexcept -{ - RemoveFromAllFactions(); - - auto& modSystem = World::Get().GetModSystem(); - - for (const auto& entry : acFactions.NpcFactions) - { - auto* pForm = GetById(modSystem.GetGameId(entry.Id)); - auto* pFaction = Cast(pForm); - if (pFaction) - { - SetFactionRank(pFaction, entry.Rank); - } - } - - for (const auto& entry : acFactions.ExtraFactions) - { - auto* pForm = GetById(modSystem.GetGameId(entry.Id)); - auto* pFaction = Cast(pForm); - if (pFaction) - { - SetFactionRank(pFaction, entry.Rank); - } - } -} - -void Actor::SetFactionRank(const TESFaction* acpFaction, int8_t aRank) noexcept -{ - PAPYRUS_FUNCTION(void, Actor, SetFactionRank, const TESFaction*, int8_t); - s_pSetFactionRank(this, acpFaction, aRank); -} - -void Actor::SetActorInventory(const Inventory& acInventory) noexcept -{ - spdlog::info("Setting actor inventory, form id: {:X}", formID); - - UnEquipAll(); - - SetInventory(acInventory); -} - -void Actor::UnEquipAll() noexcept -{ - TP_THIS_FUNCTION(TUnEquipAll, void, Actor); - POINTER_FALLOUT4(TUnEquipAll, s_unequipAll, 1260318); - TiltedPhoques::ThisCall(s_unequipAll, this); -} - -void Actor::RemoveFromAllFactions() noexcept -{ - PAPYRUS_FUNCTION(void, Actor, RemoveFromAllFactions); - s_pRemoveFromAllFactions(this); -} - -bool Actor::IsDead() const noexcept -{ - PAPYRUS_FUNCTION(bool, Actor, IsDead); - return s_pIsDead(this); -} - -void Actor::Kill() noexcept -{ - PAPYRUS_FUNCTION(void, Actor, Kill, void*); - s_pKill(this, NULL); -} - -void Actor::Reset() noexcept -{ - using ObjectReference = TESObjectREFR; - PAPYRUS_FUNCTION(void, ObjectReference, Reset, int, TESObjectREFR*); - s_pReset(this, 0, nullptr); -} - -void Actor::Respawn() noexcept -{ - Resurrect(false); - Reset(); -} - -// TODO(cosideci): this is flawed, since we need to equip specific stacks. -void Actor::ProcessScriptedEquip(TESBoundObject* apObj, bool abEquipLockState, bool abSilent) noexcept -{ - ScopedEquipOverride _; - - TP_THIS_FUNCTION(TProcessScriptedEquip, void, Actor, TESBoundObject*, bool, bool); - POINTER_FALLOUT4(TProcessScriptedEquip, processScriptedEquip, 868003); - TiltedPhoques::ThisCall(processScriptedEquip, this, apObj, abEquipLockState, abSilent); -} - -void Actor::DropOrPickUpObject(const Inventory::Entry& arEntry, NiPoint3* apPoint, NiPoint3* apRotate) noexcept -{ - ModSystem& modSystem = World::Get().GetModSystem(); - - uint32_t objectId = modSystem.GetGameId(arEntry.BaseId); - TESBoundObject* pObject = Cast(TESForm::GetById(objectId)); - if (!pObject) - { - spdlog::warn("Object to drop not found, {:X}:{:X}.", arEntry.BaseId.ModId, arEntry.BaseId.BaseId); - return; - } - - if (arEntry.Count < 0) - DropObject(pObject, -arEntry.Count, apPoint, apRotate); - // TODO: pick up -} - -void Actor::DropObject(TESBoundObject* apObject, int32_t aCount, NiPoint3* apPoint, NiPoint3* apRotate) noexcept -{ - BGSObjectInstance object(apObject, nullptr); - - TP_THIS_FUNCTION(TDropObject, BSPointerHandle*, Actor, BSPointerHandle*, BGSObjectInstance*, void*, int32_t, NiPoint3*, NiPoint3*); - POINTER_FALLOUT4(TDropObject, dropObject, 1482294); - - BSPointerHandle result{}; - TiltedPhoques::ThisCall(dropObject, this, &result, &object, nullptr, aCount, apPoint, apRotate); -} - -void Actor::UnequipItem(TESBoundObject* apObject) noexcept -{ - ScopedEquipOverride _; - - PAPYRUS_FUNCTION(void, Actor, UnequipItem, TESBoundObject*, bool, bool); - s_pUnequipItem(this, apObject, false, true); -} - -TP_THIS_FUNCTION(TDamageActor, bool, Actor, float aDamage, Actor* apHitter); -static TDamageActor* RealDamageActor = nullptr; - -bool TP_MAKE_THISCALL(HookDamageActor, Actor, float aDamage, Actor* apHitter) -{ - const auto pExHittee = apThis->GetExtension(); - if (pExHittee->IsLocalPlayer()) - { - World::Get().GetRunner().Trigger(HealthChangeEvent(apThis->formID, -aDamage)); - return TiltedPhoques::ThisCall(RealDamageActor, apThis, aDamage, apHitter); - } - else if (pExHittee->IsRemotePlayer()) - { - return false; - } - - if (apHitter) - { - const auto pExHitter = apHitter->GetExtension(); - if (pExHitter->IsLocalPlayer()) - { - World::Get().GetRunner().Trigger(HealthChangeEvent(apThis->formID, -aDamage)); - return TiltedPhoques::ThisCall(RealDamageActor, apThis, aDamage, apHitter); - } - if (pExHitter->IsRemotePlayer()) - { - return false; - } - } - - if (pExHittee->IsLocal()) - { - World::Get().GetRunner().Trigger(HealthChangeEvent(apThis->formID, -aDamage)); - return TiltedPhoques::ThisCall(RealDamageActor, apThis, aDamage, apHitter); - } - else - { - return false; - } -} - -TP_THIS_FUNCTION(TApplyActorEffect, void, ActiveEffect, Actor* apTarget, float aEffectValue, ActorValueInfo* apActorValueInfo); -static TApplyActorEffect* RealApplyActorEffect = nullptr; - -void TP_MAKE_THISCALL(HookApplyActorEffect, ActiveEffect, Actor* apTarget, float aEffectValue, ActorValueInfo* apActorValueInfo) -{ - const auto* pValueModEffect = Cast(apThis); - - if (pValueModEffect) - { - ActorValueInfo* pHealthActorValueInfo = apTarget->GetActorValueInfo(ActorValueInfo::kHealth); - if (pValueModEffect->actorValueInfo == pHealthActorValueInfo && aEffectValue > 0.0f) - { - if (apTarget && apTarget->GetExtension()) - { - const auto pExTarget = apTarget->GetExtension(); - if (pExTarget->IsLocal()) - { - World::Get().GetRunner().Trigger(HealthChangeEvent(apTarget->formID, aEffectValue)); - return TiltedPhoques::ThisCall(RealApplyActorEffect, apThis, apTarget, aEffectValue, apActorValueInfo); - } - return; - } - } - } - - return TiltedPhoques::ThisCall(RealApplyActorEffect, apThis, apTarget, aEffectValue, apActorValueInfo); -} - -TP_THIS_FUNCTION(TRunDetection, void, void, ActorKnowledge*); -static TRunDetection* RealRunDetection = nullptr; - -void TP_MAKE_THISCALL(HookRunDetection, void, ActorKnowledge* apTarget) -{ - auto pOwner = TESObjectREFR::GetByHandle(apTarget->hOwner); - auto pTarget = TESObjectREFR::GetByHandle(apTarget->hTarget); - - if (pOwner && pTarget) - { - auto pOwnerActor = Cast(pOwner); - auto pTargetActor = Cast(pTarget); - if (pOwnerActor && pTargetActor) - { - if (pOwnerActor->GetExtension()->IsRemotePlayer() && pTargetActor->GetExtension()->IsLocalPlayer()) - { - spdlog::info("Cancelling detection from remote player to local player"); - return; - } - } - } - - return TiltedPhoques::ThisCall(RealRunDetection, apThis, apTarget); -} - -TP_THIS_FUNCTION(TSpeakSoundFunction, float, Actor, const char* apName, uint32_t* aSoundHand, void* apArchTypeAnimation, int32_t aiStringLength, bool abSetEmotion, void* apOutputModel, bool abQueue, bool abLip, bool abPCapcall); -static TSpeakSoundFunction* RealSpeakSoundFunction = nullptr; - -bool TP_MAKE_THISCALL(HookSpeakSoundFunction, Actor, const char* apName, uint32_t* aSoundHand, void* apArchTypeAnimation, int32_t aiStringLength, bool abSetEmotion, void* apOutputModel, bool abQueue, bool abLip, bool abPCapcall) -{ - if (apThis->GetExtension()->IsLocal()) - World::Get().GetRunner().Trigger(DialogueEvent(apThis->formID, apName)); - - return TiltedPhoques::ThisCall(RealSpeakSoundFunction, apThis, apName, aSoundHand, apArchTypeAnimation, aiStringLength, abSetEmotion, apOutputModel, abQueue, abLip, abPCapcall); -} - -void Actor::SpeakSound(const char* pFile) -{ - uint32_t handle[4]{}; - handle[0] = -1; - TiltedPhoques::ThisCall(RealSpeakSoundFunction, this, pFile, handle, nullptr, 0, false, nullptr, false, true, false); -} - -static TiltedPhoques::Initializer s_specificReferencesHooks( - []() - { - POINTER_FALLOUT4(TActorConstructor, s_actorCtor, 1027501); - POINTER_FALLOUT4(TActorConstructor2, s_actorCtor2, 1331729); - POINTER_FALLOUT4(TActorDestructor, s_actorDtor, 1104083); - POINTER_FALLOUT4(TDamageActor, s_damageActor, 1539011); - // TODO: not sure about this ID, seems to interfere with jump when hooked? - POINTER_FALLOUT4(TApplyActorEffect, s_applyActorEffect, 703727); - POINTER_FALLOUT4(TRunDetection, s_runDetection, 906785); - POINTER_FALLOUT4(TSpeakSoundFunction, s_speakSoundFunction, 1567997); - - RealActorConstructor = s_actorCtor.Get(); - RealActorConstructor2 = s_actorCtor2.Get(); - RealActorDestructor = s_actorDtor.Get(); - RealDamageActor = s_damageActor.Get(); - RealApplyActorEffect = s_applyActorEffect.Get(); - RealRunDetection = s_runDetection.Get(); - RealSpeakSoundFunction = s_speakSoundFunction.Get(); - - TP_HOOK(&RealActorConstructor, HookActorContructor); - TP_HOOK(&RealActorConstructor2, HookActorContructor2); - TP_HOOK(&RealActorDestructor, HookActorDestructor); - TP_HOOK(&RealDamageActor, HookDamageActor); - TP_HOOK(&RealApplyActorEffect, HookApplyActorEffect); - TP_HOOK(&RealRunDetection, HookRunDetection); - TP_HOOK(&RealSpeakSoundFunction, HookSpeakSoundFunction); - }); diff --git a/Code/client/Games/Fallout4/Actor.h b/Code/client/Games/Fallout4/Actor.h deleted file mode 100644 index e356bca11..000000000 --- a/Code/client/Games/Fallout4/Actor.h +++ /dev/null @@ -1,200 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -struct ExActor; -struct ExPlayerCharacter; -struct ActorExtension; -struct TESNPC; -struct AIProcess; -struct TESFaction; -struct TESPackage; - -struct Actor : TESObjectREFR -{ - static constexpr FormType Type = FormType::Character; - - static GamePtr New() noexcept; - static GamePtr Create(TESNPC* apNpc) noexcept; - static GamePtr Spawn(uint32_t aBaseFormId) noexcept; - - virtual void sub_C4(); - virtual void sub_C5(); - virtual void sub_C6(); - virtual void sub_C7(); - virtual void sub_C8(); - virtual void SetWeaponDrawn(bool aIsDrawn); - virtual void SetPosition(const NiPoint3& acPosition, bool aSyncHavok = true); - virtual void sub_CB(); - virtual void Resurrect(bool aResetInventory); - virtual void sub_CD(); - virtual void sub_CE(); - virtual void sub_CF(); - virtual void sub_D0(); - virtual void sub_D1(); - virtual void sub_D2(); - virtual void sub_D3(); - virtual void sub_D4(); - virtual void sub_D5(); - virtual void sub_D6(); - virtual void sub_D7(); - virtual void sub_D8(); - virtual void sub_D9(); - virtual void sub_DA(); - virtual void sub_DB(); - virtual void sub_DC(); - virtual void sub_DD(); - virtual void sub_DE(); - virtual void sub_DF(); - virtual void sub_E0(); - virtual void sub_E1(); - virtual void sub_E2(); - virtual void sub_E3(); - virtual void sub_E4(); - virtual void sub_E5(); - virtual void sub_E6(); - virtual void sub_E7(); - virtual void sub_E8(); - virtual void sub_E9(); - virtual void sub_EA(); - virtual void sub_EB(); - virtual void sub_EC(); - virtual void sub_ED(); - virtual void sub_EE(); - virtual void sub_EF(); - virtual void sub_F0(); - virtual void sub_F1(); - virtual void sub_F2(); - virtual void sub_F3(); - virtual void sub_F4(); - virtual void sub_F5(); - virtual void sub_F6(); - virtual void sub_F7(); - virtual void sub_F8(); - virtual void sub_F9(); - virtual void sub_FA(); - virtual void sub_FB(); - virtual void sub_FC(); - virtual void sub_FD(); - virtual void sub_FE(); - virtual void PutCreatedPackage(struct TESPackage*, bool = false, bool = true, bool = true); - virtual void sub_100(); - //... - // virtual void sub_132(); - - // Casting - ActorExtension* GetExtension() noexcept; - ExActor* AsExActor() noexcept; - ExPlayerCharacter* AsExPlayerCharacter() noexcept; - - // Getters - float GetSpeed() noexcept; - TESForm* GetEquippedWeapon(uint32_t aSlotId) const noexcept; - Inventory GetActorInventory() const noexcept; - Inventory GetEquipment() const noexcept; - Factions GetFactions() const noexcept; - ActorValues GetEssentialActorValues() noexcept; - float GetActorValue(uint32_t aId) const noexcept; - float GetActorPermanentValue(uint32_t aId) const noexcept; - void* GetCurrentWeapon(void* apResult, uint32_t aEquipIndex) noexcept; - uint16_t GetLevel() const noexcept; - [[nodiscard]] bool IsDead() const noexcept; - [[nodiscard]] bool IsInCombat() const noexcept; - [[nodiscard]] Actor* GetCombatTarget() const noexcept; - [[nodiscard]] bool HasPerk(uint32_t aPerkFormId) const noexcept; - [[nodiscard]] uint8_t GetPerkRank(uint32_t aPerkFormId) const noexcept; - - // Setters - void SetSpeed(float aSpeed) noexcept; - void SetLevelMod(uint32_t aLevel) noexcept; - void SetActorInventory(const Inventory& acInventory) noexcept; - void SetActorValue(uint32_t aId, float aValue) noexcept; - void ForceActorValue(ActorValueOwner::ForceMode aMode, uint32_t aId, float aValue) noexcept; - void SetActorValues(const ActorValues& acActorValues) noexcept; - void SetFactions(const Factions& acFactions) noexcept; - void SetFactionRank(const TESFaction* acpFaction, int8_t aRank) noexcept; - void ForcePosition(const NiPoint3& acPosition) noexcept; - void SetWeaponDrawnEx(bool aDraw) noexcept; - void SetPackage(TESPackage* apPackage) noexcept; - void SetNoBleedoutRecovery(bool aSet) noexcept; - void SetEssentialEx(bool aSet) noexcept; - void SetPlayerRespawnMode(bool aSet = true) noexcept; - - // Actions - void UnEquipAll() noexcept; - void QueueUpdate() noexcept; - void RemoveFromAllFactions() noexcept; - void DispelAllSpells(bool aNow = false) noexcept; - void Kill() noexcept; - void Respawn() noexcept; - void Reset() noexcept; - void SpeakSound(const char* pFile); - void ProcessScriptedEquip(TESBoundObject* apObj, bool abEquipLockState = false, bool abSilent = true) noexcept; - void DropObject(TESBoundObject* apObject, int32_t aCount, NiPoint3* apPoint, NiPoint3* apRotate) noexcept; - void DropOrPickUpObject(const Inventory::Entry& arEntry, NiPoint3* apPoint, NiPoint3* apRotate) noexcept; - void UnequipItem(TESBoundObject* apObject) noexcept; - void StartCombatEx(Actor* apTarget) noexcept; - void SetCombatTargetEx(Actor* apTarget) noexcept; - void StartCombat(Actor* apTarget) noexcept; - void StopCombat() noexcept; - - enum ActorFlags - { - IS_A_MOUNT = 1 << 1, - IS_ESSENTIAL = 1 << 18, - }; - - struct ActorValueModifiers - { - float permanentModifier; - float temporaryModifier; - float damageModifier; - }; - - // TODO: ft verify, fallout has no mounts? unlikely, but maybe this flag is reused for something else? - // those helicopters maybe? - bool IsMount() const noexcept { return flags2 & ActorFlags::IS_A_MOUNT; } - - bool IsEssential() const noexcept { return flags2 & ActorFlags::IS_ESSENTIAL; } - void SetEssential(bool aSetEssential) noexcept - { - if (aSetEssential) - flags2 |= ActorFlags::IS_ESSENTIAL; - else - flags2 &= ~ActorFlags::IS_ESSENTIAL; - } - - MagicTarget magicTarget; - ActorState actorState; - BSTEventSink movementDataChangedSink; - BSTEventSink transformDeltaSink; - BSTEventSink subGraphActivationUpdateSink; - BSTEventSink characterMoveFinishSink; - BSTEventSink nonSupportContactSink; - BSTEventSink characterStateChangeSink; - void* postAnimationChannelUpdateFunctor; - uint8_t unk170[0x2D0 - 0x170]; - uint32_t actorFlags; - uint8_t unk2D8[0x300 - 0x2D8]; - AIProcess* currentProcess; - - uint8_t pad308[0x3E8 - 0x308]; - TESForm* magicItems[4]; - uint8_t pad408[0x43C - 0x408]; - uint32_t flags2; - uint8_t pad440[0x4]; - ActorValueModifiers healthModifiers; - uint8_t padActorEnd[0x490 - 0x450]; -}; - -static_assert(sizeof(Actor) == 0x490); -static_assert(offsetof(Actor, magicItems) == 0x3E8); diff --git a/Code/client/Games/Fallout4/BSAnimationGraphManager.h b/Code/client/Games/Fallout4/BSAnimationGraphManager.h deleted file mode 100644 index 4503616cb..000000000 --- a/Code/client/Games/Fallout4/BSAnimationGraphManager.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include - -struct BSFixedString; -struct BShkbAnimationGraph; - -struct BSAnimationGraphManager -{ - virtual ~BSAnimationGraphManager(); - virtual void sub_1(void* apUnk1); - - void Release() - { - if (InterlockedDecrement(&refCount) == 0) - this->~BSAnimationGraphManager(); - } - - volatile LONG refCount; - - void* pad_ptrs[6]; - BSTSmallArray animationGraphs; - uint8_t pad54[0xC8 - 0x58]; - BSRecursiveLock lock; // C8 - void* unkD0; // D0 - uint32_t animationGraphIndex; // D8 - - SortedMap DumpAnimationVariables(bool aPrintVariables); - uint64_t GetDescriptorKey(int aForceIndex = -1); -}; - -static_assert(offsetof(BSAnimationGraphManager, animationGraphs) == 0x40); -static_assert(offsetof(BSAnimationGraphManager, lock) == 0xC8); -static_assert(offsetof(BSAnimationGraphManager, animationGraphIndex) == 0xD8); diff --git a/Code/client/Games/Fallout4/BSCore/BSCRC16.cpp b/Code/client/Games/Fallout4/BSCore/BSCRC16.cpp deleted file mode 100644 index ec4e25357..000000000 --- a/Code/client/Games/Fallout4/BSCore/BSCRC16.cpp +++ /dev/null @@ -1,22 +0,0 @@ - -#include -#include "BSCore/BSCRC32.h" -#include "BSCRC16.h" - -namespace creation -{ -static uint16_t s_table[] = { - 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, - 0xDBC1, 0xDA81, 0x1A40, 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, 0x3600, 0xF6C1, - 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, - 0x2C40, 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, 0x6C00, 0xACC1, 0xAD81, 0x6D40, - 0xAF01, 0x6FC0, 0x6E80, 0xAE41, 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, 0x7200, - 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, - 0x5880, 0x9841, 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040, -}; - -uint16_t* BSCRC16::GetCRCTable() -{ - return s_table; -} -} // namespace creation diff --git a/Code/client/Games/Fallout4/BSCore/BSCRC16.h b/Code/client/Games/Fallout4/BSCore/BSCRC16.h deleted file mode 100644 index 34f15c9c6..000000000 --- a/Code/client/Games/Fallout4/BSCore/BSCRC16.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -namespace creation -{ -struct BSCRC16 -{ - static uint16_t* GetCRCTable(); -}; -} // namespace creation diff --git a/Code/client/Games/Fallout4/BSCore/BSCRC32.cpp b/Code/client/Games/Fallout4/BSCore/BSCRC32.cpp deleted file mode 100644 index 9e9979aa8..000000000 --- a/Code/client/Games/Fallout4/BSCore/BSCRC32.cpp +++ /dev/null @@ -1,19 +0,0 @@ - -#include -#include "BSCore/BSCRC32.h" - -namespace creation -{ -void BSCRC32::GenerateCRC(uint32_t& aiCRC, uint32_t auiData, uint32_t auiDefaultvalue) -{ -#if defined(DEBUG) - // CryptoPP cant handle a default value. - if (auiDefaultvalue != 0) - __debugbreak(); -#endif - - CryptoPP::CRC32 crc; - crc.Update(reinterpret_cast(&auiData), sizeof(uint32_t)); - crc.TruncatedFinal(reinterpret_cast(&aiCRC), sizeof(uint32_t)); -} -} // namespace creation diff --git a/Code/client/Games/Fallout4/BSCore/BSCRC32.h b/Code/client/Games/Fallout4/BSCore/BSCRC32.h deleted file mode 100644 index 3cfee4252..000000000 --- a/Code/client/Games/Fallout4/BSCore/BSCRC32.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -namespace creation -{ -struct BSCRC32 -{ - void GenerateCRC(uint32_t& aiCRC, uint32_t auiData, uint32_t auiDefaultvalue); -}; -} // namespace creation diff --git a/Code/client/Games/Fallout4/BSCore/BSTHashMap.h b/Code/client/Games/Fallout4/BSCore/BSTHashMap.h deleted file mode 100644 index 69c3bfa3a..000000000 --- a/Code/client/Games/Fallout4/BSCore/BSTHashMap.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include "BSCore/BSTScatterTable.h" - -namespace creation -{ -// Verified to be same on FT as ST - -// Taken off libskyrim, see himika -// https://github.com/himika/libSkyrim - -template struct BSTHashMapTraits -{ - typedef Table table_type; -}; - -template class BSTHashMapBase : public Traits, public Traits::table_type -{ -}; - -template class Table = BSTDefaultScatterTable> class BSTHashMap : public BSTHashMapBase>> -{ -}; - -// static_assert(sizeof(BSTHashMap) == 0x30); -} // namespace creation diff --git a/Code/client/Games/Fallout4/BSCore/BSTScatterTable.h b/Code/client/Games/Fallout4/BSCore/BSTScatterTable.h deleted file mode 100644 index 41d3cb132..000000000 --- a/Code/client/Games/Fallout4/BSCore/BSTScatterTable.h +++ /dev/null @@ -1,919 +0,0 @@ -#pragma once - -#include "BSCore/BSCRC32.h" - -namespace creation -{ -// Taken off libskyrim, see himika -// https://github.com/himika/libSkyrim - -// 00 -template struct BSTScatterTableDefaultHashPolicy -{ - typedef uint32_t hash_type; - - inline static hash_type get_hash(const Key& key) - { - uint32_t crc = 0; - BSCRC32::GenerateCRC(crc, key, 0); - return crc; - } - - inline static bool is_key_equal(const Key& a, const Key& b) { return a == b; } -}; - -template struct BSTScatterTableDefaultKVStorage -{ - typedef Key key_type; - typedef Value value_type; - - Key key; - Value value; -}; - -template class Storage = BSTScatterTableDefaultKVStorage> struct BSTScatterTableEntry : public Storage -{ -private: - typedef Storage _base_t; - -public: - BSTScatterTableEntry() - : next(nullptr) - { - } - ~BSTScatterTableEntry() { next = nullptr; } - - bool empty() const { return next == nullptr; } - - // @members - // Key key; - // Value value; - BSTScatterTableEntry* next; -}; - -// 00 -template struct BSTScatterTableHeapAllocator -{ - -public: - typedef Entry entry_type; - typedef typename entry_type::key_type key_type; - typedef typename entry_type::value_type value_type; - -protected: - static inline entry_type* Allocate(size_t num) - { - /*entry_type* entries = (entry_type*)Heap_Allocate(sizeof(entry_type) * num); - if (entries) { - entry_type* p = entries; - while (num) { - p->next = nullptr; - ++p; --num; - } - } - return entries;*/ - - return nullptr; - } - - static inline void Free(entry_type* p) - { - // Heap_Free(p); - } - - static inline size_t GetRelevantSize(size_t num) - { - if (num > 0) - num = 1 << _msb(num - 1); - return num; - } - -private: - static inline size_t _msb(unsigned int x) - { - union - { - unsigned int as_uint32_t; - float as_float; - } data; - data.as_float = (float)x + 0.5f; - - return (data.as_uint32_t >> 23) - 126; - } -}; - -// 00 -template class Storage, class HashPolicy, class Allocator, size_t INITIAL_TABLE_SIZE> struct BSTScatterTableTraits -{ - typedef uint32_t size_type; - typedef Key key_type; - typedef Value value_type; - typedef Storage storage_type; - typedef HashPolicy hash_policy; - typedef Allocator allocator_type; - - typedef typename allocator_type::entry_type entry_type; - typedef typename hash_policy::hash_type hash_type; - - const static size_type initial_table_size = INITIAL_TABLE_SIZE; -}; - -// 15 -template -class BSTScatterTableKernel : public Traits, // 00 - protected Traits::hash_policy // 01 -{ -public: - typedef typename Traits::size_type size_type; - typedef typename Traits::key_type key_type; - typedef typename Traits::value_type value_type; - typedef typename Traits::storage_type storage_type; - typedef typename Traits::hash_policy hash_policy; - typedef typename Traits::allocator_type allocator_type; - typedef typename Traits::entry_type entry_type; - typedef typename Traits::hash_type hash_type; - - using hash_policy::get_hash; - using hash_policy::is_key_equal; - - class hasher - { - public: - hasher() {} - - hash_type operator()(const key_type& key) const { return hash_policy::get_hash(key); } - }; - - class key_equal - { - public: - key_equal() {} - - bool operator()(const key_type& a, const key_type& b) const { return hash_policy::is_key_equal(a, b); } - }; - - bool empty() const { return size() == 0; } - - size_type max_size() const { return m_size; } - - size_type size() const { return m_size - m_freeCount; } - - size_type free_count() const { return m_freeCount; } - -protected: - BSTScatterTableKernel() - : m_size(0) - , m_freeCount(0) - , m_freeOffset(0) - { - m_eolPtr = (entry_type*)&sentinel; - } - - inline entry_type* _entry_at(entry_type* entries, hash_type hash) const { return entries + (hash & (m_size - 1)); } - - // 005A6190 - static void _entry_new(entry_type* p, entry_type* next, const key_type& key, const value_type& value) - { - if (p) - { - new (&p->key) key_type(key); - new (&p->value) value_type(value); - p->next = next; - } - } - - static inline void _entry_move(entry_type* to, entry_type* from) { memcpy_s(to, sizeof(*to), from, sizeof(*from)); } - - void _clear(entry_type* entries) - { - if (entries && m_size) - { - const entry_type* tail = entries + m_size; - for (entry_type* p = entries; p < tail; ++p) - { - if (!p->empty()) - { - p->~entry_type(); - } - } - m_freeCount = m_freeOffset = m_size; - } - } - - // 004FD070 - entry_type* _get_free_entry(entry_type* entries) - { - if (m_freeCount == 0) - return nullptr; - - entry_type* p = nullptr; - while (true) - { - m_freeOffset = (m_freeOffset - 1) & (max_size() - 1); - p = entries + m_freeOffset; - if (p->empty()) - break; - } - - m_freeCount--; - - return p; - } - - entry_type* _find(const entry_type* entries, hash_type hash, const key_type& key) const - { - if (!entries) - return nullptr; - - entry_type* p = _entry_at(const_cast(entries), hash); - - if (p->empty()) - return nullptr; - - while (!is_key_equal(p->key, key)) - { - p = p->next; - if (p == m_eolPtr) - { - p = nullptr; - break; - } - } - - return p; - } - - // 005B1840 - bool _insert(entry_type* entries, hash_type hash, const key_type& key, const value_type& value, uint16_t& unk) - { - if (!entries) - return false; - - entry_type* targetEntry = _entry_at(entries, hash); - if (targetEntry->empty()) - { - // target entry is free - new (&targetEntry->key) key_type(key); - new (&targetEntry->value) key_type(value); - targetEntry->next = m_eolPtr; - --m_freeCount; - return true; - } - - entry_type* p = targetEntry; - do - { - if (is_key_equal(p->key, key)) - { - // already exists - p->value = value; - return true; - } - p = p->next; - } while (p != m_eolPtr); - - entry_type* freeEntry = _get_free_entry(entries); - if (!freeEntry) - return false; - - p = _entry_at(entries, get_hash(targetEntry->key)); - if (p == targetEntry) - { - // hash collision - // insert new entry after target entry - _entry_new(freeEntry, targetEntry->next, key, value); - targetEntry->next = freeEntry; - return true; - } - - // bucket overlap - while (p->next != targetEntry) - p = p->next; - - _entry_move(freeEntry, targetEntry); - - p->next = freeEntry; - _entry_new(targetEntry, m_eolPtr, key, value); - return true; - } - - entry_type* _insert(entry_type* entries, hash_type hash, const key_type& key) - { - if (!entries) - return nullptr; - - entry_type* targetEntry = _entry_at(entries, hash); - if (targetEntry->empty()) - { - // target entry is free - --m_freeCount; - targetEntry->next = m_eolPtr; - new (&targetEntry->key) key_type(key); - return targetEntry; - } - - entry_type* p = targetEntry; - do - { - if (is_key_equal(p->key, key)) - { - // already exists - p->value.~value_type(); - return p; - } - p = p->next; - } while (p != m_eolPtr); - - entry_type* freeEntry = _get_free_entry(entries); - if (!freeEntry) - return nullptr; - - p = _entry_at(entries, get_hash(targetEntry->key)); - if (p == targetEntry) - { - // hash collision - // insert new entry after target entry - freeEntry->next = targetEntry->next; - targetEntry->next = freeEntry; - p = freeEntry; - } - else - { - // bucket overlap - while (p->next != targetEntry) - p = p->next; - p->next = freeEntry; - - _entry_move(freeEntry, targetEntry); - - targetEntry->next = m_eolPtr; - p = targetEntry; - } - - new (&p->key) key_type(key); - return p; - } - - // 008BF800 - bool _insert_move(entry_type* entries, hash_type hash, entry_type* kv) - { - if (!entries) - return false; - - entry_type* targetEntry = _entry_at(entries, hash); - if (targetEntry->empty()) - { - // target entry is free - _entry_move(targetEntry, kv); - targetEntry->next = m_eolPtr; - --m_freeCount; - return true; - } - - entry_type* freeEntry = _get_free_entry(entries); - - entry_type* p = _entry_at(entries, get_hash(targetEntry->key)); - if (p == targetEntry) - { - // hash collision - _entry_move(freeEntry, kv); - freeEntry->next = targetEntry->next; - targetEntry->next = freeEntry; - return true; - } - - // bucket overlap - while (p->next != targetEntry) - p = p->next; - - _entry_move(freeEntry, targetEntry); - p->next = freeEntry; - _entry_move(targetEntry, kv); - targetEntry->next = m_eolPtr; - - return true; - } - - bool _erase(entry_type* entries, hash_type hash, const key_type& key) - { - if (!entries) - return false; - - entry_type* targetEntry = _entry_at(entries, hash); - if (targetEntry->empty()) - { - return false; - } - - if (is_key_equal(targetEntry->key, key)) - { - entry_type* nextEntry = targetEntry->next; - targetEntry->~entry_type(); - ++m_freeCount; - - if (nextEntry != m_eolPtr) - { - _entry_move(targetEntry, nextEntry); - nextEntry->next = nullptr; - } - return true; - } - - entry_type* prevEntry = targetEntry; - entry_type* curEntry = targetEntry->next; - while (true) - { - if (curEntry == m_eolPtr) - return false; // not found - if (is_key_equal(curEntry->key, key)) - break; // found - - prevEntry = curEntry; - curEntry = curEntry->next; - } - entry_type* nextEntry = curEntry->next; - - curEntry->~entry_type(); - ++m_freeCount; - - if (nextEntry != m_eolPtr) - { - _entry_move(curEntry, nextEntry); - nextEntry->next = nullptr; - } - else - { - prevEntry->next = m_eolPtr; - } - - return true; - } - - // @members - // Traits pad00; // 00 -public: - uint32_t m_size; // 04 - uint32_t m_freeCount; // 08 - uint32_t m_freeOffset; // 0C - entry_type* m_eolPtr; // 10 - - static uint32_t sentinel; // DEADBEEF -}; - -template uint32_t BSTScatterTableKernel::sentinel = 0x0EFBEADDE; // DEADBEEF - -// 1>class BSTScatterTableBase, struct BSTScatterTableDefaultKVStorage, struct BSTScatterTableDefaultHashPolicy, struct BSTScatterTableHeapAllocator, struct BSTScatterTableDefaultKVStorage> >, 8> > size(28) : 1> +-- - 1> 0 | +-- - (base class BSTScatterTableKernel, struct -// BSTScatterTableDefaultKVStorage, struct BSTScatterTableDefaultHashPolicy, struct BSTScatterTableHeapAllocator, struct BSTScatterTableDefaultKVStorage> >, 8> >) -// 1> 0 | | +-- - (base class BSTScatterTableTraits, struct BSTScatterTableDefaultKVStorage, struct BSTScatterTableDefaultHashPolicy, struct BSTScatterTableHeapAllocator, struct BSTScatterTableDefaultKVStorage> >, 8>) 1> | | +-- - 1> 1 | | +-- - (base class BSTScatterTableDefaultHashPolicy) 1> | | +-- - 1> | | (size = 3) 1> 4 | | m_size 1> 8 | | -// m_freeCount 1>0C | | m_freeOffset 1>10 | | m_eolPtr 1> | +-- - 1>19 | +-- - (base class BSTScatterTableHeapAllocator, struct BSTScatterTableDefaultKVStorage> >) 1> | +-- - 1> | (size -// = 7) 1>20 | m_entries 1> +-- - - -template -class BSTScatterTableBase : public BSTScatterTableKernel, // 00 - protected Traits::allocator_type // 18 -{ -public: - typedef typename creation::BSTScatterTableKernel::hasher hasher; - typedef typename creation::BSTScatterTableKernel::key_equal key_equal; - - typedef BSTScatterTableKernel Kernel; - - typedef typename Kernel::size_type size_type; - typedef typename Kernel::key_type key_type; - typedef typename Kernel::value_type value_type; - typedef typename Kernel::storage_type storage_type; - typedef typename Kernel::hash_policy hash_policy; - typedef typename Kernel::allocator_type allocator_type; - typedef typename Kernel::entry_type entry_type; - typedef typename Kernel::hash_type hash_type; - - // compile hints for GCC - using Kernel::m_eolPtr; - using Kernel::m_freeCount; - using Kernel::m_freeOffset; - using Kernel::m_size; - using Kernel::max_size; - using Kernel::size; - - class const_iterator - { - public: - typedef const_iterator _iter; - typedef const storage_type* pointer; - typedef const storage_type& reference; - - const_iterator(const BSTScatterTableBase* a_table, entry_type* a_entry) - : m_table(a_table) - , m_entry(a_entry) - { - if (a_entry) - { - const entry_type* tail = m_table->_entry_tail(); - while (m_entry < tail && m_entry->empty()) - { - m_entry += 1; - } - } - else - { - m_entry = const_cast(m_table->_entry_tail()); - } - } - - operator pointer() const { return static_cast(m_entry); } - reference operator*() const { return *(pointer) * this; } - pointer operator->() const { return (pointer) * this; } - - _iter& operator++() - { - const entry_type* tail = m_table->_entry_tail(); - do - { - m_entry += 1; - } while (m_entry < tail && m_entry->empty()); - - return *this; - } - _iter operator++(int) - { - _iter tmp = *this; - ++*this; - return tmp; - } - - _iter& operator--() - { - const entry_type* head = m_table->_entry_head(); - do - { - m_entry -= 1; - } while (m_entry >= head && m_entry->empty()); - - return *this; - } - _iter operator--(int) - { - _iter tmp = *this; - --*this; - return tmp; - } - - bool operator==(const _iter& rhs) const { return (m_entry == rhs.m_entry); } - bool operator!=(const _iter& rhs) const { return (!(*this == rhs)); } - - protected: - const BSTScatterTableBase* m_table; - entry_type* m_entry; - }; - - class iterator : public const_iterator - { - public: - typedef iterator _iter; - typedef storage_type* pointer; - typedef storage_type& reference; - - // compiler hits for GCC - using const_iterator::m_entry; - - iterator(const BSTScatterTableBase* a_table, entry_type* a_entry) - : const_iterator(a_table, a_entry) - { - } - - operator pointer() { return static_cast(m_entry); } - reference operator*() { return *(pointer) * this; } - pointer operator->() { return (pointer) * this; } - }; - - iterator begin() { return iterator(this, _entry_head()); } - const_iterator begin() const { return const_iterator(this, _entry_head()); } - const_iterator cbegin() const { return const_iterator(this, _entry_head()); } - - iterator end() { return iterator(this, _entry_head() + m_size); } - const_iterator end() const { return const_iterator(this, _entry_head() + m_size); } - const_iterator cend() const { return const_iterator(this, _entry_head() + m_size); } - - hasher hash_function() const { return hasher(); } - - key_equal key_eq() const { return key_equal(); } - - inline void clear() { this->_clear(m_entries); } - -protected: - BSTScatterTableBase() - : Kernel() - , m_entries(nullptr) - { - } - - ~BSTScatterTableBase() - { - if (m_entries) - { - clear(); - this->Free(m_entries); - } - } - - inline entry_type* _entry_head() const { return const_cast(m_entries); } - inline entry_type* _entry_last() const { return _entry_head() + (max_size() - 1); } - inline entry_type* _entry_tail() const { return _entry_head() + max_size(); } - - inline entry_type* _get_free_entry() { return BSTScatterTableKernel::_get_free_entry(m_entries); } - - // 008BF970 - void _grow_table() - { - size_type oldSize = m_size; - entry_type* oldEntries = m_entries; - - m_size = (oldSize) ? (oldSize * 2) : this->initial_table_size; - m_entries = (entry_type*)allocator_type::Allocate(m_size); - m_freeCount = m_size; - m_freeOffset = m_size; - - if (m_entries && m_size) - { - // init entries - entry_type* p = m_entries; - for (size_type i = m_size; i; --i) - { - p->next = nullptr; - ++p; - }; - } - - // move from old entries to new one - if (oldEntries) - { - entry_type* from = oldEntries; - for (size_type i = oldSize; i; --i) - { - if (!from->empty()) - { - hash_type hash = hash_policy::get_hash(from->key); - _insert_move(m_entries, hash, from); - } - ++from; - } - - Heap_Free(oldEntries); - } - } - - void _assign(const BSTScatterTableBase& rhs) - { - if (!this->empty()) - { - clear(); - Free(m_entries); - m_entries = nullptr; - } - - if (rhs.empty()) - return; - - m_entries = allocator_type::Allocate(rhs.m_size); - if (m_entries) - { - m_size = rhs.m_size; - m_freeCount = rhs.m_freeCount; - m_freeOffset = rhs.m_freeOffset; - - entry_type* to = m_entries; - entry_type* from = rhs.m_entries; - size_t count = m_size; - while (--count) - { - if (!from->empty()) - { - new (&to->key) key_type(from->key); - new (&to->value) value_type(from->value); - to->next = (from->next == rhs.m_eolPtr) ? m_eolPtr : (m_entries + (from - rhs.m_entries)); - } - ++to; - ++from; - } - } - } - - void _assign(BSTScatterTableBase&& rhs) - { - if (!this->empty()) - { - clear(); - Free(m_entries); - m_entries = nullptr; - } - - m_size = rhs.m_size; - m_freeCount = rhs.m_freeCount; - m_freeOffset = rhs.m_freeOffset; - m_eolPtr = rhs.m_eolPtr; - m_entries = rhs.m_entries; - - rhs.m_size = 0; - rhs.m_freeCount = 0; - rhs.m_freeOffset = 0; - rhs.m_entries = nullptr; - } - - // @members - // Traits pad00; 00 - // uint32_t m_size; 04 - // uint32_t m_freeCount; 08 - // uint32_t m_freeOffset; 0C - // entry_type * m_eolPtr; 10 - // allocator_type pad14; // 18 -public: - entry_type* m_entries; // 20 -}; - -// 1>class BSTScatterTable, struct BSTScatterTableDefaultKVStorage, struct BSTScatterTableDefaultHashPolicy, struct BSTScatterTableHeapAllocator, 8> size(28) : -// 1> +-- - -// 1> 0 | +-- - (base class BSTScatterTableBase, struct BSTScatterTableDefaultKVStorage, struct BSTScatterTableDefaultHashPolicy, struct BSTScatterTableHeapAllocator, struct BSTScatterTableDefaultKVStorage> >, 8> >) 1> 0 | | +-- - (base class BSTScatterTableKernel, struct -// BSTScatterTableDefaultKVStorage, struct BSTScatterTableDefaultHashPolicy, struct BSTScatterTableHeapAllocator, struct BSTScatterTableDefaultKVStorage> >, 8> >) 1> 0 | | | +-- - -// (base class BSTScatterTableTraits, struct BSTScatterTableDefaultKVStorage, struct BSTScatterTableDefaultHashPolicy, struct BSTScatterTableHeapAllocator, struct BSTScatterTableDefaultKVStorage> >, 8>) 1> | | | +-- - 1> 1 | | | +-- - (base class BSTScatterTableDefaultHashPolicy) 1> | | | +-- - 1> | | | (size = 3) 1> 4 | | | m_size -// 1> 8 | | | m_freeCount -// 1>0C | | | m_freeOffset -// 1>10 | | | m_eolPtr -// 1> | | +-- - -// 1>19 | | +-- - (base class BSTScatterTableHeapAllocator, struct BSTScatterTableDefaultKVStorage> >) -// 1> | | +-- - -// 1> | | (size = 7) -// 1>20 | | m_entries -// 1> | +-- - -// 1> +-- - -template class Storage, template class Policy, template class Allocator, size_t INITIAL_TABLE_SIZE> -class BSTScatterTable : public BSTScatterTableBase, Allocator>, INITIAL_TABLE_SIZE>> -{ -public: - typedef BSTScatterTableBase, Allocator>, INITIAL_TABLE_SIZE>> Base; - - typedef typename Base::size_type size_type; - typedef typename Base::key_type key_type; - typedef typename Base::value_type value_type; - typedef typename Base::storage_type storage_type; - typedef typename Base::hash_policy hash_policy; - typedef typename Base::allocator_type allocator_type; - typedef typename Base::entry_type entry_type; - typedef typename Base::hash_type hash_type; - - // compiler hints for GCC - using Base::clear; - using Base::empty; - using Base::free_count; - using Base::hash_function; - using Base::initial_table_size; - using Base::key_eq; - using Base::m_entries; - using Base::m_eolPtr; - using Base::m_freeCount; - using Base::m_freeOffset; - using Base::m_size; - using Base::max_size; - using Base::size; - using typename Base::const_iterator; - using typename Base::iterator; - - BSTScatterTable() - : Base() - { - } - BSTScatterTable(const BSTScatterTable& rhs) - : Base() - { - _assign(rhs); - } - BSTScatterTable(BSTScatterTable&& rhs) { _assign(rhs); } - - BSTScatterTable& operator=(const BSTScatterTable& rhs) - { - _assign(rhs); - return *this; - } - BSTScatterTable& operator=(BSTScatterTable&& rhs) - { - _assign(rhs); - return *this; - } - - const_iterator find(const key_type& key) const - { - entry_type* entry = _find(m_entries, get_hash(key), key); - return entry ? const_iterator(this, entry) : this->cend(); - } - iterator find(const key_type& key) - { - entry_type* entry = _find(m_entries, get_hash(key), key); - return entry ? iterator(this, entry) : this->end(); - } - - size_type count(const key_type& key) const { return _find(m_entries, get_hash(key), key) ? 1 : 0; } - - bool insert(const key_type& key, const value_type& lvalue) - { - hash_type hash = get_hash(key); - entry_type* p = nullptr; - - while (!(p = _insert(m_entries, hash, key))) - { - this->_grow_table(); - if (!m_entries || !m_freeCount) - return false; - } - - new (&p->value) value_type(lvalue); - return true; - } - bool insert(const key_type& key, value_type&& rvalue) - { - hash_type hash = get_hash(key); - entry_type* p = nullptr; - - while (!(p = _insert(m_entries, hash, key))) - { - this->_grow_table(); - if (!m_entries || !m_freeCount) - return false; - } - - new (&p->value) value_type(rvalue); - return true; - } - // original implementation - bool insert(const key_type& key, const value_type& value, uint16_t& unk) - { - hash_type hash = get_hash(key); - while (!insert_original(m_entries, hash, key, value, unk)) - { - this->_grow_table(); - } - return true; - } - - inline size_type erase(const key_type& key) { return _erase(m_entries, get_hash(key), key) ? 1 : 0; } - - bool GetAt(key_type key, value_type& value) const - { - entry_type* entry = _find(m_entries, get_hash(key), key); - if (entry) - { - value = entry->value; - return true; - } - return false; - } - - inline bool SetAt(key_type key, const value_type& lvalue) { return insert(key, lvalue); } - - inline bool SetAt(key_type key, value_type&& rvalue) { return insert(key, rvalue); } - - inline bool RemoveAt(key_type key) { return erase(key) != 0; } - - inline void RemoveAll() { clear(); } - - // @members - // BSTScatterTableTraits pad00; // 00 - // size_type m_size; // 04 - // size_type m_freeCount; // 08 - // size_type m_freeOffset; // 0C - // entry_type * m_eolPtr; // 10 - // allocator_type pad14; // 18 - // entry_type * m_entries; // 20 -}; - -// 1>class BSTDefaultScatterTable > size(28) : -// 1> +-- - -// 1> 0 | +-- - (base class BSTScatterTable, struct BSTScatterTableDefaultKVStorage, struct BSTScatterTableDefaultHashPolicy, struct BSTScatterTableHeapAllocator, 8>) -// 1> 0 | | +-- - (base class BSTScatterTableBase, struct BSTScatterTableDefaultKVStorage, struct BSTScatterTableDefaultHashPolicy, struct BSTScatterTableHeapAllocator, struct BSTScatterTableDefaultKVStorage> >, 8> >) 1> 0 | | | +-- - (base class BSTScatterTableKernel, struct -// BSTScatterTableDefaultKVStorage, struct BSTScatterTableDefaultHashPolicy, struct BSTScatterTableHeapAllocator, struct BSTScatterTableDefaultKVStorage> >, 8> >) -// 1> 0 | | | | +-- - (base class BSTScatterTableTraits, struct BSTScatterTableDefaultKVStorage, struct BSTScatterTableDefaultHashPolicy, struct BSTScatterTableHeapAllocator, struct BSTScatterTableDefaultKVStorage> >, 8>) 1> | | | | +-- - 1> 1 | | | | +-- - (base class BSTScatterTableDefaultHashPolicy) 1> | | | | +-- - 1> | | | | (size = 3) -// 1> 4 | | | | m_size -// 1> 8 | | | | m_freeCount -// 1>0C | | | | m_freeOffset -// 1>10 | | | | m_eolPtr -// 1> | | | +-- - -// 1>19 | | | +-- - (base class BSTScatterTableHeapAllocator, struct BSTScatterTableDefaultKVStorage> >) -// 1> | | | +-- - -// 1> | | | (size = 7) -// 1>20 | | | m_entries -// 1> | | +-- - -// 1> | +-- - -// 1> +-- - -// 1> -template struct BSTDefaultScatterTable : public BSTScatterTable -{ -}; - -using Test = BSTDefaultScatterTable; - -// static_assert(sizeof(Test) == 0x28); -} // namespace creation diff --git a/Code/client/Games/Fallout4/BSFixedString.cpp b/Code/client/Games/Fallout4/BSFixedString.cpp deleted file mode 100644 index ee36d07aa..000000000 --- a/Code/client/Games/Fallout4/BSFixedString.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include - -#include - -BSFixedString::BSFixedString(const char* acpData) -{ - TP_THIS_FUNCTION(TConstructor, void, BSFixedString, const char*); - - POINTER_FALLOUT4(TConstructor, s_constructor, 640274); - - TiltedPhoques::ThisCall(s_constructor, this, acpData); -} - -BSFixedString::BSFixedString(BSFixedString&& aRhs) noexcept -{ - data = aRhs.data; - aRhs.data = nullptr; -} - -BSFixedString& BSFixedString::operator=(BSFixedString&& aRhs) noexcept -{ - Release(); - - data = aRhs.data; - aRhs.data = nullptr; - - return *this; -} - -void BSFixedString::Release() noexcept -{ - TP_THIS_FUNCTION(TConstructor, void, BSFixedString); - - POINTER_FALLOUT4(TConstructor, s_release, 1204431); - - TiltedPhoques::ThisCall(s_release, this); -} - -void BSFixedString::Set(const char* acpStr) noexcept -{ - TP_THIS_FUNCTION(TSet, void, BSFixedString, const char* acpStr); - - POINTER_FALLOUT4(TSet, s_set, 1064964); - - TiltedPhoques::ThisCall(s_set, this, acpStr); -} - -BSFixedString::~BSFixedString() -{ - // Release(); -} diff --git a/Code/client/Games/Fallout4/BSGraphics/BSGraphicsRenderer.cpp b/Code/client/Games/Fallout4/BSGraphics/BSGraphicsRenderer.cpp deleted file mode 100644 index cb3950790..000000000 --- a/Code/client/Games/Fallout4/BSGraphics/BSGraphicsRenderer.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#include "BSGraphicsRenderer.h" - -#include "Services/InputService.h" -#include "Systems/RenderSystemD3D11.h" - -#include "World.h" - -// shared resource by launcher -extern HICON g_SharedWindowIcon; - -namespace BSGraphics -{ -namespace -{ -static RenderSystemD3D11* g_sRs = nullptr; -static WNDPROC RealWndProc = nullptr; -static RendererWindow* g_RenderWindow = nullptr; - -static constexpr char kTogetherWindowName[]{"Fallout Together"}; -} // namespace - -RendererWindow* GetMainWindow() -{ - return g_RenderWindow; -} - -bool RendererWindow::IsForeground() -{ - return GetForegroundWindow() == hWnd; -} - -void (*Renderer_Init)(Renderer*, BSGraphics::RendererInitOSData*, const BSGraphics::ApplicationWindowProperties*, BSGraphics::RendererInitReturn*) = nullptr; - -// WNDPROC seems to be part of the renderer -LRESULT CALLBACK Hook_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - if (InputService::WndProc(hwnd, uMsg, wParam, lParam) != 0) - return 0; - - return RealWndProc(hwnd, uMsg, wParam, lParam); -} - -void Hook_Renderer_Init(BSGraphics::Renderer* self, BSGraphics::RendererInitOSData* aOSData, const BSGraphics::ApplicationWindowProperties* aFBData, BSGraphics::RendererInitReturn* aOut) -{ - // we feed this a shared icon as the resource directory of our former launcher data is already overwritten with the - // game. - aOSData->hIcon = g_SharedWindowIcon; - - // Append our window name. - aOSData->pClassName = kTogetherWindowName; - - RealWndProc = aOSData->pWndProc; - aOSData->pWndProc = Hook_WndProc; - - Renderer_Init(self, aOSData, aFBData, aOut); - - g_sRs = &World::Get().ctx().at(); - // This how the game does it too - g_RenderWindow = &self->Data.RenderWindowA[0]; - - g_sRs->OnDeviceCreation(self->Data.RenderWindowA[0].pSwapChain); -} - -void (*StopTimer)(int) = nullptr; - -// Insert us at the End -void Hook_StopTimer(int type) -{ - if (g_sRs) - g_sRs->OnRender(); - - StopTimer(type); -} - -static TiltedPhoques::Initializer s_viewportHooks( - []() - { - const VersionDbPtr initWindowLoc(193855); - // patch dwStyle in BSGraphics::InitWindows - TiltedPhoques::Put(mem::pointer(initWindowLoc.GetPtr()) + 0xD7 + 1, WS_OVERLAPPEDWINDOW); - - const VersionDbPtr timerLoc(700870); - const VersionDbPtr renderInit(564406); - - TiltedPhoques::SwapCall(mem::pointer(timerLoc.GetPtr()) + 0xE, StopTimer, &Hook_StopTimer); - - Renderer_Init = static_cast(renderInit.GetPtr()); - - // Once we find a proper way to locate it for different versions, go back to swapcall - // TiltedPhoques::SwapCall(mem::pointer(initLoc.GetPtr()) + 0xD1A, Renderer_Init, &Hook_Renderer_Init); - TP_HOOK_IMMEDIATE(&Renderer_Init, &Hook_Renderer_Init); - }); - -} // namespace BSGraphics diff --git a/Code/client/Games/Fallout4/BSGraphics/BSGraphicsRenderer.h b/Code/client/Games/Fallout4/BSGraphics/BSGraphicsRenderer.h deleted file mode 100644 index 54f4ae8d6..000000000 --- a/Code/client/Games/Fallout4/BSGraphics/BSGraphicsRenderer.h +++ /dev/null @@ -1,142 +0,0 @@ -#pragma once - -#include - -namespace BSGraphics -{ - -struct BSCriticalSection -{ - _RTL_CRITICAL_SECTION CriticalSection; -}; - -static_assert(sizeof(BSCriticalSection) == 0x28); - -struct RenderTarget -{ - ID3D11Texture2D* pTexture; - ID3D11Texture2D* pCopyTexture; - ID3D11RenderTargetView* pRTView; - ID3D11ShaderResourceView* pSRView; - ID3D11ShaderResourceView* pCopySRView; - ID3D11UnorderedAccessView* pUAView; -}; - -static_assert(sizeof(RenderTarget) == 0x30); - -struct RendererWindow -{ - HWND__* hWnd; - int iWindowX; - int iWindowY; - int uiWindowWidth; - int uiWindowHeight; - IDXGISwapChain* pSwapChain; - RenderTarget SwapChainRenderTarget; - - bool IsForeground(); -}; - -static_assert(sizeof(RendererWindow) == 0x50); - -struct DepthStencilTarget -{ - ID3D11Texture2D* pTexture; - ID3D11DepthStencilView* pDSView[4]; - ID3D11DepthStencilView* pDSViewReadOnlyDepth[4]; - ID3D11DepthStencilView* pDSViewReadOnlyStencil[4]; - ID3D11DepthStencilView* pDSViewReadOnlyDepthStencil[4]; - ID3D11ShaderResourceView* pSRViewDepth; - ID3D11ShaderResourceView* pSRViewStencil; -}; - -static_assert(sizeof(DepthStencilTarget) == 0x98); - -struct CubeMapRenderTarget -{ - ID3D11Texture2D* pTexture; - ID3D11RenderTargetView* pRTView[6]; - ID3D11ShaderResourceView* pSRView; -}; - -static_assert(sizeof(CubeMapRenderTarget) == 0x40); - -struct __declspec(align(8)) RendererData -{ - void* pShadowState; - BSD3DResourceCreator* D3DResourceCreator; - uint32_t uiAdapter; - DXGI_RATIONAL DesiredRefreshRate; - DXGI_RATIONAL ActualRefreshRate; - DXGI_MODE_SCALING ScaleMode; - DXGI_MODE_SCANLINE_ORDER ScanlineMode; - int bFullScreen; - bool bAppFullScreen; - bool bBorderlessWindow; - bool bVSync; - bool bInitialized; - bool bRequestWindowSizeChange; - unsigned int uiNewWidth; - unsigned int uiNewHeight; - unsigned int uiPresentInterval; - ID3D11Device* pDevice; - ID3D11DeviceContext* pContext; - RendererWindow RenderWindowA[32]; - RenderTarget pRenderTargetsA[101]; - DepthStencilTarget pDepthStencilTargetsA[13]; - CubeMapRenderTarget pCubeMapRenderTargetsA[2]; - BSCriticalSection RendererLock; - const char* pClassName; - HINSTANCE__* hInstance; - bool bNVAPIEnabled; -}; - -static_assert(sizeof(RendererData) == 0x25C0); - -struct Renderer -{ - bool bSkipNextPresent; - void(__fastcall* ResetRenderTargets)(); - RendererData Data; -}; - -static_assert(sizeof(Renderer) == 0x25D0); - -struct RendererInitOSData -{ - HWND__* hWnd; - HINSTANCE__* hInstance; - __int64(__fastcall* pWndProc)(HWND__*, unsigned int, unsigned __int64, __int64); - HICON__* hIcon; - const char* pClassName; - unsigned int uiAdapter; - int bCreateSwapChainRenderTarget; -}; - -static_assert(sizeof(RendererInitOSData) == 0x30); - -struct ApplicationWindowProperties -{ - unsigned int uiWidth; - unsigned int uiHeight; - int iX; - int iY; - unsigned int uiRefreshRate; - bool bFullScreen; - bool bBorderlessWindow; - bool bVSync; - unsigned int uiPresentInterval; -}; - -static_assert(sizeof(ApplicationWindowProperties) == 0x1C); - -struct RendererInitReturn -{ - HWND__* hwnd; -}; - -static_assert(sizeof(RendererInitReturn) == 0x8); - -RendererWindow* GetMainWindow(); - -} // namespace BSGraphics diff --git a/Code/client/Games/Fallout4/BSInput/BSInputDeviceManager.cpp b/Code/client/Games/Fallout4/BSInput/BSInputDeviceManager.cpp deleted file mode 100644 index 1ed4bfa27..000000000 --- a/Code/client/Games/Fallout4/BSInput/BSInputDeviceManager.cpp +++ /dev/null @@ -1,43 +0,0 @@ - -#include - -struct BSInputDeviceManager; - -void (*BSInputDeviceManager_PollInputDevices)(BSInputDeviceManager*, float) = nullptr; - -void Hook_BSInputDeviceManager_PollInputDevices(BSInputDeviceManager* inputDeviceMgr, float afDelta) -{ - if (!BSGraphics::GetMainWindow()->IsForeground()) - return; - - BSInputDeviceManager_PollInputDevices(inputDeviceMgr, afDelta); -} - -BOOL ClipCursor_H(const RECT*) -{ - RECT realRect{}; - GetWindowRect(BSGraphics::GetMainWindow()->hWnd, &realRect); - return ClipCursor(&realRect); -} - -static TiltedPhoques::Initializer s_initInputDeviceManager( - []() - { - const VersionDbPtr pollInputDevices(1328120); - - BSInputDeviceManager_PollInputDevices = static_cast(pollInputDevices.GetPtr()); - - TP_HOOK_IMMEDIATE(&BSInputDeviceManager_PollInputDevices, &Hook_BSInputDeviceManager_PollInputDevices); - - // TODO: move to a proper place. - const VersionDbPtr updateGameCursor(847267); - // disable the game being able to force the OS cursor - TiltedPhoques::Put(updateGameCursor.Get() + 0xB1, 0xEB); - - // no game scaled window bounds. - TiltedPhoques::Put(updateGameCursor.Get() + 0xE1, 0xE990); - - // proper coords. - TiltedPhoques::PutCall(updateGameCursor.Get() + 0x27A, ClipCursor_H); - TiltedPhoques::Put(updateGameCursor.Get() + 0x27A + 5, 0x90); - }); diff --git a/Code/client/Games/Fallout4/Components/BGSAttachParentArray.h b/Code/client/Games/Fallout4/Components/BGSAttachParentArray.h deleted file mode 100644 index 771aa1d16..000000000 --- a/Code/client/Games/Fallout4/Components/BGSAttachParentArray.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include - -struct BGSAttachParentArray : BaseFormComponent -{ - virtual ~BGSAttachParentArray(); - - void* arr; - uint32_t count; - uint32_t pad; -}; diff --git a/Code/client/Games/Fallout4/Components/BGSAttackDataForm.h b/Code/client/Games/Fallout4/Components/BGSAttackDataForm.h deleted file mode 100644 index a9b18a6c8..000000000 --- a/Code/client/Games/Fallout4/Components/BGSAttackDataForm.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include - -struct BGSAttackDataMap : NiRefObject -{ - virtual ~BGSAttackDataMap(); -}; - -struct BGSAttackDataForm : BaseFormComponent -{ - virtual ~BGSAttackDataForm(); - - BGSAttackDataMap* attackDataMap; -}; diff --git a/Code/client/Games/Fallout4/Components/BGSCharacterTint.h b/Code/client/Games/Fallout4/Components/BGSCharacterTint.h deleted file mode 100644 index 9601bd303..000000000 --- a/Code/client/Games/Fallout4/Components/BGSCharacterTint.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -struct BGSCharacterTint -{ - struct Entry - { - virtual ~Entry(); - virtual void sub_1(); - virtual void sub_2(); - virtual void sub_3(); - virtual void sub_4(); - virtual void sub_5(); - virtual void sub_6(); - - void* unk8; - uint16_t unk10; // 10 - type maybe ? copied from ctor - uint8_t unk12; // 12 - set to 0 in ctor - }; -}; diff --git a/Code/client/Games/Fallout4/Components/BGSDestructibleObjectForm.h b/Code/client/Games/Fallout4/Components/BGSDestructibleObjectForm.h deleted file mode 100644 index 6f0c60a81..000000000 --- a/Code/client/Games/Fallout4/Components/BGSDestructibleObjectForm.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include - -struct TESForm; - -struct BGSDestructibleObjectForm : BaseFormComponent -{ - virtual ~BGSDestructibleObjectForm(); - - TESForm* form; -}; diff --git a/Code/client/Games/Fallout4/Components/BGSForcedLocRefType.h b/Code/client/Games/Fallout4/Components/BGSForcedLocRefType.h deleted file mode 100644 index 3b46d5d02..000000000 --- a/Code/client/Games/Fallout4/Components/BGSForcedLocRefType.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include - -struct ActorValueInfo; - -struct BGSForcedLocRefType : BaseFormComponent -{ - virtual ~BGSForcedLocRefType(); - - ActorValueInfo** values; -}; diff --git a/Code/client/Games/Fallout4/Components/BGSKeywordForm.h b/Code/client/Games/Fallout4/Components/BGSKeywordForm.h deleted file mode 100644 index da213d0eb..000000000 --- a/Code/client/Games/Fallout4/Components/BGSKeywordForm.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include - -struct BGSKeyword; - -struct BGSKeywordForm : BaseFormComponent -{ - virtual ~BGSKeywordForm(); - - void* vtbl2; // 8 - BGSKeyword** keywords; // 10 - uint32_t count; // 18 - uint32_t pad; -}; diff --git a/Code/client/Games/Fallout4/Components/BGSModelMaterialSwap.h b/Code/client/Games/Fallout4/Components/BGSModelMaterialSwap.h deleted file mode 100644 index fc6e0f46c..000000000 --- a/Code/client/Games/Fallout4/Components/BGSModelMaterialSwap.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include - -struct BGSModelMaterialSwap : TESModel -{ - virtual ~BGSModelMaterialSwap(); - - uint8_t pad8[0x20 - 0x8]; -}; - -static_assert(sizeof(BGSModelMaterialSwap) == 0x20); diff --git a/Code/client/Games/Fallout4/Components/BGSNativeTerminalForm.h b/Code/client/Games/Fallout4/Components/BGSNativeTerminalForm.h deleted file mode 100644 index 2b71af5e6..000000000 --- a/Code/client/Games/Fallout4/Components/BGSNativeTerminalForm.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include - -struct BGSNativeTerminalForm : BaseFormComponent -{ - virtual ~BGSNativeTerminalForm(); - - void* unk8; -}; diff --git a/Code/client/Games/Fallout4/Components/BGSOverridePackCollection.h b/Code/client/Games/Fallout4/Components/BGSOverridePackCollection.h deleted file mode 100644 index 36624322e..000000000 --- a/Code/client/Games/Fallout4/Components/BGSOverridePackCollection.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include - -struct BGSOverridePackCollection : BaseFormComponent -{ - virtual ~BGSOverridePackCollection(); - - void* packs[5]; -}; diff --git a/Code/client/Games/Fallout4/Components/BGSPerkRankArray.h b/Code/client/Games/Fallout4/Components/BGSPerkRankArray.h deleted file mode 100644 index dab482739..000000000 --- a/Code/client/Games/Fallout4/Components/BGSPerkRankArray.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#include - -struct TESForm; - -struct BGSPerkRankArray : BaseFormComponent -{ - virtual ~BGSPerkRankArray(); - - TESForm** perks; // 8 - uint32_t count; // 10 - uint32_t pad; -}; diff --git a/Code/client/Games/Fallout4/Components/BGSPropertySheet.h b/Code/client/Games/Fallout4/Components/BGSPropertySheet.h deleted file mode 100644 index d0662744c..000000000 --- a/Code/client/Games/Fallout4/Components/BGSPropertySheet.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include - -struct BGSPropertySheet : BaseFormComponent -{ - virtual ~BGSPropertySheet(); - - void* unk; -}; diff --git a/Code/client/Games/Fallout4/Components/BGSSkinForm.h b/Code/client/Games/Fallout4/Components/BGSSkinForm.h deleted file mode 100644 index b3b3c03d9..000000000 --- a/Code/client/Games/Fallout4/Components/BGSSkinForm.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include - -struct TESForm; - -struct BGSSkinForm : BaseFormComponent -{ - virtual ~BGSSkinForm(); - - TESForm* form; -}; diff --git a/Code/client/Games/Fallout4/Components/BaseFormComponent.h b/Code/client/Games/Fallout4/Components/BaseFormComponent.h deleted file mode 100644 index 3c08e0ce2..000000000 --- a/Code/client/Games/Fallout4/Components/BaseFormComponent.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -struct BaseFormComponent -{ - virtual ~BaseFormComponent(); - - virtual void Init(); - virtual void ReleaseRefs(); - virtual void CopyFromBase(BaseFormComponent* apBase); - virtual void sub_4(); - virtual void sub_5(); - virtual void sub_6(); -}; diff --git a/Code/client/Games/Fallout4/Components/TESAIForm.h b/Code/client/Games/Fallout4/Components/TESAIForm.h deleted file mode 100644 index 066617084..000000000 --- a/Code/client/Games/Fallout4/Components/TESAIForm.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include - -struct TESAIForm : BaseFormComponent -{ - uint8_t unk8[0x28 - 0x8]; -}; - -static_assert(sizeof(TESAIForm) == 0x28); diff --git a/Code/client/Games/Fallout4/Components/TESActorBaseData.h b/Code/client/Games/Fallout4/Components/TESActorBaseData.h deleted file mode 100644 index 6a32c1a43..000000000 --- a/Code/client/Games/Fallout4/Components/TESActorBaseData.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once - -#include - -struct BGSVoiceType; - -struct TESActorBaseData : BaseFormComponent -{ - virtual ~TESActorBaseData(); - virtual void sub_7(); - virtual void sub_8(); - virtual void sub_9(); - - struct alignas(sizeof(void*)) FactionInfo - { - struct TESFaction* faction; - int8_t rank; - }; - - enum BaseFlags - { - IS_ESSENTIAL = 1 << 1, - }; - - // TODO: ft - // idk if this is correct - bool IsEssential() const noexcept { return flags & BaseFlags::IS_ESSENTIAL; } - void SetEssential(bool aSet) noexcept - { - if (aSet) - flags |= BaseFlags::IS_ESSENTIAL; - else - flags &= ~BaseFlags::IS_ESSENTIAL; - } - - uint64_t flags; - uint8_t unk10[0x28 - 0x10]; - BGSVoiceType* voiceType; - TESForm* owner; - uint8_t unk30[0x50 - 0x38]; - GameArray factions; -}; - -static_assert(sizeof(TESActorBaseData) == 0x68); -static_assert(offsetof(TESActorBaseData, owner) == 0x30); -static_assert(offsetof(TESActorBaseData, factions) == 0x50); diff --git a/Code/client/Games/Fallout4/Components/TESContainer.h b/Code/client/Games/Fallout4/Components/TESContainer.h deleted file mode 100644 index c29073468..000000000 --- a/Code/client/Games/Fallout4/Components/TESContainer.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -#include - -struct TESForm; - -struct TESContainer : BaseFormComponent -{ - struct Entry - { - uint32_t count; - TESForm* form; - void* data; - }; - - Entry** entries; - uint32_t count; -}; - -static_assert(sizeof(TESContainer) == 0x18); diff --git a/Code/client/Games/Fallout4/Components/TESFullName.h b/Code/client/Games/Fallout4/Components/TESFullName.h deleted file mode 100644 index 09c5ac3cd..000000000 --- a/Code/client/Games/Fallout4/Components/TESFullName.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#include -#include - -struct TESFullName : BaseFormComponent -{ - virtual ~TESFullName(); - - virtual void sub_7(); - virtual void sub_8(); - - BSFixedString value; -}; diff --git a/Code/client/Games/Fallout4/Components/TESLeveledList.h b/Code/client/Games/Fallout4/Components/TESLeveledList.h deleted file mode 100644 index e5804800b..000000000 --- a/Code/client/Games/Fallout4/Components/TESLeveledList.h +++ /dev/null @@ -1,38 +0,0 @@ -#pragma once - -#include - -struct TESForm; - -struct TESLeveledList : BaseFormComponent -{ - virtual ~TESLeveledList(); - - struct Entry - { - TESForm* form; - void* unkPtr; - uint16_t minLevel; - uint16_t maxLevel; - uint8_t unk14; // Specific to fallout 4 - }; - - struct Content - { - uint64_t length; // it's set to the size of the allocated array for some reason - Entry entries[0]; - }; - - uint8_t pad8[0x18 - 0x8]; - Content* content; - uint8_t pad20[0x28 - 0x20]; - bool hasData; - uint8_t count; -}; - -static_assert(sizeof(TESLeveledList::Entry) == 0x18); -static_assert(offsetof(TESLeveledList::Entry, unk14) == 0x14); -static_assert(offsetof(TESLeveledList, content) == 0x18); -static_assert(offsetof(TESLeveledList, count) == 0x29); -static_assert(offsetof(TESLeveledList, hasData) == 0x28); -static_assert(sizeof(TESLeveledList) == 0x30); diff --git a/Code/client/Games/Fallout4/Components/TESModel.h b/Code/client/Games/Fallout4/Components/TESModel.h deleted file mode 100644 index 1a85fa531..000000000 --- a/Code/client/Games/Fallout4/Components/TESModel.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -#include - -struct TESModel : BaseFormComponent -{ - virtual ~TESModel(); - - BSFixedString cModel; - void* pTexturesA; - void* pMaterialsA; - uint32_t* pAddonsA; - uint8_t uiNumTextures; - uint8_t uiNumTexturesSRGB; - uint8_t uiNumAddons; - uint8_t NumMaterials; - uint8_t cFlags; -}; - -static_assert(sizeof(TESModel) == 0x30); diff --git a/Code/client/Games/Fallout4/Components/TESRaceForm.h b/Code/client/Games/Fallout4/Components/TESRaceForm.h deleted file mode 100644 index 54a6720fe..000000000 --- a/Code/client/Games/Fallout4/Components/TESRaceForm.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include - -struct TESRace; - -struct TESRaceForm : BaseFormComponent -{ - virtual ~TESRaceForm(); - - TESRace* race; -}; diff --git a/Code/client/Games/Fallout4/Components/TESSpellList.cpp b/Code/client/Games/Fallout4/Components/TESSpellList.cpp deleted file mode 100644 index f4457e417..000000000 --- a/Code/client/Games/Fallout4/Components/TESSpellList.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include - -#include -#include - -void TESSpellList::Initialize() -{ - if (lists != nullptr) - return; - - lists = Memory::New(); -} diff --git a/Code/client/Games/Fallout4/Components/TESSpellList.h b/Code/client/Games/Fallout4/Components/TESSpellList.h deleted file mode 100644 index 09f0dd0d5..000000000 --- a/Code/client/Games/Fallout4/Components/TESSpellList.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#include - -struct TESForm; -struct TESSpellList : BaseFormComponent -{ - struct Lists - { - void** spells; - TESForm** unk4; - void** shouts; - uint32_t spellCount; - uint32_t unk4Count; - uint32_t shoultCount; - }; - - Lists* lists; - - void Initialize(); -}; - -static_assert(sizeof(TESSpellList) == 0x10); diff --git a/Code/client/Games/Fallout4/DefaultObjectManager.cpp b/Code/client/Games/Fallout4/DefaultObjectManager.cpp deleted file mode 100644 index 006f7eaf8..000000000 --- a/Code/client/Games/Fallout4/DefaultObjectManager.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "DefaultObjectManager.h" - -DefaultObjectManager& DefaultObjectManager::Get() -{ - using TGetDefaultObjectManager = DefaultObjectManager&(); - POINTER_FALLOUT4(TGetDefaultObjectManager, GetDefaultObjectManager, 484975); - return GetDefaultObjectManager(); -} diff --git a/Code/client/Games/Fallout4/DefaultObjectManager.h b/Code/client/Games/Fallout4/DefaultObjectManager.h deleted file mode 100644 index 2d1ecbc18..000000000 --- a/Code/client/Games/Fallout4/DefaultObjectManager.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -struct DefaultObjectManager -{ - static DefaultObjectManager& Get(); -}; diff --git a/Code/client/Games/Fallout4/Effects/ActiveEffect.h b/Code/client/Games/Fallout4/Effects/ActiveEffect.h deleted file mode 100644 index 0670c717b..000000000 --- a/Code/client/Games/Fallout4/Effects/ActiveEffect.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - -struct ActiveEffect -{ - virtual void sub_0(); - virtual void sub_1(); - virtual void sub_2(); - virtual void sub_3(); - virtual void sub_4(); - virtual void sub_5(); - virtual void sub_6(); - virtual void sub_7(); - virtual void sub_8(); - virtual void sub_9(); - virtual void sub_A(); - virtual void sub_B(); - virtual void sub_C(); - virtual void sub_D(); - virtual void sub_E(); - virtual void sub_F(); - virtual void sub_10(); - virtual void sub_11(); - virtual void sub_12(); - virtual void sub_13(); - virtual void sub_14(); - virtual void sub_15(); - virtual void sub_16(); - virtual void sub_17(); - virtual void sub_18(); - - char pad_0008[112]; - float effectValue; - char pad_007C[4]; -}; -static_assert(sizeof(ActiveEffect) == 0x80); diff --git a/Code/client/Games/Fallout4/Effects/ValueModifierEffect.h b/Code/client/Games/Fallout4/Effects/ValueModifierEffect.h deleted file mode 100644 index c0f5db077..000000000 --- a/Code/client/Games/Fallout4/Effects/ValueModifierEffect.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include - -struct Actor; -struct ActorValueInfo; - -struct ValueModifierEffect : public ActiveEffect -{ - virtual void sub_19(); - virtual void sub_1A(); - virtual void sub_1B(); - virtual void sub_1C(); - virtual void sub_1D(); - virtual void sub_1E(); - virtual void sub_1F(); - virtual void ApplyActorEffect(Actor* actor, float effectValue, unsigned int unk1); - - char pad_0080[16]; - uint32_t actorValueIndex; - char pad_0094[4]; - ActorValueInfo* actorValueInfo; -}; -static_assert(sizeof(ValueModifierEffect) == 0xA0); diff --git a/Code/client/Games/Fallout4/EquipManager.cpp b/Code/client/Games/Fallout4/EquipManager.cpp deleted file mode 100644 index f6e923f55..000000000 --- a/Code/client/Games/Fallout4/EquipManager.cpp +++ /dev/null @@ -1,133 +0,0 @@ -#include - -#include -#include -#include -#include - -#include - -#include - -struct BGSEquipSlot; - -struct ObjectEquipParams -{ - uint32_t uiStackID; - uint32_t uiNumber; - const BGSEquipSlot* pEquipSlot; - const BGSEquipSlot* pSlotBeingReplaced; - bool bQueueEquip; - bool bForceEquip; - bool bPlayEquipSounds; - bool bApplyNow; - bool bLocked; - bool bExtraWasDeleted; -}; - -TP_THIS_FUNCTION(TEquip, void*, EquipManager, Actor* apActor, BGSObjectInstance* apItem, ObjectEquipParams& arParams); -TP_THIS_FUNCTION(TUnEquip, void*, EquipManager, Actor* apActor, BGSObjectInstance* apItem, ObjectEquipParams& arParams); - -TEquip* RealEquip = nullptr; -TUnEquip* RealUnEquip = nullptr; - -EquipManager* EquipManager::Get() noexcept -{ - POINTER_FALLOUT4(EquipManager*, s_singleton, 1174341); - - return *s_singleton.Get(); -} - -bool EquipManager::EquipObject(Actor* apActor, BGSObjectInstance& arObject, uint32_t auiStackID, uint32_t auiNumber, const BGSEquipSlot* apSlot, bool abQueueEquip, bool abForceEquip, bool abPlaySounds, bool abApplyNow, bool abLocked) -{ - spdlog::warn("EquipObject {:X}", arObject.pObject->formID); - - TP_THIS_FUNCTION(TEquipObject, bool, EquipManager, Actor* apActor, BGSObjectInstance& arObject, uint32_t auiStackID, uint32_t auiNumber, const BGSEquipSlot* apSlot, bool abQueueEquip, bool abForceEquip, bool abPlaySounds, bool abApplyNow, bool abLocked); - POINTER_FALLOUT4(TEquipObject, equipObject, 988030); - - ScopedEquipOverride _; - - return TiltedPhoques::ThisCall(equipObject, this, apActor, arObject, auiStackID, auiNumber, apSlot, abQueueEquip, abForceEquip, abPlaySounds, abApplyNow, abLocked); -} - -bool EquipManager::UnequipObject(Actor* apActor, BGSObjectInstance& arObject, uint32_t auiNumber, const BGSEquipSlot* apSlot, uint32_t auiStackID, bool abQueueEquip, bool abForceEquip, bool abPlaySounds, bool abApplyNow, const BGSEquipSlot* apSlotBeingReplaced) -{ - // TODO: the real unequip happens in some kind of loop over slots. - // Maybe in fallout 4, multiple items can be on many slots? - // If so, just call the papyrus function instead, Actor::UnequipItem(). - // Maybe the equipped slot index should be sent even? (see BGSInventoryItem enum) - - TP_THIS_FUNCTION(TUnequipObject, bool, EquipManager, Actor* apActor, BGSObjectInstance& arObject, uint32_t auiNumber, const BGSEquipSlot* apSlot, uint32_t auiStackID, bool abQueueEquip, bool abForceEquip, bool abPlaySounds, bool abApplyNow, const BGSEquipSlot* apSlotBeingReplaced); - POINTER_FALLOUT4(TUnequipObject, unequipObject, 1292494); - - ScopedEquipOverride _; - - return TiltedPhoques::ThisCall(unequipObject, this, apActor, arObject, auiNumber, apSlot, auiStackID, abQueueEquip, abForceEquip, abPlaySounds, abApplyNow, apSlotBeingReplaced); -} - -void* TP_MAKE_THISCALL(EquipHook, EquipManager, Actor* apActor, BGSObjectInstance* apItem, ObjectEquipParams& arParams) -{ - if (!apActor) - return nullptr; - - const auto pExtension = apActor->GetExtension(); - if (pExtension->IsRemote() && !ScopedEquipOverride::IsOverriden()) - { - spdlog::info("Actor[{:X}]::Equip(), item form id: {:X}", apActor->formID, apItem->pObject->formID); - return nullptr; - } - - if (pExtension->IsLocal()) - { - EquipmentChangeEvent evt{}; - evt.ActorId = apActor->formID; - evt.Count = arParams.uiNumber; - evt.ItemId = apItem->pObject->formID; - // TODO: equip slot stuff - // evt.EquipSlotId - - World::Get().GetRunner().Trigger(evt); - } - - ScopedUnequipOverride _; - - return TiltedPhoques::ThisCall(RealEquip, apThis, apActor, apItem, arParams); -} - -void* TP_MAKE_THISCALL(UnEquipHook, EquipManager, Actor* apActor, BGSObjectInstance* apItem, ObjectEquipParams& arParams) -{ - if (!apActor) - return nullptr; - - const auto pExtension = apActor->GetExtension(); - if (pExtension->IsRemote() && !ScopedEquipOverride::IsOverriden()) - return nullptr; - - if (pExtension->IsLocal()) - { - EquipmentChangeEvent evt{}; - evt.ActorId = apActor->formID; - evt.Count = arParams.uiNumber; - evt.ItemId = apItem->pObject->formID; - evt.Unequip = true; - // TODO: equip slot stuff - // evt.EquipSlotId - - World::Get().GetRunner().Trigger(evt); - } - - return TiltedPhoques::ThisCall(RealUnEquip, apThis, apActor, apItem, arParams); -} - -static TiltedPhoques::Initializer s_equipmentHooks( - []() - { - POINTER_FALLOUT4(TEquip, s_equipFunc, 1474879); - POINTER_FALLOUT4(TUnEquip, s_unequipFunc, 1265293); - - RealUnEquip = s_unequipFunc.Get(); - RealEquip = s_equipFunc.Get(); - - TP_HOOK(&RealUnEquip, UnEquipHook); - TP_HOOK(&RealEquip, EquipHook); - }); diff --git a/Code/client/Games/Fallout4/EquipManager.h b/Code/client/Games/Fallout4/EquipManager.h deleted file mode 100644 index 09cce1924..000000000 --- a/Code/client/Games/Fallout4/EquipManager.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -struct TESForm; -struct ExtraDataList; -struct Actor; -struct BGSObjectInstance; -struct BGSEquipSlot; - -struct EquipManager -{ - static EquipManager* Get() noexcept; - - bool EquipObject(Actor* apActor, BGSObjectInstance& arObject, uint32_t auiStackID, uint32_t auiNumber, const BGSEquipSlot* apSlot, bool abQueueEquip, bool abForceEquip, bool abPlaySounds, bool abApplyNow, bool abLocked); - bool UnequipObject(Actor* apActor, BGSObjectInstance& arObject, uint32_t auiNumber, const BGSEquipSlot* apSlot, uint32_t auiStackID, bool abQueueEquip, bool abForceEquip, bool abPlaySounds, bool abApplyNow, const BGSEquipSlot* apSlotBeingReplaced); -}; diff --git a/Code/client/Games/Fallout4/Events.h b/Code/client/Games/Fallout4/Events.h deleted file mode 100644 index c0f7b945a..000000000 --- a/Code/client/Games/Fallout4/Events.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -struct BSMovementDataChangedEvent -{ -}; - -struct BSTransformDeltaEvent -{ -}; - -struct BSSubGraphActivationUpdate -{ -}; - -struct bhkCharacterMoveFinishEvent -{ -}; - -struct bhkNonSupportContactEvent -{ -}; - -struct bhkCharacterStateChangeEvent -{ -}; diff --git a/Code/client/Games/Fallout4/Events/EventDispacther.cpp b/Code/client/Games/Fallout4/Events/EventDispacther.cpp deleted file mode 100644 index 936f2a044..000000000 --- a/Code/client/Games/Fallout4/Events/EventDispacther.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include - -#include - -namespace details -{ -void InternalRegisterSink(void* apEventDispatcher, void* apSink) noexcept -{ - TP_THIS_FUNCTION(TRegisterSink, void, void, void* apSink); - - // GameVM ctor RegisterSinks - POINTER_FALLOUT4(TRegisterSink, s_registerSink, 57457); - - TiltedPhoques::ThisCall(s_registerSink, apEventDispatcher, apSink); -} - -void InternalUnRegisterSink(void* apEventDispatcher, void* apSink) noexcept -{ - TP_THIS_FUNCTION(TUnRegisterSink, void, void, void* apSink); - - // GameVM dtor UnRegisterSinks - POINTER_FALLOUT4(TUnRegisterSink, s_unregisterSink, 1089538); - - TiltedPhoques::ThisCall(s_unregisterSink, apEventDispatcher, apSink); -} - -void InternalPushEvent(void* apEventDispatcher, void* apEvent) noexcept -{ - TP_THIS_FUNCTION(TPushEvent, void, void, void* apSink); - - // "Failed to setup moving reference because it has no parent cell or no 3D" last function's content before the call - POINTER_FALLOUT4(TPushEvent, s_pushEvent, 646456); - - TiltedPhoques::ThisCall(s_pushEvent, apEventDispatcher, apEvent); -} -} // namespace details diff --git a/Code/client/Games/Fallout4/Events/EventDispatcher.h b/Code/client/Games/Fallout4/Events/EventDispatcher.h deleted file mode 100644 index 621688ce6..000000000 --- a/Code/client/Games/Fallout4/Events/EventDispatcher.h +++ /dev/null @@ -1,94 +0,0 @@ -#pragma once - -#include - -template struct BSTEventSink; - -// Very nasty work around to avoid template code duplication -namespace details -{ -void InternalRegisterSink(void* apEventDispatcher, void* apSink) noexcept; -void InternalUnRegisterSink(void* apEventDispatcher, void* apSink) noexcept; -void InternalPushEvent(void* apEventDispatcher, void* apEvent) noexcept; -} // namespace details - -template struct EventDispatcher -{ - void RegisterSink(BSTEventSink* apSink) noexcept { details::InternalRegisterSink(reinterpret_cast(this), reinterpret_cast(apSink)); } - - void UnRegisterSink(BSTEventSink* apSink) noexcept { details::InternalUnRegisterSink(reinterpret_cast(this), reinterpret_cast(apSink)); } - - void PushEvent(const T* apEvent) noexcept { details::InternalPushEvent(reinterpret_cast(this), reinterpret_cast(apEvent)); } - - uint8_t pad0[0x58]; -}; - -// Sadly fallout4 doesn't have a clean manager like skyrim - -struct TESQuestStartStopEvent -{ - uint32_t formId; -}; - -struct TESQuestStageItemDoneEvent -{ - uint32_t formId; - uint16_t stageId; - bool unk; -}; - -struct TESQuestStageEvent -{ - void* callback; - uint32_t formId; - uint16_t stageId; - bool bUnk; -}; - -struct TESActivateEvent -{ - TESObjectREFR* object; -}; - -struct TESLoadGameEvent -{ -}; - -struct BGSInventoryListEvent -{ - enum Type : int16_t - { - AddStack = 0x0, - ChangedStack = 0x1, - AddNewItem = 0x2, - RemoveItem = 0x3, - Clear = 0x4, - UpdateWeight = 0x5, - }; - - struct Event - { - Type ChangeType; - BSPointerHandle hOwner; - TESBoundObject* pObjAffected; - uint32_t uiCount; - uint32_t uiStackId; - }; -}; - -// TODO: idk why, but it can't find POINTER_FALLOUT4 -#define POINTER_FALLOUT4(className, variableName, ...) static VersionDbPtr variableName(__VA_ARGS__) - -#define DECLARE_DISPATCHER(name, id) \ - inline EventDispatcher* GetEventDispatcher_##name() \ - { \ - using TGetDispatcher = EventDispatcher*(); \ - POINTER_FALLOUT4(TGetDispatcher, s_getEventDispatcher, id); \ - return s_getEventDispatcher.Get()(); \ - }; - -DECLARE_DISPATCHER(TESQuestStartStopEvent, 1404316); -DECLARE_DISPATCHER(TESQuestStageItemDoneEvent, 181652); -DECLARE_DISPATCHER(TESQuestStageEvent, 540906); -DECLARE_DISPATCHER(TESActivateEvent, 166231); -DECLARE_DISPATCHER(TESLoadGameEvent, 823571); diff --git a/Code/client/Games/Fallout4/ExtraData/ExtraData.h b/Code/client/Games/Fallout4/ExtraData/ExtraData.h deleted file mode 100644 index 002b05109..000000000 --- a/Code/client/Games/Fallout4/ExtraData/ExtraData.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#include - -struct TESObjectREFR; -struct TESForm; - -enum class ExtraDataType : uint8_t -{ - None = 0, - LeveledCreature = 0x2D, - Faction = 0x5B, - Soul = 0x9C, -}; - -struct BSExtraData -{ - inline static constexpr auto eExtraData = ExtraDataType::None; - - virtual ~BSExtraData() = 0; - // TODO: this is different for fallout 4 it seems - virtual ExtraDataType GetType() const noexcept = 0; - - BSExtraData* next{}; - uint16_t usFlags; - ExtraDataType type; -}; - -static_assert(offsetof(BSExtraData, type) == 0x12); -static_assert(sizeof(BSExtraData) == 0x18); diff --git a/Code/client/Games/Fallout4/ExtraData/ExtraDataList.cpp b/Code/client/Games/Fallout4/ExtraData/ExtraDataList.cpp deleted file mode 100644 index f03bc2564..000000000 --- a/Code/client/Games/Fallout4/ExtraData/ExtraDataList.cpp +++ /dev/null @@ -1,91 +0,0 @@ -#include "ExtraDataList.h" - -ExtraDataList* ExtraDataList::New() noexcept -{ - ExtraDataList* pExtraDataList = Memory::Allocate(); - - pExtraDataList->ExtraData.pHead = nullptr; - pExtraDataList->ExtraData.ppTail = nullptr; - pExtraDataList->ExtraData.pFlags = static_cast(Memory::Allocate(0x1B)); - memset(pExtraDataList->ExtraData.pFlags, 0, 0x1B); - - pExtraDataList->ExtraRWLock.m_counter = pExtraDataList->ExtraRWLock.m_tid = 0; - - return pExtraDataList; -} - -bool ExtraDataList::Contains(ExtraDataType aType) const -{ - BSScopedLock _(ExtraRWLock); - - if (ExtraData.pFlags) - { - const uint32_t value = static_cast(aType); - const uint32_t index = value >> 3; - - if (index >= 0x1B) - return false; - - const uint8_t element = ExtraData.pFlags[index]; - - return (element >> (value % 8)) & 1; - } - - return false; -} - -BSExtraData* ExtraDataList::GetByType(ExtraDataType aType) const -{ - BSScopedLock _(ExtraRWLock); - - if (!Contains(aType)) - return nullptr; - - BSExtraData* pEntry = ExtraData.pHead; - while (pEntry != nullptr && pEntry->type != aType) - { - pEntry = pEntry->next; - } - - return pEntry; -} - -bool ExtraDataList::Add(ExtraDataType aType, BSExtraData* apNewData) -{ - if (Contains(aType)) - return false; - - BSScopedLock _(ExtraRWLock); - - BSExtraData* pNext = ExtraData.pHead; - ExtraData.pHead = apNewData; - apNewData->next = pNext; - SetType(aType, false); - - return true; -} - -uint32_t ExtraDataList::GetCount() const -{ - uint32_t count = 0; - - BSExtraData* pNext = ExtraData.pHead; - while (pNext) - { - count++; - pNext = pNext->next; - } - - return count; -} - -void ExtraDataList::SetType(ExtraDataType aType, bool aClear) -{ - uint32_t index = static_cast(aType) >> 3; - uint8_t bitmask = 1 << (static_cast(aType) % 8); - uint8_t& flag = ExtraData.pFlags[index]; - if (aClear) - flag &= ~bitmask; - else - flag |= bitmask; -} diff --git a/Code/client/Games/Fallout4/ExtraData/ExtraDataList.h b/Code/client/Games/Fallout4/ExtraData/ExtraDataList.h deleted file mode 100644 index 4a0a93aad..000000000 --- a/Code/client/Games/Fallout4/ExtraData/ExtraDataList.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - -#include "ExtraData.h" - -struct BaseExtraList -{ - BSExtraData* pHead; - BSExtraData** ppTail; - uint8_t* pFlags; // pFlags is 0x1B large -}; - -struct ExtraDataList : BSIntrusiveRefCounted -{ - static ExtraDataList* New() noexcept; - - bool Contains(ExtraDataType aType) const; - void Set(ExtraDataType aType, bool aSet); - - bool Add(ExtraDataType aType, BSExtraData* apNewData); - bool Remove(ExtraDataType aType, BSExtraData* apNewData); - - uint32_t GetCount() const; - - void SetType(ExtraDataType aType, bool aClear); - BSExtraData* GetByType(ExtraDataType type) const; - - BaseExtraList ExtraData; - mutable BSRecursiveLock ExtraRWLock; // is BSReadWriteLock -}; diff --git a/Code/client/Games/Fallout4/ExtraData/ExtraFactionChanges.h b/Code/client/Games/Fallout4/ExtraData/ExtraFactionChanges.h deleted file mode 100644 index fcb5cfe26..000000000 --- a/Code/client/Games/Fallout4/ExtraData/ExtraFactionChanges.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include "ExtraData.h" - -struct TESFaction; - -struct ExtraFactionChanges : BSExtraData -{ - virtual ~ExtraFactionChanges(); - - struct Entry - { - TESFaction* faction; - int8_t rank; - }; - - bool bRemoveCrimeFaction; - GameArray entries; -}; - -static_assert(sizeof(ExtraFactionChanges::Entry) == 0x10); -static_assert(offsetof(ExtraFactionChanges, entries) == 0x20); diff --git a/Code/client/Games/Fallout4/ExtraData/ExtraLeveledCreature.h b/Code/client/Games/Fallout4/ExtraData/ExtraLeveledCreature.h deleted file mode 100644 index 28e84902f..000000000 --- a/Code/client/Games/Fallout4/ExtraData/ExtraLeveledCreature.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include "ExtraData.h" - -struct TESNPC; - -struct ExtraLeveledCreature : BSExtraData -{ - virtual ~ExtraLeveledCreature(); - - uint8_t unk20[0x68]; // This buffer is copied like a pod -}; - -static_assert(sizeof(ExtraLeveledCreature) == 0x88); -static_assert(offsetof(ExtraLeveledCreature, unk20) == 0x20); diff --git a/Code/client/Games/Fallout4/ExtraData/ExtraSoul.h b/Code/client/Games/Fallout4/ExtraData/ExtraSoul.h deleted file mode 100644 index a6145df54..000000000 --- a/Code/client/Games/Fallout4/ExtraData/ExtraSoul.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#include "ExtraData.h" - -enum class SOUL_LEVEL -{ - SOUL_NONE = 0x0, - SOUL_PETTY = 0x1, - SOUL_LESSER = 0x2, - SOUL_COMMON = 0x3, - SOUL_GREATER = 0x4, - SOUL_GRAND = 0x5, - SOUL_LEVEL_COUNT = 0x6, -}; - -struct ExtraSoul : BSExtraData -{ - inline static constexpr auto eExtraData = ExtraDataType::Soul; - - SOUL_LEVEL cSoul{}; -}; - -static_assert(sizeof(ExtraSoul) == 0x20); diff --git a/Code/client/Games/Fallout4/FormManager.cpp b/Code/client/Games/Fallout4/FormManager.cpp deleted file mode 100644 index 56d28319c..000000000 --- a/Code/client/Games/Fallout4/FormManager.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include - -#include - -FormManager* FormManager::Get() -{ - POINTER_FALLOUT4(FormManager*, s_instance, 711559); - return *(s_instance.Get()); -} diff --git a/Code/client/Games/Fallout4/FormManager.h b/Code/client/Games/Fallout4/FormManager.h deleted file mode 100644 index 8cb0ea2bb..000000000 --- a/Code/client/Games/Fallout4/FormManager.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include - -struct TESQuest; - -struct FormManager -{ - static FormManager* Get(); - - char pad0[2024]; - GameArray quests; -}; - -static_assert(offsetof(FormManager, quests) == 2024); diff --git a/Code/client/Games/Fallout4/Forms/ActorValueInfo.cpp b/Code/client/Games/Fallout4/Forms/ActorValueInfo.cpp deleted file mode 100644 index 74ac7a374..000000000 --- a/Code/client/Games/Fallout4/Forms/ActorValueInfo.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include - -#include - -ActorValueInfo* ActorValueInfo::Resolve(uint32_t aId) noexcept -{ - using TGetActorValueInfoArray = ActorValueInfo**(); - POINTER_FALLOUT4(TGetActorValueInfoArray, GetActorValueInfoArray, 405391); - - return GetActorValueInfoArray()[aId]; -} diff --git a/Code/client/Games/Fallout4/Forms/ActorValueInfo.h b/Code/client/Games/Fallout4/Forms/ActorValueInfo.h deleted file mode 100644 index da586e00c..000000000 --- a/Code/client/Games/Fallout4/Forms/ActorValueInfo.h +++ /dev/null @@ -1,152 +0,0 @@ -#pragma once - -#include -#include - -struct ActorValueInfo : TESForm -{ - enum - { - kAbsorbChance = 0, - kActionPoints = 1, - kAggression = 2, - kAgility = 3, - kAimStability = 4, - kAlchemy = 5, - kAnimationMult = 6, - kArmorPerks = 7, - kAssistance = 8, - kAttackDamageMult = 9, - kBlindness = 10, - kBlock = 11, - kBloodyMess = 12, - kBowSpeedBonus = 13, - kBowStaggerBonus = 14, - kBrainCondition = 15, - kCarryWeight = 16, - kCharisma = 17, - kCombatHealthRegenMult = 18, - kConfidence = 19, - kCritChance = 20, - kDamageResist = 21, - kDeafness = 22, - kEndurance = 24, - kEnduranceCondition = 25, - kExperience = 26, - kHealth = 27, - kHealRateMult = 28, - kIdleChatterTimeMin = 29, - kIdleChatterTimeMax = 30, - kIgnoreCrippledLimbs = 31, - kIntelligence = 32, - kInvisibility = 33, - kKARMA = 34, - kLeftAttackCondition = 35, - kLeftItemCharge = 36, - kLeftMobilityCondition = 37, - kLeftWeaponSpeedMult = 38, - kLockpicking = 39, - kLuck = 40, - kMass = 41, - kMeleeDamage = 42, - kMorality = 43, - kMovementNoiseMult = 44, - kNightEye = 45, - kPerception = 46, - kPerceptionCondition = 47, - kPoisonResist = 49, - kPowerArmorBattery = 50, - kPowerArmorHeadCondition = 51, - kPowerArmorTorsoCondition = 52, - kPowerArmorLeftArmCondition = 53, - kPowerArmorRightArmCondition = 54, - kPowerArmorLeftLegCondition = 55, - kPowerArmorRightLegCondition = 56, - kRadHealthMax = 57, - kRads = 58, - kFatigueAPMax = 59, - kFatigue = 60, - kReflectDamage = 61, - kConditionRate = 62, - kRightAttackCondition = 63, - kRightItemCharge = 64, - kRightMobilityCondition = 65, - kRotationSpeedCondition = 66, - kShieldPerks = 67, - kShoutRecoveryMult = 68, - kSneak = 69, - kSpeedMult = 71, - kUnusedStamina = 72, - kStrength = 73, - kSuspicious = 74, - kTelekinesis = 75, - kUnarmedDamage = 76, - kVANSPerk = 77, - kWardPower = 78, - kWaitingForPlayer = 79, - kWaterBreathing = 80, - kWaterWalking = 81, - kWeaponSpeedMult = 82, - kWeapReloadSpeedMult = 83, - kHealRate = 84, - kActionPointsRate = 85, - kActionPointsRateMult = 86, - kRadsRate = 87, - kRadsRateMult = 88, - kFatigueRate = 89, - kFatigueRateMult = 90, - kConditionRateMult = 91, - kFireResist = 92, - kElectricResist = 93, - kFrostResist = 94, - kMagicResist = 95, - kRadResistIngestion = 96, - kRadResistExposure = 97, - kEnergy = 98, - kEnergyResist = 99, - kParalysis = 100, - kAttackConditionAlt1 = 101, - kAttackConditionAlt2 = 102, - kAttackConditionAlt3 = 103, - kPowerGenerated = 104, - kPowerRadiation = 105, - kPowerRequired = 106, - kFood = 107, - kWater = 108, - kSafety = 109, - kBed = 110, - kHappiness = 111, - kArtillery = 112, - kWorkshopItemOverlap = 113, - kWorkshopItemClampDirection = 114, - kWorkshopItemZOffset = 115, - kWorkshopPlayerOwned = 116, - kWorkshopActorWounded = 117, - kWorkshopStackableItem = 118, - kWorkshopSnapPointRadius = 119, - kWorkshopAnythingIsGround = 120, - kWorkshopMaxTriangles = 121, - kWorkshopMaxDraws = 122, - kWorkshopCurrentTriangles = 123, - kWorkshopCurrentDraws = 124, - kWorkshopIgnoreSimpleIntersections = 125, - kWorkshopAllowUnsupportedStacking = 126, - kWorkshopSnapTransmitsPower = 127, - kWorkshopPowerConnection = 128, - kLogicOperation = 129, - kLogicOutput = 130, - kIgnorePlayerWhileFrenzied = 131, - kActorValueCount = 132, - }; - - static ActorValueInfo* Resolve(uint32_t aId) noexcept; - - virtual ~ActorValueInfo(); - - TESFullName name; - uint8_t pad30[0x68 - 0x30]; - char* key; -}; - -static_assert(offsetof(ActorValueInfo, name) == 0x20); -static_assert(offsetof(ActorValueInfo, key) == 0x68); diff --git a/Code/client/Games/Fallout4/Forms/BGSAction.h b/Code/client/Games/Fallout4/Forms/BGSAction.h deleted file mode 100644 index 85e1869ac..000000000 --- a/Code/client/Games/Fallout4/Forms/BGSAction.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -struct BGSAction : BGSKeyword -{ - uint32_t counter; -}; diff --git a/Code/client/Games/Fallout4/Forms/BGSColorForm.h b/Code/client/Games/Fallout4/Forms/BGSColorForm.h deleted file mode 100644 index 9e9836622..000000000 --- a/Code/client/Games/Fallout4/Forms/BGSColorForm.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -struct BGSColorForm : TESForm -{ - virtual ~BGSColorForm(); -}; diff --git a/Code/client/Games/Fallout4/Forms/BGSHeadPart.h b/Code/client/Games/Fallout4/Forms/BGSHeadPart.h deleted file mode 100644 index fe08154cd..000000000 --- a/Code/client/Games/Fallout4/Forms/BGSHeadPart.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -// Placeholder, inheritance is wrong -struct BGSHeadPart -{ -}; diff --git a/Code/client/Games/Fallout4/Forms/BGSInventoryItem.h b/Code/client/Games/Fallout4/Forms/BGSInventoryItem.h deleted file mode 100644 index 65ab8b647..000000000 --- a/Code/client/Games/Fallout4/Forms/BGSInventoryItem.h +++ /dev/null @@ -1,58 +0,0 @@ -#pragma once - -#include -#include - -struct BGSInventoryItem -{ - struct Stack : BSIntrusiveRefCounted - { - // Seems that most of these flags aren't used. - // INV_SLOT_INDEX_1 seems to mean not equipped. - enum class Flag : int32_t - { - INV_SLOT_INDEX_1 = 0x0, - INV_SLOT_INDEX_2 = 0x1, - INV_SLOT_INDEX_3 = 0x2, - INV_EQUIP_STATE_LOCKED = 0x3, - INV_SHOULD_EQUIP = 0x4, - INV_TEMPORARY = 0x5, - INV_SLOT_MASK = 0x7, - }; - - virtual ~Stack(); - - Stack* spNextStack; - ExtraDataList* spExtra; - uint32_t uiCount; - Flag usFlags; - - // TODO(cosideci): impl range based loop -#if 0 - struct Iterator - { - Iterator(Stack* apEntry) : m_pEntry(apEntry) {} - Iterator operator++() { m_pEntry = m_pEntry->spNextStack; return *this; } - bool operator!=(const Iterator& acRhs) const { return m_pEntry != acRhs.m_pEntry; } - T* operator*() const { return m_pEntry->data; } - private: - Stack* m_pEntry; - }; - - Iterator begin() - { - return Iterator(&entry); - } - - Iterator end() - { - return Iterator(nullptr); - } -#endif - }; - - TESBoundObject* pObject; - Stack* spStackData; -}; - -static_assert(sizeof(BGSInventoryItem) == 0x10); diff --git a/Code/client/Games/Fallout4/Forms/BGSInventoryList.h b/Code/client/Games/Fallout4/Forms/BGSInventoryList.h deleted file mode 100644 index 5c51e0a4a..000000000 --- a/Code/client/Games/Fallout4/Forms/BGSInventoryList.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include -#include "BGSInventoryItem.h" - -struct BGSInventoryList : EventDispatcher -{ - // TODO: maybe use this? - struct __declspec(align(4)) IsQuestObjectFunctor - { - TESBoundObject* pObj; - uint32_t uiStackID; - bool bResult; - }; - - GameArray DataA; - float fCachedWeight; - BSPointerHandle hOwner; - BSReadWriteLock RWLock; -}; - -static_assert(sizeof(BGSInventoryList) == 0x80); diff --git a/Code/client/Games/Fallout4/Forms/BGSKeyword.h b/Code/client/Games/Fallout4/Forms/BGSKeyword.h deleted file mode 100644 index 265ec5216..000000000 --- a/Code/client/Games/Fallout4/Forms/BGSKeyword.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#include -#include - -struct BGSKeyword : TESForm -{ - virtual ~BGSKeyword(); - - BSFixedString keyword; -}; diff --git a/Code/client/Games/Fallout4/Forms/BGSNote.h b/Code/client/Games/Fallout4/Forms/BGSNote.h deleted file mode 100644 index 5ad864db3..000000000 --- a/Code/client/Games/Fallout4/Forms/BGSNote.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include "TESBoundObject.h" -#include "TESWeightForm.h" -#include "TESValueForm.h" -#include - -struct BGSNote : TESBoundObject, TESWeightForm, TESValueForm, TESModel, TESFullName -{ -}; diff --git a/Code/client/Games/Fallout4/Forms/BGSObjectInstance.cpp b/Code/client/Games/Fallout4/Forms/BGSObjectInstance.cpp deleted file mode 100644 index 8c6e414cd..000000000 --- a/Code/client/Games/Fallout4/Forms/BGSObjectInstance.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "BGSObjectInstance.h" - -BGSObjectInstance::BGSObjectInstance(TESForm* apObject, TBO_InstanceData* apInstanceData) -{ - TP_THIS_FUNCTION(TBGSObjectInstance, void, BGSObjectInstance, TESForm* apObject, TBO_InstanceData* apInstanceData); - POINTER_FALLOUT4(TBGSObjectInstance, bgsObjectInstance, 1095749); - TiltedPhoques::ThisCall(bgsObjectInstance, this, apObject, apInstanceData); -} diff --git a/Code/client/Games/Fallout4/Forms/BGSObjectInstance.h b/Code/client/Games/Fallout4/Forms/BGSObjectInstance.h deleted file mode 100644 index b614e16f0..000000000 --- a/Code/client/Games/Fallout4/Forms/BGSObjectInstance.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -struct TESForm; -struct TBO_InstanceData; - -struct BGSObjectInstance -{ - BGSObjectInstance() = delete; - BGSObjectInstance(TESForm* apObject, TBO_InstanceData* apInstanceData); - - TESForm* pObject; - TBO_InstanceData* spInstanceData; -}; diff --git a/Code/client/Games/Fallout4/Forms/BGSOutfit.h b/Code/client/Games/Fallout4/Forms/BGSOutfit.h deleted file mode 100644 index bdf8fdc91..000000000 --- a/Code/client/Games/Fallout4/Forms/BGSOutfit.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -struct BGSOutfit : TESForm -{ - virtual ~BGSOutfit(); -}; diff --git a/Code/client/Games/Fallout4/Forms/BGSStoryManagerTree.h b/Code/client/Games/Fallout4/Forms/BGSStoryManagerTree.h deleted file mode 100644 index c01f8dec6..000000000 --- a/Code/client/Games/Fallout4/Forms/BGSStoryManagerTree.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -struct BGSStoryManagerTreeForm : TESForm -{ - uint64_t unk20; -}; diff --git a/Code/client/Games/Fallout4/Forms/BGSTextureSet.h b/Code/client/Games/Fallout4/Forms/BGSTextureSet.h deleted file mode 100644 index bf031ae6b..000000000 --- a/Code/client/Games/Fallout4/Forms/BGSTextureSet.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -struct BGSTextureSet : TESBoundObject -{ - virtual ~BGSTextureSet(); -}; diff --git a/Code/client/Games/Fallout4/Forms/BGSVoiceType.h b/Code/client/Games/Fallout4/Forms/BGSVoiceType.h deleted file mode 100644 index 99b5e91e6..000000000 --- a/Code/client/Games/Fallout4/Forms/BGSVoiceType.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -struct BGSVoiceType : TESForm -{ - virtual ~BGSVoiceType(); -}; diff --git a/Code/client/Games/Fallout4/Forms/SpellItem.h b/Code/client/Games/Fallout4/Forms/SpellItem.h deleted file mode 100644 index d4d1b2bb7..000000000 --- a/Code/client/Games/Fallout4/Forms/SpellItem.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include - -struct BGSPerk; - -struct SpellItem : MagicItem -{ - uint8_t padMI[0x108 - sizeof(MagicItem)]; - int32_t iCostOverride; - uint32_t iFlags; - MagicSystem::SpellType eSpellType; - float fChargeTime; - MagicSystem::CastingType eCastingType; - MagicSystem::Delivery eDelivery; - float fCastDuration; - float fRange; - BGSPerk* pCastingPerk; -}; - -static_assert(sizeof(SpellItem) == 0x130); diff --git a/Code/client/Games/Fallout4/Forms/TESActorBase.h b/Code/client/Games/Fallout4/Forms/TESActorBase.h deleted file mode 100644 index 3ff2dee38..000000000 --- a/Code/client/Games/Fallout4/Forms/TESActorBase.h +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -struct TESActorBase : TESBoundAnimObject -{ - virtual void sub_65(); - virtual void sub_66(); - virtual void sub_67(); - virtual void sub_68(); - - TESActorBaseData actorData; // 68 - TESContainer container; // D0 - TESSpellList spellList; // E8 - TESAIForm aiForm; // F8 - TESFullName fullName; // 120 - ActorValueOwner actorValueOwner; // 130 - BGSDestructibleObjectForm destructibleObjectForm; // 138 - BGSSkinForm skinForm; // 148 - BGSKeywordForm keywordForm; // 158 - BGSAttackDataForm attackDataForm; // 178 - BGSPerkRankArray perkRankArray; // 188 - BGSPropertySheet propertySheet; // 1A0 -}; - -static_assert(offsetof(TESActorBase, actorData) == 0x68); -static_assert(offsetof(TESActorBase, container) == 0xD0); -static_assert(offsetof(TESActorBase, spellList) == 0xE8); -static_assert(offsetof(TESActorBase, aiForm) == 0xF8); -static_assert(offsetof(TESActorBase, fullName) == 0x120); -static_assert(offsetof(TESActorBase, actorValueOwner) == 0x130); -static_assert(offsetof(TESActorBase, destructibleObjectForm) == 0x138); -static_assert(offsetof(TESActorBase, skinForm) == 0x148); -static_assert(offsetof(TESActorBase, propertySheet) == 0x1A0); -static_assert(sizeof(TESActorBase) == 0x1B0); diff --git a/Code/client/Games/Fallout4/Forms/TESAmmo.h b/Code/client/Games/Fallout4/Forms/TESAmmo.h deleted file mode 100644 index f22d675c9..000000000 --- a/Code/client/Games/Fallout4/Forms/TESAmmo.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include "TESBoundObject.h" - -struct TESAmmo : TESBoundObject, TESFullName -{ -}; diff --git a/Code/client/Games/Fallout4/Forms/TESBoundAnimObject.h b/Code/client/Games/Fallout4/Forms/TESBoundAnimObject.h deleted file mode 100644 index c6a7da91b..000000000 --- a/Code/client/Games/Fallout4/Forms/TESBoundAnimObject.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include - -struct TESBoundAnimObject : TESBoundObject -{ -}; diff --git a/Code/client/Games/Fallout4/Forms/TESBoundObject.h b/Code/client/Games/Fallout4/Forms/TESBoundObject.h deleted file mode 100644 index dab4c84a5..000000000 --- a/Code/client/Games/Fallout4/Forms/TESBoundObject.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include - -struct TESBoundObject : TESObject -{ - virtual void sub_54(); - virtual void sub_55(); - virtual void sub_56(); - virtual void sub_57(); - virtual void sub_58(); - virtual void sub_59(); - virtual void sub_5A(); - virtual void sub_5B(); - virtual void sub_5C(); - virtual void sub_5D(); - virtual void sub_5E(); - virtual void sub_5F(); - virtual void sub_60(); - virtual void sub_61(); - virtual void sub_62(); - virtual void sub_63(); - virtual void sub_64(); - - uint8_t pad20[0x68 - 0x20]; -}; - -static_assert(sizeof(TESBoundObject) == 0x68); diff --git a/Code/client/Games/Fallout4/Forms/TESClass.h b/Code/client/Games/Fallout4/Forms/TESClass.h deleted file mode 100644 index 292866d29..000000000 --- a/Code/client/Games/Fallout4/Forms/TESClass.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -struct TESClass : TESForm -{ - virtual ~TESClass(); -}; diff --git a/Code/client/Games/Fallout4/Forms/TESCombatStyle.h b/Code/client/Games/Fallout4/Forms/TESCombatStyle.h deleted file mode 100644 index cb1ba0d4f..000000000 --- a/Code/client/Games/Fallout4/Forms/TESCombatStyle.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -struct TESCombatStyle : TESForm -{ - virtual ~TESCombatStyle(); -}; diff --git a/Code/client/Games/Fallout4/Forms/TESFaction.h b/Code/client/Games/Fallout4/Forms/TESFaction.h deleted file mode 100644 index 916c40daa..000000000 --- a/Code/client/Games/Fallout4/Forms/TESFaction.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -struct TESFaction : TESForm -{ - virtual ~TESFaction(); -}; diff --git a/Code/client/Games/Fallout4/Forms/TESForm.h b/Code/client/Games/Fallout4/Forms/TESForm.h deleted file mode 100644 index 80dd193b9..000000000 --- a/Code/client/Games/Fallout4/Forms/TESForm.h +++ /dev/null @@ -1,127 +0,0 @@ -#pragma once - -#include - -enum class FormType : uint8_t -{ - Armor = 29, - Book = 30, - Container = 31, - Door = 32, - Ammo = 44, - Npc = 45, - LeveledCharacter = 46, - Character = 65, - QuestItem = 80, - Count = 0x9F -}; - -struct BGSSaveFormBuffer; -struct BGSLoadFormBuffer; - -struct TESForm : BaseFormComponent -{ - struct ChangeFlags - { - uint32_t flags; - uint64_t unk4; - uint32_t unkC; - }; - - enum FormFlags - { - DISABLED = 1 << 0xB, - }; - - static TESForm* GetById(uint32_t aId); - - virtual void sub_7(); - virtual void sub_8(); - virtual void sub_9(); - virtual void sub_A(); - virtual void sub_B(); - virtual void sub_C(); - virtual bool MarkChanged(uint32_t aChangeFlag); - virtual bool UnsetChanged(uint32_t aChangeFlag); - virtual void sub_F(); - virtual void sub_10(); - virtual bool Save(BGSSaveFormBuffer* apBuffer) const noexcept; - virtual bool Load(BGSLoadFormBuffer* apBuffer); - virtual void sub_13(); - virtual void sub_14(); - virtual void sub_15(); - virtual void sub_16(); - virtual void sub_17(); - virtual void sub_18(); - virtual FormType GetFormType(); - virtual void sub_1A(); - virtual void sub_1B(); - virtual void sub_1C(); - virtual void sub_1D(); - virtual void sub_1E(); - virtual void sub_1F(); - virtual void sub_20(); - virtual void sub_21(); - virtual void sub_22(); - virtual void sub_23(); - virtual void sub_24(); - virtual void sub_25(); - virtual void sub_26(); - virtual void sub_27(); - virtual void sub_28(); - virtual void sub_29(); - virtual void sub_2A(); - virtual void sub_2B(); - virtual void sub_2C(); - virtual void sub_2D(); - virtual void sub_2E(); - virtual void sub_2F(); - virtual void sub_30(); - virtual void sub_31(); - virtual void sub_32(); - virtual void sub_33(); - virtual void sub_34(); - virtual const char* GetName() const noexcept; - virtual void sub_36(); - virtual void sub_37(); - virtual void sub_38(); - virtual void sub_39(); - virtual void sub_3A(); - virtual void sub_3B(); - virtual void sub_3C(); - virtual void sub_3D(); - virtual void sub_3E(); - virtual void sub_3F(); - virtual void sub_40(); - virtual void sub_41(); - virtual void sub_42(); - virtual void sub_43(); - virtual void sub_44(); - virtual void sub_45(); - virtual void sub_46(); - virtual void sub_47(); - - // void CopyFromEx(TESForm* rhs); - void Save(std::string apSaveBuffer) noexcept; - void Save_Reversed(uint32_t aChangeFlags, Buffer::Writer& aWriter); - void SetSkipSaveFlag(bool aSet) noexcept; - uint32_t GetChangeFlags() const noexcept; - - void SetIgnoreFriendlyHit(bool aSet) noexcept - { - // TODO: fallout 4 impl - return; - } - bool IsDisabled() const noexcept { return (flags & DISABLED) != 0; } - bool IsTemporary() const noexcept { return formID >= 0xFF000000; } - - uintptr_t unk8; - uint32_t flags; - uint32_t formID; - uint16_t unk10; - FormType formType; - uint8_t unk1B; - uint8_t tp_flags; // This is actually padding so we can use it for any purpose -}; - -static_assert(sizeof(TESForm) == 0x20); diff --git a/Code/client/Games/Fallout4/Forms/TESGlobal.h b/Code/client/Games/Fallout4/Forms/TESGlobal.h deleted file mode 100644 index ca66386d7..000000000 --- a/Code/client/Games/Fallout4/Forms/TESGlobal.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include -#include - -struct TESGlobal : TESForm -{ - BSFixedString name; - uint8_t unk1C; - uint8_t pad[3 + 4]; - union - { - uint32_t i; - float f; - }; -}; - -static_assert(offsetof(TESGlobal, i) == 0x30); diff --git a/Code/client/Games/Fallout4/Forms/TESIdleForm.h b/Code/client/Games/Fallout4/Forms/TESIdleForm.h deleted file mode 100644 index 9eccf2737..000000000 --- a/Code/client/Games/Fallout4/Forms/TESIdleForm.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include - -struct TESIdleForm : TESForm -{ -}; diff --git a/Code/client/Games/Fallout4/Forms/TESLevCharacter.h b/Code/client/Games/Fallout4/Forms/TESLevCharacter.h deleted file mode 100644 index 850d3de4f..000000000 --- a/Code/client/Games/Fallout4/Forms/TESLevCharacter.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include -#include -#include - -struct TESLevCharacter : TESBoundAnimObject -{ - // Components - TESLeveledList leveledList; - BGSModelMaterialSwap modelTextureSwap; -}; - -static_assert(offsetof(TESLevCharacter, leveledList) == 0x68); -static_assert(offsetof(TESLevCharacter, modelTextureSwap) == 0x98); -static_assert(sizeof(TESLevCharacter) == 0xD8); diff --git a/Code/client/Games/Fallout4/Forms/TESNPC.cpp b/Code/client/Games/Fallout4/Forms/TESNPC.cpp deleted file mode 100644 index 3e67a5154..000000000 --- a/Code/client/Games/Fallout4/Forms/TESNPC.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include - -#include - -TP_THIS_FUNCTION(TSetLeveledNpc, TESNPC*, TESNPC, TESNPC*); -static TSetLeveledNpc* RealSetLeveledNpc = nullptr; - -TESNPC* TP_MAKE_THISCALL(HookSetLeveledNpc, TESNPC, TESNPC* apSelectedNpc) -{ - spdlog::info("For TESNPC: {}, spawning: {}", apThis->fullName.value.AsAscii(), apSelectedNpc->fullName.value.AsAscii()); - - return TiltedPhoques::ThisCall(RealSetLeveledNpc, apThis, Cast(TESForm::GetById(0x3B547))); -} - -static TiltedPhoques::Initializer s_npcInitHooks( - []() - { - POINTER_FALLOUT4(TSetLeveledNpc, s_SetLeveledNpc, 472573); - - RealSetLeveledNpc = s_SetLeveledNpc.Get(); - - // TP_HOOK(&RealSetLeveledNpc, HookSetLeveledNpc); - }); diff --git a/Code/client/Games/Fallout4/Forms/TESNPC.h b/Code/client/Games/Fallout4/Forms/TESNPC.h deleted file mode 100644 index 2c9ee4be8..000000000 --- a/Code/client/Games/Fallout4/Forms/TESNPC.h +++ /dev/null @@ -1,98 +0,0 @@ -#pragma once - -#include - -#include -#include -#include -#include -#include -#include - -struct BGSTextureSet; -struct BGSColorForm; -struct TESClass; -struct TESCombatStyle; -struct BGSOutfit; -struct TESFaction; -struct BGSHeadPart; - -struct TESNPC : TESActorBase -{ - static constexpr FormType Type = FormType::Npc; - - static TESNPC* Create(const String& acBuffer, uint32_t aChangeFlags) noexcept; - - // TODO: ft, verify whether it also works like this in fallout 4 - TESNPC* GetTemplateBase() const noexcept - { - TESNPC* pTemplate = npcTemplate; - - while (pTemplate && pTemplate->IsTemporary()) - pTemplate = pTemplate->npcTemplate; - - return pTemplate; - } - - struct Head - { - BGSColorForm* hairColor; - void* unk8; - BGSTextureSet* textures; - }; - - TESRaceForm raceForm; - BGSOverridePackCollection overridePackCollection; // 1C0 - TESNPC* npcTemplate; - BGSForcedLocRefType forcedLocRefType; - BGSNativeTerminalForm nativeTerminalForm; - void* menuOpenCloseEventSink; - BGSAttachParentArray attachParentArray; - - uint32_t unk238; // 238 - set to 0 - uint16_t unk23C; // 23C - set to 0 - uint8_t unk23E; // 23E - set to 1 - uint8_t pad23F; // 23F - TESClass* npcClass; // 240 - Head* head; // 248 - set to nullptr - void* unk250; // 250 - TESCombatStyle* combatStyle; // 258 - uint8_t unk260[8]; // 260 - void* unk268; // 268 - void* unk270; // 270 - float smallWeight; // 278 - float muscularWeight; // 27C - float largeWeight; // 280 - float unk284; // 284 - float unk288; // 288 - uint32_t pad28C; // 28C - void* unk290; // 290 - void* unk298; // 298 - void* unk2A0; // 2A0 - set to nullptr - void* unk2A8; // 2A8 - BGSOutfit* outfits[2]; // 2B0 - void* unk2C0; // 2C0 - TESFaction* faction; // 2C8 - BGSHeadPart** headParts; // 2D0 - void* unk2D8; // 2D8 - void* morphRegionData; // 2E0 - uint8_t headPartCount; // 2E8 - uint8_t unk2E9; // 2E9 - uint8_t skinColor[4]; // 2EA - uint16_t pad2EE; // 2EE - uint64_t unk2F0; // 2F0 - not sure about type - void* unk2F8; // 2F8 - GameArray* tints; // 300 - - BGSHeadPart* GetHeadPart(uint32_t aType); - void Serialize(String* apSaveBuffer) const noexcept; - void Deserialize(const String& acBuffer, uint32_t aChangeFlags) noexcept; - void Initialize() noexcept; -}; - -static_assert(offsetof(TESNPC, unk238) == 0x238); -static_assert(offsetof(TESNPC, pad28C) == 0x28C); -static_assert(offsetof(TESNPC, headPartCount) == 0x2E8); -static_assert(offsetof(TESNPC, unk2F8) == 0x2F8); -static_assert(offsetof(TESNPC, tints) == 0x300); -static_assert(sizeof(TESNPC) == 0x308); diff --git a/Code/client/Games/Fallout4/Forms/TESObject.h b/Code/client/Games/Fallout4/Forms/TESObject.h deleted file mode 100644 index 7bc7fcffe..000000000 --- a/Code/client/Games/Fallout4/Forms/TESObject.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include - -struct TESObject : TESForm -{ - virtual void sub_48(); - virtual void sub_49(); - virtual void sub_4A(); - virtual void sub_4B(); - virtual void sub_4C(); - virtual void sub_4D(); - virtual void sub_4E(); - virtual void sub_4F(); - virtual void sub_50(); - virtual void sub_51(); - virtual void sub_52(); - virtual void sub_53(); -}; diff --git a/Code/client/Games/Fallout4/Forms/TESObjectARMO.h b/Code/client/Games/Fallout4/Forms/TESObjectARMO.h deleted file mode 100644 index adf920a7a..000000000 --- a/Code/client/Games/Fallout4/Forms/TESObjectARMO.h +++ /dev/null @@ -1,45 +0,0 @@ -#pragma once - -#include "TESBoundObject.h" -#include - -struct BGSTypedFormValuePair -{ - union SharedVal - { - unsigned int i; - float f; - }; -}; - -enum class STAGGER_MAGNITUDE : int32_t -{ - STAGGER_NONE = 0x0, - STAGGER_SMALL = 0x1, - STAGGER_MEDIUM = 0x2, - STAGGER_LARGE = 0x3, - STAGGER_EXTRA_LARGE = 0x4, - STAGGER_MAGNITUDE_COUNT = 0x5, - STAGGER_MAGNITUDE_MIN = 0x0, - STAGGER_MAGNITUDE_MAX = 0x4, -}; - -struct TESObjectARMO : TESBoundObject, TESFullName -{ - struct InstanceData : TBO_InstanceData - { - GameArray* pEnchantments; - GameArray* pMaterialSwapA; - BGSBlockBashData* pBlockBashData; - BGSKeywordForm* pKeywords; - GameArray>* pDamageTypesA; - GameArray>* pActorValuesA; - float fWeight; - float fColorRemappingIndex; - uint32_t uiValue; - uint32_t uiHealth; - STAGGER_MAGNITUDE eStaggerRating; - uint16_t usRating; - uint16_t usIndex; - }; -}; diff --git a/Code/client/Games/Fallout4/Forms/TESObjectBOOK.h b/Code/client/Games/Fallout4/Forms/TESObjectBOOK.h deleted file mode 100644 index 794a05681..000000000 --- a/Code/client/Games/Fallout4/Forms/TESObjectBOOK.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include -#include - -struct TESObjectBOOK : TESBoundObject, TESFullName -{ -}; diff --git a/Code/client/Games/Fallout4/Forms/TESObjectCELL.cpp b/Code/client/Games/Fallout4/Forms/TESObjectCELL.cpp deleted file mode 100644 index 9b2129630..000000000 --- a/Code/client/Games/Fallout4/Forms/TESObjectCELL.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include -#include - -Vector TESObjectCELL::GetRefsByFormTypes(const Vector& aFormTypes) noexcept -{ - Vector references{}; - - if (!objects.data) - return references; - - for (TESObjectREFR* pObject : objects) - { - if (!pObject) - continue; - - for (FormType formType : aFormTypes) - { - if (pObject->baseForm->formType == formType) - references.push_back(pObject); - } - } - - return references; -} diff --git a/Code/client/Games/Fallout4/Forms/TESObjectCELL.h b/Code/client/Games/Fallout4/Forms/TESObjectCELL.h deleted file mode 100644 index 1f55f1163..000000000 --- a/Code/client/Games/Fallout4/Forms/TESObjectCELL.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include -#include - -struct TESObjectREFR; -struct TESWorldSpace; - -struct TESObjectCELL : TESForm -{ - Vector GetRefsByFormTypes(const Vector& aFormTypes) noexcept; - void GetCOCPlacementInfo(NiPoint3* aOutPos, NiPoint3* aOutRot, bool aAllowCellLoad) noexcept; - - uint8_t pad20[0x40 - 0x20]; - uint8_t cellFlags[5]; - uint8_t pad45[0x70 - 0x45]; - - GameArray objects; // 70 - - uint8_t pad88[0xC8 - 0x88]; - TESWorldSpace* worldspace; // C8 - - bool IsValid() const { return cellFlags[4] == 8; } -}; - -static_assert(offsetof(TESObjectCELL, cellFlags) == 0x40); -static_assert(offsetof(TESObjectCELL, objects) == 0x70); -static_assert(offsetof(TESObjectCELL, worldspace) == 0xC8); diff --git a/Code/client/Games/Fallout4/Forms/TESObjectMISC.h b/Code/client/Games/Fallout4/Forms/TESObjectMISC.h deleted file mode 100644 index 76bca1592..000000000 --- a/Code/client/Games/Fallout4/Forms/TESObjectMISC.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include -#include - -struct TESObjectMISC : TESBoundObject, TESFullName -{ -}; diff --git a/Code/client/Games/Fallout4/Forms/TESObjectWEAP.h b/Code/client/Games/Fallout4/Forms/TESObjectWEAP.h deleted file mode 100644 index 97bfef5ac..000000000 --- a/Code/client/Games/Fallout4/Forms/TESObjectWEAP.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include "TESBoundObject.h" - -struct TESObjectWEAP : TESBoundObject, TESFullName -{ -}; diff --git a/Code/client/Games/Fallout4/Forms/TESPackage.h b/Code/client/Games/Fallout4/Forms/TESPackage.h deleted file mode 100644 index e98e2b88f..000000000 --- a/Code/client/Games/Fallout4/Forms/TESPackage.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include "TESForm.h" - -struct TESPackage : TESForm -{ -}; diff --git a/Code/client/Games/Fallout4/Forms/TESQuest.cpp b/Code/client/Games/Fallout4/Forms/TESQuest.cpp deleted file mode 100644 index fc2db20f2..000000000 --- a/Code/client/Games/Fallout4/Forms/TESQuest.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include - -#include - -#include - -void TESQuest::SetActive(bool toggle) -{ - // bethesda implemented a new event dispatcher - // whenever a quest is activated, that's why - // we use the game function instead of reimplementing it. - using TSetActive = void(TESQuest*, bool); - POINTER_FALLOUT4(TSetActive, SetActive, 1567563); - - SetActive(this, toggle); -} - -void TESQuest::SetStopped() -{ - flags &= 0xFFFE; - MarkChanged(2); -} - -bool TESQuest::EnsureQuestStarted(bool& success, bool force) -{ - TP_THIS_FUNCTION(TSetRunning, bool, TESQuest, bool*, bool); - POINTER_FALLOUT4(TSetRunning, SetRunning, 966434); - return SetRunning(this, &success, force); -} - -bool TESQuest::SetStage(uint16_t stage) -{ - using TSetStage = bool(TESQuest*, uint16_t); - POINTER_FALLOUT4(TSetStage, SetStage, 952800); - - return SetStage(this, stage); -} - -void TESQuest::ScriptSetStage(uint16_t stageIndex) -{ - for (auto& stage : stages) - { - if (stage.stageIndex == stageIndex && stage.IsDone()) - return; - } - - using Quest = TESQuest; - PAPYRUS_FUNCTION(void, Quest, SetCurrentStageID, int); - s_pSetCurrentStageID(this, stageIndex); -} diff --git a/Code/client/Games/Fallout4/Forms/TESQuest.h b/Code/client/Games/Fallout4/Forms/TESQuest.h deleted file mode 100644 index c11c00153..000000000 --- a/Code/client/Games/Fallout4/Forms/TESQuest.h +++ /dev/null @@ -1,92 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -struct TESQuest : BGSStoryManagerTreeForm -{ - enum Flags : uint16_t - { - Disabled, - Enabled = 1 << 0, - Completed = 1 << 1, - StageWait = 1 << 7, - Unk = 2 << 10, // this is very likely a combination - Unk2 = 8 << 10, - }; - - enum class Type : uint8_t - { - None = 0x0, - QTYPE_MAINQUEST = 0x1, - QTYPE_BROTHERHOOD = 0x2, - QTYPE_INSTITUTE = 0x3, - QTYPE_MINUTEMEN = 0x4, - QTYPE_RAILROAD = 0x5, - Miscellaneous = 0x6, - QTYPE_SIDEQUESTS = 0x7, - QTYPE_DLC01 = 0x8, - QTYPE_DLC02 = 0x9, - QTYPE_DLC03 = 0xA, - QTYPE_COUNT = 0xB, - }; - - struct Objective - { - BSFixedString nameRef; - TESQuest* parent; - char pad10[0x8]; // 0x0010 - uint16_t flags; // 0x0018 - char pad1A[0x2]; // 0x001A - uint16_t stageId; // 0x001C - }; - - struct Stage - { - uint32_t pad0; - char pad4[0x4]; // 0x0004 - uint16_t stageIndex; // 0x0008 - char padA[0x6]; // 0x000A - int32_t someArrayCount; // 0x0010 - char pad14[0x6]; // 0x0014 - uint8_t flags; // 0x001A - uint16_t pad1B; // 0x001B - - inline bool IsDone() const { return flags & 1; } - }; - - void* pUnkQuest; // maybe a TESFullname? - char pad30[0xC4]; // 0x0030 - uint16_t flags; // 0x00F4 - uint8_t priority; // 0x00F6 - Type type; // 0x00F7 - int32_t scopedStatus; // 0x00F8 - char padFC[0x4]; // 0x00FC - GameArray stages; // 0x0100 - GameArray objectives; // 0x0118 - char pad130[0x184]; // 0x0130 - uint16_t currentStage; // 0x02B4 - uint16_t pad2B6; // 0x02B6 - BSString idName; // 0x02B8 - char pad2C4[0x2C - 8]; - - void SetActive(bool toggle); - bool SetStage(uint16_t stage); - void SetStopped(); - void ScriptSetStage(uint16_t stage); - - inline bool IsActive() const { return ((flags >> 11) & 1); } - inline bool IsCompleted() const { return ((flags >> 1) & 1); } - inline bool IsStopped() const { return !(flags & Flags::Enabled) && flags >= 0; } - - bool EnsureQuestStarted(bool& succeded, bool force); -}; - -static_assert(sizeof(TESQuest) == 752); -// static_assert(offsetof(TESQuest, fullName) == 0x28); -static_assert(offsetof(TESQuest, objectives) == 0x118); -static_assert(offsetof(TESQuest, currentStage) == 0x2B4); -static_assert(offsetof(TESQuest, flags) == 0xF4); -static_assert(offsetof(TESQuest, idName) == 0x2B8); diff --git a/Code/client/Games/Fallout4/Forms/TESRace.h b/Code/client/Games/Fallout4/Forms/TESRace.h deleted file mode 100644 index b667e35e5..000000000 --- a/Code/client/Games/Fallout4/Forms/TESRace.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#include -#include - -struct TESRace : TESForm -{ - virtual ~TESRace(); - - TESFullName name; -}; diff --git a/Code/client/Games/Fallout4/Forms/TESTopicInfo.h b/Code/client/Games/Fallout4/Forms/TESTopicInfo.h deleted file mode 100644 index f68b88319..000000000 --- a/Code/client/Games/Fallout4/Forms/TESTopicInfo.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include - -struct TESTopicInfo : TESForm -{ - uint8_t pad20[0x42 - 0x20]; - uint8_t ucSubtitlePriority; - uint8_t pad43[0x50 - 0x43]; -}; - -static_assert(sizeof(TESTopicInfo) == 0x50); diff --git a/Code/client/Games/Fallout4/Forms/TESValueForm.h b/Code/client/Games/Fallout4/Forms/TESValueForm.h deleted file mode 100644 index 9a9042616..000000000 --- a/Code/client/Games/Fallout4/Forms/TESValueForm.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -struct TESValueForm : BaseFormComponent -{ - int32_t iValue; -}; diff --git a/Code/client/Games/Fallout4/Forms/TESWeather.h b/Code/client/Games/Fallout4/Forms/TESWeather.h deleted file mode 100644 index 9cc0e3263..000000000 --- a/Code/client/Games/Fallout4/Forms/TESWeather.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -struct TESWeather : TESForm -{ -}; diff --git a/Code/client/Games/Fallout4/Forms/TESWeightForm.h b/Code/client/Games/Fallout4/Forms/TESWeightForm.h deleted file mode 100644 index e9dfd23d8..000000000 --- a/Code/client/Games/Fallout4/Forms/TESWeightForm.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -struct TESWeightForm : BaseFormComponent -{ - float fWeight; -}; diff --git a/Code/client/Games/Fallout4/Forms/TESWorldSpace.h b/Code/client/Games/Fallout4/Forms/TESWorldSpace.h deleted file mode 100644 index 6eb5b5911..000000000 --- a/Code/client/Games/Fallout4/Forms/TESWorldSpace.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#include -#include - -struct TESWorldSpace : TESForm -{ - virtual ~TESWorldSpace(); - - // aX and aY are coordinates, not positions - TESObjectCELL* LoadCell(int32_t aXCoordinate, int32_t aYCoordinate) noexcept; - - TESFullName fullName; -}; diff --git a/Code/client/Games/Fallout4/Havok.h b/Code/client/Games/Fallout4/Havok.h deleted file mode 100644 index 09f2a76bd..000000000 --- a/Code/client/Games/Fallout4/Havok.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -struct bhkCharRigidBodyController -{ - virtual ~bhkCharRigidBodyController(); - - uint8_t unk8[0x300 - 0x8]; - uint32_t flags; -}; diff --git a/Code/client/Games/Fallout4/Havok/BShkbAnimationGraph.h b/Code/client/Games/Fallout4/Havok/BShkbAnimationGraph.h deleted file mode 100644 index 0cb15e5c8..000000000 --- a/Code/client/Games/Fallout4/Havok/BShkbAnimationGraph.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -struct BShkbHkxDB; -struct hkbBehaviorGraph; - -struct BShkbAnimationGraph -{ - virtual ~BShkbAnimationGraph(){}; - - uint8_t pad8[0x370 - 0x8]; - - BShkbHkxDB* hkxDB; // 370 - hkbBehaviorGraph* behaviorGraph; // 378 -}; diff --git a/Code/client/Games/Fallout4/Havok/BShkbHkxDB.h b/Code/client/Games/Fallout4/Havok/BShkbHkxDB.h deleted file mode 100644 index 8b4764f93..000000000 --- a/Code/client/Games/Fallout4/Havok/BShkbHkxDB.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include - -struct BShkbHkxDB -{ - virtual ~BShkbHkxDB(); - - uint8_t pad8[0x84 - 0x8]; - hkHashTable animationVariables; // 84 -}; - -static_assert(offsetof(BShkbHkxDB, animationVariables) == 0x84); diff --git a/Code/client/Games/Fallout4/Havok/hkHashTable.h b/Code/client/Games/Fallout4/Havok/hkHashTable.h deleted file mode 100644 index f31f9d718..000000000 --- a/Code/client/Games/Fallout4/Havok/hkHashTable.h +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -#include - -#pragma pack(push, 1) // This structure is packed in havok - -struct hkHashTable -{ - struct Entry - { - BSFixedString key; - int32_t value; - uint32_t padC; - Entry* next; - }; - - uint32_t bucketCount; // 0 - uint8_t pad4[0xC - 0x4]; // 4 - void* end; // C - uint8_t pad[0x1C - 0x14]; - Entry* buckets; // 1C -}; - -static_assert(offsetof(hkHashTable, end) == 0xC); -static_assert(offsetof(hkHashTable, buckets) == 0x1C); - -#pragma pack(pop) diff --git a/Code/client/Games/Fallout4/Havok/hkbBehaviorGraph.h b/Code/client/Games/Fallout4/Havok/hkbBehaviorGraph.h deleted file mode 100644 index a6009268c..000000000 --- a/Code/client/Games/Fallout4/Havok/hkbBehaviorGraph.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include - -struct hkbStateMachine; - -struct hkbBehaviorGraph -{ - virtual ~hkbBehaviorGraph(); - - uint8_t pad8[0xC0 - 0x8]; - hkbStateMachine* stateMachine; - uint8_t padC8[0x110 - 0xC8]; - hkbVariableValueSet* animationVariables; // 110 -}; diff --git a/Code/client/Games/Fallout4/Havok/hkbStateMachine.h b/Code/client/Games/Fallout4/Havok/hkbStateMachine.h deleted file mode 100644 index 2a15e6bc3..000000000 --- a/Code/client/Games/Fallout4/Havok/hkbStateMachine.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -struct hkbStateMachine -{ - virtual ~hkbStateMachine(); - - uint8_t pad8[0x38 - 0x8]; - char* name; -}; - -static_assert(offsetof(hkbStateMachine, name) == 0x38); diff --git a/Code/client/Games/Fallout4/Havok/hkbVariableValueSet.h b/Code/client/Games/Fallout4/Havok/hkbVariableValueSet.h deleted file mode 100644 index 0396a48f9..000000000 --- a/Code/client/Games/Fallout4/Havok/hkbVariableValueSet.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -// TODO: this should be a template -struct hkbVariableValueSet -{ - virtual ~hkbVariableValueSet(); - - uint8_t pad8[0x8]; // 8 - uint32_t* data; // 10 - uint32_t size; // 18 -}; - -static_assert(offsetof(hkbVariableValueSet, data) == 0x10); -static_assert(offsetof(hkbVariableValueSet, size) == 0x18); diff --git a/Code/client/Games/Fallout4/Interface/IMenu.h b/Code/client/Games/Fallout4/Interface/IMenu.h deleted file mode 100644 index 960c893db..000000000 --- a/Code/client/Games/Fallout4/Interface/IMenu.h +++ /dev/null @@ -1,128 +0,0 @@ -#pragma once - -class UserEvents -{ -public: - enum INPUT_CONTEXT_ID : int - { - ICI_MAIN_GAMEPLAY = 0x0, - ICI_BASIC_MENU_NAV = 0x1, - ICI_THUMB_NAV = 0x2, - ICI_VIRT_CONTROLLER = 0x3, - ICI_CURSOR = 0x4, - ICI_LTHUMB_CURSOR = 0x5, - ICI_CONSOLE = 0x6, - ICI_DEBUG_TEXT = 0x7, - ICI_BOOK = 0x8, - ICI_DEBUG_OVERLAY = 0x9, - ICI_TFC = 0xA, - ICI_DEBUG_MAP = 0xB, - ICI_LOCKPICK = 0xC, - ICI_VATS = 0xD, - ICI_VATS_PLAYBACK = 0xE, - ICI_MULTI_ACTIVATE = 0xF, - ICI_WORKSHOP = 0x10, - ICI_SCOPE = 0x11, - ICI_SITWAIT = 0x12, - ICI_LOOKSMENU = 0x13, - ICI_WORKSHOP_ADDENDUM = 0x14, - ICI_PAUSEMENU = 0x15, - ICI_LEVELUPMENU = 0x16, - ICI_LEVELUPMENU_PREVNEXT = 0x17, - ICI_MAINMENU = 0x18, - ICI_QUICKCONTAINERMENU = 0x19, - ICI_SPECIALACTIVATEROLLOVER = 0x1A, - ICI_TWOBUTTONROLLOVER = 0x1B, - ICI_QUICKCONTAINERMENU_PERK = 0x1C, - ICI_VERTIBIRD = 0x1D, - ICI_PLAYBINKMENU = 0x1E, - ICI_ROBOT_MOD_ADDENDUM = 0x1F, - ICI_CREATION_CLUB = 0x20, - ICI_COUNT = 0x21, - ICI_NONE = 0x22, - }; -}; - -struct __declspec(align(8)) BSInputEventUser -{ - void* __vftable /*VFT*/; - bool InputEventHandlingEnabled; -}; - -struct __declspec(align(8)) Scaleform_RefCountImplCore -{ - void* __vftable /*VFT*/; - volatile int RefCount; -}; - -struct IMenu : Scaleform_RefCountImplCore, BSInputEventUser -{ - enum UI_MENU_FLAGS : int32_t - { - UIMF_PAUSES_GAME = 0x1, - UIMF_ALWAYS_OPEN = 0x2, - UIMF_USES_CURSOR = 0x4, - UIMF_USES_MENU_CONTEXT = 0x8, - UIMF_MODAL = 0x10, - UIMF_FREEZE_FRAME_BACKGROUND = 0x20, - UIMF_ON_STACK = 0x40, - UIMF_DISABLE_PAUSE_MENU = 0x80, - UIMF_REQUIRES_UPDATE = 0x100, - UIMF_TOPMOST_RENDERED_MENU = 0x200, - UIMF_UPDATE_USES_CURSOR = 0x400, - UIMF_ALLOW_SAVING = 0x800, - UIMF_RENDERS_OFFSCREEN_TARGETS = 0x1000, - UIMF_INVENTORY_ITEM_MENU = 0x2000, - UIMF_DONT_HIDE_CURSOR_WHEN_TOPMOST = 0x4000, - UIMF_CUSTOM_RENDERING = 0x8000, - UIMF_ASSIGN_CURSOR_TO_RENDERER = 0x10000, - UIMF_APPLICATION_MENU = 0x20000, - UIMF_HAS_BUTTON_BAR = 0x40000, - UIMF_IS_TOP_BUTTON_BAR = 0x80000, - UIMF_ADVANCES_UNDER_PAUSE_MENU = 0x100000, - UIMF_RENDERS_UNDER_PAUSE_MENU = 0x200000, - UIMF_USES_BLURRED_BACKGROUND = 0x400000, - UIMF_COMPANION_APP_ALLOWED = 0x800000, - UIMF_FREEZE_FRAME_PAUSE = 0x1000000, - UIMF_SKIP_RENDER_DURING_FREEZE_FRAME_SCREENSHOT = 0x2000000, - UIMF_LARGE_SCALEFORM_RENDER_CACHE_MODE = 0x4000000, - UIMF_USES_MOVEMENT_TO_DIRECTION = 0x8000000, - }; - - void SetFlag(UI_MENU_FLAGS auiFlag) - { - int* val = reinterpret_cast(&uiMenuFlags); - *val |= auiFlag; - } - - void ClearFlag(UI_MENU_FLAGS auiFlag) - { - int* val = reinterpret_cast(&uiMenuFlags); - *val &= ~auiFlag; - } - - bool PausesGame() const { return uiMenuFlags & UIMF_PAUSES_GAME; } - - bool FreezesBackground() const { return uiMenuFlags & UIMF_FREEZE_FRAME_BACKGROUND; } - - bool FreezesFramePause() const { return uiMenuFlags & UIMF_FREEZE_FRAME_PAUSE; } - - // force the game to generate a vt - virtual void m1() = 0; - - char menuObj[0x20 - 8]; // scaleform var. - void* pMovie; - BSFixedString CustomRendererName; - BSFixedString MenuName; - UI_MENU_FLAGS uiMenuFlags; - uint32_t AdvanceWithoutRenderCount; // atomic - bool bPassesTopMenuTest; - bool bMenuCanBeVisible; - bool bHasQuadsForCumstomRenderer; - bool bHasDoneFirstAdvanceMovie; - uint8_t ucDepthPriority; - UserEvents::INPUT_CONTEXT_ID eInputContext; -}; - -static_assert(offsetof(IMenu, IMenu::uiMenuFlags) == 0x58); -static_assert(sizeof(IMenu) == 0x70); diff --git a/Code/client/Games/Fallout4/Interface/UI.cpp b/Code/client/Games/Fallout4/Interface/UI.cpp deleted file mode 100644 index 9e18edf5b..000000000 --- a/Code/client/Games/Fallout4/Interface/UI.cpp +++ /dev/null @@ -1,329 +0,0 @@ -#include "UI.h" -#include "IMenu.h" - -UI* UI::Get() -{ - POINTER_FALLOUT4(UI*, s_instance, 548588); - return *s_instance.Get(); -} - -bool UI::GetMenuOpen(const BSFixedString& acName) const -{ - if (acName.data == nullptr) - return false; - - TP_THIS_FUNCTION(TMenuSystem_IsOpen, bool, const UI, const BSFixedString&); - POINTER_FALLOUT4(TMenuSystem_IsOpen, s_isMenuOpen, 1065115); - return TiltedPhoques::ThisCall(s_isMenuOpen.Get(), this, acName); -} - -IMenu* UI::FindMenuByName(const char* acName) -{ - for (const auto& it : menuMap) - { - if (!strcmp(it.key.AsAscii(), acName)) - return it.value.spMenu; - } - return nullptr; -} - -void UI::PrintMenuMap() -{ - for (const auto& it : menuMap) - { - spdlog::info("{} @ {}", it.key.AsAscii(), fmt::ptr(it.value.spMenu)); - } -} - -void UI::PrintActiveMenus() -{ - auto findName = [&](IMenu* apMenu) -> const char* - { - for (const auto& it : menuMap) - { - if (it.value.spMenu == apMenu) - return it.key.AsAscii(); - } - return nullptr; - }; - - for (IMenu* pMenu : MenuStack) - { - spdlog::info("{}", findName(pMenu)); - } -} - -static void UnfreezeMenu(IMenu* apEntry) -{ - if (apEntry->PausesGame()) - apEntry->ClearFlag(IMenu::UIMF_PAUSES_GAME); - - if (apEntry->FreezesBackground()) - apEntry->ClearFlag(IMenu::UIMF_FREEZE_FRAME_BACKGROUND); - - if (apEntry->FreezesFramePause()) - apEntry->ClearFlag(IMenu::UIMF_FREEZE_FRAME_PAUSE); -} - -/* All known menus: -StreamingInstallMenu @ 0x0 -PipboyOpeningSequenceMenu @ 0x0 -MessageBoxMenu @ 0x0 -CursorMenu @ 0x0 -MainMenu @ 0x0 -TerminalHolotapeMenu @ 0x0 -BarterMenu @ 0x0 -TerminalMenuButtons @ 0x0 -SleepWaitMenu @ 0x0 -PromptMenu @ 0x0 -TutorialMenu @ 0x0 -PowerArmorModMenu @ 0x0 -TerminalMenu @ 0x0 -ExamineConfirmMenu @ 0x0 -TitleSequenceMenu @ 0x0 -SitWaitMenu @ 0x0 -RobotModMenu @ 0x0 -FavoritesMenu @ 0x0 -GenericMenu @ 0x0 -PipboyHolotapeMenu @ 0x0 -LoadingMenu @ 0x0 -PowerArmorHUDMenu @ 0x0 -BookMenu @ 0x0 -Console @ 0x0 -ButtonBarMenu @ 0x20a51ed70 -ConsoleNativeUIMenu @ 0x0 -PlayBinkMenu @ 0x0 -LevelUpMenu @ 0x0 -FaderMenu @ 0x20a0aa4f0 -PauseMenu @ 0x0 -CreditsMenu @ 0x0 -VignetteMenu @ 0x0 -ScopeMenu @ 0x0 -HUDMenu @ 0x20b0b8b40 -MultiActivateMenu @ 0x0 -LooksMenu @ 0x0 -DialogueMenu @ 0x0 -LockpickingMenu @ 0x0 -ExamineMenu @ 0x0 -CreationClubMenu @ 0x0 -Workshop_CaravanMenu @ 0x0 -SPECIALMenu @ 0x0 -ContainerMenu @ 0x0 -VertibirdMenu @ 0x0 -CookingMenu @ 0x0 -PipboyMenu @ 0x0 -VATSMenu @ 0x0 -SafeZoneMenu @ 0x0 -WorkshopMenu @ 0x0 -StreamingInstallMenu @ 0x0 -PipboyOpeningSequenceMenu @ 0x0 -MessageBoxMenu @ 0x0 -CursorMenu @ 0x0 -MainMenu @ 0x0 -TerminalHolotapeMenu @ 0x0 -BarterMenu @ 0x0 -TerminalMenuButtons @ 0x0 -SleepWaitMenu @ 0x0 -PromptMenu @ 0x0 -TutorialMenu @ 0x0 -PowerArmorModMenu @ 0x0 -TerminalMenu @ 0x0 -ExamineConfirmMenu @ 0x0 -TitleSequenceMenu @ 0x0 -SitWaitMenu @ 0x0 -RobotModMenu @ 0x0 -FavoritesMenu @ 0x0 -GenericMenu @ 0x0 -PipboyHolotapeMenu @ 0x0 -LoadingMenu @ 0x0 -PowerArmorHUDMenu @ 0x0 -BookMenu @ 0x0 -Console @ 0x0 -ButtonBarMenu @ 0x20a51ed70 -ConsoleNativeUIMenu @ 0x0 -PlayBinkMenu @ 0x0 -LevelUpMenu @ 0x0 -FaderMenu @ 0x20a0aa4f0 -PauseMenu @ 0x0 -CreditsMenu @ 0x0 -VignetteMenu @ 0x0 -ScopeMenu @ 0x0 -HUDMenu @ 0x20b0b8b40 -MultiActivateMenu @ 0x0 -LooksMenu @ 0x0 -DialogueMenu @ 0x0 -LockpickingMenu @ 0x0 -ExamineMenu @ 0x0 -CreationClubMenu @ 0x0 -Workshop_CaravanMenu @ 0x0 -SPECIALMenu @ 0x0 -ContainerMenu @ 0x0 -VertibirdMenu @ 0x0 -CookingMenu @ 0x0 -PipboyMenu @ 0x0 -VATSMenu @ 0x0 -SafeZoneMenu @ 0x0 -WorkshopMenu @ 0x0 -StreamingInstallMenu @ 0x0 -PipboyOpeningSequenceMenu @ 0x0 -MessageBoxMenu @ 0x0 -CursorMenu @ 0x0 -MainMenu @ 0x0 -TerminalHolotapeMenu @ 0x0 -BarterMenu @ 0x0 -TerminalMenuButtons @ 0x0 -SleepWaitMenu @ 0x0 -PromptMenu @ 0x0 -TutorialMenu @ 0x0 -PowerArmorModMenu @ 0x0 -TerminalMenu @ 0x0 -ExamineConfirmMenu @ 0x0 -TitleSequenceMenu @ 0x0 -SitWaitMenu @ 0x0 -RobotModMenu @ 0x0 -FavoritesMenu @ 0x0 -GenericMenu @ 0x0 -PipboyHolotapeMenu @ 0x0 -LoadingMenu @ 0x0 -PowerArmorHUDMenu @ 0x0 -BookMenu @ 0x0 -Console @ 0x0 -ButtonBarMenu @ 0x20a51ed70 -ConsoleNativeUIMenu @ 0x0 -PlayBinkMenu @ 0x0 -LevelUpMenu @ 0x0 -FaderMenu @ 0x20a0aa4f0 -PauseMenu @ 0x0 -CreditsMenu @ 0x0 -VignetteMenu @ 0x0 -ScopeMenu @ 0x0 -HUDMenu @ 0x20b0b8b40 -MultiActivateMenu @ 0x0 -LooksMenu @ 0x0 -DialogueMenu @ 0x0 -LockpickingMenu @ 0x0 -ExamineMenu @ 0x0 -CreationClubMenu @ 0x0 -Workshop_CaravanMenu @ 0x0 -SPECIALMenu @ 0x0 -ContainerMenu @ 0x0 -VertibirdMenu @ 0x0 -CookingMenu @ 0x0 -PipboyMenu @ 0x0 -VATSMenu @ 0x0 -SafeZoneMenu @ 0x0 -WorkshopMenu @ 0x0 -StreamingInstallMenu @ 0x0 -PipboyOpeningSequenceMenu @ 0x0 -MessageBoxMenu @ 0x0 -CursorMenu @ 0x0 -MainMenu @ 0x0 -TerminalHolotapeMenu @ 0x0 -BarterMenu @ 0x0 -TerminalMenuButtons @ 0x0 -SleepWaitMenu @ 0x0 -PromptMenu @ 0x0 -TutorialMenu @ 0x0 -PowerArmorModMenu @ 0x0 -TerminalMenu @ 0x0 -ExamineConfirmMenu @ 0x0 -TitleSequenceMenu @ 0x0 -SitWaitMenu @ 0x0 -RobotModMenu @ 0x0 -FavoritesMenu @ 0x0 -GenericMenu @ 0x0 -PipboyHolotapeMenu @ 0x0 -LoadingMenu @ 0x0 -PowerArmorHUDMenu @ 0x0 -BookMenu @ 0x0 -Console @ 0x0 -ButtonBarMenu @ 0x20a51ed70 -ConsoleNativeUIMenu @ 0x0 -PlayBinkMenu @ 0x0 -LevelUpMenu @ 0x0 -FaderMenu @ 0x20a0aa4f0 -PauseMenu @ 0x0 -CreditsMenu @ 0x0 -VignetteMenu @ 0x0 -ScopeMenu @ 0x0 -HUDMenu @ 0x20b0b8b40 -MultiActivateMenu @ 0x0 -LooksMenu @ 0x0 -DialogueMenu @ 0x0 -LockpickingMenu @ 0x0 -ExamineMenu @ 0x0 -CreationClubMenu @ 0x0 -Workshop_CaravanMenu @ 0x0 -SPECIALMenu @ 0x0 -ContainerMenu @ 0x0 -VertibirdMenu @ 0x0 -CookingMenu @ 0x0 -PipboyMenu @ 0x0 -VATSMenu @ 0x0 -SafeZoneMenu @ 0x0 -WorkshopMenu @ 0x0 -*/ - -static constexpr const char* kAllowList[] = { - "ConsoleNativeUIMenu", - "Console", - "PauseMenu", - /* "PipboyMenu",*/ "TerminalMenu", - "SleepWaitMenu", - "LockpickingMenu", - "MessageBoxMenu", - "WorkshopMenu"}; - -static void (*UI_AddToMenuStack_Real)(UI*, UI::UIMenuEntry*); - -void UI_AddToMenuStack(UI* apSelf, UI::UIMenuEntry* menuEntry) -{ - if (!menuEntry->spMenu) - return; - - if (!World::Get().GetTransport().IsConnected()) - return UI_AddToMenuStack_Real(apSelf, menuEntry); - - // NOTE(Force): could also compare by RTTI later on... - for (const char* item : kAllowList) - { - if (auto* pMenu = apSelf->FindMenuByName(item)) - { - if (pMenu == menuEntry->spMenu) - UnfreezeMenu(menuEntry->spMenu); - } - } - - UI_AddToMenuStack_Real(apSelf, menuEntry); -} - -static TiltedPhoques::Initializer s_uiHooks( - []() - { - const VersionDbPtr mainMenuCtor(1079381); - TiltedPhoques::Put(mainMenuCtor.Get() + 0x2DC, 0xE990); - - // Remove engagement check, jump directly into main state. - TiltedPhoques::Nop(mainMenuCtor.Get() + 0x279, 14); // 0x1412A01A9 - - // nuke entire isinputallowed stuff - const VersionDbPtr mainMenuLoop(1512372); - TiltedPhoques::Nop(mainMenuLoop.Get() + (0x2D - 5), 0x29); // 0x1412A0E48 - - struct C : TiltedPhoques::CodeGenerator - { - C(uint8_t* loc) - { - mov(r8d, 0); // hide the prompt - jmp_S(loc + 8); - } - } gen(mainMenuLoop.Get() + 0x51); - TiltedPhoques::Jump(mainMenuLoop.Get() + 0x51, gen.getCode()); - TiltedPhoques::Nop(mainMenuLoop.Get() + 0x51 + 5, 3); - - const VersionDbPtr handleInput(1001404); - TiltedPhoques::Nop(handleInput.Get() + 0x56, 10); // 0x1412A1B76 - - const VersionDbPtr processMenus(239711); // 0x142042F08 - TiltedPhoques::SwapCall(processMenus.Get() + 0xAD8, UI_AddToMenuStack_Real, &UI_AddToMenuStack); - }); diff --git a/Code/client/Games/Fallout4/Interface/UI.h b/Code/client/Games/Fallout4/Interface/UI.h deleted file mode 100644 index 57110f3f5..000000000 --- a/Code/client/Games/Fallout4/Interface/UI.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include - -struct UI -{ - static UI* Get(); - - using TCreate = IMenu*(UIMessage*); - - struct UIMenuEntry - { - IMenu* spMenu; // Actually a scaleform ptr TODO: reverse that stuff. - TCreate* create; - void (*pfStaticUpdate)(); - }; - - IMenu* FindMenuByName(const char* acName); - bool GetMenuOpen(const BSFixedString& acName) const; - - void PrintMenuMap(); - void PrintActiveMenus(); - -public: - uint8_t pad0[0x1A8 - sizeof(GameArray)]; - GameArray MenuStack; // actually stores a smart ptr - creation::BSTHashMap menuMap; - uint8_t pad1D8[0x250 - 0x1D8]; -}; - -static_assert(offsetof(UI, menuMap) == 0x1A8); -static_assert(sizeof(UI) == 0x250); diff --git a/Code/client/Games/Fallout4/LoadingScreen.cpp b/Code/client/Games/Fallout4/LoadingScreen.cpp deleted file mode 100644 index 58a68c31b..000000000 --- a/Code/client/Games/Fallout4/LoadingScreen.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include - -#include -#include - -struct ScaleFormValue -{ - uint8_t pad0[0x14]; - uint32_t unk14; - uint8_t pad18[0x30 - 0x18]; - BSFixedString data; -}; - -struct ScaleFormContext -{ - uint8_t pad0[0xE8]; - ScaleFormValue* value; - uint8_t padF0[0x270 - 0xF0]; - uint8_t isSet; -}; - -using TRequestLoadingText = void(__fastcall)(ScaleFormContext* apContext); -TRequestLoadingText* RealRequestLoadingText; -void RequestLoadingText(ScaleFormContext* apContext) -{ - TP_EMPTY_HOOK_PLACEHOLDER; - - BSFixedString str("Welcome to Fallout Together | Show some love to the devs!"); - - if (apContext && apContext->value) - apContext->value->data.data = str.data; - - RealRequestLoadingText(apContext); -} - -static TiltedPhoques::Initializer s_loadingScreenHooks( - []() - { - POINTER_FALLOUT4(TRequestLoadingText, s_requestLoadingText, 277977); - - RealRequestLoadingText = s_requestLoadingText.Get(); - - TP_HOOK(&RealRequestLoadingText, RequestLoadingText); - }); diff --git a/Code/client/Games/Fallout4/LoadingScreen.h b/Code/client/Games/Fallout4/LoadingScreen.h deleted file mode 100644 index 6f70f09be..000000000 --- a/Code/client/Games/Fallout4/LoadingScreen.h +++ /dev/null @@ -1 +0,0 @@ -#pragma once diff --git a/Code/client/Games/Fallout4/Magic/ActorMagicCaster.h b/Code/client/Games/Fallout4/Magic/ActorMagicCaster.h deleted file mode 100644 index f09496045..000000000 --- a/Code/client/Games/Fallout4/Magic/ActorMagicCaster.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include "MagicCaster.h" - -struct ActorMagicCaster : MagicCaster -{ - uint8_t pad48[0xB8 - 0x48]; - Actor* pCasterActor; - uint8_t padC0[0x100 - 0xC0]; -}; - -static_assert(offsetof(ActorMagicCaster, pad48) == 0x48); -static_assert(sizeof(ActorMagicCaster) == 0x100); diff --git a/Code/client/Games/Fallout4/Magic/EffectItem.h b/Code/client/Games/Fallout4/Magic/EffectItem.h deleted file mode 100644 index 57122f06c..000000000 --- a/Code/client/Games/Fallout4/Magic/EffectItem.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -struct EffectSetting; - -struct EffectItemData -{ - float fMagnitude; - int32_t iArea; - int32_t iDuration; -}; - -struct EffectItem -{ - EffectItemData data; - EffectSetting* pEffectSetting; - float fRawCost; - void* Conditions; -}; diff --git a/Code/client/Games/Fallout4/Magic/EffectSetting.h b/Code/client/Games/Fallout4/Magic/EffectSetting.h deleted file mode 100644 index cb7f81cf9..000000000 --- a/Code/client/Games/Fallout4/Magic/EffectSetting.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include -#include - -struct EffectSetting : TESForm -{ - uint8_t pad20[0xD0 - 0x20]; - EffectArchetypes::ArchetypeID eArchetype; - uint8_t padD4[0x1B0 - 0xD4]; -}; - -static_assert(sizeof(EffectSetting) == 0x1B0); diff --git a/Code/client/Games/Fallout4/Magic/MagicCaster.h b/Code/client/Games/Fallout4/Magic/MagicCaster.h deleted file mode 100644 index 25e1dde99..000000000 --- a/Code/client/Games/Fallout4/Magic/MagicCaster.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -struct MagicCaster -{ - virtual ~MagicCaster(); - - enum State : int32_t - { - DERIVED_ATTRIBUTE = 0x0, - ATTRIBUTE = 0x1, - SKILL = 0x2, - AI_ATTRIBUTE = 0x3, - RESISTANCE = 0x4, - CONDITION = 0x5, - CHARGE = 0x6, - INT_VALUE = 0x7, - VARIABLE = 0x8, - RESOURCE = 0x9, - TYPE_COUNT = 0xA, - }; - - GameArray hSounds; - int32_t hDesiredTarget; - MagicItem* pCurrentSpell; - MagicCaster::State eState; - float fCastingTimer; - float fCurrentSpellCost; - float fMagnitudeOverride; - float fNextTargetUpdate; - float fProjectileTimer; -}; diff --git a/Code/client/Games/Fallout4/Magic/MagicItem.h b/Code/client/Games/Fallout4/Magic/MagicItem.h deleted file mode 100644 index 335c6b003..000000000 --- a/Code/client/Games/Fallout4/Magic/MagicItem.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#include -#include -#include - -struct EffectItem; -struct EffectSetting; - -struct MagicItem : TESBoundObject, TESFullName, BGSKeywordForm -{ - // TODO: ft - EffectItem* GetEffect(const uint32_t aEffectId) noexcept - { - return nullptr; - } - - GameArray listOfEffects; - int32_t iHostileCount; - EffectSetting* pAVEffectSetting; - uint32_t uiPreloadCount; - void* spPreloadedItem; -}; diff --git a/Code/client/Games/Fallout4/Magic/MagicTarget.cpp b/Code/client/Games/Fallout4/Magic/MagicTarget.cpp deleted file mode 100644 index 9d2d22858..000000000 --- a/Code/client/Games/Fallout4/Magic/MagicTarget.cpp +++ /dev/null @@ -1,119 +0,0 @@ -#include "MagicTarget.h" - -#include -#include -#include -#include -#include "EffectItem.h" -#include "EffectSetting.h" -#include "MagicItem.h" - -#include - -#include - -TP_THIS_FUNCTION(TAddTarget, bool, MagicTarget, MagicTarget::AddTargetData& arData); -TP_THIS_FUNCTION(TCheckAddEffectTargetData, bool, MagicTarget::AddTargetData, void* arArgs, float afResistance); - -static TAddTarget* RealAddTarget = nullptr; -static TCheckAddEffectTargetData* RealCheckAddEffectTargetData = nullptr; - -static thread_local bool s_autoSucceedEffectCheck = false; - -bool MagicTarget::AddTarget(AddTargetData& arData) noexcept -{ - s_autoSucceedEffectCheck = true; - bool result = TiltedPhoques::ThisCall(RealAddTarget, this, arData); - s_autoSucceedEffectCheck = false; - return result; -} - -Actor* MagicTarget::GetTargetAsActor() -{ - TP_THIS_FUNCTION(TGetTargetAsActor, Actor*, MagicTarget); - POINTER_FALLOUT4(TGetTargetAsActor, getTargetAsActor, 129826); - return TiltedPhoques::ThisCall(getTargetAsActor, this); -} - -// TODO: ft (verify) -bool TP_MAKE_THISCALL(HookAddTarget, MagicTarget, MagicTarget::AddTargetData& arData) -{ - Actor* pTargetActor = apThis->GetTargetAsActor(); - if (!pTargetActor) - return TiltedPhoques::ThisCall(RealAddTarget, apThis, arData); - - ActorExtension* pTargetActorEx = pTargetActor->GetExtension(); - - if (!pTargetActorEx) - return TiltedPhoques::ThisCall(RealAddTarget, apThis, arData); - - if (ScopedSpellCastOverride::IsOverriden()) - return TiltedPhoques::ThisCall(RealAddTarget, apThis, arData); - - AddTargetEvent addTargetEvent{}; - addTargetEvent.TargetID = pTargetActor->formID; - addTargetEvent.SpellID = arData.pSpell->formID; - addTargetEvent.EffectID = arData.pEffectItem->pEffectSetting->formID; - addTargetEvent.Magnitude = arData.fMagnitude; - - if (pTargetActorEx->IsLocalPlayer()) - { - bool result = TiltedPhoques::ThisCall(RealAddTarget, apThis, arData); - if (result) - World::Get().GetRunner().Trigger(addTargetEvent); - return result; - } - else if (pTargetActorEx->IsRemotePlayer()) - { - return false; - } - - if (arData.pCaster) - { - ActorExtension* pCasterExtension = arData.pCaster->GetExtension(); - if (pCasterExtension->IsLocalPlayer()) - { - bool result = TiltedPhoques::ThisCall(RealAddTarget, apThis, arData); - if (result) - World::Get().GetRunner().Trigger(addTargetEvent); - return result; - } - else if (pCasterExtension->IsRemotePlayer()) - { - return false; - } - } - - if (pTargetActorEx->IsLocal()) - { - bool result = TiltedPhoques::ThisCall(RealAddTarget, apThis, arData); - if (result) - World::Get().GetRunner().Trigger(addTargetEvent); - return result; - } - else - { - return false; - } -} - -bool TP_MAKE_THISCALL(HookCheckAddEffectTargetData, MagicTarget::AddTargetData, void* arArgs, float afResistance) -{ - if (s_autoSucceedEffectCheck) - return true; - - return TiltedPhoques::ThisCall(RealCheckAddEffectTargetData, apThis, arArgs, afResistance); -} - -static TiltedPhoques::Initializer s_magicTargetHooks( - []() - { - POINTER_FALLOUT4(TAddTarget, addTarget, 385036); - POINTER_FALLOUT4(TCheckAddEffectTargetData, checkAddEffectTargetData, 113034); - - RealAddTarget = addTarget.Get(); - RealCheckAddEffectTargetData = checkAddEffectTargetData.Get(); - - TP_HOOK(&RealAddTarget, HookAddTarget); - TP_HOOK(&RealCheckAddEffectTargetData, HookCheckAddEffectTargetData); - }); diff --git a/Code/client/Games/Fallout4/Magic/MagicTarget.h b/Code/client/Games/Fallout4/Magic/MagicTarget.h deleted file mode 100644 index 724ca147c..000000000 --- a/Code/client/Games/Fallout4/Magic/MagicTarget.h +++ /dev/null @@ -1,56 +0,0 @@ -#pragma once - -#include -#include - -struct Actor; -struct EffectItem; -struct MagicItem; -struct TESBoundObject; - -struct MagicTarget -{ - struct IPostCreationModification; - struct ResultsCollector; - - struct AddTargetData - { - Actor* pCaster; - MagicItem* pSpell; - EffectItem* pEffectItem; - TESBoundObject* pSource; - MagicTarget::IPostCreationModification* pCallback; - MagicTarget::ResultsCollector* pResultsCollector; - NiPoint3 ExplosionLocation; - float fMagnitude; - MagicSystem::CastingSource eCastingSource; - bool bAreaTarget; - bool bDualCast; - }; - - struct SpellDispelData - { - const MagicItem* pSpell; - int32_t hCaster; - GamePtr spActiveEffect; - SpellDispelData* pNext; - }; - - enum Flag : int32_t - { - MTF_UPDATING = 0x1, - MTF_INVISIBLE = 0x2, - }; - - virtual ~MagicTarget(); - - Actor* GetTargetAsActor(); - - bool AddTarget(AddTargetData& arData) noexcept; - // this function actually adds the effect - bool CheckAddEffect(AddTargetData& arData) noexcept; - void DispelAllSpells(bool aNow) noexcept; - - SpellDispelData* pPostUpdateDispelList; - Flag ucFlags; -}; diff --git a/Code/client/Games/Fallout4/Misc/ActorState.h b/Code/client/Games/Fallout4/Misc/ActorState.h deleted file mode 100644 index ceabc534c..000000000 --- a/Code/client/Games/Fallout4/Misc/ActorState.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -struct ActorState -{ - virtual ~ActorState(); - - uint32_t flags1; - uint32_t flags2; - - bool IsWeaponDrawn() const noexcept { return ((flags2 >> 1) & 7) >= 3; } - // TODO: ft, does it need fully drawn check? - bool IsWeaponFullyDrawn() const noexcept { return IsWeaponDrawn(); } - - // TODO: ft (verify) - bool IsBleedingOut() const noexcept { return ((flags1 >> 17) & 0xFu) - 7 <= 1; } - - bool SetWeaponDrawn(bool aDraw) noexcept; -}; diff --git a/Code/client/Games/Fallout4/Misc/ActorValueOwner.h b/Code/client/Games/Fallout4/Misc/ActorValueOwner.h deleted file mode 100644 index a72fbb9a2..000000000 --- a/Code/client/Games/Fallout4/Misc/ActorValueOwner.h +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -#include - -struct ActorValueOwner -{ - enum class ForceMode : uint32_t - { - PERMANENT = 0, - TEMPORARY = 1, - DAMAGE = 2, - COUNT = 3, - }; - - virtual ~ActorValueOwner(); - - // TODO: refactor these names - virtual float GetValue(ActorValueInfo* apInfo) const noexcept; - virtual float GetMaxValue(ActorValueInfo* apInfo) const noexcept; - virtual float GetBaseValue(ActorValueInfo* apInfo) const noexcept; - virtual void sub_04(); - virtual void sub_05(); - virtual void ForceCurrent(ActorValueOwner::ForceMode aMode, ActorValueInfo* apInfo, float aValue) noexcept; - virtual void sub_07(); - virtual void RestoreValue(ActorValueInfo* apInfo, float aAmount) noexcept; - virtual void SetValue(ActorValueInfo* apInfo, float aValue) noexcept; -}; diff --git a/Code/client/Games/Fallout4/Misc/BSFixedString.h b/Code/client/Games/Fallout4/Misc/BSFixedString.h deleted file mode 100644 index e0bd0d0bc..000000000 --- a/Code/client/Games/Fallout4/Misc/BSFixedString.h +++ /dev/null @@ -1,54 +0,0 @@ -#pragma once - -#include - -struct BSFixedString -{ - BSFixedString(const BSFixedString&) = delete; - BSFixedString& operator=(const BSFixedString&) = delete; - - struct Data - { - Data* next; - uint32_t flags; - uint32_t length; - Data* derived; - char data[1]; - - [[nodiscard]] const Data* GetExternData() const noexcept - { - const auto* pIterator = this; - - while (pIterator->flags & 0x4000) - pIterator = pIterator->derived; - - return pIterator; - } - - [[nodiscard]] bool IsAscii() const noexcept { return (GetExternData()->flags & 0x8000) == 0; } - - [[nodiscard]] const char* AsAscii() const { return reinterpret_cast(GetExternData()->data); } - - [[nodiscard]] const wchar_t* AsWide() const { return reinterpret_cast(GetExternData()->data); } - }; - - static_assert(offsetof(Data, data) == 0x18); - - // Be careful using this, the destructor does NOT release the memory, call Release manually if you wish to delete it - explicit BSFixedString(const char* acpData); - BSFixedString(BSFixedString&& aRhs) noexcept; - ~BSFixedString(); - - BSFixedString& operator=(BSFixedString&& aRhs) noexcept; - - void Release() noexcept; - void Set(const char* acpStr) noexcept; - - [[nodiscard]] bool IsAscii() const noexcept { return data->IsAscii(); } - - [[nodiscard]] const char* AsAscii() const { return data ? data->AsAscii() : nullptr; } - - [[nodiscard]] const wchar_t* AsWide() const { return data ? data->AsWide() : nullptr; } - - Data* data; -}; diff --git a/Code/client/Games/Fallout4/Misc/BSScript.cpp b/Code/client/Games/Fallout4/Misc/BSScript.cpp deleted file mode 100644 index e9e56eaa2..000000000 --- a/Code/client/Games/Fallout4/Misc/BSScript.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include - -#include - -BSScript::Variable::Variable() -{ -} - -BSScript::Variable::~Variable() noexcept -{ - Reset(); -} - -void BSScript::Variable::Reset() noexcept -{ - TP_THIS_FUNCTION(TReset, void, BSScript::Variable); - - POINTER_FALLOUT4(TReset, s_reset, 1183889); - - TiltedPhoques::ThisCall(s_reset, this); -} - -void BSScript::Variable::Clear() noexcept -{ - Reset(); - - type = kEmpty; -} - -template <> void BSScript::Variable::Set(int32_t aValue) noexcept -{ - Reset(); - - type = kInteger; - data.i = aValue; -} - -template <> void BSScript::Variable::Set(float aValue) noexcept -{ - Reset(); - - type = kFloat; - data.f = aValue; -} - -template <> void BSScript::Variable::Set(bool aValue) noexcept -{ - Reset(); - - type = kBoolean; - data.b = aValue; -} - -template <> void BSScript::Variable::Set(const char* acpValue) noexcept -{ - Reset(); - - type = kString; - auto pStr = reinterpret_cast(&data.s); - pStr->Set(acpValue); -} - -void BSScript::Statement::SetSize(uint32_t aCount) noexcept -{ - TP_THIS_FUNCTION(TSetSize, void, BSScript::Statement, uint32_t aCount); - - POINTER_FALLOUT4(TSetSize, s_setSize, 1293891); - - TiltedPhoques::ThisCall(s_setSize, this, aCount); -} diff --git a/Code/client/Games/Fallout4/Misc/BSScript.h b/Code/client/Games/Fallout4/Misc/BSScript.h deleted file mode 100644 index 6c25f6d66..000000000 --- a/Code/client/Games/Fallout4/Misc/BSScript.h +++ /dev/null @@ -1,105 +0,0 @@ -#pragma once - -#include - -struct BSScript -{ - struct Variable - { - Variable(); - ~Variable() noexcept; - - void Reset() noexcept; - void Clear() noexcept; - - template void Set(T aValue) noexcept - { - // static_assert(false); - } - - enum Type : uint64_t - { - kEmpty, - kHandle, - kString, - kInteger, - kFloat, - kBoolean - }; - - union Data - { - int32_t i; - const char* s; - float f; - bool b; - }; - - Type type; - Data data; - }; - - struct Statement - { - void SetSize(uint32_t aCount) noexcept; - - uint8_t pad0[8]; - Variable* vars; - }; - - struct IVirtualMachine - { - virtual ~IVirtualMachine() = 0; - - virtual void sub_01(); - virtual void sub_02(); - virtual void sub_03(); - virtual void sub_04(); - virtual void sub_05(); - virtual void sub_06(); - virtual void sub_07(); - virtual void sub_08(); - virtual void sub_09(); - virtual void sub_0A(); - virtual void sub_0B(); - virtual void sub_0C(); - virtual void sub_0D(); - virtual void sub_0E(); - virtual void sub_0F(); - virtual void sub_10(); - virtual void sub_11(); - virtual void sub_12(); - virtual void sub_13(); - virtual void sub_14(); - virtual void sub_15(); - virtual void sub_16(); - virtual void sub_17(); - virtual void sub_18(); - virtual void sub_19(); - virtual void sub_1A(); - virtual void sub_1B(); - virtual void sub_1C(); - virtual void sub_1D(); - virtual void sub_1E(); - virtual void sub_1F(); - virtual void sub_20(); - virtual void sub_21(); - virtual void sub_22(); - virtual void sub_23(); - virtual void sub_24(); - virtual void sub_25(); - virtual void sub_26(); - virtual void sub_27(); - virtual void sub_28(); - virtual void sub_29(); - virtual void sub_2A(); - virtual void sub_2B(); - virtual void sub_2C(); - virtual void SendEvent(uint64_t aId, const BSFixedString& acEventName, std::function& aFunctor) const noexcept; - }; -}; - -template <> void BSScript::Variable::Set(int32_t aValue) noexcept; -template <> void BSScript::Variable::Set(float aValue) noexcept; -template <> void BSScript::Variable::Set(bool aValue) noexcept; -template <> void BSScript::Variable::Set(const char* acpValue) noexcept; diff --git a/Code/client/Games/Fallout4/Misc/BSString.h b/Code/client/Games/Fallout4/Misc/BSString.h deleted file mode 100644 index 9fc1f88bd..000000000 --- a/Code/client/Games/Fallout4/Misc/BSString.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -struct BSString -{ - BSString() - : data{nullptr} - , length{0} - , capacity{0} - { - } - ~BSString(); - - [[nodiscard]] const char* AsAscii() { return data; } - -private: - const char* data; - uint16_t length; - uint16_t capacity; -}; diff --git a/Code/client/Games/Fallout4/Misc/GameVM.cpp b/Code/client/Games/Fallout4/Misc/GameVM.cpp deleted file mode 100644 index 3f52ef53c..000000000 --- a/Code/client/Games/Fallout4/Misc/GameVM.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include - -#include - -GameVM* GameVM::Get() -{ - POINTER_FALLOUT4(GameVM*, s_instance, 996228); - - return *s_instance.Get(); -} diff --git a/Code/client/Games/Fallout4/Misc/GameVM.h b/Code/client/Games/Fallout4/Misc/GameVM.h deleted file mode 100644 index b0a857139..000000000 --- a/Code/client/Games/Fallout4/Misc/GameVM.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include - -struct GameVM -{ - virtual ~GameVM(); - - static GameVM* Get(); - - uint8_t pad8[0xB0 - 0x8]; - BSScript::IVirtualMachine* virtualMachine; -}; diff --git a/Code/client/Games/Fallout4/Misc/MiddleProcess.h b/Code/client/Games/Fallout4/Misc/MiddleProcess.h deleted file mode 100644 index 55b0159ca..000000000 --- a/Code/client/Games/Fallout4/Misc/MiddleProcess.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -struct bhkCharRigidBodyController; - -struct MiddleProcess -{ - uint8_t unk0[0xC0]; - float direction; // C0 - uint8_t unkC4[0x3D0 - 0xC4]; - bhkCharRigidBodyController* rigidBodyController; -}; - -static_assert(offsetof(MiddleProcess, direction) == 0xC0); -static_assert(offsetof(MiddleProcess, rigidBodyController) == 0x3D0); diff --git a/Code/client/Games/Fallout4/Misc/NEW_REFR_DATA.cpp b/Code/client/Games/Fallout4/Misc/NEW_REFR_DATA.cpp deleted file mode 100644 index b5a2574f5..000000000 --- a/Code/client/Games/Fallout4/Misc/NEW_REFR_DATA.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include - -#include - -NEW_REFR_DATA::NEW_REFR_DATA() -{ - POINTER_FALLOUT4(void*, s_vtbl, 1139813); - // Set the vtable - this->vtbl = s_vtbl.Get(); - - unk40[0] = unk40[1] = unk40[2] = unk40[3] = 0; - unk50[0] = unk50[1] = unk50[2] = unk50[3] = 0; - - unk60 = nullptr; - unk68 = 0x1000000; - randomFlag = 1; -} diff --git a/Code/client/Games/Fallout4/Misc/NEW_REFR_DATA.h b/Code/client/Games/Fallout4/Misc/NEW_REFR_DATA.h deleted file mode 100644 index 8f60d24bf..000000000 --- a/Code/client/Games/Fallout4/Misc/NEW_REFR_DATA.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -struct TESObjectCELL; -struct TESWorldSpace; -struct TESObjectREFR; -struct TESForm; - -struct NEW_REFR_DATA -{ - NEW_REFR_DATA(); - - void** vtbl; // 0 - NiPoint3 postion; // 8 - NiPoint3 rotation; // 14 - TESForm* baseForm; // 20 - TESObjectCELL* parentCell; // 28 - TESWorldSpace* worldspace; // 30 - TESObjectREFR* refrToPlace; // 38 - uint32_t unk40[4]; // 40 - uint32_t unk50[4]; // 50 - void* unk60; // 60 - uint32_t unk68; // 68 set to 0x1000000 - uint16_t randomFlag; // 6C set to 1 -}; - -static_assert(sizeof(NEW_REFR_DATA) == 0x70); -static_assert(offsetof(NEW_REFR_DATA, rotation) == 0x14); -static_assert(offsetof(NEW_REFR_DATA, randomFlag) == 0x6C); diff --git a/Code/client/Games/Fallout4/Misc/NativeFunction.h b/Code/client/Games/Fallout4/Misc/NativeFunction.h deleted file mode 100644 index f9d2bacbc..000000000 --- a/Code/client/Games/Fallout4/Misc/NativeFunction.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include - -struct NativeFunction -{ - virtual ~NativeFunction() = 0; - - void* pad8; - BSFixedString functionName; - BSFixedString typeName; - uint8_t pad20[0x50 - 0x20]; - void* functionAddress; -}; - -static_assert(offsetof(NativeFunction, functionName) == 0x10); -static_assert(offsetof(NativeFunction, typeName) == 0x18); -static_assert(offsetof(NativeFunction, functionAddress) == 0x50); diff --git a/Code/client/Games/Fallout4/Misc/TBO_InstanceData.h b/Code/client/Games/Fallout4/Misc/TBO_InstanceData.h deleted file mode 100644 index 021a1422e..000000000 --- a/Code/client/Games/Fallout4/Misc/TBO_InstanceData.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -struct TBO_InstanceData : BSIntrusiveRefCounted -{ - virtual ~TBO_InstanceData(); -}; diff --git a/Code/client/Games/Fallout4/Misc/TintMask.h b/Code/client/Games/Fallout4/Misc/TintMask.h deleted file mode 100644 index 6f70f09be..000000000 --- a/Code/client/Games/Fallout4/Misc/TintMask.h +++ /dev/null @@ -1 +0,0 @@ -#pragma once diff --git a/Code/client/Games/Fallout4/Misc/WeatherManager.cpp b/Code/client/Games/Fallout4/Misc/WeatherManager.cpp deleted file mode 100644 index 0a274bc4c..000000000 --- a/Code/client/Games/Fallout4/Misc/WeatherManager.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include - -#include - -WeatherManager* WeatherManager::Get() -{ - POINTER_FALLOUT4(WeatherManager*, s_instance, 7492); - - return *s_instance.Get(); -} diff --git a/Code/client/Games/Fallout4/Misc/WeatherManager.h b/Code/client/Games/Fallout4/Misc/WeatherManager.h deleted file mode 100644 index 0cc734c11..000000000 --- a/Code/client/Games/Fallout4/Misc/WeatherManager.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -struct WeatherManager -{ - static WeatherManager* Get(); - - uint8_t pad0[0x18]; -}; diff --git a/Code/client/Games/Fallout4/PlayerCharacter.cpp b/Code/client/Games/Fallout4/PlayerCharacter.cpp deleted file mode 100644 index 0b5e7e82f..000000000 --- a/Code/client/Games/Fallout4/PlayerCharacter.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "PlayerCharacter.h" - -#include -#include -#include - -int32_t PlayerCharacter::LastUsedCombatSkill = -1; - -void PlayerCharacter::SetDifficulty(const int32_t aDifficulty, bool aForceUpdate, bool aExpectGameDataLoaded) noexcept -{ - if (aDifficulty > 5 || aDifficulty < 0) - return; - - TP_THIS_FUNCTION(TSetDifficulty, void, PlayerCharacter, const int32_t aDifficulty, bool aForceUpdate, bool aExpectGameDataLoaded); - POINTER_FALLOUT4(TSetDifficulty, setDifficulty, 657345); - TiltedPhoques::ThisCall(setDifficulty, this, aDifficulty, aForceUpdate, aExpectGameDataLoaded); -} - -void PlayerCharacter::PayCrimeGoldToAllFactions() noexcept -{ - // TODO: fallout 4 doesn't have "bounties". - // Still, aggro should be removed somehow on respawn. -} - -// TODO: ft (verify) -NiPoint3 PlayerCharacter::RespawnPlayer() noexcept -{ - // Make bleedout state recoverable - SetNoBleedoutRecovery(false); - - DispelAllSpells(); - - // Reset health to max - // TODO(cosideci): there's a cleaner way to do this - ForceActorValue(ActorValueOwner::ForceMode::DAMAGE, ActorValueInfo::kHealth, 1000000); - - TESObjectCELL* pCell = nullptr; - - if (GetWorldSpace()) - { - // TP to Whiterun temple when killed in world space - TES* pTes = TES::Get(); - pCell = ModManager::Get()->GetCellFromCoordinates(pTes->centerGridX, pTes->centerGridY, GetWorldSpace(), false); - } - else - { - // TP to start of cell when killed in an interior - pCell = GetParentCell(); - } - - NiPoint3 pos{}; - NiPoint3 rot{}; - pCell->GetCOCPlacementInfo(&pos, &rot, true); - - MoveTo(pCell, pos); - - // Make bleedout state unrecoverable again for when the player goes down the next time - SetNoBleedoutRecovery(true); - - return pos; -} diff --git a/Code/client/Games/Fallout4/PlayerCharacter.h b/Code/client/Games/Fallout4/PlayerCharacter.h deleted file mode 100644 index 7cf92aa43..000000000 --- a/Code/client/Games/Fallout4/PlayerCharacter.h +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -#include - -struct TESQuest; - -struct PlayerCharacter : Actor -{ - static PlayerCharacter* Get() noexcept; - - static void SetGodMode(bool aSet) noexcept; - - static int32_t LastUsedCombatSkill; - - void SetDifficulty(const int32_t aDifficulty, bool aForceUpdate = true, bool aExpectGameDataLoaded = true) noexcept; - - void PayCrimeGoldToAllFactions() noexcept; - NiPoint3 RespawnPlayer() noexcept; - - struct Objective - { - uint64_t pad0; - TESQuest* quest; - }; - - struct ObjectiveInstance - { - Objective* instance; - uint64_t instanceCount; - }; - - char pad490[0x7D8 - sizeof(Actor)]; - GameArray objectives; - char pad7F0[0x4F0 - 24]; - TESForm* locationForm; // actually a bgslocation - uint8_t pad_CD0[0x140]; -}; - -static_assert(sizeof(PlayerCharacter) == 0xE10); -static_assert(offsetof(PlayerCharacter, objectives) == 0x7D8); -static_assert(offsetof(PlayerCharacter, locationForm) == 0xCC8); diff --git a/Code/client/Games/Fallout4/Projectiles/Projectile.cpp b/Code/client/Games/Fallout4/Projectiles/Projectile.cpp deleted file mode 100644 index 1af0feea5..000000000 --- a/Code/client/Games/Fallout4/Projectiles/Projectile.cpp +++ /dev/null @@ -1,100 +0,0 @@ -#include "Projectile.h" -#include -#include -#include -#include -#include -#include - -TP_THIS_FUNCTION(TLaunch, BSPointerHandle*, BSPointerHandle, ProjectileLaunchData& arData); - -static TLaunch* RealLaunch = nullptr; - -BSPointerHandle* Projectile::Launch(BSPointerHandle* apResult, ProjectileLaunchData& arData) noexcept -{ - return TiltedPhoques::ThisCall(RealLaunch, apResult, arData); -} - -BSPointerHandle* TP_MAKE_THISCALL(HookLaunch, BSPointerHandle, ProjectileLaunchData& arData) -{ - if (arData.pShooter) - { - Actor* pActor = Cast(arData.pShooter); - if (pActor) - { - ActorExtension* pExtendedActor = pActor->GetExtension(); - if (pExtendedActor->IsRemote()) - { - apThis->handle.iBits = 0; - return apThis; - } - } - } - - ProjectileLaunchedEvent Event{}; - Event.Origin = arData.Origin; - if (arData.pProjectileBase) - Event.ProjectileBaseID = arData.pProjectileBase->formID; - Event.ZAngle = arData.fZAngle; - Event.XAngle = arData.fXAngle; - Event.YAngle = arData.fYAngle; - if (arData.pShooter) - Event.ShooterID = arData.pShooter->formID; - if (arData.pParentCell) - Event.ParentCellID = arData.pParentCell->formID; - if (arData.pFromAmmo) - Event.AmmoID = arData.pFromAmmo->formID; - Event.Area = arData.iArea; - Event.Power = arData.fPower; - Event.Scale = arData.fScale; - Event.AlwaysHit = arData.bAlwaysHit; - Event.ConeOfFireRadiusMult = arData.fConeOfFireRadiusMult; - Event.NoDamageOutsideCombat = arData.bNoDamageOutsideCombat; - Event.AutoAim = arData.bAutoAim; - Event.DeferInitialization = arData.bDeferInitialization; - Event.Tracer = arData.bTracer; - Event.ForceConeOfFire = arData.bForceConeOfFire; - Event.IntentionalMiss = arData.bIntentionalMiss; - Event.Allow3D = arData.bAllow3D; - Event.Penetrates = arData.bPenetrates; - Event.IgnoreNearCollisions = arData.bIgnoreNearCollisions; - - World::Get().GetRunner().Trigger(Event); - - return TiltedPhoques::ThisCall(RealLaunch, apThis, arData); -} - -TP_THIS_FUNCTION(TFire, void, void, TESObjectREFR* apSource, uint32_t aEquipIndex, TESAmmo* apAmmo, AlchemyItem* apPoison); -static TFire* RealFire = nullptr; - -void TP_MAKE_THISCALL(HookFire, void, TESObjectREFR* apSource, uint32_t aEquipIndex, TESAmmo* apAmmo, AlchemyItem* apPoison) -{ - if (apSource) - { - Actor* pActor = Cast(apSource); - if (pActor) - { - ActorExtension* pExtension = pActor->GetExtension(); - if (pExtension) - { - if (pExtension->IsRemote()) - return; - } - } - } - - return TiltedPhoques::ThisCall(RealFire, apThis, apSource, aEquipIndex, apAmmo, apPoison); -} - -static TiltedPhoques::Initializer s_projectileHooks( - []() - { - POINTER_FALLOUT4(TLaunch, s_launch, 1452335); - POINTER_FALLOUT4(TFire, fire, 1056038); - - RealLaunch = s_launch.Get(); - RealFire = fire.Get(); - - TP_HOOK(&RealLaunch, HookLaunch); - TP_HOOK(&RealFire, HookFire); - }); diff --git a/Code/client/Games/Fallout4/Projectiles/Projectile.h b/Code/client/Games/Fallout4/Projectiles/Projectile.h deleted file mode 100644 index 35e93d1cb..000000000 --- a/Code/client/Games/Fallout4/Projectiles/Projectile.h +++ /dev/null @@ -1,63 +0,0 @@ -#pragma once - -#include - -struct BGSProjectile; -struct TESObjectREFR; -struct CombatController; -struct TESForm; -struct TESAmmo; -struct TESObjectCELL; -struct MagicItem; -struct AlchemyItem; - -struct WeaponData -{ - TESForm* pWeapon; - void* pWeaponData; -}; - -struct ProjectileLaunchData -{ - NiPoint3 Origin; - NiPoint3 ContactNormal; - TESForm* pProjectileBase; // is actually BGSProjectile* - TESObjectREFR* pShooter; - CombatController* pShooterCombatController; - // BGSObjectInstanceT FromWeapon; // length: 0x10 - // TESForm* pFromWeapon; - // void* pFromWeaponData; - WeaponData FromWeapon; - TESAmmo* pFromAmmo; - // BGSEquipIndex EquipIndex; - uint32_t EquipIndex; - float fZAngle; - float fXAngle; - float fYAngle; - TESObjectREFR* pHomingTarget; - TESObjectCELL* pParentCell; - MagicItem* pSpell; - MagicSystem::CastingSource eCastingSource; - AlchemyItem* pPoison; - int iArea; - float fPower; - float fScale; - float fConeOfFireRadiusMult; - int32_t eTargetLimb; - bool bAlwaysHit; - bool bNoDamageOutsideCombat; - bool bAutoAim; - bool bUseOrigin; - bool bDeferInitialization; - bool bTracer; - bool bForceConeOfFire; - bool bIntentionalMiss; - bool bAllow3D; - bool bPenetrates; - bool bIgnoreNearCollisions; -}; - -struct Projectile -{ - static BSPointerHandle* Launch(BSPointerHandle* apResult, ProjectileLaunchData& arData) noexcept; -}; diff --git a/Code/client/Games/Fallout4/RTTI.cpp b/Code/client/Games/Fallout4/RTTI.cpp deleted file mode 100644 index dea0d0dfe..000000000 --- a/Code/client/Games/Fallout4/RTTI.cpp +++ /dev/null @@ -1,6487 +0,0 @@ -#include - -const VersionDbPtr internal::DynamicCast(84113); - -namespace internal -{ -template RttiLocator::RttiLocator(uint32_t aId) -{ - m_pRtti = TiltedPhoques::MakeUnique>(aId); -} - -template const void* RttiLocator::Get() -{ - return *m_pRtti; -} -} // namespace internal - -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESForm(1344422); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectCELL(640070); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAIWorldLocation(154658); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAIWorldLocationInteriorCell(1470934); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESWorldSpace(892155); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAIWorldLocationPointRadius(406590); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectREFR(486181); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAIWorldLocationPrimitive(249); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAIWorldLocationRefRadius(1569568); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IPackageDataTypeCheck(38879); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IProcedureTreeExecState(1355093); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IProcedure(1089251); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSProcedureBase(604047); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSProcedureHeadtrack(118497); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSProcedureHeadtrackExecState(198262); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESIdleForm(282867); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSProcedurePlayIdle(1379554); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSProcedurePlayIdleExecState(1459384); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESActionData(1272844); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSActionData(787648); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ActionInput(301918); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ActionOutput(1398678); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_Setting(1190296); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_INISettingCollection(611767); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hkBaseObject(518411); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpCollisionQueryCollector(32650); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpClosestHitCollector(1568867); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_GameSettingCollection(1302516); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_Actor(1162829); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IMovementParameters(192348); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_MovementParameters(1508544); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSProcedureRange(1242410); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSProcedureRangeExecState(1102422); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSProcedureStayAway(1014360); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSProcedureStayAwayExecState(1093968); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IAnimationEventDataForEachFunctor(268566); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NiRefObject(616415); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NiObject(130883); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NiExtraData(1008265); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSRetargetOnDeleteExtraData(523101); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IForEachDynamicIdleInDir(476303); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_DynamicIdleDataSingletonHelper(210552); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSObjectInstanceExtra(1233230); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSExtraData(967063); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraInitActions(481702); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BaseFormComponent(654816); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSKeyword(122537); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAttachParentArray(1219659); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSCraftingUseSound(906801); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSFeaturedItemMessage(641008); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMessage(374732); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSLocationRefType(1471893); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSForcedLocRefType(1205817); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSInstanceNamingRulesForm(939602); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESFullName(1098716); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSModelMaterialSwap(912158); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMaterialSwap(646347); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESModel(160904); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSNativeTerminalForm(1257718); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSTerminal(991343); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSTransform(506243); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSPreviewTransform(20432); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSPropertySheet(1336870); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSSoundTagSet(805339); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSSoundTagComponent(319695); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_InitActionI(712337); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hkReferencedObject(1388895); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpAction(1122977); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpUnaryAction(637892); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpShape(171732); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpCompositeShape(1048989); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpHeightFieldShape(783192); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpPhysicsSystemData(516962); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_CellHfCollision(251027); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpCollisionFilter(1520838); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpAllHitsCollector(1254642); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpBSCustomCollisionFilter(17396); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpFlippedGetClosestPointsQueryCollector(190892); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IFormFactory(363213); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IKeywordFormBase(1460350); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_SpellItem(1413385); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_AlchemyItem(709360); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_MagicItem(223610); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESBoundObject(1101056); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObject(615732); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSKeywordForm(1493399); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESIcon(1007570); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESTexture(302847); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMessageIcon(1399654); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESWeightForm(914442); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSEquipType(428907); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSDestructibleObjectForm(1526157); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSPickupPutdownSounds(1260052); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESDescription(993718); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSProjectile(149402); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSExplosion(1246380); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESEffectShader(761027); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSArtObject(275461); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSImpactDataSet(1372095); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSDualCastData(886949); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_EffectSetting(1234913); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESImageSpaceModifier(749686); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectLIGH(922054); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSReferenceEffect(436528); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSPerk(171044); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ActorValueInfo(1048268); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMenuDisplayObject(563030); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_EnchantmentItem(376392); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSListForm(1473513); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IngredientItem(1146810); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESValueForm(661753); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QueuedFile(1398904); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IOTask(913724); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSQueuedResourceCollectionBase(209179); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_MagicItemTraversalFunctor(400717); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_MagicItemFindFunctor(134868); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_MagicItemFindKeywordFunctor(1451227); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_FindNonExcludedDeliveryFunctor(1357617); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_FindEqualsFunctor(1218288); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_GetCostliestEffectFunctor(732988); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_LongestDurationFunctor(466357); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_LargestAreaFunctor(200786); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_GetMagicItemDescriptionFunctor(995361); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ScrollItem(1387503); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESGlobal(137179); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCell3D(1453579); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraHavok(967978); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRegionList(482654); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCellSkyRegion(1579685); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCellImageSpace(1313491); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCellGodRays(1047589); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraSeenData(562348); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraNorthRotation(76879); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraDetachTime(1392806); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraProcessMiddleLow(907734); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCellMusicType(641935); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCellAcousticSpace(375722); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCellWaterType(109715); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESKey(633485); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESImageSpace(1511067); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAcousticSpace(1025257); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESWaterForm(540224); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMusicType(54585); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSEncounterZone(1151495); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSLocation(1104899); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESPackage(619688); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESTopicInfo(134122); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESTopic(1231166); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSDialogueBranch(526358); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSSoundOutput(40726); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSSoundCategory(1137722); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESFaction(652631); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESCombatStyle(167259); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESActorBase(1263990); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSScene(778733); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESQuest(73836); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSGodRays(951326); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCulledBone(592253); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLock(106716); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraTeleport(983950); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraStartingPosition(498691); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraOwnership(232894); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraGlobal(1329494); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRank(844308); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCount(139464); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLeveledItem(1236556); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraOutfitItem(751272); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraHealth(265723); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraTimeLeft(1362238); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCharge(877021); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraScale(391687); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraFollower(1488977); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraOriginalReference(1003092); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPoison(737579); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraHeadingTarget(251978); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCreatureAwakeSound(1568402); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraObjectHealth(1302018); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraActorCause(816888); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRadioData(331401); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPatrolRefData(1428062); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraNavMeshPortal(1162323); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraOcclusionPlaneRefData(896323); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPortalRefData(849623); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraSceneData(583828); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraBadPosition(98238); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraHeadTrackingWeight(1195230); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraFavorCost(929089); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraTextDisplayData(443511); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraHorse(177966); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraEnchantment(1274702); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraForcedTarget(789506); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraUniqueID(303805); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraFlags(1400615); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraWaterCurrentZoneData(915358); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraMissingRefIDs(649568); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRangedDistOverride(383289); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraSoundOutputOverride(117314); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraEditorID(1433407); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraFavorite(948223); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPrimitive(462515); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraAmmo(1559962); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCombinedRefs(854974); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPreVisRefs(369550); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraTransitionCellCount(1466614); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraGIDBuffer(1200639); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraFromAlias(1546140); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraOpenCloseActivateRef(1060545); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraTeleportName(794844); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCachedScale(309220); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraReferenceHandles(1405938); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLocation(1140056); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraTresPassPackage(655041); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraAttachRef(388643); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraAttachRefChildren(1485975); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPowerLinks(1219864); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraReflectedRefs(734598); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraReflectorRefs(468043); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraWaterLightRefs(202411); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLitWaterRefs(1518712); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraHasNoRumors(1033001); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraModelSwap(547992); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRadius(62309); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCombatStyle(1159291); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPackageData(674191); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCollisionData(188747); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLargeRefOwnerCells(1505100); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLightData(1238901); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraModRank(753670); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraAttachedArrows3D(268071); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraAlphaCutoff(1371); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraForcedLandingMarker(1098934); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCellWaterEnvMap(832850); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraKeywords(566989); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraMaterialSwap(81493); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraProjectedDecalData(1178373); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraActivateText(912361); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRadioReceiver(426830); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRadioRepeater(161144); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraAnimSounds(1477531); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraActorValueStorage(991566); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraObjectBreakable(726214); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraObjectSavedDynamicIdles(459535); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraObjectSavedUnrecoverableSubgraphs(413026); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraIgnoredAttractKeywords(586193); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraInteriorLODWorldspace(539545); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraBoneScaleMap(492556); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraFXPickNodes(6774); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraEssentialProtected(1104201); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraInvestedGold(838252); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraVoiceType(352712); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NonActorMagicCaster(1183764); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraMagicCaster(917653); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_MagicCaster(432040); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSVoiceType(289231); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraAnimGraphManager(1386100); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraDismemberedLimbs(1120197); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraBiped(854292); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLight(368849); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLeveledCreature(1465950); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraMapMarker(1199959); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraAction(714868); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraShouldWear(229151); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraSeed(1325715); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPackage(621301); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPlayerCrimeList(135771); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRunOncePacks(1452155); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraDistantData(966589); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraEnableStateParent(481247); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraEnableStateChildren(215460); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLinkedRef(1531686); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLinkedRefChildren(1046171); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLocationRefType(780399); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraActivateRef(514168); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraActivateRefChildren(28394); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRandomTeleportMarker(1344849); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCannotWear(1078995); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLastFinishedSequence(593896); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraGhost(327622); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraItemDropper(1424321); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraDroppedItemList(939120); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraSavedAnimation(673450); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraSavedHavokData(407037); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRefractionProperty(141114); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraSound(1457481); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCreatureMovementSound(971887); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraActivateLoopSound(925303); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraFactionChanges(659694); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraSayTopicInfoOnceADay(393280); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraEncounterZone(127396); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRoomRefData(1443613); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPatrolRefInUseData(958268); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraFollowerSwimBreadcrumbs(692610); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraAliasInstanceArray(645876); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraDecalGroup(379581); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCanTalkToPlayer(1476829); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraSayToTopicInfo(1210771); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraInteraction(944474); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLockList(458850); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraSoul(1556187); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPackageStartLocation(851218); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraMasterFileCell(585498); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraMasterLocation(319252); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPersistentCell(53184); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRagDollData(1369268); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraUsedMarkers(884074); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraReservedMarkers(398664); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraAshPileRef(132720); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLeveledItemBase(1229748); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraLevCreaModifier(963572); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraSpawnContainer(698086); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraAcousticParent(431333); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraEmittanceSource(165783); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraMultiBoundData(1482237); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraMultiBoundRef(1216139); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraMultiBound(949877); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPortal(464177); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRoom(1561636); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraOcclusionShape(856626); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraFriendHits(590867); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraStartingWorldOrCell(105330); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraEditorRef3DData(1421279); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraEditorRefMoveData(1155476); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraGuardedRefData(889517); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraIgnoredBySandbox(623637); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPromotedRef(357357); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraAnimationSequencer(1454490); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRefrPath(1188421); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraCellGrassData(703489); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraWaterData(436757); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraGroupConstraint(1534038); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraScriptedAnimDependence(1267945); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRaceData(1221532); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraBendableSplineParams(736202); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraInstanceData(469623); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPowerArmor(1567038); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraPowerArmorPreload(1081297); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraInputEnableLayer(815489); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraDirectAtTarget(549594); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraRefWeaponSounds(283326); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraAnimGraphPreload(1067468); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_SimpleAnimationGraphManagerHolder(801799); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IAnimationGraphManagerHolder(755274); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ExtraFurnitureEntryData(708858); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESBipedModelForm(88521); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QueuedActor(27694); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QueuedReference(1124861); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QueuedModel(639805); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QueuedCharacter(154413); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QueuedHead(1251284); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSFaceGenPendingHeadData(765932); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_AttachDistant3DTask(499602); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QueuedAnimationObject(233839); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BackgroundProcessThread(1550061); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSTaskThread(1283945); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSThread(798790); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QueuedTree(738511); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QueuedPlayer(252862); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_INIPrefSettingCollection(828462); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TES(1160254); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_AddCellGrassTask(628394); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAddonNode(148176); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectWEAP(1245180); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESEyes(759876); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectACTI(54815); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectSTAT(1151718); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectMISC(666623); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectDOOR(181221); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESNPC(1277914); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSLoadFormBuffer(1011717); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSLoadGameBuffer(526604); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSLoadFormData(40948); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSStoryManagerBranchNode(26965); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSStoryManagerNodeBase(1343436); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSStoryManagerTreeForm(1077571); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAttackDataForm(836141); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSBipedObjectForm(304011); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSBlockBashData(37895); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSDebris(1527285); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSIdleCollection(934682); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NiTimeController(655278); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSOverridePackCollection(169817); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSPerkRankArray(1486171); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_PerkRankVisitor(1000279); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSSkinForm(688109); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectARMO(202610); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESAIForm(1299278); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESActorBaseData(594830); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESAttackDamageForm(109274); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESEnchantableForm(1425244); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESHealthForm(1159505); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESLeveledList(674421); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESProduceForm(188991); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRaceForm(1285598); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESSpellList(800382); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESReactionForm(314839); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESImageSpaceModifiableForm(1411456); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESLevItem(819393); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESModelRDT(1057711); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESContainer(1183993); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSStorage(193667); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSMemStorage(1070792); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSVMLoadTask(492084); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRace(769141); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESLevSpell(17126); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESShout(1114401); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSParticleArrayAttach(1479429); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSHavokGeometryAttach(807377); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSNamedNodeAttach(1059364); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMultiTechniqueAttach(653878); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ITempEffectFactory(878214); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSMultiBoundAABB(911254); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSMultiBoundShape(425627); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSMultiBoundOBB(1522902); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSTempEffect(1429226); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NiObjectNET(850737); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NiAVObject(365313); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSDecalNode(1462433); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NiNode(976766); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QueuedPromoteReferencesTask(225679); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSQueuedGrassModelHandles(1514566); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpConvexShape(231009); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpSphereShape(1327601); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IRaceSubGraphDataFunctor(842456); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_InteractionCombatDataCollectFunctor(968436); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_SetPlayerHasTakenStackFunctor(422628); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_RemoveExtraFunctor(376137); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_MatchEquippedAndFavoriteDataFunctor(535287); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IsFavoriteFunctor(708346); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_SetFavoriteFunctor(222656); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_RemoveFavoriteFunctor(1538890); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_SetPoisonFunctor(1272814); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_SetEnchantmentFunctor(787610); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_RefMatchFunctor(866686); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_RemoveQuestAliasFunctor(381410); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_SetTimeLeftFunctor(115466); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ModTimeLeftFunctor(1431497); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ProcessWeaponStrikeMagicFunctor(1165786); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_SetItemOwnershipFunctor(1119033); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_SetItemOriginalReferenceFunctor(853082); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSObjectVisibilityManager(480042); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSPortal(340178); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSOcclusionPlane(1218030); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSOcclusionShape(732726); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSPrimitiveLine(247014); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSPrimitiveBox(1343667); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSPrimitive(858439); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSPrimitivePlane(373075); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSPrimitiveSphere(1470176); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSPrimitiveEllipsoid(1204182); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSMultiBoundSphere(937901); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ReferenceEffectController(1409313); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_OwnedController(1143541); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSAttachRefController(1316249); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSCloneReserver(1050314); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NiProperty(1302475); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NiAlphaProperty(817304); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_GridArray(989681); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_GridCellArray(192307); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSInputEventUser(1384222); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESCameraState(899060); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_LocalMapCamera(413461); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESCamera(1510826); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSSplatterExtraData(1323832); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpConvexPolytopeShape(1026617); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpCapsuleShape(760984); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IMessageBoxCallback(925041); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpUniqueBodyIdHitCollector(612640); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpAnyHitCollector(566057); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_hknpFlippedShapeCastQueryCollector(299765); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSNiNode(954287); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_MovementHandlerAgentAnimationDriven(380948); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_MovementHandlerAgent(553993); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_MovementAgent(287587); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_MovementHandlerAgentGraphDrivenAnimationDriven(778703); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IMovementQueryDesiredDeltas(158756); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_MovementHandlerAgentPlayerControls(65377); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NavMeshObstacleCoverManager(556273); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSPathingStreamRead(1120860); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_PathingStreamMasterFileRead(854943); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QuestPathingRequest(980887); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSPathingRequest(715510); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IPathBuilderFactoryBase(229812); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QuestPathingRequestBuilder(1424978); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionData(235207); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionDataWeather(1331799); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegion(1065864); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionDataGrass(534114); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionDataLandscape(268029); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionDataManager(1341); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionDataMap(1318093); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionDataObjects(1052176); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionDataSound(786417); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionObjectBase(739882); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionGrassObject(473438); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionGrassObjectList(207701); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionList(333712); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionNoiseFunction(1383749); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionObject(1337052); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESLandTexture(1071262); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESRegionObjectList(586160); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAttractionRule(684872); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSColorForm(1361540); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSBaseAlias(503394); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSRefCollectionAlias(17597); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSRefAlias(1334063); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSShaderMaterialExtraData(270391); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSDismembermentLimbExtraData(835199); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSDismembermentExtraData(788794); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSSceneAction(867793); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSSceneActionConversationBase(382558); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSSceneActionPlayerDialogue(635104); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSSoundDescriptorForm(761217); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSSceneActionStartScene(448134); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSIAudioEffectChain(1186089); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAudioEffectChain(919918); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSISoundDescriptor(1564678); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSSoundDescriptor(1298312); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAutoWeaponSoundDef(1032249); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSComponent(1004690); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSCompoundSoundDef(1210732); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSDamageType(1276259); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSDefaultObject(431303); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSInstanceNamingRules(72394); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSSoundCategorySnapshot(1281561); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSSoundKeywordMapping(829093); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAddonNodeSoundHandleExtra(50075); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSAimModel(1445940); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSArtObjectCloneTask(601459); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSTextureSet(228418); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSBendableSpline(1324968); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSConstructibleObject(74752); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSPreloadable(546564); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSHazard(1097491); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSLensFlare(252827); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSLensFlareRenderData(1349427); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSLensFlareSpriteRenderData(724780); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSLensFlareSprite(678162); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMovableStatic(883339); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSNavmeshableObject(397937); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSOutfit(1094392); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSPackIn(249814); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSCollisionLayer(1505995); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSStaticCollection(348225); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSFadeNode(35453); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESMagicTargetForm(540414); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSOpenCloseForm(274274); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSTalkingActivator(1370874); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESBoundAnimObject(1105086); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSNote(293144); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESFurniture(1170839); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSZoomData(326168); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESAmmo(751462); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESFlora(1340360); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESGrass(1206233); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESLevCharacter(613788); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectANIO(391158); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectARMA(1255044); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectBOOK(687419); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESMagicCasterForm(1112093); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectCONT(846069); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IFadeDoneCallback(1350381); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectTREE(442311); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESSoulGem(773124); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IOSystemTask(1532071); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QueuedPromoteLargeReferencesTask(1570442); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSLightingTemplate(379971); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_QueuedPromoteLocationReferencesTask(133141); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSReferenceGroup(982962); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSParticleShaderEmitter(1015965); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSParticleShaderCubeEmitter(750311); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSParticleShaderSnowEmitter(703872); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSParticleShaderRainEmitter(657064); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSShaderParticleGeometryData(610281); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_CellLoaderTask(157785); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ImageSpaceModifierInstanceForm(1254582); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ImageSpaceModifierInstance(1208116); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ImageSpaceModifierInstanceTemp(1161320); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ImageSpaceModifierInstanceDOF(1114581); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ImageSpaceModifierInstanceRB(1067914); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESWeather(1460268); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESClimate(974614); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NiFloatData(1526094); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NiColorData(1040436); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESObjectLAND(1531433); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESChildCell(1045874); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_SeenData(113313); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IntSeenData(990549); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSHandleRefObject(782433); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NonActorMagicTarget(296645); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_ActorValueOwner(1426357); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_OwnedCameraEffectController(708555); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_RemoveOutfitItemsFunctor(1464949); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_CalcContainerWeight(1199001); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_InventoryScoringFunctor(932747); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_GetBestWeaponFunctor(667043); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_GetBestAmmoFunctor(400642); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_GetBestArmorFunctor(134791); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_GetBestLightFunctor(1451165); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IAnimationStreamWrite(466289); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IAnimationStreamRead(200718); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_AnimationStreamLoadGame(1470370); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_AnimationStreamSaveGame(1204381); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMaterialType(378624); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESTexture1024(192498); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSReverbParameters(435743); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSCameraPath(1346166); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSCameraShot(860926); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_NiFormArray(375648); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSDefaultObjectManager(60845); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSFootstep(1283873); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSFootstepSet(658935); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSImpactData(1349393); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSMaterialObject(1321957); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMaterialObject(836802); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMenuIcon(902484); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSIMusicTrack(1014766); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMusicPaletteTrack(529587); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMusicTrack(263526); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMusicSilenceTrack(548833); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMusicSingleTrack(1006293); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSMusicTrackFormWrapper(587048); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSIMusicType(839100); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSIReverbType(167423); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSISoundCategory(1563239); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSISoundOutputModel(438296); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BGSStandardSoundDef(18494); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSShaderTextureSet(1573878); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_BSTextureSet(1307580); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_IVisitProcedures(1233600); -template struct internal::RttiLocator; -internal::RttiLocator registerRtti_TESLoadScreen(1019418); -template struct internal::RttiLocator