Index: orxonox/branches/chris/src/Makefile.am
===================================================================
--- orxonox/branches/chris/src/Makefile.am	(revision 2028)
+++ orxonox/branches/chris/src/Makefile.am	(revision 2058)
@@ -6,5 +6,5 @@
 
 bin_PROGRAMS=orxonox
-orxonox_SOURCES=orxonox.cc world.cc environment.cc player.cc npc.cc input_output.cc data_tank.cc ai.cc shoot_laser.cc shoot_rocket.cc
+orxonox_SOURCES=orxonox.cc world.cc environment.cc player.cc npc.cc input_output.cc data_tank.cc ai.cc shoot_laser.cc shoot_rocket.cc world_entity.cc synchronisable.cc list.cc vector.cc ability.cc
 
 #  uncomment the following if bencoder requires the math library
Index: orxonox/branches/chris/src/Makefile.in
===================================================================
--- orxonox/branches/chris/src/Makefile.in	(revision 2028)
+++ orxonox/branches/chris/src/Makefile.in	(revision 2058)
@@ -69,4 +69,5 @@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MSBITFIELDS = @MSBITFIELDS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -116,5 +117,5 @@
 #"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include"
 bin_PROGRAMS = orxonox
-orxonox_SOURCES = orxonox.cc world.cc environment.cc player.cc npc.cc input_output.cc data_tank.cc ai.cc shoot_laser.cc shoot_rocket.cc
+orxonox_SOURCES = orxonox.cc world.cc environment.cc player.cc npc.cc input_output.cc data_tank.cc ai.cc shoot_laser.cc shoot_rocket.cc world_entity.cc synchronisable.cc list.cc vector.cc ability.cc
 subdir = src
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -128,5 +129,7 @@
 	environment.$(OBJEXT) player.$(OBJEXT) npc.$(OBJEXT) \
 	input_output.$(OBJEXT) data_tank.$(OBJEXT) ai.$(OBJEXT) \
-	shoot_laser.$(OBJEXT) shoot_rocket.$(OBJEXT)
+	shoot_laser.$(OBJEXT) shoot_rocket.$(OBJEXT) \
+	world_entity.$(OBJEXT) synchronisable.$(OBJEXT) list.$(OBJEXT) \
+	vector.$(OBJEXT) ability.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
 orxonox_LDADD = $(LDADD)
@@ -137,10 +140,12 @@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ai.Po ./$(DEPDIR)/data_tank.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/environment.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/input_output.Po ./$(DEPDIR)/npc.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/player.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/shoot_laser.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/shoot_rocket.Po ./$(DEPDIR)/world.Po
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ability.Po ./$(DEPDIR)/ai.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/data_tank.Po ./$(DEPDIR)/environment.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/input_output.Po ./$(DEPDIR)/list.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/npc.Po ./$(DEPDIR)/orxonox.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/player.Po ./$(DEPDIR)/shoot_laser.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/shoot_rocket.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/synchronisable.Po ./$(DEPDIR)/vector.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/world.Po ./$(DEPDIR)/world_entity.Po
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
@@ -195,8 +200,10 @@
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ability.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ai.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_tank.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/environment.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input_output.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/npc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox.Po@am__quote@
@@ -204,5 +211,8 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shoot_laser.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shoot_rocket.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synchronisable.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world_entity.Po@am__quote@
 
 .cc.o:
Index: orxonox/branches/chris/src/ability.cc
===================================================================
--- orxonox/branches/chris/src/ability.cc	(revision 2058)
+++ orxonox/branches/chris/src/ability.cc	(revision 2058)
@@ -0,0 +1,32 @@
+
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+*/
+
+
+#include "ability.h"
+
+
+using namespace std;
+
+
+
+Ability::Ability () {}
+
+
+
+Ability::~Ability () {}
+
+
Index: orxonox/branches/chris/src/ability.h
===================================================================
--- orxonox/branches/chris/src/ability.h	(revision 2058)
+++ orxonox/branches/chris/src/ability.h	(revision 2058)
@@ -0,0 +1,16 @@
+
+#ifndef ABILITY_H
+#define ABILITY_H
+
+#include "data_tank.h"
+
+
+class Ability {
+
+ public:
+  Ability ();
+  ~Ability ();
+
+};
+
+#endif
Index: orxonox/branches/chris/src/environment.cc
===================================================================
--- orxonox/branches/chris/src/environment.cc	(revision 2028)
+++ orxonox/branches/chris/src/environment.cc	(revision 2058)
@@ -11,39 +11,47 @@
    any later version.
 
