1
0
mirror of https://github.com/DxWnd/DxWnd.reloaded synced 2024-12-30 09:25:35 +01:00

v2_03_48_src

Former-commit-id: 121914fac2392a3162b0f39ea628417458af3dcd
This commit is contained in:
gho tik 2015-11-29 11:42:34 -05:00 committed by Refael ACkermann
parent 11aace665a
commit 569a662445
42 changed files with 1694 additions and 132 deletions

View File

@ -20,7 +20,7 @@
#define HANDLEEXCEPTIONS 0x00000040 // Handles exceptions: Div by 0 ....
#define SAVELOAD 0x00000080
#define EMULATEBUFFER 0x00000100
// #define AUTOMATIC 0x00000200
#define HOOKDI8 0x00000200
#define BLITFROMBACKBUFFER 0x00000400
#define SUPPRESSCLIPPING 0x00000800
#define AUTOREFRESH 0x00001000
@ -92,7 +92,7 @@
#define EMULATEREGISTRY 0x00000400 // Emulate registry api to read extra keys
#define CDROMDRIVETYPE 0x00000800 // Pretends that GetDriveType() always returns DRIVE_CDROM
#define NOWINDOWMOVE 0x00001000 // Do not try to update window position & size on D3D rendering
//#define DISABLEHAL 0x00002000 // Disable HAL support (IID_IDirect3DHALDevice) - no longer used
#define FORCECLIPPER 0x00002000 // Set ddraw clipping for real primary surface and primary window - but FastBlt cannot be used!
#define LOCKSYSCOLORS 0x00004000 // Lock Sys Colors changes by SetSysColors() call
#define GDIEMULATEDC 0x00008000 // Map GDI/user32 calls to primary to a memory surface to be stretch-blitted to the primary
#define FULLSCREENONLY 0x00010000 // assume that the program is always in fullscreen mode
@ -210,8 +210,8 @@
#define SYNCPALETTE 0x04000000 // Syncronize GDI to DDRAW palette
#define VIRTUALJOYSTICK 0x08000000 // Enables the DxWnd virtual joystick
#define UNACQUIRE 0x10000000 // Unacquire DirectInput devices when losing focus and acquire back when gaining focus
#define HOOKGOGLIBS 0x20000000
#define BYPASSGOGLIBS 0x40000000
#define HOOKGOGLIBS 0x20000000 // Hook additional libraries provided by GOG with different names but same functionalities as system ones
#define BYPASSGOGLIBS 0x40000000 // Bypass GOG proxy system libraries loading directly the system libraries from the system folder
// logging Tflags DWORD:
#define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general

1429
Include/qmixer.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ba9b297fe64848f5b2fc2ec464edf523c15537cec300708587e072b69b6d175
size 622080
oid sha256:b4a56c750b4f879d9a6bf014e56fa028e80775f98c19db9213fcbf8567169193
size 622592

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bd5ee4d4d589d7580de254177665f34b2c8ead891982d3700123f29cecc90cc3
size 546304
oid sha256:b1fae4424d81cb9fc6c32e8a30525dc678480e1bc9c40784d2b528a6d736f9bb
size 546816

View File

@ -1,64 +0,0 @@
[window]
posx=1313
posy=581
sizx=320
sizy=200
lang=default
exepath=D:\Games\Kasbrik\
;lang=automatic
;updatepaths=1
;debug=1
;multiprocesshook=0
;checkadmin=0
[texture]
MinTexX=16
MaxTexX=0
MinTexY=16
MaxTexY=0
[keymapping]
timetoggle=0x72
altf4=0x73
timeslow=0x74
timefast=0x75
cliptoggle=
refresh=
logtoggle=
plocktoggle=
fpstoggle=
printscreen=0x7B
corner=0x7A
freezetime=0x79
[target]
title0=Kasbrik 3D
path0=D:\Games\Kasbrik\Kasbrik.exe
launchpath0=
module0=
opengllib0=
notes0=
registry0=
ver0=8
coord0=0
flag0=136314914
flagg0=1207959552
flagh0=20
flagi0=138412036
flagj0=4224
flagk0=327680
tflag0=0
initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1
swapeffect0=0

