mirror of
https://github.com/DxWnd/DxWnd.reloaded
synced 2024-12-30 09:25:35 +01:00
v2_04_06_src_fx3
Former-commit-id: e06430d1b07aa1f28da76b2503298dd67ae349f9
This commit is contained in:
parent
d20fc6c186
commit
90f03dc416
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8f543c951f150e29ae64f702c21bceeaa46d3bda294913e9b03346aa6aa276ea
|
||||
oid sha256:c4a337db3a9c5cbb7c06069a437f34c28285dcf2548181622789c594c8750bc1
|
||||
size 781312
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:864a303e49a88b3bee7353573304b29f4b64852f8fae83b8ac33502099c46a08
|
||||
oid sha256:fb594ca522bdf3bc9956b3e2f18c8582c85728c30a77f6c0879e971bc3417ff2
|
||||
size 673280
|
||||
|
36
build/exports/Wizardry Chronicles V0984b - English.exe.dxw
Normal file
36
build/exports/Wizardry Chronicles V0984b - English.exe.dxw
Normal file
@ -0,0 +1,36 @@
|
||||
[target]
|
||||
title0=Wizardry Chronicles V0984b - English.exe
|
||||
path0=D:\Games\Wizardry Chronicle\Wizardry Chronicles V0984b - English.exe
|
||||
startfolder0=
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
monitorid0=-1
|
||||
coord0=0
|
||||
flag0=673185826
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=205520900
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
dflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=0
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
slowratio0=2
|
||||
scanline0=0
|
||||
initresw0=800
|
||||
initresh0=600
|
36
build/exports/Wizardry Chronicles.dxw
Normal file
36
build/exports/Wizardry Chronicles.dxw
Normal file
@ -0,0 +1,36 @@
|
||||
[target]
|
||||
title0=Wizardry Chronicles
|
||||
path0=D:\Games\Wizardry Chronicle\Wiz.exe
|
||||
startfolder0=
|
||||
launchpath0=
|
||||
module0=
|
||||
opengllib0=
|
||||
notes0=
|
||||
registry0=
|
||||
ver0=0
|
||||
monitorid0=-1
|
||||
coord0=0
|
||||
flag0=673185826
|
||||
flagg0=1207959552
|
||||
flagh0=20
|
||||
flagi0=138412036
|
||||
flagj0=4224
|
||||
flagk0=65536
|
||||
flagl0=0
|
||||
flagm0=0
|
||||
tflag0=0
|
||||
dflag0=0
|
||||
posx0=50
|
||||
posy0=50
|
||||
sizx0=800
|
||||
sizy0=600
|
||||
maxfps0=0
|
||||
initts0=0
|
||||
winver0=0
|
||||
maxres0=0
|
||||
swapeffect0=0
|
||||
maxddinterface0=7
|
||||
slowratio0=2
|
||||
scanline0=0
|
||||
initresw0=800
|
||||
initresh0=600
|
@ -1455,10 +1455,13 @@ add: GDI32 debug highlighting of blitted rects on screen
|
||||
add: hooks for GDI32 GetTextExtentPointA and GetTextExtentPoint32A: needed for proper string rendering on "Warhammer: Shadow of the Horned Rat"
|
||||
add: hook for GDI32 GdiAlphaBlend, very rare call that appeared in "RHEM" during savegame load.
|
||||
|
||||
v2.04.06
|
||||
v2.04.06/fx3
|
||||
GUI:
|
||||
add: Expert mode
|
||||
DLL:
|
||||
fix: corrected condition to print two virtual registry log messages
|
||||
fix: improved logic to recover surfaces with DDSCAPS_TEXTURE capability - ref. "Dominant Species"
|
||||
fix: fixed cursor clipping state and toggle key to make it work in all conditions
|
||||
fix: fixed cursor clipping state and toggle key to make it work in all conditions
|
||||
fix: D3D objects hooking with QueryInterface method. Fixes "Wizardry Chronicle"
|
||||
fix: add hook for GDI32 GdiGradientFill and GdiTransparentBlt, present in "RHEM"
|
||||
fix: log messages for CloseHandle wrapper
|
@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "TlHelp32.h"
|
||||
|
||||
#define VERSION "2.04.06.fx2"
|
||||
#define VERSION "2.04.06.fx3"
|
||||
|
||||
#define DDTHREADLOCK 1
|
||||
|
||||
|
Binary file not shown.
112
dll/hd3d7.cpp
112
dll/hd3d7.cpp
@ -702,51 +702,91 @@ void HookTexture(LPVOID *lpTexture, int version)
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT WINAPI extQueryInterfaceD3(int d3dversion, QueryInterfaceD3_Type pQueryInterfaceD3, void *lpd3d, REFIID riid, LPVOID *ppvObj)
|
||||
HRESULT WINAPI extQueryInterfaceD3(int d3dversion, QueryInterfaceD3_Type pQueryInterfaceD3, void *lpd3d, REFIID riid, LPVOID *obp)
|
||||
{
|
||||
HRESULT res;
|
||||
unsigned int dwLocalDDVersion;
|
||||
unsigned int dwLocalD3DVersion;
|
||||
|
||||
OutTraceD3D("QueryInterface(D3D%d): d3d=%x REFIID=%x obj=%x\n", d3dversion, lpd3d, riid.Data1, ppvObj);
|
||||
res=(*pQueryInterfaceD3)(lpd3d, riid, ppvObj);
|
||||
if(res){
|
||||
OutTraceE("QueryInterface(D3D) ERROR: err=%x(%s)\n", res, ExplainDDError(res));
|
||||
res = (*pQueryInterfaceD3)(lpd3d, riid, obp);
|
||||
OutTraceDDRAW("QueryInterface(D3D%d): lpdd=%x REFIID=%x(%s) obp=%x ret=%x at %d\n",
|
||||
d3dversion, lpd3d, riid.Data1, ExplainGUID((GUID *)&riid), *obp, res, __LINE__);
|
||||
|
||||
if(res) {
|
||||
OutTraceE("QueryInterface(D3D) ERROR: res=%x(%s)\n", res, ExplainDDError(res));
|
||||
return res;
|
||||
}
|
||||
switch(d3dversion){
|
||||
case 1:
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 12), extInitialize, (void **)&pInitialize, "Initialize");
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 16), extEnumDevices1, (void **)&pEnumDevices1, "EnumDevices");
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 20), extCreateLight1, (void **)&pCreateLight1, "CreateLight(1)");
|
||||
#ifdef TRACEMATERIAL
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 24), extCreateMaterial1, (void **)&pCreateMaterial1, "CreateMaterial(1)");
|
||||
#endif
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 28), extCreateViewport1, (void **)&pCreateViewport1, "CreateViewport(1)");
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 32), extFindDevice1, (void **)&pFindDevice1, "FindDevice(1)");
|
||||
|
||||
dwLocalDDVersion=0;
|
||||
dwLocalD3DVersion=0;
|
||||
switch(riid.Data1){
|
||||
case 0x6C14DB80: //DirectDraw1
|
||||
dwLocalDDVersion = 1;
|
||||
break;
|
||||
case 2:
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 12), extEnumDevices2, (void **)&pEnumDevices2, "EnumDevices(2)");
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 16), extCreateLight2, (void **)&pCreateLight2, "CreateLight(2)");
|
||||
#ifdef TRACEMATERIAL
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 20), extCreateMaterial2, (void **)&pCreateMaterial2, "CreateMaterial(2)");
|
||||
#endif
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 24), extCreateViewport2, (void **)&pCreateViewport2, "CreateViewport(2)");
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 28), extFindDevice2, (void **)&pFindDevice2, "FindDevice(2)");
|
||||
case 0xB3A6F3E0: //DirectDraw2
|
||||
dwLocalDDVersion = 2;
|
||||
break;
|
||||
case 3:
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 12), extEnumDevices3, (void **)&pEnumDevices3, "EnumDevices(3)");
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 16), extCreateLight3, (void **)&pCreateLight3, "CreateLight(3)");
|
||||
#ifdef TRACEMATERIAL
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 20), extCreateMaterial3, (void **)&pCreateMaterial3, "CreateMaterial(3)");
|
||||
#endif
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 24), extCreateViewport3, (void **)&pCreateViewport3, "CreateViewport(3)");
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 28), extFindDevice3, (void **)&pFindDevice3, "FindDevice(3)");
|
||||
case 0x618f8ad4: //DirectDraw3
|
||||
dwLocalDDVersion = 3;
|
||||
break;
|
||||
case 7:
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 12), extEnumDevices7, (void **)&pEnumDevices7, "EnumDevices(7)");
|
||||
SetHook((void *)(**(DWORD **)ppvObj + 32), extCreateDevice7, (void **)&pCreateDevice7, "CreateDevice(D3D7)");
|
||||
case 0x9c59509a: //DirectDraw4
|
||||
dwLocalDDVersion = 4;
|
||||
break;
|
||||
case 0x15e65ec0: //DirectDraw7
|
||||
dwLocalDDVersion = 7;
|
||||
break;
|
||||
case 0x3BBA0080: //Direct3D
|
||||
dwLocalD3DVersion = 1;
|
||||
break;
|
||||
case 0x6aae1ec1: //Direct3D2
|
||||
dwLocalD3DVersion = 2;
|
||||
break;
|
||||
case 0xbb223240: //Direct3D3
|
||||
dwLocalD3DVersion = 3;
|
||||
break;
|
||||
case 0xf5049e77: //Direct3D7
|
||||
dwLocalD3DVersion = 7;
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
if (! *obp){
|
||||
OutTraceDDRAW("QueryInterface(D): Interface for DX version %d not found\n", dwLocalDDVersion);
|
||||
return(0);
|
||||
}
|
||||
if(dwLocalDDVersion) OutTraceDW("QueryInterface(D): Got interface for DX version %d\n", dwLocalDDVersion);
|
||||
if(dwLocalD3DVersion) OutTraceDW("QueryInterface(D): Got interface for D3D version %d\n", dwLocalD3DVersion);
|
||||
|
||||
if (dwLocalDDVersion > dxw.dwMaxDDVersion) {
|
||||
*obp = NULL;
|
||||
OutTraceDW("QueryInterface(D): lpdd=%x REFIID=%x obp=(NULL) ret=%x at %d\n",
|
||||
lpd3d, riid.Data1, res, __LINE__);
|
||||
return(0);
|
||||
}
|
||||
|
||||
switch (dwLocalDDVersion){
|
||||
case 1: // you never know ....
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 7:
|
||||
dxw.dwDDVersion=dwLocalDDVersion;
|
||||
extern void HookDDSession(LPDIRECTDRAW *, int);
|
||||
HookDDSession((LPDIRECTDRAW *)obp, dxw.dwDDVersion);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (dwLocalD3DVersion){
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 7:
|
||||
HookDirect3DSession((LPDIRECTDRAW *)obp, dwLocalD3DVersion);
|
||||
break;
|
||||
}
|
||||
|
||||
OutTraceDDRAW("QueryInterface(D3D): lpdd=%x REFIID=%x obp=%x DDVersion=%d ret=0\n",
|
||||
lpd3d, riid.Data1, *obp, dxw.dwDDVersion);
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI extQueryInterfaceD31(void *lpd3d, REFIID riid, LPVOID *ppvObj)
|
||||
@ -924,7 +964,7 @@ HRESULT WINAPI extEnumDevices(int d3dversion, EnumDevices_Type pEnumDevices, voi
|
||||
HRESULT res;
|
||||
CallbackArg Arg;
|
||||
|
||||
OutTraceD3D("EnumDevices(D#D%d): d3d=%x arg=%x\n", d3dversion, lpd3d, arg);
|
||||
OutTraceD3D("EnumDevices(D3D%d): d3d=%x arg=%x\n", d3dversion, lpd3d, arg);
|
||||
Arg.cb= &cb;
|
||||
Arg.arg=arg;
|
||||
res=(*pEnumDevices)(lpd3d, (LPD3DENUMDEVICESCALLBACK)extDeviceProxy, (LPVOID)&Arg);
|
||||
|
@ -954,8 +954,15 @@ HANDLE WINAPI extCreateFile(LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwS
|
||||
BOOL WINAPI extCloseHandle(HANDLE hObject)
|
||||
{
|
||||
BOOL ret;
|
||||
OutTrace("CloseHandle: hFile=%x\n", hObject);
|
||||
if (hObject && (hObject != (HANDLE)-1)) __try {ret=CloseHandle(hObject);} __except(EXCEPTION_EXECUTE_HANDLER){};
|
||||
if (hObject && (hObject != (HANDLE)-1)) {
|
||||
OutTraceB("CloseHandle: hFile=%x\n", hObject);
|
||||
__try {ret=CloseHandle(hObject);
|
||||
}
|
||||
__except(EXCEPTION_EXECUTE_HANDLER){};
|
||||
}
|
||||
else{
|
||||
OutTraceDW("CloseHandle: BYPASS hFile=%x\n", hObject);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,65 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioUserFile
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
ShowAllFiles="false"
|
||||
>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<DebugSettings
|
||||
Command="$(TargetPath)"
|
||||
WorkingDirectory=""
|
||||
CommandArguments=""
|
||||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteMachine="DESKTOP-Q3RE27J"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
SQLDebugging=""
|
||||
Environment=""
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor=""
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
ApplicationCommand=""
|
||||
ApplicationArguments=""
|
||||
ShimCommand=""
|
||||
MPIAcceptMode=""
|
||||
MPIAcceptFilter=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<DebugSettings
|
||||
Command="$(TargetPath)"
|
||||
WorkingDirectory=""
|
||||
CommandArguments=""
|
||||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteMachine="DESKTOP-Q3RE27J"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
SQLDebugging=""
|
||||
Environment=""
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor=""
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
ApplicationCommand=""
|
||||
ApplicationArguments=""
|
||||
ShimCommand=""
|
||||
MPIAcceptMode=""
|
||||
MPIAcceptFilter=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</VisualStudioUserFile>
|
Loading…
x
Reference in New Issue
Block a user