Lexer actually lexes filenames now, and odats are made out of mapvariants
[henge/webcc.git] / src / apc / ir.h
index 269eaf0..8076514 100755 (executable)
@@ -22,7 +22,8 @@
 #define MAX_ELES 256\r
 #define MAX_QUADS 256\r
 #define MAX_MODELS 256\r
-#define MAX_VARIANTS 8\r
+#define MAX_MODEL_LEN 256\r
+#define MAX_MAPS 8\r
 #define MAX_POSTS 256\r
 #define MAX_CLASS_DEPTH 256\r
 #define MAX_CLASSES 256\r
@@ -138,15 +139,13 @@ struct quad {
   int ref_id;\r
 };\r
 \r
-/* variants: variants store the different map data for each archetype. */\r
-struct variant {\r
-  uint8_t filename[NAME_MAX/sizeof(ucs4_t)];\r
-  uint8_t filepath[PATH_MAX/sizeof(ucs4_t)];\r
+/* maps: maps store the different map data for each archetype. */\r
+struct map {\r
+  uint8_t name[NAME_MAX];//TODO:Rename\r
+  uint8_t filepath[PATH_MAX];//TODO: Rename\r
   int height;\r
   int width;\r
-  //  int num_quads;\r
-  //struct quad quad_list[MAX_QUADS];\r
-};\r
+ };\r
 \r
 /* Odats: Odats consist of the object data necessary for\r
    each object. Odats are sometimes referred to as archetypes\r
@@ -164,8 +163,8 @@ struct odat {
   struct odat* parent_odatp; // odat == set ? null : set ref_id\r
   struct root root;\r
   struct ref* refp; /* pointer to it's ref on ref_list */\r
-  struct variant* variant_list[MAX_VARIANTS];\r
-  int vli; //variant list index\r
+  struct map map;\r
+  //int mli; //map list index\r
 };\r
 \r
 struct odat* curr_set_odatp; //when a set has elements, insert_set() can no longer\r
@@ -184,13 +183,14 @@ struct framesheet {
    direction (N,W,S,E,NW,NE,SW,SE)*/\r
 /* NAMED spritesheet */\r
 struct model {\r
-  uint8_t name[32];\r
+  uint8_t name[MAX_MODEL_LEN];\r
+  uint8_t filepath[PATH_MAX];\r
   struct framesheet spritesheet[8]; //one for each\r
 };\r
 \r
 /* Vdat: Vdats are the video data of each object. They can not be\r
    created as a stand alone object (because they consist solely\r
-   of animation information and not the skeleton which the\r
+   of animation information and not the map which the\r
    animation manipulates). Vdats have a list of models for every\r
    animation that the vdats odat can do for that vdat*/\r
 struct vdat {\r
@@ -200,7 +200,7 @@ struct vdat {
   int height;\r
   int width;\r
   uint8_t filepath[PATH_MAX/sizeof(ucs4_t)];\r
-  //struct model model_list[MAX_MODELS];\r
+  struct model model_list[MAX_MODELS];\r
 };\r
 \r
 /* Called after the cdat open operator has been recognized in grammar. Allocates\r
@@ -285,7 +285,7 @@ void
 insert_quad(int, int, int, int);\r
 \r
 void\r
-insert_variant(uint8_t*, int, int, uint8_t*);\r
+insert_map(uint8_t*, int, int, uint8_t*);\r
 \r
 void\r
 insert_model(void);\r