There's a few commands that Dark GDK does have that are not available to DBP but would be very handy for the C++ version of PureGDK.
dbGetImagePointer(imgID) -
Returns low level directx surface pointer.
That one I was using to draw directly to an images surface in the GDK version of my game.
ie:
void PutImagePixel(int Dest, int x, int y, DWORD c) {
LPDIRECT3DSURFACE9 DestSurface = 0;
D3DLOCKED_RECT DestRect;
D3DSURFACE_DESC DestDesc;
int dmem_loc;
int w, h, b;
unsigned char *DestAddr;
dbGetImagePointer(Dest)->GetSurfaceLevel(0, &DestSurface);
DestSurface->GetDesc(&DestDesc);
DestSurface->LockRect(&DestRect, 0, 0);
DestAddr = (unsigned char*)DestRect.pBits;
w = dbGetImageWidth(Dest);
h = dbGetImageHeight(Dest);
b = GetMemOffset(DestDesc.Format);
if (x >= 0 && x < w-1 && y >= 0 && y < h-1) {
dmem_loc = (x * b) + ((y) * DestRect.Pitch);
*(DWORD*)(DestAddr + dmem_loc) = c;
}
DestSurface->UnlockRect();
DestSurface->Release();
DestSurface = 0;
}
At the moment I don't know how to get around that block in my program without commenting it all out and replacing the particular part with just a basic HUD for the game.
Oh BTW, this time round I'm using Code::Blocks instead of VC++2008 Express. I'm so happy to be able to play with PureGDK again.
EDIT: Also this one...
dbMakeImage(imgID, Width, Height) -
Creates an image without grabbing anything from a bitmap.
Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!