mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fix build errors caused by 'CreateTextureResource'
Moved declarations to source file; this is currently only used by the engine.
This commit is contained in:
parent
81182f078b
commit
e468fa1065
@ -156,8 +156,10 @@ HRESULT __stdcall ResizeBuffers(IDXGISwapChain* pSwapChain, UINT nBufferCount, U
|
|||||||
// Disable stack warning, tells us to move more data to the heap instead. Not really possible with 'initialData' here. Since its parallel processed.
|
// Disable stack warning, tells us to move more data to the heap instead. Not really possible with 'initialData' here. Since its parallel processed.
|
||||||
// Also disable 6378, complains that there is no control path where it would use 'nullptr', if that happens 'Error' will be called though.
|
// Also disable 6378, complains that there is no control path where it would use 'nullptr', if that happens 'Error' will be called though.
|
||||||
#pragma warning( disable : 6262 6387)
|
#pragma warning( disable : 6262 6387)
|
||||||
|
inline CMemory p_CreateTextureResource;
|
||||||
|
inline auto v_CreateTextureResource = p_CreateTextureResource.RCast<void(*)(TextureHeader_t*, INT_PTR)>();
|
||||||
constexpr uint32_t ALIGNMENT_SIZE = 15; // Creates 2D texture and shader resource from textureHeader and imageData.
|
constexpr uint32_t ALIGNMENT_SIZE = 15; // Creates 2D texture and shader resource from textureHeader and imageData.
|
||||||
void CreateTextureResource(TextureHeader_t* textureHeader, int64_t imageData)
|
void CreateTextureResource(TextureHeader_t* textureHeader, INT_PTR imageData)
|
||||||
{
|
{
|
||||||
if (textureHeader->m_nDepth && !textureHeader->m_nHeight) // Return never gets hit. Maybe its some debug check?
|
if (textureHeader->m_nDepth && !textureHeader->m_nHeight) // Return never gets hit. Maybe its some debug check?
|
||||||
return;
|
return;
|
||||||
|
@ -10,7 +10,6 @@ void DirectX_Shutdown();
|
|||||||
|
|
||||||
extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||||
extern HRESULT __stdcall Present(IDXGISwapChain* pSwapChain, UINT nSyncInterval, UINT nFlags);
|
extern HRESULT __stdcall Present(IDXGISwapChain* pSwapChain, UINT nSyncInterval, UINT nFlags);
|
||||||
extern void CreateTextureResource(TextureHeader_t* textureHeader, int64_t imageData);
|
|
||||||
extern bool LoadTextureBuffer(unsigned char* buffer, int len, ID3D11ShaderResourceView** out_srv, int* out_width, int* out_height);
|
extern bool LoadTextureBuffer(unsigned char* buffer, int len, ID3D11ShaderResourceView** out_srv, int* out_width, int* out_height);
|
||||||
|
|
||||||
extern void ResetInput();
|
extern void ResetInput();
|
||||||
@ -21,9 +20,6 @@ extern bool PanelsVisible();
|
|||||||
typedef HRESULT(__stdcall* IDXGISwapChainPresent)(IDXGISwapChain* pSwapChain, UINT nSyncInterval, UINT nFlags);
|
typedef HRESULT(__stdcall* IDXGISwapChainPresent)(IDXGISwapChain* pSwapChain, UINT nSyncInterval, UINT nFlags);
|
||||||
typedef HRESULT(__stdcall* IDXGIResizeBuffers) (IDXGISwapChain* pSwapChain, UINT nBufferCount, UINT nWidth, UINT nHeight, DXGI_FORMAT dxFormat, UINT nSwapChainFlags);
|
typedef HRESULT(__stdcall* IDXGIResizeBuffers) (IDXGISwapChain* pSwapChain, UINT nBufferCount, UINT nWidth, UINT nHeight, DXGI_FORMAT dxFormat, UINT nSwapChainFlags);
|
||||||
|
|
||||||
inline CMemory p_CreateTextureResource;
|
|
||||||
inline auto v_CreateTextureResource = p_CreateTextureResource.RCast<void(*)(TextureHeader_t*, int64_t)>();
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Globals
|
// Globals
|
||||||
inline UINT g_nWindowRect[2];
|
inline UINT g_nWindowRect[2];
|
||||||
@ -117,7 +113,7 @@ inline IDXGISwapChain** g_ppSwapChain = nullptr;
|
|||||||
class VDXGI : public IDetour
|
class VDXGI : public IDetour
|
||||||
{
|
{
|
||||||
virtual void GetAdr(void) const;
|
virtual void GetAdr(void) const;
|
||||||
virtual void GetFun(void) const { }
|
virtual void GetFun(void) const;
|
||||||
virtual void GetVar(void) const;
|
virtual void GetVar(void) const;
|
||||||
virtual void GetCon(void) const { }
|
virtual void GetCon(void) const { }
|
||||||
virtual void Attach(void) const;
|
virtual void Attach(void) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user