summaryrefslogtreecommitdiff
path: root/src/newgrf_sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_sound.cpp')
-rw-r--r--src/newgrf_sound.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/newgrf_sound.cpp b/src/newgrf_sound.cpp
index 5abd443c9..b82853ac6 100644
--- a/src/newgrf_sound.cpp
+++ b/src/newgrf_sound.cpp
@@ -22,11 +22,15 @@
static SmallVector<SoundEntry, 8> _sounds;
-/* Allocate a new Sound */
-SoundEntry *AllocateSound()
+/**
+ * Allocate sound slots.
+ * @param num Number of slots to allocate.
+ * @return First allocated slot.
+ */
+SoundEntry *AllocateSound(uint num)
{
- SoundEntry *sound = _sounds.Append();
- MemSetT(sound, 0);
+ SoundEntry *sound = _sounds.Append(num);
+ MemSetT(sound, 0, num);
return sound;
}