From e8b01bcd286a4aa9bcf9b98d87a7e02e0d1e5b43 Mon Sep 17 00:00:00 2001 From: gho tik Date: Sun, 10 Nov 2013 11:38:26 -0500 Subject: [PATCH] v2_02_40_src Former-commit-id: 53c980c6de887b9d936afba8a95c8060b400864f --- Include/dxwnd.h | 4 + build/dxwnd.1.ini | 5848 ------------------------------------- build/dxwnd.2.ini | 1133 ------- build/dxwnd.3.ini | 167 -- build/dxwnd.dll | 4 +- build/dxwnd.exe | 2 +- dll/ddraw.cpp | 466 ++- dll/dxhelper.cpp | 63 +- dll/dxhelper.h | 2 + dll/dxhook.cpp | 45 +- dll/dxwcore.cpp | 2 +- dll/dxwcore.hpp | 2 +- dll/dxwnd.aps | Bin 37664 -> 37664 bytes dll/dxwnd.cpp | 2 +- dll/dxwnd.vs2008.suo | Bin 291840 -> 310272 bytes dll/gdi32.1.cpp | 1664 +++++++++++ dll/gdi32.cpp | 165 +- dll/hddproxy.cpp | 15 + dll/kernel32.cpp | 2 - dll/syslibs.h | 6 + dll/user32 - Copia.cpp | 1888 ------------ dll/user32.cpp | 28 +- host/PaletteDialog.cpp | 27 +- host/Resource.h | 3 +- host/TabDirectX.cpp | 2 + host/TargetDlg.cpp | 2 + host/TargetDlg.h | 2 + host/dxwndhost.aps | Bin 167304 -> 167608 bytes host/dxwndhost.rc | 11 +- host/dxwndhost.vs2008.suo | Bin 347136 -> 347648 bytes host/dxwndhostView.cpp | 4 + host/res/palette0.bmp | Bin 0 -> 314 bytes 32 files changed, 2170 insertions(+), 9389 deletions(-) delete mode 100644 build/dxwnd.1.ini delete mode 100644 build/dxwnd.2.ini delete mode 100644 build/dxwnd.3.ini create mode 100644 dll/gdi32.1.cpp delete mode 100644 dll/user32 - Copia.cpp create mode 100644 host/res/palette0.bmp diff --git a/Include/dxwnd.h b/Include/dxwnd.h index eb5cec4..0157fb9 100644 --- a/Include/dxwnd.h +++ b/Include/dxwnd.h @@ -110,6 +110,10 @@ #define NODDRAWBLT 0x10000000 // Suppress ddraw Blt to primary #define NODDRAWFLIP 0x20000000 // Suppress ddraw Flip to primary #define NOGDIBLT 0x40000000 // Suppress GDI Blt to video device +#define NOPIXELFORMAT 0x80000000 // Don't fix the pixel format for plain surfaces + +// fourth flags DWORD dxw.dwFlags4: +#define NOALPHACHANNEL 0x00000001 // By default, create surfaces with no DDPF_ALPHAPIXELS capability // logging Tflags DWORD: #define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general diff --git a/build/dxwnd.1.ini b/build/dxwnd.1.ini deleted file mode 100644 index ca2a645..0000000 --- a/build/dxwnd.1.ini +++ /dev/null @@ -1,5848 +0,0 @@ -[target] -title0=007 NightFire -path0=D:\Games\007_NightFire\Bond.exe -module0= -opengllib0= -ver0=0 -coord0=0 -flag0=134217730 -flagg0=134348800 -flagh0=20 -flagi0=0 -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 -title1=1602 A.D. -path1=C:\Games\1602 A.D\1602.exe -module1= -opengllib1= -ver1=0 -coord1=0 -flag1=679608354 -flagg1=0 -flagh1=0 -flagi1=0 -tflag1=0 -initx1=0 -inity1=0 -minx1=0 -miny1=0 -maxx1=0 -maxy1=0 -posx1=50 -posy1=50 -sizx1=800 -sizy1=600 -maxfps1=0 -initts1=-8 -title2=688I Hunter Killer -path2=D:\Games\688\688I_HK.EXE -module2= -opengllib2= -ver2=0 -coord2=0 -flag2=1744830626 -flagg2=135266304 -flagh2=20 -flagi2=0 -tflag2=3 -initx2=0 -inity2=0 -minx2=0 -miny2=0 -maxx2=0 -maxy2=0 -posx2=50 -posy2=50 -sizx2=0 -sizy2=0 -maxfps2=0 -initts2=0 -title3=7th Legion -path3=D:\Games\7th_Legion\LEGION.EXE -module3= -opengllib3= -ver3=0 -coord3=0 -flag3=402669607 -flagg3=539056144 -flagh3=0 -flagi3=0 -tflag3=64 -initx3=0 -inity3=0 -minx3=0 -miny3=0 -maxx3=0 -maxy3=0 -posx3=50 -posy3=50 -sizx3=800 -sizy3=600 -maxfps3=40 -initts3=-7 -title4=A10 Cuba -path4=D:\Games\A10\A10Cuba.exe -module4= -opengllib4= -ver4=0 -coord4=1 -flag4=162 -flagg4=1074003984 -flagh4=48 -flagi4=0 -tflag4=0 -initx4=0 -inity4=0 -minx4=0 -miny4=0 -maxx4=0 -maxy4=0 -posx4=50 -posy4=50 -sizx4=800 -sizy4=600 -maxfps4=0 -initts4=-7 -title5=Achtung Spitfire -path5=D:\Games\Achtung Spitfire\ASP95.EXE -module5= -opengllib5= -ver5=0 -coord5=0 -flag5=536870946 -flagg5=0 -flagh5=16 -flagi5=0 -tflag5=70 -initx5=0 -inity5=0 -minx5=0 -miny5=0 -maxx5=0 -maxy5=0 -posx5=50 -posy5=50 -sizx5=800 -sizy5=600 -maxfps5=0 -initts5=0 -title6=Actua Soccer 3 -path6=D:\Games\ActuaSoccer3\Soccer3.exe -module6= -opengllib6= -ver6=0 -coord6=0 -flag6=671088674 -flagg6=256 -flagh6=0 -flagi6=0 -tflag6=262 -initx6=0 -inity6=0 -minx6=0 -miny6=0 -maxx6=0 -maxy6=0 -posx6=50 -posy6=50 -sizx6=800 -sizy6=600 -maxfps6=0 -initts6=0 -title7=AfterLife -path7=d:\Games\ALIFE\ALIFE.EXE -module7= -opengllib7= -ver7=1 -coord7=0 -flag7=142606370 -flagg7=1048736 -flagh7=16 -flagi7=0 -tflag7=0 -initx7=0 -inity7=0 -minx7=0 -miny7=0 -maxx7=0 -maxy7=0 -posx7=50 -posy7=50 -sizx7=800 -sizy7=600 -maxfps7=0 -initts7=0 -title8=Age of Empires -path8=D:\Games\Age of Empires\EMPIRES.EXE -module8= -opengllib8= -ver8=0 -coord8=0 -flag8=402655267 -flagg8=69632 -flagh8=16 -flagi8=0 -tflag8=3 -initx8=0 -inity8=0 -minx8=0 -miny8=0 -maxx8=0 -maxy8=0 -posx8=50 -posy8=50 -sizx8=800 -sizy8=600 -maxfps8=10 -initts8=0 -title9=Age of Empires 2 -path9=D:\Games\Age of Empires 2\empires2.exe -module9= -opengllib9= -ver9=0 -coord9=1 -flag9=134217762 -flagg9=1073762320 -flagh9=48 -flagi9=0 -tflag9=0 -initx9=0 -inity9=0 -minx9=0 -miny9=0 -maxx9=0 -maxy9=0 -posx9=50 -posy9=50 -sizx9=800 -sizy9=600 -maxfps9=40 -initts9=0 -title10=Age of Empires III -path10=D:\Games\Age of Empires III\age3.exe -module10= -opengllib10= -ver10=0 -coord10=1 -flag10=-1342169053 -flagg10=1243611136 -flagh10=56 -flagi10=0 -tflag10=2 -initx10=0 -inity10=0 -minx10=0 -miny10=0 -maxx10=0 -maxy10=0 -posx10=50 -posy10=50 -sizx10=800 -sizy10=600 -maxfps10=0 -initts10=0 -title11=Age of Empires the Rise of Rome -path11=D:\Games\Age of Empires\EMPIRESX.EXE -module11= -opengllib11= -ver11=0 -coord11=0 -flag11=134217762 -flagg11=1073823744 -flagh11=16 -flagi11=0 -tflag11=0 -initx11=0 -inity11=0 -minx11=0 -miny11=0 -maxx11=0 -maxy11=0 -posx11=50 -posy11=50 -sizx11=800 -sizy11=600 -maxfps11=0 -initts11=0 -title12=Age of Wonders -path12=D:\Games\Age of Wonders\AoW.exe -module12= -opengllib12= -ver12=7 -coord12=0 -flag12=268435458 -flagg12=1048576 -flagh12=20 -flagi12=0 -tflag12=259 -initx12=0 -inity12=0 -minx12=0 -miny12=0 -maxx12=0 -maxy12=0 -posx12=50 -posy12=50 -sizx12=800 -sizy12=600 -maxfps12=0 -initts12=0 -title13=Airline Tycoon Evolution -path13=D:\Games\Airline.Tycoon.Evolution\AT.EXE -module13= -opengllib13= -ver13=0 -coord13=0 -flag13=1493172257 -flagg13=1048576 -flagh13=148 -flagi13=0 -tflag13=323 -initx13=0 -inity13=0 -minx13=0 -miny13=0 -maxx13=0 -maxy13=0 -posx13=50 -posy13=50 -sizx13=800 -sizy13=600 -maxfps13=0 -initts13=0 -title14=Alien Cabal 95 -path14=D:\Games\Alien_cabal\ACabal95.exe -module14= -opengllib14= -ver14=0 -coord14=0 -flag14=67108896 -flagg14=0 -flagh14=16 -flagi14=0 -tflag14=0 -initx14=0 -inity14=0 -minx14=0 -miny14=0 -maxx14=0 -maxy14=0 -posx14=0 -posy14=0 -sizx14=800 -sizy14=600 -maxfps14=0 -initts14=0 -title15=Alien vs. Predator -path15=C:\Games\Alien vs Predator\AvP.exe -module15= -opengllib15= -ver15=0 -coord15=0 -flag15=8224 -flagg15=0 -flagh15=0 -flagi15=0 -tflag15=130 -initx15=0 -inity15=0 -minx15=0 -miny15=0 -maxx15=0 -maxy15=0 -posx15=50 -posy15=50 -sizx15=800 -sizy15=600 -maxfps15=0 -initts15=0 -title16=Aliens Nations Demo -path16=C:\Games\aademo\Bin\AA.exe -module16= -opengllib16= -ver16=0 -coord16=0 -flag16=134217762 -flagg16=0 -flagh16=0 -flagi16=0 -tflag16=0 -initx16=0 -inity16=0 -minx16=0 -miny16=0 -maxx16=0 -maxy16=0 -posx16=0 -posy16=0 -sizx16=800 -sizy16=600 -maxfps16=0 -initts16=0 -title17=America -path17=D:\Games\America\america.exe -module17= -opengllib17= -ver17=0 -coord17=0 -flag17=134234150 -flagg17=16 -flagh17=20 -flagi17=0 -tflag17=0 -initx17=0 -inity17=0 -minx17=0 -miny17=0 -maxx17=0 -maxy17=0 -posx17=50 -posy17=50 -sizx17=800 -sizy17=600 -maxfps17=0 -initts17=0 -title18=American McGee's Alice Demo -path18=D:\Games\American McGee's Alice Demo\alice.exe -module18= -opengllib18= -ver18=10 -coord18=0 -flag18=268435458 -flagg18=131072 -flagh18=16 -flagi18=0 -tflag18=0 -initx18=0 -inity18=0 -minx18=0 -miny18=0 -maxx18=0 -maxy18=0 -posx18=50 -posy18=50 -sizx18=800 -sizy18=600 -maxfps18=0 -initts18=0 -title19=Ancient Conquest -path19=D:\Games\Ancient Conquest\ANCIENT.EXE -module19= -opengllib19= -ver19=0 -coord19=0 -flag19=142606370 -flagg19=1048576 -flagh19=16 -flagi19=0 -tflag19=258 -initx19=0 -inity19=0 -minx19=0 -miny19=0 -maxx19=0 -maxy19=0 -posx19=50 -posy19=50 -sizx19=800 -sizy19=600 -maxfps19=0 -initts19=0 -title20=Ancient Evil -path20=C:\Games\Ancient Evil\RPG.EXE -module20=DDW16.DLL -opengllib20= -ver20=1 -coord20=0 -flag20=-2013249497 -flagg20=0 -flagh20=0 -flagi20=0 -tflag20=2 -initx20=0 -inity20=0 -minx20=0 -miny20=0 -maxx20=0 -maxy20=0 -posx20=50 -posy20=50 -sizx20=800 -sizy20=600 -maxfps20=0 -initts20=0 -title21=Ancient Evil Demo -path21=C:\Games\Ancient Evil Curse of the Snake Cult\aecsc-demo.exe -module21= -opengllib21= -ver21=1 -coord21=0 -flag21=134242336 -flagg21=0 -flagh21=0 -flagi21=0 -tflag21=0 -initx21=0 -inity21=0 -minx21=0 -miny21=0 -maxx21=0 -maxy21=0 -posx21=50 -posy21=50 -sizx21=800 -sizy21=600 -maxfps21=0 -initts21=0 -title22=Armymen -path22=C:\Games\armymen\Armymen.exe -module22= -opengllib22= -ver22=0 -coord22=0 -flag22=134218274 -flagg22=1 -flagh22=0 -flagi22=0 -tflag22=0 -initx22=0 -inity22=0 -minx22=0 -miny22=0 -maxx22=0 -maxy22=0 -posx22=50 -posy22=50 -sizx22=800 -sizy22=600 -maxfps22=0 -initts22=0 -title23=ArmyMen 2 -path23=C:\Games\army2\ArmyMen2.exe -module23= -opengllib23= -ver23=0 -coord23=0 -flag23=402653730 -flagg23=0 -flagh23=0 -flagi23=0 -tflag23=0 -initx23=0 -inity23=0 -minx23=0 -miny23=0 -maxx23=0 -maxy23=0 -posx23=50 -posy23=50 -sizx23=800 -sizy23=600 -maxfps23=0 -initts23=0 -title24=Atomic Bomberman -path24=C:\Games\Atomic Bomberman\BM95.EXE -module24= -opengllib24= -ver24=0 -coord24=0 -flag24=2 -flagg24=0 -flagh24=0 -flagi24=0 -tflag24=0 -initx24=0 -inity24=0 -minx24=0 -miny24=0 -maxx24=0 -maxy24=0 -posx24=50 -posy24=50 -sizx24=800 -sizy24=600 -maxfps24=0 -initts24=0 -title25=Axis & Allies Iron Blitz Edition -path25=C:\Games\Axis & Allies Iron Blitz Edition\Axis & Allies\AxisAllies.exe -module25= -opengllib25= -ver25=0 -coord25=0 -flag25=-2147483614 -flagg25=0 -flagh25=0 -flagi25=0 -tflag25=0 -initx25=0 -inity25=0 -minx25=0 -miny25=0 -maxx25=0 -maxy25=0 -posx25=50 -posy25=50 -sizx25=800 -sizy25=600 -maxfps25=0 -initts25=0 -title26=Baldies -path26=C:\Games\Baldies for Win95\baldies.exe -module26= -opengllib26= -ver26=0 -coord26=0 -flag26=537010210 -flagg26=0 -flagh26=0 -flagi26=0 -tflag26=0 -initx26=0 -inity26=0 -minx26=0 -miny26=0 -maxx26=0 -maxy26=0 -posx26=50 -posy26=50 -sizx26=800 -sizy26=600 -maxfps26=0 -initts26=0 -title27=Battle Arena Toshinden 2 -path27=D:\Games\Battle Arena Toshinden 2\T2.EXE -module27= -opengllib27= -ver27=0 -coord27=0 -flag27=134217761 -flagg27=134217808 -flagh27=16 -flagi27=0 -tflag27=2 -initx27=0 -inity27=0 -minx27=0 -miny27=0 -maxx27=0 -maxy27=0 -posx27=50 -posy27=50 -sizx27=800 -sizy27=600 -maxfps27=0 -initts27=0 -title28=Battle Commander -path28=D:\Games\Battle Commander\bcommand.exe -module28= -opengllib28= -ver28=0 -coord28=0 -flag28=134217794 -flagg28=0 -flagh28=0 -flagi28=0 -tflag28=2 -initx28=0 -inity28=0 -minx28=0 -miny28=0 -maxx28=0 -maxy28=0 -posx28=50 -posy28=50 -sizx28=800 -sizy28=600 -maxfps28=0 -initts28=0 -title29=Beasts & Bumpkins -path29=C:\Games\Beasts and Bumpkins\BEASTS.EXE -module29= -opengllib29= -ver29=0 -coord29=0 -flag29=2105890 -flagg29=0 -flagh29=0 -flagi29=0 -tflag29=2 -initx29=0 -inity29=0 -minx29=0 -miny29=0 -maxx29=0 -maxy29=0 -posx29=50 -posy29=50 -sizx29=800 -sizy29=600 -maxfps29=0 -initts29=0 -title30=Beats of Rage -path30=C:\Games\BOR\BeatsOfRage.exe -module30= -opengllib30= -ver30=0 -coord30=0 -flag30=537002018 -flagg30=0 -flagh30=0 -flagi30=0 -tflag30=0 -initx30=0 -inity30=0 -minx30=0 -miny30=0 -maxx30=0 -maxy30=0 -posx30=50 -posy30=50 -sizx30=800 -sizy30=600 -maxfps30=0 -initts30=0 -title31=Beyond Divinity -path31=D:\Games\Beyond Divinity\Div.exe -module31= -opengllib31= -ver31=0 -coord31=0 -flag31=134217728 -flagg31=671088640 -flagh31=61 -flagi31=0 -tflag31=3 -initx31=0 -inity31=0 -minx31=0 -miny31=0 -maxx31=0 -maxy31=0 -posx31=50 -posy31=50 -sizx31=0 -sizy31=0 -maxfps31=0 -initts31=0 -title32=Beyond Good & Evil Demo -path32=C:\Games\Beyond Good & Evil\BGE.exe -module32= -opengllib32= -ver32=0 -coord32=0 -flag32=0 -flagg32=0 -flagh32=0 -flagi32=0 -tflag32=0 -initx32=0 -inity32=0 -minx32=0 -miny32=0 -maxx32=0 -maxy32=0 -posx32=50 -posy32=50 -sizx32=800 -sizy32=600 -maxfps32=0 -initts32=0 -title33=Black & White -path33=D:\Games\Black & White\runblack.exe -module33= -opengllib33= -ver33=0 -coord33=0 -flag33=0 -flagg33=134217728 -flagh33=29 -flagi33=0 -tflag33=0 -initx33=0 -inity33=0 -minx33=0 -miny33=0 -maxx33=0 -maxy33=0 -posx33=50 -posy33=50 -sizx33=800 -sizy33=600 -maxfps33=0 -initts33=0 -title34=Black Moon Lune Noire -path34=C:\Games\Black Moon\Lune noire\Engine.exe -module34= -opengllib34= -ver34=0 -coord34=0 -flag34=262179 -flagg34=0 -flagh34=0 -flagi34=0 -tflag34=0 -initx34=0 -inity34=0 -minx34=0 -miny34=0 -maxx34=0 -maxy34=0 -posx34=50 -posy34=50 -sizx34=800 -sizy34=600 -maxfps34=0 -initts34=0 -title35=Black Thorn -path35=D:\Games\BlackThorn\BlackThorn.exe -module35= -opengllib35= -ver35=0 -coord35=0 -flag35=0 -flagg35=134217984 -flagh35=48 -flagi35=0 -tflag35=66 -initx35=0 -inity35=0 -minx35=0 -miny35=0 -maxx35=0 -maxy35=0 -posx35=50 -posy35=50 -sizx35=800 -sizy35=600 -maxfps35=0 -initts35=0 -title36=Blood Omen Legacy of Kain -path36=C:\Games\Blood Omen\KAIN.EXE -module36= -opengllib36= -ver36=0 -coord36=0 -flag36=49190 -flagg36=0 -flagh36=0 -flagi36=0 -tflag36=0 -initx36=0 -inity36=0 -minx36=0 -miny36=0 -maxx36=0 -maxy36=0 -posx36=50 -posy36=50 -sizx36=800 -sizy36=600 -maxfps36=0 -initts36=0 -title37=Bonkheads -path37=C:\Games\Bonkheads\Bonkheads.exe -module37= -opengllib37= -ver37=0 -coord37=0 -flag37=262690 -flagg37=16 -flagh37=0 -flagi37=0 -tflag37=78 -initx37=0 -inity37=0 -minx37=0 -miny37=0 -maxx37=0 -maxy37=0 -posx37=50 -posy37=50 -sizx37=800 -sizy37=600 -maxfps37=0 -initts37=0 -title38=Bubble Bobble 2 -path38=C:\Games\bubble2\BOBO2.EXE -module38= -opengllib38= -ver38=0 -coord38=0 -flag38=34 -flagg38=0 -flagh38=0 -flagi38=0 -tflag38=0 -initx38=0 -inity38=0 -minx38=0 -miny38=0 -maxx38=0 -maxy38=0 -posx38=50 -posy38=50 -sizx38=800 -sizy38=600 -maxfps38=0 -initts38=0 -title39=Bug! -path39=C:\Games\Bug\BUG!.EXE -module39= -opengllib39= -ver39=0 -coord39=0 -flag39=134225954 -flagg39=32 -flagh39=0 -flagi39=0 -tflag39=2 -initx39=0 -inity39=0 -minx39=0 -miny39=0 -maxx39=0 -maxy39=0 -posx39=0 -posy39=0 -sizx39=800 -sizy39=600 -maxfps39=0 -initts39=0 -title40=BW2Demo.exe -path40=D:\Games\Black & White 2 Demo\BW2Demo.exe -module40= -opengllib40= -ver40=0 -coord40=0 -flag40=0 -flagg40=134217728 -flagh40=221 -flagi40=0 -tflag40=0 -initx40=0 -inity40=0 -minx40=0 -miny40=0 -maxx40=0 -maxy40=0 -posx40=50 -posy40=50 -sizx40=800 -sizy40=600 -maxfps40=0 -initts40=0 -title41=Caesar III -path41=C:\Games\Caesar III\c3.exe -module41= -opengllib41= -ver41=0 -coord41=0 -flag41=-2147475422 -flagg41=0 -flagh41=0 -flagi41=0 -tflag41=0 -initx41=0 -inity41=0 -minx41=0 -miny41=0 -maxx41=0 -maxy41=0 -posx41=50 -posy41=50 -sizx41=800 -sizy41=600 -maxfps41=0 -initts41=0 -title42=Championship Manager 99-00 -path42=C:\Games\CM9900\cm9900.exe -module42= -opengllib42= -ver42=0 -coord42=0 -flag42=10306 -flagg42=0 -flagh42=0 -flagi42=0 -tflag42=0 -initx42=0 -inity42=0 -minx42=0 -miny42=0 -maxx42=0 -maxy42=0 -posx42=50 -posy42=50 -sizx42=800 -sizy42=600 -maxfps42=0 -initts42=0 -title43=Chariots of War -path43=D:\Games\Chariots of War\CoW.exe -module43= -opengllib43= -ver43=0 -coord43=0 -flag43=134217730 -flagg43=134217728 -flagh43=28 -flagi43=0 -tflag43=0 -initx43=0 -inity43=0 -minx43=0 -miny43=0 -maxx43=0 -maxy43=0 -posx43=50 -posy43=50 -sizx43=800 -sizy43=600 -maxfps43=0 -initts43=0 -title44=Civilization Call to Power -path44=C:\Games\civctp\Civilization_Call_To_Power\ctp_program\ctp\civctp.exe -module44= -opengllib44= -ver44=0 -coord44=0 -flag44=545267746 -flagg44=0 -flagh44=0 -flagi44=0 -tflag44=0 -initx44=0 -inity44=0 -minx44=0 -miny44=0 -maxx44=0 -maxy44=0 -posx44=50 -posy44=50 -sizx44=800 -sizy44=600 -maxfps44=0 -initts44=0 -title45=Claw -path45=C:\Games\claw\clawexe.exe -module45= -opengllib45= -ver45=0 -coord45=0 -flag45=24610 -flagg45=0 -flagh45=0 -flagi45=0 -tflag45=0 -initx45=0 -inity45=0 -minx45=0 -miny45=0 -maxx45=0 -maxy45=0 -posx45=50 -posy45=50 -sizx45=800 -sizy45=600 -maxfps45=0 -initts45=0 -title46=Commando's Behind Enemy Lines Demo -path46=C:\Games\Commando's Behind Enemy Lines Demo\COMANDOS\Comandos.exe -module46= -opengllib46= -ver46=0 -coord46=0 -flag46=1744838944 -flagg46=0 -flagh46=0 -flagi46=0 -tflag46=64 -initx46=0 -inity46=0 -minx46=0 -miny46=0 -maxx46=0 -maxy46=0 -posx46=50 -posy46=50 -sizx46=800 -sizy46=600 -maxfps46=0 -initts46=0 -title47=Commandos II: Men of Courage -path47=D:\Games\Commandos II\comm2.exe -module47= -opengllib47= -ver47=7 -coord47=0 -flag47=2013276256 -flagg47=0 -flagh47=20 -flagi47=0 -tflag47=0 -initx47=0 -inity47=0 -minx47=0 -miny47=0 -maxx47=0 -maxy47=0 -posx47=50 -posy47=50 -sizx47=800 -sizy47=600 -maxfps47=0 -initts47=0 -title48=Crazy Taxy -path48=C:\Games\Crazy_Taxi\Crazy Taxi PC Version\crazy_taxi_pc.exe -module48= -opengllib48= -ver48=8 -coord48=0 -flag48=536870945 -flagg48=0 -flagh48=0 -flagi48=0 -tflag48=0 -initx48=0 -inity48=0 -minx48=0 -miny48=0 -maxx48=0 -maxy48=0 -posx48=50 -posy48=50 -sizx48=800 -sizy48=600 -maxfps48=0 -initts48=0 -title49=Crush! Deluxe -path49=C:\Games\Crush! Deluxe\CRUSHD.EXE -module49= -opengllib49= -ver49=0 -coord49=0 -flag49=134492706 -flagg49=0 -flagh49=0 -flagi49=0 -tflag49=0 -initx49=0 -inity49=0 -minx49=0 -miny49=0 -maxx49=0 -maxy49=0 -posx49=50 -posy49=50 -sizx49=800 -sizy49=600 -maxfps49=0 -initts49=0 -title50=Cybermercs -path50=C:\Games\cybermercs\cybermercs.exe -module50= -opengllib50= -ver50=0 -coord50=0 -flag50=134234146 -flagg50=16 -flagh50=0 -flagi50=0 -tflag50=0 -initx50=0 -inity50=0 -minx50=0 -miny50=0 -maxx50=0 -maxy50=0 -posx50=50 -posy50=50 -sizx50=800 -sizy50=600 -maxfps50=0 -initts50=0 -title51=Daikatana -path51=D:\Games\Daikatana\daikatana.exe -module51= -opengllib51= -ver51=12 -coord51=0 -flag51=269492738 -flagg51=537002497 -flagh51=20 -flagi51=0 -tflag51=2 -initx51=0 -inity51=0 -minx51=0 -miny51=0 -maxx51=0 -maxy51=0 -posx51=50 -posy51=50 -sizx51=800 -sizy51=600 -maxfps51=0 -initts51=0 -title52=Darius Gaiden -path52=C:\Games\Darius_gaiden\DARIUS.EXE -module52= -opengllib52= -ver52=0 -coord52=0 -flag52=536870946 -flagg52=0 -flagh52=0 -flagi52=0 -tflag52=0 -initx52=0 -inity52=0 -minx52=0 -miny52=0 -maxx52=0 -maxy52=0 -posx52=50 -posy52=50 -sizx52=800 -sizy52=600 -maxfps52=0 -initts52=0 -title53=Dark Colony the Council Wars -path53=C:\Games\darkcolony_council\dc\DC16.EXE -module53= -opengllib53= -ver53=0 -coord53=0 -flag53=268435462 -flagg53=0 -flagh53=0 -flagi53=0 -tflag53=0 -initx53=0 -inity53=0 -minx53=0 -miny53=0 -maxx53=0 -maxy53=0 -posx53=50 -posy53=50 -sizx53=800 -sizy53=600 -maxfps53=0 -initts53=0 -title54=Darkstone -path54=C:\Games\darkstone\Darkstone.exe -module54= -opengllib54= -ver54=0 -coord54=0 -flag54=134234148 -flagg54=0 -flagh54=0 -flagi54=0 -tflag54=0 -initx54=0 -inity54=0 -minx54=0 -miny54=0 -maxx54=0 -maxy54=0 -posx54=50 -posy54=50 -sizx54=800 -sizy54=600 -maxfps54=0 -initts54=0 -title55=Dave Mirra Freestyle BMX Demo -path55=C:\Games\Dave Mirra Freestyle BMX\NgBMXDemo.exe -module55= -opengllib55= -ver55=0 -coord55=0 -flag55=8224 -flagg55=0 -flagh55=0 -flagi55=0 -tflag55=0 -initx55=0 -inity55=0 -minx55=0 -miny55=0 -maxx55=0 -maxy55=0 -posx55=50 -posy55=50 -sizx55=800 -sizy55=600 -maxfps55=0 -initts55=0 -title56=Daytona USA Deluxe -path56=C:\Games\Daytona USA Deluxe\DAYTONA USA Deluxe.exe -module56= -opengllib56= -ver56=0 -coord56=0 -flag56=402661410 -flagg56=0 -flagh56=0 -flagi56=0 -tflag56=0 -initx56=0 -inity56=0 -minx56=0 -miny56=0 -maxx56=0 -maxy56=0 -posx56=50 -posy56=50 -sizx56=800 -sizy56=600 -maxfps56=0 -initts56=0 -title57=Deadlock 2 -path57=C:\Games\deadlock2\DEADLOCK.EXE -module57= -opengllib57= -ver57=0 -coord57=0 -flag57=-2012995550 -flagg57=0 -flagh57=0 -flagi57=0 -tflag57=0 -initx57=0 -inity57=0 -minx57=0 -miny57=0 -maxx57=0 -maxy57=0 -posx57=50 -posy57=50 -sizx57=800 -sizy57=600 -maxfps57=0 -initts57=0 -title58=Deeper Dungeons 95 -path58=C:\Games\Keeper95\Deeper95.exe -module58= -opengllib58= -ver58=0 -coord58=0 -flag58=268460070 -flagg58=0 -flagh58=0 -flagi58=0 -tflag58=0 -initx58=0 -inity58=0 -minx58=0 -miny58=0 -maxx58=0 -maxy58=0 -posx58=50 -posy58=50 -sizx58=800 -sizy58=600 -maxfps58=0 -initts58=0 -title59=Delta Force -path59=C:\Games\Delta Force\Df.exe -module59= -opengllib59= -ver59=0 -coord59=0 -flag59=34 -flagg59=0 -flagh59=0 -flagi59=0 -tflag59=0 -initx59=0 -inity59=0 -minx59=0 -miny59=0 -maxx59=0 -maxy59=0 -posx59=50 -posy59=50 -sizx59=800 -sizy59=600 -maxfps59=0 -initts59=0 -title60=Dementia -path60=C:\Games\dementia\program\CRUX.EXE -h -module60= -opengllib60= -ver60=0 -coord60=0 -flag60=536887330 -flagg60=0 -flagh60=0 -flagi60=0 -tflag60=2 -initx60=0 -inity60=0 -minx60=0 -miny60=0 -maxx60=0 -maxy60=0 -posx60=50 -posy60=50 -sizx60=800 -sizy60=600 -maxfps60=0 -initts60=0 -title61=Dethkarz -path61=D:\Games\DethKarz\Dethkarz.exe -module61= -opengllib61= -ver61=0 -coord61=0 -flag61=0 -flagg61=0 -flagh61=16 -flagi61=0 -tflag61=3 -initx61=0 -inity61=0 -minx61=0 -miny61=0 -maxx61=0 -maxy61=0 -posx61=50 -posy61=50 -sizx61=800 -sizy61=600 -maxfps61=0 -initts61=0 -title62=Devil Inside -path62=C:\Games\Devil Inside\Devil.exe -module62= -opengllib62= -ver62=0 -coord62=0 -flag62=32 -flagg62=0 -flagh62=0 -flagi62=0 -tflag62=0 -initx62=0 -inity62=0 -minx62=0 -miny62=0 -maxx62=0 -maxy62=0 -posx62=50 -posy62=50 -sizx62=800 -sizy62=600 -maxfps62=0 -initts62=0 -title63=Diablo -path63=D:\Games\Diablo\Diablo.exe -module63= -opengllib63= -ver63=1 -coord63=0 -flag63=138690594 -flagg63=1108344848 -flagh63=20 -flagi63=0 -tflag63=3 -initx63=0 -inity63=0 -minx63=0 -miny63=0 -maxx63=0 -maxy63=0 -posx63=50 -posy63=50 -sizx63=800 -sizy63=600 -maxfps63=0 -initts63=0 -title64=Dink Smallwood (BAD) -path64=C:\Games\Dink SmallWood\Dink.exe -module64= -opengllib64= -ver64=0 -coord64=0 -flag64=546 -flagg64=0 -flagh64=0 -flagi64=0 -tflag64=258 -initx64=0 -inity64=0 -minx64=0 -miny64=0 -maxx64=0 -maxy64=0 -posx64=50 -posy64=50 -sizx64=800 -sizy64=600 -maxfps64=0 -initts64=0 -title65=Doom 64 Absolution -path65=D:\Games\Doom 64 - Absolution (Win32 Port)\Bin\Absolution.exe -module65= -opengllib65= -ver65=8 -coord65=0 -flag65=134217728 -flagg65=86016 -flagh65=20 -flagi65=0 -tflag65=2 -initx65=0 -inity65=0 -minx65=0 -miny65=0 -maxx65=0 -maxy65=0 -posx65=50 -posy65=50 -sizx65=800 -sizy65=600 -maxfps65=100 -initts65=-5 -title66=Doom 95 -path66=D:\Games\Doom95\DOOM95.EXE -module66= -opengllib66= -ver66=0 -coord66=0 -flag66=134217762 -flagg66=2113536 -flagh66=16 -flagi66=0 -tflag66=258 -initx66=0 -inity66=0 -minx66=0 -miny66=0 -maxx66=0 -maxy66=0 -posx66=50 -posy66=50 -sizx66=800 -sizy66=600 -maxfps66=20 -initts66=-9 -title67=Drakan -path67=C:\Games\Drakan\drakan.exe -module67= -opengllib67= -ver67=0 -coord67=0 -flag67=536887328 -flagg67=0 -flagh67=0 -flagi67=0 -tflag67=0 -initx67=0 -inity67=0 -minx67=0 -miny67=0 -maxx67=0 -maxy67=0 -posx67=50 -posy67=50 -sizx67=800 -sizy67=600 -maxfps67=0 -initts67=0 -title68=Dream Aquarium -path68=D:\Program Files\Dream Aquarium\Dream_Aquarium.scr -module68= -opengllib68= -ver68=9 -coord68=0 -flag68=679477249 -flagg68=303104 -flagh68=0 -flagi68=0 -tflag68=256 -initx68=0 -inity68=0 -minx68=0 -miny68=0 -maxx68=0 -maxy68=0 -posx68=50 -posy68=50 -sizx68=800 -sizy68=600 -maxfps68=500 -initts68=0 -title69=Dungeon Keeper 2 GOG release -path69=D:\Games\Dungeon Keeper 2 GOG release\DKII.EXE -module69= -opengllib69= -ver69=0 -coord69=0 -flag69=134217762 -flagg69=4276224 -flagh69=0 -flagi69=0 -tflag69=6 -initx69=0 -inity69=0 -minx69=0 -miny69=0 -maxx69=0 -maxy69=0 -posx69=50 -posy69=50 -sizx69=800 -sizy69=600 -maxfps69=0 -initts69=0 -title70=Dungeon Keeper 95 -path70=D:\Games\Keeper95\KEEPER95.EXE -module70= -opengllib70= -ver70=0 -coord70=0 -flag70=134299686 -flagg70=0 -flagh70=16 -flagi70=0 -tflag70=0 -initx70=0 -inity70=0 -minx70=0 -miny70=0 -maxx70=0 -maxy70=0 -posx70=50 -posy70=50 -sizx70=800 -sizy70=600 -maxfps70=0 -initts70=0 -title71=Dungeon Keeper D3D -path71=D:\Games\Keeper95\keepd3d.exe -module71= -opengllib71= -ver71=0 -coord71=0 -flag71=134217762 -flagg71=134217728 -flagh71=17 -flagi71=0 -tflag71=259 -initx71=0 -inity71=0 -minx71=0 -miny71=0 -maxx71=0 -maxy71=0 -posx71=50 -posy71=50 -sizx71=800 -sizy71=600 -maxfps71=0 -initts71=0 -title72=Dungeon Keeper II -path72=D:\Games\Dungeon Keeper 2\DKII.exe -module72= -opengllib72= -ver72=0 -coord72=0 -flag72=34 -flagg72=574619648 -flagh72=20 -flagi72=0 -tflag72=263 -initx72=0 -inity72=0 -minx72=0 -miny72=0 -maxx72=0 -maxy72=0 -posx72=150 -posy72=50 -sizx72=800 -sizy72=600 -maxfps72=0 -initts72=0 -title73=Emergency Fighters for life -path73=D:\Games\Emergency\EMERGY.EXE -module73= -opengllib73= -ver73=0 -coord73=0 -flag73=402718947 -flagg73=65554 -flagh73=20 -flagi73=0 -tflag73=3 -initx73=0 -inity73=0 -minx73=0 -miny73=0 -maxx73=0 -maxy73=0 -posx73=50 -posy73=50 -sizx73=800 -sizy73=600 -maxfps73=0 -initts73=0 -title74=Enemy Infestation -path74=C:\Games\Enemy Infestation (1998)\Ei.exe -module74= -opengllib74= -ver74=0 -coord74=0 -flag74=38 -flagg74=0 -flagh74=0 -flagi74=0 -tflag74=0 -initx74=0 -inity74=0 -minx74=0 -miny74=0 -maxx74=0 -maxy74=0 -posx74=50 -posy74=50 -sizx74=800 -sizy74=600 -maxfps74=0 -initts74=0 -title75=Evany La chiave per mondi sconosciuti -path75=D:\Games\Evany La chiave per mondi sconosciuti\Evany.exe -module75= -opengllib75= -ver75=0 -coord75=0 -flag75=134348864 -flagg75=0 -flagh75=277 -flagi75=0 -tflag75=0 -initx75=0 -inity75=0 -minx75=0 -miny75=0 -maxx75=0 -maxy75=0 -posx75=50 -posy75=50 -sizx75=800 -sizy75=600 -maxfps75=0 -initts75=0 -title76=Evil Genius -path76=D:\Games\Evil Genius\ReleaseExe\EvilGenius_Cracked.exe -module76= -opengllib76= -ver76=9 -coord76=0 -flag76=2053 -flagg76=80 -flagh76=0 -flagi76=0 -tflag76=0 -initx76=0 -inity76=0 -minx76=0 -miny76=0 -maxx76=0 -maxy76=0 -posx76=50 -posy76=50 -sizx76=800 -sizy76=600 -maxfps76=0 -initts76=0 -title77=Expendable -path77=C:\Games\eXpendable\go.exe -nocputest -module77= -opengllib77= -ver77=0 -coord77=0 -flag77=402653280 -flagg77=1 -flagh77=0 -flagi77=0 -tflag77=2 -initx77=0 -inity77=0 -minx77=0 -miny77=0 -maxx77=0 -maxy77=0 -posx77=50 -posy77=50 -sizx77=800 -sizy77=600 -maxfps77=0 -initts77=0 -title78=Fallen Heaven -path78=D:\Games\Fallen haven\Exe\FALLEN.EXE -module78=MFC42.dll MSVCRT.DLL mciavi32.dll -opengllib78= -ver78=1 -coord78=0 -flag78=135004674 -flagg78=1049120 -flagh78=0 -flagi78=0 -tflag78=258 -initx78=0 -inity78=0 -minx78=0 -miny78=0 -maxx78=0 -maxy78=0 -posx78=50 -posy78=50 -sizx78=800 -sizy78=600 -maxfps78=0 -initts78=0 -title79=Fallen Heaven (BAD) -path79=C:\Games\falhaven\Exe\FALLEN.EXE -module79= -opengllib79= -ver79=0 -coord79=0 -flag79=679485962 -flagg79=32 -flagh79=0 -flagi79=0 -tflag79=0 -initx79=0 -inity79=0 -minx79=0 -miny79=0 -maxx79=0 -maxy79=0 -posx79=0 -posy79=0 -sizx79=800 -sizy79=600 -maxfps79=0 -initts79=0 -title80=Fallout -path80=D:\Games\Fallout\FALLOUTW.EXE -module80= -opengllib80= -ver80=0 -coord80=0 -flag80=134217734 -flagg80=16 -flagh80=16 -flagi80=0 -tflag80=0 -initx80=0 -inity80=0 -minx80=0 -miny80=0 -maxx80=0 -maxy80=0 -posx80=50 -posy80=50 -sizx80=800 -sizy80=600 -maxfps80=0 -initts80=0 -title81=Fighting Force -path81=D:\Games\Fighting Force\FFORCE.EXE -module81= -opengllib81= -ver81=0 -coord81=0 -flag81=134217730 -flagg81=134217728 -flagh81=477 -flagi81=0 -tflag81=0 -initx81=0 -inity81=0 -minx81=0 -miny81=0 -maxx81=0 -maxy81=0 -posx81=50 -posy81=50 -sizx81=800 -sizy81=600 -maxfps81=0 -initts81=0 -title82=FreakOut -path82=C:\Games\Freak Out - Extreme Freeride\FreakOut.exe -module82= -opengllib82= -ver82=9 -coord82=0 -flag82=0 -flagg82=0 -flagh82=0 -flagi82=0 -tflag82=2 -initx82=0 -inity82=0 -minx82=0 -miny82=0 -maxx82=0 -maxy82=0 -posx82=50 -posy82=50 -sizx82=800 -sizy82=600 -maxfps82=0 -initts82=0 -title83=Funtracks -path83=C:\Games\Funtracks\Fun_win.exe -module83= -opengllib83= -ver83=1 -coord83=0 -flag83=2 -flagg83=0 -flagh83=0 -flagi83=0 -tflag83=258 -initx83=0 -inity83=0 -minx83=0 -miny83=0 -maxx83=0 -maxy83=0 -posx83=50 -posy83=50 -sizx83=800 -sizy83=600 -maxfps83=0 -initts83=0 -title84=Galapagos -path84=C:\Games\Galapagos\GALA.EXE -module84= -opengllib84= -ver84=0 -coord84=0 -flag84=134217760 -flagg84=0 -flagh84=0 -flagi84=0 -tflag84=0 -initx84=0 -inity84=0 -minx84=0 -miny84=0 -maxx84=0 -maxy84=0 -posx84=50 -posy84=50 -sizx84=800 -sizy84=600 -maxfps84=0 -initts84=0 -title85=Gangsters -path85=D:\Games\Gangsters\gangsters.exe -module85= -opengllib85= -ver85=0 -coord85=0 -flag85=134217730 -flagg85=135266304 -flagh85=16 -flagi85=0 -tflag85=0 -initx85=0 -inity85=0 -minx85=0 -miny85=0 -maxx85=0 -maxy85=0 -posx85=50 -posy85=50 -sizx85=800 -sizy85=600 -maxfps85=0 -initts85=0 -title86=Garshasp -path86=D:\Games\Garshasp\distro\Garshasp.exe -module86= -opengllib86= -ver86=0 -coord86=0 -flag86=402653184 -flagg86=134217728 -flagh86=477 -flagi86=0 -tflag86=0 -initx86=0 -inity86=0 -minx86=0 -miny86=0 -maxx86=0 -maxy86=0 -posx86=50 -posy86=50 -sizx86=800 -sizy86=600 -maxfps86=0 -initts86=0 -title87=GeneRally -path87=C:\Games\generally105\GeneRally.exe -module87= -opengllib87= -ver87=0 -coord87=0 -flag87=34 -flagg87=0 -flagh87=0 -flagi87=0 -tflag87=0 -initx87=0 -inity87=0 -minx87=0 -miny87=0 -maxx87=0 -maxy87=0 -posx87=50 -posy87=50 -sizx87=800 -sizy87=600 -maxfps87=0 -initts87=0 -title88=Get Medieval -path88=C:\Games\Get Medieval\MEDIEVAL.EXE -module88= -opengllib88= -ver88=0 -coord88=0 -flag88=34 -flagg88=2 -flagh88=0 -flagi88=0 -tflag88=0 -initx88=0 -inity88=0 -minx88=0 -miny88=0 -maxx88=0 -maxy88=0 -posx88=0 -posy88=0 -sizx88=800 -sizy88=600 -maxfps88=0 -initts88=0 -title89=Gift -path89=C:\Games\Gift\Gift.exe -module89= -opengllib89= -ver89=0 -coord89=0 -flag89=4196384 -flagg89=0 -flagh89=0 -flagi89=0 -tflag89=34 -initx89=0 -inity89=0 -minx89=0 -miny89=0 -maxx89=0 -maxy89=0 -posx89=0 -posy89=0 -sizx89=0 -sizy89=0 -maxfps89=0 -initts89=0 -title90=glsample.exe -path90=D:\DxWnd\code examples\glsample\Debug\glsample.exe -module90= -opengllib90= -ver90=0 -coord90=0 -flag90=0 -flagg90=134348800 -flagh90=0 -flagi90=0 -tflag90=2 -initx90=0 -inity90=0 -minx90=0 -miny90=0 -maxx90=0 -maxy90=0 -posx90=0 -posy90=0 -sizx90=800 -sizy90=600 -maxfps90=0 -initts90=0 -title91=Golden Age of Racing -path91=C:\Games\Golden Age of Racing\GAOR.exe -module91= -opengllib91= -ver91=0 -coord91=0 -flag91=34 -flagg91=0 -flagh91=0 -flagi91=0 -tflag91=0 -initx91=0 -inity91=0 -minx91=0 -miny91=0 -maxx91=0 -maxy91=0 -posx91=50 -posy91=50 -sizx91=800 -sizy91=600 -maxfps91=0 -initts91=0 -title92=Gp500 for Win2K -path92=C:\Games\gp500\gp500_win2k.exe -module92= -opengllib92= -ver92=1 -coord92=0 -flag92=545677860 -flagg92=0 -flagh92=0 -flagi92=0 -tflag92=2 -initx92=0 -inity92=0 -minx92=0 -miny92=0 -maxx92=0 -maxy92=0 -posx92=50 -posy92=50 -sizx92=800 -sizy92=600 -maxfps92=0 -initts92=0 -title93=G-Police -path93=C:\Games\gpolice\GPOLICE.EXE -module93= -opengllib93= -ver93=0 -coord93=0 -flag93=67125286 -flagg93=0 -flagh93=0 -flagi93=0 -tflag93=2 -initx93=0 -inity93=0 -minx93=0 -miny93=0 -maxx93=0 -maxy93=0 -posx93=50 -posy93=50 -sizx93=800 -sizy93=600 -maxfps93=0 -initts93=0 -title94=Grand Prix Legends -path94=D:\Games\Grand Prix Legends\gpl\gpl.exe -module94= -opengllib94= -ver94=0 -coord94=0 -flag94=-2013233117 -flagg94=0 -flagh94=20 -flagi94=0 -tflag94=3 -initx94=0 -inity94=0 -minx94=0 -miny94=0 -maxx94=0 -maxy94=0 -posx94=50 -posy94=50 -sizx94=800 -sizy94=600 -maxfps94=0 -initts94=0 -title95=Grand Prix Legends MAX -path95=D:\Games\Grand Prix Legends MAX\gpl.exe -module95= -opengllib95= -ver95=7 -coord95=0 -flag95=537001986 -flagg95=134217729 -flagh95=0 -flagi95=0 -tflag95=2 -initx95=0 -inity95=0 -minx95=0 -miny95=0 -maxx95=0 -maxy95=0 -posx95=50 -posy95=50 -sizx95=800 -sizy95=600 -maxfps95=0 -initts95=0 -title96=Grand Prix World -path96=D:\Games\Grand Prix World\gpwxp2.exe -module96= -opengllib96= -ver96=0 -coord96=0 -flag96=2097314 -flagg96=134217856 -flagh96=80 -flagi96=0 -tflag96=35 -initx96=0 -inity96=0 -minx96=0 -miny96=0 -maxx96=0 -maxy96=0 -posx96=50 -posy96=50 -sizx96=800 -sizy96=600 -maxfps96=0 -initts96=0 -title97=Grand Theft Auto 2 -path97=D:\Games\GTA2\gta2.exe -module97=binkw32 d3ddll -opengllib97= -ver97=0 -coord97=0 -flag97=671096866 -flagg97=1048576 -flagh97=0 -flagi97=0 -tflag97=2 -initx97=0 -inity97=0 -minx97=0 -miny97=0 -maxx97=0 -maxy97=0 -posx97=50 -posy97=50 -sizx97=400 -sizy97=300 -maxfps97=0 -initts97=0 -title98=Grand Touring -path98=D:\Games\Grand Touring\gt.exe -module98= -opengllib98= -ver98=0 -coord98=0 -flag98=16390 -flagg98=134283264 -flagh98=16 -flagi98=0 -tflag98=275 -initx98=0 -inity98=0 -minx98=0 -miny98=0 -maxx98=0 -maxy98=0 -posx98=50 -posy98=50 -sizx98=800 -sizy98=600 -maxfps98=0 -initts98=8 -title99=Grim Fandango Demo -path99=C:\Games\GrimWebDemo\grimdemo.exe -module99= -opengllib99= -ver99=0 -coord99=0 -flag99=34 -flagg99=0 -flagh99=0 -flagi99=0 -tflag99=258 -initx99=0 -inity99=0 -minx99=0 -miny99=0 -maxx99=0 -maxy99=0 -posx99=50 -posy99=50 -sizx99=800 -sizy99=600 -maxfps99=0 -initts99=0 -title100=Gruntz -path100=D:\Games\gruntz\GRUNTZ.EXE -module100= -opengllib100= -ver100=0 -coord100=0 -flag100=34 -flagg100=134217728 -flagh100=16 -flagi100=0 -tflag100=0 -initx100=0 -inity100=0 -minx100=0 -miny100=0 -maxx100=0 -maxy100=0 -posx100=50 -posy100=50 -sizx100=800 -sizy100=600 -maxfps100=0 -initts100=0 -title101=GTA 3 -path101=D:\Games\GTA3\gta3.exe -module101= -opengllib101= -ver101=0 -coord101=0 -flag101=134234150 -flagg101=1207975952 -flagh101=176 -flagi101=0 -tflag101=2 -initx101=0 -inity101=0 -minx101=0 -miny101=0 -maxx101=0 -maxy101=0 -posx101=50 -posy101=50 -sizx101=800 -sizy101=600 -maxfps101=0 -initts101=0 -title102=Gunman Chronicles -path102=D:\Games\Gunman\gunman.exe -module102= -opengllib102= -ver102=0 -coord102=0 -flag102=0 -flagg102=-2013134848 -flagh102=0 -flagi102=0 -tflag102=0 -initx102=0 -inity102=0 -minx102=0 -miny102=0 -maxx102=0 -maxy102=0 -posx102=0 -posy102=0 -sizx102=400 -sizy102=300 -maxfps102=0 -initts102=0 -title103=Half-Life Blue-Shift (d3d) -path103=D:\Games\Half-Life Blue-Shift\bshift.exe -module103= -opengllib103= -ver103=7 -coord103=0 -flag103=1207959554 -flagg103=513 -flagh103=0 -flagi103=0 -tflag103=258 -initx103=0 -inity103=0 -minx103=0 -miny103=0 -maxx103=0 -maxy103=0 -posx103=50 -posy103=50 -sizx103=800 -sizy103=600 -maxfps103=0 -initts103=0 -title104=Half-Life Uplink Demo -path104=D:\Games\Half-Life Uplink\hldemo.exe -module104= -opengllib104= -ver104=1 -coord104=0 -flag104=1073741826 -flagg104=16384 -flagh104=0 -flagi104=0 -tflag104=2 -initx104=0 -inity104=0 -minx104=0 -miny104=0 -maxx104=0 -maxy104=0 -posx104=50 -posy104=50 -sizx104=640 -sizy104=480 -maxfps104=0 -initts104=0 -title105=Halo Combat Evolved -path105=D:\Games\Halo Combat Evolved\halo.exe -module105= -opengllib105= -ver105=9 -coord105=0 -flag105=570425377 -flagg105=-2147483648 -flagh105=0 -flagi105=0 -tflag105=478 -initx105=0 -inity105=0 -minx105=0 -miny105=0 -maxx105=0 -maxy105=0 -posx105=50 -posy105=50 -sizx105=800 -sizy105=600 -maxfps105=0 -initts105=0 -title106=Heart of Darkness -path106=d:\Games\Heart of Darkness\HODWin32.exe -module106= -opengllib106= -ver106=0 -coord106=0 -flag106=8226 -flagg106=2179072 -flagh106=16 -flagi106=0 -tflag106=0 -initx106=0 -inity106=0 -minx106=0 -miny106=0 -maxx106=0 -maxy106=0 -posx106=50 -posy106=50 -sizx106=800 -sizy106=600 -maxfps106=0 -initts106=4 -title107=Heavy Metal - FAKK2 Demo -path107=D:\Games\Heavy Metal - FAKK2 Demo\fakk2.exe -module107= -opengllib107= -ver107=0 -coord107=0 -flag107=4 -flagg107=134348800 -flagh107=284 -flagi107=0 -tflag107=0 -initx107=0 -inity107=0 -minx107=0 -miny107=0 -maxx107=0 -maxy107=0 -posx107=50 -posy107=50 -sizx107=800 -sizy107=600 -maxfps107=0 -initts107=0 -title108=Heavy Metal FAKK 2 -path108=C:\Games\Heavy Metal - FAKK2\fakk2.exe -module108= -opengllib108= -ver108=0 -coord108=0 -flag108=33554464 -flagg108=64 -flagh108=0 -flagi108=0 -tflag108=2 -initx108=0 -inity108=0 -minx108=0 -miny108=0 -maxx108=0 -maxy108=0 -posx108=50 -posy108=50 -sizx108=800 -sizy108=600 -maxfps108=0 -initts108=0 -title109=HellCopter -path109=C:\Games\hellcop\HCopter.exe -module109= -opengllib109= -ver109=0 -coord109=0 -flag109=-2013249500 -flagg109=256 -flagh109=0 -flagi109=0 -tflag109=0 -initx109=0 -inity109=0 -minx109=0 -miny109=0 -maxx109=0 -maxy109=0 -posx109=50 -posy109=50 -sizx109=800 -sizy109=600 -maxfps109=0 -initts109=0 -title110=Heretic 2 -path110=D:\Games\Heretic 2\Heretic2.exe -module110= -opengllib110= -ver110=0 -coord110=0 -flag110=0 -flagg110=134348800 -flagh110=29 -flagi110=0 -tflag110=258 -initx110=0 -inity110=0 -minx110=0 -miny110=0 -maxx110=0 -maxy110=0 -posx110=50 -posy110=50 -sizx110=800 -sizy110=600 -maxfps110=0 -initts110=0 -title111=Heroes of Might & Magic III Demo -path111=C:\Games\Heroes III Demo\h3demo.exe -module111= -opengllib111= -ver111=1 -coord111=0 -flag111=134234146 -flagg111=0 -flagh111=0 -flagi111=0 -tflag111=2 -initx111=0 -inity111=0 -minx111=0 -miny111=0 -maxx111=0 -maxy111=0 -posx111=50 -posy111=50 -sizx111=800 -sizy111=600 -maxfps111=0 -initts111=0 -title112=Hexen II (opengl) -path112=D:\Games\Hexen II\glh2.exe -module112= -opengllib112= -ver112=10 -coord112=1 -flag112=3 -flagg112=213009 -flagh112=16 -flagi112=0 -tflag112=386 -initx112=0 -inity112=0 -minx112=0 -miny112=0 -maxx112=0 -maxy112=0 -posx112=50 -posy112=50 -sizx112=800 -sizy112=600 -maxfps112=50 -initts112=8 -title113=Hexen II (software) -path113=D:\Games\Hexen II\h2.exe -module113= -opengllib113= -ver113=0 -coord113=0 -flag113=671088642 -flagg113=1130496 -flagh113=16 -flagi113=0 -tflag113=0 -initx113=0 -inity113=0 -minx113=0 -miny113=0 -maxx113=0 -maxy113=0 -posx113=50 -posy113=50 -sizx113=800 -sizy113=600 -maxfps113=0 -initts113=8 -title114=Hitman - Codename 47 -path114=D:\Games\Hitman - Codename 47\Hitman.Exe -module114= -opengllib114= -ver114=0 -coord114=0 -flag114=134217728 -flagg114=671088640 -flagh114=28 -flagi114=0 -tflag114=3 -initx114=0 -inity114=0 -minx114=0 -miny114=0 -maxx114=0 -maxy114=0 -posx114=50 -posy114=50 -sizx114=800 -sizy114=600 -maxfps114=0 -initts114=0 -title115=Homeworld 2 -path115=D:\Games\Homeworld2\Bin\Release\Homeworld2.exe -module115= -opengllib115= -ver115=0 -coord115=0 -flag115=671088642 -flagg115=134217728 -flagh115=477 -flagi115=0 -tflag115=0 -initx115=0 -inity115=0 -minx115=0 -miny115=0 -maxx115=0 -maxy115=0 -posx115=50 -posy115=50 -sizx115=800 -sizy115=600 -maxfps115=0 -initts115=0 -title116=hover -path116=C:\Games\hover\hoverX.exe -module116= -opengllib116= -ver116=0 -coord116=0 -flag116=8224 -flagg116=0 -flagh116=0 -flagi116=0 -tflag116=0 -initx116=0 -inity116=0 -minx116=0 -miny116=0 -maxx116=0 -maxy116=0 -posx116=50 -posy116=50 -sizx116=800 -sizy116=600 -maxfps116=0 -initts116=0 -title117=Hyperblade -path117=D:\Games\Hyperblade\HYPERX.EXE -module117= -opengllib117= -ver117=0 -coord117=0 -flag117=134217891 -flagg117=3231762 -flagh117=16 -flagi117=0 -tflag117=2 -initx117=0 -inity117=0 -minx117=0 -miny117=0 -maxx117=0 -maxy117=0 -posx117=50 -posy117=50 -sizx117=800 -sizy117=600 -maxfps117=25 -initts117=1 -title118=Idinaloq -path118=C:\Games\idina101\idinaloq.exe -module118= -opengllib118= -ver118=0 -coord118=0 -flag118=32 -flagg118=0 -flagh118=0 -flagi118=0 -tflag118=0 -initx118=0 -inity118=0 -minx118=0 -miny118=0 -maxx118=0 -maxy118=0 -posx118=50 -posy118=50 -sizx118=800 -sizy118=600 -maxfps118=0 -initts118=0 -title119=Immanis -path119=C:\Games\Immanis CD release\immanis.exe -module119= -opengllib119= -ver119=0 -coord119=0 -flag119=24611 -flagg119=0 -flagh119=0 -flagi119=0 -tflag119=0 -initx119=0 -inity119=0 -minx119=0 -miny119=0 -maxx119=0 -maxy119=0 -posx119=50 -posy119=50 -sizx119=800 -sizy119=600 -maxfps119=0 -initts119=0 -title120=Immanis (v2) -path120=C:\Games\Immanis CD release\immanis_v2.exe -module120= -opengllib120= -ver120=0 -coord120=0 -flag120=268460067 -flagg120=0 -flagh120=0 -flagi120=0 -tflag120=0 -initx120=0 -inity120=0 -minx120=0 -miny120=0 -maxx120=0 -maxy120=0 -posx120=50 -posy120=50 -sizx120=800 -sizy120=600 -maxfps120=0 -initts120=0 -title121=In the Hunt -path121=C:\Games\In The Hunt\e8.exe -module121= -opengllib121= -ver121=0 -coord121=0 -flag121=2 -flagg121=0 -flagh121=0 -flagi121=0 -tflag121=0 -initx121=0 -inity121=0 -minx121=0 -miny121=0 -maxx121=0 -maxy121=0 -posx121=50 -posy121=50 -sizx121=800 -sizy121=600 -maxfps121=0 -initts121=0 -title122=Incoming Forces -path122=D:\Games\Incoming Forces\forces.exe -module122= -opengllib122= -ver122=8 -coord122=0 -flag122=134217760 -flagg122=0 -flagh122=0 -flagi122=0 -tflag122=2 -initx122=0 -inity122=0 -minx122=0 -miny122=0 -maxx122=0 -maxy122=0 -posx122=50 -posy122=50 -sizx122=800 -sizy122=600 -maxfps122=0 -initts122=0 -title123=International Superstar Soccer 3 -path123=C:\Games\ISS_3\iss3.exe -module123= -opengllib123= -ver123=8 -coord123=0 -flag123=545267715 -flagg123=0 -flagh123=0 -flagi123=0 -tflag123=0 -initx123=0 -inity123=0 -minx123=0 -miny123=0 -maxx123=0 -maxy123=0 -posx123=50 -posy123=50 -sizx123=800 -sizy123=600 -maxfps123=0 -initts123=0 -title124=Jacked -path124=D:\Games\Jacked\Jacked.exe -module124=winmm -opengllib124= -ver124=9 -coord124=0 -flag124=537010208 -flagg124=196608 -flagh124=0 -flagi124=0 -tflag124=258 -initx124=0 -inity124=0 -minx124=0 -miny124=0 -maxx124=0 -maxy124=0 -posx124=50 -posy124=50 -sizx124=800 -sizy124=600 -maxfps124=100 -initts124=3 -title125=Jedi Knight II Jedi Outcast -path125=D:\Games\Jedi Knight II Jedi Outcast\GameData\jk2sp.exe -module125= -opengllib125= -ver125=0 -coord125=0 -flag125=2 -flagg125=1180161 -flagh125=16 -flagi125=0 -tflag125=2 -initx125=0 -inity125=0 -minx125=0 -miny125=0 -maxx125=0 -maxy125=0 -posx125=50 -posy125=50 -sizx125=800 -sizy125=600 -maxfps125=0 -initts125=0 -title126=Jet Moto -path126=M:\JETMOTO.EXE -module126= -opengllib126= -ver126=0 -coord126=0 -flag126=139298 -flagg126=0 -flagh126=0 -flagi126=0 -tflag126=0 -initx126=0 -inity126=0 -minx126=0 -miny126=0 -maxx126=0 -maxy126=0 -posx126=50 -posy126=50 -sizx126=800 -sizy126=600 -maxfps126=0 -initts126=0 -title127=Kiss Psyco Cyrcus -path127=C:\Games\Psycho\client.exe -module127=d3d.ren -opengllib127= -ver127=7 -coord127=0 -flag127=537018404 -flagg127=0 -flagh127=0 -flagi127=0 -tflag127=0 -initx127=0 -inity127=0 -minx127=0 -miny127=0 -maxx127=0 -maxy127=0 -posx127=50 -posy127=50 -sizx127=800 -sizy127=600 -maxfps127=0 -initts127=0 -title128=Kohan II Kings of War -path128=D:\Games\Kohan II Kings of War\k2.exe -module128= -opengllib128= -ver128=0 -coord128=0 -flag128=134217728 -flagg128=134217728 -flagh128=-842150435 -flagi128=-842150451 -tflag128=0 -initx128=0 -inity128=0 -minx128=0 -miny128=0 -maxx128=0 -maxy128=0 -posx128=50 -posy128=50 -sizx128=800 -sizy128=600 -maxfps128=0 -initts128=0 -title129=Koplio -path129=D:\Games\Koplio\KOPLIO.exe -module129= -opengllib129= -ver129=1 -coord129=0 -flag129=545390720 -flagg129=134217729 -flagh129=20 -flagi129=0 -tflag129=3 -initx129=0 -inity129=0 -minx129=0 -miny129=0 -maxx129=0 -maxy129=0 -posx129=50 -posy129=50 -sizx129=800 -sizy129=600 -maxfps129=0 -initts129=0 -title130=Krazy Ivan -path130=C:\Games\Krazy Ivan\KRAZY.EXE -module130= -opengllib130= -ver130=0 -coord130=0 -flag130=536870914 -flagg130=0 -flagh130=0 -flagi130=0 -tflag130=0 -initx130=0 -inity130=0 -minx130=0 -miny130=0 -maxx130=0 -maxy130=0 -posx130=50 -posy130=50 -sizx130=800 -sizy130=600 -maxfps130=0 -initts130=0 -title131=Last Bronx -path131=C:\Games\Last_Bronx\LB.EXE -module131= -opengllib131= -ver131=0 -coord131=0 -flag131=40994 -flagg131=0 -flagh131=0 -flagi131=0 -tflag131=64 -initx131=0 -inity131=0 -minx131=0 -miny131=0 -maxx131=0 -maxy131=0 -posx131=50 -posy131=50 -sizx131=800 -sizy131=600 -maxfps131=0 -initts131=0 -title132=Lionheart -path132=C:\Games\Lionheart Demo\Lionheart.exe -module132= -opengllib132= -ver132=0 -coord132=0 -flag132=-2147483612 -flagg132=0 -flagh132=0 -flagi132=0 -tflag132=0 -initx132=0 -inity132=0 -minx132=0 -miny132=0 -maxx132=0 -maxy132=0 -posx132=50 -posy132=50 -sizx132=800 -sizy132=600 -maxfps132=0 -initts132=0 -title133=lithtech.exe -path133=D:\Games\NOLF Technology Demo\lithtech.exe -module133= -opengllib133= -ver133=7 -coord133=0 -flag133=0 -flagg133=512 -flagh133=0 -flagi133=0 -tflag133=258 -initx133=0 -inity133=0 -minx133=0 -miny133=0 -maxx133=0 -maxy133=0 -posx133=50 -posy133=50 -sizx133=800 -sizy133=600 -maxfps133=0 -initts133=0 -title134=Lords of the Realm 2 -path134=D:\Games\L2SIEGE\LORDS2.EXE -module134= -opengllib134= -ver134=0 -coord134=0 -flag134=38 -flagg134=65536 -flagh134=16 -flagi134=0 -tflag134=8 -initx134=0 -inity134=0 -minx134=0 -miny134=0 -maxx134=0 -maxy134=0 -posx134=50 -posy134=50 -sizx134=800 -sizy134=600 -maxfps134=0 -initts134=0 -title135=M.A.X. 2 -path135=C:\Games\MAX 2\MAX_2\MAX2\MAX2.EXE -module135= -opengllib135= -ver135=0 -coord135=0 -flag135=34 -flagg135=0 -flagh135=0 -flagi135=0 -tflag135=0 -initx135=0 -inity135=0 -minx135=0 -miny135=0 -maxx135=0 -maxy135=0 -posx135=50 -posy135=50 -sizx135=800 -sizy135=600 -maxfps135=0 -initts135=0 -title136=M1 Tank Platoon 2 -path136=C:\Games\M1 Tank Platoon 2\M1TP2.exe -module136= -opengllib136= -ver136=8 -coord136=0 -flag136=34 -flagg136=0 -flagh136=0 -flagi136=0 -tflag136=0 -initx136=0 -inity136=0 -minx136=0 -miny136=0 -maxx136=0 -maxy136=0 -posx136=50 -posy136=50 -sizx136=800 -sizy136=600 -maxfps136=0 -initts136=0 -title137=Mario Worlds (stripped PE) -path137=C:\Games\Mario Worlds\Mario Worlds.exe -module137= -opengllib137= -ver137=1 -coord137=0 -flag137=2 -flagg137=1 -flagh137=0 -flagi137=0 -tflag137=386 -initx137=0 -inity137=0 -minx137=0 -miny137=0 -maxx137=0 -maxy137=0 -posx137=50 -posy137=50 -sizx137=800 -sizy137=600 -maxfps137=0 -initts137=0 -title138=Masters of Orion 2 -path138=C:\Games\Orion2\Orion95.exe -module138= -opengllib138= -ver138=0 -coord138=0 -flag138=34 -flagg138=0 -flagh138=0 -flagi138=0 -tflag138=0 -initx138=0 -inity138=0 -minx138=0 -miny138=0 -maxx138=0 -maxy138=0 -posx138=50 -posy138=50 -sizx138=800 -sizy138=600 -maxfps138=0 -initts138=0 -title139=Microsoft Flight Simulator 98 -path139=C:\Games\Flight Simulator 98\FLTSIM98.EXE -module139= -opengllib139= -ver139=0 -coord139=0 -flag139=288 -flagg139=0 -flagh139=0 -flagi139=0 -tflag139=0 -initx139=0 -inity139=0 -minx139=0 -miny139=0 -maxx139=0 -maxy139=0 -posx139=50 -posy139=50 -sizx139=800 -sizy139=600 -maxfps139=0 -initts139=0 -title140=Microsoft Midtown Madness -path140=C:\Games\Midtown Madness\midtown.exe -module140= -opengllib140= -ver140=0 -coord140=0 -flag140=8192 -flagg140=0 -flagh140=0 -flagi140=0 -tflag140=2 -initx140=0 -inity140=0 -minx140=0 -miny140=0 -maxx140=0 -maxy140=0 -posx140=50 -posy140=50 -sizx140=800 -sizy140=600 -maxfps140=0 -initts140=0 -title141=Microsoft Midtown Madness Trial (BAD) -path141=C:\Games\Midtown Madness Trial\midtrial.exe -module141= -opengllib141= -ver141=0 -coord141=0 -flag141=2 -flagg141=0 -flagh141=0 -flagi141=0 -tflag141=0 -initx141=0 -inity141=0 -minx141=0 -miny141=0 -maxx141=0 -maxy141=0 -posx141=0 -posy141=0 -sizx141=800 -sizy141=600 -maxfps141=0 -initts141=0 -title142=Microsoft Motocross Madness 2 (BAD!!) -path142=C:\Games\Motocross Madness 2\MCM2.cracked.EXE -module142= -opengllib142= -ver142=7 -coord142=0 -flag142=201326664 -flagg142=1 -flagh142=0 -flagi142=0 -tflag142=82 -initx142=0 -inity142=0 -minx142=0 -miny142=0 -maxx142=0 -maxy142=0 -posx142=50 -posy142=50 -sizx142=800 -sizy142=600 -maxfps142=0 -initts142=0 -title143=Microsoft Motocross Madness Trial (BAD) -path143=C:\Games\Motocross Madness Trial\mcm.exe -module143= -opengllib143= -ver143=1 -coord143=0 -flag143=134225952 -flagg143=0 -flagh143=0 -flagi143=0 -tflag143=130 -initx143=0 -inity143=0 -minx143=0 -miny143=0 -maxx143=0 -maxy143=0 -posx143=50 -posy143=50 -sizx143=0 -sizy143=0 -maxfps143=0 -initts143=0 -title144=Mission Force Cyberstorm (BAD ?) -path144=C:\Games\SIERRA\CSTORM\CSTORM.EXE -module144= -opengllib144= -ver144=0 -coord144=0 -flag144=33562658 -flagg144=0 -flagh144=0 -flagi144=0 -tflag144=0 -initx144=0 -inity144=0 -minx144=0 -miny144=0 -maxx144=0 -maxy144=0 -posx144=50 -posy144=50 -sizx144=0 -sizy144=0 -maxfps144=0 -initts144=0 -title145=Monopoly 3D -path145=C:\Games\Monopoly (Edition 3D)\Monopoly.exe -module145= -opengllib145= -ver145=0 -coord145=0 -flag145=134244388 -flagg145=0 -flagh145=0 -flagi145=0 -tflag145=2 -initx145=0 -inity145=0 -minx145=0 -miny145=0 -maxx145=0 -maxy145=0 -posx145=50 -posy145=50 -sizx145=800 -sizy145=600 -maxfps145=0 -initts145=0 -title146=Monster Truck Madness 2 -path146=C:\Games\Monster Truck Madness 2\Monster.EXE -module146= -opengllib146= -ver146=1 -coord146=0 -flag146=34 -flagg146=1 -flagh146=0 -flagi146=0 -tflag146=0 -initx146=0 -inity146=0 -minx146=0 -miny146=0 -maxx146=0 -maxy146=0 -posx146=50 -posy146=50 -sizx146=800 -sizy146=600 -maxfps146=0 -initts146=0 -title147=Moto Racer Demo -path147=D:\Games\Moto Racer Demo\PlayDemo.exe -module147= -opengllib147= -ver147=0 -coord147=0 -flag147=167903267 -flagg147=192 -flagh147=16 -flagi147=0 -tflag147=14 -initx147=0 -inity147=0 -minx147=0 -miny147=0 -maxx147=0 -maxy147=0 -posx147=50 -posy147=50 -sizx147=800 -sizy147=600 -maxfps147=0 -initts147=0 -title148=MTV Music Generator -path148=D:\games\MTV Music Generator\mtvmusic.exe -module148= -opengllib148= -ver148=0 -coord148=0 -flag148=136314914 -flagg148=1209008128 -flagh148=797 -flagi148=0 -tflag148=3 -initx148=0 -inity148=0 -minx148=0 -miny148=0 -maxx148=0 -maxy148=0 -posx148=50 -posy148=50 -sizx148=800 -sizy148=600 -maxfps148=0 -initts148=0 -title149=Necrodrome -path149=C:\Games\Necrodome\NECRO95.EXE -module149= -opengllib149= -ver149=0 -coord149=0 -flag149=268435495 -flagg149=256 -flagh149=16 -flagi149=0 -tflag149=0 -initx149=0 -inity149=0 -minx149=0 -miny149=0 -maxx149=0 -maxy149=0 -posx149=50 -posy149=50 -sizx149=800 -sizy149=600 -maxfps149=0 -initts149=0 -title150=Need For Speed - Porsche 2000 -path150=C:\Games\Need For Speed - Porsche 2000\Porsche.exe -module150= -opengllib150= -ver150=7 -coord150=0 -flag150=0 -flagg150=0 -flagh150=0 -flagi150=0 -tflag150=258 -initx150=0 -inity150=0 -minx150=0 -miny150=0 -maxx150=0 -maxy150=0 -posx150=50 -posy150=50 -sizx150=800 -sizy150=600 -maxfps150=0 -initts150=0 -title151=Need For Speed Underground -path151=D:\Games\Need For Speed Underground\speed.exe -module151= -opengllib151= -ver151=0 -coord151=0 -flag151=671088674 -flagg151=1815101441 -flagh151=60 -flagi151=0 -tflag151=322 -initx151=0 -inity151=0 -minx151=0 -miny151=0 -maxx151=0 -maxy151=0 -posx151=50 -posy151=50 -sizx151=800 -sizy151=600 -maxfps151=0 -initts151=6 -title152=Need for Speed Underground 2 -path152=D:\Games\Need for Speed Underground 2\SPEED2.EXE -module152= -opengllib152= -ver152=0 -coord152=0 -flag152=671105026 -flagg152=136331264 -flagh152=61 -flagi152=0 -tflag152=6 -initx152=0 -inity152=0 -minx152=0 -miny152=0 -maxx152=0 -maxy152=0 -posx152=50 -posy152=50 -sizx152=800 -sizy152=600 -maxfps152=0 -initts152=0 -title153=Need For Speed Underground Demo -path153=D:\Games\Need For Speed Underground Demo\speeddemo.exe -module153= -opengllib153= -ver153=9 -coord153=0 -flag153=0 -flagg153=673202192 -flagh153=61 -flagi153=0 -tflag153=2 -initx153=0 -inity153=0 -minx153=0 -miny153=0 -maxx153=0 -maxy153=0 -posx153=50 -posy153=50 -sizx153=800 -sizy153=600 -maxfps153=0 -initts153=0 -title154=Netstorm Islands at War -path154=C:\Games\Netstorm\Netstorm.exe -module154= -opengllib154= -ver154=0 -coord154=0 -flag154=2 -flagg154=0 -flagh154=0 -flagi154=0 -tflag154=0 -initx154=0 -inity154=0 -minx154=0 -miny154=0 -maxx154=0 -maxy154=0 -posx154=50 -posy154=50 -sizx154=800 -sizy154=600 -maxfps154=0 -initts154=0 -title155=Nightmare Ned -path155=D:\Games\Ned\NITENED.EXE -module155= -opengllib155= -ver155=0 -coord155=0 -flag155=537395202 -flagg155=135266305 -flagh155=0 -flagi155=0 -tflag155=0 -initx155=0 -inity155=0 -minx155=0 -miny155=0 -maxx155=0 -maxy155=0 -posx155=0 -posy155=0 -sizx155=800 -sizy155=600 -maxfps155=0 -initts155=0 -title156=Nocturne -path156=D:\Games\Nocturne\nocturne.exe -module156= -opengllib156= -ver156=0 -coord156=0 -flag156=134217730 -flagg156=402653264 -flagh156=144 -flagi156=0 -tflag156=3 -initx156=0 -inity156=0 -minx156=0 -miny156=0 -maxx156=0 -maxy156=0 -posx156=50 -posy156=50 -sizx156=800 -sizy156=600 -maxfps156=0 -initts156=0 -title157=Nox -path157=d:\Games\Nox\Game.exe -module157= -opengllib157= -ver157=0 -coord157=0 -flag157=939540515 -flagg157=0 -flagh157=0 -flagi157=0 -tflag157=386 -initx157=0 -inity157=0 -minx157=0 -miny157=0 -maxx157=0 -maxy157=0 -posx157=50 -posy157=50 -sizx157=800 -sizy157=600 -maxfps157=0 -initts157=0 -title158=Pacific General -path158=C:\Games\Pacific General\PACGEN.EXE -module158= -opengllib158= -ver158=0 -coord158=0 -flag158=8226 -flagg158=0 -flagh158=0 -flagi158=0 -tflag158=2 -initx158=0 -inity158=0 -minx158=0 -miny158=0 -maxx158=0 -maxy158=0 -posx158=50 -posy158=50 -sizx158=800 -sizy158=600 -maxfps158=0 -initts158=0 -title159=Pandemonium 2 -path159=D:\Games\Pandemonium 2\pandy.exe -module159= -opengllib159= -ver159=0 -coord159=0 -flag159=201326594 -flagg159=1 -flagh159=20 -flagi159=0 -tflag159=0 -initx159=0 -inity159=0 -minx159=0 -miny159=0 -maxx159=0 -maxy159=0 -posx159=50 -posy159=50 -sizx159=800 -sizy159=600 -maxfps159=0 -initts159=0 -title160=Pharaoh -path160=D:\Games\Pharaoh\Pharaoh.exe -module160= -opengllib160= -ver160=0 -coord160=0 -flag160=1207959586 -flagg160=1048576 -flagh160=16 -flagi160=0 -tflag160=3 -initx160=0 -inity160=0 -minx160=0 -miny160=0 -maxx160=0 -maxy160=0 -posx160=50 -posy160=50 -sizx160=800 -sizy160=600 -maxfps160=0 -initts160=0 -title161=Postal -path161=D:\Games\Postal\POSTAL.EXE -module161= -opengllib161= -ver161=1 -coord161=0 -flag161=671352835 -flagg161=1114112 -flagh161=20 -flagi161=0 -tflag161=0 -initx161=0 -inity161=0 -minx161=0 -miny161=0 -maxx161=0 -maxy161=0 -posx161=50 -posy161=50 -sizx161=800 -sizy161=600 -maxfps161=0 -initts161=-3 -title162=Premier Manager 98 -path162=D:\Games\Premier Manager 98\MANAGER.EXE -module162= -opengllib162= -ver162=0 -coord162=0 -flag162=671088674 -flagg162=1207959552 -flagh162=16 -flagi162=0 -tflag162=0 -initx162=0 -inity162=0 -minx162=0 -miny162=0 -maxx162=0 -maxy162=0 -posx162=50 -posy162=50 -sizx162=800 -sizy162=600 -maxfps162=0 -initts162=0 -title163=Project Nomads Demo (BAD) -path163=C:\Games\Project Nomads Demo\bin\win32\nomads.exe -module163= -opengllib163= -ver163=8 -coord163=0 -flag163=-1476394912 -flagg163=256 -flagh163=0 -flagi163=0 -tflag163=258 -initx163=0 -inity163=0 -minx163=0 -miny163=0 -maxx163=0 -maxy163=0 -posx163=50 -posy163=50 -sizx163=800 -sizy163=600 -maxfps163=0 -initts163=0 -title164=Puzzle Bubble -path164=C:\Games\Puzzle Bubble\PB.EXE -module164= -opengllib164= -ver164=0 -coord164=0 -flag164=34 -flagg164=0 -flagh164=0 -flagi164=0 -tflag164=0 -initx164=0 -inity164=0 -minx164=0 -miny164=0 -maxx164=0 -maxy164=0 -posx164=50 -posy164=50 -sizx164=800 -sizy164=600 -maxfps164=0 -initts164=0 -title165=Quake 2 -path165=D:\Games\QUAKE2\quake2.exe -module165= -opengllib165= -ver165=10 -coord165=0 -flag165=671089154 -flagg165=671220289 -flagh165=16 -flagi165=0 -tflag165=258 -initx165=0 -inity165=0 -minx165=0 -miny165=0 -maxx165=0 -maxy165=0 -posx165=50 -posy165=50 -sizx165=800 -sizy165=600 -maxfps165=0 -initts165=0 -title166=Quake 3 Arena -path166=D:\Games\Q3A\quake3.exe -module166= -opengllib166= -ver166=0 -coord166=0 -flag166=536870914 -flagg166=1180161 -flagh166=16 -flagi166=0 -tflag166=3 -initx166=0 -inity166=0 -minx166=0 -miny166=0 -maxx166=0 -maxy166=0 -posx166=50 -posy166=50 -sizx166=800 -sizy166=600 -maxfps166=0 -initts166=0 -title167=Raiden II -path167=C:\Games\Raiden II\Raiden II\RAIDENII.EXE -module167= -opengllib167= -ver167=0 -coord167=0 -flag167=34 -flagg167=0 -flagh167=0 -flagi167=0 -tflag167=0 -initx167=0 -inity167=0 -minx167=0 -miny167=0 -maxx167=0 -maxy167=0 -posx167=50 -posy167=50 -sizx167=800 -sizy167=600 -maxfps167=0 -initts167=0 -title168=Railroad Tycoon II -path168=C:\Games\Railroad.Tycoon.II\RT2.EXE -module168= -opengllib168= -ver168=1 -coord168=0 -flag168=134225954 -flagg168=0 -flagh168=0 -flagi168=0 -tflag168=0 -initx168=0 -inity168=0 -minx168=0 -miny168=0 -maxx168=0 -maxy168=0 -posx168=50 -posy168=50 -sizx168=800 -sizy168=600 -maxfps168=0 -initts168=0 -title169=Rally Championship 2000 -path169=C:\Games\Rally Championship 2000\RAL.EXE -module169= -opengllib169= -ver169=0 -coord169=0 -flag169=67108864 -flagg169=0 -flagh169=0 -flagi169=0 -tflag169=2 -initx169=0 -inity169=0 -minx169=0 -miny169=0 -maxx169=0 -maxy169=0 -posx169=50 -posy169=50 -sizx169=800 -sizy169=600 -maxfps169=0 -initts169=0 -title170=Rebel Moon Rising -path170=C:\Games\Rebel Moon Rising\Rmr.exe -module170= -opengllib170= -ver170=0 -coord170=0 -flag170=0 -flagg170=0 -flagh170=0 -flagi170=0 -tflag170=0 -initx170=0 -inity170=0 -minx170=0 -miny170=0 -maxx170=0 -maxy170=0 -posx170=50 -posy170=50 -sizx170=800 -sizy170=600 -maxfps170=0 -initts170=0 -title171=Redline - Gang Warfare 2066 -path171=C:\Games\Redline - Gang Warfare 2066\redline.exe -module171= -opengllib171= -ver171=0 -coord171=0 -flag171=32 -flagg171=0 -flagh171=0 -flagi171=0 -tflag171=386 -initx171=0 -inity171=0 -minx171=0 -miny171=0 -maxx171=0 -maxy171=0 -posx171=50 -posy171=50 -sizx171=800 -sizy171=600 -maxfps171=0 -initts171=0 -title172=Resident Evil -path172=D:\Games\Resident Evil\residentevil.patched.exe -module172= -opengllib172= -ver172=1 -coord172=0 -flag172=134217827 -flagg172=128 -flagh172=16 -flagi172=0 -tflag172=2 -initx172=0 -inity172=0 -minx172=0 -miny172=0 -maxx172=0 -maxy172=0 -posx172=50 -posy172=50 -sizx172=800 -sizy172=600 -maxfps172=0 -initts172=0 -title173=Resurrection -path173=D:\Games\Resurrection Il Ritorno del Drago Nero\Resurrection.exe -module173= -opengllib173= -ver173=7 -coord173=0 -flag173=136314882 -flagg173=134217728 -flagh173=29 -flagi173=0 -tflag173=3 -initx173=0 -inity173=0 -minx173=0 -miny173=0 -maxx173=0 -maxy173=0 -posx173=50 -posy173=50 -sizx173=800 -sizy173=600 -maxfps173=0 -initts173=0 -title174=Return to Castle Wolfenstein -path174=D:\Games\Return to Castle Wolfenstein (2001)\Return to Castle Wolfenstein\WolfSP.exe -module174= -opengllib174= -ver174=0 -coord174=0 -flag174=134234114 -flagg174=-2147270656 -flagh174=0 -flagi174=0 -tflag174=256 -initx174=0 -inity174=0 -minx174=0 -miny174=0 -maxx174=0 -maxy174=0 -posx174=50 -posy174=50 -sizx174=800 -sizy174=600 -maxfps174=50 -initts174=-4 -title175=Re-Volt -path175=C:\Games\Re-Volt\REVOLT.EXE -module175= -opengllib175= -ver175=0 -coord175=0 -flag175=134217792 -flagg175=0 -flagh175=0 -flagi175=0 -tflag175=0 -initx175=0 -inity175=0 -minx175=0 -miny175=0 -maxx175=0 -maxy175=0 -posx175=50 -posy175=50 -sizx175=800 -sizy175=600 -maxfps175=0 -initts175=0 -title176=Road Rash -path176=D:\Games\Road Rash\ROADRASH\ROADRASH.EXE -module176= -opengllib176= -ver176=0 -coord176=0 -flag176=134217730 -flagg176=0 -flagh176=0 -flagi176=0 -tflag176=386 -initx176=0 -inity176=0 -minx176=0 -miny176=0 -maxx176=0 -maxy176=0 -posx176=50 -posy176=50 -sizx176=800 -sizy176=600 -maxfps176=0 -initts176=0 -title177=Road Rash Demo -path177=D:\Games\RoadRash DEMO\DEMORASH.EXE -module177= -opengllib177= -ver177=0 -coord177=0 -flag177=134218242 -flagg177=0 -flagh177=0 -flagi177=0 -tflag177=258 -initx177=0 -inity177=0 -minx177=0 -miny177=0 -maxx177=0 -maxy177=0 -posx177=50 -posy177=50 -sizx177=800 -sizy177=600 -maxfps177=0 -initts177=0 -title178=Rogue Spear (BAD) -path178=D:\Games\Rogue Spear\RogueSpear.exe -module178= -opengllib178= -ver178=1 -coord178=0 -flag178=134234116 -flagg178=134217984 -flagh178=20 -flagi178=0 -tflag178=2 -initx178=0 -inity178=0 -minx178=0 -miny178=0 -maxx178=0 -maxy178=0 -posx178=50 -posy178=50 -sizx178=800 -sizy178=600 -maxfps178=0 -initts178=0 -title179=Rollcage -path179=D:\Games\Rollcage\Direct3D\Rollcage.exe -module179= -opengllib179= -ver179=0 -coord179=1 -flag179=520093712 -flagg179=135331840 -flagh179=20 -flagi179=0 -tflag179=3 -initx179=0 -inity179=0 -minx179=0 -miny179=0 -maxx179=0 -maxy179=0 -posx179=50 -posy179=50 -sizx179=800 -sizy179=600 -maxfps179=0 -initts179=0 -title180=RollerCoaster Tycoon 2 Mini Game -path180=C:\Games\RollerCoaster Tycoon 2 Mini Game\rct2.exe -module180= -opengllib180= -ver180=1 -coord180=0 -flag180=536870946 -flagg180=0 -flagh180=0 -flagi180=0 -tflag180=0 -initx180=0 -inity180=0 -minx180=0 -miny180=0 -maxx180=0 -maxy180=0 -posx180=0 -posy180=0 -sizx180=800 -sizy180=600 -maxfps180=0 -initts180=0 -title181=Sega Rally 2 Championship -path181=C:\Games\Sega Rally 2 Championship\SEGA RALLY 2.exe -module181= -opengllib181= -ver181=1 -coord181=0 -flag181=268435488 -flagg181=2 -flagh181=0 -flagi181=0 -tflag181=0 -initx181=0 -inity181=0 -minx181=0 -miny181=0 -maxx181=0 -maxy181=0 -posx181=0 -posy181=0 -sizx181=800 -sizy181=600 -maxfps181=0 -initts181=0 -title182=Sentinel Returns -path182=D:\Games\Sentinel Returns\Sentinel.exe -module182= -opengllib182= -ver182=1 -coord182=0 -flag182=3 -flagg182=-2147483648 -flagh182=0 -flagi182=0 -tflag182=0 -initx182=0 -inity182=0 -minx182=0 -miny182=0 -maxx182=0 -maxy182=0 -posx182=50 -posy182=50 -sizx182=800 -sizy182=600 -maxfps182=0 -initts182=0 -title183=Shadow Master (TBD) -path183=C:\Games\Shadow Master\rmg.exe -module183= -opengllib183= -ver183=1 -coord183=0 -flag183=32 -flagg183=256 -flagh183=0 -flagi183=0 -tflag183=450 -initx183=0 -inity183=0 -minx183=0 -miny183=0 -maxx183=0 -maxy183=0 -posx183=50 -posy183=50 -sizx183=800 -sizy183=600 -maxfps183=0 -initts183=0 -title184=Sid Meier's SimGolf Demo -path184=C:\Games\Sid Meier's SimGolf Demo\golf.exe -module184=jgl.dll -opengllib184= -ver184=0 -coord184=0 -flag184=33554434 -flagg184=0 -flagh184=0 -flagi184=0 -tflag184=2 -initx184=0 -inity184=0 -minx184=0 -miny184=0 -maxx184=0 -maxy184=0 -posx184=50 -posy184=50 -sizx184=800 -sizy184=600 -maxfps184=0 -initts184=0 -title185=Silent Storm Demo -path185=D:\Games\Silent Storm Demo\SilentStormDemo.exe -module185= -opengllib185= -ver185=0 -coord185=0 -flag185=536870913 -flagg185=-2013265664 -flagh185=0 -flagi185=0 -tflag185=2 -initx185=0 -inity185=0 -minx185=0 -miny185=0 -maxx185=0 -maxy185=0 -posx185=50 -posy185=50 -sizx185=800 -sizy185=600 -maxfps185=0 -initts185=0 -title186=Sin, Wages of (sw renderer) -path186=D:\Games\sin\sin.exe -module186= -opengllib186= -ver186=10 -coord186=0 -flag186=402670082 -flagg186=131585 -flagh186=20 -flagi186=0 -tflag186=386 -initx186=0 -inity186=0 -minx186=0 -miny186=0 -maxx186=0 -maxy186=0 -posx186=50 -posy186=50 -sizx186=800 -sizy186=600 -maxfps186=0 -initts186=0 -title187=SleepWalker -path187=C:\Games\SleepWalker\Sleepy.exe -module187= -opengllib187= -ver187=0 -coord187=0 -flag187=301989954 -flagg187=0 -flagh187=0 -flagi187=0 -tflag187=198 -initx187=0 -inity187=0 -minx187=0 -miny187=0 -maxx187=0 -maxy187=0 -posx187=50 -posy187=50 -sizx187=800 -sizy187=600 -maxfps187=0 -initts187=0 -title188=SnowBoard Racer -path188=C:\Games\Snowboard Racer\SnowBoard.exe -module188= -opengllib188= -ver188=0 -coord188=0 -flag188=268443681 -flagg188=0 -flagh188=0 -flagi188=0 -tflag188=0 -initx188=0 -inity188=0 -minx188=0 -miny188=0 -maxx188=0 -maxy188=0 -posx188=50 -posy188=50 -sizx188=800 -sizy188=600 -maxfps188=0 -initts188=0 -title189=Solaris (~BAD) -path189=c:\Games\Solaris\solaris.exe -module189= -opengllib189= -ver189=7 -coord189=0 -flag189=973078627 -flagg189=1 -flagh189=0 -flagi189=0 -tflag189=2 -initx189=0 -inity189=0 -minx189=0 -miny189=0 -maxx189=0 -maxy189=0 -posx189=50 -posy189=50 -sizx189=800 -sizy189=600 -maxfps189=0 -initts189=0 -title190=Soldiers at War -path190=D:\Games\Soldiers at War\SAW_Game.exe -module190= -opengllib190= -ver190=0 -coord190=0 -flag190=671359010 -flagg190=64 -flagh190=0 -flagi190=0 -tflag190=0 -initx190=0 -inity190=0 -minx190=0 -miny190=0 -maxx190=0 -maxy190=0 -posx190=50 -posy190=50 -sizx190=640 -sizy190=480 -maxfps190=0 -initts190=0 -title191=Sonic 3 -path191=C:\Games\Sonic 3 + Sonic et Knuckles\Sonic 3\SONIC3K.EXE -module191= -opengllib191= -ver191=1 -coord191=0 -flag191=546 -flagg191=0 -flagh191=0 -flagi191=0 -tflag191=0 -initx191=0 -inity191=0 -minx191=0 -miny191=0 -maxx191=0 -maxy191=0 -posx191=50 -posy191=50 -sizx191=800 -sizy191=600 -maxfps191=0 -initts191=0 -title192=Sonic 3D Blast -path192=C:\Games\Sonic3D\pcsonic.exe -module192= -opengllib192= -ver192=0 -coord192=0 -flag192=134217762 -flagg192=0 -flagh192=0 -flagi192=0 -tflag192=0 -initx192=0 -inity192=0 -minx192=0 -miny192=0 -maxx192=0 -maxy192=0 -posx192=50 -posy192=50 -sizx192=800 -sizy192=600 -maxfps192=0 -initts192=0 -title193=Sonic R -path193=C:\Games\SonicR\sonicr.exe -module193= -opengllib193= -ver193=0 -coord193=0 -flag193=8288 -flagg193=0 -flagh193=0 -flagi193=0 -tflag193=0 -initx193=0 -inity193=0 -minx193=0 -miny193=0 -maxx193=0 -maxy193=0 -posx193=50 -posy193=50 -sizx193=800 -sizy193=600 -maxfps193=0 -initts193=0 -title194=Soulbringer -path194=C:\Games\SoulBringer\SoulbringeVCnoeax.exe -module194= -opengllib194= -ver194=0 -coord194=0 -flag194=143024174 -flagg194=0 -flagh194=0 -flagi194=0 -tflag194=0 -initx194=0 -inity194=0 -minx194=0 -miny194=0 -maxx194=0 -maxy194=0 -posx194=50 -posy194=50 -sizx194=800 -sizy194=600 -maxfps194=0 -initts194=0 -title195=Speedboat Attack (BAD) -path195=C:\Games\Speedboat Attack\SBOAT.EXE -module195= -opengllib195= -ver195=0 -coord195=0 -flag195=541073954 -flagg195=0 -flagh195=0 -flagi195=0 -tflag195=2 -initx195=0 -inity195=0 -minx195=0 -miny195=0 -maxx195=0 -maxy195=0 -posx195=50 -posy195=50 -sizx195=800 -sizy195=600 -maxfps195=0 -initts195=0 -title196=Star trek Klingon Honor Guard -path196=D:\Games\Star trek Klingon Honor Guard\System\Khg.exe -module196=OGIDrv.dll -opengllib196= -ver196=10 -coord196=0 -flag196=0 -flagg196=537002497 -flagh196=16 -flagi196=0 -tflag196=386 -initx196=0 -inity196=0 -minx196=0 -miny196=0 -maxx196=0 -maxy196=0 -posx196=50 -posy196=50 -sizx196=800 -sizy196=600 -maxfps196=0 -initts196=0 -title197=Star Wars Episode 1 Racer -path197=C:\Games\sw racer\SWEP1RCR.EXE -module197= -opengllib197= -ver197=0 -coord197=0 -flag197=142606368 -flagg197=0 -flagh197=0 -flagi197=0 -tflag197=0 -initx197=0 -inity197=0 -minx197=0 -miny197=0 -maxx197=0 -maxy197=0 -posx197=50 -posy197=50 -sizx197=800 -sizy197=600 -maxfps197=0 -initts197=0 -title198=Star Wars Jedi Knight Jedi Academy -path198=D:\Games\Star_Wars_Jedi_Knight_Jedi_Academy\GameData\jasp.exe -module198= -opengllib198= -ver198=0 -coord198=0 -flag198=2 -flagg198=196608 -flagh198=20 -flagi198=0 -tflag198=2 -initx198=0 -inity198=0 -minx198=0 -miny198=0 -maxx198=0 -maxy198=0 -posx198=50 -posy198=50 -sizx198=800 -sizy198=600 -maxfps198=0 -initts198=0 -title199=Star Wars: Jedi Knight -path199=C:\Games\Jedi Knight\Jedi Knight\JK.EXE -module199= -opengllib199= -ver199=0 -coord199=0 -flag199=8226 -flagg199=0 -flagh199=0 -flagi199=0 -tflag199=0 -initx199=0 -inity199=0 -minx199=0 -miny199=0 -maxx199=0 -maxy199=0 -posx199=50 -posy199=50 -sizx199=800 -sizy199=600 -maxfps199=0 -initts199=0 -title200=Star Wars: the Gungan Frontier -path200=C:\Games\sw the gungan frontier\Gungan Frontier.exe -module200= -opengllib200= -ver200=1 -coord200=0 -flag200=402915362 -flagg200=512 -flagh200=0 -flagi200=0 -tflag200=0 -initx200=0 -inity200=0 -minx200=0 -miny200=0 -maxx200=0 -maxy200=0 -posx200=0 -posy200=0 -sizx200=800 -sizy200=600 -maxfps200=0 -initts200=0 -title201=Starcraft -path201=D:\Games\Starcraft\StarCraft.exe -module201= -opengllib201= -ver201=0 -coord201=1 -flag201=134234115 -flagg201=2179088 -flagh201=48 -flagi201=0 -tflag201=258 -initx201=0 -inity201=0 -minx201=0 -miny201=0 -maxx201=0 -maxy201=0 -posx201=50 -posy201=50 -sizx201=800 -sizy201=600 -maxfps201=0 -initts201=0 -title202=Starship Troopers -path202=C:\Games\Starship Troopers - Terran Ascendancy\stta\StarshipTroopers.exe -module202= -opengllib202= -ver202=1 -coord202=0 -flag202=32 -flagg202=0 -flagh202=0 -flagi202=0 -tflag202=0 -initx202=0 -inity202=0 -minx202=0 -miny202=0 -maxx202=0 -maxy202=0 -posx202=50 -posy202=50 -sizx202=800 -sizy202=600 -maxfps202=0 -initts202=0 -title203=Starshot Space Circus -path203=D:\SpaceCircus.exe -module203= -opengllib203= -ver203=0 -coord203=0 -flag203=66 -flagg203=0 -flagh203=0 -flagi203=0 -tflag203=0 -initx203=0 -inity203=0 -minx203=0 -miny203=0 -maxx203=0 -maxy203=0 -posx203=50 -posy203=50 -sizx203=800 -sizy203=600 -maxfps203=0 -initts203=0 -title204=Stronghold Demo -path204=C:\Games\Firefly Studios' Stronghold - Demo\Stronghold Demo.exe -module204= -opengllib204= -ver204=0 -coord204=0 -flag204=98 -flagg204=0 -flagh204=0 -flagi204=0 -tflag204=0 -initx204=0 -inity204=0 -minx204=0 -miny204=0 -maxx204=0 -maxy204=0 -posx204=50 -posy204=50 -sizx204=800 -sizy204=600 -maxfps204=0 -initts204=0 -title205=Sub Culture -path205=C:\Games\Sub Culture\sc.exe -module205= -opengllib205= -ver205=0 -coord205=0 -flag205=66 -flagg205=256 -flagh205=0 -flagi205=0 -tflag205=10 -initx205=50 -inity205=50 -minx205=50 -miny205=50 -maxx205=800 -maxy205=600 -posx205=50 -posy205=50 -sizx205=800 -sizy205=600 -maxfps205=0 -initts205=0 -title206=Superbike 2001 -path206=C:\Games\Superbike 2001\Sbk2001.exe -module206= -opengllib206= -ver206=1 -coord206=0 -flag206=536887332 -flagg206=0 -flagh206=0 -flagi206=0 -tflag206=0 -initx206=0 -inity206=0 -minx206=0 -miny206=0 -maxx206=0 -maxy206=0 -posx206=50 -posy206=50 -sizx206=800 -sizy206=600 -maxfps206=0 -initts206=0 -title207=Syberia 2 Demo -path207=C:\Games\Syberia 2 Demo\Syberia2Demo.exe -module207= -opengllib207= -ver207=8 -coord207=0 -flag207=536887332 -flagg207=0 -flagh207=0 -flagi207=0 -tflag207=0 -initx207=0 -inity207=0 -minx207=0 -miny207=0 -maxx207=0 -maxy207=0 -posx207=50 -posy207=50 -sizx207=800 -sizy207=600 -maxfps207=0 -initts207=0 -title208=Syberia Demo -path208=C:\Games\SyberiaDemo\SyberiaDemo.exe -module208= -opengllib208= -ver208=1 -coord208=0 -flag208=536887332 -flagg208=0 -flagh208=0 -flagi208=0 -tflag208=0 -initx208=0 -inity208=0 -minx208=0 -miny208=0 -maxx208=0 -maxy208=0 -posx208=50 -posy208=50 -sizx208=800 -sizy208=600 -maxfps208=0 -initts208=0 -title209=System Shock 2 (BAD!!!) -path209=C:\Games\Sys Shock II\Shock2.exe -module209= -opengllib209= -ver209=1 -coord209=0 -flag209=0 -flagg209=64 -flagh209=0 -flagi209=0 -tflag209=0 -initx209=0 -inity209=0 -minx209=0 -miny209=0 -maxx209=0 -maxy209=0 -posx209=50 -posy209=50 -sizx209=800 -sizy209=600 -maxfps209=0 -initts209=0 -title210=Take no Prisoners -path210=D:\Games\Take no Prisoners\TNP.EXE -module210= -opengllib210= -ver210=0 -coord210=0 -flag210=134217730 -flagg210=16777248 -flagh210=20 -flagi210=0 -tflag210=0 -initx210=0 -inity210=0 -minx210=0 -miny210=0 -maxx210=0 -maxy210=0 -posx210=50 -posy210=50 -sizx210=800 -sizy210=600 -maxfps210=0 -initts210=0 -title211=Test Drive 4 -path211=D:\Games\Test Drive 4\td4.EXE -module211= -opengllib211= -ver211=0 -coord211=0 -flag211=-2013265885 -flagg211=-2147418110 -flagh211=20 -flagi211=0 -tflag211=0 -initx211=0 -inity211=0 -minx211=0 -miny211=0 -maxx211=0 -maxy211=0 -posx211=50 -posy211=50 -sizx211=800 -sizy211=600 -maxfps211=0 -initts211=-8 -title212=Test Drive 5 (D3D) -path212=D:\Games\Test Drive 5\TD5_D3D.exe -module212= -opengllib212= -ver212=0 -coord212=0 -flag212=671088640 -flagg212=0 -flagh212=20 -flagi212=0 -tflag212=258 -initx212=0 -inity212=0 -minx212=0 -miny212=0 -maxx212=0 -maxy212=0 -posx212=50 -posy212=50 -sizx212=800 -sizy212=600 -maxfps212=0 -initts212=0 -title213=The Nations Demo -path213=C:\Games\The Nations Demo\bin\Game.exe -module213= -opengllib213= -ver213=1 -coord213=0 -flag213=402661920 -flagg213=256 -flagh213=0 -flagi213=0 -tflag213=0 -initx213=0 -inity213=0 -minx213=0 -miny213=0 -maxx213=0 -maxy213=0 -posx213=50 -posy213=50 -sizx213=800 -sizy213=600 -maxfps213=0 -initts213=0 -title214=The Sims -path214=D:\Games\sims\Sims.exe -module214= -opengllib214= -ver214=0 -coord214=0 -flag214=134225952 -flagg214=65536 -flagh214=16 -flagi214=0 -tflag214=3 -initx214=0 -inity214=0 -minx214=0 -miny214=0 -maxx214=0 -maxy214=0 -posx214=50 -posy214=50 -sizx214=800 -sizy214=600 -maxfps214=0 -initts214=0 -title215=Thief the Dark Project (FRE) -path215=C:\Games\thief\game\thieffixed.exe -module215= -opengllib215= -ver215=1 -coord215=0 -flag215=16390 -flagg215=0 -flagh215=0 -flagi215=0 -tflag215=0 -initx215=0 -inity215=0 -minx215=0 -miny215=0 -maxx215=0 -maxy215=0 -posx215=50 -posy215=50 -sizx215=800 -sizy215=600 -maxfps215=0 -initts215=0 -title216=TinTin: Prisoners of the Sun -path216=C:\Games\tintin\TINTINW.EXE -module216= -opengllib216= -ver216=0 -coord216=0 -flag216=34 -flagg216=0 -flagh216=0 -flagi216=0 -tflag216=2 -initx216=0 -inity216=0 -minx216=0 -miny216=0 -maxx216=0 -maxy216=0 -posx216=50 -posy216=50 -sizx216=800 -sizy216=600 -maxfps216=0 -initts216=0 -title217=Tintoy (BAD gfx) -path217=C:\Games\Tintoy\Tintoy.exe -module217= -opengllib217= -ver217=0 -coord217=0 -flag217=546 -flagg217=256 -flagh217=0 -flagi217=0 -tflag217=258 -initx217=0 -inity217=0 -minx217=0 -miny217=0 -maxx217=0 -maxy217=0 -posx217=50 -posy217=50 -sizx217=800 -sizy217=600 -maxfps217=0 -initts217=0 -title218=Tomb Raider - Anniversary -path218=C:\Games\Tomb Raider - Anniversary\tra.exe -module218= -opengllib218= -ver218=9 -coord218=0 -flag218=0 -flagg218=256 -flagh218=0 -flagi218=0 -tflag218=2 -initx218=0 -inity218=0 -minx218=0 -miny218=0 -maxx218=0 -maxy218=0 -posx218=50 -posy218=50 -sizx218=800 -sizy218=600 -maxfps218=0 -initts218=8 -title219=Tomb Raider 2 the Golden Mask -path219=D:\Games\TR2 Golden Mask\T2GOLD.EXE -module219= -opengllib219= -ver219=0 -coord219=0 -flag219=704643106 -flagg219=554713088 -flagh219=20 -flagi219=0 -tflag219=0 -initx219=0 -inity219=0 -minx219=0 -miny219=0 -maxx219=0 -maxy219=0 -posx219=50 -posy219=50 -sizx219=800 -sizy219=600 -maxfps219=0 -initts219=8 -title220=Tomb Raider 3 Demo -path220=C:\Games\Tomb Raider 3 - The Lost Artifact Demo\tr3gold.exe -module220= -opengllib220= -ver220=1 -coord220=0 -flag220=369098848 -flagg220=0 -flagh220=0 -flagi220=0 -tflag220=258 -initx220=0 -inity220=0 -minx220=0 -miny220=0 -maxx220=0 -maxy220=0 -posx220=50 -posy220=50 -sizx220=800 -sizy220=600 -maxfps220=0 -initts220=0 -title221=Tomb Raider 4 Demo -path221=C:\Games\Tomb Raider 4 - The Last Revelation (Demo)\tomb4.patched.exe -module221= -opengllib221= -ver221=0 -coord221=0 -flag221=234881056 -flagg221=16 -flagh221=0 -flagi221=0 -tflag221=258 -initx221=0 -inity221=0 -minx221=0 -miny221=0 -maxx221=0 -maxy221=0 -posx221=50 -posy221=50 -sizx221=800 -sizy221=600 -maxfps221=0 -initts221=0 -title222=Total Annihilation Kingdoms -path222=D:\Games\Total Annihilation Kingdoms\Kingdoms.exe -module222= -opengllib222= -ver222=0 -coord222=0 -flag222=134234146 -flagg222=1073741840 -flagh222=16 -flagi222=0 -tflag222=0 -initx222=0 -inity222=0 -minx222=0 -miny222=0 -maxx222=0 -maxy222=0 -posx222=50 -posy222=50 -sizx222=800 -sizy222=600 -maxfps222=0 -initts222=0 -title223=Total Soccer 2000 -path223=D:\Games\Total Soccer 2000\Total Soccer 2000\SOCCERdx.EXE -module223= -opengllib223= -ver223=1 -coord223=0 -flag223=167772226 -flagg223=1069056 -flagh223=20 -flagi223=0 -tflag223=0 -initx223=0 -inity223=0 -minx223=0 -miny223=0 -maxx223=0 -maxy223=0 -posx223=50 -posy223=50 -sizx223=800 -sizy223=600 -maxfps223=200 -initts223=0 -title224=Ultim@te Race Pro -path224=C:\Games\Ultim@te race pro\Ultim@te Race Pro.exe -module224= -opengllib224= -ver224=0 -coord224=0 -flag224=570425440 -flagg224=256 -flagh224=0 -flagi224=0 -tflag224=0 -initx224=0 -inity224=0 -minx224=0 -miny224=0 -maxx224=0 -maxy224=0 -posx224=50 -posy224=50 -sizx224=800 -sizy224=600 -maxfps224=0 -initts224=0 -title225=Uprising - Join or Die -path225=D:\Games\Uprising\uprising.exe -module225= -opengllib225= -ver225=0 -coord225=0 -flag225=-2013265882 -flagg225=18 -flagh225=16 -flagi225=0 -tflag225=0 -initx225=0 -inity225=0 -minx225=0 -miny225=0 -maxx225=0 -maxy225=0 -posx225=50 -posy225=50 -sizx225=800 -sizy225=600 -maxfps225=0 -initts225=0 -title226=Urban Assault -path226=D:\Games\Urban Assault\UA.EXE -module226= -opengllib226= -ver226=0 -coord226=0 -flag226=671236130 -flagg226=256 -flagh226=16 -flagi226=0 -tflag226=258 -initx226=0 -inity226=0 -minx226=0 -miny226=0 -maxx226=0 -maxy226=0 -posx226=50 -posy226=50 -sizx226=800 -sizy226=600 -maxfps226=0 -initts226=0 -title227=Urban Assault CD -path227=D:\Games\Urban Assault CD\UA.EXE -module227= -opengllib227= -ver227=0 -coord227=0 -flag227=671236130 -flagg227=33024 -flagh227=0 -flagi227=0 -tflag227=258 -initx227=0 -inity227=0 -minx227=0 -miny227=0 -maxx227=0 -maxy227=0 -posx227=50 -posy227=50 -sizx227=800 -sizy227=600 -maxfps227=0 -initts227=0 -title228=wa[cracked].exe -path228=D:\Games\Worms 2 Armageddon\wa[cracked].exe -module228= -opengllib228= -ver228=0 -coord228=0 -flag228=134217730 -flagg228=171966464 -flagh228=16 -flagi228=0 -tflag228=0 -initx228=0 -inity228=0 -minx228=0 -miny228=0 -maxx228=0 -maxy228=0 -posx228=50 -posy228=50 -sizx228=800 -sizy228=600 -maxfps228=0 -initts228=0 -title229=Warcraft 2 Battlenet Edition -path229=D:\Games\Warcraft 2\Warcraft II BNE.exe -module229= -opengllib229= -ver229=0 -coord229=0 -flag229=268452003 -flagg229=16 -flagh229=16 -flagi229=0 -tflag229=258 -initx229=0 -inity229=0 -minx229=0 -miny229=0 -maxx229=0 -maxy229=0 -posx229=50 -posy229=50 -sizx229=800 -sizy229=600 -maxfps229=40 -initts229=0 -title230=Wargames (demo) -path230=D:\Games\Wargames\wargames.exe -module230= -opengllib230= -ver230=0 -coord230=0 -flag230=268435618 -flagg230=1207959552 -flagh230=20 -flagi230=0 -tflag230=3 -initx230=0 -inity230=0 -minx230=0 -miny230=0 -maxx230=0 -maxy230=0 -posx230=50 -posy230=50 -sizx230=800 -sizy230=600 -maxfps230=0 -initts230=0 -title231=Warhammer 40K Final Liberation -path231=D:\Games\Warhammer 40K Final Liberation\EPIC40K.EXE -module231= -opengllib231= -ver231=1 -coord231=0 -flag231=134479874 -flagg231=135266304 -flagh231=31 -flagi231=0 -tflag231=0 -initx231=0 -inity231=0 -minx231=0 -miny231=0 -maxx231=0 -maxy231=0 -posx231=50 -posy231=50 -sizx231=800 -sizy231=600 -maxfps231=0 -initts231=0 -title232=WarHammer Rites of War -path232=C:\Games\Rites of War\RoW.exe -module232= -opengllib232= -ver232=0 -coord232=0 -flag232=134217760 -flagg232=128 -flagh232=0 -flagi232=0 -tflag232=0 -initx232=0 -inity232=0 -minx232=0 -miny232=0 -maxx232=0 -maxy232=0 -posx232=50 -posy232=50 -sizx232=800 -sizy232=600 -maxfps232=0 -initts232=0 -title233=Warlords 3 -path233=D:\Games\WARLORDS3\Darklord.exe -module233= -opengllib233= -ver233=0 -coord233=0 -flag233=-2147483102 -flagg233=268435488 -flagh233=532 -flagi233=0 -tflag233=259 -initx233=0 -inity233=0 -minx233=0 -miny233=0 -maxx233=0 -maxy233=0 -posx233=50 -posy233=50 -sizx233=0 -sizy233=0 -maxfps233=0 -initts233=0 -title234=WarTorn -path234=C:\Games\WarTorn\W.exe -module234= -opengllib234= -ver234=0 -coord234=0 -flag234=32 -flagg234=0 -flagh234=0 -flagi234=0 -tflag234=0 -initx234=0 -inity234=0 -minx234=0 -miny234=0 -maxx234=0 -maxy234=0 -posx234=50 -posy234=50 -sizx234=800 -sizy234=600 -maxfps234=0 -initts234=0 -title235=WarWind -path235=C:\Games\WarWind\WW.EXE -module235= -opengllib235= -ver235=0 -coord235=0 -flag235=16418 -flagg235=81936 -flagh235=0 -flagi235=0 -tflag235=0 -initx235=0 -inity235=0 -minx235=0 -miny235=0 -maxx235=0 -maxy235=0 -posx235=50 -posy235=50 -sizx235=800 -sizy235=600 -maxfps235=0 -initts235=0 -title236=Worms Armageddon Demo (BAD!!!) -path236=C:\Games\Worms Armageddon Demo\WaDemo.exe -module236= -opengllib236= -ver236=1 -coord236=0 -flag236=939524099 -flagg236=8 -flagh236=0 -flagi236=0 -tflag236=2 -initx236=0 -inity236=0 -minx236=0 -miny236=0 -maxx236=0 -maxy236=0 -posx236=0 -posy236=0 -sizx236=0 -sizy236=0 -maxfps236=0 -initts236=0 -title237=Worms World Party -path237=D:\Games\Worms World Party\wwp.exe -module237= -opengllib237= -ver237=1 -coord237=0 -flag237=8388610 -flagg237=0 -flagh237=0 -flagi237=0 -tflag237=0 -initx237=0 -inity237=0 -minx237=0 -miny237=0 -maxx237=0 -maxy237=0 -posx237=50 -posy237=50 -sizx237=800 -sizy237=600 -maxfps237=0 -initts237=0 -title238=Worms World Party Demo (BAD) -path238=C:\Games\WWP Demo\wwp.exe -module238=MFC42.DLL ltkrn10N.dll -opengllib238= -ver238=1 -coord238=0 -flag238=406847491 -flagg238=8 -flagh238=0 -flagi238=0 -tflag238=2 -initx238=0 -inity238=0 -minx238=0 -miny238=0 -maxx238=0 -maxy238=0 -posx238=0 -posy238=0 -sizx238=0 -sizy238=0 -maxfps238=0 -initts238=0 -title239=X-Com Enforcer -path239=C:\Games\X-Com Enforcer\System\xcom.exe -module239= -opengllib239= -ver239=1 -coord239=0 -flag239=32 -flagg239=0 -flagh239=0 -flagi239=0 -tflag239=0 -initx239=0 -inity239=0 -minx239=0 -miny239=0 -maxx239=0 -maxy239=0 -posx239=0 -posy239=0 -sizx239=800 -sizy239=600 -maxfps239=0 -initts239=0 -title240=X-Com Interceptor -path240=C:\Games\X-Com_Interceptor\X-COM Interceptor\Interceptor.exe -module240= -opengllib240= -ver240=0 -coord240=0 -flag240=16418 -flagg240=0 -flagh240=0 -flagi240=0 -tflag240=0 -initx240=0 -inity240=0 -minx240=0 -miny240=0 -maxx240=0 -maxy240=0 -posx240=50 -posy240=50 -sizx240=800 -sizy240=600 -maxfps240=0 -initts240=0 -title241=Z Steel Soldiers -path241=C:\Games\ZSteelSoldiers\Bin\z2.exe -module241= -opengllib241= -ver241=8 -coord241=0 -flag241=805462020 -flagg241=0 -flagh241=0 -flagi241=0 -tflag241=0 -initx241=0 -inity241=0 -minx241=0 -miny241=0 -maxx241=0 -maxy241=0 -posx241=50 -posy241=50 -sizx241=800 -sizy241=600 -maxfps241=0 -initts241=0 -title242=Zax Alien Hunter -path242=C:\Games\ZaxDemo\Zax.exe -module242= -opengllib242= -ver242=0 -coord242=0 -flag242=-1476386784 -flagg242=0 -flagh242=0 -flagi242=0 -tflag242=0 -initx242=0 -inity242=0 -minx242=0 -miny242=0 -maxx242=0 -maxy242=0 -posx242=50 -posy242=50 -sizx242=800 -sizy242=600 -maxfps242=0 -initts242=0 -title243=Zero Critical (BAD) -path243=C:\Games\zero_critical_-_satin_rift\ZEROCR.EXE -module243= -opengllib243= -ver243=0 -coord243=0 -flag243=679477858 -flagg243=8 -flagh243=0 -flagi243=0 -tflag243=0 -initx243=0 -inity243=0 -minx243=0 -miny243=0 -maxx243=0 -maxy243=0 -posx243=0 -posy243=0 -sizx243=800 -sizy243=600 -maxfps243=0 -initts243=0 -title244=Zero Population Count -path244=C:\Games\ZPC\ZPC.EXE -module244= -opengllib244= -ver244=0 -coord244=0 -flag244=1073741859 -flagg244=0 -flagh244=0 -flagi244=0 -tflag244=0 -initx244=0 -inity244=0 -minx244=0 -miny244=0 -maxx244=0 -maxy244=0 -posx244=0 -posy244=0 -sizx244=800 -sizy244=600 -maxfps244=0 -initts244=0 -title245=Zero Zone -path245=D:\ZZone\ZeroZone.exe -module245= -opengllib245= -ver245=0 -coord245=0 -flag245=34 -flagg245=0 -flagh245=0 -flagi245=0 -tflag245=0 -initx245=0 -inity245=0 -minx245=0 -miny245=0 -maxx245=0 -maxy245=0 -posx245=50 -posy245=50 -sizx245=800 -sizy245=600 -maxfps245=0 -initts245=0 -title246=Zeus Poseidon -path246=C:\Games\Zeus-Poseidon\Zeus.exe -module246= -opengllib246= -ver246=0 -coord246=0 -flag246=34 -flagg246=0 -flagh246=0 -flagi246=0 -tflag246=0 -initx246=0 -inity246=0 -minx246=0 -miny246=0 -maxx246=0 -maxy246=0 -posx246=50 -posy246=50 -sizx246=800 -sizy246=600 -maxfps246=0 -initts246=0 -title247=Zoo Tycoon -path247=C:\Games\Zoo Tycoon\zoo.exe -module247= -opengllib247= -ver247=0 -coord247=0 -flag247=-2013265886 -flagg247=0 -flagh247=0 -flagi247=0 -tflag247=0 -initx247=0 -inity247=0 -minx247=0 -miny247=0 -maxx247=0 -maxy247=0 -posx247=50 -posy247=50 -sizx247=800 -sizy247=600 -maxfps247=0 -initts247=0 -title248=Mortal Kombat 4 -path248=D:\Games\mk4\Mortal Kombat 4.exe -module248= -opengllib248= -ver248=0 -coord248=0 -flag248=536879107 -flagg248=135266308 -flagh248=276 -flagi248=0 -tflag248=3 -initx248=0 -inity248=0 -minx248=0 -miny248=0 -maxx248=0 -maxy248=0 -posx248=50 -posy248=50 -sizx248=800 -sizy248=600 -maxfps248=0 -initts248=0 -title249=Railroad Tycoon II -path249=D:\Games\Railroad.Tycoon.II\RT2.EXE -module249= -opengllib249= -ver249=0 -coord249=0 -flag249=2080 -flagg249=143654912 -flagh249=16 -flagi249=0 -tflag249=0 -initx249=0 -inity249=0 -minx249=0 -miny249=0 -maxx249=0 -maxy249=0 -posx249=50 -posy249=50 -sizx249=800 -sizy249=600 -maxfps249=0 -initts249=0 -title250=Space Hack -path250=D:\Games\Space Hack\main.exe -module250= -opengllib250= -ver250=0 -coord250=0 -flag250=134234144 -flagg250=134217728 -flagh250=20 -flagi250=0 -tflag250=3 -initx250=0 -inity250=0 -minx250=0 -miny250=0 -maxx250=0 -maxy250=0 -posx250=50 -posy250=50 -sizx250=800 -sizy250=600 -maxfps250=0 -initts250=0 -title251=Abomination - The Nemesis Project Demo -path251=D:\Games\Abomination - The Nemesis Project Demo\Abomb.exe -module251= -opengllib251= -ver251=0 -coord251=0 -flag251=134217826 -flagg251=134217728 -flagh251=20 -flagi251=0 -tflag251=64 -initx251=0 -inity251=0 -minx251=0 -miny251=0 -maxx251=0 -maxy251=0 -posx251=50 -posy251=50 -sizx251=800 -sizy251=600 -maxfps251=0 -initts251=0 -title252=Alien Nations DEMO -path252=D:\Games\Amazon & Aliens DEMO\Bin\AA.exe -module252= -opengllib252= -ver252=0 -coord252=0 -flag252=1207959654 -flagg252=135266306 -flagh252=20 -flagi252=0 -tflag252=259 -initx252=0 -inity252=0 -minx252=0 -miny252=0 -maxx252=0 -maxy252=0 -posx252=50 -posy252=50 -sizx252=800 -sizy252=600 -maxfps252=0 -initts252=0 -title253=Duckman -path253=D:\Games\duckman\DUCKMAN.EXE -module253= -opengllib253= -ver253=0 -coord253=0 -flag253=402653186 -flagg253=201326592 -flagh253=20 -flagi253=0 -tflag253=259 -initx253=0 -inity253=0 -minx253=0 -miny253=0 -maxx253=0 -maxy253=0 -posx253=50 -posy253=50 -sizx253=800 -sizy253=600 -maxfps253=0 -initts253=0 -[window] -posx=928 -posy=224 -sizx=320 -sizy=455 diff --git a/build/dxwnd.2.ini b/build/dxwnd.2.ini deleted file mode 100644 index 2ff451e..0000000 --- a/build/dxwnd.2.ini +++ /dev/null @@ -1,1133 +0,0 @@ -[target] -title0=101 Airborne Invasion -path0=D:\Games\101air\101.exe -module0= -opengllib0= -ver0=0 -coord0=0 -flag0=134217762 -flagg0=134217728 -flagh0=20 -flagi0=0 -tflag0=64 -initx0=0 -inity0=0 -minx0=0 -miny0=0 -maxx0=0 -maxy0=0 -posx0=50 -posy0=50 -sizx0=800 -sizy0=600 -maxfps0=0 -initts0=0 -title1=688I Hunter Killer -path1=D:\Games\688\688I_HK.EXE -module1= -opengllib1= -ver1=0 -coord1=0 -flag1=-937950686 -flagg1=134217728 -flagh1=32788 -flagi1=0 -tflag1=3 -initx1=0 -inity1=0 -minx1=0 -miny1=0 -maxx1=0 -maxy1=0 -posx1=50 -posy1=50 -sizx1=1200 -sizy1=900 -maxfps1=0 -initts1=0 -title2=Abomination the Nemesis Project -path2=D:\Games\Abomination\Abomb.exe -module2= -opengllib2= -ver2=0 -coord2=0 -flag2=134217762 -flagg2=134217728 -flagh2=20 -flagi2=0 -tflag2=67 -initx2=0 -inity2=0 -minx2=0 -miny2=0 -maxx2=0 -maxy2=0 -posx2=50 -posy2=50 -sizx2=800 -sizy2=600 -maxfps2=0 -initts2=0 -title3=Balls of Steel -path3=D:\Games\Balls of Steel\bos.exe -module3=duke.ddp mutation.ddp -opengllib3= -ver3=0 -coord3=0 -flag3=167772192 -flagg3=202375169 -flagh3=20 -flagi3=0 -tflag3=263 -initx3=0 -inity3=0 -minx3=0 -miny3=0 -maxx3=0 -maxy3=0 -posx3=50 -posy3=50 -sizx3=800 -sizy3=600 -maxfps3=0 -initts3=0 -title4=Barrage -path4=D:\Games\Barrage\SRC\BARRAGE.EXE -module4= -opengllib4= -ver4=0 -coord4=0 -flag4=142606368 -flagg4=134217728 -flagh4=8212 -flagi4=0 -tflag4=7 -initx4=0 -inity4=0 -minx4=0 -miny4=0 -maxx4=0 -maxy4=0 -posx4=50 -posy4=50 -sizx4=800 -sizy4=600 -maxfps4=0 -initts4=0 -title5=Carnivores -path5=D:\Games\Carnivores\HUNTSOFT.EXE -module5= -opengllib5= -ver5=0 -coord5=0 -flag5=671088674 -flagg5=135266304 -flagh5=20 -flagi5=0 -tflag5=64 -initx5=0 -inity5=0 -minx5=0 -miny5=0 -maxx5=0 -maxy5=0 -posx5=50 -posy5=50 -sizx5=800 -sizy5=600 -maxfps5=0 -initts5=0 -title6=Crazy Frog Racer -path6=D:\Games\CrazyFrog\CRAZY.EXE -module6= -opengllib6= -ver6=8 -coord6=0 -flag6=134217762 -flagg6=134217729 -flagh6=20 -flagi6=0 -tflag6=64 -initx6=0 -inity6=0 -minx6=0 -miny6=0 -maxx6=0 -maxy6=0 -posx6=50 -posy6=50 -sizx6=800 -sizy6=600 -maxfps6=0 -initts6=0 -title7=Crazy Taxy -path7=D:\Games\Crazy_Taxi\Crazy Taxi PC Version\crazy_taxi_pc.exe -module7= -opengllib7= -ver7=0 -coord7=0 -flag7=671219744 -flagg7=134217728 -flagh7=20 -flagi7=0 -tflag7=66 -initx7=0 -inity7=0 -minx7=0 -miny7=0 -maxx7=0 -maxy7=0 -posx7=50 -posy7=50 -sizx7=800 -sizy7=600 -maxfps7=0 -initts7=0 -title8=Dark Angael -path8=D:\Games\Dark Angael\GAME.EXE -module8= -opengllib8= -ver8=0 -coord8=0 -flag8=134217762 -flagg8=134217728 -flagh8=20 -flagi8=0 -tflag8=0 -initx8=0 -inity8=0 -minx8=0 -miny8=0 -maxx8=0 -maxy8=0 -posx8=50 -posy8=50 -sizx8=800 -sizy8=600 -maxfps8=0 -initts8=0 -title9=Dark Colony -path9=D:\Games\Dark Colony\DCOLONY\DC.EXE -module9= -opengllib9= -ver9=0 -coord9=0 -flag9=134217762 -flagg9=134217728 -flagh9=20 -flagi9=0 -tflag9=0 -initx9=0 -inity9=0 -minx9=0 -miny9=0 -maxx9=0 -maxy9=0 -posx9=50 -posy9=50 -sizx9=800 -sizy9=600 -maxfps9=0 -initts9=0 -title10=Dark Judgement -path10=D:\Games\Dark Judgement\Dark Judgement.EXE -module10= -opengllib10= -ver10=0 -coord10=0 -flag10=134217826 -flagg10=134217728 -flagh10=20 -flagi10=0 -tflag10=3 -initx10=0 -inity10=0 -minx10=0 -miny10=0 -maxx10=0 -maxy10=0 -posx10=50 -posy10=50 -sizx10=800 -sizy10=600 -maxfps10=0 -initts10=0 -title11=Dark Vengeance -path11=D:\Games\dark_vengeance\dv.exe -module11= -opengllib11= -ver11=0 -coord11=0 -flag11=142606386 -flagg11=134217728 -flagh11=8212 -flagi11=0 -tflag11=3 -initx11=0 -inity11=0 -minx11=0 -miny11=0 -maxx11=800 -maxy11=600 -posx11=50 -posy11=50 -sizx11=800 -sizy11=600 -maxfps11=0 -initts11=0 -title12=Descent 3 -path12=D:\Games\Descent_3\Descent 3.exe -module12= -opengllib12= -ver12=0 -coord12=0 -flag12=134217760 -flagg12=134348801 -flagh12=4 -flagi12=0 -tflag12=0 -initx12=0 -inity12=0 -minx12=0 -miny12=0 -maxx12=0 -maxy12=0 -posx12=50 -posy12=50 -sizx12=800 -sizy12=600 -maxfps12=0 -initts12=0 -title13=Descent 3 main -path13=D:\Games\Descent_3\main.exe -module13= -opengllib13= -ver13=0 -coord13=0 -flag13=771891234 -flagg13=201457664 -flagh13=8212 -flagi13=0 -tflag13=3 -initx13=0 -inity13=0 -minx13=0 -miny13=0 -maxx13=0 -maxy13=0 -posx13=50 -posy13=50 -sizx13=800 -sizy13=600 -maxfps13=0 -initts13=0 -title14=Duckman -path14=D:\Games\duckman\DUCKMAN.EXE -module14= -opengllib14= -ver14=0 -coord14=0 -flag14=402653218 -flagg14=134217728 -flagh14=1044 -flagi14=0 -tflag14=259 -initx14=0 -inity14=0 -minx14=0 -miny14=0 -maxx14=0 -maxy14=0 -posx14=50 -posy14=50 -sizx14=800 -sizy14=600 -maxfps14=0 -initts14=0 -title15=Dweep -path15=D:\Games\dweep\Dweep.exe -module15= -opengllib15= -ver15=0 -coord15=0 -flag15=134234146 -flagg15=134283264 -flagh15=20 -flagi15=0 -tflag15=0 -initx15=0 -inity15=0 -minx15=0 -miny15=0 -maxx15=0 -maxy15=0 -posx15=50 -posy15=50 -sizx15=800 -sizy15=600 -maxfps15=0 -initts15=2 -title16=Eliminator -path16=D:\Games\eliminat\Eliminator.exe -module16= -opengllib16= -ver16=0 -coord16=0 -flag16=134217760 -flagg16=134217728 -flagh16=1044 -flagi16=0 -tflag16=3 -initx16=0 -inity16=0 -minx16=0 -miny16=0 -maxx16=0 -maxy16=0 -posx16=800 -posy16=600 -sizx16=400 -sizy16=300 -maxfps16=0 -initts16=0 -title17=EMPIRES.EXE -path17=D:\Games\Age of Empires\EMPIRES.EXE -module17= -opengllib17= -ver17=0 -coord17=0 -flag17=134217762 -flagg17=134217728 -flagh17=20 -flagi17=0 -tflag17=64 -initx17=0 -inity17=0 -minx17=0 -miny17=0 -maxx17=0 -maxy17=0 -posx17=50 -posy17=50 -sizx17=800 -sizy17=600 -maxfps17=0 -initts17=0 -title18=EPIC40K.EXE -path18=D:\Games\war_hammer_final_liberation\EPIC40K.EXE -module18= -opengllib18= -ver18=0 -coord18=0 -flag18=134217762 -flagg18=135266304 -flagh18=20 -flagi18=0 -tflag18=3 -initx18=0 -inity18=0 -minx18=0 -miny18=0 -maxx18=0 -maxy18=0 -posx18=50 -posy18=50 -sizx18=800 -sizy18=600 -maxfps18=0 -initts18=0 -title19=Fable - The Lost Chapters -path19=D:\Games\Fable - The Lost Chapters\Fable.exe -module19= -opengllib19= -ver19=9 -coord19=1 -flag19=134217760 -flagg19=201457672 -flagh19=20 -flagi19=0 -tflag19=258 -initx19=0 -inity19=0 -minx19=0 -miny19=0 -maxx19=0 -maxy19=0 -posx19=50 -posy19=50 -sizx19=800 -sizy19=600 -maxfps19=0 -initts19=0 -title20=Fighting Forces -path20=D:\Games\Fighting Forces\FFORCE.EXE -module20= -opengllib20= -ver20=0 -coord20=0 -flag20=134217760 -flagg20=671088640 -flagh20=3092 -flagi20=0 -tflag20=514 -initx20=0 -inity20=0 -minx20=0 -miny20=0 -maxx20=0 -maxy20=0 -posx20=50 -posy20=50 -sizx20=800 -sizy20=600 -maxfps20=0 -initts20=0 -title21=Final Fighter -path21=D:\Games\Final Fighter\FinalFighter.exe -module21= -opengllib21= -ver21=0 -coord21=0 -flag21=939524128 -flagg21=135266305 -flagh21=4 -flagi21=0 -tflag21=512 -initx21=0 -inity21=0 -minx21=0 -miny21=0 -maxx21=0 -maxy21=0 -posx21=50 -posy21=50 -sizx21=800 -sizy21=600 -maxfps21=0 -initts21=0 -title22=Final Odyssey -path22=D:\Games\Final odyssey\FinalOdy.exe -module22= -opengllib22= -ver22=0 -coord22=0 -flag22=134217760 -flagg22=134217728 -flagh22=4 -flagi22=0 -tflag22=64 -initx22=0 -inity22=0 -minx22=0 -miny22=0 -maxx22=0 -maxy22=0 -posx22=50 -posy22=50 -sizx22=800 -sizy22=600 -maxfps22=0 -initts22=0 -title23=Gangsters 2 -path23=D:\Games\Gangsters 2\Gangsters2.exe -module23= -opengllib23= -ver23=0 -coord23=0 -flag23=134217762 -flagg23=134217728 -flagh23=20 -flagi23=0 -tflag23=2 -initx23=0 -inity23=0 -minx23=0 -miny23=0 -maxx23=0 -maxy23=0 -posx23=50 -posy23=50 -sizx23=800 -sizy23=600 -maxfps23=0 -initts23=0 -title24=Gex -path24=D:\Games\gex\GEX.EXE -module24= -opengllib24= -ver24=0 -coord24=0 -flag24=134217761 -flagg24=134217728 -flagh24=20 -flagi24=0 -tflag24=66 -initx24=0 -inity24=0 -minx24=0 -miny24=0 -maxx24=0 -maxy24=0 -posx24=50 -posy24=50 -sizx24=800 -sizy24=600 -maxfps24=0 -initts24=0 -title25=Hard Truck - Road to Victory -path25=C:\Hard Truck\HTruck.exe -module25= -opengllib25= -ver25=0 -coord25=0 -flag25=134217760 -flagg25=134217728 -flagh25=2068 -flagi25=0 -tflag25=0 -initx25=0 -inity25=0 -minx25=0 -miny25=0 -maxx25=0 -maxy25=0 -posx25=50 -posy25=50 -sizx25=800 -sizy25=600 -maxfps25=0 -initts25=0 -title26=Hellcopter -path26=D:\Games\Hellcopter\HCopter.exe -module26= -opengllib26= -ver26=0 -coord26=0 -flag26=134217760 -flagg26=134217728 -flagh26=1044 -flagi26=0 -tflag26=512 -initx26=0 -inity26=0 -minx26=0 -miny26=0 -maxx26=0 -maxy26=0 -posx26=50 -posy26=50 -sizx26=800 -sizy26=600 -maxfps26=0 -initts26=0 -title27=Heroes of Might & Magic 2 Gold -path27=D:\Games\heroes2gold\HEROES2W.EXE -module27= -opengllib27= -ver27=0 -coord27=0 -flag27=134217730 -flagg27=143654912 -flagh27=20 -flagi27=0 -tflag27=770 -initx27=0 -inity27=0 -minx27=0 -miny27=0 -maxx27=0 -maxy27=0 -posx27=50 -posy27=50 -sizx27=800 -sizy27=600 -maxfps27=0 -initts27=0 -title28=Hooligans Storm over Europe -path28=D:\Games\Hooligans\Hooligans.exe -module28= -opengllib28= -ver28=0 -coord28=0 -flag28=134742048 -flagg28=202375168 -flagh28=20 -flagi28=0 -tflag28=259 -initx28=0 -inity28=0 -minx28=0 -miny28=0 -maxx28=0 -maxy28=0 -posx28=50 -posy28=50 -sizx28=800 -sizy28=600 -maxfps28=0 -initts28=0 -title29=Imperialism -path29=D:\Games\Imperialism\Imperialism.exe -module29= -opengllib29= -ver29=0 -coord29=0 -flag29=679485474 -flagg29=134217728 -flagh29=32788 -flagi29=0 -tflag29=3 -initx29=0 -inity29=0 -minx29=0 -miny29=0 -maxx29=0 -maxy29=0 -posx29=50 -posy29=50 -sizx29=1200 -sizy29=900 -maxfps29=0 -initts29=0 -title30=Mechwarrior 3 -path30=D:\Games\Mechwarrior 3 (full)\Mech3.exe -module30= -opengllib30= -ver30=0 -coord30=0 -flag30=671096866 -flagg30=134217728 -flagh30=20 -flagi30=0 -tflag30=0 -initx30=0 -inity30=0 -minx30=0 -miny30=0 -maxx30=0 -maxy30=0 -posx30=50 -posy30=50 -sizx30=800 -sizy30=600 -maxfps30=0 -initts30=0 -title31=Raiden II -path31=D:\Games\raiden2\RAIDENII.EXE -module31= -opengllib31= -ver31=0 -coord31=1 -flag31=134217762 -flagg31=134217728 -flagh31=20 -flagi31=0 -tflag31=0 -initx31=0 -inity31=0 -minx31=0 -miny31=0 -maxx31=0 -maxy31=0 -posx31=50 -posy31=50 -sizx31=800 -sizy31=600 -maxfps31=0 -initts31=0 -title32=Rapanui -path32=D:\Games\Rapanui\Rapanui.exe -module32= -opengllib32= -ver32=0 -coord32=0 -flag32=134217762 -flagg32=134217728 -flagh32=20 -flagi32=0 -tflag32=0 -initx32=0 -inity32=0 -minx32=0 -miny32=0 -maxx32=0 -maxy32=0 -posx32=50 -posy32=50 -sizx32=800 -sizy32=600 -maxfps32=0 -initts32=0 -title33=Silent Hunter II (shell) -path33=D:\Games\Silent Hunter II\Shell\Shell.exe -module33= -opengllib33= -ver33=0 -coord33=0 -flag33=402653221 -flagg33=135266304 -flagh33=20 -flagi33=0 -tflag33=3 -initx33=0 -inity33=0 -minx33=0 -miny33=0 -maxx33=800 -maxy33=600 -posx33=50 -posy33=50 -sizx33=800 -sizy33=600 -maxfps33=0 -initts33=0 -title34=Silent Hunter II (sim) -path34=D:\Games\Silent Hunter II\Sim\Sim.exe -module34= -opengllib34= -ver34=0 -coord34=0 -flag34=134217780 -flagg34=134217728 -flagh34=20 -flagi34=0 -tflag34=0 -initx34=400 -inity34=300 -minx34=0 -miny34=0 -maxx34=800 -maxy34=600 -posx34=50 -posy34=50 -sizx34=800 -sizy34=600 -maxfps34=0 -initts34=0 -title35=The Sims -path35=D:\Games\sims\Sims.exe -module35= -opengllib35= -ver35=0 -coord35=0 -flag35=679616546 -flagg35=134217728 -flagh35=84 -flagi35=0 -tflag35=67 -initx35=0 -inity35=0 -minx35=0 -miny35=0 -maxx35=0 -maxy35=0 -posx35=50 -posy35=50 -sizx35=800 -sizy35=600 -maxfps35=0 -initts35=0 -title36=Tomb Raider - The Last Revelation -path36=D:\Games\Tomb Raider - The Last Revelation\tomb4.exe -module36= -opengllib36= -ver36=0 -coord36=0 -flag36=134217826 -flagg36=134217728 -flagh36=20 -flagi36=0 -tflag36=3 -initx36=0 -inity36=0 -minx36=0 -miny36=0 -maxx36=0 -maxy36=0 -posx36=50 -posy36=50 -sizx36=800 -sizy36=600 -maxfps36=0 -initts36=0 -title37=TOMB2.EXE -path37=D:\Games\Tomb Raider 2\TOMB2.EXE -module37= -opengllib37= -ver37=0 -coord37=0 -flag37=134217760 -flagg37=201326592 -flagh37=2068 -flagi37=0 -tflag37=0 -initx37=0 -inity37=0 -minx37=0 -miny37=0 -maxx37=0 -maxy37=0 -posx37=50 -posy37=50 -sizx37=800 -sizy37=600 -maxfps37=0 -initts37=0 -title38=wa.exe -path38=D:\Games\worms_arma\Worms_2_Armageddon\wa.exe -module38= -opengllib38= -ver38=0 -coord38=0 -flag38=713031712 -flagg38=142606336 -flagh38=20 -flagi38=0 -tflag38=3 -initx38=0 -inity38=0 -minx38=0 -miny38=0 -maxx38=0 -maxy38=0 -posx38=50 -posy38=50 -sizx38=800 -sizy38=600 -maxfps38=0 -initts38=0 -title39=Western Front -path39=D:\Games\Western Front\wf.exe -module39= -opengllib39= -ver39=0 -coord39=0 -flag39=679477282 -flagg39=135266304 -flagh39=16404 -flagi39=0 -tflag39=0 -initx39=0 -inity39=0 -minx39=0 -miny39=0 -maxx39=0 -maxy39=0 -posx39=50 -posy39=50 -sizx39=800 -sizy39=600 -maxfps39=0 -initts39=0 -title40=G-Nome -path40=D:\Games\G-Nome\G-NOME.EXE -module40= -opengllib40= -ver40=0 -coord40=0 -flag40=-1433399262 -flagg40=201326592 -flagh40=33300 -flagi40=0 -tflag40=3 -initx40=0 -inity40=0 -minx40=0 -miny40=0 -maxx40=0 -maxy40=0 -posx40=250 -posy40=250 -sizx40=800 -sizy40=600 -maxfps40=0 -initts40=0 -title41=GeneRally -path41=D:\Games\generally105\GeneRally.exe -module41= -opengllib41= -ver41=7 -coord41=0 -flag41=134234146 -flagg41=135266305 -flagh41=20 -flagi41=0 -tflag41=0 -initx41=0 -inity41=0 -minx41=0 -miny41=0 -maxx41=0 -maxy41=0 -posx41=50 -posy41=50 -sizx41=800 -sizy41=600 -maxfps41=0 -initts41=0 -title42=Warlords 3 -path42=D:\Games\Warlords3\Darklord.exe -module42= -opengllib42= -ver42=0 -coord42=0 -flag42=-2013249502 -flagg42=135266304 -flagh42=20 -flagi42=0 -tflag42=0 -initx42=0 -inity42=0 -minx42=0 -miny42=0 -maxx42=0 -maxy42=0 -posx42=50 -posy42=50 -sizx42=800 -sizy42=600 -maxfps42=0 -initts42=0 -title43=Tachyon The Fringe -path43=D:\Games\TachyonTheFringe\space.exe -module43= -opengllib43= -ver43=0 -coord43=0 -flag43=151011364 -flagg43=134217728 -flagh43=20 -flagi43=0 -tflag43=3 -initx43=0 -inity43=0 -minx43=0 -miny43=0 -maxx43=0 -maxy43=0 -posx43=50 -posy43=50 -sizx43=800 -sizy43=600 -maxfps43=0 -initts43=0 -title44=Tanktics -path44=D:\Games\Tanktics\tanktics.exe -module44= -opengllib44= -ver44=0 -coord44=1 -flag44=671088674 -flagg44=134217728 -flagh44=20 -flagi44=0 -tflag44=259 -initx44=0 -inity44=0 -minx44=0 -miny44=0 -maxx44=0 -maxy44=0 -posx44=50 -posy44=50 -sizx44=800 -sizy44=600 -maxfps44=0 -initts44=0 -title45=Nightmare Ned -path45=D:\Games\Ned\NITENED.EXE -module45= -opengllib45= -ver45=0 -coord45=0 -flag45=134217762 -flagg45=134217728 -flagh45=20 -flagi45=0 -tflag45=3 -initx45=0 -inity45=0 -minx45=0 -miny45=0 -maxx45=0 -maxy45=0 -posx45=50 -posy45=50 -sizx45=800 -sizy45=600 -maxfps45=0 -initts45=0 -title46=Imperialism II -path46=D:\Games\imperialism_2\imperialism II.exe -module46= -opengllib46= -ver46=0 -coord46=0 -flag46=142614562 -flagg46=470810688 -flagh46=20 -flagi46=0 -tflag46=67 -initx46=0 -inity46=0 -minx46=0 -miny46=0 -maxx46=0 -maxy46=0 -posx46=50 -posy46=50 -sizx46=800 -sizy46=600 -maxfps46=0 -initts46=0 -title47=age3.exe -path47=D:\Games\Age of Empires III\age3.exe -module47= -opengllib47= -ver47=0 -coord47=0 -flag47=-394125278 -flagg47=134217728 -flagh47=20 -flagi47=0 -tflag47=64 -initx47=0 -inity47=0 -minx47=0 -miny47=0 -maxx47=0 -maxy47=0 -posx47=50 -posy47=50 -sizx47=800 -sizy47=600 -maxfps47=0 -initts47=0 -title48=road.exe -path48=D:\Games\Vangers\road.exe -module48= -opengllib48= -ver48=1 -coord48=0 -flag48=134217762 -flagg48=134217728 -flagh48=20 -flagi48=0 -tflag48=323 -initx48=0 -inity48=0 -minx48=0 -miny48=0 -maxx48=0 -maxy48=0 -posx48=50 -posy48=50 -sizx48=800 -sizy48=600 -maxfps48=0 -initts48=0 -[window] -posx=1435 -posy=210 -sizx=320 -sizy=420 diff --git a/build/dxwnd.3.ini b/build/dxwnd.3.ini deleted file mode 100644 index 00c9d6c..0000000 --- a/build/dxwnd.3.ini +++ /dev/null @@ -1,167 +0,0 @@ -[window] -posx=1452 -posy=365 -sizx=320 -sizy=514 -[target] -title0=Rayman 2 Demo -path0=D:\Games\Rayman2Demo\Rayman2Demo.exe -module0= -opengllib0= -ver0=1 -coord0=0 -flag0=402653217 -flagg0=1210056704 -flagh0=2097172 -flagi0=0 -tflag0=64 -initx0=0 -inity0=0 -minx0=0 -miny0=0 -maxx0=0 -maxy0=0 -posx0=50 -posy0=50 -sizx0=800 -sizy0=600 -maxfps0=0 -initts0=0 -title1=Mirror's Edge -path1=D:\Games\Mirror's Edge\Binaries\MirrorsEdge.exe -module1= -opengllib1= -ver1=0 -coord1=0 -flag1=-2013265882 -flagg1=1207959552 -flagh1=2097172 -flagi1=0 -tflag1=5 -initx1=0 -inity1=0 -minx1=0 -miny1=0 -maxx1=0 -maxy1=0 -posx1=50 -posy1=50 -sizx1=800 -sizy1=600 -maxfps1=0 -initts1=6 -title2=LastHalfWin.exe -path2=D:\Games\Last Half Of Darkness\LastHalfWin.exe -module2= -opengllib2= -ver2=1 -coord2=0 -flag2=134217760 -flagg2=1207959552 -flagh2=4 -flagi2=0 -tflag2=512 -initx2=0 -inity2=0 -minx2=0 -miny2=0 -maxx2=0 -maxy2=0 -posx2=50 -posy2=50 -sizx2=800 -sizy2=600 -maxfps2=0 -initts2=0 -title3=DOOM95.EXE -path3=D:\Games\Doom95i\DOOM95.EXE -module3= -opengllib3= -ver3=0 -coord3=0 -flag3=134217762 -flagg3=1207959552 -flagh3=20 -flagi3=0 -tflag3=512 -initx3=0 -inity3=0 -minx3=0 -miny3=0 -maxx3=0 -maxy3=0 -posx3=50 -posy3=50 -sizx3=800 -sizy3=600 -maxfps3=0 -initts3=0 -title4=CNC3.exe -path4=D:\Games\Command & Conquer 3\CNC3.exe -module4= -opengllib4= -ver4=9 -coord4=0 -flag4=134217762 -flagg4=1207959552 -flagh4=20 -flagi4=0 -tflag4=512 -initx4=0 -inity4=0 -minx4=0 -miny4=0 -maxx4=0 -maxy4=0 -posx4=50 -posy4=50 -sizx4=800 -sizy4=600 -maxfps4=0 -initts4=0 -title5=Div.exe -path5=D:\Games\Beyond Divinity\Div.exe -module5= -opengllib5= -ver5=0 -coord5=0 -flag5=134217762 -flagg5=1207959552 -flagh5=20 -flagi5=0 -tflag5=512 -initx5=0 -inity5=0 -minx5=0 -miny5=0 -maxx5=0 -maxy5=0 -posx5=50 -posy5=50 -sizx5=800 -sizy5=600 -maxfps5=0 -initts5=0 -title6=martian gothic.exe -path6=D:\Games\Martian Gothic\martian gothic.exe -module6= -opengllib6= -ver6=7 -coord6=0 -flag6=201326626 -flagg6=1208090624 -flagh6=276 -flagi6=0 -tflag6=263 -initx6=0 -inity6=0 -minx6=0 -miny6=0 -maxx6=0 -maxy6=0 -posx6=50 -posy6=50 -sizx6=800 -sizy6=600 -maxfps6=0 -initts6=0 diff --git a/build/dxwnd.dll b/build/dxwnd.dll index 0f2fdbf..fefafd6 100644 --- a/build/dxwnd.dll +++ b/build/dxwnd.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af6a5009d304a3e8cd4b4303697b68a8a6e060a6815e60b70a75a622cf8e4870 -size 421376 +oid sha256:f72014ec45098420011258296358843eced6ce66d98dd791d8997884a624db18 +size 422400 diff --git a/build/dxwnd.exe b/build/dxwnd.exe index c19a054..d54d78a 100644 --- a/build/dxwnd.exe +++ b/build/dxwnd.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78e9db00462bdbd92c3b15f0f9e7aa7ae434573ccaa808af1226ba489104837f +oid sha256:645d3eb20a6c06832fd937ba3847de75e82273c684ccfac31dbfface9881df50 size 532480 diff --git a/dll/ddraw.cpp b/dll/ddraw.cpp index 709276a..e90474a 100644 --- a/dll/ddraw.cpp +++ b/dll/ddraw.cpp @@ -251,31 +251,21 @@ DWORD *Palette16BPP = NULL; void *EmuScreenBuffer = NULL; // to implement pitch bug fix DWORD rPitch = 0; LPVOID rSurface = NULL; -static char *SetPixFmt(LPDDSURFACEDESC2); +static void SetPixFmt(LPDDSURFACEDESC2); +static void GetPixFmt(LPDDSURFACEDESC2); + +static HookEntry_Type ddHooks[]={ + {"DirectDrawCreate", (FARPROC)NULL, (FARPROC *)&pDirectDrawCreate, (FARPROC)extDirectDrawCreate}, + {"DirectDrawCreateEx", (FARPROC)NULL, (FARPROC *)&pDirectDrawCreateEx, (FARPROC)extDirectDrawCreateEx}, + {"DirectDrawCreate", (FARPROC)NULL, (FARPROC *)&pDirectDrawCreate, (FARPROC)extDirectDrawCreate}, + {"DirectDrawCreate", (FARPROC)NULL, (FARPROC *)&pDirectDrawCreate, (FARPROC)extDirectDrawCreate}, + {0, NULL, 0, 0} // terminator +}; FARPROC Remap_ddraw_ProcAddress(LPCSTR proc, HMODULE hModule) { - if (!strcmp(proc,"DirectDrawCreate")){ - pDirectDrawCreate=(DirectDrawCreate_Type)(*pGetProcAddress)(hModule, proc); - OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pDirectDrawCreate); - return (FARPROC)extDirectDrawCreate; - } - if (!strcmp(proc,"DirectDrawCreateEx")){ - pDirectDrawCreateEx=(DirectDrawCreateEx_Type)(*pGetProcAddress)(hModule, proc); - OutTraceD("GetProcAddress: hooking proc=%s at addr=%x\n", ProcToString(proc), pDirectDrawCreateEx); - return (FARPROC)extDirectDrawCreateEx; - } - if (!strcmp(proc,"DirectDrawEnumerateA")){ - pDirectDrawEnumerate=(DirectDrawEnumerate_Type)(*pGetProcAddress)(hModule, proc); - OutTraceP("GetProcAddress: hooking proc=%s at addr=%x\n", proc, pDirectDrawEnumerate); - return (FARPROC)extDirectDrawEnumerateProxy; - } - if (!strcmp(proc,"DirectDrawEnumerateExA")){ - pDirectDrawEnumerateEx=(DirectDrawEnumerateEx_Type)(*pGetProcAddress)(hModule, proc); - OutTraceP("GetProcAddress: hooking proc=%s at addr=%x\n", proc, pDirectDrawEnumerateEx); - return (FARPROC)extDirectDrawEnumerateExProxy; - } - // NULL -> keep the original call address + FARPROC addr; + if (addr=RemapLibrary(proc, hModule, ddHooks)) return addr; return NULL; } @@ -303,7 +293,7 @@ static void Stopper(char *s, int line) #define REFPROBE(obj, op) #endif -#define STOPPER_TEST // comment out to eliminate +//#define STOPPER_TEST // comment out to eliminate #ifdef STOPPER_TEST #define STOPPER(s) Stopper(s, __LINE__) #else @@ -333,11 +323,19 @@ static char *DumpPixelFormat(LPDDSURFACEDESC2 lpddsd) sprintf(sBuf, " PixelFormat size=%d flags=%x(%s) BPP=%d", lpddsd->dwSize, flags, ExplainPixelFormatFlags(flags), lpddsd->ddpfPixelFormat.dwRGBBitCount); if (flags & DDPF_RGB) { - sprintf(sItem, " RGBA=(%x,%x,%x,%x)", - lpddsd->ddpfPixelFormat.dwRBitMask, - lpddsd->ddpfPixelFormat.dwGBitMask, - lpddsd->ddpfPixelFormat.dwBBitMask, - lpddsd->ddpfPixelFormat.dwRGBAlphaBitMask); + if (flags & DDPF_ALPHAPIXELS) { + sprintf(sItem, " RGBA=(%x,%x,%x,%x)", + lpddsd->ddpfPixelFormat.dwRBitMask, + lpddsd->ddpfPixelFormat.dwGBitMask, + lpddsd->ddpfPixelFormat.dwBBitMask, + lpddsd->ddpfPixelFormat.dwRGBAlphaBitMask); + } + else { + sprintf(sItem, " RGB=(%x,%x,%x)", + lpddsd->ddpfPixelFormat.dwRBitMask, + lpddsd->ddpfPixelFormat.dwGBitMask, + lpddsd->ddpfPixelFormat.dwBBitMask); + } strcat(sBuf, sItem); } if (flags & DDPF_YUV) { @@ -559,18 +557,10 @@ void InitDDScreenParameters(LPDIRECTDRAW lpdd) return; } - OutTraceD("InitDDScreenParameters: Flags=%x FourCC=%x RGBBitCount=%d RGBA BitMask=(%x,%x,%x,%x)\n", - ddsd.ddpfPixelFormat.dwFlags, - ddsd.ddpfPixelFormat.dwFourCC, - ddsd.ddpfPixelFormat.dwRGBBitCount, - ddsd.ddpfPixelFormat.dwRBitMask, - ddsd.ddpfPixelFormat.dwGBitMask, - ddsd.ddpfPixelFormat.dwBBitMask, - ddsd.ddpfPixelFormat.dwRGBAlphaBitMask); - + OutTraceD("InitDDScreenParameters: Actual %s\n", DumpPixelFormat((LPDDSURFACEDESC2)&ddsd)); dxw.ActualPixelFormat=ddsd.ddpfPixelFormat; + if(dxw.VirtualPixelFormat.dwRGBBitCount==0) dxw.VirtualPixelFormat=ddsd.ddpfPixelFormat; SetBltTransformations(); - return; } @@ -578,24 +568,17 @@ void InitDSScreenParameters(LPDIRECTDRAWSURFACE lpdds) { HRESULT res; DDPIXELFORMAT p; + DDSURFACEDESC2 ddsd; p.dwSize=sizeof(DDPIXELFORMAT); if(res=(*pGetPixelFormat)(lpdds, &p)){ OutTraceE("GetPixelFormat: ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); return; } - OutTraceD("InitDSScreenParameters: Flags=%x FourCC=%x RGBBitCount=%d RGBA BitMask=(%x,%x,%x,%x)\n", - p.dwFlags, - p.dwFourCC, - p.dwRGBBitCount, - p.dwRBitMask, - p.dwGBitMask, - p.dwBBitMask, - p.dwRGBAlphaBitMask); - + ddsd.ddpfPixelFormat = p; + OutTraceD("InitDSScreenParameters: Actual %s\n", DumpPixelFormat(&ddsd)); dxw.ActualPixelFormat=p; SetBltTransformations(); - return; } @@ -624,7 +607,6 @@ void InitScreenParameters() // initialize to default null values, but dwRGBBitCount dxw.ActualPixelFormat.dwRGBBitCount=CurrDevMode.dmBitsPerPel; dxw.VirtualPixelFormat.dwRGBBitCount=CurrDevMode.dmBitsPerPel; // until set differently - //if(dxw.dwFlags2 & INIT8BPP) dxw.VirtualPixelFormat.dwRGBBitCount = 8; OutTraceD("InitScreenParameters: RGBBitCount=%d\n", CurrDevMode.dmBitsPerPel); SetBltTransformations(); @@ -644,19 +626,20 @@ void FixPixelFormat(int ColorDepth, DDPIXELFORMAT *pf) pf->dwRGBAlphaBitMask = 0x0000; break; case 16: - pf->dwFlags |= DDPF_ALPHAPIXELS; // v2.02.33 pf->dwRGBBitCount = 16; if (dxw.dwFlags1 & USERGB565){ pf->dwRBitMask = 0xf800; pf->dwGBitMask = 0x07e0; pf->dwBBitMask = 0x001f; + pf->dwRGBAlphaBitMask = 0x0000; } else { + if(!(dxw.dwFlags4 & NOALPHACHANNEL)) pf->dwFlags |= DDPF_ALPHAPIXELS; // v2.02.33,40 pf->dwRBitMask = 0x7c00; pf->dwGBitMask = 0x03e0; pf->dwBBitMask = 0x001f; + pf->dwRGBAlphaBitMask = 0x8000; } - pf->dwRGBAlphaBitMask = 0x8000; break; case 24: pf->dwRGBBitCount = 24; @@ -666,7 +649,7 @@ void FixPixelFormat(int ColorDepth, DDPIXELFORMAT *pf) pf->dwRGBAlphaBitMask = 0x00000000; break; case 32: - pf->dwFlags |= DDPF_ALPHAPIXELS; // v2.02.33 + if(!(dxw.dwFlags4 & NOALPHACHANNEL)) pf->dwFlags |= DDPF_ALPHAPIXELS; // v2.02.33 pf->dwRGBBitCount = 32; pf->dwRBitMask = 0x00FF0000; pf->dwGBitMask = 0x0000FF00; @@ -863,59 +846,44 @@ int lpddHookedVersion(LPDIRECTDRAW lpdd) /* ------------------------------------------------------------------ */ -static char *SetPixFmt(LPDDSURFACEDESC2 lpdd) +// SetPixFmt: builds a pixel format descriptor when no one is specified, starting from the color depth, the current +// desktop pixel format (when the color depth is the same) or the config flags + +static void SetPixFmt(LPDDSURFACEDESC2 lpdd) { - char *pfstr; - OutTraceD("SetPixFmt: BPP=%d Use565=%d\n", dxw.VirtualPixelFormat.dwRGBBitCount, dxw.dwFlags1 & USERGB565 ? 1:0); + OutTraceD("SetPixFmt: BPP=%d Use565=%d NoAlpha=%d\n", + dxw.VirtualPixelFormat.dwRGBBitCount, + dxw.dwFlags1 & USERGB565 ? 1:0, + dxw.dwFlags4 & NOALPHACHANNEL ? 1:0); memset(&lpdd->ddpfPixelFormat,0,sizeof(DDPIXELFORMAT)); lpdd->ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT); - lpdd->ddpfPixelFormat.dwRGBBitCount = dxw.ActualPixelFormat.dwRGBBitCount; - if(dxw.ActualPixelFormat.dwRGBBitCount==dxw.VirtualPixelFormat.dwRGBBitCount && dxw.ActualPixelFormat.dwRBitMask){ - // if same color depth, choose current color masks - pfstr="CURRENT"; - lpdd->ddpfPixelFormat=dxw.ActualPixelFormat; - } - else + + switch (dxw.VirtualPixelFormat.dwRGBBitCount) { - switch (dxw.VirtualPixelFormat.dwRGBBitCount) - { - case 8: - pfstr="RGB8"; - FixPixelFormat(8, &lpdd->ddpfPixelFormat); - break; - case 16: - pfstr=(dxw.dwFlags1 & USERGB565)?"RGB16-565":"RGB16-555"; - FixPixelFormat(16, &lpdd->ddpfPixelFormat); - break; - case 24: - pfstr="RGB24"; - FixPixelFormat(24, &lpdd->ddpfPixelFormat); - break; - case 32: - pfstr="RGB32"; - FixPixelFormat(32, &lpdd->ddpfPixelFormat); - break; - default: - pfstr="unsupported"; - OutTraceE("CreateSurface ERROR: Unsupported resolution ColorBPP=%d\n", dxw.VirtualPixelFormat.dwRGBBitCount); - break; - } + case 8: + case 16: + case 24: + case 32: + FixPixelFormat(dxw.VirtualPixelFormat.dwRGBBitCount, &lpdd->ddpfPixelFormat); + break; + default: + OutTraceE("CreateSurface ERROR: Unsupported resolution ColorBPP=%d\n", dxw.VirtualPixelFormat.dwRGBBitCount); + break; } + // remember current virtual settings dxw.VirtualPixelFormat=lpdd->ddpfPixelFormat; + OutTraceD("SetPixFmt: %s\n", DumpPixelFormat(lpdd)); +} - OutTraceD("SetPixFmt: RGBBitCount=%d Flags=%x FourCC=%x RGBA BitMask=(%x,%x,%x,%x)\n", - lpdd->ddpfPixelFormat.dwRGBBitCount, - lpdd->ddpfPixelFormat.dwFlags, - lpdd->ddpfPixelFormat.dwFourCC, - lpdd->ddpfPixelFormat.dwRBitMask, - lpdd->ddpfPixelFormat.dwGBitMask, - lpdd->ddpfPixelFormat.dwBBitMask, - lpdd->ddpfPixelFormat.dwRGBAlphaBitMask); +// retrieves the stored pixel format - return pfstr; +static void GetPixFmt(LPDDSURFACEDESC2 lpdd) +{ + lpdd->ddpfPixelFormat = dxw.VirtualPixelFormat; + OutTraceD("GetPixFmt: %s\n", DumpPixelFormat(lpdd)); } static void RenewClipper(LPDIRECTDRAW lpdd, LPDIRECTDRAWSURFACE lpdds) @@ -1433,15 +1401,17 @@ HRESULT WINAPI extGetCapsD(LPDIRECTDRAW lpdd, LPDDCAPS c1, LPDDCAPS c2) if(res) OutTraceE("GetCaps(D): ERROR res=%x(%s)\n", res, ExplainDDError(res)); else { - if (c1) OutTraceD("GetCaps(D-HW): caps=%x(%s) caps2=%x(%s) fxcaps=%x(%s) fxalphacaps=%x(%s) keycaps=%x(%s)\n", + if (c1) OutTraceD("GetCaps(D-HW): caps=%x(%s) caps2=%x(%s) palcaps=%x(%s) fxcaps=%x(%s) fxalphacaps=%x(%s) keycaps=%x(%s)\n", c1->dwCaps, ExplainDDDCaps(c1->dwCaps), c1->dwCaps2, ExplainDDDCaps2(c1->dwCaps2), + c1->dwPalCaps, ExplainDDPalCaps(c1->dwPalCaps), c1->dwFXCaps, ExplainDDFXCaps(c1->dwFXCaps), c1->dwFXAlphaCaps, ExplainDDFXALPHACaps(c1->dwFXAlphaCaps), c1->dwCKeyCaps, ExplainDDCKeyCaps(c1->dwCKeyCaps)); - if (c2) OutTraceD("GetCaps(D-SW): caps=%x(%s) caps2=%x(%s) fxcaps=%x(%s) fxalphacaps=%x(%s) keycaps=%x(%s)\n", + if (c2) OutTraceD("GetCaps(D-SW): caps=%x(%s) caps2=%x(%s) palcaps=%x(%s) fxcaps=%x(%s) fxalphacaps=%x(%s) keycaps=%x(%s)\n", c2->dwCaps, ExplainDDDCaps(c2->dwCaps), c2->dwCaps2, ExplainDDDCaps2(c2->dwCaps2), + c2->dwPalCaps, ExplainDDPalCaps(c2->dwPalCaps), c2->dwFXCaps, ExplainDDFXCaps(c2->dwFXCaps), c2->dwFXAlphaCaps, ExplainDDFXALPHACaps(c2->dwFXAlphaCaps), c2->dwCKeyCaps, ExplainDDCKeyCaps(c2->dwCKeyCaps)); @@ -1457,7 +1427,10 @@ HRESULT WINAPI extGetCapsD(LPDIRECTDRAW lpdd, LPDDCAPS c1, LPDDCAPS c2) c2=&swcaps; res=(*pGetCapsD)(lpdd, NULL, c2); } + //DWORD AlphaCaps; + //AlphaCaps=c1->dwFXAlphaCaps; memcpy((void *)c1, (void *)c2, size); + //c1->dwFXAlphaCaps=AlphaCaps; } if((dxw.dwFlags3 & CAPMASK) && c1 && c2) MaskCapsD(c1, c2); @@ -1825,10 +1798,8 @@ HRESULT WINAPI extSetDisplayMode(int version, LPDIRECTDRAW lpdd, if(IsTraceD){ OutTrace("SetDisplayMode: version=%d dwWidth=%i dwHeight=%i dwBPP=%i", version, dwwidth, dwheight, dwbpp); - if (version==2) - OutTrace(" dwRefresh=%i dwFlags=%x\n", dwrefreshrate, dwflags); - else - OutTrace("\n"); + if (version==2) OutTrace(" dwRefresh=%i dwFlags=%x\n", dwrefreshrate, dwflags); + else OutTrace("\n"); } dxw.SetScreenSize(dwwidth, dwheight); @@ -1837,16 +1808,17 @@ HRESULT WINAPI extSetDisplayMode(int version, LPDIRECTDRAW lpdd, AdjustWindowFrame(dxw.GethWnd(), dwwidth, dwheight); if(dxw.dwFlags1 & EMULATESURFACE){ + // in EMULATESURFACE mode, let SetPixFmt decide upon the PixelFormat dxw.VirtualPixelFormat.dwRGBBitCount = dwbpp; - dwbpp = dxw.ActualPixelFormat.dwRGBBitCount; + SetPixFmt(&ddsd); SetBltTransformations(); - OutTraceD("SetDisplayMode: mode=EMULATESURFACE EmuBPP=%d ActBPP=%d\n", dxw.VirtualPixelFormat.dwRGBBitCount, dxw.ActualPixelFormat.dwRGBBitCount); - } - else { - OutTraceD("SetDisplayMode: mode=STANDARD BPP=%d\n", dwbpp); - dxw.ActualPixelFormat.dwRGBBitCount = dwbpp; + OutTraceD("SetDisplayMode: mode=EMULATE %s ret=OK\n", DumpPixelFormat(&ddsd)); + return DD_OK; } + OutTraceD("SetDisplayMode: mode=STANDARD BPP=%d\n", dwbpp); + dxw.ActualPixelFormat.dwRGBBitCount = dwbpp; + ZeroMemory(&ddsd, sizeof(ddsd)); ddsd.dwSize = Set_dwSize_From_DDraw(lpdd); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_REFRESHRATE; @@ -1854,14 +1826,13 @@ HRESULT WINAPI extSetDisplayMode(int version, LPDIRECTDRAW lpdd, ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB; (*pGetDisplayMode)(lpdd, (LPDDSURFACEDESC)&ddsd); - if(ddsd.ddpfPixelFormat.dwRGBBitCount != dwbpp){ - OutTraceD("SetDisplayMode: fixing colordepth current=%d required=%d size=(%dx%d)\n", + if (version==1) + res = (*pSetDisplayMode1)(lpdd, ddsd.dwWidth, ddsd.dwHeight, dwbpp); + else + res = (*pSetDisplayMode2)(lpdd, ddsd.dwWidth, ddsd.dwHeight, dwbpp, ddsd.dwRefreshRate, 0); + + OutTraceD("SetDisplayMode: fixing colordepth current=%d required=%d size=(%dx%d)\n", ddsd.ddpfPixelFormat.dwRGBBitCount, dwbpp, ddsd.dwWidth, ddsd.dwHeight); - if (version==1) - res = (*pSetDisplayMode1)(lpdd, ddsd.dwWidth, ddsd.dwHeight, dwbpp); - else - res = (*pSetDisplayMode2)(lpdd, ddsd.dwWidth, ddsd.dwHeight, dwbpp, ddsd.dwRefreshRate, 0); - } return 0; } @@ -1883,7 +1854,10 @@ HRESULT WINAPI extGetDisplayMode(LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd) OutTraceD("GetDisplayMode\n"); (*pGetDisplayMode)(lpdd, lpddsd); - if(dxw.dwFlags1 & EMULATESURFACE) SetPixFmt((LPDDSURFACEDESC2)lpddsd); + if(dxw.dwFlags1 & EMULATESURFACE) { + GetPixFmt((LPDDSURFACEDESC2)lpddsd); + if(!lpddsd->ddpfPixelFormat.dwFlags) SetPixFmt((LPDDSURFACEDESC2)lpddsd); + } lpddsd->dwWidth = dxw.GetScreenWidth(); lpddsd->dwHeight = dxw.GetScreenHeight(); @@ -1894,13 +1868,15 @@ HRESULT WINAPI extGetDisplayMode(LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd) OutTraceD("GetDisplayMode: fix RGBBitCount=%d\n", lpddsd->ddpfPixelFormat.dwRGBBitCount); } - OutTraceD("GetDisplayMode: returning WxH=(%dx%d) PixelFormat Flags=%x(%s) RGBBitCount=%d RGBAmask=(%x,%x,%x,%x) Caps=%x(%s)\n", - lpddsd->dwWidth, lpddsd->dwHeight, - lpddsd->ddpfPixelFormat.dwFlags, ExplainPixelFormatFlags(lpddsd->ddpfPixelFormat.dwFlags), - lpddsd->ddpfPixelFormat.dwRGBBitCount, - lpddsd->ddpfPixelFormat.dwRBitMask, lpddsd->ddpfPixelFormat.dwGBitMask, lpddsd->ddpfPixelFormat.dwBBitMask, - lpddsd->ddpfPixelFormat.dwRGBAlphaBitMask, - lpddsd->ddsCaps.dwCaps, ExplainDDSCaps(lpddsd->ddsCaps.dwCaps)); + //OutTraceD("GetDisplayMode: returning WxH=(%dx%d) PixelFormat Flags=%x(%s) RGBBitCount=%d RGBAmask=(%x,%x,%x,%x) Caps=%x(%s)\n", + // lpddsd->dwWidth, lpddsd->dwHeight, + // lpddsd->ddpfPixelFormat.dwFlags, ExplainPixelFormatFlags(lpddsd->ddpfPixelFormat.dwFlags), + // lpddsd->ddpfPixelFormat.dwRGBBitCount, + // lpddsd->ddpfPixelFormat.dwRBitMask, lpddsd->ddpfPixelFormat.dwGBitMask, lpddsd->ddpfPixelFormat.dwBBitMask, + // lpddsd->ddpfPixelFormat.dwRGBAlphaBitMask, + // lpddsd->ddsCaps.dwCaps, ExplainDDSCaps(lpddsd->ddsCaps.dwCaps)); + + OutTraceD("GetDisplayMode: returning size=(%dx%d) %s\n", lpddsd->dwWidth, lpddsd->dwHeight, DumpPixelFormat((LPDDSURFACEDESC2)lpddsd)); return 0; } @@ -2006,7 +1982,7 @@ void FixSurfaceCapsAnalytic(LPDDSURFACEDESC2 lpddsd, int dxversion) // lpddsd->ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY; // lpddsd->dwHeight = dxw.GetScreenHeight(); // lpddsd->dwWidth = dxw.GetScreenWidth(); - // SetPixFmt(lpddsd); + // GetPixFmt(lpddsd); // return; // break; // } @@ -2016,7 +1992,7 @@ void FixSurfaceCapsAnalytic(LPDDSURFACEDESC2 lpddsd, int dxversion) // dwFlags: DDSD_CAPS+HEIGHT+WIDTH+PIXELFORMAT+TEXTURESTAGE // dwCaps1: DDSCAPS_OFFSCREENPLAIN+SYSTEMMEMORY+TEXTURE // dwCaps2: DDSCAPS2_TEXTUREMANAGE - SetPixFmt(lpddsd); + GetPixFmt(lpddsd); return; break; case DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_ZBUFFERBITDEPTH: @@ -2067,54 +2043,54 @@ void FixSurfaceCapsAnalytic(LPDDSURFACEDESC2 lpddsd, int dxversion) break; case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_VIDEOMEMORY: // Alien Nations, Heroes of Might & Magic IV --- troublesome!!!! - //lpddsd->dwFlags = 0; - //lpddsd->ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY); - lpddsd->ddsCaps.dwCaps = 0; + lpddsd->dwFlags = (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT); + lpddsd->ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY); + GetPixFmt(lpddsd); return; break; case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY: // Cave Story, HoMM3 lpddsd->dwFlags |= DDSD_PIXELFORMAT; - SetPixFmt(lpddsd); + GetPixFmt(lpddsd); return; break; case DDSCAPS_SYSTEMMEMORY: // Magic & Mayhem lpddsd->dwFlags |= DDSD_PIXELFORMAT; lpddsd->ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN; - SetPixFmt(lpddsd); + GetPixFmt(lpddsd); return; break; case DDSCAPS_OFFSCREENPLAIN: // Cave Story, Magic & Mayhem lpddsd->dwFlags |= DDSD_PIXELFORMAT; lpddsd->ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN; - SetPixFmt(lpddsd); + GetPixFmt(lpddsd); return; break; case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_3DDEVICE: // Nightmare Ned lpddsd->dwFlags |= DDSD_PIXELFORMAT; - SetPixFmt(lpddsd); + GetPixFmt(lpddsd); return; break; case DDSCAPS_SYSTEMMEMORY|DDSCAPS_3DDEVICE: // Actua Soccer 3 lpddsd->dwFlags |= DDSD_PIXELFORMAT; - SetPixFmt(lpddsd); + GetPixFmt(lpddsd); return; break; case DDSCAPS_VIDEOMEMORY|DDSCAPS_3DDEVICE: // Actua Soccer 3 lpddsd->dwFlags |= DDSD_PIXELFORMAT; lpddsd->ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_3DDEVICE; - SetPixFmt(lpddsd); + GetPixFmt(lpddsd); return; break; case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_3DDEVICE|DDSCAPS_SYSTEMMEMORY: // Nightmare Ned, The Sims ??? lpddsd->dwFlags |= DDSD_PIXELFORMAT; - SetPixFmt(lpddsd); + GetPixFmt(lpddsd); return; break; } @@ -2139,14 +2115,26 @@ void FixSurfaceCapsAnalytic(LPDDSURFACEDESC2 lpddsd, int dxversion) lpddsd->ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_3DDEVICE|DDSCAPS_SYSTEMMEMORY); // eotry return; - break; case DDSCAPS_OFFSCREENPLAIN: + break; + case DDSCAPS_OFFSCREENPLAIN: // Submarine titans (8BPP) lpddsd->ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); - SetPixFmt(lpddsd); + GetPixFmt(lpddsd); return; break; case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY: - // Duckman, HoM&M4 + // Duckman, HoM&M4, Beavis & Butthead do U. + // unsetting the Pixel Format may cause the backbuffer to be created with DDPF_ALPHAPIXELS flag on + // and some generic surface with DDPF_ALPHAPIXELS off, so that blitting is unsupported. + // But it seems impossible to get HOMM4 to cope with Beavis & Butthead!!! + if(!(dxw.dwFlags3 & NOPIXELFORMAT)) GetPixFmt(lpddsd); + return; + break; + case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_VIDEOMEMORY: + // Dungeon Keeper II GOG release (intro screen): doesn't like calling GetPixFmt!!! + // need not to be configurable until we get a different case. + // it works both on VIDEOMEMORY or SYSTEMMEMORY. The latter should be more stable. + lpddsd->ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); return; break; case DDSCAPS_SYSTEMMEMORY|DDSCAPS_ZBUFFER: @@ -2154,7 +2142,7 @@ void FixSurfaceCapsAnalytic(LPDDSURFACEDESC2 lpddsd, int dxversion) return; break; case DDSCAPS_SYSTEMMEMORY|DDSCAPS_TEXTURE: - // Wargames Direct3D hw acceleration + // Wargames Direct3D hw acceleration // Star Wars Shadows of the Empire in RGB HEL mode return; break; @@ -2174,7 +2162,7 @@ void FixSurfaceCapsAnalytic(LPDDSURFACEDESC2 lpddsd, int dxversion) break; case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY|DDSCAPS_3DDEVICE: // Premier Manager 98 - SetPixFmt(lpddsd); + GetPixFmt(lpddsd); return; break; case DDSCAPS_OVERLAY|DDSCAPS_VIDEOMEMORY: // NOT WORKING @@ -2185,16 +2173,15 @@ void FixSurfaceCapsAnalytic(LPDDSURFACEDESC2 lpddsd, int dxversion) case DDSCAPS_SYSTEMMEMORY: // Star Force Deluxe lpddsd->ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY; - // SetPixFmt(lpddsd); + // GetPixFmt(lpddsd); return; break; case DDSCAPS_TEXTURE|DDSCAPS_VIDEOMEMORY|DDSCAPS_ALLOCONLOAD: // Star Wars Shadows of the Empire - // seems to work both with/without SetPixFmt, but doesn't like DDSCAPS_SYSTEMMEMORY textures. - // Setting SetPixFmt makes bad alpha transparencies! + // seems to work both with/without GetPixFmt, but doesn't like DDSCAPS_SYSTEMMEMORY textures. + // Setting GetPixFmt makes bad alpha transparencies! // DDSCAPS_VIDEOMEMORY doesn't work with HEL only! Better switch to DDSCAPS_SYSTEMMEMORY. if (dxw.dwFlags3 & FORCESHEL) lpddsd->ddsCaps.dwCaps = (DDSCAPS_TEXTURE|DDSCAPS_SYSTEMMEMORY|DDSCAPS_ALLOCONLOAD); - //SetPixFmt(lpddsd); return; break; } @@ -2204,7 +2191,7 @@ void FixSurfaceCapsAnalytic(LPDDSURFACEDESC2 lpddsd, int dxversion) case DDSCAPS_SYSTEMMEMORY: // Wargames lpddsd->ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); - SetPixFmt(lpddsd); + GetPixFmt(lpddsd); //lpddsd->dwFlags = DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PITCH; // turn DDSD_PIXELFORMAT off return; break; @@ -2237,6 +2224,8 @@ static void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion) // 5) ignore DDSD_CKSRCBLT, .... // 6) setting a different pixel format in memory requires DDSCAPS_OFFSCREENPLAIN capability // 7) DDSD_TEXTURESTAGE surfaces may need to adjust fixel format (....???) + // 8) Generic surfaces are mapped to SYSTEMMEMORY and set to primary surface PixelFormat + // 9) When pixelformat is unspecified, be sure to pick the right one (with or without alphapixels?) if(!(lpddsd->dwFlags & DDSD_CAPS)) lpddsd->ddsCaps.dwCaps = 0; @@ -2251,7 +2240,7 @@ static void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion) } if((lpddsd->dwFlags & (DDSD_PIXELFORMAT|DDSD_TEXTURESTAGE)) == (DDSD_PIXELFORMAT|DDSD_TEXTURESTAGE)){ // textures, set proper color depth and make no further changes - SetPixFmt(lpddsd); + GetPixFmt(lpddsd); return; } if((lpddsd->dwFlags & DDSD_CAPS) && (lpddsd->ddsCaps.dwCaps & DDSCAPS_ZBUFFER)) { // z-buffer surface - set to memory @@ -2261,7 +2250,7 @@ static void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion) if((lpddsd->dwFlags & DDSD_CAPS) && (lpddsd->ddsCaps.dwCaps & DDSCAPS_3DDEVICE)) { // 3DDEVICE: enforce PIXELFORMAT on MEMORY lpddsd->dwFlags |= DDSD_PIXELFORMAT; lpddsd->ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY|DDSCAPS_3DDEVICE); - SetPixFmt(lpddsd); + GetPixFmt(lpddsd); return; } //// DDSCAPS_ALLOCONLOAD on VIDEOMEMORY can't be done when HAL is disabled - it returns DDERR_NODIRECTDRAWHW error @@ -2282,28 +2271,23 @@ static void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion) if(lpddsd->dwFlags & DDSD_ZBUFFERBITDEPTH){ lpddsd->dwFlags &= ~DDSD_PIXELFORMAT; } +#if 0 // HoM&M3/4 fix.... if(((lpddsd->dwFlags & (DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT)) == (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH)) && - (lpddsd->ddsCaps.dwCaps == (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_VIDEOMEMORY))){ - lpddsd->ddsCaps.dwCaps = 0; + ((lpddsd->ddsCaps.dwCaps & ~(DDSCAPS_SYSTEMMEMORY|DDSCAPS_VIDEOMEMORY) == DDSCAPS_OFFSCREENPLAIN)){ + //lpddsd->ddsCaps.dwCaps = 0; + lpddsd->dwFlags = (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT); + lpddsd->ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY); + GetPixFmt(lpddsd); return; } - // HoM&M3/4 fix.... don't alter pixel format set to OFFSCREENPLAIN+SYSTEMMEMORY surface - if(((lpddsd->dwFlags & (DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT)) == (DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT)) && - (lpddsd->ddsCaps.dwCaps == (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY))){ - return; - } - if(((lpddsd->dwFlags & (DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT)) == (DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT)) && - (lpddsd->ddsCaps.dwCaps == (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY))){ - return; - } - +#endif // default case: adjust pixel format OutTraceB("FixSurfaceCaps: suppress DDSCAPS_VIDEOMEMORY case\n"); lpddsd->dwFlags |= (DDSD_CAPS|DDSD_PIXELFORMAT); lpddsd->ddsCaps.dwCaps &= ~DDSCAPS_VIDEOMEMORY; lpddsd->ddsCaps.dwCaps |= (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); - SetPixFmt(lpddsd); + if(!(dxw.dwFlags3 & NOPIXELFORMAT)) GetPixFmt(lpddsd); return; } @@ -2322,6 +2306,14 @@ static HRESULT BuildPrimaryEmu(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurf // emulated primary surface memcpy((void *)&ddsd, lpddsd, lpddsd->dwSize); + + // handle the surface attributes before the ddsd.dwFlags gets updated: + // if a surface desc is NOT specified, build one + if(!(ddsd.dwFlags & DDSD_PIXELFORMAT)) SetPixFmt((LPDDSURFACEDESC2)&ddsd); + // then save it + dxw.VirtualPixelFormat = ddsd.ddpfPixelFormat; + + OutTraceD("DDSD_PIXELFORMAT: color=%d flags=%x\n", dxw.VirtualPixelFormat.dwRGBBitCount, dxw.VirtualPixelFormat.dwFlags); ddsd.dwFlags &= ~(DDSD_BACKBUFFERCOUNT|DDSD_REFRESHRATE); ddsd.dwFlags |= (DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT); ddsd.ddsCaps.dwCaps &= ~(DDSCAPS_PRIMARYSURFACE|DDSCAPS_FLIP|DDSCAPS_COMPLEX|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); @@ -2329,7 +2321,6 @@ static HRESULT BuildPrimaryEmu(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurf ddsd.ddsCaps.dwCaps |= (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); ddsd.dwWidth = dxw.GetScreenWidth(); ddsd.dwHeight = dxw.GetScreenHeight(); - SetPixFmt((LPDDSURFACEDESC2)&ddsd); // create Primary surface DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Primary]" , __LINE__); @@ -2358,7 +2349,7 @@ static HRESULT BuildPrimaryEmu(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurf ClearSurfaceDesc((void *)&ddsd, dxversion); ddsd.dwFlags = DDSD_CAPS; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - SetPixFmt(&ddsd); + GetPixFmt(&ddsd); DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[EmuPrim]" , __LINE__); res=(*pCreateSurface)(lpdd, &ddsd, &lpDDSEmu_Prim, 0); @@ -2477,7 +2468,7 @@ static HRESULT BuildBackBufferEmu(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateS ddsd.ddsCaps.dwCaps |= (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); ddsd.dwWidth = dxw.GetScreenWidth(); ddsd.dwHeight = dxw.GetScreenHeight(); - SetPixFmt(&ddsd); + GetPixFmt(&ddsd); DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Backbuf]" , __LINE__); res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, 0); @@ -2977,11 +2968,13 @@ HRESULT WINAPI sBlt(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, // debug suppressions if(ToPrim){ - if(isFlipping) + if(isFlipping){ if(dxw.dwFlags3 & NODDRAWFLIP) return DD_OK; - else + } + else { if(dxw.dwFlags3 & NODDRAWBLT) return DD_OK; } + } #ifdef ONEPIXELFIX if (lpdestrect){ @@ -3033,6 +3026,8 @@ HRESULT WINAPI sBlt(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, res= (*pBlt)(lpdds, lpdestrect, lpddssrc, lpsrcrect ? &srcrect : NULL, dwflags, lpddbltfx); // Blitting compressed data may work to screen surfaces only. In this case, it may be worth // trying blitting directly to lpDDSEmu_Prim: it makes DK2 intro movies working. + // Wrong guess!!! The cause was not compression, but simply a pixelformat mismatch. Better + // configure things properly and avoid this branch. switch(res){ case DDERR_UNSUPPORTED: if (dxw.dwFlags1 & EMULATESURFACE){ @@ -3338,44 +3333,6 @@ HRESULT WINAPI extBltFast(LPDIRECTDRAWSURFACE lpdds, DWORD dwx, DWORD dwy, return ret; } -#define DDPCAPS_INITIALIZE_LEGACY 0x00000008l - -HRESULT WINAPI extCreatePalette(LPDIRECTDRAW lpdd, DWORD dwflags, LPPALETTEENTRY lpddpa, - LPDIRECTDRAWPALETTE *lplpddp, IUnknown *pu) -{ - HRESULT res; - - OutTraceD("CreatePalette: dwFlags=%x(%s)\n", dwflags, ExplainCreatePaletteFlags(dwflags)); - - if(!(dxw.dwFlags1 & EMULATESURFACE)){ - res = (*pCreatePalette)(lpdd, dwflags, lpddpa, lplpddp, pu); - if (res) { - OutTraceD("CreatePalette: res=%x(%s)\n", res, ExplainDDError(res)); - return res; - } - HookDDPalette(lplpddp); - OutTraceD("CreatePalette: GENUINE lpddp=%x\n", *lplpddp); - return res; - } - - if (dwflags & ~(DDPCAPS_PRIMARYSURFACE|DDPCAPS_8BIT|DDPCAPS_ALLOW256|DDPCAPS_INITIALIZE_LEGACY)) STOPPER("Palette flags"); - - res = (*pCreatePalette)(lpdd, dwflags & ~DDPCAPS_PRIMARYSURFACE, lpddpa, lplpddp, pu); - if(res) { - if (res) OutTraceD("CreatePalette: res=%x(%s)\n", res, ExplainDDError(res)); - return res; - } - - HookDDPalette(lplpddp); - - if((dwflags & (DDPCAPS_8BIT|DDPCAPS_PRIMARYSURFACE)) == (DDPCAPS_8BIT|DDPCAPS_PRIMARYSURFACE)){ // v2.02.39 - mySetPalette(0, 256, lpddpa); - lpDDP = *lplpddp; - } - OutTraceD("CreatePalette: EMULATED lpddp=%x\n", *lplpddp); - return 0; -} - HRESULT WINAPI extWaitForVerticalBlank(LPDIRECTDRAW lpdd, DWORD dwflags, HANDLE hevent) { static DWORD time = 0; @@ -3391,7 +3348,37 @@ HRESULT WINAPI extWaitForVerticalBlank(LPDIRECTDRAW lpdd, DWORD dwflags, HANDLE return 0; } -// extGetPalette: To revise completely. +#define DDPCAPS_INITIALIZE_LEGACY 0x00000008l + +HRESULT WINAPI extCreatePalette(LPDIRECTDRAW lpdd, DWORD dwflags, LPPALETTEENTRY lpddpa, + LPDIRECTDRAWPALETTE *lplpddp, IUnknown *pu) +{ + HRESULT res; + + OutTraceD("CreatePalette: dwFlags=%x(%s)\n", dwflags, ExplainCreatePaletteFlags(dwflags)); + if(IsDebug && (dwflags & DDPCAPS_8BIT)){ + int idx; + OutTrace("CreatePalette: "); + for(idx=0; idx<256; idx++) OutTrace("(%02x.%02x.%02x)", + lpddpa[idx].peRed, + lpddpa[idx].peGreen, + lpddpa[idx].peBlue ); + OutTrace("\n"); + } + + if (dwflags & ~(DDPCAPS_PRIMARYSURFACE|DDPCAPS_8BIT|DDPCAPS_ALLOW256|DDPCAPS_INITIALIZE_LEGACY)) STOPPER("Palette flags"); + + if(dxw.dwFlags1 & EMULATESURFACE) dwflags &= ~DDPCAPS_PRIMARYSURFACE; + res = (*pCreatePalette)(lpdd, dwflags, lpddpa, lplpddp, pu); + if (res) { + OutTraceE("CreatePalette: ERROR res=%x(%s)\n", res, ExplainDDError(res)); + return res; + } + else OutTrace("CreatePalette: OK lpddp=%x\n", *lplpddp); + + HookDDPalette(lplpddp); + return 0; +} HRESULT WINAPI extGetPalette(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWPALETTE *lplpddp) { @@ -3399,24 +3386,10 @@ HRESULT WINAPI extGetPalette(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWPALETTE *lpl OutTraceD("GetPalette: lpdds=%x\n", lpdds); - // if NO-EMU mode, just proxy the call - if(!(dxw.dwFlags1 & EMULATESURFACE)){ - res=(*pGetPalette)(lpdds, lplpddp); - if (res) OutTraceE("GetPalette: ERROR res=%x(%s)\n", res, ExplainDDError(res)); - return 0; - return res; - } - - // in EMU mode, return the global palette ptr - if (lpDDP){ - *lplpddp = lpDDP; - return 0; - } - else { - OutTraceD("GetPalette: ASSERT no lpDDP\n"); - *lplpddp = lpDDP; - return DDERR_NOPALETTEATTACHED; - } + res=(*pGetPalette)(lpdds, lplpddp); + if (res) OutTraceE("GetPalette: ERROR res=%x(%s)\n", res, ExplainDDError(res)); + else OutTrace("GetPalette: OK\n"); + return res; } HRESULT WINAPI extSetPalette(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWPALETTE lpddp) @@ -3425,17 +3398,17 @@ HRESULT WINAPI extSetPalette(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWPALETTE lpdd BOOL isPrim; HRESULT res; - dxw.IsGDIPalette=FALSE; isPrim=dxw.IsAPrimarySurface(lpdds); OutTraceD("SetPalette: lpdds=%x%s lpddp=%x\n", lpdds, isPrim?"(PRIM)":"", lpddp); res=(*pSetPalette)(lpdds, lpddp); + res=DD_OK; if(res)OutTraceE("SetPalette: ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + else OutTrace("SetPalette: OK\n"); - if(dxw.dwFlags1 & EMULATESURFACE){ - OutTraceD("SetPalette: DEBUG emulating palette\n"); + if((dxw.dwFlags1 & EMULATESURFACE) && isPrim){ + OutTraceD("SetPalette: register PRIMARY palette lpDDP=%x\n", lpddp); lpDDP = lpddp; - if(lpddp){ HRESULT res2; lpentries = (LPPALETTEENTRY)PaletteEntries; @@ -3453,31 +3426,30 @@ HRESULT WINAPI extSetEntries(LPDIRECTDRAWPALETTE lpddp, DWORD dwflags, DWORD dws { HRESULT res; - dxw.IsGDIPalette=FALSE; OutTraceD("SetEntries: lpddp=%x dwFlags=%x, start=%d, count=%d entries=%x\n", //GHO: added trace infos lpddp, dwflags, dwstart, dwcount, lpentries); res = (*pSetEntries)(lpddp, dwflags, dwstart, dwcount, lpentries); if(res) OutTraceE("SetEntries: ERROR res=%x(%s)\n", res, ExplainDDError(res)); + else OutTrace("SetEntries: OK\n"); - if(!(dxw.dwFlags1 & EMULATESURFACE) || lpDDP != lpddp){ - return res; + if((dxw.dwFlags1 & EMULATESURFACE) && (lpDDP == lpddp)){ + OutTraceD("SetEntries: update PRIMARY palette lpDDP=%x\n", lpddp); + if ((dwstart + dwcount > 256) || (dwstart<0)){ + dwcount=256; + dwstart=0; + OutTraceD("SetEntries: ASSERT start+count > 256\n"); + } + + mySetPalette(dwstart, dwcount, lpentries); + + // GHO: needed for fixed rect and variable palette animations, + // e.g. dungeon keeper loading screen, Warcraft II splash, ... + // GHO: but refreshing cause flickering when GDI was used without updating the primary surface + // e.g. Tomb Raider 2 intro titles, Virtua Fighter PC, ... + if ((dxw.dwFlags1 & EMULATESURFACE) && !(dxw.dwFlags2 & NOPALETTEUPDATE)) dxw.ScreenRefresh(); } - - if ((dwstart + dwcount > 256) || (dwstart<0)){ - dwcount=256; - dwstart=0; - OutTraceD("SetEntries: ASSERT start+count > 256\n"); - } - - mySetPalette(dwstart, dwcount, lpentries); - - // GHO: needed for fixed rect and variable palette animations, - // e.g. dungeon keeper loading screen, Warcraft II splash, ... - // GHO: but refreshing cause flickering when GDI was used without updating the primary surface - // e.g. Tomb Raider 2 intro titles - if ((dxw.dwFlags1 & EMULATESURFACE) && !(dxw.dwFlags2 & NOPALETTEUPDATE)) dxw.ScreenRefresh(); - return 0; + return res; } HRESULT WINAPI extSetClipper(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWCLIPPER lpddc) @@ -3772,7 +3744,6 @@ HRESULT WINAPI extFlipToGDISurface(LPDIRECTDRAW lpdd) //HRESULT res; OutTraceD("FlipToGDISurface: lpdd=%x\n", lpdd); - STOPPER("FlipToGDISurface"); // to revise: so far, it seems the best thing to do is NOTHING, just return 0. //res=(*pFlipToGDISurface)(lpdd); //if (res) OutTraceE("FlipToGDISurface: ERROR res=%x(%s), skipping\n", res, ExplainDDError(res)); @@ -3814,14 +3785,7 @@ HRESULT WINAPI EnumModesCallbackDumper(LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID l OutTrace("\tdwBackBufferCount=%d\n", lpDDSurfaceDesc->dwBackBufferCount); OutTrace("\tdwRefreshRate=%d\n", lpDDSurfaceDesc->dwRefreshRate); OutTrace("\tlpSurface=%x\n", lpDDSurfaceDesc->lpSurface); - OutTrace("\tddpfPixelFormat.dwSize=%D\n", lpDDSurfaceDesc->ddpfPixelFormat.dwSize); - OutTrace("\tddpfPixelFormat.dwFlags=%x\n", lpDDSurfaceDesc->ddpfPixelFormat.dwFlags); - OutTrace("\tddpfPixelFormat.dwRGBBitCount=%d\n", lpDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount); - OutTrace("\tddpfPixelFormat.dwARGBBitMask=(%x,%x,%x,%x)\n", - lpDDSurfaceDesc->ddpfPixelFormat.dwRGBAlphaBitMask, - lpDDSurfaceDesc->ddpfPixelFormat.dwRBitMask, - lpDDSurfaceDesc->ddpfPixelFormat.dwGBitMask, - lpDDSurfaceDesc->ddpfPixelFormat.dwBBitMask); + OutTrace("\tddpfPixelFormat %s\n", DumpPixelFormat((LPDDSURFACEDESC2)lpDDSurfaceDesc)); return DDENUMRET_OK; } diff --git a/dll/dxhelper.cpp b/dll/dxhelper.cpp index 51f8b05..974657b 100644 --- a/dll/dxhelper.cpp +++ b/dll/dxhelper.cpp @@ -298,30 +298,43 @@ char *ExplainDDFXCaps(DWORD c) return(eb); } +char *ExplainDDPalCaps(DWORD c) +{ + static char eb[256]; + unsigned int l; + strcpy(eb,"DDPCAPS_"); + if (c & DDPCAPS_ALPHA) strcat(eb, "ALPHA+"); + if (c & DDPCAPS_PRIMARYSURFACE) strcat(eb, "PRIMARYSURFACE+"); + l=strlen(eb); + if (l>strlen("DDPCAPS_")) eb[l-1]=0; // delete last '+' if any + else eb[0]=0; + return(eb); +} + char *ExplainDDCKeyCaps(DWORD c) { static char eb[512]; unsigned int l; strcpy(eb,"DDCKEYCAPS_"); - if (c & DDCKEYCAPS_DESTBLT) strcat(eb, "DDCKEYCAPS_DESTBLT+"); - if (c & DDCKEYCAPS_DESTBLTCLRSPACE) strcat(eb, "DDCKEYCAPS_DESTBLTCLRSPACE+"); - if (c & DDCKEYCAPS_DESTBLTCLRSPACEYUV) strcat(eb, "DDCKEYCAPS_DESTBLTCLRSPACEYUV+"); - if (c & DDCKEYCAPS_DESTBLTYUV) strcat(eb, "DDCKEYCAPS_DESTBLTYUV+"); - if (c & DDCKEYCAPS_DESTOVERLAY) strcat(eb, "DDCKEYCAPS_DESTOVERLAY+"); - if (c & DDCKEYCAPS_DESTOVERLAYCLRSPACE) strcat(eb, "DDCKEYCAPS_DESTOVERLAYCLRSPACE+"); - if (c & DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV) strcat(eb, "DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV+"); - if (c & DDCKEYCAPS_DESTOVERLAYONEACTIVE) strcat(eb, "DDCKEYCAPS_DESTOVERLAYONEACTIVE+"); - if (c & DDCKEYCAPS_DESTOVERLAYYUV) strcat(eb, "DDCKEYCAPS_DESTOVERLAYYUV+"); - if (c & DDCKEYCAPS_SRCBLT) strcat(eb, "DDCKEYCAPS_SRCBLT+"); - if (c & DDCKEYCAPS_SRCBLTCLRSPACE) strcat(eb, "DDCKEYCAPS_SRCBLTCLRSPACE+"); - if (c & DDCKEYCAPS_SRCBLTCLRSPACEYUV) strcat(eb, "DDCKEYCAPS_SRCBLTCLRSPACEYUV+"); - if (c & DDCKEYCAPS_SRCBLTYUV) strcat(eb, "DDCKEYCAPS_SRCBLTYUV+"); - if (c & DDCKEYCAPS_SRCOVERLAY) strcat(eb, "DDCKEYCAPS_SRCOVERLAY+"); - if (c & DDCKEYCAPS_SRCOVERLAYCLRSPACE) strcat(eb, "DDCKEYCAPS_SRCOVERLAYCLRSPACE+"); - if (c & DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV) strcat(eb, "DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV+"); - if (c & DDCKEYCAPS_SRCOVERLAYONEACTIVE) strcat(eb, "DDCKEYCAPS_SRCOVERLAYONEACTIVE+"); - if (c & DDCKEYCAPS_SRCOVERLAYYUV) strcat(eb, "DDCKEYCAPS_SRCOVERLAYYUV+"); - if (c & DDCKEYCAPS_NOCOSTOVERLAY) strcat(eb, "DDCKEYCAPS_NOCOSTOVERLAY+"); + if (c & DDCKEYCAPS_DESTBLT) strcat(eb, "DESTBLT+"); + if (c & DDCKEYCAPS_DESTBLTCLRSPACE) strcat(eb, "DESTBLTCLRSPACE+"); + if (c & DDCKEYCAPS_DESTBLTCLRSPACEYUV) strcat(eb, "DESTBLTCLRSPACEYUV+"); + if (c & DDCKEYCAPS_DESTBLTYUV) strcat(eb, "DESTBLTYUV+"); + if (c & DDCKEYCAPS_DESTOVERLAY) strcat(eb, "DESTOVERLAY+"); + if (c & DDCKEYCAPS_DESTOVERLAYCLRSPACE) strcat(eb, "DESTOVERLAYCLRSPACE+"); + if (c & DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV) strcat(eb, "DESTOVERLAYCLRSPACEYUV+"); + if (c & DDCKEYCAPS_DESTOVERLAYONEACTIVE) strcat(eb, "DESTOVERLAYONEACTIVE+"); + if (c & DDCKEYCAPS_DESTOVERLAYYUV) strcat(eb, "DESTOVERLAYYUV+"); + if (c & DDCKEYCAPS_SRCBLT) strcat(eb, "SRCBLT+"); + if (c & DDCKEYCAPS_SRCBLTCLRSPACE) strcat(eb, "SRCBLTCLRSPACE+"); + if (c & DDCKEYCAPS_SRCBLTCLRSPACEYUV) strcat(eb, "SRCBLTCLRSPACEYUV+"); + if (c & DDCKEYCAPS_SRCBLTYUV) strcat(eb, "SRCBLTYUV+"); + if (c & DDCKEYCAPS_SRCOVERLAY) strcat(eb, "SRCOVERLAY+"); + if (c & DDCKEYCAPS_SRCOVERLAYCLRSPACE) strcat(eb, "SRCOVERLAYCLRSPACE+"); + if (c & DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV) strcat(eb, "SRCOVERLAYCLRSPACEYUV+"); + if (c & DDCKEYCAPS_SRCOVERLAYONEACTIVE) strcat(eb, "SRCOVERLAYONEACTIVE+"); + if (c & DDCKEYCAPS_SRCOVERLAYYUV) strcat(eb, "SRCOVERLAYYUV+"); + if (c & DDCKEYCAPS_NOCOSTOVERLAY) strcat(eb, "NOCOSTOVERLAY+"); l=strlen(eb); if (l>strlen("DDCKEYCAPS_")) eb[l-1]=0; // delete last '+' if any else eb[0]=0; @@ -1521,8 +1534,16 @@ char *ExplainGetDCExFlags(DWORD c) return(eb); } - - +char *ExplainPaletteUse(UINT uUsage) +{ + char *eb = SYSPAL_ERROR; + switch(uUsage){ + case SYSPAL_STATIC: eb="SYSPAL_STATIC"; break; + case SYSPAL_NOSTATIC: eb="SYSPAL_NOSTATIC"; break; + case SYSPAL_NOSTATIC256: eb="SYSPAL_NOSTATIC256"; break; + } + return eb; +} diff --git a/dll/dxhelper.h b/dll/dxhelper.h index fe9e0c3..43d2dc1 100644 --- a/dll/dxhelper.h +++ b/dll/dxhelper.h @@ -7,6 +7,7 @@ extern char *ExplainDDSCaps2(DWORD); extern char *ExplainDDSCaps3(DWORD); extern char *ExplainDDDCaps(DWORD); extern char *ExplainDDDCaps2(DWORD); +extern char *ExplainDDPalCaps(DWORD); extern char *ExplainDDFXALPHACaps(DWORD); extern char *ExplainDDFXCaps(DWORD); extern char *ExplainDDCKeyCaps(DWORD); @@ -43,3 +44,4 @@ extern char *ExplainRegType(DWORD); extern char *ExplainDCType(DWORD); extern char *ExplainPeekRemoveMsg(DWORD); extern char *ExplainGetDCExFlags(DWORD); +extern char *ExplainPaletteUse(UINT); diff --git a/dll/dxhook.cpp b/dll/dxhook.cpp index 4318226..7f07da1 100644 --- a/dll/dxhook.cpp +++ b/dll/dxhook.cpp @@ -59,9 +59,9 @@ static char *Flag3Names[32]={ "SAVECAPS", "SINGLEPROCAFFINITY", "EMULATEREGISTRY", "CDROMDRIVETYPE", "NOWINDOWMOVE", "DISABLEHAL", "LOCKSYSCOLORS", "EMULATEDC", "FULLSCREENONLY", "FONTBYPASS", "YUV2RGB", "RGB2YUV", - "BUFFEREDIOFIX", "FILTERMESSAGES", "Flags3:23", "Flags3:24", - "Flags3:25", "Flags3:26", "Flags3:27", "Flags3:28", - "Flags3:29", "Flags3:30", "Flags3:31", "Flags3:32", + "BUFFEREDIOFIX", "FILTERMESSAGES", "PEEKALLMESSAGES", "SURFACEWARN", + "ANALYTICMODE", "FORCESHEL", "CAPMASK", "COLORFIX", + "NODDRAWBLT", "NODDRAWFLIP", "NOGDIBLT", "NOPIXELFORMAT", }; static char *Flag4Names[32]={ @@ -490,12 +490,12 @@ void *HookAPI(HMODULE module, char *dll, void *apiproc, const char *apiname, voi __try{ pnth = PIMAGE_NT_HEADERS(PBYTE(base) + PIMAGE_DOS_HEADER(base)->e_lfanew); if(!pnth) { - OutTraceE("HookAPI: ERROR no PNTH at %d\n", __LINE__); + OutTraceH("HookAPI: ERROR no PNTH at %d\n", __LINE__); return 0; } rva = pnth->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress; if(!rva) { - OutTraceE("HookAPI: ERROR no RVA at %d\n", __LINE__); + OutTraceH("HookAPI: ERROR no RVA at %d\n", __LINE__); return 0; } pidesc = (PIMAGE_IMPORT_DESCRIPTOR)(base + rva); @@ -778,6 +778,17 @@ LRESULT CALLBACK extChildWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPAR return DefWindowProc(hwnd, message, wparam, lparam); } +static void dx_UpdatePositionLock(HWND hwnd) +{ + RECT rect; + POINT p={0,0}; + (*pGetClientRect)(hwnd,&rect); + (*pClientToScreen)(hwnd,&p); + dxw.dwFlags1 |= LOCKWINPOS; + OutTraceD("Toggle position lock ON\n"); + dxw.InitWindowPos(p.x, p.y, rect.right-rect.left, rect.bottom-rect.top); +} + static void dx_TogglePositionLock(HWND hwnd) { // toggle position locking @@ -787,15 +798,9 @@ static void dx_TogglePositionLock(HWND hwnd) dxw.dwFlags1 &= ~LOCKWINPOS; } else { - // lock and update window position!!! - // v2.1.80: fixed - RECT rect; - POINT p={0,0}; - (*pGetClientRect)(hwnd,&rect); - (*pClientToScreen)(hwnd,&p); - dxw.dwFlags1 |= LOCKWINPOS; OutTraceD("Toggle position lock ON\n"); - dxw.InitWindowPos(p.x, p.y, rect.right-rect.left, rect.bottom-rect.top); + dxw.dwFlags1 |= LOCKWINPOS; + dx_UpdatePositionLock(hwnd); } } @@ -834,6 +839,13 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp WNDPROC pWindowProc; extern void dxwFixWindowPos(char *, HWND, LPARAM); extern LPRECT lpClipRegion; + static BOOL DoOnce = TRUE; + static BOOL IsToBeLocked; + + if(DoOnce){ + DoOnce=FALSE; + IsToBeLocked=(dxw.dwFlags1 & LOCKWINPOS); + } // v2.1.93: adjust clipping region @@ -974,11 +986,18 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp OutTraceD("WindowProc: WM_WINDOWPOSCHANGING fixed size=(%d,%d)\n", wp->cx, wp->cy); break; case WM_ENTERSIZEMOVE: + if(IsToBeLocked){ + dxw.dwFlags1 &= ~LOCKWINPOS; + } while((*pShowCursor)(1) < 0); if(dxw.dwFlags1 & CLIPCURSOR) dxw.EraseClipCursor(); if(dxw.dwFlags1 & ENABLECLIPPING) (*pClipCursor)(NULL); break; case WM_EXITSIZEMOVE: + if(IsToBeLocked){ + dxw.dwFlags1 |= LOCKWINPOS; + dx_UpdatePositionLock(hwnd); + } if (dxw.dwFlags1 & HIDEHWCURSOR) while((*pShowCursor)(0) >= 0); if (dxw.dwFlags2 & SHOWHWCURSOR) while((*pShowCursor)(1) < 0); if(dxw.dwFlags1 & ENABLECLIPPING) extClipCursor(lpClipRegion); diff --git a/dll/dxwcore.cpp b/dll/dxwcore.cpp index 2acefb4..d6cc899 100644 --- a/dll/dxwcore.cpp +++ b/dll/dxwcore.cpp @@ -25,7 +25,7 @@ dxwCore::dxwCore() TimeShift = 0; lpDDSPrimHDC = NULL; //IsWithinDDraw = FALSE; - IsGDIPalette = FALSE; + //IsGDIPalette = FALSE; memset(PrimSurfaces, 0, sizeof(PrimSurfaces)); ResetEmulatedDC(); } diff --git a/dll/dxwcore.hpp b/dll/dxwcore.hpp index 43da889..e144ceb 100644 --- a/dll/dxwcore.hpp +++ b/dll/dxwcore.hpp @@ -105,7 +105,7 @@ public: // simple data variables short iSizX; short iSizY; //BOOL IsWithinDDraw; // flag to avoid double intervention at ddraw & GDI level - BOOL IsGDIPalette; + //BOOL IsGDIPalette; char *CustomOpenGLLib; WORD palVersion; WORD palNumEntries; diff --git a/dll/dxwnd.aps b/dll/dxwnd.aps index 398eefeb91e094c744b2ac6ce79b451557b58a3f..8d34f5abdb85414028ed3ac57c5c72829e2afcab 100644 GIT binary patch delta 32 ncmZ3mjA_9#rU~IpCI%ZLh5MOJ7z{S&_bW32`J1Oq>|q1|wJ8dc delta 32 ncmZ3mjA_9#rU~Ip#>N{Xh5MO}8H_jQ_bW32`J1Oq>|q1|wRsAd diff --git a/dll/dxwnd.cpp b/dll/dxwnd.cpp index d01f7b6..0b2389f 100644 --- a/dll/dxwnd.cpp +++ b/dll/dxwnd.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . #include "dxwnd.h" #include "dxwcore.hpp" -#define VERSION "2.02.39" +#define VERSION "2.02.40" #define DDTHREADLOCK 1 diff --git a/dll/dxwnd.vs2008.suo b/dll/dxwnd.vs2008.suo index 50c1f0c632aaecc979404b6c7103d78df97dd3b6..4f3a3a1cffe8063f5bdf746b18a1e5fff5751393 100644 GIT binary patch delta 30100 zcmd6wcYGB^`}TMDBq2ZuAqgNgCkY815|YqM3cZGobWju#5fPB0o=^lkZ z98|hL|7Sy z|M0=!*_?i6)nL!q1bgpV-&N};HeO^leiH$oz^cIBeJ(rx$BU;fnc6`-ScCuKjj^te zxxRJN>wIRmJ>ovAO0cMPBm4V4X6(Y21;HH=nZb!IXPaAtzqSmR*9WJz>Kx^iu=3@6 zljdWW&%>AoykE-k;4xZ)e7b{269TpP3rMA@?iJS;d|aXQkT1clm0CmKK9Crx zTCm!%IaNS3~UB$!H7chV(8Bnrq8l_y=YblZmn4=^j1)=2{p72iQG3nQ3-$u9;|Wtz%U%XW8Z2n5o>sTV^Gv3|3V$ zG=8)>z+BwWtRAX9&HS>Yom~KV@&@yWx%efsYN+ZQ^H6M5R}1H7O?%oRGd<*g$UG8b zFFcLoIC7)uw~ur;!j{XEtr$CIrFp+w4I_4=8WQbg1t@pxhOD^Oi2Zt{xoFcSv#5ui(!i=* zG83cNHO6>jy#3=ub3y5r#?4q5WsEag+efc6Q_-A>_Skl2h0y&`)`low8Kab4Zl&2O zR8+<)vg~QA%sIBdi4|wZtur4%WpI48k2Er4trXLa>u5F&6|XaMO?&SiU*%Bc4Q9N# zIMG^UEhrI!A7k3Xn_Knl0UOPy?d{`yMWLcNtH@^$=ww!3+ze%PhMbNStm`7fR~|c~ zft855w{x4KGpws(-EDRaZp%yhYi&&I%j$gc566drdpB4aV`kSD^-D>spmVg&EfA3HG|t zW`^D1W?x*WXq8o5&ptKL%(W+sHgC88*lX>ySB^GY+p!g`csn-A$_VA|w~DKo4ec{* z4D{NVV1t8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iJOG2OCpl zMg2b>IFSk`!*a={!KRbVgv};<1ok-DV%QS0rXZaHkfP}Yy{aT*qEqk|BnYwjH1|NST5N#*mSa)uz6$w*g~?! zuvKJhBu~@XZwc3X*Z1)0nUs3e(6kU^!$%VYy_}VDrd=lJ}MqSxB}Fwz3>uHfsbU zlZXn}!#0p@f^8>z4fZFp1F(0<-i5svHSPanzz?G+_A%@<*{86t$i9YsL-sA~64_>je7us&q{VS~tqz=o2IP}A`rMK~6P z#(25Zo+PnIpvFHrz>sbY_v~ffN@b2D+P-uD+@~`s{pG^Ruxu< ztRAcZS!2l~*Hlx&R1~I>wS;AnwTE>i>jLXW)&n+xEC)8EJY7@6fMcm}0&F7L6xejK znXuVp^I!|fo`5}BY|{VBfGdho{v{a}BFlq4P4*0I1KDQScCy!CVY0W>bo}2XJc`0& zWXEA&l6?icM0OcgK=uRd7MYWTNhs}z=rt7sjFUEMrC{-7WntyWl3*3d?oeB6y@qmz z^~f8dwlP@>ES0PUEQ72ytSwmPJ>M+n+cmuHV+mcdla^i>A$$6+VQ&cHq;`&_$DAC_f7TVJ9mLxINR)06(R|&tYGZ zorRqv`v>fznvE;zwJrV?{THnImC8-UqG{)oHu`ZE3oA($4=YQS2umWX46Ab60#0>c z@@;hL!0M4Tf;Ay)25U~14r@hr7c7&kUBqN!bs+4F!fs?eV7m_DCEmulationMode = 0; + if(t->flags2 & HOOKGDI) dlg->m_DCEmulationMode = 1; + if(t->flags3 & EMULATEDC) dlg->m_DCEmulationMode = 2; + if(t->flags & MAPGDITOPRIMARY) dlg->m_DCEmulationMode = 3; +*/ + +static HookEntry_Type Hooks[]={ + {"GetDeviceCaps", (FARPROC)GetDeviceCaps, (FARPROC *)&pGDIGetDeviceCaps, (FARPROC)extGetDeviceCaps}, + {"ScaleWindowExtEx", (FARPROC)ScaleWindowExtEx, (FARPROC *)&pGDIScaleWindowExtEx, (FARPROC)extScaleWindowExtEx}, + {"SaveDC", (FARPROC)SaveDC, (FARPROC *)&pGDISaveDC, (FARPROC)extGDISaveDC}, + {"RestoreDC", (FARPROC)RestoreDC, (FARPROC *)&pGDIRestoreDC, (FARPROC)extGDIRestoreDC}, + {"CreatePalette", (FARPROC)CreatePalette, (FARPROC *)&pGDICreatePalette, (FARPROC)extGDICreatePalette}, + {"SelectPalette", (FARPROC)SelectPalette, (FARPROC *)&pGDISelectPalette, (FARPROC)extSelectPalette}, + {"RealizePalette", (FARPROC)RealizePalette, (FARPROC *)&pGDIRealizePalette, (FARPROC)extRealizePalette}, + {"GetSystemPaletteEntries", (FARPROC)GetSystemPaletteEntries, (FARPROC *)&pGDIGetSystemPaletteEntries, (FARPROC)extGetSystemPaletteEntries}, + {"StretchDIBits", (FARPROC)StretchDIBits, (FARPROC *)&pStretchDIBits, (FARPROC)extStretchDIBits}, + //{"SetDIBitsToDevice", (FARPROC)NULL, (FARPROC *)&pSetDIBitsToDevice, (FARPROC)extSetDIBitsToDevice}, + //{"CreateCompatibleBitmap", (FARPROC)NULL, (FARPROC *)&pCreateCompatibleBitmap, (FARPROC)extCreateCompatibleBitmap}, + {0, NULL, 0, 0} // terminator +}; + +static HookEntry_Type RemapHooks[]={ + {"SetViewportOrgEx", (FARPROC)SetViewportOrgEx, (FARPROC *)&pSetViewportOrgEx, (FARPROC)extSetViewportOrgEx}, // needed in ShowBanner + {"SetViewportExtEx", (FARPROC)NULL, (FARPROC *)&pSetViewportExtEx, (FARPROC)extSetViewportExtEx}, + {"GetViewportOrgEx", (FARPROC)NULL, (FARPROC *)&pGetViewportOrgEx, (FARPROC)extGetViewportOrgEx}, + {"GetWindowOrgEx", (FARPROC)NULL, (FARPROC *)&pGetWindowOrgEx, (FARPROC)extGetWindowOrgEx}, + {"SetWindowOrgEx", (FARPROC)NULL, (FARPROC *)&pSetWindowOrgEx, (FARPROC)extSetWindowOrgEx}, + {"GetCurrentPositionEx", (FARPROC)NULL, (FARPROC *)&pGetCurrentPositionEx, (FARPROC)extGetCurrentPositionEx}, + {"StretchDIBits", (FARPROC)StretchDIBits, (FARPROC *)&pStretchDIBits, (FARPROC)extStretchDIBits}, // unuseful + {"SetDIBitsToDevice", (FARPROC)NULL, (FARPROC *)&pSetDIBitsToDevice, (FARPROC)extSetDIBitsToDevice}, // does the stretching + {0, NULL, 0, 0} // terminator +}; + +static HookEntry_Type ScaledHooks[]={ + {"Rectangle", (FARPROC)Rectangle, (FARPROC *)&pGDIRectangle, (FARPROC)extRectangle}, + {"TextOutA", (FARPROC)TextOutA, (FARPROC *)&pGDITextOutA, (FARPROC)extTextOutA}, + {"GetClipBox", (FARPROC)NULL, (FARPROC *)&pGDIGetClipBox, (FARPROC)extGetClipBox}, + {"Polyline", (FARPROC)NULL, (FARPROC *)&pPolyline, (FARPROC)extPolyline}, + {"PolyBezierTo", (FARPROC)NULL, (FARPROC *)&pPolyBezierTo, (FARPROC)extPolyBezierTo}, + {"PolylineTo", (FARPROC)NULL, (FARPROC *)&pPolylineTo, (FARPROC)extPolylineTo}, + {"PolyDraw", (FARPROC)NULL, (FARPROC *)&pPolyDraw, (FARPROC)extPolyDraw}, + {"MoveToEx", (FARPROC)NULL, (FARPROC *)&pMoveToEx, (FARPROC)extMoveToEx}, + {"ArcTo", (FARPROC)NULL, (FARPROC *)&pArcTo, (FARPROC)extArcTo}, + {"LineTo", (FARPROC)NULL, (FARPROC *)&pLineTo, (FARPROC)extLineTo}, + {"SetPixel", (FARPROC)NULL, (FARPROC *)&pSetPixel, (FARPROC)extSetPixel}, + {"Ellipse", (FARPROC)NULL, (FARPROC *)&pEllipse, (FARPROC)extEllipse}, + {"Polygon", (FARPROC)NULL, (FARPROC *)&pPolygon, (FARPROC)extPolygon}, + {"Arc", (FARPROC)NULL, (FARPROC *)&pArc, (FARPROC)extArc}, + {"CreateEllipticRgn", (FARPROC)NULL, (FARPROC *)&pCreateEllipticRgn, (FARPROC)extCreateEllipticRgn}, + {"CreateEllipticRgnIndirect", (FARPROC)NULL, (FARPROC *)&pCreateEllipticRgnIndirect, (FARPROC)extCreateEllipticRgnIndirect}, + {"CreateRectRgn", (FARPROC)NULL, (FARPROC *)&pCreateRectRgn, (FARPROC)extCreateRectRgn}, + {"CreateRectRgnIndirect", (FARPROC)NULL, (FARPROC *)&pCreateRectRgnIndirect, (FARPROC)extCreateRectRgnIndirect}, + {"CreatePolygonRgn", (FARPROC)NULL, (FARPROC *)&pCreatePolygonRgn, (FARPROC)extCreatePolygonRgn}, + {"DrawTextA", (FARPROC)NULL, (FARPROC *)&pDrawText, (FARPROC)extDrawText}, + {"DrawTextExA", (FARPROC)NULL, (FARPROC *)&pDrawTextEx, (FARPROC)extDrawTextEx}, + {0, NULL, 0, 0} // terminator +}; + +static HookEntry_Type EmulateHooks[]={ + {0, NULL, 0, 0} // terminator +}; + +static HookEntry_Type DDHooks[]={ + {"CreateCompatibleDC", (FARPROC)CreateCompatibleDC, (FARPROC *)&pGDICreateCompatibleDC, (FARPROC)extDDCreateCompatibleDC}, + {"DeleteDC", (FARPROC)DeleteDC, (FARPROC *)&pGDIDeleteDC, (FARPROC)extDDDeleteDC}, + {"CreateDCA", (FARPROC)CreateDCA, (FARPROC *)&pGDICreateDC, (FARPROC)extDDCreateDC}, + {"BitBlt", (FARPROC)BitBlt, (FARPROC *)&pGDIBitBlt, (FARPROC)extDDBitBlt}, + {"StretchBlt", (FARPROC)StretchBlt, (FARPROC *)&pGDIStretchBlt, (FARPROC)extDDStretchBlt}, + // {"PatBlt", (FARPROC)PatBlt, (FARPROC *)&pGDIPatBlt, (FARPROC)extDDPatBlt}, // missing one ... + // {"MaskBlt", (FARPROC)NULL, (FARPROC *)&pMaskBlt, (FARPROC)extMaskBlt}, + {0, NULL, 0, 0} // terminator +}; + +static HookEntry_Type GDIHooks[]={ + {"CreateCompatibleDC", (FARPROC)CreateCompatibleDC, (FARPROC *)&pGDICreateCompatibleDC, (FARPROC)extGDICreateCompatibleDC}, + {"DeleteDC", (FARPROC)DeleteDC, (FARPROC *)&pGDIDeleteDC, (FARPROC)extGDIDeleteDC}, + {"CreateDCA", (FARPROC)CreateDCA, (FARPROC *)&pGDICreateDC, (FARPROC)extGDICreateDC}, + {"BitBlt", (FARPROC)BitBlt, (FARPROC *)&pGDIBitBlt, (FARPROC)extGDIBitBlt}, + {"StretchBlt", (FARPROC)StretchBlt, (FARPROC *)&pGDIStretchBlt, (FARPROC)extGDIStretchBlt}, + {"PatBlt", (FARPROC)PatBlt, (FARPROC *)&pGDIPatBlt, (FARPROC)extGDIPatBlt}, + {"MaskBlt", (FARPROC)NULL, (FARPROC *)&pMaskBlt, (FARPROC)extMaskBlt}, + {0, NULL, 0, 0} // terminator +}; + +static HookEntry_Type EmuHooks[]={ + {"CreateFontA", (FARPROC)CreateFont, (FARPROC *)&pGDICreateFont, (FARPROC)extCreateFont}, + {"CreateFontIndirectA", (FARPROC)CreateFontIndirectA, (FARPROC *)&pGDICreateFontIndirect, (FARPROC)extCreateFontIndirect}, + {0, NULL, 0, 0} // terminator +}; + +static HookEntry_Type GammaHooks[]={ + {"SetDeviceGammaRamp", (FARPROC)SetDeviceGammaRamp, (FARPROC *)&pGDISetDeviceGammaRamp, (FARPROC)extSetDeviceGammaRamp}, + {"GetDeviceGammaRamp", (FARPROC)GetDeviceGammaRamp, (FARPROC *)&pGDIGetDeviceGammaRamp, (FARPROC)extGetDeviceGammaRamp}, + {0, NULL, 0, 0} // terminator +}; + +static HookEntry_Type FontHooks[]={ + {"CreateScalableFontResourceA", (FARPROC)NULL, (FARPROC *)&pCreateScalableFontResourceA, (FARPROC)extCreateScalableFontResourceA}, + {"CreateScalableFontResourceW", (FARPROC)NULL, (FARPROC *)&pCreateScalableFontResourceW, (FARPROC)extCreateScalableFontResourceW}, + {"AddFontResourceA", (FARPROC)NULL, (FARPROC *)&pAddFontResourceA, (FARPROC)extAddFontResourceA}, + {"AddFontResourceW", (FARPROC)NULL, (FARPROC *)&pAddFontResourceW, (FARPROC)extAddFontResourceW}, + {0, NULL, 0, 0} // terminator +}; + +extern HRESULT WINAPI extDirectDrawCreate(GUID FAR *, LPDIRECTDRAW FAR *, IUnknown FAR *); +extern HRESULT WINAPI extDirectDrawCreateEx(GUID FAR *, LPDIRECTDRAW FAR *, REFIID, IUnknown FAR *); + +static char *libname = "gdi32.dll"; + +void HookGDI32Init() +{ + HookLibInit(Hooks); + HookLibInit(RemapHooks); + HookLibInit(DDHooks); + HookLibInit(EmuHooks); + HookLibInit(GammaHooks); +} + +void HookGDI32(HMODULE module) +{ + HookLibrary(module, Hooks, libname); + + if(dxw.dwFlags1 & CLIENTREMAPPING) + HookLibrary(module, RemapHooks, libname); + + if(dxw.dwFlags3 & EMULATEDC) + HookLibrary(module, EmulateHooks, libname); + HookLibrary(module, ScaledHooks, libname); + HookLibrary(module, GDIHooks, libname); + + if(dxw.dwFlags2 & HOOKGDI){ + HookLibrary(module, EmulateHooks, libname); + HookLibrary(module, ScaledHooks, libname); + HookLibrary(module, GDIHooks, libname); + } + + if(dxw.dwFlags1 & MAPGDITOPRIMARY){ + HookLibrary(module, EmulateHooks, libname); + HookLibrary(module, ScaledHooks, libname); + HookLibrary(module, DDHooks, libname); + } + + if ((dxw.dwFlags1 & EMULATESURFACE) && (dxw.dwFlags1 & HANDLEDC)) + HookLibrary(module, EmuHooks, libname); + + if(dxw.dwFlags2 & DISABLEGAMMARAMP) + HookLibrary(module, GammaHooks, libname); + + if(dxw.dwFlags3 & FONTBYPASS) // v2.02.33 - for "Stratego" compatibility option + HookLibrary(module, FontHooks, libname); +} + +FARPROC Remap_GDI32_ProcAddress(LPCSTR proc, HMODULE hModule) +{ + FARPROC addr; + + if(addr=RemapLibrary(proc, hModule, Hooks)) return addr; + + if(dxw.dwFlags1 & CLIENTREMAPPING) + if(addr=RemapLibrary(proc, hModule, RemapHooks)) return addr; + + if(dxw.dwFlags3 & EMULATEDC){ + if (addr=RemapLibrary(proc, hModule, EmulateHooks)) return addr; + if (addr=RemapLibrary(proc, hModule, ScaledHooks)) return addr; + if (addr=RemapLibrary(proc, hModule, GDIHooks)) return addr; + } + + if(dxw.dwFlags2 & HOOKGDI){ + if (addr=RemapLibrary(proc, hModule, EmulateHooks)) return addr; + if (addr=RemapLibrary(proc, hModule, ScaledHooks)) return addr; + if (addr=RemapLibrary(proc, hModule, GDIHooks)) return addr; + } + + if(dxw.dwFlags1 & MAPGDITOPRIMARY){ + if (addr=RemapLibrary(proc, hModule, EmulateHooks)) return addr; + if (addr=RemapLibrary(proc, hModule, ScaledHooks)) return addr; + if (addr=RemapLibrary(proc, hModule, DDHooks)) return addr; + } + + if ((dxw.dwFlags1 & EMULATESURFACE) && (dxw.dwFlags1 & HANDLEDC)) + if(addr=RemapLibrary(proc, hModule, EmuHooks)) return addr; + + if(dxw.dwFlags2 & DISABLEGAMMARAMP) + if(addr=RemapLibrary(proc, hModule, GammaHooks)) return addr; + + if(1) // v2.02.33 - for "Stratego" compatibility option + if(addr=RemapLibrary(proc, hModule, FontHooks)) return addr; + + return NULL; +} + +//-------------------------------------------------------------------------------------------- +// +// extern and common functions +// +//-------------------------------------------------------------------------------------------- + +extern DEVMODE *pSetDevMode; +extern DWORD PaletteEntries[256]; +extern Unlock4_Type pUnlockMethod(LPDIRECTDRAWSURFACE); +extern HRESULT WINAPI sBlt(char *, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT, DWORD, LPDDBLTFX, BOOL); + +extern GetDC_Type pGetDC; +extern ReleaseDC_Type pReleaseDC; + +static COLORREF GetMatchingColor(COLORREF crColor) +{ + int iDistance, iMinDistance; + int iColorIndex, iMinColorIndex; + COLORREF PalColor; + + iMinDistance=0xFFFFFF; + iMinColorIndex=0; + + for(iColorIndex=0; iColorIndex<256; iColorIndex++){ + int iDist; + iDistance=0; + + PalColor=PaletteEntries[iColorIndex]; + switch(dxw.ActualPixelFormat.dwRGBBitCount){ + case 32: + PalColor = ((PalColor & 0x00FF0000) >> 16) | (PalColor & 0x0000FF00) | ((PalColor & 0x000000FF) << 16); + break; + case 16: + if(dxw.ActualPixelFormat.dwGBitMask==0x03E0){ + // RGB555 screen settings + PalColor = ((PalColor & 0x7C00) >> 7) | ((PalColor & 0x03E0) << 6) | ((PalColor & 0x001F) << 19); + } + else { + // RGB565 screen settings + PalColor = ((PalColor & 0xF800) >> 8) | ((PalColor & 0x07E0) << 5) | ((PalColor & 0x001F) << 19); + } + break; + } + + iDist = (crColor & 0x00FF0000) - (PalColor & 0x00FF0000); + iDist >>= 16; + if (iDist<0) iDist=-iDist; + iDist *= iDist; + iDistance += iDist; + + iDist = (crColor & 0x0000FF00) - (PalColor & 0x0000FF00); + iDist >>= 8; + if (iDist<0) iDist=-iDist; + iDist *= iDist; + iDistance += iDist; + + iDist = (crColor & 0x000000FF) - (PalColor & 0x000000FF); + // iDist >>= 0; + if (iDist<0) iDist=-iDist; + iDist *= iDist; + iDistance += iDist; + + if (iDistance < iMinDistance) { + iMinDistance = iDistance; + iMinColorIndex = iColorIndex; + } + + if (iMinDistance==0) break; // got the perfect match! + } + OutTraceD("GetMatchingColor: color=%x matched with palette[%d]=%x dist=%d\n", + crColor, iMinColorIndex, PaletteEntries[iMinColorIndex], iDistance); + PalColor=PaletteEntries[iMinColorIndex]; + switch(dxw.ActualPixelFormat.dwRGBBitCount){ + case 32: + crColor = ((PalColor & 0x00FF0000) >> 16) | (PalColor & 0x0000FF00) | ((PalColor & 0x000000FF) << 16); + break; + case 16: + if(dxw.ActualPixelFormat.dwGBitMask==0x03E0){ + // RGB555 screen settings + crColor = ((PalColor & 0x7C00) >> 7) | ((PalColor & 0x03E0) << 6) | ((PalColor & 0x001F) << 19); + } + else { + // RGB565 screen settings + crColor = ((PalColor & 0xF800) >> 8) | ((PalColor & 0x07E0) << 5) | ((PalColor & 0x001F) << 19); + } + break; + } + return crColor; +} + +//-------------------------------------------------------------------------------------------- +// +// API hookers +// +//-------------------------------------------------------------------------------------------- + +int WINAPI extGetDeviceCaps(HDC hdc, int nindex) +{ + DWORD res; + + res = (*pGDIGetDeviceCaps)(hdc, nindex); + OutTraceD("GetDeviceCaps: hdc=%x index=%x(%s) res=%x\n", + hdc, nindex, ExplainDeviceCaps(nindex), res); + +#ifdef GDIEMULATIONONLY + switch(nindex){ + case VERTRES: + res= dxw.GetScreenHeight(); + OutTraceD("GetDeviceCaps: fix(0) VERTRES cap=%d\n", res); + break; + case HORZRES: + res= dxw.GetScreenWidth(); + OutTraceD("GetDeviceCaps: fix(0) HORZRES cap=%d\n", res); + break; + } + return res; +#endif + + // if you have a bypassed setting, use it first! + if(pSetDevMode){ + switch(nindex){ + case BITSPIXEL: + case COLORRES: + res = pSetDevMode->dmBitsPerPel; + OutTraceD("GetDeviceCaps: fix(1) BITSPIXEL/COLORRES cap=%x\n",res); + return res; + case HORZRES: + res = pSetDevMode->dmPelsWidth; + OutTraceD("GetDeviceCaps: fix(1) HORZRES cap=%d\n", res); + return res; + case VERTRES: + res = pSetDevMode->dmPelsHeight; + OutTraceD("GetDeviceCaps: fix(1) VERTRES cap=%d\n", res); + return res; + } + } + + switch(nindex){ + case VERTRES: + res= dxw.GetScreenHeight(); + OutTraceD("GetDeviceCaps: fix(2) VERTRES cap=%d\n", res); + break; + case HORZRES: + res= dxw.GetScreenWidth(); + OutTraceD("GetDeviceCaps: fix(2) HORZRES cap=%d\n", res); + break; + // WARNING: in no-emu mode, the INIT8BPP and INIT16BPP flags expose capabilities that + // are NOT implemented and may cause later troubles! + case RASTERCAPS: + if(dxw.dwFlags2 & INIT8BPP) { + res |= RC_PALETTE; // v2.02.12 + OutTraceD("GetDeviceCaps: fix(2) RASTERCAPS setting RC_PALETTE cap=%x\n",res); + } + break; + case BITSPIXEL: + case COLORRES: + if(dxw.dwFlags2 & (INIT8BPP|INIT16BPP)){ // v2.02.32 fix + if(dxw.dwFlags2 & INIT8BPP) res = 8; + if(dxw.dwFlags2 & INIT16BPP) res = 16; + OutTraceD("GetDeviceCaps: fix(2) BITSPIXEL/COLORRES cap=%d\n",res); + } + break; + //case NUMCOLORS: // numcolors windows bug fix.... + // if(res == -1) res=1; + // return res; + } + + if(dxw.dwFlags1 & EMULATESURFACE){ + switch(nindex){ + case RASTERCAPS: + if((dxw.VirtualPixelFormat.dwRGBBitCount==8) || (dxw.dwFlags2 & INIT8BPP)){ + res = RC_PALETTE; + OutTraceD("GetDeviceCaps: fix(3) RASTERCAPS setting RC_PALETTE cap=%x\n",res); + } + break; + case BITSPIXEL: + case COLORRES: + int PrevRes; + PrevRes=res; + if(dxw.VirtualPixelFormat.dwRGBBitCount!=0) res = dxw.VirtualPixelFormat.dwRGBBitCount; + if(dxw.dwFlags2 & INIT8BPP) res = 8; + if(dxw.dwFlags2 & INIT16BPP) res = 16; + if(PrevRes != res) OutTraceD("GetDeviceCaps: fix(3) BITSPIXEL/COLORRES cap=%d\n",res); + break; + case SIZEPALETTE: + res = 256; + OutTraceD("GetDeviceCaps: fix(3) SIZEPALETTE cap=%x\n",res); + break; + case NUMRESERVED: + res = 0; + OutTraceD("GetDeviceCaps: fix(3) NUMRESERVED cap=%x\n",res); + break; + } + } + return res; +} + +BOOL WINAPI extTextOutA(HDC hdc, int nXStart, int nYStart, LPCTSTR lpString, int cchString) +{ + BOOL ret; + OutTraceD("TextOut: hdc=%x xy=(%d,%d) str=(%d)\"%s\"\n", hdc, nXStart, nYStart, cchString, lpString); + + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.MapClient(&nXStart, &nYStart); + OutTraceD("TextOut: fixed dest=(%d,%d)\n", nXStart, nYStart); + } + + ret=(*pGDITextOutA)(hdc, nXStart, nYStart, lpString, cchString); + if(!ret) OutTraceE("TextOut: ERROR ret=%x\n", ret); + return ret; +} + +BOOL WINAPI extScaleWindowExtEx(HDC hdc, int Xnum, int Xdenom, int Ynum, int Ydenom, LPSIZE lpSize) +{ + OutTraceD("ScaleWindowExtEx: hdc=%x num=(%d,%d) denom=(%d,%d) lpSize=%d\n", + hdc, Xnum, Ynum, Xdenom, Ydenom, lpSize); + + MessageBox(0, "ScaleWindowExtEx", "to fix", MB_OK | MB_ICONEXCLAMATION); + + return (*pGDIScaleWindowExtEx)(hdc, Xnum, Xdenom, Ynum, Ydenom, lpSize); +} + +BOOL WINAPI extRectangle(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) +{ + int ret; + + OutTraceD("Rectangle: hdc=%x xy=(%d,%d)-(%d,%d)\n", hdc, nLeftRect, nTopRect, nRightRect, nBottomRect); + + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.MapClient(&nLeftRect, &nTopRect, &nRightRect, &nBottomRect); + OutTraceD("Rectangle: fixed dest=(%d,%d)-(%d,%d)\n", nLeftRect, nTopRect, nRightRect, nBottomRect); + } + + ret=(*pGDIRectangle)(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect); + if(!ret) OutTraceE("Rectangle: ERROR ret=%x\n", ret); + return ret; +} + +int WINAPI extGDISaveDC(HDC hdc) +{ + int ret; + + ret=(*pGDISaveDC)(hdc); + OutTraceD("GDI.SaveDC: hdc=%x ret=%x\n", hdc, ret); + //AutoRefreshThread=CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)AutoRefresh, (LPVOID)hdc, 0, &dwThrdId); + return ret; +} + +BOOL WINAPI extGDIRestoreDC(HDC hdc, int nSavedDC) +{ + BOOL ret; + + ret=(*pGDIRestoreDC)(hdc, nSavedDC); + OutTraceD("GDI.RestoreDC: hdc=%x nSavedDC=%x ret=%x\n", hdc, nSavedDC, ret); + //TerminateThread(AutoRefreshThread, 0); + return ret; +} + +/* --------------------------------------------------------------------------- */ + +// v2.1.75: Hooking for GDI32 CreatePalette, SelectPalette, RealizePalette: +// maps the GDI palette to the buffered DirectDraw one. This fixes the screen +// output for "Dementia" (a.k.a. "Armed & Delirious"). + +HPALETTE WINAPI extGDICreatePalette(CONST LOGPALETTE *plpal) +{ + HPALETTE ret; + int idx; + + dxw.IsGDIPalette=TRUE; + OutTraceD("GDI.CreatePalette: plpal=%x version=%x NumEntries=%x\n", plpal, plpal->palVersion, plpal->palNumEntries); + ret=(*pGDICreatePalette)(plpal); + if(IsDebug){ + OutTraceD("PalEntry[%x]= ", plpal->palNumEntries); + for(idx=0; idxpalNumEntries; idx++) OutTraceD("(%x)", plpal->palPalEntry[idx]); + OutTraceD("\n"); + } + dxw.palVersion=plpal->palVersion; + dxw.palNumEntries=plpal->palNumEntries; + if(dxw.palNumEntries>256) dxw.palNumEntries=256; + for(idx=0; idxpalPalEntry[idx]; + OutTraceD("GDI.CreatePalette: hPalette=%x\n", ret); + return ret; +} + +HPALETTE WINAPI extSelectPalette(HDC hdc, HPALETTE hpal, BOOL bForceBackground) +{ + HPALETTE ret; + + ret=(*pGDISelectPalette)(hdc, hpal, bForceBackground); + OutTraceD("GDI.SelectPalette: hdc=%x hpal=%x ForceBackground=%x ret=%x\n", hdc, hpal, bForceBackground, ret); + return ret; +} + +UINT WINAPI extRealizePalette(HDC hdc) +{ + UINT ret; + extern void mySetPalette(int, int, LPPALETTEENTRY); + + ret=(*pGDIRealizePalette)(hdc); + OutTraceD("GDI.RealizePalette: hdc=%x ret=%x\n", hdc, ret); + + if(!dxw.IsGDIPalette) return ret; + + // quick & dirty implementation through a nasty global: + // if the SelectPalette didn't force to the background (arg bForceBackground==FALSE) + // then don't override the current palette set by the DirectDrawPalette class. + // should be cleaned up a little.... + // maybe not: now both Diablo & Dementia colors are working... + if(dxw.dwFlags1 & EMULATESURFACE) + mySetPalette(0, dxw.palNumEntries, dxw.palPalEntry); + // DEBUGGING + if(IsDebug){ + int idx; + OutTraceD("PaletteEntries[%x]= ", dxw.palNumEntries); + for(idx=0; idxGetDC device context, + // that is a memory device type associated to NULL (desktop) window, through GDI StretchBlt api. So, you shoud compensate + // by scaling and offsetting to main window. + dxw.MapWindow(&nXDest, &nYDest, &nWidth, &nHeight); + } + } + + res=(*pGDIStretchBlt)(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, nWSrc, nHSrc, dwRop); + if (IsToScreen && (dxw.dwFlags2 & SHOWFPSOVERLAY)) dxw.ShowFPS(hdcDest); + if(!res) OutTraceE("GDI.StretchBlt: ERROR err=%d at %d\n", GetLastError(), __LINE__); + return res; +} + +BOOL WINAPI extGDIDeleteDC(HDC hdc) +{ + BOOL res; + OutTraceD("GDI.DeleteDC: hdc=%x\n", hdc); + res=(*pGDIDeleteDC)(hdc); + if(!res) OutTraceE("GDI.DeleteDC: ERROR err=%d at %d\n", GetLastError(), __LINE__); + return res; +} + +COLORREF WINAPI extSetTextColor(HDC hdc, COLORREF crColor) +{ + COLORREF res; + + if ((dxw.dwFlags1 & EMULATESURFACE) && (dxw.dwFlags1 & HANDLEDC) && (dxw.VirtualPixelFormat.dwRGBBitCount==8)) + crColor=GetMatchingColor(crColor); + + res=(*pGDISetTextColor)(hdc, crColor); + OutTraceD("SetTextColor: color=%x res=%x%s\n", crColor, res, (res==CLR_INVALID)?"(CLR_INVALID)":""); + return res; +} + +COLORREF WINAPI extSetBkColor(HDC hdc, COLORREF crColor) +{ + COLORREF res; + + if ((dxw.dwFlags1 & EMULATESURFACE) && (dxw.dwFlags1 & HANDLEDC) && (dxw.VirtualPixelFormat.dwRGBBitCount==8)) + crColor=GetMatchingColor(crColor); + + res=(*pGDISetBkColor)(hdc, crColor); + OutTraceD("SetBkColor: color=%x res=%x%s\n", crColor, res, (res==CLR_INVALID)?"(CLR_INVALID)":""); + return res; +} + +HFONT WINAPI extCreateFont(int nHeight, int nWidth, int nEscapement, int nOrientation, int fnWeight, + DWORD fdwItalic, DWORD fdwUnderline, DWORD fdwStrikeOut, DWORD fdwCharSet, + DWORD fdwOutputPrecision, DWORD fdwClipPrecision, DWORD fdwQuality, + DWORD fdwPitchAndFamily, LPCTSTR lpszFace) +{ + OutTraceD("CreateFont: h=%d w=%d face=\"%s\"\n", nHeight, nWidth, lpszFace); + if(dxw.dwFlags1 & FIXTEXTOUT) { + if(nHeight > 0) dxw.MapClient(&nWidth, &nHeight); + else { + nHeight= -nHeight; + dxw.MapClient(&nWidth, &nHeight); + nHeight= -nHeight; + } + } + return (*pGDICreateFont)(nHeight, nWidth, nEscapement, nOrientation, fnWeight, + fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, + fdwOutputPrecision, fdwClipPrecision, NONANTIALIASED_QUALITY, + fdwPitchAndFamily, lpszFace); +} + +// CreateFontIndirect hook routine to avoid font aliasing that prevents reverse blitting working on palettized surfaces + +HFONT WINAPI extCreateFontIndirect(const LOGFONT* lplf) +{ + LOGFONT lf; + HFONT retHFont; + OutTraceD("CreateFontIndirect: h=%d w=%d face=\"%s\"\n", lplf->lfHeight, lplf->lfWidth, lplf->lfFaceName); + memcpy((char *)&lf, (char *)lplf, sizeof(LOGFONT)); + lf.lfQuality=NONANTIALIASED_QUALITY; + if(dxw.dwFlags1 & FIXTEXTOUT) { + if(lf.lfHeight > 0) dxw.MapClient((int *)&lf.lfWidth, (int *)&lf.lfHeight); + else { + lf.lfHeight= -lf.lfHeight; + dxw.MapClient((int *)&lf.lfWidth, (int *)&lf.lfHeight); + lf.lfHeight= -lf.lfHeight; + } + } + retHFont=((*pGDICreateFontIndirect)(&lf)); + if(retHFont) + OutTraceD("CreateFontIndirect: hfont=%x\n", retHFont); + else + OutTraceD("CreateFontIndirect: error=%d at %d\n", GetLastError(), __LINE__); + return retHFont; +} + +BOOL WINAPI extSetDeviceGammaRamp(HDC hDC, LPVOID lpRamp) +{ + BOOL ret; + OutTraceD("SetDeviceGammaRamp: hdc=%x\n", hDC); + if(dxw.dwFlags2 & DISABLEGAMMARAMP) { + OutTraceD("SetDeviceGammaRamp: SUPPRESSED\n"); + return TRUE; + } + ret=(*pGDISetDeviceGammaRamp)(hDC, lpRamp); + if(!ret) OutTraceE("SetDeviceGammaRamp: ERROR err=%d\n", GetLastError()); + return ret; +} + +BOOL WINAPI extGetDeviceGammaRamp(HDC hDC, LPVOID lpRamp) +{ + BOOL ret; + OutTraceD("GetDeviceGammaRamp: hdc=%x\n", hDC); + ret=(*pGDIGetDeviceGammaRamp)(hDC, lpRamp); + if(!ret) OutTraceE("GetDeviceGammaRamp: ERROR err=%d\n", GetLastError()); + return ret; +} + +int WINAPI extGetClipBox(HDC hdc, LPRECT lprc) +{ + // v2.02.31: needed in "Imperialism II" to avoid blit clipping + int ret; + char *sRetCodes[4]={"ERROR", "NULLREGION", "SIMPLEREGION", "COMPLEXREGION"}; + OutTraceD("GetClipBox: hdc=%x\n", hdc); + ret=(*pGDIGetClipBox)(hdc, lprc); + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc)) && (ret!=ERROR)){ + OutTraceD("GetClipBox: scaling main win coordinates (%d,%d)-(%d,%d)\n", + lprc->left, lprc->top, lprc->right, lprc->bottom); + // current implementation is NOT accurate, since it always returns the whole + // virtual desktop area as the current clipbox...!!! + *lprc=dxw.GetScreenRect(); + } + OutTraceD("GetClipBox: ret=%x(%s)\n", ret, sRetCodes[ret]); + return ret; +} + +BOOL WINAPI extPolyline(HDC hdc, const POINT *lppt, int cPoints) +{ + BOOL ret; + if(IsTraceD){ + int i; + OutTrace("Polyline: hdc=%x cPoints=%d pt=", hdc, cPoints); + for(i=0; ibmiHeader); + OutTraceD("SetDIBitsToDevice: BitmapInfo dim=(%dx%d) Planes=%d BPP=%d Compression=%x SizeImage=%x\n", + bmi->biWidth, bmi->biHeight, bmi->biPlanes, bmi->biBitCount, bmi->biCompression, bmi->biSizeImage); + + if (dxw.IsFullScreen() && dxw.IsVirtual(hdc)){ + int X, Y; + X=XDest+dxw.VirtualOffsetX; + Y=YDest+dxw.VirtualOffsetY; + OutTraceD("SetDIBitsToDevice: virtual pos=(%d,%d)+(%d+%d)=(%d,%d)\n", + XDest, YDest, dxw.VirtualOffsetX, dxw.VirtualOffsetY, X, Y); + ret=(*pSetDIBitsToDevice)(hdc, X, Y, dwWidth, dwHeight, XSrc, YSrc, uStartScan, cScanLines, lpvBits, lpbmi, fuColorUse); + if(!ret || (ret==GDI_ERROR)) OutTraceE("SetDIBitsToDevice: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; + } + //else + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + DWORD OrigWidth, OrigHeight; + int OrigXDest, OrigYDest; + OrigWidth=dwWidth; + OrigHeight=dwHeight; + OrigXDest=XDest; + OrigYDest=YDest; + dxw.MapClient(&XDest, &YDest, (int *)&dwWidth, (int *)&dwHeight); + OutTraceD("SetDIBitsToDevice: fixed dest=(%d,%d)-(%d,%d)\n", XDest, YDest, dwWidth, dwHeight); + HDC hTempDc; + HBITMAP hbmPic; + if(!(hTempDc=CreateCompatibleDC(hdc))) + OutTraceE("CreateCompatibleDC: ERROR err=%d at=%d\n", GetLastError(), __LINE__); + // tricky part: CreateCompatibleBitmap is needed to set the dc size, but it has to be performed + // against hdc to set for color depth, then selected (through SelectObject) against the temporary + // dc to assign the needed size and color space to the temporary dc. + if(!(hbmPic=CreateCompatibleBitmap(hdc, OrigWidth, OrigHeight))) + OutTraceE("CreateCompatibleBitmap: ERROR err=%d at=%d\n", GetLastError(), __LINE__); + if(!SelectObject(hTempDc, hbmPic)) + OutTraceE("SelectObject: ERROR err=%d at=%d\n", GetLastError(), __LINE__); + if(!(*pSetDIBitsToDevice)(hTempDc, 0, 0, OrigWidth, OrigHeight, XSrc, YSrc, uStartScan, cScanLines, lpvBits, lpbmi, fuColorUse)) + OutTraceE("SetDIBitsToDevice: ERROR err=%d at=%d\n", GetLastError(), __LINE__); + if(!(ret=(*pGDIStretchBlt)(hdc, XDest, YDest, dwWidth, dwHeight, hTempDc, 0, 0, OrigWidth, OrigHeight, SRCCOPY))) + OutTraceE("StretchBlt: ERROR err=%d at=%d\n", GetLastError(), __LINE__); + if(!(DeleteObject(hbmPic))) // v2.02.32 - avoid resource leakage + OutTraceE("DeleteObject: ERROR err=%d at=%d\n", GetLastError(), __LINE__); + if(!(DeleteDC(hTempDc))) + OutTraceE("DeleteDC: ERROR err=%d at=%d\n", GetLastError(), __LINE__); + } + else{ + ret=(*pSetDIBitsToDevice)(hdc, XDest, YDest, dwWidth, dwHeight, XSrc, YSrc, uStartScan, cScanLines, lpvBits, lpbmi, fuColorUse); + } + if(!ret || (ret==GDI_ERROR)) OutTraceE("SetDIBitsToDevice: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +//HBITMAP WINAPI extCreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight) +//{ +// HBITMAP ret; +// OutTraceD("CreateCompatibleBitmap: hdc=%x size=(%d,%d)\n", +// hdc, nWidth, nHeight); +// +// if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ +// dxw.MapClient(&nWidth, &nHeight); +// OutTraceD("CreateCompatibleBitmap: fixed size=(%d,%d)\n", nWidth, nHeight); +// } +// +// ret=(*pCreateCompatibleBitmap)(hdc, nWidth, nHeight); +// if(!ret) OutTraceE("CreateCompatibleBitmap: ERROR ret=%x err=%d\n", ret, GetLastError()); +// return ret; +//} + +COLORREF WINAPI extSetPixel(HDC hdc, int X, int Y, COLORREF crColor) +{ + COLORREF ret; + OutTraceD("SetPixel: hdc=%x color=%x point=(%d,%d)\n", hdc, crColor, X, Y); + + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.MapClient(&X, &Y); + OutTraceD("SetPixel: fixed pos=(%d,%d)\n", X, Y); + } + + ret=(*pSetPixel)(hdc, X, Y, crColor); + // both 0x00000000 and 0xFFFFFFFF are legitimate colors and therefore valid return codes... + //if(ret==GDI_ERROR) OutTraceE("SetPixel: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +BOOL WINAPI extEllipse(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) +{ + int ret; + OutTraceD("Ellipse: hdc=%x rect=(%d,%d)-(%d,%d)\n", hdc, nLeftRect, nTopRect, nRightRect, nBottomRect); + + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.MapClient(&nLeftRect, &nTopRect, &nRightRect, &nBottomRect); + OutTraceD("Ellipse: fixed dest=(%d,%d)-(%d,%d)\n", nLeftRect, nTopRect, nRightRect, nBottomRect); + } + + ret=(*pEllipse)(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect); + if(!ret) OutTraceE("Ellipse: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +BOOL WINAPI extPolygon(HDC hdc, const POINT *lpPoints, int cCount) +{ + BOOL ret; + if(IsTraceD){ + int i; + OutTrace("Polygon: hdc=%x cCount=%d pt=", hdc, cCount); + for(i=0; ileft, lprc->top, lprc->right, lprc->bottom); + + if (dxw.IsFullScreen()){ + dxw.MapClient((RECT *)lprc); + OutTraceD("CreateEllipticRgnIndirect: fixed rect=(%d,%d)-(%d,%d)\n", lprc->left, lprc->top, lprc->right, lprc->bottom); + } + + ret=(*pCreateEllipticRgnIndirect)(lprc); + if(!ret) OutTraceE("CreateEllipticRgnIndirect: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +HRGN WINAPI extCreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) +{ + HRGN ret; + OutTraceD("CreateRectRgn: rect=(%d,%d)-(%d,%d)\n", nLeftRect, nTopRect, nRightRect, nBottomRect); + + if (dxw.IsFullScreen()){ + dxw.MapClient(&nLeftRect, &nTopRect, &nRightRect, &nBottomRect); + OutTraceD("CreateRectRgn: fixed rect=(%d,%d)-(%d,%d)\n", nLeftRect, nTopRect, nRightRect, nBottomRect); + } + + ret=(*pCreateRectRgn)(nLeftRect, nTopRect, nRightRect, nBottomRect); + if(!ret) OutTraceE("CreateRectRgn: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +HRGN WINAPI extCreateRectRgnIndirect(const RECT *lprc) +{ + HRGN ret; + OutTraceD("CreateRectRgnIndirect: rect=(%d,%d)-(%d,%d)\n", lprc->left, lprc->top, lprc->right, lprc->bottom); + + if (dxw.IsFullScreen()){ + dxw.MapClient((RECT *)lprc); + OutTraceD("CreateRectRgnIndirect: fixed rect=(%d,%d)-(%d,%d)\n", lprc->left, lprc->top, lprc->right, lprc->bottom); + } + + ret=(*pCreateRectRgnIndirect)(lprc); + if(!ret) OutTraceE("CreateRectRgnIndirect: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +HRGN WINAPI extCreatePolygonRgn(const POINT *lpPoints, int cPoints, int fnPolyFillMode) +{ + HRGN ret; + if(IsTraceD){ + int i; + OutTrace("CreatePolygonRgn: PolyFillMode=%x cCount=%d pt=", fnPolyFillMode, cPoints); + for(i=0; ileft, lpRect->top, lpRect->right, lpRect->bottom, uFormat, nCount, lpchText); + + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.MapClient((RECT *)lpRect); + OutTraceD("DrawText: fixed rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); + } + + ret=(*pDrawText)(hdc, lpchText, nCount, lpRect, uFormat); + if(!ret) OutTraceE("DrawText: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +int WINAPI extDrawTextEx(HDC hdc, LPTSTR lpchText, int nCount, LPRECT lpRect, UINT dwDTFormat, LPDRAWTEXTPARAMS lpDTParams) +{ + int ret; + OutTraceD("DrawTextEx: hdc=%x rect=(%d,%d)-(%d,%d) DTFormat=%x Text=(%d)\"%s\"\n", + hdc, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, dwDTFormat, nCount, lpchText); + + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.MapClient((RECT *)lpRect); + OutTraceD("DrawTextEx: fixed rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); + } + + ret=(*pDrawTextEx)(hdc, lpchText, nCount, lpRect, dwDTFormat, lpDTParams); + if(!ret) OutTraceE("DrawTextEx: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +BOOL WINAPI extMaskBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HDC hdcSrc, + int nXSrc, int nYSrc, HBITMAP hbmMask, int xMask, int yMask, DWORD dwRop) +{ + BOOL ret; + OutTraceD("MaskBlt: hdcDest=%x pos=(%d,%d) size=(%dx%d) hdcSrc=%x pos=(%d,%d) hbmMask=%x Mask=(%d,%d) dwRop=%x\n", + hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, hbmMask, xMask, yMask, dwRop); + + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdcDest))){ + dxw.MapClient(&nXDest, &nYDest, &nWidth, &nHeight); + OutTraceD("MaskBlt: fixed pos=(%d,%d) size=(%dx%d)\n", nXDest, nYDest, nWidth, nHeight); + } + + ret=(*pMaskBlt)(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, hbmMask, xMask, yMask, dwRop); + if(!ret) OutTraceE("MaskBlt: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +BOOL WINAPI extSetViewportOrgEx(HDC hdc, int X, int Y, LPPOINT lpPoint) +{ + BOOL ret; + OutTraceD("SetViewportOrgEx: hdc=%x pos=(%d,%d)\n", hdc, X, Y); + + if(dxw.IsVirtual(hdc)) { + OutTraceD("SetViewportOrgEx: virtual hdc\n"); + dxw.VirtualOffsetX = X; + dxw.VirtualOffsetY = Y; + return TRUE; + } + + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.MapClient(&X, &Y); + OutTraceD("SetViewportOrgEx: fixed pos=(%d,%d)\n", X, Y); + } + + ret=(*pSetViewportOrgEx)(hdc, X, Y, lpPoint); + if(ret && lpPoint) { + OutTraceD("SetViewportOrgEx: previous ViewPort=(%d,%d)\n", lpPoint->x, lpPoint->y); + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.UnmapClient(lpPoint); + OutTraceD("SetViewportOrgEx: fixed previous ViewPort=(%d,%d)\n", lpPoint->x, lpPoint->y); + } + } + if(!ret) OutTraceE("SetViewportOrgEx: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +BOOL WINAPI extSetViewportExtEx(HDC hdc, int nXExtent, int nYExtent, LPSIZE lpSize) +{ + BOOL ret; + OutTraceD("SetViewportExtEx: hdc=%x ext=(%d,%d)\n", hdc, nXExtent, nYExtent); + + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.MapClient(&nXExtent, &nYExtent); + OutTraceD("SetViewportExtEx: fixed ext=(%d,%d)\n", nXExtent, nYExtent); + } + + ret=(*pSetViewportExtEx)(hdc, nXExtent, nYExtent, lpSize); + if(ret && lpSize) { + OutTraceD("SetViewportExtEx: previous ext=(%d,%d)\n", lpSize->cx, lpSize->cy); + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.UnmapClient((LPPOINT)lpSize); + OutTraceD("SetViewportExtEx: fixed previous ext=(%d,%d)\n", lpSize->cx, lpSize->cy); + } + } + + if(!ret) OutTraceE("SetViewportExtEx: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +BOOL WINAPI extGetViewportOrgEx(HDC hdc, LPPOINT lpPoint) +{ + BOOL ret; + OutTraceD("GetViewportOrgEx: hdc=%x\n", hdc); + + if(dxw.IsVirtual(hdc)) { + lpPoint->x = dxw.VirtualOffsetX; + lpPoint->y = dxw.VirtualOffsetY; + return TRUE; + } + + ret=(*pGetViewportOrgEx)(hdc, lpPoint); + if(ret) { + OutTraceD("GetViewportOrgEx: ViewPort=(%d,%d)\n", lpPoint->x, lpPoint->y); + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.UnmapClient(lpPoint); + OutTraceD("GetViewportOrgEx: fixed ViewPort=(%d,%d)\n", lpPoint->x, lpPoint->y); + } + } + + if(!ret) OutTraceE("GetViewportOrgEx: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +BOOL WINAPI extGetWindowOrgEx(HDC hdc, LPPOINT lpPoint) +{ + BOOL ret; + OutTraceD("GetWindowOrgEx: hdc=%x\n", hdc); + + ret=(*pGetWindowOrgEx)(hdc, lpPoint); + if(ret) { + OutTraceD("GetWindowOrgEx: ViewPort=(%d,%d)\n", lpPoint->x, lpPoint->y); + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.UnmapClient(lpPoint); + OutTraceD("GetWindowOrgEx: fixed ViewPort=(%d,%d)\n", lpPoint->x, lpPoint->y); + } + } + + if(!ret) OutTraceE("GetWindowOrgEx: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +BOOL WINAPI extSetWindowOrgEx(HDC hdc, int X, int Y, LPPOINT lpPoint) +{ + BOOL ret; + OutTraceD("SetWindowOrgEx: hdc=%x pos=(%d,%d)\n", hdc, X, Y); + + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.MapClient(&X, &Y); + OutTraceD("SetWindowOrgEx: fixed pos=(%d,%d)\n", X, Y); + } + + ret=(*pSetWindowOrgEx)(hdc, X, Y, lpPoint); + if(ret && lpPoint) { + OutTraceD("SetWindowOrgEx: previous ViewPort=(%d,%d)\n", lpPoint->x, lpPoint->y); + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.UnmapClient(lpPoint); + OutTraceD("SetWindowOrgEx: fixed previous ViewPort=(%d,%d)\n", lpPoint->x, lpPoint->y); + } + } + if(!ret) OutTraceE("SetWindowOrgEx: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +BOOL WINAPI extGetCurrentPositionEx(HDC hdc, LPPOINT lpPoint) +{ + BOOL ret; + OutTraceD("GetCurrentPositionEx: hdc=%x\n", hdc); + + ret=(*pGetCurrentPositionEx)(hdc, lpPoint); + if(ret) { + OutTraceD("GetCurrentPositionEx: pos=(%d,%d)\n", lpPoint->x, lpPoint->y); + if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ + dxw.UnmapClient(lpPoint); + OutTraceD("GetCurrentPositionEx: fixed pos=(%d,%d)\n", lpPoint->x, lpPoint->y); + } + } + if(!ret) OutTraceE("GetCurrentPositionEx: ERROR ret=%x err=%d\n", ret, GetLastError()); + return ret; +} + +BOOL WINAPI extCreateScalableFontResourceA(DWORD fdwHidden, LPCTSTR lpszFontRes, LPCTSTR lpszFontFile, LPCTSTR lpszCurrentPath) +{ + BOOL res; + OutTraceD("CreateScalableFontResource: hidden=%d FontRes=\"%s\" FontFile=\"%s\" CurrentPath=\"%s\"\n", + fdwHidden, lpszFontRes, lpszFontFile, lpszCurrentPath); + if (1) return TRUE; + res=(*pCreateScalableFontResourceA)(fdwHidden, lpszFontRes, lpszFontFile, lpszCurrentPath); + if(!res) OutTraceE("CreateScalableFontResource: ERROR err=%d at=%d\n", GetLastError(), __LINE__); +} + +BOOL WINAPI extCreateScalableFontResourceW(DWORD fdwHidden, LPCWSTR lpszFontRes, LPCWSTR lpszFontFile, LPCWSTR lpszCurrentPath) +{ + BOOL res; + OutTraceD("CreateScalableFontResource: hidden=%d FontRes=\"%ls\" FontFile=\"%ls\" CurrentPath=\"%ls\"\n", + fdwHidden, lpszFontRes, lpszFontFile, lpszCurrentPath); + if (1) return TRUE; + res=(*pCreateScalableFontResourceW)(fdwHidden, lpszFontRes, lpszFontFile, lpszCurrentPath); + if(!res) OutTraceE("CreateScalableFontResource: ERROR err=%d at=%d\n", GetLastError(), __LINE__); +} + +int WINAPI extAddFontResourceA(LPCTSTR lpszFontFile) +{ + BOOL res; + OutTraceD("AddFontResource: FontFile=\"%s\"\n", lpszFontFile); + if(1) return TRUE; + res=(*pAddFontResourceA)(lpszFontFile); + if(!res) OutTraceE("AddFontResource: ERROR err=%d at=%d\n", GetLastError(), __LINE__); +} + +int WINAPI extAddFontResourceW(LPCWSTR lpszFontFile) +{ + BOOL res; + OutTraceD("AddFontResource: FontFile=\"%ls\"\n", lpszFontFile); + if(1) return TRUE; + res=(*pAddFontResourceW)(lpszFontFile); + if(!res) OutTraceE("AddFontResource: ERROR err=%d at=%d\n", GetLastError(), __LINE__); +} + +#if 0 +// to map: +// GetCurrentPositionEx +// GetViewportExtEx +// DPtoLP +// GetWindowOrgEx +// LPtoDP +// OffsetViewportOrgEx +// OffsetWindowOrgEx +// TransparentBlt +// to do: eliminate FIXTEXTOUT handling +// GetDCEx + +BOOL SetTextJustification( + _In_ HDC hdc, + _In_ int nBreakExtra, <---- + _In_ int nBreakCount +); +#endif \ No newline at end of file diff --git a/dll/gdi32.cpp b/dll/gdi32.cpp index 2c8af2f..6ddee79 100644 --- a/dll/gdi32.cpp +++ b/dll/gdi32.cpp @@ -5,6 +5,22 @@ #include "dxhook.h" #include "dxhelper.h" +#include "stdio.h" + +static void Stopper(char *s, int line) +{ + char sMsg[81]; + sprintf(sMsg,"break: \"%s\"", s); + MessageBox(0, sMsg, "break", MB_OK | MB_ICONEXCLAMATION); +} + +#define STOPPER_TEST // comment out to eliminate +#ifdef STOPPER_TEST +#define STOPPER(s) Stopper(s, __LINE__) +#else +#define STOPPER(s) +#endif + /* dlg->m_DCEmulationMode = 0; if(t->flags2 & HOOKGDI) dlg->m_DCEmulationMode = 1; @@ -17,15 +33,17 @@ static HookEntry_Type Hooks[]={ {"ScaleWindowExtEx", (FARPROC)ScaleWindowExtEx, (FARPROC *)&pGDIScaleWindowExtEx, (FARPROC)extScaleWindowExtEx}, {"SaveDC", (FARPROC)SaveDC, (FARPROC *)&pGDISaveDC, (FARPROC)extGDISaveDC}, {"RestoreDC", (FARPROC)RestoreDC, (FARPROC *)&pGDIRestoreDC, (FARPROC)extGDIRestoreDC}, + {"AnimatePalette", (FARPROC)AnimatePalette, (FARPROC *)&pAnimatePalette, (FARPROC)extAnimatePalette}, {"CreatePalette", (FARPROC)CreatePalette, (FARPROC *)&pGDICreatePalette, (FARPROC)extGDICreatePalette}, {"SelectPalette", (FARPROC)SelectPalette, (FARPROC *)&pGDISelectPalette, (FARPROC)extSelectPalette}, {"RealizePalette", (FARPROC)RealizePalette, (FARPROC *)&pGDIRealizePalette, (FARPROC)extRealizePalette}, {"GetSystemPaletteEntries", (FARPROC)GetSystemPaletteEntries, (FARPROC *)&pGDIGetSystemPaletteEntries, (FARPROC)extGetSystemPaletteEntries}, + {"SetSystemPaletteUse", (FARPROC)SetSystemPaletteUse, (FARPROC *)&pSetSystemPaletteUse, (FARPROC)extSetSystemPaletteUse}, {"StretchDIBits", (FARPROC)StretchDIBits, (FARPROC *)&pStretchDIBits, (FARPROC)extStretchDIBits}, //{"SetDIBitsToDevice", (FARPROC)NULL, (FARPROC *)&pSetDIBitsToDevice, (FARPROC)extSetDIBitsToDevice}, //{"CreateCompatibleBitmap", (FARPROC)NULL, (FARPROC *)&pCreateCompatibleBitmap, (FARPROC)extCreateCompatibleBitmap}, {0, NULL, 0, 0} // terminator -}; +}; static HookEntry_Type RemapHooks[]={ {"SetViewportOrgEx", (FARPROC)SetViewportOrgEx, (FARPROC *)&pSetViewportOrgEx, (FARPROC)extSetViewportOrgEx}, // needed in ShowBanner @@ -131,10 +149,11 @@ void HookGDI32(HMODULE module) if(dxw.dwFlags1 & CLIENTREMAPPING) HookLibrary(module, RemapHooks, libname); - if(dxw.dwFlags3 & EMULATEDC) + if(dxw.dwFlags3 & EMULATEDC){ HookLibrary(module, EmulateHooks, libname); HookLibrary(module, ScaledHooks, libname); HookLibrary(module, GDIHooks, libname); + } if(dxw.dwFlags2 & HOOKGDI){ HookLibrary(module, EmulateHooks, libname); @@ -441,7 +460,6 @@ int WINAPI extGDISaveDC(HDC hdc) ret=(*pGDISaveDC)(hdc); OutTraceD("GDI.SaveDC: hdc=%x ret=%x\n", hdc, ret); - //AutoRefreshThread=CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)AutoRefresh, (LPVOID)hdc, 0, &dwThrdId); return ret; } @@ -451,7 +469,6 @@ BOOL WINAPI extGDIRestoreDC(HDC hdc, int nSavedDC) ret=(*pGDIRestoreDC)(hdc, nSavedDC); OutTraceD("GDI.RestoreDC: hdc=%x nSavedDC=%x ret=%x\n", hdc, nSavedDC, ret); - //TerminateThread(AutoRefreshThread, 0); return ret; } @@ -466,7 +483,6 @@ HPALETTE WINAPI extGDICreatePalette(CONST LOGPALETTE *plpal) HPALETTE ret; int idx; - dxw.IsGDIPalette=TRUE; OutTraceD("GDI.CreatePalette: plpal=%x version=%x NumEntries=%x\n", plpal, plpal->palVersion, plpal->palNumEntries); ret=(*pGDICreatePalette)(plpal); if(IsDebug){ @@ -474,76 +490,83 @@ HPALETTE WINAPI extGDICreatePalette(CONST LOGPALETTE *plpal) for(idx=0; idxpalNumEntries; idx++) OutTraceD("(%x)", plpal->palPalEntry[idx]); OutTraceD("\n"); } - dxw.palVersion=plpal->palVersion; - dxw.palNumEntries=plpal->palNumEntries; - if(dxw.palNumEntries>256) dxw.palNumEntries=256; - for(idx=0; idxpalPalEntry[idx]; OutTraceD("GDI.CreatePalette: hPalette=%x\n", ret); return ret; } +HPALETTE hDesktopPalette=NULL; + HPALETTE WINAPI extSelectPalette(HDC hdc, HPALETTE hpal, BOOL bForceBackground) { HPALETTE ret; ret=(*pGDISelectPalette)(hdc, hpal, bForceBackground); OutTraceD("GDI.SelectPalette: hdc=%x hpal=%x ForceBackground=%x ret=%x\n", hdc, hpal, bForceBackground, ret); + if((OBJ_DC == GetObjectType(hdc)) && (dxw.dwFlags1 & EMULATESURFACE)){ + OutTraceD("GDI.SelectPalette: register desktop palette hpal=%x\n", hpal); + hDesktopPalette=hpal; + } return ret; } +BOOL WINAPI extAnimatePalette(HPALETTE hpal, UINT iStartIndex, UINT cEntries, const PALETTEENTRY *ppe) +{ + // Invoked by "Pharaoh's Ascent 1.4" + //STOPPER("AnimatePalette"); + return TRUE; +} + UINT WINAPI extRealizePalette(HDC hdc) { UINT ret; extern void mySetPalette(int, int, LPPALETTEENTRY); - ret=(*pGDIRealizePalette)(hdc); - OutTraceD("GDI.RealizePalette: hdc=%x ret=%x\n", hdc, ret); - - if(!dxw.IsGDIPalette) return ret; - - // quick & dirty implementation through a nasty global: - // if the SelectPalette didn't force to the background (arg bForceBackground==FALSE) - // then don't override the current palette set by the DirectDrawPalette class. - // should be cleaned up a little.... - // maybe not: now both Diablo & Dementia colors are working... - if(dxw.dwFlags1 & EMULATESURFACE) - mySetPalette(0, dxw.palNumEntries, dxw.palPalEntry); - // DEBUGGING - if(IsDebug){ - int idx; - OutTraceD("PaletteEntries[%x]= ", dxw.palNumEntries); - for(idx=0; idx -#include -#include "dxwnd.h" -#include "dxwcore.hpp" -#include "syslibs.h" -#include "dxhook.h" -#include "hddraw.h" -#include "dxhelper.h" - -static HookEntry_Type Hooks[]={ - {"UpdateWindow", (FARPROC)NULL, (FARPROC *)&pUpdateWindow, (FARPROC)extUpdateWindow}, - //{"GetWindowPlacement", (FARPROC)NULL, (FARPROC *)&pGetWindowPlacement, (FARPROC)extGetWindowPlacement}, - //{"SetWindowPlacement", (FARPROC)NULL, (FARPROC *)&pSetWindowPlacement, (FARPROC)extSetWindowPlacement}, - {"ChangeDisplaySettingsA", (FARPROC)ChangeDisplaySettingsA, (FARPROC *)&pChangeDisplaySettings, (FARPROC)extChangeDisplaySettings}, - {"ChangeDisplaySettingsExA", (FARPROC)ChangeDisplaySettingsA, (FARPROC *)&pChangeDisplaySettingsEx, (FARPROC)extChangeDisplaySettingsEx}, - {"BeginPaint", (FARPROC)BeginPaint, (FARPROC *)&pBeginPaint, (FARPROC)extBeginPaint}, - {"EndPaint", (FARPROC)EndPaint, (FARPROC *)&pEndPaint, (FARPROC)extEndPaint}, - {"ShowCursor", (FARPROC)ShowCursor, (FARPROC *)&pShowCursor, (FARPROC)extShowCursor}, - {"CreateDialogIndirectParamA", (FARPROC)CreateDialogIndirectParamA, (FARPROC *)&pCreateDialogIndirectParam, (FARPROC)extCreateDialogIndirectParam}, - {"CreateDialogParamA", (FARPROC)CreateDialogParamA, (FARPROC *)&pCreateDialogParam, (FARPROC)extCreateDialogParam}, - {"MoveWindow", (FARPROC)MoveWindow, (FARPROC *)&pMoveWindow, (FARPROC)extMoveWindow}, - {"EnumDisplaySettingsA", (FARPROC)EnumDisplaySettingsA, (FARPROC *)&pEnumDisplaySettings, (FARPROC)extEnumDisplaySettings}, - {"GetClipCursor", (FARPROC)GetClipCursor, (FARPROC*)&pGetClipCursor, (FARPROC)extGetClipCursor}, - {"ClipCursor", (FARPROC)ClipCursor, (FARPROC *)&pClipCursor, (FARPROC)extClipCursor}, - {"FillRect", (FARPROC)NULL, (FARPROC *)&pFillRect, (FARPROC)extFillRect}, - {"FrameRect", (FARPROC)NULL, (FARPROC *)&pFrameRect, (FARPROC)extFrameRect}, - {"DefWindowProcA", (FARPROC)DefWindowProcA, (FARPROC *)&pDefWindowProc, (FARPROC)extDefWindowProc}, - {"CreateWindowExA", (FARPROC)CreateWindowExA, (FARPROC *)&pCreateWindowExA, (FARPROC)extCreateWindowExA}, - {"CreateWindowExW", (FARPROC)CreateWindowExW, (FARPROC *)&pCreateWindowExW, (FARPROC)extCreateWindowExW}, - {"RegisterClassExA", (FARPROC)RegisterClassExA, (FARPROC *)&pRegisterClassExA, (FARPROC)extRegisterClassExA}, - {"GetSystemMetrics", (FARPROC)GetSystemMetrics, (FARPROC *)&pGetSystemMetrics, (FARPROC)extGetSystemMetrics}, - {"GetDesktopWindow", (FARPROC)GetDesktopWindow, (FARPROC *)&pGetDesktopWindow, (FARPROC)extGetDesktopWindow}, - {"TabbedTextOutA", (FARPROC)TabbedTextOutA, (FARPROC *)&pTabbedTextOutA, (FARPROC)extTabbedTextOutA}, - {"CloseWindow", (FARPROC)NULL, (FARPROC *)&pCloseWindow, (FARPROC)extCloseWindow}, - {"DestroyWindow", (FARPROC)NULL, (FARPROC *)&pDestroyWindow, (FARPROC)extDestroyWindow}, - {"SetSysColors", (FARPROC)NULL, (FARPROC *)&pSetSysColors, (FARPROC)extSetSysColors}, - {"SetCapture", (FARPROC)NULL, (FARPROC *)&pSetCapture, (FARPROC)extSetCapture}, - {0, NULL, 0, 0} // terminator -}; - -static HookEntry_Type EmulateHooks[]={ - {"GetDC", (FARPROC)GetDC, (FARPROC *)&pGDIGetDC, (FARPROC)extGDIGetDC}, - //{"GetWindowDC", (FARPROC)GetWindowDC, (FARPROC *)&pGDIGetWindowDC, (FARPROC)extGDIGetDC}, // not ready yet - {"ReleaseDC", (FARPROC)ReleaseDC, (FARPROC *)&pGDIReleaseDC, (FARPROC)extGDIReleaseDC}, - {0, NULL, 0, 0} // terminator -}; - -static HookEntry_Type DDHooks[]={ - {"GetDC", (FARPROC)GetDC, (FARPROC *)&pGDIGetDC, (FARPROC)extDDGetDC}, - {"GetWindowDC", (FARPROC)GetWindowDC, (FARPROC *)&pGDIGetWindowDC, (FARPROC)extDDGetDC}, - {"ReleaseDC", (FARPROC)ReleaseDC, (FARPROC *)&pGDIReleaseDC, (FARPROC)extDDReleaseDC}, - {"InvalidateRect", (FARPROC)InvalidateRect, (FARPROC *)&pInvalidateRect, (FARPROC)extDDInvalidateRect}, - {0, NULL, 0, 0} // terminator -}; - -static HookEntry_Type GDIHooks[]={ - {"GetDC", (FARPROC)GetDC, (FARPROC *)&pGDIGetDC, (FARPROC)extGDIGetDC}, - {"GetDCEx", (FARPROC)NULL, (FARPROC *)&pGDIGetDCEx, (FARPROC)extGDIGetDCEx}, - {"GetWindowDC", (FARPROC)GetWindowDC, (FARPROC *)&pGDIGetWindowDC, (FARPROC)extGDIGetDC}, - {"ReleaseDC", (FARPROC)ReleaseDC, (FARPROC *)&pGDIReleaseDC, (FARPROC)extGDIReleaseDC}, - {"InvalidateRect", (FARPROC)InvalidateRect, (FARPROC *)&pInvalidateRect, (FARPROC)extInvalidateRect}, - {0, NULL, 0, 0} // terminator -}; - -static HookEntry_Type RemapHooks[]={ - {"ScreenToClient", (FARPROC)ScreenToClient, (FARPROC *)&pScreenToClient, (FARPROC)extScreenToClient}, - {"ClientToScreen", (FARPROC)ClientToScreen, (FARPROC *)&pClientToScreen, (FARPROC)extClientToScreen}, - {"GetClientRect", (FARPROC)GetClientRect, (FARPROC *)&pGetClientRect, (FARPROC)extGetClientRect}, - {"GetWindowRect", (FARPROC)GetWindowRect, (FARPROC *)&pGetWindowRect, (FARPROC)extGetWindowRect}, - {"MapWindowPoints", (FARPROC)MapWindowPoints, (FARPROC *)&pMapWindowPoints, (FARPROC)extMapWindowPoints}, - {0, NULL, 0, 0} // terminator -}; - -static HookEntry_Type PeekAllHooks[]={ - {"PeekMessageA", (FARPROC)NULL, (FARPROC *)&pPeekMessage, (FARPROC)extPeekMessage}, - {"PeekMessageW", (FARPROC)NULL, (FARPROC *)&pPeekMessage, (FARPROC)extPeekMessage}, - {0, NULL, 0, 0} // terminator -}; - -static HookEntry_Type MouseHooks[]={ - {"GetCursorPos", (FARPROC)GetCursorPos, (FARPROC *)&pGetCursorPos, (FARPROC)extGetCursorPos}, - {"SetCursor", (FARPROC)SetCursor, (FARPROC *)&pSetCursor, (FARPROC)extSetCursor}, - {"SendMessageA", (FARPROC)SendMessageA, (FARPROC *)&pSendMessageA, (FARPROC)extSendMessage}, // ??? - {"SendMessageW", (FARPROC)SendMessageW, (FARPROC *)&pSendMessageW, (FARPROC)extSendMessage}, // ??? - //{"SetPhysicalCursorPos", NULL, (FARPROC *)&pSetCursor, (FARPROC)extSetCursor}, // ??? - {0, NULL, 0, 0} // terminator -}; - -static HookEntry_Type WinHooks[]={ - {"ShowWindow", (FARPROC)ShowWindow, (FARPROC *)&pShowWindow, (FARPROC)extShowWindow}, - {"SetWindowLongA", (FARPROC)SetWindowLongA, (FARPROC *)&pSetWindowLong, (FARPROC)extSetWindowLong}, - {"GetWindowLongA", (FARPROC)GetWindowLongA, (FARPROC *)&pGetWindowLong, (FARPROC)extGetWindowLong}, - {"SetWindowPos", (FARPROC)SetWindowPos, (FARPROC *)&pSetWindowPos, (FARPROC)extSetWindowPos}, - {"DeferWindowPos", (FARPROC)DeferWindowPos, (FARPROC *)&pGDIDeferWindowPos, (FARPROC)extDeferWindowPos}, - {"CallWindowProcA", (FARPROC)CallWindowProcA, (FARPROC *)&pCallWindowProc, (FARPROC)extCallWindowProc}, - {0, NULL, 0, 0} // terminator -}; - -static HookEntry_Type MouseHooks2[]={ - {"SetCursorPos", (FARPROC)SetCursorPos, (FARPROC *)&pSetCursorPos, (FARPROC)extSetCursorPos}, - {0, NULL, 0, 0} // terminator -}; - -FARPROC Remap_user32_ProcAddress(LPCSTR proc, HMODULE hModule) -{ - FARPROC addr; - if (addr=RemapLibrary(proc, hModule, Hooks)) return addr; - if ((dxw.dwFlags3 & EMULATEDC) || (dxw.dwFlags2 & HOOKGDI) || (dxw.dwFlags1 & MAPGDITOPRIMARY)) - if (addr=RemapLibrary(proc, hModule, EmulateHooks)) return addr; - if (addr=RemapLibrary(proc, hModule, (dxw.dwFlags1 & MAPGDITOPRIMARY) ? DDHooks : GDIHooks)) return addr; - if (dxw.dwFlags1 & CLIENTREMAPPING) - if (addr=RemapLibrary(proc, hModule, RemapHooks)) return addr; - if(dxw.dwFlags1 & MODIFYMOUSE) - if (addr=RemapLibrary(proc, hModule, MouseHooks)) return addr; - if (dxw.dwFlags1 & (PREVENTMAXIMIZE|FIXWINFRAME|LOCKWINPOS|LOCKWINSTYLE)) - if (addr=RemapLibrary(proc, hModule, WinHooks)) return addr; - if((dxw.dwFlags1 & (MODIFYMOUSE|SLOWDOWN|KEEPCURSORWITHIN)) || (dxw.dwFlags2 & KEEPCURSORFIXED)) - if (addr=RemapLibrary(proc, hModule, MouseHooks2)) return addr; - if(dxw.dwFlags3 & PEEKALLMESSAGES) - if (addr=RemapLibrary(proc, hModule, PeekAllHooks)) return addr; - return NULL; -} - -static char *libname = "user32.dll"; - -void HookUser32(HMODULE hModule) -{ - HookLibrary(hModule, Hooks, libname); - if ((dxw.dwFlags3 & EMULATEDC) || (dxw.dwFlags2 & HOOKGDI) || (dxw.dwFlags1 & MAPGDITOPRIMARY)) - HookLibrary(hModule, EmulateHooks, libname); - HookLibrary(hModule, (dxw.dwFlags1 & MAPGDITOPRIMARY) ? DDHooks : GDIHooks, libname); - if (dxw.dwFlags1 & CLIENTREMAPPING) HookLibrary(hModule, RemapHooks, libname); - if(dxw.dwFlags1 & MODIFYMOUSE)HookLibrary(hModule, MouseHooks, libname); - if (dxw.dwFlags1 & (PREVENTMAXIMIZE|FIXWINFRAME|LOCKWINPOS|LOCKWINSTYLE))HookLibrary(hModule, WinHooks, libname); - if((dxw.dwFlags1 & (MODIFYMOUSE|SLOWDOWN|KEEPCURSORWITHIN)) || (dxw.dwFlags2 & KEEPCURSORFIXED)) HookLibrary(hModule, MouseHooks2, libname); - if(dxw.dwFlags3 & PEEKALLMESSAGES) HookLibrary(hModule, PeekAllHooks, libname); - return; -} - -void HookUser32Init() -{ - HookLibInit(Hooks); - HookLibInit(DDHooks); - HookLibInit(RemapHooks); - HookLibInit(MouseHooks); - HookLibInit(WinHooks); - HookLibInit(MouseHooks2); -} - -// -------------------------------------------------------------------------- -// -// globals, externs, static functions... -// -// -------------------------------------------------------------------------- - -// PrimHDC: DC handle of the selected DirectDraw primary surface. NULL when invalid. -HDC PrimHDC=NULL; - -BOOL isWithinDialog=FALSE; -LPRECT lpClipRegion=NULL; -RECT ClipRegion; -int LastCurPosX, LastCurPosY; - -extern GetDC_Type pGetDC; -extern ReleaseDC_Type pReleaseDC; -extern DEVMODE *pSetDevMode; -extern void FixWindowFrame(HWND); -extern LRESULT CALLBACK extChildWindowProc(HWND, UINT, WPARAM, LPARAM); -extern HRESULT WINAPI sBlt(char *, LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT, DWORD, LPDDBLTFX, BOOL); - -extern INT_PTR CALLBACK extDialogWindowProc(HWND, UINT, WPARAM, LPARAM); - -LONG WINAPI MyChangeDisplaySettings(char *fname, DEVMODE *lpDevMode, DWORD dwflags) -{ - HRESULT res; - - // v2.02.32: reset the emulated DC used in EMULATEDC mode - dxw.ResetEmulatedDC(); - - // save desired settings first v.2.1.89 - // v2.1.95 protect when lpDevMode is null (closing game... Jedi Outcast) - // v2.2.23 consider new width/height only when dmFields flags are set. - if(lpDevMode && (lpDevMode->dmFields & (DM_PELSWIDTH | DM_PELSHEIGHT))){ - RECT client; - dxw.SetScreenSize(lpDevMode->dmPelsWidth, lpDevMode->dmPelsHeight); - // v2.02.31: when main win is bigger that expected resolution, you're in windowed fullscreen mode - //(*pGetClientRect)((dxw.dwFlags1 & FIXPARENTWIN) ? dxw.hParentWnd : dxw.GethWnd(), &client); - (*pGetClientRect)(dxw.GethWnd(), &client); - OutTraceD("%s: current hWnd=%x size=(%d,%d)\n", fname, dxw.GethWnd(), client.right, client.bottom); - if((client.right>=(LONG)lpDevMode->dmPelsWidth) && (client.bottom>=(LONG)lpDevMode->dmPelsHeight)) { - OutTraceD("%s: entering FULLSCREEN mode\n", fname); - dxw.SetFullScreen(TRUE); - } - } - - if ((dwflags==0 || dwflags==CDS_FULLSCREEN) && lpDevMode){ - if (dxw.dwFlags1 & EMULATESURFACE || !(lpDevMode->dmFields & DM_BITSPERPEL)){ - OutTraceD("%s: BYPASS res=DISP_CHANGE_SUCCESSFUL\n", fname); - return DISP_CHANGE_SUCCESSFUL; - } - else{ - DEVMODE NewMode; - if(dwflags==CDS_FULLSCREEN) dwflags=0; // no FULLSCREEN - EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &NewMode); - OutTraceD("ChangeDisplaySettings: CURRENT wxh=(%dx%d) BitsPerPel=%d -> %d\n", - NewMode.dmPelsWidth, NewMode.dmPelsHeight, NewMode.dmBitsPerPel, - lpDevMode->dmBitsPerPel); - NewMode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; - NewMode.dmBitsPerPel = lpDevMode->dmBitsPerPel; - res=(*pChangeDisplaySettings)(&NewMode, 0); - if(res) OutTraceE("ChangeDisplaySettings: ERROR err=%d at %d\n", GetLastError(), __LINE__); - return res; - } - } - else - return (*pChangeDisplaySettings)(lpDevMode, dwflags); -} - -void dxwFixWindowPos(char *ApiName, HWND hwnd, LPARAM lParam) -{ - LPWINDOWPOS wp; - int MaxX, MaxY; - wp = (LPWINDOWPOS)lParam; - MaxX = dxw.iSizX; - MaxY = dxw.iSizY; - if (!MaxX) MaxX = dxw.GetScreenWidth(); - if (!MaxY) MaxY = dxw.GetScreenHeight(); - static int iLastCX, iLastCY; - static int BorderX=-1; - static int BorderY=-1; - int cx, cy; - - OutTraceD("%s: GOT hwnd=%x pos=(%d,%d) dim=(%d,%d) Flags=%x(%s)\n", - ApiName, hwnd, wp->x, wp->y, wp->cx, wp->cy, wp->flags, ExplainWPFlags(wp->flags)); - - if (dxw.dwFlags1 & PREVENTMAXIMIZE){ - int UpdFlag = 0; - - if(wp->cx>MaxX) { wp->cx=MaxX; UpdFlag=1; } - if(wp->cy>MaxY) { wp->cy=MaxY; UpdFlag=1; } - if (UpdFlag) - OutTraceD("%s: SET max dim=(%d,%d)\n", ApiName, wp->cx, wp->cy); - } - - if ((wp->flags & (SWP_NOMOVE|SWP_NOSIZE))==(SWP_NOMOVE|SWP_NOSIZE)) return; //v2.02.13 - - if ((dxw.dwFlags1 & LOCKWINPOS) && dxw.IsFullScreen() && (hwnd==dxw.GethWnd())){ - extern void CalculateWindowPos(HWND, DWORD, DWORD, LPWINDOWPOS); - CalculateWindowPos(hwnd, MaxX, MaxY, wp); - OutTraceD("%s: LOCK pos=(%d,%d) dim=(%d,%d)\n", ApiName, wp->x, wp->y, wp->cx, wp->cy); - } - - if ((dxw.dwFlags2 & KEEPASPECTRATIO) && dxw.IsFullScreen() && (hwnd==dxw.GethWnd())){ - // note: while keeping aspect ration, resizing from one corner doesn't tell - // which coordinate is prevalent to the other. We made an arbitrary choice. - // note: v2.1.93: compensation must refer to the client area, not the wp - // window dimensions that include the window borders. - if(BorderX==-1){ - RECT client, full; - (*pGetClientRect)(hwnd, &client); - (*pGetWindowRect)(hwnd, &full); - BorderX= full.right - full.left - client.right; - BorderY= full.bottom - full.top - client.bottom; - OutTraceD("%s: KEEPASPECTRATIO window borders=(%d,%d)\n", ApiName, BorderX, BorderY); - } - extern LRESULT LastCursorPos; - switch (LastCursorPos){ - case HTBOTTOM: - case HTTOP: - case HTBOTTOMLEFT: - case HTBOTTOMRIGHT: - case HTTOPLEFT: - case HTTOPRIGHT: - cx = BorderX + ((wp->cy - BorderY) * dxw.GetScreenWidth()) / dxw.GetScreenHeight(); - if(cx!=wp->cx){ - OutTraceD("%s: KEEPASPECTRATIO adjusted cx=%d->%d\n", ApiName, wp->cx, cx); - wp->cx = cx; - } - break; - case HTLEFT: - case HTRIGHT: - cy = BorderY + ((wp->cx - BorderX) * dxw.GetScreenHeight()) / dxw.GetScreenWidth(); - if(cy!=wp->cy){ - OutTraceD("%s: KEEPASPECTRATIO adjusted cy=%d->%d\n", ApiName, wp->cy, cy); - wp->cy = cy; - } - break; - } - } - - iLastCX= wp->cx; - iLastCY= wp->cy; -} - -void dxwFixMinMaxInfo(char *ApiName, HWND hwnd, LPARAM lParam) -{ - if (dxw.dwFlags1 & PREVENTMAXIMIZE){ - LPMINMAXINFO lpmmi; - lpmmi=(LPMINMAXINFO)lParam; - OutTraceD("%s: GOT MaxPosition=(%d,%d) MaxSize=(%d,%d)\n", ApiName, - lpmmi->ptMaxPosition.x, lpmmi->ptMaxPosition.y, lpmmi->ptMaxSize.x, lpmmi->ptMaxSize.y); - lpmmi->ptMaxPosition.x=0; - lpmmi->ptMaxPosition.y=0; - if(pSetDevMode){ - lpmmi->ptMaxSize.x = pSetDevMode->dmPelsWidth; - lpmmi->ptMaxSize.y = pSetDevMode->dmPelsHeight; - } - else{ - lpmmi->ptMaxSize.x = dxw.GetScreenWidth(); - lpmmi->ptMaxSize.y = dxw.GetScreenHeight(); - } - OutTraceD("%s: SET PREVENTMAXIMIZE MaxPosition=(%d,%d) MaxSize=(%d,%d)\n", ApiName, - lpmmi->ptMaxPosition.x, lpmmi->ptMaxPosition.y, lpmmi->ptMaxSize.x, lpmmi->ptMaxSize.y); - } - // v2.1.75: added logic to fix win coordinates to selected ones. - // fixes the problem with "Achtung Spitfire", that can't be managed through PREVENTMAXIMIZE flag. - if (dxw.dwFlags1 & LOCKWINPOS){ - LPMINMAXINFO lpmmi; - lpmmi=(LPMINMAXINFO)lParam; - OutTraceD("%s: GOT MaxPosition=(%d,%d) MaxSize=(%d,%d)\n", ApiName, - lpmmi->ptMaxPosition.x, lpmmi->ptMaxPosition.y, lpmmi->ptMaxSize.x, lpmmi->ptMaxSize.y); - lpmmi->ptMaxPosition.x=dxw.iPosX; - lpmmi->ptMaxPosition.y=dxw.iPosY; - lpmmi->ptMaxSize.x = dxw.iSizX ? dxw.iSizX : dxw.GetScreenWidth(); - lpmmi->ptMaxSize.y = dxw.iSizY ? dxw.iSizY : dxw.GetScreenHeight(); - OutTraceD("%s: SET LOCKWINPOS MaxPosition=(%d,%d) MaxSize=(%d,%d)\n", ApiName, - lpmmi->ptMaxPosition.x, lpmmi->ptMaxPosition.y, lpmmi->ptMaxSize.x, lpmmi->ptMaxSize.y); - } -} - -static LRESULT WINAPI FixWindowProc(char *ApiName, HWND hwnd, UINT Msg, WPARAM wParam, LPARAM *lpParam) -{ - LPARAM lParam; - - lParam=*lpParam; - OutTraceW("%s: hwnd=%x msg=[0x%x]%s(%x,%x)\n", - ApiName, hwnd, Msg, ExplainWinMessage(Msg), wParam, lParam); - - switch(Msg){ - case WM_ERASEBKGND: - OutTraceD("%s: prevent erase background\n", ApiName); - return 1; // 1=erased - break; // useless - case WM_GETMINMAXINFO: - dxwFixMinMaxInfo(ApiName, hwnd, lParam); - break; - case WM_WINDOWPOSCHANGING: - case WM_WINDOWPOSCHANGED: - dxwFixWindowPos(ApiName, hwnd, lParam); - break; - case WM_STYLECHANGING: - case WM_STYLECHANGED: - dxw.FixStyle(ApiName, hwnd, wParam, lParam); - break; - case WM_SIZE: - if ((dxw.dwFlags1 & LOCKWINPOS) && dxw.IsFullScreen()) return 0; - if (dxw.dwFlags1 & PREVENTMAXIMIZE){ - if ((wParam == SIZE_MAXIMIZED)||(wParam == SIZE_MAXSHOW)){ - OutTraceD("%s: prevent screen SIZE to fullscreen wparam=%d(%s) size=(%d,%d)\n", ApiName, - wParam, ExplainResizing(wParam), HIWORD(lParam), LOWORD(lParam)); - return 0; // checked - //lParam = MAKELPARAM(dxw.GetScreenWidth(), dxw.GetScreenHeight()); - //OutTraceD("%s: updated SIZE wparam=%d(%s) size=(%d,%d)\n", ApiName, - // wParam, ExplainResizing(wParam), HIWORD(lParam), LOWORD(lParam)); - } - } - break; - default: - break; - } - - // marker to run hooked function - return(-1); -} - -static POINT FixMessagePt(HWND hwnd, POINT point) -{ - RECT rect; - static POINT curr; - curr=point; - - if(!(*pScreenToClient)(hwnd, &curr)){ - OutTraceE("ScreenToClient ERROR=%d hwnd=%x at %d\n", GetLastError(), hwnd, __LINE__); - curr.x = curr.y = 0; - } - - if (!(*pGetClientRect)(hwnd, &rect)) { - OutTraceE("GetClientRect ERROR=%d hwnd=%x at %d\n", GetLastError(), hwnd, __LINE__); - curr.x = curr.y = 0; - } - -#ifdef ISDEBUG - if(IsDebug) OutTrace("FixMessagePt point=(%d,%d) hwnd=%x win pos=(%d,%d) size=(%d,%d)\n", - point.x, point.y, hwnd, point.x-curr.x, point.y-curr.y, rect.right, rect.bottom); -#endif - - if (curr.x < 0) curr.x=0; - if (curr.y < 0) curr.y=0; - if (curr.x > rect.right) curr.x=rect.right; - if (curr.y > rect.bottom) curr.y=rect.bottom; - if (rect.right) curr.x = (curr.x * dxw.GetScreenWidth()) / rect.right; - if (rect.bottom) curr.y = (curr.y * dxw.GetScreenHeight()) / rect.bottom; - - return curr; -} - -// -------------------------------------------------------------------------- -// -// user32 API hookers -// -// -------------------------------------------------------------------------- - -BOOL WINAPI extDDInvalidateRect(HWND hwnd, RECT *lpRect, BOOL bErase) -{ - if(lpRect) - OutTraceD("InvalidateRect: hwnd=%x rect=(%d,%d)-(%d,%d) erase=%x\n", - hwnd, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, bErase); - else - OutTraceD("InvalidateRect: hwnd=%x rect=NULL erase=%x\n", - hwnd, bErase); - - return (*pInvalidateRect)(hwnd, NULL, bErase); -} - -BOOL WINAPI extInvalidateRect(HWND hwnd, RECT *lpRect, BOOL bErase) -{ - if(lpRect) - OutTraceD("InvalidateRect: hwnd=%x rect=(%d,%d)-(%d,%d) erase=%x\n", - hwnd, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, bErase); - else - OutTraceD("InvalidateRect: hwnd=%x rect=NULL erase=%x\n", - hwnd, bErase); - - return (*pInvalidateRect)(hwnd, NULL, bErase); -} - -BOOL WINAPI extShowWindow(HWND hwnd, int nCmdShow) -{ - BOOL res; - - OutTraceD("ShowWindow: hwnd=%x, CmdShow=%x(%s)\n", hwnd, nCmdShow, ExplainShowCmd(nCmdShow)); - if (dxw.dwFlags1 & PREVENTMAXIMIZE){ - if(nCmdShow==SW_MAXIMIZE){ - OutTraceD("ShowWindow: suppress maximize\n"); - nCmdShow=SW_SHOWNORMAL; - } - } - - res=(*pShowWindow)(hwnd, nCmdShow); - - return res; -} - -LONG WINAPI extGetWindowLong(HWND hwnd, int nIndex) -{ - LONG res; - - res=(*pGetWindowLong)(hwnd, nIndex); - - OutTraceD("GetWindowLong: hwnd=%x, Index=%x(%s) res=%x\n", hwnd, nIndex, ExplainSetWindowIndex(nIndex), res); - - if(nIndex==GWL_WNDPROC){ - WNDPROC wp; - wp=WhndGetWindowProc(hwnd); - OutTraceD("GetWindowLong: remapping WindowProc res=%x -> %x\n", res, (LONG)wp); - if(wp) res=(LONG)wp; // if not found, don't alter the value. - } - - return res; -} - -LONG WINAPI extSetWindowLong(HWND hwnd, int nIndex, LONG dwNewLong) -{ - LONG res; - - OutTraceD("SetWindowLong: hwnd=%x, Index=%x(%s) Val=%x\n", - hwnd, nIndex, ExplainSetWindowIndex(nIndex), dwNewLong); - - //if(!hwnd) hwnd=dxw.GethWnd(); - - if (dxw.dwFlags1 & LOCKWINSTYLE){ - if(nIndex==GWL_STYLE){ - OutTraceD("SetWindowLong: Lock GWL_STYLE=%x\n", dwNewLong); - //return 1; - return (*pGetWindowLong)(hwnd, nIndex); - } - if(nIndex==GWL_EXSTYLE){ - OutTraceD("SetWindowLong: Lock GWL_EXSTYLE=%x\n", dwNewLong); - //return 1; - return (*pGetWindowLong)(hwnd, nIndex); - } - } - - if (dxw.dwFlags1 & PREVENTMAXIMIZE){ - if(nIndex==GWL_STYLE){ - dwNewLong &= ~WS_MAXIMIZE; - if(dxw.IsDesktop(hwnd)){ - OutTraceD("SetWindowLong: GWL_STYLE %x suppress MAXIMIZE\n", dwNewLong); - dwNewLong |= WS_OVERLAPPEDWINDOW; - dwNewLong &= ~(WS_DLGFRAME|WS_MAXIMIZE|WS_VSCROLL|WS_HSCROLL|WS_CLIPSIBLINGS); - } - } - // v2.02.32: disable topmost for main window only - if(dxw.IsDesktop(hwnd) && (nIndex==GWL_EXSTYLE)){ - OutTraceD("SetWindowLong: GWL_EXSTYLE %x suppress TOPMOST\n", dwNewLong); - dwNewLong = dwNewLong & ~(WS_EX_TOPMOST); - } - } - - if (dxw.dwFlags1 & FIXWINFRAME){ - if((nIndex==GWL_STYLE) && !(dwNewLong & WS_CHILD)){ - OutTraceD("SetWindowLong: GWL_STYLE %x force OVERLAPPEDWINDOW\n", dwNewLong); - dwNewLong |= WS_OVERLAPPEDWINDOW; - dwNewLong &= ~WS_CLIPSIBLINGS; - } - } - - if (nIndex==GWL_WNDPROC){ - WNDPROC lres; - WNDPROC OldProc; - // GPL fix - if(dxw.IsRealDesktop(hwnd)) { - hwnd=dxw.GethWnd(); - OutTraceD("SetWindowLong: DESKTOP hwnd, FIXING hwnd=%x\n",hwnd); - } - // end of GPL fix - - OldProc = (WNDPROC)(*pGetWindowLong)(hwnd, GWL_WNDPROC); - if(OldProc==extWindowProc) OldProc=WhndGetWindowProc(hwnd); - WhndStackPush(hwnd, (WNDPROC)dwNewLong); - res=(LONG)OldProc; - SetLastError(0); - lres=(WNDPROC)(*pSetWindowLong)(hwnd, GWL_WNDPROC, (LONG)extWindowProc); - if(!lres && GetLastError())OutTraceE("SetWindowLong: ERROR err=%d at %d\n", GetLastError(), __LINE__); - } - else { - res=(*pSetWindowLong)(hwnd, nIndex, dwNewLong); - } - - OutTraceD("SetWindowLong: hwnd=%x, nIndex=%x, Val=%x, res=%x\n", hwnd, nIndex, dwNewLong, res); - return res; -} - -BOOL WINAPI extSetWindowPos(HWND hwnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags) -{ - BOOL res; - - OutTraceD("SetWindowPos: hwnd=%x%s pos=(%d,%d) dim=(%d,%d) Flags=%x\n", - hwnd, dxw.IsFullScreen()?"(FULLSCREEN)":"", X, Y, cx, cy, uFlags); - - //if ((hwnd != dxw.GethWnd()) || !dxw.IsFullScreen()){ - if (!dxw.IsDesktop(hwnd) || !dxw.IsFullScreen()){ - // just proxy - res=(*pSetWindowPos)(hwnd, hWndInsertAfter, X, Y, cx, cy, uFlags); - if(!res)OutTraceE("SetWindowPos: ERROR err=%d at %d\n", GetLastError(), __LINE__); - return res; - } - - if ((dxw.dwFlags1 & LOCKWINPOS) && dxw.IsFullScreen()){ - // Note: any attempt to change the window position, no matter where and how, through the - // SetWindowPos API is causing resizing to the default 1:1 pixed size in Commandos. - // in such cases, there is incompatibility between LOCKWINPOS and LOCKWINSTYLE. - OutTraceD("SetWindowPos: locked position\n"); - return 1; - } - - if (dxw.dwFlags1 & PREVENTMAXIMIZE){ - int UpdFlag =0; - int MaxX, MaxY; - MaxX = dxw.iSizX; - MaxY = dxw.iSizY; - if (!MaxX) MaxX = dxw.GetScreenWidth(); - if (!MaxY) MaxY = dxw.GetScreenHeight(); - if(cx>MaxX) { cx=MaxX; UpdFlag=1; } - if(cy>MaxY) { cy=MaxY; UpdFlag=1; } - if (UpdFlag) - OutTraceD("SetWindowPos: using max dim=(%d,%d)\n", cx, cy); - } - - // useful??? to be demonstrated.... - // when altering main window in fullscreen mode, fix the coordinates for borders - DWORD dwCurStyle; - RECT rect; - rect.top=rect.left=0; - rect.right=cx; rect.bottom=cy; - dwCurStyle=(*pGetWindowLong)(hwnd, GWL_STYLE); - AdjustWindowRect(&rect, dwCurStyle, FALSE); - cx=rect.right; cy=rect.bottom; - OutTraceD("SetWindowPos: main form hwnd=%x fixed size=(%d,%d)\n", hwnd, cx, cy); - - res=(*pSetWindowPos)(hwnd, hWndInsertAfter, X, Y, cx, cy, uFlags); - if(!res)OutTraceE("SetWindowPos: ERROR err=%d at %d\n", GetLastError(), __LINE__); - return res; -} - -HDWP WINAPI extDeferWindowPos(HDWP hWinPosInfo, HWND hwnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags) -{ - // v2.02.31: heavily used by "Imperialism II" !!! - HDWP res; - - OutTraceD("DeferWindowPos: hwnd=%x%s pos=(%d,%d) dim=(%d,%d) Flags=%x\n", - hwnd, dxw.IsFullScreen()?"(FULLSCREEN)":"", X, Y, cx, cy, uFlags); - - if(dxw.IsFullScreen()){ - dxw.MapClient(&X, &Y, &cx, &cy); - OutTraceD("DeferWindowPos: remapped pos=(%d,%d) dim=(%d,%d)\n", X, Y, cx, cy); - } - - res=(*pGDIDeferWindowPos)(hWinPosInfo, hwnd, hWndInsertAfter, X, Y, cx, cy, uFlags); - if(!res)OutTraceE("DeferWindowPos: ERROR err=%d at %d\n", GetLastError(), __LINE__); - return res; -} - -LRESULT WINAPI extSendMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) -{ - LRESULT ret; - OutTraceW("SendMessage: hwnd=%x WinMsg=[0x%x]%s(%x,%x)\n", - hwnd, Msg, ExplainWinMessage(Msg), wParam, lParam); - - //if(Msg==WM_NCDESTROY) return 1; - - if(dxw.dwFlags1 & MODIFYMOUSE){ - switch (Msg){ - case WM_MOUSEMOVE: - case WM_MOUSEWHEEL: - case WM_LBUTTONDOWN: - case WM_LBUTTONUP: - case WM_LBUTTONDBLCLK: - case WM_RBUTTONDOWN: - case WM_RBUTTONUP: - case WM_RBUTTONDBLCLK: - case WM_MBUTTONDOWN: - case WM_MBUTTONUP: - case WM_MBUTTONDBLCLK: - // revert here the WindowProc mouse correction - POINT prev, curr; - RECT rect; - prev.x = LOWORD(lParam); - prev.y = HIWORD(lParam); - (*pGetClientRect)(dxw.GethWnd(), &rect); - curr.x = (prev.x * rect.right) / dxw.GetScreenWidth(); - curr.y = (prev.y * rect.bottom) / dxw.GetScreenHeight(); - if (Msg == WM_MOUSEWHEEL){ // v2.02.33 mousewheel fix - POINT upleft={0,0}; - (*pClientToScreen)(dxw.GethWnd(), &upleft); - curr = dxw.AddCoordinates(curr, upleft); - } - lParam = MAKELPARAM(curr.x, curr.y); - OutTraceC("SendMessage: hwnd=%x pos XY=(%d,%d)->(%d,%d)\n", hwnd, prev.x, prev.y, curr.x, curr.y); - break; - default: - break; - } - } - ret=(*pSendMessageA)(hwnd, Msg, wParam, lParam); - OutTraceW("SendMessage: lresult=%x\n", ret); - return ret; -} - -HCURSOR WINAPI extSetCursor(HCURSOR hCursor) -{ - HCURSOR ret; - - ret=(*pSetCursor)(hCursor); - OutTraceD("GDI.SetCursor: Cursor=%x, ret=%x\n", hCursor, ret); - //MessageBox(0, "SelectPalette", "GDI32.dll", MB_OK | MB_ICONEXCLAMATION); - return ret; -} - -BOOL WINAPI extGetCursorPos(LPPOINT lppoint) -{ - HRESULT res; - static int PrevX, PrevY; - POINT prev; - - if(dxw.dwFlags1 & SLOWDOWN) dxw.DoSlow(2); - - if (pGetCursorPos) { - res=(*pGetCursorPos)(lppoint); - } - else { - lppoint->x =0; lppoint->y=0; - res=1; - } - - prev=*lppoint; - *lppoint=dxw.ScreenToClient(*lppoint); - *lppoint=dxw.FixCursorPos(*lppoint); - GetHookInfo()->CursorX=(short)lppoint->x; - GetHookInfo()->CursorY=(short)lppoint->y; - OutTraceC("GetCursorPos: FIXED pos=(%d,%d)->(%d,%d)\n", prev.x, prev.y, lppoint->x, lppoint->y); - - return res; -} - -BOOL WINAPI extSetCursorPos(int x, int y) -{ - BOOL res; - int PrevX, PrevY; - - PrevX=x; - PrevY=y; - - if(dxw.dwFlags2 & KEEPCURSORFIXED) { - OutTraceC("SetCursorPos: FIXED pos=(%d,%d)\n", x, y); - LastCurPosX=x; - LastCurPosY=y; - return 1; - } - - if(dxw.dwFlags1 & SLOWDOWN) dxw.DoSlow(2); - - if(dxw.dwFlags1 & KEEPCURSORWITHIN){ - // Intercept SetCursorPos outside screen boundaries (used as Cursor OFF in some games) - if ((y<0)||(y>=(int)dxw.GetScreenHeight())||(x<0)||(x>=(int)dxw.GetScreenWidth())) return 1; - } - - if(dxw.dwFlags1 & MODIFYMOUSE){ - POINT cur; - RECT rect; - - // find window metrics - if (!(*pGetClientRect)(dxw.GethWnd(), &rect)) { - // report error and ignore ... - OutTraceE("GetClientRect(%x) ERROR %d at %d\n", dxw.GethWnd(), GetLastError(), __LINE__); - return 0; - } - - x= x * rect.right / dxw.GetScreenWidth(); - y= y * rect.bottom / dxw.GetScreenHeight(); - - // check for boundaries (???) - if (x >= rect.right) x=rect.right-1; - if (x<0) x=0; - if (y >= rect.bottom) y=rect.bottom-1; - if (y<0) y=0; - - // make it screen absolute - cur.x = x; - cur.y = y; - if (!(*pClientToScreen)(dxw.GethWnd(), &cur)) { - OutTraceE("ClientToScreen(%x) ERROR %d at %d\n", dxw.GethWnd(), GetLastError(), __LINE__); - return 0; - } - x = cur.x; - y = cur.y; - } - - res=0; - if (pSetCursorPos) res=(*pSetCursorPos)(x,y); - - OutTraceC("SetCursorPos: res=%x XY=(%d,%d)->(%d,%d)\n",res, PrevX, PrevY, x, y); - return res; -} - -BOOL WINAPI extPeekMessage(LPMSG lpMsg, HWND hwnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg) -{ - BOOL res; - - res=(*pPeekMessage)(lpMsg, hwnd, 0, 0, (wRemoveMsg & 0x000F)); - - OutTraceW("PeekMessage: ANY lpmsg=%x hwnd=%x filter=(%x-%x) remove=%x(%s) msg=%x(%s) wparam=%x, lparam=%x pt=(%d,%d) res=%x\n", - lpMsg, lpMsg->hwnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg, ExplainPeekRemoveMsg(wRemoveMsg), - lpMsg->message, ExplainWinMessage(lpMsg->message & 0xFFFF), - lpMsg->wParam, lpMsg->lParam, lpMsg->pt.x, lpMsg->pt.y, res); - - return res; -} - -BOOL WINAPI extClientToScreen(HWND hwnd, LPPOINT lppoint) -{ - // v2.02.10: fully revised to handle scaled windows - BOOL res; - - OutTraceB("ClientToScreen: hwnd=%x hWnd=%x FullScreen=%x point=(%d,%d)\n", - hwnd, dxw.GethWnd(), dxw.IsFullScreen(), lppoint->x, lppoint->y); - if (lppoint && dxw.IsFullScreen()){ - *lppoint = dxw.AddCoordinates(*lppoint, dxw.ClientOffset(hwnd)); - OutTraceB("ClientToScreen: FIXED point=(%d,%d)\n", lppoint->x, lppoint->y); - res=TRUE; - } - else { - res=(*pClientToScreen)(hwnd, lppoint); - } - return res; -} - -BOOL WINAPI extScreenToClient(HWND hwnd, LPPOINT lppoint) -{ - // v2.02.10: fully revised to handle scaled windows - BOOL res; - OutTraceB("ScreenToClient: hwnd=%x hWnd=%x FullScreen=%x point=(%d,%d)\n", - hwnd, dxw.GethWnd(), dxw.IsFullScreen(), lppoint->x, lppoint->y); - - if (lppoint && (lppoint->x == -32000) && (lppoint->y == -32000)) return 1; - - if (lppoint && dxw.IsFullScreen()){ - *lppoint = dxw.SubCoordinates(*lppoint, dxw.ClientOffset(hwnd)); - OutTraceB("ScreenToClient: FIXED point=(%d,%d)\n", lppoint->x, lppoint->y); - res=TRUE; - } - else { - res=(*pScreenToClient)(hwnd, lppoint); - } - return res; -} - -BOOL WINAPI extGetClientRect(HWND hwnd, LPRECT lpRect) -{ - BOOL ret; - OutTraceB("GetClientRect: whnd=%x FullScreen=%x\n", hwnd, dxw.IsFullScreen()); - - if(!lpRect) return 0; - - // proxed call - ret=(*pGetClientRect)(hwnd, lpRect); - if(!ret) { - OutTraceE("GetClientRect: ERROR hwnd=%x err=%d at %d\n", hwnd, GetLastError(), __LINE__); - return ret; - } - OutTraceB("GetClientRect: actual rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); - - if (dxw.IsDesktop(hwnd)){ - *lpRect = dxw.GetScreenRect(); - OutTraceB("GetClientRect: desktop rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); - } - else - if (dxw.IsFullScreen()){ - *lpRect=dxw.GetClientRect(*lpRect); - OutTraceB("GetClientRect: fixed rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); - } - return ret; -} - -BOOL WINAPI extGetWindowRect(HWND hwnd, LPRECT lpRect) -{ - BOOL ret; - OutTraceB("GetWindowRect: hwnd=%x hWnd=%x FullScreen=%x\n", hwnd, dxw.GethWnd(), dxw.IsFullScreen()); - ret=(*pGetWindowRect)(hwnd, lpRect); - if(!ret) { - OutTraceE("GetWindowRect: GetWindowRect hwnd=%x error %d at %d\n", hwnd, GetLastError(), __LINE__); - return ret; - } - OutTraceB("GetWindowRect: rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); - - // minimized windows behaviour - if((lpRect->left == -32000)||(lpRect->top == -32000)) return ret; - - if (dxw.IsDesktop(hwnd)){ - // to avoid keeping track of window frame - *lpRect = dxw.GetScreenRect(); - OutTraceB("GetWindowRect: desktop rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); - } - else - if (dxw.IsFullScreen()){ - *lpRect=dxw.GetWindowRect(*lpRect); - - // Diablo fix: it retrieves coordinates for the explorer window, that are as big as the real desktop!!! - if(lpRect->left < 0) lpRect->left=0; - if(lpRect->right > (LONG)dxw.GetScreenWidth()) lpRect->right=dxw.GetScreenWidth(); - if(lpRect->top < 0) lpRect->top=0; - if(lpRect->bottom > (LONG)dxw.GetScreenHeight()) lpRect->bottom=dxw.GetScreenHeight(); - - OutTraceB("GetWindowRect: fixed rect=(%d,%d)-(%d,%d)\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); - } - - return ret; -} - -int WINAPI extMapWindowPoints(HWND hWndFrom, HWND hWndTo, LPPOINT lpPoints, UINT cPoints) -{ - UINT pi; - int ret; - // a rarely used API, but responsible for a painful headache: needs hooking for "Commandos 2", "Alien Nations". - - OutTraceD("MapWindowPoints: hWndFrom=%x%s hWndTo=%x%s cPoints=%d FullScreen=%x\n", - hWndFrom, dxw.IsDesktop(hWndFrom)?"(DESKTOP)":"", - hWndTo, dxw.IsDesktop(hWndTo)?"(DESKTOP)":"", - cPoints, dxw.IsFullScreen()); - if(IsDebug){ - OutTrace("Points: "); - for(pi=0; pi>16, ret&0x0000FFFF); - return ret; -} - -HWND WINAPI extGetDesktopWindow(void) -{ - // V2.1.73: correct ??? - HWND res; - - OutTraceD("GetDesktopWindow: FullScreen=%x\n", dxw.IsFullScreen()); - if (dxw.IsFullScreen()){ - OutTraceD("GetDesktopWindow: returning main window hwnd=%x\n", dxw.GethWnd()); - return dxw.GethWnd(); - } - else{ - res=(*pGetDesktopWindow)(); - OutTraceD("GetDesktopWindow: returning desktop window hwnd=%x\n", res); - return res; - } -} - -int WINAPI extGetSystemMetrics(int nindex) -{ - HRESULT res; - - res=(*pGetSystemMetrics)(nindex); - OutTraceD("GetSystemMetrics: index=%x(%s), res=%d\n", nindex, ExplainsSystemMetrics(nindex), res); - - // if you have a bypassed setting, use it first! - if(pSetDevMode){ - switch(nindex){ - case SM_CXFULLSCREEN: - case SM_CXSCREEN: - case SM_CXVIRTUALSCREEN: // v2.02.31 - res = pSetDevMode->dmPelsWidth; - OutTraceD("GetDeviceCaps: fix HORZRES cap=%d\n", res); - return res; - case SM_CYFULLSCREEN: - case SM_CYSCREEN: - case SM_CYVIRTUALSCREEN: // v2.02.31 - res = pSetDevMode->dmPelsHeight; - OutTraceD("GetDeviceCaps: fix VERTRES cap=%d\n", res); - return res; - } - } - - switch(nindex){ - case SM_CXFULLSCREEN: - case SM_CXSCREEN: - case SM_CXVIRTUALSCREEN: // v2.02.31 - res= dxw.GetScreenWidth(); - OutTraceD("GetSystemMetrics: fix SM_CXSCREEN=%d\n", res); - break; - case SM_CYFULLSCREEN: - case SM_CYSCREEN: - case SM_CYVIRTUALSCREEN: // v2.02.31 - res= dxw.GetScreenHeight(); - OutTraceD("GetSystemMetrics: fix SM_CYSCREEN=%d\n", res); - break; - case SM_CMONITORS: - if((dxw.dwFlags2 & HIDEMULTIMONITOR) && res>1) { - res=1; - OutTraceD("GetSystemMetrics: fix SM_CMONITORS=%d\n", res); - } - break; - } - - return res; -} - -ATOM WINAPI extRegisterClassExA(WNDCLASSEX *lpwcx) -{ - OutTraceD("RegisterClassEx: PROXED ClassName=%s style=%x(%s)\n", - lpwcx->lpszClassName, lpwcx->style, ExplainStyle(lpwcx->style)); - return (*pRegisterClassExA)(lpwcx); -} - -static HWND WINAPI extCreateWindowCommon( - LPCTSTR ApiName, - BOOL WideChar, - DWORD dwExStyle, - void *lpClassName, - void *lpWindowName, - DWORD dwStyle, - int x, - int y, - int nWidth, - int nHeight, - HWND hWndParent, - HMENU hMenu, - HINSTANCE hInstance, - LPVOID lpParam) -{ - HWND wndh; - WNDPROC pWindowProc; - BOOL isValidHandle=TRUE; - - // no maximized windows in any case - if (dxw.dwFlags1 & PREVENTMAXIMIZE){ - OutTraceD("%s: handling PREVENTMAXIMIZE mode\n", ApiName); - dwStyle &= ~WS_MAXIMIZE; - //dwStyle &= ~(WS_MAXIMIZE | WS_POPUP); - //dwExStyle &= ~WS_EX_TOPMOST; - } - - // v2.1.92: fixes size & position for auxiliary big window, often used - // for intro movies etc. : needed for ...... - // evidently, this was supposed to be a fullscreen window.... - // v2.1.100: fixes for "The Grinch": this game creates a new main window for OpenGL - // rendering using CW_USEDEFAULT placement and 800x600 size while the previous - // main win was 640x480 only! - // v2.02.13: if it's a WS_CHILD window, don't reposition the x,y, placement for BIG win. - // v2.02.30: fix (Fable - lost chapters) Fable creates a bigger win with negative x,y coordinates. - if ( - ( - ((x<=0)&&(y<=0)) || ((x==CW_USEDEFAULT)&&(y==CW_USEDEFAULT)) - ) - && - ((nWidth>=(int)dxw.GetScreenWidth())&&(nHeight>=(int)dxw.GetScreenHeight())) - && - !(dwExStyle & WS_EX_CONTROLPARENT) // Diablo fix - && - !(dwStyle & WS_CHILD) // Diablo fix - ){ - RECT screen; - POINT upleft = {0,0}; - - // v2.02.30: fix (Fable - lost chapters) - if(nWidth==CW_USEDEFAULT) nWidth=dxw.GetScreenWidth(); - if(nHeight==CW_USEDEFAULT) nHeight=dxw.GetScreenHeight(); - - // update virtual screen size if it has grown - dxw.SetScreenSize(nWidth, nHeight); - // inserted some checks here, since the main window could be destroyed - // or minimized (see "Jedi Outcast") so that you may get a dangerous - // zero size. In this case, better renew the hWnd assignement and its coordinates. - do { // fake loop - isValidHandle = FALSE; - if (!(*pGetClientRect)(dxw.GethWnd(),&screen)) break; - if (!(*pClientToScreen)(dxw.GethWnd(),&upleft)) break; - if (screen.right==0 || screen.bottom==0) break; - isValidHandle = TRUE; - } while(FALSE); - if (isValidHandle){ // use parent's coordinates - if (!(dwStyle & WS_CHILD)){ - x=upleft.x; - y=upleft.y; - } - nWidth=screen.right; - nHeight=screen.bottom; - OutTraceD("%s: fixed BIG win pos=(%d,%d) size=(%d,%d)\n", ApiName, x, y, nWidth, nHeight); - } - else { - // invalid parent coordinates: use initial placement, but leave the size. - // should also fix the window style and compensate for borders here? - // if (!(dwStyle & WS_CHILD)){ // commented out: can't be! see if condition - x=dxw.iPosX; - y=dxw.iPosY; - //} - nWidth=dxw.iSizX; - nHeight=dxw.iSizY; - OutTraceD("%s: renewed BIG win pos=(%d,%d) size=(%d,%d)\n", ApiName, x, y, nWidth, nHeight); - } - dxw.SetFullScreen(TRUE); - if(dxw.Coordinates==DXW_DESKTOP_WORKAREA){ - RECT workarea; - SystemParametersInfo(SPI_GETWORKAREA, NULL, &workarea, 0); - x=0; - y=0; - nWidth=workarea.right; - nHeight=workarea.bottom; - dwStyle=0; - OutTraceD("%s: WORKAREA win pos=(%d,%d) size=(%d,%d)\n", ApiName, x, y, nWidth, nHeight); - } - else if(dxw.Coordinates==DXW_DESKTOP_FULL){ - RECT workarea; - (*pGetClientRect)((*pGetDesktopWindow)(), &workarea); - x=0; - y=0; - nWidth=workarea.right; - nHeight=workarea.bottom; - dwStyle=0; - OutTraceD("%s: FULLDESKTOP win pos=(%d,%d) size=(%d,%d)\n", ApiName, x, y, nWidth, nHeight); - } - } - - if(!dxw.IsFullScreen()){ // v2.1.63: needed for "Monster Truck Madness" - if(WideChar) - wndh= (*pCreateWindowExW)(dwExStyle, (LPCWSTR)lpClassName, (LPCWSTR)lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); - else - wndh= (*pCreateWindowExA)(dwExStyle, (LPCSTR)lpClassName, (LPCSTR)lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); - OutTraceD("%s: windowed mode ret=%x\n", ApiName, wndh); - return wndh; - } - - // tested on Gangsters: coordinates must be window-relative!!! - // Age of Empires.... - if (dwStyle & WS_CHILD){ - dxw.MapClient(&x, &y, &nWidth, &nHeight); - OutTraceD("%s: fixed WS_CHILD pos=(%d,%d) size=(%d,%d)\n", - ApiName, x, y, nWidth, nHeight); - } - // needed for Diablo, that creates a new control parent window that must be - // overlapped to the directdraw surface. - else if (dwExStyle & WS_EX_CONTROLPARENT){ - dxw.MapWindow(&x, &y, &nWidth, &nHeight); - OutTraceD("%s: fixed WS_EX_CONTROLPARENT pos=(%d,%d) size=(%d,%d)\n", - ApiName, x, y, nWidth, nHeight); - } - - OutTraceB("%s: fixed pos=(%d,%d) size=(%d,%d) Style=%x(%s) ExStyle=%x(%s)\n", - ApiName, x, y, nWidth, nHeight, dwStyle, ExplainStyle(dwStyle), dwExStyle, ExplainExStyle(dwExStyle)); - - if(WideChar) - wndh= (*pCreateWindowExW)(dwExStyle, (LPCWSTR)lpClassName, (LPCWSTR)lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); - else - wndh= (*pCreateWindowExA)(dwExStyle, (LPCSTR)lpClassName, (LPCSTR)lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); - if (wndh==(HWND)NULL){ - OutTraceE("%s: ERROR err=%d Style=%x(%s) ExStyle=%x\n", - ApiName, GetLastError(), dwStyle, ExplainStyle(dwStyle), dwExStyle); - return wndh; - } - - if ((!isValidHandle) && dxw.IsFullScreen()) { - dxw.SethWnd(wndh); - extern void AdjustWindowPos(HWND, DWORD, DWORD); - (*pSetWindowLong)(wndh, GWL_STYLE, (dxw.dwFlags2 & MODALSTYLE) ? 0 : WS_OVERLAPPEDWINDOW); - (*pSetWindowLong)(wndh, GWL_EXSTYLE, 0); - OutTraceD("%s: hwnd=%x, set style=WS_OVERLAPPEDWINDOW extstyle=0\n", ApiName, wndh); - AdjustWindowPos(wndh, nWidth, nHeight); - (*pShowWindow)(wndh, SW_SHOWNORMAL); - } - - if ((dxw.dwFlags1 & FIXWINFRAME) && !(dwStyle & WS_CHILD)) - FixWindowFrame(wndh); - - // to do: handle inner child, and leave dialogue & modal child alone!!! - if ((dwStyle & WS_CHILD) && (dxw.dwFlags1 & HOOKCHILDWIN)){ - long res; - pWindowProc = (WNDPROC)(*pGetWindowLong)(wndh, GWL_WNDPROC); - OutTraceD("Hooking CHILD wndh=%x WindowProc %x->%x\n", wndh, pWindowProc, extChildWindowProc); - res=(*pSetWindowLong)(wndh, GWL_WNDPROC, (LONG)extChildWindowProc); - WhndStackPush(wndh, pWindowProc); - if(!res) OutTraceE("%s: SetWindowLong ERROR %x\n", ApiName, GetLastError()); - } - - OutTraceD("%s: ret=%x\n", ApiName, wndh); - return wndh; -} - -static LPCSTR ClassToStr(LPCSTR Class) -{ - static char AtomBuf[20+1]; - if(((DWORD)Class & 0xFFFF0000) == 0){ - sprintf(AtomBuf, "ATOM(%X)", Class); - return AtomBuf; - } - return Class; -} - -// to do: implement and use ClassToWStr() for widechar call - -HWND WINAPI extCreateWindowExW( - DWORD dwExStyle, - LPCWSTR lpClassName, - LPCWSTR lpWindowName, - DWORD dwStyle, - int x, - int y, - int nWidth, - int nHeight, - HWND hWndParent, - HMENU hMenu, - HINSTANCE hInstance, - LPVOID lpParam) -{ - OutTraceD("CreateWindowExW: class=\"%ls\" wname=\"%ls\" pos=(%d,%d) size=(%d,%d) Style=%x(%s) ExStyle=%x(%s)\n", - lpClassName, lpWindowName, x, y, nWidth, nHeight, - dwStyle, ExplainStyle(dwStyle), dwExStyle, ExplainExStyle(dwExStyle)); - if(IsDebug) OutTrace("CreateWindowExW: DEBUG screen=(%d,%d)\n", dxw.GetScreenWidth(), dxw.GetScreenHeight()); - - return extCreateWindowCommon("CreateWindowExW", TRUE, dwExStyle, (void *)lpClassName, (void *)lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); -} - -// GHO: pro Diablo -HWND WINAPI extCreateWindowExA( - DWORD dwExStyle, - LPCTSTR lpClassName, - LPCTSTR lpWindowName, - DWORD dwStyle, - int x, - int y, - int nWidth, - int nHeight, - HWND hWndParent, - HMENU hMenu, - HINSTANCE hInstance, - LPVOID lpParam) -{ - OutTraceD("CreateWindowExA: class=\"%s\" wname=\"%s\" pos=(%d,%d) size=(%d,%d) Style=%x(%s) ExStyle=%x(%s)\n", - ClassToStr(lpClassName), lpWindowName, x, y, nWidth, nHeight, - dwStyle, ExplainStyle(dwStyle), dwExStyle, ExplainExStyle(dwExStyle)); - if(IsDebug) OutTrace("CreateWindowExA: DEBUG screen=(%d,%d)\n", dxw.GetScreenWidth(), dxw.GetScreenHeight()); - - return extCreateWindowCommon("CreateWindowExA", false, dwExStyle, (void *)lpClassName, (void *)lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); -} - -LRESULT WINAPI extCallWindowProc(WNDPROC lpPrevWndFunc, HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) -{ - // v2.02.30: fix (Imperialism II): apply to main window only !!! - HRESULT res; - - res = -1; - if(hwnd == dxw.GethWnd()) res=FixWindowProc("CallWindowProc", hwnd, Msg, wParam, &lParam); - - if (res==(HRESULT)-1) - return (*pCallWindowProc)(lpPrevWndFunc, hwnd, Msg, wParam, lParam); - else - return res; -} - -LRESULT WINAPI extDefWindowProc(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) -{ - // v2.02.30: fix (Imperialism II): apply to main window only !!! - HRESULT res; - - res = -1; - if(hwnd == dxw.GethWnd()) res=FixWindowProc("DefWindowProc", hwnd, Msg, wParam, &lParam); - - if (res==(HRESULT)-1) - return (*pDefWindowProc)(hwnd, Msg, wParam, lParam); - else - return res; -} - -int WINAPI extFillRect(HDC hdc, const RECT *lprc, HBRUSH hbr) -{ - int res; - RECT rc; - OutTraceD("FillRect: hdc=%x hbrush=%x rect=(%d,%d)-(%d,%d)\n", hdc, hbr, lprc->left, lprc->top, lprc->right, lprc->bottom); - - // when not in fullscreen mode, just proxy the call - if(!dxw.IsFullScreen()) return (*pFillRect)(hdc, lprc, hbr); - - memcpy(&rc, lprc, sizeof(rc)); - if(OBJ_DC == GetObjectType(hdc)){ - if(rc.left < 0) rc.left = 0; - if(rc.top < 0) rc.top = 0; - if((DWORD)rc.right > dxw.GetScreenWidth()) rc.right = dxw.GetScreenWidth(); - if((DWORD)rc.bottom > dxw.GetScreenHeight()) rc.bottom = dxw.GetScreenHeight(); - dxw.MapClient(&rc); - OutTraceD("FillRect: fixed rect=(%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom); - } - - res=(*pFillRect)(hdc, &rc, hbr); - return res; -} - -int WINAPI extFrameRect(HDC hdc, const RECT *lprc, HBRUSH hbr) -{ - int res; - RECT rc; - OutTraceD("FrameRect: hdc=%x hbrush=%x rect=(%d,%d)-(%d,%d)\n", hdc, hbr, lprc->left, lprc->top, lprc->right, lprc->bottom); - - // when not in fullscreen mode, just proxy the call - if(!dxw.IsFullScreen()) return (*pFrameRect)(hdc, lprc, hbr); - - memcpy(&rc, lprc, sizeof(rc)); - if(OBJ_DC == GetObjectType(hdc)){ - if(rc.left < 0) rc.left = 0; - if(rc.top < 0) rc.top = 0; - if((DWORD)rc.right > dxw.GetScreenWidth()) rc.right = dxw.GetScreenWidth(); - if((DWORD)rc.bottom > dxw.GetScreenHeight()) rc.bottom = dxw.GetScreenHeight(); - dxw.MapClient(&rc); - OutTraceD("FrameRect: fixed rect=(%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom); - } - - res=(*pFrameRect)(hdc, &rc, hbr); - return res; -} - -BOOL WINAPI extClipCursor(RECT *lpRectArg) -{ - // reference: hooking and setting ClipCursor is mandatori in "Emergency: Fighters for Life" - // where the application expects the cursor to be moved just in a inner rect within the - // main window surface. - - BOOL res; - RECT *lpRect; - RECT Rect; - - if(IsTraceC){ - if (lpRectArg) - OutTrace("ClipCursor: rect=(%d,%d)-(%d,%d)\n", - lpRectArg->left,lpRectArg->top,lpRectArg->right,lpRectArg->bottom); - else - OutTrace("ClipCursor: rect=(NULL)\n"); - } - - if (!(dxw.dwFlags1 & ENABLECLIPPING)) return 1; - - if(lpRectArg){ - Rect=*lpRectArg; - lpRect=&Rect; - } - else - lpRect=NULL; - - if(dxw.dwFlags1 & MODIFYMOUSE){ - // save desired clip region - if (lpRect) { - ClipRegion=*lpRectArg; - lpClipRegion=&ClipRegion; - } - else - lpClipRegion=NULL; - - *lpRect=dxw.MapWindowRect(lpRect); - } - - if (pClipCursor) res=(*pClipCursor)(lpRect); - OutTraceD("ClipCursor: rect=(%d,%d)-(%d,%d) res=%x\n", - lpRect->left,lpRect->top,lpRect->right,lpRect->bottom, res); - - return TRUE; -} - -BOOL WINAPI extGetClipCursor(LPRECT lpRect) -{ - // v2.1.93: if ENABLECLIPPING, return the saved clip rect coordinates - - BOOL ret; - - // proxy.... - if (!(dxw.dwFlags1 & ENABLECLIPPING)) { - ret=(*pGetClipCursor)(lpRect); - if(IsTraceD){ - if (lpRect) - OutTrace("GetClipCursor: PROXED rect=(%d,%d)-(%d,%d) ret=%d\n", - lpRect->left,lpRect->top,lpRect->right,lpRect->bottom, ret); - else - OutTrace("GetClipCursor: PROXED rect=(NULL) ret=%d\n", ret); - } - return ret; - } - - if(lpRect){ - if(lpClipRegion) - *lpRect=ClipRegion; - else{ - lpRect->top = lpRect->left = 0; - lpRect->right = dxw.GetScreenWidth(); - lpRect->bottom = dxw.GetScreenHeight(); - } - OutTraceD("GetClipCursor: rect=(%d,%d)-(%d,%d) ret=%d\n", - lpRect->left,lpRect->top,lpRect->right,lpRect->bottom, TRUE); - } - - return TRUE; -} - -LONG WINAPI extEnumDisplaySettings(LPCTSTR lpszDeviceName, DWORD iModeNum, DEVMODE *lpDevMode) -{ - OutTraceD("EnumDisplaySettings: Devicename=%s ModeNum=%x\n", lpszDeviceName, iModeNum); - if(pSetDevMode && iModeNum==ENUM_CURRENT_SETTINGS){ - lpDevMode=pSetDevMode; - return 1; - } - else - return (*pEnumDisplaySettings)(lpszDeviceName, iModeNum, lpDevMode); -} - -LONG WINAPI extChangeDisplaySettings(DEVMODE *lpDevMode, DWORD dwflags) -{ - if(IsTraceD){ - OutTrace("ChangeDisplaySettings: lpDevMode=%x flags=%x", lpDevMode, dwflags); - if (lpDevMode) OutTrace(" fields=%x(%s) size=(%d x %d) bpp=%d", - lpDevMode->dmFields, ExplainDevModeFields(lpDevMode->dmFields), - lpDevMode->dmPelsWidth, lpDevMode->dmPelsHeight, lpDevMode->dmBitsPerPel); - OutTrace("\n"); - } - - return MyChangeDisplaySettings("ChangeDisplaySettings", lpDevMode, dwflags); -} - -LONG WINAPI extChangeDisplaySettingsEx(LPCTSTR lpszDeviceName, DEVMODE *lpDevMode, HWND hwnd, DWORD dwflags, LPVOID lParam) -{ - if(IsTraceD){ - OutTrace("ChangeDisplaySettingsEx: DeviceName=%s lpDevMode=%x flags=%x", lpszDeviceName, lpDevMode, dwflags); - if (lpDevMode) OutTrace(" size=(%d x %d) bpp=%d", - lpDevMode->dmPelsWidth, lpDevMode->dmPelsHeight, lpDevMode->dmBitsPerPel); - OutTrace("\n"); - } - - return MyChangeDisplaySettings("ChangeDisplaySettingsEx", lpDevMode, dwflags); -} - -HDC WINAPI extGDIGetDC(HWND hwnd) -{ - HDC ret; - HWND lochwnd; - - OutTraceD("GDI.GetDC: hwnd=%x\n", hwnd); - lochwnd=hwnd; - if (dxw.IsRealDesktop(hwnd)) { - OutTraceD("GDI.GetDC: desktop remapping hwnd=%x->%x\n", hwnd, dxw.GethWnd()); - lochwnd=dxw.GethWnd(); - } - - if(dxw.dwFlags3 & EMULATEDC) - ret=dxw.AcquireEmulatedDC(lochwnd); - else - ret=(*pGDIGetDC)(lochwnd); - - if(ret){ - OutTraceD("GDI.GetDC: hwnd=%x ret=%x\n", lochwnd, ret); - } - else{ - int err; - err=GetLastError(); - OutTraceE("GDI.GetDC ERROR: hwnd=%x err=%d at %d\n", lochwnd, err, __LINE__); - if((err==ERROR_INVALID_WINDOW_HANDLE) && (lochwnd!=hwnd)){ - ret=(*pGDIGetDC)(hwnd); - if(ret) - OutTraceD("GDI.GetDC: hwnd=%x ret=%x\n", hwnd, ret); - else - OutTraceE("GDI.GetDC ERROR: hwnd=%x err=%d at %d\n", hwnd, GetLastError(), __LINE__); - } - } - - return ret; -} - -HDC WINAPI extGDIGetDCEx(HWND hwnd, HRGN hrgnClip, DWORD flags) -{ - MessageBox(0, "GetDCEx", "to fix", MB_OK | MB_ICONEXCLAMATION); - return (HDC)NULL; -} - -HDC WINAPI extGDIGetWindowDC(HWND hwnd) -{ - HDC ret; - HWND lochwnd; - OutTraceD("GDI.GetWindowDC: hwnd=%x\n", hwnd); - lochwnd=hwnd; - if (dxw.IsRealDesktop(hwnd)) { - OutTraceD("GDI.GetWindowDC: desktop remapping hwnd=%x->%x\n", hwnd, dxw.GethWnd()); - lochwnd=dxw.GethWnd(); - } - - ret=(*pGDIGetWindowDC)(lochwnd); - - if(ret){ - OutTraceD("GDI.GetWindowDC: hwnd=%x ret=%x\n", lochwnd, ret); - } - else{ - int err; - err=GetLastError(); - OutTraceE("GDI.GetWindowDC ERROR: hwnd=%x err=%d at %d\n", lochwnd, err, __LINE__); - if((err==ERROR_INVALID_WINDOW_HANDLE) && (lochwnd!=hwnd)){ - ret=(*pGDIGetWindowDC)(hwnd); - if(ret) - OutTraceD("GDI.GetWindowDC: hwnd=%x ret=%x\n", hwnd, ret); - else - OutTraceE("GDI.GetWindowDC ERROR: hwnd=%x err=%d at %d\n", hwnd, GetLastError(), __LINE__); - } - } - return ret; -} - -int WINAPI extGDIReleaseDC(HWND hwnd, HDC hDC) -{ - int res; - - OutTraceD("GDI.ReleaseDC: hwnd=%x hdc=%x\n", hwnd, hDC); - if (dxw.IsRealDesktop(hwnd)) hwnd=dxw.GethWnd(); - - if(dxw.dwFlags3 & EMULATEDC) - res=dxw.ReleaseEmulatedDC(hwnd); - else - res=(*pGDIReleaseDC)(hwnd, hDC); - - if (!res) OutTraceE("GDI.ReleaseDC ERROR: err=%d at %d\n", GetLastError(), __LINE__); - return(res); -} - -HDC WINAPI extBeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint) -{ - HDC hdc; - extern HRESULT WINAPI extGetDC(LPDIRECTDRAWSURFACE, HDC FAR *); - - // proxy part ... - OutTraceD("GDI.BeginPaint: hwnd=%x lpPaint=%x FullScreen=%x\n", hwnd, lpPaint, dxw.IsFullScreen()); - hdc=(*pBeginPaint)(hwnd, lpPaint); - - // if not in fullscreen mode, that's all! - if(!dxw.IsFullScreen()) return hdc; - - if(dxw.dwFlags3 & EMULATEDC) return dxw.AcquireEmulatedDC(hwnd); - - // on MAPGDITOPRIMARY, return the PrimHDC handle instead of the window DC - if(dxw.dwFlags1 & MAPGDITOPRIMARY) { - if(pGetDC && dxw.lpDDSPrimHDC){ - extGetDC(dxw.lpDDSPrimHDC,&PrimHDC); - OutTraceD("GDI.BeginPaint: redirect hdc=%x -> PrimHDC=%x\n", hdc, PrimHDC); - hdc=PrimHDC; - } - else { - OutTraceD("GDI.BeginPaint: hdc=%x\n", hdc); - } - } - - // on CLIENTREMAPPING, resize the paint area to virtual screen size - if(dxw.dwFlags1 & CLIENTREMAPPING){ - lpPaint->rcPaint.top=0; - lpPaint->rcPaint.left=0; - lpPaint->rcPaint.right=dxw.GetScreenWidth(); - lpPaint->rcPaint.bottom=dxw.GetScreenHeight(); - } - - return hdc; -} - -BOOL WINAPI extEndPaint(HWND hwnd, const PAINTSTRUCT *lpPaint) -{ - BOOL ret; - HRESULT WINAPI extReleaseDC(LPDIRECTDRAWSURFACE lpdds, HDC FAR hdc); - - OutTraceD("GDI.EndPaint: hwnd=%x lpPaint=%x\n", hwnd, lpPaint); - - if((dxw.dwFlags3 & EMULATEDC) && dxw.IsFullScreen()){ - ret=dxw.ReleaseEmulatedDC(hwnd); - ret=(*pEndPaint)(hwnd, lpPaint); - OutTraceD("GDI.EndPaint: hwnd=%x ret=%x\n", hwnd, ret); - if(!ret) OutTraceE("GDI.EndPaint ERROR: err=%d at %d\n", GetLastError(), __LINE__); - return ret; - } - - // proxy part ... - ret=(*pEndPaint)(hwnd, lpPaint); - OutTraceD("GDI.EndPaint: hwnd=%x ret=%x\n", hwnd, ret); - if(!ret) OutTraceE("GDI.EndPaint ERROR: err=%d at %d\n", GetLastError(), __LINE__); - - //return ret; - - // if not in fullscreen mode, that's all! - if(!dxw.IsFullScreen()) return ret; - - // v2.02.09: on MAPGDITOPRIMARY, release the PrimHDC handle - if(dxw.dwFlags1 & MAPGDITOPRIMARY) { - if(pReleaseDC && dxw.lpDDSPrimHDC){ - extReleaseDC(dxw.lpDDSPrimHDC, PrimHDC); - OutTraceD("GDI.EndPaint: released hdc=%x\n", PrimHDC); - } - } - - return ret; -} - -HWND WINAPI extCreateDialogIndirectParam(HINSTANCE hInstance, LPCDLGTEMPLATE lpTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM lParamInit) -{ - HWND RetHWND; - isWithinDialog=TRUE; - OutTraceD("CreateDialogIndirectParam: hInstance=%x lpTemplate=%s hWndParent=%x lpDialogFunc=%x lParamInit=%x\n", - hInstance, "tbd", hWndParent, lpDialogFunc, lParamInit); - if(hWndParent==NULL) hWndParent=dxw.GethWnd(); - RetHWND=(*pCreateDialogIndirectParam)(hInstance, lpTemplate, hWndParent, lpDialogFunc, lParamInit); - - WhndStackPush(RetHWND, (WNDPROC)lpDialogFunc); - if(!(*pSetWindowLong)(RetHWND, DWL_DLGPROC, (LONG)extDialogWindowProc)) - OutTraceE("SetWindowLong: ERROR err=%d at %d\n", GetLastError(), __LINE__); - - OutTraceD("CreateDialogIndirectParam: hwnd=%x\n", RetHWND); - isWithinDialog=FALSE; - //if (IsDebug) EnumChildWindows(RetHWND, (WNDENUMPROC)TraceChildWin, (LPARAM)RetHWND); - return RetHWND; -} - -HWND WINAPI extCreateDialogParam(HINSTANCE hInstance, LPCTSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM lParamInit) -{ - HWND RetHWND; - isWithinDialog=TRUE; - OutTraceD("CreateDialogParam: hInstance=%x lpTemplateName=%s hWndParent=%x lpDialogFunc=%x lParamInit=%x\n", - hInstance, "tbd", hWndParent, lpDialogFunc, lParamInit); - if(hWndParent==NULL) hWndParent=dxw.GethWnd(); - RetHWND=(*pCreateDialogParam)(hInstance, lpTemplateName, hWndParent, lpDialogFunc, lParamInit); - - WhndStackPush(RetHWND, (WNDPROC)lpDialogFunc); - if(!(*pSetWindowLong)(RetHWND, DWL_DLGPROC, (LONG)extDialogWindowProc)) - OutTraceE("SetWindowLong: ERROR err=%d at %d\n", GetLastError(), __LINE__); - - OutTraceD("CreateDialogParam: hwnd=%x\n", RetHWND); - isWithinDialog=FALSE; - //if (IsDebug) EnumChildWindows(RetHWND, (WNDENUMPROC)TraceChildWin, (LPARAM)RetHWND); - return RetHWND; -} - -BOOL WINAPI extMoveWindow(HWND hwnd, int X, int Y, int nWidth, int nHeight, BOOL bRepaint) -{ - BOOL ret; - OutTraceD("MoveWindow: hwnd=%x xy=(%d,%d) size=(%d,%d) repaint=%x indialog=%x fullscreen=%x\n", - hwnd, X, Y, nWidth, nHeight, bRepaint, isWithinDialog, dxw.IsFullScreen()); - - if(dxw.IsDesktop(hwnd)){ - // v2.1.93: happens in "Emergency Fighters for Life" ... - // what is the meaning of this? is it related to video stretching? - static BOOL MovedAlready=FALSE; - if(MovedAlready){ - OutTraceD("MoveWindow: prevent moving desktop win\n"); - return TRUE; - } - else { - WINDOWPLACEMENT wp; - MovedAlready=TRUE; - OutTraceD("MoveWindow: initialize desktop win at pos=(%d,%d) size=(%dx%d)\n", dxw.iPosX, dxw.iPosY, dxw.iSizX, dxw.iSizY); - ret=(*pMoveWindow)(hwnd, dxw.iPosX, dxw.iPosY, dxw.iSizX, dxw.iSizY, bRepaint); - if(!ret) OutTraceE("MoveWindow ERROR: err=%d at %d\n", GetLastError(), __LINE__); - memset(&wp, 0, sizeof(wp)); - wp.length=sizeof(wp); - if(!GetWindowPlacement(hwnd, &wp)) OutTraceE("GetWindowPlacement ERROR: err=%d at %d\n", GetLastError(), __LINE__); - wp.rcNormalPosition.left=dxw.iPosX; - wp.rcNormalPosition.top=dxw.iPosY; - wp.rcNormalPosition.right=dxw.iPosX+dxw.iSizX; - wp.rcNormalPosition.bottom=dxw.iPosY+dxw.iSizY; - if(!SetWindowPlacement(hwnd, &wp)) OutTraceE("SetWindowPlacement ERROR: err=%d at %d\n", GetLastError(), __LINE__); - return TRUE; - } - } - - if((hwnd==dxw.GethWnd()) || (hwnd==dxw.hParentWnd)){ - static BOOL MovedAlready=FALSE; - if(MovedAlready){ - OutTraceD("MoveWindow: prevent moving main win\n"); - return TRUE; - } - else { - WINDOWPLACEMENT wp; - MovedAlready=TRUE; - OutTraceD("MoveWindow: initialize main win at pos=(%d,%d) size=(%dx%d)\n", dxw.iPosX, dxw.iPosY, dxw.iSizX, dxw.iSizY); - ret=(*pMoveWindow)(hwnd, dxw.iPosX, dxw.iPosY, dxw.iSizX, dxw.iSizY, bRepaint); - if(!ret) OutTraceE("MoveWindow ERROR: err=%d at %d\n", GetLastError(), __LINE__); - memset(&wp, 0, sizeof(wp)); - wp.length=sizeof(wp); - if(!GetWindowPlacement(hwnd, &wp)) OutTraceE("GetWindowPlacement ERROR: err=%d at %d\n", GetLastError(), __LINE__); - wp.rcNormalPosition.left=dxw.iPosX; - wp.rcNormalPosition.top=dxw.iPosY; - wp.rcNormalPosition.right=dxw.iPosX+dxw.iSizX; - wp.rcNormalPosition.bottom=dxw.iPosY+dxw.iSizY; - if(!SetWindowPlacement(hwnd, &wp)) OutTraceE("SetWindowPlacement ERROR: err=%d at %d\n", GetLastError(), __LINE__); - return TRUE; - } - } - - if (dxw.IsFullScreen()){ - POINT upleft={0,0}; - RECT client; - BOOL isChild; - (*pClientToScreen)(dxw.GethWnd(),&upleft); - (*pGetClientRect)(dxw.GethWnd(),&client); - if ((*pGetWindowLong)(hwnd, GWL_STYLE) & WS_CHILD){ - isChild=TRUE; - // child coordinate adjustement - X = (X * client.right) / dxw.GetScreenWidth(); - Y = (Y * client.bottom) / dxw.GetScreenHeight(); - nWidth = (nWidth * client.right) / dxw.GetScreenWidth(); - nHeight = (nHeight * client.bottom) / dxw.GetScreenHeight(); - } - else { - isChild=FALSE; - // regular win coordinate adjustement - X = upleft.x + (X * client.right) / dxw.GetScreenWidth(); - Y = upleft.y + (Y * client.bottom) / dxw.GetScreenHeight(); - nWidth = (nWidth * client.right) / dxw.GetScreenWidth(); - nHeight = (nHeight * client.bottom) / dxw.GetScreenHeight(); - } - OutTraceD("MoveWindow: DEBUG client=(%d,%d) screen=(%d,%d)\n", - client.right, client.bottom, dxw.GetScreenWidth(), dxw.GetScreenHeight()); - OutTraceD("MoveWindow: hwnd=%x child=%x relocated to xy=(%d,%d) size=(%d,%d)\n", - hwnd, isChild, X, Y, nWidth, nHeight); - } - else{ - if((X==0)&&(Y==0)&&(nWidth==dxw.GetScreenWidth())&&(nHeight==dxw.GetScreenHeight())){ - //if((X<=0)&&(Y<=0)&&(nWidth>=dxw.GetScreenWidth())&&(nHeight>=dxw.GetScreenHeight())){ - // evidently, this was supposed to be a fullscreen window.... - RECT screen; - POINT upleft = {0,0}; - (*pGetClientRect)(dxw.GethWnd(),&screen); - (*pClientToScreen)(dxw.GethWnd(),&upleft); - X=upleft.x; - Y=upleft.y; - nWidth=screen.right; - nHeight=screen.bottom; - OutTraceD("MoveWindow: fixed BIG win pos=(%d,%d) size=(%d,%d)\n", X, Y, nWidth, nHeight); - } - } - - ret=(*pMoveWindow)(hwnd, X, Y, nWidth, nHeight, bRepaint); - if(!ret) OutTraceE("MoveWindow: ERROR err=%d at %d\n", GetLastError(), __LINE__); - return ret; -} - -int WINAPI extShowCursor(BOOL bShow) -{ - static int iFakeCounter; - int ret; - - OutTraceC("ShowCursor: bShow=%x\n", bShow); - if (bShow){ - if (dxw.dwFlags1 & HIDEHWCURSOR){ - iFakeCounter++; - OutTraceC("ShowCursor: HIDEHWCURSOR ret=%x\n", iFakeCounter); - return iFakeCounter; - } - } - else { - if (dxw.dwFlags2 & SHOWHWCURSOR){ - iFakeCounter--; - OutTraceC("ShowCursor: SHOWHWCURSOR ret=%x\n", iFakeCounter); - return iFakeCounter; - } - } - ret=(*pShowCursor)(bShow); - OutTraceC("ShowCursor: ret=%x\n", ret); - return ret; -} - -int WINAPI extDrawTextA(HDC hDC, LPCTSTR lpchText, int nCount, LPRECT lpRect, UINT uFormat) -{ - return 0; -} - -int WINAPI extDrawTextExA(HDC hDC, LPCTSTR lpchText, int cchText, LPRECT lprc, UINT dwDTFormat, LPDRAWTEXTPARAMS lpDTParams) -{ - return 0; -} - -BOOL WINAPI extDrawFocusRect(HDC hDC, const RECT *lprc) -{ - return TRUE; -} - -BOOL WINAPI extScrollDC(HDC hDC, int dx, int dy, const RECT *lprcScroll, const RECT *lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate) -{ - return TRUE; -} - -HWND WINAPI extGetTopWindow(HWND hwnd) -{ - HWND ret; - OutTraceD("GetTopWindow: hwnd=%x fullscreen=%x\n", hwnd, dxw.IsFullScreen()); - // a fullscreen program is supposed to be always top Z-order on the desktop! - ret = (dxw.IsFullScreen() && dxw.IsDesktop(hwnd)) ? dxw.GethWnd() : (*pGetTopWindow)(hwnd); - OutTraceD("GetTopWindow: ret=%x\n", ret); - return ret; -} - -LONG WINAPI extTabbedTextOutA(HDC hdc, int X, int Y, LPCTSTR lpString, int nCount, int nTabPositions, const LPINT lpnTabStopPositions, int nTabOrigin) -{ - BOOL res; - OutTraceD("TabbedTextOut: hdc=%x xy=(%d,%d) nCount=%d nTP=%d nTOS=%d str=(%d)\"%s\"\n", - hdc, X, Y, nCount, nTabPositions, nTabOrigin, lpString); - - if (dxw.IsFullScreen() && (OBJ_DC == GetObjectType(hdc))){ - dxw.MapClient(&X, &Y); - OutTraceD("TextOut: fixed dest=(%d,%d)\n", X, Y); - } - - res=(*pTabbedTextOutA)(hdc, X, Y, lpString, nCount, nTabPositions, lpnTabStopPositions, nTabOrigin); - return res; -} - -BOOL WINAPI extDestroyWindow(HWND hWnd) -{ - BOOL res; - OutTraceB("DestroyWindow: hwnd=%x\n", hWnd); - if (hWnd == dxw.GethWnd()) { - OutTraceD("DestroyWindow: destroy main hwnd=%x\n", hWnd); - if(1) return 0; - dxw.SethWnd(NULL); - } - res=(*pDestroyWindow)(hWnd); - if(!res)OutTraceE("DestroyWindow: ERROR err=%d\n", GetLastError()); - return res; -} - -BOOL WINAPI extCloseWindow(HWND hWnd) -{ - BOOL res; - OutTraceB("CloseWindow: hwnd=%x\n", hWnd); - if (hWnd == dxw.GethWnd()) { - OutTraceD("CloseWindow: close main hwnd=%x\n", hWnd); - dxw.SethWnd(NULL); - } - res=(*pCloseWindow)(hWnd); - if(!res)OutTraceE("CloseWindow: ERROR err=%d\n", GetLastError()); - return res; -} - -BOOL WINAPI extSetSysColors(int cElements, const INT *lpaElements, const COLORREF *lpaRgbValues) -{ - // v2.02.32: added to avoid SysColors changes by "Western Front" - BOOL ret; - OutTraceD("SetSysColors: Elements=%d\n", cElements); - - if(dxw.dwFlags3 & LOCKSYSCOLORS) return TRUE; - - ret=(*pSetSysColors)(cElements, lpaElements, lpaRgbValues); - if(!ret) OutTraceE("SetSysColors: ERROR er=%d\n", GetLastError()); - return ret; -} - -BOOL WINAPI extUpdateWindow(HWND hwnd) -{ - BOOL ret; - OutTraceD("UpdateWindow: hwnd=%x\n", hwnd); - - if(dxw.IsRealDesktop(hwnd)){ - OutTraceD("UpdateWindow: remapping hwnd=%x->%x\n", hwnd, dxw.GethWnd()); - hwnd=dxw.GethWnd(); - } - - ret=(*pUpdateWindow)(hwnd); - if(!ret) OutTraceE("UpdateWindow: ERROR er=%d\n", GetLastError()); - return ret; -} - -BOOL WINAPI extGetWindowPlacement(HWND hwnd, WINDOWPLACEMENT *lpwndpl) -{ - BOOL ret; - OutTraceD("GetWindowPlacement: hwnd=%x\n", hwnd); - - if(dxw.IsRealDesktop(hwnd)){ - OutTraceD("GetWindowPlacement: remapping hwnd=%x->%x\n", hwnd, dxw.GethWnd()); - hwnd=dxw.GethWnd(); - } - - ret=(*pGetWindowPlacement)(hwnd, lpwndpl); - OutTraceD("GetWindowPlacement: flags=%x showCmd=%x MinPosition=(%d,%d) MaxPosition=(%d,%d) NormalPosition=(%d,%d)-(%d,%d)\n", - lpwndpl->flags, lpwndpl->showCmd, - lpwndpl->ptMinPosition.x, lpwndpl->ptMinPosition.y, - lpwndpl->ptMaxPosition.x, lpwndpl->ptMaxPosition.y, - lpwndpl->rcNormalPosition.left, lpwndpl->rcNormalPosition.top, lpwndpl->rcNormalPosition.right, lpwndpl->rcNormalPosition.bottom); - - switch (lpwndpl->showCmd){ - case SW_SHOW: - if (dxw.IsFullScreen()){ - lpwndpl->showCmd = SW_MAXIMIZE; - OutTraceD("GetWindowPlacement: forcing SW_MAXIMIZE state\n"); - } - break; - } - if(!ret) OutTraceE("GetWindowPlacement: ERROR er=%d\n", GetLastError()); - return ret; -} - -BOOL WINAPI extSetWindowPlacement(HWND hwnd, WINDOWPLACEMENT *lpwndpl) -{ - BOOL ret; - OutTraceD("SetWindowPlacement: hwnd=%x\n", hwnd); - - if(dxw.IsRealDesktop(hwnd)){ - OutTraceD("SetWindowPlacement: remapping hwnd=%x->%x\n", hwnd, dxw.GethWnd()); - hwnd=dxw.GethWnd(); - } - - OutTraceD("SetWindowPlacement: flags=%x showCmd=%x MinPosition=(%d,%d) MaxPosition=(%d,%d) NormalPosition=(%d,%d)-(%d,%d)\n", - lpwndpl->flags, lpwndpl->showCmd, - lpwndpl->ptMinPosition.x, lpwndpl->ptMinPosition.y, - lpwndpl->ptMaxPosition.x, lpwndpl->ptMaxPosition.y, - lpwndpl->rcNormalPosition.left, lpwndpl->rcNormalPosition.top, lpwndpl->rcNormalPosition.right, lpwndpl->rcNormalPosition.bottom); - - switch (lpwndpl->showCmd){ - case SW_SHOW: - if (dxw.IsFullScreen()){ - lpwndpl->showCmd = SW_MAXIMIZE; - OutTraceD("SetWindowPlacement: forcing SW_MAXIMIZE state\n"); - } - break; - } - ret=(*pSetWindowPlacement)(hwnd, lpwndpl); - if(!ret) OutTraceE("SetWindowPlacement: ERROR er=%d\n", GetLastError()); - return ret; -} - -HWND WINAPI extSetCapture(HWND hwnd) -{ - HWND ret; - OutTraceD("SetCapture: hwnd=%x\n", hwnd); - ret=(*pSetCapture)(hwnd); - OutTraceD("SetCapture: ret=%x\n", ret); - return ret; -} \ No newline at end of file diff --git a/dll/user32.cpp b/dll/user32.cpp index 21abab6..553d9df 100644 --- a/dll/user32.cpp +++ b/dll/user32.cpp @@ -130,9 +130,13 @@ static char *libname = "user32.dll"; void HookUser32(HMODULE hModule) { HookLibrary(hModule, Hooks, libname); - if ((dxw.dwFlags3 & EMULATEDC) || (dxw.dwFlags2 & HOOKGDI) || (dxw.dwFlags1 & MAPGDITOPRIMARY)) - HookLibrary(hModule, EmulateHooks, libname); - HookLibrary(hModule, (dxw.dwFlags1 & MAPGDITOPRIMARY) ? DDHooks : GDIHooks, libname); + //if ((dxw.dwFlags3 & EMULATEDC) || (dxw.dwFlags2 & HOOKGDI) || (dxw.dwFlags1 & MAPGDITOPRIMARY)) + // HookLibrary(hModule, EmulateHooks, libname); + //HookLibrary(hModule, (dxw.dwFlags1 & MAPGDITOPRIMARY) ? DDHooks : GDIHooks, libname); + if (dxw.dwFlags3 & EMULATEDC) HookLibrary(hModule, EmulateHooks, libname); + if (dxw.dwFlags2 & HOOKGDI) HookLibrary(hModule, GDIHooks, libname); + if (dxw.dwFlags1 & MAPGDITOPRIMARY) HookLibrary(hModule, DDHooks, libname); + if (dxw.dwFlags1 & CLIENTREMAPPING) HookLibrary(hModule, RemapHooks, libname); if(dxw.dwFlags1 & MODIFYMOUSE)HookLibrary(hModule, MouseHooks, libname); if (dxw.dwFlags1 & (PREVENTMAXIMIZE|FIXWINFRAME|LOCKWINPOS|LOCKWINSTYLE))HookLibrary(hModule, WinHooks, libname); @@ -1236,17 +1240,17 @@ int WINAPI extFillRect(HDC hdc, const RECT *lprc, HBRUSH hbr) OutTraceD("FillRect: hdc=%x hbrush=%x rect=(%d,%d)-(%d,%d)\n", hdc, hbr, lprc->left, lprc->top, lprc->right, lprc->bottom); // when not in fullscreen mode, just proxy the call - if(!dxw.IsFullScreen()) return (*pFillRect)(hdc, lprc, hbr); + // better not: some games may use excessive coordinates: see "Premier Manager 98" + // if(!dxw.IsFullScreen()) return (*pFillRect)(hdc, lprc, hbr); memcpy(&rc, lprc, sizeof(rc)); - if(OBJ_DC == GetObjectType(hdc)){ - if(rc.left < 0) rc.left = 0; - if(rc.top < 0) rc.top = 0; - if((DWORD)rc.right > dxw.GetScreenWidth()) rc.right = dxw.GetScreenWidth(); - if((DWORD)rc.bottom > dxw.GetScreenHeight()) rc.bottom = dxw.GetScreenHeight(); - dxw.MapClient(&rc); - OutTraceD("FillRect: fixed rect=(%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom); - } + if(rc.left < 0) rc.left = 0; + if(rc.top < 0) rc.top = 0; + if((DWORD)rc.right > dxw.GetScreenWidth()) rc.right = dxw.GetScreenWidth(); + if((DWORD)rc.bottom > dxw.GetScreenHeight()) rc.bottom = dxw.GetScreenHeight(); + if(OBJ_DC == GetObjectType(hdc)) dxw.MapWindow(&rc); + //else dxw.MapClient(&rc); + OutTraceD("FillRect: fixed rect=(%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom); res=(*pFillRect)(hdc, &rc, hbr); return res; diff --git a/host/PaletteDialog.cpp b/host/PaletteDialog.cpp index 824e254..f43ca2b 100644 --- a/host/PaletteDialog.cpp +++ b/host/PaletteDialog.cpp @@ -33,6 +33,9 @@ END_MESSAGE_MAP() // CPaletteDialog message handlers +CDib dib; +CWnd *myWin; + void CPaletteDialog::OnTimer(UINT_PTR nIDEvent) { DXWNDSTATUS DxWndStatus; @@ -41,14 +44,14 @@ void CPaletteDialog::OnTimer(UINT_PTR nIDEvent) extern TARGETMAP *pTargets; RECT Rect; int h, w; + static BOOL PaletteUpdated = FALSE; DxStatus=GetHookStatus(&DxWndStatus); - this->GetDC()->GetWindow()->GetClientRect(&Rect); + myWin->GetClientRect(&Rect); h=Rect.bottom - Rect.top; w=Rect.right - Rect.left; + if((h==0) || (w==0)) return; - CDib dib; - dib.ReadFromResource(IDB_PALETTE); if(DxStatus==DXW_RUNNING){ for(int row=0; row<16; row++){ for(int col=0; col<16; col++){ @@ -61,13 +64,26 @@ void CPaletteDialog::OnTimer(UINT_PTR nIDEvent) dib.SetPixel(col, row, rgbq); } } + PaletteUpdated = TRUE; } - dib.Draw(this->GetDC(), CRect(0, 0, w, h), CRect(0, 0, 16, 16)); + else{ + if (PaletteUpdated) dib.ReadFromResource(IDB_PALETTE); + PaletteUpdated = FALSE; + } + + CDC *dc; + dc=this->GetDC(); + if(dc) dib.Draw(dc, CRect(0, 0, w, h), CRect(0, 0, 16, 16)); + this->ReleaseDC(dc); } BOOL CPaletteDialog::OnInitDialog() { + CDC *myDC; CDialog::OnInitDialog(); + if((myDC=this->GetDC())==NULL) return FALSE; + if((myWin=myDC->GetWindow())==NULL) return FALSE; + dib.ReadFromResource(IDB_PALETTE); SetTimer(IDPaletteTIMER, 200, NULL); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE @@ -76,7 +92,8 @@ BOOL CPaletteDialog::OnInitDialog() void CPaletteDialog::OnOK() { // TODO: Add your specialized code here and/or call the base class - KillTimer(IDPaletteTIMER); // stop timer + KillTimer(IDPaletteTIMER); + // delete(dib); CDialog::OnOK(); } diff --git a/host/Resource.h b/host/Resource.h index 2301793..86c9a3b 100644 --- a/host/Resource.h +++ b/host/Resource.h @@ -183,10 +183,11 @@ #define IDC_CAPMASK 1136 #define IDC_FORCESHEL 1137 #define IDC_COLORFIX 1138 -#define IDC_NODDRAWBLIT 1139 #define IDC_NODDRAWBLT 1139 #define IDC_NODDRAWFLIP 1140 #define IDC_NOGDIBLT 1141 +#define IDC_NOPIXELFORMAT 1142 +#define IDC_NOALPHACHANNEL 1143 #define ID_MODIFY 32771 #define ID_DELETE 32772 #define ID_ADD 32773 diff --git a/host/TabDirectX.cpp b/host/TabDirectX.cpp index e018920..2ec17f1 100644 --- a/host/TabDirectX.cpp +++ b/host/TabDirectX.cpp @@ -40,6 +40,8 @@ void CTabDirectX::DoDataExchange(CDataExchange* pDX) DDX_Check(pDX, IDC_DISABLEHAL, cTarget->m_DisableHAL); DDX_Check(pDX, IDC_FORCESHEL, cTarget->m_ForcesHEL); DDX_Check(pDX, IDC_COLORFIX, cTarget->m_ColorFix); + DDX_Check(pDX, IDC_NOPIXELFORMAT, cTarget->m_NoPixelFormat); + DDX_Check(pDX, IDC_NOALPHACHANNEL, cTarget->m_NoAlphaChannel); //DDX_Check(pDX, IDC_SAVECAPS, cTarget->m_SaveCaps); // DirectInput DDX_Check(pDX, IDC_HOOKDI, cTarget->m_HookDI); diff --git a/host/TargetDlg.cpp b/host/TargetDlg.cpp index 628b707..856ee05 100644 --- a/host/TargetDlg.cpp +++ b/host/TargetDlg.cpp @@ -40,6 +40,8 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/) m_DisableHAL = FALSE; m_ForcesHEL = FALSE; m_ColorFix = FALSE; + m_NoPixelFormat = FALSE; + m_NoAlphaChannel = FALSE; m_LockSysColors = FALSE; m_ForceYUVtoRGB = FALSE; m_ForceRGBtoYUV = FALSE; diff --git a/host/TargetDlg.h b/host/TargetDlg.h index d964507..29d05f9 100644 --- a/host/TargetDlg.h +++ b/host/TargetDlg.h @@ -120,6 +120,8 @@ public: BOOL m_DisableHAL; BOOL m_ForcesHEL; BOOL m_ColorFix; + BOOL m_NoPixelFormat; + BOOL m_NoAlphaChannel; BOOL m_LockSysColors; BOOL m_SaveCaps; BOOL m_SingleProcAffinity; diff --git a/host/dxwndhost.aps b/host/dxwndhost.aps index bcc0bf838e09495d35f217b93f2cde499d276eab..f59b6821d4c56c5018caeae90abd03f99e253b3a 100644 GIT binary patch delta 2705 zcmZXV4Nz3q701uJz#?EMk&gwcKpUH)v2=GKVTmTX@RqQ;>~7grAfdh{qHYv-tsjWh zCK4c_XqgTtnzPRbHK zToa4PiZU3&uT9G`o{|50i=BfQUQDuy#sl{@p;7JJ2IvYH-+ zvwUkxT_(P{%b=XYYtypr=VhT-QSpuy{I= z{E*-0V@f{0y`+;xpMucR+HNHlV?zC2Jv>(5tA`y=hofOoSN`?PQ+in6Fjo%`HoO}P zL)~AuGhH6h&gk-mZ|q{}(FbkvqtuM+mleipl%@FdWq0&sE%r4Y)stOvTItbRgI#_)sH zc0KtSmN(sBD})_Q59`jOI56QX#3^g;JBzStB5`8pnlI@+)%ebunR?>Fgn*vlwm=G2 z2XbQ`9^>iuiS#Z{PfVnb2U9RHD2tyB&cFr1e0`=bv^lumpa70+ERQPzQ^?$WDPB2= z4{UizITbQ*X*Y837d><5{r|0yZ#7W(Uux`)Xmfh1Y!y{Dm&@)HFTG-5(hiOGoStV$ z0e}*qNE<5(jh!6HVg<=~{d$oy2Y>KkD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cc;+q z)X102=$rNt_7Pj$cj)QW@FX+JRvY_MtTd1x*k5F&I=aOEr;hnI5ng9VuWnQm6sWWB z#7fzUW#5IBR_yQbT-p+uQNu~>yR(|e(%5IQW?=nkefhx4N^@MmzKE65Rm^?_D|PT8 z_K&cd$i}13L;Y7~RG5#lpTbI0Hx+&KbzufW6XDC~>Es2>=supwekm)BxEp%fmNBCj zsz0NruLlNnv`6K1=ZQMUH7|C*J) zMw-}5n#N34dK*Zip5xY+nM*S@tv?^!$%^0VqR%Nh`OYN#LBeb4#l}4RH^KoCRJr(j zw(^@simFaG%G$qtn+5m_KK;M~ht;%J=qV$=%~d;l7`zQ|JNO~b1e zSoj}?(mbO`RxdN9{~oW(&NDJq%4jyi__zIX>xVKM%w@WB81VMh6m_DisableHAL) t->flags3 |= DISABLEHAL; if(dlg->m_ForcesHEL) t->flags3 |= FORCESHEL; if(dlg->m_ColorFix) t->flags3 |= COLORFIX; + if(dlg->m_NoPixelFormat) t->flags3 |= NOPIXELFORMAT; + if(dlg->m_NoAlphaChannel) t->flags4 |= NOALPHACHANNEL; if(dlg->m_LockSysColors) t->flags3 |= LOCKSYSCOLORS; if(dlg->m_ForceYUVtoRGB) t->flags3 |= YUV2RGB; if(dlg->m_ForceRGBtoYUV) t->flags3 |= RGB2YUV; @@ -290,6 +292,8 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg) dlg->m_DisableHAL = t->flags3 & DISABLEHAL ? 1 : 0; dlg->m_ForcesHEL = t->flags3 & FORCESHEL ? 1 : 0; dlg->m_ColorFix = t->flags3 & COLORFIX ? 1 : 0; + dlg->m_NoPixelFormat = t->flags3 & NOPIXELFORMAT ? 1 : 0; + dlg->m_NoAlphaChannel = t->flags4 & NOALPHACHANNEL ? 1 : 0; dlg->m_LockSysColors = t->flags3 & LOCKSYSCOLORS ? 1 : 0; dlg->m_ForceRGBtoYUV = t->flags3 & RGB2YUV ? 1 : 0; dlg->m_ForceYUVtoRGB = t->flags3 & YUV2RGB ? 1 : 0; diff --git a/host/res/palette0.bmp b/host/res/palette0.bmp new file mode 100644 index 0000000000000000000000000000000000000000..93f09080aedd6065c01253955d5381dbfd2abbe8 GIT binary patch literal 314 zcmZ?rwPIudgIz!}2Z#lrn2~`6EZzVlg}EUZCg