I am trying to roll some dice and move a spaceship sprite. however, when I move the spaceship sprite it rolls the dice which a I don't want it to do. I think that the function glutPostRedisplay() is not working properly. let me know if you need more code.
void handleKeypress(unsigned char key, int x, int y)
{
switch (key)
{
case 27:
exit(0);
break;
case 's':
dice_one();
dice_two();
dice_three();
dice_four();
dice_five();
break;
}
glutPostRedisplay();
}
void handleSpecialKeypress(int key, int x, int y)
{
switch (key)
{
case GLUT_KEY_LEFT:
move_x--;
break;
case GLUT_KEY_RIGHT:
move_x++;
break;
case GLUT_KEY_UP:
break;
case GLUT_KEY_DOWN:
break;
}
glutPostRedisplay();
}