Index: code/branches/FICN/src/orxonox/hud/hud_overlay.cc
===================================================================
--- code/branches/FICN/src/orxonox/hud/hud_overlay.cc	(revision 622)
+++ 	(revision )
@@ -1,151 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      HUD design: Yuning Chai
- *      Implementation: Yuning Chai
- *   Co-authors:
- *      Implementation: Reto Grieder
- *
- */
-
-//#include "OgreMath.h"
-//#include "OgreVector3.h"
-#include "OgreStringConverter.h"
-#include "OgreOverlayManager.h"
-#include "OgreOverlay.h"
-#include "OgreOverlayElement.h"
-
-#include "hud_overlay.h"
-
-
-namespace orxonox {
-namespace hud {
-  using namespace Ogre;
-
-  HUDOverlay::HUDOverlay()
-  {
-    //TODO: write safe guard
-    overlay_ = OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
-  }
-
-
-  HUDOverlay::~HUDOverlay()
-  {
-  }
-
-
-  void HUDOverlay::show()
-  {
-    //TODO: safe guard
-    overlay_->show();
-  }
-
-
-  void HUDOverlay::hide()
-  {
-    //TODO: safe guard
-    overlay_->hide();
-  }
-
-
-  bool HUDOverlay::tick(unsigned long, Ogre::Real)
-  {
-		// set Time
-		int TimeMin = 99;
-		int TimeSec = 55;
-		OverlayElement* TimeText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/Time/Text");
-		TimeText->setCaption(StringConverter::toString(TimeMin) + ":" + StringConverter::toString(TimeSec));
-
-		// set TargetWindow
-		String TargetWindowName = "HURRA";
-		int TargetWindowDistance = 12;
-		String TargetWindowStatus = "Dead";
-		int TargetWindowHitRating = 30;
-		OverlayElement* TargetWindowNameText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/Name");
-		TargetWindowNameText->setCaption( TargetWindowName);
-		OverlayElement* TargetWindowDistanceText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/DistanceText");
-		TargetWindowDistanceText->setCaption(StringConverter::toString(TargetWindowDistance) + "km" );
-		OverlayElement* TargetWindowStatusText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/StatusText");
-		TargetWindowStatusText->setCaption( TargetWindowStatus );
-		OverlayElement* TargetWindowHitRatingText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/HitRatingText");
-		TargetWindowHitRatingText->setCaption(StringConverter::toString(TargetWindowHitRating) + "%" );
-
-		// set Energy
-		int EnergyValue = 60.0;
-		OverlayElement* EnergyLength = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/EnergyBackground");
-		EnergyLength->setWidth((int)((double)60/(double)100*200));
-
-		// set Shild
-		bool ShildLeftTopValue = true;
-		bool ShildRightTopValue = false;
-		bool ShildLeftBottomValue = false;
-		bool ShildRightBottomValue = true;
-		OverlayElement* ShildLeftTop = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/ShildLeftTop");
-		if (ShildLeftTopValue) ShildLeftTop->show();
-		else ShildLeftTop->hide();
-		OverlayElement* ShildRightTop = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/ShildRightTop");
-		if (ShildRightTopValue) ShildRightTop->show();
-		else ShildRightTop->hide();
-		OverlayElement* ShildLeftBottom = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/ShildLeftBottom");
-		if (ShildLeftBottomValue) ShildLeftBottom->show();
-		else ShildLeftBottom->hide();
-		OverlayElement* ShildRightBottom = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/ShildRightBottom");
-		if (ShildRightBottomValue) ShildRightBottom->show();
-		else ShildRightBottom->hide();
-
-		// set Rockets
-		int Rocket1 = 11;
-		int Rocket2 = 22;
-		int Rocket3 = 33;
-		int Rocket4 = 44;
-		OverlayElement* RocketNum1 = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum1");
-		RocketNum1->setCaption(StringConverter::toString(Rocket1));
-		OverlayElement* RocketNum2 = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum2");
-		RocketNum2->setCaption(StringConverter::toString(Rocket2));
-		OverlayElement* RocketNum3 = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum3");
-		RocketNum3->setCaption(StringConverter::toString(Rocket3));
-		OverlayElement* RocketNum4 = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum4");
-		RocketNum4->setCaption(StringConverter::toString(Rocket4));
-
-		// set EnergyDistribution
-		double EnergyDistrPixelX = 100;
-		double EnergyDistrPixelY = 86;
-		double EnergyDistrShild = 32;
-		double EnergyDistrEngine = 50;
-		double EnergyDistrLaser = 18;
-		double EnergyDistrShildInv = 100 - EnergyDistrShild;
-		double EnergyDistrEngineInv = 100 - EnergyDistrEngine;
-		double EnergyDistrLaserInv = 100 - EnergyDistrLaser;
-		double EnergyDistrY = (double)EnergyDistrEngineInv/((double)EnergyDistrEngineInv+(double)EnergyDistrLaserInv) * EnergyDistrPixelY;
-		double EnergyDistrX = EnergyDistrY/1.7321;
-
-
-
-		OverlayElement* EnergyDistrPoint = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/EnergyDistrPoint");
-//		EnergyDistrPoint->setLeft();
-//		EnergyDistrPoint->setTop();
-
-
-    // keep rendering
-    return true;
-  }
-}
-}
Index: code/branches/FICN/src/orxonox/hud/hud_overlay.h
===================================================================
--- code/branches/FICN/src/orxonox/hud/hud_overlay.h	(revision 622)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   This program is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation, either version 3 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- *
- *   Author:
- *      HUD design: Yuning Chai
- *      Implementation: Yuning Chai
- *   Co-authors:
- *      Implementation: Reto Grieder
- *
- */
-
-
-#ifndef HUD_OVERLAY_H
-#define HUD_OVERLAY_H
-
-#include "OgrePrerequisites.h"
-
-#include "orxonox/orxonox_prerequisites.h"
-
-
-namespace orxonox {
-namespace hud {
-
-  class HUDOverlay
-  {
-  public:
-    HUDOverlay();
-	  virtual ~HUDOverlay();
-
-    void show();
-
-    void hide();
-
-    bool tick(unsigned long, Ogre::Real);
-
-  protected:
-
-  public:
-
-  protected:
-    Ogre::Overlay *overlay_;
-
-  };
-}
-}
-
-#endif /* HUD_OVERLAY_H */
Index: code/branches/FICN/src/orxonox/hud/test_overlay.cc
===================================================================
--- code/branches/FICN/src/orxonox/hud/test_overlay.cc	(revision 622)
+++ 	(revision )
@@ -1,124 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      HUD design: Yuning Chai
- *      Implementation: Yuning Chai
- *   Co-authors:
- *      Implementation: Reto Grieder
- *
- */
-
-//#include "OgreMath.h"
-//#include "OgreVector3.h"
-#include "OgreStringConverter.h"
-#include "OgreOverlayManager.h"
-#include "OgreOverlay.h"
-#include "OgreOverlayElement.h"
-#include "OgreRenderWindow.h"
-#include "OgreRenderTarget.h"
-
-#include "test_overlay.h"
-
-
-namespace orxonox {
-namespace hud {
-  using namespace Ogre;
-
-  TestOverlay::TestOverlay(RenderWindow *window)
-    :window_(window)
-  {
-    //TODO: write safe guard
-    overlay_ = OverlayManager::getSingleton().getByName("Core/DebugOverlay");
-  }
-
-
-  TestOverlay::~TestOverlay()
-  {
-  }
-
-
-  void TestOverlay::show()
-  {
-    //TODO: safe guard
-    overlay_->show();
-  }
-
-
-  void TestOverlay::hide()
-  {
-    //TODO: safe guard
-    overlay_->hide();
-  }
-
-
-  void TestOverlay::setDebugText(Ogre::String &str)
-  {
-    debugText_ = str;
-  }
-
-
-  bool TestOverlay::tick(unsigned long, Ogre::Real)
-  {
-    static String currFps = "Current FPS: ";
-    static String avgFps = "Average FPS: ";
-    static String bestFps = "Best FPS: ";
-    static String worstFps = "Worst FPS: ";
-    static String tris = "Triangle Count: ";
-    static String batches = "Batch Count: ";
-
-    // update stats when necessary
-    try {
-      OverlayElement* guiAvg = OverlayManager::getSingleton()
-        .getOverlayElement("Core/AverageFps");
-      OverlayElement* guiCurr = OverlayManager::getSingleton()
-        .getOverlayElement("Core/CurrFps");
-      OverlayElement* guiBest = OverlayManager::getSingleton()
-        .getOverlayElement("Core/BestFps");
-      OverlayElement* guiWorst = OverlayManager::getSingleton()
-        .getOverlayElement("Core/WorstFps");
-
-      const RenderTarget::FrameStats& stats = window_->getStatistics();
-      guiAvg->setCaption(avgFps + StringConverter::toString(stats.avgFPS));
-      guiCurr->setCaption(currFps + StringConverter::toString(stats.lastFPS));
-      guiBest->setCaption(bestFps + StringConverter::toString(stats.bestFPS)
-        +" "+StringConverter::toString(stats.bestFrameTime)+" ms");
-      guiWorst->setCaption(worstFps + StringConverter::toString(stats.worstFPS)
-        +" "+StringConverter::toString(stats.worstFrameTime)+" ms");
-
-      OverlayElement* guiTris = OverlayManager::getSingleton()
-        .getOverlayElement("Core/NumTris");
-      guiTris->setCaption(tris + StringConverter::toString(stats.triangleCount));
-
-      OverlayElement* guiBatches = OverlayManager::getSingleton()
-        .getOverlayElement("Core/NumBatches");
-      guiBatches->setCaption(batches
-        + StringConverter::toString(stats.batchCount));
-
-      OverlayElement* guiDbg = OverlayManager::getSingleton()
-        .getOverlayElement("Core/DebugText");
-      guiDbg->setCaption(debugText_);
-    }
-    catch(...) { /* ignore */ }
-
-    return true;
-  }
-}
-}
Index: code/branches/FICN/src/orxonox/hud/test_overlay.h
===================================================================
--- code/branches/FICN/src/orxonox/hud/test_overlay.h	(revision 622)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   This program is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation, either version 3 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- *
- *   Author:
- *      HUD design: Yuning Chai
- *      Implementation: Yuning Chai
- *   Co-authors:
- *      Implementation: Reto Grieder
- *
- */
-
-
-#ifndef TEST_OVERLAY_H
-#define TEST_OVERLAY_H
-
-#include "OgrePrerequisites.h"
-
-#include "orxonox/orxonox_prerequisites.h"
-
-
-namespace orxonox {
-namespace hud {
-
-  class TestOverlay
-  {
-  public:
-    TestOverlay(Ogre::RenderWindow*);
-	  virtual ~TestOverlay();
-
-    void show();
-
-    void hide();
-
-    void setDebugText(Ogre::String&);
-
-    bool tick(unsigned long, Ogre::Real);
-
-  protected:
-
-  public:
-
-  protected:
-    Ogre::Overlay *overlay_;
-    Ogre::RenderWindow *window_;
-
-    Ogre::String debugText_;
-
-  };
-}
-}
-
-#endif /* TEST_OVERLAY_H */
Index: code/branches/FICN/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/branches/FICN/src/orxonox/objects/SpaceShip.cc	(revision 622)
+++ code/branches/FICN/src/orxonox/objects/SpaceShip.cc	(revision 623)
@@ -47,4 +47,7 @@
 
         this->setMouseEventCallback_ = false;
+
+        this->w = NULL;
+        this->tt = NULL;
 
         this->moveForward_ = 0;
