]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_map.h
merged mapread files w
[16.git] / src / lib / 16_map.h
index 4a9ce9bbc903ae95bb26a1c4db8798a0f5ec5c92..512a81aff3a0b4400f1b19d81da55b7a41834b7d 100755 (executable)
  *\r
  */\r
 \r
-#ifndef _LIBMAPREAD_H_\r
-#define _LIBMAPREAD_H_\r
+#ifndef _16_MAP__H_\r
+#define _16_MAP__H_\r
 \r
-#include "jsmn/jsmn.h"\r
-#include "stdio.h"\r
-#include "stdlib.h"\r
-#include "src/lib/modex16.h"\r
 #include "src/lib/16_head.h"\r
+#include "src/lib/jsmn/jsmn.h"\r
+//#include "stdio.h" included in 16_head.h\r
+//#include "stdlib.h" included in 16_head.h\r
+#include "src/lib/16_vl.h"\r
+#include "src/lib/16_ca.h"\r
+#include "src/lib/16_mm.h"\r
 \r
+//#define DEBUG_MAPDATA\r
+//#define DEBUG_MAPVAR\r
+//#define DEBUG_DUMPVARS\r
+//#define DEBUG_JS\r
+\r
+//TODO: 16_mm and 16_ca must handle this\r
 typedef struct {\r
-       bitmap_t huge *btdata;\r
-       planar_buf_t huge *data;\r
-       word tileHeight;\r
-       word tileWidth;\r
-       unsigned int rows;\r
-       unsigned int cols;\r
+       bitmap_t huge *btdata;          //old\r
+       planar_buf_t huge *data;        //old\r
+       word tileHeight, tileWidth;\r
+       unsigned int rows, cols;\r
+       #ifdef __DEBUG__\r
        boolean debug_text;     //show the value of the tile! wwww\r
        byte *debug_data;\r
+       #endif\r
 } tiles_t;\r
 \r
+//TODO: 16_mm and 16_ca must handle this\r
+//TODO: add variables from 16_ca\r
 typedef struct {\r
-       byte    * huge *data;\r
-       tiles_t **tiles;\r
-       int width;      //this has to be signed!\r
-       int height;     //this has to be signed!\r
+       //long          planestart[3];\r
+       //unsigned      planelength[3];\r
+       byte *data;                     //TODO: 16_mm and 16_ca must handle this\r
+       byte * huge *layerdata; //TODO: 16_mm and 16_ca must handle this\r
+       tiles_t *tiles;         //TODO: 16_mm and 16_ca must handle this\r
+       tiles_t * huge *layertile;      //TODO: 16_mm and 16_ca must handle this\r
+       int width, height;              //this has to be signed!\r
+       char            name[16];\r
 } map_t;\r
 \r
+int jsoneq(const char *json, jsmntok_t *tok, const char *s);\r
+word dump(const char *js, jsmntok_t *t, size_t count, word indent, char *js_sv, map_t *map, dword q);\r
 int loadmap(char *mn, map_t *map);\r
-#endif/*_LIBMAPREAD_H_*/\r
+int newloadmap(char *mn, map_t *map);\r
+\r
+#endif/*_16_LIB__H_*/\r