SOBJECT3 - LiamKarlMitchell/InfiniteSky GitHub Wiki

These model files are a new structure in TS2.5+.

// Structure for SOBJECT3
typedef struct {
  uint uncompressedSize;
  uint compressedSize;
  byte data[compressedSize];   
} compressedData  <size=SizeCompressedData>;
     
 int SizeCompressedData( compressedData &r )
 {
     return 8 +                     // base size of the struct
         ReadUInt(startof(r)+4);    // size of the compressed data
 }

LittleEndian(); 

char MAGIC[8];
uint count;
compressedData compressed;

// See SOBJECT3_internal for the compressed data structure.