View File

@ -6,7 +6,7 @@ module0=
opengllib0=
ver0=0
coord0=0
flag0=134218272
flag0=134218274
flagg0=1207959552
flagh0=20
flagi0=4194308
@ -26,3 +26,7 @@ initts0=0
winver0=0
maxres0=-1
flagj0=128
notes0=
registry0=
flagk0=0
swapeffect0=0

View File

@ -6,7 +6,7 @@ module0=
opengllib0=
ver0=0
coord0=0
flag0=134218272
flag0=134218274
flagg0=1207959552
flagh0=20
flagi0=138412036
@ -27,3 +27,6 @@ winver0=0
maxres0=-1
notes0=
flagj0=128
registry0=
flagk0=65536
swapeffect0=0

View File

@ -5,7 +5,7 @@ module0=
opengllib0=
ver0=0
coord0=0
flag0=134218272
flag0=134218274
flagg0=1207959552
flagh0=20
flagi0=4194308
@ -26,3 +26,7 @@ winver0=0
maxres0=-1
launchpath0=
flagj0=128
notes0=
registry0=
flagk0=0
swapeffect0=0

View File

@ -6,9 +6,9 @@ opengllib0=
ver0=0
coord0=0
flag0=671088675
flagg0=1208025088
flagg0=1207959552
flagh0=20
flagi0=4194316
flagi0=4194308
tflag0=0
initx0=0
inity0=0
@ -27,5 +27,6 @@ maxres0=-1
launchpath0=
notes0=
flagj0=128
flagk0=0
flagk0=65536
swapeffect0=0
registry0=

View File

@ -26,3 +26,7 @@ winver0=0
maxres0=-1
launchpath0=
flagj0=128
notes0=
registry0=
flagk0=65536
swapeffect0=0

View File

@ -5,7 +5,7 @@ module0=
opengllib0=
ver0=0
coord0=0
flag0=679493666
flag0=679493682
flagg0=1207959552
flagh0=65556
flagi0=69206020
@ -14,8 +14,8 @@ initx0=0
inity0=0
minx0=0
miny0=0
maxx0=0
maxy0=0
maxx0=800
maxy0=600
posx0=50
posy0=50
sizx0=800
@ -27,5 +27,6 @@ maxres0=-1
launchpath0=
notes0=
flagj0=128
flagk0=0
flagk0=65536
swapeffect0=0
registry0=

View File

@ -5,10 +5,10 @@ module0=
opengllib0=
ver0=9
coord0=0
flag0=134218272
flag0=-2013265376
flagg0=1207959552
flagh0=20
flagi0=4
flagi0=4194308
tflag0=0
initx0=0
inity0=0
@ -24,3 +24,9 @@ maxfps0=0
initts0=0
winver0=0
maxres0=-1
launchpath0=
notes0=
registry0=
flagj0=0
flagk0=0
swapeffect0=0

View File

@ -8,7 +8,7 @@ coord0=0
flag0=134217762
flagg0=1207959552
flagh0=20
flagi0=4
flagi0=4194308
tflag0=0
initx0=0
inity0=0
@ -22,3 +22,11 @@ sizx0=800
sizy0=600
maxfps0=0
initts0=0
launchpath0=
notes0=
registry0=
flagj0=128
flagk0=0
winver0=0
maxres0=0
swapeffect0=0

View File

@ -12,7 +12,7 @@ flagg0=1207959568
flagh0=20
flagi0=4194308
flagj0=128
flagk0=0
flagk0=32768
tflag0=0
initx0=0
inity0=0
@ -29,3 +29,4 @@ initts0=0
winver0=0
maxres0=-1
swapeffect0=0
registry0=

View File

