-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decoded Several Rendering Structs & Small Adjustments
- Loading branch information
Showing
12 changed files
with
393 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#pragma once | ||
|
||
#include <RED4ext/Common.hpp> | ||
|
||
#include <cstdint> | ||
#include <d3d12.h> | ||
#include <wrl/client.h> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
#pragma once | ||
|
||
#ifdef RED4EXT_STATIC_LIB | ||
#include <RED4ext/RenderProxy.hpp> | ||
#endif | ||
|
||
#include <RED4ext/Relocation.hpp> | ||
#include <RED4ext/Detail/AddressHashes.hpp> | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_00() | ||
{ | ||
static UniversalRelocFunc<void (*)(void)> func(Detail::AddressHashes::IRenderProxy_sub_00); | ||
func(); | ||
} | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_08() | ||
{ | ||
static UniversalRelocFunc<void (*)(IRenderProxy*)> func(Detail::AddressHashes::IRenderProxy_sub_08); | ||
func(this); | ||
} | ||
|
||
RED4EXT_INLINE uint8_t RED4ext::IRenderProxy::sub_18() | ||
{ | ||
static UniversalRelocFunc<uint8_t (*)(IRenderProxy*)> func(Detail::AddressHashes::IRenderProxy_sub_18); | ||
return func(this); | ||
} | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_20() | ||
{ | ||
} | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_28() | ||
{ | ||
} | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_30() | ||
{ | ||
} | ||
|
||
RED4EXT_INLINE bool RED4ext::IRenderProxy::sub_38() | ||
{ | ||
return false; | ||
} | ||
|
||
RED4EXT_INLINE bool RED4ext::IRenderProxy::sub_40() | ||
{ | ||
return true; | ||
} | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_48() | ||
{ | ||
} | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_50() | ||
{ | ||
} | ||
|
||
RED4EXT_INLINE uint32_t RED4ext::IRenderProxy::sub_58() | ||
{ | ||
static UniversalRelocFunc<uint32_t (*)(IRenderProxy*)> func(Detail::AddressHashes::IRenderProxy_sub_58); | ||
return func(this); | ||
} | ||
|
||
RED4EXT_INLINE float RED4ext::IRenderProxy::sub_60() | ||
{ | ||
static UniversalRelocFunc<float (*)(IRenderProxy*)> func(Detail::AddressHashes::IRenderProxy_sub_60); | ||
return func(this); | ||
} | ||
|
||
RED4EXT_INLINE uint8_t RED4ext::IRenderProxy::sub_68() | ||
{ | ||
return 0; | ||
} | ||
|
||
RED4EXT_INLINE uint8_t RED4ext::IRenderProxy::sub_70() | ||
{ | ||
return 0; | ||
} | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_78(void* a1) | ||
{ | ||
static UniversalRelocFunc<void (*)(IRenderProxy*, void*)> func(Detail::AddressHashes::IRenderProxy_sub_78); | ||
func(this, a1); | ||
} | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_80(void* a1, void* a2) | ||
{ | ||
static UniversalRelocFunc<void (*)(IRenderProxy*, void*, void*)> func(Detail::AddressHashes::IRenderProxy_sub_80); | ||
func(this, a1, a2); | ||
} | ||
|
||
RED4EXT_INLINE bool RED4ext::IRenderProxy::sub_88(void* a1, void* a2) | ||
{ | ||
static UniversalRelocFunc<bool (*)(IRenderProxy*, void*, void*)> func(Detail::AddressHashes::IRenderProxy_sub_88); | ||
return func(this, a1, a2); | ||
} | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_90(void* a1) | ||
{ | ||
static UniversalRelocFunc<bool (*)(IRenderProxy*, void*)> func(Detail::AddressHashes::IRenderProxy_sub_90); | ||
func(this, a1); | ||
} | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_98(void* a1) | ||
{ | ||
static UniversalRelocFunc<void (*)(IRenderProxy*, void*)> func(Detail::AddressHashes::IRenderProxy_sub_98); | ||
func(this, a1); | ||
} | ||
|
||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_A0() | ||
{ | ||
} | ||
|
||
RED4EXT_INLINE uint8_t RED4ext::IRenderProxy::sub_A8(void* a1) | ||
{ | ||
static UniversalRelocFunc<uint8_t (*)(IRenderProxy*, void*)> func(Detail::AddressHashes::IRenderProxy_sub_A8); | ||
return func(this, a1); | ||
} | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_B0(void* a1) | ||
{ | ||
static UniversalRelocFunc<void (*)(IRenderProxy*, void*)> func(Detail::AddressHashes::IRenderProxy_sub_B0); | ||
func(this, a1); | ||
} | ||
|
||
RED4EXT_INLINE bool RED4ext::IRenderProxy::sub_B8() | ||
{ | ||
return false; | ||
} | ||
|
||
RED4EXT_INLINE bool RED4ext::IRenderProxy::sub_C0() | ||
{ | ||
return false; | ||
} | ||
|
||
RED4EXT_INLINE uint8_t RED4ext::IRenderProxy::sub_C8() | ||
{ | ||
return 0; | ||
} | ||
|
||
RED4EXT_INLINE uint8_t RED4ext::IRenderProxy::sub_D0() | ||
{ | ||
return 0; | ||
} | ||
|
||
RED4EXT_INLINE uint8_t RED4ext::IRenderProxy::sub_D8() | ||
{ | ||
return 0; | ||
} | ||
|
||
RED4EXT_INLINE uint8_t RED4ext::IRenderProxy::sub_E0() | ||
{ | ||
return 0; | ||
} | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_E8() | ||
{ | ||
} | ||
|
||
RED4EXT_INLINE void RED4ext::IRenderProxy::sub_F0() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
|
||
#include <RED4ext/Common.hpp> | ||
#include <RED4ext/RenderTypes.hpp> | ||
#include <RED4ext/Scripting/Natives/Generated/IRenderProxyCustomData.hpp> | ||
|
||
namespace RED4ext | ||
{ | ||
struct IRenderProxyBase | ||
{ | ||
virtual void sub_00(); // 00 | ||
virtual void sub_08(); // 08 | ||
virtual ~IRenderProxy() = default; // 10 | ||
virtual uint8_t sub_18(); // 18 | ||
virtual void sub_20(); // 20 | ||
virtual void sub_28(); // 28 | ||
virtual void sub_30(); // 30 | ||
virtual bool sub_38(); // 38 | ||
virtual bool sub_40(); // 40 | ||
virtual void sub_48(); // 48 | ||
virtual void sub_50(); // 50 | ||
virtual uint32_t sub_58(); // 58 | ||
virtual float sub_60(); // 60 | ||
virtual uint8_t sub_68(); // 68 | ||
virtual uint8_t sub_70(); // 70 | ||
virtual void sub_78(void* a1); // 78 | ||
virtual void sub_80(void* a1, void* a2); // 80 | ||
virtual bool sub_88(void* a1, void* a2); // 88 | ||
virtual void sub_90(void* a1); // 90 | ||
virtual void sub_98(void* a1); // 98 | ||
virtual void sub_A0(); // A0 | ||
virtual uint8_t sub_A8(void* a1); // A8 | ||
virtual void sub_B0(void* a1); // B0 | ||
virtual bool sub_B8(); // B8 | ||
virtual bool sub_C0(); // C0 | ||
virtual uint8_t sub_C8(); // C8 | ||
virtual uint8_t sub_D0(); // D0 | ||
virtual uint8_t sub_D8(); // D8 | ||
virtual uint8_t sub_E0(); // E0 | ||
virtual void sub_E8(); // E8 | ||
virtual void sub_F0(); // F0 | ||
|
||
uint8_t unk08[0x48 - 0x08]; // 08 | ||
IRenderProxyCustomData* customData; // 48 | ||
uint8_t unk50[0x98 - 0x50]; // 50 | ||
}; | ||
RED4EXT_ASSERT_SIZE(IRenderProxy, 0x98); | ||
|
||
struct IRenderProxy : IRenderProxyBase | ||
{ | ||
virtual void sub_F8() = 0; // F8 | ||
}; | ||
RED4EXT_ASSERT_SIZE(IRenderProxyImpl, 0x98); | ||
|
||
struct CRenderProxy : IRenderProxy | ||
{ | ||
uint8_t unk98[0xb8 - 0x98]; // 98 | ||
}; | ||
RED4EXT_ASSERT_SIZE(CRenderProxy, 0xb8); | ||
|
||
struct CRenderProxy_Mesh : CRenderProxy | ||
{ | ||
uint8_t unkB8[0xd8 - 0xb8]; // B8 | ||
CRenderMesh* renderMesh; // D8 | ||
uint8_t unkE0[0x1c0 - 0xe0]; // E0 | ||
}; | ||
RED4EXT_ASSERT_SIZE(CRenderProxy_Mesh, 0x1c0); | ||
|
||
struct RenderProxy_Handle | ||
{ | ||
virtual ~RenderProxy_Handle() = 0; | ||
|
||
void* unk08; | ||
IRenderProxy* renderProxy; | ||
void* unk18; | ||
uint8_t unk20[0x28 - 0x20]; | ||
}; | ||
RED4EXT_ASSERT_SIZE(RenderProxy_Handle, 0x28); | ||
} // namespace RED4ext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
|
||
#include <RED4ext/Common.hpp> | ||
#include <RED4ext/Scripting/Natives/Vector4.hpp> | ||
#include <RED4ext/Scripting/Natives/Generated/IRenderProxyCustomData.hpp> | ||
#include <RED4ext/Scripting/Natives/Generated/rend/Chunk.hpp> | ||
|
||
namespace RED4ext | ||
{ | ||
struct CRenderMesh | ||
{ | ||
uint8_t unk00[0x10 - 0x00]; // 00 | ||
Vector4 quantizationScale; // 10 | ||
Vector4 quantizationBias; // 20 | ||
uint32_t vertexBufferID; // 30 - GpuApi buffer ID | ||
uint32_t indexBufferID; // 34 | ||
uint8_t unk38[0xa0 - 0x38]; // 38 | ||
DynArray<rend::Chunk> chunks; // A0 | ||
uint8_t unkB0[0x158 - 0xb0]; // B0 | ||
}; | ||
RED4EXT_ASSERT_SIZE(CRenderMesh, 0x158); | ||
|
||
struct CRenderMorphTargetMesh : CRenderMesh | ||
{ | ||
uint8_t unk158[0x168 - 0x158]; // 158 | ||
}; | ||
RED4EXT_ASSERT_SIZE(CRenderMorphTargetMesh, 0x168); | ||
} // namespace RED4ext |
Oops, something went wrong.