Index: /orxonox/trunk/src/Makefile.am
===================================================================
--- /orxonox/trunk/src/Makefile.am	(revision 3435)
+++ /orxonox/trunk/src/Makefile.am	(revision 3436)
@@ -37,5 +37,6 @@
 		 curve.cc \
 		 glmenu_imagescreen.cc \
-		 skysphere.cc
+		 skysphere.cc \
+		 light.cc
 
 noinst_HEADERS = ability.h \
@@ -79,5 +80,6 @@
 		 glmenu_imagescreen.h \
 		 debug.h \
-		 skysphere.h
+		 skysphere.h \
+		 light.h
 
 ## orxonox.conf will be used from home-dir instead.
Index: /orxonox/trunk/src/Makefile.in
===================================================================
--- /orxonox/trunk/src/Makefile.in	(revision 3435)
+++ /orxonox/trunk/src/Makefile.in	(revision 3436)
@@ -64,5 +64,5 @@
 	helper_parent.$(OBJEXT) track_manager.$(OBJEXT) \
 	matrix.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) \
-	skysphere.$(OBJEXT)
+	skysphere.$(OBJEXT) light.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
 orxonox_LDADD = $(LDADD)
@@ -81,9 +81,10 @@
 @AMDEP_TRUE@	./$(DEPDIR)/helper_parent.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/list.Po ./$(DEPDIR)/material.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/matrix.Po ./$(DEPDIR)/model.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/objModel.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/p_node.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/player.Po ./$(DEPDIR)/skysphere.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/light.Po ./$(DEPDIR)/list.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/material.Po ./$(DEPDIR)/matrix.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/model.Po ./$(DEPDIR)/null_parent.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/objModel.Po ./$(DEPDIR)/orxonox.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/p_node.Po ./$(DEPDIR)/player.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/skysphere.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/texture.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/track_manager.Po ./$(DEPDIR)/vector.Po \
@@ -246,5 +247,6 @@
 		 curve.cc \
 		 glmenu_imagescreen.cc \
-		 skysphere.cc
+		 skysphere.cc \
+		 light.cc
 
 noinst_HEADERS = ability.h \
@@ -288,5 +290,6 @@
 		 glmenu_imagescreen.h \
 		 debug.h \
-		 skysphere.h
+		 skysphere.h \
+		 light.h
 
 EXTRA_DIST = orxonox.conf
