#define MAX_CLASSES 256
#define MAX_FRAMES 256
#define PTRS_IN_PAGE 1024
+#define MAX_CHUNKS 256
+#define PAGES_PER_CHUNK 16
/* General: All information from the directory structure is stored in */
/* five buffers that comprise the IR: cdat_buf, odat_buf, vdat_buf, ref_buf */
because cdats have a root cdat that all cdats are a subclass of. This root
cdat can have a set_list like other cdats. */
-/* Elements: Ele stands for element and has two representations in the IR. */
-/* In the cdat_buf eles store their name, cdat_idx (their classes index in */
-/* the cdat_buf) and the ref_id (refer to ref ). In the odat_buf, eles store */
-/* their object data (odat). At output time, the ref_id is dereferenced to */
-/* determine the elements odat which is the data that the engine expects */
-extern struct cdat** cdat_stackp;
-/* from an element. */
-
-
/* All bufs are of pointers to their respective structs. When a buf is full */
/* (number of data structs pointers >= max number of data struct pointers), */
/* we need to allocate a more pointers for that buf. Allocate these */
/* pointers a page at a time (1024 = Page bytes (4096)/bytes per pointer(4)) */
-struct ele {
- char name[32];
- uint64_t ref_id;
- int cdat_idx;
-};
-
/* Sets: The set is similar to the ele, but it contains a list of its */
/* elements. The set is populated at parse time AFTER the elements are */
/* populated, due to the nature of bottom up parsing. */
char name[32];
uint64_t ref_id;
int cdat_idx;
- int num_ele;
- struct ele ele_list[MAX_ELES];
};
/* Cdats: A cdat is a class data structure. Cdats serve as the central */
TODO: Need more info about objects at runtime, to described
the reasoning behind odat structure at compile-time*/
-/* Each set has a quad_list or a list of quads. The quad_list
- is the ? */
-struct quad {
- int x, y, z;
- uint64_t ref_id; //rgba
-};
struct root {
int x, y, z;
int vdat_id;
int cdat_idx;
int hitbox;
+ uint64_t ref_id;
struct root root;
struct ref* refp; /* pointer to it's ref on ref_list */
void* quad_filep;