(svn r24052) -Fix (r23883) [FS#5107]: Imported GRF sounds were inserted into the wrong slots.

This commit is contained in:
frosch
2012-03-19 22:55:29 +00:00
parent 2007f7affd
commit 0643a69764
4 changed files with 45 additions and 18 deletions

View File

@@ -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;
}