Sadistictoaster
Still Fresh
- Joined
- Sep 12, 2006
- Messages
- 22
The following code will move an image around the screen , but , for some reason , the movement is quite jerky : often I'll push the stick all the way down , but the image wil not move : so I have to move it away , and back again before it'll register.
I've checked the GPX2 with some other games , and no problems there : so the stick itself is not at fault.
Any ideas? It's really winding me up.
drawSprite(playerbot, screen, 0, 0, playerx, 220, playerbot->w, playerbot->h);
if ((SDL_PollEvent(&event)) !=1)
{
switch (event.type)
{
case SDL_JOYBUTTONDOWN:
switch(event.jbutton.button)
{
case 2: //right
playerx=playerx-2;
case 6: //left
playerx=playerx+2;
break;
}
}
}
I've checked the GPX2 with some other games , and no problems there : so the stick itself is not at fault.
Any ideas? It's really winding me up.
drawSprite(playerbot, screen, 0, 0, playerx, 220, playerbot->w, playerbot->h);
if ((SDL_PollEvent(&event)) !=1)
{
switch (event.type)
{
case SDL_JOYBUTTONDOWN:
switch(event.jbutton.button)
{
case 2: //right
playerx=playerx-2;
case 6: //left
playerx=playerx+2;
break;
}
}
}