// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
-#include <config.h>
-#include <iostream>
-#include <sstream>
-#include <stdexcept>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <errno.h>
-#include <unistd.h>
-#include <SDL.h>
-#include <SDL_image.h>
-#include <physfs.h>
-#include <algorithm>
+#include <config.h>
+#include <version.h>
-#include "gameconfig.hpp"
#include "title.hpp"
-#include "mainloop.hpp"
-#include "video/drawing_context.hpp"
-#include "video/surface.hpp"
+
+#include "addon/addon_manager.hpp"
#include "audio/sound_manager.hpp"
+#include "fadeout.hpp"
+#include "file_system.hpp"
+#include "gameconfig.hpp"
+#include "gettext.hpp"
#include "gui/menu.hpp"
-#include "timer.hpp"
-#include "lisp/lisp.hpp"
#include "lisp/parser.hpp"
-#include "level.hpp"
-#include "world.hpp"
-#include "game_session.hpp"
-#include "worldmap/worldmap.hpp"
-#include "player_status.hpp"
-#include "tile.hpp"
-#include "sector.hpp"
-#include "object/tilemap.hpp"
+#include "log.hpp"
+#include "main.hpp"
+#include "mainloop.hpp"
#include "object/camera.hpp"
#include "object/player.hpp"
+#include "options_menu.hpp"
#include "resources.hpp"
-#include "gettext.hpp"
+#include "sector.hpp"
#include "textscroller.hpp"
-#include "fadeout.hpp"
-#include "file_system.hpp"
-#include "control/joystickkeyboardcontroller.hpp"
-#include "control/codecontroller.hpp"
-#include "main.hpp"
-#include "log.hpp"
-#include "options_menu.hpp"
-#include "console.hpp"
-#include "random_generator.hpp"
-#include "addon/addon_manager.hpp"
+#include "video/drawing_context.hpp"
+#include "world.hpp"
+
+#include <algorithm>
+#include <physfs.h>
enum MainMenuIDs {
MNID_STARTGAME,
contrib_menu->add_entry(i++, world->title);
contrib_worlds.push_back(world.release());
} catch(std::exception& e) {
-#ifdef DEBUG
log_warning << "Couldn't parse levelset info for '" << *it << "': " << e.what() << std::endl;
-#endif
}
}
// FIXME: Add something to scale the frame to the resolution of the screen
context.draw_surface(frame.get(), Vector(0,0),LAYER_FOREGROUND1);
- context.draw_text(white_small_text, "SuperTux " PACKAGE_VERSION "\n",
+ context.draw_text(small_font, "SuperTux " PACKAGE_VERSION "\n",
Vector(5, SCREEN_HEIGHT - 50), ALIGN_LEFT, LAYER_FOREGROUND1);
- context.draw_text(white_small_text,
+ context.draw_text(small_font,
_(
"Copyright (c) 2007 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"
),
- Vector(5, SCREEN_HEIGHT - 50 + white_small_text->get_height() + 5),
+ Vector(5, SCREEN_HEIGHT - 50 + small_font->get_height() + 5),
ALIGN_LEFT, LAYER_FOREGROUND1);
}
Menu* menu = Menu::current();
if(menu) {
- menu->update();
-
if(menu == main_menu.get()) {
switch (main_menu->check()) {
case MNID_STARTGAME:
break;
case MNID_CREDITS:
+ Menu::set_current(NULL);
main_loop->push_screen(new TextScroller("credits.txt"),
new FadeOut(0.5));
break;
}
}
- // reopen menu of user closed it (so that the app doesn't close when user
+ // reopen menu if user closed it (so that the app doesn't close when user
// accidently hit ESC)
- if(Menu::current() == 0) {
+ if(Menu::current() == 0 && main_loop->has_no_pending_fadeout()) {
generate_main_menu();
Menu::set_current(main_menu.get());
}
void
TitleScreen::start_game()
{
+ Menu::set_current(NULL);
std::string basename = current_world->get_basedir();
basename = basename.substr(0, basename.length()-1);
std::string worlddirname = FileSystem::basename(basename);