Skip to main content
GameDev.net gamedev.net
🔒 Locked

Object error to surface

Started by Zdman Dec 26, 2004 at 10:54 PM 0 replies 200+ views
Original Post
Zdman
Zdman
I'm trying to get DirectDraw to blt using transparencies. This is the function that is having the error. void cDX::CreateSurface(LPDIRECTDRAWSURFACE7 *lpSource, int xs, int ys) { DDSURFACEDESC2 ddsd2; ZeroMemory(&ddsd2, sizeof(ddsd2)); ddsd2.dwSize = sizeof(ddsd2); ddsd2.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CKSRCBLT; ddsd2.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; ddsd2.dwWidth = xs; ddsd2.dwHeight = ys; lpDD->CreateSurface(&ddsd2, lpSource, NULL); DDCOLORKEY ddck; ddck.dwColorSpaceLowValue = 0; ddck.dwColorSpaceHighValue = 0; lpSource->SetColorKey(DDCKEY_SRCBLT, &ddck); } lpSource->SetColorKey(DDCKEY_SRCBLT, &ddck); is giving error C2227: left of '->SetColorKey' must point to class/struct/union

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.