From 7819b316c47ea1304251f70cc2971400847a8d96 Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Wed, 21 May 2008 18:18:03 +0000 Subject: [PATCH] Some harmless space for readability and an assert() SVN-Revision: 5497 --- src/main.cpp | 16 +++++++++++++--- src/video/renderer.hpp | 4 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 96e51e4b9..a6ee4e75d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -409,11 +409,11 @@ void init_video() SDL_WM_SetCaption(PACKAGE_NAME " " PACKAGE_VERSION, 0); // set icon - #ifdef MACOSX +#ifdef MACOSX const char* icon_fname = "images/engine/icons/supertux-256x256.png"; - #else +#else const char* icon_fname = "images/engine/icons/supertux.xpm"; - #endif +#endif SDL_Surface* icon = IMG_Load_RW(get_physfs_SDLRWops(icon_fname), true); if(icon != 0) { SDL_WM_SetIcon(icon, 0); @@ -527,26 +527,36 @@ int main(int argc, char** argv) timelog("controller"); main_controller = new JoystickKeyboardController(); + timelog("config"); init_config(); + timelog("addons"); AddonManager::get_instance().load_addons(); + timelog("tinygettext"); init_tinygettext(); + timelog("commandline"); if(parse_commandline(argc, argv)) return 0; + timelog("audio"); init_audio(); + timelog("video"); DrawingContext context; context_pointer = &context; init_video(); + Console::instance->init_graphics(); + timelog("scripting"); Scripting::init_squirrel(config->enable_script_debugger); + timelog("resources"); load_shared(); + timelog(0); main_loop = new MainLoop(); diff --git a/src/video/renderer.hpp b/src/video/renderer.hpp index 777eefdb8..2839492ea 100644 --- a/src/video/renderer.hpp +++ b/src/video/renderer.hpp @@ -25,7 +25,7 @@ #include #include - +#include #include #include "glutil.hpp" @@ -56,7 +56,7 @@ public: virtual void resize(int w, int h) = 0; virtual void apply_config() = 0; - static Renderer* instance() { return instance_; } + static Renderer* instance() { assert(instance_); return instance_; } protected: static Renderer* instance_; -- 2.11.0