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