Lower savebell sound for bigger bell
authorTobias Markus <tobiasmarkus1@tobiass-mbp.fritz.box>
Fri, 24 Jan 2014 00:07:59 +0000 (01:07 +0100)
committerTobias Markus <tobiasmarkus1@tobiass-mbp.fritz.box>
Fri, 24 Jan 2014 00:07:59 +0000 (01:07 +0100)
data/sounds/savebell_low.wav [new file with mode: 0644]
src/object/firefly.cpp

diff --git a/data/sounds/savebell_low.wav b/data/sounds/savebell_low.wav
new file mode 100644 (file)
index 0000000..d3adcad
Binary files /dev/null and b/data/sounds/savebell_low.wav differ
index 4f1e2a3..81bb8f7 100644 (file)
@@ -48,7 +48,12 @@ Firefly::Firefly(const Reader& lisp) :
   reactivate();
 
   //Load sound
-  sound_manager->preload("sounds/savebell2.wav");
+    if( sprite_name.find("vbell", 0) == std::string::npos ) {
+      sound_manager->preload("sounds/savebell_low.wav");
+    }
+    else {
+      sound_manager->preload("sounds/savebell2.wav");
+    }
 }
 
 void
@@ -87,7 +92,12 @@ Firefly::collision(GameObject& other, const CollisionHit& )
       Sector::current()->add_object(new SpriteParticle("images/objects/particles/reset.sprite", "default", ppos, ANCHOR_MIDDLE, pspeed, paccel, LAYER_OBJECTS-1));
     }
 
-    sound_manager->play("sounds/savebell2.wav");
+    if( sprite_name.find("vbell", 0) == std::string::npos ) {
+      sound_manager->play("sounds/savebell2.wav");
+    }
+    else {
+      sound_manager->play("sounds/savebell_low.wav");
+    }
 
     sprite->set_action("ringing");
     GameSession::current()->set_reset_point(Sector::current()->get_name(),