diff --git a/Include/dxwnd.h b/Include/dxwnd.h index b7aa3a1..a516b51 100644 --- a/Include/dxwnd.h +++ b/Include/dxwnd.h @@ -274,6 +274,7 @@ #define ALLOWSYSMEMON3DDEV 0x00400000 // Suppress DDSCAPS_SYSTEMMEMORY option when DDSCAPS_3DDEVICE is set #define CLIPMENU 0x00800000 // Include window menu in mouse clipper area #define BACKGROUNDPRIORITY 0x01000000 // Lower process priority when in background state +#define OFFSCREENZBUFFER 0x02000000 // Allow building plain surfaces and ZBuffer on offscreen videomemory surfaces // logging Tflags DWORD: #define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general diff --git a/build/dxwnd.dll b/build/dxwnd.dll index a4456b7..f12ed6b 100644 --- a/build/dxwnd.dll +++ b/build/dxwnd.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1409b8473fd9673dda880af142fa01e172890f873b518c82d05214244d7c6514 -size 786944 +oid sha256:f4db08ed8206eab319c89f808e3b59311060b13ba6f2f8b01b12f14d78b48926 +size 787456 diff --git a/build/dxwnd.exe b/build/dxwnd.exe index f554dc5..ed0aa9b 100644 --- a/build/dxwnd.exe +++ b/build/dxwnd.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a5afe5a71f0bb24b48a816469f93ffbcf776d16b03d6ad27c411a3e35f5aba9 -size 676352 +oid sha256:5789a039f251a7d64e49573c0f7cc63fea3369f091782fb92fe6efb7c899d94a +size 675840 diff --git a/build/dxwnd.ini b/build/dxwnd.ini new file mode 100644 index 0000000..80c99e6 --- /dev/null +++ b/build/dxwnd.ini @@ -0,0 +1,1304 @@ +[target] +title0=Man TT Super Bike +path0=F:\Games\ManTT\MANXTT.EXE +startfolder0= +launchpath0= +module0= +opengllib0= +notes0= +registry0= +ver0=0 +monitorid0=-1 +coord0=0 +flag0=136323110 +flagg0=1241514048 +flagh0=327700 +flagi0=138412036 +flagj0=4224 +flagk0=327680 +flagl0=8389120 +flagm0=16777216 +tflag0=-2147483647 +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=640 +initresh0=480 +title1=Starsiege.exe +path1=D:\Games\Starsiege\Starsiege.exe +startfolder1= +launchpath1= +module1= +opengllib1= +notes1= +registry1= +ver1=0 +monitorid1=-1 +coord1=0 +flag1=673185826 +flagg1=1207959552 +flagh1=20 +flagi1=134217732 +flagj1=4224 +flagk1=65536 +flagl1=0 +flagm1=0 +tflag1=0 +dflag1=0 +posx1=50 +posy1=50 +sizx1=800 +sizy1=600 +maxfps1=0 +initts1=0 +winver1=0 +maxres1=0 +swapeffect1=0 +maxddinterface1=7 +slowratio1=2 +scanline1=0 +initresw1=800 +initresh1=600 +title2=Wizardry Chronicles +path2=F:\Games\Wizardry Chronicle\Wizardry Chronicles.exe +startfolder2= +launchpath2= +module2= +opengllib2= +notes2= +registry2= +ver2=0 +monitorid2=-1 +coord2=0 +flag2=673185826 +flagg2=1207959552 +flagh2=20 +flagi2=138412036 +flagj2=4224 +flagk2=65536 +flagl2=2097152 +flagm2=0 +tflag2=-2147477245 +dflag2=0 +posx2=50 +posy2=50 +sizx2=800 +sizy2=600 +maxfps2=0 +initts2=0 +winver2=0 +maxres2=0 +swapeffect2=0 +maxddinterface2=7 +slowratio2=2 +scanline2=0 +initresw2=800 +initresh2=600 +title3=Titanic +path3=F:\Games\Titanic\TI.noshim.EXE +startfolder3= +launchpath3= +module3= +opengllib3= +notes3= +registry3= +ver3=0 +monitorid3=-1 +coord3=0 +flag3=-1474289622 +flagg3=1745879072 +flagh3=606228 +flagi3=138412036 +flagj3=4224 +flagk3=65536 +flagl3=1048576 +flagm3=9216 +tflag3=-2147477245 +dflag3=0 +posx3=50 +posy3=50 +sizx3=1024 +sizy3=768 +maxfps3=0 +initts3=0 +winver3=0 +maxres3=-1 +swapeffect3=0 +maxddinterface3=7 +slowratio3=2 +scanline3=0 +initresw3=800 +initresh3=600 +title4=NASCAR Racing 3 +path4=G:\Games\Nascar Racing 3\NASCAR Racing 3.exe +startfolder4= +launchpath4= +module4= +opengllib4= +notes4= +registry4= +ver4=0 +monitorid4=-1 +coord4=0 +flag4=136314914 +flagg4=1207959552 +flagh4=20 +flagi4=134217732 +flagj4=4224 +flagk4=65536 +flagl4=0 +flagm4=0 +tflag4=0 +dflag4=0 +posx4=50 +posy4=50 +sizx4=800 +sizy4=600 +maxfps4=0 +initts4=0 +winver4=0 +maxres4=-1 +swapeffect4=0 +maxddinterface4=7 +slowratio4=2 +scanline4=1 +initresw4=800 +initresh4=600 +title5=NASCAR 2000 +path5=F:\Games\Nascar 2000\NASCAR 2000.exe +startfolder5= +launchpath5= +module5= +opengllib5= +notes5= +registry5= +ver5=0 +monitorid5=-1 +coord5=0 +flag5=673202210 +flagg5=1207959552 +flagh5=20 +flagi5=138412036 +flagj5=4224 +flagk5=65536 +flagl5=0 +flagm5=0 +tflag5=-2147477245 +dflag5=0 +posx5=50 +posy5=50 +sizx5=800 +sizy5=600 +maxfps5=0 +initts5=0 +winver5=0 +maxres5=0 +swapeffect5=0 +maxddinterface5=7 +slowratio5=2 +scanline5=0 +initresw5=800 +initresh5=600 +title6=RHEM +path6=F:\RhemE\RhemE\RHEM.noshim.exe +startfolder6= +launchpath6= +module6= +opengllib6= +notes6= +registry6= +ver6=0 +monitorid6=-1 +coord6=0 +flag6=681574434 +flagg6=1209008128 +flagh6=4 +flagi6=205520900 +flagj6=4224 +flagk6=98304 +flagl6=0 +flagm6=8192 +tflag6=-2147452669 +dflag6=0 +posx6=50 +posy6=50 +sizx6=640 +sizy6=480 +maxfps6=0 +initts6=0 +winver6=0 +maxres6=0 +swapeffect6=0 +maxddinterface6=7 +slowratio6=2 +scanline6=0 +initresw6=800 +initresh6=600 +title7=RHEM (scalable) +path7=F:\RhemE\RhemE\RHEM1(scalable).exe +startfolder7= +launchpath7= +module7= +opengllib7= +notes7= +registry7= +ver7=0 +monitorid7=-1 +coord7=0 +flag7=681574434 +flagg7=1209008128 +flagh7=4 +flagi7=205520900 +flagj7=4224 +flagk7=98304 +flagl7=0 +flagm7=8192 +tflag7=-2147452669 +dflag7=0 +posx7=50 +posy7=50 +sizx7=800 +sizy7=600 +maxfps7=0 +initts7=0 +winver7=0 +maxres7=0 +swapeffect7=0 +maxddinterface7=7 +slowratio7=2 +scanline7=0 +initresw7=800 +initresh7=600 +title8=RHEM 1 - Scaled Settings +path8=F:\RhemE\RhemE\RHEM.noshim.exe +startfolder8= +launchpath8= +module8=proj.dll +opengllib8= +notes8= +registry8= +ver8=12 +monitorid8=-1 +coord8=0 +flag8=-1442707352 +flagg8=1276117008 +flagh8=168034320 +flagi8=138412032 +flagj8=536877184 +flagk8=1048706 +flagl8=8393216 +flagm8=3402 +tflag8=-2147452669 +dflag8=0 +posx8=50 +posy8=50 +sizx8=1200 +sizy8=900 +maxfps8=0 +initts8=0 +winver8=8 +maxres8=6 +swapeffect8=0 +maxddinterface8=7 +slowratio8=2 +scanline8=0 +initresw8=640 +initresh8=480 +title9=Blade Runner +path9=F:\Games\blade runner\BLADE.EXE +startfolder9= +launchpath9= +module9= +opengllib9= +notes9= +registry9= +ver9=0 +monitorid9=0 +coord9=0 +flag9=134234210 +flagg9=1480589312 +flagh9=2580 +flagi9=4194308 +flagj9=128 +flagk9=2048 +flagl9=0 +flagm9=0 +tflag9=0 +dflag9=0 +posx9=50 +posy9=50 +sizx9=800 +sizy9=600 +maxfps9=0 +initts9=0 +winver9=0 +maxres9=-1 +swapeffect9=0 +maxddinterface9=7 +slowratio9=1 +scanline9=1 +initresw9=0 +initresh9=0 +title10=Command & Conquer Red Alert 2 +path10=D:\Games\Red Alert 2 Yuri's Revenge\game.exe +startfolder10= +launchpath10=D:\Games\Red Alert 2 Yuri's Revenge\Ra2.exe +module10= +opengllib10= +notes10= +registry10= +ver10=0 +monitorid10=0 +coord10=0 +flag10=136314914 +flagg10=1207959552 +flagh10=20 +flagi10=138412036 +flagj10=4224 +flagk10=67584 +flagl10=0 +flagm10=0 +tflag10=0 +dflag10=0 +posx10=50 +posy10=50 +sizx10=800 +sizy10=600 +maxfps10=0 +initts10=0 +winver10=0 +maxres10=-1 +swapeffect10=0 +maxddinterface10=7 +slowratio10=1 +scanline10=1 +initresw10=0 +initresh10=0 +title11=Chicken Invaders 2 +path11=F:\Games\Chicken Invaders 2\ChickenInvaders2.exe +startfolder11= +launchpath11= +module11= +opengllib11= +notes11=Time stretching requires "stretch timers" +registry11= +ver11=0 +monitorid11=-1 +coord11=0 +flag11=136314914 +flagg11=1207959552 +flagh11=20 +flagi11=138477572 +flagj11=4224 +flagk11=65536 +flagl11=65536 +flagm11=0 +tflag11=-2147477245 +dflag11=0 +posx11=50 +posy11=50 +sizx11=800 +sizy11=600 +maxfps11=0 +initts11=6 +winver11=0 +maxres11=-1 +swapeffect11=0 +maxddinterface11=7 +slowratio11=2 +scanline11=1 +initresw11=800 +initresh11=600 +title12=Wrestling MPire Remix +path12=F:\Games\Wrestling MPire Remix (Career)\Wrestling MPire Remix (Fullscreen).exe +startfolder12= +launchpath12= +module12= +opengllib12= +notes12= +registry12= +ver12=0 +monitorid12=-1 +coord12=0 +flag12=673185826 +flagg12=1207959552 +flagh12=65556 +flagi12=138412036 +flagj12=4224 +flagk12=65536 +flagl12=268435456 +flagm12=0 +tflag12=0 +dflag12=0 +posx12=50 +posy12=50 +sizx12=800 +sizy12=600 +maxfps12=0 +initts12=0 +winver12=0 +maxres12=0 +swapeffect12=0 +maxddinterface12=7 +slowratio12=2 +scanline12=0 +initresw12=800 +initresh12=600 +title13=Martian Gothic Unification +path13=D:\Games\Martian Gothic\martian gothic.exe +startfolder13= +launchpath13= +module13= +opengllib13= +notes13= +registry13= +ver13=0 +monitorid13=0 +coord13=0 +flag13=134217762 +flagg13=1275068416 +flagh13=20 +flagi13=4194308 +flagj13=0 +flagk13=98304 +flagl13=0 +flagm13=0 +tflag13=-2147477245 +dflag13=0 +posx13=50 +posy13=50 +sizx13=800 +sizy13=600 +maxfps13=0 +initts13=0 +winver13=0 +maxres13=0 +swapeffect13=0 +maxddinterface13=7 +slowratio13=1 +scanline13=1 +initresw13=0 +initresh13=0 +title14=Dominant Species +path14=F:\Games\Dominant Species\DominantSpecies.exe +startfolder14= +launchpath14= +module14= +opengllib14= +notes14= +registry14= +ver14=0 +monitorid14=-1 +coord14=0 +flag14=673185826 +flagg14=1207959552 +flagh14=20 +flagi14=138412036 +flagj14=4224 +flagk14=65536 +flagl14=0 +flagm14=0 +tflag14=0 +dflag14=0 +posx14=50 +posy14=50 +sizx14=800 +sizy14=600 +maxfps14=0 +initts14=0 +winver14=0 +maxres14=0 +swapeffect14=0 +maxddinterface14=7 +slowratio14=2 +scanline14=0 +initresw14=800 +initresh14=600 +title15=ShipWreckers demo +path15=F:\Games\ShipWreckers demo\SW.EXE +startfolder15= +launchpath15= +module15= +opengllib15= +notes15= +registry15= +ver15=0 +monitorid15=-1 +coord15=0 +flag15=673185826 +flagg15=1207959552 +flagh15=20 +flagi15=138412036 +flagj15=4224 +flagk15=65536 +flagl15=1048576 +flagm15=0 +tflag15=0 +dflag15=0 +posx15=50 +posy15=50 +sizx15=800 +sizy15=600 +maxfps15=0 +initts15=0 +winver15=0 +maxres15=0 +swapeffect15=0 +maxddinterface15=7 +slowratio15=2 +scanline15=0 +initresw15=800 +initresh15=600 +title16=Interstate 76 Nitro Pack +path16=F:\Games\Interstate 76 Nitro Pack\nitro.exe +startfolder16= +launchpath16= +module16= +opengllib16= +notes16= +registry16= +ver16=0 +monitorid16=0 +coord16=0 +flag16=134217762 +flagg16=2013265920 +flagh16=20 +flagi16=138412036 +flagj16=4096 +flagk16=65536 +flagl16=0 +flagm16=0 +tflag16=0 +dflag16=0 +posx16=50 +posy16=50 +sizx16=800 +sizy16=600 +maxfps16=0 +initts16=0 +winver16=0 +maxres16=-1 +swapeffect16=0 +maxddinterface16=7 +slowratio16=1 +scanline16=1 +initresw16=0 +initresh16=0 +title17=Interstate 76 +path17=D:\Games\I76\I76.EXE +startfolder17= +launchpath17= +module17= +opengllib17= +notes17= +registry17= +ver17=0 +monitorid17=0 +coord17=0 +flag17=134217762 +flagg17=2013265920 +flagh17=20 +flagi17=138412036 +flagj17=4224 +flagk17=0 +flagl17=0 +flagm17=0 +tflag17=0 +dflag17=0 +posx17=50 +posy17=50 +sizx17=800 +sizy17=600 +maxfps17=0 +initts17=0 +winver17=0 +maxres17=-1 +swapeffect17=0 +maxddinterface17=7 +slowratio17=1 +scanline17=1 +initresw17=0 +initresh17=0 +title18=TOCA Touring Car Championship +path18=F:\Games\tourcar\tourcars.exe +startfolder18= +launchpath18=F:\Games\tourcar\setup.exe +module18= +opengllib18= +notes18= +registry18=\n[HKEY_LOCAL_MACHINE\SOFTWARE\Codemasters]\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Codemasters\Touring Car]\n"GameDirectory"="F:\\Games\\tourcar\\"\n"CD_Drive"="."\n"Install_Drive"="F:"\n"CardHintIndex"=dword:00000000\n"ShowRunInfo"=dword:00000000\n"S3RunInfo"=dword:00000000\n\n +ver18=0 +monitorid18=-1 +coord18=0 +flag18=673185834 +flagg18=1207959552 +flagh18=528 +flagi18=138412032 +flagj18=4224 +flagk18=65536 +flagl18=0 +flagm18=0 +tflag18=-2147477245 +dflag18=0 +posx18=50 +posy18=50 +sizx18=800 +sizy18=600 +maxfps18=0 +initts18=0 +winver18=0 +maxres18=0 +swapeffect18=0 +maxddinterface18=7 +slowratio18=2 +scanline18=0 +initresw18=800 +initresh18=600 +title19=Tomb Raider III +path19=D:\Games\Tomb Raider III\tomb3.exe +startfolder19= +launchpath19= +module19= +opengllib19= +notes19=Working either with or without flip emulation\nDeinterlace movies increases the movie quality +registry19= +ver19=0 +monitorid19=0 +coord19=0 +flag19=134217762 +flagg19=1241513984 +flagh19=20 +flagi19=4194304 +flagj19=268435584 +flagk19=0 +flagl19=0 +flagm19=0 +tflag19=0 +dflag19=0 +posx19=50 +posy19=50 +sizx19=800 +sizy19=600 +maxfps19=0 +initts19=0 +winver19=0 +maxres19=0 +swapeffect19=0 +maxddinterface19=7 +slowratio19=1 +scanline19=1 +initresw19=0 +initresh19=0 +title20=Total Soccer 2000 (DirectX) +path20=D:\Games\Total Soccer 2000\SOCCERDX.EXE +startfolder20= +launchpath20= +module20= +opengllib20= +notes20= +registry20= +ver20=1 +monitorid20=0 +coord20=0 +flag20=134234274 +flagg20=1207959808 +flagh20=20 +flagi20=4194308 +flagj20=128 +flagk20=0 +flagl20=0 +flagm20=0 +tflag20=0 +dflag20=0 +posx20=50 +posy20=50 +sizx20=800 +sizy20=600 +maxfps20=0 +initts20=2 +winver20=0 +maxres20=-1 +swapeffect20=0 +maxddinterface20=7 +slowratio20=1 +scanline20=1 +initresw20=0 +initresh20=0 +title21=Gruntz +path21=D:\Games\gruntz\GRUNTZ.EXE +startfolder21= +launchpath21= +module21= +opengllib21= +notes21= +registry21= +ver21=0 +monitorid21=0 +coord21=0 +flag21=134234404 +flagg21=1207959552 +flagh21=67108884 +flagi21=4325380 +flagj21=128 +flagk21=65536 +flagl21=0 +flagm21=0 +tflag21=-2147477245 +dflag21=0 +posx21=50 +posy21=50 +sizx21=800 +sizy21=600 +maxfps21=0 +initts21=0 +winver21=0 +maxres21=-1 +swapeffect21=0 +maxddinterface21=7 +slowratio21=1 +scanline21=1 +initresw21=0 +initresh21=0 +title22=SuperBike 2000 +path22=F:\Games\SBK2000\SBK2000.exe +startfolder22= +launchpath22= +module22= +opengllib22= +notes22=N.b.\nCD rom in\nHKEY_LOCAL_MACHINE/SOFTWARE/EA SPORTS/Superbike 2000/CD\nor \nHKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/EA SPORTS/Superbike 2000/CD +registry22= +ver22=0 +monitorid22=-1 +coord22=0 +flag22=673202210 +flagg22=1207959552 +flagh22=20 +flagi22=138412036 +flagj22=4224 +flagk22=65536 +flagl22=524288 +flagm22=1312 +tflag22=-2147483135 +dflag22=0 +posx22=50 +posy22=50 +sizx22=800 +sizy22=600 +maxfps22=0 +initts22=0 +winver22=0 +maxres22=0 +swapeffect22=0 +maxddinterface22=7 +slowratio22=2 +scanline22=0 +initresw22=800 +initresh22=600 +title23=Warcraft Adventures - Lord Of The Clans +path23=F:\Games\Warcraft Adventures - Lord Of The Clans\PlayWin.exe +startfolder23= +launchpath23= +module23= +opengllib23= +notes23= +registry23= +ver23=0 +monitorid23=-1 +coord23=0 +flag23=673185826 +flagg23=1207959552 +flagh23=20 +flagi23=134217732 +flagj23=4224 +flagk23=65536 +flagl23=0 +flagm23=0 +tflag23=0 +dflag23=0 +posx23=50 +posy23=50 +sizx23=800 +sizy23=600 +maxfps23=0 +initts23=0 +winver23=0 +maxres23=0 +swapeffect23=0 +maxddinterface23=7 +slowratio23=2 +scanline23=0 +initresw23=800 +initresh23=600 +title24=V-Rally 2 Expert Edition +path24=F:\Games\V-Rally 2 Expert Edition\V-Rally2 Expert Edition\Vrally2.exe +startfolder24= +launchpath24= +module24= +opengllib24= +notes24=Note: the game detects Alt-tabs and terminates. \nThen the "do not notify on task switch" is mandatory, but also minimizing is not supported. +registry24= +ver24=0 +monitorid24=-1 +coord24=0 +flag24=136314931 +flagg24=1207959808 +flagh24=20 +flagi24=138412036 +flagj24=4224 +flagk24=65536 +flagl24=1048576 +flagm24=0 +tflag24=0 +dflag24=0 +posx24=50 +posy24=50 +sizx24=800 +sizy24=600 +maxfps24=0 +initts24=0 +winver24=0 +maxres24=-1 +swapeffect24=0 +maxddinterface24=7 +slowratio24=2 +scanline24=1 +initresw24=800 +initresh24=600 +title25=V-Rally 3 +path25=F:\Games\V-Rally 3\Vrally3.exe +startfolder25= +launchpath25= +module25= +opengllib25= +notes25= +registry25= +ver25=0 +monitorid25=-1 +coord25=1 +flag25=673185826 +flagg25=1207959568 +flagh25=65556 +flagi25=138444804 +flagj25=4224 +flagk25=65536 +flagl25=0 +flagm25=0 +tflag25=0 +dflag25=0 +posx25=50 +posy25=50 +sizx25=800 +sizy25=600 +maxfps25=0 +initts25=0 +winver25=0 +maxres25=0 +swapeffect25=0 +maxddinterface25=7 +slowratio25=2 +scanline25=0 +initresw25=800 +initresh25=600 +title26=Warhammer - Shadow of the Horned Rat +path26=F:\Games\Warhammer - Shadow of the Horned Rat\WHSHR.EXE +startfolder26= +launchpath26= +module26=GAMEF.DLL +opengllib26= +notes26=Game setup:\n\n1) unzip packed game RIP\n2) copy RLDDF.DLL from SYSTEM32 subfolder to game dir\n3) copy DxWnd wing32.dll to game dir\n4) turn digital audio OFF or add sound WAV file (it is hardcoded in virtual registry!)\nor copy wav files in \Remote\Binary\GLUE\SPEECH folder\n +registry26=\n[HKEY_LOCAL_MACHINE\SOFTWARE]\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Mindscape]\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Mindscape\WarHammerFB]\n;"Options"="3,1,1,2,1,1,0,0" // High Quality, digital audio off\n"Options"="3,1,1,2,1,1,1,1" // High Quality, digital audio on\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Mindscape\WarHammerFB\InstallDir]\n@="\{path}"\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Mindscape\WarHammerFB\InstallOption]\n@="Maximum"\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Mindscape\WarHammerFB\Language]\n@="ENG"\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Mindscape\WarHammerFB\LocalDir]\n@="\{path}\\FILE"\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Mindscape\WarHammerFB\RemoteDir]\n@="\{path}\\REMOTE"\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Mindscape\WarHammerFB\SaveDir]\n@="\{path}\\TEMP"\n\n[HKEY_LOCAL_MACHINE\SOFTWARE\Mindscape\WarHammerFB\UpdateDir]\n@="C:\\GAMES\\WARFB\\Update"\n\n[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\SharedDLLs]\n"C:\\WINDOWS\\SYSTEM32\\WING.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\WING32.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\WINGDE.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\WINGDIB.DRV"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\WINGPAL.WND"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RLDDF.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RLDDI.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFTF.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFTI.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFT\\RLFRG16M.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFT\\RLFRG256.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFT\\RLFRG64K.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFT\\RLFRM16M.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFT\\RLFRM256.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFT\\RLFRM64K.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFT\\RLIRG16M.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFT\\RLIRG256.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFT\\RLIRG64K.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFT\\RLIRM16M.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFT\\RLIRM256.DLL"=hex:01,00,00,00\n"C:\\WINDOWS\\SYSTEM32\\RL\\SOFT\\RLIRM64K.DLL"=hex:01,00,00,00 +ver26=0 +monitorid26=-1 +coord26=0 +flag26=-1473609686 +flagg26=1209270312 +flagh26=2163732 +flagi26=1212153860 +flagj26=4224 +flagk26=2195456 +flagl26=67141648 +flagm26=2105344 +tflag26=0 +dflag26=0 +posx26=50 +posy26=50 +sizx26=800 +sizy26=600 +maxfps26=0 +initts26=0 +winver26=0 +maxres26=0 +swapeffect26=0 +maxddinterface26=7 +slowratio26=2 +scanline26=0 +initresw26=800 +initresh26=600 +title27=Superbike World Championship 99 +path27=F:\Games\SBKWC99\SuperBike.exe +startfolder27= +launchpath27= +module27= +opengllib27= +notes27= +registry27= +ver27=0 +monitorid27=-1 +coord27=0 +flag27=673185826 +flagg27=1207959616 +flagh27=20 +flagi27=138412036 +flagj27=4224 +flagk27=65536 +flagl27=0 +flagm27=0 +tflag27=0 +dflag27=0 +posx27=50 +posy27=50 +sizx27=800 +sizy27=600 +maxfps27=0 +initts27=0 +winver27=0 +maxres27=0 +swapeffect27=0 +maxddinterface27=7 +slowratio27=2 +scanline27=0 +initresw27=800 +initresh27=600 +title28=Superbike World Championship 99 (RIP) +path28=F:\Games\SBK99\SUPERB~1.EXE +startfolder28= +launchpath28= +module28= +opengllib28= +notes28= +registry28= +ver28=0 +monitorid28=-1 +coord28=0 +flag28=673185826 +flagg28=1207959552 +flagh28=20 +flagi28=138412036 +flagj28=4224 +flagk28=65536 +flagl28=32768 +flagm28=0 +tflag28=0 +dflag28=0 +posx28=50 +posy28=50 +sizx28=800 +sizy28=600 +maxfps28=0 +initts28=0 +winver28=0 +maxres28=0 +swapeffect28=0 +maxddinterface28=7 +slowratio28=2 +scanline28=0 +initresw28=800 +initresh28=600 +title29=Silver +path29=D:\Games\Silver\silver.exe +startfolder29= +launchpath29= +module29= +opengllib29= +notes29= +registry29= +ver29=0 +monitorid29=0 +coord29=0 +flag29=137363494 +flagg29=1207959552 +flagh29=20 +flagi29=138412036 +flagj29=4224 +flagk29=0 +flagl29=0 +flagm29=0 +tflag29=0 +dflag29=0 +posx29=50 +posy29=50 +sizx29=800 +sizy29=600 +maxfps29=0 +initts29=0 +winver29=0 +maxres29=-1 +swapeffect29=0 +maxddinterface29=7 +slowratio29=1 +scanline29=1 +initresw29=0 +initresh29=0 +title30=Civ3Conquests.exe +module30= +opengllib30= +monitorid30=-1 +dflag30=0 +scanline30=0 +initresw30=800 +initresh30=600 +path30=F:\Games\Civilization III Complete\Conquests\Civ3Conquests.exe +startfolder30= +launchpath30= +notes30= +registry30= +ver30=1 +coord30=0 +flag30=673185826 +flagg30=1208090624 +flagh30=20 +flagi30=138412036 +flagj30=4224 +flagk30=327680 +flagl30=32768 +flagm30=0 +tflag30=0 +posx30=50 +posy30=50 +sizx30=800 +sizy30=600 +maxfps30=0 +initts30=0 +winver30=0 +maxres30=0 +swapeffect30=0 +maxddinterface30=7 +slowratio30=2 +title31=International Football 2000 (cracked) +path31=D:\Games\International Football 2000\MSIF2000.exe +startfolder31= +launchpath31= +module31= +opengllib31= +notes31=n.b.\ngame cracked version needs hooking to MSIF2000.EXE instead of MSIF2000.ICD\nand launcher can be eliminated.\nUsing hw acceleration it could be necessary to set the "Return 0 refcount" flag. +registry31= +ver31=0 +monitorid31=0 +coord31=0 +flag31=134217762 +flagg31=1207959552 +flagh31=20 +flagi31=4718592 +flagj31=128 +flagk31=65536 +flagl31=0 +flagm31=0 +tflag31=-2147477245 +dflag31=0 +posx31=50 +posy31=50 +sizx31=800 +sizy31=600 +maxfps31=0 +initts31=0 +winver31=0 +maxres31=0 +swapeffect31=0 +maxddinterface31=7 +slowratio31=1 +scanline31=1 +initresw31=0 +initresh31=0 +title32=Theocracy 0.6.85 +path32=D:\Games\Theocracy\Theocracy\theocracy-0.6.85.exe +startfolder32= +launchpath32= +module32= +opengllib32= +notes32= +registry32= +ver32=0 +monitorid32=-1 +coord32=0 +flag32=673185830 +flagg32=1207959616 +flagh32=20 +flagi32=138412036 +flagj32=4224 +flagk32=65536 +flagl32=0 +flagm32=0 +tflag32=0 +dflag32=0 +posx32=50 +posy32=50 +sizx32=800 +sizy32=600 +maxfps32=0 +initts32=0 +winver32=0 +maxres32=0 +swapeffect32=0 +maxddinterface32=7 +slowratio32=2 +scanline32=0 +initresw32=800 +initresh32=600 +title33=Star Trek Armada +path33=D:\Games\Star Trek Armada\Armada.exe +startfolder33= +launchpath33= +module33= +opengllib33= +notes33= +registry33= +ver33=0 +monitorid33=0 +coord33=0 +flag33=-1474297757 +flagg33=1544552448 +flagh33=65552 +flagi33=136314884 +flagj33=4224 +flagk33=65536 +flagl33=0 +flagm33=0 +tflag33=0 +dflag33=0 +posx33=100 +posy33=100 +sizx33=800 +sizy33=600 +maxfps33=0 +initts33=0 +winver33=0 +maxres33=-1 +swapeffect33=0 +maxddinterface33=7 +slowratio33=1 +scanline33=1 +initresw33=0 +initresh33=0 +title34=Settlers 3, the +path34=D:\Games\The Settlers 3 - Ultimate Collection\S3.EXE +startfolder34= +launchpath34= +module34= +opengllib34= +notes34= +registry34= +ver34=0 +monitorid34=0 +coord34=0 +flag34=-1476394970 +flagg34=1207959618 +flagh34=20 +flagi34=4194308 +flagj34=128 +flagk34=0 +flagl34=0 +flagm34=0 +tflag34=0 +dflag34=0 +posx34=50 +posy34=50 +sizx34=800 +sizy34=600 +maxfps34=0 +initts34=0 +winver34=0 +maxres34=-1 +swapeffect34=0 +maxddinterface34=7 +slowratio34=1 +scanline34=1 +initresw34=0 +initresh34=0 +title35=DungOdy.exe +path35=F:\Games\Dungeon Odyssey Demo\DungOdy.exe +startfolder35= +launchpath35= +module35= +opengllib35= +notes35= +registry35= +ver35=0 +monitorid35=-1 +coord35=0 +flag35=673185824 +flagg35=1207959552 +flagh35=20 +flagi35=138412036 +flagj35=4224 +flagk35=65536 +flagl35=0 +flagm35=0 +tflag35=0 +dflag35=0 +posx35=50 +posy35=50 +sizx35=1200 +sizy35=900 +maxfps35=0 +initts35=0 +winver35=0 +maxres35=0 +swapeffect35=0 +maxddinterface35=7 +slowratio35=2 +scanline35=0 +initresw35=800 +initresh35=600 +title36=Spearhead +path36=D:\Games\Spearhead\Spearhead.exe +startfolder36= +launchpath36= +module36= +opengllib36= +notes36=Beware: the game needs to be run from a DxWnd with administrator capablities \nfor ALL users on Win10. +registry36=ŽsK +ver36=0 +monitorid36=-1 +coord36=0 +flag36=744488994 +flagg36=1216348288 +flagh36=8212 +flagi36=138412036 +flagj36=4224 +flagk36=3211264 +flagl36=32784 +flagm36=0 +tflag36=-2147477245 +dflag36=0 +posx36=50 +posy36=50 +sizx36=800 +sizy36=600 +maxfps36=0 +initts36=0 +winver36=0 +maxres36=0 +swapeffect36=0 +maxddinterface36=7 +slowratio36=2 +scanline36=0 +initresw36=640 +initresh36=480 +[window] +posx=1505 +posy=227 +sizx=320 +sizy=676 +exepath=D:\Games\Yatagarasu Ver. 4.2\ +debug=1 +exportpath=D:\DxWnd.develop\v2_04_11_beta\build\exports\ diff --git a/build/exports/dxwnd.log b/build/exports/dxwnd.log index 9273cd6..5049537 100644 --- a/build/exports/dxwnd.log +++ b/build/exports/dxwnd.log @@ -1,5 +1,15 @@ -OnRun idx=36 prog="D:\Games\International Football 2000\MSIF2000.ICD" unhooked=0 -setwindowshook mode -OnRun idx=36 prog="D:\Games\International Football 2000\MSIF2000.ICD" unhooked=0 +OnRun idx=19 prog="F:\Games\tourcar\tourcars.exe" unhooked=0 +self elevation +setwindowshook mode +OnRun idx=37 prog="F:\Games\tourcar\tourcars.exe" unhooked=0 +self elevation +setwindowshook mode +OnRun idx=36 prog="F:\Games\tourcar\tourcars.exe" unhooked=0 +self elevation +setwindowshook mode +OnRun idx=36 prog="F:\Games\tourcar\tourcars.exe" unhooked=0 +self elevation +setwindowshook mode +OnRun idx=36 prog="F:\Games\tourcar\tourcars.exe" unhooked=0 self elevation setwindowshook mode diff --git a/build/readme-relnotes.txt b/build/readme-relnotes.txt index a6504e5..84c3f58 100644 --- a/build/readme-relnotes.txt +++ b/build/readme-relnotes.txt @@ -1520,3 +1520,10 @@ fix: fixed AdjustWindowRect/Ex() wrapper to always neutralize window changes (go fix: fixed message processing for FORCEWINRESIZE: now "Man TT Superbike" can be moved and resized (at least on Win10). add: added BACKGROUNDPRIORITY handling add: added CLIPMENU handling + +v2.04.12 +GUI: +add: "Support offscreen 3D" flag (OFFSCREENZBUFFER) +DLL: +fix: recursion bug in CreateWindowExA hooker +add: OFFSCREENZBUFFER flag \ No newline at end of file diff --git a/dll/ddraw.cpp b/dll/ddraw.cpp index fe68899..6a58d27 100644 --- a/dll/ddraw.cpp +++ b/dll/ddraw.cpp @@ -285,6 +285,7 @@ HRESULT WINAPI extSetSurfaceDesc7(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, DWORD); // DirectDrawClipper HRESULT WINAPI extReleaseC(LPDIRECTDRAWCLIPPER); HRESULT WINAPI extGetClipList(LPDIRECTDRAWCLIPPER, LPRECT, LPRGNDATA, LPDWORD); +HRESULT WINAPI extSetClipList(LPDIRECTDRAWCLIPPER, LPRGNDATA, DWORD); HRESULT WINAPI extSetHWnd(LPDIRECTDRAWCLIPPER, DWORD, HWND); // DirectDrawPalette @@ -399,10 +400,10 @@ QueryInterface_Type pQueryInterfaceC; AddRefC_Type pAddRefC; ReleaseC_Type pReleaseC; GetClipList_Type pGetClipList; +SetClipList_Type pSetClipList; GetHWnd_Type pGetHWnd; InitializeC_Type pInitializeC; IsClipListChanged_Type pIsClipListChanged; -SetClipList_Type pSetClipList; SetHWnd_Type pSetHWnd; /* DirectDrawPalette hook pointers */ @@ -1326,6 +1327,7 @@ static void HookDDClipper(LPDIRECTDRAWCLIPPER FAR* lplpDDClipper) SetHook((void *)(**(DWORD **)lplpDDClipper + 8), extReleaseC, (void **)&pReleaseC, "Release(C)"); SetHook((void *)(**(DWORD **)lplpDDClipper + 12), extGetClipList, (void **)&pGetClipList, "GetClipList(C)"); + SetHook((void *)(**(DWORD **)lplpDDClipper + 28), extSetClipList, (void **)&pSetClipList, "SetClipList(C)"); SetHook((void *)(**(DWORD **)lplpDDClipper + 32), extSetHWnd, (void **)&pSetHWnd, "SetHWnd(C)"); } @@ -2315,7 +2317,7 @@ HRESULT WINAPI extSetCooperativeLevel4(LPDIRECTDRAW lpdd, HWND hwnd, DWORD dwfla HRESULT WINAPI extSetCooperativeLevel7(LPDIRECTDRAW lpdd, HWND hwnd, DWORD dwflags) { return extSetCooperativeLevel(7, pSetCooperativeLevel7, lpdd, hwnd, dwflags); } -void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion) +void FixSurfaceCapsInner(LPDDSURFACEDESC2 lpddsd, int dxversion) { // rules of thumb: // 1) textures should be left untouched (switching to SYSTEMMEMORY when forcing HEL may even fail!) @@ -2328,9 +2330,6 @@ void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion) if(!(lpddsd->dwFlags & DDSD_CAPS)) lpddsd->ddsCaps.dwCaps = 0; - OutTraceDW("FixSurfaceCaps: Flags=%x(%s) Caps=%x(%s)\n", - lpddsd->dwFlags, ExplainFlags(lpddsd->dwFlags), lpddsd->ddsCaps.dwCaps, ExplainDDSCaps(lpddsd->ddsCaps.dwCaps)); - // DDSCAPS_TEXTURE surfaces must be left untouched, unless you set FORCESHEL: in this case switch VIDEOMEMORY to SYSTEMMEMORY if((lpddsd->dwFlags & DDSD_CAPS) && (lpddsd->ddsCaps.dwCaps & DDSCAPS_TEXTURE)){ if (dxw.dwFlags3 & FORCESHEL) { @@ -2341,6 +2340,8 @@ void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion) // TEXTURE: enforce PIXELFORMAT on MEMORY lpddsd->dwFlags |= DDSD_PIXELFORMAT; GetPixFmt(lpddsd); + // trytry + // lpddsd->ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; // OFFSCREENPLAIN to set a different pixel format } if((lpddsd->dwFlags & DDSD_PIXELFORMAT) && (lpddsd->ddpfPixelFormat.dwFlags & DDPF_FOURCC) && @@ -2349,19 +2350,11 @@ void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion) lpddsd->ddpfPixelFormat.dwFourCC = 0; lpddsd->ddpfPixelFormat.dwFlags &= ~DDPF_FOURCC; } - - //// try - //if((lpddsd->dwFlags & DDSD_PIXELFORMAT) && (lpddsd->ddpfPixelFormat.dwRGBBitCount == 16)){ - // lpddsd->ddpfPixelFormat.dwRGBAlphaBitMask = 0x8000; - // lpddsd->ddpfPixelFormat.dwBBitMask = 0x001F; - // lpddsd->ddpfPixelFormat.dwGBitMask = 0x03E0; - // lpddsd->ddpfPixelFormat.dwRBitMask = 0x7C00; - //} - //// try return; } if((lpddsd->dwFlags & DDSD_CAPS) && (lpddsd->ddsCaps.dwCaps & DDSCAPS_ZBUFFER)) { // z-buffer surface - set to memory + if(dxw.dwFlags8 & OFFSCREENZBUFFER) return; lpddsd->ddsCaps.dwCaps = DDSCAPS_ZBUFFER; if (dxw.dwFlags8 & ALLOWSYSMEMON3DDEV) lpddsd->ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_ZBUFFER; return; @@ -2369,13 +2362,14 @@ void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion) // this is valid just in case the above block eliminated TEXTURE surfaces.... if (lpddsd->dwFlags & DDSD_PIXELFORMAT){ // pixel format defined - if (lpddsd->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY) lpddsd->ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; // to allow for pixel format conversion (Quest for Glory 5 - GOG version) + // trytry + //if (lpddsd->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY) lpddsd->ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; // to allow for pixel format conversion (Quest for Glory 5 - GOG version) + lpddsd->ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; return; } - if ((lpddsd->dwFlags & (DDSD_WIDTH|DDSD_HEIGHT)) == DDSD_WIDTH) { // buffer surface - return; - } + // buffer surface + if ((lpddsd->dwFlags & (DDSD_WIDTH|DDSD_HEIGHT)) == DDSD_WIDTH) return; // 3DDEVICE no TEXTURE: enforce PIXELFORMAT // v2.02.90: added for "Zoo Tycoon" textures @@ -2385,23 +2379,41 @@ void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion) // 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; + GetPixFmt(lpddsd); + if(dxw.dwFlags8 & OFFSCREENZBUFFER) { + // add OFFSCREENPLAIN to set a different pixel format + lpddsd->ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; + return; + } 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; } // default case: adjust pixel format OutTraceB("FixSurfaceCaps: suppress DDSCAPS_VIDEOMEMORY case\n"); lpddsd->dwFlags |= (DDSD_CAPS|DDSD_PIXELFORMAT); - lpddsd->ddsCaps.dwCaps &= ~(DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); // v2.02.43 - lpddsd->ddsCaps.dwCaps |= (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); + if(!(dxw.dwFlags8 & OFFSCREENZBUFFER)){ + lpddsd->ddsCaps.dwCaps &= ~(DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); // v2.02.43 + lpddsd->ddsCaps.dwCaps |= (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); + } if(!(dxw.dwFlags3 & NOPIXELFORMAT)) GetPixFmt(lpddsd); return; } +void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion) +{ + OutTraceDW("FixSurfaceCaps: INPUT Flags=%x(%s) Caps=%x(%s)\n", + lpddsd->dwFlags, ExplainFlags(lpddsd->dwFlags), lpddsd->ddsCaps.dwCaps, ExplainDDSCaps(lpddsd->ddsCaps.dwCaps)); + + FixSurfaceCapsInner(lpddsd, dxversion); + + OutTraceDW("FixSurfaceCaps: OUTPUT Flags=%x(%s) Caps=%x(%s)\n", + lpddsd->dwFlags, ExplainFlags(lpddsd->dwFlags), lpddsd->ddsCaps.dwCaps, ExplainDDSCaps(lpddsd->ddsCaps.dwCaps)); +} + HRESULT WINAPI extCreateSurface1(LPDIRECTDRAW lpdd, DDSURFACEDESC *lpddsd, LPDIRECTDRAWSURFACE *lplpdds, void *pu) { return extCreateSurface(1, (CreateSurface_Type)pCreateSurface1, lpdd, (DDSURFACEDESC2 *)lpddsd, lplpdds, pu); } HRESULT WINAPI extCreateSurface2(LPDIRECTDRAW lpdd, DDSURFACEDESC *lpddsd, LPDIRECTDRAWSURFACE *lplpdds, void *pu) @@ -4988,6 +5000,15 @@ HRESULT WINAPI extGetClipList(LPDIRECTDRAWCLIPPER lpddClip, LPRECT lpRect, LPRGN return res; } +HRESULT WINAPI extSetClipList(LPDIRECTDRAWCLIPPER lpddClip, LPRGNDATA lpClipList, DWORD dwFlags) +{ + HRESULT res; + OutTraceP("SetClipList(C): lpddClip=%x lpcliplist=%x flags=%x\n", lpddClip, lpClipList, dwFlags); + res = (*pSetClipList)(lpddClip, lpClipList, dwFlags); + if(res) OutTraceP("SetClipList(C): ERROR err=%x(%s)\n", res, ExplainDDError(res)); + return res; +} + HRESULT WINAPI extSetHWnd(LPDIRECTDRAWCLIPPER lpddClip, DWORD w, HWND hwnd) { HRESULT res; diff --git a/dll/dxwnd.cpp b/dll/dxwnd.cpp index 955c848..e97c271 100644 --- a/dll/dxwnd.cpp +++ b/dll/dxwnd.cpp @@ -27,7 +27,7 @@ along with this program. If not, see . #include "TlHelp32.h" -#define VERSION "2.04.11" +#define VERSION "2.04.12" #define DDTHREADLOCK 1 diff --git a/dll/dxwnd.vs2008.suo b/dll/dxwnd.vs2008.suo index 2a11345..a58ea14 100644 Binary files a/dll/dxwnd.vs2008.suo and b/dll/dxwnd.vs2008.suo differ diff --git a/dll/gdi32.cpp b/dll/gdi32.cpp index 23568d2..ecc86ec 100644 --- a/dll/gdi32.cpp +++ b/dll/gdi32.cpp @@ -902,6 +902,10 @@ HDC WINAPI extGDICreateCompatibleDC(HDC hdc) BOOL bSwitchedToMainWin = FALSE; OutTraceDW("GDI.CreateCompatibleDC: hdc=%x\n", hdc); + // n.b. useful? hdc == 0 doesn't imply the desktop but rather the current window + // from MSDN: + // hdc[in] A handle to an existing DC. If this handle is NULL the function creates + // a memory DC compatible with the application's current screen. if(hdc==0 || (WindowFromDC(hdc)==0)) { // v2.03.99: Star Trek Armada hdc=(*pGDIGetDC)(dxw.GethWnd()); // potential DC leakage bSwitchedToMainWin = TRUE; diff --git a/dll/hd3d7.cpp b/dll/hd3d7.cpp index bc0ef30..fa9ec24 100644 --- a/dll/hd3d7.cpp +++ b/dll/hd3d7.cpp @@ -513,7 +513,6 @@ void HookDirect3DDevice(void **lpd3ddev, int d3dversion) SetHook((void *)(**(DWORD **)lpd3ddev + 16), extD3DGetCaps1, (void **)&pD3DGetCaps1, "GetCaps(1)"); SetHook((void *)(**(DWORD **)lpd3ddev + 20), extSwapTextureHandles, (void **)&pSwapTextureHandles, "SwapTextureHandles(1)"); SetHook((void *)(**(DWORD **)lpd3ddev + 32), extExecute, (void **)&pExecute, "Execute(1)"); - //SetHook((void *)(**(DWORD **)lpd3ddev + 32), extExecute, NULL, "Execute(1)"); SetHook((void *)(**(DWORD **)lpd3ddev + 36), extAddViewport1, (void **)&pAddViewport1, "AddViewport(1)"); SetHook((void *)(**(DWORD **)lpd3ddev + 40), extDeleteViewport1, (void **)&pDeleteViewport1, "DeleteViewport(1)"); SetHook((void *)(**(DWORD **)lpd3ddev + 44), extNextViewport1, (void **)&pNextViewport1, "NextViewport(1)"); @@ -1035,8 +1034,17 @@ HRESULT WINAPI extSetViewport(int dxversion, SetViewport_Type pSetViewport, void // 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); + // no good (useless) also for "Spearhead" + //if(dxw.Windowize){ + // dxw.MapClient(&vpd->dvScaleX, &vpd->dvScaleY); + // OutTraceDW("SetViewport: FIXED scale=(%fx%f)\n", vpd->dvScaleX, vpd->dvScaleY); + // int w = (int) vpd->dwWidth; + // int h = (int) vpd->dwHeight; + // dxw.MapClient(&w, &h); + // vpd->dwWidth = (DWORD) w; + // vpd->dwHeight = (DWORD) h; + // OutTraceDW("SetViewport: FIXED scale=(%dx%d)\n", vpd->dwWidth, vpd->dwHeight); + //} res=(*pSetViewport)(lpvp, vpd); if(res) OutTraceE("SetViewport ERROR: err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); diff --git a/dll/hddraw.h b/dll/hddraw.h index 0931285..c3fe6b6 100644 --- a/dll/hddraw.h +++ b/dll/hddraw.h @@ -103,9 +103,9 @@ typedef HRESULT (WINAPI *SetSurfaceDesc_Type)(LPDIRECTDRAWSURFACE, LPDDSURFACEDE typedef HRESULT (WINAPI *AddRefC_Type)(LPDIRECTDRAWCLIPPER); typedef HRESULT (WINAPI *ReleaseC_Type)(LPDIRECTDRAWCLIPPER); typedef HRESULT (WINAPI *GetClipList_Type)(LPDIRECTDRAWCLIPPER, LPRECT, LPRGNDATA, LPDWORD); +typedef HRESULT (WINAPI *SetClipList_Type)(LPDIRECTDRAWCLIPPER, LPRGNDATA, DWORD); typedef HRESULT (WINAPI *GetHWnd_Type)(LPDIRECTDRAWCLIPPER, HWND FAR *); typedef HRESULT (WINAPI *IsClipListChanged_Type)(LPDIRECTDRAWCLIPPER, BOOL FAR *); -typedef HRESULT (WINAPI *SetClipList_Type)(LPDIRECTDRAWCLIPPER, LPRGNDATA, DWORD); typedef HRESULT (WINAPI *SetHWnd_Type)(LPDIRECTDRAWCLIPPER, DWORD, HWND); // DirectDraw Palette diff --git a/dll/user32.cpp b/dll/user32.cpp index 8af9d0b..c637dd1 100644 --- a/dll/user32.cpp +++ b/dll/user32.cpp @@ -164,7 +164,7 @@ static HookEntryEx_Type SyscallHooks[]={ {HOOK_IAT_CANDIDATE, 0, "TabbedTextOutA", (FARPROC)TabbedTextOutA, (FARPROC *)&pTabbedTextOutA, (FARPROC)extTabbedTextOutA}, {HOOK_IAT_CANDIDATE, 0, "TabbedTextOutW", (FARPROC)TabbedTextOutW, (FARPROC *)&pTabbedTextOutW, (FARPROC)extTabbedTextOutW}, {HOOK_IAT_CANDIDATE, 0, "ScrollDC", (FARPROC)ScrollDC, (FARPROC *)&pScrollDC, (FARPROC)extScrollDC}, - {HOOK_IAT_CANDIDATE, 0, "InvalidateRect", (FARPROC)InvalidateRect, (FARPROC *)&pInvalidateRect, (FARPROC)extInvalidateRect}, + {HOOK_HOT_CANDIDATE, 0, "InvalidateRect", (FARPROC)InvalidateRect, (FARPROC *)&pInvalidateRect, (FARPROC)extInvalidateRect}, {HOOK_IAT_CANDIDATE, 0, "DrawTextA", (FARPROC)DrawTextA, (FARPROC *)&pDrawTextA, (FARPROC)extDrawTextA}, {HOOK_IAT_CANDIDATE, 0, "DrawTextExA", (FARPROC)DrawTextExA, (FARPROC *)&pDrawTextExA, (FARPROC)extDrawTextExA}, {HOOK_IAT_CANDIDATE, 0, "DrawTextW", (FARPROC)DrawTextW, (FARPROC *)&pDrawTextW, (FARPROC)extDrawTextW}, @@ -1882,7 +1882,7 @@ HWND WINAPI extCreateWindowExA( nHeight = MainWin.bottom; } - return CreateWindowCommon("CreateWindowExA", (CreateWindow_Type)CreateWindowExA, dwExStyle, (void *)lpClassName, (void *)lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); + return CreateWindowCommon("CreateWindowExA", (CreateWindow_Type)pCreateWindowExA, dwExStyle, (void *)lpClassName, (void *)lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); } extern void ExplainMsg(char *, HWND, UINT, WPARAM, LPARAM); diff --git a/host/TabDirectX.cpp b/host/TabDirectX.cpp index 6daa8ca..872e6cc 100644 --- a/host/TabDirectX.cpp +++ b/host/TabDirectX.cpp @@ -40,6 +40,7 @@ void CTabDirectX::DoDataExchange(CDataExchange* pDX) DDX_Check(pDX, IDC_NOPIXELFORMAT, cTarget->m_NoPixelFormat); DDX_Check(pDX, IDC_NOALPHACHANNEL, cTarget->m_NoAlphaChannel); DDX_Check(pDX, IDC_NOFLIPEMULATION, cTarget->m_NoFlipEmulation); + DDX_Check(pDX, IDC_OFFSCREENZBUFFER, cTarget->m_OffscreenZBuffer); DDX_Check(pDX, IDC_FLIPEMULATION, cTarget->m_FlipEmulation); DDX_Check(pDX, IDC_SETCOMPATIBILITY, cTarget->m_SetCompatibility); DDX_Check(pDX, IDC_AEROBOOST, cTarget->m_AEROBoost); diff --git a/host/TabProgram.cpp b/host/TabProgram.cpp index b8c781b..6bf4e05 100644 --- a/host/TabProgram.cpp +++ b/host/TabProgram.cpp @@ -110,8 +110,6 @@ void CTabProgram::DoDataExchange(CDataExchange* pDX) DDX_Check(pDX, IDC_KEEPASPECTRATIO, cTarget->m_KeepAspectRatio); DDX_Check(pDX, IDC_NOBANNER, cTarget->m_NoBanner); DDX_Check(pDX, IDC_HIDEDESKTOP, cTarget->m_HideDesktop); - //DDX_Text(pDX, IDC_POSX, cTarget->m_PosX); - //DDX_Text(pDX, IDC_POSY, cTarget->m_PosY); DDX_CBIndex(pDX, IDC_MONITOR_ID, cTarget->m_MonitorId); DDX_Text(pDX, IDC_POSX, sPosX); DDX_Text(pDX, IDC_POSY, sPosY); diff --git a/host/TargetDlg.cpp b/host/TargetDlg.cpp index 36555dc..e706ef3 100644 --- a/host/TargetDlg.cpp +++ b/host/TargetDlg.cpp @@ -153,6 +153,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/) m_SlowDown = FALSE; m_BlitFromBackBuffer = FALSE; m_NoFlipEmulation = FALSE; + m_OffscreenZBuffer = FALSE; m_LockColorDepth = FALSE; m_DisableGammaRamp = FALSE; m_AutoRefresh = FALSE; diff --git a/host/TargetDlg.h b/host/TargetDlg.h index 260e772..d3cc420 100644 --- a/host/TargetDlg.h +++ b/host/TargetDlg.h @@ -106,16 +106,13 @@ public: BOOL m_SlowDown; BOOL m_BlitFromBackBuffer; BOOL m_NoFlipEmulation; + BOOL m_OffscreenZBuffer; BOOL m_LockColorDepth; - //BOOL m_SuppressClipping; - //BOOL m_ForceClipper; BOOL m_DisableGammaRamp; BOOL m_AutoRefresh; BOOL m_IndependentRefresh; BOOL m_TextureFormat; BOOL m_FixWinFrame; - //BOOL m_EnableClipping; - //BOOL m_CursorClipping; BOOL m_VideoToSystemMem; BOOL m_FixTextOut; BOOL m_SharedDC; diff --git a/host/dxwndhost.aps b/host/dxwndhost.aps new file mode 100644 index 0000000..b7bbfca Binary files /dev/null and b/host/dxwndhost.aps differ diff --git a/host/dxwndhost.rc b/host/dxwndhost.rc index d4fa439..67e3abd 100644 Binary files a/host/dxwndhost.rc and b/host/dxwndhost.rc differ diff --git a/host/dxwndhost.vs2008.suo b/host/dxwndhost.vs2008.suo index 35a5d8e..6bc3170 100644 Binary files a/host/dxwndhost.vs2008.suo and b/host/dxwndhost.vs2008.suo differ diff --git a/host/dxwndhostView.cpp b/host/dxwndhostView.cpp index fbcf333..43828e7 100644 --- a/host/dxwndhostView.cpp +++ b/host/dxwndhostView.cpp @@ -440,6 +440,7 @@ void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg) if(dlg->m_SlowDown) t->flags |= SLOWDOWN; if(dlg->m_BlitFromBackBuffer) t->flags |= BLITFROMBACKBUFFER; if(dlg->m_NoFlipEmulation) t->flags4 |= NOFLIPEMULATION; + if(dlg->m_OffscreenZBuffer) t->flags8 |= OFFSCREENZBUFFER; if(dlg->m_LockColorDepth) t->flags7 |= LOCKCOLORDEPTH; if(dlg->m_DisableGammaRamp) t->flags2 |= DISABLEGAMMARAMP; if(dlg->m_AutoRefresh) t->flags |= AUTOREFRESH; @@ -768,6 +769,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg) dlg->m_SlowDown = t->flags & SLOWDOWN ? 1 : 0; dlg->m_BlitFromBackBuffer = t->flags & BLITFROMBACKBUFFER ? 1 : 0; dlg->m_NoFlipEmulation = t->flags4 & NOFLIPEMULATION ? 1 : 0; + dlg->m_OffscreenZBuffer = t->flags8 & OFFSCREENZBUFFER ? 1 : 0; dlg->m_LockColorDepth = t->flags7 & LOCKCOLORDEPTH ? 1 : 0; dlg->m_DisableGammaRamp = t->flags2 & DISABLEGAMMARAMP ? 1 : 0; dlg->m_AutoRefresh = t->flags & AUTOREFRESH ? 1 : 0; @@ -2019,7 +2021,9 @@ void CDxwndhostView::OnKill() RevertScreenChanges(&this->InitDevMode); } -void CDxwndhostView::OnProcessKill() +// void CDxwndhostView::OnProcessKill(BOOL bAll): kills one instance (bAll==FALSE) or all instances (bAll==TRUE) +// of the process whose name corresponds to the selected program's list entry. +void CDxwndhostView::OnProcessKill(BOOL bAll) { int i; POSITION pos; @@ -2045,7 +2049,7 @@ void CDxwndhostView::OnProcessKill() mbstowcs_s(NULL, wcstring, 48, PrivateMaps[i].title, _TRUNCATE); res=MessageBoxLangArg(DXW_STRING_KILLTASK, DXW_STRING_WARNING, MB_YESNO | MB_ICONQUESTION, wcstring); if(res!=IDYES) return; - KillProcByName(lpProcName, TRUE, FALSE); + KillProcByName(lpProcName, TRUE, bAll); } else{ MessageBoxLang(DXW_STRING_NOKILLTASK, DXW_STRING_INFO, MB_ICONEXCLAMATION); @@ -2055,41 +2059,14 @@ void CDxwndhostView::OnProcessKill() RevertScreenChanges(&this->InitDevMode); } +void CDxwndhostView::OnProcessKill() +{ + OnProcessKill(FALSE); +} + void CDxwndhostView::OnProcessKillAll() { - // to do ..... - int i; - POSITION pos; - CListCtrl& listctrl = GetListCtrl(); - char FilePath[MAX_PATH+1]; - char *lpProcName, *lpNext; - HRESULT res; - - if(!listctrl.GetSelectedCount()) return ; - pos = listctrl.GetFirstSelectedItemPosition(); - i = listctrl.GetNextSelectedItem(pos); - - strnncpy(FilePath, TargetMaps[i].path, MAX_PATH); - lpProcName=FilePath; - while (lpNext=strchr(lpProcName,'\\')) lpProcName=lpNext+1; - - if(TargetMaps[i].flags7 & COPYNOSHIMS){ - strcat(lpProcName, ".noshim"); - } - - if(!KillProcByName(lpProcName, FALSE, FALSE)){ - wchar_t *wcstring = new wchar_t[48+1]; - mbstowcs_s(NULL, wcstring, 48, PrivateMaps[i].title, _TRUNCATE); - res=MessageBoxLangArg(DXW_STRING_KILLTASK, DXW_STRING_WARNING, MB_YESNO | MB_ICONQUESTION, wcstring); - if(res!=IDYES) return; - KillProcByName(lpProcName, TRUE, TRUE); - } - else{ - MessageBoxLang(DXW_STRING_NOKILLTASK, DXW_STRING_INFO, MB_ICONEXCLAMATION); - } - - ClipCursor(NULL); - RevertScreenChanges(&this->InitDevMode); + OnProcessKill(TRUE); } void CDxwndhostView::OnAdd() diff --git a/host/dxwndhostView.h b/host/dxwndhostView.h index 380b5ea..338817c 100644 --- a/host/dxwndhostView.h +++ b/host/dxwndhostView.h @@ -74,6 +74,7 @@ protected: afx_msg void OnExplore(); afx_msg void OnKill(); afx_msg void OnProcessKill(); + afx_msg void OnProcessKill(BOOL); afx_msg void OnProcessKillAll(); afx_msg void OnPause(); afx_msg void OnResume(); diff --git a/host/host.aps b/host/host.aps new file mode 100644 index 0000000..ada11c0 Binary files /dev/null and b/host/host.aps differ diff --git a/host/resource b/host/resource index a560447..dd51769 100644 Binary files a/host/resource and b/host/resource differ