#define MAX_MODELS 256
-//indexes for buffers
-int cbi = 0;
-int vbi = 0;
-int obi = 0;
struct ref {
int x, y, z, objref;
int parent_id;//offset into class set_stack
};
-//TODO: Add jump table
struct set {
int odat_id;
int parent_id;//offset into CB
int fdat_id[8];
};
-//TODO: Do vdats need labels?
struct vdat {
+ char label[32];
int num_models;
int msi; //model_stack_index
struct model model_list[MAX_MODELS];
-} vdat_buf[BUF_SIZE];
+};
struct cdat {
char label[32];
int set_index;
struct cdat* subclass_list[MAX_SUBCLASSES];
struct set set_list[MAX_SETS];
-} cdat_buf[BUF_SIZE];
+};
//Element or a set
struct odat {
int num_ref;
int ref_index;
struct ref ref_list[MAX_REFS];
-} odat_buf[BUF_SIZE];
+};
+
+struct cdat cdat_buf[BUF_SIZE];
+struct odat odat_buf[BUF_SIZE];
+struct vdat vdat_buf[BUF_SIZE];
+
+//indexes for buffers
+int cbi = 0;
+int vbi = 0;
+int obi = 0;
+
+void
+insert_set(void);
+
+void
+insert_ref(int, int, int, int);
void
inc_cbi(void);