Index: trunk/src/defs/globals.h
===================================================================
--- trunk/src/defs/globals.h	(revision 5956)
+++ trunk/src/defs/globals.h	(revision 5978)
@@ -72,4 +72,7 @@
 #define   CONFIG_NAME_PLAYER_LEFT          "Left"
 #define   CONFIG_NAME_PLAYER_RIGHT         "Right"
+#define   CONFIG_NAME_PLAYER_ROLL_RIGHT    "RollR"
+#define   CONFIG_NAME_PLAYER_ROLL_LEFT     "RollL"
+
 #define   CONFIG_NAME_PLAYER_FIRE          "Fire"
 #define   CONFIG_NAME_PLAYER_NEXT_WEAPON   "Next"
Index: trunk/src/lib/event/event_handler.cc
===================================================================
--- trunk/src/lib/event/event_handler.cc	(revision 5956)
+++ trunk/src/lib/event/event_handler.cc	(revision 5978)
@@ -47,4 +47,5 @@
   this->flush(ES_ALL);
   this->withUNICODE(false);
+  this->grabEvents(false);
 
   this->state = ES_GAME;
@@ -255,4 +256,12 @@
 }
 
+void EventHandler::grabEvents(bool grabEvents)
+{
+     this->eventsGrabbed = grabEvents;
+     if(!grabEvents)
+      SDL_WM_GrabInput(SDL_GRAB_OFF);
+     else
+      SDL_WM_GrabInput(SDL_GRAB_ON); 
+}
 
 /**
Index: trunk/src/lib/event/event_handler.h
===================================================================
--- trunk/src/lib/event/event_handler.h	(revision 5956)
+++ trunk/src/lib/event/event_handler.h	(revision 5978)
@@ -43,4 +43,5 @@
 
   void withUNICODE(bool enableUNICODE);
+  void grabEvents(bool grabEvents);
 
   void process();
@@ -62,4 +63,5 @@
 
   bool                       bUNICODE;                        //!< If unicode should be enabled.
+  bool                       eventsGrabbed;                   //!< If the events should be grabbed
 };
 
Index: trunk/src/lib/event/key_mapper.cc
===================================================================
--- trunk/src/lib/event/key_mapper.cc	(revision 5956)
+++ trunk/src/lib/event/key_mapper.cc	(revision 5978)
@@ -37,4 +37,6 @@
 int KeyMapper::PEV_LEFT              = EV_UNKNOWN;
 int KeyMapper::PEV_RIGHT             = EV_UNKNOWN;
+int KeyMapper::PEV_ROLL_LEFT         = EV_UNKNOWN;
+int KeyMapper::PEV_ROLL_RIGHT        = EV_UNKNOWN;
 int KeyMapper::PEV_STRAFE_LEFT       = EV_UNKNOWN;
 int KeyMapper::PEV_STRAFE_RIGHT      = EV_UNKNOWN;
@@ -69,4 +71,6 @@
   {&KeyMapper::PEV_LEFT,                 CONFIG_NAME_PLAYER_LEFT},
   {&KeyMapper::PEV_RIGHT,                CONFIG_NAME_PLAYER_RIGHT},
+  {&KeyMapper::PEV_ROLL_LEFT,            CONFIG_NAME_PLAYER_ROLL_RIGHT},
+  {&KeyMapper::PEV_ROLL_RIGHT,           CONFIG_NAME_PLAYER_ROLL_LEFT},
   {&KeyMapper::PEV_STRAFE_LEFT,          "StrafeLeft"},
   {&KeyMapper::PEV_STRAFE_RIGHT,         "StrafeRight"},
Index: trunk/src/lib/event/key_mapper.h
===================================================================
--- trunk/src/lib/event/key_mapper.h	(revision 5956)
+++ trunk/src/lib/event/key_mapper.h	(revision 5978)
@@ -44,4 +44,7 @@
   static int PEV_RIGHT;             //!< right button
 
+  static int PEV_ROLL_LEFT;         //!< rolls left
+  static int PEV_ROLL_RIGHT;        //!< rolls right
+
   static int PEV_STRAFE_LEFT;       //!< strafe left button
   static int PEV_STRAFE_RIGHT;      //!< strafe right button
Index: trunk/src/lib/gui/gtk_gui/gui_keys.cc
===================================================================
--- trunk/src/lib/gui/gtk_gui/gui_keys.cc	(revision 5956)
+++ trunk/src/lib/gui/gtk_gui/gui_keys.cc	(revision 5978)
@@ -115,8 +115,10 @@
 
         pKeysBox->setGroupName(player);
-        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_UP, "UP"));
-        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_DOWN, "DOWN"));
-        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_LEFT, "LEFT"));
-        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_RIGHT, "RIGHT"));
+        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_UP, "w"));
+        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_DOWN, "s"));
+        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_LEFT, "a"));
+        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_RIGHT, "d"));
+        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_ROLL_LEFT, "q"));
+        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_ROLL_RIGHT, "e"));
         pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_FIRE, "BUTTON_LEFT"));
         pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_NEXT_WEAPON, "m"));
Index: trunk/src/world_entities/space_ships/space_ship.cc
===================================================================
--- trunk/src/world_entities/space_ships/space_ship.cc	(revision 5956)
+++ trunk/src/world_entities/space_ships/space_ship.cc	(revision 5978)
@@ -30,4 +30,7 @@
 #include "factory.h"
 #include "key_mapper.h"
+#include "event_handler.h"
+
+#include "graphics_engine.h"
 
 using namespace std;
@@ -109,7 +112,13 @@
   PRINTF(4)("SPACESHIP INIT\n");
 
-
-  bUp = bDown = bLeft = bRight = bAscend = bDescend = false;
+  EventHandler::getInstance()->grabEvents(true);
+
+  bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false;
   bFire = false;
+  xMouse = yMouse = 0;
+  mouseSensitivity = 0.001;
+  
+  cycle = 0.0;
+  
 
   travelSpeed = 15.0;
@@ -123,8 +132,10 @@
 
   //add events to the eventlist
-  registerEvent(KeyMapper::PEV_UP);
-  registerEvent(KeyMapper::PEV_DOWN);
-  registerEvent(KeyMapper::PEV_LEFT);
-  registerEvent(KeyMapper::PEV_RIGHT);
+  registerEvent(SDLK_w);
+  registerEvent(SDLK_s);
+  registerEvent(SDLK_a);
+  registerEvent(SDLK_d);
+  registerEvent(SDLK_q);
+  registerEvent(SDLK_e);
   registerEvent(KeyMapper::PEV_FIRE1);
   registerEvent(KeyMapper::PEV_NEXT_WEAPON);
@@ -132,4 +143,5 @@
   registerEvent(SDLK_PAGEUP);
   registerEvent(SDLK_PAGEDOWN);
+  registerEvent(EV_MOUSE_MOTION);
 
   this->getWeaponManager()->setSlotCount(7);
@@ -252,4 +264,5 @@
 void SpaceShip::tick (float time)
 {
+     cycle += time;
   // spaceship controlled movement
   this->calculateVelocity(time);
@@ -258,4 +271,11 @@
 
   //orient the spaceship model in the direction of movement.
+  
+  // this is the air friction (necessary for a smooth control)
+  if(velocity.len() != 0) velocity -= velocity*0.01;
+  
+  this->shiftCoor(Vector(0,1,0)*cos(this->cycle*2.0)*0.02);
+  
+  //SDL_WarpMouse(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2);
 
   this->shiftCoor (move);
@@ -280,12 +300,12 @@
   if( this->bUp )
    {
-     this->shiftCoor(this->getAbsDirX());
-      //if(travelSpeed <= 5000)  travelSpeed += 10;
+     //this->shiftCoor(this->getAbsDirX());
+      accel += (this->getAbsDirX())*2;
    }
 
   if( this->bDown )
    {
-     this->shiftCoor(Vector()-this->getAbsDirX());
-     //if(travelSpeed >= 10) travelSpeed -= 10;
+     //this->shiftCoor((this->getAbsDirX())*-1);
+     accel -= (this->getAbsDirX())*2;
    }
 
@@ -307,4 +327,22 @@
     //rotVal += .4;
   }
+  
+  if( this->bRollL /* > -this->getRelCoor().z*2*/)
+  {
+    this->shiftDir(Quaternion(-time, Vector(1,0,0)));
+//    accel -= rightDirection;
+    //velocityDir.normalize();
+    //rot +=Vector(1,0,0);
+    //rotVal -= .4;
+  }
+  if( this->bRollR /* > this->getRelCoor().z*2*/)
+  {
+    this->shiftDir(Quaternion(time, Vector(1,0,0)));
+
+    //    accel += rightDirection;
+    //velocityDir.normalize();
+    //rot += Vector(1,0,0);
+    //rotVal += .4;
+  }
   if (this->bAscend )
   {
@@ -326,5 +364,5 @@
   }
 
