Index: /orxonox/trunk/README
===================================================================
--- /orxonox/trunk/README	(revision 1895)
+++ /orxonox/trunk/README	(revision 1896)
@@ -20,4 +20,5 @@
 1) Alien is a great film
 2) Guiness is the most delicious beer
+3) If you think there is anything missing: you can be shure it's an arcade game
 
 to be continoued...
Index: /orxonox/trunk/ToDo
===================================================================
--- /orxonox/trunk/ToDo	(revision 1895)
+++ /orxonox/trunk/ToDo	(revision 1896)
@@ -1,2 +1,9 @@
+
+
+
+orxonox:
+--------
+
+- perspective change: smooth glide back in zero mode (pb)
 
 
Index: /orxonox/trunk/core/Makefile
===================================================================
--- /orxonox/trunk/core/Makefile	(revision 1895)
+++ /orxonox/trunk/core/Makefile	(revision 1896)
@@ -41,5 +41,6 @@
 	world.o \
 	input_output.o \
-	environment.o
+	environment.o \
+	shoot_laser.o
 
 TARGET = orxonox
Index: /orxonox/trunk/core/environment.cc
===================================================================
--- /orxonox/trunk/core/environment.cc	(revision 1895)
+++ /orxonox/trunk/core/environment.cc	(revision 1896)
@@ -35,14 +35,4 @@
 	                                         
 	}
-    }
-
- for (int x = 0; x < 10; x++)
-    {
-      for (int y = 0; y < 10; y++)
-	{
-	  cout << " " << mountainTest[x][y] << " ";
-	  
-	}
-      cout << endl;
     }
 }
Index: /orxonox/trunk/core/environment.h
===================================================================
--- /orxonox/trunk/core/environment.h	(revision 1895)
+++ /orxonox/trunk/core/environment.h	(revision 1896)
@@ -3,6 +3,6 @@
 #include <stdlib.h>
 
-#ifndef PROTO_CLASS_H
-#define PROTO_CLASS_H
+#ifndef ENVIRONEMENT_H
+#define ENVIRONEMENT_H
 
 
Index: /orxonox/trunk/core/input_output.cc
===================================================================
--- /orxonox/trunk/core/input_output.cc	(revision 1895)
+++ /orxonox/trunk/core/input_output.cc	(revision 1896)
@@ -43,4 +43,5 @@
 void InputOutput::goUp() 
 {
+  //cout << "InoutOutput::goUp" << endl;
   (*player).goY(STEP_FRONT);
 }
Index: /orxonox/trunk/core/input_output.h
===================================================================
--- /orxonox/trunk/core/input_output.h	(revision 1895)
+++ /orxonox/trunk/core/input_output.h	(revision 1896)
@@ -10,5 +10,5 @@
 
 #define STEP_SIDE 0.4
-#define STEP_FRONT 0.2
+#define STEP_FRONT 0.4
 
 class InputOutput {
Index: /orxonox/trunk/core/npc.cc
===================================================================
--- /orxonox/trunk/core/npc.cc	(revision 1895)
+++ /orxonox/trunk/core/npc.cc	(revision 1896)
@@ -21,10 +21,9 @@
 #include <iostream>
 
+
 using namespace std;
 
 
 NPC::NPC () {}
-
-
 
 NPC::~NPC () {}
@@ -43,4 +42,15 @@
 }
 
+void NPC::setCollisionRadius(int r) 
+{
+  collisionRadius = r;
+}
+
+float NPC::getCollisionRadius() 
+{
+  return collisionRadius;
+}
+
+
 
 void NPC::drawNPC(void) 
Index: /orxonox/trunk/core/npc.h
===================================================================
--- /orxonox/trunk/core/npc.h	(revision 1895)
+++ /orxonox/trunk/core/npc.h	(revision 1896)
@@ -13,4 +13,6 @@
   void setPosition(int x, int y, int z);
   void getPosition(int* x, int* y, int* z);
+  void setCollisionRadius(int r);
+  float getCollisionRadius();
 
  private:
@@ -18,4 +20,7 @@
 
   int npcType;
+
+  /* collision control */
+  int collisionRadius;
 
   int xCor;
Index: /orxonox/trunk/core/orxonox.cc
===================================================================
--- /orxonox/trunk/core/orxonox.cc	(revision 1895)
+++ /orxonox/trunk/core/orxonox.cc	(revision 1896)
@@ -26,5 +26,4 @@
 /* class definition header */
 #include "orxonox.h"
-#include "environment.h"
 
 
@@ -50,4 +49,5 @@
 World* Orxonox::world = 0;
 InputOutput* Orxonox::io = 0;
