static GameSession* titlesession;
static std::vector<LevelSubset*> contrib_subsets;
static LevelSubset* current_contrib_subset = 0;
static GameSession* titlesession;
static std::vector<LevelSubset*> contrib_subsets;
static LevelSubset* current_contrib_subset = 0;
free_contrib_menu();
contrib_menu->additem(MN_LABEL,_("Contrib Levels"),0,0);
contrib_menu->additem(MN_HL,"",0,0);
free_contrib_menu();
contrib_menu->additem(MN_LABEL,_("Contrib Levels"),0,0);
contrib_menu->additem(MN_HL,"",0,0);
contrib_menu->additem(MN_GOTO, subset->title.c_str(), i,
contrib_menu->additem(MN_GOTO, subset->title.c_str(), i,
- worldmap.loadmap(worldmap_list.item[i]);
- contrib_menu->additem(MN_ACTION, worldmap.get_world_title(),0,0, i + level_subsets.num_items);
+ worldmap.loadmap((*it).c_str());
+ contrib_menu->additem(MN_ACTION, worldmap.get_world_title(),0,0, i + level_subsets.size());
+ ++i;
}
contrib_menu->additem(MN_HL,"",0,0);
contrib_menu->additem(MN_BACK,_("Back"),0,0);
}
contrib_menu->additem(MN_HL,"",0,0);
contrib_menu->additem(MN_BACK,_("Back"),0,0);
- worldmap.loadmap(worldmap_list.item[index - contrib_subsets.size()]);
+ std::set<std::string>::iterator it = worldmap_list.begin();
+ for(int i = index - contrib_subsets.size(); i > 0; --i)
+ ++it;
+ worldmap.loadmap((*it));
img_choose_subset = new Surface(datadir + "/images/status/choose-level-subset.png", true);
/* Generating contrib maps by only using a string_list */
img_choose_subset = new Surface(datadir + "/images/status/choose-level-subset.png", true);
/* Generating contrib maps by only using a string_list */
if(frame_ratio > 1.5) /* Quick hack to correct the unprecise CPU clocks a little bit. */
frame_ratio = 1.5 + (frame_ratio - 1.5) * 0.85;
/* Lower the frame_ratio that Tux doesn't jump to hectically throught the demo. */
if(frame_ratio > 1.5) /* Quick hack to correct the unprecise CPU clocks a little bit. */
frame_ratio = 1.5 + (frame_ratio - 1.5) * 0.85;
/* Lower the frame_ratio that Tux doesn't jump to hectically throught the demo. */
if (Menu::current() == main_menu)
context.draw_surface(logo, Vector(screen->w/2 - logo->w/2, 30),
LAYER_FOREGROUND1+1);
if (Menu::current() == main_menu)
context.draw_surface(logo, Vector(screen->w/2 - logo->w/2, 30),
LAYER_FOREGROUND1+1);
- context.draw_text(white_small_text, " SuperTux " VERSION "\n", Vector(0, screen->h - 70), LAYER_FOREGROUND1);
+ context.draw_text(white_small_text, " SuperTux " VERSION "\n", Vector(0, screen->h - 70), LEFT_ALLIGN, LAYER_FOREGROUND1);
context.draw_text(white_small_text,
_("Copyright (c) 2003 SuperTux Devel Team\n"
"This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n"
"are welcome to redistribute it under certain conditions; see the file COPYING\n"
context.draw_text(white_small_text,
_("Copyright (c) 2003 SuperTux Devel Team\n"
"This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n"
"are welcome to redistribute it under certain conditions; see the file COPYING\n"
- "for details.\n"), Vector(0, screen->h - 70 + white_small_text->get_height()), LAYER_FOREGROUND1);
+ "for details.\n"), Vector(0, screen->h - 70 + white_small_text->get_height()), LEFT_ALLIGN, LAYER_FOREGROUND1);
/* Don't draw menu, if quit is true */
Menu* menu = Menu::current();
/* Don't draw menu, if quit is true */
Menu* menu = Menu::current();
break;
case MNID_CREDITS:
display_text_file("CREDITS", SCROLL_SPEED_CREDITS, white_big_text , white_text, white_small_text, blue_text );
break;
case MNID_CREDITS:
display_text_file("CREDITS", SCROLL_SPEED_CREDITS, white_big_text , white_text, white_small_text, blue_text );
- sprintf(str,"%s/slot%d.stsg", st_save_dir, slot);
- printf("Removing: %s\n",str);
- remove(str);
+ str = st_save_dir + "/slot" + stream.str() + ".stsg";
+ printf("Removing: %s\n",str.c_str());
+ remove(str.c_str());
titlesession->get_current_sector()->activate();
titlesession->set_current();
//titletux.level_begin();
titlesession->get_current_sector()->activate();
titlesession->set_current();
//titletux.level_begin();