mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
Endian fixed the pak-reading code.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1990 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2abfd728bf
commit
28b018e419
1 changed files with 4 additions and 4 deletions
|
@ -142,15 +142,15 @@ FILE *FindInPaks(char *gamedir, char *filename, int *size)
|
||||||
fclose(f);
|
fclose(f);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
numfiles = header[2]/sizeof(pakfile);
|
numfiles = LittleLong(header[2])/sizeof(pakfile);
|
||||||
fseek(f, header[1], SEEK_SET);
|
fseek(f, LittleLong(header[1]), SEEK_SET);
|
||||||
for (j = 0; j < numfiles; j++)
|
for (j = 0; j < numfiles; j++)
|
||||||
{
|
{
|
||||||
fread(&pf, 1, sizeof(pf), f);
|
fread(&pf, 1, sizeof(pf), f);
|
||||||
if (!strcmp(pf.name, filename))
|
if (!strcmp(pf.name, filename))
|
||||||
{
|
{
|
||||||
fseek(f, pf.offset, 0);
|
fseek(f, LittleLong(pf.offset), 0);
|
||||||
*size = pf.length;
|
*size = LittleLong(pf.length);
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue