X-Git-Url: https://www.kengrimes.com/gitweb/?p=henge%2Fwebcc.git;a=blobdiff_plain;f=src%2Fapc%2Fir.h;h=ef54476a6f949f8175e60e93c759966fcaef4044;hp=9b8f4abda6f68f8d8e0c0a1c51fdaeab49e4221f;hb=7d0ebfbeac502841bd0ab9dafeed64fbcaeb680a;hpb=5ea84e68b1bbc18773fca89ff78a6e0509921356 diff --git a/src/apc/ir.h b/src/apc/ir.h index 9b8f4ab..ef54476 100644 --- a/src/apc/ir.h +++ b/src/apc/ir.h @@ -9,10 +9,6 @@ #define MAX_MODELS 256 -//indexes for buffers -int cbi = 0; -int vbi = 0; -int obi = 0; struct ref { int x, y, z, objref; @@ -23,7 +19,6 @@ struct ele { int parent_id;//offset into class set_stack }; -//TODO: Add jump table struct set { int odat_id; int parent_id;//offset into CB @@ -40,12 +35,12 @@ struct model { 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]; @@ -55,7 +50,7 @@ struct cdat { 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 { @@ -65,8 +60,23 @@ 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);