]> 4ch.mooo.com Git - 16.git/blob - src/lib/mapread.h
wwww
[16.git] / src / lib / mapread.h
1 #ifndef _LIBMAPREAD_H_\r
2 #define _LIBMAPREAD_H_\r
3 //#include <stdlib.h>\r
4 //#include <stdio.h>\r
5 #include <string.h>\r
6 #include <errno.h>\r
7 #include <malloc.h>\r
8 \r
9 #include "src/lib/jsmn/jsmn.h"\r
10 #include "src/lib/modex16.h"\r
11 #include "src/lib/16_head.h"\r
12 \r
13 //#define DEBUG_MAPDATA\r
14 //#define DEBUG_MAPVAR\r
15 //#define DEBUG_DUMPVARS\r
16 //#define DEBUG_JS\r
17 \r
18 typedef struct {\r
19         bitmap_t *data;\r
20         word tileHeight;\r
21         word tileWidth;\r
22         unsigned int rows;\r
23         unsigned int cols;\r
24         boolean debug_text;     //show the value of the tile! wwww\r
25         byte *debug_data;\r
26 } tiles_t;\r
27 \r
28 typedef struct {\r
29         byte    *data;\r
30         tiles_t *tiles;\r
31         int width;      //this has to be signed!\r
32         int height;     //this has to be signed!\r
33 } map_t;\r
34 \r
35 int jsoneq(const char *json, jsmntok_t *tok, const char *s);\r
36 word dump(const char *js, jsmntok_t *t, size_t count, word indent, char *js_sv, map_t *map, dword q);\r
37 int loadmap(char *mn, map_t *map);\r
38 \r
39 #endif/*_LIBMAPREAD_H_*/\r