]> 4ch.mooo.com Git - 16.git/blob - src/maptest.c
polished the map reading system~ i made it ... more robust.... now onwards to far...
[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         #endif
24         #endif
25 }\r