break;
case SDLK_TAB:
if(debug_mode == YES)
- {
- tux.size = !tux.size;
- if(tux.size == BIG)
- {
- tux.base.height = 64;
- }
- else
- tux.base.height = 32;
- }
+ {
+ tux.size = !tux.size;
+ if(tux.size == BIG)
+ {
+ tux.base.height = 64;
+ }
+ else
+ tux.base.height = 32;
+ }
break;
case SDLK_END:
if(debug_mode == YES)
{
int fps_cnt, jump, done;
timer_type fps_timer, frame_timer;
-
+ timer_init(&fps_timer, YES);
+ timer_init(&frame_timer, YES);
+
game_started = YES;
st_gl_mode = mode;
level_load_song(¤t_level);
}
-
+
player_init(&tux);
if(st_gl_mode != ST_GL_TEST)
levelintro();
+ timer_init(&time_left,YES);
start_timers();
if(st_gl_mode == ST_GL_LOAD_GAME)
quit = 0;
frame = 0;
game_pause = 0;
- timer_init(&fps_timer);
- timer_init(&frame_timer);
+ timer_init(&fps_timer,YES);
+ timer_init(&frame_timer,YES);
fps_cnt = 0;
/* Clear screen: */
/* Handle events: */
tux.input.old_fire = tux.input.fire;
-
- /*printf("%lf\n",frame_ratio);*/
-
+
game_event();
if(show_menu)
{
switch (menu_check(&game_menu))
{
- case 0:
+ case 2:
st_pause_ticks_stop();
break;
- case 1:
+ case 3:
update_load_save_game_menu(&save_game_menu, NO);
break;
- case 2:
+ case 4:
update_load_save_game_menu(&load_game_menu, YES);
break;
- case 4:
+ case 7:
+ st_pause_ticks_stop();
done = 1;
break;
}
}
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
{
/* Get a distro from it: */
- add_bouncy_distro(((x + 1) / 32) * 32,
+ add_bouncy_distro(((int)(x + 1) / 32) * 32,
(int)(y / 32) * 32);
if (counting_distros == NO)
/* Replace it with broken bits: */
- add_broken_brick(((x + 1) / 32) * 32,
+ add_broken_brick(((int)(x + 1) / 32) * 32,
(int)(y / 32) * 32);
if (shape(x, y) == 'A')
{
- DEBUG_MSG("Here I am");
-
/* Box with a distro! */
- add_bouncy_distro(((x + 1) / 32) * 32,
+ add_bouncy_distro(((int)(x + 1) / 32) * 32,
(int)(y / 32) * 32 - 32);
play_sound(sounds[SND_DISTRO], SOUND_CENTER_SPEAKER);
{
/* Tux is small, add mints! */
- add_upgrade(((x + 1) / 32) * 32,
+ add_upgrade((int)((x + 1) / 32) * 32,
(int)(y / 32) * 32 - 32,
UPGRADE_MINTS);
}
{
/* Tux is big, add coffee: */
- add_upgrade(((x + 1) / 32) * 32,
+ add_upgrade((int)((x + 1) / 32) * 32,
(int)(y / 32) * 32 - 32,
UPGRADE_COFFEE);
}
{
/* Add a golden herring */
- add_upgrade(((x + 1) / 32) * 32,
+ add_upgrade((int)((x + 1) / 32) * 32,
(int)(y / 32) * 32 - 32,
UPGRADE_HERRING);
}
if (bounciness == BOUNCE)
{
- add_bouncy_distro(((x + 1) / 32) * 32,
+ add_bouncy_distro(((int)(x + 1) / 32) * 32,
(int)(y / 32) * 32);
}