Fix my silly code ...

This commit is contained in:
Robert Krawczyk 2016-01-28 18:17:43 +01:00
parent a72a762a8c
commit ca6ccbacd3
7 changed files with 1583 additions and 1583 deletions

View file

@ -1,79 +1,79 @@
#include "stdafx.h"
#include "Context.h"
void MainContext::EnableAutoFix()
{
std::string exe_name = ModuleNameA(NULL);
std::transform(exe_name.begin(), exe_name.end(), exe_name.begin(), std::tolower);
if (exe_name == "game.exe" || exe_name == "game.dat")
{
autofix = RESIDENT_EVIL_4;
PrintLog("AutoFix for \"Resident Evil 4\" enabled");
}
if (exe_name == "kb.exe")
{
autofix = KINGS_BOUNTY_LEGEND;
PrintLog("AutoFix for \"Kings Bounty: Legend\" enabled");
}
if (exe_name == "ffxiiiimg.exe")
{
autofix = FINAL_FANTASY_XIII;
PrintLog("AutoFix for \"Final Fantasy XIII\" enabled");
}
}
const std::map<const MainContext::AutoFixes, const uint32_t> MainContext::behaviorflags_fixes =
{
{ RESIDENT_EVIL_4, D3DCREATE_SOFTWARE_VERTEXPROCESSING },
{ KINGS_BOUNTY_LEGEND, D3DCREATE_MIXED_VERTEXPROCESSING },
};
void MainContext::FixBehaviorFlagConflict(const DWORD flags_in, DWORD* flags_out)
{
if (flags_in & D3DCREATE_SOFTWARE_VERTEXPROCESSING)
{
*flags_out &= ~(D3DCREATE_PUREDEVICE | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_MIXED_VERTEXPROCESSING);
*flags_out |= D3DCREATE_SOFTWARE_VERTEXPROCESSING;
}
else if (flags_in & D3DCREATE_MIXED_VERTEXPROCESSING)
{
*flags_out &= ~(D3DCREATE_PUREDEVICE | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_SOFTWARE_VERTEXPROCESSING);
*flags_out |= D3DCREATE_MIXED_VERTEXPROCESSING;
}
else if (flags_in & D3DCREATE_HARDWARE_VERTEXPROCESSING)
{
*flags_out &= ~(D3DCREATE_MIXED_VERTEXPROCESSING | D3DCREATE_SOFTWARE_VERTEXPROCESSING);
*flags_out |= D3DCREATE_HARDWARE_VERTEXPROCESSING;
}
}
bool MainContext::ApplyBehaviorFlagsFix(DWORD* flags)
{
if (AutoFixes::NONE) return false;
auto && fix = behaviorflags_fixes.find(autofix);
if (fix != behaviorflags_fixes.end())
{
FixBehaviorFlagConflict(fix->second, flags);
return true;
}
return false;
}
bool MainContext::ApplyVertexBufferFix(UINT& Length, DWORD& Usage, DWORD& FVF, D3DPOOL& Pool)
{
if (AutoFixes::NONE) return false;
// Final Fantasy XIII
if (autofix == FINAL_FANTASY_XIII)
{
if (Length == 358400 && FVF == 0 && Pool == D3DPOOL_MANAGED) { Usage = D3DUSAGE_DYNAMIC; Pool = D3DPOOL_DEFAULT; }
return true;
}
return false;
#include "stdafx.h"
#include "Context.h"
void MainContext::EnableAutoFix()
{
std::string exe_name = ModuleNameA(NULL);
std::transform(exe_name.begin(), exe_name.end(), exe_name.begin(), std::tolower);
if (exe_name == "game.exe" || exe_name == "game.dat")
{
autofix = RESIDENT_EVIL_4;
PrintLog("AutoFix for \"Resident Evil 4\" enabled");
}
if (exe_name == "kb.exe")
{
autofix = KINGS_BOUNTY_LEGEND;
PrintLog("AutoFix for \"Kings Bounty: Legend\" enabled");
}
if (exe_name == "ffxiiiimg.exe")
{
autofix = FINAL_FANTASY_XIII;
PrintLog("AutoFix for \"Final Fantasy XIII\" enabled");
}
}
const std::map<const MainContext::AutoFixes, const uint32_t> MainContext::behaviorflags_fixes =
{
{ RESIDENT_EVIL_4, D3DCREATE_SOFTWARE_VERTEXPROCESSING },
{ KINGS_BOUNTY_LEGEND, D3DCREATE_MIXED_VERTEXPROCESSING },
};
void MainContext::FixBehaviorFlagConflict(const DWORD flags_in, DWORD* flags_out)
{
if (flags_in & D3DCREATE_SOFTWARE_VERTEXPROCESSING)
{
*flags_out &= ~(D3DCREATE_PUREDEVICE | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_MIXED_VERTEXPROCESSING);
*flags_out |= D3DCREATE_SOFTWARE_VERTEXPROCESSING;
}
else if (flags_in & D3DCREATE_MIXED_VERTEXPROCESSING)
{
*flags_out &= ~(D3DCREATE_PUREDEVICE | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_SOFTWARE_VERTEXPROCESSING);
*flags_out |= D3DCREATE_MIXED_VERTEXPROCESSING;
}
else if (flags_in & D3DCREATE_HARDWARE_VERTEXPROCESSING)
{
*flags_out &= ~(D3DCREATE_MIXED_VERTEXPROCESSING | D3DCREATE_SOFTWARE_VERTEXPROCESSING);
*flags_out |= D3DCREATE_HARDWARE_VERTEXPROCESSING;
}
}
bool MainContext::ApplyBehaviorFlagsFix(DWORD* flags)
{
if (autofix == AutoFixes::NONE) return false;
auto && fix = behaviorflags_fixes.find(autofix);
if (fix != behaviorflags_fixes.end())
{
FixBehaviorFlagConflict(fix->second, flags);
return true;
}
return false;
}
bool MainContext::ApplyVertexBufferFix(UINT& Length, DWORD& Usage, DWORD& FVF, D3DPOOL& Pool)
{
if (autofix == AutoFixes::NONE) return false;
// Final Fantasy XIII
if (autofix == FINAL_FANTASY_XIII)
{
if (Length == 358400 && FVF == 0 && Pool == D3DPOOL_MANAGED) { Usage = D3DUSAGE_DYNAMIC; Pool = D3DPOOL_DEFAULT; }
return true;
}
return false;
}

View file

@ -1,303 +1,303 @@
#include "stdafx.h"
#include "Wrapper.h"
#include "Context.h"
#include "IDirect3D9.h"
MainContext context;
Config::Config()
{
std::string inifile = FullPathFromPath(inifilename);
CSimpleIniW ini;
ini.LoadFile(inifile.c_str());
u32 config_version = ini.GetLongValue(L"Version", L"Config");
if (config_version != CONFIG_VERSION)
{
// save file and reload
ini.Reset();
#define SETTING(_type, _func, _var, _section, _defaultval) \
ini.Set##_func(L#_section, L#_var, _defaultval)
#include "Settings.h"
#undef SETTING
ini.SetLongValue(L"Version", L"Config", CONFIG_VERSION);
ini.SaveFile(inifile.c_str());
ini.Reset();
ini.LoadFile(inifile.c_str());
}
#define SETTING(_type, _func, _var, _section, _defaultval) \
_var = ini.Get##_func(L#_section, L#_var)
#include "Settings.h"
#undef SETTING
}
MainContext::MainContext()
{
LogFile("OneTweakNG.log");
if(config.GetAutoFix()) EnableAutoFix();
MH_Initialize();
MH_CreateHook(D3D9DLL::Get().Direct3DCreate9, HookDirect3DCreate9, reinterpret_cast<void**>(&TrueDirect3DCreate9));
MH_EnableHook(D3D9DLL::Get().Direct3DCreate9);
MH_CreateHook(CreateWindowExA, HookCreateWindowExA, reinterpret_cast<void**>(&TrueCreateWindowExA));
MH_EnableHook(CreateWindowExA);
MH_CreateHook(CreateWindowExW, HookCreateWindowExW, reinterpret_cast<void**>(&TrueCreateWindowExW));
MH_EnableHook(CreateWindowExW);
MH_CreateHook(SetWindowLongA, HookSetWindowLongA, reinterpret_cast<void**>(&TrueSetWindowLongA));
MH_EnableHook(SetWindowLongA);
MH_CreateHook(SetWindowLongW, HookSetWindowLongW, reinterpret_cast<void**>(&TrueSetWindowLongW));
MH_EnableHook(SetWindowLongW);
}
MainContext::~MainContext()
{
while (::ShowCursor(TRUE) <= 0);
}
IDirect3D9 * WINAPI MainContext::HookDirect3DCreate9(UINT SDKVersion)
{
IDirect3D9* d3d9 = context.TrueDirect3DCreate9(SDKVersion);
if (d3d9)
{
return new hkIDirect3D9(d3d9);
}
return d3d9;
}
bool MainContext::BehaviorFlagsToString(DWORD BehaviorFlags, std::string* BehaviorFlagsString)
{
#define BF2STR(x) if (BehaviorFlags & x) BehaviorFlagsString->append(#x" ");
BF2STR(D3DCREATE_ADAPTERGROUP_DEVICE);
BF2STR(D3DCREATE_DISABLE_DRIVER_MANAGEMENT);
BF2STR(D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX);
BF2STR(D3DCREATE_DISABLE_PRINTSCREEN);
BF2STR(D3DCREATE_DISABLE_PSGP_THREADING);
BF2STR(D3DCREATE_ENABLE_PRESENTSTATS);
BF2STR(D3DCREATE_FPU_PRESERVE);
BF2STR(D3DCREATE_HARDWARE_VERTEXPROCESSING);
BF2STR(D3DCREATE_MIXED_VERTEXPROCESSING);
BF2STR(D3DCREATE_SOFTWARE_VERTEXPROCESSING);
BF2STR(D3DCREATE_MULTITHREADED);
BF2STR(D3DCREATE_NOWINDOWCHANGES);
BF2STR(D3DCREATE_PUREDEVICE);
BF2STR(D3DCREATE_SCREENSAVER);
#undef BF2STR
if (BehaviorFlagsString->back() == ' ')
BehaviorFlagsString->pop_back();
return false;
}
bool MainContext::ApplyPresentationParameters(D3DPRESENT_PARAMETERS* pPresentationParameters)
{
if (pPresentationParameters)
{
if (config.GetTrippleBuffering())
{
pPresentationParameters->BackBufferCount = 3;
}
if (config.GetMultisample() > 0)
{
pPresentationParameters->SwapEffect = D3DSWAPEFFECT_DISCARD;
pPresentationParameters->MultiSampleType = (D3DMULTISAMPLE_TYPE)config.GetMultisample();
pPresentationParameters->MultiSampleQuality = 0;
PrintLog("MultiSampleType %u, MultiSampleQuality %u", pPresentationParameters->MultiSampleType, pPresentationParameters->MultiSampleQuality);
}
if (config.GetPresentationInterval() != -1)
{
pPresentationParameters->PresentationInterval = config.GetPresentationInterval();
PrintLog("PresentationInterval: PresentationInterval set to %u", pPresentationParameters->PresentationInterval);
}
if (config.GetBorderless())
{
SetWindowPos(pPresentationParameters->hDeviceWindow, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOSIZE | SWP_NOMOVE | SWP_NOSENDCHANGING);
if (config.GetForceWindowedMode())
{
pPresentationParameters->SwapEffect = D3DSWAPEFFECT_FLIP;
pPresentationParameters->Windowed = TRUE;
pPresentationParameters->FullScreen_RefreshRateInHz = 0;
}
PrintLog("ForceWindowedMode: Windowed set to TRUE");
}
if (config.GetHideCursor()) while (::ShowCursor(FALSE) >= 0); // ShowCursor < 0 -> hidden
return true;
}
return false;
}
bool MainContext::CheckWindow(HWND hWnd)
{
std::unique_ptr<wchar_t[]> className(new wchar_t[MAX_PATH]);
std::unique_ptr<wchar_t[]> windowName(new wchar_t[MAX_PATH]);
GetClassNameW(hWnd, className.get(), MAX_PATH);
GetWindowTextW(hWnd, windowName.get(), MAX_PATH);
PrintLog("HWND 0x%p: ClassName \"%ls\", WindowName: \"%ls\"", hWnd, className.get(), windowName.get());
bool classname = config.GetWindowClass().compare(className.get()) == 0;
bool windowname = config.GetWindowName().compare(windowName.get()) == 0;
bool always = config.GetAllWindows();
return classname || windowname || always;
}
void MainContext::ApplyWndProc(HWND hWnd)
{
if (config.GetAlwaysActive())
{
context.oldWndProc = (WNDPROC)context.TrueSetWindowLongA(hWnd, GWLP_WNDPROC, (LONG_PTR)context.WindowProc);
}
}
void MainContext::ApplyBorderless(HWND hWnd)
{
if (config.GetBorderless())
{
LONG_PTR dwStyle = GetWindowLongPtr(hWnd, GWL_STYLE);
LONG_PTR dwExStyle = GetWindowLongPtr(hWnd, GWL_EXSTYLE);
DWORD new_dwStyle = dwStyle & ~WS_OVERLAPPEDWINDOW;
DWORD new_dwExStyle = dwExStyle & ~(WS_EX_OVERLAPPEDWINDOW | WS_EX_TOPMOST);
context.TrueSetWindowLongW(hWnd, GWL_STYLE, new_dwStyle);
context.TrueSetWindowLongW(hWnd, GWL_EXSTYLE, new_dwExStyle);
int cx = GetSystemMetrics(SM_CXSCREEN);
int cy = GetSystemMetrics(SM_CYSCREEN);
SetWindowPos(hWnd, HWND_TOP, 0, 0, cx, cy, SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOSENDCHANGING);
PrintLog("HWND 0x%p: Borderless dwStyle: %lX->%lX", hWnd, dwStyle, new_dwStyle);
PrintLog("HWND 0x%p: Borderless dwExStyle: %lX->%lX", hWnd, dwExStyle, new_dwExStyle);
MessageBeep(MB_ICONASTERISK);
}
}
LRESULT CALLBACK MainContext::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_ACTIVATE:
switch (LOWORD(wParam))
{
case WA_ACTIVE:
case WA_CLICKACTIVE:
while (::ShowCursor(FALSE) >= 0);
break;
case WA_INACTIVE:
if (context.config.GetAlwaysActive())
return TRUE;
while (::ShowCursor(TRUE) < 0);
break;
}
case WM_ACTIVATEAPP:
if (context.config.GetAlwaysActive())
return TRUE;
}
return CallWindowProc(context.oldWndProc, hWnd, uMsg, wParam, lParam);
}
LONG WINAPI MainContext::HookSetWindowLongA(HWND hWnd, int nIndex, LONG dwNewLong)
{
if (context.config.GetBorderless())
{
DWORD olddwNewLong = dwNewLong;
if (nIndex == GWL_STYLE)
{
dwNewLong &= ~WS_OVERLAPPEDWINDOW;
PrintLog("SetWindowLongA dwStyle: %lX->%lX", olddwNewLong, dwNewLong);
}
if (nIndex == GWL_EXSTYLE)
{
dwNewLong &= ~(WS_EX_OVERLAPPEDWINDOW | WS_EX_TOPMOST);
PrintLog("SetWindowLongA dwExStyle: %lX->%lX", olddwNewLong, dwNewLong);
}
}
return context.TrueSetWindowLongA(hWnd, nIndex, dwNewLong);
}
LONG WINAPI MainContext::HookSetWindowLongW(HWND hWnd, int nIndex, LONG dwNewLong)
{
if (context.config.GetBorderless())
{
DWORD olddwNewLong = dwNewLong;
if (nIndex == GWL_STYLE)
{
dwNewLong &= ~WS_OVERLAPPEDWINDOW;
PrintLog("SetWindowLongW dwStyle: %lX->%lX", olddwNewLong, dwNewLong);
}
if (nIndex == GWL_EXSTYLE)
{
dwNewLong &= ~(WS_EX_OVERLAPPEDWINDOW | WS_EX_TOPMOST);
PrintLog("SetWindowLongW dwExStyle: %lX->%lX", olddwNewLong, dwNewLong);
}
}
return context.TrueSetWindowLongW(hWnd, nIndex, dwNewLong);
}
HWND WINAPI MainContext::HookCreateWindowExA(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
{
HWND hWnd = context.TrueCreateWindowExA(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
if (!hWnd)
{
PrintLog("CreateWindowExA failed");
return hWnd;
}
if (context.CheckWindow(hWnd))
{
context.ApplyWndProc(hWnd);
context.ApplyBorderless(hWnd);
}
return hWnd;
}
HWND WINAPI MainContext::HookCreateWindowExW(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
{
HWND hWnd = context.TrueCreateWindowExW(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
if (!hWnd)
{
PrintLog("CreateWindowExW failed");
return hWnd;
}
if (context.CheckWindow(hWnd))
{
context.ApplyWndProc(hWnd);
context.ApplyBorderless(hWnd);
}
return hWnd;
}
#include "stdafx.h"
#include "Wrapper.h"
#include "Context.h"
#include "IDirect3D9.h"
MainContext context;
Config::Config()
{
std::string inifile = FullPathFromPath(inifilename);
CSimpleIniW ini;
ini.LoadFile(inifile.c_str());
u32 config_version = ini.GetLongValue(L"Version", L"Config");
if (config_version != CONFIG_VERSION)
{
// save file and reload
ini.Reset();
#define SETTING(_type, _func, _var, _section, _defaultval) \
ini.Set##_func(L#_section, L#_var, _defaultval)
#include "Settings.h"
#undef SETTING
ini.SetLongValue(L"Version", L"Config", CONFIG_VERSION);
ini.SaveFile(inifile.c_str());
ini.Reset();
ini.LoadFile(inifile.c_str());
}
#define SETTING(_type, _func, _var, _section, _defaultval) \
_var = ini.Get##_func(L#_section, L#_var)
#include "Settings.h"
#undef SETTING
}
MainContext::MainContext()
{
LogFile("OneTweakNG.log");
if(config.GetAutoFix()) EnableAutoFix();
MH_Initialize();
MH_CreateHook(D3D9DLL::Get().Direct3DCreate9, HookDirect3DCreate9, reinterpret_cast<void**>(&TrueDirect3DCreate9));
MH_EnableHook(D3D9DLL::Get().Direct3DCreate9);
MH_CreateHook(CreateWindowExA, HookCreateWindowExA, reinterpret_cast<void**>(&TrueCreateWindowExA));
MH_EnableHook(CreateWindowExA);
MH_CreateHook(CreateWindowExW, HookCreateWindowExW, reinterpret_cast<void**>(&TrueCreateWindowExW));
MH_EnableHook(CreateWindowExW);
MH_CreateHook(SetWindowLongA, HookSetWindowLongA, reinterpret_cast<void**>(&TrueSetWindowLongA));
MH_EnableHook(SetWindowLongA);
MH_CreateHook(SetWindowLongW, HookSetWindowLongW, reinterpret_cast<void**>(&TrueSetWindowLongW));
MH_EnableHook(SetWindowLongW);
}
MainContext::~MainContext()
{
while (::ShowCursor(TRUE) <= 0);
}
IDirect3D9 * WINAPI MainContext::HookDirect3DCreate9(UINT SDKVersion)
{
IDirect3D9* d3d9 = context.TrueDirect3DCreate9(SDKVersion);
if (d3d9)
{
return new hkIDirect3D9(d3d9);
}
return d3d9;
}
bool MainContext::BehaviorFlagsToString(DWORD BehaviorFlags, std::string* BehaviorFlagsString)
{
#define BF2STR(x) if (BehaviorFlags & x) BehaviorFlagsString->append(#x" ");
BF2STR(D3DCREATE_ADAPTERGROUP_DEVICE);
BF2STR(D3DCREATE_DISABLE_DRIVER_MANAGEMENT);
BF2STR(D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX);
BF2STR(D3DCREATE_DISABLE_PRINTSCREEN);
BF2STR(D3DCREATE_DISABLE_PSGP_THREADING);
BF2STR(D3DCREATE_ENABLE_PRESENTSTATS);
BF2STR(D3DCREATE_FPU_PRESERVE);
BF2STR(D3DCREATE_HARDWARE_VERTEXPROCESSING);
BF2STR(D3DCREATE_MIXED_VERTEXPROCESSING);
BF2STR(D3DCREATE_SOFTWARE_VERTEXPROCESSING);
BF2STR(D3DCREATE_MULTITHREADED);
BF2STR(D3DCREATE_NOWINDOWCHANGES);
BF2STR(D3DCREATE_PUREDEVICE);
BF2STR(D3DCREATE_SCREENSAVER);
#undef BF2STR
if (BehaviorFlagsString->back() == ' ')
BehaviorFlagsString->pop_back();
return false;
}
bool MainContext::ApplyPresentationParameters(D3DPRESENT_PARAMETERS* pPresentationParameters)
{
if (pPresentationParameters)
{
if (config.GetTrippleBuffering())
{
pPresentationParameters->BackBufferCount = 3;
}
if (config.GetMultisample() > 0)
{
pPresentationParameters->SwapEffect = D3DSWAPEFFECT_DISCARD;
pPresentationParameters->MultiSampleType = (D3DMULTISAMPLE_TYPE)config.GetMultisample();
pPresentationParameters->MultiSampleQuality = 0;
PrintLog("MultiSampleType %u, MultiSampleQuality %u", pPresentationParameters->MultiSampleType, pPresentationParameters->MultiSampleQuality);
}
if (config.GetPresentationInterval() != -1)
{
pPresentationParameters->PresentationInterval = config.GetPresentationInterval();
PrintLog("PresentationInterval: PresentationInterval set to %u", pPresentationParameters->PresentationInterval);
}
if (config.GetBorderless())
{
SetWindowPos(pPresentationParameters->hDeviceWindow, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOSIZE | SWP_NOMOVE | SWP_NOSENDCHANGING);
if (config.GetForceWindowedMode())
{
pPresentationParameters->SwapEffect = D3DSWAPEFFECT_FLIP;
pPresentationParameters->Windowed = TRUE;
pPresentationParameters->FullScreen_RefreshRateInHz = 0;
}
PrintLog("ForceWindowedMode: Windowed set to TRUE");
}
if (config.GetHideCursor()) while (::ShowCursor(FALSE) >= 0); // ShowCursor < 0 -> hidden
return true;
}
return false;
}
bool MainContext::CheckWindow(HWND hWnd)
{
std::unique_ptr<wchar_t[]> className(new wchar_t[MAX_PATH]);
std::unique_ptr<wchar_t[]> windowName(new wchar_t[MAX_PATH]);
GetClassNameW(hWnd, className.get(), MAX_PATH);
GetWindowTextW(hWnd, windowName.get(), MAX_PATH);
PrintLog("HWND 0x%p: ClassName \"%ls\", WindowName: \"%ls\"", hWnd, className.get(), windowName.get());
bool classname = config.GetWindowClass().compare(className.get()) == 0;
bool windowname = config.GetWindowName().compare(windowName.get()) == 0;
bool always = config.GetAllWindows();
return classname || windowname || always;
}
void MainContext::ApplyWndProc(HWND hWnd)
{
if (config.GetAlwaysActive())
{
context.oldWndProc = (WNDPROC)context.TrueSetWindowLongA(hWnd, GWLP_WNDPROC, (LONG_PTR)context.WindowProc);
}
}
void MainContext::ApplyBorderless(HWND hWnd)
{
if (config.GetBorderless())
{
LONG_PTR dwStyle = GetWindowLongPtr(hWnd, GWL_STYLE);
LONG_PTR dwExStyle = GetWindowLongPtr(hWnd, GWL_EXSTYLE);
DWORD new_dwStyle = dwStyle & ~WS_OVERLAPPEDWINDOW;
DWORD new_dwExStyle = dwExStyle & ~(WS_EX_OVERLAPPEDWINDOW | WS_EX_TOPMOST);
context.TrueSetWindowLongW(hWnd, GWL_STYLE, new_dwStyle);
context.TrueSetWindowLongW(hWnd, GWL_EXSTYLE, new_dwExStyle);
int cx = GetSystemMetrics(SM_CXSCREEN);
int cy = GetSystemMetrics(SM_CYSCREEN);
SetWindowPos(hWnd, HWND_TOP, 0, 0, cx, cy, SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOSENDCHANGING);
PrintLog("HWND 0x%p: Borderless dwStyle: %lX->%lX", hWnd, dwStyle, new_dwStyle);
PrintLog("HWND 0x%p: Borderless dwExStyle: %lX->%lX", hWnd, dwExStyle, new_dwExStyle);
MessageBeep(MB_ICONASTERISK);
}
}
LRESULT CALLBACK MainContext::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_ACTIVATE:
switch (LOWORD(wParam))
{
case WA_ACTIVE:
case WA_CLICKACTIVE:
while (::ShowCursor(FALSE) >= 0);
break;
case WA_INACTIVE:
if (context.config.GetAlwaysActive())
return TRUE;
while (::ShowCursor(TRUE) < 0);
break;
}
case WM_ACTIVATEAPP:
if (context.config.GetAlwaysActive())
return TRUE;
}
return CallWindowProc(context.oldWndProc, hWnd, uMsg, wParam, lParam);
}
LONG WINAPI MainContext::HookSetWindowLongA(HWND hWnd, int nIndex, LONG dwNewLong)
{
if (context.config.GetBorderless())
{
DWORD olddwNewLong = dwNewLong;
if (nIndex == GWL_STYLE)
{
dwNewLong &= ~WS_OVERLAPPEDWINDOW;
PrintLog("SetWindowLongA dwStyle: %lX->%lX", olddwNewLong, dwNewLong);
}
if (nIndex == GWL_EXSTYLE)
{
dwNewLong &= ~(WS_EX_OVERLAPPEDWINDOW | WS_EX_TOPMOST);
PrintLog("SetWindowLongA dwExStyle: %lX->%lX", olddwNewLong, dwNewLong);
}
}
return context.TrueSetWindowLongA(hWnd, nIndex, dwNewLong);
}
LONG WINAPI MainContext::HookSetWindowLongW(HWND hWnd, int nIndex, LONG dwNewLong)
{
if (context.config.GetBorderless())
{
DWORD olddwNewLong = dwNewLong;
if (nIndex == GWL_STYLE)
{
dwNewLong &= ~WS_OVERLAPPEDWINDOW;
PrintLog("SetWindowLongW dwStyle: %lX->%lX", olddwNewLong, dwNewLong);
}
if (nIndex == GWL_EXSTYLE)
{
dwNewLong &= ~(WS_EX_OVERLAPPEDWINDOW | WS_EX_TOPMOST);
PrintLog("SetWindowLongW dwExStyle: %lX->%lX", olddwNewLong, dwNewLong);
}
}
return context.TrueSetWindowLongW(hWnd, nIndex, dwNewLong);
}
HWND WINAPI MainContext::HookCreateWindowExA(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
{
HWND hWnd = context.TrueCreateWindowExA(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
if (!hWnd)
{
PrintLog("CreateWindowExA failed");
return hWnd;
}
if (context.CheckWindow(hWnd))
{
context.ApplyWndProc(hWnd);
context.ApplyBorderless(hWnd);
}
return hWnd;
}
HWND WINAPI MainContext::HookCreateWindowExW(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
{
HWND hWnd = context.TrueCreateWindowExW(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
if (!hWnd)
{
PrintLog("CreateWindowExW failed");
return hWnd;
}
if (context.CheckWindow(hWnd))
{
context.ApplyWndProc(hWnd);
context.ApplyBorderless(hWnd);
}
return hWnd;
}

View file

@ -1,148 +1,148 @@
// wrapper for IDirect3D9 in d3d9.h
// generated using wrapper_gen.rb
#include "stdafx.h"
#include "Context.h"
#include "IDirect3D9.h"
#include "IDirect3DDevice9.h"
#define IDirect3D9_PrintLog(format, ...) //PrintLog(format, __VA_ARGS__);
hkIDirect3D9::hkIDirect3D9(IDirect3D9 *pIDirect3D9) {
PrintLog(__FUNCTION__);
m_pWrapped = pIDirect3D9;
}
hkIDirect3D9::~hkIDirect3D9()
{
PrintLog(__FUNCTION__);
}
HRESULT APIENTRY hkIDirect3D9::QueryInterface(REFIID riid, void** ppvObj) {
PrintLog(__FUNCTION__);
return m_pWrapped->QueryInterface(riid, ppvObj);
}
ULONG APIENTRY hkIDirect3D9::AddRef() {
PrintLog(__FUNCTION__);
return m_pWrapped->AddRef();
}
ULONG APIENTRY hkIDirect3D9::Release() {
ULONG ref_count = m_pWrapped->Release();
PrintLog(__FUNCTION__ " return = %lu", ref_count);
if (ref_count == 0) delete this;
return ref_count;
}
HRESULT APIENTRY hkIDirect3D9::RegisterSoftwareDevice(void* pInitializeFunction) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->RegisterSoftwareDevice(pInitializeFunction);
}
UINT APIENTRY hkIDirect3D9::GetAdapterCount() {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetAdapterCount();
}
HRESULT APIENTRY hkIDirect3D9::GetAdapterIdentifier(UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier) {
PrintLog(__FUNCTION__);
HRESULT rt = m_pWrapped->GetAdapterIdentifier(Adapter, Flags, pIdentifier);
if (context.config.GetAdapter() && SUCCEEDED(rt) && pIdentifier)
{
pIdentifier->VendorId = context.config.GetVendorId();
pIdentifier->DeviceId = context.config.GetDeviceId();
}
return rt;
}
UINT APIENTRY hkIDirect3D9::GetAdapterModeCount(UINT Adapter, D3DFORMAT Format) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetAdapterModeCount(Adapter, Format);
}
HRESULT APIENTRY hkIDirect3D9::EnumAdapterModes(UINT Adapter, D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE* pMode) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->EnumAdapterModes(Adapter, Format, Mode, pMode);
}
HRESULT APIENTRY hkIDirect3D9::GetAdapterDisplayMode(UINT Adapter, D3DDISPLAYMODE* pMode) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetAdapterDisplayMode(Adapter, pMode);
}
HRESULT APIENTRY hkIDirect3D9::CheckDeviceType(UINT Adapter, D3DDEVTYPE DevType, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, BOOL bWindowed) {
IDirect3D9_PrintLog(__FUNCTION__);
if (context.config.GetForceWindowedMode()) bWindowed = TRUE;
return m_pWrapped->CheckDeviceType(Adapter, DevType, AdapterFormat, BackBufferFormat, bWindowed);
}
HRESULT APIENTRY hkIDirect3D9::CheckDeviceFormat(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->CheckDeviceFormat(Adapter, DeviceType, AdapterFormat, Usage, RType, CheckFormat);
}
HRESULT APIENTRY hkIDirect3D9::CheckDeviceMultiSampleType(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->CheckDeviceMultiSampleType(Adapter, DeviceType, SurfaceFormat, Windowed, MultiSampleType, pQualityLevels);
}
HRESULT APIENTRY hkIDirect3D9::CheckDepthStencilMatch(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->CheckDepthStencilMatch(Adapter, DeviceType, AdapterFormat, RenderTargetFormat, DepthStencilFormat);
}
HRESULT APIENTRY hkIDirect3D9::CheckDeviceFormatConversion(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->CheckDeviceFormatConversion(Adapter, DeviceType, SourceFormat, TargetFormat);
}
HRESULT APIENTRY hkIDirect3D9::GetDeviceCaps(UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetDeviceCaps(Adapter, DeviceType, pCaps);
}
HMONITOR APIENTRY hkIDirect3D9::GetAdapterMonitor(UINT Adapter) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetAdapterMonitor(Adapter);
}
HRESULT APIENTRY hkIDirect3D9::CreateDevice(UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DDevice9** ppReturnedDeviceInterface) {
PrintLog(__FUNCTION__);
DWORD OriginalBehaviorFlags = BehaviorFlags;
std::string BehaviorFlagsString;
context.BehaviorFlagsToString(BehaviorFlags, &BehaviorFlagsString);
PrintLog("BehaviorFlags: %08X %s", BehaviorFlags, BehaviorFlagsString.c_str());
if (context.config.GetBehaviorFlags() > 0)
{
BehaviorFlags = context.config.GetBehaviorFlags();
PrintLog("Advanced Mode: BehaviorFlags set");
}
else
{
context.ApplyBehaviorFlagsFix(&BehaviorFlags);
}
if (hFocusWindow == NULL) hFocusWindow = pPresentationParameters->hDeviceWindow;
context.ApplyPresentationParameters(pPresentationParameters);
HRESULT hr = m_pWrapped->CreateDevice(Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, ppReturnedDeviceInterface);
if (SUCCEEDED(hr) && ppReturnedDeviceInterface && *ppReturnedDeviceInterface)
{
hkIDirect3DDevice9* pIDirect3DDevice9 = new hkIDirect3DDevice9(*ppReturnedDeviceInterface);
*ppReturnedDeviceInterface = pIDirect3DDevice9;
}
if (OriginalBehaviorFlags != BehaviorFlags)
{
std::string BehaviorFlagsString;
context.BehaviorFlagsToString(BehaviorFlags, &BehaviorFlagsString);
PrintLog("BehaviorFlags changed: %08X %s", BehaviorFlags, BehaviorFlagsString.c_str());
}
return hr;
}
// wrapper for IDirect3D9 in d3d9.h
// generated using wrapper_gen.rb
#include "stdafx.h"
#include "Context.h"
#include "IDirect3D9.h"
#include "IDirect3DDevice9.h"
#define IDirect3D9_PrintLog(format, ...) //PrintLog(format, __VA_ARGS__);
hkIDirect3D9::hkIDirect3D9(IDirect3D9 *pIDirect3D9) {
PrintLog(__FUNCTION__);
m_pWrapped = pIDirect3D9;
}
hkIDirect3D9::~hkIDirect3D9()
{
PrintLog(__FUNCTION__);
}
HRESULT APIENTRY hkIDirect3D9::QueryInterface(REFIID riid, void** ppvObj) {
PrintLog(__FUNCTION__);
return m_pWrapped->QueryInterface(riid, ppvObj);
}
ULONG APIENTRY hkIDirect3D9::AddRef() {
PrintLog(__FUNCTION__);
return m_pWrapped->AddRef();
}
ULONG APIENTRY hkIDirect3D9::Release() {
ULONG ref_count = m_pWrapped->Release();
PrintLog(__FUNCTION__ " return = %lu", ref_count);
if (ref_count == 0) delete this;
return ref_count;
}
HRESULT APIENTRY hkIDirect3D9::RegisterSoftwareDevice(void* pInitializeFunction) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->RegisterSoftwareDevice(pInitializeFunction);
}
UINT APIENTRY hkIDirect3D9::GetAdapterCount() {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetAdapterCount();
}
HRESULT APIENTRY hkIDirect3D9::GetAdapterIdentifier(UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier) {
PrintLog(__FUNCTION__);
HRESULT rt = m_pWrapped->GetAdapterIdentifier(Adapter, Flags, pIdentifier);
if (context.config.GetAdapter() && SUCCEEDED(rt) && pIdentifier)
{
pIdentifier->VendorId = context.config.GetVendorId();
pIdentifier->DeviceId = context.config.GetDeviceId();
}
return rt;
}
UINT APIENTRY hkIDirect3D9::GetAdapterModeCount(UINT Adapter, D3DFORMAT Format) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetAdapterModeCount(Adapter, Format);
}
HRESULT APIENTRY hkIDirect3D9::EnumAdapterModes(UINT Adapter, D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE* pMode) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->EnumAdapterModes(Adapter, Format, Mode, pMode);
}
HRESULT APIENTRY hkIDirect3D9::GetAdapterDisplayMode(UINT Adapter, D3DDISPLAYMODE* pMode) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetAdapterDisplayMode(Adapter, pMode);
}
HRESULT APIENTRY hkIDirect3D9::CheckDeviceType(UINT Adapter, D3DDEVTYPE DevType, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, BOOL bWindowed) {
IDirect3D9_PrintLog(__FUNCTION__);
if (context.config.GetForceWindowedMode()) bWindowed = TRUE;
return m_pWrapped->CheckDeviceType(Adapter, DevType, AdapterFormat, BackBufferFormat, bWindowed);
}
HRESULT APIENTRY hkIDirect3D9::CheckDeviceFormat(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->CheckDeviceFormat(Adapter, DeviceType, AdapterFormat, Usage, RType, CheckFormat);
}
HRESULT APIENTRY hkIDirect3D9::CheckDeviceMultiSampleType(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->CheckDeviceMultiSampleType(Adapter, DeviceType, SurfaceFormat, Windowed, MultiSampleType, pQualityLevels);
}
HRESULT APIENTRY hkIDirect3D9::CheckDepthStencilMatch(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->CheckDepthStencilMatch(Adapter, DeviceType, AdapterFormat, RenderTargetFormat, DepthStencilFormat);
}
HRESULT APIENTRY hkIDirect3D9::CheckDeviceFormatConversion(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->CheckDeviceFormatConversion(Adapter, DeviceType, SourceFormat, TargetFormat);
}
HRESULT APIENTRY hkIDirect3D9::GetDeviceCaps(UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetDeviceCaps(Adapter, DeviceType, pCaps);
}
HMONITOR APIENTRY hkIDirect3D9::GetAdapterMonitor(UINT Adapter) {
IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetAdapterMonitor(Adapter);
}
HRESULT APIENTRY hkIDirect3D9::CreateDevice(UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DDevice9** ppReturnedDeviceInterface) {
PrintLog(__FUNCTION__);
DWORD OriginalBehaviorFlags = BehaviorFlags;
std::string BehaviorFlagsString;
context.BehaviorFlagsToString(BehaviorFlags, &BehaviorFlagsString);
PrintLog("BehaviorFlags: %08X %s", BehaviorFlags, BehaviorFlagsString.c_str());
if (context.config.GetBehaviorFlags() > 0)
{
BehaviorFlags = context.config.GetBehaviorFlags();
PrintLog("Advanced Mode: BehaviorFlags set");
}
else
{
context.ApplyBehaviorFlagsFix(&BehaviorFlags);
}
if (hFocusWindow == NULL) hFocusWindow = pPresentationParameters->hDeviceWindow;
context.ApplyPresentationParameters(pPresentationParameters);
HRESULT hr = m_pWrapped->CreateDevice(Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, ppReturnedDeviceInterface);
if (SUCCEEDED(hr) && ppReturnedDeviceInterface && *ppReturnedDeviceInterface)
{
hkIDirect3DDevice9* pIDirect3DDevice9 = new hkIDirect3DDevice9(*ppReturnedDeviceInterface);
*ppReturnedDeviceInterface = pIDirect3DDevice9;
}
if (OriginalBehaviorFlags != BehaviorFlags)
{
std::string BehaviorFlagsString;
context.BehaviorFlagsToString(BehaviorFlags, &BehaviorFlagsString);
PrintLog("BehaviorFlags changed: %08X %s", BehaviorFlags, BehaviorFlagsString.c_str());
}
return hr;
}

