From 949c9a83cec635cee3c1560f336b64c0dc56ee0a Mon Sep 17 00:00:00 2001 From: rheiny Date: Sun, 11 Feb 2007 12:41:01 +0000 Subject: [PATCH] Trying to untangle the horrible web of file dependencies --- src/drivers/win/main.cpp | 1 - src/drivers/win/main.h | 2 ++ src/drivers/win/video.h | 69 ++++++++++++++++++++++++++++++++++++++ src/drivers/win/window.cpp | 2 +- 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 src/drivers/win/video.h diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index ccb31af1..be0a1953 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -128,7 +128,6 @@ static int srendline, erendline; static int totallines; int soundo = 1; -static int ntsccol = 0, ntsctint, ntschue; //mbg 6/30/06 - indicates that the main loop should close the game as soon as it can int closeGame = 0; diff --git a/src/drivers/win/main.h b/src/drivers/win/main.h index 6d894ed0..234f838f 100644 --- a/src/drivers/win/main.h +++ b/src/drivers/win/main.h @@ -67,6 +67,8 @@ static int erendlinen = 231; static int srendlinep = 0; static int erendlinep = 239; +static int ntsccol = 0, ntsctint, ntschue; + extern int soundo; extern int eoptions; extern int soundoptions; diff --git a/src/drivers/win/video.h b/src/drivers/win/video.h new file mode 100644 index 00000000..119e5815 --- /dev/null +++ b/src/drivers/win/video.h @@ -0,0 +1,69 @@ +#ifndef WIN_VIDEO_H +#define WIN_VIDEO_H + +#include "common.h" + +// I like hacks. +#define uint8 __UNO492032 +#include +#include "ddraw.h" +#undef LPCWAVEFORMATEX +#include "dsound.h" +#include "dinput.h" +#include +#include // For directories configuration dialog. +#undef uint8 + +#include "main.h" +#include "window.h" + +#define VF_DDSTRETCHED 1 + +#define VEF_LOSTSURFACE 1 +#define VEF____INTERNAL 2 + +#define VMDF_DXBLT 1 +#define VMDF_STRFS 2 + +typedef struct { + int x; + int y; + int bpp; + int flags; + int xscale; + int yscale; + RECT srect; + RECT drect; + int special; +} vmdef; + +// left, top, right, bottom +static vmdef vmodes[11]={ + {320,240,8,0,1,1,0}, //0 + {320,240,8,0,1,1,0}, //1 + {512,384,8,0,1,1,0}, //2 + {640,480,8,0,1,1,0}, //3 + {640,480,8,0,1,1,0}, //4 + {640,480,8,0,1,1,0}, //5 + {640,480,8,VMDF_DXBLT,2,2,0}, //6 + {1024,768,8,VMDF_DXBLT,4,3,0}, //7 + {1280,1024,8,VMDF_DXBLT,5,4,0}, //8 + {1600,1200,8,VMDF_DXBLT,6,5,0}, //9 + {800,600,8,VMDF_DXBLT|VMDF_STRFS,0,0} //10 + }; + +static int winspecial = 0; + +extern int disvaccel; +extern int fssync; +extern int winsync; + +void SetFSVideoMode(); +void FCEUD_BlitScreen(uint8 *XBuf); +void ConfigVideo(); +int SetVideoMode(int fs); +void DoVideoConfigFix(); +void FCEUD_BlitScreen(uint8 *XBuf); +void ResetVideo(); + +#endif \ No newline at end of file diff --git a/src/drivers/win/window.cpp b/src/drivers/win/window.cpp index b24442e5..5385b531 100644 --- a/src/drivers/win/window.cpp +++ b/src/drivers/win/window.cpp @@ -84,7 +84,7 @@ static HMENU fceumenu = 0; static int tog = 0; static int CheckedAutoFirePattern = MENU_AUTOFIRE_PATTERN_1; static int CheckedAutoFireOffset = MENU_AUTOFIRE_OFFSET_1; -static int EnableBackgroundInput = 0; +//static int EnableBackgroundInput = 0; static HMENU recentmenu, recentdmenu;