Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-16-2011, 06:25 PM
Ropethunder
Fire Beetle
 
Join Date: Apr 2007
Posts: 16
Default How to generate the CRC used by .s3d files?

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?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:03 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3