}
if(tux.input.down == DOWN)
- SDL_Delay(30);
+ SDL_Delay(45);
/*Draw the current scene to the screen */
/*If the machine running the game is too slow
else
{
if(pplayer->base.xm > 0)
- pplayer->base.xm = (int)(pplayer->base.xm - frame_ratio);
+ {
+ pplayer->base.xm = (int)(pplayer->base.xm - frame_ratio);
+ if(pplayer->base.xm < 0)
+ pplayer->base.xm = 0;
+ }
else if(pplayer->base.xm < 0)
- pplayer->base.xm = (int)(pplayer->base.xm + frame_ratio);
+ {
+ pplayer->base.xm = (int)(pplayer->base.xm + frame_ratio);
+ if(pplayer->base.xm > 0)
+ pplayer->base.xm = 0;
+ }
}
/* Jump/jumping? */