I'm developing a C++ extension for SourceMod which will extract the files
stored in the Pakfile lump of a BSP. I read over the page, "The Source
Engine BSP File Format <http://www.geocities.com/cofrdrbob/bspformat.html>,"
by Rof and it has helped me a lot. I've been trying to retrieve the list of
ZIP_FileHeaders, but I've had some trouble: I don't know how it's possible
to get the ZIP_EndOfCentralDirRecord. Rof's page states that this struct is
at the end of the Pakfile lump. However, the struct has a variable length
comment at the end of it. The only way I can know the size of that comment
is to have the ZIP_EndOfCentralDirRecord at hand...You can see my dilemma.
struct ZIP_EndOfCentralDirRecord
{
DECLARE_BYTESWAP_DATADESC();
unsigned int signature; // 4 bytes PK56
unsigned short numberOfThisDisk; // 2 bytes
unsigned short numberOfTheDiskWithStartOfCentralDirectory; // 2 bytes
unsigned short nCentralDirectoryEntries_ThisDisk; // 2 bytes
unsigned short nCentralDirectoryEntries_Total; // 2 bytes
unsigned int centralDirectorySize; // 4 bytes
unsigned int startOfCentralDirOffset; // 4 bytes
unsigned short commentLength; // 2 bytes
// zip file comment follows
};
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders