summaryrefslogtreecommitdiff
path: root/tools/convert/library.txt
blob: 680ea2c57f851da576cd37dd6e5e474dc69d037d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
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