Index: orxonox/branches/sound/hud/Makefile
===================================================================
--- orxonox/branches/sound/hud/Makefile	(revision 3110)
+++ orxonox/branches/sound/hud/Makefile	(revision 3114)
@@ -1,9 +1,11 @@
 CC = gcc -Wall -ansi
-SOURCE = hud.cc
-FLAGS = -lGL -lGLU `sdl-config --cflags --libs`
-BINARY = hud
+SOURCE = hud_tga.cc
+FLAGS = -lGL -lGLU
+SDL = `sdl-config --cflags --libs`
+INCLUDES = -I/usr/include/SDL -L/usr/lib
+BINARY = hud_tga
 
 all:
-	$(CC) $(SOURCE) -o $(BINARY) $(FLAGS)
+	$(CC) $(SOURCE) -o $(BINARY) $(FLAGS) $(SDL) $(INCLUDES)
 
 clean:
Index: orxonox/branches/sound/sound/sound_control.cc
===================================================================
--- orxonox/branches/sound/sound/sound_control.cc	(revision 3110)
+++ orxonox/branches/sound/sound/sound_control.cc	(revision 3114)
@@ -21,9 +21,9 @@
 int sfx_channel2 = -1;
 int finished = 0;
-static SoundControl* instance = NULL;
-static SoundControl* sound = SoundControl::getInstance();
+SoundControl* SoundControl::sound = SoundControl::getInstance();
+SoundControl* SoundControl::instance = 0;
 int volume = SDL_MIX_MAXVOLUME;
 int track_number = 1;
-static Mix_Music* music = NULL;
+Mix_Music* music = NULL;
 int audio_rate = 44100, audio_channels = MIX_DEFAULT_CHANNELS, 
 audio_buffers = 16384, bits = 0; 
@@ -34,9 +34,8 @@
 /** 
     \brief standard constructor 
-    
-    This constructor builds a SoundControl Object, which waits for callers.
+    This constructor builds a SoundControl Object and initialises it .
     All sound output is handled by this singleton object.
 */ 
