As I see there is some interest in this subject, I will post here the code I programmed some time ago. I'm still learning, but when I wrote this code I was more noob, so don't expect very good code. Anyway, maybe somebody could find interesting info inside.
If anybody wants further explanations, please do not hesitate to ask.
Oh, and I would love to join a team if you will work on this.
I studied C3 files, and found all composed by different types of parts:
CAME: Camera: 3D ViewPort.
KKEY, XKEY, ZKEY: KeyFrames, when animating.
MOTI: Motion. Model animation.
OMNI: Omni. Light source point.
PHY , PHY3, PHY4: Physics. 3D Model.
PTC3, PTCL, PTCX: Particle.
SHAP, SHP2: Shape
SMOT: Shape motion
I have found the following combination of parts:
Camera:
CAME + PHY4 + MOTI
CAME + PTCL
Motion:
1 or more MOTI (with KKEY, XKEY or ZKEY)
Omni:
1 OMNI + 1 CAME + several groups (PHY4 + MOTI)
1 OMNI + 1 CAME + 1 PTCL
1 OMNI + 1 PHY + 1 MOTI
Particle:
1 or more PTC3
1 or more PTCL
1 or more PTCX
Physics:
1 or more PHY followed by same amount of MOTI
1 or more PHY4 followed by same amount of MOTI
1 or more groups (PHY + MOTI)
1 or more groups (PHY3 + MOTI)
Shape:
1 SHAP + 1 SMOT
1 SHP2 + 1 SMOT
C3 Files have the following structure:
16 bytes C3File = "MAXFILE C3 00001"
1 or more parts:
Variable bytes C3Part
Every C3Part have a defined structure depending on C3PartType.
To read a C3 file:
Read the C3File magic (16 bytes)
Read Every part
To read a C3Part:
Read C3PartType (4 bytes)
Read C3PartLength (UInt32). This lenght does not include the already read 8 bytes.
Read or skip this part.
Continue to next part, if any...
When I wrote code to handle this files, I was still in first stages of my programming learning, but I think you will find some useful info.