
A3D format (Version 0)

byte = version number to allow for compatiblity of later changes
unsigned = number of textures
for each texture:
  string = name (if ending in *.pcx or *.bmp then bitmap file name)
  // don't know what else yet
unsigned = number of layers
for each layer:
  string = name
  3 bytes = color RGB
  byte = linetype
  unsigned = texture number ( 0 = none) - will be applied to all faces in layer

unsigned = number of blocks (one more than this as last block is base entities)
for each block:
  string = name  (except base entities)(if name has *.A3D suffix then it's external)
  3 bytes = color RGB
  3 fixed = Base VTX X, Y & Z
if not external or for base entities:
  unsigned = layer  (layer == layers marks base layer = end)
  for each layer:
    byte = type
    byte = sizeof type
    unsigned = number of following type (0 = marks end)
    // in edit3d objects are saved in order of type
    types:
      0 = vertex:  // divide sizeof type by 3 to get vertex size
            fixed = x, y, z
      1 = face:
            unsigned = p1,p2,p3,p4   // p3 = p4 if triangle
            unsigned = texture  (0xFFFF = no texture)
            3*4*BYTE  = c1,c2,c3,c4  // colors RGB groups
            unsigned = flags
      2 = insert:
            unsigned = block
            unsigned = p1
            unsigned = p2 (currently not used)
            fixed = rx, ry, rz  // rotations
            byte = rotation order (XYZ = 0,XZY etc.)
            fixed = sx, sy, sz  // scales (only sx used at present)
      3 = line:
            unsigned = p1, p2
            byte = type of line
            byte = width
            unsigned = l1 = previous joining line
            unsigned = pl1 = previous parrallel line
      4 = arc
            unsigned = p1, p2 start end of CW arc
            byte = type of line
            byte = width
            unsigned = l1 = previous joining line
            unsigned = pl1 = previous parrallel line
            unsigned = p3 = centre of circle
            unsigned = p4 = point to define the plane
            byte = flags
      5 = spline:
            unsigned = p1, p2
            byte = type of line
            byte = width
            unsigned = l1 = previous joining line
            unsigned = pl1 = previous parrallel line
            unsigned = flags regarding edge vectors
            fixed = v1x,v1y,v1z = leading edge vector
            fixed = v2x,v2y,v2z = leading edge vector
            