@@ -316,7 +319,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/Makefile
+	  $(AUTOMAKE) --foreign  src/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -384,4 +387,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ini_parser.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keynames.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/light.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
Index: /orxonox/trunk/src/console/Makefile.in
===================================================================
--- /orxonox/trunk/src/console/Makefile.in	(revision 3435)
+++ /orxonox/trunk/src/console/Makefile.in	(revision 3436)
@@ -203,7 +203,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/console/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/console/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/console/Makefile
+	  $(AUTOMAKE) --foreign  src/console/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /orxonox/trunk/src/gui/Makefile.in
===================================================================
--- /orxonox/trunk/src/gui/Makefile.in	(revision 3435)
+++ /orxonox/trunk/src/gui/Makefile.in	(revision 3436)
@@ -234,7 +234,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/gui/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/gui/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/gui/Makefile
+	  $(AUTOMAKE) --foreign  src/gui/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /orxonox/trunk/src/importer/Makefile.in
===================================================================
--- /orxonox/trunk/src/importer/Makefile.in	(revision 3435)
+++ /orxonox/trunk/src/importer/Makefile.in	(revision 3436)
@@ -215,7 +215,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/importer/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/importer/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/importer/Makefile
+	  $(AUTOMAKE) --foreign  src/importer/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: /orxonox/trunk/src/light.cc
===================================================================
--- /orxonox/trunk/src/light.cc	(revision 3436)
+++ /orxonox/trunk/src/light.cc	(revision 3436)
@@ -0,0 +1,126 @@
+
+
+/* 
+   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: Benjamin Grauer
+   co-programmer: ...
+*/
+
+
+#include "light.h"
+
+#include "glincl.h"
+
+using namespace std;
+
+
+/**
+   \brief standard constructor for a Light
+*/
+Light::Light () 
+{
+  this->init();
+}
+
+Light::Light(Vector position)
+{
+  this->init();
+  this->setPosition(position);
+}
+
+/**
+   \brief standard deconstructor
+   \todo this deconstructor is not jet implemented - do it
+
+*/
+Light::~Light () 
+{
+  glDisable(GL_LIGHTING);
+  glDisable(GL_LIGHT0);
+}
+
+/**
+   \brief initializes a new Light with default values, and enables GL_LIGHTING
+*/
+void Light::init()
+{
+  this->setClassName ("Light");
+  glEnable (GL_LIGHTING);
+  glEnable (GL_LIGHT0);
+  
+  this->setPosition(Vector(0.0, 0.0, 0.0));
+  this->setDiffuseColor(1.0, 1.0, 1.0);
+  this->setSpecularColor(1.0, 1.0, 1.0);
+  //  lmodelAmbient[] = {.1, .1, .1, 1.0};
+  
+}
+
+// set Attributes
+/**
+   \brief Sets a Position for the Light.
+   \param position The new position of the Light.
+   \todo patrick: is it ok to set a Light Position even if it is derived from p_node??
+*/
+void Light::setPosition(Vector position)
+{
+  this->lightPosition[0] = position.x;
+  this->lightPosition[1] = position.y;
+  this->lightPosition[2] = position.z;
+  this->lightPosition[3] = 0.0;
+
+  glLightfv (GL_LIGHT0, GL_POSITION, lightPosition);
+
+}
+
+/**
+   \brief sets an emitting Diffuse color for the Light
+   \param r red
+   \param g green
+   \param b blue
+*/
+void Light::setDiffuseColor(GLfloat r, GLfloat g, GLfloat b)
+{
+  this->diffuseColor[0] = r;
+  this->diffuseColor[1] = g;
+  this->diffuseColor[2] = b;
+  this->diffuseColor[3] = 1.0;
+
+  glLightfv (GL_LIGHT0, GL_DIFFUSE, diffuseColor);
+}
+
+
+/**
+   \brief sets an emitting Ambient color for the Light
+   \param r red
+   \param g green
+   \param b blue
+*/
+void Light::setSpecularColor(GLfloat r, GLfloat g, GLfloat b)
+{
+  this->specularColor[0] = r;
+  this->specularColor[1] = g;
+  this->specularColor[2] = b;
+  this->specularColor[3] = 1.0;
+
+  glLightfv (GL_LIGHT0, GL_SPECULAR, specularColor);
+}
+
+// get Attributes
+
+/**
+   \returns the Position of the Light
+*/
+Vector Light::getPosition(void)
+{
+  Vector tmpPosition(lightPosition[0], lightPosition[1], lightPosition[2]);
+  return tmpPosition;
+}
Index: /orxonox/trunk/src/light.h
===================================================================
--- /orxonox/trunk/src/light.h	(revision 3436)
+++ /orxonox/trunk/src/light.h	(revision 3436)
@@ -0,0 +1,48 @@
+/*! 
+    \file light.h
+    \brief Handles Lights.
+
+    A Light is one of the more important things in a 3D-environment,
+    without it one sees nothing :)
+    It is here for diffuse-, specular- and Bump-Mappings.
+*/
+
+#ifndef _LIGHT_H
+#define _LIGHT_H
+
+#include "world_entity.h"
+#include "glincl.h"
+
+// FORWARD DEFINITIONS //
+class Vector;
+
+//! A class that handles Lights
+/**
+   A Light is a source that emits light rays (photons)
+*/
+class Light : public WorldEntity 
+{
+  
+
+ public:
+  Light(void);
+  Light(Vector position);
+  ~Light(void);
+
+  // set Attributes
+  void setPosition(Vector position);
+  void setDiffuseColor(GLfloat r, GLfloat g, GLfloat b);
+  void setSpecularColor(GLfloat r, GLfloat g, GLfloat b);
+  
+  // get Attributes
+  Vector getPosition(void);
+ private:
+  GLfloat lightPosition[4];   //!< The Position of this Light
+  GLfloat lmodelAmbient[4];   //!< The general Ambient Color
+  GLfloat diffuseColor[4];    //!< The Diffuse Color this Light emmits
+  GLfloat specularColor[4];   //!< The specular Color of this Light
+
+  void init();
+};
+
+#endif /* _LIGHT_H */
Index: /orxonox/trunk/src/orxonox.cc
===================================================================
--- /orxonox/trunk/src/orxonox.cc	(revision 3435)
+++ /orxonox/trunk/src/orxonox.cc	(revision 3436)
@@ -173,25 +173,5 @@
   glClearColor (0.0, 0.0, 0.0, 0.0);
   glEnable (GL_DEPTH_TEST);
- 
-  // LIGHTING
-  GLfloat lmodelAmbient[] = {.1, .1, .1, 1.0};
-  GLfloat whiteLight[] = {1.0, 1.0, 1.0,1.0};
-  GLfloat lightPosition[] = {10.0, 10, 19.0, 0.0};
-
-  glLightfv (GL_LIGHT0, GL_DIFFUSE, whiteLight);
-  glLightfv (GL_LIGHT0, GL_SPECULAR, whiteLight);
-  glEnable (GL_LIGHTING);
-  glEnable (GL_LIGHT0);
-  glEnable (GL_DEPTH_TEST);
-  glLightfv (GL_LIGHT0, GL_POSITION, lightPosition);
-  glLightfv (GL_LIGHT0, GL_DIFFUSE, whiteLight);
    
-  //glEnable (GL_TEXTURE_2D); 
-  //  glEnable(GL_COLOR);
-  //  glShadeModel(GL_SMOOTH);
-  
-  // create camera
-  //localcamera = new Camera(world); /* \todo camera/input node not used anymore*/
-  
   return 0;
 }
Index: /orxonox/trunk/src/world.cc
===================================================================
--- /orxonox/trunk/src/world.cc	(revision 3435)
+++ /orxonox/trunk/src/world.cc	(revision 3436)
@@ -28,4 +28,5 @@
 #include "glmenu_imagescreen.h"
 #include "skysphere.h"
+#include "light.h"
 
 using namespace std;
@@ -171,4 +172,6 @@
 void World::load()
 {
+  light0 = new Light(Vector(10.0, 10.0, 19.0));
+
   //  BezierCurve* tmpCurve = new BezierCurve();
   if(this->debugWorldNr != -1)
Index: /orxonox/trunk/src/world.h
===================================================================
--- /orxonox/trunk/src/world.h	(revision 3435)
+++ /orxonox/trunk/src/world.h	(revision 3436)
@@ -17,4 +17,5 @@
 class GLMenuImageScreen;
 class Skysphere;
+class Light;
 
 //! The game environment
@@ -76,4 +77,5 @@
   SDL_Surface *loadImage;
   Skysphere* skySphere;
+  Light* light0;
 
   WorldEntity* localPlayer;