-SoundControl::SoundControl () { 
+SoundControl::SoundControl() { 
   if(SDL_Init(SDL_INIT_AUDIO)<0) {
     printf("SDL_Init: INIT_AUDIO error.\n"); 
@@ -51,12 +50,12 @@
     \brief Default destructor 
 */ 
-SoundControl::~SoundControl () {
+SoundControl::~SoundControl() {
 }
 
 /**
-   \brief Returns a reference to the singleton
+   \brief Returns a reference to the SoundControl singleton
 */
 SoundControl* SoundControl::getInstance() {
-  if (instance == NULL) {
+  if (instance == 0) {
     instance = new SoundControl;
   }
@@ -65,6 +64,4 @@
 
 void SoundControl::deleteInstance() {
-  delete instance;
-  instance = NULL;
 }
 
@@ -82,13 +79,13 @@
     \brief Sets the number of output Channels
 */ 
-void SoundControl::setNumberOfChannels (int number_of_channels) { 
+void SoundControl::setNumberOfChannels(int number_of_channels) { 
   Mix_AllocateChannels(number_of_channels);
 } 
 
 /** 
-    \brief May be called from any WorldEntity to play a .xm file 
+    \brief Static function to play a .xm file 
     \param filename: self-explanatory 
 */ 
-void SoundControl::playMod (char* fileName) {
+void SoundControl::playMod(char* fileName) {
   Mix_Chunk* chunk = NULL; 
   chunk = Mix_LoadWAV(fileName); 
@@ -99,8 +96,8 @@
 
 /** 
-    \brief May be called from any WorldEntity to play a .wav file 
+    \brief Static function to play a .wav file 
     \param filename: self-explanatory 
 */ 
-void SoundControl::playWav (char* fileName) {
+void SoundControl::playWav(char* fileName) {
   Mix_Chunk* chunk = NULL; 
   chunk = Mix_LoadWAV(fileName); 
@@ -111,8 +108,8 @@
 
 /** 
-    \brief May be called from any WorldEntity to play a .ogg file 
+    \brief Static function to play an .ogg file 
     \param filename: self-explanatory 
 */ 
-void SoundControl::playOgg (char* fileName) {
+void SoundControl::playOgg(char* fileName) {
   Mix_Music* music = NULL;
   music = Mix_LoadMUS(fileName);
@@ -126,5 +123,5 @@
     \brief Heightens the overall volume of output 
 */ 
-void SoundControl::volumeUp () { 
+void SoundControl::volumeUp() { 
   volume = (volume + 1) << 1; 
   if(volume > SDL_MIX_MAXVOLUME) 
@@ -137,5 +134,5 @@
     \brief Lowers the overall volume of output 
 */  
-void SoundControl::volumeDown () { 
+void SoundControl::volumeDown() { 
   volume >>= 1; 
   Mix_VolumeMusic(volume); 
@@ -145,5 +142,5 @@
     \brief Rewinds music to the beginning 
 */  
-void SoundControl::trackRewind () { 
+void SoundControl::trackRewind() { 
   Mix_RewindMusic(); 
 } 
@@ -152,5 +149,5 @@
     \brief Rewinds the music 5 seconds 
 */  
-void SoundControl::forwardMusic () { 
+void SoundControl::forwardMusic() { 
   Mix_SetMusicPosition(+5); 
 } 
@@ -166,14 +163,28 @@
     \brief Pauses music output 
 */ 
-void SoundControl::pauseMusic () {
+void SoundControl::pauseMusic() {
   Mix_PauseMusic();
 } 
 
 /** 
-    \brief this function pauses music output 
-*/ 
-void SoundControl::resumeMusic () {
+    \brief Pauses music output 
+*/ 
+void SoundControl::resumeMusic() {
   Mix_ResumeMusic();
 } 
+
+/** 
+    \brief Fades in music
+*/ 
+void fadeInMusic(int time) {
+
+}
+
+/** 
+    \brief Fades out music
+*/ 
+void SoundControl::fadeOutMusic(int time) {
+
+}
 
 /** 
@@ -194,5 +205,6 @@
     if(key.type == SDL_KEYDOWN) {
       if(sfx_channel1 < 0) {
-	sfx_channel1 = sound->playWav("sound1.wav");
+	sfx_channel1 = 1;
+	sound->playWav("sound1.wav");
       }
     } else {
@@ -204,5 +216,6 @@
     if(key.type == SDL_KEYDOWN) {
       if(sfx_channel2 < 0) {
-	sfx_channel2 = sound->playWav("sound2.wav");
+	sfx_channel2 = 1;
+	sound->playWav("sound2.wav");
       }
     } else {
@@ -224,5 +237,5 @@
 }
 
-int SoundControl::main(void) {
+int SoundControl::main(int argc, char* argv[]) {
   SDL_Surface* screen;
   SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO); 
Index: orxonox/branches/sound/sound/sound_control.h
===================================================================
--- orxonox/branches/sound/sound/sound_control.h	(revision 3110)
+++ orxonox/branches/sound/sound/sound_control.h	(revision 3114)
@@ -10,8 +10,9 @@
   static SoundControl* getInstance();
   static void deleteInstance();
+  
   void setNumberOfChannels(int number_of_channels);
-  void playMod(char* filename);
-  void playWav(char* filename);
-  void playOgg(char* filename);
+  static void playMod(char* filename);
+  static void playWav(char* filename);
+  static void playOgg(char* filename);
   void volumeUp();
   void volumeDown();
@@ -21,8 +22,12 @@
   void pauseMusic();
   void resumeMusic();
+  void fadeInMusic(int time);
+  void fadeOutMusic(int time);
   static void musicDone();
+  
   void handleKey(SDL_KeyboardEvent key); 
-  int main (void);
-  static SoundControl* instance;
+  int main(int argc, char* argv[]);
+  
+  static SoundControl* sound;
   int volume;
   int track_number;
@@ -33,8 +38,12 @@
   int sfx_channel2;
   int finished;
-private:
-  void initialise();
+
+ protected:
   SoundControl();
   ~SoundControl();
+  void initialise();
+
+ private:
+  static SoundControl* instance;
 };
 
