Index: code/branches/FICN/src/Flocking.h
===================================================================
--- code/branches/FICN/src/Flocking.h	(revision 337)
+++ 	(revision )
@@ -1,143 +1,0 @@
-//
-//
-//      TODO: testing orxonox -flocking interface
-//            testing algorithm
-
-// ueberpruefen ob vektoren relativ richtig berechnet werden
-//
-//My Flocking Class
-
-#ifndef Flocking_Class
-#define Flocking_Class
-
-#include <Ogre.h>
-#include <OgreVector3.h>
-
-#include <iostream>
-
-
-#endif
-
-using namespace std;
-using namespace Ogre;
-
-class Element // An element that flocks
-{
-
-  public:
-    Vector3 location;  // locationvector of the element
-    Vector3 speed;  // speedvector of the element
-    Vector3 acceleration;  // accelerationvector of the element
-
-  Element() {
-    acceleration = (0,0,0);
-    speed = (0,0,0);
-    location = (0,0,0);
-  }
-
-  Element(Vector3 location_, Vector3 speed_, Vector3 acceleration_) {
-    acceleration = acceleration_;
-    speed = speed_;
-    location = location_;
-  }
-
-  void setValues(Vector3 location_, Vector3 speed_, Vector3 acceleration_) {
-    acceleration = acceleration_;
-    speed = speed_;
-    location = location_;
-  }
-
-  //calculates the distance between the element and an other point given by temp
-  float getDistance(Element temp) {
-    Vector3 distance = temp.location-location;  //this doesn't work
-    return distance.length();
-  }
-
-//EINF[GEN DES ELEMENTS
-  void update(Element arrayOfElements[], const FrameEvent& time) {
-    calculateAcceleration(arrayOfElements);  //updates the acceleration
-    calculateSpeed(time);  //updates the speed
-    calculateLocation(time);  //updates the location
-  }
-
-//EINF[GEN DES ELEMENTS
-  void calculateAcceleration(Element arrayOfElements[]) {
-  //calculates the accelerationvector based on the steeringvectors of
-  //separtion, alignment and cohesion.
-  acceleration = separation(arrayOfElements) + alignment(arrayOfElements) + cohesion(arrayOfElements);
-  }
-
-  void calculateSpeed(const FrameEvent& time) {
-    speed = speed + acceleration*time.timeSinceLastFrame;
-  }
-
-  void calculateLocation(const FrameEvent& time) {
-    location = location + speed*time.timeSinceLastFrame;
-  }
-
-
-  Vector3 separation(Element arrayOfElements[]) {
-    Vector3* steering = new Vector3(0,0,0); //steeringvector
-    int numberOfNeighbour = 0;  //number of observed neighbours
-    //go through all elements
-    for(int i=0; i<3; i++) {  //just working with 3 elements at the moment
-      Element actual = arrayOfElements[i];  //get the actual element
-      float distance = getDistance(actual);  //get distance between this and actual
-//DUMMY SEPERATION DETECTION DISTANCE =100
-      if ((distance > 0) && (distance<100)) {  //do only if actual is inside detectionradius
-        Vector3 inverseDistance = actual.location-location;  //calculate the distancevector heading towards this
-        inverseDistance = inverseDistance.normalise(); //does this work correctly?  //normalise the distancevector
-        inverseDistance = inverseDistance/*/distance*/;  //devide distancevector by distance (the closer the bigger gets the distancevector -> steeringvector)
-        *steering = *steering + inverseDistance;  //add up all significant steeringvectors
-        numberOfNeighbour++;  //counts the elements inside the detectionradius
-      }
-    }
-    if(numberOfNeighbour > 0) {
-    *steering = *steering / (float)numberOfNeighbour;  //devide the sum of steeringvectors by the number of elements -> separation steeringvector
-    }
-    return *steering;
-  }
-
-  Vector3 alignment(Element arrayOfElements[]) {
-    Vector3* steering = new Vector3(0,0,0); //steeringvector
-    int numberOfNeighbour = 0;  //number of observed neighbours
-    //go through all elements
-    for(int i=0; i<3; i++) {  //just working with 3 elements at the moment
-      Element actual = arrayOfElements[i];  //get the actual element
-      float distance = getDistance(actual);  //get distance between this and actual
-//DUMMY ALIGNMENT DETECTION DISTANCE = 1000
-      if ((distance > 0) && (distance<1000)) {  //check if actual element is inside detectionradius
-        *steering = *steering + actual.speed;  //add up all speedvectors inside the detectionradius
-        numberOfNeighbour++;  //counts the elements inside the detectionradius
-      }
-    }
-    if(numberOfNeighbour > 0) {
-    *steering = *steering / (float)numberOfNeighbour;  //devide the sum of steeringvectors by the number of elements -> alignment steeringvector
-    }
-    return *steering;
-  }
-
-  Vector3 cohesion(Element arrayOfElements[]) {
-    Vector3* steering = new Vector3(0,0,0); //steeringvector
-    int numberOfNeighbour = 0;  //number of observed neighbours
-    //go through all elements
-    for(int i=0; i<3; i++) {  //just working with 3 elements at the moment
-      Element actual = arrayOfElements[i];  //get the actual element
-      float distance = getDistance(actual);  //get distance between this and actual
-// DUMMY COHESION DETECTION DISTANCE = 1000
-      if ((distance > 0) && (distance<1000)) {  //check if actual element is inside detectionradius
-        *steering = *steering + actual.location;  //add up all locations of elements inside the detectionradius
-        numberOfNeighbour++;  //counts the elements inside the detectionradius
-      }
-     }
-    if(numberOfNeighbour > 0) {
-    *steering = *steering  / (float)numberOfNeighbour;  //devide the sum steeringvector by the number of elements -> cohesion steeringvector
-    }
-    return *steering;
-  }
- 
-};
-
-
-
-//End of My Flocking Class
Index: code/branches/FICN/src/inertial_node.cc
===================================================================
--- code/branches/FICN/src/inertial_node.cc	(revision 337)
+++ 	(revision )
@@ -1,126 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OgreSceneNode.h"
-#include "OgreVector3.h"
-
-#include "inertial_node.h"
-
-
-namespace orxonox {
-  using namespace Ogre;
-
-  InertialNode::InertialNode(SceneNode *node, Vector3 speed)
-        : node_(node), speed_(speed), childListSize_(4), childListIndex_(0),
-        parentNode_(NULL)
-  {
-    childList_ = new InertialNode*[childListSize_];
-  }
-
-
-  InertialNode::InertialNode(orxonox::InertialNode *parentNode, Vector3 speed)
-        : parentNode_(parentNode), childListSize_(4), childListIndex_(0), speed_(speed)
-  {
-    childList_ = new InertialNode*[childListSize_];
-    node_ = parentNode_->getSceneNode()->createChildSceneNode();
-  }
-
-
-  InertialNode::~InertialNode()
-  {
-    if (childList_)
-    {
-      for (int i = 0; i < childListIndex_; i++)
-        if (childList_[i])
-          delete childList_[i];
-      delete childList_;
-    }
-  }
-
-
-  InertialNode* InertialNode::createChildNode()
-  {
-    InertialNode *temp = new InertialNode(this);
-    addChild(temp);
-    return temp;
-  }
-
-
-  InertialNode* InertialNode::getParentNode()
-  {
-    return parentNode_;
-  }
-
-
-  SceneNode* InertialNode::getSceneNode()
-  {
-    return node_;
-  }
-
-
-  Vector3 InertialNode::getSpeed()
-  {
-    return speed_;
-  }
-
-
-  Vector3 InertialNode::getWorldSpeed()
-  {
-    // go through the tree of Inertial nodes
-    Vector3 speed = speed_;
-    InertialNode *temp = parentNode_;
-    while (temp != NULL)
-    {
-      speed = temp->getSceneNode()->getOrientation() * speed + temp->getSpeed();
-      temp = temp->getParentNode();
-    }
-    return speed;
-  }
-
-
-  void InertialNode::addSpeed(Vector3 speed)
-  {
-    speed_ += speed;
-  }
-
-
-  void InertialNode::addChild(orxonox::InertialNode *node)
-  {
-    if (childListIndex_ == childListSize_)
-    {
-      // redimension the array
-      InertialNode **tempArray = new InertialNode*[2*childListSize_];
-      for (int i = 0; i < childListSize_; i++)
-        tempArray[i] = childList_[i];
-      childListSize_ *= 2;
-      delete childList_;
-      childList_ = tempArray;
-    }
-    childList_[childListIndex_++] = node;
-  }
-
-}
Index: code/branches/FICN/src/inertial_node.h
===================================================================
--- code/branches/FICN/src/inertial_node.h	(revision 337)
+++ 	(revision )
@@ -1,77 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-
-#ifndef INERTIAL_NODE_H
-#define INERTIAL_NODE_H
-
-#include "OgrePrerequisites.h"
-
-#include "orxonox_prerequisites.h"
-
-
-namespace orxonox {
-
-  class InertialNode
-  {
-  public:
-    InertialNode(Ogre::SceneNode*, Ogre::Vector3);
-	  ~InertialNode();
-
-    InertialNode* createChildNode();
-
-    InertialNode* getParentNode();
-
-    Ogre::SceneNode* getSceneNode();
-
-    Ogre::Vector3 getSpeed();
-
-    Ogre::Vector3 getWorldSpeed();
-
-    void addSpeed(Ogre::Vector3);
-
-  protected:
-    InertialNode(InertialNode*, Ogre::Vector3 speed = Ogre::Vector3::ZERO);
-    void addChild(InertialNode*);
-
-  public:
-
-  protected:
-    InertialNode **childList_;
-    int childListSize_;
-    int childListIndex_;
-
-    Ogre::SceneNode *node_;
-	  Ogre::Vector3 speed_;
-
-    InertialNode* parentNode_;
-
-  };
-
-}
-
-#endif /* INERTIAL_NODE_H */
Index: code/branches/FICN/src/ogre_control.cc
===================================================================
--- code/branches/FICN/src/ogre_control.cc	(revision 337)
+++ 	(revision )
@@ -1,223 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OgrePlatform.h"
-#include "OgreRoot.h"
-#include "OgreRenderWindow.h"
-#include "OgreString.h"
-#include "OgreConfigFile.h"
-
-#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
-  #include <CoreFoundation/CoreFoundation.h>
-#endif
-
-#include "ogre_control.h"
-
-
-namespace orxonox {
-  using namespace Ogre;
-
-  /**
-  * Ogre control class.
-  * This is merely a convenient way to handle Ogre. It only holds the Root
-  * object and the render Window. These are the objects, that are independant
-  * of the game state (playing, menu browsing, loading, etc.).
-  * This class could easily be merged into the Orxnox class.
-  */
-
-
-  /**
-  * Provide support for mac users.
-  */
-  #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
-  // This function will locate the path to our application on OS X,
-  // unlike windows you can not rely on the curent working directory
-  // for locating your configuration files and resources.
-  std::string macBundlePath()
-  {
-	  char path[1024];
-	  CFBundleRef mainBundle = CFBundleGetMainBundle();
-	  assert(mainBundle);
-
-	  CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle);
-	  assert(mainBundleURL);
-
-	  CFStringRef cfStringRef =
-          CFURLCopyFileSystemPath( mainBundleURL, kCFURLPOSIXPathStyle);
-	  assert(cfStringRef);
-
-	  CFStringGetCString(cfStringRef, path, 1024, kCFStringEncodingASCII);
-
-	  CFRelease(mainBundleURL);
-	  CFRelease(cfStringRef);
-
-	  return std::string(path);
-  }
-  #endif
-
-
-  /**
-  * Constructor that determines the resource path platform dependant.
-  */
-  OgreControl::OgreControl() : root_(0)
-  {
-	  // Provide a nice cross platform solution for locating the configuration
-	  // files. On windows files are searched for in the current working
-    // directory, on OS X however you must provide the full path, the helper
-    // function macBundlePath does this for us.
-  #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
-	  resourcePath_ = macBundlePath() + "/Contents/Resources/";
-  #else
-	  resourcePath_ = "";
-  #endif
-  }
-
-
-  /**
-  * Standard Destructor.
-  */
-  OgreControl::~OgreControl()
-  {
-	  if (root_)
-		  delete root_;
-  }
-
-
-  /* Sets up Ogre.
-  * First, the Root object is being created, then the resources are defined
-  * (not loaded!). And last but not least, the render settings (like resolution
-  * or AA level) are prompted to the user.
-  */
-  bool OgreControl::initialise(void)
-  {
-	  String pluginsPath;
-	  // only use plugins.cfg if not static
-  #ifndef OGRE_STATIC_LIB
-	  pluginsPath = resourcePath_ + "plugins.cfg";
-  #endif
-
-	  root_ = new Root(pluginsPath, 
-		  resourcePath_ + "ogre.cfg", resourcePath_ + "Ogre.log");
-
-	  setupResources();
-
-	  if (!configure())
-		  return false;
-
-	  return true;
-  }
-
-
-  /**
-  * Defines the source of the resources.
-  */
-  void OgreControl::setupResources(void)
-  {
-	  // Load resource paths from config file
-	  ConfigFile cf;
-	  cf.load(resourcePath_ + "resources.cfg");
-
-	  // Go through all sections & settings in the file
-	  ConfigFile::SectionIterator seci = cf.getSectionIterator();
-
-	  String secName, typeName, archName;
-	  while (seci.hasMoreElements())
-	  {
-		  secName = seci.peekNextKey();
-		  ConfigFile::SettingsMultiMap *settings = seci.getNext();
-		  ConfigFile::SettingsMultiMap::iterator i;
-		  for (i = settings->begin(); i != settings->end(); ++i)
-		  {
-			  typeName = i->first;
-			  archName = i->second;
-  #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
-			  // OS X does not set the working directory relative to the app,
-			  // In order to make things portable on OS X we need to provide
-			  // the loading with it's own bundle path location
-			  ResourceGroupManager::getSingleton().addResourceLocation(
-				  String(macBundlePath() + "/" + archName), typeName, secName);
-  #else
-			  ResourceGroupManager::getSingleton().addResourceLocation(
-				  archName, typeName, secName);
-  #endif
-		  }
-	  }
-  }
-
-
-  /**
-  * Prompts a setting window for the render engine if that has not already
-  * been done.
-  * The method also calls the root initialiser in order to get a render window.
-  */
-  bool OgreControl::configure(void)
-  {
-	  // Show the configuration dialog and initialise the system
-	  // You can skip this and use root.restoreConfig() to load configuration
-	  // settings if you were sure there are valid ones saved in ogre.cfg
-	  if(!root_->restoreConfig() && !root_->showConfigDialog())
-		  return false;
-
-	  // user clicked OK so initialise
-	  // Here we choose to let the system create a default
-    // rendering window by passing 'true'
-	  root_->saveConfig();
-	  window_ = root_->initialise(true);
-	  return true;
-  }
-
-
-  /**
-  * Returns the root object.
-  * @return Root object.
-  */
-  Root* OgreControl::getRoot(void)
-  {
-	  return root_;
-  }
-
-
-  /**
-  * Returns the render window.
-  * @return Render window.
-  */
-  RenderWindow* OgreControl::getRenderWindow(void)
-  {
-	  return window_;
-  }
-
-
-  /**
-  * Returns the resource path.
-  * @return Resource path.
-  */
-  Ogre::String OgreControl::getResourcePath(void)
-  {
-	  return resourcePath_;
-  }
-
-}
Index: code/branches/FICN/src/ogre_control.h
===================================================================
--- code/branches/FICN/src/ogre_control.h	(revision 337)
+++ 	(revision )
@@ -1,71 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-
-#ifndef OGRE_CONTROL_H
-#define OGRE_CONTROL_H
-
-#include "OgrePrerequisites.h"
-
-#include "orxonox_prerequisites.h"
-
-
-namespace orxonox {
-
-  class OgreControl
-  {
-  public:
-	  OgreControl();
-
-	  virtual ~OgreControl();
-
-	  /** Sets up the application - returns false if the user chooses to abandon configuration. */
-	  virtual bool initialise();
-
-    virtual Ogre::Root* getRoot();
-
-	  virtual Ogre::RenderWindow* getRenderWindow();
-
-	  virtual Ogre::String getResourcePath();
-
-  protected:
-	  /** Configures the application - returns false if the user chooses to abandon configuration. */
-	  virtual bool configure(void);
-
-	  /// Method which will define the source of resources (other than current folder)
-	  virtual void setupResources(void);
-
-  protected:
-	  Ogre::Root         *root_;
-	  Ogre::RenderWindow *window_;
-	  Ogre::String  resourcePath_;
-
-  };
-
-}
-
-#endif /* OGRE_CONTROL_H */
Index: code/branches/FICN/src/orxonox.h
===================================================================
--- code/branches/FICN/src/orxonox.h	(revision 337)
+++ 	(revision )
@@ -1,59 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-
-#ifndef ORXONOX_H
-#define ORXONOX_H
-
-#include "OgrePrerequisites.h"
-
-#include "orxonox_prerequisites.h"
-
-namespace orxonox {
-
-  class Orxonox
-  {
-  public:
-    Orxonox();
-    virtual ~Orxonox();
-	  virtual void go();
-
-  protected:
-	  virtual bool setup(void);
-
-	  virtual void destroy(void);
-
-  protected:
-	  OgreControl *ogre_;
-	  RunManager  *runMgr_;
-	  Ogre::Timer *timer_;
-
-  };
-
-}
-
-#endif /* ORXONOX_H */
Index: code/branches/FICN/src/orxonox/Flocking.h
===================================================================
--- code/branches/FICN/src/orxonox/Flocking.h	(revision 340)
+++ code/branches/FICN/src/orxonox/Flocking.h	(revision 340)
@@ -0,0 +1,143 @@
+//
+//
+//      TODO: testing orxonox -flocking interface
+//            testing algorithm
+
+// ueberpruefen ob vektoren relativ richtig berechnet werden
+//
+//My Flocking Class
+
+#ifndef Flocking_Class
+#define Flocking_Class
+
+#include <Ogre.h>
+#include <OgreVector3.h>
+
+#include <iostream>
+
+
+#endif
+
+using namespace std;
+using namespace Ogre;
+
+class Element // An element that flocks
+{
+
+  public:
+    Vector3 location;  // locationvector of the element
+    Vector3 speed;  // speedvector of the element
+    Vector3 acceleration;  // accelerationvector of the element
+
+  Element() {
+    acceleration = (0,0,0);
+    speed = (0,0,0);
+    location = (0,0,0);
+  }
+
+  Element(Vector3 location_, Vector3 speed_, Vector3 acceleration_) {
+    acceleration = acceleration_;
+    speed = speed_;
+    location = location_;
+  }
+
+  void setValues(Vector3 location_, Vector3 speed_, Vector3 acceleration_) {
+    acceleration = acceleration_;
+    speed = speed_;
+    location = location_;
+  }
+
+  //calculates the distance between the element and an other point given by temp
+  float getDistance(Element temp) {
+    Vector3 distance = temp.location-location;  //this doesn't work
+    return distance.length();
+  }
+
+//EINF[GEN DES ELEMENTS
+  void update(Element arrayOfElements[], const FrameEvent& time) {
+    calculateAcceleration(arrayOfElements);  //updates the acceleration
+    calculateSpeed(time);  //updates the speed
+    calculateLocation(time);  //updates the location
+  }
+
+//EINF[GEN DES ELEMENTS
+  void calculateAcceleration(Element arrayOfElements[]) {
+  //calculates the accelerationvector based on the steeringvectors of
+  //separtion, alignment and cohesion.
+  acceleration = separation(arrayOfElements) + alignment(arrayOfElements) + cohesion(arrayOfElements);
+  }
+
+  void calculateSpeed(const FrameEvent& time) {
+    speed = speed + acceleration*time.timeSinceLastFrame;
+  }
+
+  void calculateLocation(const FrameEvent& time) {
+    location = location + speed*time.timeSinceLastFrame;
+  }
+
+
+  Vector3 separation(Element arrayOfElements[]) {
+    Vector3* steering = new Vector3(0,0,0); //steeringvector
+    int numberOfNeighbour = 0;  //number of observed neighbours
+    //go through all elements
+    for(int i=0; i<3; i++) {  //just working with 3 elements at the moment
+      Element actual = arrayOfElements[i];  //get the actual element
+      float distance = getDistance(actual);  //get distance between this and actual
+//DUMMY SEPERATION DETECTION DISTANCE =100
+      if ((distance > 0) && (distance<100)) {  //do only if actual is inside detectionradius
+        Vector3 inverseDistance = actual.location-location;  //calculate the distancevector heading towards this
+        inverseDistance = inverseDistance.normalise(); //does this work correctly?  //normalise the distancevector
+        inverseDistance = inverseDistance/*/distance*/;  //devide distancevector by distance (the closer the bigger gets the distancevector -> steeringvector)
+        *steering = *steering + inverseDistance;  //add up all significant steeringvectors
+        numberOfNeighbour++;  //counts the elements inside the detectionradius
+      }
+    }
+    if(numberOfNeighbour > 0) {
+    *steering = *steering / (float)numberOfNeighbour;  //devide the sum of steeringvectors by the number of elements -> separation steeringvector
+    }
+    return *steering;
+  }
+
+  Vector3 alignment(Element arrayOfElements[]) {
+    Vector3* steering = new Vector3(0,0,0); //steeringvector
+    int numberOfNeighbour = 0;  //number of observed neighbours
+    //go through all elements
+    for(int i=0; i<3; i++) {  //just working with 3 elements at the moment
+      Element actual = arrayOfElements[i];  //get the actual element
+      float distance = getDistance(actual);  //get distance between this and actual
+//DUMMY ALIGNMENT DETECTION DISTANCE = 1000
+      if ((distance > 0) && (distance<1000)) {  //check if actual element is inside detectionradius
+        *steering = *steering + actual.speed;  //add up all speedvectors inside the detectionradius
+        numberOfNeighbour++;  //counts the elements inside the detectionradius
+      }
+    }
+    if(numberOfNeighbour > 0) {
+    *steering = *steering / (float)numberOfNeighbour;  //devide the sum of steeringvectors by the number of elements -> alignment steeringvector
+    }
+    return *steering;
+  }
+
+  Vector3 cohesion(Element arrayOfElements[]) {
+    Vector3* steering = new Vector3(0,0,0); //steeringvector
+    int numberOfNeighbour = 0;  //number of observed neighbours
+    //go through all elements
+    for(int i=0; i<3; i++) {  //just working with 3 elements at the moment
+      Element actual = arrayOfElements[i];  //get the actual element
+      float distance = getDistance(actual);  //get distance between this and actual
+// DUMMY COHESION DETECTION DISTANCE = 1000
+      if ((distance > 0) && (distance<1000)) {  //check if actual element is inside detectionradius
+        *steering = *steering + actual.location;  //add up all locations of elements inside the detectionradius
+        numberOfNeighbour++;  //counts the elements inside the detectionradius
+      }
+     }
+    if(numberOfNeighbour > 0) {
+    *steering = *steering  / (float)numberOfNeighbour;  //devide the sum steeringvector by the number of elements -> cohesion steeringvector
+    }
+    return *steering;
+  }
+ 
+};
+
+
+
+//End of My Flocking Class
Index: code/branches/FICN/src/orxonox/hud/hud_overlay.h
===================================================================
--- code/branches/FICN/src/orxonox/hud/hud_overlay.h	(revision 337)
+++ code/branches/FICN/src/orxonox/hud/hud_overlay.h	(revision 340)
@@ -33,5 +33,5 @@
 #include "OgrePrerequisites.h"
 
