diff --git a/CommonLibF4/include/RE/Bethesda/TLS.h b/CommonLibF4/include/RE/Bethesda/TLS.h new file mode 100644 index 00000000..fc90e1ab --- /dev/null +++ b/CommonLibF4/include/RE/Bethesda/TLS.h @@ -0,0 +1,18 @@ +#pragma once + +#include "REX/W32/NT.h" + +namespace RE +{ + struct TLS + { + [[nodiscard]] static TLS* GetSingleton() + { + return *static_cast(REX::W32::NtCurrentTeb()->threadLocalStoragePointer); + } + + // members + std::byte pad000[0x830]; // 000 + bool consoleMode; // 830 + }; +} diff --git a/CommonLibF4/include/RE/Fallout.h b/CommonLibF4/include/RE/Fallout.h index 2cbac517..f156fb4a 100644 --- a/CommonLibF4/include/RE/Fallout.h +++ b/CommonLibF4/include/RE/Fallout.h @@ -211,6 +211,7 @@ #include "RE/Bethesda/Settings.h" #include "RE/Bethesda/Sky.h" #include "RE/Bethesda/SplineUtils.h" +#include "RE/Bethesda/TaskQueueInterface.h" #include "RE/Bethesda/TESBoundAnimObjects.h" #include "RE/Bethesda/TESBoundObjects.h" #include "RE/Bethesda/TESCamera.h" @@ -225,7 +226,7 @@ #include "RE/Bethesda/TESRace.h" #include "RE/Bethesda/TESWaterForm.h" #include "RE/Bethesda/TESWorldSpace.h" -#include "RE/Bethesda/TaskQueueInterface.h" +#include "RE/Bethesda/TLS.h" #include "RE/Bethesda/UI.h" #include "RE/Bethesda/UIMessage.h" #include "RE/Bethesda/UIMessageQueue.h"