diff --git a/libs/UEngine/UETools.hpp b/libs/UEngine/UETools.hpp index defaa6d..d79a088 100644 --- a/libs/UEngine/UETools.hpp +++ b/libs/UEngine/UETools.hpp @@ -1,8 +1,13 @@ #pragma once #include +#include #include -inline std::atomic_bool g_Console_Enabled { false }; +inline std::atomic g_Console_Enabled = false; +inline std::atomic gPendingFog = false; // Used to toggle Fog effect once +inline std::atomic gPendingDOF = false; // Used to toggle DOF effect once +inline std::atomic gPendingCA = false; // Used to toggle chromatic aberrations effect once +inline std::atomic gPendingVignetting = false; // Used to toggle chromatic aberrations effect once namespace SDK { class UEngine; @@ -20,6 +25,14 @@ namespace SDK { class APlayerController; } +namespace UC { + class FString; +} + +void ApplyVisualEffect(GameFixes fix, bool enabled); + +UC::FString GetCommand(GameFixes fix, bool enabled); + /** * @brief Gets the current game resolution (not native display) and aspect ratio. * @param outWidth screen width. @@ -29,6 +42,13 @@ namespace SDK { void GetResolution(int& outWidth, int& outHeight, float& outAspectRatio); // Unreal Engine functions +/** + * @brief Gets the current World from an UObject. + * @param ptr pointer to an object (eg: AActor). + * @return UWorld* or nullptr. + */ +SDK::UWorld* GetWorldFromContext(uintptr_t ptr); + /** * @brief Gets the current player Pawn from the world. * @param world Optional UWorld pointer.