+Player* Orxonox::localPlayer = 0;
 bool Orxonox::pause = false;
 bool Orxonox::upWeGo = false;
@@ -55,4 +55,5 @@
 bool Orxonox::rightWeGo = false;
 bool Orxonox::leftWeGo = false;
+bool Orxonox::shoot1 = false;
 int Orxonox::alpha = 0;
 int Orxonox::beta = 0;
@@ -82,4 +83,5 @@
   glutReshapeFunc(reshape);
   glutKeyboardFunc(keyboard);
+  glutKeyboardUpFunc(upKeyboard);
 }
 
@@ -96,17 +98,15 @@
   world = new World;
   (*world).initEnvironement();
-  Player* localPlayer = new Player;
+  localPlayer = new Player;
   io = new InputOutput(world, localPlayer);
   (*world).addPlayer(localPlayer);
   Environment *env = new Environment;
   (*world).addEnv(env);
-  
 
   glutSpecialFunc(specFunc); 
   glutSpecialUpFunc(releaseKey);
 
-  //for testing purps only
-  //testTheShit();
   glutIdleFunc(continousRedraw);
+  //cout << "Orxonox::gameInit" << endl;
 }
 
@@ -131,5 +131,4 @@
 
     /* game controls */
-
   case 'p':
     if (pause) 
@@ -146,4 +145,7 @@
       }
     break;
+  case 32:
+    shoot1 = true;
+    break;
   case 27:
   case 'q':
@@ -154,10 +156,17 @@
 
 
+void Orxonox::upKeyboard(unsigned char key, int x, int y) 
+{
+  switch(key) {
+  case 32:
+    shoot1 = false;
+    break;
+  }
+}
+
+
 void Orxonox::quitGame() 
 {
-  //glutIgnoreKeyRepeat(0);                 /* for win32 */
-  //glutSetKeyRepeat(GLUT_KEY_REPEAT_DEFAULT); /*do not remove or you will have
-  //					  no repeating keys anymore...*/
-  cout << "finished garbage colletion, quitting..." << endl;
+  //cout << "finished garbage colletion, quitting..." << endl;
   exit(0);
 }
