------------------
-Kentamanos
2d Engine
code:DDBLTFX ddbltfx;ZeroMemory( &ddbltfx, sizeof(ddbltfx) );ddbltfx.dwSize = sizeof(ddbltfx);ddbltfx.dwFillColor = RGB(0,0,0);lpDDSBack->Blt(NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbltfx);
CU
------------------
Skullpture Entertainment
#40842461
--TheGoop
Next prob.
Scrolling. If I put a screen up thats say 640x480. Now I want to scroll infinte, whats the code for that. I know the idea how it works, but unsure of where to start.
It's like, move the screen down by say 3 lines. Those 3 lines print at the top..yes?
If so, how do I actually read the lines in and out?
Thankyou
I'm making a 2d engine and come across my first problem. I want to clear the screen, how?
I'm trying to use as many fast commands as possible. I thought of using memcpy but I think it doesn't work, my computer just hangs.
In DOS I did "memcpy(VGA,0,64000);"
Is there a Windows version?
Thanks
Also, make sure you clip the blits to the screen correctly, or your system may hang or get VERY slow, causing alot of INVALID_PARAM errors when using ->bltfast().
How ive done it..
I have made my own function called BlitFastClip() which automatically clips the blit to the screen no matter what co-ordinates I throw at it. This is very useful, as it eliminates excess calculations when bliting backgrounds and sprites.
Check out the FoxBear sample code in your DX3SDK package. It has the code to scroll backgrounds horizontally. All you have to do is modify the code so it will scroll vertical as well.
Downloads: ZeroOne Realm