1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

tweak clipper function logging

This commit is contained in:
FunkyFr3sh 2022-10-02 14:47:46 +02:00
parent 68faa57a1f
commit 1cbfe2d926
3 changed files with 28 additions and 11 deletions

View File

@ -9,6 +9,7 @@
HRESULT ddc_GetClipList(IDirectDrawClipperImpl* This, LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSiz);
HRESULT ddc_GetHWnd(IDirectDrawClipperImpl* This, HWND FAR* lphWnd);
HRESULT ddc_IsClipListChanged(IDirectDrawClipperImpl* This, BOOL FAR* lpbChanged);
HRESULT ddc_SetClipList(IDirectDrawClipperImpl* This, LPRGNDATA lpClipList, DWORD dwFlags);
HRESULT ddc_SetHWnd(IDirectDrawClipperImpl* This, DWORD dwFlags, HWND hWnd);
HRESULT dd_CreateClipper(DWORD dwFlags, IDirectDrawClipperImpl** lplpDDClipper, IUnknown FAR* pUnkOuter);

View File

@ -52,8 +52,7 @@ HRESULT __stdcall IDirectDrawClipper__GetClipList(
lpClipList,
lpdwSiz);
HRESULT ret = DDERR_NOCLIPLIST;
//HRESULT ret = ddc_GetClipList(This, lpRect, lpClipList, lpdwSiz);
HRESULT ret = ddc_GetClipList(This, lpRect, lpClipList, lpdwSiz);
TRACE("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
return ret;
@ -77,26 +76,25 @@ HRESULT __stdcall IDirectDrawClipper__Initialize(IDirectDrawClipperImpl* This, L
HRESULT __stdcall IDirectDrawClipper__IsClipListChanged(IDirectDrawClipperImpl* This, BOOL FAR* lpbChanged)
{
TRACE("NOT_IMPLEMENTED -> %s(This=%p)\n", __FUNCTION__, This);
HRESULT ret = DDERR_INVALIDOBJECT;
TRACE("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
TRACE("-> %s(This=%p, lpbChanged=%p)\n", __FUNCTION__, This, lpbChanged);
HRESULT ret = ddc_IsClipListChanged(This, lpbChanged);
TRACE("<- %s\n", __FUNCTION__);
return ret;
}
HRESULT __stdcall IDirectDrawClipper__SetClipList(IDirectDrawClipperImpl* This, LPRGNDATA lpClipList, DWORD dwFlags)
{
TRACE("NOT_IMPLEMENTED -> %s(This=%p, lpClipList=%p, dwFlags=%08X)\n", __FUNCTION__, This, lpClipList, dwFlags);
//HRESULT ret = ddc_SetClipList(This, lpClipList, dwFlags);
HRESULT ret = DD_OK;
HRESULT ret = ddc_SetClipList(This, lpClipList, dwFlags);
TRACE("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
return ret;
}
HRESULT __stdcall IDirectDrawClipper__SetHWnd(IDirectDrawClipperImpl* This, DWORD dwFlags, HWND hWnd)
{
TRACE("NOT_IMPLEMENTED -> %s(This=%p, dwFlags=%08X, hWnd=%p)\n", __FUNCTION__, This, dwFlags, hWnd);
TRACE("-> %s(This=%p, dwFlags=%08X, hWnd=%p)\n", __FUNCTION__, This, dwFlags, hWnd);
HRESULT ret = ddc_SetHWnd(This, dwFlags, hWnd);
TRACE("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
TRACE("<- %s\n", __FUNCTION__);
return ret;
}

View File

@ -7,6 +7,9 @@
HRESULT ddc_GetClipList(IDirectDrawClipperImpl* This, LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSiz)
{
return DDERR_NOCLIPLIST;
/* Keep this commented out until we found a game that actually needs it
if (!This->region)
return DDERR_NOCLIPLIST;
@ -42,6 +45,7 @@ HRESULT ddc_GetClipList(IDirectDrawClipperImpl* This, LPRECT lpRect, LPRGNDATA l
return DDERR_REGIONTOOSMALL;
return DD_OK;
*/
}
HRESULT ddc_GetHWnd(IDirectDrawClipperImpl* This, HWND FAR* lphWnd)
@ -54,8 +58,19 @@ HRESULT ddc_GetHWnd(IDirectDrawClipperImpl* This, HWND FAR* lphWnd)
return DD_OK;
}
HRESULT ddc_IsClipListChanged(IDirectDrawClipperImpl* This, BOOL FAR* lpbChanged)
{
if (!lpbChanged)
return DDERR_INVALIDPARAMS;
*lpbChanged = FALSE; /* Always return FALSE - See ddc_SetHWnd for remarks */
return DD_OK;
}
HRESULT ddc_SetClipList(IDirectDrawClipperImpl* This, LPRGNDATA lpClipList, DWORD dwFlags)
{
/* Keep this commented out until we found a game that actually needs it
if (This->hwnd)
return DDERR_CLIPPERISUSINGHWND;
@ -73,13 +88,16 @@ HRESULT ddc_SetClipList(IDirectDrawClipperImpl* This, LPRGNDATA lpClipList, DWOR
{
This->region = NULL;
}
*/
return DD_OK;
}
HRESULT ddc_SetHWnd(IDirectDrawClipperImpl* This, DWORD dwFlags, HWND hWnd)
{
/* FIXME: need to set up This->region here (from hwnd region) */
/*
We don't use the regions from the hwnd here since everything is emulated and we need the entire
emulated surface to be redrawn all the time
*/
This->hwnd = hWnd;
return DD_OK;