#include \"DarkGDK.h\"
int g;
int jumped;
void Jump();
void DarkGDK(void)
{
jumped = 0;
dbSyncOn();
dbSyncRate(60);
dbSetDisplayMode(500,500,32);
dbSetImageColorKey(255,0,255);
dbCreateAnimatedSprite(1,\"Sprite2.bmp\",2,1,1);
dbSprite(1,250,450,1);
while(LoopGDK()){
g = 1;
if (dbSpaceKey())
jumped = 1;
if (jumped = 1)
Jump();
dbPlaySprite(1,1,g,60);
dbSync();
}
}
void Jump()
{
dbMoveSprite(1, +5);
dbText(0,0,\"wtf?\");
}
Somehow the character jumps without the variable being 0, because i didn\'t press the upkey.
Any ideas?
Tyvm