@ -6,10 +6,10 @@ opengllib0=
ver0=0
coord0=0
flag0=134217762
flagg0=1212153856
flagg0=1213202432
flagh0=65556
flagi0=4194308
tflag0=6147
tflag0=0
initx0=0
inity0=0
minx0=0
@ -27,5 +27,6 @@ maxres0=-1
launchpath0=
notes0=
flagj0=128
flagk0=0
flagk0=65536
swapeffect0=0
registry0=

View File

@ -27,5 +27,6 @@ maxres0=-1
launchpath0=
notes0=
flagj0=128
flagk0=0
flagk0=65536
swapeffect0=0
registry0=

View File

@ -27,5 +27,6 @@ maxres0=-1
launchpath0=
notes0=
flagj0=128
flagk0=0
flagk0=98304
swapeffect0=0
registry0=

View File

@ -6,7 +6,7 @@ module0=
opengllib0=
ver0=0
coord0=0
flag0=134234146
flag0=134236194
flagg0=1207959552
flagh0=20
flagi0=138412036
@ -26,3 +26,7 @@ maxfps0=0
initts0=0
winver0=0
maxres0=-1
notes0=
registry0=
flagk0=65536
swapeffect0=0

View File

@ -6,7 +6,7 @@ opengllib0=
ver0=0
coord0=0
flag0=738197538
flagg0=1207959552
flagg0=1744830464
flagh0=20
flagi0=4194308
tflag0=0
@ -29,3 +29,4 @@ notes0=
flagj0=128
flagk0=65536
swapeffect0=0
registry0=

View File

@ -5,7 +5,7 @@ module0=
opengllib0=
ver0=0
coord0=0
flag0=704643106
flag0=706740258
flagg0=1207959552
flagh0=20
flagi0=4194308
@ -29,3 +29,4 @@ notes0=
flagj0=128
flagk0=65536
swapeffect0=0
registry0=

View File

@ -5,10 +5,10 @@ module0=
opengllib0=
ver0=0
coord0=0
flag0=671097376
flag0=671097378
flagg0=1207959552
flagh0=20
flagi0=4
flagi0=4194308
tflag0=0
initx0=0
inity0=0
@ -24,3 +24,9 @@ maxfps0=0
initts0=0
winver0=0
maxres0=-1
launchpath0=
notes0=
registry0=
flagj0=0
flagk0=0
swapeffect0=0

View File

@ -7,7 +7,7 @@ opengllib0=
notes0=
ver0=0
coord0=0
flag0=671088928
flag0=740294690
flagg0=1476395008
flagh0=20
flagi0=138412036
@ -27,3 +27,6 @@ maxfps0=0
initts0=0
winver0=0
maxres0=-1
registry0=
flagk0=65536
swapeffect0=0

View File

@ -5,7 +5,7 @@ module0=
opengllib0=
ver0=0
coord0=0
flag0=402669600
flag0=402669602
flagg0=1207959552
flagh0=20
flagi0=4194308
@ -26,4 +26,7 @@ winver0=0
maxres0=-1
launchpath0=
notes0=
flagj0=8388736
flagj0=128
registry0=
flagk0=65536
swapeffect0=0

View File

@ -981,3 +981,10 @@ fix: completely revised directinput hooking to manage multiple devices acquire/u
fix: added some dinput error codes to log messages
fix: increased time freeze toggle key hysteresis time to 1 sec to avoid multiple activations
v2.03.48
fix: set proper surface capabilities for 3DDEVICE surfaces, according to VIDEOMEMORY capability.
add: "force clipper" flag to redirect clipper definition to main window and primary surface
fix: better handling of surfaces on minimize / restore events, mainly on WinXP
fix: proper default values for"Share ddraw and GDI DC" and "Lock/Unlock Pitch Fix" flags

View File

