Ok Guys. What I want to happen now is the programs drops a block and it lands at the bottom of the screen. The block that i'm dropping is a 25x 25y PNG image. I got it to stop but then I goofed up my code and had to erase it. It dod work at one compile time. I can't figure out how I made it stop. Any ideas??? Heres my code:
#include "DarkGDK.h"
void DarkGDK ( void )
{
// Turning Sync Rate On and Setting sync rate
dbSyncOn ( );
dbSyncRate ( 60 );
// Setting Display Mode
dbSetDisplayMode ( 800, 600, 32 );
// Defining variables
int BlockX, BlockY, ScreenY, NewTrue, ;
BlockX = 400;
BlockY = 0;
ScreenY = 575;
NewTrue = 0;
// Loading Media .........
dbLoadImage ( "block1.png", 1 );
dbLoadImage ( "block2.png", 2 );
dbLoadImage ( "block3.png", 3 );
dbSprite ( 1, BlockX, BlockY, 1 );
while ( LoopGDK ( ) )
{
if ( BlockY != ScreenY )
{
BlockY += 2;
}
//********************
//Collision***********
//********************
if ( BlockY == ScreenY )
{
}
dbSprite ( 1, BlockX, BlockY, 1 );
dbSync ( );
}
return;
}
I
anyone who will help me!!!