PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Intersect confusion

I'm having some trouble with Intersect in GD 3.50. The following line:

CGapiSurface::Intersect(loc.x, loc.y, pBlitSurface, NULL, x * CMG_TILE_WIDTH, y * CMG_TILE_HEIGHT, pCurrentLevelTiles[*boardData], NULL, &colPoint;);

...results in the error:

c:\temp\etc\kgarcade2\source\common\cplatformerplayer.cpp(191) : error C2660: 'Intersect' : function does not take 9 parameters

Now, I'm looking at the docs that shipped with this, and I see:

CGapiSurface::Intersect

static HRESULT Intersect(
LONG x1, LONG y1,
CGapiSurface* pSrcSurface1, RECT* pSrcRect1,
LONG x2, LONG y2,
CGapiSurface* pSrcSurface2, RECT* pSrcRect2,
POINT* pIntersection);

I count nine parameters there. Now, strangely, the following compiles:

pBlitSurface->Intersect(loc.x, loc.y, NULL, pCurrentLevelTiles[*boardData], x * CMG_TILE_WIDTH, y * CMG_TILE_HEIGHT, NULL, &colPoint;);

I'm sure this is something stupid on my part, but I'm at a loss to spot it. Anyone? Thanks!

Frank
Sorry, the docs are not updated. Check gapidraw.h in the include folder. :) I'll see to it that they are updated.
I suspected that, but didn't want to say it :)

No problem, looking at a sample or two I worked it out anyway, so I'm all set. Thanks Johan!