//assert(!"Don't call me");
current_ = this;
- world = new World; // &::global_world;
+ world = new World;
fps_timer.init(true);
frame_timer.init(true);
current_ = this;
- world = new World; // &::global_world;
+ world = new World;
fps_timer.init(true);
frame_timer.init(true);
}
world->get_level()->load_gfx();
- loadshared();
world->activate_bad_guys();
world->activate_particle_systems();
{
/* Check for menu-events, if the menu is shown */
if(show_menu)
- menu_event(event);
+ current_menu->event(event);
switch(event.type)
{
world->get_level()->free_song();
world->arrays_free();
- unloadshared();
return(0);
}
tux.level_begin();
world->get_level()->free_song();
world->arrays_free();
- unloadshared();
return(0);
} /* if (lives < 0) */
}
if (time_left.check())
{
/* are we low on time ? */
- if ((timer_get_left(&time_left) < TIME_WARNING)
+ if (time_left.get_left() < TIME_WARNING
&& (get_current_music() != HURRYUP_MUSIC)) /* play the fast music */
{
set_current_music(HURRYUP_MUSIC);
if(show_fps)
{
++fps_cnt;
- fps_fps = (1000.0 / (float)timer_get_gone(&fps_timer)) * (float)fps_cnt;
+ fps_fps = (1000.0 / (float)fps_timer.get_gone()) * (float)fps_cnt;
if(!fps_timer.check())
{
world->get_level()->cleanup();
world->get_level()->free_song();
- unloadshared();
world->arrays_free();
return quit;
text_draw(&white_text,"Press ESC To Return",0,20,1);
}
- if (timer_get_left(&time_left) > TIME_WARNING || (global_frame_counter % 10) < 5)
+ if (time_left.get_left() > TIME_WARNING || (global_frame_counter % 10) < 5)
{
- sprintf(str, "%d", timer_get_left(&time_left) / 1000 );
+ sprintf(str, "%d", time_left.get_left() / 1000 );
text_draw(&white_text, "TIME", 224, 0, 1);
text_draw(&gold_text, str, 304, 0, 1);
}