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