
PIECES.IDX
char[32]       "LeoCAD piece library index file"
unsigned char  file version (currently = 3)
unsigned char  last updated installed

PIECE_DATA:
char[8]        name
char[64]       description
short[6]       bounding box (scaled)
unsigned char  flags
unsigned long  default group
unsigned long  offset in PIECES.BIN
unsigned long  info size

MOVED_DATA:
char[8]        old name
char[8]        new name

unsigned short moved count
unsigned long  PIECES.BIN File size
unsigned short piece count

-----------------------------------------------------------

PIECES.BIN
char[32] "LeoCAD piece library data file"

PIECE_DATA:
unsigned long  vertex count
short[]        vertex data (scaled)
unsigned short connection count
CONNECTION_DATA:
  unsigned short connection type
  short[3]       position (scaled)
  short[3]       up (<<14)

unsigned short group count
GROUP_DATA:
  unsigned char  group connection count
  unsigned short connections index
  void           draw information

-----------------------------------------------------------

TEXTURES.IDX
char[32]       "LeoCAD texture index file"
unsigned char  file version (currently = 1)
unsigned char  last updated installed

TEXTURE_DATA:
char[8]        name
unsigned short width
unsigned short height
unsigned char  type (LUMINANCE, RGB, RGBA)
unsigned long  offset in TEXTURES.BIN

unsigned long  TEXTURES.BIN File size
unsigned short piece count

-----------------------------------------------------------

TEXTURES.BIN

char[32] "LeoCAD texture data file"

-----------------------------------------------------------

UPDATExx.LUP

char[32]       "LeoCAD piece library update"
unsigned char  file version (currently = 2)
unsigned char  updated number

char[8]        piece name
unsigned char  update type (del = 0, desc = 1, draw = 2, new = 4)

desc:
char[64]       description
unsigned long  default group

drawinfo:
short[6]       bounding box (scaled)
unsigned char  flags
unsigned long  info size
void*          data

new:
char[64]       description
short[6]       bounding box (scaled)
unsigned long  default group
unsigned char  flags
unsigned long  info size
void*          data

MOVED_DATA:
char[8]        old name
char[8]        new name

unsigned short moved count
unsigned short changes count
