1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-25 18:17:47 +01:00
cnc-ddraw/src/ddclipper.c

22 lines
600 B
C
Raw Normal View History

2020-10-13 09:20:52 +02:00
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "IDirectDrawClipper.h"
#include "ddclipper.h"
#include "debug.h"
HRESULT dd_CreateClipper(DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter )
{
if (!lplpDDClipper)
return DDERR_INVALIDPARAMS;
IDirectDrawClipperImpl *c = (IDirectDrawClipperImpl *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawClipperImpl));
c->lpVtbl = &g_ddc_vtbl;
dprintf(" Clipper = %p\n", c);
*lplpDDClipper = (LPDIRECTDRAWCLIPPER)c;
IDirectDrawClipper_AddRef(c);
return DD_OK;
}