-   ### File Specific:
-   main-programmer: ...
-   co-programmer: ...
+   ### File Specific
+   main-programmer: Patrick Boenzli
+   co-programmer: 
 */
 
+#include <iostream>
+#include <GL/glut.h>
+#include <stdlib.h>
+
+#include "data_tank.h"
 
 #include "environment.h"
-#include <iostream>
-
 
 using namespace std;
 
 
+//Sorry Bensch
+#define LEVEL_LENGTH 500
 
 Environment::Environment () 
+  : WorldEntity()
 {
 
-
-  for (int x = 0; x < 10; x++)
+  /*
+  //Sorry Bensch: x,y = 10
+  for (int x = 0; x < 50; x++)
     {
-      for (int y = 0; y < 10; y++)
+      for (int y = 0; y < 50; y++)
 	{
-	  mountainTest[x][y] = 0;
+	  mountainTest[x][y] =0;
 	                                         
 	}
     }
-
-  for (int x = 1; x < 9; x++)
+  //Sorry Bensch: x,y = 9
+  for (int x = 1; x < LEVEL_LENGTH; x++)
     {
-      for (int y = 1; y < 9; y++)
+      for (int y = 1; y < LEVEL_LENGTH; y++)
 	{
-	  mountainTest[x][y] = (float)rand() / 900000000;
-	                                         
+	  //mountainTest[x][y] = (float)random() / 900000000;
+	  mountainTest[x][y] = (float)(random() % 4);                                       
 	}
     }
+  */
 }
 
@@ -53,7 +61,7 @@
 
 
-
-void Environment::drawEnvironment() 
+void Environment::paint()
 {
+  /*
   glPushMatrix();
   //glScalef(0.5, 0.5, 1.0);
@@ -64,7 +72,7 @@
   
   glBegin(GL_LINES);
-  for (int x = 0; x < 9; x += 1)
+  for (int x = 0; x < LEVEL_LENGTH; x += 1)
     {
-      for (int y = 0; y < 9; y += 1)
+      for (int y = 0; y < 190; y += 1)
 	{
 	  glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
@@ -76,7 +84,7 @@
   
   glBegin(GL_LINES);
-  for (int y = 0; y < 9; y += 1)
+  for (int y = 0; y < LEVEL_LENGTH; y += 1)
     {
-      for (int x = 0; x < 9; x += 1)
+      for (int x = 0; x < 90; x += 1)
 	{
 	  glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
@@ -87,4 +95,10 @@
   
   glPopMatrix();
+  */
 }
 
+void Environment::drawEnvironment() 
+{
+
+}
+
Index: orxonox/branches/chris/src/environment.h
===================================================================
--- orxonox/branches/chris/src/environment.h	(revision 2028)
+++ orxonox/branches/chris/src/environment.h	(revision 2058)
@@ -1,12 +1,12 @@
 
-#include <GL/glut.h>
-#include <stdlib.h>
+
 
 #ifndef ENVIRONEMENT_H
 #define ENVIRONEMENT_H
 
-#include "data_tank.h"
 