-#include "orxonox_prerequisites.h"
+#include "../orxonox_prerequisites.h"
 
 
Index: code/branches/FICN/src/orxonox/hud/test_overlay.h
===================================================================
--- code/branches/FICN/src/orxonox/hud/test_overlay.h	(revision 337)
+++ code/branches/FICN/src/orxonox/hud/test_overlay.h	(revision 340)
@@ -33,5 +33,5 @@
 #include "OgrePrerequisites.h"
 
-#include "orxonox_prerequisites.h"
+#include "../orxonox_prerequisites.h"
 
 
Index: code/branches/FICN/src/orxonox/inertial_node.h
===================================================================
--- code/branches/FICN/src/orxonox/inertial_node.h	(revision 340)
+++ code/branches/FICN/src/orxonox/inertial_node.h	(revision 340)
@@ -0,0 +1,77 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef INERTIAL_NODE_H
+#define INERTIAL_NODE_H
+
+#include "OgrePrerequisites.h"
+
+#include "orxonox_prerequisites.h"
+
+
+namespace orxonox {
+
+  class InertialNode
+  {
+  public:
+    InertialNode(Ogre::SceneNode*, Ogre::Vector3);
+	  ~InertialNode();
+
+    InertialNode* createChildNode();
+
+    InertialNode* getParentNode();
+
+    Ogre::SceneNode* getSceneNode();
+
+    Ogre::Vector3 getSpeed();
+
+    Ogre::Vector3 getWorldSpeed();
+
+    void addSpeed(Ogre::Vector3);
+
+  protected:
+    InertialNode(InertialNode*, Ogre::Vector3 speed = Ogre::Vector3::ZERO);
+    void addChild(InertialNode*);
+
+  public:
+
+  protected:
+    InertialNode **childList_;
+    int childListSize_;
+    int childListIndex_;
+
+    Ogre::SceneNode *node_;
+	  Ogre::Vector3 speed_;
+
+    InertialNode* parentNode_;
+
+  };
+
+}
+
+#endif /* INERTIAL_NODE_H */
Index: code/branches/FICN/src/orxonox/ogre_control.h
===================================================================
--- code/branches/FICN/src/orxonox/ogre_control.h	(revision 340)
+++ code/branches/FICN/src/orxonox/ogre_control.h	(revision 340)
@@ -0,0 +1,71 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef OGRE_CONTROL_H
+#define OGRE_CONTROL_H
+
+#include "OgrePrerequisites.h"
+
+#include "orxonox_prerequisites.h"
+
+
+namespace orxonox {
+
+  class OgreControl
+  {
+  public:
+	  OgreControl();
+
+	  virtual ~OgreControl();
+
+	  /** Sets up the application - returns false if the user chooses to abandon configuration. */
+	  virtual bool initialise();
+
+    virtual Ogre::Root* getRoot();
+
+	  virtual Ogre::RenderWindow* getRenderWindow();
+
+	  virtual Ogre::String getResourcePath();
+
+  protected:
+	  /** Configures the application - returns false if the user chooses to abandon configuration. */
+	  virtual bool configure(void);
+
+	  /// Method which will define the source of resources (other than current folder)
+	  virtual void setupResources(void);
+
+  protected:
+	  Ogre::Root         *root_;
+	  Ogre::RenderWindow *window_;
+	  Ogre::String  resourcePath_;
+
+  };
+
+}
+
+#endif /* OGRE_CONTROL_H */
Index: code/branches/FICN/src/orxonox/orxonox.cc
===================================================================
--- code/branches/FICN/src/orxonox/orxonox.cc	(revision 337)
+++ code/branches/FICN/src/orxonox/orxonox.cc	(revision 340)
@@ -42,6 +42,11 @@
 #include "loader/LevelLoader.h"
 
