X-Git-Url: https://www.kengrimes.com/gitweb/?p=henge%2Fwebcc.git;a=blobdiff_plain;f=src%2Fapc%2Fir.h;fp=src%2Fapc%2Fir.h;h=0292e01bedad24b6762cb9dcd79c610e0214641a;hp=ff4a4f1507774c9b7648d8655840b254fd6ed467;hb=4bd20aac8c9404bcb04b49b13c4145f12f4ff48e;hpb=706bd2e34ac15ffbc22579fde6289280347d5224 diff --git a/src/apc/ir.h b/src/apc/ir.h index ff4a4f1..0292e01 100644 --- a/src/apc/ir.h +++ b/src/apc/ir.h @@ -25,6 +25,8 @@ #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 */ @@ -46,26 +48,11 @@ 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. */ @@ -74,8 +61,6 @@ struct set { 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 */ @@ -193,12 +178,6 @@ struct link { 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; @@ -209,6 +188,7 @@ struct odat { 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;