Timesplitters 2 PAK Formats Request
Posted: Wed Jul 15, 2009 11:16 pm
The contents of this post was deleted because of possible forum rules violation.
The format, there are two formats, the P8CK format and the P4CK format:Get ID Long 0;
Get tailoffset Long 0;
Get filenum Long 0;
If ID = 1262696528;
Get stringtableoffset Long 0;
Get stringtablesize Long 0;
For t = 1 To filenum;
GoTo tailoffset 0;
Get stringoffset Long 0;
Math stringoffset += stringtableoffset;
Get filesize Long 0;
Get fileoffset Long 0;
SavePos tailoffset 0;
GoTo stringoffset 0;
Get filename String 0;
Log filename fileoffset filesize 0 0;
Next t;
EndIf;
If ID = 1262695504;
Get reserved Long 0;
Math filenum /= 60;
GoTo tailoffset 0;
For t = 1 To filenum;
GetDString filename 48 0;
Get fileoffset Long 0;
Get filesize Long 0;
Get dummy Long 0;
Log filename fileoffset filesize 0 0;
Next t;
#P4CK:
// header
char(4) ID string ("P4CK")
UINT32 Offset of tail
UINT32 Tailsize ( divide by 60 to get the Number of resources in the archive)
UINT32 Reserved (0)
// TAIL (for all files in sequence)
char(48) Filename
uint32 File offset
uint32 File size
uint32 Reserved(0)
#P8CK
// header
char(4) ID string ("P8CK")
UINT32 Offset of tail
UINT32 Number of resources
UINT32 String Table offset (Filename strings)
UINT32 String Table size
// String Table (for all files in sequence)
char(x) Filename, null-terminated string
// TAIL (for all files in sequence)
uint32 Filename offset in String Table
uint32 Filesize
uint32 Fileoffset