+#include "orxonox.h"
+
+#include "Flocking.h"
+
 #include "spaceship_steering.h"
 SpaceshipSteering* steering;
+
 
 
Index: code/branches/FICN/src/orxonox/orxonox.h
===================================================================
--- code/branches/FICN/src/orxonox/orxonox.h	(revision 340)
+++ code/branches/FICN/src/orxonox/orxonox.h	(revision 340)
@@ -0,0 +1,59 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef ORXONOX_H
+#define ORXONOX_H
+
+#include "OgrePrerequisites.h"
+
+#include "orxonox_prerequisites.h"
+
+namespace orxonox {
+
+  class Orxonox
+  {
+  public:
+    Orxonox();
+    virtual ~Orxonox();
+	  virtual void go();
+
+  protected:
+	  virtual bool setup(void);
+
+	  virtual void destroy(void);
+
+  protected:
+	  OgreControl *ogre_;
+	  RunManager  *runMgr_;
+	  Ogre::Timer *timer_;
+
+  };
+
+}
+
+#endif /* ORXONOX_H */
Index: code/branches/FICN/src/orxonox/orxonox_prerequisites.h
===================================================================
--- code/branches/FICN/src/orxonox/orxonox_prerequisites.h	(revision 340)
+++ code/branches/FICN/src/orxonox/orxonox_prerequisites.h	(revision 340)
@@ -0,0 +1,64 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef ORXONOX_PREREQUISITES_H
+#define ORXONOX_PREREQUISITES_H
+
+namespace orxonox {
+
+  class CameraManager;
+  class InertialNode;
+  class OgreControl;
+  class Orxonox;
+  class OrxonoxShip;
+  class OrxonoxScene;
+  class RunManager;
+
+
+  namespace weapon {
+
+    class AmmunitionDump;
+    class Bullet;
+    class BulletManager;
+    class BaseWeapon;
+    class BarrelGun;
+    class WeaponStation;
+
+  }
+
+
+  namespace hud {
+    
+    class HUDOverlay;
+    class TestOverlay;
+
+  }
+
+}
+
+#endif /* ORXONOX_PREREQUISITES_H */
Index: code/branches/FICN/src/orxonox/orxonox_scene.h
===================================================================
--- code/branches/FICN/src/orxonox/orxonox_scene.h	(revision 340)
+++ code/branches/FICN/src/orxonox/orxonox_scene.h	(revision 340)
@@ -0,0 +1,70 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef ORXONOX_SCENE_H
+#define ORXONOX_SCENE_H
+
+#include "OgrePrerequisites.h"
+
+#include "orxonox_prerequisites.h"
+
+
+namespace orxonox {
+
+  class OrxonoxScene
+  {
+  public:
+    OrxonoxScene(Ogre::SceneManager*);
+
+	  virtual ~OrxonoxScene();
+
+	  virtual bool initialise();
+
+	  virtual bool tick(unsigned long, Ogre::Real);
+
+  protected:
+	  /// method where you can perform resource group loading
+	  virtual void loadResources();
+
+	  /// Define what is in the scene
+	  virtual void createScene();
+
+  protected:
+	  Ogre::SceneManager* sceneMgr_;
+
+	  //specific variables for test purposes
+	  Ogre::Light        *light_;
+	  Ogre::SceneNode    *lightNode_;
+	  Ogre::BillboardSet *bbs_;
+	  Ogre::Real distance_;
+    Ogre::Real radius_;
+  };
+
+}
+
+#endif /* ORXONOX_SCENE_H */
Index: code/branches/FICN/src/orxonox/orxonox_ship.h
===================================================================
--- code/branches/FICN/src/orxonox/orxonox_ship.h	(revision 340)
+++ code/branches/FICN/src/orxonox/orxonox_ship.h	(revision 340)
@@ -0,0 +1,86 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef ORXONOX_SHIP_H
+#define ORXONOX_SHIP_H
+
+#include "OgrePrerequisites.h"
+
+#include "orxonox_prerequisites.h"
+
+
+namespace orxonox {
+
+  class OrxonoxShip
+  {
+  public:
+    OrxonoxShip(Ogre::SceneNode*);
+	  virtual ~OrxonoxShip();
+
+	  virtual bool initialise();
+
+	  void setMainThrust(const Ogre::Real);
+	  void setSideThrust(const Ogre::Real);
+    void setYThrust(const Ogre::Real);
+	  void turnUpAndDown(const Ogre::Radian&);
+	  void turnLeftAndRight(const Ogre::Radian&);
+
+    InertialNode* getRootNode();
+    Ogre::Vector3 getSpeed();
+
+    weapon::BaseWeapon* getMainWeapon();
+
+    int getAmmoStock();
+
+	  bool tick(unsigned long, Ogre::Real);
+
+  protected:
+
+  protected:
+	  Ogre::SceneManager *sceneMgr_;
+	  //Ogre::SceneNode *rootNode_;
+    InertialNode *rootNode_;
+	  Ogre::Entity *shipEntity_;
+
+	  //Ogre::Vector3 currentSpeed_;  // relative to space
+	  Ogre::Vector3 currentThrust_; // relative to the ship
+    Ogre::Real baseThrust_;
+	  int objectCounter_;
+
+    weapon::BulletManager *bulletManager_;
+	  //Ogre::Vector3 bulletSpeed_;
+
+    weapon::BaseWeapon *mainWeapon_;
+    weapon::WeaponStation *railGunStation_;
+
+    weapon::AmmunitionDump *ammoDump_;
+  };
+
+}
+
+#endif /* ORXONOX_SHIP_H */
Index: code/branches/FICN/src/orxonox/run_manager.h
===================================================================
--- code/branches/FICN/src/orxonox/run_manager.h	(revision 340)
+++ code/branches/FICN/src/orxonox/run_manager.h	(revision 340)
@@ -0,0 +1,142 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef RUN_MANAGER_H
+#define RUN_MANAGER_H
+
+#include "OgrePrerequisites.h"
+#include "OgreWindowEventUtilities.h"
+//#include "OgreTextureManager.h"
+
+#include <OIS/OISPrereqs.h>
+
+#include "orxonox_prerequisites.h"
+
+
+namespace orxonox {
+
+  // let the class inherit from WindowEventListener in order for the RunMgr
+  // to act as the central point of all the calcuations in Orxonox
+  class RunManager : public Ogre::WindowEventListener
+  {
+  public:
+    virtual ~RunManager();
+    
+    void initialise(OgreControl*);
+
+    bool tick(unsigned long, Ogre::Real);
+
+    Ogre::SceneManager& getSceneManager();
+
+    Ogre::SceneManager* getSceneManagerPtr();
+
+    weapon::BulletManager* getBulletManagerPtr();
+
+    int getAmmunitionID(const Ogre::String&);
+
+    int getNumberOfAmmos();
+
+    static RunManager* createSingleton();
+
+    static void destroySingleton();
+
+    static RunManager& getSingleton(void);
+
+    static RunManager* getSingletonPtr(void);
+
+
+  protected:
+    RunManager();
+
+	  void createCamera(void);
+
+	  void createViewports(void);
+
+
+	  /** EVENT HANDLING **/
+
+	  //Adjust mouse clipping area
+	  void windowResized(Ogre::RenderWindow*);
+
+	  //Unattach OIS before window shutdown (very important under Linux)
+	  void windowClosed(Ogre::RenderWindow*);
+
+
+	  /** INPUT PROCESSING **/
+	  bool processUnbufferedKeyInput();
+
+	  bool processUnbufferedMouseInput();
+
+
+	  /** OUTPUT **/
+
+	  void showDebugOverlay(bool);
+
+  protected:
+    // directly Ogre related fields
+	  Ogre::SceneManager *sceneMgr_;
+	  Ogre::RenderWindow *window_;
+	  Ogre::Camera       *camera_;
+
+
+    // self made orxonox fields
+	  OgreControl  *ogre_;
+	  OrxonoxScene *backgroundScene_;
+	  OrxonoxShip  *playerShip_;
+    hud::TestOverlay *hud_;
+
+    // Bullet manager
+    weapon::BulletManager *bulletManager_;
+
+    const Ogre::Real mouseSensitivity_;
+
+	  // previously elapsed render time
+	  unsigned long totalTime_;
+
+
+    // fields from the example framework
+	  bool statsOn_;
+
+	  unsigned int screenShotCounter_;
+	  // just to stop toggles flipping too fast
+	  Ogre::Real timeUntilNextToggle_;
+
+	  //OIS Input devices
+	  OIS::InputManager* inputManager_;
+	  OIS::Mouse*    mouse_;
+	  OIS::Keyboard* keyboard_;
+	  OIS::JoyStick* joystick_;
+
+    // singleton pointer
+    static RunManager *singletonPtr_s;
+
+  };
+
+}
+
+#endif /* RUN_MANAGER_H */
Index: code/branches/FICN/src/orxonox_prerequisites.h
===================================================================
--- code/branches/FICN/src/orxonox_prerequisites.h	(revision 337)
+++ 	(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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-
-#ifndef ORXONOX_PREREQUISITES_H
-#define ORXONOX_PREREQUISITES_H
-
-namespace orxonox {
-
-  class CameraManager;
-  class InertialNode;
-  class OgreControl;
-  class Orxonox;
-  class OrxonoxShip;
-  class OrxonoxScene;
-  class RunManager;
-
-
-  namespace weapon {
-
-    class AmmunitionDump;
-    class Bullet;
-    class BulletManager;
-    class BaseWeapon;
-    class BarrelGun;
-    class WeaponStation;
-
-  }
-
-
-  namespace hud {
-    
-    class HUDOverlay;
-    class TestOverlay;
-
-  }
-
-}
-
-#endif /* ORXONOX_PREREQUISITES_H */
Index: code/branches/FICN/src/orxonox_scene.cc
===================================================================
--- code/branches/FICN/src/orxonox_scene.cc	(revision 337)
+++ 	(revision )
@@ -1,155 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OgreSceneManager.h"
-#include "OgreSceneNode.h"
-#include "OgreEntity.h"
-#include "OgreLight.h"
-#include "OgreBillboard.h"
-#include "OgreBillboardSet.h"
-#include "OgreVector3.h"
-
-#include "orxonox_scene.h"
-
-namespace orxonox {
-  using namespace Ogre;
-
-  /**
-  * The orxonox scene includes everything running in the background like terrain,
-  * static figures, dangling lamp, etc.
-  */
-
-
-  /**
-  * Empty Consructor except the initialiser list.
-  * @param sceneMgr The Scene Manager.
-  */
-  OrxonoxScene::OrxonoxScene(SceneManager *sceneMgr) : sceneMgr_(sceneMgr)
-  {
-  }
-
-  /**
-  * Empty Destructor.
-  */
-  OrxonoxScene::~OrxonoxScene()
-  {
-  }
-
-  /**
-  * Ogre initialisation method.
-  * This function is called by the Run Manager to load the neccessary recources
-  * and to create the scene.
-  * @return False if failed.
-  */
-  bool OrxonoxScene::initialise()
-  {
-	  // Load resources
-	  loadResources();
-
-	  distance_ = 0;
-	  radius_ = 100;
-
-	  createScene();
-
-	  return true;
-  }
-
-
-  /**
-  * Resource loader.
-  * Currently, this method loads everything! TODO: If done this ugly, it should
-  * at least be in the Run Manager.
-  */
-  void OrxonoxScene::loadResources()
-  {
-	  // Initialise, parse scripts etc
-	  ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
-  }
-
-
-  /**
-  * Scene creation.
-  * Currently just a test scene with an ogre head an a surrounding light.
-  */
-  void OrxonoxScene::createScene()
-  {
-	  sceneMgr_->setAmbientLight(ColourValue(0.3,0.3,0.3)*2);
-
-	  //create first entity
-	  Entity *head = sceneMgr_->createEntity("head", "ogrehead.mesh");
-
-	  //create a scene node to attach the head to
-	  SceneNode *node = sceneMgr_->getRootSceneNode()
-          ->createChildSceneNode("OgreHeadNode", Vector3(0,0,0));
-	  //attach the ogre head
-	  node->attachObject(head);
-
-	  // set up skybox
-	  sceneMgr_->setSkyBox(true, "Examples/SceneSkyBox1");
-
-	  // set up one light_ source
-	  light_ = sceneMgr_->createLight("Light1");
-	  light_->setType(Light::LT_POINT);
-	  light_->setPosition(Vector3(0, 0, 0));
-	  light_->setDiffuseColour(1.0, 1.0, 1.0);
-	  light_->setSpecularColour(1.0, 1.0, 1.0);
-
-	  //create billboard
-	  bbs_ = sceneMgr_->createBillboardSet("bb", 1);
-	  bbs_->createBillboard(Vector3::ZERO, ColourValue(1.0, 1.0, 1.0));
-	  bbs_->setMaterialName("Examples/Flare");
-
-	  lightNode_ = sceneMgr_->getRootSceneNode()
-          ->createChildSceneNode("lightNode_", Vector3(0, 100, 0));
-
-	  lightNode_->attachObject(bbs_);
-	  lightNode_->attachObject(light_);
-  }
-
-
-  /**
-  * Compute something between frames if neccessary.
-  * @param time Absolute time.
-  * @param deltaTime Relative time.
-  * @return Return true to continue rendering.
-  */
-  bool OrxonoxScene::tick(unsigned long time, Real deltaTime)
-  {
-	  Real t = time/1000.0;
-
-	  lightNode_->setPosition(radius_*sin(5*t), radius_*cos(5*t), sin(1*t)*distance_);
-  	
-	  light_->setDiffuseColour(sin(1*t), sin(1*t + 2.09), sin(1*t + 2.09*2));
-	  light_->setSpecularColour(sin(1*t), sin(1*t + 2.09), sin(1*t + 2.09*2));
-
-	  bbs_->getBillboard(0)->setColour(ColourValue(sin(1*t),
-          sin(1*t + 2.09), sin(1*t + 2.09*2)));
-    
-    return true;
-  }
-
-}
Index: code/branches/FICN/src/orxonox_scene.h
===================================================================
--- code/branches/FICN/src/orxonox_scene.h	(revision 337)
+++ 	(revision )
@@ -1,70 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-
-#ifndef ORXONOX_SCENE_H
-#define ORXONOX_SCENE_H
-
-#include "OgrePrerequisites.h"
-
-#include "orxonox_prerequisites.h"
-
-
-namespace orxonox {
-
-  class OrxonoxScene
-  {
-  public:
-    OrxonoxScene(Ogre::SceneManager*);
-
-	  virtual ~OrxonoxScene();
-
-	  virtual bool initialise();
-
-	  virtual bool tick(unsigned long, Ogre::Real);
-
-  protected:
-	  /// method where you can perform resource group loading
-	  virtual void loadResources();
-
-	  /// Define what is in the scene
-	  virtual void createScene();
-
-  protected:
-	  Ogre::SceneManager* sceneMgr_;
-
-	  //specific variables for test purposes
-	  Ogre::Light        *light_;
-	  Ogre::SceneNode    *lightNode_;
-	  Ogre::BillboardSet *bbs_;
-	  Ogre::Real distance_;
-    Ogre::Real radius_;
-  };
-
-}
-
-#endif /* ORXONOX_SCENE_H */
Index: code/branches/FICN/src/orxonox_ship.cc
===================================================================
--- code/branches/FICN/src/orxonox_ship.cc	(revision 337)
+++ 	(revision )
@@ -1,254 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OgreMath.h"
-#include "OgreVector3.h"
-#include "OgreQuaternion.h"
-#include "OgreSceneNode.h"
-#include "OgreEntity.h"
-#include "OgreSceneManager.h"
-#include "OgreParticleSystem.h"
-
-#include "inertial_node.h"
-#include "run_manager.h"
-#include "weapon/bullet.h"
-#include "weapon/bullet_manager.h"
-#include "weapon/weapon_station.h"
-#include "weapon/base_weapon.h"
-#include "weapon/barrel_gun.h"
-#include "weapon/ammunition_dump.h"
-
-#include "orxonox_ship.h"
-
-
-namespace orxonox {
-  using namespace Ogre;
-  using namespace weapon;
-
-  /**
-  * Base class for any kind of flyable ship in Orxonox.
-  * 
-  * The ship offers steering methods (like left, right, etc.) and translates
-  * them into movement. A ship can also hold more than one weapons (where each
-  * of these can be replaced during the game). This means that a ship can have
-  * many WeaponManagers but only one MunitionManager (independant object that
-  * is referenced in each WeaponManager).
-  * Furthermore a ship in Orxonox is responsible for its visualization, which is
-  * why it receives a pointer to the SceneManager.
-  */
-
-
-  /**
-  * Standard constructor, that only initalizes a few variables. Some of them
-  * could be made static, since any new ship would be derived from the BaseShip.
-  * Or even better: write config files for each ship so that manipulating
-  * its properties would be even easier.
-  * @param mSceneMgr The current main SceneManager
-  * @param mNode The scene node which the ship will be attached to later.
-  */
-  OrxonoxShip::OrxonoxShip(SceneNode *node)
-    : sceneMgr_(RunManager::getSingletonPtr()->getSceneManagerPtr()),
-      bulletManager_(RunManager::getSingletonPtr()->getBulletManagerPtr()),
-      baseThrust_(1000), currentThrust_(Vector3::ZERO), objectCounter_(0)
-  {
-    rootNode_ = new InertialNode(node, Vector3::ZERO);
-  }
-
-
-  /**
-  * Standard destructor.
-  * Doesn't have any work to do yet.
-  */
-  OrxonoxShip::~OrxonoxShip()
-  {
-    if (mainWeapon_)
-      delete mainWeapon_;
-    if (railGunStation_)
-      delete railGunStation_;
-    if (rootNode_)
-      delete rootNode_;
-  }
-
-
-  /**
-  * Initialises everything.
-  * Once that ResourceGroups are organised, this method loads them.
-  * It might be an idea to make this function static in order for the
-  * SceneManger to call the initialise method of every needed class (macros..)
-  * @return Returns false when failed.
-  */
-  bool OrxonoxShip::initialise()
-  {
-	  // load all the resources needed (no resource groups yet,
-    // so the allInit is not executed!)
-	  // ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
-
-	  // create the "space ship" (currently a fish..)
-	  // TODO: names must be unique! use static variables..
-	  shipEntity_ = sceneMgr_->createEntity("Ship", "fish.mesh");
-	  InertialNode *fishNode = rootNode_->createChildNode();
-    fishNode->getSceneNode()->yaw(Degree(-90));
-	  fishNode->getSceneNode()->attachObject(shipEntity_);
-	  fishNode->getSceneNode()->setScale(Vector3(10, 10, 10));
-
-    // initialise weapon(s)
-    ammoDump_ = new AmmunitionDump();
-    ammoDump_->setDumpSize("Barrel", 1000);
-    ammoDump_->store("Barrel", 420);
-
-    InertialNode *mainWeaponNode = rootNode_->createChildNode();
-    mainWeapon_ = new BarrelGun(mainWeaponNode, ammoDump_);
-
-    railGunStation_ = new WeaponStation(4);
-    railGunStation_->addWeapon(mainWeapon_);
-    railGunStation_->selectWeapon(0);
-
-    // create some nice effects
-
-    ParticleSystem *particles = RunManager::getSingletonPtr()
-      ->getSceneManagerPtr()->createParticleSystem("asdf", "Examples/Smoke");
-
-    fishNode->getSceneNode()->attachObject(particles);
-
-
-
-
-	  return true;
-  }
-
-
-  /**
-  * Gets the ship to accelerate in the current direction.
-  * The value should be between 0 and 1, with one beeing full thrust and 0 none
-  * @param value Acceleration between 0 and 1
-  */
-  void OrxonoxShip::setMainThrust(const Real value)
-  {
-    currentThrust_.z = value * baseThrust_;
-  }
-
-
-  /**
-  * Gets the ship to accelerate sideways regarding the current direction.
-  * The value should be between 0 and 1, with one beeing full thrust and 0 none
-  * @param value Acceleration between 0 and 1
-  */
-  void OrxonoxShip::setSideThrust(const Real value)
-  {
-    currentThrust_.x = value * baseThrust_;
-  }
-
-
-  /**
-  * Gets the ship to accelerate up and down.
-  * The value should be between 0 and 1, with one beeing full thrust and 0 none
-  * @param value Acceleration between 0 and 1
-  */
-  void OrxonoxShip::setYThrust(const Real value)
-  {
-    currentThrust_.y = value * baseThrust_;
-  }
-
-
-  /**
-  * Rotate the ship along with the camera up and down.
-  * @param angle Pitch value.
-  */
-  void OrxonoxShip::turnUpAndDown(const Radian &angle)
-  {
-    rootNode_->getSceneNode()->pitch(-angle, Node::TS_LOCAL);
-  }
-
-
-  /**
-  * Rotate the ship along with the camera left and right.
-  * @param angle Yaw value.
-  */
-  void OrxonoxShip::turnLeftAndRight(const Radian &angle)
-  {
-    rootNode_->getSceneNode()->yaw(-angle, Node::TS_PARENT);
-  }
-
-
-  /**
-  * Returns the current speed of the ship according to its parent node.
-  * @return The current speed.
-  */
-  Vector3 OrxonoxShip::getSpeed()
-  {
-    return rootNode_->getSpeed();
-  }
-
-  /**
-  * Returns the ship's root SceneNode.
-  * @return The Root Node.
-  */
-  InertialNode* OrxonoxShip::getRootNode()
-  {
-    return rootNode_;
-  }
-
-
-  /**
-  * Fire a bullet (Entity with SceneNode).
-  * This method creates a new Entity plus a SceneNode. But be sure not make
-  * the new Node a child of RootNode_!
-  * @return Bullet containing speed and entity.
-  */
-  BaseWeapon* OrxonoxShip::getMainWeapon()
-  {
-    return mainWeapon_;
-  }
-
-
-  int OrxonoxShip::getAmmoStock()
-  {
-    return ammoDump_->getStockSize("Barrel");
-  }
-
-
-  /**
-  * Standard tick() function.
-  * Currently, only the speed is applied according to the thrust values.
-  * @param time Absolute time.
-  * @param deltaTime Relative time.
-  * @return Return true to continue render
-  */
-  bool OrxonoxShip::tick(unsigned long time, Real deltaTime)
-  {
-    mainWeapon_->tick(time, deltaTime);
-
-    Quaternion quad = rootNode_->getSceneNode()->getOrientation();
-    quad.normalise();
-    rootNode_->addSpeed(quad * (Vector3(-1, -1, -1) * currentThrust_) * deltaTime);
-
-    rootNode_->getSceneNode()->translate(rootNode_->getSpeed() * deltaTime);
-
-	  return true;
-  }
-
-}
Index: code/branches/FICN/src/orxonox_ship.h
===================================================================
--- code/branches/FICN/src/orxonox_ship.h	(revision 337)
+++ 	(revision )
@@ -1,86 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-
-#ifndef ORXONOX_SHIP_H
-#define ORXONOX_SHIP_H
-
-#include "OgrePrerequisites.h"
-
-#include "orxonox_prerequisites.h"
-
-
-namespace orxonox {
-
-  class OrxonoxShip
-  {
-  public:
-    OrxonoxShip(Ogre::SceneNode*);
-	  virtual ~OrxonoxShip();
-
-	  virtual bool initialise();
-
-	  void setMainThrust(const Ogre::Real);
-	  void setSideThrust(const Ogre::Real);
-    void setYThrust(const Ogre::Real);
-	  void turnUpAndDown(const Ogre::Radian&);
-	  void turnLeftAndRight(const Ogre::Radian&);
-
-    InertialNode* getRootNode();
-    Ogre::Vector3 getSpeed();
-
-    weapon::BaseWeapon* getMainWeapon();
-
-    int getAmmoStock();
-
-	  bool tick(unsigned long, Ogre::Real);
-
-  protected:
-
-  protected:
-	  Ogre::SceneManager *sceneMgr_;
-	  //Ogre::SceneNode *rootNode_;
-    InertialNode *rootNode_;
-	  Ogre::Entity *shipEntity_;
-
-	  //Ogre::Vector3 currentSpeed_;  // relative to space
-	  Ogre::Vector3 currentThrust_; // relative to the ship
-    Ogre::Real baseThrust_;
-	  int objectCounter_;
-
-    weapon::BulletManager *bulletManager_;
-	  //Ogre::Vector3 bulletSpeed_;
-
-    weapon::BaseWeapon *mainWeapon_;
-    weapon::WeaponStation *railGunStation_;
-
-    weapon::AmmunitionDump *ammoDump_;
-  };
-
-}
-
-#endif /* ORXONOX_SHIP_H */
Index: code/branches/FICN/src/run_manager.cc
===================================================================
--- code/branches/FICN/src/run_manager.cc	(revision 337)
+++ 	(revision )
@@ -1,512 +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:
-*      Reto Grieder
-*   Co-authors:
-*      ...
-*/
-
-
-#include "OgreVector3.h"
-#include "OgreStringConverter.h"
-#include "OgreRoot.h"
-#include "OgreSceneManager.h"
-#include "OgreSceneNode.h"
-#include "OgreCamera.h"
-#include "OgreViewport.h"
-#include "OgreRenderWindow.h"
-#include "OgreTextureManager.h"
-#include "OgreMaterialManager.h"
-#include "OgreLogManager.h"
-#include "OgreWindowEventUtilities.h"
-
-//Use this define to signify OIS will be used as a DLL
-//(so that dll import/export macros are in effect)
-#define OIS_DYNAMIC_LIB
-#include <OIS/OIS.h>
-
-#include "ogre_control.h"
-#include "orxonox_scene.h"
-#include "orxonox_ship.h"
-#include "inertial_node.h"
-
-#include "weapon/bullet.h"
-#include "weapon/bullet_manager.h"
-#include "weapon/base_weapon.h"
-
-#include "hud/hud_overlay.h"
-#include "hud/test_overlay.h"
-
-#include "run_manager.h"
-
-
-namespace orxonox {
-  using namespace Ogre;
-  using namespace weapon;
-  using namespace hud;
-
-  /**
-  * RunManager is the basic control object during the game.
-  * 
-  * The RunManger class is designed to actually "run" the main part of the
-  * game. The Idea is, that you could derive from the RunManager in order
-  * to distinguish between a first person shooter or a space craft shooter.
-  * RunManager loads and initialises everything in the scene (like the ship,
-  * the enemies in the scene, any scripts, the physics, window events,
-  * environment, HUD, etc.).
-  * It also captures any input from keyboard, mous, joystick (optional) or
-  * Ogre (window events).
-  */
-
-
-  RunManager* RunManager::singletonPtr_s = NULL;
-
-
-  /**
-  * Contructor only needs the Root object.
-  */
-  RunManager::RunManager()
-        : ogre_(NULL), window_(NULL), screenShotCounter_(0),
-        timeUntilNextToggle_(0), mouseSensitivity_(0.003), inputManager_(0),
-        mouse_(0), keyboard_(0), joystick_(0), statsOn_(true)
-  {
-  }
-
-  /**
-  * @param ogre_ The OgreControl object holding the render window and the Root
-  */
-  void RunManager::initialise(OgreControl *ogre)
-    {
-    ogre_ = ogre;
-    window_ = ogre->getRenderWindow();
-
-    // SETTING UP THE SCENE
-
-    // create one new SceneManger
-    sceneMgr_ = ogre_->getRoot()->createSceneManager(ST_GENERIC, "Orxonox Scene");
-
-    // background scene (world objects, skybox, lights, etc.)
-    backgroundScene_ = new OrxonoxScene(sceneMgr_);
-
-
-    // BULLET LIST FOR THE TEST APPLICATION
-
-    // create a bullet manager
-    bulletManager_ = new BulletManager(sceneMgr_);
-
-
-    // PLAYER SPACESHIP
-
-    // Create a space ship object and its SceneNode.
-    // It should also be considered, that the ship should provide another Node
-    // for a camera to be attached (otherwise the spaceship in front of the
-    // ship would be very static, never moving at all).
-
-    // Construct a new spaceship and give it the node
-    playerShip_ = new OrxonoxShip(sceneMgr_->getRootSceneNode()
-      ->createChildSceneNode("ShipNode", Vector3(20, 20, 20)));
-
-
-    // RESOURCE LOADING (using ResourceGroups if implemented)
-
-    // load all resources and create the entities by calling the initialise()
-    // methods for each object (no constructor initialisations!).
-    backgroundScene_->initialise();
-    playerShip_->initialise();
-
-
-    // CAMERA AND VIEWPORT
-
-    // create camera and viewport
-    createCamera();
-    createViewports();
-
-    // create HUD
-    hud_ = new hud::TestOverlay(window_);
-    hud_->show();
-
-
-    // Set default mipmap level (NB some APIs ignore this)
-    TextureManager::getSingleton().setDefaultNumMipmaps(5);
-
-
-    // HUMAN INTERFACE
-
-    using namespace OIS;    
-
-    LogManager::getSingletonPtr()->logMessage("*** Initializing OIS ***");
-    ParamList pl;
-    size_t windowHnd = 0;
-    std::ostringstream windowHndStr;
-
-    window_->getCustomAttribute("WINDOW", &windowHnd);
-    windowHndStr << windowHnd;
-    pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
-
-    inputManager_ = InputManager::createInputSystem( pl );
-
-    // Create all devices (We only catch joystick exceptions here,
-    // as, most people have Key/Mouse)
-    keyboard_ = static_cast<Keyboard*>(inputManager_
-      ->createInputObject( OISKeyboard, false ));
-    mouse_ = static_cast<Mouse*>(inputManager_
-      ->createInputObject( OISMouse, false ));
-    try {
-      joystick_ = static_cast<JoyStick*>(inputManager_
-        ->createInputObject( OISJoyStick, false ));
-    }
-    catch(...) {
-      joystick_ = 0;
-    }
-
-    //Set initial mouse clipping size
-    windowResized(window_);
-
-    //showDebugOverlay(true);
-
-    // REGISTER THIS OBJECT AS A WINDOW EVENT LISTENER IN OGRE
-    // It will then receive events liek windowClosed, windowResized, etc.
-    WindowEventUtilities::addWindowEventListener(window_, this);
-  }
-
-  /**
-  * Standard destructor.
-  * Removes this object as a window event listener and deletes all created
-  * variables.
-  */
-  RunManager::~RunManager()
-  {
-    //Remove ourself as a Window listener
-    WindowEventUtilities::removeWindowEventListener(window_, this);
-    windowClosed(window_);
-
-    if (backgroundScene_)
-      delete backgroundScene_;
-    if (playerShip_)
-      delete playerShip_;
-    if (bulletManager_)
-      delete bulletManager_;
-    if (hud_)
-      delete hud_;
-  }
-
-
-  /**
-  * Method to compute anything between 2 frames.
-  * 
-  * Everything that needs to be computed during the games happens right here.
-  * The only exception are the listeners (which should only set variables,
-  * not actually do something).
-  * 
-  * @param time Absolute play time
-  * @param deltaTime Time passed since last frame
-  * @return Return false to end rendering
-  */
-  bool RunManager::tick(unsigned long time, float deltaTime)
-  {
-    // synchronize with internal class timer
-    totalTime_ = time;
-
-    // Call tick() for every object
-    // This could be done by registering (needs a factory..)
-    backgroundScene_->tick(time, deltaTime);
-    playerShip_->tick(time, deltaTime);
-
-
-    // Update the HUD
-    Ogre::String tempStr = " | Speed = "
-      + StringConverter::toString(playerShip_->getSpeed())
-      + " | Left Ammo = "
-      + StringConverter::toString(playerShip_
-      ->getMainWeapon()->getAmmoState())
-      + " | Ammo stock = "
-      + StringConverter::toString(playerShip_->getAmmoStock());
-    hud_->setDebugText(tempStr);
-
-    hud_->tick(time, deltaTime);
-
-    // update the bullet positions
-    bulletManager_->tick(time, deltaTime);
-
-
-    // HUMAN INTERFACE
-
-    using namespace OIS;
-
-    if(window_->isClosed())	return false;
-
-    //Need to capture/update each device
-    keyboard_->capture();
-    mouse_->capture();
-    if( joystick_ ) joystick_->capture();
-
-    bool buffJ = (joystick_) ? joystick_->buffered() : true;
-
-    //Check if one of the devices is not buffered
-    if( !mouse_->buffered() || !keyboard_->buffered() || !buffJ )
-    {
-      // one of the input modes is immediate, so setup what
-      // is needed for immediate movement
-      if (timeUntilNextToggle_ >= 0)
-        timeUntilNextToggle_ -= deltaTime;
-    }
-
-    // handle HID devices
-    if( processUnbufferedKeyInput() == false )
-        return false;
-    if( processUnbufferedMouseInput() == false )
-        return false;
-
-    // keep rendering
-    return true;
-  }
-
-
-  SceneManager& RunManager::getSceneManager()
-  {
-    return *sceneMgr_;
-  }
-
-  SceneManager* RunManager::getSceneManagerPtr()
-  {
-    return sceneMgr_;
-  }
-
-  BulletManager* RunManager::getBulletManagerPtr()
-  {
-    return bulletManager_;
-  }
-
-  int RunManager::getAmmunitionID(const Ogre::String &ammoName)
-  {
-    Ogre::String ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };
-    int ammoTypesLength = 3;
-
-    for (int i = 0; i < ammoTypesLength; i++)
-    {
-      if (ammoTypes[i] == ammoName)
-        return i;
-    }
-    return -1;
-  }
-
-  int RunManager::getNumberOfAmmos()
-  {
-    return 3;
-  }
-
-
-  /**
-  * Adjust mouse clipping area.
-  * This method is called by Ogre without regards of tick()!
-  * Avoid doing too much in this call.
-  * @param rw render window
-  */
-  void RunManager::windowResized(RenderWindow* rw)
-  {
-    unsigned int width, height, depth;
-    int left, top;
-    rw->getMetrics(width, height, depth, left, top);
-
-    const OIS::MouseState &ms = mouse_->getMouseState();
-    ms.width = width;
-    ms.height = height;
-  }
-
-
-  /**
-  * Unattach OIS before window shutdown (very important under Linux).
-  * Again, avoid computing a lot in this function.
-  * @param rw Render Window
-  */
-  void RunManager::windowClosed(RenderWindow* rw)
-  {
-    //Only close for window that created OIS (the main window in these demos)
-    if( rw == window_ )
-    {
-      if( inputManager_ )
-      {
-        inputManager_->destroyInputObject( mouse_ );
-        inputManager_->destroyInputObject( keyboard_ );
-        inputManager_->destroyInputObject( joystick_ );
-
-        OIS::InputManager::destroyInputSystem(inputManager_);
-        inputManager_ = 0;
-      }
-    }
-  }
-
-  /**
-  * Processes the Keyboard input.
-  * TODO: Use listeners to improve performance.
-  * A lookup table should be implemented to bind any key to a specific action.
-  * @return Return true to keep rendering
-  */
-  bool RunManager::processUnbufferedKeyInput()
-  {
-    using namespace OIS;
-
-    if(keyboard_->isKeyDown(KC_A) || keyboard_->isKeyDown(KC_LEFT))
-      playerShip_->setSideThrust(1);
-    else if(keyboard_->isKeyDown(KC_D) || keyboard_->isKeyDown(KC_RIGHT))
-      playerShip_->setSideThrust(-1);
-    else
-      playerShip_->setSideThrust(0);
-
-    if(keyboard_->isKeyDown(KC_UP) || keyboard_->isKeyDown(KC_W) )
-      playerShip_->setMainThrust(1);
-    else if(keyboard_->isKeyDown(KC_DOWN) || keyboard_->isKeyDown(KC_S) )
-      playerShip_->setMainThrust(-1);
-    else
-      playerShip_->setMainThrust(0);
-
-    if (keyboard_->isKeyDown(KC_C))
-      playerShip_->setYThrust(1);
-    else if (keyboard_->isKeyDown(KC_SPACE))
-      playerShip_->setYThrust(-1);
-    else
-      playerShip_->setYThrust(0);
-
-    if (keyboard_->isKeyDown(KC_G))
-      playerShip_->getMainWeapon()->addAction(BaseWeapon::RELOAD);
-
-    if( keyboard_->isKeyDown(KC_ESCAPE) || keyboard_->isKeyDown(KC_Q) )
-      return false;
-
-    if( keyboard_->isKeyDown(KC_F) && timeUntilNextToggle_ <= 0 )
-    {
-      statsOn_ = !statsOn_;
-      timeUntilNextToggle_ = 1;
-    }
-
-    if(keyboard_->isKeyDown(KC_SYSRQ) && timeUntilNextToggle_ <= 0)
-    {
-      std::ostringstream ss;
-      ss << "screenshot_" << ++screenShotCounter_ << ".png";
-      window_->writeContentsToFile(ss.str());
-      timeUntilNextToggle_ = 0.5;
-    }
-
-    // Return true to continue rendering
-    return true;
-  }
-
-
-  /**
-  * Processes the Mouse input.
-  * TODO: Use listeners to improve performance.
-  * A lookup table should be implemented to bind ANY button or movement
-  * to a specific action.
-  * @return Return true to keep rendering
-  */
-  bool RunManager::processUnbufferedMouseInput()
-  {
-    using namespace OIS;
-
-    const MouseState &ms = mouse_->getMouseState();
-
-    if (ms.buttonDown(MB_Left))
-      playerShip_->getMainWeapon()->primaryFireRequest();
-
-    if (ms.buttonDown(MB_Right))
-      playerShip_->getMainWeapon()->secondaryFireRequest();
-
-    playerShip_->turnUpAndDown(Radian(ms.Y.rel * mouseSensitivity_));
-    playerShip_->turnLeftAndRight(Radian(ms.X.rel * mouseSensitivity_));
-
-    // keep rendering
-    return true;
-  }
-
-  /**
-  * Show an overlay desired.
-  * @param show Whether or not to show the debug overlay
-  */
-  void RunManager::showDebugOverlay(bool show)
-  {
-    if (hud_)
-    {
-      if (show)
-        hud_->show();
-      else
-        hud_->hide();
-    }
-  }
-
-
-  /**
-  * Simple camera creator.
-  * playerShip_Node->attachObject(camera_) should not be here! This is what
-  * the camera manager is for. Right now, this method should do just fine,
-  * setting the cam behind the ship.
-  */
-  void RunManager::createCamera()
-  {
-    camera_ = sceneMgr_->createCamera("PlayerCam");
-    playerShip_->getRootNode()->getSceneNode()->attachObject(camera_);
-    camera_->setNearClipDistance(5);
-    camera_->setPosition(Vector3(0,10,500));
-    camera_->lookAt(Vector3(0,0,0));
-  }
-
-  /**
-  * Simple viewport creator.
-  * For now the viewport uses the entire render window and is based on the one
-  * camera created so far.
-  */
-  void RunManager::createViewports()
-  {
-    // Create one viewport, entire window
-    Viewport* vp = window_->addViewport(camera_);
-    vp->setBackgroundColour(ColourValue(0,0,0));
-
-    // Alter the camera aspect ratio to match the viewport
-    camera_->setAspectRatio(
-      Real(vp->getActualWidth()) / Real(vp->getActualHeight()));
-  }
-
-
-  RunManager* RunManager::createSingleton()
-  {
-    if (singletonPtr_s)
-      return NULL;
-    singletonPtr_s = new RunManager();
-    return singletonPtr_s;
-  }
-
-  void RunManager::destroySingleton()
-  {
-    if (singletonPtr_s)
-      delete singletonPtr_s;
-  }
-
-
-  RunManager& RunManager::getSingleton()
-  {
-    return *singletonPtr_s;
-  }
-
-  RunManager* RunManager::getSingletonPtr()
-  {
-    return singletonPtr_s;
-  }
-
-}
Index: code/branches/FICN/src/run_manager.h
===================================================================
--- code/branches/FICN/src/run_manager.h	(revision 337)
+++ 	(revision )
@@ -1,142 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-
-#ifndef RUN_MANAGER_H
-#define RUN_MANAGER_H
-
-#include "OgrePrerequisites.h"
-#include "OgreWindowEventUtilities.h"
-//#include "OgreTextureManager.h"
-
-#include <OIS/OISPrereqs.h>
-
-#include "orxonox_prerequisites.h"
-
-
-namespace orxonox {
-
-  // let the class inherit from WindowEventListener in order for the RunMgr
-  // to act as the central point of all the calcuations in Orxonox
-  class RunManager : public Ogre::WindowEventListener
-  {
-  public:
-    virtual ~RunManager();
-    
-    void initialise(OgreControl*);
-
-    bool tick(unsigned long, Ogre::Real);
-
-    Ogre::SceneManager& getSceneManager();
-
-    Ogre::SceneManager* getSceneManagerPtr();
-
-    weapon::BulletManager* getBulletManagerPtr();
-
-    int getAmmunitionID(const Ogre::String&);
-
-    int getNumberOfAmmos();
-
-    static RunManager* createSingleton();
-
-    static void destroySingleton();
-
-    static RunManager& getSingleton(void);
-
-    static RunManager* getSingletonPtr(void);
-
-
-  protected:
-    RunManager();
-
-	  void createCamera(void);
-
-	  void createViewports(void);
-
-
-	  /** EVENT HANDLING **/
-
-	  //Adjust mouse clipping area
-	  void windowResized(Ogre::RenderWindow*);
-
-	  //Unattach OIS before window shutdown (very important under Linux)
-	  void windowClosed(Ogre::RenderWindow*);
-
-
-	  /** INPUT PROCESSING **/
-	  bool processUnbufferedKeyInput();
-
-	  bool processUnbufferedMouseInput();
-
-
-	  /** OUTPUT **/
-
-	  void showDebugOverlay(bool);
-
-  protected:
-    // directly Ogre related fields
-	  Ogre::SceneManager *sceneMgr_;
-	  Ogre::RenderWindow *window_;
-	  Ogre::Camera       *camera_;
-
-
-    // self made orxonox fields
-	  OgreControl  *ogre_;
-	  OrxonoxScene *backgroundScene_;
-	  OrxonoxShip  *playerShip_;
-    hud::TestOverlay *hud_;
-
-    // Bullet manager
-    weapon::BulletManager *bulletManager_;
-
-    const Ogre::Real mouseSensitivity_;
-
-	  // previously elapsed render time
-	  unsigned long totalTime_;
-
-
-    // fields from the example framework
-	  bool statsOn_;
-
-	  unsigned int screenShotCounter_;
-	  // just to stop toggles flipping too fast
-	  Ogre::Real timeUntilNextToggle_;
-
-	  //OIS Input devices
-	  OIS::InputManager* inputManager_;
-	  OIS::Mouse*    mouse_;
-	  OIS::Keyboard* keyboard_;
-	  OIS::JoyStick* joystick_;
-
-    // singleton pointer
-    static RunManager *singletonPtr_s;
-
-  };
-
-}
-
-#endif /* RUN_MANAGER_H */
