#pragma once #include #include #include 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; class UObject; class UWorld; class UWidget; class AActor; class APawn; class UGameplayStatics; class UConsole; class UInputSettings; class UKismetStringLibrary; class UGameInstance; class ULocalPlayer; 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. * @param outHeight screen height. * @param outAspectRatio aspect ratio computed. */ 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. * @return Player Pawn or nullptr. */ SDK::APawn* GetPawnFromWorld(SDK::UWorld* world = nullptr); /** * @brief Gets the current player Pawn from an actor object. * @param object pointer (must be an UObject at least). * @return Player Pawn or nullptr. */ SDK::APawn* GetPawnFromObject(SDK::UObject* object); /** * @brief Reactivate the development console. * @param logger spdlog. */ void ReactivateDevConsole(std::shared_ptr logger);