changeset 98:725b292ca07b

Added sounds killing foxes and chickens, and nightfall Renamed sounds for clarity
author David Fraser <davidf@sjsoft.com>
date Wed, 02 Sep 2009 12:14:24 +0000
parents 529a4d41c67a
children f5d56688943b
files data/sounds/chicken4.ogg data/sounds/chicken5.ogg data/sounds/daybreak.ogg data/sounds/kill-chicken.ogg data/sounds/kill-fox.ogg data/sounds/nightfall.ogg data/sounds/sell-chicken.ogg data/sounds/sources.txt gamelib/animal.py gamelib/engine.py gamelib/gameboard.py
diffstat 11 files changed, 33 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
Binary file data/sounds/chicken4.ogg has changed
Binary file data/sounds/chicken5.ogg has changed
Binary file data/sounds/daybreak.ogg has changed
Binary file data/sounds/kill-chicken.ogg has changed
Binary file data/sounds/kill-fox.ogg has changed
Binary file data/sounds/nightfall.ogg has changed
Binary file data/sounds/sell-chicken.ogg has changed
--- a/data/sounds/sources.txt	Wed Sep 02 11:52:02 2009 +0000
+++ b/data/sounds/sources.txt	Wed Sep 02 12:14:24 2009 +0000
@@ -23,7 +23,7 @@
 OriginalExtension: aiff
 WebLogin: sampleswap
 
-[chicken4.ogg]
+[sell-chicken.ogg]
 URL: http://www.archive.org/download/BoulangerColette/BoulangerColette44.zip
 Source: http://www.archive.org/details/BoulangerColette
 License: http://creativecommons.org/licenses/by/3.0/
@@ -31,7 +31,7 @@
 ArchiveExtension: zip
 ArchiveMember: ColetteBoulanger44/chicken.wav
 
-[chicken5.ogg]
+[daybreak.ogg]
 URL: http://www.archive.org/download/BoulangerColette/BoulangerColette44.zip
 Source: http://www.archive.org/details/BoulangerColette
 License: http://creativecommons.org/licenses/by/3.0/
@@ -39,3 +39,28 @@
 ArchiveExtension: zip
 ArchiveMember: ColetteBoulanger44/rooster.wav
 
+[nightfall.ogg]
+URL: http://www.archive.org/download/Berklee44v6/Berklee44v6.zip
+Source: http://www.archive.org/details/Berklee44v6
+License: http://creativecommons.org/licenses/by/3.0/
+Credit: Sound samples by Berklee recorded for Richard Boulanger for use in the One Laptop per Child music library. See http://wiki.laptop.org/go/Sound_samples for details.
+ArchiveExtension: zip
+ArchiveMember: Berklee44v6/dog1.wav
+OriginalFormat: mplayer
+
+[kill-chicken.ogg]
+URL: http://www.archive.org/download/Berklee44v6/Berklee44v6.zip
+Source: http://www.archive.org/details/Berklee44v6
+License: http://creativecommons.org/licenses/by/3.0/
+Credit: Sound samples by Berklee recorded for Richard Boulanger for use in the One Laptop per Child music library. See http://wiki.laptop.org/go/Sound_samples for details.
+ArchiveExtension: zip
+ArchiveMember: Berklee44v6/animal_vocal_1.wav
+
+[kill-fox.ogg]
+URL: http://www.archive.org/download/Berklee44v6/Berklee44v6.zip
+Source: http://www.archive.org/details/Berklee44v6
+License: http://creativecommons.org/licenses/by/3.0/
+Credit: Sound samples by Berklee recorded for Richard Boulanger for use in the One Laptop per Child music library. See http://wiki.laptop.org/go/Sound_samples for details.
+ArchiveExtension: zip
+ArchiveMember: Berklee44v6/dog_bark_1.wav
+
--- a/gamelib/animal.py	Wed Sep 02 11:52:02 2009 +0000
+++ b/gamelib/animal.py	Wed Sep 02 12:14:24 2009 +0000
@@ -8,6 +8,7 @@
 import imagecache
 import tiles
 from misc import Position
+import sound
 
 class Animal(Sprite):
     """Base class for animals"""
@@ -77,6 +78,7 @@
         if not fox:
             return
         if weapon.hit(gameboard, self, fox):
+            sound.play_sound("kill-fox.ogg")
             gameboard.kill_fox(fox)
 
 class Egg(Animal):
@@ -200,6 +202,7 @@
 
     def _catch_chicken(self, chicken, gameboard):
         """Catch a chicken"""
+        sound.play_sound("kill-chicken.ogg")
         gameboard.remove_chicken(chicken)
         self.hunting = False
 
--- a/gamelib/engine.py	Wed Sep 02 11:52:02 2009 +0000
+++ b/gamelib/engine.py	Wed Sep 02 12:14:24 2009 +0000
@@ -47,7 +47,7 @@
         """Add some chickens to the farm"""
         self.game.gameboard.tv.sun(True)
 
-        sound.play_sound("chicken5.ogg")
+        sound.play_sound("daybreak.ogg")
         # disable timer
         pygame.time.set_timer(MOVE_FOX_ID, 0)
         self.game.gameboard.clear_foxes()
@@ -81,6 +81,7 @@
         """Add some foxes to the farm"""
         self.game.gameboard.tv.sun(False)
 
+        sound.play_sound("nightfall.ogg")
         # Add a timer to the event queue
         self.cycle_count = 0
         pygame.time.set_timer(MOVE_FOX_ID, 200)
--- a/gamelib/gameboard.py	Wed Sep 02 11:52:02 2009 +0000
+++ b/gamelib/gameboard.py	Wed Sep 02 12:14:24 2009 +0000
@@ -195,7 +195,7 @@
             print "You can't sell your last chicken!"
             return
         self.add_cash(constants.SELL_PRICE_CHICKEN)
-        sound.play_sound("chicken4.ogg")
+        sound.play_sound("sell-chicken.ogg")
         self.remove_chicken(chick)
 
     def buy_fence(self, tile_pos):