static Surface* bkg_title;
static Surface* logo;
-static Surface* img_choose_subset;
+//static Surface* img_choose_subset;
static bool walking;
-static Timer2 random_timer;
+static Timer random_timer;
static int frame;
controller->press(Controller::RIGHT);
if(random_timer.check() ||
- (walking && (int) last_tux_x_pos == (int) tux->get_pos().x)) {
+ (walking && fabsf(last_tux_x_pos - tux->get_pos().x)) < .1) {
walking = false;
} else {
- if(!walking && (int) tux->get_pos().y == (int) last_tux_y_pos) {
+ if(!walking && fabsf(tux->get_pos().y - last_tux_y_pos) < .1) {
random_timer.start(float(rand() % 3000 + 3000) / 1000.);
walking = true;
}
sector->camera->reset(tux->get_pos());
}
- sector->action(elapsed_time);
+ sector->update(elapsed_time);
sector->draw(*titlesession->context);
}
/* Load images: */
bkg_title = new Surface(datadir + "/images/background/arctis.jpg", false);
- logo = new Surface(datadir + "/images/title/logo.png", true);
- img_choose_subset = new Surface(datadir + "/images/status/choose-level-subset.png", true);
+ logo = new Surface(datadir + "/images/engine/menu/logo.png", true);
+ //img_choose_subset = new Surface(datadir + "/images/status/choose-level-subset.png", true);
titlesession->get_current_sector()->activate("main");
titlesession->set_current();
Vector(0, SCREEN_HEIGHT - 50), LEFT_ALLIGN, LAYER_FOREGROUND1);
context.draw_text(white_small_text,
_(
-"Copyright (c) 2003 SuperTux Devel Team\n"
+"Copyright (c) 2005 SuperTux Devel Team\n"
"This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to\n"
"redistribute it under certain conditions; see the file COPYING for details.\n"
),
if(menu)
{
menu->draw(context);
- menu->action();
+ menu->update();
if(menu == main_menu)
{
delete titlesession;
delete bkg_title;
delete logo;
- delete img_choose_subset;
+ //delete img_choose_subset;
}