mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Add GetDeviceModeFinder to WndProc (#102)
This commit is contained in:

committed by
GitHub

parent
b59d8ef5cf
commit
d41b7f2ca4
@@ -357,7 +357,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
}
|
}
|
||||||
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
||||||
case WM_DISPLAYCHANGE:
|
case WM_DISPLAYCHANGE:
|
||||||
if (g_isle && VideoManager() && g_isle->m_fullScreen && VideoManager()->m_unk74 && VideoManager()->m_unk74[0x220]) {
|
if (g_isle && VideoManager() && g_isle->m_fullScreen && VideoManager()->GetDirect3D() && VideoManager()->GetDirect3D()->GetDeviceModeFinder()) {
|
||||||
int targetWidth = LOWORD(lParam);
|
int targetWidth = LOWORD(lParam);
|
||||||
int targetHeight = HIWORD(lParam);
|
int targetHeight = HIWORD(lParam);
|
||||||
int targetDepth = wParam;
|
int targetDepth = wParam;
|
||||||
|
@@ -2,7 +2,9 @@
|
|||||||
#define LEGOVIDEOMANAGER_H
|
#define LEGOVIDEOMANAGER_H
|
||||||
|
|
||||||
#include "mxvideomanager.h"
|
#include "mxvideomanager.h"
|
||||||
|
#include "mxdirect3d.h"
|
||||||
#include "lego3dmanager.h"
|
#include "lego3dmanager.h"
|
||||||
|
#include "decomp.h"
|
||||||
|
|
||||||
// VTABLE 0x100d9c88
|
// VTABLE 0x100d9c88
|
||||||
// SIZE 0x590
|
// SIZE 0x590
|
||||||
@@ -18,13 +20,16 @@ public:
|
|||||||
__declspec(dllexport) void MoveCursor(int x, int y);
|
__declspec(dllexport) void MoveCursor(int x, int y);
|
||||||
|
|
||||||
inline Lego3DManager *Get3DManager() { return this->m_3dManager; }
|
inline Lego3DManager *Get3DManager() { return this->m_3dManager; }
|
||||||
|
inline MxDirect3D *GetDirect3D() { return this->m_direct3d; }
|
||||||
|
|
||||||
void SetSkyColor(float r, float g, float b);
|
void SetSkyColor(float r, float g, float b);
|
||||||
|
|
||||||
int m_unk64;
|
private:
|
||||||
|
undefined4 m_unk64;
|
||||||
Lego3DManager *m_3dManager;
|
Lego3DManager *m_3dManager;
|
||||||
int m_unk6c;
|
undefined4 m_unk6c;
|
||||||
int m_unk70;
|
undefined4 m_unk70;
|
||||||
int *m_unk74;
|
MxDirect3D *m_direct3d;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LEGOVIDEOMANAGER_H
|
#endif // LEGOVIDEOMANAGER_H
|
||||||
|
@@ -0,0 +1,25 @@
|
|||||||
|
#ifndef MXDIRECT3D_H
|
||||||
|
#define MXDIRECT3D_H
|
||||||
|
|
||||||
|
#include "mxdirectdraw.h"
|
||||||
|
#include "decomp.h"
|
||||||
|
|
||||||
|
#include <d3d.h>
|
||||||
|
|
||||||
|
class MxDeviceModeFinder;
|
||||||
|
|
||||||
|
// SIZE 0x894
|
||||||
|
class MxDirect3D : public MxDirectDraw
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
inline MxDeviceModeFinder *GetDeviceModeFinder() { return this->m_pDeviceModeFinder; };
|
||||||
|
|
||||||
|
private:
|
||||||
|
MxDeviceModeFinder *m_pDeviceModeFinder;
|
||||||
|
IDirect3D *m_pDirect3d;
|
||||||
|
IDirect3DDevice *m_pDirect3dDevice;
|
||||||
|
undefined4 m_unk88c;
|
||||||
|
undefined4 m_unk890;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MXDIRECT3D_H
|
@@ -2,6 +2,7 @@
|
|||||||
#include "mxdirectdraw.h"
|
#include "mxdirectdraw.h"
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
|
|
||||||
|
DECOMP_SIZE_ASSERT(MxDirectDraw, 0x880);
|
||||||
|
|
||||||
#ifndef DDSCAPS_3DDEVICE
|
#ifndef DDSCAPS_3DDEVICE
|
||||||
#define DDSCAPS_3DDEVICE 0x00002000l
|
#define DDSCAPS_3DDEVICE 0x00002000l
|
||||||
@@ -100,7 +101,7 @@ int MxDirectDraw::GetPrimaryBitDepth()
|
|||||||
dwRGBBitCount = ddsd.ddpfPixelFormat.dwRGBBitCount;
|
dwRGBBitCount = ddsd.ddpfPixelFormat.dwRGBBitCount;
|
||||||
g_is_PALETTEINDEXED8 = (ddsd.ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED8) != 0;
|
g_is_PALETTEINDEXED8 = (ddsd.ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED8) != 0;
|
||||||
pDDraw->Release();
|
pDDraw->Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
return dwRGBBitCount;
|
return dwRGBBitCount;
|
||||||
}
|
}
|
||||||
@@ -1200,7 +1201,6 @@ void MxDirectDraw::FUN_1009E020()
|
|||||||
|
|
||||||
m_pBackBuffer->Unlock(ddsd.lpSurface);
|
m_pBackBuffer->Unlock(ddsd.lpSurface);
|
||||||
|
|
||||||
|
|
||||||
if (m_bFlipSurfaces)
|
if (m_bFlipSurfaces)
|
||||||
{
|
{
|
||||||
m_pFrontBuffer->Flip(NULL, DDFLIP_WAIT);
|
m_pFrontBuffer->Flip(NULL, DDFLIP_WAIT);
|
||||||
|
@@ -3,11 +3,11 @@
|
|||||||
#define MXDIRECTDRAW_H
|
#define MXDIRECTDRAW_H
|
||||||
|
|
||||||
#include <ddraw.h>
|
#include <ddraw.h>
|
||||||
#include <Windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
extern BOOL g_is_PALETTEINDEXED8;
|
extern BOOL g_is_PALETTEINDEXED8;
|
||||||
|
|
||||||
//size 0x880
|
// SIZE 0x880
|
||||||
class MxDirectDraw
|
class MxDirectDraw
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Reference in New Issue
Block a user