mirror of
https://github.com/EricPlayZ/EGameTools.git
synced 2025-07-18 17:37:53 +08:00
backup of massive SDK changes incoming!
This commit is contained in:
13
EGameSDK.sln
13
EGameSDK.sln
@ -9,9 +9,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EGameTools", "EGameTools\EG
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EGameSDK", "EGameSDK\EGameSDK.vcxproj", "{152BCFEC-E42D-4370-AEDD-36F044085C0C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{43D9B339-9A92-4D78-BD8E-5026ABFC8604} = {43D9B339-9A92-4D78-BD8E-5026ABFC8604}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ultimate-ASI-Loader-x64", "Ultimate-ASI-Loader-x64\Ultimate-ASI-Loader-x64.vcxproj", "{47F0BD81-B327-0619-BC31-6A3C28E82C12}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "engine_x64_rwdi", "EGameSDK\proxies\engine_x64_rwdi\engine_x64_rwdi.vcxproj", "{43D9B339-9A92-4D78-BD8E-5026ABFC8604}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
@ -44,6 +49,14 @@ Global
|
||||
{47F0BD81-B327-0619-BC31-6A3C28E82C12}.Release|x64.Build.0 = Release|x64
|
||||
{47F0BD81-B327-0619-BC31-6A3C28E82C12}.Release|x86.ActiveCfg = Release|x64
|
||||
{47F0BD81-B327-0619-BC31-6A3C28E82C12}.Release|x86.Build.0 = Release|x64
|
||||
{43D9B339-9A92-4D78-BD8E-5026ABFC8604}.Debug|x64.ActiveCfg = Debug_Release|x64
|
||||
{43D9B339-9A92-4D78-BD8E-5026ABFC8604}.Debug|x64.Build.0 = Debug_Release|x64
|
||||
{43D9B339-9A92-4D78-BD8E-5026ABFC8604}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{43D9B339-9A92-4D78-BD8E-5026ABFC8604}.Debug|x86.Build.0 = Debug|Win32
|
||||
{43D9B339-9A92-4D78-BD8E-5026ABFC8604}.Release|x64.ActiveCfg = Release|x64
|
||||
{43D9B339-9A92-4D78-BD8E-5026ABFC8604}.Release|x64.Build.0 = Release|x64
|
||||
{43D9B339-9A92-4D78-BD8E-5026ABFC8604}.Release|x86.ActiveCfg = Release|Win32
|
||||
{43D9B339-9A92-4D78-BD8E-5026ABFC8604}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -89,10 +89,12 @@
|
||||
<ClInclude Include="include\EGSDK\Engine\IBaseCamera.h" />
|
||||
<ClInclude Include="include\EGSDK\Engine\IControlObject.h" />
|
||||
<ClInclude Include="include\EGSDK\Engine\IGSObject.h" />
|
||||
<ClInclude Include="include\EGSDK\Engine\IModelObject.h" />
|
||||
<ClInclude Include="include\EGSDK\Engine\IPhysicsCharacter.h" />
|
||||
<ClInclude Include="include\EGSDK\Engine\CVars.h" />
|
||||
<ClInclude Include="include\EGSDK\Engine\CVideoSettings.h" />
|
||||
<ClInclude Include="include\EGSDK\Engine\Engine_Misc.h" />
|
||||
<ClInclude Include="include\EGSDK\Engine\ttl.h" />
|
||||
<ClInclude Include="include\EGSDK\Engine\VarBase.h" />
|
||||
<ClInclude Include="include\EGSDK\Engine\VarManagerBase.h" />
|
||||
<ClInclude Include="include\EGSDK\Engine\VarMapBase.h" />
|
||||
@ -125,7 +127,7 @@
|
||||
<ClInclude Include="include\EGSDK\GamePH\TimeWeather\EWeather.h" />
|
||||
<ClInclude Include="include\EGSDK\GamePH\TimeWeather\ISubsystem.h" />
|
||||
<ClInclude Include="include\EGSDK\GamePH\TPPCameraDI.h" />
|
||||
<ClInclude Include="include\EGSDK\Mtx34.h" />
|
||||
<ClInclude Include="include\EGSDK\mtx34.h" />
|
||||
<ClInclude Include="include\EGSDK\Offsets.h" />
|
||||
<ClInclude Include="include\EGSDK\Utils\Files.h" />
|
||||
<ClInclude Include="include\EGSDK\Utils\Hook.h" />
|
||||
@ -135,9 +137,9 @@
|
||||
<ClInclude Include="include\EGSDK\Utils\Time.h" />
|
||||
<ClInclude Include="include\EGSDK\Utils\Values.h" />
|
||||
<ClInclude Include="include\EGSDK\Utils\WinMemory.h" />
|
||||
<ClInclude Include="include\EGSDK\Vec2.h" />
|
||||
<ClInclude Include="include\EGSDK\Vec3.h" />
|
||||
<ClInclude Include="include\EGSDK\Vec4.h" />
|
||||
<ClInclude Include="include\EGSDK\vec2.h" />
|
||||
<ClInclude Include="include\EGSDK\vec3.h" />
|
||||
<ClInclude Include="include\EGSDK\vec4.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
@ -221,12 +223,12 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>DebugFastLink</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<AdditionalDependencies>DbgHelp.lib;Version.lib;libMinHook-x64-v141-mdd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>DbgHelp.lib;Version.lib;libMinHook-x64-v141-mdd.lib;engine_x64_rwdi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OptimizeReferences>
|
||||
</OptimizeReferences>
|
||||
<EnableCOMDATFolding>
|
||||
</EnableCOMDATFolding>
|
||||
<AdditionalLibraryDirectories>deps\MinHook\lib;</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>deps\MinHook\lib;..\$(PlatformShortName)\$(Configuration);</AdditionalLibraryDirectories>
|
||||
<AssemblyDebug>true</AssemblyDebug>
|
||||
<ImportLibrary />
|
||||
<FixedBaseAddress>
|
||||
@ -257,8 +259,8 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<AdditionalLibraryDirectories>deps\MinHook\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>DbgHelp.lib;Version.lib;libMinHook-x64-v141-mdd.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>deps\MinHook\lib;..\$(PlatformShortName)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>DbgHelp.lib;Version.lib;libMinHook-x64-v141-mdd.lib;engine_x64_rwdi.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ImportLibrary />
|
||||
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||
<AssemblyDebug>true</AssemblyDebug>
|
||||
|
@ -236,7 +236,7 @@
|
||||
<ClInclude Include="include\EGSDK\Offsets.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\EGSDK\Vec3.h">
|
||||
<ClInclude Include="include\EGSDK\vec3.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\EGSDK\Utils\Hook.h">
|
||||
@ -392,10 +392,10 @@
|
||||
<ClInclude Include="include\EGSDK\GamePH\TimeWeather\ISubsystem.h">
|
||||
<Filter>include\GamePH\TimeWeather</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\EGSDK\Mtx34.h">
|
||||
<ClInclude Include="include\EGSDK\mtx34.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\EGSDK\Vec4.h">
|
||||
<ClInclude Include="include\EGSDK\vec4.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\EGSDK\Engine\IControlObject.h">
|
||||
@ -410,7 +410,7 @@
|
||||
<ClInclude Include="include\EGSDK\GamePH\PlayerFppVis_PH.h">
|
||||
<Filter>include\GamePH</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\EGSDK\Vec2.h">
|
||||
<ClInclude Include="include\EGSDK\vec2.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\EGSDK\Engine\VarMapBase.h">
|
||||
@ -425,5 +425,11 @@
|
||||
<ClInclude Include="include\EGSDK\Engine\VarRef.h">
|
||||
<Filter>include\Engine</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\EGSDK\Engine\IModelObject.h">
|
||||
<Filter>include\Engine</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\EGSDK\Engine\ttl.h">
|
||||
<Filter>include\Engine</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <EGSDK\Vec3.h>
|
||||
#include <EGSDK\vec3.h>
|
||||
#include <EGSDK\Engine\IPhysicsCharacter.h>
|
||||
#include <EGSDK\ClassHelpers.h>
|
||||
|
||||
@ -7,15 +7,15 @@ namespace EGSDK::Engine {
|
||||
class EGameSDK_API CBulletPhysicsCharacter : IPhysicsCharacter {
|
||||
public:
|
||||
union {
|
||||
DynamicField(CBulletPhysicsCharacter, Vec3, playerPos);
|
||||
DynamicField(CBulletPhysicsCharacter, Vec3, playerPos2);
|
||||
DynamicField(CBulletPhysicsCharacter, vec3, playerPos);
|
||||
DynamicField(CBulletPhysicsCharacter, vec3, playerPos2);
|
||||
DynamicField(CBulletPhysicsCharacter, float, playerDownwardVelocity);
|
||||
};
|
||||
|
||||
static Vec3 posBeforeFreeze;
|
||||
static vec3 posBeforeFreeze;
|
||||
|
||||
void FreezeCharacter();
|
||||
void MoveCharacter(const Vec3& pos);
|
||||
void MoveCharacter(const vec3& pos);
|
||||
|
||||
static CBulletPhysicsCharacter* Get();
|
||||
};
|
||||
|
@ -10,10 +10,10 @@ namespace EGSDK::Engine {
|
||||
union {
|
||||
ClassHelpers::StaticBuffer<0x50, uint32_t> valueOffset;
|
||||
};
|
||||
explicit CVar(const std::string& name);
|
||||
explicit CVar(const std::string& name, VarType type);
|
||||
explicit CVar(std::string_view name);
|
||||
explicit CVar(std::string_view name, VarType type);
|
||||
|
||||
VarValueType& GetValue();
|
||||
VarValueType GetValue();
|
||||
void SetValue(const VarValueType& value);
|
||||
void AddValuePtr(uint64_t* ptr);
|
||||
private:
|
||||
@ -26,19 +26,19 @@ namespace EGSDK::Engine {
|
||||
|
||||
class EGameSDK_API FloatCVar : public CVar {
|
||||
public:
|
||||
explicit FloatCVar(const std::string& name);
|
||||
explicit FloatCVar(std::string_view name);
|
||||
};
|
||||
class EGameSDK_API IntCVar : public CVar {
|
||||
public:
|
||||
explicit IntCVar(const std::string& name);
|
||||
explicit IntCVar(std::string_view name);
|
||||
};
|
||||
class EGameSDK_API Vec3CVar : public CVar {
|
||||
public:
|
||||
explicit Vec3CVar(const std::string& name);
|
||||
explicit Vec3CVar(std::string_view name);
|
||||
};
|
||||
class EGameSDK_API Vec4CVar : public CVar {
|
||||
public:
|
||||
explicit Vec4CVar(const std::string& name);
|
||||
explicit Vec4CVar(std::string_view name);
|
||||
};
|
||||
|
||||
class EGameSDK_API CVarMap : public VarMapBase<CVar> {
|
||||
|
@ -1,23 +1,23 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include <EGSDK\Mtx34.h>
|
||||
#include <EGSDK\mtx34.h>
|
||||
|
||||
namespace EGSDK::Engine {
|
||||
class EGameSDK_API IBaseCamera {
|
||||
public:
|
||||
float GetFOV();
|
||||
Vec3* GetForwardVector(Vec3* outForwardVec);
|
||||
Vec3* GetUpVector(Vec3* outUpVec);
|
||||
Vec3* GetLeftVector(Vec3* outLeftVec);
|
||||
Vec3* GetPosition(Vec3* outPos);
|
||||
Mtx34* GetViewMatrix();
|
||||
Mtx34* GetInvCameraMatrix();
|
||||
vec3* GetForwardVector(vec3* outForwardVec);
|
||||
vec3* GetUpVector(vec3* outUpVec);
|
||||
vec3* GetLeftVector(vec3* outLeftVec);
|
||||
vec3* GetPosition(vec3* outPos);
|
||||
mtx34* GetViewMatrix();
|
||||
mtx34* GetInvCameraMatrix();
|
||||
|
||||
void Rotate(float angle, const Vec3* axis);
|
||||
void Rotate(float angle, const vec3* axis);
|
||||
void SetFOV(float fov);
|
||||
void SetPosition(const Vec3* pos);
|
||||
void SetCameraMatrix(const Mtx34* mtx);
|
||||
void SetInvCameraMatrix(const Mtx34* mtx);
|
||||
void SetPosition(const vec3* pos);
|
||||
void SetCameraMatrix(const mtx34* mtx);
|
||||
void SetInvCameraMatrix(const mtx34* mtx);
|
||||
|
||||
static bool isSetFOVCalledByEGSDK;
|
||||
};
|
||||
|
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
#include <EGSDK\Vec3.h>
|
||||
#include <EGSDK\vec3.h>
|
||||
|
||||
namespace EGSDK::Engine {
|
||||
class EGameSDK_API IControlObject {
|
||||
public:
|
||||
void SetLocalDir(const Vec3* dir);
|
||||
void SetLocalDir(const vec3* dir);
|
||||
};
|
||||
}
|
260
EGameSDK/include/EGSDK/Engine/IModelObject.h
Normal file
260
EGameSDK/include/EGSDK/Engine/IModelObject.h
Normal file
@ -0,0 +1,260 @@
|
||||
#pragma once
|
||||
#include <EGSDK\Engine\ttl.h>
|
||||
#include <EGSDK\vec3.h>
|
||||
#include <EGSDK\vec4.h>
|
||||
#include <EGSDK\mtx34.h>
|
||||
|
||||
namespace EGSDK {
|
||||
namespace Engine {
|
||||
namespace Audio {
|
||||
struct SAudioEventExtraData;
|
||||
struct SAudioEventExtraDataID;
|
||||
}
|
||||
namespace Anim {
|
||||
class IPoseElement;
|
||||
}
|
||||
namespace EObjectToSimpleObjectsQueryResult {
|
||||
enum TYPE;
|
||||
}
|
||||
namespace EBones {
|
||||
enum TYPE;
|
||||
}
|
||||
namespace LodDissolves {
|
||||
union SState;
|
||||
};
|
||||
namespace COFlags {
|
||||
enum TYPE;
|
||||
};
|
||||
namespace cbs {
|
||||
template <typename T>
|
||||
class CPointer;
|
||||
|
||||
class CEntity;
|
||||
}
|
||||
|
||||
class __declspec(dllimport) IModelObject {
|
||||
public:
|
||||
IModelObject();
|
||||
IModelObject(IModelObject const&);
|
||||
virtual ~IModelObject();
|
||||
void AdjustExtentsToAllElements(bool, bool);
|
||||
virtual void AllowSkinsToModifyElementFlags(int, bool);
|
||||
Anim::IPoseElement* AnimGetMeshPoseElement();
|
||||
Anim::IPoseElement const* AnimGetMeshPoseElement() const;
|
||||
Anim::IPoseElement* AnimGetModelObjectMorphPoseElement();
|
||||
Anim::IPoseElement const* AnimGetModelObjectMorphPoseElement() const;
|
||||
Anim::IPoseElement* AnimGetModelObjectPoseElement();
|
||||
Anim::IPoseElement const* AnimGetModelObjectPoseElement() const;
|
||||
bool AnimReInit(ttl::string_base<char> const&);
|
||||
virtual bool AreSkinsAllowedToModifyElementFlags(int) const;
|
||||
virtual unsigned int AttachAudioEvent(int, ttl::string_base<char> const&, Audio::SAudioEventExtraData const*, vec3 const&);
|
||||
virtual void AttachChildToMeshElement(IControlObject*, int, bool);
|
||||
virtual EObjectToSimpleObjectsQueryResult::TYPE CanGoToSimpleObjectsEditor() const;
|
||||
virtual bool CharacterPresetExists(ttl::string_base<char> const&) const;
|
||||
static void CollectMeshSkins(ttl::string_base<char> const&, bool, ttl::vector<ttl::string_base<char>, ttl::vector_allocators::heap_allocator<ttl::string_base<char> >, 1>&);
|
||||
void CollectUsedTextures(ttl::vector<ttl::string_base<char>, ttl::vector_allocators::heap_allocator<ttl::string_base<char> >, 1>&);
|
||||
void CopyElementsPosition(IModelObject*);
|
||||
virtual void DebugRenderElementBoxes();
|
||||
void DissolveObject(bool);
|
||||
virtual void DissolveObjectProgress(float, bool);
|
||||
void DumpAnims();
|
||||
virtual void ElementSetWorldMatrixFromQuatPos(int, vec3 const&, float, vec3 const&);
|
||||
virtual bool EnableCollisionsElement(int, bool);
|
||||
bool EnableElementPhysics(int, bool, bool);
|
||||
virtual bool EnableElementTraceColl(int, bool);
|
||||
void EnableHierarchySerialization(bool);
|
||||
virtual void EnableMotionBlur(bool);
|
||||
virtual void EnableRendering(bool);
|
||||
void EnableRenderingRayTracing(bool);
|
||||
void EnableRenderingScene(bool);
|
||||
void EnableRenderingShadows(bool);
|
||||
void EnableUpdateExtents(bool);
|
||||
virtual void ExecuteAnimActions(int, int, TAnimId, void const*, unsigned int);
|
||||
virtual void ForceUpdateAnimations();
|
||||
virtual void FromUpForwardPosElementLocal(int, vec3 const&, vec3 const&, vec3 const&);
|
||||
virtual void FromUpForwardPosElementWorld(int, vec3 const&, vec3 const&, vec3 const&);
|
||||
virtual void GatherMeshAndSkinName(ttl::string_base<char>&, ttl::string_base<char>&) const;
|
||||
aabb const& GetAABBExtents() const;
|
||||
virtual IAnimBind* GetAnimBind();
|
||||
virtual IAnimBind const* GetAnimBind() const;
|
||||
virtual float GetAnimCurrentTime(TAnimId);
|
||||
virtual float GetAnimLength(ttl::string_base<char> const&) const;
|
||||
virtual float GetAnimLength(TAnimId) const;
|
||||
virtual float GetAnimTimeDelta() const;
|
||||
virtual ttl::string_base<char> GetAnimationFile(ttl::string_base<char> const&) const;
|
||||
virtual TAnimId GetAnimationId(ttl::string_const<char>, bool) const;
|
||||
void GetAnimationNames(ttl::map<ttl::string_base<char>, TAnimId, ttl::less<ttl::string_base<char> >, ttl::allocator>&);
|
||||
virtual vec3 GetBoneDirVector(EBones::TYPE) const;
|
||||
virtual EBones::TYPE GetBoneIDFromMeshElem(int) const;
|
||||
virtual vec3 GetBoneJointPos(EBones::TYPE) const;
|
||||
virtual vec3 GetBonePerpVector(EBones::TYPE) const;
|
||||
virtual ttl::string_base<char> GetCharacterName(unsigned int) const;
|
||||
virtual void GetCharacterNames(ttl::string_base<char>&, ttl::string_base<char>&);
|
||||
virtual int GetChildrenElementsNumber(int) const;
|
||||
int GetCurrentLOD() const;
|
||||
union LodDissolves::SState GetCurrentLodState() const;
|
||||
static COFlags::TYPE GetDefaultCOFlags();
|
||||
virtual int GetElementChild(int) const;
|
||||
virtual extents GetElementExtentsInWorld(int) const;
|
||||
virtual extents GetElementExtentsLocal(int) const;
|
||||
virtual unsigned int GetElementFlags(int) const;
|
||||
virtual int GetElementID(unsigned int) const;
|
||||
virtual int GetElementID(char const*) const;
|
||||
virtual int GetElementIDByLowercaseName(char const*) const;
|
||||
virtual int GetElementIndex(char const*) const;
|
||||
virtual void GetElementInvWorldMatrix(int, mtx34&) const;
|
||||
virtual void GetElementLocalMatrices(int const*, unsigned int, mtx34*);
|
||||
virtual mtx34 const& GetElementLocalMatrix(int) const;
|
||||
virtual vec3 GetElementLocalPos(int) const;
|
||||
virtual ttl::string_base<char> GetElementName(int) const;
|
||||
virtual char const* GetElementNameCStr(int) const;
|
||||
virtual int GetElementNext(int) const;
|
||||
virtual int GetElementParent(int) const;
|
||||
virtual extents GetElementReferenceExtents(int) const;
|
||||
virtual mtx34 const& GetElementWorldMatrix(int) const;
|
||||
virtual mtx34 GetElementWorldMtx(int) const;
|
||||
virtual vec3 GetElementWorldPos(int) const;
|
||||
virtual int GetElementsNumber() const;
|
||||
char GetForcedAnimLod() const;
|
||||
virtual CHierarchyElement* GetHElement(int) const;
|
||||
virtual float GetLastAnimApplyTime() const;
|
||||
virtual float GetLastAnimUpdateTime() const;
|
||||
float GetLodDissolveStep() const;
|
||||
virtual vec4 const& GetMeshAttribute(unsigned int) const;
|
||||
virtual mtx34 const& GetMeshAttributeMtx(unsigned int) const;
|
||||
virtual unsigned int GetMeshAttributesCount() const;
|
||||
virtual uint4 const& GetMeshColor() const;
|
||||
virtual vec4 const& GetMeshColor(unsigned int) const;
|
||||
virtual bool GetMeshDataForSimpleObjectsEditor(ttl::string_base<char>*, ttl::string_base<char>*, __int64*, __int64*, int*);
|
||||
virtual int GetMeshElemFromBoneID(EBones::TYPE) const;
|
||||
void GetMeshElementsMatrices(ttl::vector<mtx34, ttl::vector_allocators::heap_allocator<mtx34>, 0>&) const;
|
||||
unsigned int GetMeshElementsMatricesCount() const;
|
||||
int GetMeshElementsState(ttl::vector<unsigned char, ttl::vector_allocators::heap_allocator<unsigned char>, 8>&, ttl::vector<int, ttl::vector_allocators::heap_allocator<int>, 2> const&) const;
|
||||
int GetMeshElementsStateSize(ttl::vector<int, ttl::vector_allocators::heap_allocator<int>, 2> const&) const;
|
||||
float GetMeshLodDistance(int) const;
|
||||
virtual ttl::string_const<char> GetMeshName() const;
|
||||
SMeshVisibilityParams const* GetMeshVisibilityParams() const;
|
||||
float GetMeshVisibilityRange();
|
||||
static IModelObject* GetModelObject(IGSObject*);
|
||||
static IModelObject* GetModelObject(cbs::CEntity const*);
|
||||
static IModelObject const* GetModelObject(IGSObject const*);
|
||||
static CRTTI const* GetNativeClass();
|
||||
unsigned int GetNumCollisionHullFaces() const;
|
||||
unsigned int GetNumCollisionHullPrimitives() const;
|
||||
unsigned int GetNumCollisionHullVertices() const;
|
||||
unsigned int GetNumSurfaceParams() const;
|
||||
unsigned int GetNumTraceHullFaces() const;
|
||||
unsigned int GetNumTraceHullPrimitives() const;
|
||||
unsigned int GetNumTraceHullVertices() const;
|
||||
virtual cbs::CPointer<ICoSkeleton> GetSkeleton() const;
|
||||
ttl::string_const<char> GetSkin() const;
|
||||
virtual unsigned int GetSkinCount() const;
|
||||
virtual __int64 GetSkinMustHaveTags() const;
|
||||
virtual __int64 GetSkinMustNotHaveTags() const;
|
||||
virtual ttl::string_const<char> GetSkinName() const;
|
||||
virtual void GetSkinName(unsigned int, ttl::string_base<char>&) const;
|
||||
virtual int GetSkinSeed() const;
|
||||
static __int64 GetSkinTagsFromStr(char const*);
|
||||
SSurfParams* GetSurfaceParams() const;
|
||||
int GetTraceCollType() const;
|
||||
bool GetValidSkinsEditor(ttl::vector<ttl::string_base<char>, ttl::vector_allocators::heap_allocator<ttl::string_base<char> >, 1>&, ttl::vector<ttl::string_base<char>, ttl::vector_allocators::heap_allocator<ttl::string_base<char> >, 1>&) const;
|
||||
virtual float GetWaterCurrentSpeed();
|
||||
virtual mtx34 const& GetWorldXform() const;
|
||||
virtual bool HideElement(int);
|
||||
virtual void HideElementsByMask(bool, ttl::string_base<char> const&);
|
||||
virtual bool InitAnimSeqFile(ttl::string_base<char> const&);
|
||||
virtual bool IsBiped() const;
|
||||
bool IsDefaultMeshLoaded();
|
||||
virtual bool IsElementABone(int);
|
||||
virtual bool IsElementCollsionsEnabled(int);
|
||||
virtual bool IsElementHidden(int) const;
|
||||
bool IsElementIDValid(int) const;
|
||||
bool IsElementPhysicsEnabled(int);
|
||||
virtual bool IsElementTraceCollEnabled(int);
|
||||
bool IsObjectDissolved() const;
|
||||
virtual bool IsRenderable() const;
|
||||
void LoadMesh(bool);
|
||||
void LoadMeshElements(ISGChunk*);
|
||||
int MT_GetCount();
|
||||
char const* MT_GetName(unsigned int);
|
||||
float MT_WeightGet(unsigned int);
|
||||
static bool MeshAndSkinExists(ttl::string_base<char> const&, ttl::string_base<char> const&);
|
||||
static bool MeshExist(ttl::string_base<char> const&);
|
||||
void MeshUseDefaultVisibilityParameters();
|
||||
void MoveElementBoxSide(int, int, float);
|
||||
void MoveElementBoxSides(int, vec3 const&, vec3 const&);
|
||||
void MoveElementBoxSides(int, float, float, float, float, float, float);
|
||||
virtual void OnAnimBindDestroyed();
|
||||
virtual void OnAnimEvent(AnimEventInfo const&);
|
||||
virtual void OnMpcCreated(IMpc*);
|
||||
virtual unsigned int PlayAudioEvent(ttl::string_base<char> const&, Audio::SAudioEventExtraData const*, vec3 const&, vec3 const&);
|
||||
virtual unsigned int PlayAudioEvent(unsigned int, Audio::SAudioEventExtraDataID const*, vec3 const&, vec3 const&);
|
||||
virtual vec3 PointLocalToWorld(int, vec3 const&);
|
||||
virtual vec3 PointWorldToLocal(int, vec3 const&);
|
||||
bool RaytestMe(vec3 const&, vec3&, unsigned short, bool, unsigned short);
|
||||
bool RaytraceMe(SCollision*, vec3 const&, vec3&, unsigned short, bool, unsigned short);
|
||||
bool ReplaceMaterial(ttl::string_base<char> const&, ttl::string_base<char> const&);
|
||||
void ResetBoneAndDescendantsToReferenceFrame(int);
|
||||
void ResetBonesExtentsToReferenceFrame();
|
||||
void ResetBonesToReferenceFrame(bool);
|
||||
void ResetElementsDescendantsToReferenceFrame(int);
|
||||
virtual void RestoreAnimationUpdateAbility(bool const&, ttl::vector<bool, ttl::vector_allocators::heap_allocator<bool>, 8> const&);
|
||||
virtual void RotateElement(int, vec3 const&, float);
|
||||
void SaveMeshElements(ISGChunk*);
|
||||
virtual void SetAudioEventSwitch(unsigned int, ttl::string_base<char> const&, ttl::string_base<char> const&);
|
||||
void SetBestGeomLods();
|
||||
virtual void SetBoneOrientation(unsigned char, vec3 const&, vec3 const&);
|
||||
virtual void SetCharacterNames(ttl::string_base<char> const&, ttl::string_base<char> const&);
|
||||
void SetDontApplyAnim(bool);
|
||||
virtual void SetElementExtentsLocal(extents const&, int);
|
||||
virtual void SetElementLocalMatrices(int const*, unsigned int, mtx34 const*);
|
||||
virtual void SetElementLocalMatrix(int, mtx34 const&);
|
||||
virtual void SetElementLocalMatrixNoPropagate(int, mtx34 const&);
|
||||
virtual void SetElementLocalPos(int, vec3 const&);
|
||||
virtual void SetElementWorldMatrix(int, mtx34 const&);
|
||||
virtual void SetElementWorldMatrixNoPropagate(int, mtx34 const&);
|
||||
virtual void SetElementWorldPos(int, vec3 const&);
|
||||
virtual void SetEngineObject(CGSObject*);
|
||||
void SetExtentsLocal(extents const&);
|
||||
void SetForcedAnimLod(char);
|
||||
virtual void SetInitializeMesh(bool);
|
||||
void SetLodDissolveStep(float);
|
||||
void SetLodStateForSpawnedObjects(union LodDissolves::SState);
|
||||
virtual void SetMeshAttribute(unsigned int, vec4 const&);
|
||||
virtual void SetMeshAttributeMtx(unsigned int, mtx34 const&);
|
||||
virtual void SetMeshColor(uint4 const&);
|
||||
virtual void SetMeshColor(unsigned int, vec4 const&);
|
||||
void SetMeshCullSizeEnable(bool);
|
||||
bool SetMeshElementsMatrices(ttl::vector<mtx34, ttl::vector_allocators::heap_allocator<mtx34>, 0> const&);
|
||||
int SetMeshElementsState(ttl::vector<unsigned char, ttl::vector_allocators::heap_allocator<unsigned char>, 8> const&, ttl::vector<int, ttl::vector_allocators::heap_allocator<int>, 2> const&, bool, bool);
|
||||
void SetMeshLodDistance(int, float);
|
||||
virtual void SetMeshName(ttl::string_const<char>);
|
||||
void SetMeshVisibilityRange(float);
|
||||
virtual void SetPivotPointFromElement(int);
|
||||
bool SetSkin();
|
||||
virtual void SetSkinMustHaveTags(__int64);
|
||||
virtual void SetSkinMustNotHaveTags(__int64);
|
||||
virtual void SetSkinName(ttl::string_const<char>);
|
||||
bool SetSkinNoCharacterPreset();
|
||||
virtual void SetSkinSeed(int);
|
||||
void SetTraceCollType(int);
|
||||
virtual void SetupMeshPartClothSet(bool, bool, ttl::vector<ttl::string_base<char>, ttl::vector_allocators::heap_allocator<ttl::string_base<char> >, 1>*);
|
||||
bool ShouldApplyAnim() const;
|
||||
void ShowCollisionHull(bool);
|
||||
void ShowElementBox(ttl::string_base<char> const&);
|
||||
void ShowElementBoxes(bool);
|
||||
void ShowElementBoxesFrom(ttl::string_base<char> const&);
|
||||
void ShowElementBoxesFromTo(ttl::string_base<char> const&, ttl::string_base<char> const&);
|
||||
void ShowElementBoxesTo(ttl::string_base<char> const&);
|
||||
void ShowExtents(bool);
|
||||
bool SkinExists(ttl::string_base<char> const&);
|
||||
virtual void StopAnimActions(int, TAnimId, void const*, float);
|
||||
CModelObject* ToCModelObject();
|
||||
CModelObject const* ToCModelObject() const;
|
||||
virtual bool UnhideElement(int);
|
||||
virtual void UnlockAnimationUpdateAbility(bool&, ttl::vector<bool, ttl::vector_allocators::heap_allocator<bool>, 8>&);
|
||||
virtual vec3 VectorLocalToWorld(int, vec3 const&) const;
|
||||
virtual vec3 VectorWorldToLocal(int, vec3 const&);
|
||||
};
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <EGSDK\Vec3.h>
|
||||
#include <EGSDK\vec3.h>
|
||||
#include <EGSDK\ClassHelpers.h>
|
||||
|
||||
namespace EGSDK::Engine {
|
||||
|
@ -1,13 +1,13 @@
|
||||
#pragma once
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <mutex>
|
||||
#include <shared_mutex>
|
||||
#include <variant>
|
||||
#include <type_traits>
|
||||
#include <EGSDK\Exports.h>
|
||||
#include <EGSDK\Vec3.h>
|
||||
#include <EGSDK\Vec4.h>
|
||||
#include <EGSDK\vec3.h>
|
||||
#include <EGSDK\vec4.h>
|
||||
|
||||
namespace EGSDK::Engine {
|
||||
EGameSDK_API enum class VarType {
|
||||
@ -20,17 +20,17 @@ namespace EGSDK::Engine {
|
||||
Bool
|
||||
};
|
||||
|
||||
using VarValueType = std::variant<std::string, float, int, Vec3, Vec4, bool>;
|
||||
using VarValueType = std::variant<std::string, float, int, vec3, vec4, bool>;
|
||||
template <typename T>
|
||||
concept AllowedVarTypes = std::is_same_v<T, std::string> || std::is_same_v<T, float> || std::is_same_v<T, int> || std::is_same_v<T, Vec3> || std::is_same_v<T, Vec4> || std::is_same_v<T, bool>;
|
||||
concept AllowedVarTypes = std::is_same_v<T, std::string> || std::is_same_v<T, float> || std::is_same_v<T, int> || std::is_same_v<T, vec3> || std::is_same_v<T, vec4> || std::is_same_v<T, bool>;
|
||||
|
||||
class EGameSDK_API VarBase {
|
||||
public:
|
||||
VarBase(const std::string& name, VarType type = VarType::NONE);
|
||||
VarBase(std::string_view name, VarType type = VarType::NONE);
|
||||
~VarBase();
|
||||
|
||||
const char* GetName() const;
|
||||
void SetName(const std::string& name);
|
||||
void SetName(std::string_view name);
|
||||
|
||||
VarType GetType() const;
|
||||
void SetType(VarType type);
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include <variant>
|
||||
#include <optional>
|
||||
#include <EGSDK\Exports.h>
|
||||
#include <EGSDK\Vec3.h>
|
||||
#include <EGSDK\Vec4.h>
|
||||
#include <EGSDK\vec3.h>
|
||||
#include <EGSDK\vec4.h>
|
||||
#include <EGSDK\Utils\Values.h>
|
||||
#include <EGSDK\Engine\VarBase.h>
|
||||
#include <EGSDK\Engine\VarRef.h>
|
||||
@ -51,6 +51,7 @@ namespace EGSDK::Engine {
|
||||
static std::mutex writeMutex;
|
||||
static std::shared_mutex readMutex;
|
||||
|
||||
static std::optional<VarRef<VarMapT, VarT>> _GetVarRef(VarT* var);
|
||||
static std::optional<VarRef<VarMapT, VarT>> _GetVarRef(const char* name, VarMapT& map);
|
||||
|
||||
static bool _IsManagedByBool(const char* name);
|
||||
|
@ -39,6 +39,7 @@ namespace EGSDK::Engine {
|
||||
}
|
||||
private:
|
||||
struct CaseInsensitiveHash {
|
||||
using is_transparent = void;
|
||||
size_t operator()(std::string_view s) const {
|
||||
size_t h = 0;
|
||||
for (char c : s)
|
||||
@ -47,16 +48,16 @@ namespace EGSDK::Engine {
|
||||
}
|
||||
};
|
||||
struct CaseInsensitiveEqual {
|
||||
using is_transparent = void;
|
||||
bool operator()(std::string_view lhs, std::string_view rhs) const {
|
||||
return std::equal(lhs.begin(), lhs.end(), rhs.begin(), rhs.end(),
|
||||
[](unsigned char a, unsigned char b) {
|
||||
return std::equal(lhs.begin(), lhs.end(), rhs.begin(), rhs.end(), [](unsigned char a, unsigned char b) {
|
||||
return std::tolower(a) == std::tolower(b);
|
||||
});
|
||||
}
|
||||
};
|
||||
protected:
|
||||
std::unordered_map<std::string_view, std::unique_ptr<VarT>, CaseInsensitiveHash, CaseInsensitiveEqual> vars;
|
||||
std::vector<std::string_view> varsOrdered;
|
||||
std::unordered_map<std::string, std::unique_ptr<VarT>, CaseInsensitiveHash, CaseInsensitiveEqual> vars;
|
||||
std::vector<std::string> varsOrdered;
|
||||
mutable std::mutex writeMutex;
|
||||
mutable std::shared_mutex readMutex;
|
||||
};
|
||||
|
35
EGameSDK/include/EGSDK/Engine/ttl.h
Normal file
35
EGameSDK/include/EGSDK/Engine/ttl.h
Normal file
@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
namespace EGSDK::Engine {
|
||||
namespace ttl {
|
||||
namespace vector_allocators {
|
||||
template <typename T>
|
||||
class heap_allocator;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
class string_base;
|
||||
|
||||
template <>
|
||||
class string_base<char> {
|
||||
char* m_Buffer;
|
||||
uint32_t m_Size;
|
||||
uint32_t m_Capacity;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class string_const;
|
||||
|
||||
template <typename T1, typename T2, size_t T3>
|
||||
class vector;
|
||||
|
||||
template <typename T1, typename T2, typename T3, typename T4>
|
||||
class map;
|
||||
|
||||
template <typename T1>
|
||||
class less;
|
||||
|
||||
class allocator;
|
||||
}
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include <EGSDK\ClassHelpers.h>
|
||||
#include <EGSDK\Vec2.h>
|
||||
#include <EGSDK\vec2.h>
|
||||
#include <EGSDK\Engine\IControlObject.h>
|
||||
#include <EGSDK\Engine\IModelObject.h>
|
||||
#include <EGSDK\GamePH\InventoryItem.h>
|
||||
#include <EGSDK\GamePH\InventoryContainerDI.h>
|
||||
|
||||
@ -11,12 +12,12 @@ namespace EGSDK::Engine {
|
||||
}
|
||||
|
||||
namespace EGSDK::GamePH {
|
||||
class EGameSDK_API PlayerDI_PH : public Engine::IControlObject {
|
||||
class EGameSDK_API PlayerDI_PH : public Engine::IControlObject, public Engine::IModelObject {
|
||||
public:
|
||||
union {
|
||||
DynamicField(PlayerDI_PH, Engine::CoPhysicsProperty*, pCoPhysicsProperty);
|
||||
DynamicField(PlayerDI_PH, InventoryContainerDI*, pInventoryContainerDI);
|
||||
DynamicField(PlayerDI_PH, Vec2, nextPlayerOrientation);
|
||||
DynamicField(PlayerDI_PH, vec2, nextPlayerOrientation);
|
||||
DynamicField(PlayerDI_PH, bool, restrictionsEnabled);
|
||||
DynamicField(PlayerDI_PH, bool, enableTPPModel1);
|
||||
DynamicField(PlayerDI_PH, bool, enableTPPModel2);
|
||||
|
@ -16,8 +16,8 @@ namespace EGSDK::GamePH {
|
||||
EGSDK::ClassHelpers::StaticBuffer<0xC, float> defaultFloatValue;
|
||||
EGSDK::ClassHelpers::StaticBuffer<0x9, bool> defaultBoolValue;
|
||||
};
|
||||
explicit PlayerVar(const std::string& name);
|
||||
explicit PlayerVar(const std::string& name, Engine::VarType type);
|
||||
explicit PlayerVar(std::string_view name);
|
||||
explicit PlayerVar(std::string_view name, Engine::VarType type);
|
||||
|
||||
Engine::VarValueType GetValue();
|
||||
Engine::VarValueType GetDefaultValue();
|
||||
@ -26,15 +26,15 @@ namespace EGSDK::GamePH {
|
||||
|
||||
class EGameSDK_API StringPlayerVariable : public PlayerVar {
|
||||
public:
|
||||
explicit StringPlayerVariable(const std::string& name);
|
||||
explicit StringPlayerVariable(std::string_view name);
|
||||
};
|
||||
class EGameSDK_API FloatPlayerVariable : public PlayerVar {
|
||||
public:
|
||||
explicit FloatPlayerVariable(const std::string& name);
|
||||
explicit FloatPlayerVariable(std::string_view name);
|
||||
};
|
||||
class EGameSDK_API BoolPlayerVariable : public PlayerVar {
|
||||
public:
|
||||
explicit BoolPlayerVariable(const std::string& name);
|
||||
explicit BoolPlayerVariable(std::string_view name);
|
||||
};
|
||||
|
||||
class EGameSDK_API PlayerVarMap : public Engine::VarMapBase<PlayerVar> {
|
||||
|
@ -1,32 +1,32 @@
|
||||
#pragma once
|
||||
#include <EGSDK\Vec3.h>
|
||||
#include <EGSDK\Vec4.h>
|
||||
#include <EGSDK\vec3.h>
|
||||
#include <EGSDK\vec4.h>
|
||||
#include <EGSDK\Exports.h>
|
||||
|
||||
namespace EGSDK {
|
||||
struct EGameSDK_API alignas(16) Mtx34 {
|
||||
Vec4 Row1;
|
||||
Vec4 Row2;
|
||||
Vec4 Row3;
|
||||
struct EGameSDK_API alignas(16) mtx34 {
|
||||
vec4 Row1;
|
||||
vec4 Row2;
|
||||
vec4 Row3;
|
||||
|
||||
Mtx34();
|
||||
Mtx34(const Vec4& row1, const Vec4& row2, const Vec4& row3);
|
||||
mtx34();
|
||||
mtx34(const vec4& row1, const vec4& row2, const vec4& row3);
|
||||
|
||||
bool operator==(const Mtx34& m) const;
|
||||
Mtx34& operator+=(const Mtx34& m);
|
||||
Mtx34& operator-=(const Mtx34& m);
|
||||
Mtx34 operator+(const Mtx34& m) const;
|
||||
Mtx34 operator-(const Mtx34& m) const;
|
||||
Mtx34 operator*(const Mtx34& scalar) const;
|
||||
Mtx34 operator/(const Mtx34& scalar) const;
|
||||
Mtx34 operator*(const Vec4& scalar) const;
|
||||
Mtx34 operator/(const Vec4& scalar) const;
|
||||
bool operator==(const mtx34& m) const;
|
||||
mtx34& operator+=(const mtx34& m);
|
||||
mtx34& operator-=(const mtx34& m);
|
||||
mtx34 operator+(const mtx34& m) const;
|
||||
mtx34 operator-(const mtx34& m) const;
|
||||
mtx34 operator*(const mtx34& scalar) const;
|
||||
mtx34 operator/(const mtx34& scalar) const;
|
||||
mtx34 operator*(const vec4& scalar) const;
|
||||
mtx34 operator/(const vec4& scalar) const;
|
||||
|
||||
Vec3 GetXAxis() const;
|
||||
Vec3 GetYAxis() const;
|
||||
Vec3 GetZAxis() const;
|
||||
Vec3 GetPosition() const;
|
||||
vec3 GetXAxis() const;
|
||||
vec3 GetYAxis() const;
|
||||
vec3 GetZAxis() const;
|
||||
vec3 GetPosition() const;
|
||||
|
||||
Mtx34 normalize();
|
||||
mtx34 normalize();
|
||||
};
|
||||
}
|
@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <EGSDK\Exports.h>
|
||||
#include <EGSDK\Vec3.h>
|
||||
#include <EGSDK\vec3.h>
|
||||
|
||||
namespace EGSDK::Utils {
|
||||
namespace Values {
|
||||
extern EGameSDK_API bool are_samef(float a, float b, float precision = 0.0001f);
|
||||
extern EGameSDK_API float round_decimal(float value, int decimal_places = 2);
|
||||
|
||||
extern EGameSDK_API float GetPitchDegreesRelativeTo(const Vec3& dirVec, const Vec3& referenceAxis);
|
||||
extern EGameSDK_API float GetPitchDegreesRelativeTo(const vec3& dirVec, const vec3& referenceAxis);
|
||||
|
||||
extern EGameSDK_API bool str_ends_with_ci(std::string const& text, std::string const& substr);
|
||||
extern EGameSDK_API bool str_replace(std::string& str, const std::string& from, const std::string& to);
|
||||
|
@ -2,29 +2,29 @@
|
||||
#include <EGSDK\Exports.h>
|
||||
|
||||
namespace EGSDK {
|
||||
struct EGameSDK_API Vec2 {
|
||||
struct EGameSDK_API vec2 {
|
||||
float X;
|
||||
float Y;
|
||||
|
||||
Vec2();
|
||||
Vec2(float x, float y);
|
||||
vec2();
|
||||
vec2(float x, float y);
|
||||
|
||||
bool operator==(const Vec2& v) const;
|
||||
Vec2& operator+=(const Vec2& v);
|
||||
Vec2& operator-=(const Vec2& v);
|
||||
Vec2 operator+(const Vec2& v) const;
|
||||
Vec2 operator-(const Vec2& v) const;
|
||||
Vec2 operator*(const Vec2& scalar) const;
|
||||
Vec2 operator/(const Vec2& scalar) const;
|
||||
Vec2 operator*(float scalar) const;
|
||||
Vec2 operator/(float scalar) const;
|
||||
bool operator==(const vec2& v) const;
|
||||
vec2& operator+=(const vec2& v);
|
||||
vec2& operator-=(const vec2& v);
|
||||
vec2 operator+(const vec2& v) const;
|
||||
vec2 operator-(const vec2& v) const;
|
||||
vec2 operator*(const vec2& scalar) const;
|
||||
vec2 operator/(const vec2& scalar) const;
|
||||
vec2 operator*(float scalar) const;
|
||||
vec2 operator/(float scalar) const;
|
||||
|
||||
Vec2 operator-() const;
|
||||
vec2 operator-() const;
|
||||
|
||||
Vec2 normalize() const;
|
||||
float dot(const Vec2& v) const;
|
||||
Vec2 round();
|
||||
Vec2 round(int decimals);
|
||||
vec2 normalize() const;
|
||||
float dot(const vec2& v) const;
|
||||
vec2 round();
|
||||
vec2 round(int decimals);
|
||||
|
||||
bool isDefault() const;
|
||||
};
|
||||
|
@ -2,31 +2,31 @@
|
||||
#include <EGSDK\Exports.h>
|
||||
|
||||
namespace EGSDK {
|
||||
struct EGameSDK_API Vec3 {
|
||||
struct EGameSDK_API vec3 {
|
||||
float X;
|
||||
float Y;
|
||||
float Z;
|
||||
|
||||
Vec3();
|
||||
Vec3(float x, float y, float z);
|
||||
vec3();
|
||||
vec3(float x, float y, float z);
|
||||
|
||||
bool operator==(const Vec3& v) const;
|
||||
Vec3& operator+=(const Vec3& v);
|
||||
Vec3& operator-=(const Vec3& v);
|
||||
Vec3 operator+(const Vec3& v) const;
|
||||
Vec3 operator-(const Vec3& v) const;
|
||||
Vec3 operator*(const Vec3& scalar) const;
|
||||
Vec3 operator/(const Vec3& scalar) const;
|
||||
Vec3 operator*(float scalar) const;
|
||||
Vec3 operator/(float scalar) const;
|
||||
bool operator==(const vec3& v) const;
|
||||
vec3& operator+=(const vec3& v);
|
||||
vec3& operator-=(const vec3& v);
|
||||
vec3 operator+(const vec3& v) const;
|
||||
vec3 operator-(const vec3& v) const;
|
||||
vec3 operator*(const vec3& scalar) const;
|
||||
vec3 operator/(const vec3& scalar) const;
|
||||
vec3 operator*(float scalar) const;
|
||||
vec3 operator/(float scalar) const;
|
||||
|
||||
Vec3 operator-() const;
|
||||
vec3 operator-() const;
|
||||
|
||||
Vec3 normalize() const;
|
||||
Vec3 cross(const Vec3& v) const;
|
||||
float dot(const Vec3& v) const;
|
||||
Vec3 round();
|
||||
Vec3 round(int decimals);
|
||||
vec3 normalize() const;
|
||||
vec3 cross(const vec3& v) const;
|
||||
float dot(const vec3& v) const;
|
||||
vec3 round();
|
||||
vec3 round(int decimals);
|
||||
|
||||
bool isDefault() const;
|
||||
};
|
||||
|
@ -2,30 +2,30 @@
|
||||
#include <EGSDK\Exports.h>
|
||||
|
||||
namespace EGSDK {
|
||||
struct EGameSDK_API Vec4 {
|
||||
struct EGameSDK_API vec4 {
|
||||
float X;
|
||||
float Y;
|
||||
float Z;
|
||||
float W;
|
||||
|
||||
Vec4();
|
||||
Vec4(float x, float y, float z, float w);
|
||||
vec4();
|
||||
vec4(float x, float y, float z, float w);
|
||||
|
||||
bool operator==(const Vec4& v) const;
|
||||
Vec4& operator+=(const Vec4& v);
|
||||
Vec4& operator-=(const Vec4& v);
|
||||
Vec4 operator+(const Vec4& v) const;
|
||||
Vec4 operator-(const Vec4& v) const;
|
||||
Vec4 operator*(const Vec4& scalar) const;
|
||||
Vec4 operator/(const Vec4& scalar) const;
|
||||
Vec4 operator*(float scalar) const;
|
||||
Vec4 operator/(float scalar) const;
|
||||
bool operator==(const vec4& v) const;
|
||||
vec4& operator+=(const vec4& v);
|
||||
vec4& operator-=(const vec4& v);
|
||||
vec4 operator+(const vec4& v) const;
|
||||
vec4 operator-(const vec4& v) const;
|
||||
vec4 operator*(const vec4& scalar) const;
|
||||
vec4 operator/(const vec4& scalar) const;
|
||||
vec4 operator*(float scalar) const;
|
||||
vec4 operator/(float scalar) const;
|
||||
|
||||
Vec4 operator-() const;
|
||||
vec4 operator-() const;
|
||||
|
||||
Vec4 normalize() const;
|
||||
Vec4 round();
|
||||
Vec4 round(int decimals);
|
||||
vec4 normalize() const;
|
||||
vec4 round();
|
||||
vec4 round(int decimals);
|
||||
|
||||
bool isDefault() const;
|
||||
};
|
||||
|
38770
EGameSDK/proxies/engine_x64_rwdi/dllmain.cpp
Normal file
38770
EGameSDK/proxies/engine_x64_rwdi/dllmain.cpp
Normal file
File diff suppressed because it is too large
Load Diff
265
EGameSDK/proxies/engine_x64_rwdi/engine_x64_rwdi.vcxproj
Normal file
265
EGameSDK/proxies/engine_x64_rwdi/engine_x64_rwdi.vcxproj
Normal file
@ -0,0 +1,265 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug_Release|Win32">
|
||||
<Configuration>Debug_Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug_Release|x64">
|
||||
<Configuration>Debug_Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{43D9B339-9A92-4D78-BD8E-5026ABFC8604}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>DllProxyTemplate</RootNamespace>
|
||||
<ProjectName>engine_x64_rwdi</ProjectName>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>$(ProjectName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>$(ProjectName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>$(ProjectName)</TargetName>
|
||||
<OutDir>$(SolutionDir)$(Platform)\Debug\</OutDir>
|
||||
<IntDir>$(Platform)\Debug\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;_USRDLL;DllProxyTemplate_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<EnablePREfast>false</EnablePREfast>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ModuleDefinitionFile>Forwarded.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_WIN64;_AMD64;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;_USRDLL;engine_x64_rwdi_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<EnablePREfast>true</EnablePREfast>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<LanguageStandard_C>stdclatest</LanguageStandard_C>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_WINDOWS;_USRDLL;DllProxyTemplate_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<EnablePREfast>true</EnablePREfast>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<ModuleDefinitionFile>Forwarded.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_WINDOWS;_USRDLL;DllProxyTemplate_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<EnablePREfast>true</EnablePREfast>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<ModuleDefinitionFile>Forwarded.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_WIN64;_AMD64;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_WINDOWS;_USRDLL;engine_x64_rwdi_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<EnablePREfast>true</EnablePREfast>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<LanguageStandard_C>stdclatest</LanguageStandard_C>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_WIN64;_AMD64;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_WINDOWS;_USRDLL;engine_x64_rwdi_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<EnablePREfast>true</EnablePREfast>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<LanguageStandard_C>Default</LanguageStandard_C>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<ModuleDefinitionFile>
|
||||
</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -4,12 +4,12 @@
|
||||
#include <EGSDK\ClassHelpers.h>
|
||||
|
||||
namespace EGSDK::Engine {
|
||||
Vec3 CBulletPhysicsCharacter::posBeforeFreeze{};
|
||||
vec3 CBulletPhysicsCharacter::posBeforeFreeze{};
|
||||
|
||||
void CBulletPhysicsCharacter::FreezeCharacter() {
|
||||
MoveCharacter(posBeforeFreeze);
|
||||
}
|
||||
void CBulletPhysicsCharacter::MoveCharacter(const Vec3& pos) {
|
||||
void CBulletPhysicsCharacter::MoveCharacter(const vec3& pos) {
|
||||
playerDownwardVelocity = 0.0f;
|
||||
playerPos = pos;
|
||||
}
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
namespace EGSDK::Engine {
|
||||
std::unordered_map<const CVar*, CVar::VarValue> CVar::varValues;
|
||||
CVar::CVar(const std::string& name) : VarBase(name) {}
|
||||
CVar::CVar(const std::string& name, VarType type) : VarBase(name, type) {}
|
||||
VarValueType& CVar::GetValue() {
|
||||
CVar::CVar(std::string_view name) : VarBase(name) {}
|
||||
CVar::CVar(std::string_view name, VarType type) : VarBase(name, type) {}
|
||||
VarValueType CVar::GetValue() {
|
||||
std::shared_lock lock(readMutex);
|
||||
auto it = varValues.find(this);
|
||||
if (it == varValues.end()) {
|
||||
@ -17,10 +17,10 @@ namespace EGSDK::Engine {
|
||||
return varValues[this].value = 0;
|
||||
break;
|
||||
case VarType::Vec3:
|
||||
return varValues[this].value = Vec3();
|
||||
return varValues[this].value = vec3();
|
||||
break;
|
||||
case VarType::Vec4:
|
||||
return varValues[this].value = Vec4();
|
||||
return varValues[this].value = vec4();
|
||||
break;
|
||||
default:
|
||||
return varValues[this].value = 0;
|
||||
@ -28,22 +28,20 @@ namespace EGSDK::Engine {
|
||||
}
|
||||
}
|
||||
auto& varData = it->second;
|
||||
if (varData.valuePtrs.empty())
|
||||
if (varData.valuePtrs.empty() || !varData.valuePtrs[0])
|
||||
return varData.value;
|
||||
auto ptr = varData.valuePtrs[0];
|
||||
if (!ptr)
|
||||
return varData.value;
|
||||
switch (GetType()) {
|
||||
case VarType::Float:
|
||||
return varData.value = *reinterpret_cast<float*>(ptr);
|
||||
case VarType::Int:
|
||||
return varData.value = *reinterpret_cast<int*>(ptr);
|
||||
case VarType::Vec3:
|
||||
return varData.value = *reinterpret_cast<Vec3*>(ptr);
|
||||
return varData.value = *reinterpret_cast<vec3*>(ptr);
|
||||
case VarType::Vec4:
|
||||
return varData.value = *reinterpret_cast<Vec4*>(ptr);
|
||||
return varData.value = *reinterpret_cast<vec4*>(ptr);
|
||||
default:
|
||||
return it->second.value;
|
||||
return varData.value;
|
||||
}
|
||||
}
|
||||
void CVar::SetValue(const VarValueType& value) {
|
||||
@ -52,17 +50,17 @@ namespace EGSDK::Engine {
|
||||
|
||||
std::visit([&](auto&& val) {
|
||||
using T = std::decay_t<decltype(val)>;
|
||||
if constexpr (std::is_same_v<T, float> || std::is_same_v<T, int> || std::is_same_v<T, Vec3> || std::is_same_v<T, Vec4>) {
|
||||
if constexpr (std::is_same_v<T, float> || std::is_same_v<T, int> || std::is_same_v<T, vec3> || std::is_same_v<T, vec4>) {
|
||||
for (auto* ptr : varData.valuePtrs) {
|
||||
if (ptr) {
|
||||
if constexpr (std::is_same_v<T, float>)
|
||||
*reinterpret_cast<float*>(ptr) = val;
|
||||
else if constexpr (std::is_same_v<T, int>)
|
||||
*reinterpret_cast<int*>(ptr) = val;
|
||||
else if constexpr (std::is_same_v<T, Vec3>)
|
||||
*reinterpret_cast<Vec3*>(ptr) = val;
|
||||
else if constexpr (std::is_same_v<T, Vec4>)
|
||||
*reinterpret_cast<Vec4*>(ptr) = val;
|
||||
else if constexpr (std::is_same_v<T, vec3>)
|
||||
*reinterpret_cast<vec3*>(ptr) = val;
|
||||
else if constexpr (std::is_same_v<T, vec4>)
|
||||
*reinterpret_cast<vec4*>(ptr) = val;
|
||||
}
|
||||
}
|
||||
varData.value = val;
|
||||
@ -74,16 +72,16 @@ namespace EGSDK::Engine {
|
||||
varValues[this].valuePtrs.push_back(ptr);
|
||||
}
|
||||
|
||||
FloatCVar::FloatCVar(const std::string& name) : CVar(name) {
|
||||
FloatCVar::FloatCVar(std::string_view name) : CVar(name) {
|
||||
SetType(VarType::Float);
|
||||
}
|
||||
IntCVar::IntCVar(const std::string& name) : CVar(name) {
|
||||
IntCVar::IntCVar(std::string_view name) : CVar(name) {
|
||||
SetType(VarType::Int);
|
||||
}
|
||||
Vec3CVar::Vec3CVar(const std::string& name) : CVar(name) {
|
||||
Vec3CVar::Vec3CVar(std::string_view name) : CVar(name) {
|
||||
SetType(VarType::Vec3);
|
||||
}
|
||||
Vec4CVar::Vec4CVar(const std::string& name) : CVar(name) {
|
||||
Vec4CVar::Vec4CVar(std::string_view name) : CVar(name) {
|
||||
SetType(VarType::Vec4);
|
||||
}
|
||||
|
||||
@ -92,7 +90,7 @@ namespace EGSDK::Engine {
|
||||
const char* name = cVar->GetName();
|
||||
auto [it, inserted] = vars.try_emplace(name, std::move(cVar));
|
||||
if (inserted) {
|
||||
varsOrdered.push_back(name);
|
||||
varsOrdered.push_back(it->first);
|
||||
if (uint32_t valueOffset = it->second->valueOffset.data; valueOffset || valueOffset != 0xCDCDCDCD)
|
||||
varsByValueOffset[valueOffset] = it->second.get();
|
||||
}
|
||||
|
@ -8,26 +8,26 @@ namespace EGSDK::Engine {
|
||||
float IBaseCamera::GetFOV() {
|
||||
return Utils::Memory::SafeCallFunction<float>("engine_x64_rwdi.dll", "?GetFOV@IBaseCamera@@QEBAMXZ", -1.0f, this);
|
||||
}
|
||||
Vec3* IBaseCamera::GetForwardVector(Vec3* outForwardVec) {
|
||||
return Utils::Memory::SafeCallFunction<Vec3*>("engine_x64_rwdi.dll", "?GetForwardVector@IBaseCamera@@QEBA?BVvec3@@XZ", nullptr, this, outForwardVec);
|
||||
vec3* IBaseCamera::GetForwardVector(vec3* outForwardVec) {
|
||||
return Utils::Memory::SafeCallFunction<vec3*>("engine_x64_rwdi.dll", "?GetForwardVector@IBaseCamera@@QEBA?BVvec3@@XZ", nullptr, this, outForwardVec);
|
||||
}
|
||||
Vec3* IBaseCamera::GetUpVector(Vec3* outUpVec) {
|
||||
return Utils::Memory::SafeCallFunction<Vec3*>("engine_x64_rwdi.dll", "?GetUpVector@IBaseCamera@@QEBA?BVvec3@@XZ", nullptr, this, outUpVec);
|
||||
vec3* IBaseCamera::GetUpVector(vec3* outUpVec) {
|
||||
return Utils::Memory::SafeCallFunction<vec3*>("engine_x64_rwdi.dll", "?GetUpVector@IBaseCamera@@QEBA?BVvec3@@XZ", nullptr, this, outUpVec);
|
||||
}
|
||||
Vec3* IBaseCamera::GetLeftVector(Vec3* outLeftVec) {
|
||||
return Utils::Memory::SafeCallFunction<Vec3*>("engine_x64_rwdi.dll", "?GetLeftVector@IBaseCamera@@QEBA?BVvec3@@XZ", nullptr, this, outLeftVec);
|
||||
vec3* IBaseCamera::GetLeftVector(vec3* outLeftVec) {
|
||||
return Utils::Memory::SafeCallFunction<vec3*>("engine_x64_rwdi.dll", "?GetLeftVector@IBaseCamera@@QEBA?BVvec3@@XZ", nullptr, this, outLeftVec);
|
||||
}
|
||||
Vec3* IBaseCamera::GetPosition(Vec3* outPos) {
|
||||
return Utils::Memory::SafeCallFunction<Vec3*>("engine_x64_rwdi.dll", "?GetPosition@IBaseCamera@@UEBA?BVvec3@@XZ", nullptr, this, outPos);
|
||||
vec3* IBaseCamera::GetPosition(vec3* outPos) {
|
||||
return Utils::Memory::SafeCallFunction<vec3*>("engine_x64_rwdi.dll", "?GetPosition@IBaseCamera@@UEBA?BVvec3@@XZ", nullptr, this, outPos);
|
||||
}
|
||||
Mtx34* IBaseCamera::GetViewMatrix() {
|
||||
return Utils::Memory::SafeCallFunction<Mtx34*>("engine_x64_rwdi.dll", "?GetViewMatrix@IBaseCamera@@QEAAAEBVmtx34@@XZ", nullptr, this);
|
||||
mtx34* IBaseCamera::GetViewMatrix() {
|
||||
return Utils::Memory::SafeCallFunction<mtx34*>("engine_x64_rwdi.dll", "?GetViewMatrix@IBaseCamera@@QEAAAEBVmtx34@@XZ", nullptr, this);
|
||||
}
|
||||
Mtx34* IBaseCamera::GetInvCameraMatrix() {
|
||||
return Utils::Memory::SafeCallFunction<Mtx34*>("engine_x64_rwdi.dll", "?GetInvCameraMatrix@IBaseCamera@@QEAAAEBVmtx34@@XZ", nullptr, this);
|
||||
mtx34* IBaseCamera::GetInvCameraMatrix() {
|
||||
return Utils::Memory::SafeCallFunction<mtx34*>("engine_x64_rwdi.dll", "?GetInvCameraMatrix@IBaseCamera@@QEAAAEBVmtx34@@XZ", nullptr, this);
|
||||
}
|
||||
|
||||
void IBaseCamera::Rotate(float angle, const Vec3* axis) {
|
||||
void IBaseCamera::Rotate(float angle, const vec3* axis) {
|
||||
Utils::Memory::SafeCallFunctionVoid("engine_x64_rwdi.dll", "?Rotate@IBaseCamera@@QEAAXMAEBVvec3@@@Z", this, angle, axis);
|
||||
}
|
||||
void IBaseCamera::SetFOV(float fov) {
|
||||
@ -35,13 +35,13 @@ namespace EGSDK::Engine {
|
||||
Utils::Memory::SafeCallFunctionVoid("engine_x64_rwdi.dll", "?SetFOV@IBaseCamera@@QEAAXM@Z", this, fov);
|
||||
isSetFOVCalledByEGSDK = false;
|
||||
}
|
||||
void IBaseCamera::SetPosition(const Vec3* pos) {
|
||||
void IBaseCamera::SetPosition(const vec3* pos) {
|
||||
Utils::Memory::SafeCallFunctionVoid("engine_x64_rwdi.dll", "?SetPosition@IBaseCamera@@QEAAXAEBVvec3@@@Z", this, pos);
|
||||
}
|
||||
void IBaseCamera::SetCameraMatrix(const Mtx34* mtx) {
|
||||
void IBaseCamera::SetCameraMatrix(const mtx34* mtx) {
|
||||
Utils::Memory::SafeCallFunctionVoid("engine_x64_rwdi.dll", "?SetCameraMatrix@IBaseCamera@@QEAAXAEBVmtx34@@@Z", this, mtx);
|
||||
}
|
||||
void IBaseCamera::SetInvCameraMatrix(const Mtx34* mtx) {
|
||||
void IBaseCamera::SetInvCameraMatrix(const mtx34* mtx) {
|
||||
Utils::Memory::SafeCallFunctionVoid("engine_x64_rwdi.dll", "?SetInvCameraMatrix@IBaseCamera@@QEAAXAEBVmtx34@@@Z", this, mtx);
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
#include <EGSDK\Utils\WinMemory.h>
|
||||
|
||||
namespace EGSDK::Engine {
|
||||
void IControlObject::SetLocalDir(const Vec3* dir) {
|
||||
void IControlObject::SetLocalDir(const vec3* dir) {
|
||||
Utils::Memory::SafeCallFunctionVoid("engine_x64_rwdi.dll", "?SetLocalDir@IControlObject@@QEAAXAEBVvec3@@@Z", this, dir);
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@ namespace EGSDK::Engine {
|
||||
std::mutex VarBase::writeMutex{};
|
||||
std::shared_mutex VarBase::readMutex{};
|
||||
|
||||
VarBase::VarBase(const std::string& name, VarType type) {
|
||||
VarBase::VarBase(std::string_view name, VarType type) {
|
||||
SetName(name);
|
||||
SetType(type);
|
||||
}
|
||||
@ -20,7 +20,7 @@ namespace EGSDK::Engine {
|
||||
auto it = varNames.find(this);
|
||||
return it != varNames.end() ? it->second.c_str() : nullptr;
|
||||
}
|
||||
void VarBase::SetName(const std::string& newName) {
|
||||
void VarBase::SetName(std::string_view newName) {
|
||||
std::lock_guard lock(writeMutex);
|
||||
varNames[this] = newName;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ namespace EGSDK::Engine {
|
||||
|
||||
template <typename VarMapT, typename VarT>
|
||||
std::optional<VarRef<VarMapT, VarT>> VarManagerBase<VarMapT, VarT>::GetVarRefFromPtr(VarT* var) {
|
||||
return var ? std::optional<VarRef<VarMapT, VarT>>(VarRef<VarMapT, VarT>(var)) : std::nullopt;
|
||||
return _GetVarRef(var);
|
||||
}
|
||||
template <typename VarMapT, typename VarT>
|
||||
std::optional<VarRef<VarMapT, VarT>> VarManagerBase<VarMapT, VarT>::GetVarRef(const char* name) {
|
||||
@ -46,6 +46,10 @@ namespace EGSDK::Engine {
|
||||
return _GetVarRef(name, defaultCustomVars);
|
||||
}
|
||||
|
||||
template <typename VarMapT, typename VarT>
|
||||
std::optional<VarRef<VarMapT, VarT>> VarManagerBase<VarMapT, VarT>::_GetVarRef(VarT* var) {
|
||||
return var ? std::optional<VarRef<VarMapT, VarT>>(VarRef<VarMapT, VarT>(var)) : std::nullopt;
|
||||
}
|
||||
template <typename VarMapT, typename VarT>
|
||||
std::optional<VarRef<VarMapT, VarT>> VarManagerBase<VarMapT, VarT>::_GetVarRef(const char* name, VarMapT& map) {
|
||||
VarRef<VarMapT, VarT> varRef(name, map);
|
||||
|
@ -13,7 +13,7 @@ namespace EGSDK::Engine {
|
||||
const char* name = var->GetName();
|
||||
auto [it, inserted] = vars.try_emplace(name, std::move(var));
|
||||
if (inserted)
|
||||
varsOrdered.push_back(name);
|
||||
varsOrdered.push_back(it->first);
|
||||
else
|
||||
var.release();
|
||||
return it->second;
|
||||
|
@ -12,8 +12,8 @@ namespace EGSDK::GamePH {
|
||||
static constexpr int FLOAT_SIZE_OFFSET = 3;
|
||||
static constexpr int BOOL_SIZE_OFFSET = 2;
|
||||
|
||||
PlayerVar::PlayerVar(const std::string& name) : VarBase(name) {}
|
||||
PlayerVar::PlayerVar(const std::string& name, Engine::VarType type) : Engine::VarBase(name, type) {}
|
||||
PlayerVar::PlayerVar(std::string_view name) : VarBase(name) {}
|
||||
PlayerVar::PlayerVar(std::string_view name, Engine::VarType type) : Engine::VarBase(name, type) {}
|
||||
Engine::VarValueType PlayerVar::GetValue() {
|
||||
std::shared_lock lock(readMutex);
|
||||
switch (GetType()) {
|
||||
@ -63,13 +63,13 @@ namespace EGSDK::GamePH {
|
||||
}
|
||||
|
||||
|
||||
StringPlayerVariable::StringPlayerVariable(const std::string& name) : PlayerVar(name) {
|
||||
StringPlayerVariable::StringPlayerVariable(std::string_view name) : PlayerVar(name) {
|
||||
SetType(Engine::VarType::String);
|
||||
}
|
||||
FloatPlayerVariable::FloatPlayerVariable(const std::string& name) : PlayerVar(name) {
|
||||
FloatPlayerVariable::FloatPlayerVariable(std::string_view name) : PlayerVar(name) {
|
||||
SetType(Engine::VarType::Float);
|
||||
}
|
||||
BoolPlayerVariable::BoolPlayerVariable(const std::string& name) : PlayerVar(name) {
|
||||
BoolPlayerVariable::BoolPlayerVariable(std::string_view name) : PlayerVar(name) {
|
||||
SetType(Engine::VarType::Bool);
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ namespace EGSDK::GamePH {
|
||||
|
||||
#pragma region Player Variables Processing
|
||||
template <typename T>
|
||||
static void updateDefaultVar(PlayerVarMap& defaultVars, const std::string& name, T value, T defaultValue) {
|
||||
static void updateDefaultVar(PlayerVarMap& defaultVars, std::string_view name, T value, T defaultValue) {
|
||||
static_assert(std::is_same_v<T, std::string> || std::is_same_v<T, float> || std::is_same_v<T, bool>, "Invalid type: value must be string, float or bool");
|
||||
|
||||
auto playerVar = defaultVars.Find(name);
|
||||
|
@ -1,57 +1,57 @@
|
||||
#include <EGSDK\Mtx34.h>
|
||||
#include <EGSDK\mtx34.h>
|
||||
|
||||
namespace EGSDK {
|
||||
Mtx34::Mtx34() : Row1(1.0f, 0.0f, 0.0f, 0.0f), Row2(0.0f, 1.0f, 0.0f, 0.0f), Row3(0.0f, 0.0f, 1.0f, 0.0f) {}
|
||||
Mtx34::Mtx34(const Vec4& row1, const Vec4& row2, const Vec4& row3) : Row1(row1), Row2(row2), Row3(row3) {}
|
||||
mtx34::mtx34() : Row1(1.0f, 0.0f, 0.0f, 0.0f), Row2(0.0f, 1.0f, 0.0f, 0.0f), Row3(0.0f, 0.0f, 1.0f, 0.0f) {}
|
||||
mtx34::mtx34(const vec4& row1, const vec4& row2, const vec4& row3) : Row1(row1), Row2(row2), Row3(row3) {}
|
||||
|
||||
bool Mtx34::operator==(const Mtx34& m) const {
|
||||
bool mtx34::operator==(const mtx34& m) const {
|
||||
return Row1 == m.Row1 && Row2 == m.Row2 && Row3 == m.Row3;
|
||||
}
|
||||
Mtx34& Mtx34::operator+=(const Mtx34& m) {
|
||||
mtx34& mtx34::operator+=(const mtx34& m) {
|
||||
Row1 += m.Row1;
|
||||
Row2 += m.Row2;
|
||||
Row3 += m.Row3;
|
||||
return *this;
|
||||
}
|
||||
Mtx34& Mtx34::operator-=(const Mtx34& m) {
|
||||
mtx34& mtx34::operator-=(const mtx34& m) {
|
||||
Row1 -= m.Row1;
|
||||
Row2 -= m.Row2;
|
||||
Row3 -= m.Row3;
|
||||
return *this;
|
||||
}
|
||||
Mtx34 Mtx34::operator+(const Mtx34& m) const {
|
||||
mtx34 mtx34::operator+(const mtx34& m) const {
|
||||
return { Row1 + m.Row1, Row2 + m.Row2, Row3 + m.Row3 };
|
||||
}
|
||||
Mtx34 Mtx34::operator-(const Mtx34& m) const {
|
||||
mtx34 mtx34::operator-(const mtx34& m) const {
|
||||
return { Row1 - m.Row1, Row2 - m.Row2, Row3 - m.Row3 };
|
||||
}
|
||||
Mtx34 Mtx34::operator*(const Mtx34& scalar) const {
|
||||
mtx34 mtx34::operator*(const mtx34& scalar) const {
|
||||
return { Row1 * scalar.Row1, Row2 * scalar.Row2, Row3 * scalar.Row3 };
|
||||
}
|
||||
Mtx34 Mtx34::operator/(const Mtx34& scalar) const {
|
||||
mtx34 mtx34::operator/(const mtx34& scalar) const {
|
||||
return { Row1 / scalar.Row1, Row2 / scalar.Row2, Row3 / scalar.Row3 };
|
||||
}
|
||||
Mtx34 Mtx34::operator*(const Vec4& scalar) const {
|
||||
mtx34 mtx34::operator*(const vec4& scalar) const {
|
||||
return { Row1 * scalar, Row2 * scalar, Row3 * scalar };
|
||||
}
|
||||
Mtx34 Mtx34::operator/(const Vec4& scalar) const {
|
||||
mtx34 mtx34::operator/(const vec4& scalar) const {
|
||||
return { Row1 / scalar, Row2 / scalar, Row3 / scalar };
|
||||
}
|
||||
|
||||
Vec3 Mtx34::GetXAxis() const {
|
||||
return Vec3(Row1.X, Row2.X, Row3.X);
|
||||
vec3 mtx34::GetXAxis() const {
|
||||
return vec3(Row1.X, Row2.X, Row3.X);
|
||||
}
|
||||
Vec3 Mtx34::GetYAxis() const {
|
||||
return Vec3(Row1.Y, Row2.Y, Row3.Y);
|
||||
vec3 mtx34::GetYAxis() const {
|
||||
return vec3(Row1.Y, Row2.Y, Row3.Y);
|
||||
}
|
||||
Vec3 Mtx34::GetZAxis() const {
|
||||
return Vec3(Row1.Z, Row2.Z, Row3.Z);
|
||||
vec3 mtx34::GetZAxis() const {
|
||||
return vec3(Row1.Z, Row2.Z, Row3.Z);
|
||||
}
|
||||
Vec3 Mtx34::GetPosition() const {
|
||||
return Vec3(Row1.W, Row2.W, Row3.W);
|
||||
vec3 mtx34::GetPosition() const {
|
||||
return vec3(Row1.W, Row2.W, Row3.W);
|
||||
}
|
||||
|
||||
Mtx34 Mtx34::normalize() {
|
||||
mtx34 mtx34::normalize() {
|
||||
return { Row1.normalize(), Row2.normalize(), Row3.normalize() };
|
||||
}
|
||||
}
|
@ -19,15 +19,15 @@ namespace EGSDK::Utils {
|
||||
return std::round(value * multiplier) / multiplier;
|
||||
}
|
||||
|
||||
float GetPitchDegreesRelativeTo(const Vec3& dirVec, const Vec3& referenceAxis) {
|
||||
Vec3 relativeDirVec = dirVec;
|
||||
float GetPitchDegreesRelativeTo(const vec3& dirVec, const vec3& referenceAxis) {
|
||||
vec3 relativeDirVec = dirVec;
|
||||
|
||||
if (referenceAxis == Vec3(0.0f, 1.0f, 0.0f))
|
||||
relativeDirVec = Vec3(dirVec.X, dirVec.Z, dirVec.Y);
|
||||
else if (referenceAxis == Vec3(1.0f, 0.0f, 0.0f))
|
||||
relativeDirVec = Vec3(dirVec.Z, dirVec.Y, dirVec.X);
|
||||
if (referenceAxis == vec3(0.0f, 1.0f, 0.0f))
|
||||
relativeDirVec = vec3(dirVec.X, dirVec.Z, dirVec.Y);
|
||||
else if (referenceAxis == vec3(1.0f, 0.0f, 0.0f))
|
||||
relativeDirVec = vec3(dirVec.Z, dirVec.Y, dirVec.X);
|
||||
|
||||
Vec3 normalizedVec = relativeDirVec.normalize();
|
||||
vec3 normalizedVec = relativeDirVec.normalize();
|
||||
float pitchRadians = std::atan2(normalizedVec.Y, std::sqrt(normalizedVec.X * normalizedVec.X + normalizedVec.Z * normalizedVec.Z));
|
||||
return pitchRadians * (180.0f / M_PI);
|
||||
}
|
||||
|
@ -1,67 +1,67 @@
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
#include <EGSDK\Vec2.h>
|
||||
#include <EGSDK\vec2.h>
|
||||
#include <EGSDK\Utils\Values.h>
|
||||
|
||||
namespace EGSDK {
|
||||
Vec2::Vec2() : X(0.0f), Y(0.0f) {}
|
||||
Vec2::Vec2(float x, float y) : X(x), Y(y) {}
|
||||
vec2::vec2() : X(0.0f), Y(0.0f) {}
|
||||
vec2::vec2(float x, float y) : X(x), Y(y) {}
|
||||
|
||||
bool Vec2::operator==(const Vec2& v) const {
|
||||
bool vec2::operator==(const vec2& v) const {
|
||||
return Utils::Values::are_samef(X, v.X) && Utils::Values::are_samef(Y, v.Y);
|
||||
}
|
||||
Vec2& Vec2::operator+=(const Vec2& v) {
|
||||
vec2& vec2::operator+=(const vec2& v) {
|
||||
X += v.X;
|
||||
Y += v.Y;
|
||||
return *this;
|
||||
}
|
||||
Vec2& Vec2::operator-=(const Vec2& v) {
|
||||
vec2& vec2::operator-=(const vec2& v) {
|
||||
X -= v.X;
|
||||
Y -= v.Y;
|
||||
return *this;
|
||||
}
|
||||
Vec2 Vec2::operator+(const Vec2& v) const {
|
||||
vec2 vec2::operator+(const vec2& v) const {
|
||||
return { X + v.X, Y + v.Y };
|
||||
}
|
||||
Vec2 Vec2::operator-(const Vec2& v) const {
|
||||
vec2 vec2::operator-(const vec2& v) const {
|
||||
return { X - v.X, Y - v.Y };
|
||||
}
|
||||
Vec2 Vec2::operator*(const Vec2& scalar) const {
|
||||
vec2 vec2::operator*(const vec2& scalar) const {
|
||||
return { X * scalar.X, Y * scalar.Y };
|
||||
}
|
||||
Vec2 Vec2::operator/(const Vec2& scalar) const {
|
||||
vec2 vec2::operator/(const vec2& scalar) const {
|
||||
return { X / scalar.X, Y / scalar.Y };
|
||||
}
|
||||
Vec2 Vec2::operator*(float scalar) const {
|
||||
vec2 vec2::operator*(float scalar) const {
|
||||
return { X * scalar, Y * scalar };
|
||||
}
|
||||
Vec2 Vec2::operator/(float scalar) const {
|
||||
vec2 vec2::operator/(float scalar) const {
|
||||
return { X / scalar, Y / scalar };
|
||||
}
|
||||
|
||||
Vec2 Vec2::operator-() const {
|
||||
vec2 vec2::operator-() const {
|
||||
return { -X, -Y };
|
||||
}
|
||||
|
||||
Vec2 Vec2::normalize() const {
|
||||
vec2 vec2::normalize() const {
|
||||
if (isDefault())
|
||||
return *this;
|
||||
|
||||
float length = std::sqrt(X * X + Y * Y);
|
||||
return { X / length, Y / length };
|
||||
}
|
||||
float Vec2::dot(const Vec2& v) const {
|
||||
float vec2::dot(const vec2& v) const {
|
||||
return (X * v.X) + (Y * v.Y);
|
||||
}
|
||||
Vec2 Vec2::round() {
|
||||
vec2 vec2::round() {
|
||||
return { std::roundf(X), std::roundf(Y) };
|
||||
}
|
||||
Vec2 Vec2::round(int decimals) {
|
||||
vec2 vec2::round(int decimals) {
|
||||
float power = std::powf(10.0f, static_cast<float>(decimals));
|
||||
return { std::roundf(X * power) / power, std::roundf(Y * power) / power };
|
||||
}
|
||||
|
||||
bool Vec2::isDefault() const {
|
||||
bool vec2::isDefault() const {
|
||||
return Utils::Values::are_samef(X, 0.0f) && Utils::Values::are_samef(Y, 0.0f);
|
||||
}
|
||||
}
|
@ -1,76 +1,76 @@
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
#include <EGSDK\Vec3.h>
|
||||
#include <EGSDK\vec3.h>
|
||||
#include <EGSDK\Utils\Values.h>
|
||||
|
||||
namespace EGSDK {
|
||||
Vec3::Vec3() : X(0.0f), Y(0.0f), Z(0.0f) {}
|
||||
Vec3::Vec3(float x, float y, float z) : X(x), Y(y), Z(z) {}
|
||||
vec3::vec3() : X(0.0f), Y(0.0f), Z(0.0f) {}
|
||||
vec3::vec3(float x, float y, float z) : X(x), Y(y), Z(z) {}
|
||||
|
||||
bool Vec3::operator==(const Vec3& v) const {
|
||||
bool vec3::operator==(const vec3& v) const {
|
||||
return Utils::Values::are_samef(X, v.X) && Utils::Values::are_samef(Y, v.Y) && Utils::Values::are_samef(Z, v.Z);
|
||||
}
|
||||
Vec3& Vec3::operator+=(const Vec3& v) {
|
||||
vec3& vec3::operator+=(const vec3& v) {
|
||||
X += v.X;
|
||||
Y += v.Y;
|
||||
Z += v.Z;
|
||||
return *this;
|
||||
}
|
||||
Vec3& Vec3::operator-=(const Vec3& v) {
|
||||
vec3& vec3::operator-=(const vec3& v) {
|
||||
X -= v.X;
|
||||
Y -= v.Y;
|
||||
Z -= v.Z;
|
||||
return *this;
|
||||
}
|
||||
Vec3 Vec3::operator+(const Vec3& v) const {
|
||||
vec3 vec3::operator+(const vec3& v) const {
|
||||
return { X + v.X, Y + v.Y, Z + v.Z };
|
||||
}
|
||||
Vec3 Vec3::operator-(const Vec3& v) const {
|
||||
vec3 vec3::operator-(const vec3& v) const {
|
||||
return { X - v.X, Y - v.Y, Z - v.Z };
|
||||
}
|
||||
Vec3 Vec3::operator*(const Vec3& scalar) const {
|
||||
vec3 vec3::operator*(const vec3& scalar) const {
|
||||
return { X * scalar.X, Y * scalar.Y, Z * scalar.Z };
|
||||
}
|
||||
Vec3 Vec3::operator/(const Vec3& scalar) const {
|
||||
vec3 vec3::operator/(const vec3& scalar) const {
|
||||
return { X / scalar.X, Y / scalar.Y, Z / scalar.Z };
|
||||
}
|
||||
Vec3 Vec3::operator*(float scalar) const {
|
||||
vec3 vec3::operator*(float scalar) const {
|
||||
return { X * scalar, Y * scalar, Z * scalar };
|
||||
}
|
||||
Vec3 Vec3::operator/(float scalar) const {
|
||||
vec3 vec3::operator/(float scalar) const {
|
||||
return { X / scalar, Y / scalar, Z / scalar };
|
||||
}
|
||||
|
||||
Vec3 Vec3::operator-() const {
|
||||
vec3 vec3::operator-() const {
|
||||
return { -X, -Y, -Z };
|
||||
}
|
||||
|
||||
Vec3 Vec3::normalize() const {
|
||||
vec3 vec3::normalize() const {
|
||||
if (isDefault())
|
||||
return *this;
|
||||
|
||||
float length = std::sqrt(X * X + Y * Y + Z * Z);
|
||||
return { X / length, Y / length, Z / length };
|
||||
}
|
||||
Vec3 Vec3::cross(const Vec3& v) const {
|
||||
vec3 vec3::cross(const vec3& v) const {
|
||||
return {
|
||||
Y * v.Z - Z * v.Y,
|
||||
Z * v.X - X * v.Z,
|
||||
X * v.Y - Y * v.X
|
||||
};
|
||||
}
|
||||
float Vec3::dot(const Vec3& v) const {
|
||||
float vec3::dot(const vec3& v) const {
|
||||
return (X * v.X) + (Y * v.Y) + (Z * v.Z);
|
||||
}
|
||||
Vec3 Vec3::round() {
|
||||
vec3 vec3::round() {
|
||||
return { std::roundf(X), std::roundf(Y), std::roundf(Z) };
|
||||
}
|
||||
Vec3 Vec3::round(int decimals) {
|
||||
vec3 vec3::round(int decimals) {
|
||||
float power = std::powf(10.0f, static_cast<float>(decimals));
|
||||
return { std::roundf(X * power) / power, std::roundf(Y * power) / power, std::roundf(Z * power) / power };
|
||||
}
|
||||
|
||||
bool Vec3::isDefault() const {
|
||||
bool vec3::isDefault() const {
|
||||
return Utils::Values::are_samef(X, 0.0f) && Utils::Values::are_samef(Y, 0.0f) && Utils::Values::are_samef(Z, 0.0f);
|
||||
}
|
||||
}
|
@ -1,65 +1,65 @@
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
#include <EGSDK\Vec4.h>
|
||||
#include <EGSDK\vec4.h>
|
||||
#include <EGSDK\Utils\Values.h>
|
||||
|
||||
namespace EGSDK {
|
||||
Vec4::Vec4() : X(0.0f), Y(0.0f), Z(0.0f), W(0.0f) {}
|
||||
Vec4::Vec4(float x, float y, float z, float w) : X(x), Y(y), Z(z), W(w) {}
|
||||
vec4::vec4() : X(0.0f), Y(0.0f), Z(0.0f), W(0.0f) {}
|
||||
vec4::vec4(float x, float y, float z, float w) : X(x), Y(y), Z(z), W(w) {}
|
||||
|
||||
bool Vec4::operator==(const Vec4& v) const {
|
||||
bool vec4::operator==(const vec4& v) const {
|
||||
return Utils::Values::are_samef(X, v.X) && Utils::Values::are_samef(Y, v.Y) && Utils::Values::are_samef(Z, v.Z) && Utils::Values::are_samef(W, v.W);
|
||||
}
|
||||
Vec4& Vec4::operator+=(const Vec4& v) {
|
||||
vec4& vec4::operator+=(const vec4& v) {
|
||||
X += v.X;
|
||||
Y += v.Y;
|
||||
Z += v.Z;
|
||||
W += v.W;
|
||||
return *this;
|
||||
}
|
||||
Vec4& Vec4::operator-=(const Vec4& v) {
|
||||
vec4& vec4::operator-=(const vec4& v) {
|
||||
X -= v.X;
|
||||
Y -= v.Y;
|
||||
Z -= v.Z;
|
||||
W -= v.W;
|
||||
return *this;
|
||||
}
|
||||
Vec4 Vec4::operator+(const Vec4& v) const {
|
||||
vec4 vec4::operator+(const vec4& v) const {
|
||||
return { X + v.X, Y + v.Y, Z + v.Z, W + v.W };
|
||||
}
|
||||
Vec4 Vec4::operator-(const Vec4& v) const {
|
||||
vec4 vec4::operator-(const vec4& v) const {
|
||||
return { X - v.X, Y - v.Y, Z - v.Z, W - v.W };
|
||||
}
|
||||
Vec4 Vec4::operator*(const Vec4& scalar) const {
|
||||
vec4 vec4::operator*(const vec4& scalar) const {
|
||||
return { X * scalar.X, Y * scalar.Y, Z * scalar.Z, W * scalar.W };
|
||||
}
|
||||
Vec4 Vec4::operator/(const Vec4& scalar) const {
|
||||
vec4 vec4::operator/(const vec4& scalar) const {
|
||||
return { X / scalar.X, Y / scalar.Y, Z / scalar.Z, W / scalar.W };
|
||||
}
|
||||
Vec4 Vec4::operator*(float scalar) const {
|
||||
vec4 vec4::operator*(float scalar) const {
|
||||
return { X * scalar, Y * scalar, Z * scalar, W * scalar };
|
||||
}
|
||||
Vec4 Vec4::operator/(float scalar) const {
|
||||
vec4 vec4::operator/(float scalar) const {
|
||||
return { X / scalar, Y / scalar, Z / scalar, W / scalar };
|
||||
}
|
||||
|
||||
Vec4 Vec4::operator-() const {
|
||||
vec4 vec4::operator-() const {
|
||||
return { -X, -Y, -Z, -W };
|
||||
}
|
||||
|
||||
Vec4 Vec4::normalize() const {
|
||||
vec4 vec4::normalize() const {
|
||||
float length = std::sqrt(X * X + Y * Y + Z * Z + W * W);
|
||||
return { X / length, Y / length, Z / length, W / length };
|
||||
}
|
||||
Vec4 Vec4::round() {
|
||||
vec4 vec4::round() {
|
||||
return { std::roundf(X), std::roundf(Y), std::roundf(Z), std::roundf(W) };
|
||||
}
|
||||
Vec4 Vec4::round(int decimals) {
|
||||
vec4 vec4::round(int decimals) {
|
||||
float power = std::powf(10.0f, static_cast<float>(decimals));
|
||||
return { std::roundf(X * power) / power, std::roundf(Y * power) / power, std::roundf(Z * power) / power, std::roundf(W * power) / power };
|
||||
}
|
||||
|
||||
bool Vec4::isDefault() const {
|
||||
bool vec4::isDefault() const {
|
||||
return Utils::Values::are_samef(X, 0.0f) && Utils::Values::are_samef(Y, 0.0f) && Utils::Values::are_samef(Z, 0.0f) && Utils::Values::are_samef(W, 0.0f);
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <EGSDK\Vec3.h>
|
||||
#include <EGSDK\vec3.h>
|
||||
#include <EGSDK\Utils\Hook.h>
|
||||
|
||||
namespace EGT::Engine {
|
||||
|
@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
#include <EGSDK\Vec3.h>
|
||||
#include <EGSDK\vec3.h>
|
||||
#include <EGT\Core\Core.h>
|
||||
#include <EGT\Menu\Menu.h>
|
||||
|
||||
namespace EGT::Menu {
|
||||
namespace Camera {
|
||||
extern EGSDK::Vec3 cameraOffset;
|
||||
extern EGSDK::vec3 cameraOffset;
|
||||
extern float firstPersonFOV;
|
||||
extern float originalFirstPersonFOVBeforeZoomIn;
|
||||
extern ImGui::KeyBindOption firstPersonZoomIn;
|
||||
|
@ -1,21 +1,21 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include <EGT\Menu\Menu.h>
|
||||
#include <EGSDK\Vec3.h>
|
||||
#include <EGSDK\Vec2.h>
|
||||
#include <EGSDK\vec3.h>
|
||||
#include <EGSDK\vec2.h>
|
||||
|
||||
namespace EGT::Menu {
|
||||
namespace Teleport {
|
||||
struct TeleportLocation {
|
||||
std::string name{};
|
||||
EGSDK::Vec3 pos{};
|
||||
EGSDK::Vec2 orientation{};
|
||||
EGSDK::vec3 pos{};
|
||||
EGSDK::vec2 orientation{};
|
||||
};
|
||||
|
||||
extern std::string savedTeleportLocationsStr;
|
||||
extern std::vector<TeleportLocation> savedTeleportLocations;
|
||||
|
||||
extern EGSDK::Vec3 waypointCoords;
|
||||
extern EGSDK::vec3 waypointCoords;
|
||||
extern bool* waypointIsSet;
|
||||
extern bool justTeleportedToWaypoint;
|
||||
|
||||
|
@ -17,11 +17,11 @@ namespace EGT::Engine {
|
||||
namespace Hooks {
|
||||
#pragma region MoveCameraFromForwardUpPos
|
||||
static bool switchedFreeCamByGamePause = false;
|
||||
static EGSDK::Vec3 freeCamPosBeforeGamePause{};
|
||||
static EGSDK::Vec3 freeCamTargetDirBeforeGamePause{};
|
||||
static EGSDK::Vec3 freeCamUpDirBeforeGamePause{};
|
||||
static EGSDK::vec3 freeCamPosBeforeGamePause{};
|
||||
static EGSDK::vec3 freeCamTargetDirBeforeGamePause{};
|
||||
static EGSDK::vec3 freeCamUpDirBeforeGamePause{};
|
||||
|
||||
static EGSDK::Utils::Hook::MHook<void*, void(*)(void*, EGSDK::Vec3*, EGSDK::Vec3*, EGSDK::Vec3*), void*, EGSDK::Vec3*, EGSDK::Vec3*, EGSDK::Vec3*> MoveCameraFromForwardUpPosHook{ "MoveCameraFromForwardUpPos", &EGSDK::OffsetManager::Get_MoveCameraFromForwardUpPos, [](void* pCBaseCamera, EGSDK::Vec3* targetDirection, EGSDK::Vec3* upDirection, EGSDK::Vec3* pos) -> void {
|
||||
static EGSDK::Utils::Hook::MHook<void*, void(*)(void*, EGSDK::vec3*, EGSDK::vec3*, EGSDK::vec3*), void*, EGSDK::vec3*, EGSDK::vec3*, EGSDK::vec3*> MoveCameraFromForwardUpPosHook{ "MoveCameraFromForwardUpPos", &EGSDK::OffsetManager::Get_MoveCameraFromForwardUpPos, [](void* pCBaseCamera, EGSDK::vec3* targetDirection, EGSDK::vec3* upDirection, EGSDK::vec3* pos) -> void {
|
||||
auto iLevel = EGSDK::GamePH::LevelDI::Get();
|
||||
if (!iLevel || !iLevel->IsLoaded())
|
||||
return MoveCameraFromForwardUpPosHook.ExecuteCallbacksWithOriginal(pCBaseCamera, targetDirection, upDirection, pos);
|
||||
@ -53,7 +53,7 @@ namespace EGT::Engine {
|
||||
if ((!Menu::Camera::thirdPersonCamera.GetValue() && Menu::Camera::cameraOffset.isDefault()) || Menu::Camera::photoMode.GetValue() || Menu::Camera::freeCam.GetValue())
|
||||
return MoveCameraFromForwardUpPosHook.ExecuteCallbacksWithOriginal(pCBaseCamera, targetDirection, upDirection, pos);
|
||||
|
||||
EGSDK::Vec3 forwardVec, upVec, leftVec = {};
|
||||
EGSDK::vec3 forwardVec, upVec, leftVec = {};
|
||||
viewCam->GetForwardVector(&forwardVec);
|
||||
viewCam->GetUpVector(&upVec);
|
||||
viewCam->GetLeftVector(&leftVec);
|
||||
@ -62,7 +62,7 @@ namespace EGT::Engine {
|
||||
const auto normUpVec = upVec.normalize();
|
||||
const auto normLeftVec = leftVec.normalize();
|
||||
|
||||
EGSDK::Vec3 newCamPos = *pos;
|
||||
EGSDK::vec3 newCamPos = *pos;
|
||||
|
||||
if (!Menu::Camera::cameraOffset.isDefault() && !Menu::Camera::thirdPersonCamera.GetValue()) {
|
||||
newCamPos -= normLeftVec * Menu::Camera::cameraOffset.X;
|
||||
@ -348,14 +348,14 @@ namespace EGT::Engine {
|
||||
}
|
||||
case EGSDK::Engine::VarType::Vec3:
|
||||
{
|
||||
auto value = customCVar->GetValue<EGSDK::Vec3>();
|
||||
auto value = customCVar->GetValue<EGSDK::vec3>();
|
||||
if (value)
|
||||
cVar->SetValue(*value);
|
||||
break;
|
||||
}
|
||||
case EGSDK::Engine::VarType::Vec4:
|
||||
{
|
||||
auto value = customCVar->GetValue<EGSDK::Vec4>();
|
||||
auto value = customCVar->GetValue<EGSDK::vec4>();
|
||||
if (value)
|
||||
cVar->SetValue(*value);
|
||||
break;
|
||||
|
@ -196,7 +196,7 @@ namespace EGT::GamePH {
|
||||
#pragma endregion
|
||||
|
||||
#pragma region SetNewWaypointLocation
|
||||
static EGSDK::Utils::Hook::MHook<void*, uint64_t(*)(uint64_t, int, EGSDK::Vec3*), uint64_t, int, EGSDK::Vec3*> SetNewWaypointLocationHook{ "SetNewWaypointLocation", &EGSDK::OffsetManager::Get_SetNewWaypointLocation, [](uint64_t pLogicalPlayer, int a2, EGSDK::Vec3* newWaypointLoc) -> uint64_t {
|
||||
static EGSDK::Utils::Hook::MHook<void*, uint64_t(*)(uint64_t, int, EGSDK::vec3*), uint64_t, int, EGSDK::vec3*> SetNewWaypointLocationHook{ "SetNewWaypointLocation", &EGSDK::OffsetManager::Get_SetNewWaypointLocation, [](uint64_t pLogicalPlayer, int a2, EGSDK::vec3* newWaypointLoc) -> uint64_t {
|
||||
uint64_t result = SetNewWaypointLocationHook.ExecuteCallbacksWithOriginal(pLogicalPlayer, a2, newWaypointLoc);
|
||||
Menu::Teleport::waypointCoords = *newWaypointLoc;
|
||||
if (EGSDK::OffsetManager::Get_SetNewWaypointLocationWaypointIsSetBoolInstr()) {
|
||||
|
@ -18,7 +18,7 @@ namespace EGT::Menu {
|
||||
static constexpr float baseSafezoneFOVReduction = -10.0f;
|
||||
static constexpr float baseSprintHeadCorrectionFactor = 0.55f;
|
||||
|
||||
EGSDK::Vec3 cameraOffset{};
|
||||
EGSDK::vec3 cameraOffset{};
|
||||
float firstPersonFOV = baseFOV;
|
||||
float originalFirstPersonFOVBeforeZoomIn = firstPersonFOV;
|
||||
ImGui::KeyBindOption firstPersonZoomIn{ false, 'Q', false };
|
||||
|
@ -303,7 +303,7 @@ namespace EGT::Menu {
|
||||
if (!freeCam)
|
||||
return;
|
||||
|
||||
EGSDK::Vec3 camPos{};
|
||||
EGSDK::vec3 camPos{};
|
||||
freeCam->GetPosition(&camPos);
|
||||
if (!camPos.isDefault())
|
||||
playerCharacter->MoveCharacter(camPos);
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <spdlog\spdlog.h>
|
||||
#include <ImGui\imgui_hotkey.h>
|
||||
#include <ImGui\imguiex.h>
|
||||
#include <EGSDK\Vec2.h>
|
||||
#include <EGSDK\vec2.h>
|
||||
#include <EGSDK\Engine\CBulletPhysicsCharacter.h>
|
||||
#include <EGSDK\GamePH\FreeCamera.h>
|
||||
#include <EGSDK\GamePH\PlayerDI_PH.h>
|
||||
@ -19,10 +19,10 @@ namespace EGT::Menu {
|
||||
static int selectedTPLocation = -1;
|
||||
static char newLocationName[125]{};
|
||||
|
||||
EGSDK::Vec3 waypointCoords{};
|
||||
EGSDK::vec3 waypointCoords{};
|
||||
bool* waypointIsSet = nullptr;
|
||||
bool justTeleportedToWaypoint = false;
|
||||
static EGSDK::Vec3 teleportCoords{};
|
||||
static EGSDK::vec3 teleportCoords{};
|
||||
|
||||
ImGui::KeyBindOption teleportToSelectedLocation{ false, VK_F9 };
|
||||
ImGui::KeyBindOption teleportToCoords{ false, VK_NONE };
|
||||
@ -95,7 +95,7 @@ namespace EGT::Menu {
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
static std::string GetFormattedPosition(const EGSDK::Vec3* position) {
|
||||
static std::string GetFormattedPosition(const EGSDK::vec3* position) {
|
||||
if (!position || position->isDefault())
|
||||
return "X: 0.00, Y: 0.00, Z: 0.00";
|
||||
static std::string formattedStr{};
|
||||
@ -129,7 +129,7 @@ namespace EGT::Menu {
|
||||
teleportCoords = playerCharacter->playerPos;
|
||||
}
|
||||
}
|
||||
static bool TeleportPlayerTo(const EGSDK::Vec3& pos, const EGSDK::Vec2& orientation = {}) {
|
||||
static bool TeleportPlayerTo(const EGSDK::vec3& pos, const EGSDK::vec2& orientation = {}) {
|
||||
if (isTeleportationDisabled() || pos.isDefault()) {
|
||||
if (pos.isDefault())
|
||||
SPDLOG_ERROR("Teleport position was default, couldn't teleport player");
|
||||
@ -218,8 +218,8 @@ namespace EGT::Menu {
|
||||
}
|
||||
}
|
||||
|
||||
EGSDK::Vec3 playerPos{};
|
||||
EGSDK::Vec2 playerOrientation{};
|
||||
EGSDK::vec3 playerPos{};
|
||||
EGSDK::vec2 playerOrientation{};
|
||||
|
||||
if (Camera::freeCam.GetValue()) {
|
||||
EGSDK::GamePH::FreeCamera* freeCam = EGSDK::GamePH::FreeCamera::Get();
|
||||
@ -231,9 +231,9 @@ namespace EGT::Menu {
|
||||
return false;
|
||||
}
|
||||
|
||||
EGSDK::Vec3 camPos{};
|
||||
EGSDK::vec3 camPos{};
|
||||
freeCam->GetPosition(&camPos);
|
||||
EGSDK::Vec3 camForwardVec{};
|
||||
EGSDK::vec3 camForwardVec{};
|
||||
freeCam->GetForwardVector(&camForwardVec);
|
||||
if (camPos.isDefault() || camForwardVec.isDefault()) {
|
||||
ImGui::CloseCurrentPopup();
|
||||
@ -376,7 +376,7 @@ namespace EGT::Menu {
|
||||
auto playerCharacter = EGSDK::Engine::CBulletPhysicsCharacter::Get();
|
||||
auto freeCam = EGSDK::GamePH::FreeCamera::Get();
|
||||
|
||||
EGSDK::Vec3 camPos{};
|
||||
EGSDK::vec3 camPos{};
|
||||
ImGui::Text("Player Position: %s", GetFormattedPosition(playerCharacter ? &*playerCharacter->playerPos.getPointer() : nullptr).data());
|
||||
ImGui::Text("Free Camera Position: %s", GetFormattedPosition(freeCam && Camera::freeCam.GetValue() ? freeCam->GetPosition(&camPos) : nullptr).data());
|
||||
ImGui::Text("Waypoint Position: %s", GetFormattedPosition(waypointIsSet && *waypointIsSet && !waypointCoords.isDefault() ? &waypointCoords : nullptr).data());
|
||||
|
@ -37,15 +37,15 @@ namespace EGT {
|
||||
|
||||
UpdateFilteredList();
|
||||
|
||||
//ImGui::Text("Total listed variables: %zu", filteredVars.size());
|
||||
ImGui::Text("Total listed variables: %zu", filteredVars.size());
|
||||
|
||||
//ImGuiListClipper clipper{};
|
||||
//clipper.Begin(filteredVars.size());
|
||||
ImGuiListClipper clipper{};
|
||||
clipper.Begin(filteredVars.size());
|
||||
|
||||
//while (clipper.Step()) {
|
||||
// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; ++i)
|
||||
// RenderVar(filteredVars[i]);
|
||||
//}
|
||||
while (clipper.Step()) {
|
||||
for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; ++i)
|
||||
RenderVar(filteredVars[i]);
|
||||
}
|
||||
|
||||
ImGui::Unindent();
|
||||
}
|
||||
@ -69,10 +69,10 @@ namespace EGT {
|
||||
var->RestoreVarToDefault<int>(restoreVarsToSavedVarsEnabled);
|
||||
break;
|
||||
case EGSDK::Engine::VarType::Vec3:
|
||||
var->RestoreVarToDefault<EGSDK::Vec3>(restoreVarsToSavedVarsEnabled);
|
||||
var->RestoreVarToDefault<EGSDK::vec3>(restoreVarsToSavedVarsEnabled);
|
||||
break;
|
||||
case EGSDK::Engine::VarType::Vec4:
|
||||
var->RestoreVarToDefault<EGSDK::Vec4>(restoreVarsToSavedVarsEnabled);
|
||||
var->RestoreVarToDefault<EGSDK::vec4>(restoreVarsToSavedVarsEnabled);
|
||||
break;
|
||||
case EGSDK::Engine::VarType::Bool:
|
||||
var->RestoreVarToDefault<bool>(restoreVarsToSavedVarsEnabled);
|
||||
@ -104,10 +104,10 @@ namespace EGT {
|
||||
var->SaveVarAsDefault<int>();
|
||||
break;
|
||||
case EGSDK::Engine::VarType::Vec3:
|
||||
var->SaveVarAsDefault<EGSDK::Vec3>();
|
||||
var->SaveVarAsDefault<EGSDK::vec3>();
|
||||
break;
|
||||
case EGSDK::Engine::VarType::Vec4:
|
||||
var->SaveVarAsDefault<EGSDK::Vec4>();
|
||||
var->SaveVarAsDefault<EGSDK::vec4>();
|
||||
break;
|
||||
case EGSDK::Engine::VarType::Bool:
|
||||
var->SaveVarAsDefault<bool>();
|
||||
@ -173,7 +173,10 @@ namespace EGT {
|
||||
case EGSDK::Engine::VarType::Float:
|
||||
{
|
||||
auto value = var->GetValue<float>();
|
||||
if (!value) return;
|
||||
if (!value) {
|
||||
ImGui::EndDisabled();
|
||||
return;
|
||||
}
|
||||
float newValue = *value;
|
||||
if (ImGui::InputFloat(var->GetName(), &newValue))
|
||||
var->SetValueFromList(newValue);
|
||||
@ -182,8 +185,10 @@ namespace EGT {
|
||||
case EGSDK::Engine::VarType::Int:
|
||||
{
|
||||
auto value = var->GetValue<int>();
|
||||
if (!value)
|
||||
if (!value) {
|
||||
ImGui::EndDisabled();
|
||||
return;
|
||||
}
|
||||
auto newValue = *value;
|
||||
if (ImGui::InputInt(var->GetName(), &newValue))
|
||||
var->SetValueFromList(newValue);
|
||||
@ -191,9 +196,11 @@ namespace EGT {
|
||||
}
|
||||
case EGSDK::Engine::VarType::Vec3:
|
||||
{
|
||||
auto value = var->GetValue<EGSDK::Vec3>();
|
||||
if (!value)
|
||||
auto value = var->GetValue<EGSDK::vec3>();
|
||||
if (!value) {
|
||||
ImGui::EndDisabled();
|
||||
return;
|
||||
}
|
||||
auto newValue = *value;
|
||||
if (ImGui::InputFloat3(var->GetName(), reinterpret_cast<float*>(&newValue)))
|
||||
var->SetValueFromList(newValue);
|
||||
@ -201,9 +208,11 @@ namespace EGT {
|
||||
}
|
||||
case EGSDK::Engine::VarType::Vec4:
|
||||
{
|
||||
auto value = var->GetValue<EGSDK::Vec4>();
|
||||
if (!value)
|
||||
auto value = var->GetValue<EGSDK::vec4>();
|
||||
if (!value) {
|
||||
ImGui::EndDisabled();
|
||||
return;
|
||||
}
|
||||
auto newValue = *value;
|
||||
if (ImGui::InputFloat4(var->GetName(), reinterpret_cast<float*>(&newValue)))
|
||||
var->SetValueFromList(newValue);
|
||||
@ -212,7 +221,10 @@ namespace EGT {
|
||||
case EGSDK::Engine::VarType::Bool:
|
||||
{
|
||||
auto value = var->GetValue<bool>();
|
||||
if (!value) return;
|
||||
if (!value) {
|
||||
ImGui::EndDisabled();
|
||||
return;
|
||||
}
|
||||
bool newValue = *value;
|
||||
if (ImGui::Checkbox(var->GetName(), &newValue))
|
||||
var->SetValueFromList(newValue);
|
||||
|
@ -55,22 +55,22 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\x64\Release\</OutDir>
|
||||
<IntDir>x64\Release\</IntDir>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetName>winmm</TargetName>
|
||||
<TargetExt>.dll</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\x64\Debug\</OutDir>
|
||||
<IntDir>x64\Debug\</IntDir>
|
||||
<OutDir>$(SolutionDir)$(Platform)\Debug\</OutDir>
|
||||
<IntDir>$(Platform)\Debug\</IntDir>
|
||||
<TargetName>winmm</TargetName>
|
||||
<TargetExt>.dll</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\x64\Debug\</OutDir>
|
||||
<IntDir>x64\Debug\</IntDir>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetName>winmm</TargetName>
|
||||
<TargetExt>.dll</TargetExt>
|
||||
</PropertyGroup>
|
||||
|
Reference in New Issue
Block a user