@ -8,7 +8,8 @@
#include "hddraw.h"
#include "dxhelper.h"
//extern LPDIRECTDRAWSURFACE lpDDSBack;
#define FIXBIGGERRECT 1
extern LPDIRECTDRAWSURFACE lpDDSEmu_Prim;
extern LPDIRECTDRAW lpPrimaryDD;
extern Blt_Type pBlt;
@ -37,8 +38,7 @@ static HRESULT sBltNoPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdest
//extern PrimaryBlt_Type pPrimaryBlt;
//CkArg arg;
//FromScreen=dxwss.IsAPrimarySurface(lpddssrc) && !(dxw.dwFlags1 & EMULATESURFACE) && !(dxw.dwFlags1 & EMULATEBUFFER); // v2.02.77
FromScreen=dxwss.IsAPrimarySurface(lpddssrc); // ghogho
FromScreen=dxwss.IsAPrimarySurface(lpddssrc);
// make a working copy of srcrect if not NULL
if (lpsrcrect){
@ -136,7 +136,6 @@ static HRESULT sBltToPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdest
}
#endif
#define FIXBIGGERRECT 1
#if FIXBIGGERRECT
if(lpdestrect){
if((DWORD)lpdestrect->top < 0) lpdestrect->top = 0;
@ -163,6 +162,12 @@ static HRESULT sBltToPrimary(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdest
destrect.left, destrect.top, destrect.right, destrect.bottom,
dxw.GetScreenWidth(), dxw.GetScreenHeight());
// v2.03.48: on WinXP it may happen (reported by Cloudstr) that alt tabbing produces
// bad blit attempts where the client coordinates get the (-32000,-32000) - (-32000,-32000)
// value. In such cases, it's adviseable to simulate an OK return code without attempting
// any blit operation!
if(destrect.left == -32000) return DD_OK; // no blit on invisible window
if(!lpddssrc) {
if (isFlipping){
// handle the flipping chain ...

View File

@ -1093,6 +1093,8 @@ static void HookDDClipper(LPDIRECTDRAWCLIPPER FAR* lplpDDClipper)
SetHook((void *)(**(DWORD **)lplpDDClipper + 8), extReleaseC, (void **)&pReleaseC, "Release(C)");
// IDirectDrawClipper::GetClipList
SetHook((void *)(**(DWORD **)lplpDDClipper + 12), extGetClipList, (void **)&pGetClipList, "GetClipList(C)");
// IDirectDrawClipper::SetHWnd
SetHook((void *)(**(DWORD **)lplpDDClipper + 32), extSetHWndProxy, (void **)&pSetHWnd, "SetHWnd(C)");
if (!(dxw.dwTFlags & OUTPROXYTRACE)) return;
// Just proxed ...
@ -1109,8 +1111,6 @@ static void HookDDClipper(LPDIRECTDRAWCLIPPER FAR* lplpDDClipper)
SetHook((void *)(**(DWORD **)lplpDDClipper + 24), extIsClipListChangedProxy, (void **)&pIsClipListChanged, "IsClipListChanged(C)");
// IDirectDrawClipper::SetClipList
SetHook((void *)(**(DWORD **)lplpDDClipper + 28), extSetClipListProxy, (void **)&pSetClipList, "SetClipList(C)");
// IDirectDrawClipper::SetHWnd
SetHook((void *)(**(DWORD **)lplpDDClipper + 32), extSetHWndProxy, (void **)&pSetHWnd, "SetHWnd(C)");
return;
}
@ -2203,12 +2203,19 @@ static void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion)
lpddsd->ddsCaps.dwCaps = DDSCAPS_ZBUFFER;
return;
}
if((lpddsd->dwFlags & DDSD_CAPS) &&
(lpddsd->ddsCaps.dwCaps & DDSCAPS_3DDEVICE)) // v2.02.90: added for "Zoo Tycoon" textures
{ // 3DDEVICE no TEXTURE: enforce PIXELFORMAT on MEMORY
// 3DDEVICE no TEXTURE: enforce PIXELFORMAT
// v2.02.90: added for "Zoo Tycoon" textures
// v2.03.48 - there are two situations
// "Arx fatalis" asks for DDSCAPS_3DDEVICE+DDSCAPS_OFFSCREENPLAIN capability and needs no DDSCAPS_SYSTEMMEMORY capability
// "Bunnies must die" asks for DDSCAPS_3DDEVICE+DDSCAPS_OFFSCREENPLAIN+DDSCAPS_VIDEOMEMORY capability and requires DDSCAPS_SYSTEMMEMORY capability
// we try to manage them by checking for the DDSCAPS_VIDEOMEMORY capability ...
if((lpddsd->dwFlags & DDSD_CAPS) && (lpddsd->ddsCaps.dwCaps & DDSCAPS_3DDEVICE)){
lpddsd->dwFlags |= DDSD_PIXELFORMAT;
lpddsd->ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_3DDEVICE);
if(lpddsd->ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY)
lpddsd->ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_3DDEVICE|DDSCAPS_SYSTEMMEMORY); // good for "Bunnies must die", NO "Arx Fatalis"
else
lpddsd->ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_3DDEVICE); // good for "Arx Fatalis", NO "Bunnies must die"
GetPixFmt(lpddsd);
return;
}
@ -3207,12 +3214,24 @@ HRESULT WINAPI PrimaryBlt(LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, LPDIRECT
HRESULT WINAPI PrimaryFastBlt(LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect)
{
HRESULT res;
RECT client;
int iXOffset, iYOffset; // offsets to center surface area to window
(*pGetClientRect)(dxw.GethWnd(), &client);
iXOffset = (client.right - dxw.GetScreenWidth()) >> 1;
iYOffset = (client.bottom - dxw.GetScreenHeight()) >> 1;
return (*pBltFast)(lpdds, iXOffset + lpdestrect->left, iYOffset + lpdestrect->top, lpddssrc, lpsrcrect, DDBLTFAST_WAIT);
if(dxw.dwFlags3 & FORCECLIPPER){
RECT destrect;
destrect.left = iXOffset + lpdestrect->left;
destrect.right = iXOffset + lpdestrect->right;
destrect.top = iYOffset + lpdestrect->top;
destrect.bottom = iYOffset + lpdestrect->bottom;
res = (*pBlt)(lpdds, &destrect, lpddssrc, lpsrcrect, DDBLT_WAIT, 0);
}
else {
res= (*pBltFast)(lpdds, iXOffset + lpdestrect->left, iYOffset + lpdestrect->top, lpddssrc, lpsrcrect, DDBLTFAST_WAIT);
}
return res;
}
HRESULT WINAPI PrimaryStretchBlt(LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect)
@ -3270,8 +3289,14 @@ HRESULT WINAPI PrimaryStretchBlt(LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, L
}
else {
// fast-blit to primary
res= (*pBltFast)(lpdds, lpdestrect->left, lpdestrect->top, lpddsTmp, &TmpRect, DDBLTFAST_WAIT);
if(res) OutTraceE("PrimaryStretchBlt: Blt ERROR %x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
if(dxw.dwFlags3 & FORCECLIPPER){
res= (*pBlt)(lpdds, lpdestrect, lpddsTmp, &TmpRect, DDBLT_WAIT, 0);
if(res) OutTraceE("PrimaryStretchBlt: Blt ERROR %x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
}
else{
res= (*pBltFast)(lpdds, lpdestrect->left, lpdestrect->top, lpddsTmp, &TmpRect, DDBLTFAST_WAIT);
if(res) OutTraceE("PrimaryStretchBlt: BltFast ERROR %x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
}
}
(*pReleaseS)(lpddsTmp);
return res;
@ -3423,8 +3448,14 @@ HRESULT WINAPI PrimaryBilinearBlt(LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect,
// fast-blit to primary
(*pUnlockMethod(lpddssrc))(lpddssrc, NULL);
(*pUnlockMethod(lpddsTmp))(lpddsTmp, NULL);
res= (*pBltFast)(lpdds, lpdestrect->left, lpdestrect->top, lpddsTmp, &TmpRect, DDBLTFAST_WAIT);
if(res) OutTraceE("PrimaryBilinearBlt: BltFast ERROR %x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
if(dxw.dwFlags3 & FORCECLIPPER) {
res= (*pBlt)(lpdds, lpdestrect, lpddsTmp, &TmpRect, DDBLT_WAIT, 0);
if(res) OutTraceE("PrimaryBilinearBlt: Blt ERROR %x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
}
else {
res= (*pBltFast)(lpdds, lpdestrect->left, lpdestrect->top, lpddsTmp, &TmpRect, DDBLTFAST_WAIT);
if(res) OutTraceE("PrimaryBilinearBlt: BltFast ERROR %x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
}
(*pReleaseS)(lpddsTmp);
if(lpddsCopy) (*pReleaseS)(lpddsCopy);
return res;
@ -3850,16 +3881,30 @@ HRESULT WINAPI extSetClipper(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWCLIPPER lpdd
if(dxw.dwFlags1 & SUPPRESSCLIPPING) return 0;
if(dxw.dwFlags1 & (EMULATESURFACE|EMULATEBUFFER)){
if ((isPrim && lpDDSEmu_Prim) ||
(dxwss.IsABackBufferSurface(lpdds) && lpDDSEmu_Back)){
OutTraceDW("SetClipper: skip primary/backbuffer lpdds=%x\n", lpdds);
res=0;
if (dxw.dwFlags3 & FORCECLIPPER){
// v2.03.48: FORCECLIPPER ensures that a valid clipper is issued on the real primary surface
// and on the main game window. Then, you won't be able to BltFast any longer....
if ((isPrim || dxwss.IsABackBufferSurface(lpdds)) && lpDDSEmu_Prim){
OutTraceDW("SetClipper: redirect surface to primary hwnd=%x lpdds=%x%s->%x\n",
dxw.GethWnd(), lpdds, isPrim?"(PRIM)":"", lpDDSEmu_Prim);
res=(*pSetHWnd)(lpddc, 0, dxw.GethWnd());
//res=lpddc->SetHWnd(0, dxw.GethWnd());
if (res) OutTraceE("SetClipper: SetHWnd ERROR res=%x(%s)\n", res, ExplainDDError(res));
res=(*pSetClipper)(lpDDSEmu_Prim, lpddc);
if (res) OutTraceE("SetClipper: ERROR res=%x(%s)\n", res, ExplainDDError(res));
return res;
}
}
else {
if ((isPrim && lpDDSEmu_Prim) ||
(dxwss.IsABackBufferSurface(lpdds) && lpDDSEmu_Back)){
OutTraceDW("SetClipper: skip primary/backbuffer lpdds=%x\n", lpdds);
return 0;
}
}
else
res=(*pSetClipper)(lpdds, lpddc);
}
else
res=(*pSetClipper)(lpdds, lpddc);
res=(*pSetClipper)(lpdds, lpddc);
if (res)
OutTraceE("SetClipper: ERROR res=%x(%s)\n", res, ExplainDDError(res));

View File

@ -55,7 +55,7 @@ CRITICAL_SECTION TraceCS;
static char *FlagNames[32]={
"UNNOTIFY", "EMULATESURFACE", "CLIPCURSOR", "RESETPRIMARY",
"HOOKDI", "MODIFYMOUSE", "HANDLEEXCEPTIONS", "SAVELOAD",
"EMULATEBUFFER", "--AUTOMATIC--", "BLITFROMBACKBUFFER", "SUPPRESSCLIPPING",
"EMULATEBUFFER", "HOOKDI8", "BLITFROMBACKBUFFER", "SUPPRESSCLIPPING",
"AUTOREFRESH", "FIXWINFRAME", "HIDEHWCURSOR", "SLOWDOWN",
"ENABLECLIPPING", "LOCKWINSTYLE", "MAPGDITOPRIMARY", "FIXTEXTOUT",
"KEEPCURSORWITHIN", "USERGB565", "SUPPRESSDXERRORS", "PREVENTMAXIMIZE",
@ -866,7 +866,7 @@ void HookModule(HMODULE base, int dxversion)
HookMSV4WLibs(base); // -- used by Aliens & Amazons demo: what for?
HookAVIFil32(base);
//HookSmackW32(base);
//if (HOOKDIRECTSOUND) HookDirectSound(base);
//if (HOOKDIRECTSOUND) HookDirectSound(base);
//HookComDlg32(base);
}

View File

@ -674,6 +674,17 @@ void dxwCore::MapClient(LPPOINT lppoint)
lppoint->y= ((lppoint->y * h)+(dwScreenHeight >> 1)) / (int)dwScreenHeight;
}
//void dxwCore::MapClient(float *SX, float *SY)
//{
// RECT client;
// int w, h;
// if(!(*pGetClientRect)(hWnd, &client)) return;
// w = client.right ? client.right : iSizX;
// h = client.bottom ? client.bottom : iSizY;
// *SX= (*SX * (float)w) / (float)dwScreenWidth;
// *SY= (*SY * (float)h) / (float)dwScreenHeight;
//}
void dxwCore::MapClient(int *nXDest, int *nYDest)
{
RECT client;

View File

@ -69,6 +69,7 @@ public: // methods
void MapClient(LPRECT);
void MapClient(int *, int *, int *, int *);
void MapClient(int *, int *);
//void MapClient(float *, float *);
void UnmapClient(LPPOINT);
void UnmapClient(int *, int *);
void UnmapClient(LPRECT);

View File

@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "TlHelp32.h"
#define VERSION "2.03.47"
#define VERSION "2.03.48"
#define DDTHREADLOCK 1
//#define LOCKTHREADS

Binary file not shown.

View File

@ -503,7 +503,7 @@
>
</File>
<File
RelativePath="..\Include\dxwnd.h"
RelativePath="..\..\v2_03_49_beta\Include\dxwnd.h"
>
</File>
<File
@ -518,10 +518,6 @@
RelativePath=".\hd3d.doc.hpp"
>
</File>
<File
RelativePath=".\hddraw.h"
>
</File>
<File
RelativePath=".\msvfwhook.h"
>

View File

@ -860,6 +860,12 @@ HRESULT WINAPI extSetViewport(void *lpvp, LPD3DVIEWPORT vpd)
OutTraceD3D("SetViewport: viewport=%x viewportd=%x size=%d pos=(%d,%d) dim=(%dx%d) scale=(%fx%f) maxXYZ=(%f,%f,%f) minZ=%f\n",
lpvp, vpd, vpd->dwSize, vpd->dwX, vpd->dwY, vpd->dwWidth, vpd->dwHeight, vpd->dvScaleX, vpd->dvScaleY,
vpd->dvMaxX, vpd->dvMaxY, vpd->dvMaxZ, vpd->dvMinZ);
// v2.03.48: scaled dvScaleX/Y fields. Fixes "Dark Vengeance" viewport size when using D3D interface.
// no.... see Forsaken
//dxw.MapClient(&vpd->dvScaleX, &vpd->dvScaleY);
//OutTraceDW("SetViewport: FIXED scale=(%fx%f)\n", vpd->dvScaleX, vpd->dvScaleY);
res=(*pSetViewport)(lpvp, vpd);
if(res) OutTraceE("SetViewport ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
else OutTraceD3D("SetViewport: OK\n");
@ -872,6 +878,7 @@ HRESULT WINAPI extGetViewport(void *lpvp, LPD3DVIEWPORT vpd)
OutTraceD3D("GetViewport: viewport=%x viewportd=%x\n", lpvp, vpd);
res=(*pGetViewport)(lpvp, vpd);
// v2.03.48: should the dvScaleX/Y fields be unscaled?
if(res) OutTraceE("GetViewport ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__);
else OutTraceD3D("GetViewport: OK size=%d pos=(%d,%d) dim=(%dx%d) scale=(%fx%f) maxXYZ=(%f,%f,%f) minZ=%f\n",
vpd->dwSize, vpd->dwX, vpd->dwY, vpd->dwWidth, vpd->dwHeight, vpd->dvScaleX, vpd->dvScaleY,

View File

@ -30,6 +30,7 @@ void CTabDirectX::DoDataExchange(CDataExchange* pDX)
DDX_Radio(pDX, IDC_NOEMULATESURFACE, cTarget->m_DxEmulationMode);
DDX_Radio(pDX, IDC_DDRAWFILTER, cTarget->m_DxFilterMode);
DDX_Check(pDX, IDC_SUPPRESSCLIPPING, cTarget->m_SuppressClipping);
DDX_Check(pDX, IDC_FORCECLIPPER, cTarget->m_ForceClipper);
DDX_Check(pDX, IDC_BLITFROMBACKBUFFER, cTarget->m_BlitFromBackBuffer);
DDX_Check(pDX, IDC_AUTOREFRESH, cTarget->m_AutoRefresh);
DDX_Check(pDX, IDC_TEXTUREFORMAT, cTarget->m_TextureFormat);

View File

@ -93,6 +93,8 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
m_FreezeInjectedSon = FALSE;
m_StressResources = FALSE;
m_DisableFogging = FALSE;
m_Power2Width = FALSE;
m_FixPitch = FALSE,
m_NoPower2Fix = FALSE;
m_NoPerfCounter = FALSE;
m_UnNotify = FALSE;
@ -120,6 +122,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
m_BlitFromBackBuffer = FALSE;
m_NoFlipEmulation = FALSE;
m_SuppressClipping = FALSE;
m_ForceClipper = FALSE;
m_DisableGammaRamp = FALSE;
m_AutoRefresh = FALSE;
m_TextureFormat = FALSE;
@ -128,7 +131,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
m_CursorClipping = FALSE;
m_VideoToSystemMem = FALSE;
m_FixTextOut = FALSE;
m_SharedDC = TRUE; // seems better .....
m_SharedDC = FALSE;
m_HookGlide = FALSE;
m_RemapMCI = TRUE;
m_NoMovies = FALSE;

View File

@ -84,6 +84,7 @@ public:
BOOL m_BlitFromBackBuffer;
BOOL m_NoFlipEmulation;
BOOL m_SuppressClipping;
BOOL m_ForceClipper;
BOOL m_DisableGammaRamp;
BOOL m_AutoRefresh;
BOOL m_TextureFormat;

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,65 @@
<?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="USER-PC"
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="USER-PC"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@ -321,6 +321,7 @@ static void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
if(dlg->m_BlitFromBackBuffer) t->flags |= BLITFROMBACKBUFFER;
if(dlg->m_NoFlipEmulation) t->flags4 |= NOFLIPEMULATION;
if(dlg->m_SuppressClipping) t->flags |= SUPPRESSCLIPPING;
if(dlg->m_ForceClipper) t->flags3 |= FORCECLIPPER;
if(dlg->m_DisableGammaRamp) t->flags2 |= DISABLEGAMMARAMP;
if(dlg->m_AutoRefresh) t->flags |= AUTOREFRESH;
if(dlg->m_TextureFormat) t->flags5 |= TEXTUREFORMAT;
@ -567,6 +568,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
dlg->m_BlitFromBackBuffer = t->flags & BLITFROMBACKBUFFER ? 1 : 0;
dlg->m_NoFlipEmulation = t->flags4 & NOFLIPEMULATION ? 1 : 0;
dlg->m_SuppressClipping = t->flags & SUPPRESSCLIPPING ? 1 : 0;
dlg->m_ForceClipper = t->flags3 & FORCECLIPPER ? 1 : 0;
dlg->m_DisableGammaRamp = t->flags2 & DISABLEGAMMARAMP ? 1 : 0;
dlg->m_AutoRefresh = t->flags & AUTOREFRESH ? 1 : 0;
dlg->m_TextureFormat = t->flags5 & TEXTUREFORMAT ? 1 : 0;

Binary file not shown.