]> 4ch.mooo.com Git - 16.git/blob - src/lib/mapread.h
8b1b3e0a6f1af32d625a609a1354f678cbfa72cd
[16.git] / src / lib / mapread.h
1 #ifndef _LIBMAPREAD_H_
2 #define _LIBMAPREAD_H_
3 #include <string.h>
4 #include <errno.h>
5 #include "src/lib/jsmn/jsmn.h"
6 #include "src/lib/modex16.h"
7 #include "src/lib/lib_head.h"
8
9 static char *js_sv;
10
11 typedef struct {\r
12         bitmap_t *data;
13         word tileHeight;\r
14         word tileWidth;\r
15         unsigned int rows;\r
16         unsigned int cols;\r
17 } tiles_t;\r
18 \r
19 typedef struct {\r
20         byte    *data;\r
21         tiles_t *tiles;\r
22         int width;\r
23         int height;\r
24 } map_t;
25
26 static int jsoneq(const char *json, jsmntok_t *tok, const char *s);
27 static int dump(const char *js, jsmntok_t *t, size_t count, int indent, map_t *map, int q);
28 static int loadmap(char *mn, map_t *map);
29
30 #endif/*_LIBMAPREAD_H_*/