Index: code/branches/main_reto_vs05/bin/Debug/Plugins.cfg
===================================================================
--- code/branches/main_reto_vs05/bin/Debug/Plugins.cfg	(revision 232)
+++ code/branches/main_reto_vs05/bin/Debug/Plugins.cfg	(revision 288)
@@ -8,7 +8,7 @@
 Plugin=RenderSystem_GL_d
 Plugin=Plugin_ParticleFX_d
-Plugin=Plugin_BSPSceneManager_d
-Plugin=Plugin_OctreeSceneManager_d
-Plugin=Plugin_CgProgramManager_d
+#Plugin=Plugin_BSPSceneManager_d
+#Plugin=Plugin_OctreeSceneManager_d
+#Plugin=Plugin_CgProgramManager_d
 
 
Index: code/branches/main_reto_vs05/bin/Debug/resources.cfg
===================================================================
--- code/branches/main_reto_vs05/bin/Debug/resources.cfg	(revision 232)
+++ code/branches/main_reto_vs05/bin/Debug/resources.cfg	(revision 288)
@@ -8,8 +8,11 @@
 FileSystem=../../media
 FileSystem=../../media/fonts
+FileSystem=../../media/gui
 FileSystem=../../media/materials/scripts
 FileSystem=../../media/materials/textures
 FileSystem=../../media/models
-FileSystem=../../media/gui
+FileSystem=../../media/overlay
+FileSystem=../../media/particle
 Zip=../../media/packs/cubemap.zip
 Zip=../../media/packs/skybox.zip
+Zip=../../media/packs/models.zip
Index: code/branches/main_reto_vs05/bin/Release/Plugins.cfg
===================================================================
--- code/branches/main_reto_vs05/bin/Release/Plugins.cfg	(revision 232)
+++ code/branches/main_reto_vs05/bin/Release/Plugins.cfg	(revision 288)
@@ -8,7 +8,7 @@
 Plugin=RenderSystem_GL
 Plugin=Plugin_ParticleFX
-Plugin=Plugin_BSPSceneManager
-Plugin=Plugin_OctreeSceneManager
-Plugin=Plugin_CgProgramManager
+#Plugin=Plugin_BSPSceneManager
+#Plugin=Plugin_OctreeSceneManager
+#Plugin=Plugin_CgProgramManager
 
 
Index: code/branches/main_reto_vs05/bin/Release/resources.cfg
===================================================================
--- code/branches/main_reto_vs05/bin/Release/resources.cfg	(revision 232)
+++ code/branches/main_reto_vs05/bin/Release/resources.cfg	(revision 288)
@@ -8,8 +8,11 @@
 FileSystem=../../media
 FileSystem=../../media/fonts
+FileSystem=../../media/gui
 FileSystem=../../media/materials/scripts
 FileSystem=../../media/materials/textures
 FileSystem=../../media/models
-FileSystem=../../media/gui
+FileSystem=../../media/overlay
+FileSystem=../../media/particle
 Zip=../../media/packs/cubemap.zip
 Zip=../../media/packs/skybox.zip
+Zip=../../media/packs/models.zip
Index: code/branches/main_reto_vs05/media/materials/scripts/Ogre.material
===================================================================
--- code/branches/main_reto_vs05/media/materials/scripts/Ogre.material	(revision 232)
+++ code/branches/main_reto_vs05/media/materials/scripts/Ogre.material	(revision 288)
@@ -118,2 +118,425 @@
 	}
 }
