You should take a look at my S3D.PAS file in OpenZone 1.3. There are some issues with writing the files:
- In the directory entries near the bottom of the archive, I found that all "canned" files (those that come with EQ) are sorted in increasing CRC order. The CRC for the filename list itself is always fixed at a magic value.
- As far as the data blocks goes, you can write the files in any order you wish, but bear in mind: in every .S3D file I've ever seen they're sorted by lowercase filename, and whatever order you use they have to match the filename list. That's why I have two sort routines in my source...first by filename, and then by CRC.
With my S3D class I could probably whip up a quick EQInside replacement in a couple of days, since the hard work is all done...but it would be in Delphi (i.e., Object Pascal). Is that useful?
Wind
P.S. When writing the data blocks, you *have* to break up each file into 8k blocks before compressing, or the client will refuse to load them.
|