mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-23 20:13:46 -04:00
Implement some minor functions in miniwin (#310)
This commit is contained in:
parent
c234689ae8
commit
65aafd2f44
@ -318,7 +318,7 @@ struct IDirect3DRMDevice : virtual public IDirect3DRMObject {
|
|||||||
virtual HRESULT SetBufferCount(int count) = 0;
|
virtual HRESULT SetBufferCount(int count) = 0;
|
||||||
virtual DWORD GetBufferCount() = 0;
|
virtual DWORD GetBufferCount() = 0;
|
||||||
virtual HRESULT SetShades(DWORD shadeCount) = 0;
|
virtual HRESULT SetShades(DWORD shadeCount) = 0;
|
||||||
virtual HRESULT GetShades() = 0;
|
virtual DWORD GetShades() = 0;
|
||||||
virtual HRESULT SetQuality(D3DRMRENDERQUALITY quality) = 0;
|
virtual HRESULT SetQuality(D3DRMRENDERQUALITY quality) = 0;
|
||||||
virtual D3DRMRENDERQUALITY GetQuality() = 0;
|
virtual D3DRMRENDERQUALITY GetQuality() = 0;
|
||||||
virtual HRESULT SetDither(BOOL dither) = 0;
|
virtual HRESULT SetDither(BOOL dither) = 0;
|
||||||
|
@ -252,6 +252,7 @@ struct DDPIXELFORMAT {
|
|||||||
DWORD dwRBitMask; // Red bit mask (0xF800)
|
DWORD dwRBitMask; // Red bit mask (0xF800)
|
||||||
DWORD dwGBitMask; // Green bit mask (0x07E0)
|
DWORD dwGBitMask; // Green bit mask (0x07E0)
|
||||||
DWORD dwBBitMask; // Blue bit mask (0x001F)
|
DWORD dwBBitMask; // Blue bit mask (0x001F)
|
||||||
|
DWORD dwRGBAlphaBitMask;
|
||||||
};
|
};
|
||||||
typedef struct DDPIXELFORMAT* LPDDPIXELFORMAT;
|
typedef struct DDPIXELFORMAT* LPDDPIXELFORMAT;
|
||||||
|
|
||||||
|
@ -67,31 +67,35 @@ DWORD Direct3DRMDevice2Impl::GetBufferCount()
|
|||||||
|
|
||||||
HRESULT Direct3DRMDevice2Impl::SetShades(DWORD shadeCount)
|
HRESULT Direct3DRMDevice2Impl::SetShades(DWORD shadeCount)
|
||||||
{
|
{
|
||||||
|
if (shadeCount != 256) {
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Direct3DRMDevice2Impl::GetShades()
|
DWORD Direct3DRMDevice2Impl::GetShades()
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
return 256;
|
||||||
return DD_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Direct3DRMDevice2Impl::SetQuality(D3DRMRENDERQUALITY quality)
|
HRESULT Direct3DRMDevice2Impl::SetQuality(D3DRMRENDERQUALITY quality)
|
||||||
{
|
{
|
||||||
|
if (quality != D3DRMRENDER_GOURAUD && quality != D3DRMRENDER_PHONG) {
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
D3DRMRENDERQUALITY Direct3DRMDevice2Impl::GetQuality()
|
D3DRMRENDERQUALITY Direct3DRMDevice2Impl::GetQuality()
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return D3DRMRENDERQUALITY::GOURAUD;
|
return D3DRMRENDERQUALITY::GOURAUD;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Direct3DRMDevice2Impl::SetDither(BOOL dither)
|
HRESULT Direct3DRMDevice2Impl::SetDither(BOOL dither)
|
||||||
{
|
{
|
||||||
|
if (dither) {
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,6 +182,7 @@ HRESULT DirectDrawImpl::EnumDisplayModes(
|
|||||||
ddsd.ddpfPixelFormat.dwRBitMask = details->Rmask;
|
ddsd.ddpfPixelFormat.dwRBitMask = details->Rmask;
|
||||||
ddsd.ddpfPixelFormat.dwGBitMask = details->Gmask;
|
ddsd.ddpfPixelFormat.dwGBitMask = details->Gmask;
|
||||||
ddsd.ddpfPixelFormat.dwBBitMask = details->Bmask;
|
ddsd.ddpfPixelFormat.dwBBitMask = details->Bmask;
|
||||||
|
ddsd.ddpfPixelFormat.dwRGBAlphaBitMask = details->Amask;
|
||||||
|
|
||||||
if (!lpEnumModesCallback(&ddsd, lpContext)) {
|
if (!lpEnumModesCallback(&ddsd, lpContext)) {
|
||||||
status = DDERR_GENERIC;
|
status = DDERR_GENERIC;
|
||||||
@ -270,6 +271,7 @@ HRESULT DirectDrawImpl::GetDisplayMode(LPDDSURFACEDESC lpDDSurfaceDesc)
|
|||||||
lpDDSurfaceDesc->ddpfPixelFormat.dwRBitMask = details->Rmask;
|
lpDDSurfaceDesc->ddpfPixelFormat.dwRBitMask = details->Rmask;
|
||||||
lpDDSurfaceDesc->ddpfPixelFormat.dwGBitMask = details->Gmask;
|
lpDDSurfaceDesc->ddpfPixelFormat.dwGBitMask = details->Gmask;
|
||||||
lpDDSurfaceDesc->ddpfPixelFormat.dwBBitMask = details->Bmask;
|
lpDDSurfaceDesc->ddpfPixelFormat.dwBBitMask = details->Bmask;
|
||||||
|
lpDDSurfaceDesc->ddpfPixelFormat.dwRGBAlphaBitMask = details->Amask;
|
||||||
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
@ -210,6 +210,7 @@ HRESULT DirectDrawSurfaceImpl::GetPixelFormat(LPDDPIXELFORMAT lpDDPixelFormat)
|
|||||||
lpDDPixelFormat->dwRBitMask = details->Rmask;
|
lpDDPixelFormat->dwRBitMask = details->Rmask;
|
||||||
lpDDPixelFormat->dwGBitMask = details->Gmask;
|
lpDDPixelFormat->dwGBitMask = details->Gmask;
|
||||||
lpDDPixelFormat->dwBBitMask = details->Bmask;
|
lpDDPixelFormat->dwBBitMask = details->Bmask;
|
||||||
|
lpDDPixelFormat->dwRGBAlphaBitMask = details->Amask;
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ struct Direct3DRMDevice2Impl : public Direct3DRMObjectBaseImpl<IDirect3DRMDevice
|
|||||||
HRESULT SetBufferCount(int count) override;
|
HRESULT SetBufferCount(int count) override;
|
||||||
DWORD GetBufferCount() override;
|
DWORD GetBufferCount() override;
|
||||||
HRESULT SetShades(DWORD shadeCount) override;
|
HRESULT SetShades(DWORD shadeCount) override;
|
||||||
HRESULT GetShades() override;
|
DWORD GetShades() override;
|
||||||
HRESULT SetQuality(D3DRMRENDERQUALITY quality) override;
|
HRESULT SetQuality(D3DRMRENDERQUALITY quality) override;
|
||||||
D3DRMRENDERQUALITY GetQuality() override;
|
D3DRMRENDERQUALITY GetQuality() override;
|
||||||
HRESULT SetDither(BOOL dither) override;
|
HRESULT SetDither(BOOL dither) override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user