+
+
+
+material Orxonox/SuperEgg
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture superegg.png
+			}
+		}
+	}
+}
+
+material Orxonox/Shot
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture shot.png
+			}
+		}
+	}
+}
+
+
+material Orxonox/Red
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_check off
+			scene_blend 0.5 0.5
+			ambient 0 0 0 0.5
+
+			texture_unit
+			{
+				texture OrxonoxRED.png
+			}
+		}
+	}
+}
+
+
+material Orxonox/Black
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_check off
+			scene_blend 0.5 0.5
+			ambient 0 0 0 0.5
+
+			texture_unit
+			{
+				texture OrxonoxBlack.png
+			}
+		}
+	}
+}
+
+
+material Orxonox/BackGround
+{
+	technique
+	{
+		pass
+		{
+
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+			texture_unit
+			{
+				texture backGround.png
+			}
+		}
+	}
+}
+
+material Orxonox/EnergyBackground
+{
+	technique
+	{
+		pass
+		{
+
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+			texture_unit
+			{
+				texture EnergyBackground.png
+			}
+		}
+	}
+}
+
+material Orxonox/Clock
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture clock.png
+			}
+		}
+	}
+}
+
+material Orxonox/Gun
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture gun.png
+			}
+		}
+	}
+}
+
+material Orxonox/Man
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture man.png
+			}
+		}
+	}
+}
+
+material Orxonox/MapBackGround
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture MapBackGround.png
+			}
+		}
+	}
+}
+
+material Orxonox/MyShip
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture MyShip.png
+			}
+		}
+	}
+}
+
+material Orxonox/RacketBackground
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture RacketBackground.png
+			}
+		}
+	}
+}
+
+
+material Orxonox/TargetBackground
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture TargetBackground.png
+			}
+		}
+	}
+}
+
+material Orxonox/PrimarBackground
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture PrimarBackground.png
+			}
+		}
+	}
+}
+
+material Orxonox/PrimarSample
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture PrimarSample.png
+			}
+		}
+	}
+}
+
+material Orxonox/PrimarChoice
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture PrimarChoice.png
+			}
+		}
+	}
+}
+
+material Orxonox/RedPoint
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture RedPoint.png
+			}
+		}
+	}
+}
+
+material Orxonox/EnergyDistrBackground
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture EnergyDistrBackground.png
+			}
+		}
+	}
+}
+
+material Orxonox/ShildLeftTop
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture ShildLeftTop.png
+			}
+		}
+	}
+}
+
+material Orxonox/ShildRightTop
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture ShildRightTop.png
+			}
+		}
+	}
+}
+
+material Orxonox/ShildLeftBottom
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture ShildLeftBottom.png
+			}
+		}
+	}
+}
+
+material Orxonox/ShildRightBottom
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture ShildRightBottom.png
+			}
+		}
+	}
+}
+
+material Orxonox/TimeBackground
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture TimeBackground.png
+			}
+		}
+	}
+}
+
Index: code/branches/main_reto_vs05/media/materials/scripts/Ogre.material.asdf
===================================================================
--- code/branches/main_reto_vs05/media/materials/scripts/Ogre.material.asdf	(revision 288)
+++ code/branches/main_reto_vs05/media/materials/scripts/Ogre.material.asdf	(revision 288)
@@ -0,0 +1,119 @@
+
+material Ogre/Earring
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.5 0.5 0
+			diffuse 1 1 0
+
+			texture_unit
+			{
+				texture spheremap.png
+				colour_op_ex add src_texture src_current
+				colour_op_multipass_fallback one one
+				env_map spherical
+			}
+		}
+	}
+}
+material Ogre/Skin
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.7 0.7 0.7
+			cull_hardware none
+
+			texture_unit
+			{
+				texture GreenSkin.jpg
+				tex_address_mode mirror
+			}
+		}
+	}
+}
+material Ogre/Tusks
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.5 0.5 0.4
+			diffuse 1 1 0.8
+
+			texture_unit
+			{
+				texture dirt01.jpg
+				colour_op_ex add src_texture src_current
+				colour_op_multipass_fallback one one
+			}
+		}
+	}
+}
+material Ogre/Eyes
+{
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture WeirdEye.png
+			}
+		}
+	}
+}
+material Cursor/default
+{
+	technique
+	{
+		pass
+		{
+			scene_blend alpha_blend
+
+			texture_unit
+			{
+				texture cursor.png
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+material Core/StatsBlockBorder/Down
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture ogreborder.png
+			}
+		}
+	}
+}
+material Core/StatsBlockBorder/Up
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture ogreborderUp.png
+			}
+		}
+	}
+}
Index: code/branches/main_reto_vs05/media/materials/scripts/smoke.material
===================================================================
--- code/branches/main_reto_vs05/media/materials/scripts/smoke.material	(revision 288)
+++ code/branches/main_reto_vs05/media/materials/scripts/smoke.material	(revision 288)
@@ -0,0 +1,19 @@
+
+material Examples/Smoke
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_write off
+
+			texture_unit
+			{
+				texture smoke.png
+				tex_address_mode clamp
+			}
+		}
+	}
+}
Index: code/branches/main_reto_vs05/media/overlay/BasicOgreGuiTemplates.inc
===================================================================
--- code/branches/main_reto_vs05/media/overlay/BasicOgreGuiTemplates.inc	(revision 288)
+++ code/branches/main_reto_vs05/media/overlay/BasicOgreGuiTemplates.inc	(revision 288)
@@ -0,0 +1,47 @@
+// Ogre overlay scripts
+template container BorderPanel(SS/Templates/BasicBorderPanel)
+{
+	left 0
+	top 0
+	width 1
+	height 1
+	material Core/StatsBlockCenter
+    	border_size 0.06 0.06 0.06665 0.06665
+    	border_material Core/StatsBlockBorder
+    	border_topleft_uv     0.0000 0.0000 0.1914 0.2031
+	border_top_uv         0.1914 0.0000 0.8086 0.2031
+	border_topright_uv    0.8086 0.0000 1.0000 0.2031
+	border_left_uv        0.0000 0.2031 0.1914 0.7852
+	border_right_uv       0.8086 0.2031 1.0000 0.7852
+	border_bottomleft_uv  0.0000 0.7852 0.1914 1.0000
+        border_bottom_uv      0.1914 0.7852 0.8086 1.0000
+	border_bottomright_uv 0.8086 0.7852 1.0000 1.0000
+}
+
+template container BorderPanel(SS/Templates/BasicSmallBorderPanel) : SS/Templates/BasicBorderPanel
+{
+    border_size 0.04 0.04 0.04665 0.04665
+}
+
+
+template element TextArea(SS/Templates/BasicText)
+{
+	font_name Ogre
+	char_height 0.08
+	colour_top 1 1 0
+	colour_bottom 1 0.2 0.2
+	left 0.03
+	top 0.02
+	width 0.12
+	height 0.09
+}
+
+template container Panel(SS/Templates/BasicPanel)
+{
+	left 0 
+	top 0
+	width 1
+	height 1
+	material Core/StatsBlockCenter
+}
+
Index: code/branches/main_reto_vs05/media/overlay/Compositor.overlay
===================================================================
--- code/branches/main_reto_vs05/media/overlay/Compositor.overlay	(revision 288)
+++ code/branches/main_reto_vs05/media/overlay/Compositor.overlay	(revision 288)
@@ -0,0 +1,66 @@
+Example/CompositorOverlay
+{
+	zorder 500
+	// Stats block
+	container BorderPanel(Core/CompositorPanel)
+	{
+		metrics_mode pixels
+		vert_align top
+		left 5 
+		top 5
+		width 500
+		height 55
+		material Core/StatsBlockCenter
+        	border_size 1 1 1 1
+        	border_material Core/StatsBlockBorder
+        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
+	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
+	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
+	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
+	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
+	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
+        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
+	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
+
+
+		element TextArea(Example/Compositor/Desc)
+		{
+			metrics_mode pixels
+			left 5
+			top 5
+			width 180
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption Use keys 1-8 to toggle each compositor
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+		element TextArea(Example/Compositor/ActiveLabel)
+		{
+			metrics_mode pixels
+			left 5
+			top 20
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption Active Compositors:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+		element TextArea(Example/Compositor/ActiveText)
+		{
+			metrics_mode pixels
+			left 155
+			top 20
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption Current:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+	}
+}
Index: code/branches/main_reto_vs05/media/overlay/DP3.overlay
===================================================================
--- code/branches/main_reto_vs05/media/overlay/DP3.overlay	(revision 288)
+++ code/branches/main_reto_vs05/media/overlay/DP3.overlay	(revision 288)
@@ -0,0 +1,105 @@
+Example/DP3Overlay
+{
+	zorder 500
+	// Stats block
+	container BorderPanel(Core/DP3Panel)
+	{
+		metrics_mode pixels
+		vert_align top
+		left 5 
+		top 5
+		width 500
+		height 70
+		material Core/StatsBlockCenter
+        	border_size 1 1 1 1
+        	border_material Core/StatsBlockBorder
+        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
+	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
+	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
+	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
+	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
+	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
+        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
+	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
+
+		element TextArea(Example/DP3/Light)
+		{
+			metrics_mode pixels
+			left 5
+			top 5
+			width 180
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [1,2,3] toggle lights
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/DP3/Object)
+		{
+			metrics_mode pixels
+			left 5
+			top 20
+			width 180
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [O] change objects
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+		element TextArea(Example/DP3/ObjectInfo)
+		{
+			metrics_mode pixels
+			left 155
+			top 20
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption Current:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/DP3/Materials)
+		{
+			metrics_mode pixels
+			left 5
+			top 35
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [M] Change material
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+		element TextArea(Example/DP3/MaterialInfo)
+		{
+			metrics_mode pixels
+			left 155
+			top 35
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption Current:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+		element TextArea(Example/DP3/Info)
+		{
+			metrics_mode pixels
+			left 5
+			top 50
+			width 250
+			height 30
+			font_name BlueHighway
+			char_height 16
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+	}
+}
Index: code/branches/main_reto_vs05/media/overlay/Example-CubeMapping.overlay
===================================================================
--- code/branches/main_reto_vs05/media/overlay/Example-CubeMapping.overlay	(revision 288)
+++ code/branches/main_reto_vs05/media/overlay/Example-CubeMapping.overlay	(revision 288)
@@ -0,0 +1,139 @@
+Example/CubeMappingOverlay
+{
+	zorder 500
+	// Stats block
+	container BorderPanel(Core/CubeMappingPanel)
+	{
+		metrics_mode pixels
+		vert_align top
+		left 5 
+		top 5
+		width 250
+		height 130
+		material Core/StatsBlockCenter
+        	border_size 1 1 1 1
+        	border_material Core/StatsBlockBorder
+        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
+	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
+	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
+	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
+	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
+	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
+        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
+	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
+
+		element TextArea(Example/CubeMapping/Displacement)
+		{
+			metrics_mode pixels
+			left 5
+			top 5
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [1/2] Displacement:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/CubeMapping/Density)
+		{
+			metrics_mode pixels
+			left 5
+			top 20
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [3/4] Noise density:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/CubeMapping/TimeDensity)
+		{
+			metrics_mode pixels
+			left 5
+			top 35
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [5/6] Time density:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+
+		element TextArea(Example/CubeMapping/Noise)
+		{
+			metrics_mode pixels
+			left 5
+			top 50
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [N] Noise: _not_set_
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/CubeMapping/Material)
+		{
+			metrics_mode pixels
+			left 5
+			top 65
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [M] Material: *UNIMPLEMENTED*
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/CubeMapping/Object)
+		{
+			metrics_mode pixels
+			left 5
+			top 80
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [O] Object:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/CubeMapping/CubeMap)
+		{
+			metrics_mode pixels
+			left 5
+			top 95
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [C] CubeMap:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+		
+		element TextArea(Example/CubeMapping/Random)
+		{
+			metrics_mode pixels
+			left 5
+			top 110
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [SPACE] Go random!
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+	}
+}
Index: code/branches/main_reto_vs05/media/overlay/Example-DynTex.overlay
===================================================================
--- code/branches/main_reto_vs05/media/overlay/Example-DynTex.overlay	(revision 288)
+++ code/branches/main_reto_vs05/media/overlay/Example-DynTex.overlay	(revision 288)
@@ -0,0 +1,194 @@
+Example/DynTexOverlay
+{
+	zorder 500
+	// Stats block
+	container BorderPanel(Core/DynTexPanel)
+	{
+		metrics_mode pixels
+		vert_align top
+		left 5 
+		top 5
+		width 200
+		height 100
+		material Core/StatsBlockCenter
+        	border_size 1 1 1 1
+        	border_material Core/StatsBlockBorder
+        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
+	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
+	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
+	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
+	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
+	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
+        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
+	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
+
+		element TextArea(Example/DynTex/Note)
+		{
+			metrics_mode pixels
+			left 5
+			top 5
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption Reaction parameters
+			colour_top 0.7 0.9 0.7
+			colour_bottom 0.5 0.7 0.5
+		}
+
+		element TextArea(Example/DynTex/Param_K)
+		{
+			metrics_mode pixels
+			left 5
+			top 20
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [1/2]K:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/DynTex/Param_F)
+		{
+			metrics_mode pixels
+			left 5
+			top 35
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [3/4]F:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/DynTex/Param_A0)
+		{
+			metrics_mode pixels
+			left 5
+			top 50
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [5/6]Diffusion 1:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/DynTex/Param_A1)
+		{
+			metrics_mode pixels
+			left 5
+			top 65
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [7/8]Diffusion 2:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/DynTex/Zero)
+		{
+			metrics_mode pixels
+			left 5
+			top 80
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [0]Reset initial conditions
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+
+	}
+}
+Example/VolTexOverlay
+{
+	zorder 500
+	// Stats block
+	container BorderPanel(Example/VolTexPanel)
+	{
+		metrics_mode pixels
+		vert_align top
+		left 5 
+		top 5
+		width 200
+		height 70
+		material Core/StatsBlockCenter
+        	border_size 1 1 1 1
+        	border_material Core/StatsBlockBorder
+        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
+	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
+	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
+	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
+	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
+	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
+        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
+	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
+
+		element TextArea(Example/VolTex/Note)
+		{
+			metrics_mode pixels
+			left 5
+			top 5
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption Julia parameters
+			colour_top 0.7 0.9 0.7
+			colour_bottom 0.5 0.7 0.5
+		}
+
+		element TextArea(Example/VolTex/Param_real)
+		{
+			metrics_mode pixels
+			left 5
+			top 20
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [1/2]real:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/VolTex/Param_imag)
+		{
+			metrics_mode pixels
+			left 5
+			top 35
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [3/4]imag:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/VolTex/Param_theta)
+		{
+			metrics_mode pixels
+			left 5
+			top 50
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [5/6]theta:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+
+	}
+}
Index: code/branches/main_reto_vs05/media/overlay/Example-Water.overlay
===================================================================
--- code/branches/main_reto_vs05/media/overlay/Example-Water.overlay	(revision 288)
+++ code/branches/main_reto_vs05/media/overlay/Example-Water.overlay	(revision 288)
@@ -0,0 +1,168 @@
+Example/WaterOverlay
+{
+	zorder 500
+	// Stats block
+	container BorderPanel(Core/WaterPanel)
+	{
+		metrics_mode pixels
+		vert_align top
+		left 5 
+		top 5
+		width 400
+		height 87
+		material Core/StatsBlockCenter
+        	border_size 1 1 1 1
+        	border_material Core/StatsBlockBorder
+        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
+	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
+	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
+	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
+	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
+	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
+        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
+	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
+
+		    
+		element TextArea(Example/Water/Normals)
+		{
+			metrics_mode pixels
+			left 5
+			top 5
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [N]Normals:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/Water/Rain)
+		{
+			metrics_mode pixels
+			left 5
+			top 20
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [SPACE]Rain
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/Water/SkyBox)
+		{
+			metrics_mode pixels
+			left 5
+			top 35
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [B]SkyBox: 
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/Water/Depth)
+		{
+			metrics_mode pixels
+			left 5
+			top 50
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [U/J]Head depth:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/Water/Material)
+		{
+			metrics_mode pixels
+			left 5
+			top 65
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [M]Material:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/Water/Note)
+		{
+			metrics_mode pixels
+			left 200
+			top 5
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption Careful with these values!
+			colour_top 0.7 0.9 0.7
+			colour_bottom 0.5 0.7 0.5
+		}
+
+		element TextArea(Example/Water/Param_C)
+		{
+			metrics_mode pixels
+			left 200
+			top 20
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [1/2]Ripple speed:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/Water/Param_D)
+		{
+			metrics_mode pixels
+			left 200
+			top 35
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [3/4]Distance:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/Water/Param_U)
+		{
+			metrics_mode pixels
+			left 200
+			top 50
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [5/6]Viscosity:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/Water/Param_T)
+		{
+			metrics_mode pixels
+			left 200
+			top 65
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [7/8]Time period:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+
+	}
+}
Index: code/branches/main_reto_vs05/media/overlay/OrxonoxHUD.overlay
===================================================================
--- code/branches/main_reto_vs05/media/overlay/OrxonoxHUD.overlay	(revision 288)
+++ code/branches/main_reto_vs05/media/overlay/OrxonoxHUD.overlay	(revision 288)
@@ -0,0 +1,142 @@
+Orxonox/HUD
+{
+	zorder 500
+	// Stats block
+	container BorderPanel(Orxonox/Panel)
+	{
+		metrics_mode pixels
+		vert_align top
+		left 5 
+		top 5
+		width 250
+		height 90
+		material Orxonox/Red
+        	border_size 1 1 1 1
+        	border_material Core/StatsBlockBorder
+        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
+	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
+	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
+	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
+	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
+	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
+        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
+	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
+
+		    
+
+
+		container BorderPanel(Orxonox/HUD1/SuperEggPanel)
+		{	
+    		    	border_size 1 1 1 1
+        		border_material Core/StatsBlockBorder
+        		border_topleft_uv     0.0000 1.0000 0.0039 0.9961
+	    		border_top_uv         0.0039 1.0000 0.9961 0.9961
+	    		border_topright_uv    0.9961 1.0000 1.0000 0.9961
+	    		border_left_uv        0.0000 0.9961 0.0039 0.0039
+	    		border_right_uv       0.9961 0.9961 1.0000 0.0039
+	    		border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
+        		border_bottom_uv      0.0039 0.0039 0.9961 0.0000
+	    		border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
+			metrics_mode pixels
+			horz_align left
+			vert_align top
+			top 10
+			left 10
+			width 70
+			height 70
+			material Orxonox/SuperEgg
+		}
+
+		element TextArea(Orxonox/HUD1/HP)
+		{
+			metrics_mode pixels
+			left 100
+			top 15
+			width 50
+			height 25
+			font_name BlueHighway
+			char_height 25
+			caption HP:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+
+
+		container BorderPanel(Orxonox/HUD1/HPBar)
+		{	
+    		    	border_size 1 1 1 1
+        		border_material Core/StatsBlockBorder
+        		border_topleft_uv     0.0000 1.0000 0.0039 0.9961
+	    		border_top_uv         0.0039 1.0000 0.9961 0.9961
+	    		border_topright_uv    0.9961 1.0000 1.0000 0.9961
+	    		border_left_uv        0.0000 0.9961 0.0039 0.0039
+	    		border_right_uv       0.9961 0.9961 1.0000 0.0039
+	    		border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
+        		border_bottom_uv      0.0039 0.0039 0.9961 0.0000
+	    		border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
+			metrics_mode pixels
+			horz_align left
+			vert_align top
+			top 25
+			left 140
+			width 100
+			height 15
+			material Orxonox/Red
+		}
+
+		element TextArea(Orxonox/HUD1/HPText)
+		{
+			metrics_mode pixels
+			horz_align left
+			left 140
+			top 10
+			width 100
+			height 15
+			font_name BlueHighway
+			char_height 15
+			caption 1000/1000
+			colour 1 1 1 
+		}
+
+		container Panel(Orxonox/HUD1/Shot1)
+		{	
+			metrics_mode pixels
+			horz_align left
+			vert_align top
+			top 55
+			left 110
+			width 30
+			height 25
+			material Orxonox/Shot
+		}
+
+		container Panel(Orxonox/HUD1/Shot2)
+		{	
+			metrics_mode pixels
+			horz_align left
+			vert_align top
+			top 55
+			left 160
+			width 30
+			height 25
+			material Orxonox/Shot
+		}
+		
+		container Panel(Orxonox/HUD1/Shot3)
+		{	
+			metrics_mode pixels
+			horz_align left
+			vert_align top
+			top 55
+			left 210
+			width 30
+			height 25
+			material Orxonox/Shot
+		}
+
+
+		
+
+	}
+}
Index: code/branches/main_reto_vs05/media/overlay/OrxonoxHUD1.1.overlay
===================================================================
--- code/branches/main_reto_vs05/media/overlay/OrxonoxHUD1.1.overlay	(revision 288)
+++ code/branches/main_reto_vs05/media/overlay/OrxonoxHUD1.1.overlay	(revision 288)
@@ -0,0 +1,153 @@
+Orxonox/HUD1.1
+{
+	zorder 500
+	// Stats block
+	container BorderPanel(Orxonox/HUD1.1/Time)
+	{
+		metrics_mode pixels
+		vert_align top
+		horz_align center
+		left -140
+		top 10
+		width 280
+		height 60
+		material Orxonox/BackGround
+        	border_size 1 1 1 1
+        	border_material Orxonox/Black
+        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
+	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
+	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
+	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
+	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
+	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
+        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
+	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
+	
+		element Panel(Orxonox/HUD1.1/TimeImg)
+		{
+			metrics_mode pixels
+			left 0
+			top 0
+			width 60
+			height 60
+			material Orxonox/Clock
+		}
+
+		element Panel(Orxonox/HUD1.1/TimeLine)
+		{
+			metrics_mode pixels
+			left 60
+			top 0
+			width 2
+			height 60
+			material Orxonox/Black
+		}		
+		
+
+	}
+
+	container BorderPanel(Orxonox/HUD1.1/Ammo)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align left
+		left 10
+		top -70
+		width 180
+		height 60
+		material Orxonox/BackGround
+        	border_size 1 1 1 1
+        	border_material Orxonox/Black
+        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
+	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
+	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
+	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
+	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
+	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
+        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
+	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
+	
+		element Panel(Orxonox/HUD1.1/AmmoImg)
+		{
+			metrics_mode pixels
+			left 0
+			top 0
+			width 60
+			height 60
+			material Orxonox/Gun
+		}
+
+		element Panel(Orxonox/HUD1.1/AmmoLine)
+		{
+			metrics_mode pixels
+			left 60
+			top 0
+			width 2
+			height 60
+			material Orxonox/Black
+		}		
+		
+
+	}
+
+	container BorderPanel(Orxonox/HUD1.1/Life)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align center
+		left -90
+		top -70
+		width 180
+		height 60
+		material Orxonox/BackGround
+        	border_size 1 1 1 1
+        	border_material Orxonox/Black
+        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
+	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
+	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
+	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
+	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
+	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
+        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
+	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
+	
+		element Panel(Orxonox/HUD1.1/LifeImg)
+		{
+			metrics_mode pixels
+			left 0
+			top 0
+			width 60
+			height 60
+			material Orxonox/Man
+		}
+
+		element Panel(Orxonox/HUD1.1/LifeLine)
+		{
+			metrics_mode pixels
+			left 60
+			top 0
+			width 2
+			height 60
+			material Orxonox/Black
+		}	
+		
+
+	}
+
+
+
+	container BorderPanel(Orxonox/HUD1.1/MapBackGround)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align right
+		left -210
+		top -210
+		width 200
+		height 200
+		material Orxonox/MapBackGround
+		
+		
+
+	}
+}
Index: code/branches/main_reto_vs05/media/overlay/OrxonoxHUD1.2.overlay
===================================================================
--- code/branches/main_reto_vs05/media/overlay/OrxonoxHUD1.2.overlay	(revision 288)
+++ code/branches/main_reto_vs05/media/overlay/OrxonoxHUD1.2.overlay	(revision 288)
@@ -0,0 +1,456 @@
+Orxonox/HUD1.2
+{
+	zorder 500
+	// Stats block
+
+
+	
+
+
+
+	container Panel(Orxonox/HUD1.2/MapBackGround)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align center
+		left -75
+		top -160
+		width 150
+		height 150
+		material Orxonox/MapBackGround
+	}
+
+	container Panel(Orxonox/HUD1.2/MyShip)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align center
+		left 100
+		top -140
+		width 100
+		height 100
+		material Orxonox/MyShip
+		
+		container Panel(Orxonox/HUD1.2/ShildLeftTop)
+		{
+			metrics_mode pixels
+			left -5
+			top 0
+			width 30
+			height 30
+			material Orxonox/ShildLeftTop
+		}
+
+		container Panel(Orxonox/HUD1.2/ShildRightTop)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -30
+			top 0
+			width 30
+			height 30
+			material Orxonox/ShildRightTop
+		}
+
+		container Panel(Orxonox/HUD1.2/ShildLeftBottom)
+		{
+			metrics_mode pixels
+			vert_align bottom
+			left -5
+			top -30
+			width 30
+			height 30
+			material Orxonox/ShildLeftBottom
+		}
+
+		container Panel(Orxonox/HUD1.2/ShildRightBottom)
+		{
+			metrics_mode pixels
+			vert_align bottom
+			horz_align right
+			left -30
+			top -30
+			width 30
+			height 30
+			material Orxonox/ShildRightBottom
+		}
+		
+	}
+
+
+	container Panel(Orxonox/HUD1.2/PrimarBackground)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align right
+		left -180
+		top -180
+		width 150
+		height 50
+		material Orxonox/PrimarBackground
+
+		container Panel(Orxonox/HUD1.2/PrimarSample1)
+		{
+			metrics_mode pixels
+			left 0
+			top 0
+			width 50
+			height 50
+			material Orxonox/PrimarSample
+		}
+
+		container Panel(Orxonox/HUD1.2/PrimarSample2)
+		{
+			metrics_mode pixels
+			left 50
+			top 0
+			width 50
+			height 50
+			material Orxonox/PrimarSample
+		}
+
+		container Panel(Orxonox/HUD1.2/PrimarSample3)
+		{
+			metrics_mode pixels
+			left 100
+			top 0
+			width 50
+			height 50
+			material Orxonox/PrimarSample
+		}
+
+		container Panel(Orxonox/HUD1.2/PrimarChoice)
+		{
+			metrics_mode pixels
+			left 2
+			top 2
+			width 48
+			height 46
+			material Orxonox/PrimarChoice
+		}
+
+
+
+
+	}
+	
+	container Panel(Orxonox/HUD1.2/RacketBackground)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align right
+		left -180
+		top -130
+		width 150
+		height 100
+		material Orxonox/RacketBackground
+
+		element TextArea(Orxonox/HUD1.2/Rocket1)
+		{
+			metrics_mode pixels
+			left 10
+			top 7
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption Rocket1
+			colour_top 0 1 0 
+		}	
+
+		element TextArea(Orxonox/HUD1.2/Rocket2)
+		{
+			metrics_mode pixels
+			left 10
+			top 29
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption Rocket2
+			colour_top 0 1 0 
+		}	
+
+		element TextArea(Orxonox/HUD1.2/Rocket3)
+		{
+			metrics_mode pixels
+			left 10
+			top 51
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption Rocket3
+			colour_top 0 1 0 
+		}
+	
+		element TextArea(Orxonox/HUD1.2/Rocket4)
+		{
+			metrics_mode pixels
+			left 10
+			top 74
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption Rocket4
+			colour_top 0 1 0 
+		}
+
+
+		element TextArea(Orxonox/HUD1.2/RocketNum1)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -30
+			top 7
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption 20
+			colour_top 0 1 0 
+		}	
+
+		element TextArea(Orxonox/HUD1.2/RocketNum2)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -30
+			top 29
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption 99
+			colour_top 0 1 0 
+		}	
+
+		element TextArea(Orxonox/HUD1.2/RocketNum3)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -30
+			top 51
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption 01
+			colour_top 0 1 0 
+		}
+	
+		element TextArea(Orxonox/HUD1.2/RocketNum4)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -30
+			top 74
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption 55
+			colour_top 0 1 0 
+		}	
+	
+		
+	
+
+
+	}
+
+
+	container Panel(Orxonox/HUD1.2/Energy)
+	{
+		metrics_mode pixels
+		vert_align top
+		horz_align center
+		left -100
+		top 20
+		width 200
+		height 20
+
+		container Panel(Orxonox/HUD1.2/EnergyBackground)
+		{
+			metrics_mode pixels
+			width 200
+			height 20
+			material Orxonox/EnergyBackground
+		}
+		
+		element TextArea(Orxonox/HUD1.2/EnergyText)
+		{
+			metrics_mode pixels
+			horz_align center
+			left -20
+			top 2
+			width 200
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption Energy
+			colour_top 1 1 0 
+		}
+	}
+
+	container Panel(Orxonox/HUD1.2/TargetWindow)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align left
+		left 40
+		top -130
+		width 150
+		height 100
+		material Orxonox/TargetBackground
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/Name)
+		{
+			metrics_mode pixels
+			left 20
+			top 5
+			width 200
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption Moesonator
+			colour_top 0 1 0 
+		}
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/Distance)
+		{
+			metrics_mode pixels
+			left 9
+			top 35
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption Distance
+			colour_top 0 1 0 
+		}
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/Status)
+		{
+			metrics_mode pixels
+			left 7
+			top 55
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption Status
+			colour_top 0 1 0 
+		}
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/HitRating)
+		{
+			metrics_mode pixels
+			left 7
+			top 75
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption Hit Rating
+			colour_top 0 1 0 
+		}
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/DistanceText)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -50
+			top 35
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption 50km
+			colour_top 0 1 0 
+		}
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/StatusText)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -50
+			top 55
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption huhu
+			colour_top 0 1 0 
+		}
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/HitRatingText)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -50
+			top 75
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption 50%
+			colour_top 0 1 0 
+		}
+
+
+
+	}
+
+
+
+
+	container Panel(Orxonox/HUD1.2/EnergyDistrWindow)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align right
+		left -150
+		top -300
+		width 100
+		height 86
+		material Orxonox/EnergyDistrBackground
+
+		container Panel(Orxonox/HUD1.2/EnergyDistrPoint)
+		{
+			metrics_mode pixels
+			left 40
+			top 36
+			width 7
+			height 7
+			material Orxonox/RedPoint
+		}
+	}
+
+	container Panel(Orxonox/HUD1.2/Time)
+	{
+		metrics_mode pixels
+		vert_align top
+		horz_align left
+		left 30
+		top 10
+		width 60
+		height 30
+
+		
+		element TextArea(Orxonox/HUD1.2/Time/Text)
+		{
+			metrics_mode pixels
+			horz_align left
+			left 10
+			top 5
+			width 100
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption 99:99
+			colour_top 0 1 0 
+		}
+
+}
Index: code/branches/main_reto_vs05/media/overlay/Shadows.overlay
===================================================================
--- code/branches/main_reto_vs05/media/overlay/Shadows.overlay	(revision 288)
+++ code/branches/main_reto_vs05/media/overlay/Shadows.overlay	(revision 288)
@@ -0,0 +1,92 @@
+Example/ShadowsOverlay
+{
+	zorder 500
+	// Stats block
+	container BorderPanel(Core/ShadowsPanel)
+	{
+		metrics_mode pixels
+		vert_align top
+		left 5 
+		top 5
+		width 500
+		height 55
+		material Core/StatsBlockCenter
+        	border_size 1 1 1 1
+        	border_material Core/StatsBlockBorder
+        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
+	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
+	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
+	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
+	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
+	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
+        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
+	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
+
+
+		element TextArea(Example/Shadows/ShadowTechnique)
+		{
+			metrics_mode pixels
+			left 5
+			top 5
+			width 180
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [O] Shadow Technique
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+		element TextArea(Example/Shadows/ShadowTechniqueInfo)
+		{
+			metrics_mode pixels
+			left 155
+			top 5
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption Current:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+
+		element TextArea(Example/Shadows/Materials)
+		{
+			metrics_mode pixels
+			left 5
+			top 20
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption [M] Athene Material
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+		element TextArea(Example/Shadows/MaterialInfo)
+		{
+			metrics_mode pixels
+			left 155
+			top 20
+			width 90
+			height 30
+			font_name BlueHighway
+			char_height 16
+			caption Current:
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+		element TextArea(Example/Shadows/Info)
+		{
+			metrics_mode pixels
+			left 5
+			top 35
+			width 250
+			height 30
+			font_name BlueHighway
+			char_height 16
+			colour_top 0.5 0.7 0.5
+			colour_bottom 0.3 0.5 0.3
+		}
+	}
+}
Index: code/branches/main_reto_vs05/media/particle/Example-Water.particle
===================================================================
--- code/branches/main_reto_vs05/media/particle/Example-Water.particle	(revision 288)
+++ code/branches/main_reto_vs05/media/particle/Example-Water.particle	(revision 288)
@@ -0,0 +1,35 @@
+Examples/Water/Rain
+{
+    material        Examples/Droplet
+    particle_width  100
+    particle_height 300
+    cull_each       true
+    quota           100
+    // Make common direction straight down (faster than self oriented)
+    billboard_type  oriented_common
+    common_direction 0 -1 0
+    
+    // Area emitter
+    emitter Box
+    {
+        angle           0
+        emission_rate   20
+        time_to_live    5
+        direction       0 -1 0
+        velocity    	1000
+        colour_range_start  0.3 1 0.3
+        colour_range_end    0.7 1 0.7
+        width           3000
+        height          3000
+        depth           0
+    }
+
+    // Gravity
+    affector LinearForce
+    {
+        force_vector      0 -1000 0
+        force_application add
+    }
+
+}
+
Index: code/branches/main_reto_vs05/media/particle/Example.particle
===================================================================
--- code/branches/main_reto_vs05/media/particle/Example.particle	(revision 288)
+++ code/branches/main_reto_vs05/media/particle/Example.particle	(revision 288)
@@ -0,0 +1,395 @@
+// Example particle systems
+
+// Exudes greeny particles which float upwards
+Examples/GreenyNimbus
+{
+    material        Examples/FlarePointSprite
+	point_rendering	true
+	// point rendering means size is controlled by material
+	// provide fallback sizes for hardware that doesn't support point sprite
+    particle_width  30
+    particle_height 30
+    cull_each       false
+	cull_each       false
+    quota           10000
+    billboard_type  point
+    
+    // Area emitter
+    emitter Box
+    {
+        angle           30
+        emission_rate   30
+        time_to_live    5
+        direction       0 1 0
+        velocity    	0
+        colour_range_start  1 1 0
+        colour_range_end    0.3 1 0.3
+        width           60
+        height          60
+        depth           60
+    }
+
+    // Make em float upwards
+    affector LinearForce
+    {
+        force_vector      0 100 0
+        force_application add
+    }
+
+    // Fader
+    affector ColourFader
+    {
+        red -0.25
+        green -0.25
+        blue -0.25
+    }
+
+
+}
+
+// A sparkly purple fountain
+Examples/PurpleFountain
+{
+    material        Examples/Flare2
+    particle_width  20
+    particle_height 40
+    cull_each       false
+    quota           10000
+    billboard_type  oriented_self
+    
+    // Area emitter
+    emitter Point
+    {
+        angle           15
+        emission_rate   75
+        time_to_live    3
+        direction       0 1 0
+        velocity_min    250
+        velocity_max    300
+        colour_range_start  0 0 0
+        colour_range_end    1 1 1
+    }
+
+    // Gravity
+    affector LinearForce
+    {
+        force_vector      0 -100 0
+        force_application add
+    }
+
+    // Fader
+    affector ColourFader
+    {
+        red -0.25
+        green -0.25
+        blue -0.25
+    }
+}
+
+
+// A downpour
+Examples/Rain
+{
+    material        Examples/Droplet
+    particle_width  20
+    particle_height 100
+    cull_each       true
+    quota           10000
+    // Make common direction straight down (faster than self oriented)
+    billboard_type  oriented_common
+    common_direction 0 -1 0
+    
+    // Area emitter
+    emitter Box
+    {
+        angle           0
+        emission_rate   100
+        time_to_live    5
+        direction       0 -1 0
+        velocity    	50
+        colour_range_start  0.3 1 0.3
+        colour_range_end    0.7 1 0.7
+        width           1000
+        height          1000
+        depth           0
+    }
+
+    // Gravity
+    affector LinearForce
+    {
+        force_vector      0 -200 0
+        force_application add
+    }
+
+}
+
+// A jet engine (of sorts)
+Examples/JetEngine1
+{
+	material 		Examples/Flare
+	particle_width 	25
+	particle_height	25
+	cull_each		false
+	quota			200
+	billboard_type	point
+
+	emitter Point
+	{
+		angle 5
+		emission_rate 100
+        time_to_live    1
+        direction       0 -1 0
+        velocity_min    250
+        velocity_max    300
+        colour_range_start  1 1 0.5
+        colour_range_end    1 0.8 0.3
+		
+	}
+	affector ColourFader
+	{
+		red -0.25
+		green -1
+		blue -1
+	}
+	
+}
+Examples/JetEngine2
+{
+	material 		Examples/Flare
+	particle_width 	15
+	particle_height	15
+	cull_each		false
+	quota			200
+	billboard_type	point
+
+	emitter Point
+	{
+		angle 3
+		emission_rate 100
+        time_to_live    1
+        direction       0 -1 0
+        velocity_min    350
+        velocity_max    400
+        colour_range_start  0.5 1 1
+        colour_range_end    0.3 0.8 1
+		
+	}
+	affector ColourFader
+	{
+		red -1
+		green -1
+		blue -0.5
+	}
+	
+}
+
+// Exudes aureola particles which around the model float upwards
+Examples/Aureola
+{
+    material        Examples/Aureola
+    particle_width  200
+    particle_height 200
+    cull_each       false
+    quota           100
+    billboard_type  perpendicular_common
+    common_direction 0 1 0
+    common_up_vector 0 0 1
+
+    // Area emitter
+    emitter Box
+    {
+        angle           30
+        emission_rate   4
+        time_to_live    5
+        position        0 -100 0
+        direction       0 1 0
+        velocity_min  	0
+        velocity_max  	30
+        colour_range_start  0.3 0.3 0.3 0.0
+        colour_range_end    0.8 0.8 0.8 0.0
+        width           10
+        height          10
+        depth           30
+    }
+
+    // Make em float upwards
+    affector LinearForce
+    {
+        force_vector      0 70 0
+        force_application add
+    }
+
+    // Fader
+    affector ColourFader2
+    {
+        red1 +0.4
+        green1 +0.4
+        blue1 +0.4
+        alpha1 +0.7
+
+        red2 -0.25
+        green2 -0.25
+        blue2 -0.25
+        alpha2 -0.3333
+
+        state_change 3.5
+    }
+
+    // Rotater
+    affector Rotator
+    {
+        rotation_range_start 0
+        rotation_range_end 360
+        rotation_speed_range_start 0
+        rotation_speed_range_end 180
+    }
+}
+
+
+Examples/Swarm
+{
+	quota	3000
+	material	Examples/Flare2
+	particle_width	12
+	particle_height	24
+	cull_each	true
+	renderer	billboard
+	sorted	true
+	local_space	false
+	billboard_type	oriented_self
+
+	emitter Box
+	{
+		angle	180
+		colour	1 1 1 1
+		colour_range_start	1 1 1 1
+		colour_range_end	1 1 1 1
+		direction	0 1 0
+		emission_rate	30
+		position	0 0 0
+		velocity	50
+		velocity_min	50
+		velocity_max	1
+		time_to_live	20
+		time_to_live_min	20
+		time_to_live_max	20
+		duration	0
+		duration_min	0
+		duration_max	0
+		repeat_delay	0
+		repeat_delay_min	0
+		repeat_delay_max	0
+		width	80
+		height	80
+		depth	80
+	}
+
+	affector ColourFader
+	{
+		red	-0.05
+		green	0
+		blue	0
+		alpha	0
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	0 -50 0
+		plane_normal	0 1 0
+		bounce	1
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	0 50 0
+		plane_normal	0 -1 0
+		bounce	1
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	50 0 0
+		plane_normal	-1 0 0
+		bounce	1
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	-50 0 0
+		plane_normal	1 0 0
+		bounce	1
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	0 0 50
+		plane_normal	0 0 -1
+		bounce	1
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	0 0 -50
+		plane_normal	0 0 1
+		bounce	1
+	}
+
+	affector DirectionRandomiser
+	{
+		randomness	60
+	}
+}
+
+
+Examples/Snow
+{
+	quota	2000
+	material	Examples/Flare
+	particle_width	4
+	particle_height	4
+	cull_each	true
+	renderer	billboard
+	sorted	true
+	local_space	false
+	billboard_type	point
+
+	emitter Box
+	{
+		angle	0
+		colour	1 1 1 1
+		colour_range_start	1 1 1 1
+		colour_range_end	1 1 1 1
+		direction	0 -1 0
+		emission_rate	100
+		position	0 200 0
+		velocity	20
+		velocity_min	20
+		velocity_max	20
+		time_to_live	20
+		time_to_live_min	20
+		time_to_live_max	20
+		duration	0
+		duration_min	0
+		duration_max	0
+		repeat_delay	0
+		repeat_delay_min	0
+		repeat_delay_max	0
+		width	200
+		height	200
+		depth	1
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	0 0 0
+		plane_normal	0 1 0
+		bounce	0
+	}
+
+	affector DirectionRandomiser
+	{
+		randomness	10
+	}
+}
+
+
Index: code/branches/main_reto_vs05/media/particle/emitted_emitter.particle
===================================================================
--- code/branches/main_reto_vs05/media/particle/emitted_emitter.particle	(revision 288)
+++ code/branches/main_reto_vs05/media/particle/emitted_emitter.particle	(revision 288)
@@ -0,0 +1,112 @@
+// Example emitted emitters
+
+Examples/Fireworks
+
+{
+
+    material Examples/Flare
+
+    point_rendering            false
+
+    particle_width             10
+
+    particle_height            10
+
+    cull_each                  false
+
+    quota                      1000
+
+    emit_emitter_quota         10
+
+    billboard_type             point
+
+    
+
+    // Emitter that emits multiple Point emitters with name 'explosion'
+
+    emitter Box
+
+    {
+
+        name                    mainEmitter
+
+        emit_emitter            explosion
+
+        angle                   30
+
+        emission_rate           1000
+
+        time_to_live            3
+
+        direction               0 1 0
+
+        velocity                200
+
+    }
+
+
+
+    // This Point emitter is emitted by the Box emitter and emits billboard particles itself
+
+    emitter Point
+
+    {
+
+        name                    explosion
+
+        angle                   360
+
+        emission_rate           1000
+
+        time_to_live            2
+
+        direction               0 1 0
+
+        velocity                80
+
+        duration                0.1
+
+        repeat_delay_min        2
+
+        repeat_delay_max        3
+
+    }
+
+
+
+    // Make em float downwards
+
+    affector LinearForce
+
+    {
+
+        force_vector            0 -100 0
+
+        force_application       add
+
+    }
+
+
+
+    // Give em some nice colours
+
+    affector ColourInterpolator
+
+    {
+
+        time0                   0
+
+        colour0                 1 1 0
+
+        time1                   0.5
+
+        colour1                 1 0 0
+
+        time2                   0.9
+
+        colour2                 0 0 1
+
+    }
+
+}
+
Index: code/branches/main_reto_vs05/media/particle/smoke.particle
===================================================================
--- code/branches/main_reto_vs05/media/particle/smoke.particle	(revision 288)
+++ code/branches/main_reto_vs05/media/particle/smoke.particle	(revision 288)
@@ -0,0 +1,43 @@
+// Example particle systems
+
+// smoke
+Examples/Smoke
+{
+    	material        	Examples/Smoke
+    	particle_width  	55
+    	particle_height 	55
+    	cull_each       	true
+    	quota           	500
+    	billboard_type  	point
+		sorted				true
+    
+    	// Area emitter
+    	emitter Point
+    	{
+		angle               		11
+        	emission_rate       		15
+        	time_to_live        		4
+        	direction           		0 1 0
+        	velocity_min        		150
+        	velocity_max        		240    	
+	}
+
+	affector ColourImage
+	{
+		image		smokecolors.png
+	}
+
+   	affector Rotator
+   	{
+        	rotation_range_start  		0
+        	rotation_range_end   	 	360
+        	rotation_speed_range_start  	-60
+        	rotation_speed_range_end    	200
+   	}
+
+   	affector Scaler
+   	{
+       	rate 	100
+   	}
+
+}
Index: code/branches/main_reto_vs05/scripts/weapon_framework.vcproj
===================================================================
--- code/branches/main_reto_vs05/scripts/weapon_framework.vcproj	(revision 232)
+++ code/branches/main_reto_vs05/scripts/weapon_framework.vcproj	(revision 288)
@@ -184,8 +184,4 @@
 			>
 			<File
-				RelativePath="..\src\camera_manager.cc"
-				>
-			</File>
-			<File
 				RelativePath="..\src\inertial_node.cc"
 				>
@@ -227,5 +223,5 @@
 				</File>
 				<File
-					RelativePath="..\src\weapon\base_weapon.cpp"
+					RelativePath="..\src\weapon\base_weapon.cc"
 					>
 				</File>
@@ -280,4 +276,16 @@
 				<File
 					RelativePath="..\src\class_hierarchy\test3.cc"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="hud"
+				>
+				<File
+					RelativePath="..\src\hud\hud_overlay.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\src\hud\test_overlay.cc"
 					>
 				</File>
@@ -290,8 +298,4 @@
 			>
 			<File
-				RelativePath="..\src\camera_manager.h"
-				>
-			</File>
-			<File
 				RelativePath="..\src\inertial_node.h"
 				>
@@ -398,4 +402,16 @@
 				<File
 					RelativePath="..\src\class_hierarchy\test3.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="hud"
+				>
+				<File
+					RelativePath="..\src\hud\hud_overlay.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\hud\test_overlay.h"
 					>
 				</File>
Index: code/branches/main_reto_vs05/src/Lighting.h
===================================================================
--- code/branches/main_reto_vs05/src/Lighting.h	(revision 288)
+++ code/branches/main_reto_vs05/src/Lighting.h	(revision 288)
@@ -0,0 +1,479 @@
+/*
+-----------------------------------------------------------------------------
+This source file is part of OGRE
+    (Object-oriented Graphics Rendering Engine)
+For the latest info, see http://www.ogre3d.org/
+
+Copyright (c) 2000-2006 Torus Knot Software Ltd
+Also see acknowledgements in Readme.html
+
+You may use this sample code for anything you like, it is not covered by the
+LGPL like the rest of the engine.
+-----------------------------------------------------------------------------
+*/
+
+/**
+    \file 
+        Lighting.h
+    \brief
+        Shows lighting support in OGRE. Also demonstrates the use of billboards
+        and controllers for automatic time-relative behaviour.
+*/
+
+#include <OgreTextAreaOverlayElement.h>
+
+#include "ExampleApplication.h"
+
+Overlay* helloOverlay ;
+
+
+/** This class turns lights & billboards linked to them on & off */
+class LightFlasher : public ControllerValue<Real>
+{
+protected:
+	Light* mLight;
+	Billboard* mBillboard;
+	ColourValue mMaxColour;
+	Real intensity;
+public:
+	LightFlasher(Light* light, Billboard* billboard, ColourValue maxColour)
+	{
+		mLight = light;
+		mBillboard = billboard;
+		mMaxColour = maxColour;
+	}
+
+	virtual Real  getValue (void) const
+	{
+		return intensity;
+	}
+
+	virtual void  setValue (Real value)
+	{
+		intensity = value;
+
+		ColourValue newColour;
+
+		// Attenuate the brightness of the light
+		newColour.r = mMaxColour.r * intensity;
+		newColour.g = mMaxColour.g * intensity;
+		newColour.b = mMaxColour.b * intensity;
+
+		mLight->setDiffuseColour(newColour);
+		mBillboard->setColour(newColour);
+	}
+};
+
+
+/** Controller function mapping waveform to light intensity */
+class LightFlasherControllerFunction : public WaveformControllerFunction
+{
+public:
+	LightFlasherControllerFunction(WaveformType wavetype, Real frequency, Real phase) : WaveformControllerFunction(wavetype, 0, frequency, phase, 1, true)
+	{
+
+	}
+};
+
+
+// Some global node data
+SceneNode* mRedYellowLightsNode;
+SceneNode* mGreenBlueLightsNode;
+std::vector<AnimationState*> mAnimStateList;
+
+
+// Listener class for frame updates
+class LightingListener : public ExampleFrameListener
+{
+protected:
+public:
+    LightingListener(RenderWindow* win, Camera* cam)
+        : ExampleFrameListener(win, cam)
+    {
+    }
+
+    bool frameStarted(const FrameEvent& evt)
+    {
+	if( ExampleFrameListener::frameStarted(evt) == false )
+		return false;
+
+		std::vector<AnimationState*>::iterator animi;
+		for (animi = mAnimStateList.begin(); animi != mAnimStateList.end(); ++animi)
+		{
+			(*animi)->addTime(evt.timeSinceLastFrame);
+		}
+
+        return true;
+    }
+};
+
+/** Application class */
+class LightingApplication : public ExampleApplication
+{
+protected:
+
+	// The set of all the billboards used for the lights
+    // 2 sets because we'll rotate them differently
+	BillboardSet* mRedYellowLights;
+	BillboardSet* mGreenBlueLights;
+
+	// Billboards
+	Billboard* mRedLightBoard;
+	Billboard* mBlueLightBoard;
+	Billboard* mYellowLightBoard;
+	Billboard* mGreenLightBoard;
+
+	// Lights
+	Light* mRedLight;
+	Light* mBlueLight;
+	Light* mYellowLight;
+	Light* mGreenLight;
+
+
+	// Light flashers
+	ControllerValueRealPtr mRedLightFlasher;
+	ControllerValueRealPtr mBlueLightFlasher;
+	ControllerValueRealPtr mYellowLightFlasher;
+	ControllerValueRealPtr mGreenLightFlasher;
+
+	// Light controller functions
+	ControllerFunctionRealPtr mRedLightControllerFunc;
+	ControllerFunctionRealPtr mBlueLightControllerFunc;
+	ControllerFunctionRealPtr mYellowLightControllerFunc;
+	ControllerFunctionRealPtr mGreenLightControllerFunc;
+
+	// Light controllers
+	Controller<Real>* mRedLightController;
+	Controller<Real>* mBlueLightController;
+	Controller<Real>* mYellowLightController;
+	Controller<Real>* mGreenLightController;
+	
+	void update(void)
+	{
+		// set Time
+		int TimeMin = 99;
+		int TimeSec = 55;
+		OverlayElement* TimeText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/Time/Text");
+		TimeText->setCaption(StringConverter::toString(TimeMin) + ":" + StringConverter::toString(TimeSec));
+		
+		// set TargetWindow
+		String TargetWindowName = "HURRA";
+		int TargetWindowDistance = 12;
+		String TargetWindowStatus = "Dead";
+		int TargetWindowHitRating = 30;
+		OverlayElement* TargetWindowNameText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/Name");
+		TargetWindowNameText->setCaption( TargetWindowName);		
+		OverlayElement* TargetWindowDistanceText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/DistanceText");
+		TargetWindowDistanceText->setCaption(StringConverter::toString(TargetWindowDistance) + "km" );
+		OverlayElement* TargetWindowStatusText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/StatusText");
+		TargetWindowStatusText->setCaption( TargetWindowStatus );
+		OverlayElement* TargetWindowHitRatingText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/HitRatingText");
+		TargetWindowHitRatingText->setCaption(StringConverter::toString(TargetWindowHitRating) + "%" );
+		
+		// set Energy
+		int EnergyValue = 60.0;
+		OverlayElement* EnergyLength = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/EnergyBackground");
+		EnergyLength->setWidth((int)((double)60/(double)100*200));
+		
+		// set Shild
+		bool ShildLeftTopValue = true;
+		bool ShildRightTopValue = false;
+		bool ShildLeftBottomValue = false;
+		bool ShildRightBottomValue = true;
+		OverlayElement* ShildLeftTop = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/ShildLeftTop");
+		if (ShildLeftTopValue) ShildLeftTop->show();
+		else ShildLeftTop->hide();
+		OverlayElement* ShildRightTop = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/ShildRightTop");
+		if (ShildRightTopValue) ShildRightTop->show();
+		else ShildRightTop->hide();
+		OverlayElement* ShildLeftBottom = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/ShildLeftBottom");
+		if (ShildLeftBottomValue) ShildLeftBottom->show();
+		else ShildLeftBottom->hide();
+		OverlayElement* ShildRightBottom = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/ShildRightBottom");
+		if (ShildRightBottomValue) ShildRightBottom->show();
+		else ShildRightBottom->hide();
+		
+		// set Rockets
+		int Rocket1 = 11;
+		int Rocket2 = 22;
+		int Rocket3 = 33;
+		int Rocket4 = 44;
+		OverlayElement* RocketNum1 = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum1");
+		RocketNum1->setCaption(StringConverter::toString(Rocket1));
+		OverlayElement* RocketNum2 = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum2");
+		RocketNum2->setCaption(StringConverter::toString(Rocket2));
+		OverlayElement* RocketNum3 = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum3");
+		RocketNum3->setCaption(StringConverter::toString(Rocket3));
+		OverlayElement* RocketNum4 = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum4");
+		RocketNum4->setCaption(StringConverter::toString(Rocket4));
+		
+		// set EnergyDistribution
+		double EnergyDistrPixelX = 100;
+		double EnergyDistrPixelY = 86;		
+		double EnergyDistrShild = 32;
+		double EnergyDistrEngine = 50;
+		double EnergyDistrLaser = 18;
+		double EnergyDistrShildInv = 100 - EnergyDistrShild;
+		double EnergyDistrEngineInv = 100 - EnergyDistrEngine;
+		double EnergyDistrLaserInv = 100 - EnergyDistrLaser;
+		double EnergyDistrY = (double)EnergyDistrEngineInv/((double)EnergyDistrEngineInv+(double)EnergyDistrLaserInv) * EnergyDistrPixelY;
+		double EnergyDistrX = EnergyDistrY/1.7321;
+		
+		
+		
+		OverlayElement* EnergyDistrPoint = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/EnergyDistrPoint");
+//		EnergyDistrPoint->setLeft();
+//		EnergyDistrPoint->setTop();
+		
+		
+		
+		
+		
+		
+		
+		
+	}
+
+
+		
+	
+	
+	void createScene(void)
+    {
+		// Set a very low level of ambient lighting
+		mSceneMgr->setAmbientLight(ColourValue(0.1, 0.1, 0.1));
+
+        // Use the "Space" skybox
+        mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox");
+
+		// Load ogre head
+	//	Entity* head = mSceneMgr->createEntity("head", "ogrehead.mesh");
+
+		// Attach the head to the scene
+//		mSceneMgr->getRootSceneNode()->attachObject(head);
+		
+		
+		// show overlay
+		helloOverlay = OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
+		update();
+		helloOverlay->show();
+				
+		
+
+		
+
+
+		/*
+		// Create nodes for the lights to be rotated with
+        mRedYellowLightsNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
+        mGreenBlueLightsNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
+
+
+        // First create the BillboardSets. This will define the materials for the billboards
+		// in its set to use
+		mRedYellowLights = mSceneMgr->createBillboardSet("RedYellowLights");
+		mRedYellowLights->setMaterialName("Examples/Flare");
+		mRedYellowLightsNode->attachObject(mRedYellowLights);
+
+		mGreenBlueLights = mSceneMgr->createBillboardSet("GreenBlueLights");
+		mGreenBlueLights->setMaterialName("Examples/Flare");
+		mGreenBlueLightsNode->attachObject(mGreenBlueLights);
+
+		// Red light billboard, in "off" state
+		Vector3 redLightPosition(78, -8, -70);
+		mRedLightBoard = mRedYellowLights->createBillboard(redLightPosition);
+		mRedLightBoard->setColour(ColourValue::Black);
+
+
+		// Blue light billboard, in "off" state
+		Vector3 blueLightPosition(-90, -8, -70);
+		mBlueLightBoard = mGreenBlueLights->createBillboard(blueLightPosition);
+		mBlueLightBoard->setColour(ColourValue::Black);
+
+
+		// Yellow light billboard, in "off" state
+		Vector3 yellowLightPosition(-4.5, 30, -80);
+		mYellowLightBoard = mRedYellowLights->createBillboard(yellowLightPosition);
+		mYellowLightBoard->setColour(ColourValue::Black);
+
+		// Green light billboard, in "off" state
+		Vector3 greenLightPosition(50, 70, 80);
+		mGreenLightBoard = mGreenBlueLights->createBillboard(greenLightPosition);
+		mGreenLightBoard->setColour(ColourValue::Black);
+
+		// Red light, in "off" state
+		mRedLight = mSceneMgr->createLight("RedFlyingLight");
+		mRedLight->setType(Light::LT_POINT);
+		mRedLight->setPosition(redLightPosition);
+		mRedLight->setDiffuseColour(ColourValue::Black);
+		mRedYellowLightsNode->attachObject(mRedLight);
+
+		// Blue light, in "off" state
+		mBlueLight = mSceneMgr->createLight("BlueFlyingLight");
+		mBlueLight->setType(Light::LT_POINT);
+		mBlueLight->setPosition(blueLightPosition);
+		mBlueLight->setDiffuseColour(ColourValue::Black);
+		mGreenBlueLightsNode->attachObject(mBlueLight);
+
+		// Yellow light in "off" state
+		mYellowLight = mSceneMgr->createLight("YellowFlyingLight");
+		mYellowLight->setType(Light::LT_POINT);
+		mYellowLight->setPosition(yellowLightPosition);
+		mYellowLight->setDiffuseColour(ColourValue::Black);
+		mRedYellowLightsNode->attachObject(mYellowLight);
+
+		// Yellow light in "off" state
+		mGreenLight = mSceneMgr->createLight("GreenFlyingLight");
+		mGreenLight->setType(Light::LT_POINT);
+		mGreenLight->setPosition(greenLightPosition);
+		mGreenLight->setDiffuseColour(ColourValue::Black);
+		mGreenBlueLightsNode->attachObject(mGreenLight);
+
+		// Light flashers
+		mRedLightFlasher = ControllerValueRealPtr(
+            new LightFlasher(mRedLight, mRedLightBoard, ColourValue::Red));
+		mBlueLightFlasher = ControllerValueRealPtr(
+            new LightFlasher(mBlueLight, mBlueLightBoard, ColourValue::Blue));
+		mYellowLightFlasher = ControllerValueRealPtr(
+            new LightFlasher(mYellowLight, mYellowLightBoard, ColourValue(1.0, 1.0, 0.0)));
+		mGreenLightFlasher = ControllerValueRealPtr(
+            new LightFlasher(mGreenLight, mGreenLightBoard, ColourValue::Green));
+
+		// Light controller functions
+		mRedLightControllerFunc = ControllerFunctionRealPtr(
+            new LightFlasherControllerFunction(Ogre::WFT_SINE, 0.5, 0.0));
+		mBlueLightControllerFunc = ControllerFunctionRealPtr(
+            new LightFlasherControllerFunction(Ogre::WFT_SINE, 0.75, 0.5));
+		mYellowLightControllerFunc = ControllerFunctionRealPtr(
+            new LightFlasherControllerFunction(Ogre::WFT_TRIANGLE, 0.25, 0.0));
+		mGreenLightControllerFunc = ControllerFunctionRealPtr(
+            new LightFlasherControllerFunction(Ogre::WFT_SINE, 0.25, 0.5));
+
+		// Light controllers
+		ControllerManager* mControllerManager = &ControllerManager::getSingleton();
+		mRedLightController = mControllerManager->createController(mControllerManager->getFrameTimeSource(), mRedLightFlasher, mRedLightControllerFunc);
+		mBlueLightController = mControllerManager->createController(mControllerManager->getFrameTimeSource(), mBlueLightFlasher, mBlueLightControllerFunc);
+		mYellowLightController = mControllerManager->createController(mControllerManager->getFrameTimeSource(), mYellowLightFlasher, mYellowLightControllerFunc);
+		mGreenLightController = mControllerManager->createController(mControllerManager->getFrameTimeSource(), mGreenLightFlasher, mGreenLightControllerFunc);
+
+		*/
+
+//		setupTrailLights();
+
+    }
+
+	void setupTrailLights(void)
+	{
+		mSceneMgr->setAmbientLight(ColourValue(0.5, 0.5, 0.5));
+		Vector3 dir(-1, -1, 0.5);
+		dir.normalise();
+		Light* l = mSceneMgr->createLight("light1");
+		l->setType(Light::LT_DIRECTIONAL);
+		l->setDirection(dir);
+
+		NameValuePairList pairList;
+		pairList["numberOfChains"] = "2";
+		pairList["maxElements"] = "80";
+		RibbonTrail* trail = static_cast<RibbonTrail*>(
+			mSceneMgr->createMovableObject("1", "RibbonTrail", &pairList));
+		trail->setMaterialName("Examples/LightRibbonTrail");
+		trail->setTrailLength(400);
+
+
+		mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(trail);
+
+		// Create 3 nodes for trail to follow
+		SceneNode* animNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
+		animNode->setPosition(50,30,0);
+		Animation* anim = mSceneMgr->createAnimation("an1", 14);
+		anim->setInterpolationMode(Animation::IM_SPLINE);
+		NodeAnimationTrack* track = anim->createNodeTrack(1, animNode);
+		TransformKeyFrame* kf = track->createNodeKeyFrame(0);
+		kf->setTranslate(Vector3(50,30,0));
+		kf = track->createNodeKeyFrame(2);
+		kf->setTranslate(Vector3(100, -30, 0));
+		kf = track->createNodeKeyFrame(4);
+		kf->setTranslate(Vector3(120, -100, 150));
+		kf = track->createNodeKeyFrame(6);
+		kf->setTranslate(Vector3(30, -100, 50));
+		kf = track->createNodeKeyFrame(8);
+		kf->setTranslate(Vector3(-50, 30, -50));
+		kf = track->createNodeKeyFrame(10);
+		kf->setTranslate(Vector3(-150, -20, -100));
+		kf = track->createNodeKeyFrame(12);
+		kf->setTranslate(Vector3(-50, -30, 0));
+		kf = track->createNodeKeyFrame(14);
+		kf->setTranslate(Vector3(50,30,0));
+
+		AnimationState* animState = mSceneMgr->createAnimationState("an1");
+		animState->setEnabled(true);
+		mAnimStateList.push_back(animState);
+
+		trail->setInitialColour(0, 1.0, 0.8, 0);
+		trail->setColourChange(0, 0.5, 0.5, 0.5, 0.5);
+		trail->setInitialWidth(0, 5);
+		trail->addNode(animNode);
+
+		// Add light
+		Light* l2 = mSceneMgr->createLight("l2");
+		l2->setDiffuseColour(trail->getInitialColour(0));
+		animNode->attachObject(l2);
+
+		// Add billboard
+		BillboardSet* bbs = mSceneMgr->createBillboardSet("bb", 1);
+		bbs->createBillboard(Vector3::ZERO, trail->getInitialColour(0));
+		bbs->setMaterialName("Examples/Flare");
+		animNode->attachObject(bbs);
+
+		animNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
+		animNode->setPosition(-50,100,0);
+		anim = mSceneMgr->createAnimation("an2", 10);
+		anim->setInterpolationMode(Animation::IM_SPLINE);
+		track = anim->createNodeTrack(1, animNode);
+		kf = track->createNodeKeyFrame(0);
+		kf->setTranslate(Vector3(-50,100,0));
+		kf = track->createNodeKeyFrame(2);
+		kf->setTranslate(Vector3(-100, 150, -30));
+		kf = track->createNodeKeyFrame(4);
+		kf->setTranslate(Vector3(-200, 0, 40));
+		kf = track->createNodeKeyFrame(6);
+		kf->setTranslate(Vector3(0, -150, 70));
+		kf = track->createNodeKeyFrame(8);
+		kf->setTranslate(Vector3(50, 0, 30));
+		kf = track->createNodeKeyFrame(10);
+		kf->setTranslate(Vector3(-50,100,0));
+
+		animState = mSceneMgr->createAnimationState("an2");
+		animState->setEnabled(true);
+		mAnimStateList.push_back(animState);
+
+		trail->setInitialColour(1, 0.0, 1.0, 0.4);
+		trail->setColourChange(1, 0.5, 0.5, 0.5, 0.5);
+		trail->setInitialWidth(1, 5);
+		trail->addNode(animNode);
+
+
+		// Add light
+		l2 = mSceneMgr->createLight("l3");
+		l2->setDiffuseColour(trail->getInitialColour(1));
+		animNode->attachObject(l2);
+
+		// Add billboard
+		bbs = mSceneMgr->createBillboardSet("bb2", 1);
+		bbs->createBillboard(Vector3::ZERO, trail->getInitialColour(1));
+		bbs->setMaterialName("Examples/Flare");
+		animNode->attachObject(bbs);
+
+
+	}
+
+	void createFrameListener(void)
+    {
+		// This is where we instantiate our own frame listener
+        mFrameListener= new LightingListener(mWindow, mCamera);
+		mFrameListener->showDebugOverlay(false);
+        mRoot->addFrameListener(mFrameListener);
+
+    }
+
+};
Index: code/branches/main_reto_vs05/src/camera_manager.cc
===================================================================
--- code/branches/main_reto_vs05/src/camera_manager.cc	(revision 232)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   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 3 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OgreSceneManager.h"
-#include "OgreCamera.h"
-
-#include "camera_manager.h"
-
-namespace orxonox {
-  using namespace Ogre;
-
-  CameraManager::CameraManager(SceneManager *mScene) : mSceneMgr(mSceneMgr)
-  {
-  }
-
-
-  CameraManager::~CameraManager()
-  {
-  }
-
-
-  bool CameraManager::setCameraPosition(int n)
-  {
-	  return true;
-  }
-
-}
Index: code/branches/main_reto_vs05/src/camera_manager.h
===================================================================
--- code/branches/main_reto_vs05/src/camera_manager.h	(revision 232)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   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 3 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-
-#ifndef CAMERA_MANAGER_H
-#define CAMERA_MANAGER_H
-
-#include "OgrePrerequisites.h"
-
-#include "orxonox_prerequisites.h"
-
-
-namespace orxonox {
-
-  class CameraManager
-  {
-  public:
-    CameraManager(Ogre::SceneManager*);
-	  ~CameraManager();
-
-	  bool setCameraPosition(int);
-
-  protected:
-	  Ogre::SceneManager *mSceneMgr;
-	  Ogre::Camera *mCamera;
-  };
-
-}
-
-#endif /* CAMERA_MANAGER_H */
Index: code/branches/main_reto_vs05/src/hud/hud_overlay.cc
===================================================================
--- code/branches/main_reto_vs05/src/hud/hud_overlay.cc	(revision 288)
+++ code/branches/main_reto_vs05/src/hud/hud_overlay.cc	(revision 288)
@@ -0,0 +1,151 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   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 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      HUD design: Yuning Chai
+ *      Implementation: Yuning Chai
+ *   Co-authors:
+ *      Implementation: Reto Grieder
+ *
+ */
+
+//#include "OgreMath.h"
+//#include "OgreVector3.h"
+#include "OgreStringConverter.h"
+#include "OgreOverlayManager.h"
+#include "OgreOverlay.h"
+#include "OgreOverlayElement.h"
+
+#include "hud_overlay.h"
+
+
+namespace orxonox {
+namespace hud {
+  using namespace Ogre;
+
+  HUDOverlay::HUDOverlay()
+  {
+    //TODO: write safe guard
+    overlay_ = OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
+  }
+
+
+  HUDOverlay::~HUDOverlay()
+  {
+  }
+
+
+  void HUDOverlay::show()
+  {
+    //TODO: safe guard
+    overlay_->show();
+  }
+
+
+  void HUDOverlay::hide()
+  {
+    //TODO: safe guard
+    overlay_->hide();
+  }
+
+
+  bool HUDOverlay::tick(unsigned long, Ogre::Real)
+  {
+		// set Time
+		int TimeMin = 99;
+		int TimeSec = 55;
+		OverlayElement* TimeText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/Time/Text");
+		TimeText->setCaption(StringConverter::toString(TimeMin) + ":" + StringConverter::toString(TimeSec));
+		
+		// set TargetWindow
+		String TargetWindowName = "HURRA";
+		int TargetWindowDistance = 12;
+		String TargetWindowStatus = "Dead";
+		int TargetWindowHitRating = 30;
+		OverlayElement* TargetWindowNameText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/Name");
+		TargetWindowNameText->setCaption( TargetWindowName);		
+		OverlayElement* TargetWindowDistanceText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/DistanceText");
+		TargetWindowDistanceText->setCaption(StringConverter::toString(TargetWindowDistance) + "km" );
+		OverlayElement* TargetWindowStatusText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/StatusText");
+		TargetWindowStatusText->setCaption( TargetWindowStatus );
+		OverlayElement* TargetWindowHitRatingText = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/HitRatingText");
+		TargetWindowHitRatingText->setCaption(StringConverter::toString(TargetWindowHitRating) + "%" );
+		
+		// set Energy
+		int EnergyValue = 60.0;
+		OverlayElement* EnergyLength = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/EnergyBackground");
+		EnergyLength->setWidth((int)((double)60/(double)100*200));
+		
+		// set Shild
+		bool ShildLeftTopValue = true;
+		bool ShildRightTopValue = false;
+		bool ShildLeftBottomValue = false;
+		bool ShildRightBottomValue = true;
+		OverlayElement* ShildLeftTop = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/ShildLeftTop");
+		if (ShildLeftTopValue) ShildLeftTop->show();
+		else ShildLeftTop->hide();
+		OverlayElement* ShildRightTop = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/ShildRightTop");
+		if (ShildRightTopValue) ShildRightTop->show();
+		else ShildRightTop->hide();
+		OverlayElement* ShildLeftBottom = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/ShildLeftBottom");
+		if (ShildLeftBottomValue) ShildLeftBottom->show();
+		else ShildLeftBottom->hide();
+		OverlayElement* ShildRightBottom = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/ShildRightBottom");
+		if (ShildRightBottomValue) ShildRightBottom->show();
+		else ShildRightBottom->hide();
+		
+		// set Rockets
+		int Rocket1 = 11;
+		int Rocket2 = 22;
+		int Rocket3 = 33;
+		int Rocket4 = 44;
+		OverlayElement* RocketNum1 = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum1");
+		RocketNum1->setCaption(StringConverter::toString(Rocket1));
+		OverlayElement* RocketNum2 = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum2");
+		RocketNum2->setCaption(StringConverter::toString(Rocket2));
+		OverlayElement* RocketNum3 = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum3");
+		RocketNum3->setCaption(StringConverter::toString(Rocket3));
+		OverlayElement* RocketNum4 = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum4");
+		RocketNum4->setCaption(StringConverter::toString(Rocket4));
+		
+		// set EnergyDistribution
+		double EnergyDistrPixelX = 100;
+		double EnergyDistrPixelY = 86;		
+		double EnergyDistrShild = 32;
+		double EnergyDistrEngine = 50;
+		double EnergyDistrLaser = 18;
+		double EnergyDistrShildInv = 100 - EnergyDistrShild;
+		double EnergyDistrEngineInv = 100 - EnergyDistrEngine;
+		double EnergyDistrLaserInv = 100 - EnergyDistrLaser;
+		double EnergyDistrY = (double)EnergyDistrEngineInv/((double)EnergyDistrEngineInv+(double)EnergyDistrLaserInv) * EnergyDistrPixelY;
+		double EnergyDistrX = EnergyDistrY/1.7321;
+		
+		
+		
+		OverlayElement* EnergyDistrPoint = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/EnergyDistrPoint");
+//		EnergyDistrPoint->setLeft();
+//		EnergyDistrPoint->setTop();
+
+
+    // keep rendering
+    return true;
+  }
+}
+}
Index: code/branches/main_reto_vs05/src/hud/hud_overlay.h
===================================================================
--- code/branches/main_reto_vs05/src/hud/hud_overlay.h	(revision 288)
+++ code/branches/main_reto_vs05/src/hud/hud_overlay.h	(revision 288)
@@ -0,0 +1,64 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   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 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      HUD design: Yuning Chai
+ *      Implementation: Yuning Chai
+ *   Co-authors:
+ *      Implementation: Reto Grieder
+ *
+ */
+
+
+#ifndef HUD_OVERLAY_H
+#define HUD_OVERLAY_H
+
+#include "OgrePrerequisites.h"
+
+#include "orxonox_prerequisites.h"
+
+
+namespace orxonox {
+namespace hud {
+
+  class HUDOverlay
+  {
+  public:
+    HUDOverlay();
+	  virtual ~HUDOverlay();
+
+    void show();
+
+    void hide();
+
+    bool tick(unsigned long, Ogre::Real);
+
+  protected:
+
+  public:
+
+  protected:
+    Ogre::Overlay *overlay_;
+
+  };
+}
+}
+
+#endif /* HUD_OVERLAY_H */
Index: code/branches/main_reto_vs05/src/hud/test_overlay.cc
===================================================================
--- code/branches/main_reto_vs05/src/hud/test_overlay.cc	(revision 288)
+++ code/branches/main_reto_vs05/src/hud/test_overlay.cc	(revision 288)
@@ -0,0 +1,124 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   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 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      HUD design: Yuning Chai
+ *      Implementation: Yuning Chai
+ *   Co-authors:
+ *      Implementation: Reto Grieder
+ *
+ */
+
+//#include "OgreMath.h"
+//#include "OgreVector3.h"
+#include "OgreStringConverter.h"
+#include "OgreOverlayManager.h"
+#include "OgreOverlay.h"
+#include "OgreOverlayElement.h"
+#include "OgreRenderWindow.h"
+#include "OgreRenderTarget.h"
+
+#include "test_overlay.h"
+
+
+namespace orxonox {
+namespace hud {
+  using namespace Ogre;
+
+  TestOverlay::TestOverlay(RenderWindow *window)
+    :window_(window)
+  {
+    //TODO: write safe guard
+    overlay_ = OverlayManager::getSingleton().getByName("Core/DebugOverlay");
+  }
+
+
+  TestOverlay::~TestOverlay()
+  {
+  }
+
+
+  void TestOverlay::show()
+  {
+    //TODO: safe guard
+    overlay_->show();
+  }
+
+
+  void TestOverlay::hide()
+  {
+    //TODO: safe guard
+    overlay_->hide();
+  }
+
+
+  void TestOverlay::setDebugText(Ogre::String &str)
+  {
+    debugText_ = str;
+  }
+
+
+  bool TestOverlay::tick(unsigned long, Ogre::Real)
+  {
+    static String currFps = "Current FPS: ";
+    static String avgFps = "Average FPS: ";
+    static String bestFps = "Best FPS: ";
+    static String worstFps = "Worst FPS: ";
+    static String tris = "Triangle Count: ";
+    static String batches = "Batch Count: ";
+
+    // update stats when necessary
+    try {
+      OverlayElement* guiAvg = OverlayManager::getSingleton()
+        .getOverlayElement("Core/AverageFps");
+      OverlayElement* guiCurr = OverlayManager::getSingleton()
+        .getOverlayElement("Core/CurrFps");
+      OverlayElement* guiBest = OverlayManager::getSingleton()
+        .getOverlayElement("Core/BestFps");
+      OverlayElement* guiWorst = OverlayManager::getSingleton()
+        .getOverlayElement("Core/WorstFps");
+
+      const RenderTarget::FrameStats& stats = window_->getStatistics();
+      guiAvg->setCaption(avgFps + StringConverter::toString(stats.avgFPS));
+      guiCurr->setCaption(currFps + StringConverter::toString(stats.lastFPS));
+      guiBest->setCaption(bestFps + StringConverter::toString(stats.bestFPS)
+        +" "+StringConverter::toString(stats.bestFrameTime)+" ms");
+      guiWorst->setCaption(worstFps + StringConverter::toString(stats.worstFPS)
+        +" "+StringConverter::toString(stats.worstFrameTime)+" ms");
+
+      OverlayElement* guiTris = OverlayManager::getSingleton()
+        .getOverlayElement("Core/NumTris");
+      guiTris->setCaption(tris + StringConverter::toString(stats.triangleCount));
+
+      OverlayElement* guiBatches = OverlayManager::getSingleton()
+        .getOverlayElement("Core/NumBatches");
+      guiBatches->setCaption(batches
+        + StringConverter::toString(stats.batchCount));
+
+      OverlayElement* guiDbg = OverlayManager::getSingleton()
+        .getOverlayElement("Core/DebugText");
+      guiDbg->setCaption(debugText_);
+    }
+    catch(...) { /* ignore */ }
+
+    return true;
+  }
+}
+}
Index: code/branches/main_reto_vs05/src/hud/test_overlay.h
===================================================================
--- code/branches/main_reto_vs05/src/hud/test_overlay.h	(revision 288)
+++ code/branches/main_reto_vs05/src/hud/test_overlay.h	(revision 288)
@@ -0,0 +1,69 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   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 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      HUD design: Yuning Chai
+ *      Implementation: Yuning Chai
+ *   Co-authors:
+ *      Implementation: Reto Grieder
+ *
+ */
+
+
+#ifndef TEST_OVERLAY_H
+#define TEST_OVERLAY_H
+
+#include "OgrePrerequisites.h"
+
+#include "orxonox_prerequisites.h"
+
+
+namespace orxonox {
+namespace hud {
+
+  class TestOverlay
+  {
+  public:
+    TestOverlay(Ogre::RenderWindow*);
+	  virtual ~TestOverlay();
+
+    void show();
+
+    void hide();
+
+    void setDebugText(Ogre::String&);
+
+    bool tick(unsigned long, Ogre::Real);
+
+  protected:
+
+  public:
+
+  protected:
+    Ogre::Overlay *overlay_;
+    Ogre::RenderWindow *window_;
+
+    Ogre::String debugText_;
+
+  };
+}
+}
+
+#endif /* TEST_OVERLAY_H */
Index: code/branches/main_reto_vs05/src/main.cc
===================================================================
--- code/branches/main_reto_vs05/src/main.cc	(revision 232)
+++ code/branches/main_reto_vs05/src/main.cc	(revision 288)
@@ -26,4 +26,6 @@
  */
 
+//#define WITH_HIERARCHY
+
 #include "OgrePlatform.h"
 #include "OgreException.h"
@@ -31,4 +33,5 @@
 #include "orxonox.h"
 
+#ifdef WITH_HIERARCHY
 #include "class_hierarchy/BaseObject.h"
 #include "class_hierarchy/Test.h"
@@ -36,4 +39,5 @@
 #include "class_hierarchy/test2.h"
 #include "class_hierarchy/test3.h"
+#endif
 
 
@@ -50,5 +54,5 @@
 #endif 
   {
-#if 1
+#ifndef WITH_HIERARCHY
     try {
       // create an orxonox application and run it
Index: code/branches/main_reto_vs05/src/orxonox.cc
===================================================================
--- code/branches/main_reto_vs05/src/orxonox.cc	(revision 232)
+++ code/branches/main_reto_vs05/src/orxonox.cc	(revision 288)
@@ -99,5 +99,6 @@
 	  ogre_->initialise();
 
-	  runMgr_ = new RunManager(ogre_);
+    runMgr_ = RunManager::createSingleton();
+    runMgr_->initialise(ogre_);
 
 	  return true;
@@ -113,5 +114,5 @@
 		  delete timer_;
 	  if (runMgr_)
-		  delete runMgr_;
+      RunManager::destroySingleton();
 	  if (ogre_)
 		  delete ogre_;
Index: code/branches/main_reto_vs05/src/orxonox_prerequisites.h
===================================================================
--- code/branches/main_reto_vs05/src/orxonox_prerequisites.h	(revision 232)
+++ code/branches/main_reto_vs05/src/orxonox_prerequisites.h	(revision 288)
@@ -52,4 +52,12 @@
   }
 
+
+  namespace hud {
+    
+    class HUDOverlay;
+    class TestOverlay;
+
+  }
+
 }
 
Index: code/branches/main_reto_vs05/src/orxonox_ship.cc
===================================================================
--- code/branches/main_reto_vs05/src/orxonox_ship.cc	(revision 232)
+++ code/branches/main_reto_vs05/src/orxonox_ship.cc	(revision 288)
@@ -32,4 +32,5 @@
 #include "OgreEntity.h"
 #include "OgreSceneManager.h"
+#include "OgreParticleSystem.h"
 
 #include "inertial_node.h"
@@ -127,4 +128,14 @@
     railGunStation_->selectWeapon(0);
 
+    // create some nice effects
+
+    ParticleSystem *particles = RunManager::getSingletonPtr()
+      ->getSceneManagerPtr()->createParticleSystem("asdf", "Examples/Smoke");
+
+    fishNode->getSceneNode()->attachObject(particles);
+
+
+
+
 	  return true;
   }
Index: code/branches/main_reto_vs05/src/run_manager.cc
===================================================================
--- code/branches/main_reto_vs05/src/run_manager.cc	(revision 232)
+++ code/branches/main_reto_vs05/src/run_manager.cc	(revision 288)
@@ -26,20 +26,16 @@
 
 
-#include "Ogre.h"
-//#include "OgreRoot.h"
-//#include "OgreSceneManager.h"
-//#include "OgreSceneNode.h"
-//#include "OgreCamera.h"
-//#include "OgreViewport.h"
-//#include "OgreRenderWindow.h"
-//#include "OgreOverlay.h"
-//#include "OgreOverlayManager.h"
-//#include "OgreOverlayElement.h"
-//#include "OgreTextureManager.h"
-//#include "OgreMaterialManager.h"
-//#include "OgreLogManager.h"
-//#include "OgreVector3.h"
-//#include "OgreStringConverter.h"
-//#include "OgreWindowEventUtilities.h"
+#include "OgreVector3.h"
+#include "OgreStringConverter.h"
+#include "OgreRoot.h"
+#include "OgreSceneManager.h"
+#include "OgreSceneNode.h"
+#include "OgreCamera.h"
+#include "OgreViewport.h"
+#include "OgreRenderWindow.h"
+#include "OgreTextureManager.h"
+#include "OgreMaterialManager.h"
+#include "OgreLogManager.h"
+#include "OgreWindowEventUtilities.h"
 
 //Use this define to signify OIS will be used as a DLL
@@ -51,5 +47,4 @@
 #include "orxonox_scene.h"
 #include "orxonox_ship.h"
-#include "camera_manager.h"
 #include "inertial_node.h"
 
@@ -58,14 +53,14 @@
 #include "weapon/base_weapon.h"
 
+#include "hud/hud_overlay.h"
+#include "hud/test_overlay.h"
+
 #include "run_manager.h"
 
-namespace Ogre {
-  using namespace orxonox;
-  template<> RunManager* Singleton<RunManager>::ms_Singleton = 0;
-}
 
 namespace orxonox {
   using namespace Ogre;
   using namespace weapon;
+  using namespace hud;
 
   /**
@@ -82,30 +77,26 @@
   */
 
-  RunManager* RunManager::getSingletonPtr(void)
-  {
-      return ms_Singleton;
-  }
-  RunManager& RunManager::getSingleton(void)
-  {  
-      assert( ms_Singleton );  return ( *ms_Singleton );  
-  }
-
-
-  /**
-  * Contructor only needs the render window and the Root object which are both
-  * the OgreControl object.
-  * Right now the constructor does all the initialisation work. This could also
-  * be done in a new method "initialize()", for whatever purpose.
-  * 
-  * 
+
+  RunManager* RunManager::singletonPtr_s = NULL;
+
+
+  /**
+  * Contructor only needs the Root object.
+  */
+  RunManager::RunManager()
+        : ogre_(NULL), window_(NULL), screenShotCounter_(0),
+        timeUntilNextToggle_(0), mouseSensitivity_(0.003), inputManager_(0),
+        mouse_(0), keyboard_(0), joystick_(0), statsOn_(true)
+  {
+  }
+
+  /**
   * @param ogre_ The OgreControl object holding the render window and the Root
   */
-  RunManager::RunManager(OgreControl * ogre)
-        : ogre_(ogre), window_(ogre->getRenderWindow()), //leftButtonDown_(false),
-        statsOn_(true), screenShotCounter_(0), timeUntilNextToggle_(0),
-        filtering_(TFO_BILINEAR), aniso_(1), sceneDetailIndex_(0),
-        mouseSensitivity_(0.003),
-        debugOverlay_(0), inputManager_(0), mouse_(0), keyboard_(0), joystick_(0)
-  {
+  void RunManager::initialise(OgreControl *ogre)
+    {
+    ogre_ = ogre;
+    window_ = ogre->getRenderWindow();
+
     // SETTING UP THE SCENE
 
@@ -126,14 +117,7 @@
 
     // Create a space ship object and its SceneNode.
-    // Some ideas about the steering: The ship should only receive events like
-    // up, down, left, right, roll left, roll right, move down, move up, etc).
-    // Multiple interpretations of these commands would make the game more
-    // but it also makes AI steering more difficult, since for every type of
-    // steering, new methods have to be written.
-    // --> clearly define how a space ship can fly (rolling?, conservation of
-    // impuls?, direct mouse sight steeering?, etc.)
     // It should also be considered, that the ship should provide another Node
     // for a camera to be attached (otherwise the spaceship in front of the
-    // would be very static, never moving at all).
+    // ship would be very static, never moving at all).
 
     // Construct a new spaceship and give it the node
@@ -145,5 +129,5 @@
 
     // load all resources and create the entities by calling the initialise()
-    // methods for each object (don't initialise in the constructor!).
+    // methods for each object (no constructor initialisations!).
     backgroundScene_->initialise();
     playerShip_->initialise();
@@ -151,8 +135,4 @@
 
     // CAMERA AND VIEWPORT
-    // TODO: create a camera manager. It should be able to change its position
-    // around the space ship (predefined states would be nice too). And it should
-    // also be able to switch between different locations (like ship, spactator,
-    // certain fixed positions (e.g. finish line, etc.)). These are just ideas.
 
     // create camera and viewport
@@ -160,16 +140,16 @@
     createViewports();
 
+    // create HUD
+    hud_ = new hud::TestOverlay(window_);
+    hud_->show();
+
 
     // Set default mipmap level (NB some APIs ignore this)
     TextureManager::getSingleton().setDefaultNumMipmaps(5);
 
-    
 
     // HUMAN INTERFACE
 
-    using namespace OIS;
-
-    debugOverlay_ = OverlayManager::getSingleton()
-      .getByName("Core/DebugOverlay");
+    using namespace OIS;    
 
     LogManager::getSingletonPtr()->logMessage("*** Initializing OIS ***");
@@ -201,5 +181,5 @@
     windowResized(window_);
 
-    showDebugOverlay(true);
+    //showDebugOverlay(true);
 
     // REGISTER THIS OBJECT AS A WINDOW EVENT LISTENER IN OGRE
@@ -225,9 +205,11 @@
     if (bulletManager_)
       delete bulletManager_;
-  }
-
-
-  /**
-  * Method to compute anyting between 2 frames.
+    if (hud_)
+      delete hud_;
+  }
+
+
+  /**
+  * Method to compute anything between 2 frames.
   * 
   * Everything that needs to be computed during the games happens right here.
@@ -250,6 +232,14 @@
 
 
-    // Update the 'HUD'
-    updateStats();
+    // Update the HUD
+    hud_->setDebugText(" | Speed = "
+      + StringConverter::toString(playerShip_->getSpeed())
+      + " | Left Ammo = "
+      + StringConverter::toString(playerShip_
+      ->getMainWeapon()->getAmmoState())
+      + " | Ammo stock = "
+      + StringConverter::toString(playerShip_->getAmmoStock()));
+
+    hud_->tick(time, deltaTime);
 
     // update the bullet positions
@@ -404,30 +394,4 @@
     {
       statsOn_ = !statsOn_;
-      showDebugOverlay(statsOn_);
-      timeUntilNextToggle_ = 1;
-    }
-
-    if( keyboard_->isKeyDown(KC_T) && timeUntilNextToggle_ <= 0 )
-    {
-      switch(filtering_)
-      {
-      case TFO_BILINEAR:
-        filtering_ = TFO_TRILINEAR;
-        aniso_ = 1;
-        break;
-      case TFO_TRILINEAR:
-        filtering_ = TFO_ANISOTROPIC;
-        aniso_ = 8;
-        break;
-      case TFO_ANISOTROPIC:
-        filtering_ = TFO_BILINEAR;
-        aniso_ = 1;
-        break;
-      default: break;
-      }
-      MaterialManager::getSingleton().setDefaultTextureFiltering(filtering_);
-      MaterialManager::getSingleton().setDefaultAnisotropy(aniso_);
-
-      showDebugOverlay(statsOn_);
       timeUntilNextToggle_ = 1;
     }
@@ -439,39 +403,5 @@
       window_->writeContentsToFile(ss.str());
       timeUntilNextToggle_ = 0.5;
-      debugText_ = "Saved: " + ss.str();
-    }
-
-    if(keyboard_->isKeyDown(KC_R) && timeUntilNextToggle_ <=0)
-    {
-      sceneDetailIndex_ = (sceneDetailIndex_+1)%3 ;
-      switch(sceneDetailIndex_) {
-          case 0 : camera_->setPolygonMode(PM_SOLID); break;
-          case 1 : camera_->setPolygonMode(PM_WIREFRAME); break;
-          case 2 : camera_->setPolygonMode(PM_POINTS); break;
-      }
-      timeUntilNextToggle_ = 0.5;
-    }
-
-    static bool displayCameraDetails = false;
-    if(keyboard_->isKeyDown(KC_P) && timeUntilNextToggle_ <= 0)
-    {
-      displayCameraDetails = !displayCameraDetails;
-      timeUntilNextToggle_ = 0.5;
-      if (!displayCameraDetails)
-        debugText_ = "";
-    }
-
-    // Print camera details
-    if(displayCameraDetails)
-      debugText_ = " | Speed = "
-            + StringConverter::toString(playerShip_->getSpeed())
-            + " | Left Ammo = "
-            + StringConverter::toString(playerShip_
-            ->getMainWeapon()->getAmmoState())
-            + " | Ammo stock = "
-            + StringConverter::toString(playerShip_->getAmmoStock());
-    // debugText_ = "P: " + StringConverter::toString(camera_
-    //      ->getDerivedPosition()) + " " + "O: "
-    //      + StringConverter::toString(camera_->getDerivedOrientation());
+    }
 
     // Return true to continue rendering
@@ -507,76 +437,26 @@
 
   /**
-  * Show the debug overlay of desired.
+  * Show an overlay desired.
   * @param show Whether or not to show the debug overlay
   */
   void RunManager::showDebugOverlay(bool show)
   {
-    if (debugOverlay_)
+    if (hud_)
     {
       if (show)
-        debugOverlay_->show();
+        hud_->show();
       else
-        debugOverlay_->hide();
-    }
-  }
-
-
-  /**
-  * Show stats (e.g. FPS) in the left lower corner of the screen.
-  * Copied from the ExampleFrameListener.h in the Ogre SDK
-  */
-  void RunManager::updateStats(void)
-  {
-    static String currFps = "Current FPS: ";
-    static String avgFps = "Average FPS: ";
-    static String bestFps = "Best FPS: ";
-    static String worstFps = "Worst FPS: ";
-    static String tris = "Triangle Count: ";
-    static String batches = "Batch Count: ";
-
-    // update stats when necessary
-    try {
-      OverlayElement* guiAvg = OverlayManager::getSingleton()
-        .getOverlayElement("Core/AverageFps");
-      OverlayElement* guiCurr = OverlayManager::getSingleton()
-        .getOverlayElement("Core/CurrFps");
-      OverlayElement* guiBest = OverlayManager::getSingleton()
-        .getOverlayElement("Core/BestFps");
-      OverlayElement* guiWorst = OverlayManager::getSingleton()
-        .getOverlayElement("Core/WorstFps");
-
-      const RenderTarget::FrameStats& stats = window_->getStatistics();
-      guiAvg->setCaption(avgFps + StringConverter::toString(stats.avgFPS));
-      guiCurr->setCaption(currFps + StringConverter::toString(stats.lastFPS));
-      guiBest->setCaption(bestFps + StringConverter::toString(stats.bestFPS)
-        +" "+StringConverter::toString(stats.bestFrameTime)+" ms");
-      guiWorst->setCaption(worstFps + StringConverter::toString(stats.worstFPS)
-        +" "+StringConverter::toString(stats.worstFrameTime)+" ms");
-
-      OverlayElement* guiTris = OverlayManager::getSingleton()
-        .getOverlayElement("Core/NumTris");
-      guiTris->setCaption(tris + StringConverter::toString(stats.triangleCount));
-
-      OverlayElement* guiBatches = OverlayManager::getSingleton()
-        .getOverlayElement("Core/NumBatches");
-      guiBatches->setCaption(batches
-        + StringConverter::toString(stats.batchCount));
-
-      OverlayElement* guiDbg = OverlayManager::getSingleton()
-        .getOverlayElement("Core/DebugText");
-      guiDbg->setCaption(debugText_);
-    }
-    catch(...) { /* ignore */ }
-  }
-
+        hud_->hide();
+    }
+  }
 
 
   /**
   * Simple camera creator.
-  * playerShip_Node->attachObject(camera_) should no be here! This is what the camera
-  * manager is for. Right now, this method should do just fine, setting the
-  * cam behind the ship.
-  */
-  void RunManager::createCamera(void)
+  * playerShip_Node->attachObject(camera_) should not be here! This is what
+  * the camera manager is for. Right now, this method should do just fine,
+  * setting the cam behind the ship.
+  */
+  void RunManager::createCamera()
   {
     camera_ = sceneMgr_->createCamera("PlayerCam");
@@ -589,10 +469,8 @@
   /**
   * Simple viewport creator.
-  * TODO: fully understand the concept of viewports concerning orxnox.
-  * E.g. do we need splitscreen mode?
   * For now the viewport uses the entire render window and is based on the one
   * camera created so far.
   */
-  void RunManager::createViewports(void)
+  void RunManager::createViewports()
   {
     // Create one viewport, entire window
@@ -605,3 +483,29 @@
   }
 
+
+  RunManager* RunManager::createSingleton()
+  {
+    if (singletonPtr_s)
+      return NULL;
+    singletonPtr_s = new RunManager();
+    return singletonPtr_s;
+  }
+
+  void RunManager::destroySingleton()
+  {
+    if (singletonPtr_s)
+      delete singletonPtr_s;
+  }
+
+
+  RunManager& RunManager::getSingleton()
+  {
+    return *singletonPtr_s;
+  }
+
+  RunManager* RunManager::getSingletonPtr()
+  {
+    return singletonPtr_s;
+  }
+
 }
Index: code/branches/main_reto_vs05/src/run_manager.h
===================================================================
--- code/branches/main_reto_vs05/src/run_manager.h	(revision 232)
+++ code/branches/main_reto_vs05/src/run_manager.h	(revision 288)
@@ -32,6 +32,5 @@
 #include "OgrePrerequisites.h"
 #include "OgreWindowEventUtilities.h"
-#include "OgreTextureManager.h"
-#include "OgreSingleton.h"
+//#include "OgreTextureManager.h"
 
 #include <OIS/OISPrereqs.h>
@@ -44,12 +43,10 @@
   // let the class inherit from WindowEventListener in order for the RunMgr
   // to act as the central point of all the calcuations in Orxonox
-  class RunManager : public Ogre::WindowEventListener,
-                     public Ogre::Singleton<RunManager>
+  class RunManager : public Ogre::WindowEventListener
   {
   public:
-    RunManager(OgreControl*);
-
     virtual ~RunManager();
-    //void initialise(OgreControl*);
+    
+    void initialise(OgreControl*);
 
     bool tick(unsigned long, Ogre::Real);
@@ -65,4 +62,8 @@
     int getNumberOfAmmos();
 
+    static RunManager* createSingleton();
+
+    static void destroySingleton();
+
     static RunManager& getSingleton(void);
 
@@ -71,4 +72,6 @@
 
   protected:
+    RunManager();
+
 	  void createCamera(void);
 
@@ -93,28 +96,34 @@
 	  /** OUTPUT **/
 
-	  void updateStats(void);
-
 	  void showDebugOverlay(bool);
 
   protected:
+    // directly Ogre related fields
 	  Ogre::SceneManager *sceneMgr_;
 	  Ogre::RenderWindow *window_;
 	  Ogre::Camera       *camera_;
+
+
+    // self made orxonox fields
 	  OgreControl  *ogre_;
 	  OrxonoxScene *backgroundScene_;
 	  OrxonoxShip  *playerShip_;
+    hud::TestOverlay *hud_;
 
+    // Bullet manager
+    weapon::BulletManager *bulletManager_;
+
+    const Ogre::Real mouseSensitivity_;
+
+	  // previously elapsed render time
+	  unsigned long totalTime_;
+
+
+    // fields from the example framework
 	  bool statsOn_;
-	  std::string debugText_;
 
 	  unsigned int screenShotCounter_;
 	  // just to stop toggles flipping too fast
 	  Ogre::Real timeUntilNextToggle_;
-	  //bool leftButtonDown_;
-	  Ogre::TextureFilterOptions filtering_;
-	  int aniso_;
-
-	  int sceneDetailIndex_;
-	  Ogre::Overlay* debugOverlay_;
 
 	  //OIS Input devices
@@ -124,14 +133,6 @@
 	  OIS::JoyStick* joystick_;
 
-    const Ogre::Real mouseSensitivity_;
-
-    // Bullet array
-	  /*Bullet **bullets_;
-	  int bulletsSize_;
-	  int bulletsIndex_;*/
-    weapon::BulletManager *bulletManager_;
-
-	  // previously elapsed render time
-	  unsigned long totalTime_;
+    // singleton pointer
+    static RunManager *singletonPtr_s;
 
   };
Index: code/branches/main_reto_vs05/src/weapon/barrel_gun.cc
===================================================================
--- code/branches/main_reto_vs05/src/weapon/barrel_gun.cc	(revision 232)
+++ code/branches/main_reto_vs05/src/weapon/barrel_gun.cc	(revision 288)
@@ -95,5 +95,5 @@
   void BarrelGun::primaryFiring(unsigned int time)
   {
-    if (time > 1000/primaryFiringRate_)
+    if (time > (unsigned int)1000/primaryFiringRate_)
     {
       currentState_ = IDLE;
@@ -133,5 +133,5 @@
   void BarrelGun::secondaryFiring(unsigned int time)
   {
-    if (time > 1000/secondaryFiringRate_)
+    if (time > (unsigned int)1000/secondaryFiringRate_)
       currentState_ = IDLE;
   }
Index: code/branches/main_reto_vs05/src/weapon/base_weapon.cc
===================================================================
--- code/branches/main_reto_vs05/src/weapon/base_weapon.cc	(revision 288)
+++ code/branches/main_reto_vs05/src/weapon/base_weapon.cc	(revision 288)
@@ -0,0 +1,180 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   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 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OgreMath.h"
+#include "OgreVector3.h"
+#include "OgreStringConverter.h"
+#include "OgreSceneNode.h"
+#include "OgreEntity.h"
+#include "OgreSceneManager.h"
+
+#include "bullet.h"
+#include "bullet_manager.h"
+#include "inertial_node.h"
+#include "ammunition_dump.h"
+#include "run_manager.h"
+
+#include "base_weapon.h"
+
+
+namespace orxonox {
+namespace weapon {
+  using namespace Ogre;
+
+  BaseWeapon::BaseWeapon(InertialNode *node, AmmunitionDump *ammoDump)
+    : sceneMgr_(RunManager::getSingletonPtr()->getSceneManagerPtr()), node_(node),
+      bulletCounter_(0), primaryFireRequest_(false), currentState_(IDLE),
+      secondaryFireRequest_(false),
+      bulletManager_(RunManager::getSingletonPtr()->getBulletManagerPtr()),
+      secondaryFired_(false),
+      timeSinceNextActionAdded_(0), actionAdded_(false), nextAction_(NOTHING),
+      ammoDump_(ammoDump)
+  {
+    leftAmmo_ = 0;
+  }
+
+
+  BaseWeapon::~BaseWeapon()
+  {
+  }
+
+
+  bool BaseWeapon::addAction(const Action act)
+  {
+    if (nextAction_ == NOTHING)
+    {
+      nextAction_ = act;
+      actionAdded_ = true;
+      return true;
+    }
+    else
+      return false;
+  }
+
+
+  void BaseWeapon::primaryFireRequest()
+  {
+    primaryFireRequest_ = true;
+  }
+
+
+  void BaseWeapon::secondaryFireRequest()
+  {
+    secondaryFireRequest_ = true;
+  }
+
+
+  bool BaseWeapon::tick(unsigned long time, Real deltaTime)
+  {
+    // process action adder
+    if (actionAdded_)
+    {
+      timeSinceNextActionAdded_ = time;
+      actionAdded_ = false;
+    }
+
+    if (currentState_ != IDLE)
+    {
+      switch (currentState_)
+      {
+      case PRIMARY_FIRE:
+        primaryFiring((unsigned int)(time - actionStartTime_));
+        break;
+
+      case SECONDARY_FIRE:
+        secondaryFiring((unsigned int)(time - actionStartTime_));
+        break;
+
+      case RELOADING:
+        break;
+
+      case CHANGING_AMMO:
+        break;
+      }
+    }
+
+    if (currentState_ == IDLE)
+    {
+      // first, process next action
+      if (nextAction_ != NOTHING)
+      {
+        actionStartTime_ = time;
+        switch (nextAction_)
+        {
+        case RELOAD:
+          leftAmmo_ += ammoDump_->getAmmunition("Barrel", magazineSize_ - leftAmmo_);
+          break;
+
+        case CHANGE_AMMO:
+          break;
+
+        case SPECIAL:
+          break;
+
+        default:
+          break;
+        }
+
+        // pay attention when multithreaded!
+        nextAction_ = NOTHING;
+      }
+      else
+      {
+        // secondly, execute firing
+        if (primaryFireRequest_ && !(secondaryFired_ && secondaryFireRequest_))
+        {
+          actionStartTime_ = time;
+          currentState_ = PRIMARY_FIRE;
+          secondaryFired_ = false;
+          primaryFire();
+        }
+        else if (secondaryFireRequest_)
+        {
+          actionStartTime_ = time;
+          currentState_ = SECONDARY_FIRE;
+          secondaryFired_ = true;
+          secondaryFire();
+        }
+      }
+    }
+
+    primaryFireRequest_ = false;
+    secondaryFireRequest_ = false;
+
+    if (time - timeSinceNextActionAdded_ > nextActionValidityPeriod_)
+      nextAction_ = NOTHING;
+
+    return true;
+  }
+
+
+  int BaseWeapon::getAmmoState()
+  {
+    return leftAmmo_;
+  }
+}
+}
Index: code/branches/main_reto_vs05/src/weapon/base_weapon.cpp
===================================================================
--- code/branches/main_reto_vs05/src/weapon/base_weapon.cpp	(revision 232)
+++ 	(revision )
@@ -1,177 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   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 3 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OgreMath.h"
-#include "OgreVector3.h"
-#include "OgreStringConverter.h"
-#include "OgreSceneNode.h"
-#include "OgreEntity.h"
-#include "OgreSceneManager.h"
-
-#include "bullet.h"
-#include "bullet_manager.h"
-#include "inertial_node.h"
-#include "ammunition_dump.h"
-#include "run_manager.h"
-
-#include "base_weapon.h"
-
-
-namespace orxonox {
-namespace weapon {
-  using namespace Ogre;
-
-  BaseWeapon::BaseWeapon(InertialNode *node, AmmunitionDump *ammoDump)
-    : sceneMgr_(RunManager::getSingletonPtr()->getSceneManagerPtr()), node_(node),
-      bulletCounter_(0), primaryFireRequest_(false), currentState_(IDLE),
-      secondaryFireRequest_(false),
-      bulletManager_(RunManager::getSingletonPtr()->getBulletManagerPtr()),
-      secondaryFired_(false),
-      timeSinceNextActionAdded_(0), actionAdded_(false), nextAction_(NOTHING),
-      ammoDump_(ammoDump)
-  {
-    leftAmmo_ = 0;
-  }
-
-
-  BaseWeapon::~BaseWeapon()
-  {
-  }
-
-
-  bool BaseWeapon::addAction(const Action act)
-  {
-    if (nextAction_ == NOTHING)
-    {
-      nextAction_ = act;
-      actionAdded_ = true;
-      return true;
-    }
-    else
-      return false;
-  }
-
-
-  void BaseWeapon::primaryFireRequest()
-  {
-    primaryFireRequest_ = true;
-  }
-
-
-  void BaseWeapon::secondaryFireRequest()
-  {
-    secondaryFireRequest_ = true;
-  }
-
-
-  bool BaseWeapon::tick(unsigned long time, Real deltaTime)
-  {
-    // process action adder
-    if (actionAdded_)
-    {
-      timeSinceNextActionAdded_ = time;
-      actionAdded_ = false;
-    }
-
-    switch (currentState_)
-    {
-    case IDLE:
-      // first, process next action
-      if (nextAction_ != NOTHING)
-      {
-        actionStartTime_ = time;
-        switch (nextAction_)
-        {
-        case RELOAD:
-          leftAmmo_ += ammoDump_->getAmmunition("Barrel", magazineSize_ - leftAmmo_);
-          break;
-
-        case CHANGE_AMMO:
-          break;
-
-        case SPECIAL:
-          break;
-
-        default:
-          break;
-        }
-
-        // pay attention when multithreaded!
-        nextAction_ = NOTHING;
-      }
-      else
-      {
-        // secondly, execute firing
-        if (primaryFireRequest_ && !(secondaryFired_ && secondaryFireRequest_))
-        {
-          actionStartTime_ = time;
-          currentState_ = PRIMARY_FIRE;
-          secondaryFired_ = false;
-          primaryFire();
-        }
-        else if (secondaryFireRequest_)
-        {
-          actionStartTime_ = time;
-          currentState_ = SECONDARY_FIRE;
-          secondaryFired_ = true;
-          secondaryFire();
-        }
-      }
-
-      break;
-
-    case PRIMARY_FIRE:
-      primaryFiring((unsigned int)(time - actionStartTime_));
-      break;
-
-    case SECONDARY_FIRE:
-      secondaryFiring((unsigned int)(time - actionStartTime_));
-      break;
-
-    case RELOADING:
-      break;
-
-    case CHANGING_AMMO:
-      break;
-    }
-
-    primaryFireRequest_ = false;
-    secondaryFireRequest_ = false;
-
-    if (time - timeSinceNextActionAdded_ > nextActionValidityPeriod_)
-      nextAction_ = NOTHING;
-
-    return true;
-  }
-
-
-  int BaseWeapon::getAmmoState()
-  {
-    return leftAmmo_;
-  }
-}
-}
Index: code/branches/main_reto_vs05/src/weapon/weapon.h
===================================================================
--- code/branches/main_reto_vs05/src/weapon/weapon.h	(revision 232)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   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 3 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#if 0
-
-#ifndef WEAPON_H
-#define WEAPON_H
-
-#include "OgrePrerequisites.h"
-#include "OgreString.h"
-
-#include "orxonox_prerequisites.h"
-
-namespace orxonox {
-namespace weapon {
-
-  class Weapon
-  {
-  public:
-    Weapon(const Ogre::String &name, int firePower, int firingRate,
-      Ogre::Real bulletSpeed, int magazineSize)
-          : name_(name), firePower_(firePower), firingRate_(firingRate),
-          bulletSpeed_(bulletSpeed), magazineSize_(magazineSize) { }
-
-    virtual ~Weapon() { }
-
-  public:
-    Ogre::String name_;
-    int firePower_;
-    int firingRate_;
-    Ogre::Real bulletSpeed_;
-    int magazineSize_;
-  };
-
-}
-}
-
-#endif /* WEAPON_H */
-
-#endif
