Please!
zomeone@usa.net
zomeone@usa.net
rcSource.left = xPos;
rcSource.top = yPos;
rcSource.right = xPos + TILEWIDTH;
rcSource.bottom = yPos + TILEHEIGHT;
// Clip right side
if (destX + TILEWIDTH > WINDOWWIDTH)
rcSource.right = rcSource.right - (destX + TILEWIDTH - WINDOWWIDTH);
// Clip bottom side
if (destY + TILEHEIGHT > WINDOWHEIGHT)
rcSource.bottom = rcSource.bottom - (destY + TILEHEIGHT - WINDOWHEIGHT);
// Clip left side
if (destX <= 0)
rcSource.left = rcSource.left + (-destX)
// Clip top side
if (destY <= 0)
rcSource.top = rcSource.top + (-destY)
if (FAILED(rVal = (lpDestSurface->BltFast(destX, destY, lpSourceSurface, &rcSource, NULL)))
return rVal;
.
.
.
[This message has been edited by Stark (edited December 14, 1999).]
So, hope it does the trick. Good luck.
I havn't had any time to test it yet, but I will. I'm not sure why the BltFast function doesn't work. It doesn't blit anything...nothing. I'm using 640x480x16, loaded a 16 bit bitmap and try to blit it to the backbuffer. But it doesn't work with the source rect. The
Blt(&dest, surface, NULL, NULL, NULL)
works but not
Blt(&dest, surface, &src, NULL, NULL)
of
BltFast(....)
what's the problem?
Anyway, I'm not using clippers and I've read that BltFast doesn't work with clippers. I think I read it in the Dx reference!
Vore
+-------+
| | <- source surface
| +---+
| | | <- source rect
+---+---+
That won't resize the image when it is blitted right?
It will only blit the part of the source surface specified in the source rect to the destination surface. Tell me if I'm wrong!