-  velocity += accel*(time);
+  velocity += accel;
   //rot.normalize();
   //this->setRelDirSoft(Quaternion(rotVal, rot), 5);
@@ -347,12 +385,10 @@
 void SpaceShip::process(const Event &event)
 {
-  if( event.type == KeyMapper::PEV_UP)
-      this->bUp = event.bPressed;
-  else if( event.type == KeyMapper::PEV_DOWN)
-      this->bDown = event.bPressed;
-  else if( event.type == KeyMapper::PEV_RIGHT)
-      this->bRight= event.bPressed;
-  else if( event.type == KeyMapper::PEV_LEFT)
-      this->bLeft = event.bPressed;
+  
+  
+  if( event.type == SDLK_a)
+      this->bRollL = event.bPressed;
+  else if( event.type == SDLK_d)
+      this->bRollR = event.bPressed;
   else if( event.type == KeyMapper::PEV_FIRE1)
       this->bFire = event.bPressed;
@@ -362,8 +398,14 @@
     this->getWeaponManager()->previousWeaponConfig();
 
-  else if( event.type == SDLK_PAGEUP)
-    this->bAscend = event.bPressed; //this->shiftCoor(0,.1,0);
-  else if( event.type == SDLK_PAGEDOWN)
-    this->bDescend = event.bPressed; //this->shiftCoor(0,-.1,0);
+  else if( event.type == SDLK_w)
+    this->bUp = event.bPressed; //this->shiftCoor(0,.1,0);
+  else if( event.type == SDLK_s)
+    this->bDown = event.bPressed; //this->shiftCoor(0,-.1,0);
+  else if( event.type == EV_MOUSE_MOTION)
+  {
+    this->xMouse = event.xRel;
+    this->yMouse = event.yRel;
+    this->shiftDir(Quaternion(-M_PI/4*xMouse*mouseSensitivity, Vector(0,1,0))*Quaternion(-M_PI/4*yMouse*mouseSensitivity, Vector(0,0,1)));
+  }
 }
 
