Index: /code/branches/presentation3/src/modules/designtools/ScreenshotManager.cc
===================================================================
--- /code/branches/presentation3/src/modules/designtools/ScreenshotManager.cc	(revision 7040)
+++ /code/branches/presentation3/src/modules/designtools/ScreenshotManager.cc	(revision 7041)
@@ -1,6 +1,6 @@
 /* COPYRIGHT: this code comes from http://www.ogre3d.org/wiki/index.php/High_resolution_screenshots */
 
-//#include <stdafx.h>
 #include "ScreenshotManager.h"
+
 #include <OgreRenderWindow.h>
 #include <OgreViewport.h>
@@ -10,18 +10,29 @@
 
 #include "core/GraphicsManager.h"
+#include "core/PathConfig.h"
+#include "core/ScopedSingletonManager.h"
+#include "core/ConsoleCommand.h"
 
-//using namespace Ogre;
+#include "CameraManager.h"
+#include "graphics/Camera.h"
 
 namespace orxonox
 {
+    ManageScopedSingleton(ScreenshotManager, ScopeID::Graphics, false);
+    SetConsoleCommandAlias(ScreenshotManager, makeScreenshot_s, "printScreenHD", true);
 
-    ScreenshotManager::ScreenshotManager(Ogre::RenderWindow* pRenderWindow, int gridSize, std::string fileExtension, bool overlayFlag)
+    ScreenshotManager::ScreenshotManager()
     {
+        Ogre::RenderWindow* pRenderWindow = GraphicsManager::getInstance().getRenderWindow();
+        int gridSize = 3;
+        std::string fileExtension = ".png";
+        bool overlayFlag = true;
+
         //set file extension for the Screenshot files
-        mFileExtension = fileExtension;
+        mFileExtension   = fileExtension;
         // the gridsize
-        mGridSize         = gridSize;
+        mGridSize        = gridSize;
         // flag for overlay rendering
-        mDisableOverlays  = overlayFlag;
+        mDisableOverlays = overlayFlag;
         //get current window size
         mWindowWidth   = pRenderWindow->getWidth();
@@ -47,5 +58,6 @@
     ScreenshotManager::~ScreenshotManager()
     {
-      delete[] data_;
+        // Don't delete data_. Somehow this pointer points anywhere but to memory location.
+        //delete[] data_;
     }
 
@@ -55,6 +67,8 @@
     * @param fileName the filename of the screenshot file.
     */
-    void ScreenshotManager::makeScreenshot(Ogre::Camera* camera, std::string fileName) const
+    void ScreenshotManager::makeScreenshot() const
     {
+        Ogre::Camera* camera = CameraManager::getInstance().getActiveCamera()->getOgreCamera();
+        std::string fileName = PathConfig::getInstance().getLogPathString() + "screenshot_" + this->getTimestamp();
 
         //Remove all viewports, so the added Viewport(camera) ist the only 
@@ -143,3 +157,18 @@
     }
 
+    std::string ScreenshotManager::getTimestamp()
+    {
+        struct tm *pTime;
+        time_t ctTime; time(&ctTime);
+        pTime = localtime( &ctTime );
+        std::ostringstream oss;
+        oss	<< std::setw(2) << std::setfill('0') << (pTime->tm_mon + 1)
+            << std::setw(2) << std::setfill('0') << pTime->tm_mday
+            << std::setw(2) << std::setfill('0') << (pTime->tm_year + 1900)
+            << "_" << std::setw(2) << std::setfill('0') << pTime->tm_hour
+            << std::setw(2) << std::setfill('0') << pTime->tm_min
+            << std::setw(2) << std::setfill('0') << pTime->tm_sec;
+        return oss.str();
+    }
+
 }
Index: /code/branches/presentation3/src/modules/designtools/ScreenshotManager.h
===================================================================
--- /code/branches/presentation3/src/modules/designtools/ScreenshotManager.h	(revision 7040)
+++ /code/branches/presentation3/src/modules/designtools/ScreenshotManager.h	(revision 7041)
@@ -4,11 +4,16 @@
 #define __ScreenshotManager_h__
 
+#include "DesignToolsPrereqs.h"
+
 #include <string>
+#include <cstring>
+#include <cstdlib>
+
 #include <OgrePrerequisites.h>
 #include <OgreTexture.h>
 #include <OgreHardwarePixelBuffer.h>
-#include "OrxonoxConfig.h"
-#include <cstring>
-#include <cstdlib>
+
+#include "util/Singleton.h"
+#include "core/OrxonoxClass.h"
 
 namespace orxonox
@@ -27,8 +32,10 @@
     *              To generate "MyScreenshot.png" this parameter would contain ".png".
     */
-    class ScreenshotManager
+    class ScreenshotManager : public OrxonoxClass, public Singleton<ScreenshotManager>
     {
+        friend class Singleton<ScreenshotManager>;
+
     public:
-        ScreenshotManager(Ogre::RenderWindow* pRenderWindow, int gridSize, std::string fileExtension, bool overlayFlag);
+        ScreenshotManager();
         ~ScreenshotManager();
 
@@ -37,7 +44,12 @@
         * @param fileName the filename of the screenshot file.
       */
-        void makeScreenshot(Ogre::Camera* camera, Ogre::String fileName) const;
+        void makeScreenshot() const;
+
+        static void makeScreenshot_s()
+            { getInstance().makeScreenshot(); }
       
     protected:
+        static std::string ScreenshotManager::getTimestamp();
+
         std::string    mFileExtension;
         unsigned int   mGridSize, mWindowWidth, mWindowHeight;
@@ -50,4 +62,6 @@
         Ogre::PixelBox  mFinalPicturePB;
         uint8_t* data_;
+
+        static ScreenshotManager* singletonPtr_s;
     };
 
