Slow down a bit the cube spinning, and fix a warning.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37874 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin 2010-08-03 16:28:32 +00:00
parent e9fd63ec7c
commit e70782a501

View File

@ -14,7 +14,7 @@ void draw_cube(void);
void game_mode(char *mode); void game_mode(char *mode);
void dump_game_mode(void); void dump_game_mode(void);
void init(void); void init(void);
void clean_exit(void); void on_exit(void);
float spin = 0; float spin = 0;
@ -81,7 +81,7 @@ display(void)
void void
idle(void) idle(void)
{ {
spin += 1.0; spin += 0.5;
if (spin > 360.0) if (spin > 360.0)
spin = 0.0; spin = 0.0;
@ -166,10 +166,9 @@ on_exit(void)
void void
game_mode(char *mode) game_mode(char *mode)
{ {
printf("glutGameModeString(\"%s\"): ", mode);
glutGameModeString(mode); glutGameModeString(mode);
printf("glutGameModeString(\"%s\"): ", mode);
if (!glutGameModeGet(GLUT_GAME_MODE_POSSIBLE)) { if (!glutGameModeGet(GLUT_GAME_MODE_POSSIBLE)) {
printf("*not* possible!\n"); printf("*not* possible!\n");
return; return;