Index: code/branches/doc/doc/api/CMakeLists.txt
===================================================================
--- code/branches/doc/doc/api/CMakeLists.txt	(revision 7345)
+++ code/branches/doc/doc/api/CMakeLists.txt	(revision 7346)
@@ -46,4 +46,19 @@
   #ENDIF (NOT DVIPS_CONVERTER)
 
+  SET(INTERNAL_DOCFILE ${CMAKE_CURRENT_BINARY_DIR}/Internal.dox)
+  IF(WIN32)
+    SET(_working_dir ${RUNTIME_LIBRARY_DIRECTORY})
+  ELSE()
+    SET(_working_dir ${CMAKE_CURRENT_BINARY_DIR})
+  ENDIF()
+  ADD_CUSTOM_COMMAND(
+    OUTPUT ${INTERNAL_DOCFILE}
+    COMMAND orxonox-main
+    ARGS --noIOConsole --generateDoc ${INTERNAL_DOCFILE}
+    WORKING_DIRECTORY ${_working_dir}
+    COMMENT "Generating additional Doxygen documentation from Orxonox executable"
+  )
+  ADD_CUSTOM_TARGET(doc_internal DEPENDS ${INTERNAL_DOCFILE})
+
   IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in)
     # use (configured) doxy.config from (out of place) BUILD tree:
Index: code/branches/doc/doc/api/doxy.config.in
===================================================================
--- code/branches/doc/doc/api/doxy.config.in	(revision 7345)
+++ code/branches/doc/doc/api/doxy.config.in	(revision 7346)
@@ -589,5 +589,6 @@
                          @CMAKE_CURRENT_SOURCE_DIR@ \
                          @CMAKE_BINARY_DIR@/src/OrxonoxConfig.h \
-                         @CMAKE_BINARY_DIR@/src/SpecialConfig.h
+                         @CMAKE_BINARY_DIR@/src/SpecialConfig.h \
+                         @INTERNAL_DOCFILE@
 
 # This tag can be used to specify the character encoding of the source files
Index: code/branches/doc/src/orxonox/Main.cc
===================================================================
--- code/branches/doc/src/orxonox/Main.cc	(revision 7345)
+++ code/branches/doc/src/orxonox/Main.cc	(revision 7346)
@@ -61,4 +61,8 @@
     SetCommandLineSwitch(dedicatedClient).information("Start in dedicated client mode");
 
+    //! @cmdarg
+    SetCommandLineArgument(generateDoc, "Internal.dox")
+        .information("Generates a Doxygen file from things like SetConsoleCommand");
+
     /**
     @brief
@@ -69,34 +73,44 @@
         Game* game = new Game(strCmdLine);
 
-        game->setStateHierarchy(
-        "root"
-        " graphics"
-        "  mainMenu"
-        "  standalone,server,client"
-        "   level"
-        " server,client"
-        "  level"
-        );
-
-        game->requestState("root");
-
-        // Some development hacks (not really, but in the future, this calls won't make sense anymore)
-        if (CommandLineParser::getValue("standalone").getBool())
-            Game::getInstance().requestStates("graphics, standalone, level");
-        else if (CommandLineParser::getValue("server").getBool())
-            Game::getInstance().requestStates("graphics, server, level");
-        else if (CommandLineParser::getValue("client").getBool())
-            Game::getInstance().requestStates("graphics, client, level");
-        else if (CommandLineParser::getValue("dedicated").getBool())
-            Game::getInstance().requestStates("server, level");
-        else if (CommandLineParser::getValue("dedicatedClient").getBool())
-            Game::getInstance().requestStates("client, level");
+        if (CommandLineParser::existsArgument("generateDoc"))
+        {
+            // Generate additional documentation written to ONE file
+            std::string filename;
+            CommandLineParser::getValue("generateDoc", &filename);
+        }
         else
         {
-            if (!CommandLineParser::getValue("console").getBool())
-                Game::getInstance().requestStates("graphics, mainMenu");
+            game->setStateHierarchy(
+            "root"
+            " graphics"
+            "  mainMenu"
+            "  standalone,server,client"
+            "   level"
+            " server,client"
+            "  level"
+            );
+
+            game->requestState("root");
+
+            // Some development hacks (not really, but in the future, this calls won't make sense anymore)
+            if (CommandLineParser::getValue("standalone").getBool())
+                Game::getInstance().requestStates("graphics, standalone, level");
+            else if (CommandLineParser::getValue("server").getBool())
+                Game::getInstance().requestStates("graphics, server, level");
+            else if (CommandLineParser::getValue("client").getBool())
+                Game::getInstance().requestStates("graphics, client, level");
+            else if (CommandLineParser::getValue("dedicated").getBool())
+                Game::getInstance().requestStates("server, level");
+            else if (CommandLineParser::getValue("dedicatedClient").getBool())
+                Game::getInstance().requestStates("client, level");
+            else
+            {
+                if (!CommandLineParser::getValue("console").getBool())
+                    Game::getInstance().requestStates("graphics, mainMenu");
+            }
+
+            game->run();
         }
 
-        game->run();
         delete game;
 
