one more ragel warning to fix, fixed improper ir.c assignments
[henge/apc.git] / src / ir.c
index 316486d..281b29a 100644 (file)
--- a/src/ir.c
+++ b/src/ir.c
@@ -51,7 +51,7 @@ curr_map(void);
 struct set*\r
 curr_cdat_set(void);\r
 struct set*\r
-curr_set(int);\r
+curr_set(void);\r
 struct ref*\r
 curr_ref(void);\r
 struct model*\r
@@ -65,6 +65,8 @@ push_cdat(struct name*);
 void\r
 pop_cdat(void);\r
 void\r
+insert_refid(int);\r
+void\r
 insert_link_name(struct name*);\r
 void\r
 insert_link_namelist(struct name*);\r
@@ -288,6 +290,7 @@ struct odat {
 struct framesheet {\r
   int width;\r
   int height;\r
+  uint8_t filepath[FPATH_MAX];\r
   int num_frames;\r
 \r
 };\r
@@ -297,8 +300,7 @@ struct framesheet {
 /* NAMED spritesheet */\r
 struct model {\r
   struct name name;\r
-  uint8_t filepath[PATH_MAX];\r
-  struct framesheet spritesheet[8]; //one for each\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
@@ -600,19 +602,9 @@ curr_cdat_set
 \r
 struct set*\r
 curr_set\r
-(int depth)\r
-{ int i;\r
-  struct set* setp;\r
-\r
-  for(i = 0; i <= depth; i++)\r
-    { if(!(setp = setp->set_list[setp->num_sets]))\r
-       { printf("You are trying to access a set that does not exist irmem.c\n");\r
-          return NULL;\r
-       }\r
-    }\r
-\r
-\r
-  return setp;\r
+()\r
+{ \r
+  return CURRENT_SET();\r
 }\r
 \r
 struct ref*\r
@@ -780,6 +772,8 @@ insert_map
   /* set cdat idx values for both set and odat */\r
   curr_mem_setp->cdat_idx = num_cdats;\r
 \r
+  /* TODO: INSERT MAP HEIGHT/WIDTH/NAME/FILEPATH INTO ODAT */\r
+\r
 \r
   /* Generate refid if needed, put into ref_buf */\r
   if(!refid)\r
@@ -854,6 +848,8 @@ insert_framesheet
   name_u8_cpy(&curr_modelp->name, model_name);\r
   curr_modelp->spritesheet[direction].height = height;\r
   curr_modelp->spritesheet[direction].width = width;\r
+  /* TODO: INSERT FILEPATH INTO VDAT */\r
+  u8_stpncpy(curr_modelp->spritesheet[direction].filepath, filepath, FPATH_MAX);\r
 \r
   name_u8_cpy(last_model_name, model_name);\r
 \r
@@ -976,7 +972,7 @@ insert_vdat
 }\r
 \r
 void\r
-insert_statement\r
+insert_refid\r
 ( refid )\r
      int refid;\r
 { CURR_SS_ODATP()->refid = refid;\r