Some harmless space for readability and an assert()
authorIngo Ruhnke <grumbel@gmx.de>
Wed, 21 May 2008 18:18:03 +0000 (18:18 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Wed, 21 May 2008 18:18:03 +0000 (18:18 +0000)
SVN-Revision: 5497

src/main.cpp
src/video/renderer.hpp

index 96e51e4..a6ee4e7 100644 (file)
@@ -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();
index 777eefd..2839492 100644 (file)
@@ -25,7 +25,7 @@
 #include <memory>
 
 #include <stdint.h>
-
+#include <assert.h>
 #include <SDL_video.h>
 
 #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_;