int Game_Main()
{
RECT r;
if (g_pddsprimary == NULL)
{
return(0);
}
////////////////////////////////////////////
r.left = 0;
r.top = 0;
r.right = 800;
r.bottom = 600;
lpBackBuffer->BltFast(0, 0, g_pddground, &r,
DDBLTFAST_NOCOLORKEY | DDBLTFAST_WAIT);
//the bug
r.left = cl;
r.top = ct;
r.right = cr;
r.bottom = cb;
lpBackBuffer->BltFast(x, y, g_pddbug, &r,
DDBLTFAST_SRCCOLORKEY | DDBLTFAST_WAIT);
//Bullet
r.left =0;
r.top =0;
r.right =64;
r.bottom=64;
lpBackBuffer->BltFast(bx,by,g_pddbullet, &r,
DDBLTFAST_SRCCOLORKEY | DDBLTFAST_WAIT);
////////Spider movment
r.left = 0;
r.top = 0;
r.right = 64;
r.bottom = 64;
lpBackBuffer->BltFast(sx, sy, g_pddspider, &r,
DDBLTFAST_SRCCOLORKEY | DDBLTFAST_WAIT);
r.left = 65;
r.top = 0;
r.right = 128;
r.bottom = 64;
lpBackBuffer->BltFast(500,500,g_pddhouse,&r,
DDBLTFAST_SRCCOLORKEY | DDBLTFAST_WAIT);
g_pddsprimary->Flip(NULL, DDFLIP_WAIT);
return(1);
}
DirectDraw sprite issue
How do i have my sprite shoot a bullet?
This is what I have.
How do get the sprite to display when I hit the sapce bar and how can i have alot of them and they just keep bouncing around the screen?
I have been researching this problem but I can not find a tut that explains the loop and how to do this.
can any one Help?
Thanks
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement