(svn r11118) -Fix: sample.cat can now be in a tar-file too, how nice!

This commit is contained in:
truelight 2007-09-15 16:01:34 +00:00
parent 6a8e5398a2
commit 345a4a28d8
1 changed files with 3 additions and 2 deletions

View File

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