File diff suppressed because it is too large Load diff

View file

@ -1,135 +1,135 @@
// wrapper for IDirect3DDevice9 in d3d9.h
// generated using wrapper_gen.rb
#pragma once
#include "d3d9.h"
interface hkIDirect3DDevice9 : public IDirect3DDevice9 {
IDirect3DDevice9* m_pWrapped;
public:
hkIDirect3DDevice9(IDirect3DDevice9 *pIDirect3DDevice9);
~hkIDirect3DDevice9();
// original interface
STDMETHOD(QueryInterface)(REFIID riid, void** ppvObj);
STDMETHOD_(ULONG, AddRef)();
STDMETHOD_(ULONG, Release)();
STDMETHOD(TestCooperativeLevel)();
STDMETHOD_(UINT, GetAvailableTextureMem)();
STDMETHOD(EvictManagedResources)();
STDMETHOD(GetDirect3D)(IDirect3D9** ppD3D9);
STDMETHOD(GetDeviceCaps)(D3DCAPS9* pCaps);
STDMETHOD(GetDisplayMode)(UINT iSwapChain, D3DDISPLAYMODE* pMode);
STDMETHOD(GetCreationParameters)(D3DDEVICE_CREATION_PARAMETERS *pParameters);
STDMETHOD(SetCursorProperties)(UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap);
STDMETHOD_(void, SetCursorPosition)(int X, int Y, DWORD Flags);
STDMETHOD_(BOOL, ShowCursor)(BOOL bShow);
STDMETHOD(CreateAdditionalSwapChain)(D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** pSwapChain);
STDMETHOD(GetSwapChain)(UINT iSwapChain, IDirect3DSwapChain9** pSwapChain);
STDMETHOD_(UINT, GetNumberOfSwapChains)();
STDMETHOD(Reset)(D3DPRESENT_PARAMETERS* pPresentationParameters);
STDMETHOD(Present)(CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion);
STDMETHOD(GetBackBuffer)(UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer);
STDMETHOD(GetRasterStatus)(UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus);
STDMETHOD(SetDialogBoxMode)(BOOL bEnableDialogs);
STDMETHOD_(void, SetGammaRamp)(UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp);
STDMETHOD_(void, GetGammaRamp)(UINT iSwapChain, D3DGAMMARAMP* pRamp);
STDMETHOD(CreateTexture)(UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle);
STDMETHOD(CreateVolumeTexture)(UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle);
STDMETHOD(CreateCubeTexture)(UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle);
STDMETHOD(CreateVertexBuffer)(UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle);
STDMETHOD(CreateIndexBuffer)(UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle);
STDMETHOD(CreateRenderTarget)(UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle);
STDMETHOD(CreateDepthStencilSurface)(UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle);
STDMETHOD(UpdateSurface)(IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, CONST POINT* pDestPoint);
STDMETHOD(UpdateTexture)(IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture);
STDMETHOD(GetRenderTargetData)(IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface);
STDMETHOD(GetFrontBufferData)(UINT iSwapChain, IDirect3DSurface9* pDestSurface);
STDMETHOD(StretchRect)(IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter);
STDMETHOD(ColorFill)(IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color);
STDMETHOD(CreateOffscreenPlainSurface)(UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle);
STDMETHOD(SetRenderTarget)(DWORD RenderTargetIndex, IDirect3DSurface9* pRenderTarget);
STDMETHOD(GetRenderTarget)(DWORD RenderTargetIndex, IDirect3DSurface9** ppRenderTarget);
STDMETHOD(SetDepthStencilSurface)(IDirect3DSurface9* pNewZStencil);
STDMETHOD(GetDepthStencilSurface)(IDirect3DSurface9** ppZStencilSurface);
STDMETHOD(BeginScene)();
STDMETHOD(EndScene)();
STDMETHOD(Clear)(DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil);
STDMETHOD(SetTransform)(D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix);
STDMETHOD(GetTransform)(D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix);
STDMETHOD(MultiplyTransform)(D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix);
STDMETHOD(SetViewport)(CONST D3DVIEWPORT9* pViewport);
STDMETHOD(GetViewport)(D3DVIEWPORT9* pViewport);
STDMETHOD(SetMaterial)(CONST D3DMATERIAL9* pMaterial);
STDMETHOD(GetMaterial)(D3DMATERIAL9* pMaterial);
STDMETHOD(SetLight)(DWORD Index, CONST D3DLIGHT9* pLight);
STDMETHOD(GetLight)(DWORD Index, D3DLIGHT9* pLight);
STDMETHOD(LightEnable)(DWORD Index, BOOL Enable);
STDMETHOD(GetLightEnable)(DWORD Index, BOOL* pEnable);
STDMETHOD(SetClipPlane)(DWORD Index, CONST float* pPlane);
STDMETHOD(GetClipPlane)(DWORD Index, float* pPlane);
STDMETHOD(SetRenderState)(D3DRENDERSTATETYPE State, DWORD Value);
STDMETHOD(GetRenderState)(D3DRENDERSTATETYPE State, DWORD* pValue);
STDMETHOD(CreateStateBlock)(D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB);
STDMETHOD(BeginStateBlock)();
STDMETHOD(EndStateBlock)(IDirect3DStateBlock9** ppSB);
STDMETHOD(SetClipStatus)(CONST D3DCLIPSTATUS9* pClipStatus);
STDMETHOD(GetClipStatus)(D3DCLIPSTATUS9* pClipStatus);
STDMETHOD(GetTexture)(DWORD Stage, IDirect3DBaseTexture9** ppTexture);
STDMETHOD(SetTexture)(DWORD Stage, IDirect3DBaseTexture9* pTexture);
STDMETHOD(GetTextureStageState)(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue);
STDMETHOD(SetTextureStageState)(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value);
STDMETHOD(GetSamplerState)(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue);
STDMETHOD(SetSamplerState)(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value);
STDMETHOD(ValidateDevice)(DWORD* pNumPasses);
STDMETHOD(SetPaletteEntries)(UINT PaletteNumber, CONST PALETTEENTRY* pEntries);
STDMETHOD(GetPaletteEntries)(UINT PaletteNumber, PALETTEENTRY* pEntries);
STDMETHOD(SetCurrentTexturePalette)(UINT PaletteNumber);
STDMETHOD(GetCurrentTexturePalette)(UINT *PaletteNumber);
STDMETHOD(SetScissorRect)(CONST RECT* pRect);
STDMETHOD(GetScissorRect)(RECT* pRect);
STDMETHOD(SetSoftwareVertexProcessing)(BOOL bSoftware);
STDMETHOD_(BOOL, GetSoftwareVertexProcessing)();
STDMETHOD(SetNPatchMode)(float nSegments);
STDMETHOD_(float, GetNPatchMode)();
STDMETHOD(DrawPrimitive)(D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount);
STDMETHOD(DrawIndexedPrimitive)(D3DPRIMITIVETYPE, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount);
STDMETHOD(DrawPrimitiveUP)(D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride);
STDMETHOD(DrawIndexedPrimitiveUP)(D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT PrimitiveCount, CONST void* pIndexData, D3DFORMAT IndexDataFormat, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride);
STDMETHOD(ProcessVertices)(UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags);
STDMETHOD(CreateVertexDeclaration)(CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl);
STDMETHOD(SetVertexDeclaration)(IDirect3DVertexDeclaration9* pDecl);
STDMETHOD(GetVertexDeclaration)(IDirect3DVertexDeclaration9** ppDecl);
STDMETHOD(SetFVF)(DWORD FVF);
STDMETHOD(GetFVF)(DWORD* pFVF);
STDMETHOD(CreateVertexShader)(CONST DWORD* pFunction, IDirect3DVertexShader9** ppShader);
STDMETHOD(SetVertexShader)(IDirect3DVertexShader9* pShader);
STDMETHOD(GetVertexShader)(IDirect3DVertexShader9** ppShader);
STDMETHOD(SetVertexShaderConstantF)(UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount);
STDMETHOD(GetVertexShaderConstantF)(UINT StartRegister, float* pConstantData, UINT Vector4fCount);
STDMETHOD(SetVertexShaderConstantI)(UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount);
STDMETHOD(GetVertexShaderConstantI)(UINT StartRegister, int* pConstantData, UINT Vector4iCount);
STDMETHOD(SetVertexShaderConstantB)(UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount);
STDMETHOD(GetVertexShaderConstantB)(UINT StartRegister, BOOL* pConstantData, UINT BoolCount);
STDMETHOD(SetStreamSource)(UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride);
STDMETHOD(GetStreamSource)(UINT StreamNumber, IDirect3DVertexBuffer9** ppStreamData, UINT* pOffsetInBytes, UINT* pStride);
STDMETHOD(SetStreamSourceFreq)(UINT StreamNumber, UINT Setting);
STDMETHOD(GetStreamSourceFreq)(UINT StreamNumber, UINT* pSetting);
STDMETHOD(SetIndices)(IDirect3DIndexBuffer9* pIndexData);
STDMETHOD(GetIndices)(IDirect3DIndexBuffer9** ppIndexData);
STDMETHOD(CreatePixelShader)(CONST DWORD* pFunction, IDirect3DPixelShader9** ppShader);
STDMETHOD(SetPixelShader)(IDirect3DPixelShader9* pShader);
STDMETHOD(GetPixelShader)(IDirect3DPixelShader9** ppShader);
STDMETHOD(SetPixelShaderConstantF)(UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount);
STDMETHOD(GetPixelShaderConstantF)(UINT StartRegister, float* pConstantData, UINT Vector4fCount);
STDMETHOD(SetPixelShaderConstantI)(UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount);
STDMETHOD(GetPixelShaderConstantI)(UINT StartRegister, int* pConstantData, UINT Vector4iCount);
STDMETHOD(SetPixelShaderConstantB)(UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount);
STDMETHOD(GetPixelShaderConstantB)(UINT StartRegister, BOOL* pConstantData, UINT BoolCount);
STDMETHOD(DrawRectPatch)(UINT Handle, CONST float* pNumSegs, CONST D3DRECTPATCH_INFO* pRectPatchInfo);
STDMETHOD(DrawTriPatch)(UINT Handle, CONST float* pNumSegs, CONST D3DTRIPATCH_INFO* pTriPatchInfo);
STDMETHOD(DeletePatch)(UINT Handle);
STDMETHOD(CreateQuery)(D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery);
};
// wrapper for IDirect3DDevice9 in d3d9.h
// generated using wrapper_gen.rb
#pragma once
#include "d3d9.h"
interface hkIDirect3DDevice9 : public IDirect3DDevice9 {
IDirect3DDevice9* m_pWrapped;
public:
hkIDirect3DDevice9(IDirect3DDevice9 *pIDirect3DDevice9);
~hkIDirect3DDevice9();
// original interface
STDMETHOD(QueryInterface)(REFIID riid, void** ppvObj);
STDMETHOD_(ULONG, AddRef)();
STDMETHOD_(ULONG, Release)();
STDMETHOD(TestCooperativeLevel)();
STDMETHOD_(UINT, GetAvailableTextureMem)();
STDMETHOD(EvictManagedResources)();
STDMETHOD(GetDirect3D)(IDirect3D9** ppD3D9);
STDMETHOD(GetDeviceCaps)(D3DCAPS9* pCaps);
STDMETHOD(GetDisplayMode)(UINT iSwapChain, D3DDISPLAYMODE* pMode);
STDMETHOD(GetCreationParameters)(D3DDEVICE_CREATION_PARAMETERS *pParameters);
STDMETHOD(SetCursorProperties)(UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap);
STDMETHOD_(void, SetCursorPosition)(int X, int Y, DWORD Flags);
STDMETHOD_(BOOL, ShowCursor)(BOOL bShow);
STDMETHOD(CreateAdditionalSwapChain)(D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** pSwapChain);
STDMETHOD(GetSwapChain)(UINT iSwapChain, IDirect3DSwapChain9** pSwapChain);
STDMETHOD_(UINT, GetNumberOfSwapChains)();
STDMETHOD(Reset)(D3DPRESENT_PARAMETERS* pPresentationParameters);
STDMETHOD(Present)(CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion);
STDMETHOD(GetBackBuffer)(UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer);
STDMETHOD(GetRasterStatus)(UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus);
STDMETHOD(SetDialogBoxMode)(BOOL bEnableDialogs);
STDMETHOD_(void, SetGammaRamp)(UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp);
STDMETHOD_(void, GetGammaRamp)(UINT iSwapChain, D3DGAMMARAMP* pRamp);
STDMETHOD(CreateTexture)(UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle);
STDMETHOD(CreateVolumeTexture)(UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle);
STDMETHOD(CreateCubeTexture)(UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle);
STDMETHOD(CreateVertexBuffer)(UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle);
STDMETHOD(CreateIndexBuffer)(UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle);
STDMETHOD(CreateRenderTarget)(UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle);
STDMETHOD(CreateDepthStencilSurface)(UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle);
STDMETHOD(UpdateSurface)(IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, CONST POINT* pDestPoint);
STDMETHOD(UpdateTexture)(IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture);
STDMETHOD(GetRenderTargetData)(IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface);
STDMETHOD(GetFrontBufferData)(UINT iSwapChain, IDirect3DSurface9* pDestSurface);
STDMETHOD(StretchRect)(IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter);
STDMETHOD(ColorFill)(IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color);
STDMETHOD(CreateOffscreenPlainSurface)(UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle);
STDMETHOD(SetRenderTarget)(DWORD RenderTargetIndex, IDirect3DSurface9* pRenderTarget);
STDMETHOD(GetRenderTarget)(DWORD RenderTargetIndex, IDirect3DSurface9** ppRenderTarget);
STDMETHOD(SetDepthStencilSurface)(IDirect3DSurface9* pNewZStencil);
STDMETHOD(GetDepthStencilSurface)(IDirect3DSurface9** ppZStencilSurface);
STDMETHOD(BeginScene)();
STDMETHOD(EndScene)();
STDMETHOD(Clear)(DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil);
STDMETHOD(SetTransform)(D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix);
STDMETHOD(GetTransform)(D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix);
STDMETHOD(MultiplyTransform)(D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix);
STDMETHOD(SetViewport)(CONST D3DVIEWPORT9* pViewport);
STDMETHOD(GetViewport)(D3DVIEWPORT9* pViewport);
STDMETHOD(SetMaterial)(CONST D3DMATERIAL9* pMaterial);
STDMETHOD(GetMaterial)(D3DMATERIAL9* pMaterial);
STDMETHOD(SetLight)(DWORD Index, CONST D3DLIGHT9* pLight);
STDMETHOD(GetLight)(DWORD Index, D3DLIGHT9* pLight);
STDMETHOD(LightEnable)(DWORD Index, BOOL Enable);
STDMETHOD(GetLightEnable)(DWORD Index, BOOL* pEnable);
STDMETHOD(SetClipPlane)(DWORD Index, CONST float* pPlane);
STDMETHOD(GetClipPlane)(DWORD Index, float* pPlane);
STDMETHOD(SetRenderState)(D3DRENDERSTATETYPE State, DWORD Value);
STDMETHOD(GetRenderState)(D3DRENDERSTATETYPE State, DWORD* pValue);
STDMETHOD(CreateStateBlock)(D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB);
STDMETHOD(BeginStateBlock)();
STDMETHOD(EndStateBlock)(IDirect3DStateBlock9** ppSB);
STDMETHOD(SetClipStatus)(CONST D3DCLIPSTATUS9* pClipStatus);
STDMETHOD(GetClipStatus)(D3DCLIPSTATUS9* pClipStatus);
STDMETHOD(GetTexture)(DWORD Stage, IDirect3DBaseTexture9** ppTexture);
STDMETHOD(SetTexture)(DWORD Stage, IDirect3DBaseTexture9* pTexture);
STDMETHOD(GetTextureStageState)(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue);
STDMETHOD(SetTextureStageState)(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value);
STDMETHOD(GetSamplerState)(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue);
STDMETHOD(SetSamplerState)(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value);
STDMETHOD(ValidateDevice)(DWORD* pNumPasses);
STDMETHOD(SetPaletteEntries)(UINT PaletteNumber, CONST PALETTEENTRY* pEntries);
STDMETHOD(GetPaletteEntries)(UINT PaletteNumber, PALETTEENTRY* pEntries);
STDMETHOD(SetCurrentTexturePalette)(UINT PaletteNumber);
STDMETHOD(GetCurrentTexturePalette)(UINT *PaletteNumber);
STDMETHOD(SetScissorRect)(CONST RECT* pRect);
STDMETHOD(GetScissorRect)(RECT* pRect);
STDMETHOD(SetSoftwareVertexProcessing)(BOOL bSoftware);
STDMETHOD_(BOOL, GetSoftwareVertexProcessing)();
STDMETHOD(SetNPatchMode)(float nSegments);
STDMETHOD_(float, GetNPatchMode)();
STDMETHOD(DrawPrimitive)(D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount);
STDMETHOD(DrawIndexedPrimitive)(D3DPRIMITIVETYPE, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount);
STDMETHOD(DrawPrimitiveUP)(D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride);
STDMETHOD(DrawIndexedPrimitiveUP)(D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT PrimitiveCount, CONST void* pIndexData, D3DFORMAT IndexDataFormat, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride);
STDMETHOD(ProcessVertices)(UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags);
STDMETHOD(CreateVertexDeclaration)(CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl);
STDMETHOD(SetVertexDeclaration)(IDirect3DVertexDeclaration9* pDecl);
STDMETHOD(GetVertexDeclaration)(IDirect3DVertexDeclaration9** ppDecl);
STDMETHOD(SetFVF)(DWORD FVF);
STDMETHOD(GetFVF)(DWORD* pFVF);
STDMETHOD(CreateVertexShader)(CONST DWORD* pFunction, IDirect3DVertexShader9** ppShader);
STDMETHOD(SetVertexShader)(IDirect3DVertexShader9* pShader);
STDMETHOD(GetVertexShader)(IDirect3DVertexShader9** ppShader);
STDMETHOD(SetVertexShaderConstantF)(UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount);
STDMETHOD(GetVertexShaderConstantF)(UINT StartRegister, float* pConstantData, UINT Vector4fCount);
STDMETHOD(SetVertexShaderConstantI)(UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount);
STDMETHOD(GetVertexShaderConstantI)(UINT StartRegister, int* pConstantData, UINT Vector4iCount);
STDMETHOD(SetVertexShaderConstantB)(UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount);
STDMETHOD(GetVertexShaderConstantB)(UINT StartRegister, BOOL* pConstantData, UINT BoolCount);
STDMETHOD(SetStreamSource)(UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride);
STDMETHOD(GetStreamSource)(UINT StreamNumber, IDirect3DVertexBuffer9** ppStreamData, UINT* pOffsetInBytes, UINT* pStride);
STDMETHOD(SetStreamSourceFreq)(UINT StreamNumber, UINT Setting);
STDMETHOD(GetStreamSourceFreq)(UINT StreamNumber, UINT* pSetting);
STDMETHOD(SetIndices)(IDirect3DIndexBuffer9* pIndexData);
STDMETHOD(GetIndices)(IDirect3DIndexBuffer9** ppIndexData);
STDMETHOD(CreatePixelShader)(CONST DWORD* pFunction, IDirect3DPixelShader9** ppShader);
STDMETHOD(SetPixelShader)(IDirect3DPixelShader9* pShader);
STDMETHOD(GetPixelShader)(IDirect3DPixelShader9** ppShader);
STDMETHOD(SetPixelShaderConstantF)(UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount);
STDMETHOD(GetPixelShaderConstantF)(UINT StartRegister, float* pConstantData, UINT Vector4fCount);
STDMETHOD(SetPixelShaderConstantI)(UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount);
STDMETHOD(GetPixelShaderConstantI)(UINT StartRegister, int* pConstantData, UINT Vector4iCount);
STDMETHOD(SetPixelShaderConstantB)(UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount);
STDMETHOD(GetPixelShaderConstantB)(UINT StartRegister, BOOL* pConstantData, UINT BoolCount);
STDMETHOD(DrawRectPatch)(UINT Handle, CONST float* pNumSegs, CONST D3DRECTPATCH_INFO* pRectPatchInfo);
STDMETHOD(DrawTriPatch)(UINT Handle, CONST float* pNumSegs, CONST D3DTRIPATCH_INFO* pTriPatchInfo);
STDMETHOD(DeletePatch)(UINT Handle);
STDMETHOD(CreateQuery)(D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery);
};

