V2, Console using SDK for now

This commit is contained in:
ApfelTeeSaft
2024-10-25 08:29:20 +02:00
parent 809d23d545
commit 43bc5fd5ef
37 changed files with 71 additions and 57803 deletions
+11 -11
View File
@@ -1,9 +1,9 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.10.35027.167
VisualStudioVersion = 17.11.35312.102
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "F4Menu", "F4Menu\F4Menu.vcxproj", "{FC93EC25-AAB9-430A-8336-2B175BBE3DE3}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "F4Menu", "F4Menu\F4Menu.vcxproj", "{36343665-200F-4E12-8490-5671E51CC59B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,19 +13,19 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FC93EC25-AAB9-430A-8336-2B175BBE3DE3}.Debug|x64.ActiveCfg = Debug|x64
{FC93EC25-AAB9-430A-8336-2B175BBE3DE3}.Debug|x64.Build.0 = Debug|x64
{FC93EC25-AAB9-430A-8336-2B175BBE3DE3}.Debug|x86.ActiveCfg = Debug|Win32
{FC93EC25-AAB9-430A-8336-2B175BBE3DE3}.Debug|x86.Build.0 = Debug|Win32
{FC93EC25-AAB9-430A-8336-2B175BBE3DE3}.Release|x64.ActiveCfg = Release|x64
{FC93EC25-AAB9-430A-8336-2B175BBE3DE3}.Release|x64.Build.0 = Release|x64
{FC93EC25-AAB9-430A-8336-2B175BBE3DE3}.Release|x86.ActiveCfg = Release|Win32
{FC93EC25-AAB9-430A-8336-2B175BBE3DE3}.Release|x86.Build.0 = Release|Win32
{36343665-200F-4E12-8490-5671E51CC59B}.Debug|x64.ActiveCfg = Debug|x64
{36343665-200F-4E12-8490-5671E51CC59B}.Debug|x64.Build.0 = Debug|x64
{36343665-200F-4E12-8490-5671E51CC59B}.Debug|x86.ActiveCfg = Debug|Win32
{36343665-200F-4E12-8490-5671E51CC59B}.Debug|x86.Build.0 = Debug|Win32
{36343665-200F-4E12-8490-5671E51CC59B}.Release|x64.ActiveCfg = Release|x64
{36343665-200F-4E12-8490-5671E51CC59B}.Release|x64.Build.0 = Release|x64
{36343665-200F-4E12-8490-5671E51CC59B}.Release|x86.ActiveCfg = Release|Win32
{36343665-200F-4E12-8490-5671E51CC59B}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {ABBF76B2-CFE8-422D-BD2D-862F6ABDD81E}
SolutionGuid = {0BE73319-565F-4329-A8AF-16E3259559BE}
EndGlobalSection
EndGlobal
-132
View File
@@ -1,132 +0,0 @@
#include "UE4.hpp"
#include "Classes.hpp"
namespace UE4
{
class UObject* UObject::FindObjectFastImpl(const std::string& Name, EClassCastFlags RequiredType)
{
int ObjectNum = GObjects ? GObjects->Num() : GObjectsNew->Num();
bool bOldGObj = GObjects ? true : false;
for (int i = 0; i < ObjectNum; ++i)
{
UObject* Object = nullptr;
if (bOldGObj)
Object = GObjects->GetByIndex(i);
else
Object = GObjectsNew->GetByIndex(i);
if (!Object)
continue;
if (Object->HasTypeFlag(RequiredType) && Object->GetName() == Name)
return Object;
}
return nullptr;
}
class UObject* UObject::FindObjectImpl(const std::string& FullName, EClassCastFlags RequiredType)
{
int ObjectNum = GObjects.GetTypedPtr()->GetByIndex(0) ? GObjects->Num() : GObjectsNew->Num();
bool bOldGObj = GObjects.GetTypedPtr()->GetByIndex(0) ? true : false;
for (int i = 0; i < ObjectNum; ++i)
{
UObject* Object = nullptr;
if (bOldGObj)
Object = GObjects->GetByIndex(i);
else
Object = GObjectsNew->GetByIndex(i);
if (!Object)
continue;
if (Object->HasTypeFlag(RequiredType) && Object->GetFullName() == FullName)
return Object;
}
return nullptr;
}
std::string UObject::GetFullName() const
{
if (this && Class)
{
std::string Temp;
for (UObject* NextOuter = Outer; NextOuter; NextOuter = NextOuter->Outer)
{
Temp = NextOuter->GetName() + "." + Temp;
}
std::string Name = Class->GetName();
Name += " ";
Name += Temp;
Name += GetName();
return Name;
}
return "None";
}
std::string UObject::GetName() const
{
return this ? Name.ToString() : "None";
}
bool UObject::HasTypeFlag(EClassCastFlags TypeFlags) const
{
return (Class->CastFlags & TypeFlags);
}
bool UObject::IsA(EClassCastFlags TypeFlags) const
{
return (Class->CastFlags & TypeFlags);
}
bool UObject::IsA(class UClass* TypeClass) const
{
return Class->IsSubclassOf(TypeClass);
}
bool UObject::IsDefaultObject() const
{
return (Flags & EObjectFlags::ClassDefaultObject);
}
bool UStruct::IsSubclassOf(const UStruct* Base) const
{
if (!Base)
return false;
for (const UStruct* Struct = this; Struct; Struct = Struct->Super)
{
if (Struct == Base)
return true;
}
return false;
}
class UFunction* UClass::GetFunction(const std::string& ClassName, const std::string& FuncName) const
{
for (const UStruct* Clss = this; Clss; Clss = Clss->Super)
{
if (Clss->GetName() != ClassName)
continue;
for (UField* Field = Clss->Children; Field; Field = Field->Next)
{
if (Field->HasTypeFlag(EClassCastFlags::Function) && Field->GetName() == FuncName)
return static_cast<class UFunction*>(Field);
}
}
return nullptr;
}
}
-170
View File
@@ -1,170 +0,0 @@
#pragma once
#include "UE4.hpp"
#include "Containers.h"
namespace UE4
{
class UObject
{
public:
static inline class TUObjectArrayWrapper GObjects;
static inline class TUObjectArrayNew* GObjectsNew;
void* VTable;
EObjectFlags Flags;
int32 Index;
class UClass* Class;
class FName Name;
class UObject* Outer;
public:
static class UObject* FindObjectFastImpl(const std::string& Name, EClassCastFlags RequiredType = EClassCastFlags::None);
static class UObject* FindObjectImpl(const std::string& FullName, EClassCastFlags RequiredType = EClassCastFlags::None);
std::string GetFullName() const;
std::string GetName() const;
bool HasTypeFlag(EClassCastFlags TypeFlags) const;
bool IsA(EClassCastFlags TypeFlags) const;
bool IsA(class UClass* TypeClass) const;
bool IsDefaultObject() const;
public:
static class UClass* FindClass(const std::string& ClassFullName)
{
return FindObject<class UClass>(ClassFullName, EClassCastFlags::Class);
}
static class UClass* FindClassFast(const std::string& ClassName)
{
return FindObjectFast<class UClass>(ClassName, EClassCastFlags::Class);
}
template<typename UEType = UObject>
static UEType* FindObject(const std::string& Name, EClassCastFlags RequiredType = EClassCastFlags::None)
{
return static_cast<UEType*>(FindObjectImpl(Name, RequiredType));
}
template<typename UEType = UObject>
static UEType* FindObjectFast(const std::string& Name, EClassCastFlags RequiredType = EClassCastFlags::None)
{
return static_cast<UEType*>(FindObjectFastImpl(Name, RequiredType));
}
void ProcessEvent(class UFunction* Function, void* Parms) const
{
InSDKUtils::CallGameFunction(InSDKUtils::GetVirtualFunction<void(*)(const UObject*, class UFunction*, void*)>(this, Offsets::ProcessEventIdx), this, Function, Parms);
}
static class UClass* StaticClass()
{
return StaticClassImpl<"Object">();
}
static class UObject* GetDefaultObj()
{
return GetDefaultObjImpl<UObject>();
}
};
class UField : public UObject
{
public:
class UField* Next;
public:
static class UClass* StaticClass()
{
return StaticClassImpl<"Field">();
}
static class UField* GetDefaultObj()
{
return GetDefaultObjImpl<UField>();
}
};
class UProperty : public UField
{
public:
int32 ArrayDim;
int32 ElementSize;
uint64 PropertyFlags;
uint8 Pad_20[0x4];
int32 Offset;
uint8 Pad_21[0x28];
public:
static class UClass* StaticClass()
{
return StaticClassImpl<"Property">();
}
static class UProperty* GetDefaultObj()
{
return GetDefaultObjImpl<UProperty>();
}
};
class UStruct : public UField
{
public:
class UStruct* Super;
class UField* Children;
int32 Size;
int32 MinAlignemnt;
uint8 Pad_1D[0x40];
public:
bool IsSubclassOf(const UStruct* Base) const;
public:
static class UClass* StaticClass()
{
return StaticClassImpl<"Struct">();
}
static class UStruct* GetDefaultObj()
{
return GetDefaultObjImpl<UStruct>();
}
};
class UClass : public UStruct
{
public:
uint8 Pad_24[0x30];
enum class EClassCastFlags CastFlags;
uint8 Pad_25[0x38];
class UObject* DefaultObject;
uint8 Pad_26[0xF8];
public:
class UFunction* GetFunction(const std::string& ClassName, const std::string& FuncName) const;
public:
static class UClass* StaticClass()
{
return StaticClassImpl<"Class">();
}
static class UClass* GetDefaultObj()
{
return GetDefaultObjImpl<UClass>();
}
};
class UFunction : public UStruct
{
public:
using FNativeFuncPtr = void (*)(void* Context, void* TheStack, void* Result);
uint32 FunctionFlags;
uint8 Pad_27[0x20];
FNativeFuncPtr ExecFunction;
public:
static class UClass* StaticClass()
{
return StaticClassImpl<"Function">();
}
static class UFunction* GetDefaultObj()
{
return GetDefaultObjImpl<UFunction>();
}
};
}
-925
View File
@@ -1,925 +0,0 @@
#pragma once
#include <string>
#include <stdexcept>
#include <cmath>
#include <Windows.h>
namespace UE4
{
namespace Containers
{
typedef int8_t int8;
typedef int16_t int16;
typedef int32_t int32;
typedef int64_t int64;
typedef uint8_t uint8;
typedef uint16_t uint16;
typedef uint32_t uint32;
typedef uint64_t uint64;
namespace FMemory
{
inline void* (*Realloc)(void* Memory, int64_t NewSize, uint32_t Alignment);
inline void* (*Free)(void* Memory);
}
template<typename ArrayElementType>
class TArray;
template<typename SparseArrayElementType>
class TSparseArray;
template<typename SetElementType>
class TSet;
template<typename KeyElementType, typename ValueElementType>
class TMap;
template<typename KeyElementType, typename ValueElementType>
class TPair;
namespace Iterators
{
class FSetBitIterator;
template<typename ArrayType>
class TArrayIterator;
template<class ContainerType>
class TContainerIterator;
template<typename SparseArrayElementType>
using TSparseArrayIterator = TContainerIterator<TSparseArray<SparseArrayElementType>>;
template<typename SetElementType>
using TSetIterator = TContainerIterator<TSet<SetElementType>>;
template<typename KeyElementType, typename ValueElementType>
using TMapIterator = TContainerIterator<TMap<KeyElementType, ValueElementType>>;
}
namespace ContainerImpl
{
namespace HelperFunctions
{
inline uint32 FloorLog2(uint32 Value)
{
uint32 pos = 0;
if (Value >= 1 << 16) { Value >>= 16; pos += 16; }
if (Value >= 1 << 8) { Value >>= 8; pos += 8; }
if (Value >= 1 << 4) { Value >>= 4; pos += 4; }
if (Value >= 1 << 2) { Value >>= 2; pos += 2; }
if (Value >= 1 << 1) { pos += 1; }
return pos;
}
inline uint32 CountLeadingZeros(uint32 Value)
{
if (Value == 0)
return 32;
return 31 - FloorLog2(Value);
}
}
template<int32 Size, uint32 Alignment>
struct TAlignedBytes
{
alignas(Alignment) uint8 Pad[Size];
};
template<uint32 NumInlineElements>
class TInlineAllocator
{
public:
template<typename ElementType>
class ForElementType
{
private:
static constexpr int32 ElementSize = sizeof(ElementType);
static constexpr int32 ElementAlign = alignof(ElementType);
static constexpr int32 InlineDataSizeBytes = NumInlineElements * ElementSize;
private:
TAlignedBytes<ElementSize, ElementAlign> InlineData[NumInlineElements];
ElementType* SecondaryData;
public:
ForElementType()
: InlineData{ 0x0 }, SecondaryData(nullptr)
{
}
ForElementType(ForElementType&&) = default;
ForElementType(const ForElementType&) = default;
public:
ForElementType& operator=(ForElementType&&) = default;
ForElementType& operator=(const ForElementType&) = default;
public:
inline const ElementType* GetAllocation() const { return SecondaryData ? SecondaryData : reinterpret_cast<const ElementType*>(&InlineData); }
inline uint32 GetNumInlineBytes() const { return NumInlineElements; }
};
};
class FBitArray
{
protected:
static constexpr int32 NumBitsPerDWORD = 32;
static constexpr int32 NumBitsPerDWORDLogTwo = 5;
private:
TInlineAllocator<4>::ForElementType<int32> Data;
int32 NumBits;
int32 MaxBits;
public:
FBitArray()
: NumBits(0), MaxBits(Data.GetNumInlineBytes()* NumBitsPerDWORD)
{
}
FBitArray(const FBitArray&) = default;
FBitArray(FBitArray&&) = default;
public:
FBitArray& operator=(FBitArray&&) = default;
FBitArray& operator=(const FBitArray& Other) = default;
private:
inline void VerifyIndex(int32 Index) const { if (!IsValidIndex(Index)) throw std::out_of_range("Index was out of range!"); }
public:
inline int32 Num() const { return NumBits; }
inline int32 Max() const { return MaxBits; }
inline const uint32* GetData() const { return reinterpret_cast<const uint32*>(Data.GetAllocation()); }
inline bool IsValidIndex(int32 Index) const { return Index >= 0 && Index < NumBits; }
inline bool IsValid() const { return GetData() && NumBits > 0; }
public:
inline bool operator[](int32 Index) const { VerifyIndex(Index); return GetData()[Index / NumBitsPerDWORD] & (1 << (Index & (NumBitsPerDWORD - 1))); }
inline bool operator==(const FBitArray& Other) const { return NumBits == Other.NumBits && GetData() == Other.GetData(); }
inline bool operator!=(const FBitArray& Other) const { return NumBits != Other.NumBits || GetData() != Other.GetData(); }
public:
friend Iterators::FSetBitIterator begin(const FBitArray& Array);
friend Iterators::FSetBitIterator end(const FBitArray& Array);
};
template<typename SparseArrayType>
union TSparseArrayElementOrFreeListLink
{
SparseArrayType ElementData;
struct
{
int32 PrevFreeIndex;
int32 NextFreeIndex;
};
};
template<typename SetType>
class SetElement
{
private:
template<typename SetDataType>
friend class TSet;
private:
SetType Value;
int32 HashNextId;
int32 HashIndex;
};
}
template <typename KeyType, typename ValueType>
class TPair
{
private:
KeyType First;
ValueType Second;
public:
TPair(KeyType Key, ValueType Value)
: First(Key), Second(Value)
{
}
public:
inline KeyType& Key() { return First; }
inline const KeyType& Key() const { return First; }
inline ValueType& Value() { return Second; }
inline const ValueType& Value() const { return Second; }
};
template<typename ArrayElementType>
class TArray
{
private:
template<typename ArrayElementType>
friend class TAllocatedArray;
template<typename SparseArrayElementType>
friend class TSparseArray;
protected:
static constexpr uint64 ElementAlign = alignof(ArrayElementType);
static constexpr uint64 ElementSize = sizeof(ArrayElementType);
public:
ArrayElementType* Data;
int32 NumElements;
int32 MaxElements;
TArray()
: Data(nullptr), NumElements(0), MaxElements(0)
{
}
TArray(const TArray&) = default;
TArray(TArray&&) = default;
public:
TArray& operator=(TArray&&) = default;
TArray& operator=(const TArray&) = default;
private:
inline int32 GetSlack() const { return MaxElements - NumElements; }
inline void VerifyIndex(int32 Index) const { if (!IsValidIndex(Index)) throw std::out_of_range("Index was out of range!"); }
inline ArrayElementType& GetUnsafe(int32 Index) { return Data[Index]; }
inline const ArrayElementType& GetUnsafe(int32 Index) const { return Data[Index]; }
public:
inline void Reserve(const int Num)
{
Data = (ArrayElementType*)FMemory::Realloc(Data, (MaxElements = Num + NumElements) * sizeof(ArrayElementType), 0);
}
inline void Free()
{
if (Data)
FMemory::Free(Data);
MaxElements = 0;
NumElements = 0;
}
inline ArrayElementType& Add(const ArrayElementType& InData)
{
Reserve(1);
Data[NumElements] = InData;
++NumElements;
return Data[NumElements - 1];
}
void AddWithSize(size_t SizeOfElement, void* ElementPointer)
{
Data = (ArrayElementType*)FMemory::Realloc(Data, SizeOfElement * (NumElements + 1), 0);
memcpy((Data + ((SizeOfElement - sizeof(ArrayElementType)) * NumElements) + NumElements++), ElementPointer, SizeOfElement);
MaxElements = NumElements;
}
inline bool Remove(int Index)
{
if (Index < NumElements)
{
if (Index != NumElements - 1)
{
Data[Index] = Data[NumElements - 1];
}
--NumElements;
return true;
}
return false;
}
inline void Clear()
{
NumElements = 0;
if (!Data)
memset(Data, 0, NumElements * ElementSize);
}
public:
inline int32 Num() const { return NumElements; }
inline int32 Max() const { return MaxElements; }
inline bool IsValidIndex(int32 Index) const { return Data && Index >= 0 && Index < NumElements; }
inline bool IsValid() const { return Data && NumElements > 0 && MaxElements >= NumElements; }
public:
inline ArrayElementType& operator[](int32 Index) { VerifyIndex(Index); return Data[Index]; }
inline const ArrayElementType& operator[](int32 Index) const { VerifyIndex(Index); return Data[Index]; }
inline bool operator==(const TArray<ArrayElementType>& Other) const { return Data == Other.Data; }
inline bool operator!=(const TArray<ArrayElementType>& Other) const { return Data != Other.Data; }
inline explicit operator bool() const { return IsValid(); };
public:
template<typename T> friend Iterators::TArrayIterator<T> begin(const TArray& Array);
template<typename T> friend Iterators::TArrayIterator<T> end(const TArray& Array);
};
class FString : public TArray<wchar_t>
{
public:
using TArray::TArray;
FString(const wchar_t* Str)
{
const uint32 NullTerminatedLength = static_cast<uint32>(wcslen(Str) + 0x1);
Data = const_cast<wchar_t*>(Str);
NumElements = NullTerminatedLength;
MaxElements = NullTerminatedLength;
}
public:
inline std::string ToString() const
{
if (*this)
{
std::wstring WData(Data);
#pragma warning(suppress: 4244)
return std::string(WData.begin(), WData.end());
}
return "";
}
inline std::wstring ToWString() const
{
if (*this)
return std::wstring(Data);
return L"";
}
public:
inline wchar_t* CStr() { return Data; }
inline const wchar_t* CStr() const { return Data; }
public:
inline bool operator==(const FString& Other) const { return Other ? NumElements == Other.NumElements && wcscmp(Data, Other.Data) == 0 : false; }
inline bool operator!=(const FString& Other) const { return Other ? NumElements != Other.NumElements || wcscmp(Data, Other.Data) != 0 : true; }
};
template<typename ArrayElementType>
class TAllocatedArray : public TArray<ArrayElementType>
{
public:
TAllocatedArray() = delete;
public:
TAllocatedArray(int32 Size)
{
this->Data = static_cast<ArrayElementType*>(malloc(Size * sizeof(ArrayElementType)));
this->NumElements = 0x0;
this->MaxElements = Size;
}
~TAllocatedArray()
{
if (this->Data)
free(this->Data);
this->NumElements = 0x0;
this->MaxElements = 0x0;
}
public:
inline operator TArray<ArrayElementType>() { return *reinterpret_cast<TArray<ArrayElementType>*>(this); }
inline operator const TArray<ArrayElementType>() const { return *reinterpret_cast<const TArray<ArrayElementType>*>(this); }
};
class FAllocatedString : public FString
{
public:
FAllocatedString() = delete;
public:
FAllocatedString(int32 Size)
{
Data = static_cast<wchar_t*>(malloc(Size * sizeof(wchar_t)));
NumElements = 0x0;
MaxElements = Size;
}
~FAllocatedString()
{
if (Data)
free(Data);
NumElements = 0x0;
MaxElements = 0x0;
}
public:
inline operator FString() { return *reinterpret_cast<FString*>(this); }
inline operator const FString() const { return *reinterpret_cast<const FString*>(this); }
};
template<typename SparseArrayElementType>
class TSparseArray
{
private:
static constexpr uint32 ElementAlign = alignof(SparseArrayElementType);
static constexpr uint32 ElementSize = sizeof(SparseArrayElementType);
private:
using FElementOrFreeListLink = ContainerImpl::TSparseArrayElementOrFreeListLink<ContainerImpl::TAlignedBytes<ElementSize, ElementAlign>>;
private:
TArray<FElementOrFreeListLink> Data;
ContainerImpl::FBitArray AllocationFlags;
int32 FirstFreeIndex;
int32 NumFreeIndices;
public:
TSparseArray()
: FirstFreeIndex(-1), NumFreeIndices(0)
{
}
TSparseArray(TSparseArray&&) = default;
TSparseArray(const TSparseArray&) = default;
public:
TSparseArray& operator=(TSparseArray&&) = default;
TSparseArray& operator=(const TSparseArray&) = default;
private:
inline void VerifyIndex(int32 Index) const { if (!IsValidIndex(Index)) throw std::out_of_range("Index was out of range!"); }
public:
inline int32 NumAllocated() const { return Data.Num(); }
inline int32 Num() const { return NumAllocated() - NumFreeIndices; }
inline int32 Max() const { return Data.Max(); }
inline bool IsValidIndex(int32 Index) const { return Data.IsValidIndex(Index) && AllocationFlags[Index]; }
inline bool IsValid() const { return Data.IsValid() && AllocationFlags.IsValid(); }
public:
const ContainerImpl::FBitArray& GetAllocationFlags() const { return AllocationFlags; }
public:
inline SparseArrayElementType& operator[](int32 Index) { VerifyIndex(Index); return *reinterpret_cast<SparseArrayElementType*>(&Data.GetUnsafe(Index).ElementData); }
inline const SparseArrayElementType& operator[](int32 Index) const { VerifyIndex(Index); return *reinterpret_cast<SparseArrayElementType*>(&Data.GetUnsafe(Index).ElementData); }
inline bool operator==(const TSparseArray<SparseArrayElementType>& Other) const { return Data == Other.Data; }
inline bool operator!=(const TSparseArray<SparseArrayElementType>& Other) const { return Data != Other.Data; }
public:
template<typename T> friend Iterators::TSparseArrayIterator<T> begin(const TSparseArray& Array);
template<typename T> friend Iterators::TSparseArrayIterator<T> end(const TSparseArray& Array);
};
template<typename SetElementType>
class TSet
{
private:
static constexpr uint32 ElementAlign = alignof(SetElementType);
static constexpr uint32 ElementSize = sizeof(SetElementType);
private:
using SetDataType = ContainerImpl::SetElement<SetElementType>;
using HashType = ContainerImpl::TInlineAllocator<1>::ForElementType<int32>;
private:
TSparseArray<SetDataType> Elements;
HashType Hash;
int32 HashSize;
public:
TSet()
: HashSize(0)
{
}
TSet(TSet&&) = default;
TSet(const TSet&) = default;
public:
TSet& operator=(TSet&&) = default;
TSet& operator=(const TSet&) = default;
private:
inline void VerifyIndex(int32 Index) const { if (!IsValidIndex(Index)) throw std::out_of_range("Index was out of range!"); }
public:
inline int32 NumAllocated() const { return Elements.NumAllocated(); }
inline int32 Num() const { return Elements.Num(); }
inline int32 Max() const { return Elements.Max(); }
inline bool IsValidIndex(int32 Index) const { return Elements.IsValidIndex(Index); }
inline bool IsValid() const { return Elements.IsValid(); }
public:
const ContainerImpl::FBitArray& GetAllocationFlags() const { return Elements.GetAllocationFlags(); }
public:
inline SetElementType& operator[] (int32 Index) { return Elements[Index].Value; }
inline const SetElementType& operator[] (int32 Index) const { return Elements[Index].Value; }
inline bool operator==(const TSet<SetElementType>& Other) const { return Elements == Other.Elements; }
inline bool operator!=(const TSet<SetElementType>& Other) const { return Elements != Other.Elements; }
public:
template<typename T> friend Iterators::TSetIterator<T> begin(const TSet& Set);
template<typename T> friend Iterators::TSetIterator<T> end(const TSet& Set);
};
template<typename KeyElementType, typename ValueElementType>
class TMap
{
public:
using ElementType = TPair<KeyElementType, ValueElementType>;
private:
TSet<ElementType> Elements;
private:
inline void VerifyIndex(int32 Index) const { if (!IsValidIndex(Index)) throw std::out_of_range("Index was out of range!"); }
public:
inline int32 NumAllocated() const { return Elements.NumAllocated(); }
inline int32 Num() const { return Elements.Num(); }
inline int32 Max() const { return Elements.Max(); }
inline bool IsValidIndex(int32 Index) const { return Elements.IsValidIndex(Index); }
inline bool IsValid() const { return Elements.IsValid(); }
public:
const ContainerImpl::FBitArray& GetAllocationFlags() const { return Elements.GetAllocationFlags(); }
public:
inline decltype(auto) Find(const KeyElementType& Key, bool(*Equals)(const KeyElementType& LeftKey, const KeyElementType& RightKey))
{
for (auto It = begin(*this); It != end(*this); ++It)
{
if (Equals(It->Key(), Key))
return It;
}
return end(*this);
}
public:
inline ElementType& operator[] (int32 Index) { return Elements[Index]; }
inline const ElementType& operator[] (int32 Index) const { return Elements[Index]; }
inline bool operator==(const TMap<KeyElementType, ValueElementType>& Other) const { return Elements == Other.Elements; }
inline bool operator!=(const TMap<KeyElementType, ValueElementType>& Other) const { return Elements != Other.Elements; }
public:
template<typename KeyType, typename ValueType> friend Iterators::TMapIterator<KeyType, ValueType> begin(const TMap& Map);
template<typename KeyType, typename ValueType> friend Iterators::TMapIterator<KeyType, ValueType> end(const TMap& Map);
};
namespace Iterators
{
class FRelativeBitReference
{
protected:
static constexpr int32 NumBitsPerDWORD = 32;
static constexpr int32 NumBitsPerDWORDLogTwo = 5;
public:
inline explicit FRelativeBitReference(int32 BitIndex)
: WordIndex(BitIndex >> NumBitsPerDWORDLogTwo)
, Mask(1 << (BitIndex & (NumBitsPerDWORD - 1)))
{
}
int32 WordIndex;
uint32 Mask;
};
class FSetBitIterator : public FRelativeBitReference
{
private:
const ContainerImpl::FBitArray& Array;
uint32 UnvisitedBitMask;
int32 CurrentBitIndex;
int32 BaseBitIndex;
public:
explicit FSetBitIterator(const ContainerImpl::FBitArray& InArray, int32 StartIndex = 0)
: FRelativeBitReference(StartIndex)
, Array(InArray)
, UnvisitedBitMask((~0U) << (StartIndex & (NumBitsPerDWORD - 1)))
, CurrentBitIndex(StartIndex)
, BaseBitIndex(StartIndex & ~(NumBitsPerDWORD - 1))
{
if (StartIndex != Array.Num())
FindFirstSetBit();
}
public:
inline FSetBitIterator& operator++()
{
UnvisitedBitMask &= ~this->Mask;
FindFirstSetBit();
return *this;
}
inline explicit operator bool() const { return CurrentBitIndex < Array.Num(); }
inline bool operator==(const FSetBitIterator& Rhs) const { return CurrentBitIndex == Rhs.CurrentBitIndex && &Array == &Rhs.Array; }
inline bool operator!=(const FSetBitIterator& Rhs) const { return CurrentBitIndex != Rhs.CurrentBitIndex || &Array != &Rhs.Array; }
public:
inline int32 GetIndex() { return CurrentBitIndex; }
void FindFirstSetBit()
{
const uint32* ArrayData = Array.GetData();
const int32 ArrayNum = Array.Num();
const int32 LastWordIndex = (ArrayNum - 1) / NumBitsPerDWORD;
uint32 RemainingBitMask = ArrayData[this->WordIndex] & UnvisitedBitMask;
while (!RemainingBitMask)
{
++this->WordIndex;
BaseBitIndex += NumBitsPerDWORD;
if (this->WordIndex > LastWordIndex)
{
CurrentBitIndex = ArrayNum;
return;
}
RemainingBitMask = ArrayData[this->WordIndex];
UnvisitedBitMask = ~0;
}
const uint32 NewRemainingBitMask = RemainingBitMask & (RemainingBitMask - 1);
this->Mask = NewRemainingBitMask ^ RemainingBitMask;
CurrentBitIndex = BaseBitIndex + NumBitsPerDWORD - 1 - ContainerImpl::HelperFunctions::CountLeadingZeros(this->Mask);
if (CurrentBitIndex > ArrayNum)
CurrentBitIndex = ArrayNum;
}
};
template<typename ArrayType>
class TArrayIterator
{
private:
TArray<ArrayType>& IteratedArray;
int32 Index;
public:
TArrayIterator(const TArray<ArrayType>& Array, int32 StartIndex = 0x0)
: IteratedArray(const_cast<TArray<ArrayType>&>(Array)), Index(StartIndex)
{
}
public:
inline int32 GetIndex() { return Index; }
inline int32 IsValid() { return IteratedArray.IsValidIndex(GetIndex()); }
public:
inline TArrayIterator& operator++() { ++Index; return *this; }
inline TArrayIterator& operator--() { --Index; return *this; }
inline ArrayType& operator*() { return IteratedArray[GetIndex()]; }
inline const ArrayType& operator*() const { return IteratedArray[GetIndex()]; }
inline ArrayType* operator->() { return &IteratedArray[GetIndex()]; }
inline const ArrayType* operator->() const { return &IteratedArray[GetIndex()]; }
inline bool operator==(const TArrayIterator& Other) const { return &IteratedArray == &Other.IteratedArray && Index == Other.Index; }
inline bool operator!=(const TArrayIterator& Other) const { return &IteratedArray != &Other.IteratedArray || Index != Other.Index; }
};
template<class ContainerType>
class TContainerIterator
{
private:
ContainerType& IteratedContainer;
FSetBitIterator BitIterator;
public:
TContainerIterator(const ContainerType& Container, const ContainerImpl::FBitArray& BitArray, int32 StartIndex = 0x0)
: IteratedContainer(const_cast<ContainerType&>(Container)), BitIterator(BitArray, StartIndex)
{
}
public:
inline int32 GetIndex() { return BitIterator.GetIndex(); }
inline int32 IsValid() { return IteratedContainer.IsValidIndex(GetIndex()); }
public:
inline TContainerIterator& operator++() { ++BitIterator; return *this; }
inline TContainerIterator& operator--() { --BitIterator; return *this; }
inline auto& operator*() { return IteratedContainer[GetIndex()]; }
inline const auto& operator*() const { return IteratedContainer[GetIndex()]; }
inline auto* operator->() { return &IteratedContainer[GetIndex()]; }
inline const auto* operator->() const { return &IteratedContainer[GetIndex()]; }
inline bool operator==(const TContainerIterator& Other) const { return &IteratedContainer == &Other.IteratedContainer && BitIterator == Other.BitIterator; }
inline bool operator!=(const TContainerIterator& Other) const { return &IteratedContainer != &Other.IteratedContainer || BitIterator != Other.BitIterator; }
};
}
inline Iterators::FSetBitIterator begin(const ContainerImpl::FBitArray& Array) { return Iterators::FSetBitIterator(Array, 0); }
inline Iterators::FSetBitIterator end(const ContainerImpl::FBitArray& Array) { return Iterators::FSetBitIterator(Array, Array.Num()); }
template<typename T> inline Iterators::TArrayIterator<T> begin(const TArray<T>& Array) { return Iterators::TArrayIterator<T>(Array, 0); }
template<typename T> inline Iterators::TArrayIterator<T> end(const TArray<T>& Array) { return Iterators::TArrayIterator<T>(Array, Array.Num()); }
template<typename T> inline Iterators::TSparseArrayIterator<T> begin(const TSparseArray<T>& Array) { return Iterators::TSparseArrayIterator<T>(Array, Array.GetAllocationFlags(), 0); }
template<typename T> inline Iterators::TSparseArrayIterator<T> end(const TSparseArray<T>& Array) { return Iterators::TSparseArrayIterator<T>(Array, Array.GetAllocationFlags(), Array.NumAllocated()); }
template<typename T> inline Iterators::TSetIterator<T> begin(const TSet<T>& Set) { return Iterators::TSetIterator<T>(Set, Set.GetAllocationFlags(), 0); }
template<typename T> inline Iterators::TSetIterator<T> end(const TSet<T>& Set) { return Iterators::TSetIterator<T>(Set, Set.GetAllocationFlags(), Set.NumAllocated()); }
template<typename T0, typename T1> inline Iterators::TMapIterator<T0, T1> begin(const TMap<T0, T1>& Map) { return Iterators::TMapIterator<T0, T1>(Map, Map.GetAllocationFlags(), 0); }
template<typename T0, typename T1> inline Iterators::TMapIterator<T0, T1> end(const TMap<T0, T1>& Map) { return Iterators::TMapIterator<T0, T1>(Map, Map.GetAllocationFlags(), Map.NumAllocated()); }
struct FVector
{
public:
using UnderlayingType = float;
float X;
float Y;
float Z;
public:
FVector& Normalize()
{
*this /= Magnitude();
return *this;
}
FVector& operator*=(const FVector& Other)
{
*this = *this * Other;
return *this;
}
FVector& operator*=(float Scalar)
{
*this = *this * Scalar;
return *this;
}
FVector& operator+=(const FVector& Other)
{
*this = *this + Other;
return *this;
}
FVector& operator-=(const FVector& Other)
{
*this = *this - Other;
return *this;
}
FVector& operator/=(const FVector& Other)
{
*this = *this / Other;
return *this;
}
FVector& operator/=(float Scalar)
{
*this = *this / Scalar;
return *this;
}
UnderlayingType Dot(const FVector& Other) const
{
return (X * Other.X) + (Y * Other.Y) + (Z * Other.Z);
}
UnderlayingType GetDistanceTo(const FVector& Other) const
{
FVector DiffVector = Other - *this;
return DiffVector.Magnitude();
}
UnderlayingType GetDistanceToInMeters(const FVector& Other) const
{
return GetDistanceTo(Other) * 0.01;
}
FVector GetNormalized() const
{
return *this / Magnitude();
}
bool IsZero() const
{
return X == 0.0 && Y == 0.0 && Z == 0.0;
}
UnderlayingType Magnitude() const
{
return std::sqrt((X * X) + (Y * Y) + (Z * Z));
}
bool operator!=(const FVector& Other) const
{
return X != Other.X || Y != Other.Y || Z != Other.Z;
}
FVector operator*(const FVector& Other) const
{
return { X * Other.X, Y * Other.Y, Z * Other.Z };
}
FVector operator*(float Scalar) const
{
return { X * Scalar, Y * Scalar, Z * Scalar };
}
FVector operator+(const FVector& Other) const
{
return { X + Other.X, Y + Other.Y, Z + Other.Z };
}
FVector operator-(const FVector& Other) const
{
return { X - Other.X, Y - Other.Y, Z - Other.Z };
}
FVector operator/(const FVector& Other) const
{
if (Other.X == 0.0f || Other.Y == 0.0f || Other.Z == 0.0f)
return *this;
return { X / Other.X, Y / Other.Y, Z / Other.Z };
}
FVector operator/(float Scalar) const
{
if (Scalar == 0.0f)
return *this;
return { X / Scalar, Y / Scalar, Z / Scalar };
}
bool operator==(const FVector& Other) const
{
return X == Other.X && Y == Other.Y && Z == Other.Z;
}
};
struct FRotator final
{
public:
float Pitch;
float Yaw;
float Roll;
};
struct FQuat final
{
public:
float X; // 0x0000(0x0004)(Edit, BlueprintVisible, ZeroConstructor, SaveGame, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
float Y; // 0x0004(0x0004)(Edit, BlueprintVisible, ZeroConstructor, SaveGame, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
float Z; // 0x0008(0x0004)(Edit, BlueprintVisible, ZeroConstructor, SaveGame, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
float W; // 0x000C(0x0004)(Edit, BlueprintVisible, ZeroConstructor, SaveGame, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
};
struct FTransform final
{
public:
struct FQuat Rotation; // 0x0000(0x0010)(Edit, BlueprintVisible, SaveGame, IsPlainOldData, NoDestructor, NativeAccessSpecifierPublic)
struct FVector Translation; // 0x0010(0x000C)(Edit, BlueprintVisible, SaveGame, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
uint8 Pad_16[0x4]; // 0x001C(0x0004)(Fixing Size After Last Property [ Dumper-7 ])
struct FVector Scale3D; // 0x0020(0x000C)(Edit, BlueprintVisible, SaveGame, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
uint8 Pad_17[0x4]; // 0x002C(0x0004)(Fixing Struct Size After Last Property [ Dumper-7 ])
};
struct FGuid final
{
public:
int32 A; // 0x0000(0x0004)(Edit, ZeroConstructor, SaveGame, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
int32 B; // 0x0004(0x0004)(Edit, ZeroConstructor, SaveGame, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
int32 C; // 0x0008(0x0004)(Edit, ZeroConstructor, SaveGame, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
int32 D; // 0x000C(0x0004)(Edit, ZeroConstructor, SaveGame, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
};
}
}
+9
View File
@@ -0,0 +1,9 @@
#include "framework.h"
void ShowConsole()
{
std::cout << Engine->ConsoleClass->GetFullName() << std::endl;
SDK::UInputSettings::GetDefaultObj()->ConsoleKeys[0].KeyName = SDK::UKismetStringLibrary::Conv_StringToName(L"F8");
SDK::UObject* NewObject = SDK::UGameplayStatics::SpawnObject(Engine->ConsoleClass, Engine->GameViewport);
Engine->GameViewport->ViewportConsole = static_cast<SDK::UConsole*>(NewObject);
}
+3
View File
@@ -0,0 +1,3 @@
#pragma once
void ShowConsole();
-22
View File
@@ -1,22 +0,0 @@
#pragma once
#include "MinHook.h"
// Helper function to convert MH_STATUS to string
inline const char* MyMH_StatusToString(MH_STATUS status) {
switch (status) {
case MH_OK: return "MH_OK";
case MH_ERROR_ALREADY_INITIALIZED: return "MH_ERROR_ALREADY_INITIALIZED";
case MH_ERROR_NOT_INITIALIZED: return "MH_ERROR_NOT_INITIALIZED";
case MH_ERROR_ALREADY_CREATED: return "MH_ERROR_ALREADY_CREATED";
case MH_ERROR_NOT_CREATED: return "MH_ERROR_NOT_CREATED";
case MH_ERROR_ENABLED: return "MH_ERROR_ENABLED";
case MH_ERROR_DISABLED: return "MH_ERROR_DISABLED";
case MH_ERROR_NOT_EXECUTABLE: return "MH_ERROR_NOT_EXECUTABLE";
case MH_ERROR_UNSUPPORTED_FUNCTION: return "MH_ERROR_UNSUPPORTED_FUNCTION";
case MH_ERROR_MEMORY_ALLOC: return "MH_ERROR_MEMORY_ALLOC";
case MH_ERROR_MEMORY_PROTECT: return "MH_ERROR_MEMORY_PROTECT";
case MH_ERROR_MODULE_NOT_FOUND: return "MH_ERROR_MODULE_NOT_FOUND";
case MH_ERROR_FUNCTION_NOT_FOUND: return "MH_ERROR_FUNCTION_NOT_FOUND";
default: return "Unknown error";
}
}
File diff suppressed because it is too large Load Diff
+10 -949
View File
@@ -21,7 +21,7 @@
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{fc93ec25-aab9-430a-8336-2b175bbe3de3}</ProjectGuid>
<ProjectGuid>{36343665-200f-4e12-8490-5671e51cc59b}</ProjectGuid>
<RootNamespace>F4Menu</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
@@ -110,18 +110,13 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;F4MENU_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp20</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
<AdditionalIncludeDirectories>$(ProjectDir)/ThirdParty/MinHook/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>$(ProjectDir)/ThirdParty/MinHook/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>MinHook.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -132,11 +127,8 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;F4MENU_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpp20</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
<AdditionalIncludeDirectories>$(ProjectDir)/ThirdParty/MinHook/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -144,951 +136,20 @@
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>d3d11.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="Classes.hpp" />
<ClInclude Include="Containers.h" />
<ClInclude Include="Engine\Helper.hpp" />
<ClInclude Include="Engine\memcury.h" />
<ClInclude Include="framework.h" />
<ClInclude Include="Game.h" />
<ClInclude Include="GuiManager.hpp" />
<ClInclude Include="Hooks.hpp" />
<ClInclude Include="Logic.hpp" />
<ClInclude Include="SDK\PropertyFixup.hpp" />
<ClInclude Include="SDK\SDK.hpp" />
<ClInclude Include="SDK\SDK\ActorLayerUtilities_classes.hpp" />
<ClInclude Include="SDK\SDK\ActorLayerUtilities_parameters.hpp" />
<ClInclude Include="SDK\SDK\ActorLayerUtilities_structs.hpp" />
<ClInclude Include="SDK\SDK\ActorSequence_classes.hpp" />
<ClInclude Include="SDK\SDK\ActorSequence_structs.hpp" />
<ClInclude Include="SDK\SDK\AdvancedSessions_classes.hpp" />
<ClInclude Include="SDK\SDK\AdvancedSessions_parameters.hpp" />
<ClInclude Include="SDK\SDK\AdvancedSessions_structs.hpp" />
<ClInclude Include="SDK\SDK\AdvancedSteamSessions_classes.hpp" />
<ClInclude Include="SDK\SDK\AdvancedSteamSessions_parameters.hpp" />
<ClInclude Include="SDK\SDK\AdvancedSteamSessions_structs.hpp" />
<ClInclude Include="SDK\SDK\AIModule_classes.hpp" />
<ClInclude Include="SDK\SDK\AIModule_parameters.hpp" />
<ClInclude Include="SDK\SDK\AIModule_structs.hpp" />
<ClInclude Include="SDK\SDK\ALTF4_DragonEGG_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\ALTF4_DragonEGG_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\ALTF4_Solo_GM_classes.hpp" />
<ClInclude Include="SDK\SDK\ALTF4_Solo_GM_parameters.hpp" />
<ClInclude Include="SDK\SDK\ALTF4_Solo_PC_classes.hpp" />
<ClInclude Include="SDK\SDK\ALTF4_Solo_PC_parameters.hpp" />
<ClInclude Include="SDK\SDK\ALTF4_Start_Blueprint_classes.hpp" />
<ClInclude Include="SDK\SDK\ALTF4_Tuto_GM_classes.hpp" />
<ClInclude Include="SDK\SDK\ALTF4_Tuto_GM_parameters.hpp" />
<ClInclude Include="SDK\SDK\ALTF4_Tuto_PC_classes.hpp" />
<ClInclude Include="SDK\SDK\ALTF4_Tuto_PC_parameters.hpp" />
<ClInclude Include="SDK\SDK\AnimationCore_classes.hpp" />
<ClInclude Include="SDK\SDK\AnimationCore_structs.hpp" />
<ClInclude Include="SDK\SDK\AnimationSharing_classes.hpp" />
<ClInclude Include="SDK\SDK\AnimationSharing_parameters.hpp" />
<ClInclude Include="SDK\SDK\AnimationSharing_structs.hpp" />
<ClInclude Include="SDK\SDK\AnimBP_ai_classes.hpp" />
<ClInclude Include="SDK\SDK\AnimBP_ai_parameters.hpp" />
<ClInclude Include="SDK\SDK\AnimBP_ALTF4_Character_classes.hpp" />
<ClInclude Include="SDK\SDK\AnimBP_ALTF4_Character_parameters.hpp" />
<ClInclude Include="SDK\SDK\AnimBP_BarNpcDance_classes.hpp" />
<ClInclude Include="SDK\SDK\AnimBP_BarNpcDance_parameters.hpp" />
<ClInclude Include="SDK\SDK\AnimBP_BarNpc_classes.hpp" />
<ClInclude Include="SDK\SDK\AnimBP_BarNpc_parameters.hpp" />
<ClInclude Include="SDK\SDK\AnimBP_Character_classes.hpp" />
<ClInclude Include="SDK\SDK\AnimBP_Character_parameters.hpp" />
<ClInclude Include="SDK\SDK\AnimGraphRuntime_classes.hpp" />
<ClInclude Include="SDK\SDK\AnimGraphRuntime_parameters.hpp" />
<ClInclude Include="SDK\SDK\AnimGraphRuntime_structs.hpp" />
<ClInclude Include="SDK\SDK\ApexDestruction_classes.hpp" />
<ClInclude Include="SDK\SDK\ApexDestruction_parameters.hpp" />
<ClInclude Include="SDK\SDK\ApexDestruction_structs.hpp" />
<ClInclude Include="SDK\SDK\ArchVisCharacter_classes.hpp" />
<ClInclude Include="SDK\SDK\Area_02_TrapTrigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\Area_02_TrapTrigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\AssetRegistry_classes.hpp" />
<ClInclude Include="SDK\SDK\AssetRegistry_parameters.hpp" />
<ClInclude Include="SDK\SDK\AssetRegistry_structs.hpp" />
<ClInclude Include="SDK\SDK\AssetTags_classes.hpp" />
<ClInclude Include="SDK\SDK\AssetTags_parameters.hpp" />
<ClInclude Include="SDK\SDK\AssetTags_structs.hpp" />
<ClInclude Include="SDK\SDK\AudioAnalyzer_classes.hpp" />
<ClInclude Include="SDK\SDK\AudioCapture_classes.hpp" />
<ClInclude Include="SDK\SDK\AudioCapture_parameters.hpp" />
<ClInclude Include="SDK\SDK\AudioCapture_structs.hpp" />
<ClInclude Include="SDK\SDK\AudioExtensions_classes.hpp" />
<ClInclude Include="SDK\SDK\AudioMixer_classes.hpp" />
<ClInclude Include="SDK\SDK\AudioMixer_parameters.hpp" />
<ClInclude Include="SDK\SDK\AudioMixer_structs.hpp" />
<ClInclude Include="SDK\SDK\AudioPlatformConfiguration_structs.hpp" />
<ClInclude Include="SDK\SDK\AudioSettingsWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\AudioSettingsWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\AudioSynesthesia_classes.hpp" />
<ClInclude Include="SDK\SDK\AudioSynesthesia_parameters.hpp" />
<ClInclude Include="SDK\SDK\AudioSynesthesia_structs.hpp" />
<ClInclude Include="SDK\SDK\AugmentedReality_classes.hpp" />
<ClInclude Include="SDK\SDK\AugmentedReality_parameters.hpp" />
<ClInclude Include="SDK\SDK\AugmentedReality_structs.hpp" />
<ClInclude Include="SDK\SDK\AutomationUtils_classes.hpp" />
<ClInclude Include="SDK\SDK\AutomationUtils_parameters.hpp" />
<ClInclude Include="SDK\SDK\AvfMediaFactory_classes.hpp" />
<ClInclude Include="SDK\SDK\BarDanceNPC_Pawn_classes.hpp" />
<ClInclude Include="SDK\SDK\BarDanceNPC_Pawn_parameters.hpp" />
<ClInclude Include="SDK\SDK\BarNPC_Pawn_classes.hpp" />
<ClInclude Include="SDK\SDK\BarNPC_Pawn_parameters.hpp" />
<ClInclude Include="SDK\SDK\BarrelFireTrapTrigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\BarrelFireTrapTrigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\BarrelSpawner_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\BarrelSpawner_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Barrel_Follower_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\Barrel_Follower_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Barrel_Projectile_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\Barrel_Projectile_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Basic.hpp" />
<ClInclude Include="SDK\SDK\BGM_bp_classes.hpp" />
<ClInclude Include="SDK\SDK\BGM_bp_parameters.hpp" />
<ClInclude Include="SDK\SDK\BPI_Gameinstance_classes.hpp" />
<ClInclude Include="SDK\SDK\BPI_Gameinstance_parameters.hpp" />
<ClInclude Include="SDK\SDK\BPI_MainMenu_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_ai_DarkNight_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_ai_DarkNight_parameters.hpp" />
<ClInclude Include="SDK\SDK\BP_ai_pawn_ver2_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_ai_pawn_ver2_parameters.hpp" />
<ClInclude Include="SDK\SDK\BP_ALTF4_Chick_Pawn_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_ALTF4_Chick_Pawn_parameters.hpp" />
<ClInclude Include="SDK\SDK\BP_ALTF4_Dragon_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_ALTF4_Dragon_parameters.hpp" />
<ClInclude Include="SDK\SDK\BP_ALTF4_Pawn_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_ALTF4_Pawn_parameters.hpp" />
<ClInclude Include="SDK\SDK\BP_ALTF4_Pawn_SoloPlay_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_CannonProjectile_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_CannonProjectile_parameters.hpp" />
<ClInclude Include="SDK\SDK\BP_Cannon_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_Cannon_parameters.hpp" />
<ClInclude Include="SDK\SDK\BP_MainMenuPC_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_MainMenuPC_parameters.hpp" />
<ClInclude Include="SDK\SDK\BP_MainMenu_GM_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_Pawn_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_Pawn_parameters.hpp" />
<ClInclude Include="SDK\SDK\BP_PendulumTraps_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_PendulumTraps_parameters.hpp" />
<ClInclude Include="SDK\SDK\BP_SA01_SwingTrap_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_SA01_SwingTrap_parameters.hpp" />
<ClInclude Include="SDK\SDK\BP_Sky_Sphere_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_Sky_Sphere_parameters.hpp" />
<ClInclude Include="SDK\SDK\BP_WaterDiePawn_classes.hpp" />
<ClInclude Include="SDK\SDK\BP_WaterDiePawn_parameters.hpp" />
<ClInclude Include="SDK\SDK\Brige_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\Brige_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\BuildPatchServices_classes.hpp" />
<ClInclude Include="SDK\SDK\BuildPatchServices_structs.hpp" />
<ClInclude Include="SDK\SDK\CableComponent_classes.hpp" />
<ClInclude Include="SDK\SDK\CableComponent_parameters.hpp" />
<ClInclude Include="SDK\SDK\CannonFireTrapTrigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\CannonFireTrapTrigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\CastleGate_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\CastleGate_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\CastleRoute_TrapTrigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\CastleRoute_TrapTrigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Castle_FootRest_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\Castle_FootRest_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\CenterButton_classes.hpp" />
<ClInclude Include="SDK\SDK\CenterButton_parameters.hpp" />
<ClInclude Include="SDK\SDK\ChallengeRecordMenuWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\ChallengeRecordMenuWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Challenge_EpicLeaderboardEntry_classes.hpp" />
<ClInclude Include="SDK\SDK\Challenge_EpicLeaderboardEntry_parameters.hpp" />
<ClInclude Include="SDK\SDK\ChaosCloth_classes.hpp" />
<ClInclude Include="SDK\SDK\ChaosCloth_structs.hpp" />
<ClInclude Include="SDK\SDK\ChaosNiagara_classes.hpp" />
<ClInclude Include="SDK\SDK\ChaosNiagara_structs.hpp" />
<ClInclude Include="SDK\SDK\ChaosSolverEngine_classes.hpp" />
<ClInclude Include="SDK\SDK\ChaosSolverEngine_parameters.hpp" />
<ClInclude Include="SDK\SDK\ChaosSolverEngine_structs.hpp" />
<ClInclude Include="SDK\SDK\Chaos_structs.hpp" />
<ClInclude Include="SDK\SDK\CheeringNPC_Trap_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\CheeringNPC_Trap_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\ChickBoat_Trap_Bp_classes.hpp" />
<ClInclude Include="SDK\SDK\ChickBoat_Trap_Bp_parameters.hpp" />
<ClInclude Include="SDK\SDK\ChickEggFire_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\ChickEggFire_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\ChickenAnimBlueprint_classes.hpp" />
<ClInclude Include="SDK\SDK\ChickenAnimBlueprint_parameters.hpp" />
<ClInclude Include="SDK\SDK\CinematicCamera_classes.hpp" />
<ClInclude Include="SDK\SDK\CinematicCamera_parameters.hpp" />
<ClInclude Include="SDK\SDK\CinematicCamera_structs.hpp" />
<ClInclude Include="SDK\SDK\ClothingSystemRuntimeCommon_classes.hpp" />
<ClInclude Include="SDK\SDK\ClothingSystemRuntimeCommon_structs.hpp" />
<ClInclude Include="SDK\SDK\ClothingSystemRuntimeInterface_classes.hpp" />
<ClInclude Include="SDK\SDK\ClothingSystemRuntimeInterface_parameters.hpp" />
<ClInclude Include="SDK\SDK\ClothingSystemRuntimeInterface_structs.hpp" />
<ClInclude Include="SDK\SDK\ClothingSystemRuntimeNv_classes.hpp" />
<ClInclude Include="SDK\SDK\ClothingSystemRuntimeNv_parameters.hpp" />
<ClInclude Include="SDK\SDK\ClothingSystemRuntimeNv_structs.hpp" />
<ClInclude Include="SDK\SDK\ControlsGamepadBindingsWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\ControlsGamepadBindingsWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\ControlsKeyBindingsWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\ControlsKeyBindingsWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\ControlsOverviewWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\ControlsOverviewWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\ControlsSettingsContainerWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\ControlsSettingsContainerWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\CoreUObject_classes.hpp" />
<ClInclude Include="SDK\SDK\CoreUObject_parameters.hpp" />
<ClInclude Include="SDK\SDK\CoreUObject_structs.hpp" />
<ClInclude Include="SDK\SDK\CreditsWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\CreditsWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\CustomMeshComponent_classes.hpp" />
<ClInclude Include="SDK\SDK\CustomMeshComponent_parameters.hpp" />
<ClInclude Include="SDK\SDK\CustomMeshComponent_structs.hpp" />
<ClInclude Include="SDK\SDK\CustomSaveGameBP_classes.hpp" />
<ClInclude Include="SDK\SDK\DatasmithContent_classes.hpp" />
<ClInclude Include="SDK\SDK\DatasmithContent_parameters.hpp" />
<ClInclude Include="SDK\SDK\DatasmithContent_structs.hpp" />
<ClInclude Include="SDK\SDK\Dead_NormalBody_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\Dead_NormalBody_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\DecisionButton_classes.hpp" />
<ClInclude Include="SDK\SDK\DecisionButton_parameters.hpp" />
<ClInclude Include="SDK\SDK\DecisionDialogWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\DecisionDialogWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\DemoWidget_Challenge_Mainmenu_classes.hpp" />
<ClInclude Include="SDK\SDK\DemoWidget_Challenge_Mainmenu_parameters.hpp" />
<ClInclude Include="SDK\SDK\DemoWidget_Item_Mainmenu_classes.hpp" />
<ClInclude Include="SDK\SDK\DemoWidget_Item_Mainmenu_parameters.hpp" />
<ClInclude Include="SDK\SDK\DeveloperSettings_classes.hpp" />
<ClInclude Include="SDK\SDK\DevilRoute_BarrelSpawner_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\DevilRoute_BarrelSpawner_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\DevilRoute_TrapTrigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\DevilRoute_TrapTrigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\DisplaySettingsWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\DisplaySettingsWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\DmgTypeBP_Environmental_classes.hpp" />
<ClInclude Include="SDK\SDK\DoorLight_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\DoorLight_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Drangon_AnimBP_classes.hpp" />
<ClInclude Include="SDK\SDK\Drangon_AnimBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\DropSwordTrap_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\DropSwordTrap_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\DrunkNPC_Pawn_classes.hpp" />
<ClInclude Include="SDK\SDK\DrunkNPC_Pawn_parameters.hpp" />
<ClInclude Include="SDK\SDK\DynamicNode_classes.hpp" />
<ClInclude Include="SDK\SDK\DynamicNode_parameters.hpp" />
<ClInclude Include="SDK\SDK\DynamicNode_structs.hpp" />
<ClInclude Include="SDK\SDK\EditableMesh_classes.hpp" />
<ClInclude Include="SDK\SDK\EditableMesh_parameters.hpp" />
<ClInclude Include="SDK\SDK\EditableMesh_structs.hpp" />
<ClInclude Include="SDK\SDK\Egg_shot_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\Egg_shot_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\ElevatorTrap_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\ElevatorTrap_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\EndLocation_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\EngineMessages_structs.hpp" />
<ClInclude Include="SDK\SDK\EngineSettings_classes.hpp" />
<ClInclude Include="SDK\SDK\EngineSettings_parameters.hpp" />
<ClInclude Include="SDK\SDK\EngineSettings_structs.hpp" />
<ClInclude Include="SDK\SDK\Engine_classes.hpp" />
<ClInclude Include="SDK\SDK\Engine_parameters.hpp" />
<ClInclude Include="SDK\SDK\Engine_structs.hpp" />
<ClInclude Include="SDK\SDK\EpicLeaderboardEntryInterface_classes.hpp" />
<ClInclude Include="SDK\SDK\EpicLeaderboardEntryInterface_parameters.hpp" />
<ClInclude Include="SDK\SDK\EpicLeaderboardFrame_classes.hpp" />
<ClInclude Include="SDK\SDK\EpicLeaderboardFrame_parameters.hpp" />
<ClInclude Include="SDK\SDK\EpicLeaderboard_classes.hpp" />
<ClInclude Include="SDK\SDK\EpicLeaderboard_parameters.hpp" />
<ClInclude Include="SDK\SDK\EpicLeaderboard_structs.hpp" />
<ClInclude Include="SDK\SDK\EyeTracker_classes.hpp" />
<ClInclude Include="SDK\SDK\EyeTracker_parameters.hpp" />
<ClInclude Include="SDK\SDK\EyeTracker_structs.hpp" />
<ClInclude Include="SDK\SDK\FacialAnimation_classes.hpp" />
<ClInclude Include="SDK\SDK\FadeBorderWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\FadeBorderWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\FastMoveFootrest_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\FastMoveFootrest_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\FieldSystemEngine_classes.hpp" />
<ClInclude Include="SDK\SDK\FieldSystemEngine_parameters.hpp" />
<ClInclude Include="SDK\SDK\FireBall_Projectile_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\FireBall_Projectile_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\First_Route_TrapTrigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\First_Route_TrapTrigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Foliage_classes.hpp" />
<ClInclude Include="SDK\SDK\Foliage_parameters.hpp" />
<ClInclude Include="SDK\SDK\Foliage_structs.hpp" />
<ClInclude Include="SDK\SDK\GamepadKeyPOV_classes.hpp" />
<ClInclude Include="SDK\SDK\GamepadKeyPOV_parameters.hpp" />
<ClInclude Include="SDK\SDK\GamepadKey_classes.hpp" />
<ClInclude Include="SDK\SDK\GamepadKey_Move_classes.hpp" />
<ClInclude Include="SDK\SDK\GamepadKey_Move_parameters.hpp" />
<ClInclude Include="SDK\SDK\GamepadKey_parameters.hpp" />
<ClInclude Include="SDK\SDK\GamepadWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\GamepadWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\GameplayTags_classes.hpp" />
<ClInclude Include="SDK\SDK\GameplayTags_parameters.hpp" />
<ClInclude Include="SDK\SDK\GameplayTags_structs.hpp" />
<ClInclude Include="SDK\SDK\GameplayTasks_classes.hpp" />
<ClInclude Include="SDK\SDK\GameplayTasks_parameters.hpp" />
<ClInclude Include="SDK\SDK\GameplayTasks_structs.hpp" />
<ClInclude Include="SDK\SDK\GameSettingsWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\GameSettingsWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\GeometryCacheTracks_classes.hpp" />
<ClInclude Include="SDK\SDK\GeometryCacheTracks_structs.hpp" />
<ClInclude Include="SDK\SDK\GeometryCache_classes.hpp" />
<ClInclude Include="SDK\SDK\GeometryCache_parameters.hpp" />
<ClInclude Include="SDK\SDK\GeometryCache_structs.hpp" />
<ClInclude Include="SDK\SDK\GeometryCollectionEngine_classes.hpp" />
<ClInclude Include="SDK\SDK\GeometryCollectionEngine_parameters.hpp" />
<ClInclude Include="SDK\SDK\GeometryCollectionEngine_structs.hpp" />
<ClInclude Include="SDK\SDK\GeometryCollectionTracks_classes.hpp" />
<ClInclude Include="SDK\SDK\GeometryCollectionTracks_structs.hpp" />
<ClInclude Include="SDK\SDK\GlobalInteractableUserWidget_classes.hpp" />
<ClInclude Include="SDK\SDK\GlobalInteractableUserWidget_parameters.hpp" />
<ClInclude Include="SDK\SDK\GooglePAD_classes.hpp" />
<ClInclude Include="SDK\SDK\GooglePAD_parameters.hpp" />
<ClInclude Include="SDK\SDK\GooglePAD_structs.hpp" />
<ClInclude Include="SDK\SDK\GooseShot_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\GooseShot_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\GooseShot_Replicate_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\GooseShot_Replicate_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Goose_shot_classes.hpp" />
<ClInclude Include="SDK\SDK\Goose_shot_parameters.hpp" />
<ClInclude Include="SDK\SDK\GraphicsSettingsWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\GraphicsSettingsWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\HardRoute_TrapTrigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\HardRoute_TrapTrigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\HeadMountedDisplay_classes.hpp" />
<ClInclude Include="SDK\SDK\HeadMountedDisplay_parameters.hpp" />
<ClInclude Include="SDK\SDK\HeadMountedDisplay_structs.hpp" />
<ClInclude Include="SDK\SDK\ImageWrapper_structs.hpp" />
<ClInclude Include="SDK\SDK\ImageWriteQueue_classes.hpp" />
<ClInclude Include="SDK\SDK\ImageWriteQueue_parameters.hpp" />
<ClInclude Include="SDK\SDK\ImageWriteQueue_structs.hpp" />
<ClInclude Include="SDK\SDK\ImgMediaFactory_classes.hpp" />
<ClInclude Include="SDK\SDK\ImgMedia_classes.hpp" />
<ClInclude Include="SDK\SDK\ImgMedia_parameters.hpp" />
<ClInclude Include="SDK\SDK\IngameMenuContainerWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\IngameMenuContainerWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\IngameMenuOverviewWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\IngameMenuOverviewWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\InputCore_classes.hpp" />
<ClInclude Include="SDK\SDK\InputCore_structs.hpp" />
<ClInclude Include="SDK\SDK\InteractableMenuWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\InteractableMenuWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\InteractableUserWidget_classes.hpp" />
<ClInclude Include="SDK\SDK\InteractableUserWidget_parameters.hpp" />
<ClInclude Include="SDK\SDK\InteractiveToolsFramework_classes.hpp" />
<ClInclude Include="SDK\SDK\InteractiveToolsFramework_parameters.hpp" />
<ClInclude Include="SDK\SDK\InteractiveToolsFramework_structs.hpp" />
<ClInclude Include="SDK\SDK\IntroWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\IntroWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\ItemRecordMenuWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\ItemRecordMenuWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Item_EpicLeaderboardEntry_classes.hpp" />
<ClInclude Include="SDK\SDK\Item_EpicLeaderboardEntry_parameters.hpp" />
<ClInclude Include="SDK\SDK\JsonUtilities_classes.hpp" />
<ClInclude Include="SDK\SDK\JsonUtilities_structs.hpp" />
<ClInclude Include="SDK\SDK\JumpJumpTrap_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\JumpJumpTrap_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\KeyboardKey_classes.hpp" />
<ClInclude Include="SDK\SDK\KeyboardKey_parameters.hpp" />
<ClInclude Include="SDK\SDK\KeyboardWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\KeyboardWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Knight_PortalGo_Trigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\Knight_PortalGo_Trigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Knight_Shot_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\Knight_Shot_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Landscape_classes.hpp" />
<ClInclude Include="SDK\SDK\Landscape_parameters.hpp" />
<ClInclude Include="SDK\SDK\Landscape_structs.hpp" />
<ClInclude Include="SDK\SDK\LastRouteSwingTrap_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\LastRouteSwingTrap_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\LastRoute_FootRest_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\LastRoute_FootRest_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\LastRoute_TrapTrigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\LastRoute_TrapTrigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\LaunchShield_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\LaunchShield_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\LevelSequence_classes.hpp" />
<ClInclude Include="SDK\SDK\LevelSequence_parameters.hpp" />
<ClInclude Include="SDK\SDK\LevelSequence_structs.hpp" />
<ClInclude Include="SDK\SDK\LightPropagationVolumeRuntime_classes.hpp" />
<ClInclude Include="SDK\SDK\LiveLinkInterface_classes.hpp" />
<ClInclude Include="SDK\SDK\LiveLinkInterface_structs.hpp" />
<ClInclude Include="SDK\SDK\LoadingScreenWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\LoadingScreenWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\LocationServicesBPLibrary_classes.hpp" />
<ClInclude Include="SDK\SDK\LocationServicesBPLibrary_parameters.hpp" />
<ClInclude Include="SDK\SDK\LocationServicesBPLibrary_structs.hpp" />
<ClInclude Include="SDK\SDK\LuminRuntimeSettings_classes.hpp" />
<ClInclude Include="SDK\SDK\LuminRuntimeSettings_structs.hpp" />
<ClInclude Include="SDK\SDK\Mackerel_anim_bp_classes.hpp" />
<ClInclude Include="SDK\SDK\Mackerel_anim_bp_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapARPinInfoActor_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapARPinInfoActor_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapARPin_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapARPin_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapARPin_structs.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapAR_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapAR_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapAR_structs.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapAudio_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapAudio_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapAudio_structs.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapController_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapController_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapController_structs.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapEyeTracker_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapEyeTracker_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapEyeTracker_structs.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapHandMeshing_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapHandMeshing_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapHandMeshing_structs.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapHandTracking_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapHandTracking_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapHandTracking_structs.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapIdentity_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapIdentity_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapIdentity_structs.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapImageTracker_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapImageTracker_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapImageTracker_structs.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapLightEstimation_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapLightEstimation_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapLightEstimation_structs.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapPlanes_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapPlanes_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapPlanes_structs.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapPrivileges_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapPrivileges_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapPrivileges_structs.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapSecureStorage_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapSecureStorage_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapSharedWorld_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapSharedWorld_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeapSharedWorld_structs.hpp" />
<ClInclude Include="SDK\SDK\MagicLeap_classes.hpp" />
<ClInclude Include="SDK\SDK\MagicLeap_parameters.hpp" />
<ClInclude Include="SDK\SDK\MagicLeap_structs.hpp" />
<ClInclude Include="SDK\SDK\MainButton_classes.hpp" />
<ClInclude Include="SDK\SDK\MainButton_parameters.hpp" />
<ClInclude Include="SDK\SDK\MainMenuContainerWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\MainMenuContainerWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\MainMenuOverviewWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\MainMenuOverviewWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\MainMenu_02_classes.hpp" />
<ClInclude Include="SDK\SDK\MainMenu_02_parameters.hpp" />
<ClInclude Include="SDK\SDK\MapselectMenuWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\MapselectMenuWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\MaterialShaderQualitySettings_classes.hpp" />
<ClInclude Include="SDK\SDK\MaterialShaderQualitySettings_structs.hpp" />
<ClInclude Include="SDK\SDK\MediaAssets_classes.hpp" />
<ClInclude Include="SDK\SDK\MediaAssets_parameters.hpp" />
<ClInclude Include="SDK\SDK\MediaAssets_structs.hpp" />
<ClInclude Include="SDK\SDK\MediaCompositing_classes.hpp" />
<ClInclude Include="SDK\SDK\MediaCompositing_structs.hpp" />
<ClInclude Include="SDK\SDK\MediaUtils_structs.hpp" />
<ClInclude Include="SDK\SDK\MenuCharacterComponent_classes.hpp" />
<ClInclude Include="SDK\SDK\MenuCharacterComponent_parameters.hpp" />
<ClInclude Include="SDK\SDK\MenuControllerComponent_classes.hpp" />
<ClInclude Include="SDK\SDK\MenuControllerComponent_parameters.hpp" />
<ClInclude Include="SDK\SDK\MenuScrollBox_classes.hpp" />
<ClInclude Include="SDK\SDK\MenuScrollBox_parameters.hpp" />
<ClInclude Include="SDK\SDK\MenuSystemPro_classes.hpp" />
<ClInclude Include="SDK\SDK\MenuSystemPro_parameters.hpp" />
<ClInclude Include="SDK\SDK\MeshDescription_classes.hpp" />
<ClInclude Include="SDK\SDK\MeshDescription_parameters.hpp" />
<ClInclude Include="SDK\SDK\MeshDescription_structs.hpp" />
<ClInclude Include="SDK\SDK\MH_Route_TrapTrigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\MH_Route_TrapTrigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\MiddleRoute_Jump_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\MiddleRoute_Jump_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\MiddleRoute_RotationFootrest_classes.hpp" />
<ClInclude Include="SDK\SDK\MiddleRoute_RotationFootrest_parameters.hpp" />
<ClInclude Include="SDK\SDK\MobilePatchingUtils_classes.hpp" />
<ClInclude Include="SDK\SDK\MobilePatchingUtils_parameters.hpp" />
<ClInclude Include="SDK\SDK\MotoSynth_classes.hpp" />
<ClInclude Include="SDK\SDK\MotoSynth_parameters.hpp" />
<ClInclude Include="SDK\SDK\MotoSynth_structs.hpp" />
<ClInclude Include="SDK\SDK\MoveDock_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\MoveDock_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\MoveVane_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\MoveVane_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\MoviePlayer_classes.hpp" />
<ClInclude Include="SDK\SDK\MoviePlayer_structs.hpp" />
<ClInclude Include="SDK\SDK\MovieSceneCapture_classes.hpp" />
<ClInclude Include="SDK\SDK\MovieSceneCapture_parameters.hpp" />
<ClInclude Include="SDK\SDK\MovieSceneCapture_structs.hpp" />
<ClInclude Include="SDK\SDK\MovieSceneTracks_classes.hpp" />
<ClInclude Include="SDK\SDK\MovieSceneTracks_parameters.hpp" />
<ClInclude Include="SDK\SDK\MovieSceneTracks_structs.hpp" />
<ClInclude Include="SDK\SDK\MovieScene_classes.hpp" />
<ClInclude Include="SDK\SDK\MovieScene_parameters.hpp" />
<ClInclude Include="SDK\SDK\MovieScene_structs.hpp" />
<ClInclude Include="SDK\SDK\MRMesh_classes.hpp" />
<ClInclude Include="SDK\SDK\MRMesh_parameters.hpp" />
<ClInclude Include="SDK\SDK\MRMesh_structs.hpp" />
<ClInclude Include="SDK\SDK\Mug_Projectile_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\Mug_Projectile_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\NavigationKeyButton_classes.hpp" />
<ClInclude Include="SDK\SDK\NavigationKeyButton_parameters.hpp" />
<ClInclude Include="SDK\SDK\NavigationSystem_classes.hpp" />
<ClInclude Include="SDK\SDK\NavigationSystem_parameters.hpp" />
<ClInclude Include="SDK\SDK\NavigationSystem_structs.hpp" />
<ClInclude Include="SDK\SDK\NetCore_classes.hpp" />
<ClInclude Include="SDK\SDK\NetCore_structs.hpp" />
<ClInclude Include="SDK\SDK\NiagaraAnimNotifies_classes.hpp" />
<ClInclude Include="SDK\SDK\NiagaraAnimNotifies_parameters.hpp" />
<ClInclude Include="SDK\SDK\NiagaraCore_classes.hpp" />
<ClInclude Include="SDK\SDK\NiagaraCore_structs.hpp" />
<ClInclude Include="SDK\SDK\NiagaraShader_classes.hpp" />
<ClInclude Include="SDK\SDK\NiagaraShader_structs.hpp" />
<ClInclude Include="SDK\SDK\Niagara_classes.hpp" />
<ClInclude Include="SDK\SDK\Niagara_parameters.hpp" />
<ClInclude Include="SDK\SDK\Niagara_structs.hpp" />
<ClInclude Include="SDK\SDK\Nintendo_Stage_Start_Widget_classes.hpp" />
<ClInclude Include="SDK\SDK\Nintendo_Stage_Start_Widget_parameters.hpp" />
<ClInclude Include="SDK\SDK\NoticeWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\NoticeWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\OnlineSubsystemSteam_classes.hpp" />
<ClInclude Include="SDK\SDK\OnlineSubsystemUtils_classes.hpp" />
<ClInclude Include="SDK\SDK\OnlineSubsystemUtils_parameters.hpp" />
<ClInclude Include="SDK\SDK\OnlineSubsystemUtils_structs.hpp" />
<ClInclude Include="SDK\SDK\OnlineSubsystem_classes.hpp" />
<ClInclude Include="SDK\SDK\OnlineSubsystem_parameters.hpp" />
<ClInclude Include="SDK\SDK\OnlineSubsystem_structs.hpp" />
<ClInclude Include="SDK\SDK\OpenBtn_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\OpenBtn_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\OptionsActionBinder_classes.hpp" />
<ClInclude Include="SDK\SDK\OptionsActionBinder_parameters.hpp" />
<ClInclude Include="SDK\SDK\OptionsButton_classes.hpp" />
<ClInclude Include="SDK\SDK\OptionsButton_parameters.hpp" />
<ClInclude Include="SDK\SDK\OptionsMenuContainerWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\OptionsOverviewWidgetBP_classes.hpp" />
<ClInclude Include="SDK\SDK\OptionsOverviewWidgetBP_parameters.hpp" />
<ClInclude Include="SDK\SDK\OptionsPickerSubButton_classes.hpp" />
<ClInclude Include="SDK\SDK\OptionsPickerSubButton_parameters.hpp" />
<ClInclude Include="SDK\SDK\OptionsPicker_classes.hpp" />
<ClInclude Include="SDK\SDK\OptionsPicker_IngameVer_classes.hpp" />
<ClInclude Include="SDK\SDK\OptionsPicker_IngameVer_parameters.hpp" />
<ClInclude Include="SDK\SDK\OptionsPicker_parameters.hpp" />
<ClInclude Include="SDK\SDK\OptionsSlider_classes.hpp" />
<ClInclude Include="SDK\SDK\OptionsSlider_parameters.hpp" />
<ClInclude Include="SDK\SDK\Overlay_classes.hpp" />
<ClInclude Include="SDK\SDK\Overlay_structs.hpp" />
<ClInclude Include="SDK\SDK\PacketHandler_classes.hpp" />
<ClInclude Include="SDK\SDK\Paper2D_classes.hpp" />
<ClInclude Include="SDK\SDK\Paper2D_parameters.hpp" />
<ClInclude Include="SDK\SDK\Paper2D_structs.hpp" />
<ClInclude Include="SDK\SDK\PathFollow_classes.hpp" />
<ClInclude Include="SDK\SDK\PathFollow_parameters.hpp" />
<ClInclude Include="SDK\SDK\PathFollow_structs.hpp" />
<ClInclude Include="SDK\SDK\PauseGameBPI_classes.hpp" />
<ClInclude Include="SDK\SDK\PhysicsCore_classes.hpp" />
<ClInclude Include="SDK\SDK\PhysicsCore_structs.hpp" />
<ClInclude Include="SDK\SDK\PhysicsGetUpBlend_classes.hpp" />
<ClInclude Include="SDK\SDK\PhysicsGetUpBlend_parameters.hpp" />
<ClInclude Include="SDK\SDK\PhysicsGetUpBlend_structs.hpp" />
<ClInclude Include="SDK\SDK\PhysXVehicles_classes.hpp" />
<ClInclude Include="SDK\SDK\PhysXVehicles_parameters.hpp" />
<ClInclude Include="SDK\SDK\PhysXVehicles_structs.hpp" />
<ClInclude Include="SDK\SDK\Play_DeathAndItem_UI_classes.hpp" />
<ClInclude Include="SDK\SDK\Play_DeathAndItem_UI_parameters.hpp" />
<ClInclude Include="SDK\SDK\ProceduralMeshComponent_classes.hpp" />
<ClInclude Include="SDK\SDK\ProceduralMeshComponent_parameters.hpp" />
<ClInclude Include="SDK\SDK\ProceduralMeshComponent_structs.hpp" />
<ClInclude Include="SDK\SDK\PropertyAccess_classes.hpp" />
<ClInclude Include="SDK\SDK\PropertyAccess_structs.hpp" />
<ClInclude Include="SDK\SDK\PropertyPath_structs.hpp" />
<ClInclude Include="SDK\SDK\QuizDoor_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\QuizDoor_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Renderer_structs.hpp" />
<ClInclude Include="SDK\SDK\RotationBull_Trap_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\RotationBull_Trap_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\RotationCannon_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\RotationCannon_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\RotationFootRest_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\RotationFootRest_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\RotationSide_Footrest_Bp_classes.hpp" />
<ClInclude Include="SDK\SDK\RotationSide_Footrest_Bp_parameters.hpp" />
<ClInclude Include="SDK\SDK\RotationTrap_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\RotationTrap_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\RotationWoodenBoard_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\RotationWoodenBoard_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Rotation_SpikeBall_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\Rotation_SpikeBall_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Sancho_ai_controler_classes.hpp" />
<ClInclude Include="SDK\SDK\Sancho_ai_controler_parameters.hpp" />
<ClInclude Include="SDK\SDK\SaveAreaTrigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\SaveAreaTrigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\SavePointSpawn_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\SavePointSpawn_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Save_Point_classes.hpp" />
<ClInclude Include="SDK\SDK\Save_Point_parameters.hpp" />
<ClInclude Include="SDK\SDK\Serialization_structs.hpp" />
<ClInclude Include="SDK\SDK\SessionMessages_structs.hpp" />
<ClInclude Include="SDK\SDK\ShortCutRouteWall_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\ShortCutRouteWall_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\ShortCut_Trigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\ShortCut_Trigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\SignificanceManager_classes.hpp" />
<ClInclude Include="SDK\SDK\SlateCore_classes.hpp" />
<ClInclude Include="SDK\SDK\SlateCore_structs.hpp" />
<ClInclude Include="SDK\SDK\Slate_classes.hpp" />
<ClInclude Include="SDK\SDK\Slate_structs.hpp" />
<ClInclude Include="SDK\SDK\SoundFields_classes.hpp" />
<ClInclude Include="SDK\SDK\SpikeStairTrap_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\SpikeStairTrap_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\SplineMover_classes.hpp" />
<ClInclude Include="SDK\SDK\SplineMover_parameters.hpp" />
<ClInclude Include="SDK\SDK\StageA01_FishShot_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\StageA01_FishShot_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\StageA01_FishSpwan_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\StageA01_FishSpwan_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Start_AirPlane_Blueprint_classes.hpp" />
<ClInclude Include="SDK\SDK\Start_AirPlane_Blueprint_parameters.hpp" />
<ClInclude Include="SDK\SDK\StaticMeshDescription_classes.hpp" />
<ClInclude Include="SDK\SDK\StaticMeshDescription_parameters.hpp" />
<ClInclude Include="SDK\SDK\StaticMeshDescription_structs.hpp" />
<ClInclude Include="SDK\SDK\SteamMulti_GameInstance_classes.hpp" />
<ClInclude Include="SDK\SDK\SteamMulti_GameInstance_parameters.hpp" />
<ClInclude Include="SDK\SDK\StoneSpawnPoint_KillRock_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\StoneSpawnPoint_KillRock_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\SwingFire_Trap_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\SwingFire_Trap_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\SwingSickle_Trap_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\SwingSickle_Trap_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Synthesis_classes.hpp" />
<ClInclude Include="SDK\SDK\Synthesis_parameters.hpp" />
<ClInclude Include="SDK\SDK\Synthesis_structs.hpp" />
<ClInclude Include="SDK\SDK\TcpMessaging_classes.hpp" />
<ClInclude Include="SDK\SDK\TemplateSequence_classes.hpp" />
<ClInclude Include="SDK\SDK\TemplateSequence_parameters.hpp" />
<ClInclude Include="SDK\SDK\TemplateSequence_structs.hpp" />
<ClInclude Include="SDK\SDK\TimeManagement_classes.hpp" />
<ClInclude Include="SDK\SDK\TimeManagement_parameters.hpp" />
<ClInclude Include="SDK\SDK\TimeManagement_structs.hpp" />
<ClInclude Include="SDK\SDK\TIP_UI_classes.hpp" />
<ClInclude Include="SDK\SDK\TIP_UI_parameters.hpp" />
<ClInclude Include="SDK\SDK\TrainRoute_TrapTrigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\TrainRoute_TrapTrigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\TutoDuckDoor_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\TutoDuckDoor_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\Tutorial_Info_UI_classes.hpp" />
<ClInclude Include="SDK\SDK\Tutorial_Info_UI_parameters.hpp" />
<ClInclude Include="SDK\SDK\UdpMessaging_classes.hpp" />
<ClInclude Include="SDK\SDK\UdpMessaging_structs.hpp" />
<ClInclude Include="SDK\SDK\UltimateAbility_CameraShake_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\UMG_classes.hpp" />
<ClInclude Include="SDK\SDK\UMG_parameters.hpp" />
<ClInclude Include="SDK\SDK\UMG_structs.hpp" />
<ClInclude Include="SDK\SDK\UObjectPlugin_classes.hpp" />
<ClInclude Include="SDK\SDK\UObjectPlugin_structs.hpp" />
<ClInclude Include="SDK\SDK\UpDownBalde_Trap_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\UpDownBalde_Trap_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\UpdownFootRest_02_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\UpdownFootRest_02_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\UpTownDragon_TrapTrigger_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\UpTownDragon_TrapTrigger_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\VariantManagerContent_classes.hpp" />
<ClInclude Include="SDK\SDK\VariantManagerContent_parameters.hpp" />
<ClInclude Include="SDK\SDK\VariantManagerContent_structs.hpp" />
<ClInclude Include="SDK\SDK\VectorVM_structs.hpp" />
<ClInclude Include="SDK\SDK\WaterDie_BP_classes.hpp" />
<ClInclude Include="SDK\SDK\WaterDie_BP_parameters.hpp" />
<ClInclude Include="SDK\SDK\WeaponTypeEnum_structs.hpp" />
<ClInclude Include="SDK\SDK\WmfMediaFactory_classes.hpp" />
<ClInclude Include="SDK\SDK\YouDie_UI_classes.hpp" />
<ClInclude Include="SDK\SDK\YouDie_UI_parameters.hpp" />
<ClInclude Include="SDK\SDK\Zero1_MapSelectButton_classes.hpp" />
<ClInclude Include="SDK\SDK\Zero1_MapSelectButton_parameters.hpp" />
<ClInclude Include="SDK\SDK\___7_classes.hpp" />
<ClInclude Include="SDK\SDK\___7_parameters.hpp" />
<ClInclude Include="SDK\UnrealContainers.hpp" />
<ClInclude Include="ThirdParty\imgui\imconfig.h" />
<ClInclude Include="ThirdParty\imgui\imgui.h" />
<ClInclude Include="ThirdParty\imgui\imgui_impl_dx11.h" />
<ClInclude Include="ThirdParty\imgui\imgui_impl_win32.h" />
<ClInclude Include="ThirdParty\imgui\imgui_internal.h" />
<ClInclude Include="ThirdParty\imgui\imstb_rectpack.h" />
<ClInclude Include="ThirdParty\imgui\imstb_textedit.h" />
<ClInclude Include="ThirdParty\imgui\imstb_truetype.h" />
<ClInclude Include="ThirdParty\MinHook\include\buffer.h" />
<ClInclude Include="ThirdParty\MinHook\include\hde\hde32.h" />
<ClInclude Include="ThirdParty\MinHook\include\hde\hde64.h" />
<ClInclude Include="ThirdParty\MinHook\include\hde\pstdint.h" />
<ClInclude Include="ThirdParty\MinHook\include\hde\table32.h" />
<ClInclude Include="ThirdParty\MinHook\include\hde\table64.h" />
<ClInclude Include="ThirdParty\MinHook\include\MinHook.h" />
<ClInclude Include="ThirdParty\MinHook\include\trampoline.h" />
<ClInclude Include="UE4.hpp" />
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Classes.cpp" />
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="Game.cpp" />
<ClCompile Include="GuiManager.cpp" />
<ClCompile Include="Hooks.cpp" />
<ClCompile Include="Logic.cpp" />
<ClCompile Include="SDK\SDK\ActorLayerUtilities_functions.cpp" />
<ClCompile Include="SDK\SDK\AdvancedSessions_functions.cpp" />
<ClCompile Include="SDK\SDK\AdvancedSteamSessions_functions.cpp" />
<ClCompile Include="SDK\SDK\AIModule_functions.cpp" />
<ClCompile Include="SDK\SDK\ALTF4_DragonEGG_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\ALTF4_Solo_GM_functions.cpp" />
<ClCompile Include="SDK\SDK\ALTF4_Solo_PC_functions.cpp" />
<ClCompile Include="SDK\SDK\ALTF4_Tuto_GM_functions.cpp" />
<ClCompile Include="SDK\SDK\ALTF4_Tuto_PC_functions.cpp" />
<ClCompile Include="SDK\SDK\AnimationSharing_functions.cpp" />
<ClCompile Include="SDK\SDK\AnimBP_ai_functions.cpp" />
<ClCompile Include="SDK\SDK\AnimBP_ALTF4_Character_functions.cpp" />
<ClCompile Include="SDK\SDK\AnimBP_BarNpcDance_functions.cpp" />
<ClCompile Include="SDK\SDK\AnimBP_BarNpc_functions.cpp" />
<ClCompile Include="SDK\SDK\AnimBP_Character_functions.cpp" />
<ClCompile Include="SDK\SDK\AnimGraphRuntime_functions.cpp" />
<ClCompile Include="SDK\SDK\ApexDestruction_functions.cpp" />
<ClCompile Include="SDK\SDK\Area_02_TrapTrigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\AssetRegistry_functions.cpp" />
<ClCompile Include="SDK\SDK\AssetTags_functions.cpp" />
<ClCompile Include="SDK\SDK\AudioCapture_functions.cpp" />
<ClCompile Include="SDK\SDK\AudioMixer_functions.cpp" />
<ClCompile Include="SDK\SDK\AudioSettingsWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\AudioSynesthesia_functions.cpp" />
<ClCompile Include="SDK\SDK\AugmentedReality_functions.cpp" />
<ClCompile Include="SDK\SDK\AutomationUtils_functions.cpp" />
<ClCompile Include="SDK\SDK\BarDanceNPC_Pawn_functions.cpp" />
<ClCompile Include="SDK\SDK\BarNPC_Pawn_functions.cpp" />
<ClCompile Include="SDK\SDK\BarrelFireTrapTrigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\BarrelSpawner_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Barrel_Follower_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Barrel_Projectile_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Basic.cpp" />
<ClCompile Include="SDK\SDK\BGM_bp_functions.cpp" />
<ClCompile Include="SDK\SDK\BPI_Gameinstance_functions.cpp" />
<ClCompile Include="SDK\SDK\BP_ai_DarkNight_functions.cpp" />
<ClCompile Include="SDK\SDK\BP_ai_pawn_ver2_functions.cpp" />
<ClCompile Include="SDK\SDK\BP_ALTF4_Chick_Pawn_functions.cpp" />
<ClCompile Include="SDK\SDK\BP_ALTF4_Dragon_functions.cpp" />
<ClCompile Include="SDK\SDK\BP_ALTF4_Pawn_functions.cpp" />
<ClCompile Include="SDK\SDK\BP_CannonProjectile_functions.cpp" />
<ClCompile Include="SDK\SDK\BP_Cannon_functions.cpp" />
<ClCompile Include="SDK\SDK\BP_MainMenuPC_functions.cpp" />
<ClCompile Include="SDK\SDK\BP_Pawn_functions.cpp" />
<ClCompile Include="SDK\SDK\BP_PendulumTraps_functions.cpp" />
<ClCompile Include="SDK\SDK\BP_SA01_SwingTrap_functions.cpp" />
<ClCompile Include="SDK\SDK\BP_Sky_Sphere_functions.cpp" />
<ClCompile Include="SDK\SDK\BP_WaterDiePawn_functions.cpp" />
<ClCompile Include="SDK\SDK\Brige_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\CableComponent_functions.cpp" />
<ClCompile Include="SDK\SDK\CannonFireTrapTrigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\CastleGate_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\CastleRoute_TrapTrigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Castle_FootRest_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\CenterButton_functions.cpp" />
<ClCompile Include="SDK\SDK\ChallengeRecordMenuWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\Challenge_EpicLeaderboardEntry_functions.cpp" />
<ClCompile Include="SDK\SDK\ChaosSolverEngine_functions.cpp" />
<ClCompile Include="SDK\SDK\CheeringNPC_Trap_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\ChickBoat_Trap_Bp_functions.cpp" />
<ClCompile Include="SDK\SDK\ChickEggFire_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\ChickenAnimBlueprint_functions.cpp" />
<ClCompile Include="SDK\SDK\CinematicCamera_functions.cpp" />
<ClCompile Include="SDK\SDK\ClothingSystemRuntimeInterface_functions.cpp" />
<ClCompile Include="SDK\SDK\ClothingSystemRuntimeNv_functions.cpp" />
<ClCompile Include="SDK\SDK\ControlsGamepadBindingsWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\ControlsKeyBindingsWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\ControlsOverviewWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\ControlsSettingsContainerWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\CoreUObject_functions.cpp" />
<ClCompile Include="SDK\SDK\CreditsWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\CustomMeshComponent_functions.cpp" />
<ClCompile Include="SDK\SDK\DatasmithContent_functions.cpp" />
<ClCompile Include="SDK\SDK\Dead_NormalBody_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\DecisionButton_functions.cpp" />
<ClCompile Include="SDK\SDK\DecisionDialogWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\DemoWidget_Challenge_Mainmenu_functions.cpp" />
<ClCompile Include="SDK\SDK\DemoWidget_Item_Mainmenu_functions.cpp" />
<ClCompile Include="SDK\SDK\DevilRoute_BarrelSpawner_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\DevilRoute_TrapTrigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\DisplaySettingsWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\DoorLight_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Drangon_AnimBP_functions.cpp" />
<ClCompile Include="SDK\SDK\DropSwordTrap_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\DrunkNPC_Pawn_functions.cpp" />
<ClCompile Include="SDK\SDK\DynamicNode_functions.cpp" />
<ClCompile Include="SDK\SDK\EditableMesh_functions.cpp" />
<ClCompile Include="SDK\SDK\Egg_shot_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\ElevatorTrap_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\EngineSettings_functions.cpp" />
<ClCompile Include="SDK\SDK\Engine_functions.cpp" />
<ClCompile Include="SDK\SDK\EpicLeaderboardEntryInterface_functions.cpp" />
<ClCompile Include="SDK\SDK\EpicLeaderboardFrame_functions.cpp" />
<ClCompile Include="SDK\SDK\EpicLeaderboard_functions.cpp" />
<ClCompile Include="SDK\SDK\EyeTracker_functions.cpp" />
<ClCompile Include="SDK\SDK\FadeBorderWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\FastMoveFootrest_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\FieldSystemEngine_functions.cpp" />
<ClCompile Include="SDK\SDK\FireBall_Projectile_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\First_Route_TrapTrigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Foliage_functions.cpp" />
<ClCompile Include="SDK\SDK\GamepadKeyPOV_functions.cpp" />
<ClCompile Include="SDK\SDK\GamepadKey_functions.cpp" />
<ClCompile Include="SDK\SDK\GamepadKey_Move_functions.cpp" />
<ClCompile Include="SDK\SDK\GamepadWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\GameplayTags_functions.cpp" />
<ClCompile Include="SDK\SDK\GameplayTasks_functions.cpp" />
<ClCompile Include="SDK\SDK\GameSettingsWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\GeometryCache_functions.cpp" />
<ClCompile Include="SDK\SDK\GeometryCollectionEngine_functions.cpp" />
<ClCompile Include="SDK\SDK\GlobalInteractableUserWidget_functions.cpp" />
<ClCompile Include="SDK\SDK\GooglePAD_functions.cpp" />
<ClCompile Include="SDK\SDK\GooseShot_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\GooseShot_Replicate_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Goose_shot_functions.cpp" />
<ClCompile Include="SDK\SDK\GraphicsSettingsWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\HardRoute_TrapTrigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\HeadMountedDisplay_functions.cpp" />
<ClCompile Include="SDK\SDK\ImageWriteQueue_functions.cpp" />
<ClCompile Include="SDK\SDK\ImgMedia_functions.cpp" />
<ClCompile Include="SDK\SDK\IngameMenuContainerWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\IngameMenuOverviewWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\InteractableMenuWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\InteractableUserWidget_functions.cpp" />
<ClCompile Include="SDK\SDK\InteractiveToolsFramework_functions.cpp" />
<ClCompile Include="SDK\SDK\IntroWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\ItemRecordMenuWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\Item_EpicLeaderboardEntry_functions.cpp" />
<ClCompile Include="SDK\SDK\JumpJumpTrap_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\KeyboardKey_functions.cpp" />
<ClCompile Include="SDK\SDK\KeyboardWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\Knight_PortalGo_Trigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Knight_Shot_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Landscape_functions.cpp" />
<ClCompile Include="SDK\SDK\LastRouteSwingTrap_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\LastRoute_FootRest_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\LastRoute_TrapTrigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\LaunchShield_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\LevelSequence_functions.cpp" />
<ClCompile Include="SDK\SDK\LoadingScreenWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\LocationServicesBPLibrary_functions.cpp" />
<ClCompile Include="SDK\SDK\Mackerel_anim_bp_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapARPinInfoActor_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapARPin_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapAR_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapAudio_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapController_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapEyeTracker_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapHandMeshing_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapHandTracking_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapIdentity_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapImageTracker_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapLightEstimation_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapPlanes_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapPrivileges_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapSecureStorage_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeapSharedWorld_functions.cpp" />
<ClCompile Include="SDK\SDK\MagicLeap_functions.cpp" />
<ClCompile Include="SDK\SDK\MainButton_functions.cpp" />
<ClCompile Include="SDK\SDK\MainMenuContainerWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\MainMenuOverviewWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\MainMenu_02_functions.cpp" />
<ClCompile Include="SDK\SDK\MapselectMenuWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\MediaAssets_functions.cpp" />
<ClCompile Include="SDK\SDK\MenuCharacterComponent_functions.cpp" />
<ClCompile Include="SDK\SDK\MenuControllerComponent_functions.cpp" />
<ClCompile Include="SDK\SDK\MenuScrollBox_functions.cpp" />
<ClCompile Include="SDK\SDK\MenuSystemPro_functions.cpp" />
<ClCompile Include="SDK\SDK\MeshDescription_functions.cpp" />
<ClCompile Include="SDK\SDK\MH_Route_TrapTrigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\MiddleRoute_Jump_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\MiddleRoute_RotationFootrest_functions.cpp" />
<ClCompile Include="SDK\SDK\MobilePatchingUtils_functions.cpp" />
<ClCompile Include="SDK\SDK\MotoSynth_functions.cpp" />
<ClCompile Include="SDK\SDK\MoveDock_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\MoveVane_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\MovieSceneCapture_functions.cpp" />
<ClCompile Include="SDK\SDK\MovieSceneTracks_functions.cpp" />
<ClCompile Include="SDK\SDK\MovieScene_functions.cpp" />
<ClCompile Include="SDK\SDK\MRMesh_functions.cpp" />
<ClCompile Include="SDK\SDK\Mug_Projectile_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\NavigationKeyButton_functions.cpp" />
<ClCompile Include="SDK\SDK\NavigationSystem_functions.cpp" />
<ClCompile Include="SDK\SDK\NiagaraAnimNotifies_functions.cpp" />
<ClCompile Include="SDK\SDK\Niagara_functions.cpp" />
<ClCompile Include="SDK\SDK\Nintendo_Stage_Start_Widget_functions.cpp" />
<ClCompile Include="SDK\SDK\NoticeWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\OnlineSubsystemUtils_functions.cpp" />
<ClCompile Include="SDK\SDK\OnlineSubsystem_functions.cpp" />
<ClCompile Include="SDK\SDK\OpenBtn_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\OptionsActionBinder_functions.cpp" />
<ClCompile Include="SDK\SDK\OptionsButton_functions.cpp" />
<ClCompile Include="SDK\SDK\OptionsOverviewWidgetBP_functions.cpp" />
<ClCompile Include="SDK\SDK\OptionsPickerSubButton_functions.cpp" />
<ClCompile Include="SDK\SDK\OptionsPicker_functions.cpp" />
<ClCompile Include="SDK\SDK\OptionsPicker_IngameVer_functions.cpp" />
<ClCompile Include="SDK\SDK\OptionsSlider_functions.cpp" />
<ClCompile Include="SDK\SDK\Paper2D_functions.cpp" />
<ClCompile Include="SDK\SDK\PathFollow_functions.cpp" />
<ClCompile Include="SDK\SDK\PauseGameBPI_functions.cpp" />
<ClCompile Include="SDK\SDK\PhysicsGetUpBlend_functions.cpp" />
<ClCompile Include="SDK\SDK\PhysXVehicles_functions.cpp" />
<ClCompile Include="SDK\SDK\Play_DeathAndItem_UI_functions.cpp" />
<ClCompile Include="SDK\SDK\ProceduralMeshComponent_functions.cpp" />
<ClCompile Include="SDK\SDK\QuizDoor_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\RotationBull_Trap_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\RotationCannon_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\RotationFootRest_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\RotationSide_Footrest_Bp_functions.cpp" />
<ClCompile Include="SDK\SDK\RotationTrap_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\RotationWoodenBoard_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Rotation_SpikeBall_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Sancho_ai_controler_functions.cpp" />
<ClCompile Include="SDK\SDK\SaveAreaTrigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\SavePointSpawn_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Save_Point_functions.cpp" />
<ClCompile Include="SDK\SDK\ShortCutRouteWall_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\ShortCut_Trigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\SpikeStairTrap_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\SplineMover_functions.cpp" />
<ClCompile Include="SDK\SDK\StageA01_FishShot_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\StageA01_FishSpwan_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Start_AirPlane_Blueprint_functions.cpp" />
<ClCompile Include="SDK\SDK\StaticMeshDescription_functions.cpp" />
<ClCompile Include="SDK\SDK\SteamMulti_GameInstance_functions.cpp" />
<ClCompile Include="SDK\SDK\StoneSpawnPoint_KillRock_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\SwingFire_Trap_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\SwingSickle_Trap_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Synthesis_functions.cpp" />
<ClCompile Include="SDK\SDK\TemplateSequence_functions.cpp" />
<ClCompile Include="SDK\SDK\TimeManagement_functions.cpp" />
<ClCompile Include="SDK\SDK\TIP_UI_functions.cpp" />
<ClCompile Include="SDK\SDK\TrainRoute_TrapTrigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\TutoDuckDoor_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\Tutorial_Info_UI_functions.cpp" />
<ClCompile Include="SDK\SDK\UMG_functions.cpp" />
<ClCompile Include="SDK\SDK\UpDownBalde_Trap_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\UpdownFootRest_02_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\UpTownDragon_TrapTrigger_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\VariantManagerContent_functions.cpp" />
<ClCompile Include="SDK\SDK\WaterDie_BP_functions.cpp" />
<ClCompile Include="SDK\SDK\YouDie_UI_functions.cpp" />
<ClCompile Include="SDK\SDK\Zero1_MapSelectButton_functions.cpp" />
<ClCompile Include="SDK\SDK\___7_functions.cpp" />
<ClCompile Include="ThirdParty\imgui\imgui.cpp" />
<ClCompile Include="ThirdParty\imgui\imgui_draw.cpp" />
<ClCompile Include="ThirdParty\imgui\imgui_impl_dx11.cpp" />
<ClCompile Include="ThirdParty\imgui\imgui_impl_win32.cpp" />
<ClCompile Include="ThirdParty\imgui\imgui_tables.cpp" />
<ClCompile Include="ThirdParty\imgui\imgui_widgets.cpp" />
<ClCompile Include="ThirdParty\MinHook\include\buffer.c" />
<ClCompile Include="ThirdParty\MinHook\include\hde\hde32.c" />
<ClCompile Include="ThirdParty\MinHook\include\hde\hde64.c" />
<ClCompile Include="ThirdParty\MinHook\include\hook.c" />
<ClCompile Include="ThirdParty\MinHook\include\trampoline.c" />
<ClCompile Include="UE4.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="SDK\NameCollisions.inl" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
File diff suppressed because it is too large Load Diff
-79
View File
@@ -1,79 +0,0 @@
#include "Game.h"
#include "Classes.hpp"
#include "UE4.hpp"
#include "SDK/SDK/Engine_classes.hpp"
#include "SDK/SDK/CoreUObject_classes.hpp"
namespace Game {
UE4::UObject* GetEngine() {
// Assuming there is a method to get the engine instance
return UE4::UObject::FindObject<UE4::UObject>("EngineName");
}
UE4::UObject* GetWorld() {
auto GameViewport = GetChild(GetEngine(), "GameViewport");
auto World = GetChild(GameViewport, "World");
return World;
}
UE4::UObject* GetPlayerController() {
auto OwningGameInstance = GetChild(GetWorld(), "OwningGameInstance");
std::vector<UE4::UObject*> LocalPlayers = GetChildAsTArray<UE4::UObject>(OwningGameInstance, "LocalPlayers");
auto PlayerController = GetChild(LocalPlayers[0], "PlayerController");
return PlayerController;
}
UE4::UObject* GetPlayerState() {
auto PlayerState = GetChild(GetPlayerController(), "PlayerState");
return PlayerState;
}
UE4::UObject* GetPawn() {
auto Pawn = GetChild(GetPlayerController(), "Pawn");
return Pawn;
}
UE4::UObject* GetGameMode() {
auto AuthorityGameMode = GetChild(GetWorld(), "AuthorityGameMode");
return AuthorityGameMode;
}
UE4::UObject* GetGameState() {
auto GameState = GetChild(GetGameMode(), "GameState");
return GameState;
}
// Utility function implementations
UE4::UObject* GetChild(UE4::UObject* parent, const std::string& name) {
if (parent) {
// Assuming parent->GetChildren() returns a list of child objects
for (auto& child : parent->GetChildren()) {
if (child->GetName() == name) {
return child;
}
}
}
return nullptr;
}
template<typename T>
std::vector<T*> GetChildAsTArray(UE4::UObject* parent, const std::string& name) {
std::vector<T*> children;
if (parent) {
for (auto& child : parent->GetChildren()) {
if (child->GetName() == name) {
if (auto castedChild = dynamic_cast<T*>(child)) {
children.push_back(castedChild);
}
}
}
}
return children;
}
UE4::UClass* StaticClassImpl(const std::string& className) {
return UE4::UObject::FindClass(className);
}
}
template std::vector<UE4::UObject*> Game::GetChildAsTArray<UE4::UObject>(UE4::UObject* parent, const std::string& name);
-28
View File
@@ -1,28 +0,0 @@
#ifndef GAME_H
#define GAME_H
#include <string>
#include <vector>
namespace UE4 {
class UObject;
class UClass;
}
namespace Game {
UE4::UObject* GetEngine();
UE4::UObject* GetWorld();
UE4::UObject* GetPlayerController();
UE4::UObject* GetPlayerState();
UE4::UObject* GetPawn();
UE4::UObject* GetGameMode();
UE4::UObject* GetGameState();
// Utility functions
UE4::UObject* GetChild(UE4::UObject* parent, const std::string& name);
template<typename T>
std::vector<T*> GetChildAsTArray(UE4::UObject* parent, const std::string& name);
UE4::UClass* StaticClassImpl(const std::string& className);
}
#endif // GAME_H
-81
View File
@@ -1,81 +0,0 @@
#include "GuiManager.hpp"
#include "ThirdParty/imgui/imgui.h"
#include "ThirdParty/imgui/imgui_impl_win32.h"
#include "ThirdParty/imgui/imgui_impl_dx11.h"
#include <Windows.h>
#include <d3d11.h>
#include "Logic.hpp"
extern ID3D11Device* g_pd3dDevice;
extern ID3D11DeviceContext* g_pd3dDeviceContext;
extern IDXGISwapChain* g_pSwapChain;
extern ID3D11RenderTargetView* g_mainRenderTargetView;
namespace {
HWND hwnd = nullptr;
bool guiVisible = false;
bool flyingEnabled = false;
void ShowGui() {
ImGui::Begin("Menu");
if (ImGui::Checkbox("Flying", &flyingEnabled)) {
Logic::ToggleFlyingMode(flyingEnabled);
}
ImGui::End();
}
void CreateRenderTarget() {
ID3D11Texture2D* pBackBuffer;
g_pSwapChain->GetBuffer(0, IID_PPV_ARGS(&pBackBuffer));
g_pd3dDevice->CreateRenderTargetView(pBackBuffer, nullptr, &g_mainRenderTargetView);
pBackBuffer->Release();
}
void CleanupRenderTarget() {
if (g_mainRenderTargetView) {
g_mainRenderTargetView->Release();
g_mainRenderTargetView = nullptr;
}
}
void InitImGui() {
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); (void)io;
ImGui::StyleColorsDark();
// Setup Platform/Renderer bindings
ImGui_ImplWin32_Init(hwnd);
ImGui_ImplDX11_Init(g_pd3dDevice, g_pd3dDeviceContext);
}
void ShutdownImGui() {
ImGui_ImplDX11_Shutdown();
ImGui_ImplWin32_Shutdown();
ImGui::DestroyContext();
}
}
namespace GuiManager {
void ToggleGui() {
guiVisible = !guiVisible;
}
void RenderGui() {
if (guiVisible) {
// Start the ImGui frame
ImGui_ImplDX11_NewFrame();
ImGui_ImplWin32_NewFrame();
ImGui::NewFrame();
// Show the GUI
ShowGui();
// Rendering
ImGui::Render();
ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
}
}
}
-8
View File
@@ -1,8 +0,0 @@
#pragma once
namespace GuiManager {
void ToggleGui();
void RenderGui();
bool IsGuiVisible();
void SetupGui();
}
-100
View File
@@ -1,100 +0,0 @@
#include <Windows.h>
#include <iostream>
#include <iomanip>
#include "Hooks.hpp"
#include "SDK/SDK/CoreUObject_classes.hpp"
#include "GuiManager.hpp"
#include "ThirdParty/MinHook/include/MinHook.h"
// Typedef for ProcessEvent
typedef void(*tProcessEvent)(SDK::UObject* Object, SDK::UFunction* Function, void* Params);
tProcessEvent oProcessEvent = nullptr;
// Hooked ProcessEvent function
void hkProcessEvent(SDK::UObject* Object, SDK::UFunction* Function, void* Params) {
static thread_local bool isInsideProcessEvent = false;
// Prevent recursion
if (isInsideProcessEvent) {
return oProcessEvent(Object, Function, Params);
}
isInsideProcessEvent = true;
std::string FunctionName = Function->GetName();
// Handle Tick function to check for F4 key press and render GUI
if (FunctionName == "Tick") {
if (GetAsyncKeyState(VK_F4) & 1) {
GuiManager::ToggleGui();
}
GuiManager::RenderGui();
}
isInsideProcessEvent = false;
return oProcessEvent(Object, Function, Params);
}
// Function to dump memory
void DumpMemory(uintptr_t address, size_t size) {
unsigned char* mem = reinterpret_cast<unsigned char*>(address);
std::cout << "Memory dump at address: " << std::hex << address << std::endl;
for (size_t i = 0; i < size; ++i) {
std::cout << std::setw(2) << std::setfill('0') << std::hex << (int)mem[i] << " ";
if ((i + 1) % 16 == 0)
std::cout << std::endl;
}
std::cout << std::endl;
}
// Function to set up the hook
void SetupHooks() {
std::cout << "Initializing MinHook" << std::endl;
if (MH_Initialize() != MH_OK) {
std::cerr << "Failed to initialize MinHook" << std::endl;
return;
}
try {
uintptr_t baseAddress = SDK::InSDKUtils::GetImageBase();
uintptr_t processEventAddress = baseAddress + SDK::Offsets::ProcessEvent;
std::cout << "ProcessEvent address: " << std::hex << processEventAddress << std::endl;
// Dump at least 256 bytes of memory at the ProcessEvent address
DumpMemory(processEventAddress, 256);
if (MH_CreateHook(reinterpret_cast<void*>(processEventAddress), &hkProcessEvent, reinterpret_cast<void**>(&oProcessEvent)) != MH_OK) {
std::cerr << "Failed to create hook" << std::endl;
return;
}
if (MH_EnableHook(reinterpret_cast<void*>(processEventAddress)) != MH_OK) {
std::cerr << "Failed to enable hook" << std::endl;
return;
}
std::cout << "Hook successfully enabled" << std::endl;
}
catch (const std::exception& e) {
std::cerr << "Exception during hook setup: " << e.what() << std::endl;
}
}
void RemoveHooks() {
std::cout << "Removing hook" << std::endl;
uintptr_t baseAddress = SDK::InSDKUtils::GetImageBase();
uintptr_t processEventAddress = baseAddress + SDK::Offsets::ProcessEvent;
if (MH_DisableHook(reinterpret_cast<void*>(processEventAddress)) != MH_OK) {
std::cerr << "Failed to disable hook" << std::endl;
return;
}
if (MH_Uninitialize() != MH_OK) {
std::cerr << "Failed to uninitialize MinHook" << std::endl;
return;
}
std::cout << "Hook successfully removed and MinHook uninitialized" << std::endl;
}
-10
View File
@@ -1,10 +0,0 @@
#pragma once
#include "ThirdParty/MinHook/include/MinHook.h"
#include "SDK/SDK/CoreUObject_classes.hpp"
void SetupHooks();
void RemoveHooks();
void hkProcessEvent(SDK::UObject* Object, SDK::UFunction* Function, void* Params);
extern void (*oProcessEvent)(SDK::UObject* Object, SDK::UFunction* Function, void* Params);
-23
View File
@@ -1,23 +0,0 @@
#include "Logic.hpp"
#include "Game.h"
#include "Classes.hpp" // Include to ensure UE4::UObject is defined
namespace Logic {
void ToggleFlyingMode(bool enableFlying) {
auto PlayerController = Game::GetPlayerController();
if (PlayerController) {
auto Pawn = Game::GetPawn();
if (Pawn) {
constexpr int MOVE_Flying = 2;
constexpr int MOVE_Walking = 0;
if (enableFlying) {
Pawn->SetMovementMode(MOVE_Flying);
}
else {
Pawn->SetMovementMode(MOVE_Walking);
}
}
}
}
}
-8
View File
@@ -1,8 +0,0 @@
#ifndef LOGIC_HPP
#define LOGIC_HPP
namespace Logic {
void ToggleFlyingMode(bool enableFlying);
}
#endif // LOGIC_HPP
-131
View File
@@ -1,131 +0,0 @@
//-----------------------------------------------------------------------------
// DEAR IMGUI COMPILE-TIME OPTIONS
// Runtime options (clipboard callbacks, enabling various features, etc.) can generally be set via the ImGuiIO structure.
// You can use ImGui::SetAllocatorFunctions() before calling ImGui::CreateContext() to rewire memory allocation functions.
//-----------------------------------------------------------------------------
// A) You may edit imconfig.h (and not overwrite it when updating Dear ImGui, or maintain a patch/rebased branch with your modifications to it)
// B) or '#define IMGUI_USER_CONFIG "my_imgui_config.h"' in your project and then add directives in your own file without touching this template.
//-----------------------------------------------------------------------------
// You need to make sure that configuration settings are defined consistently _everywhere_ Dear ImGui is used, which include the imgui*.cpp
// files but also _any_ of your code that uses Dear ImGui. This is because some compile-time options have an affect on data structures.
// Defining those options in imconfig.h will ensure every compilation unit gets to see the same data structure layouts.
// Call IMGUI_CHECKVERSION() from your .cpp file to verify that the data structures your files are using are matching the ones imgui.cpp is using.
//-----------------------------------------------------------------------------
#pragma once
//---- Define assertion handler. Defaults to calling assert().
// If your macro uses multiple statements, make sure is enclosed in a 'do { .. } while (0)' block so it can be used as a single statement.
//#define IM_ASSERT(_EXPR) MyAssert(_EXPR)
//#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts
//---- Define attributes of all API symbols declarations, e.g. for DLL under Windows
// Using Dear ImGui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility.
// DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
//#define IMGUI_API __declspec( dllexport )
//#define IMGUI_API __declspec( dllimport )
//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to clean your code of obsolete function/names.
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
//#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87+ disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This is automatically done by IMGUI_DISABLE_OBSOLETE_FUNCTIONS.
//---- Disable all of Dear ImGui or don't implement standard windows/tools.
// It is very strongly recommended to NOT disable the demo windows and debug tool during development. They are extremely useful in day to day work. Please read comments in imgui_demo.cpp.
//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty.
//#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowIDStackToolWindow() will be empty.
//---- Don't implement some functions to reduce linkage requirements.
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
//#define IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with Visual Studio] Implement default IME handler (require imm32.lib/.a, auto-link for Visual Studio, -limm32 on command-line for MinGW)
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with non-Visual Studio compilers] Don't implement default IME handler (won't require imm32.lib/.a)
//#define IMGUI_DISABLE_WIN32_FUNCTIONS // [Win32] Won't use and link with any Win32 function (clipboard, IME).
//#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS // [OSX] Implement default OSX clipboard handler (need to link with '-framework ApplicationServices', this is why this is not the default).
//#define IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS // Don't implement ImFormatString/ImFormatStringV so you can implement them yourself (e.g. if you don't want to link with vsnprintf)
//#define IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS // Don't implement ImFabs/ImSqrt/ImPow/ImFmod/ImCos/ImSin/ImAcos/ImAtan2 so you can implement them yourself.
//#define IMGUI_DISABLE_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle at all (replace them with dummies)
//#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function.
//#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free() to avoid linking with them. You will need to call ImGui::SetAllocatorFunctions().
//#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available
//---- Include imgui_user.h at the end of imgui.h as a convenience
// May be convenient for some users to only explicitly include vanilla imgui.h and have extra stuff included.
//#define IMGUI_INCLUDE_IMGUI_USER_H
//#define IMGUI_USER_H_FILENAME "my_folder/my_imgui_user.h"
//---- Pack colors to BGRA8 instead of RGBA8 (to avoid converting from one to another)
//#define IMGUI_USE_BGRA_PACKED_COLOR
//---- Use 32-bit for ImWchar (default is 16-bit) to support Unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...)
//#define IMGUI_USE_WCHAR32
//---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version
// By default the embedded implementations are declared static and not available outside of Dear ImGui sources files.
//#define IMGUI_STB_TRUETYPE_FILENAME "my_folder/stb_truetype.h"
//#define IMGUI_STB_RECT_PACK_FILENAME "my_folder/stb_rect_pack.h"
//#define IMGUI_STB_SPRINTF_FILENAME "my_folder/stb_sprintf.h" // only used if IMGUI_USE_STB_SPRINTF is defined.
//#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
//#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
//#define IMGUI_DISABLE_STB_SPRINTF_IMPLEMENTATION // only disabled if IMGUI_USE_STB_SPRINTF is defined.
//---- Use stb_sprintf.h for a faster implementation of vsnprintf instead of the one from libc (unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined)
// Compatibility checks of arguments and formats done by clang and GCC will be disabled in order to support the extra formats provided by stb_sprintf.h.
//#define IMGUI_USE_STB_SPRINTF
//---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui)
// Requires FreeType headers to be available in the include path. Requires program to be compiled with 'misc/freetype/imgui_freetype.cpp' (in this repository) + the FreeType library (not provided).
// On Windows you may use vcpkg with 'vcpkg install freetype --triplet=x64-windows' + 'vcpkg integrate install'.
//#define IMGUI_ENABLE_FREETYPE
//---- Use FreeType+lunasvg library to render OpenType SVG fonts (SVGinOT)
// Requires lunasvg headers to be available in the include path + program to be linked with the lunasvg library (not provided).
// Only works in combination with IMGUI_ENABLE_FREETYPE.
// (implementation is based on Freetype's rsvg-port.c which is licensed under CeCILL-C Free Software License Agreement)
//#define IMGUI_ENABLE_FREETYPE_LUNASVG
//---- Use stb_truetype to build and rasterize the font atlas (default)
// The only purpose of this define is if you want force compilation of the stb_truetype backend ALONG with the FreeType backend.
//#define IMGUI_ENABLE_STB_TRUETYPE
//---- Define constructor and implicit cast operators to convert back<>forth between your math types and ImVec2/ImVec4.
// This will be inlined as part of ImVec2 and ImVec4 class declarations.
/*
#define IM_VEC2_CLASS_EXTRA \
constexpr ImVec2(const MyVec2& f) : x(f.x), y(f.y) {} \
operator MyVec2() const { return MyVec2(x,y); }
#define IM_VEC4_CLASS_EXTRA \
constexpr ImVec4(const MyVec4& f) : x(f.x), y(f.y), z(f.z), w(f.w) {} \
operator MyVec4() const { return MyVec4(x,y,z,w); }
*/
//---- ...Or use Dear ImGui's own very basic math operators.
//#define IMGUI_DEFINE_MATH_OPERATORS
//---- Use 32-bit vertex indices (default is 16-bit) is one way to allow large meshes with more than 64K vertices.
// Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices).
// Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer.
// Read about ImGuiBackendFlags_RendererHasVtxOffset for details.
//#define ImDrawIdx unsigned int
//---- Override ImDrawCallback signature (will need to modify renderer backends accordingly)
//struct ImDrawList;
//struct ImDrawCmd;
//typedef void (*MyImDrawCallback)(const ImDrawList* draw_list, const ImDrawCmd* cmd, void* my_renderer_user_data);
//#define ImDrawCallback MyImDrawCallback
//---- Debug Tools: Macro to break in Debugger (we provide a default implementation of this in the codebase)
// (use 'Metrics->Tools->Item Picker' to pick widgets with the mouse and break into them for easy debugging.)
//#define IM_DEBUG_BREAK IM_ASSERT(0)
//#define IM_DEBUG_BREAK __debugbreak()
//---- Debug Tools: Enable slower asserts
//#define IMGUI_DEBUG_PARANOID
//---- Tip: You can add extra functions within the ImGui:: namespace from anywhere (e.g. your own sources/header files)
/*
namespace ImGui
{
void MyFunction(const char* name, MyMatrix44* mtx);
}
*/
-16121
View File
File diff suppressed because it is too large Load Diff
-3413
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-606
View File
@@ -1,606 +0,0 @@
// dear imgui: Renderer Backend for DirectX11
// This needs to be used along with a Platform Backend (e.g. Win32)
// Implemented features:
// [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID!
// [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
// Learn about Dear ImGui:
// - FAQ https://dearimgui.com/faq
// - Getting Started https://dearimgui.com/getting-started
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
// - Introduction, links and more at the top of imgui.cpp
// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
// 2021-05-19: DirectX11: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement)
// 2021-02-18: DirectX11: Change blending equation to preserve alpha in output buffer.
// 2019-08-01: DirectX11: Fixed code querying the Geometry Shader state (would generally error with Debug layer enabled).
// 2019-07-21: DirectX11: Backup, clear and restore Geometry Shader is any is bound when calling ImGui_ImplDX10_RenderDrawData. Clearing Hull/Domain/Compute shaders without backup/restore.
// 2019-05-29: DirectX11: Added support for large mesh (64K+ vertices), enable ImGuiBackendFlags_RendererHasVtxOffset flag.
// 2019-04-30: DirectX11: Added support for special ImDrawCallback_ResetRenderState callback to reset render state.
// 2018-12-03: Misc: Added #pragma comment statement to automatically link with d3dcompiler.lib when using D3DCompile().
// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
// 2018-08-01: DirectX11: Querying for IDXGIFactory instead of IDXGIFactory1 to increase compatibility.
// 2018-07-13: DirectX11: Fixed unreleased resources in Init and Shutdown functions.
// 2018-06-08: Misc: Extracted imgui_impl_dx11.cpp/.h away from the old combined DX11+Win32 example.
// 2018-06-08: DirectX11: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplDX11_RenderDrawData() in the .h file so you can call it yourself.
// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
// 2016-05-07: DirectX11: Disabling depth-write.
#include "imgui.h"
#ifndef IMGUI_DISABLE
#include "imgui_impl_dx11.h"
// DirectX
#include <stdio.h>
#include <d3d11.h>
#include <d3dcompiler.h>
#ifdef _MSC_VER
#pragma comment(lib, "d3dcompiler") // Automatically link with d3dcompiler.lib as we are using D3DCompile() below.
#endif
// DirectX11 data
struct ImGui_ImplDX11_Data
{
ID3D11Device* pd3dDevice;
ID3D11DeviceContext* pd3dDeviceContext;
IDXGIFactory* pFactory;
ID3D11Buffer* pVB;
ID3D11Buffer* pIB;
ID3D11VertexShader* pVertexShader;
ID3D11InputLayout* pInputLayout;
ID3D11Buffer* pVertexConstantBuffer;
ID3D11PixelShader* pPixelShader;
ID3D11SamplerState* pFontSampler;
ID3D11ShaderResourceView* pFontTextureView;
ID3D11RasterizerState* pRasterizerState;
ID3D11BlendState* pBlendState;
ID3D11DepthStencilState* pDepthStencilState;
int VertexBufferSize;
int IndexBufferSize;
ImGui_ImplDX11_Data() { memset((void*)this, 0, sizeof(*this)); VertexBufferSize = 5000; IndexBufferSize = 10000; }
};
struct VERTEX_CONSTANT_BUFFER_DX11
{
float mvp[4][4];
};
// Backend data stored in io.BackendRendererUserData to allow support for multiple Dear ImGui contexts
// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
static ImGui_ImplDX11_Data* ImGui_ImplDX11_GetBackendData()
{
return ImGui::GetCurrentContext() ? (ImGui_ImplDX11_Data*)ImGui::GetIO().BackendRendererUserData : nullptr;
}
// Functions
static void ImGui_ImplDX11_SetupRenderState(ImDrawData* draw_data, ID3D11DeviceContext* ctx)
{
ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
// Setup viewport
D3D11_VIEWPORT vp;
memset(&vp, 0, sizeof(D3D11_VIEWPORT));
vp.Width = draw_data->DisplaySize.x;
vp.Height = draw_data->DisplaySize.y;
vp.MinDepth = 0.0f;
vp.MaxDepth = 1.0f;
vp.TopLeftX = vp.TopLeftY = 0;
ctx->RSSetViewports(1, &vp);
// Setup shader and vertex buffers
unsigned int stride = sizeof(ImDrawVert);
unsigned int offset = 0;
ctx->IASetInputLayout(bd->pInputLayout);
ctx->IASetVertexBuffers(0, 1, &bd->pVB, &stride, &offset);
ctx->IASetIndexBuffer(bd->pIB, sizeof(ImDrawIdx) == 2 ? DXGI_FORMAT_R16_UINT : DXGI_FORMAT_R32_UINT, 0);
ctx->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
ctx->VSSetShader(bd->pVertexShader, nullptr, 0);
ctx->VSSetConstantBuffers(0, 1, &bd->pVertexConstantBuffer);
ctx->PSSetShader(bd->pPixelShader, nullptr, 0);
ctx->PSSetSamplers(0, 1, &bd->pFontSampler);
ctx->GSSetShader(nullptr, nullptr, 0);
ctx->HSSetShader(nullptr, nullptr, 0); // In theory we should backup and restore this as well.. very infrequently used..
ctx->DSSetShader(nullptr, nullptr, 0); // In theory we should backup and restore this as well.. very infrequently used..
ctx->CSSetShader(nullptr, nullptr, 0); // In theory we should backup and restore this as well.. very infrequently used..
// Setup blend state
const float blend_factor[4] = { 0.f, 0.f, 0.f, 0.f };
ctx->OMSetBlendState(bd->pBlendState, blend_factor, 0xffffffff);
ctx->OMSetDepthStencilState(bd->pDepthStencilState, 0);
ctx->RSSetState(bd->pRasterizerState);
}
// Render function
void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data)
{
// Avoid rendering when minimized
if (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f)
return;
ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
ID3D11DeviceContext* ctx = bd->pd3dDeviceContext;
// Create and grow vertex/index buffers if needed
if (!bd->pVB || bd->VertexBufferSize < draw_data->TotalVtxCount)
{
if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
bd->VertexBufferSize = draw_data->TotalVtxCount + 5000;
D3D11_BUFFER_DESC desc;
memset(&desc, 0, sizeof(D3D11_BUFFER_DESC));
desc.Usage = D3D11_USAGE_DYNAMIC;
desc.ByteWidth = bd->VertexBufferSize * sizeof(ImDrawVert);
desc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
desc.MiscFlags = 0;
if (bd->pd3dDevice->CreateBuffer(&desc, nullptr, &bd->pVB) < 0)
return;
}
if (!bd->pIB || bd->IndexBufferSize < draw_data->TotalIdxCount)
{
if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
bd->IndexBufferSize = draw_data->TotalIdxCount + 10000;
D3D11_BUFFER_DESC desc;
memset(&desc, 0, sizeof(D3D11_BUFFER_DESC));
desc.Usage = D3D11_USAGE_DYNAMIC;
desc.ByteWidth = bd->IndexBufferSize * sizeof(ImDrawIdx);
desc.BindFlags = D3D11_BIND_INDEX_BUFFER;
desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
if (bd->pd3dDevice->CreateBuffer(&desc, nullptr, &bd->pIB) < 0)
return;
}
// Upload vertex/index data into a single contiguous GPU buffer
D3D11_MAPPED_SUBRESOURCE vtx_resource, idx_resource;
if (ctx->Map(bd->pVB, 0, D3D11_MAP_WRITE_DISCARD, 0, &vtx_resource) != S_OK)
return;
if (ctx->Map(bd->pIB, 0, D3D11_MAP_WRITE_DISCARD, 0, &idx_resource) != S_OK)
return;
ImDrawVert* vtx_dst = (ImDrawVert*)vtx_resource.pData;
ImDrawIdx* idx_dst = (ImDrawIdx*)idx_resource.pData;
for (int n = 0; n < draw_data->CmdListsCount; n++)
{
const ImDrawList* cmd_list = draw_data->CmdLists[n];
memcpy(vtx_dst, cmd_list->VtxBuffer.Data, cmd_list->VtxBuffer.Size * sizeof(ImDrawVert));
memcpy(idx_dst, cmd_list->IdxBuffer.Data, cmd_list->IdxBuffer.Size * sizeof(ImDrawIdx));
vtx_dst += cmd_list->VtxBuffer.Size;
idx_dst += cmd_list->IdxBuffer.Size;
}
ctx->Unmap(bd->pVB, 0);
ctx->Unmap(bd->pIB, 0);
// Setup orthographic projection matrix into our constant buffer
// Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayPos is (0,0) for single viewport apps.
{
D3D11_MAPPED_SUBRESOURCE mapped_resource;
if (ctx->Map(bd->pVertexConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mapped_resource) != S_OK)
return;
VERTEX_CONSTANT_BUFFER_DX11* constant_buffer = (VERTEX_CONSTANT_BUFFER_DX11*)mapped_resource.pData;
float L = draw_data->DisplayPos.x;
float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
float T = draw_data->DisplayPos.y;
float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
float mvp[4][4] =
{
{ 2.0f/(R-L), 0.0f, 0.0f, 0.0f },
{ 0.0f, 2.0f/(T-B), 0.0f, 0.0f },
{ 0.0f, 0.0f, 0.5f, 0.0f },
{ (R+L)/(L-R), (T+B)/(B-T), 0.5f, 1.0f },
};
memcpy(&constant_buffer->mvp, mvp, sizeof(mvp));
ctx->Unmap(bd->pVertexConstantBuffer, 0);
}
// Backup DX state that will be modified to restore it afterwards (unfortunately this is very ugly looking and verbose. Close your eyes!)
struct BACKUP_DX11_STATE
{
UINT ScissorRectsCount, ViewportsCount;
D3D11_RECT ScissorRects[D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
D3D11_VIEWPORT Viewports[D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
ID3D11RasterizerState* RS;
ID3D11BlendState* BlendState;
FLOAT BlendFactor[4];
UINT SampleMask;
UINT StencilRef;
ID3D11DepthStencilState* DepthStencilState;
ID3D11ShaderResourceView* PSShaderResource;
ID3D11SamplerState* PSSampler;
ID3D11PixelShader* PS;
ID3D11VertexShader* VS;
ID3D11GeometryShader* GS;
UINT PSInstancesCount, VSInstancesCount, GSInstancesCount;
ID3D11ClassInstance *PSInstances[256], *VSInstances[256], *GSInstances[256]; // 256 is max according to PSSetShader documentation
D3D11_PRIMITIVE_TOPOLOGY PrimitiveTopology;
ID3D11Buffer* IndexBuffer, *VertexBuffer, *VSConstantBuffer;
UINT IndexBufferOffset, VertexBufferStride, VertexBufferOffset;
DXGI_FORMAT IndexBufferFormat;
ID3D11InputLayout* InputLayout;
};
BACKUP_DX11_STATE old = {};
old.ScissorRectsCount = old.ViewportsCount = D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE;
ctx->RSGetScissorRects(&old.ScissorRectsCount, old.ScissorRects);
ctx->RSGetViewports(&old.ViewportsCount, old.Viewports);
ctx->RSGetState(&old.RS);
ctx->OMGetBlendState(&old.BlendState, old.BlendFactor, &old.SampleMask);
ctx->OMGetDepthStencilState(&old.DepthStencilState, &old.StencilRef);
ctx->PSGetShaderResources(0, 1, &old.PSShaderResource);
ctx->PSGetSamplers(0, 1, &old.PSSampler);
old.PSInstancesCount = old.VSInstancesCount = old.GSInstancesCount = 256;
ctx->PSGetShader(&old.PS, old.PSInstances, &old.PSInstancesCount);
ctx->VSGetShader(&old.VS, old.VSInstances, &old.VSInstancesCount);
ctx->VSGetConstantBuffers(0, 1, &old.VSConstantBuffer);
ctx->GSGetShader(&old.GS, old.GSInstances, &old.GSInstancesCount);
ctx->IAGetPrimitiveTopology(&old.PrimitiveTopology);
ctx->IAGetIndexBuffer(&old.IndexBuffer, &old.IndexBufferFormat, &old.IndexBufferOffset);
ctx->IAGetVertexBuffers(0, 1, &old.VertexBuffer, &old.VertexBufferStride, &old.VertexBufferOffset);
ctx->IAGetInputLayout(&old.InputLayout);
// Setup desired DX state
ImGui_ImplDX11_SetupRenderState(draw_data, ctx);
// Render command lists
// (Because we merged all buffers into a single one, we maintain our own offset into them)
int global_idx_offset = 0;
int global_vtx_offset = 0;
ImVec2 clip_off = draw_data->DisplayPos;
for (int n = 0; n < draw_data->CmdListsCount; n++)
{
const ImDrawList* cmd_list = draw_data->CmdLists[n];
for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
{
const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
if (pcmd->UserCallback != nullptr)
{
// User callback, registered via ImDrawList::AddCallback()
// (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.)
if (pcmd->UserCallback == ImDrawCallback_ResetRenderState)
ImGui_ImplDX11_SetupRenderState(draw_data, ctx);
else
pcmd->UserCallback(cmd_list, pcmd);
}
else
{
// Project scissor/clipping rectangles into framebuffer space
ImVec2 clip_min(pcmd->ClipRect.x - clip_off.x, pcmd->ClipRect.y - clip_off.y);
ImVec2 clip_max(pcmd->ClipRect.z - clip_off.x, pcmd->ClipRect.w - clip_off.y);
if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y)
continue;
// Apply scissor/clipping rectangle
const D3D11_RECT r = { (LONG)clip_min.x, (LONG)clip_min.y, (LONG)clip_max.x, (LONG)clip_max.y };
ctx->RSSetScissorRects(1, &r);
// Bind texture, Draw
ID3D11ShaderResourceView* texture_srv = (ID3D11ShaderResourceView*)pcmd->GetTexID();
ctx->PSSetShaderResources(0, 1, &texture_srv);
ctx->DrawIndexed(pcmd->ElemCount, pcmd->IdxOffset + global_idx_offset, pcmd->VtxOffset + global_vtx_offset);
}
}
global_idx_offset += cmd_list->IdxBuffer.Size;
global_vtx_offset += cmd_list->VtxBuffer.Size;
}
// Restore modified DX state
ctx->RSSetScissorRects(old.ScissorRectsCount, old.ScissorRects);
ctx->RSSetViewports(old.ViewportsCount, old.Viewports);
ctx->RSSetState(old.RS); if (old.RS) old.RS->Release();
ctx->OMSetBlendState(old.BlendState, old.BlendFactor, old.SampleMask); if (old.BlendState) old.BlendState->Release();
ctx->OMSetDepthStencilState(old.DepthStencilState, old.StencilRef); if (old.DepthStencilState) old.DepthStencilState->Release();
ctx->PSSetShaderResources(0, 1, &old.PSShaderResource); if (old.PSShaderResource) old.PSShaderResource->Release();
ctx->PSSetSamplers(0, 1, &old.PSSampler); if (old.PSSampler) old.PSSampler->Release();
ctx->PSSetShader(old.PS, old.PSInstances, old.PSInstancesCount); if (old.PS) old.PS->Release();
for (UINT i = 0; i < old.PSInstancesCount; i++) if (old.PSInstances[i]) old.PSInstances[i]->Release();
ctx->VSSetShader(old.VS, old.VSInstances, old.VSInstancesCount); if (old.VS) old.VS->Release();
ctx->VSSetConstantBuffers(0, 1, &old.VSConstantBuffer); if (old.VSConstantBuffer) old.VSConstantBuffer->Release();
ctx->GSSetShader(old.GS, old.GSInstances, old.GSInstancesCount); if (old.GS) old.GS->Release();
for (UINT i = 0; i < old.VSInstancesCount; i++) if (old.VSInstances[i]) old.VSInstances[i]->Release();
ctx->IASetPrimitiveTopology(old.PrimitiveTopology);
ctx->IASetIndexBuffer(old.IndexBuffer, old.IndexBufferFormat, old.IndexBufferOffset); if (old.IndexBuffer) old.IndexBuffer->Release();
ctx->IASetVertexBuffers(0, 1, &old.VertexBuffer, &old.VertexBufferStride, &old.VertexBufferOffset); if (old.VertexBuffer) old.VertexBuffer->Release();
ctx->IASetInputLayout(old.InputLayout); if (old.InputLayout) old.InputLayout->Release();
}
static void ImGui_ImplDX11_CreateFontsTexture()
{
// Build texture atlas
ImGuiIO& io = ImGui::GetIO();
ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
unsigned char* pixels;
int width, height;
io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
// Upload texture to graphics system
{
D3D11_TEXTURE2D_DESC desc;
ZeroMemory(&desc, sizeof(desc));
desc.Width = width;
desc.Height = height;
desc.MipLevels = 1;
desc.ArraySize = 1;
desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
desc.SampleDesc.Count = 1;
desc.Usage = D3D11_USAGE_DEFAULT;
desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
desc.CPUAccessFlags = 0;
ID3D11Texture2D* pTexture = nullptr;
D3D11_SUBRESOURCE_DATA subResource;
subResource.pSysMem = pixels;
subResource.SysMemPitch = desc.Width * 4;
subResource.SysMemSlicePitch = 0;
bd->pd3dDevice->CreateTexture2D(&desc, &subResource, &pTexture);
IM_ASSERT(pTexture != nullptr);
// Create texture view
D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc;
ZeroMemory(&srvDesc, sizeof(srvDesc));
srvDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
srvDesc.Texture2D.MipLevels = desc.MipLevels;
srvDesc.Texture2D.MostDetailedMip = 0;
bd->pd3dDevice->CreateShaderResourceView(pTexture, &srvDesc, &bd->pFontTextureView);
pTexture->Release();
}
// Store our identifier
io.Fonts->SetTexID((ImTextureID)bd->pFontTextureView);
// Create texture sampler
// (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
{
D3D11_SAMPLER_DESC desc;
ZeroMemory(&desc, sizeof(desc));
desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
desc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
desc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
desc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
desc.MipLODBias = 0.f;
desc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
desc.MinLOD = 0.f;
desc.MaxLOD = 0.f;
bd->pd3dDevice->CreateSamplerState(&desc, &bd->pFontSampler);
}
}
bool ImGui_ImplDX11_CreateDeviceObjects()
{
ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
if (!bd->pd3dDevice)
return false;
if (bd->pFontSampler)
ImGui_ImplDX11_InvalidateDeviceObjects();
// By using D3DCompile() from <d3dcompiler.h> / d3dcompiler.lib, we introduce a dependency to a given version of d3dcompiler_XX.dll (see D3DCOMPILER_DLL_A)
// If you would like to use this DX11 sample code but remove this dependency you can:
// 1) compile once, save the compiled shader blobs into a file or source code and pass them to CreateVertexShader()/CreatePixelShader() [preferred solution]
// 2) use code to detect any version of the DLL and grab a pointer to D3DCompile from the DLL.
// See https://github.com/ocornut/imgui/pull/638 for sources and details.
// Create the vertex shader
{
static const char* vertexShader =
"cbuffer vertexBuffer : register(b0) \
{\
float4x4 ProjectionMatrix; \
};\
struct VS_INPUT\
{\
float2 pos : POSITION;\
float4 col : COLOR0;\
float2 uv : TEXCOORD0;\
};\
\
struct PS_INPUT\
{\
float4 pos : SV_POSITION;\
float4 col : COLOR0;\
float2 uv : TEXCOORD0;\
};\
\
PS_INPUT main(VS_INPUT input)\
{\
PS_INPUT output;\
output.pos = mul( ProjectionMatrix, float4(input.pos.xy, 0.f, 1.f));\
output.col = input.col;\
output.uv = input.uv;\
return output;\
}";
ID3DBlob* vertexShaderBlob;
if (FAILED(D3DCompile(vertexShader, strlen(vertexShader), nullptr, nullptr, nullptr, "main", "vs_4_0", 0, 0, &vertexShaderBlob, nullptr)))
return false; // NB: Pass ID3DBlob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
if (bd->pd3dDevice->CreateVertexShader(vertexShaderBlob->GetBufferPointer(), vertexShaderBlob->GetBufferSize(), nullptr, &bd->pVertexShader) != S_OK)
{
vertexShaderBlob->Release();
return false;
}
// Create the input layout
D3D11_INPUT_ELEMENT_DESC local_layout[] =
{
{ "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, pos), D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, uv), D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)offsetof(ImDrawVert, col), D3D11_INPUT_PER_VERTEX_DATA, 0 },
};
if (bd->pd3dDevice->CreateInputLayout(local_layout, 3, vertexShaderBlob->GetBufferPointer(), vertexShaderBlob->GetBufferSize(), &bd->pInputLayout) != S_OK)
{
vertexShaderBlob->Release();
return false;
}
vertexShaderBlob->Release();
// Create the constant buffer
{
D3D11_BUFFER_DESC desc;
desc.ByteWidth = sizeof(VERTEX_CONSTANT_BUFFER_DX11);
desc.Usage = D3D11_USAGE_DYNAMIC;
desc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
desc.MiscFlags = 0;
bd->pd3dDevice->CreateBuffer(&desc, nullptr, &bd->pVertexConstantBuffer);
}
}
// Create the pixel shader
{
static const char* pixelShader =
"struct PS_INPUT\
{\
float4 pos : SV_POSITION;\
float4 col : COLOR0;\
float2 uv : TEXCOORD0;\
};\
sampler sampler0;\
Texture2D texture0;\
\
float4 main(PS_INPUT input) : SV_Target\
{\
float4 out_col = input.col * texture0.Sample(sampler0, input.uv); \
return out_col; \
}";
ID3DBlob* pixelShaderBlob;
if (FAILED(D3DCompile(pixelShader, strlen(pixelShader), nullptr, nullptr, nullptr, "main", "ps_4_0", 0, 0, &pixelShaderBlob, nullptr)))
return false; // NB: Pass ID3DBlob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
if (bd->pd3dDevice->CreatePixelShader(pixelShaderBlob->GetBufferPointer(), pixelShaderBlob->GetBufferSize(), nullptr, &bd->pPixelShader) != S_OK)
{
pixelShaderBlob->Release();
return false;
}
pixelShaderBlob->Release();
}
// Create the blending setup
{
D3D11_BLEND_DESC desc;
ZeroMemory(&desc, sizeof(desc));
desc.AlphaToCoverageEnable = false;
desc.RenderTarget[0].BlendEnable = true;
desc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA;
desc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
desc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;
desc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE;
desc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_INV_SRC_ALPHA;
desc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
desc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
bd->pd3dDevice->CreateBlendState(&desc, &bd->pBlendState);
}
// Create the rasterizer state
{
D3D11_RASTERIZER_DESC desc;
ZeroMemory(&desc, sizeof(desc));
desc.FillMode = D3D11_FILL_SOLID;
desc.CullMode = D3D11_CULL_NONE;
desc.ScissorEnable = true;
desc.DepthClipEnable = true;
bd->pd3dDevice->CreateRasterizerState(&desc, &bd->pRasterizerState);
}
// Create depth-stencil State
{
D3D11_DEPTH_STENCIL_DESC desc;
ZeroMemory(&desc, sizeof(desc));
desc.DepthEnable = false;
desc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
desc.DepthFunc = D3D11_COMPARISON_ALWAYS;
desc.StencilEnable = false;
desc.FrontFace.StencilFailOp = desc.FrontFace.StencilDepthFailOp = desc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
desc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
desc.BackFace = desc.FrontFace;
bd->pd3dDevice->CreateDepthStencilState(&desc, &bd->pDepthStencilState);
}
ImGui_ImplDX11_CreateFontsTexture();
return true;
}
void ImGui_ImplDX11_InvalidateDeviceObjects()
{
ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
if (!bd->pd3dDevice)
return;
if (bd->pFontSampler) { bd->pFontSampler->Release(); bd->pFontSampler = nullptr; }
if (bd->pFontTextureView) { bd->pFontTextureView->Release(); bd->pFontTextureView = nullptr; ImGui::GetIO().Fonts->SetTexID(0); } // We copied data->pFontTextureView to io.Fonts->TexID so let's clear that as well.
if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
if (bd->pBlendState) { bd->pBlendState->Release(); bd->pBlendState = nullptr; }
if (bd->pDepthStencilState) { bd->pDepthStencilState->Release(); bd->pDepthStencilState = nullptr; }
if (bd->pRasterizerState) { bd->pRasterizerState->Release(); bd->pRasterizerState = nullptr; }
if (bd->pPixelShader) { bd->pPixelShader->Release(); bd->pPixelShader = nullptr; }
if (bd->pVertexConstantBuffer) { bd->pVertexConstantBuffer->Release(); bd->pVertexConstantBuffer = nullptr; }
if (bd->pInputLayout) { bd->pInputLayout->Release(); bd->pInputLayout = nullptr; }
if (bd->pVertexShader) { bd->pVertexShader->Release(); bd->pVertexShader = nullptr; }
}
bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context)
{
ImGuiIO& io = ImGui::GetIO();
IMGUI_CHECKVERSION();
IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!");
// Setup backend capabilities flags
ImGui_ImplDX11_Data* bd = IM_NEW(ImGui_ImplDX11_Data)();
io.BackendRendererUserData = (void*)bd;
io.BackendRendererName = "imgui_impl_dx11";
io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
// Get factory from device
IDXGIDevice* pDXGIDevice = nullptr;
IDXGIAdapter* pDXGIAdapter = nullptr;
IDXGIFactory* pFactory = nullptr;
if (device->QueryInterface(IID_PPV_ARGS(&pDXGIDevice)) == S_OK)
if (pDXGIDevice->GetParent(IID_PPV_ARGS(&pDXGIAdapter)) == S_OK)
if (pDXGIAdapter->GetParent(IID_PPV_ARGS(&pFactory)) == S_OK)
{
bd->pd3dDevice = device;
bd->pd3dDeviceContext = device_context;
bd->pFactory = pFactory;
}
if (pDXGIDevice) pDXGIDevice->Release();
if (pDXGIAdapter) pDXGIAdapter->Release();
bd->pd3dDevice->AddRef();
bd->pd3dDeviceContext->AddRef();
return true;
}
void ImGui_ImplDX11_Shutdown()
{
ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
IM_ASSERT(bd != nullptr && "No renderer backend to shutdown, or already shutdown?");
ImGuiIO& io = ImGui::GetIO();
ImGui_ImplDX11_InvalidateDeviceObjects();
if (bd->pFactory) { bd->pFactory->Release(); }
if (bd->pd3dDevice) { bd->pd3dDevice->Release(); }
if (bd->pd3dDeviceContext) { bd->pd3dDeviceContext->Release(); }
io.BackendRendererName = nullptr;
io.BackendRendererUserData = nullptr;
io.BackendFlags &= ~ImGuiBackendFlags_RendererHasVtxOffset;
IM_DELETE(bd);
}
void ImGui_ImplDX11_NewFrame()
{
ImGui_ImplDX11_Data* bd = ImGui_ImplDX11_GetBackendData();
IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplDX11_Init()?");
if (!bd->pFontSampler)
ImGui_ImplDX11_CreateDeviceObjects();
}
//-----------------------------------------------------------------------------
#endif // #ifndef IMGUI_DISABLE
-32
View File
@@ -1,32 +0,0 @@
// dear imgui: Renderer Backend for DirectX11
// This needs to be used along with a Platform Backend (e.g. Win32)
// Implemented features:
// [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID!
// [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices.
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
// Learn about Dear ImGui:
// - FAQ https://dearimgui.com/faq
// - Getting Started https://dearimgui.com/getting-started
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
// - Introduction, links and more at the top of imgui.cpp
#pragma once
#include "imgui.h" // IMGUI_IMPL_API
#ifndef IMGUI_DISABLE
struct ID3D11Device;
struct ID3D11DeviceContext;
IMGUI_IMPL_API bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context);
IMGUI_IMPL_API void ImGui_ImplDX11_Shutdown();
IMGUI_IMPL_API void ImGui_ImplDX11_NewFrame();
IMGUI_IMPL_API void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data);
// Use if you want to reset your rendering device without losing Dear ImGui state.
IMGUI_IMPL_API void ImGui_ImplDX11_InvalidateDeviceObjects();
IMGUI_IMPL_API bool ImGui_ImplDX11_CreateDeviceObjects();
#endif // #ifndef IMGUI_DISABLE
-924
View File
@@ -1,924 +0,0 @@
// dear imgui: Platform Backend for Windows (standard windows API for 32-bits AND 64-bits applications)
// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
// Implemented features:
// [X] Platform: Clipboard support (for Win32 this is actually part of core dear imgui)
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen.
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy VK_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set]
// [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
// Learn about Dear ImGui:
// - FAQ https://dearimgui.com/faq
// - Getting Started https://dearimgui.com/getting-started
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
// - Introduction, links and more at the top of imgui.cpp
// Configuration flags to add in your imconfig file:
//#define IMGUI_IMPL_WIN32_DISABLE_GAMEPAD // Disable gamepad support. This was meaningful before <1.81 but we now load XInput dynamically so the option is now less relevant.
// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F24 function keys, app back/forward keys.
// 2023-09-25: Inputs: Synthesize key-down event on key-up for VK_SNAPSHOT / ImGuiKey_PrintScreen as Windows doesn't emit it (same behavior as GLFW/SDL).
// 2023-09-07: Inputs: Added support for keyboard codepage conversion for when application is compiled in MBCS mode and using a non-Unicode window.
// 2023-04-19: Added ImGui_ImplWin32_InitForOpenGL() to facilitate combining raw Win32/Winapi with OpenGL. (#3218)
// 2023-04-04: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_TouchScreen/ImGuiMouseSource_Pen. (#2702)
// 2023-02-15: Inputs: Use WM_NCMOUSEMOVE / WM_NCMOUSELEAVE to track mouse position over non-client area (e.g. OS decorations) when app is not focused. (#6045, #6162)
// 2023-02-02: Inputs: Flipping WM_MOUSEHWHEEL (horizontal mouse-wheel) value to match other backends and offer consistent horizontal scrolling direction. (#4019, #6096, #1463)
// 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
// 2022-09-28: Inputs: Convert WM_CHAR values with MultiByteToWideChar() when window class was registered as MBCS (not Unicode).
// 2022-09-26: Inputs: Renamed ImGuiKey_ModXXX introduced in 1.87 to ImGuiMod_XXX (old names still supported).
// 2022-01-26: Inputs: replaced short-lived io.AddKeyModsEvent() (added two weeks ago) with io.AddKeyEvent() using ImGuiKey_ModXXX flags. Sorry for the confusion.
// 2021-01-20: Inputs: calling new io.AddKeyAnalogEvent() for gamepad support, instead of writing directly to io.NavInputs[].
// 2022-01-17: Inputs: calling new io.AddMousePosEvent(), io.AddMouseButtonEvent(), io.AddMouseWheelEvent() API (1.87+).
// 2022-01-17: Inputs: always update key mods next and before a key event (not in NewFrame) to fix input queue with very low framerates.
// 2022-01-12: Inputs: Update mouse inputs using WM_MOUSEMOVE/WM_MOUSELEAVE + fallback to provide it when focused but not hovered/captured. More standard and will allow us to pass it to future input queue API.
// 2022-01-12: Inputs: Maintain our own copy of MouseButtonsDown mask instead of using ImGui::IsAnyMouseDown() which will be obsoleted.
// 2022-01-10: Inputs: calling new io.AddKeyEvent(), io.AddKeyModsEvent() + io.SetKeyEventNativeData() API (1.87+). Support for full ImGuiKey range.
// 2021-12-16: Inputs: Fill VK_LCONTROL/VK_RCONTROL/VK_LSHIFT/VK_RSHIFT/VK_LMENU/VK_RMENU for completeness.
// 2021-08-17: Calling io.AddFocusEvent() on WM_SETFOCUS/WM_KILLFOCUS messages.
// 2021-08-02: Inputs: Fixed keyboard modifiers being reported when host window doesn't have focus.
// 2021-07-29: Inputs: MousePos is correctly reported when the host platform window is hovered but not focused (using TrackMouseEvent() to receive WM_MOUSELEAVE events).
// 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
// 2021-06-08: Fixed ImGui_ImplWin32_EnableDpiAwareness() and ImGui_ImplWin32_GetDpiScaleForMonitor() to handle Windows 8.1/10 features without a manifest (per-monitor DPI, and properly calls SetProcessDpiAwareness() on 8.1).
// 2021-03-23: Inputs: Clearing keyboard down array when losing focus (WM_KILLFOCUS).
// 2021-02-18: Added ImGui_ImplWin32_EnableAlphaCompositing(). Non Visual Studio users will need to link with dwmapi.lib (MinGW/gcc: use -ldwmapi).
// 2021-02-17: Fixed ImGui_ImplWin32_EnableDpiAwareness() attempting to get SetProcessDpiAwareness from shcore.dll on Windows 8 whereas it is only supported on Windows 8.1.
// 2021-01-25: Inputs: Dynamically loading XInput DLL.
// 2020-12-04: Misc: Fixed setting of io.DisplaySize to invalid/uninitialized data when after hwnd has been closed.
// 2020-03-03: Inputs: Calling AddInputCharacterUTF16() to support surrogate pairs leading to codepoint >= 0x10000 (for more complete CJK inputs)
// 2020-02-17: Added ImGui_ImplWin32_EnableDpiAwareness(), ImGui_ImplWin32_GetDpiScaleForHwnd(), ImGui_ImplWin32_GetDpiScaleForMonitor() helper functions.
// 2020-01-14: Inputs: Added support for #define IMGUI_IMPL_WIN32_DISABLE_GAMEPAD/IMGUI_IMPL_WIN32_DISABLE_LINKING_XINPUT.
// 2019-12-05: Inputs: Added support for ImGuiMouseCursor_NotAllowed mouse cursor.
// 2019-05-11: Inputs: Don't filter value from WM_CHAR before calling AddInputCharacter().
// 2019-01-17: Misc: Using GetForegroundWindow()+IsChild() instead of GetActiveWindow() to be compatible with windows created in a different thread or parent.
// 2019-01-17: Inputs: Added support for mouse buttons 4 and 5 via WM_XBUTTON* messages.
// 2019-01-15: Inputs: Added support for XInput gamepads (if ImGuiConfigFlags_NavEnableGamepad is set by user application).
// 2018-11-30: Misc: Setting up io.BackendPlatformName so it can be displayed in the About Window.
// 2018-06-29: Inputs: Added support for the ImGuiMouseCursor_Hand cursor.
// 2018-06-10: Inputs: Fixed handling of mouse wheel messages to support fine position messages (typically sent by track-pads).
// 2018-06-08: Misc: Extracted imgui_impl_win32.cpp/.h away from the old combined DX9/DX10/DX11/DX12 examples.
// 2018-03-20: Misc: Setup io.BackendFlags ImGuiBackendFlags_HasMouseCursors and ImGuiBackendFlags_HasSetMousePos flags + honor ImGuiConfigFlags_NoMouseCursorChange flag.
// 2018-02-20: Inputs: Added support for mouse cursors (ImGui::GetMouseCursor() value and WM_SETCURSOR message handling).
// 2018-02-06: Inputs: Added mapping for ImGuiKey_Space.
// 2018-02-06: Inputs: Honoring the io.WantSetMousePos by repositioning the mouse (when using navigation and ImGuiConfigFlags_NavMoveMouse is set).
// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
// 2018-01-20: Inputs: Added Horizontal Mouse Wheel support.
// 2018-01-08: Inputs: Added mapping for ImGuiKey_Insert.
// 2018-01-05: Inputs: Added WM_LBUTTONDBLCLK double-click handlers for window classes with the CS_DBLCLKS flag.
// 2017-10-23: Inputs: Added WM_SYSKEYDOWN / WM_SYSKEYUP handlers so e.g. the VK_MENU key can be read.
// 2017-10-23: Inputs: Using Win32 ::SetCapture/::GetCapture() to retrieve mouse positions outside the client area when dragging.
// 2016-11-12: Inputs: Only call Win32 ::SetCursor(nullptr) when io.MouseDrawCursor is set.
#include "imgui.h"
#ifndef IMGUI_DISABLE
#include "imgui_impl_win32.h"
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <windowsx.h> // GET_X_LPARAM(), GET_Y_LPARAM()
#include <tchar.h>
#include <dwmapi.h>
// Using XInput for gamepad (will load DLL dynamically)
#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
#include <xinput.h>
typedef DWORD(WINAPI* PFN_XInputGetCapabilities)(DWORD, DWORD, XINPUT_CAPABILITIES*);
typedef DWORD(WINAPI* PFN_XInputGetState)(DWORD, XINPUT_STATE*);
#endif
// Clang/GCC warnings with -Weverything
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wcast-function-type" // warning: cast between incompatible function types (for loader)
#endif
#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind
#pragma GCC diagnostic ignored "-Wcast-function-type" // warning: cast between incompatible function types (for loader)
#endif
struct ImGui_ImplWin32_Data
{
HWND hWnd;
HWND MouseHwnd;
int MouseTrackedArea; // 0: not tracked, 1: client are, 2: non-client area
int MouseButtonsDown;
INT64 Time;
INT64 TicksPerSecond;
ImGuiMouseCursor LastMouseCursor;
UINT32 KeyboardCodePage;
#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
bool HasGamepad;
bool WantUpdateHasGamepad;
HMODULE XInputDLL;
PFN_XInputGetCapabilities XInputGetCapabilities;
PFN_XInputGetState XInputGetState;
#endif
ImGui_ImplWin32_Data() { memset((void*)this, 0, sizeof(*this)); }
};
// Backend data stored in io.BackendPlatformUserData to allow support for multiple Dear ImGui contexts
// It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts.
// FIXME: multi-context support is not well tested and probably dysfunctional in this backend.
// FIXME: some shared resources (mouse cursor shape, gamepad) are mishandled when using multi-context.
static ImGui_ImplWin32_Data* ImGui_ImplWin32_GetBackendData()
{
return ImGui::GetCurrentContext() ? (ImGui_ImplWin32_Data*)ImGui::GetIO().BackendPlatformUserData : nullptr;
}
// Functions
static void ImGui_ImplWin32_UpdateKeyboardCodePage()
{
// Retrieve keyboard code page, required for handling of non-Unicode Windows.
ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData();
HKL keyboard_layout = ::GetKeyboardLayout(0);
LCID keyboard_lcid = MAKELCID(HIWORD(keyboard_layout), SORT_DEFAULT);
if (::GetLocaleInfoA(keyboard_lcid, (LOCALE_RETURN_NUMBER | LOCALE_IDEFAULTANSICODEPAGE), (LPSTR)&bd->KeyboardCodePage, sizeof(bd->KeyboardCodePage)) == 0)
bd->KeyboardCodePage = CP_ACP; // Fallback to default ANSI code page when fails.
}
static bool ImGui_ImplWin32_InitEx(void* hwnd, bool platform_has_own_dc)
{
ImGuiIO& io = ImGui::GetIO();
IMGUI_CHECKVERSION();
IM_ASSERT(io.BackendPlatformUserData == nullptr && "Already initialized a platform backend!");
INT64 perf_frequency, perf_counter;
if (!::QueryPerformanceFrequency((LARGE_INTEGER*)&perf_frequency))
return false;
if (!::QueryPerformanceCounter((LARGE_INTEGER*)&perf_counter))
return false;
// Setup backend capabilities flags
ImGui_ImplWin32_Data* bd = IM_NEW(ImGui_ImplWin32_Data)();
io.BackendPlatformUserData = (void*)bd;
io.BackendPlatformName = "imgui_impl_win32";
io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)
bd->hWnd = (HWND)hwnd;
bd->TicksPerSecond = perf_frequency;
bd->Time = perf_counter;
bd->LastMouseCursor = ImGuiMouseCursor_COUNT;
ImGui_ImplWin32_UpdateKeyboardCodePage();
// Set platform dependent data in viewport
ImGuiViewport* main_viewport = ImGui::GetMainViewport();
main_viewport->PlatformHandle = main_viewport->PlatformHandleRaw = (void*)bd->hWnd;
IM_UNUSED(platform_has_own_dc); // Used in 'docking' branch
// Dynamically load XInput library
#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
bd->WantUpdateHasGamepad = true;
const char* xinput_dll_names[] =
{
"xinput1_4.dll", // Windows 8+
"xinput1_3.dll", // DirectX SDK
"xinput9_1_0.dll", // Windows Vista, Windows 7
"xinput1_2.dll", // DirectX SDK
"xinput1_1.dll" // DirectX SDK
};
for (int n = 0; n < IM_ARRAYSIZE(xinput_dll_names); n++)
if (HMODULE dll = ::LoadLibraryA(xinput_dll_names[n]))
{
bd->XInputDLL = dll;
bd->XInputGetCapabilities = (PFN_XInputGetCapabilities)::GetProcAddress(dll, "XInputGetCapabilities");
bd->XInputGetState = (PFN_XInputGetState)::GetProcAddress(dll, "XInputGetState");
break;
}
#endif // IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
return true;
}
IMGUI_IMPL_API bool ImGui_ImplWin32_Init(void* hwnd)
{
return ImGui_ImplWin32_InitEx(hwnd, false);
}
IMGUI_IMPL_API bool ImGui_ImplWin32_InitForOpenGL(void* hwnd)
{
// OpenGL needs CS_OWNDC
return ImGui_ImplWin32_InitEx(hwnd, true);
}
void ImGui_ImplWin32_Shutdown()
{
ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData();
IM_ASSERT(bd != nullptr && "No platform backend to shutdown, or already shutdown?");
ImGuiIO& io = ImGui::GetIO();
// Unload XInput library
#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
if (bd->XInputDLL)
::FreeLibrary(bd->XInputDLL);
#endif // IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
io.BackendPlatformName = nullptr;
io.BackendPlatformUserData = nullptr;
io.BackendFlags &= ~(ImGuiBackendFlags_HasMouseCursors | ImGuiBackendFlags_HasSetMousePos | ImGuiBackendFlags_HasGamepad);
IM_DELETE(bd);
}
static bool ImGui_ImplWin32_UpdateMouseCursor()
{
ImGuiIO& io = ImGui::GetIO();
if (io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange)
return false;
ImGuiMouseCursor imgui_cursor = ImGui::GetMouseCursor();
if (imgui_cursor == ImGuiMouseCursor_None || io.MouseDrawCursor)
{
// Hide OS mouse cursor if imgui is drawing it or if it wants no cursor
::SetCursor(nullptr);
}
else
{
// Show OS mouse cursor
LPTSTR win32_cursor = IDC_ARROW;
switch (imgui_cursor)
{
case ImGuiMouseCursor_Arrow: win32_cursor = IDC_ARROW; break;
case ImGuiMouseCursor_TextInput: win32_cursor = IDC_IBEAM; break;
case ImGuiMouseCursor_ResizeAll: win32_cursor = IDC_SIZEALL; break;
case ImGuiMouseCursor_ResizeEW: win32_cursor = IDC_SIZEWE; break;
case ImGuiMouseCursor_ResizeNS: win32_cursor = IDC_SIZENS; break;
case ImGuiMouseCursor_ResizeNESW: win32_cursor = IDC_SIZENESW; break;
case ImGuiMouseCursor_ResizeNWSE: win32_cursor = IDC_SIZENWSE; break;
case ImGuiMouseCursor_Hand: win32_cursor = IDC_HAND; break;
case ImGuiMouseCursor_NotAllowed: win32_cursor = IDC_NO; break;
}
::SetCursor(::LoadCursor(nullptr, win32_cursor));
}
return true;
}
static bool IsVkDown(int vk)
{
return (::GetKeyState(vk) & 0x8000) != 0;
}
static void ImGui_ImplWin32_AddKeyEvent(ImGuiKey key, bool down, int native_keycode, int native_scancode = -1)
{
ImGuiIO& io = ImGui::GetIO();
io.AddKeyEvent(key, down);
io.SetKeyEventNativeData(key, native_keycode, native_scancode); // To support legacy indexing (<1.87 user code)
IM_UNUSED(native_scancode);
}
static void ImGui_ImplWin32_ProcessKeyEventsWorkarounds()
{
// Left & right Shift keys: when both are pressed together, Windows tend to not generate the WM_KEYUP event for the first released one.
if (ImGui::IsKeyDown(ImGuiKey_LeftShift) && !IsVkDown(VK_LSHIFT))
ImGui_ImplWin32_AddKeyEvent(ImGuiKey_LeftShift, false, VK_LSHIFT);
if (ImGui::IsKeyDown(ImGuiKey_RightShift) && !IsVkDown(VK_RSHIFT))
ImGui_ImplWin32_AddKeyEvent(ImGuiKey_RightShift, false, VK_RSHIFT);
// Sometimes WM_KEYUP for Win key is not passed down to the app (e.g. for Win+V on some setups, according to GLFW).
if (ImGui::IsKeyDown(ImGuiKey_LeftSuper) && !IsVkDown(VK_LWIN))
ImGui_ImplWin32_AddKeyEvent(ImGuiKey_LeftSuper, false, VK_LWIN);
if (ImGui::IsKeyDown(ImGuiKey_RightSuper) && !IsVkDown(VK_RWIN))
ImGui_ImplWin32_AddKeyEvent(ImGuiKey_RightSuper, false, VK_RWIN);
}
static void ImGui_ImplWin32_UpdateKeyModifiers()
{
ImGuiIO& io = ImGui::GetIO();
io.AddKeyEvent(ImGuiMod_Ctrl, IsVkDown(VK_CONTROL));
io.AddKeyEvent(ImGuiMod_Shift, IsVkDown(VK_SHIFT));
io.AddKeyEvent(ImGuiMod_Alt, IsVkDown(VK_MENU));
io.AddKeyEvent(ImGuiMod_Super, IsVkDown(VK_APPS));
}
static void ImGui_ImplWin32_UpdateMouseData()
{
ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData();
ImGuiIO& io = ImGui::GetIO();
IM_ASSERT(bd->hWnd != 0);
HWND focused_window = ::GetForegroundWindow();
const bool is_app_focused = (focused_window == bd->hWnd);
if (is_app_focused)
{
// (Optional) Set OS mouse position from Dear ImGui if requested (rarely used, only when ImGuiConfigFlags_NavEnableSetMousePos is enabled by user)
if (io.WantSetMousePos)
{
POINT pos = { (int)io.MousePos.x, (int)io.MousePos.y };
if (::ClientToScreen(bd->hWnd, &pos))
::SetCursorPos(pos.x, pos.y);
}
// (Optional) Fallback to provide mouse position when focused (WM_MOUSEMOVE already provides this when hovered or captured)
// This also fills a short gap when clicking non-client area: WM_NCMOUSELEAVE -> modal OS move -> gap -> WM_NCMOUSEMOVE
if (!io.WantSetMousePos && bd->MouseTrackedArea == 0)
{
POINT pos;
if (::GetCursorPos(&pos) && ::ScreenToClient(bd->hWnd, &pos))
io.AddMousePosEvent((float)pos.x, (float)pos.y);
}
}
}
// Gamepad navigation mapping
static void ImGui_ImplWin32_UpdateGamepads()
{
#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
ImGuiIO& io = ImGui::GetIO();
ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData();
//if ((io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) == 0) // FIXME: Technically feeding gamepad shouldn't depend on this now that they are regular inputs.
// return;
// Calling XInputGetState() every frame on disconnected gamepads is unfortunately too slow.
// Instead we refresh gamepad availability by calling XInputGetCapabilities() _only_ after receiving WM_DEVICECHANGE.
if (bd->WantUpdateHasGamepad)
{
XINPUT_CAPABILITIES caps = {};
bd->HasGamepad = bd->XInputGetCapabilities ? (bd->XInputGetCapabilities(0, XINPUT_FLAG_GAMEPAD, &caps) == ERROR_SUCCESS) : false;
bd->WantUpdateHasGamepad = false;
}
io.BackendFlags &= ~ImGuiBackendFlags_HasGamepad;
XINPUT_STATE xinput_state;
XINPUT_GAMEPAD& gamepad = xinput_state.Gamepad;
if (!bd->HasGamepad || bd->XInputGetState == nullptr || bd->XInputGetState(0, &xinput_state) != ERROR_SUCCESS)
return;
io.BackendFlags |= ImGuiBackendFlags_HasGamepad;
#define IM_SATURATE(V) (V < 0.0f ? 0.0f : V > 1.0f ? 1.0f : V)
#define MAP_BUTTON(KEY_NO, BUTTON_ENUM) { io.AddKeyEvent(KEY_NO, (gamepad.wButtons & BUTTON_ENUM) != 0); }
#define MAP_ANALOG(KEY_NO, VALUE, V0, V1) { float vn = (float)(VALUE - V0) / (float)(V1 - V0); io.AddKeyAnalogEvent(KEY_NO, vn > 0.10f, IM_SATURATE(vn)); }
MAP_BUTTON(ImGuiKey_GamepadStart, XINPUT_GAMEPAD_START);
MAP_BUTTON(ImGuiKey_GamepadBack, XINPUT_GAMEPAD_BACK);
MAP_BUTTON(ImGuiKey_GamepadFaceLeft, XINPUT_GAMEPAD_X);
MAP_BUTTON(ImGuiKey_GamepadFaceRight, XINPUT_GAMEPAD_B);
MAP_BUTTON(ImGuiKey_GamepadFaceUp, XINPUT_GAMEPAD_Y);
MAP_BUTTON(ImGuiKey_GamepadFaceDown, XINPUT_GAMEPAD_A);
MAP_BUTTON(ImGuiKey_GamepadDpadLeft, XINPUT_GAMEPAD_DPAD_LEFT);
MAP_BUTTON(ImGuiKey_GamepadDpadRight, XINPUT_GAMEPAD_DPAD_RIGHT);
MAP_BUTTON(ImGuiKey_GamepadDpadUp, XINPUT_GAMEPAD_DPAD_UP);
MAP_BUTTON(ImGuiKey_GamepadDpadDown, XINPUT_GAMEPAD_DPAD_DOWN);
MAP_BUTTON(ImGuiKey_GamepadL1, XINPUT_GAMEPAD_LEFT_SHOULDER);
MAP_BUTTON(ImGuiKey_GamepadR1, XINPUT_GAMEPAD_RIGHT_SHOULDER);
MAP_ANALOG(ImGuiKey_GamepadL2, gamepad.bLeftTrigger, XINPUT_GAMEPAD_TRIGGER_THRESHOLD, 255);
MAP_ANALOG(ImGuiKey_GamepadR2, gamepad.bRightTrigger, XINPUT_GAMEPAD_TRIGGER_THRESHOLD, 255);
MAP_BUTTON(ImGuiKey_GamepadL3, XINPUT_GAMEPAD_LEFT_THUMB);
MAP_BUTTON(ImGuiKey_GamepadR3, XINPUT_GAMEPAD_RIGHT_THUMB);
MAP_ANALOG(ImGuiKey_GamepadLStickLeft, gamepad.sThumbLX, -XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, -32768);
MAP_ANALOG(ImGuiKey_GamepadLStickRight, gamepad.sThumbLX, +XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, +32767);
MAP_ANALOG(ImGuiKey_GamepadLStickUp, gamepad.sThumbLY, +XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, +32767);
MAP_ANALOG(ImGuiKey_GamepadLStickDown, gamepad.sThumbLY, -XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, -32768);
MAP_ANALOG(ImGuiKey_GamepadRStickLeft, gamepad.sThumbRX, -XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, -32768);
MAP_ANALOG(ImGuiKey_GamepadRStickRight, gamepad.sThumbRX, +XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, +32767);
MAP_ANALOG(ImGuiKey_GamepadRStickUp, gamepad.sThumbRY, +XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, +32767);
MAP_ANALOG(ImGuiKey_GamepadRStickDown, gamepad.sThumbRY, -XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE, -32768);
#undef MAP_BUTTON
#undef MAP_ANALOG
#endif // #ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
}
void ImGui_ImplWin32_NewFrame()
{
ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData();
IM_ASSERT(bd != nullptr && "Context or backend not initialized? Did you call ImGui_ImplWin32_Init()?");
ImGuiIO& io = ImGui::GetIO();
// Setup display size (every frame to accommodate for window resizing)
RECT rect = { 0, 0, 0, 0 };
::GetClientRect(bd->hWnd, &rect);
io.DisplaySize = ImVec2((float)(rect.right - rect.left), (float)(rect.bottom - rect.top));
// Setup time step
INT64 current_time = 0;
::QueryPerformanceCounter((LARGE_INTEGER*)&current_time);
io.DeltaTime = (float)(current_time - bd->Time) / bd->TicksPerSecond;
bd->Time = current_time;
// Update OS mouse position
ImGui_ImplWin32_UpdateMouseData();
// Process workarounds for known Windows key handling issues
ImGui_ImplWin32_ProcessKeyEventsWorkarounds();
// Update OS mouse cursor with the cursor requested by imgui
ImGuiMouseCursor mouse_cursor = io.MouseDrawCursor ? ImGuiMouseCursor_None : ImGui::GetMouseCursor();
if (bd->LastMouseCursor != mouse_cursor)
{
bd->LastMouseCursor = mouse_cursor;
ImGui_ImplWin32_UpdateMouseCursor();
}
// Update game controllers (if enabled and available)
ImGui_ImplWin32_UpdateGamepads();
}
// There is no distinct VK_xxx for keypad enter, instead it is VK_RETURN + KF_EXTENDED, we assign it an arbitrary value to make code more readable (VK_ codes go up to 255)
#define IM_VK_KEYPAD_ENTER (VK_RETURN + 256)
// Map VK_xxx to ImGuiKey_xxx.
static ImGuiKey ImGui_ImplWin32_VirtualKeyToImGuiKey(WPARAM wParam)
{
switch (wParam)
{
case VK_TAB: return ImGuiKey_Tab;
case VK_LEFT: return ImGuiKey_LeftArrow;
case VK_RIGHT: return ImGuiKey_RightArrow;
case VK_UP: return ImGuiKey_UpArrow;
case VK_DOWN: return ImGuiKey_DownArrow;
case VK_PRIOR: return ImGuiKey_PageUp;
case VK_NEXT: return ImGuiKey_PageDown;
case VK_HOME: return ImGuiKey_Home;
case VK_END: return ImGuiKey_End;
case VK_INSERT: return ImGuiKey_Insert;
case VK_DELETE: return ImGuiKey_Delete;
case VK_BACK: return ImGuiKey_Backspace;
case VK_SPACE: return ImGuiKey_Space;
case VK_RETURN: return ImGuiKey_Enter;
case VK_ESCAPE: return ImGuiKey_Escape;
case VK_OEM_7: return ImGuiKey_Apostrophe;
case VK_OEM_COMMA: return ImGuiKey_Comma;
case VK_OEM_MINUS: return ImGuiKey_Minus;
case VK_OEM_PERIOD: return ImGuiKey_Period;
case VK_OEM_2: return ImGuiKey_Slash;
case VK_OEM_1: return ImGuiKey_Semicolon;
case VK_OEM_PLUS: return ImGuiKey_Equal;
case VK_OEM_4: return ImGuiKey_LeftBracket;
case VK_OEM_5: return ImGuiKey_Backslash;
case VK_OEM_6: return ImGuiKey_RightBracket;
case VK_OEM_3: return ImGuiKey_GraveAccent;
case VK_CAPITAL: return ImGuiKey_CapsLock;
case VK_SCROLL: return ImGuiKey_ScrollLock;
case VK_NUMLOCK: return ImGuiKey_NumLock;
case VK_SNAPSHOT: return ImGuiKey_PrintScreen;
case VK_PAUSE: return ImGuiKey_Pause;
case VK_NUMPAD0: return ImGuiKey_Keypad0;
case VK_NUMPAD1: return ImGuiKey_Keypad1;
case VK_NUMPAD2: return ImGuiKey_Keypad2;
case VK_NUMPAD3: return ImGuiKey_Keypad3;
case VK_NUMPAD4: return ImGuiKey_Keypad4;
case VK_NUMPAD5: return ImGuiKey_Keypad5;
case VK_NUMPAD6: return ImGuiKey_Keypad6;
case VK_NUMPAD7: return ImGuiKey_Keypad7;
case VK_NUMPAD8: return ImGuiKey_Keypad8;
case VK_NUMPAD9: return ImGuiKey_Keypad9;
case VK_DECIMAL: return ImGuiKey_KeypadDecimal;
case VK_DIVIDE: return ImGuiKey_KeypadDivide;
case VK_MULTIPLY: return ImGuiKey_KeypadMultiply;
case VK_SUBTRACT: return ImGuiKey_KeypadSubtract;
case VK_ADD: return ImGuiKey_KeypadAdd;
case IM_VK_KEYPAD_ENTER: return ImGuiKey_KeypadEnter;
case VK_LSHIFT: return ImGuiKey_LeftShift;
case VK_LCONTROL: return ImGuiKey_LeftCtrl;
case VK_LMENU: return ImGuiKey_LeftAlt;
case VK_LWIN: return ImGuiKey_LeftSuper;
case VK_RSHIFT: return ImGuiKey_RightShift;
case VK_RCONTROL: return ImGuiKey_RightCtrl;
case VK_RMENU: return ImGuiKey_RightAlt;
case VK_RWIN: return ImGuiKey_RightSuper;
case VK_APPS: return ImGuiKey_Menu;
case '0': return ImGuiKey_0;
case '1': return ImGuiKey_1;
case '2': return ImGuiKey_2;
case '3': return ImGuiKey_3;
case '4': return ImGuiKey_4;
case '5': return ImGuiKey_5;
case '6': return ImGuiKey_6;
case '7': return ImGuiKey_7;
case '8': return ImGuiKey_8;
case '9': return ImGuiKey_9;
case 'A': return ImGuiKey_A;
case 'B': return ImGuiKey_B;
case 'C': return ImGuiKey_C;
case 'D': return ImGuiKey_D;
case 'E': return ImGuiKey_E;
case 'F': return ImGuiKey_F;
case 'G': return ImGuiKey_G;
case 'H': return ImGuiKey_H;
case 'I': return ImGuiKey_I;
case 'J': return ImGuiKey_J;
case 'K': return ImGuiKey_K;
case 'L': return ImGuiKey_L;
case 'M': return ImGuiKey_M;
case 'N': return ImGuiKey_N;
case 'O': return ImGuiKey_O;
case 'P': return ImGuiKey_P;
case 'Q': return ImGuiKey_Q;
case 'R': return ImGuiKey_R;
case 'S': return ImGuiKey_S;
case 'T': return ImGuiKey_T;
case 'U': return ImGuiKey_U;
case 'V': return ImGuiKey_V;
case 'W': return ImGuiKey_W;
case 'X': return ImGuiKey_X;
case 'Y': return ImGuiKey_Y;
case 'Z': return ImGuiKey_Z;
case VK_F1: return ImGuiKey_F1;
case VK_F2: return ImGuiKey_F2;
case VK_F3: return ImGuiKey_F3;
case VK_F4: return ImGuiKey_F4;
case VK_F5: return ImGuiKey_F5;
case VK_F6: return ImGuiKey_F6;
case VK_F7: return ImGuiKey_F7;
case VK_F8: return ImGuiKey_F8;
case VK_F9: return ImGuiKey_F9;
case VK_F10: return ImGuiKey_F10;
case VK_F11: return ImGuiKey_F11;
case VK_F12: return ImGuiKey_F12;
case VK_F13: return ImGuiKey_F13;
case VK_F14: return ImGuiKey_F14;
case VK_F15: return ImGuiKey_F15;
case VK_F16: return ImGuiKey_F16;
case VK_F17: return ImGuiKey_F17;
case VK_F18: return ImGuiKey_F18;
case VK_F19: return ImGuiKey_F19;
case VK_F20: return ImGuiKey_F20;
case VK_F21: return ImGuiKey_F21;
case VK_F22: return ImGuiKey_F22;
case VK_F23: return ImGuiKey_F23;
case VK_F24: return ImGuiKey_F24;
case VK_BROWSER_BACK: return ImGuiKey_AppBack;
case VK_BROWSER_FORWARD: return ImGuiKey_AppForward;
default: return ImGuiKey_None;
}
}
// Allow compilation with old Windows SDK. MinGW doesn't have default _WIN32_WINNT/WINVER versions.
#ifndef WM_MOUSEHWHEEL
#define WM_MOUSEHWHEEL 0x020E
#endif
#ifndef DBT_DEVNODES_CHANGED
#define DBT_DEVNODES_CHANGED 0x0007
#endif
// Win32 message handler (process Win32 mouse/keyboard inputs, etc.)
// Call from your application's message handler. Keep calling your message handler unless this function returns TRUE.
// When implementing your own backend, you can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if Dear ImGui wants to use your inputs.
// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
// Generally you may always pass all inputs to Dear ImGui, and hide them from your application based on those two flags.
// PS: In this Win32 handler, we use the capture API (GetCapture/SetCapture/ReleaseCapture) to be able to read mouse coordinates when dragging mouse outside of our window bounds.
// PS: We treat DBLCLK messages as regular mouse down messages, so this code will work on windows classes that have the CS_DBLCLKS flag set. Our own example app code doesn't set this flag.
#if 0
// Copy this line into your .cpp file to forward declare the function.
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
#endif
// See https://learn.microsoft.com/en-us/windows/win32/tablet/system-events-and-mouse-messages
// Prefer to call this at the top of the message handler to avoid the possibility of other Win32 calls interfering with this.
static ImGuiMouseSource GetMouseSourceFromMessageExtraInfo()
{
LPARAM extra_info = ::GetMessageExtraInfo();
if ((extra_info & 0xFFFFFF80) == 0xFF515700)
return ImGuiMouseSource_Pen;
if ((extra_info & 0xFFFFFF80) == 0xFF515780)
return ImGuiMouseSource_TouchScreen;
return ImGuiMouseSource_Mouse;
}
IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
// Most backends don't have silent checks like this one, but we need it because WndProc are called early in CreateWindow().
// We silently allow both context or just only backend data to be nullptr.
ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData();
if (bd == nullptr)
return 0;
ImGuiIO& io = ImGui::GetIO();
switch (msg)
{
case WM_MOUSEMOVE:
case WM_NCMOUSEMOVE:
{
// We need to call TrackMouseEvent in order to receive WM_MOUSELEAVE events
ImGuiMouseSource mouse_source = GetMouseSourceFromMessageExtraInfo();
const int area = (msg == WM_MOUSEMOVE) ? 1 : 2;
bd->MouseHwnd = hwnd;
if (bd->MouseTrackedArea != area)
{
TRACKMOUSEEVENT tme_cancel = { sizeof(tme_cancel), TME_CANCEL, hwnd, 0 };
TRACKMOUSEEVENT tme_track = { sizeof(tme_track), (DWORD)((area == 2) ? (TME_LEAVE | TME_NONCLIENT) : TME_LEAVE), hwnd, 0 };
if (bd->MouseTrackedArea != 0)
::TrackMouseEvent(&tme_cancel);
::TrackMouseEvent(&tme_track);
bd->MouseTrackedArea = area;
}
POINT mouse_pos = { (LONG)GET_X_LPARAM(lParam), (LONG)GET_Y_LPARAM(lParam) };
if (msg == WM_NCMOUSEMOVE && ::ScreenToClient(hwnd, &mouse_pos) == FALSE) // WM_NCMOUSEMOVE are provided in absolute coordinates.
return 0;
io.AddMouseSourceEvent(mouse_source);
io.AddMousePosEvent((float)mouse_pos.x, (float)mouse_pos.y);
return 0;
}
case WM_MOUSELEAVE:
case WM_NCMOUSELEAVE:
{
const int area = (msg == WM_MOUSELEAVE) ? 1 : 2;
if (bd->MouseTrackedArea == area)
{
if (bd->MouseHwnd == hwnd)
bd->MouseHwnd = nullptr;
bd->MouseTrackedArea = 0;
io.AddMousePosEvent(-FLT_MAX, -FLT_MAX);
}
return 0;
}
case WM_LBUTTONDOWN: case WM_LBUTTONDBLCLK:
case WM_RBUTTONDOWN: case WM_RBUTTONDBLCLK:
case WM_MBUTTONDOWN: case WM_MBUTTONDBLCLK:
case WM_XBUTTONDOWN: case WM_XBUTTONDBLCLK:
{
ImGuiMouseSource mouse_source = GetMouseSourceFromMessageExtraInfo();
int button = 0;
if (msg == WM_LBUTTONDOWN || msg == WM_LBUTTONDBLCLK) { button = 0; }
if (msg == WM_RBUTTONDOWN || msg == WM_RBUTTONDBLCLK) { button = 1; }
if (msg == WM_MBUTTONDOWN || msg == WM_MBUTTONDBLCLK) { button = 2; }
if (msg == WM_XBUTTONDOWN || msg == WM_XBUTTONDBLCLK) { button = (GET_XBUTTON_WPARAM(wParam) == XBUTTON1) ? 3 : 4; }
if (bd->MouseButtonsDown == 0 && ::GetCapture() == nullptr)
::SetCapture(hwnd);
bd->MouseButtonsDown |= 1 << button;
io.AddMouseSourceEvent(mouse_source);
io.AddMouseButtonEvent(button, true);
return 0;
}
case WM_LBUTTONUP:
case WM_RBUTTONUP:
case WM_MBUTTONUP:
case WM_XBUTTONUP:
{
ImGuiMouseSource mouse_source = GetMouseSourceFromMessageExtraInfo();
int button = 0;
if (msg == WM_LBUTTONUP) { button = 0; }
if (msg == WM_RBUTTONUP) { button = 1; }
if (msg == WM_MBUTTONUP) { button = 2; }
if (msg == WM_XBUTTONUP) { button = (GET_XBUTTON_WPARAM(wParam) == XBUTTON1) ? 3 : 4; }
bd->MouseButtonsDown &= ~(1 << button);
if (bd->MouseButtonsDown == 0 && ::GetCapture() == hwnd)
::ReleaseCapture();
io.AddMouseSourceEvent(mouse_source);
io.AddMouseButtonEvent(button, false);
return 0;
}
case WM_MOUSEWHEEL:
io.AddMouseWheelEvent(0.0f, (float)GET_WHEEL_DELTA_WPARAM(wParam) / (float)WHEEL_DELTA);
return 0;
case WM_MOUSEHWHEEL:
io.AddMouseWheelEvent(-(float)GET_WHEEL_DELTA_WPARAM(wParam) / (float)WHEEL_DELTA, 0.0f);
return 0;
case WM_KEYDOWN:
case WM_KEYUP:
case WM_SYSKEYDOWN:
case WM_SYSKEYUP:
{
const bool is_key_down = (msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN);
if (wParam < 256)
{
// Submit modifiers
ImGui_ImplWin32_UpdateKeyModifiers();
// Obtain virtual key code
// (keypad enter doesn't have its own... VK_RETURN with KF_EXTENDED flag means keypad enter, see IM_VK_KEYPAD_ENTER definition for details, it is mapped to ImGuiKey_KeyPadEnter.)
int vk = (int)wParam;
if ((wParam == VK_RETURN) && (HIWORD(lParam) & KF_EXTENDED))
vk = IM_VK_KEYPAD_ENTER;
const ImGuiKey key = ImGui_ImplWin32_VirtualKeyToImGuiKey(vk);
const int scancode = (int)LOBYTE(HIWORD(lParam));
// Special behavior for VK_SNAPSHOT / ImGuiKey_PrintScreen as Windows doesn't emit the key down event.
if (key == ImGuiKey_PrintScreen && !is_key_down)
ImGui_ImplWin32_AddKeyEvent(key, true, vk, scancode);
// Submit key event
if (key != ImGuiKey_None)
ImGui_ImplWin32_AddKeyEvent(key, is_key_down, vk, scancode);
// Submit individual left/right modifier events
if (vk == VK_SHIFT)
{
// Important: Shift keys tend to get stuck when pressed together, missing key-up events are corrected in ImGui_ImplWin32_ProcessKeyEventsWorkarounds()
if (IsVkDown(VK_LSHIFT) == is_key_down) { ImGui_ImplWin32_AddKeyEvent(ImGuiKey_LeftShift, is_key_down, VK_LSHIFT, scancode); }
if (IsVkDown(VK_RSHIFT) == is_key_down) { ImGui_ImplWin32_AddKeyEvent(ImGuiKey_RightShift, is_key_down, VK_RSHIFT, scancode); }
}
else if (vk == VK_CONTROL)
{
if (IsVkDown(VK_LCONTROL) == is_key_down) { ImGui_ImplWin32_AddKeyEvent(ImGuiKey_LeftCtrl, is_key_down, VK_LCONTROL, scancode); }
if (IsVkDown(VK_RCONTROL) == is_key_down) { ImGui_ImplWin32_AddKeyEvent(ImGuiKey_RightCtrl, is_key_down, VK_RCONTROL, scancode); }
}
else if (vk == VK_MENU)
{
if (IsVkDown(VK_LMENU) == is_key_down) { ImGui_ImplWin32_AddKeyEvent(ImGuiKey_LeftAlt, is_key_down, VK_LMENU, scancode); }
if (IsVkDown(VK_RMENU) == is_key_down) { ImGui_ImplWin32_AddKeyEvent(ImGuiKey_RightAlt, is_key_down, VK_RMENU, scancode); }
}
}
return 0;
}
case WM_SETFOCUS:
case WM_KILLFOCUS:
io.AddFocusEvent(msg == WM_SETFOCUS);
return 0;
case WM_INPUTLANGCHANGE:
ImGui_ImplWin32_UpdateKeyboardCodePage();
return 0;
case WM_CHAR:
if (::IsWindowUnicode(hwnd))
{
// You can also use ToAscii()+GetKeyboardState() to retrieve characters.
if (wParam > 0 && wParam < 0x10000)
io.AddInputCharacterUTF16((unsigned short)wParam);
}
else
{
wchar_t wch = 0;
::MultiByteToWideChar(bd->KeyboardCodePage, MB_PRECOMPOSED, (char*)&wParam, 1, &wch, 1);
io.AddInputCharacter(wch);
}
return 0;
case WM_SETCURSOR:
// This is required to restore cursor when transitioning from e.g resize borders to client area.
if (LOWORD(lParam) == HTCLIENT && ImGui_ImplWin32_UpdateMouseCursor())
return 1;
return 0;
case WM_DEVICECHANGE:
#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
if ((UINT)wParam == DBT_DEVNODES_CHANGED)
bd->WantUpdateHasGamepad = true;
#endif
return 0;
}
return 0;
}
//--------------------------------------------------------------------------------------------------------
// DPI-related helpers (optional)
//--------------------------------------------------------------------------------------------------------
// - Use to enable DPI awareness without having to create an application manifest.
// - Your own app may already do this via a manifest or explicit calls. This is mostly useful for our examples/ apps.
// - In theory we could call simple functions from Windows SDK such as SetProcessDPIAware(), SetProcessDpiAwareness(), etc.
// but most of the functions provided by Microsoft require Windows 8.1/10+ SDK at compile time and Windows 8/10+ at runtime,
// neither we want to require the user to have. So we dynamically select and load those functions to avoid dependencies.
//---------------------------------------------------------------------------------------------------------
// This is the scheme successfully used by GLFW (from which we borrowed some of the code) and other apps aiming to be highly portable.
// ImGui_ImplWin32_EnableDpiAwareness() is just a helper called by main.cpp, we don't call it automatically.
// If you are trying to implement your own backend for your own engine, you may ignore that noise.
//---------------------------------------------------------------------------------------------------------
// Perform our own check with RtlVerifyVersionInfo() instead of using functions from <VersionHelpers.h> as they
// require a manifest to be functional for checks above 8.1. See https://github.com/ocornut/imgui/issues/4200
static BOOL _IsWindowsVersionOrGreater(WORD major, WORD minor, WORD)
{
typedef LONG(WINAPI* PFN_RtlVerifyVersionInfo)(OSVERSIONINFOEXW*, ULONG, ULONGLONG);
static PFN_RtlVerifyVersionInfo RtlVerifyVersionInfoFn = nullptr;
if (RtlVerifyVersionInfoFn == nullptr)
if (HMODULE ntdllModule = ::GetModuleHandleA("ntdll.dll"))
RtlVerifyVersionInfoFn = (PFN_RtlVerifyVersionInfo)GetProcAddress(ntdllModule, "RtlVerifyVersionInfo");
if (RtlVerifyVersionInfoFn == nullptr)
return FALSE;
RTL_OSVERSIONINFOEXW versionInfo = { };
ULONGLONG conditionMask = 0;
versionInfo.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOEXW);
versionInfo.dwMajorVersion = major;
versionInfo.dwMinorVersion = minor;
VER_SET_CONDITION(conditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL);
VER_SET_CONDITION(conditionMask, VER_MINORVERSION, VER_GREATER_EQUAL);
return (RtlVerifyVersionInfoFn(&versionInfo, VER_MAJORVERSION | VER_MINORVERSION, conditionMask) == 0) ? TRUE : FALSE;
}
#define _IsWindowsVistaOrGreater() _IsWindowsVersionOrGreater(HIBYTE(0x0600), LOBYTE(0x0600), 0) // _WIN32_WINNT_VISTA
#define _IsWindows8OrGreater() _IsWindowsVersionOrGreater(HIBYTE(0x0602), LOBYTE(0x0602), 0) // _WIN32_WINNT_WIN8
#define _IsWindows8Point1OrGreater() _IsWindowsVersionOrGreater(HIBYTE(0x0603), LOBYTE(0x0603), 0) // _WIN32_WINNT_WINBLUE
#define _IsWindows10OrGreater() _IsWindowsVersionOrGreater(HIBYTE(0x0A00), LOBYTE(0x0A00), 0) // _WIN32_WINNT_WINTHRESHOLD / _WIN32_WINNT_WIN10
#ifndef DPI_ENUMS_DECLARED
typedef enum { PROCESS_DPI_UNAWARE = 0, PROCESS_SYSTEM_DPI_AWARE = 1, PROCESS_PER_MONITOR_DPI_AWARE = 2 } PROCESS_DPI_AWARENESS;
typedef enum { MDT_EFFECTIVE_DPI = 0, MDT_ANGULAR_DPI = 1, MDT_RAW_DPI = 2, MDT_DEFAULT = MDT_EFFECTIVE_DPI } MONITOR_DPI_TYPE;
#endif
#ifndef _DPI_AWARENESS_CONTEXTS_
DECLARE_HANDLE(DPI_AWARENESS_CONTEXT);
#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE (DPI_AWARENESS_CONTEXT)-3
#endif
#ifndef DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 (DPI_AWARENESS_CONTEXT)-4
#endif
typedef HRESULT(WINAPI* PFN_SetProcessDpiAwareness)(PROCESS_DPI_AWARENESS); // Shcore.lib + dll, Windows 8.1+
typedef HRESULT(WINAPI* PFN_GetDpiForMonitor)(HMONITOR, MONITOR_DPI_TYPE, UINT*, UINT*); // Shcore.lib + dll, Windows 8.1+
typedef DPI_AWARENESS_CONTEXT(WINAPI* PFN_SetThreadDpiAwarenessContext)(DPI_AWARENESS_CONTEXT); // User32.lib + dll, Windows 10 v1607+ (Creators Update)
// Helper function to enable DPI awareness without setting up a manifest
void ImGui_ImplWin32_EnableDpiAwareness()
{
if (_IsWindows10OrGreater())
{
static HINSTANCE user32_dll = ::LoadLibraryA("user32.dll"); // Reference counted per-process
if (PFN_SetThreadDpiAwarenessContext SetThreadDpiAwarenessContextFn = (PFN_SetThreadDpiAwarenessContext)::GetProcAddress(user32_dll, "SetThreadDpiAwarenessContext"))
{
SetThreadDpiAwarenessContextFn(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
return;
}
}
if (_IsWindows8Point1OrGreater())
{
static HINSTANCE shcore_dll = ::LoadLibraryA("shcore.dll"); // Reference counted per-process
if (PFN_SetProcessDpiAwareness SetProcessDpiAwarenessFn = (PFN_SetProcessDpiAwareness)::GetProcAddress(shcore_dll, "SetProcessDpiAwareness"))
{
SetProcessDpiAwarenessFn(PROCESS_PER_MONITOR_DPI_AWARE);
return;
}
}
#if _WIN32_WINNT >= 0x0600
::SetProcessDPIAware();
#endif
}
#if defined(_MSC_VER) && !defined(NOGDI)
#pragma comment(lib, "gdi32") // Link with gdi32.lib for GetDeviceCaps(). MinGW will require linking with '-lgdi32'
#endif
float ImGui_ImplWin32_GetDpiScaleForMonitor(void* monitor)
{
UINT xdpi = 96, ydpi = 96;
if (_IsWindows8Point1OrGreater())
{
static HINSTANCE shcore_dll = ::LoadLibraryA("shcore.dll"); // Reference counted per-process
static PFN_GetDpiForMonitor GetDpiForMonitorFn = nullptr;
if (GetDpiForMonitorFn == nullptr && shcore_dll != nullptr)
GetDpiForMonitorFn = (PFN_GetDpiForMonitor)::GetProcAddress(shcore_dll, "GetDpiForMonitor");
if (GetDpiForMonitorFn != nullptr)
{
GetDpiForMonitorFn((HMONITOR)monitor, MDT_EFFECTIVE_DPI, &xdpi, &ydpi);
IM_ASSERT(xdpi == ydpi); // Please contact me if you hit this assert!
return xdpi / 96.0f;
}
}
#ifndef NOGDI
const HDC dc = ::GetDC(nullptr);
xdpi = ::GetDeviceCaps(dc, LOGPIXELSX);
ydpi = ::GetDeviceCaps(dc, LOGPIXELSY);
IM_ASSERT(xdpi == ydpi); // Please contact me if you hit this assert!
::ReleaseDC(nullptr, dc);
#endif
return xdpi / 96.0f;
}
float ImGui_ImplWin32_GetDpiScaleForHwnd(void* hwnd)
{
HMONITOR monitor = ::MonitorFromWindow((HWND)hwnd, MONITOR_DEFAULTTONEAREST);
return ImGui_ImplWin32_GetDpiScaleForMonitor(monitor);
}
//---------------------------------------------------------------------------------------------------------
// Transparency related helpers (optional)
//--------------------------------------------------------------------------------------------------------
#if defined(_MSC_VER)
#pragma comment(lib, "dwmapi") // Link with dwmapi.lib. MinGW will require linking with '-ldwmapi'
#endif
// [experimental]
// Borrowed from GLFW's function updateFramebufferTransparency() in src/win32_window.c
// (the Dwm* functions are Vista era functions but we are borrowing logic from GLFW)
void ImGui_ImplWin32_EnableAlphaCompositing(void* hwnd)
{
if (!_IsWindowsVistaOrGreater())
return;
BOOL composition;
if (FAILED(::DwmIsCompositionEnabled(&composition)) || !composition)
return;
BOOL opaque;
DWORD color;
if (_IsWindows8OrGreater() || (SUCCEEDED(::DwmGetColorizationColor(&color, &opaque)) && !opaque))
{
HRGN region = ::CreateRectRgn(0, 0, -1, -1);
DWM_BLURBEHIND bb = {};
bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;
bb.hRgnBlur = region;
bb.fEnable = TRUE;
::DwmEnableBlurBehindWindow((HWND)hwnd, &bb);
::DeleteObject(region);
}
else
{
DWM_BLURBEHIND bb = {};
bb.dwFlags = DWM_BB_ENABLE;
::DwmEnableBlurBehindWindow((HWND)hwnd, &bb);
}
}
//---------------------------------------------------------------------------------------------------------
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
#endif // #ifndef IMGUI_DISABLE
-52
View File
@@ -1,52 +0,0 @@
// dear imgui: Platform Backend for Windows (standard windows API for 32-bits AND 64-bits applications)
// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
// Implemented features:
// [X] Platform: Clipboard support (for Win32 this is actually part of core dear imgui)
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen.
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy VK_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set]
// [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
// Learn about Dear ImGui:
// - FAQ https://dearimgui.com/faq
// - Getting Started https://dearimgui.com/getting-started
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
// - Introduction, links and more at the top of imgui.cpp
#pragma once
#include "imgui.h" // IMGUI_IMPL_API
#ifndef IMGUI_DISABLE
IMGUI_IMPL_API bool ImGui_ImplWin32_Init(void* hwnd);
IMGUI_IMPL_API bool ImGui_ImplWin32_InitForOpenGL(void* hwnd);
IMGUI_IMPL_API void ImGui_ImplWin32_Shutdown();
IMGUI_IMPL_API void ImGui_ImplWin32_NewFrame();
// Win32 message handler your application need to call.
// - Intentionally commented out in a '#if 0' block to avoid dragging dependencies on <windows.h> from this helper.
// - You should COPY the line below into your .cpp code to forward declare the function and then you can call it.
// - Call from your application's message handler. Keep calling your message handler unless this function returns TRUE.
#if 0
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
#endif
// DPI-related helpers (optional)
// - Use to enable DPI awareness without having to create an application manifest.
// - Your own app may already do this via a manifest or explicit calls. This is mostly useful for our examples/ apps.
// - In theory we could call simple functions from Windows SDK such as SetProcessDPIAware(), SetProcessDpiAwareness(), etc.
// but most of the functions provided by Microsoft require Windows 8.1/10+ SDK at compile time and Windows 8/10+ at runtime,
// neither we want to require the user to have. So we dynamically select and load those functions to avoid dependencies.
IMGUI_IMPL_API void ImGui_ImplWin32_EnableDpiAwareness();
IMGUI_IMPL_API float ImGui_ImplWin32_GetDpiScaleForHwnd(void* hwnd); // HWND hwnd
IMGUI_IMPL_API float ImGui_ImplWin32_GetDpiScaleForMonitor(void* monitor); // HMONITOR monitor
// Transparency related helpers (optional) [experimental]
// - Use to enable alpha compositing transparency with the desktop.
// - Use together with e.g. clearing your framebuffer with zero-alpha.
IMGUI_IMPL_API void ImGui_ImplWin32_EnableAlphaCompositing(void* hwnd); // HWND hwnd
#endif // #ifndef IMGUI_DISABLE
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-627
View File
@@ -1,627 +0,0 @@
// [DEAR IMGUI]
// This is a slightly modified version of stb_rect_pack.h 1.01.
// Grep for [DEAR IMGUI] to find the changes.
//
// stb_rect_pack.h - v1.01 - public domain - rectangle packing
// Sean Barrett 2014
//
// Useful for e.g. packing rectangular textures into an atlas.
// Does not do rotation.
//
// Before #including,
//
// #define STB_RECT_PACK_IMPLEMENTATION
//
// in the file that you want to have the implementation.
//
// Not necessarily the awesomest packing method, but better than
// the totally naive one in stb_truetype (which is primarily what
// this is meant to replace).
//
// Has only had a few tests run, may have issues.
//
// More docs to come.
//
// No memory allocations; uses qsort() and assert() from stdlib.
// Can override those by defining STBRP_SORT and STBRP_ASSERT.
//
// This library currently uses the Skyline Bottom-Left algorithm.
//
// Please note: better rectangle packers are welcome! Please
// implement them to the same API, but with a different init
// function.
//
// Credits
//
// Library
// Sean Barrett
// Minor features
// Martins Mozeiko
// github:IntellectualKitty
//
// Bugfixes / warning fixes
// Jeremy Jaussaud
// Fabian Giesen
//
// Version history:
//
// 1.01 (2021-07-11) always use large rect mode, expose STBRP__MAXVAL in public section
// 1.00 (2019-02-25) avoid small space waste; gracefully fail too-wide rectangles
// 0.99 (2019-02-07) warning fixes
// 0.11 (2017-03-03) return packing success/fail result
// 0.10 (2016-10-25) remove cast-away-const to avoid warnings
// 0.09 (2016-08-27) fix compiler warnings
// 0.08 (2015-09-13) really fix bug with empty rects (w=0 or h=0)
// 0.07 (2015-09-13) fix bug with empty rects (w=0 or h=0)
// 0.06 (2015-04-15) added STBRP_SORT to allow replacing qsort
// 0.05: added STBRP_ASSERT to allow replacing assert
// 0.04: fixed minor bug in STBRP_LARGE_RECTS support
// 0.01: initial release
//
// LICENSE
//
// See end of file for license information.
//////////////////////////////////////////////////////////////////////////////
//
// INCLUDE SECTION
//
#ifndef STB_INCLUDE_STB_RECT_PACK_H
#define STB_INCLUDE_STB_RECT_PACK_H
#define STB_RECT_PACK_VERSION 1
#ifdef STBRP_STATIC
#define STBRP_DEF static
#else
#define STBRP_DEF extern
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct stbrp_context stbrp_context;
typedef struct stbrp_node stbrp_node;
typedef struct stbrp_rect stbrp_rect;
typedef int stbrp_coord;
#define STBRP__MAXVAL 0x7fffffff
// Mostly for internal use, but this is the maximum supported coordinate value.
STBRP_DEF int stbrp_pack_rects (stbrp_context *context, stbrp_rect *rects, int num_rects);
// Assign packed locations to rectangles. The rectangles are of type
// 'stbrp_rect' defined below, stored in the array 'rects', and there
// are 'num_rects' many of them.
//
// Rectangles which are successfully packed have the 'was_packed' flag
// set to a non-zero value and 'x' and 'y' store the minimum location
// on each axis (i.e. bottom-left in cartesian coordinates, top-left
// if you imagine y increasing downwards). Rectangles which do not fit
// have the 'was_packed' flag set to 0.
//
// You should not try to access the 'rects' array from another thread
// while this function is running, as the function temporarily reorders
// the array while it executes.
//
// To pack into another rectangle, you need to call stbrp_init_target
// again. To continue packing into the same rectangle, you can call
// this function again. Calling this multiple times with multiple rect
// arrays will probably produce worse packing results than calling it
// a single time with the full rectangle array, but the option is
// available.
//
// The function returns 1 if all of the rectangles were successfully
// packed and 0 otherwise.
struct stbrp_rect
{
// reserved for your use:
int id;
// input:
stbrp_coord w, h;
// output:
stbrp_coord x, y;
int was_packed; // non-zero if valid packing
}; // 16 bytes, nominally
STBRP_DEF void stbrp_init_target (stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes);
// Initialize a rectangle packer to:
// pack a rectangle that is 'width' by 'height' in dimensions
// using temporary storage provided by the array 'nodes', which is 'num_nodes' long
//
// You must call this function every time you start packing into a new target.
//
// There is no "shutdown" function. The 'nodes' memory must stay valid for
// the following stbrp_pack_rects() call (or calls), but can be freed after
// the call (or calls) finish.
//
// Note: to guarantee best results, either:
// 1. make sure 'num_nodes' >= 'width'
// or 2. call stbrp_allow_out_of_mem() defined below with 'allow_out_of_mem = 1'
//
// If you don't do either of the above things, widths will be quantized to multiples
// of small integers to guarantee the algorithm doesn't run out of temporary storage.
//
// If you do #2, then the non-quantized algorithm will be used, but the algorithm
// may run out of temporary storage and be unable to pack some rectangles.
STBRP_DEF void stbrp_setup_allow_out_of_mem (stbrp_context *context, int allow_out_of_mem);
// Optionally call this function after init but before doing any packing to
// change the handling of the out-of-temp-memory scenario, described above.
// If you call init again, this will be reset to the default (false).
STBRP_DEF void stbrp_setup_heuristic (stbrp_context *context, int heuristic);
// Optionally select which packing heuristic the library should use. Different
// heuristics will produce better/worse results for different data sets.
// If you call init again, this will be reset to the default.
enum
{
STBRP_HEURISTIC_Skyline_default=0,
STBRP_HEURISTIC_Skyline_BL_sortHeight = STBRP_HEURISTIC_Skyline_default,
STBRP_HEURISTIC_Skyline_BF_sortHeight
};
//////////////////////////////////////////////////////////////////////////////
//
// the details of the following structures don't matter to you, but they must
// be visible so you can handle the memory allocations for them
struct stbrp_node
{
stbrp_coord x,y;
stbrp_node *next;
};
struct stbrp_context
{
int width;
int height;
int align;
int init_mode;
int heuristic;
int num_nodes;
stbrp_node *active_head;
stbrp_node *free_head;
stbrp_node extra[2]; // we allocate two extra nodes so optimal user-node-count is 'width' not 'width+2'
};
#ifdef __cplusplus
}
#endif
#endif
//////////////////////////////////////////////////////////////////////////////
//
// IMPLEMENTATION SECTION
//
#ifdef STB_RECT_PACK_IMPLEMENTATION
#ifndef STBRP_SORT
#include <stdlib.h>
#define STBRP_SORT qsort
#endif
#ifndef STBRP_ASSERT
#include <assert.h>
#define STBRP_ASSERT assert
#endif
#ifdef _MSC_VER
#define STBRP__NOTUSED(v) (void)(v)
#define STBRP__CDECL __cdecl
#else
#define STBRP__NOTUSED(v) (void)sizeof(v)
#define STBRP__CDECL
#endif
enum
{
STBRP__INIT_skyline = 1
};
STBRP_DEF void stbrp_setup_heuristic(stbrp_context *context, int heuristic)
{
switch (context->init_mode) {
case STBRP__INIT_skyline:
STBRP_ASSERT(heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight || heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight);
context->heuristic = heuristic;
break;
default:
STBRP_ASSERT(0);
}
}
STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context *context, int allow_out_of_mem)
{
if (allow_out_of_mem)
// if it's ok to run out of memory, then don't bother aligning them;
// this gives better packing, but may fail due to OOM (even though
// the rectangles easily fit). @TODO a smarter approach would be to only
// quantize once we've hit OOM, then we could get rid of this parameter.
context->align = 1;
else {
// if it's not ok to run out of memory, then quantize the widths
// so that num_nodes is always enough nodes.
//
// I.e. num_nodes * align >= width
// align >= width / num_nodes
// align = ceil(width/num_nodes)
context->align = (context->width + context->num_nodes-1) / context->num_nodes;
}
}
STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes)
{
int i;
for (i=0; i < num_nodes-1; ++i)
nodes[i].next = &nodes[i+1];
nodes[i].next = NULL;
context->init_mode = STBRP__INIT_skyline;
context->heuristic = STBRP_HEURISTIC_Skyline_default;
context->free_head = &nodes[0];
context->active_head = &context->extra[0];
context->width = width;
context->height = height;
context->num_nodes = num_nodes;
stbrp_setup_allow_out_of_mem(context, 0);
// node 0 is the full width, node 1 is the sentinel (lets us not store width explicitly)
context->extra[0].x = 0;
context->extra[0].y = 0;
context->extra[0].next = &context->extra[1];
context->extra[1].x = (stbrp_coord) width;
context->extra[1].y = (1<<30);
context->extra[1].next = NULL;
}
// find minimum y position if it starts at x1
static int stbrp__skyline_find_min_y(stbrp_context *c, stbrp_node *first, int x0, int width, int *pwaste)
{
stbrp_node *node = first;
int x1 = x0 + width;
int min_y, visited_width, waste_area;
STBRP__NOTUSED(c);
STBRP_ASSERT(first->x <= x0);
#if 0
// skip in case we're past the node
while (node->next->x <= x0)
++node;
#else
STBRP_ASSERT(node->next->x > x0); // we ended up handling this in the caller for efficiency
#endif
STBRP_ASSERT(node->x <= x0);
min_y = 0;
waste_area = 0;
visited_width = 0;
while (node->x < x1) {
if (node->y > min_y) {
// raise min_y higher.
// we've accounted for all waste up to min_y,
// but we'll now add more waste for everything we've visted
waste_area += visited_width * (node->y - min_y);
min_y = node->y;
// the first time through, visited_width might be reduced
if (node->x < x0)
visited_width += node->next->x - x0;
else
visited_width += node->next->x - node->x;
} else {
// add waste area
int under_width = node->next->x - node->x;
if (under_width + visited_width > width)
under_width = width - visited_width;
waste_area += under_width * (min_y - node->y);
visited_width += under_width;
}
node = node->next;
}
*pwaste = waste_area;
return min_y;
}
typedef struct
{
int x,y;
stbrp_node **prev_link;
} stbrp__findresult;
static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context *c, int width, int height)
{
int best_waste = (1<<30), best_x, best_y = (1 << 30);
stbrp__findresult fr;
stbrp_node **prev, *node, *tail, **best = NULL;
// align to multiple of c->align
width = (width + c->align - 1);
width -= width % c->align;
STBRP_ASSERT(width % c->align == 0);
// if it can't possibly fit, bail immediately
if (width > c->width || height > c->height) {
fr.prev_link = NULL;
fr.x = fr.y = 0;
return fr;
}
node = c->active_head;
prev = &c->active_head;
while (node->x + width <= c->width) {
int y,waste;
y = stbrp__skyline_find_min_y(c, node, node->x, width, &waste);
if (c->heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight) { // actually just want to test BL
// bottom left
if (y < best_y) {
best_y = y;
best = prev;
}
} else {
// best-fit
if (y + height <= c->height) {
// can only use it if it first vertically
if (y < best_y || (y == best_y && waste < best_waste)) {
best_y = y;
best_waste = waste;
best = prev;
}
}
}
prev = &node->next;
node = node->next;
}
best_x = (best == NULL) ? 0 : (*best)->x;
// if doing best-fit (BF), we also have to try aligning right edge to each node position
//
// e.g, if fitting
//
// ____________________
// |____________________|
//
// into
//
// | |
// | ____________|
// |____________|
//
// then right-aligned reduces waste, but bottom-left BL is always chooses left-aligned
//
// This makes BF take about 2x the time
if (c->heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight) {
tail = c->active_head;
node = c->active_head;
prev = &c->active_head;
// find first node that's admissible
while (tail->x < width)
tail = tail->next;
while (tail) {
int xpos = tail->x - width;
int y,waste;
STBRP_ASSERT(xpos >= 0);
// find the left position that matches this
while (node->next->x <= xpos) {
prev = &node->next;
node = node->next;
}
STBRP_ASSERT(node->next->x > xpos && node->x <= xpos);
y = stbrp__skyline_find_min_y(c, node, xpos, width, &waste);
if (y + height <= c->height) {
if (y <= best_y) {
if (y < best_y || waste < best_waste || (waste==best_waste && xpos < best_x)) {
best_x = xpos;
//STBRP_ASSERT(y <= best_y); [DEAR IMGUI]
best_y = y;
best_waste = waste;
best = prev;
}
}
}
tail = tail->next;
}
}
fr.prev_link = best;
fr.x = best_x;
fr.y = best_y;
return fr;
}
static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *context, int width, int height)
{
// find best position according to heuristic
stbrp__findresult res = stbrp__skyline_find_best_pos(context, width, height);
stbrp_node *node, *cur;
// bail if:
// 1. it failed
// 2. the best node doesn't fit (we don't always check this)
// 3. we're out of memory
if (res.prev_link == NULL || res.y + height > context->height || context->free_head == NULL) {
res.prev_link = NULL;
return res;
}
// on success, create new node
node = context->free_head;
node->x = (stbrp_coord) res.x;
node->y = (stbrp_coord) (res.y + height);
context->free_head = node->next;
// insert the new node into the right starting point, and
// let 'cur' point to the remaining nodes needing to be
// stiched back in
cur = *res.prev_link;
if (cur->x < res.x) {
// preserve the existing one, so start testing with the next one
stbrp_node *next = cur->next;
cur->next = node;
cur = next;
} else {
*res.prev_link = node;
}
// from here, traverse cur and free the nodes, until we get to one
// that shouldn't be freed
while (cur->next && cur->next->x <= res.x + width) {
stbrp_node *next = cur->next;
// move the current node to the free list
cur->next = context->free_head;
context->free_head = cur;
cur = next;
}
// stitch the list back in
node->next = cur;
if (cur->x < res.x + width)
cur->x = (stbrp_coord) (res.x + width);
#ifdef _DEBUG
cur = context->active_head;
while (cur->x < context->width) {
STBRP_ASSERT(cur->x < cur->next->x);
cur = cur->next;
}
STBRP_ASSERT(cur->next == NULL);
{
int count=0;
cur = context->active_head;
while (cur) {
cur = cur->next;
++count;
}
cur = context->free_head;
while (cur) {
cur = cur->next;
++count;
}
STBRP_ASSERT(count == context->num_nodes+2);
}
#endif
return res;
}
static int STBRP__CDECL rect_height_compare(const void *a, const void *b)
{
const stbrp_rect *p = (const stbrp_rect *) a;
const stbrp_rect *q = (const stbrp_rect *) b;
if (p->h > q->h)
return -1;
if (p->h < q->h)
return 1;
return (p->w > q->w) ? -1 : (p->w < q->w);
}
static int STBRP__CDECL rect_original_order(const void *a, const void *b)
{
const stbrp_rect *p = (const stbrp_rect *) a;
const stbrp_rect *q = (const stbrp_rect *) b;
return (p->was_packed < q->was_packed) ? -1 : (p->was_packed > q->was_packed);
}
STBRP_DEF int stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int num_rects)
{
int i, all_rects_packed = 1;
// we use the 'was_packed' field internally to allow sorting/unsorting
for (i=0; i < num_rects; ++i) {
rects[i].was_packed = i;
}
// sort according to heuristic
STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_height_compare);
for (i=0; i < num_rects; ++i) {
if (rects[i].w == 0 || rects[i].h == 0) {
rects[i].x = rects[i].y = 0; // empty rect needs no space
} else {
stbrp__findresult fr = stbrp__skyline_pack_rectangle(context, rects[i].w, rects[i].h);
if (fr.prev_link) {
rects[i].x = (stbrp_coord) fr.x;
rects[i].y = (stbrp_coord) fr.y;
} else {
rects[i].x = rects[i].y = STBRP__MAXVAL;
}
}
}
// unsort
STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_original_order);
// set was_packed flags and all_rects_packed status
for (i=0; i < num_rects; ++i) {
rects[i].was_packed = !(rects[i].x == STBRP__MAXVAL && rects[i].y == STBRP__MAXVAL);
if (!rects[i].was_packed)
all_rects_packed = 0;
}
// return the all_rects_packed status
return all_rects_packed;
}
#endif
/*
------------------------------------------------------------------------------
This software is available under 2 licenses -- choose whichever you prefer.
------------------------------------------------------------------------------
ALTERNATIVE A - MIT License
Copyright (c) 2017 Sean Barrett
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
------------------------------------------------------------------------------
ALTERNATIVE B - Public Domain (www.unlicense.org)
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
software, either in source code form or as a compiled binary, for any purpose,
commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this
software dedicate any and all copyright interest in the software to the public
domain. We make this dedication for the benefit of the public at large and to
the detriment of our heirs and successors. We intend this dedication to be an
overt act of relinquishment in perpetuity of all present and future rights to
this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
------------------------------------------------------------------------------
*/
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-47
View File
@@ -1,47 +0,0 @@
#include "UE4.hpp"
#include "Classes.hpp"
namespace UE4
{
class UClass* BasicFilesImpleUtils::FindClassByName(const std::string& Name)
{
return UObject::FindClassFast(Name);
}
class UClass* BasicFilesImpleUtils::FindClassByFullName(const std::string& Name)
{
return UObject::FindClass(Name);
}
std::string BasicFilesImpleUtils::GetObjectName(class UClass* Class)
{
return Class->GetName();
}
int32 BasicFilesImpleUtils::GetObjectIndex(class UClass* Class)
{
return Class->Index;
}
class UObject* BasicFilesImpleUtils::GetObjectByIndex(int32 Index)
{
return UObject::GObjects->GetByIndex(Index);
}
UFunction* BasicFilesImpleUtils::FindFunctionByFName(const FName* Name)
{
for (int i = 0; i < UObject::GObjects->Num(); ++i)
{
UObject* Object = UObject::GObjects->GetByIndex(i);
if (!Object)
continue;
if (Object->Name == *Name)
return static_cast<UFunction*>(Object);
}
return nullptr;
}
}
-875
View File
@@ -1,875 +0,0 @@
#pragma once
#include <string>
#include <iostream>
#include <Windows.h>
#include <functional>
#include <type_traits>
#include "Containers.h"
namespace UE4
{
using namespace Containers;
namespace Offsets
{
static uintptr_t GObjects = 0;
static uintptr_t AppendString = 0;
static uintptr_t ProcessEvent = 0;
static uintptr_t ProcessEventIdx = 0;
static uintptr_t GWorld = 0;
}
namespace InSDKUtils
{
inline uintptr_t GetImageBase()
{
return reinterpret_cast<uintptr_t>(GetModuleHandle(0));
}
template<typename FuncType>
inline FuncType GetVirtualFunction(const void* ObjectInstance, int32 Index)
{
void** VTable = *reinterpret_cast<void***>(const_cast<void*>(ObjectInstance));
return reinterpret_cast<FuncType>(VTable[Index]);
}
template<typename FuncType, typename... ParamTypes>
requires std::invocable<FuncType, ParamTypes...>
inline auto CallGameFunction(FuncType Function, ParamTypes&&... Args)
{
return Function(std::forward<ParamTypes>(Args)...);
}
}
template<int32 Len>
struct StringLiteral
{
char Chars[Len];
consteval StringLiteral(const char(&String)[Len])
{
std::copy_n(String, Len, Chars);
}
operator std::string() const
{
return static_cast<const char*>(Chars);
}
};
class UClass;
class UObject;
class UFunction;
struct FName;
namespace BasicFilesImpleUtils
{
UClass* FindClassByName(const std::string& Name);
UClass* FindClassByFullName(const std::string& Name);
std::string GetObjectName(class UClass* Class);
int32 GetObjectIndex(class UClass* Class);
UObject* GetObjectByIndex(int32 Index);
UFunction* FindFunctionByFName(const FName* Name);
}
template<StringLiteral Name, bool bIsFullName = false>
class UClass* StaticClassImpl()
{
static class UClass* Clss = nullptr;
if (Clss == nullptr)
{
if constexpr (bIsFullName) {
Clss = BasicFilesImpleUtils::FindClassByFullName(Name);
}
else {
Clss = BasicFilesImpleUtils::FindClassByName(Name);
}
}
return Clss;
}
template<StringLiteral Name, bool bIsFullName = false, StringLiteral NonFullName = "">
class UClass* StaticBPGeneratedClassImpl()
{
static auto SetClassIndex = [](UClass* Class, int32& Index) -> UClass*
{
if (Class)
Index = BasicFilesImpleUtils::GetObjectIndex(Class);
return Class;
};
static int32 ClassIdx = 0x0;
if constexpr (bIsFullName)
{
if (ClassIdx == 0x0)
return SetClassIndex(BasicFilesImpleUtils::FindClassByFullName(Name), ClassIdx);
UClass* ClassObj = static_cast<UClass*>(BasicFilesImpleUtils::GetObjectByIndex(ClassIdx));
if (!ClassObj || BasicFilesImpleUtils::GetObjectName(ClassObj) != static_cast<std::string>(Name))
return SetClassIndex(BasicFilesImpleUtils::FindClassByFullName(Name), ClassIdx);
return ClassObj;
}
else
{
if (ClassIdx == 0x0)
return SetClassIndex(BasicFilesImpleUtils::FindClassByName(Name), ClassIdx);
UClass* ClassObj = static_cast<UClass*>(BasicFilesImpleUtils::GetObjectByIndex(ClassIdx));
if (!ClassObj || BasicFilesImpleUtils::GetObjectName(ClassObj) != static_cast<std::string>(Name))
return SetClassIndex(BasicFilesImpleUtils::FindClassByName(Name), ClassIdx);
return ClassObj;
}
}
template<class ClassType>
ClassType* GetDefaultObjImpl()
{
return static_cast<ClassType*>(ClassType::StaticClass()->DefaultObject);
}
struct FUObjectItem final
{
public:
class UObject* Object;
uint8 Pad_0[0x10];
};
static_assert(alignof(FUObjectItem) == 0x000008, "Wrong alignment on FUObjectItem");
static_assert(sizeof(FUObjectItem) == 0x000018, "Wrong size on FUObjectItem");
static_assert(offsetof(FUObjectItem, Object) == 0x000000, "Member 'FUObjectItem::Object' has a wrong offset!");
class TUObjectArrayNew
{
public:
enum
{
ElementsPerChunk = 0x10000,
};
public:
static inline auto DecryptPtr = [](void* ObjPtr) -> uint8*
{
return reinterpret_cast<uint8*>(ObjPtr);
};
FUObjectItem** Objects;
uint8 Pad_0[0x08];
int32 MaxElements;
int32 NumElements;
int32 MaxChunks;
int32 NumChunks;
public:
// Call InitGObjects() before using these functions
inline int32 Num() const
{
return NumElements;
}
inline FUObjectItem** GetDecrytedObjPtr() const
{
return reinterpret_cast<FUObjectItem**>(DecryptPtr(Objects));
}
inline class UObject* GetByIndex(const int32 Index) const
{
if (Index < 0 || Index > NumElements)
return nullptr;
const int32 ChunkIndex = Index / ElementsPerChunk;
const int32 InChunkIdx = Index % ElementsPerChunk;
return GetDecrytedObjPtr()[ChunkIndex][InChunkIdx].Object;
}
};
class TUObjectArray
{
private:
static inline auto DecryptPtr = [](void* ObjPtr) -> uint8*
{
return reinterpret_cast<uint8*>(ObjPtr);
};
public:
FUObjectItem* Objects;
int32 MaxElements;
int32 NumElements;
public:
inline int Num() const
{
return NumElements;
}
inline FUObjectItem* GetDecrytedObjPtr() const
{
return reinterpret_cast<FUObjectItem*>(DecryptPtr(Objects));
}
inline class UObject* GetByIndex(const int32 Index) const
{
if (Index < 0 || Index > NumElements)
return nullptr;
return GetDecrytedObjPtr()[Index].Object;
}
};
class TUObjectArrayWrapper
{
private:
friend class UObject;
public:
void* GObjectsAddress = nullptr;
private:
TUObjectArrayWrapper() = default;
public:
TUObjectArrayWrapper(TUObjectArrayWrapper&&) = delete;
TUObjectArrayWrapper(const TUObjectArrayWrapper&) = delete;
TUObjectArrayWrapper& operator=(TUObjectArrayWrapper&&) = delete;
TUObjectArrayWrapper& operator=(const TUObjectArrayWrapper&) = delete;
public:
inline void InitGObjects()
{
}
public:
inline class TUObjectArray* operator->()
{
if (!GObjectsAddress) [[unlikely]]
InitGObjects();
return reinterpret_cast<class TUObjectArray*>(GObjectsAddress);
}
inline operator const void* ()
{
if (!GObjectsAddress) [[unlikely]]
InitGObjects();
return GObjectsAddress;
}
inline class TUObjectArray* GetTypedPtr()
{
if (!GObjectsAddress) [[unlikely]]
InitGObjects();
return reinterpret_cast<class TUObjectArray*>(GObjectsAddress);
}
};
class FName final
{
public:
static inline void* AppendString = nullptr;
int32 ComparisonIndex;
int32 Number;
public:
static void InitInternal()
{
AppendString = reinterpret_cast<void*>((uintptr_t)GetModuleHandle(0) + Offsets::AppendString);
}
int32 GetDisplayIndex() const
{
return ComparisonIndex;
}
std::string GetRawString() const
{
thread_local FAllocatedString TempString(1024);
if (!AppendString)
InitInternal();
InSDKUtils::CallGameFunction(reinterpret_cast<void(*)(const FName*, FString&)>(AppendString), this, TempString);
std::string OutputString = TempString.ToString();
TempString.Clear();
return OutputString;
}
std::string ToString() const
{
std::string OutputString = GetRawString();
size_t pos = OutputString.rfind('/');
if (pos == std::string::npos)
return OutputString;
return OutputString.substr(pos + 1);
}
bool operator==(const FName& Other) const
{
return ComparisonIndex == Other.ComparisonIndex && Number == Other.Number;
}
bool operator!=(const FName& Other) const
{
return ComparisonIndex != Other.ComparisonIndex || Number != Other.Number;
}
};
template<typename ClassType>
class TSubclassOf
{
class UClass* ClassPtr;
public:
TSubclassOf() = default;
inline TSubclassOf(UClass* Class)
: ClassPtr(Class)
{
}
inline UClass* Get()
{
return ClassPtr;
}
inline operator UClass* () const
{
return ClassPtr;
}
template<typename Target, typename = std::enable_if<std::is_base_of_v<Target, ClassType>, bool>::type>
inline operator TSubclassOf<Target>() const
{
return ClassPtr;
}
inline UClass* operator->()
{
return ClassPtr;
}
inline TSubclassOf& operator=(UClass* Class)
{
ClassPtr = Class;
return *this;
}
inline bool operator==(const TSubclassOf& Other) const
{
return ClassPtr == Other.ClassPtr;
}
inline bool operator!=(const TSubclassOf& Other) const
{
return ClassPtr != Other.ClassPtr;
}
inline bool operator==(UClass* Other) const
{
return ClassPtr == Other;
}
inline bool operator!=(UClass* Other) const
{
return ClassPtr != Other;
}
};
class FTextData final
{
public:
uint8 Pad_1[0x28];
class FString TextSource;
};
static_assert(alignof(FTextData) == 0x000008, "Wrong alignment on FTextData");
static_assert(sizeof(FTextData) == 0x000038, "Wrong size on FTextData");
static_assert(offsetof(FTextData, TextSource) == 0x000028, "Member 'FTextData::TextSource' has a wrong offset!");
class FText final
{
public:
class FTextData* TextData;
uint8 Pad_2[0x10];
public:
const class FString& GetStringRef() const
{
return TextData->TextSource;
}
std::string ToString() const
{
return TextData->TextSource.ToString();
}
};
static_assert(alignof(FText) == 0x000008, "Wrong alignment on FText");
static_assert(sizeof(FText) == 0x000018, "Wrong size on FText");
static_assert(offsetof(FText, TextData) == 0x000000, "Member 'FText::TextData' has a wrong offset!");
class FWeakObjectPtr
{
public:
int32 ObjectIndex;
int32 ObjectSerialNumber;
public:
class UObject* Get() const;
class UObject* operator->() const;
bool operator==(const FWeakObjectPtr& Other) const;
bool operator!=(const FWeakObjectPtr& Other) const;
bool operator==(const class UObject* Other) const;
bool operator!=(const class UObject* Other) const;
};
static_assert(alignof(FWeakObjectPtr) == 0x000004, "Wrong alignment on FWeakObjectPtr");
static_assert(sizeof(FWeakObjectPtr) == 0x000008, "Wrong size on FWeakObjectPtr");
static_assert(offsetof(FWeakObjectPtr, ObjectIndex) == 0x000000, "Member 'FWeakObjectPtr::ObjectIndex' has a wrong offset!");
static_assert(offsetof(FWeakObjectPtr, ObjectSerialNumber) == 0x000004, "Member 'FWeakObjectPtr::ObjectSerialNumber' has a wrong offset!");
template<typename UEType>
class TWeakObjectPtr : public FWeakObjectPtr
{
public:
UEType* Get() const
{
return static_cast<UEType*>(FWeakObjectPtr::Get());
}
UEType* operator->() const
{
return static_cast<UEType*>(FWeakObjectPtr::Get());
}
};
class FUniqueObjectGuid final
{
public:
uint32 A;
uint32 B;
uint32 C;
uint32 D;
};
static_assert(alignof(FUniqueObjectGuid) == 0x000004, "Wrong alignment on FUniqueObjectGuid");
static_assert(sizeof(FUniqueObjectGuid) == 0x000010, "Wrong size on FUniqueObjectGuid");
static_assert(offsetof(FUniqueObjectGuid, A) == 0x000000, "Member 'FUniqueObjectGuid::A' has a wrong offset!");
static_assert(offsetof(FUniqueObjectGuid, B) == 0x000004, "Member 'FUniqueObjectGuid::B' has a wrong offset!");
static_assert(offsetof(FUniqueObjectGuid, C) == 0x000008, "Member 'FUniqueObjectGuid::C' has a wrong offset!");
static_assert(offsetof(FUniqueObjectGuid, D) == 0x00000C, "Member 'FUniqueObjectGuid::D' has a wrong offset!");
template<typename TObjectID>
class TPersistentObjectPtr
{
public:
FWeakObjectPtr WeakPtr;
int32 TagAtLastTest;
TObjectID ObjectID;
public:
class UObject* Get() const
{
return WeakPtr.Get();
}
class UObject* operator->() const
{
return WeakPtr.Get();
}
};
template<typename UEType>
class TLazyObjectPtr : public TPersistentObjectPtr<FUniqueObjectGuid>
{
public:
UEType* Get() const
{
return static_cast<UEType*>(TPersistentObjectPtr::Get());
}
UEType* operator->() const
{
return static_cast<UEType*>(TPersistentObjectPtr::Get());
}
};
namespace FakeSoftObjectPtr
{
struct FSoftObjectPath
{
public:
class FName AssetPathName;
class FString SubPathString;
};
static_assert(alignof(FSoftObjectPath) == 0x000008, "Wrong alignment on FSoftObjectPath");
static_assert(sizeof(FSoftObjectPath) == 0x000018, "Wrong size on FSoftObjectPath");
static_assert(offsetof(FSoftObjectPath, AssetPathName) == 0x000000, "Member 'FSoftObjectPath::AssetPathName' has a wrong offset!");
static_assert(offsetof(FSoftObjectPath, SubPathString) == 0x000008, "Member 'FSoftObjectPath::SubPathString' has a wrong offset!");
}
class FSoftObjectPtr : public TPersistentObjectPtr<FakeSoftObjectPtr::FSoftObjectPath>
{
};
template<typename UEType>
class TSoftObjectPtr : public FSoftObjectPtr
{
public:
UEType* Get() const
{
return static_cast<UEType*>(TPersistentObjectPtr::Get());
}
UEType* operator->() const
{
return static_cast<UEType*>(TPersistentObjectPtr::Get());
}
};
template<typename UEType>
class TSoftClassPtr : public FSoftObjectPtr
{
public:
UEType* Get() const
{
return static_cast<UEType*>(TPersistentObjectPtr::Get());
}
UEType* operator->() const
{
return static_cast<UEType*>(TPersistentObjectPtr::Get());
}
};
class FScriptInterface
{
public:
UObject* ObjectPointer;
void* InterfacePointer;
public:
class UObject* GetObjectRef() const
{
return ObjectPointer;
}
void* GetInterfaceRef() const
{
return InterfacePointer;
}
};
static_assert(alignof(FScriptInterface) == 0x000008, "Wrong alignment on FScriptInterface");
static_assert(sizeof(FScriptInterface) == 0x000010, "Wrong size on FScriptInterface");
static_assert(offsetof(FScriptInterface, ObjectPointer) == 0x000000, "Member 'FScriptInterface::ObjectPointer' has a wrong offset!");
static_assert(offsetof(FScriptInterface, InterfacePointer) == 0x000008, "Member 'FScriptInterface::InterfacePointer' has a wrong offset!");
template<class InterfaceType>
class TScriptInterface final : public FScriptInterface
{
};
template<typename FunctionSignature>
class TDelegate
{
public:
struct InvalidUseOfTDelegate TemplateParamIsNotAFunctionSignature;
};
template<typename Ret, typename... Args>
class TDelegate<Ret(Args...)>
{
public:
FWeakObjectPtr Object;
FName FunctionName;
};
#define UE_ENUM_OPERATORS(EEnumClass) \
\
inline constexpr EEnumClass operator|(EEnumClass Left, EEnumClass Right) \
{ \
return (EEnumClass)((std::underlying_type<EEnumClass>::type)(Left) | (std::underlying_type<EEnumClass>::type)(Right)); \
} \
\
inline constexpr EEnumClass& operator|=(EEnumClass& Left, EEnumClass Right) \
{ \
return (EEnumClass&)((std::underlying_type<EEnumClass>::type&)(Left) |= (std::underlying_type<EEnumClass>::type)(Right)); \
} \
\
inline bool operator&(EEnumClass Left, EEnumClass Right) \
{ \
return (((std::underlying_type<EEnumClass>::type)(Left) & (std::underlying_type<EEnumClass>::type)(Right)) == (std::underlying_type<EEnumClass>::type)(Right)); \
}
enum class EObjectFlags : int32
{
NoFlags = 0x00000000,
Public = 0x00000001,
Standalone = 0x00000002,
MarkAsNative = 0x00000004,
Transactional = 0x00000008,
ClassDefaultObject = 0x00000010,
ArchetypeObject = 0x00000020,
Transient = 0x00000040,
MarkAsRootSet = 0x00000080,
TagGarbageTemp = 0x00000100,
NeedInitialization = 0x00000200,
NeedLoad = 0x00000400,
KeepForCooker = 0x00000800,
NeedPostLoad = 0x00001000,
NeedPostLoadSubobjects = 0x00002000,
NewerVersionExists = 0x00004000,
BeginDestroyed = 0x00008000,
FinishDestroyed = 0x00010000,
BeingRegenerated = 0x00020000,
DefaultSubObject = 0x00040000,
WasLoaded = 0x00080000,
TextExportTransient = 0x00100000,
LoadCompleted = 0x00200000,
InheritableComponentTemplate = 0x00400000,
DuplicateTransient = 0x00800000,
StrongRefOnFrame = 0x01000000,
NonPIEDuplicateTransient = 0x02000000,
Dynamic = 0x04000000,
WillBeLoaded = 0x08000000,
};
enum class EFunctionFlags : uint32
{
None = 0x00000000,
Final = 0x00000001,
RequiredAPI = 0x00000002,
BlueprintAuthorityOnly = 0x00000004,
BlueprintCosmetic = 0x00000008,
Net = 0x00000040,
NetReliable = 0x00000080,
NetRequest = 0x00000100,
Exec = 0x00000200,
Native = 0x00000400,
Event = 0x00000800,
NetResponse = 0x00001000,
Static = 0x00002000,
NetMulticast = 0x00004000,
UbergraphFunction = 0x00008000,
MulticastDelegate = 0x00010000,
Public = 0x00020000,
Private = 0x00040000,
Protected = 0x00080000,
Delegate = 0x00100000,
NetServer = 0x00200000,
HasOutParms = 0x00400000,
HasDefaults = 0x00800000,
NetClient = 0x01000000,
DLLImport = 0x02000000,
BlueprintCallable = 0x04000000,
BlueprintEvent = 0x08000000,
BlueprintPure = 0x10000000,
EditorOnly = 0x20000000,
Const = 0x40000000,
NetValidate = 0x80000000,
AllFlags = 0xFFFFFFFF,
};
enum class EClassFlags : int32
{
CLASS_None = 0x00000000u,
Abstract = 0x00000001u,
DefaultConfig = 0x00000002u,
Config = 0x00000004u,
Transient = 0x00000008u,
Parsed = 0x00000010u,
MatchedSerializers = 0x00000020u,
ProjectUserConfig = 0x00000040u,
Native = 0x00000080u,
NoExport = 0x00000100u,
NotPlaceable = 0x00000200u,
PerObjectConfig = 0x00000400u,
ReplicationDataIsSetUp = 0x00000800u,
EditInlineNew = 0x00001000u,
CollapseCategories = 0x00002000u,
Interface = 0x00004000u,
CustomConstructor = 0x00008000u,
Const = 0x00010000u,
LayoutChanging = 0x00020000u,
CompiledFromBlueprint = 0x00040000u,
MinimalAPI = 0x00080000u,
RequiredAPI = 0x00100000u,
DefaultToInstanced = 0x00200000u,
TokenStreamAssembled = 0x00400000u,
HasInstancedReference = 0x00800000u,
Hidden = 0x01000000u,
Deprecated = 0x02000000u,
HideDropDown = 0x04000000u,
GlobalUserConfig = 0x08000000u,
Intrinsic = 0x10000000u,
Constructed = 0x20000000u,
ConfigDoNotCheckDefaults = 0x40000000u,
NewerVersionExists = 0x80000000u,
};
enum class EClassCastFlags : uint64
{
None = 0x0000000000000000,
Field = 0x0000000000000001,
Int8Property = 0x0000000000000002,
Enum = 0x0000000000000004,
Struct = 0x0000000000000008,
ScriptStruct = 0x0000000000000010,
Class = 0x0000000000000020,
ByteProperty = 0x0000000000000040,
IntProperty = 0x0000000000000080,
FloatProperty = 0x0000000000000100,
UInt64Property = 0x0000000000000200,
ClassProperty = 0x0000000000000400,
UInt32Property = 0x0000000000000800,
InterfaceProperty = 0x0000000000001000,
NameProperty = 0x0000000000002000,
StrProperty = 0x0000000000004000,
Property = 0x0000000000008000,
ObjectProperty = 0x0000000000010000,
BoolProperty = 0x0000000000020000,
UInt16Property = 0x0000000000040000,
Function = 0x0000000000080000,
StructProperty = 0x0000000000100000,
ArrayProperty = 0x0000000000200000,
Int64Property = 0x0000000000400000,
DelegateProperty = 0x0000000000800000,
NumericProperty = 0x0000000001000000,
MulticastDelegateProperty = 0x0000000002000000,
ObjectPropertyBase = 0x0000000004000000,
WeakObjectProperty = 0x0000000008000000,
LazyObjectProperty = 0x0000000010000000,
SoftObjectProperty = 0x0000000020000000,
TextProperty = 0x0000000040000000,
Int16Property = 0x0000000080000000,
DoubleProperty = 0x0000000100000000,
SoftClassProperty = 0x0000000200000000,
Package = 0x0000000400000000,
Level = 0x0000000800000000,
Actor = 0x0000001000000000,
PlayerController = 0x0000002000000000,
Pawn = 0x0000004000000000,
SceneComponent = 0x0000008000000000,
PrimitiveComponent = 0x0000010000000000,
SkinnedMeshComponent = 0x0000020000000000,
SkeletalMeshComponent = 0x0000040000000000,
Blueprint = 0x0000080000000000,
DelegateFunction = 0x0000100000000000,
StaticMeshComponent = 0x0000200000000000,
MapProperty = 0x0000400000000000,
SetProperty = 0x0000800000000000,
EnumProperty = 0x0001000000000000,
USparseDelegateFunction = 0x0002000000000000,
FMulticastInlineDelegateProperty = 0x0004000000000000,
FMulticastSparseDelegateProperty = 0x0008000000000000,
FFieldPathProperty = 0x0010000000000000,
FLargeWorldCoordinatesRealProperty = 0x0080000000000000,
FOptionalProperty = 0x0100000000000000,
FVValueProperty = 0x0200000000000000,
UVerseVMClass = 0x0400000000000000,
FVRestValueProperty = 0x0800000000000000,
};
enum class EPropertyFlags : uint64
{
None = 0x0000000000000000,
Edit = 0x0000000000000001,
ConstParm = 0x0000000000000002,
BlueprintVisible = 0x0000000000000004,
ExportObject = 0x0000000000000008,
BlueprintReadOnly = 0x0000000000000010,
Net = 0x0000000000000020,
EditFixedSize = 0x0000000000000040,
Parm = 0x0000000000000080,
OutParm = 0x0000000000000100,
ZeroConstructor = 0x0000000000000200,
ReturnParm = 0x0000000000000400,
DisableEditOnTemplate = 0x0000000000000800,
Transient = 0x0000000000002000,
Config = 0x0000000000004000,
DisableEditOnInstance = 0x0000000000010000,
EditConst = 0x0000000000020000,
GlobalConfig = 0x0000000000040000,
InstancedReference = 0x0000000000080000,
DuplicateTransient = 0x0000000000200000,
SubobjectReference = 0x0000000000400000,
SaveGame = 0x0000000001000000,
NoClear = 0x0000000002000000,
ReferenceParm = 0x0000000008000000,
BlueprintAssignable = 0x0000000010000000,
Deprecated = 0x0000000020000000,
IsPlainOldData = 0x0000000040000000,
RepSkip = 0x0000000080000000,
RepNotify = 0x0000000100000000,
Interp = 0x0000000200000000,
NonTransactional = 0x0000000400000000,
EditorOnly = 0x0000000800000000,
NoDestructor = 0x0000001000000000,
AutoWeak = 0x0000004000000000,
ContainsInstancedReference = 0x0000008000000000,
AssetRegistrySearchable = 0x0000010000000000,
SimpleDisplay = 0x0000020000000000,
AdvancedDisplay = 0x0000040000000000,
Protected = 0x0000080000000000,
BlueprintCallable = 0x0000100000000000,
BlueprintAuthorityOnly = 0x0000200000000000,
TextExportTransient = 0x0000400000000000,
NonPIEDuplicateTransient = 0x0000800000000000,
ExposeOnSpawn = 0x0001000000000000,
PersistentInstance = 0x0002000000000000,
UObjectWrapper = 0x0004000000000000,
HasGetValueTypeHash = 0x0008000000000000,
NativeAccessSpecifierPublic = 0x0010000000000000,
NativeAccessSpecifierProtected = 0x0020000000000000,
NativeAccessSpecifierPrivate = 0x0040000000000000,
SkipSerialization = 0x0080000000000000,
};
UE_ENUM_OPERATORS(EObjectFlags);
UE_ENUM_OPERATORS(EFunctionFlags);
UE_ENUM_OPERATORS(EClassFlags);
UE_ENUM_OPERATORS(EClassCastFlags);
UE_ENUM_OPERATORS(EPropertyFlags);
namespace CyclicDependencyFixupImpl
{
template<typename UnderlayingStructType, int32 Size, int32 Align>
struct alignas(Align) TCylicStructFixup
{
private:
uint8 Pad[Size];
public:
UnderlayingStructType& GetTyped() { return reinterpret_cast<UnderlayingStructType&>(*this); }
const UnderlayingStructType& GetTyped() const { return reinterpret_cast<const UnderlayingStructType&>(*this); }
};
template<typename UnderlayingClassType, int32 Size, int32 Align = 0x8, class BaseClassType = class UObject>
struct alignas(Align) TCyclicClassFixup : public BaseClassType
{
private:
uint8 Pad[Size];
public:
UnderlayingClassType* GetTyped() { return reinterpret_cast<UnderlayingClassType*>(this); }
const UnderlayingClassType* GetTyped() const { return reinterpret_cast<const UnderlayingClassType*>(this); }
};
}
}
+19 -100
View File
@@ -1,119 +1,38 @@
#include <Windows.h>
#include <iostream>
#include <d3d11.h>
#include <dxgi.h>
#include "Hooks.hpp"
#include "GuiManager.hpp"
#include "ThirdParty/imgui/imgui.h"
#include "ThirdParty/imgui/imgui_impl_win32.h"
#include "ThirdParty/imgui/imgui_impl_dx11.h"
// dllmain.cpp : Defines the entry point for the DLL application.
#include "framework.h"
// Forward declare message handler from imgui_impl_win32.cpp
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
// DirectX data
ID3D11Device* g_pd3dDevice = nullptr;
ID3D11DeviceContext* g_pd3dDeviceContext = nullptr;
IDXGISwapChain* g_pSwapChain = nullptr;
ID3D11RenderTargetView* g_mainRenderTargetView = nullptr;
void CreateRenderTarget() {
ID3D11Texture2D* pBackBuffer;
g_pSwapChain->GetBuffer(0, IID_PPV_ARGS(&pBackBuffer));
g_pd3dDevice->CreateRenderTargetView(pBackBuffer, nullptr, &g_mainRenderTargetView);
pBackBuffer->Release();
}
void CleanupRenderTarget() {
if (g_mainRenderTargetView) {
g_mainRenderTargetView->Release();
g_mainRenderTargetView = nullptr;
}
}
bool CreateDeviceD3D(HWND hWnd) {
// Setup swap chain
DXGI_SWAP_CHAIN_DESC sd;
ZeroMemory(&sd, sizeof(sd));
sd.BufferCount = 1;
sd.BufferDesc.Width = 0;
sd.BufferDesc.Height = 0;
sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
sd.BufferDesc.RefreshRate.Numerator = 60;
sd.BufferDesc.RefreshRate.Denominator = 1;
sd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
sd.OutputWindow = hWnd;
sd.SampleDesc.Count = 1;
sd.SampleDesc.Quality = 0;
sd.Windowed = TRUE;
sd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
UINT createDeviceFlags = 0;
D3D_FEATURE_LEVEL featureLevel;
const D3D_FEATURE_LEVEL featureLevelArray[2] = { D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_0, };
if (D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, createDeviceFlags, featureLevelArray, 2,
D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &featureLevel, &g_pd3dDeviceContext) != S_OK)
return false;
CreateRenderTarget();
return true;
}
void CleanupDeviceD3D() {
CleanupRenderTarget();
if (g_pSwapChain) { g_pSwapChain->Release(); g_pSwapChain = nullptr; }
if (g_pd3dDeviceContext) { g_pd3dDeviceContext->Release(); g_pd3dDeviceContext = nullptr; }
if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = nullptr; }
}
LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam))
return true;
return DefWindowProc(hWnd, msg, wParam, lParam);
}
// Function to allocate console for debug output
void AllocateConsole() {
if (AllocConsole()) {
FILE* fp;
freopen_s(&fp, "CONOUT$", "w", stdout);
freopen_s(&fp, "CONOUT$", "w", stderr);
std::cout << "Console allocated" << std::endl;
}
else {
std::cerr << "Failed to allocate console" << std::endl;
}
}
// DLL entry point
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
static HWND hwnd = nullptr; // Declare hwnd outside the switch statement
void Welcome()
{
AllocateConsole();
ShowConsole();
}
switch (ul_reason_for_call) {
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
AllocateConsole();
std::cout << "DLL_PROCESS_ATTACH called" << std::endl;
SetupHooks();
std::cout << "SetupHooks called" << std::endl;
// Initialize DirectX
hwnd = GetForegroundWindow();
if (!CreateDeviceD3D(hwnd)) {
CleanupDeviceD3D();
return FALSE;
}
GuiManager::SetupGui();
std::cout << "GuiManager::SetupGui called" << std::endl;
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
RemoveHooks();
std::cout << "RemoveHooks called" << std::endl;
// Cleanup DirectX
CleanupDeviceD3D();
break;
}
return TRUE;
}
}
+7 -5
View File
@@ -1,8 +1,10 @@
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files
#include <windows.h>
#include <vector>
#include "string"
#include <Windows.h>
#include <iostream>
#include <format>
// UE4
#include "SDK/SDK/Engine_classes.hpp"
#include "globals.h"
#include "Engine.h"
+8
View File
@@ -0,0 +1,8 @@
#pragma once
#include "framework.h"
SDK::UEngine* Engine = SDK::UEngine::GetEngine();
SDK::UWorld* World = SDK::UWorld::GetWorld();
SDK::APlayerController* AF4PlayerController = World->OwningGameInstance->LocalPlayers[0]->PlayerController;
SDK::ULevel* Level = World->PersistentLevel;
SDK::TArray<SDK::AActor*>& Actors = Level->Actors;