summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-09-15 16:01:34 +0000
committertruelight <truelight@openttd.org>2007-09-15 16:01:34 +0000
commit345a4a28d89760eb42851ffcab63a06b5a114610 (patch)
tree332f9c289c8f1396b201ce3dd3be3105dce01d06 /src
parent6a8e5398a28aa2718a540785b60e8eb9e25a5387 (diff)
downloadopenttd-345a4a28d89760eb42851ffcab63a06b5a114610.tar.xz
(svn r11118) -Fix: sample.cat can now be in a tar-file too, how nice!
Diffstat (limited to 'src')
-rw-r--r--src/sound.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index a63e9564f..e67f48ff1 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -30,6 +30,7 @@ static void OpenBankFile(const char *filename)
uint i;
FioOpenFile(SOUND_SLOT, filename);
+ uint pos = FioGetPos();
count = FioReadDword() / 8;
FileEntry *fe = CallocT<FileEntry>(count);
@@ -42,11 +43,11 @@ static void OpenBankFile(const char *filename)
_file_count = count;
_files = fe;
- FioSeekTo(0, SEEK_SET);
+ FioSeekTo(pos, SEEK_SET);
for (i = 0; i != count; i++) {
fe[i].file_slot = SOUND_SLOT;
- fe[i].file_offset = FioReadDword();
+ fe[i].file_offset = FioReadDword() + pos;
fe[i].file_size = FioReadDword();
}