View file

@ -1,209 +1,209 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<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>{6C397640-B1A0-4DEF-8657-0EB21DC2FEA5}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>d3d9ex</RootNamespace>
<ProjectName>OneTweakNG</ProjectName>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<InterproceduralOptimization>true</InterproceduralOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<InterproceduralOptimization>true</InterproceduralOptimization>
<PlatformToolset>v140</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)'=='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>
<TargetName>d3d9</TargetName>
<IncludePath>$(SolutionDir)\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetName>d3d9</TargetName>
<IncludePath>$(SolutionDir)\Common\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>dinput8</TargetName>
<IncludePath>$(SolutionDir)\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>d3d9</TargetName>
<IncludePath>$(SolutionDir)\Common\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
<AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
<AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<Optimization>MaxSpeed</Optimization>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Context.h" />
<ClInclude Include="Wrapper.h" />
<ClInclude Include="IDirect3D9.h" />
<ClInclude Include="IDirect3DDevice9.h" />
<ClInclude Include="Settings.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="AutoFix.cpp" />
<ClCompile Include="Context.cpp" />
<ClCompile Include="dllmain.cpp">
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="IDirect3D9.cpp" />
<ClCompile Include="IDirect3DDevice9.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="exports.def" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MinHook\build\VC12\libMinHook.vcxproj">
<Project>{f142a341-5ee0-442d-a15f-98ae9b48dbae}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<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>{6C397640-B1A0-4DEF-8657-0EB21DC2FEA5}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>d3d9ex</RootNamespace>
<ProjectName>OneTweakNG</ProjectName>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<InterproceduralOptimization>true</InterproceduralOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<InterproceduralOptimization>true</InterproceduralOptimization>
<PlatformToolset>v140</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)'=='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>
<TargetName>d3d9</TargetName>
<IncludePath>$(SolutionDir)\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetName>d3d9</TargetName>
<IncludePath>$(SolutionDir)\Common\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>dinput8</TargetName>
<IncludePath>$(SolutionDir)\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>d3d9</TargetName>
<IncludePath>$(SolutionDir)\Common\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
<AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
<AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<Optimization>MaxSpeed</Optimization>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Context.h" />
<ClInclude Include="Wrapper.h" />
<ClInclude Include="IDirect3D9.h" />
<ClInclude Include="IDirect3DDevice9.h" />
<ClInclude Include="Settings.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="AutoFix.cpp" />
<ClCompile Include="Context.cpp" />
<ClCompile Include="dllmain.cpp">
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="IDirect3D9.cpp" />
<ClCompile Include="IDirect3DDevice9.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="exports.def" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MinHook\build\VC12\libMinHook.vcxproj">
<Project>{f142a341-5ee0-442d-a15f-98ae9b48dbae}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View file

@ -1,68 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IDirect3D9.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IDirect3DDevice9.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Context.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Settings.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Wrapper.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IDirect3D9.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IDirect3DDevice9.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="AutoFix.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Context.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="exports.def">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IDirect3D9.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IDirect3DDevice9.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Context.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Settings.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Wrapper.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IDirect3D9.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IDirect3DDevice9.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="AutoFix.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Context.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="exports.def">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
</Project>