@@ -191,7 +200,5 @@
 {
   switch(key) {
-
     /* spacecraft controls */
-    
   case GLUT_KEY_UP:
     upWeGo = true;
@@ -226,5 +233,5 @@
 {
   /* check for input to pass it over */
-  if ( !pause && (rightWeGo || leftWeGo || upWeGo || downWeGo)) {
+  if ( !pause && (rightWeGo || leftWeGo || upWeGo || downWeGo || shoot1)) {
     if (upWeGo)
       (*io).goUp();
@@ -235,9 +242,10 @@
     if (leftWeGo)
       (*io).goLeft();
+    if (shoot1) 
+      (*io).shoot();
   }
   /* request repaint */
-
-  //cout << "contiousRedraw" << endl;
   glutPostRedisplay();
+  //cout << "Orxonox::continousRedraw" << endl;
 }
 
@@ -248,7 +256,5 @@
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
-  //glOrtho(-50.0, 50.0, -50.0, 50.0, -1.0, 1.0); pb: //simple and working
   glFrustum(-1.0, 1.0, -1.0, 1.0, 1.5, 200.0);
-  //glFrustum(-10.0, 10.0, -5.0, 10.0, 0.0, 100.0);
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity(); //pb why a second time?
Index: /orxonox/trunk/core/orxonox.h
===================================================================
--- /orxonox/trunk/core/orxonox.h	(revision 1895)
+++ /orxonox/trunk/core/orxonox.h	(revision 1896)
@@ -12,9 +12,11 @@
 #include <GL/glut.h>
 
+
+#include "environment.h"
 #include "world.h"
 #include "input_output.h"
 #include "data_tank.h"
 #include "stdincl.h"
-
+#include "player.h"
 
 
@@ -27,4 +29,5 @@
   static World* world;
   static InputOutput* io;
+  static Player* localPlayer;
   static bool pause;
   static bool upWeGo;
@@ -32,4 +35,5 @@
   static bool rightWeGo;
   static bool leftWeGo;
+  static bool shoot1;
 
   static int alpha;
@@ -50,4 +54,5 @@
   static void reshape (int w, int h);
   static void keyboard(unsigned char key, int x, int y);
+  static void upKeyboard(unsigned char key, int x, int y);
   static void releaseKey(int key, int x, int y);
   static void specFunc(int key, int x, int y);
Index: /orxonox/trunk/core/player.cc
===================================================================
--- /orxonox/trunk/core/player.cc	(revision 1895)
+++ /orxonox/trunk/core/player.cc	(revision 1896)
@@ -20,4 +20,5 @@
 #include <iostream>
 
+
 using namespace std;
 
@@ -25,9 +26,11 @@
 Player::Player () {
   xCor = yCor = zCor = 0;
+  shootLaser = new ShootLaser;
 }
 
-
-
-Player::~Player () {}
+Player::~Player () 
+{
+  //delete shootLaser;
+}
 
 
@@ -37,5 +40,6 @@
 }
 
-void Player::getPosition(float* x, float* y, float* z) 
+
+void Player::getPosition(float* x, float* y, float* z)
 {
   *x = xCor; *y = yCor; *z = zCor;
@@ -44,4 +48,5 @@
 void Player::goX(float x) 
 {
+  //cout << "Player::goX" << endl;
   xCor += x;
 }
@@ -58,5 +63,8 @@
 }
 
-void Player::shoot(int n) {
+void Player::shoot(int n) 
+{
+  shootLaser->addShoot(xCor, yCor, zCor);
+  //cout << "Player::shoot" << endl;
 }
 
@@ -67,15 +75,37 @@
 void Player::drawPlayer(void) 
 {
-  //cout << "Player::drawPlayer()" << endl;
-  //glColor3f(0.0, 0.9, 0.7);
-  //glRectf(-0.5 + yCor, -0.5 + xCor, 0.5 + yCor, 2.0 + xCor);
-
   glPushMatrix();
+  glTranslatef(xCor, yCor, 3.0);
   glScalef(1.0, 3.0, 1.0);
-  glTranslatef(xCor, yCor, 3.0);
   glutWireCube(1.0);
   glPopMatrix();
+  /* draw all the shoots additionaly */
+  shootLaser->drawShoot();
+  //cout << "Player::drawPlayer" << endl;
+}
 
 
-  //cout << "x: " << xCor << " y: " << yCor << endl;
-}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /orxonox/trunk/core/player.h
===================================================================
--- /orxonox/trunk/core/player.h	(revision 1895)
+++ /orxonox/trunk/core/player.h	(revision 1896)
@@ -6,5 +6,6 @@
 #include <GL/glut.h>
 
-//#include "input_output.h"
+#include "shoot_laser.h"
+//#include "world.h"
 
 class Player {
@@ -24,5 +25,5 @@
 
  private:
-  /* position of the space craft */
+  /* position of the spacecraft */
   float xCor;
   float yCor;
@@ -30,5 +31,6 @@
 
 
-
+  /* this player wanna shoot? so include a ref to ShootLaser */
+  ShootLaser* shootLaser;
 };
 
Index: /orxonox/trunk/core/shoot_laser.cc
===================================================================
--- /orxonox/trunk/core/shoot_laser.cc	(revision 1896)
+++ /orxonox/trunk/core/shoot_laser.cc	(revision 1896)
@@ -0,0 +1,72 @@
+
+
+/* 
+   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 "shoot_laser.h"
+
+#include <iostream>
+
+
+using namespace std;
+
+
+
+ShootLaser::ShootLaser () 
+{
+  lastShoot = null;
+}
+
+
+ShootLaser::~ShootLaser () {}
+
+
+void ShootLaser::drawShoot() 
+{
+
+  //cout << "ShootLaser::drawShoot" << endl;
+  /* now draw all the shoots (many) */
+  shoot* tmpShoot = lastShoot;
+  while( tmpShoot != null )
+    {
+      glPushMatrix(); 
+      glTranslatef(tmpShoot->xCor, tmpShoot->yCor, tmpShoot->zCor);
+      tmpShoot->yCor+=tmpShoot->yInc;
+      glScalef(0.1, 0.1, 0.1);
+      glutWireCube(1.0);
+      glPopMatrix();
+      tmpShoot = tmpShoot->next;
+    }
+  //cout << "ShootLaser::drawShoot - finished" << endl;
+}
+
+
+void ShootLaser::addShoot(shoot* sh) 
+{
+  sh->next = null;
+  lastShoot = sh;
+}
+
+void ShootLaser::addShoot(float x, float y, float z) 
+{
+  //cout << "ShootLaser::addShoot" << endl;
+  shoot* sh = new shoot;
+  sh->xCor = x; sh->yCor = y; sh->zCor = z;
+  sh->xInc = 0; sh->yInc = .2; sh->zInc = 0;
+  sh->next = lastShoot;
+  lastShoot = sh;
+}
+
Index: /orxonox/trunk/core/shoot_laser.h
===================================================================
--- /orxonox/trunk/core/shoot_laser.h	(revision 1896)
+++ /orxonox/trunk/core/shoot_laser.h	(revision 1896)
@@ -0,0 +1,39 @@
+
+#ifndef SHOOT_LASER_H
+#define SHOOT_LASER_H
+
+/* openGL Headers */
+#include <GL/glut.h>
+
+#include "stdincl.h"
+
+class ShootLaser {
+
+
+ public:
+  
+  /* a list of all shoot-amental objects */
+  struct shoot {
+    shoot *next;
+    float xCor;
+    float yCor;
+    float zCor;    
+    float xInc;
+    float yInc;
+    float zInc;
+    float collisionRadius;
+  };
+
+  ShootLaser ();
+  ~ShootLaser ();
+
+  void drawShoot();
+  void addShoot(shoot* sh);
+  void addShoot(float x, float y, float z);
+
+
+ private:
+  shoot* lastShoot;
+};
+
+#endif
Index: /orxonox/trunk/core/world.cc
===================================================================
--- /orxonox/trunk/core/world.cc	(revision 1895)
+++ /orxonox/trunk/core/world.cc	(revision 1896)
@@ -33,4 +33,5 @@
   lastNPC = null;
   lastEnv = null;
+  lastShoot = null;
 }
 