-class Environment {
+#include "world_entity.h"
+
+class Environment : public WorldEntity {
 
  private:
@@ -21,4 +21,5 @@
   ~Environment ();
 
+  void paint(void);
   void drawEnvironment(void);
   void setEnvPosition(void);
Index: orxonox/branches/chris/src/input_output.cc
===================================================================
--- orxonox/branches/chris/src/input_output.cc	(revision 2028)
+++ orxonox/branches/chris/src/input_output.cc	(revision 2058)
@@ -16,7 +16,11 @@
 */
 
+#include <iostream>
+
+#include "world.h"
+#include "input_output.h"
+#include "player.h"
 
 #include "input_output.h"
-#include <iostream>
 
 using namespace std;
Index: orxonox/branches/chris/src/input_output.h
===================================================================
--- orxonox/branches/chris/src/input_output.h	(revision 2028)
+++ orxonox/branches/chris/src/input_output.h	(revision 2058)
@@ -5,9 +5,10 @@
 #define INPUT_OUTPUT_H
 
-#include "world.h"
-#include "input_output.h"
-#include "player.h"
+
 
 #include "data_tank.h"
+
+class World;
+class Player;
 
 class InputOutput {
Index: orxonox/branches/chris/src/list.h
===================================================================
--- orxonox/branches/chris/src/list.h	(revision 2028)
+++ orxonox/branches/chris/src/list.h	(revision 2058)
Index: orxonox/branches/chris/src/npc.cc
===================================================================
--- orxonox/branches/chris/src/npc.cc	(revision 2028)
+++ orxonox/branches/chris/src/npc.cc	(revision 2058)
@@ -16,14 +16,17 @@
 */
 
+#include <iostream>
+#include <GL/glut.h>
+
+#include "ai.h"
+#include "data_tank.h"
 
 #include "npc.h"
-
-#include <iostream>
-
 
 using namespace std;
 
 
-NPC::NPC () 
+NPC::NPC()
+  : WorldEntity()
 {
   hasDied = 0;
@@ -57,10 +60,9 @@
 
 void NPC::addAI(AI* ai)
+{}
+
+void NPC::paint()
 {
-
-}
-
-void NPC::drawNPC(void) 
-{
+  //cout << "WorldEntity::WorldEntity();" << endl;  
   /* fix: died flag approach is very stupid, just to show @ convention */
   if( hasDied == 0 ) {
@@ -73,4 +75,9 @@
 }
 
+void NPC::drawNPC() 
+{
+
+}
+
 
 /* define the reaction, if the ship is been hit */
@@ -81,4 +88,5 @@
 }
 
+
 void NPC::die()
 {
Index: orxonox/branches/chris/src/npc.h
===================================================================
--- orxonox/branches/chris/src/npc.h	(revision 2028)
+++ orxonox/branches/chris/src/npc.h	(revision 2058)
@@ -3,11 +3,9 @@
 #define NPC_H
 
-/* openGL Headers */
-#include <GL/glut.h>
+#include "world_entity.h"
 
-#include "ai.h"
-#include "data_tank.h"
+class AI;
 
-class NPC {
+class NPC : public WorldEntity {
 
  public:
@@ -23,4 +21,5 @@
 
   void drawNPC(void);
+  void paint(void);
   void setPosition(float x, float y, float z);
   void getPosition(float* x, float* y, float* z);
Index: orxonox/branches/chris/src/orxonox.cc
===================================================================
--- orxonox/branches/chris/src/orxonox.cc	(revision 2028)
+++ orxonox/branches/chris/src/orxonox.cc	(revision 2058)
@@ -24,12 +24,23 @@
 */
 
-/* class definition header */
+#include <iostream>
+#include <cstdio>
+#include <GL/glut.h>
+#include <SDL/SDL.h>
+
+#include "environment.h"
+#include "world.h"
+#include "input_output.h"
+#include "data_tank.h"
+#include "stdincl.h"
+#include "player.h"
+#include "npc.h"
+#include "shoot_laser.h"
+
 #include "orxonox.h"
 
-
 using namespace std;
 
 
-
 Orxonox::Orxonox () 
 {
@@ -40,7 +51,5 @@
 
 Orxonox::~Orxonox () 
-{
-  glutSetKeyRepeat(GLUT_KEY_REPEAT_ON);
-}
+{}
 
 
@@ -63,4 +72,5 @@
 //int Orxonox::offsetY = 0;
 
+
 Orxonox* Orxonox::getInstance (void)
 {
@@ -73,20 +83,56 @@
 int Orxonox::globalInit (int argc, char** argv) 
 {
-  glutInit(&argc, argv);
-  glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
+  if( SDL_Init (SDL_INIT_EVERYTHING) == -1)
+  {
+    printf ("Could not SDL_Init(): %s\n", SDL_GetError());
+    return -1;
+  }
+  
+  // Set video mode
+  // TO DO: parse arguments for settings
+  SDL_GL_SetAttribute (SDL_GL_RED_SIZE, 5);
+  SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, 5);
+  SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE, 5);
+  SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 16);
+  
+  int bpp = 16;
+  int width = 640;
+  int height = 480;
+  Uint32 flags = SDL_OPENGL | SDL_GL_DOUBLEBUFFER;
+  
+  if( (screen = SDL_SetVideoMode (width, height, bpp, flags)) == NULL)
+  {
+    printf ("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", width, height, bpp, flags, SDL_GetError());
+    SDL_Quit();
+    return -1;
+  }
+  
+  // Set window labeling
+  // TO DO: Add version information to caption
+  SDL_WM_SetCaption( "Orxonox", "Orxonox");
+  
+  // TO DO: Create a cool icon and use it here
+  // SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask);  
+
+  // OpenGL stuff
+  // (Is this all we initialize globally???)
   glEnable(GL_DEPTH_TEST);
-  glutInitWindowSize(500, 500);
-  //glutFullScreen();
-  glutInitWindowPosition(100, 100);
-  glutCreateWindow("orxOnox");
   glShadeModel(GL_FLAT);
-  /* window event dispatchers */
-  glutDisplayFunc(display);
-  glutReshapeFunc(reshape);
-  glutKeyboardFunc(keyboard);
-  glutKeyboardUpFunc(upKeyboard);
-
-  glutTimerFunc(1000, timeSlice, 0);
-  cout << "measuring performance...";
+  
+//  glutInit(&argc, argv);
+//  glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
+//  glutInitWindowSize(500, 500);
+//  //glutFullScreen();
+//  glutInitWindowPosition(100, 100);
+//  glutCreateWindow("OrxonoX");
+//  /* window event dispatchers */
+//  glutDisplayFunc(display);
+//  glutReshapeFunc(reshape);
+//  glutKeyboardFunc(keyboard);
+//  glutKeyboardUpFunc(upKeyboard);
+//
+//  glutTimerFunc(1000, timeSlice, 0);
+//  cout << "measuring performance...";
+
 }
 
@@ -138,5 +184,4 @@
   io->setPlayerStep(19.2/fps); /* set player to propper speed */
   localPlayer->shootLaser->setShootStep(20.0/fps); /* set shoot speed */
-  localPlayer->shootRocket->setShootStep(20.0/fps); /* set shoot speed */
   world->setWorldStep(7.0/fps); /* set the speed of the terrain moving away */
   fps = 0;
@@ -261,6 +306,6 @@
   (*world).drawWorld();
 
-  glutSwapBuffers();
-} 
+  SDL_Flip( screen);
+}
 
 
@@ -320,13 +365,37 @@
 }
 
+void Orxonox::mainLoop()
+{
+  // This is where everything is run
+  while( !bQuitOrxonox)
+  {
+    // Process input
+    // Process time
+    // Process collision
+    // Draw
+    display();
+  }
+}
 
 int main (int argc, char** argv) 
 {  
   Orxonox *orx = Orxonox::getInstance();
-  (*orx).globalInit(argc, argv);
+  if( (*orx).globalInit(argc, argv) == -1)
+  {
+    printf("! Global initialization failed\n");
+    return -1;
+  }
+  
   //(*orx).menuInit(); pb: directly jump to the game, no menu
-  (*orx).gameInit();
-
-  glutMainLoop();  
+  
+  if( (*orx).gameInit() == -1)
+  {
+    printf("! Game initialization failed\n");
+    return -1;
+  }
+
+  (*orx).mainLoop();
+  
   return 0;
 }
+
Index: orxonox/branches/chris/src/orxonox.h
===================================================================
--- orxonox/branches/chris/src/orxonox.h	(revision 2028)
+++ orxonox/branches/chris/src/orxonox.h	(revision 2058)
@@ -1,22 +1,11 @@
-
-
 
 #ifndef ORXONOX_H
 #define ORXONOX_H
 
-/* standard headers */
-#include <iostream>
-#include <cstdio>
+#include <SDL/SDL.h>
 
-/* openGL Headers */
-#include <GL/glut.h>
-
-
-#include "environment.h"
-#include "world.h"
-#include "input_output.h"
-#include "data_tank.h"
-#include "stdincl.h"
-#include "player.h"
+class World;
+class InputOutput;
+class Player;
 
 
@@ -30,4 +19,5 @@
   static InputOutput* io;
   static Player* localPlayer;
+  static bool bQuitOrxonox;
   static bool pause;
   static bool inputEnabled;
@@ -46,6 +36,7 @@
   static void timeSlice(int value);
 
+  static SDL_Surface* screen;
+  
  public:
-
   static Orxonox* getInstance (void);
 
@@ -53,4 +44,7 @@
   int menuInit (void);
   int gameInit (void);
+  
+  void mainLoop();
+
   void testTheShit(void);
   static void display (void);
Index: orxonox/branches/chris/src/player.cc
===================================================================
--- orxonox/branches/chris/src/player.cc	(revision 2028)
+++ orxonox/branches/chris/src/player.cc	(revision 2058)
@@ -16,15 +16,20 @@
 */
 
+#include <iostream>
+#include <stdlib.h>
+#include <GL/glut.h>
+
+#include "shoot_laser.h"
+#include "shoot_rocket.h"
+#include "data_tank.h"
 
 #include "player.h"
-#include <iostream>
-#include <stdlib.h>
-
 
 using namespace std;
 
 
-Player::Player () {
-  // cout << "Player::Player" << endl;
+Player::Player() 
+   : WorldEntity() {
+  //cout << "Player::Player" << endl;
   xCor = yCor = zCor = 0;
   shootLaser = new ShootLaser;
@@ -58,5 +63,4 @@
 void Player::goX(float x) 
 {
-  //cout << "Player::goX" << endl;
   xCor += x;
 }
@@ -73,25 +77,36 @@
 }
 
+
+
 void Player::shoot(int n) 
 {
+
   //  if (shootLaser->inhibitor++ <= 100)
-    shootLaser->addShoot(xCor, yCor, zCor);
-    // else if (shootLaser->inhibitor++ <= 200)
-    shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0);
-    //  else if (shootLaser->inhibitor++ <= 300)
-    shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0);
-    //  else
-    shootLaser->inhibitor =0;
+  shootLaser->addShoot(xCor, yCor, zCor);
+  // else if (shootLaser->inhibitor++ <= 200)
+  shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0);
+  //  else if (shootLaser->inhibitor++ <= 300)
+  shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0);
+  //  else
+  shootLaser->inhibitor =0;
   
-    //  if (shootRocket->inhibitor++ >=80)
-    {
-      shootRocket->addBackParable(xCor, yCor, zCor);
-      shootRocket->addSideAcc(xCor, yCor, zCor, RIGHT);
-      shootRocket->addSideAcc(xCor, yCor, zCor, LEFT);
-      shootRocket->addRotater(xCor, yCor, zCor);
-      //  if (shootRocket->inhibitor >=90)
-      //	shootRocket->inhibitor =0;
-    }
+  //  if (shootRocket->inhibitor++ >=80)
+  {
+    shootRocket->addBackParable(xCor, yCor, zCor);
+    shootRocket->addSideAcc(xCor, yCor, zCor, RIGHT);
+    shootRocket->addSideAcc(xCor, yCor, zCor, LEFT);
+    shootRocket->addRotater(xCor, yCor, zCor);
+    //  if (shootRocket->inhibitor >=90)
+    //        shootRocket->inhibitor =0;
+  }
   //cout << "Player::shoot" << endl;
+  
+  /*
+  shootLaser->addShoot(xCor, yCor, zCor);
+  shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0);
+  shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0);
+  //shootRocket->addShoot(xCor, yCor, zCor);
+  //cout << "Player::shoot" << endl;
+  */
 }
 
