diff options
author | rubidium <rubidium@openttd.org> | 2009-05-17 14:57:14 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-17 14:57:14 +0000 |
commit | 83dc6ef6e6064441c9a5ebc22061de313147821a (patch) | |
tree | 8b0b8b6ca9e6aaf81fe59ebc54ae306fba452ff7 /src/sound.cpp | |
parent | 10ea72a08e52cf9aaa54551ce201a6091316d47a (diff) | |
download | openttd-83dc6ef6e6064441c9a5ebc22061de313147821a.tar.xz |
(svn r16337) -Codechange: remove pointless variable + wrapper function; having it return anything else than ORIGINAL_SAMPLE_COUNT is asking for NewGRFs failing to load (due to invalid sample index), thus desyncs
Diffstat (limited to 'src/sound.cpp')
-rw-r--r-- | src/sound.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/sound.cpp b/src/sound.cpp index 4401fc67b..a12b2b840 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -13,20 +13,15 @@ #include "vehicle_base.h" #include "debug.h" -static uint _file_count; static FileEntry *_files; MusicFileSettings msf; /* Number of levels of panning per side */ #define PANNING_LEVELS 16 -/** The number of sounds in the original sample.cat */ -static const uint ORIGINAL_SAMPLE_COUNT = 73; - static void OpenBankFile(const char *filename) { FileEntry *fe = CallocT<FileEntry>(ORIGINAL_SAMPLE_COUNT); - _file_count = ORIGINAL_SAMPLE_COUNT; _files = fe; FioOpenFile(SOUND_SLOT, filename); @@ -99,11 +94,6 @@ static void OpenBankFile(const char *filename) } } -uint GetNumOriginalSounds() -{ - return _file_count; -} - static bool SetBankSource(MixerChannel *mc, const FileEntry *fe) { assert(fe != NULL); @@ -187,7 +177,7 @@ static const byte _sound_idx[] = { void SndCopyToPool() { - for (uint i = 0; i < _file_count; i++) { + for (uint i = 0; i < ORIGINAL_SAMPLE_COUNT; i++) { FileEntry *orig = &_files[_sound_idx[i]]; FileEntry *fe = AllocateFileEntry(); |