@@ -128,5 +129,29 @@
 
 /** 
-   \brief Remove Non-Player-Character
+   \brief Add environmental object
+   \param player A reference to the new env object
+   
+   Add a new Environment to the world. Env has to be initialised before.
+*/
+bool World::addShoot(ShootLaser* shoot) 
+{
+  shootList* listMember = new shootList;
+  listMember->shoot = shoot;
+  if ( lastShoot != null ) 
+    {
+      listMember->number = lastShoot->number + 1;
+      listMember->next = lastShoot;
+    }
+  else 
+    {
+      listMember->number = 0;
+      listMember->next = null;
+    }
+  lastShoot = listMember;
+}
+
+
+/** 
+   \brief Remove Non-Player Character
    \param player A reference to the new npc object
    
@@ -162,5 +187,4 @@
     }
   /* now draw the rest of the world: environement */
-  /* second draw all npcs */
   envList* tmpEnv = lastEnv;
   while( tmpEnv != null )
@@ -169,24 +193,11 @@
       tmpEnv = tmpEnv->next;
     }
-
-  /*
-  glColor3f(0.0, 1.0, 0.0);
-  glBegin(GL_LINES);
-  for (int x = 0; x <= 35; x += 5)
-    {
-      glVertex3f((float)x, -10.0, 0.0);
-      glVertex3f((float)x, 200.0, 0.0);
-
-      glVertex3f(-(float)x, -10.0, 0.0);
-      glVertex3f(-(float)x, 200.0, 0.0);
-    }
-  for (int x = -10; x<= 200; x += 5)
-    {
-      glVertex3f(-50.0, (float)x, 0.0);
-      glVertex3f(50.0, (float)x, 0.0);
-    }
-  glEnd();
-  */
-  
+  /* now draw all the shoots (many) */
+  shootList* tmpShoot = lastShoot;
+  while( tmpShoot != null )
+    {
+      (*tmpShoot->shoot).drawShoot();
+      tmpShoot = tmpShoot->next;
+    }
   
   glColor3f(0.0, 1.0, 0.0);
Index: /orxonox/trunk/core/world.h
===================================================================
--- /orxonox/trunk/core/world.h	(revision 1895)
+++ /orxonox/trunk/core/world.h	(revision 1896)
@@ -10,4 +10,5 @@
 #include "player.h"
 #include "environment.h"
+#include "shoot_laser.h"
 #include "stdincl.h"
 
@@ -47,12 +48,20 @@
   envList* lastEnv;
 
+  /* a list of all shoot-amental objects */
+  struct shootList {
+    shootList* next;
+    ShootLaser* shoot;
+    int number;
+  };
+  shootList* lastShoot;
+
+
   bool addPlayer(Player* player);
   bool removePlayer(Player* player);
   Player* getLocalPlayer();
-
   bool addNPC(NPC* npc);
   bool removeNPC(NPC* npc);
-
   bool addEnv(Environment* env);
+  bool addShoot(ShootLaser* shoot);
 
   void drawWorld(void);
Index: /orxonox/trunk/gui/Makefile
===================================================================
--- /orxonox/trunk/gui/Makefile	(revision 1895)
+++ /orxonox/trunk/gui/Makefile	(revision 1896)
@@ -74,5 +74,5 @@
 clean:
 	rm -rf *.o *~
-	rm $(TARGET)
+	rm -f $(TARGET)
 
 ####compile
