OSDN Git Service

^o^ cleaned~
[proj16/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         loadmap("data/test.map", &map);
12         #ifdef DUMP
13         fprintf(stdout, "map.width=     %d\n", map.width);
14         fprintf(stdout, "map.height=    %d\n", map.height);
15         #ifdef DUMP_MAP
16         for(i=0; i<(map.width*map.height); i++)
17         {
18                 fprintf(stdout, "%04d[%02d]", i, map.data[i]);
19                 if(i && !(i%map.width)) fprintf(stdout, "\n");
20         }
21         fprintf(stdout, "\n");
22         #endif
23         fprintf(stdout, "&map==%Fp\n", &map);
24         fprintf(stdout, "&map.tiles==%Fp\n", map.tiles);
25         fprintf(stdout, "&map.width==%Fp\n", map.width);
26         fprintf(stdout, "&map.height==%Fp\n", map.height);\r
27         fprintf(stdout, "&map.data==%Fp\n", map.data);
28         #endif
29         fprintf(stdout, "okies~\n");
30 }\r