summaryrefslogtreecommitdiff
path: root/common/library.h
diff options
context:
space:
mode:
authorleo2000-01-04 11:18:47 +0000
committerleo2000-01-04 11:18:47 +0000
commitbe42a748bdff8ee4ef8776e1548275485d7c8122 (patch)
tree13557e85cd3ca505f8256b549facaed5882b55d8 /common/library.h
parent7e28c4ea0210e4f4738086b5b28bfb227da15660 (diff)
Added support for modifying the library
git-svn-id: http://svn.leocad.org/trunk@47 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'common/library.h')
-rwxr-xr-xcommon/library.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/common/library.h b/common/library.h
new file mode 100755
index 0000000..2ed834c
--- /dev/null
+++ b/common/library.h
@@ -0,0 +1,52 @@
+#ifndef _MISC_H_
+#define _MISC_H_
+
+typedef struct connection_s
+{
+ unsigned char type;
+ float pos[3];
+ float up[3];
+ connection_s* next;
+} connection_t;
+
+typedef struct group_s
+{
+ connection_t* connections[5];
+ void* drawinfo;
+ unsigned long infosize;
+ group_s* next;
+} group_t;
+
+typedef struct lineinfo_s
+{
+ unsigned char type;
+ unsigned char color;
+ float points[12];
+ lineinfo_s* next;
+} lineinfo_t;
+
+typedef struct texture_s
+{
+ float points[20];
+ unsigned char color;
+ char name[9];
+ texture_s* next;
+} texture_t;
+
+typedef struct
+{
+ float* verts;
+ unsigned int verts_count;
+ connection_t* connections;
+ group_t* groups;
+ texture_t* textures;
+ char name[9];
+ char description[65];
+} LC_LDRAW_PIECE;
+
+bool ReadLDrawPiece(const char* filename, LC_LDRAW_PIECE* piece);
+bool SaveLDrawPiece(LC_LDRAW_PIECE* piece);
+void FreeLDrawPiece(LC_LDRAW_PIECE* piece);
+bool DeletePiece(char** names, int numpieces);
+
+#endif // _MISC_H_