]> 4ch.mooo.com Git - 16.git/blob - src/lib/mapread.h
modified: makefile
[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 //static long int bgdata[4096];
12
13 typedef struct {\r
14         bitmap_t *data;
15         word tileHeight;\r
16         word tileWidth;\r
17         unsigned int rows;\r
18         unsigned int cols;\r
19 } tiles_t;\r
20 \r
21 typedef struct {\r
22         byte    *data;\r
23         tiles_t *tiles;\r
24         int width;\r
25         int height;\r
26 } map_t;
27
28 static int jsoneq(const char *json, jsmntok_t *tok, const char *s);
29 static int dump(const char *js, jsmntok_t *t, size_t count, int indent, /*char *js_sv,*/ map_t *map, int q/*, int *w*/);
30 static int loadmap(char *mn, map_t *map/*, word w*/);
31
32 #endif/*_LIBMAPREAD_H_*/