Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create wrapper stub and wrap more dlls
- Created a new wrapper stub to allow loading dxwrapper.dll from memory - Added MemoryModule to load DxWrapper from memory using the stub - Added support for wrapping additional dlls: d2d1.dll, d3d10.dll, d3d10core.dll, d3d11.dll, d3d12.dll, d3dim.dll, d3dim700.dll, dinput8.dll, msacm32.dll, msvfw32.dll, vorbisfile.dll, winmmbase.dll and xlive.dll - Updated to support getting loaded from memory rather than disk - Fixed issue where memory verification would fail sometimes after compiling - Added macros for config settings to simplify the code - Updated the names of the Config varables to match thier ini file names - Removed wrapper mode from config file - Updated wrapper functions to use original API names rather than fake names
- Loading branch information
1 parent
4b951bf
commit 7a3ed4e
Showing
74 changed files
with
5,027 additions
and
2,402 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,12 @@ | ||
#pragma once | ||
|
||
#include "wrappers\wrapper.h" | ||
|
||
class __declspec(uuid("1DD9E8DA-1C77-4D40-B0CF-98FEFDFF9512")) Direct3D8; | ||
|
||
extern "C" Direct3D8 *WINAPI Direct3DCreate8(UINT); | ||
extern "C" Direct3D8 *WINAPI _Direct3DCreate8(UINT); | ||
HRESULT WINAPI _ValidateVertexShader(DWORD* vertexshader, DWORD* reserved1, DWORD* reserved2, BOOL flag, DWORD* toto); | ||
HRESULT WINAPI _ValidatePixelShader(DWORD* pixelshader, DWORD* reserved1, BOOL flag, DWORD* toto); | ||
|
||
namespace Wrapper | ||
namespace D3d8to9 | ||
{ | ||
namespace D3d8to9 | ||
{ | ||
FARPROC _Direct3DCreate8 = (FARPROC)*Direct3DCreate8; | ||
FARPROC _Direct3DCreate9 = nullptr; | ||
} | ||
} | ||
FARPROC Direct3DCreate8 = (FARPROC)*_Direct3DCreate8; | ||
} |
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,11 @@ | ||
#pragma once | ||
|
||
struct __declspec(uuid("81BDCBCA-64D4-426d-AE8D-AD0147F4275C")) IDirect3D9; | ||
|
||
IDirect3D9 *WINAPI _Direct3DCreate9(UINT); | ||
|
||
namespace d3d9_wrap | ||
{ | ||
constexpr FARPROC Direct3DCreate9 = (FARPROC)*_Direct3DCreate9; | ||
extern FARPROC Direct3DCreate9_Proxy; | ||
} |
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,20 +1,14 @@ | ||
#pragma once | ||
|
||
#include "Wrappers\Wrapper.h" | ||
|
||
BOOL WINAPI DllMain_DDrawCompat(HINSTANCE, DWORD, LPVOID); | ||
|
||
extern "C" HRESULT WINAPI DirectDrawCreate(GUID*, LPDIRECTDRAW*, IUnknown*); | ||
extern "C" HRESULT WINAPI DirectDrawCreateEx(GUID*, LPVOID*, REFIID, IUnknown*); | ||
extern "C" HRESULT WINAPI DllGetClassObject(REFCLSID, REFIID, LPVOID*); | ||
extern "C" HRESULT WINAPI _DirectDrawCreate(GUID*, LPDIRECTDRAW*, IUnknown*); | ||
extern "C" HRESULT WINAPI _DirectDrawCreateEx(GUID*, LPVOID*, REFIID, IUnknown*); | ||
extern "C" HRESULT WINAPI _DllGetClassObject(REFCLSID, REFIID, LPVOID*); | ||
|
||
namespace Wrapper | ||
namespace DDrawCompat | ||
{ | ||
namespace DDrawCompat | ||
{ | ||
FARPROC _DirectDrawCreate = (FARPROC)*DirectDrawCreate; | ||
FARPROC _DirectDrawCreateEx = (FARPROC)*DirectDrawCreateEx; | ||
FARPROC _DllGetClassObject = (FARPROC)*DllGetClassObject; | ||
} | ||
|
||
constexpr FARPROC DirectDrawCreate = (FARPROC)*_DirectDrawCreate; | ||
constexpr FARPROC DirectDrawCreateEx = (FARPROC)*_DirectDrawCreateEx; | ||
constexpr FARPROC DllGetClassObject = (FARPROC)*_DllGetClassObject; | ||
} |
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
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
Oops, something went wrong.