]> 4ch.mooo.com Git - 16.git/blob - src/maptest.c
maptest~~~~
[16.git] / src / maptest.c
1 #include "src/lib/mapread.h"\r
2
3 #define DUMP
4 //#define DUMP_MAP
5
6 void
7 main(int argc, char *argv[])\r
8 {\r
9         map_t map;
10         short i;
11         //int lm;
12         loadmap("data/test.map", &map);
13         //fprintf(stdout, "loadmap=     %d\n\n", lm);
14         #ifdef DUMP
15         fprintf(stdout, "map.width=     %d\n", map.width);
16         fprintf(stdout, "map.height=    %d\n", map.height);
17         #ifdef DUMP_MAP
18         for(i=0; i<(map.width*map.height); i++)
19         {
20                 fprintf(stdout, "%04d[%02d]", i, map.data[i]);
21                 if(i && !(i%map.width)) fprintf(stdout, "\n");
22         }
23         fprintf(stdout, "\n");
24         #endif
25         fprintf(stdout, "&map==%Fp\n", &map);
26         fprintf(stdout, "&map.tiles==%Fp\n", map.tiles);
27         fprintf(stdout, "&map.width==%Fp\n", map.width);
28         fprintf(stdout, "&map.height==%Fp\n", map.height);\r
29         fprintf(stdout, "&map.data==%Fp\n", map.data);
30         #endif
31 }\r