I am working on a C++ class to be used for modifying .s3d files using the Pascal source code included in S3DSpy as a reference. The only problem I've encountered is trying to decipher how to generate the CRC used by the format.
Here is an example file:
http://3dfolio.com/files/bafch0002.bmp
The CRC provided by the file is: 3222067071.
I have not been able to duplicate this CRC. It "should" be IEEE 802.3 CRC-32, which is the same CRC used by the crc32.cpp included in the eqemu source.
I can confirm that the CRC generated by crc32.cpp is accurate. But it is not the same as what is provided by the .s3d file.
According to s3d.pas, the CRC is being generated from the file name??
Code:
Procedure SetFileName(Index: Integer; St: String);
Begin
If (Index >= 0) And (Index <= High(FFileNames)) Then
Begin
St := Trim(St);
FFileNames[Index] := St;
FDirectory[Index].CRC := GetCRCOfString(LowerCase(St));
End;
End; // TS3DFile.SetFileName
This makes no sense. And the CRC generated this way also doesn't match.
One other reference I found suggests that the CRC used by EQ is "IEEE 802.3
Ethernet CRC-32", which I think is the same thing. Can anyone confirm this?
I can't seem to figure out how to generate this CRC. Does any one know?