@@ -100,6 +115,7 @@
 
 
-void Player::drawPlayer(void) 
+void Player::paint() 
 {
+  //cout << "Player::drawPlayer" << endl;
   glPushMatrix();
   glTranslatef(xCor, yCor, 3.0);
@@ -110,5 +126,5 @@
   shootLaser->drawShoot();
   shootRocket->drawShoot();
-  //cout << "Player::drawPlayer" << endl;
+  //cout << "Player::drawPlayer, end" << endl;
 }
 
Index: orxonox/branches/chris/src/player.h
===================================================================
--- orxonox/branches/chris/src/player.h	(revision 2028)
+++ orxonox/branches/chris/src/player.h	(revision 2058)
@@ -3,12 +3,12 @@
 #define PLAYER_H
 
-/* openGL Headers */
-#include <GL/glut.h>
+#include "world_entity.h"
 
-#include "shoot_laser.h"
-#include "shoot_rocket.h"
-#include "data_tank.h"
+class ShootLaser;
+class ShootRocket;
 
-class Player {
+
+class Player : public WorldEntity 
+{
 
  public:
@@ -23,4 +23,5 @@
   float collisionRadius;
 
+
   /* this player wanna shoot? so include a ref to ShootLaser */
   ShootLaser* shootLaser;
@@ -30,4 +31,5 @@
   void getPosition(float* x, float* y, float* z);
   void setCollisionRadius(float radius);
+  void paint();
   void goX(float x);
   void goY(float y);
Index: orxonox/branches/chris/src/proto_class.h
===================================================================
--- orxonox/branches/chris/src/proto_class.h	(revision 2028)
+++ orxonox/branches/chris/src/proto_class.h	(revision 2058)
@@ -4,4 +4,5 @@
 
 #include "data_tank.h"
+
 
 class ProtoClass {
Index: orxonox/branches/chris/src/shoot_laser.cc
===================================================================
--- orxonox/branches/chris/src/shoot_laser.cc	(revision 2028)
+++ orxonox/branches/chris/src/shoot_laser.cc	(revision 2058)
@@ -17,8 +17,13 @@
 
 
-#include "shoot_laser.h"
 
+
+#include <GL/glut.h>
 #include <iostream>
 
+#include "stdincl.h"
+#include "data_tank.h"
+
+#include "shoot_laser.h"
 
 using namespace std;
@@ -134,4 +139,5 @@
   cout << "ShootLaser::setShootStep to " << step << endl;
   this->step = step;
+  cout << "ShootLaser::setShootStep end " << step << endl;
 }
 
Index: orxonox/branches/chris/src/shoot_laser.h
===================================================================
--- orxonox/branches/chris/src/shoot_laser.h	(revision 2028)
+++ orxonox/branches/chris/src/shoot_laser.h	(revision 2058)
@@ -3,12 +3,6 @@
 #define SHOOT_LASER_H
 
-/* openGL Headers */
-#include <GL/glut.h>
-
-#include "stdincl.h"
-#include "data_tank.h"
 
 class ShootLaser {
-
 
  public:
Index: orxonox/branches/chris/src/shoot_rocket.cc
===================================================================
--- orxonox/branches/chris/src/shoot_rocket.cc	(revision 2028)
+++ orxonox/branches/chris/src/shoot_rocket.cc	(revision 2058)
@@ -17,8 +17,13 @@
 
 
+#include <iostream>
+#include <math.h>
+#include <GL/glut.h>
+
+#include "stdincl.h"
+#include "data_tank.h"
+#include "npc.h"
+
 #include "shoot_rocket.h"
-
-#include <iostream>
-
 
 using namespace std;
Index: orxonox/branches/chris/src/shoot_rocket.h
===================================================================
--- orxonox/branches/chris/src/shoot_rocket.h	(revision 2028)
+++ orxonox/branches/chris/src/shoot_rocket.h	(revision 2058)
@@ -3,17 +3,11 @@
 #define SHOOT_ROCKET_H
 
-/* openGL Headers */
-#include <GL/glut.h>
-#include <math.h>
 
-#include "stdincl.h"
-#include "data_tank.h"
-#include "npc.h"
 
 enum RocketType { HOMING, SIDEACC, BACKPARABLE, ROTATER};
 enum RocketDirection {LEFT, RIGHT, UP, DOWN};
 
+
 class ShootRocket {
-
 
  public:
Index: orxonox/branches/chris/src/synchronisable.cc
===================================================================
--- orxonox/branches/chris/src/synchronisable.cc	(revision 2058)
+++ orxonox/branches/chris/src/synchronisable.cc	(revision 2058)
@@ -0,0 +1,32 @@
+
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+*/
+
+
+#include "synchronisable.h"
+
+
+using namespace std;
+
+
+
+Synchronisable::Synchronisable () {}
+
+
+
+Synchronisable::~Synchronisable () {}
+
+
Index: orxonox/branches/chris/src/synchronisable.h
===================================================================
--- orxonox/branches/chris/src/synchronisable.h	(revision 2058)
+++ orxonox/branches/chris/src/synchronisable.h	(revision 2058)
@@ -0,0 +1,24 @@
+
+#ifndef SYNCHRONISABLE_H
+#define SYNCHRONISABLE_H
+
+#include "data_tank.h"
+
+
+class Synchronisable {
+
+ public:
+  Synchronisable ();
+  ~Synchronisable ();
+
+  struct worldEntityState {
+    /*Vector position; */
+    /*Vector orientation; */
+  };
+
+  worldEntityState* getState();
+  void setState(worldEntityState*);
+
+};
+
+#endif
Index: orxonox/branches/chris/src/world.cc
===================================================================
--- orxonox/branches/chris/src/world.cc	(revision 2028)
+++ orxonox/branches/chris/src/world.cc	(revision 2058)
@@ -15,8 +15,19 @@
 */
 
+#include <iostream>
+#include <stdlib.h>
+#include <cmath>
+#include <GL/glut.h>
+
+#include "npc.h"
+#include "player.h"
+#include "environment.h"
+#include "shoot_laser.h"
+#include "shoot_rocket.h"
+#include "stdincl.h"
+#include "data_tank.h"
 
 #include "world.h"
 
-#include <iostream>
 
 using namespace std;
@@ -174,4 +185,5 @@
 void World::drawWorld(void) 
 {
+
   glLoadIdentity();
   gluLookAt(0.0, -14.0 + DataTank::yOffset, 15.0, 0.0, 0.0 + DataTank::yOffset, 0.0, 0.0, 1.0, 0.0);
@@ -181,5 +193,5 @@
   while( tmpPlayer != null ) 
     {
-      (*tmpPlayer->player).drawPlayer();
+      tmpPlayer->player->paint();
       tmpPlayer = tmpPlayer->next;
     }
@@ -188,5 +200,5 @@
   while( tmpNPC != null )
     {
-      (*tmpNPC->npc).drawNPC();
+      (*tmpNPC->npc).paint();
       tmpNPC = tmpNPC->next;
     }
@@ -235,5 +247,5 @@
     }
 
-  
+
 }
 
@@ -254,6 +266,7 @@
 void World::setWorldStep(float step)
 {
+  //cout << "World::setWorldStep(" << step << ");" << endl;
   this->step = step;
-  cout << "setting speed to " << step << endl;
+  //cout << "setting speed to " << step << endl;
 }
 
Index: orxonox/branches/chris/src/world.h
===================================================================
--- orxonox/branches/chris/src/world.h	(revision 2028)
+++ orxonox/branches/chris/src/world.h	(revision 2058)
@@ -1,18 +1,10 @@
-
-
 
 #ifndef WORLD_H
 #define WORLD_H
 
-#include <stdlib.h>
-#include <cmath>
+class Player;
+class NPC;
+class Environment;
 
-#include "npc.h"
-#include "player.h"
-#include "environment.h"
-#include "shoot_laser.h"
-#include "shoot_rocket.h"
-#include "stdincl.h"
-#include "data_tank.h"
 
 class World {
Index: orxonox/branches/chris/src/world_entity.cc
===================================================================
--- orxonox/branches/chris/src/world_entity.cc	(revision 2058)
+++ orxonox/branches/chris/src/world_entity.cc	(revision 2058)
@@ -0,0 +1,171 @@
+
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+*/
+
+#include <iostream>
+
+#include "world_entity.h"
+
+#include "vector.h"
+
+using namespace std;
+
+
+/**
+   \brief 
+   \param v:
+   \return 
+*/
+
+/**
+   \brief Constructor
+
+   This Constructor initializises the all WorldEntities. Everything, that is a part of the game-world is a child of WorldEntity. This class implements empty functions for all sort of operation a WorldEntity has to or can implement.
+This is some sort of standard interface to all WorldEntities...
+*/
+WorldEntity::WorldEntity () 
+{
+  health = 100;
+  speed = 0;
+}
+
+
+WorldEntity::~WorldEntity () {}
+
+/**
+   \brief sets the position of this entity
+   \param position: Vector, pointing (from 0,0,0) to the new position
+*/
+void WorldEntity::setPosition(Vector* position) {} 
+
+/**
+   \brief gets the postion of this entity
+   \return a Vector, pointing (from 0,0,0) to the new position
+*/
+Vector* getPosition() {}
+
+/**
+   \brief sets orientation of this entity
+   \param orientation: vector specifying in which direction the entity looks
+*/
+void WorldEntity::setOrientation(Vector* orientation) {}
+
+/**
+   \brief gets orientation of this entity
+   \return vector specifying in which direction the entity looks
+*/
+Vector* WorldEntity::getOrientation() {}
+
+/**
+   \brief sets the speed of the entity, if any
+   \param speed: the speed in points (openGL points) per seconds
+*/
+void WorldEntity::setSpeed(float speed)
+{
+  this->speed = speed;
+}
+
+/**
+   \brief gets the speed of the entity, if any
+   \return the speed in points (openGL points) per seconds
+*/
+float WorldEntity::getSpeed()
+{
+  return speed;
+}
+
+/**
+   \brief sets the health of the entity
+   \param health: number for the life count, normaly {0..100}
+*/
+void WorldEntity::setHealth(float health)
+{
+  this->health = health;
+}
+
+/**
+   \brief gets the health of the entity
+   \return number for the life count, normaly {0..100}
+*/
+float WorldEntity::getHealth()
+{
+  return health;
+}
+
+/**
+   \brief this method is called every tick
+   \param time: the time since start of the world
+
+   This function is called before every repaint of the world, to update every time dependent variable of the entity. If the entity moves, it has to calculate the new position every tick here in this function. Do not use this for animations.
+*/
+void WorldEntity::tick(float time) 
+{}
+
+/**
+   \brief the entity is painted to the screen with this function
+
+   This is a central function of an entity: call it to let the entity painted to the screen. Just override this function with whatever you want to be drawn.
+*/
+void WorldEntity::paint() 
+{
+  cout << "WorldEntity::paint()" << endl;
+}
+
+/* virtual void WorldEntity::actionEvent(Event* event); */
+/**
+   \brief this function is called, when two entities collide
+   \param we: the world entity, with whom it collides
+   \param loc: place where the collision happens
+*/
+void WorldEntity::collide(WorldEntity* we, Vector loc) {}
+
+/**
+   \brief this function is called, when the ship is hit by a waepon
+   \param weapon: the laser/rocket/shoot that hits.
+   \param loc: place where it is hit
+
+   calculate the damage depending
+*/
+void WorldEntity::hit(WorldEntity* weapon, Vector loc) {}
+
+/**
+   \brief this function is called, if the entity is to be destroied
+   
+   This can be called, if eg. something realy bad happens :)
+*/
+void WorldEntity::destroy() {}
+
+/**
+   \brief this function is automatically called before the entity enters the world
+*/
+void WorldEntity::entityPreEnter() {}
+
+/**
+   \brief this function is automatically called after the entity enters the world
+
+*/
+void WorldEntity::entityPostEnter() {}
+
+/**
+   \brief this function is automatically called before the entity quits the world
+
+*/
+void WorldEntity::entityPreQuit() {}
+
+/**
+   \brief this function is automatically called after the entity quits the world
+*/
+void WorldEntity::entityPostQuit() {}
Index: orxonox/branches/chris/src/world_entity.h
===================================================================
--- orxonox/branches/chris/src/world_entity.h	(revision 2058)
+++ orxonox/branches/chris/src/world_entity.h	(revision 2058)
@@ -0,0 +1,57 @@
+
+#ifndef WORLD_ENTITY_H
+#define WORLD_ENTITY_H
+
+#include "data_tank.h"
+
+class Vector;
+class Ability;
+
+class WorldEntity {
+
+ public:
+  WorldEntity ();
+  ~WorldEntity ();
+
+
+  void setPosition(Vector* position);
+  Vector* getPosition();
+  void setOrientation(Vector* orientation);
+  Vector* getOrientation();
+  void setSpawnPoint(Vector* place);
+  void setSpeed(float speed);
+  float getSpeed();
+  void setHealth(float health);
+  float getHealth();
+
+  void addAbility(Ability* ability);
+  void removeAbility(Ability* ability);
+
+  virtual void tick(float time);
+  virtual void paint();
+  /* virtual void actionEvent(Event* event); */
+  virtual void collide(WorldEntity* we, Vector loc);
+  virtual void hit(WorldEntity* weapon, Vector loc);
+  virtual void destroy();
+
+  virtual void entityPreEnter();
+  virtual void entityPostEnter();
+  virtual void entityPreQuit();
+  virtual void entityPostQuit();
+
+ 
+
+ private:
+  Vector* position;
+  Vector* orientation;
+  /* List of abilities */ 
+  float health;
+  float speed;
+  /* entity can be in the air or at ground: */
+  int airGround;
+
+  
+
+};
+
+#endif
