Thanks for the compliments but it really wasn't that hard. I had originally intended to find where d3d8::CreateDevice() was being called and change the D3DPRESENT_PARAMETERS BackBufferWidth and BackBufferHeight members
to what I wanted. However I was unable to find the function and could only find Direct3DCreate8() which only creates the base interface that then can be used to actually init the
device, backbuffer, z-buffer, and so forth.
Code:
typedef struct D3DPRESENT_PARAMETERS {
UINT BackBufferWidth, BackBufferHeight;
D3DFORMAT BackBufferFormat;
UINT BackBufferCount;
D3DMULTISAMPLE_TYPE MultiSampleType;
DWORD MultiSampleQuality;
D3DSWAPEFFECT SwapEffect;
HWND hDeviceWindow;
BOOL Windowed;
BOOL EnableAutoDepthStencil;
D3DFORMAT AutoDepthStencilFormat;
DWORD Flags;
UINT FullScreen_RefreshRateInHz;
UINT PresentationInterval;
} D3DPRESENT_PARAMETERS, *LPD3DPRESENT_PARAMETERS;
As you can see all I would have had to do was change the first two 4 byte values starting at the base address of the structure. This structure is from Direct3D9 but 8 was not all that different. In the end it worked out and I feel that
changing the dat file it uses is probably a more elegant solution than altering the code and definitely more EULA compliant. I'm glad to hear it works for other games by this dev house as well.
I will work on getting some 4:3 and 16:9 screenshots to compare. It definitely isn't a perfect widescreen but it still enables me to play the game pretty much as it was before just in much higher resolution. Have done
several missions now and haven't noticed any early culling or disappearing textures as happens on other older 4:3 games when pushed to widescreen (IE: Vampire: Masquerade and IL2 1946 are a few that come to mind that I know suffer from this).
I really can't believe some of those games hard-coded the the width/height aspect ratio, or did not take the this ratio into account when fudging their AABBs used for frustum culling.