hi all
everytime i try to start the .exe in the release or the .exe in the debug folder i just get a black window
in the visual c++ is everything fine
can you help me pls
#include "DarkGDK.h" //Required Header File
int playerx = 300 ;
int playery = 200 ;
int playerspeed = 9 ;
int dbLeftKey () ;
int dbUpKey () ;
int dbRightKey () ;
int dbDownKey () ;
int ballspeed = 20 ;
int ballx = 300 ;
int dbSpriteCollision () ;
int dbSpriteHit () ;
void soundSetup (void)
{
dbLoadSound ( "twinnar3.wav" , 1) ;
}
void loadbitmap (void)
{
dbLoadImage ( "player.png", 2) ;
dbLoadImage ( "backdrop.bmp" , 3 ) ;
dbLoadImage ( "wugox.png" , 1 ) ;
dbLoadImage ( "ball.bmp" , 4 ) ;
}
void nachobenball (void)
{
ballx = ballx - 300 ;
}
void DarkGDK ( void )//The Main Funtion for the Dark GDK
{
// in this application a backdrop is loaded and then several
// sprites are loaded, the sprites are targets!
loadbitmap () ;
dbSprite ( 1 ,225, 100 ,1 );
soundSetup () ;
dbPlaySound ( 1 ) ;
dbLoopSound (1 ) ;
dbMaximizeWindow () ;
dbSyncOn ( ); //Turn on Sync
dbSyncRate ( 100 );
// Set Sync Rate for screen:
// The lower it is, the faster the game runs but the visual effects will be bad.
// The higher the setting - the opposite will occour!
dbDisableEscapeKey ( ); //disable the "escape" key
dbRandomize ( dbTimer ( ) ); //use the clock to obtian random numbers more effieciently
while ( LoopGDK () )
{
dbSprite (5, 0 , 300 , 5 ) ;
dbSprite ( 3 ,0, 0,3 ) ;
dbSetSpritePriority ( 3 ,0 ) ;
dbSetSpritePriority ( 1,1 ) ;
dbSetSpritePriority (2 ,2 ) ;
dbSetSpritePriority ( 4,3 ) ;
dbSetSpritePriority ( 5,4 ) ;
dbSprite (4 , 300, ballx ,4 ) ;
ballx = ballx + ballspeed ;
dbSprite ( 2 , playerx , 450 , 2 ) ;
dbSpriteCollision ( 4 , 2 ) ;
dbSpriteHit ( 4, 2 ) ;
if (dbLeftKey () == true )
playerx = playerx - playerspeed ;
if (dbRightKey () == true )
playerx = playerx + playerspeed ;
if (dbUpKey () == true )
playery = playery - playerspeed ;
if (dbDownKey () == true )
playery = playery + playerspeed ;
dbSync () ;
if ( dbSpriteHit (4 , 2 ) == true )
{
nachobenball () ;
}
if ( dbEscapeKey ( ) ) // if the ecape key is pressed, the program will exit
break;
dbSync ( );//update the screen contents
}
// close the program //
// delete all the sprites
for ( int i = 1; i < 30; i++ )
dbDeleteSprite ( i );
// delete the backdrop image
dbDeleteImage ( 1 );
return;//return back to windows
}