pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r3729 - in trunk/pingus/src: . sound


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3729 - in trunk/pingus/src: . sound
Date: Tue, 8 Jul 2008 04:54:33 +0200

Author: grumbel
Date: 2008-07-08 04:54:28 +0200 (Tue, 08 Jul 2008)
New Revision: 3729

Removed:
   trunk/pingus/src/sound/sounds.hpp
Modified:
   trunk/pingus/src/sound/sound.cpp
   trunk/pingus/src/sound/sound.hpp
   trunk/pingus/src/world.cpp
Log:
Removed Sound enums

Modified: trunk/pingus/src/sound/sound.cpp
===================================================================
--- trunk/pingus/src/sound/sound.cpp    2008-07-08 02:50:31 UTC (rev 3728)
+++ trunk/pingus/src/sound/sound.cpp    2008-07-08 02:54:28 UTC (rev 3729)
@@ -23,7 +23,7 @@
 #include "sound.hpp"
 
 namespace Sound {
-
+
 PingusSoundImpl * PingusSound::sound;
 
 void
@@ -75,32 +75,6 @@
   sound->real_play_sound(name, volume, panning);
 }
 
-void
-PingusSound::play_sound(Sound::Name name, float volume, float panning)
-{
-  // FIXME: We need to return a handle to the sound
-
-  // This should be configurable via a .xml file
-  switch (name)
-    {
-    case Sound::DIGGER:
-      play_sound ("digger", volume, panning);
-      break;
-    case Sound::PLOP:
-      play_sound ("plop", volume, panning);
-      break;
-    case Sound::GOODIDEA:
-      play_sound ("goodidea", volume, panning);
-      break;
-    case Sound::OHNO:
-      play_sound ("ohno", volume, panning);
-      break;
-    case Sound::TICK:
-      play_sound ("tick", volume, panning);
-      break;
-    }
-}
-
 /** Load a sound file and play it immediately.
 
 @param name
@@ -118,7 +92,7 @@
   assert(sound);
   sound->real_stop_music();
 }
-
+
 } // namespace Sound
 
 /* EOF */

Modified: trunk/pingus/src/sound/sound.hpp
===================================================================
--- trunk/pingus/src/sound/sound.hpp    2008-07-08 02:50:31 UTC (rev 3728)
+++ trunk/pingus/src/sound/sound.hpp    2008-07-08 02:54:28 UTC (rev 3729)
@@ -18,13 +18,12 @@
 #define HEADER_PINGUS_SOUND_HPP
 
 #include <string>
-#include "sounds.hpp"
 #include "sound_impl.hpp"
 
 namespace Sound {
 
 class PingusSoundImpl;
-
+
 class PingusSound
 {
 private:
@@ -47,13 +46,11 @@
   static void play_music(const std::string & name, float volume = 1.0f, bool 
loop = true);
   static void stop_music();
 
-  static void play_sound(Sound::Name name, float volume = 1.0f, float panning 
= 0.0f);
-
 private:
   PingusSound (const PingusSound&);
   PingusSound& operator= (const PingusSound&);
 };
-
+
 } // namespace Sound
 
 #endif

Deleted: trunk/pingus/src/sound/sounds.hpp
===================================================================
--- trunk/pingus/src/sound/sounds.hpp   2008-07-08 02:50:31 UTC (rev 3728)
+++ trunk/pingus/src/sound/sounds.hpp   2008-07-08 02:54:28 UTC (rev 3729)
@@ -1,36 +0,0 @@
-//  Pingus - A free Lemmings clone
-//  Copyright (C) 2000 Ingo Ruhnke <address@hidden>
-//
-//  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/>.
-
-#ifndef HEADER_PINGUS_SOUNDS_HPP
-#define HEADER_PINGUS_SOUNDS_HPP
-
-#include "../pingus.hpp"
-
-namespace Sound {
-
-  enum Name {
-    DIGGER,
-    PLOP,
-    GOODIDEA,
-    OHNO,
-    TICK
-  };
-
-} // namespace Sound
-
-#endif
-
-/* EOF */

Modified: trunk/pingus/src/world.cpp
===================================================================
--- trunk/pingus/src/world.cpp  2008-07-08 02:50:31 UTC (rev 3728)
+++ trunk/pingus/src/world.cpp  2008-07-08 02:54:28 UTC (rev 3729)
@@ -204,7 +204,7 @@
 void
 World::armageddon(void)
 {
-  Sound::PingusSound::play_sound (Sound::GOODIDEA);
+  Sound::PingusSound::play_sound("goodidea");
   do_armageddon = true;
   armageddon_count = 0;
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]