Index: /branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.cc
===================================================================
--- /branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.cc	(revision 8078)
+++ /branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.cc	(revision 8079)
@@ -11,7 +11,8 @@
 ### File Specific:
 	main-programmer: hdavid, amaechler
+	Taken from SkySphere
 */
 
-// TODO: Vektortextur erzeugen und Regionen auswählen, Sky...
+// TODO: Vektortextur erzeugen und Regionen auswaehlen, Sky...
 
 #include "cloud_effect.h"
@@ -21,8 +22,9 @@
 
 #include "glincl.h"
-//#include "graphics_engine.h"
 #include "material.h"
 #include <math.h>
 #include "material.h"
+#include "state.h"
+#include "p_node.h"
 
 #include "parser/tinyxml/tinyxml.h"
@@ -47,5 +49,27 @@
 {
 	this->deactivate();
+
+	//delete this->skyMaterial;
+	//gluDeleteQuadric(this->sphereObj);
 }
+
+
+bool CloudEffect::init()
+{
+  PRINTF(1)("Initializing CloudEffect\n");
+
+  this->sphereObj = gluNewQuadric();
+  //this->setParentMode(PNODE_MOVEMENT);
+
+  gluQuadricTexture(this->sphereObj, GL_TRUE);
+  this->setRadius(2000.0);
+
+  mover = 0.0f;
+
+  // Initializing default values
+  this->cloudSpeed = 2.0f;
+	this->cloudTexture = "pictures/sky/cloud1.jpg";
+}
+
 
 void CloudEffect::loadParams(const TiXmlElement* root)
@@ -53,37 +77,19 @@
 	WeatherEffect::loadParams(root);
 
-	LoadParam(root, "animSpeed", this, CloudEffect, setCloudAnimation);
-
+	LoadParam(root, "speed", this, CloudEffect, setCloudAnimation);
+	LoadParam(root, "texture", this, CloudEffect, setCloudTexture);
 }
 
 
-bool CloudEffect::init()
-{
-	// default values
-	this->cloudAnimTimeStep = 0;
-
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-
-	glGenTextures(2, &texID[0]);
-
-	// Generate noise map a
-	//CloudEffect::genNoiseMap(cloudMap32_a);
-	
-	if (this->cloudAnimTimeStep > 0) {
-		// Generate noise map b
-		//CloudEffect::genNoiseMap(cloudMap32_b);
-	}
-
-  this->material = new Material();
-
-}
-
 bool CloudEffect::activate()
 {
-	PRINTF(0)( "Activating CloudEffect\n");
+	PRINTF(0)( "Activating CloudEffect with Material %s\n", this->cloudTexture.c_str());
 
+	this->cloudMaterial = new Material("Sky");
+  // this->setTexture(this->cloudTexture);
+  this->cloudMaterial->setIllum(3);
+  this->cloudMaterial->setAmbient(1.0, 1.0, 1.0);
+
+  this->cloudMaterial->setDiffuseMap(this->cloudTexture);
 
 }
@@ -103,36 +109,33 @@
 	*/
 
-	// glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
 
-  this->material->setDiffuseMap("maps/lightning_bolt.png");
-  this->material->select();
+  // Move sphere along with the camera
+  Vector r = State::getCameraNode()->getAbsCoor();
+  glTranslatef(r.x, r.y, r.z);
 
-	glPushMatrix();
- 	// glEnable(GL_TEXTURE_2D);
+	// Sky movement
+	glRotatef(mover, 1, 0, 0);
 
- 	// glBindTexture(GL_TEXTURE_2D, texID[0]);
-	PRINTF(0)("Draw tralala\n");
-
-	// FIXME : Bind this to the sky - how do I do this?
-	glBegin(GL_QUADS);
-		glTexCoord2f(0.0f, 0.0f);
-		glVertex3f(20, 20,  60);	// Bottom Left Of The Texture and Quad
-
-		glTexCoord2f(1.0f, 0.0f);
-		glVertex3f(60, 20,  60);	// Bottom Right Of The Texture and Quad
-
-		glTexCoord2f(1.0f, 1.0f);
-		glVertex3f(60, 60,  60);	// Top Right Of The Texture and Quad
-
-		glTexCoord2f(0.0f, 1.0f);
-		glVertex3f(20, 60,  60);	// Top Left Of The Texture and Quad
-	glEnd(); 
-
+  cloudMaterial->select();
+  gluSphere(this->sphereObj, this->sphereRadius, 20, 20);
   glPopMatrix();
-
 }
 
 void CloudEffect::tick (float dt)
 {
-	
+  mover = mover + this->cloudSpeed * dt;
 }
+
+
+/**
+ *  sets the Radius of the Sphere.
+ * @param radius The Radius of The Sphere
+*/
+void CloudEffect::setRadius(float radius)
+{
+  this->sphereRadius = radius;
+}
+
+
Index: /branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h
===================================================================
--- /branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h	(revision 8078)
+++ /branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h	(revision 8079)
@@ -6,7 +6,4 @@
 #define _CLOUD_EFFECT
 
-#include "vector.h"
-#include "vector2D.h"
-
 #include "weather_effect.h"
 
@@ -14,6 +11,9 @@
 #include "sound_source.h"
 
+#include "world_entity.h"
+#include "glincl.h"
+
 class Material;
-
+class Vector;
 
 class CloudEffect : public WeatherEffect
@@ -33,32 +33,20 @@
 		virtual void tick(float dt);
 
-		inline void setCloudAnimation(float timestep) { this->cloudAnimTimeStep = timestep; }
+		void setRadius(float radius);
+		void setTexture(char* fileName);
+
 
 	private:
-		// Basic noise maps 32x32
-		float 														cloudMap32_a[32 * 32];
-		float 														cloudMap32_b[32 * 32];
-		float 														cloudMap32_c[32 * 32];
+		void initialize(char* fileName);
 
-		// The cloud map 256x256
-		float 														cloudMap256[256 * 256];
+		GLUquadricObj*			sphereObj;							// A Placeholder for the SkySphere.
+		Material*						cloudMaterial;					// A Material for the SkySphere.
+		float								sphereRadius;						// Radius of the SkySphere.
+		float 							mover;
+		float								cloudSpeed;
+		std::string				cloudTexture;
 
-		// Temporary array to hold texture RGB values 
-		char 															cloudTexture[256][256][3];
-
-		GLuint 														texID[2];
-		float 														timer;
-
-		bool															cloudAnimTimeStep;
-
-		float 														noise(int x, int y, int random);
-		float 														interpolate(float x, float y, float  *map);
-		void  														overlapOctaves();
-		void  														expFilter();
-
-		void  														genNoiseMap(float  *map);
-		void  														genCloudTexture();
-		void  														calcAnimMap(float timer);
-		Material*	material;
+		inline void setCloudTexture(const std::string& file) { this->cloudTexture = file; }
+		inline void setCloudAnimation(float speed) { this->cloudSpeed = speed; }
 
 };
Index: /branches/atmospheric_engine/src/world_entities/space_ships/helicopter.cc
===================================================================
--- /branches/atmospheric_engine/src/world_entities/space_ships/helicopter.cc	(revision 8078)
+++ /branches/atmospheric_engine/src/world_entities/space_ships/helicopter.cc	(revision 8079)
@@ -217,5 +217,5 @@
   State::getCameraTargetNode()->setParentSoft(this->getWeaponManager().getFixedTarget());
 
-  this->soundSource.loop(this->chopperBuffer);
+  this->soundSource.loop(this->chopperBuffer, 0.8f);
   // PRINTF(0)( "Playing ChopperSound\n" );
 }