Index: trunk/src/world_entities/space_ships/space_ship.h
===================================================================
--- trunk/src/world_entities/space_ships/space_ship.h	(revision 5956)
+++ trunk/src/world_entities/space_ships/space_ship.h	(revision 5978)
@@ -55,4 +55,11 @@
     bool                  bDescend;           //!< descend button presses.
     bool                  bFire;              //!< fire button pressed.
+    bool                  bRollL;             //!< rolling button pressed (left)
+    bool                  bRollR;             //!< rolling button pressed (right)
+    
+    float                 xMouse;             //!< mouse moved in x-Direction
+    float                 yMouse;             //!< mouse moved in y-Direction
+    float                 mouseSensitivity;   //!< the mouse sensitivity
+    float                 cycle;              //!< hovercycle
 
     Vector                velocity;           //!< the velocity of the player.
Index: trunk/src/world_entities/weapons/crosshair.cc
===================================================================
--- trunk/src/world_entities/weapons/crosshair.cc	(revision 5956)
+++ trunk/src/world_entities/weapons/crosshair.cc	(revision 5978)
@@ -70,5 +70,5 @@
   this->material = new Material;
 
-  EventHandler::getInstance()->subscribe(this, ES_GAME, EV_MOUSE_MOTION);
+  //EventHandler::getInstance()->subscribe(this, ES_GAME, EV_MOUSE_MOTION);
 
   // center the mouse on the screen, and also hide the cursors
@@ -122,5 +122,5 @@
   if  (event.type == EV_MOUSE_MOTION)
   {
-    this->setAbsCoor2D(event.x, event.y);
+    //this->setAbsCoor2D(event.x, event.y);
   }
 }
@@ -157,5 +157,5 @@
                &objZ );
 
-  this->setAbsCoor(objX, objY, objZ);
+  //this->setAbsCoor(objX, objY, objZ);
 }
 
@@ -166,5 +166,5 @@
 {
   glPushMatrix();
-  glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0);
+  glTranslatef(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2, 0);
 
   glRotatef(this->getAbsDir2D(), 0,0,1);
