This program is check whether the user hit the bmp
But it doesn't work
#include "DarkGDK.h"
void DarkGDK ( void )
{
POINT mouse_point;
dbSyncOn ( );
dbSyncRate ( 60 );
dbCreateAnimatedSprite (1,"rock.bmp",6,1,1);
dbSprite ( 1, 100, 100, 1 );
while ( LoopGDK ( ) )
{
if(dbMouseClick()==1)
{
dbText(100,10,"1") ;
dbSync ( );
dbText(200,10,dbStr(dbPickObject(dbMouseX(), dbMouseY(), 1,1))) ;
dbSync ( );
if(dbPickObject(dbMouseX(), dbMouseY(), 1,1) == 1)
dbText(200,10,"2") ;
dbSync ( );
}
dbPlaySprite ( 1, 1, 6, 200 );
dbCLS();
dbSync ( );
}
return;
}