X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fmaptest.c;h=589d6d11d518a0ed343f3b00e4125eba6b04961e;hb=4182c851b3812d20f2464fd1f0b49cd5b676962c;hp=ae016eec046c4e47eb02e1977595168d8d3a6a1a;hpb=1073f7dbfa5b78819af46c64f3ffd0301e9d8cc6;p=16.git diff --git a/src/maptest.c b/src/maptest.c index ae016eec..589d6d11 100644 --- a/src/maptest.c +++ b/src/maptest.c @@ -1,10 +1,30 @@ -#include "src/lib/mapread.c" - +#include "src/lib/mapread.h" + +#define DUMP +//#define DUMP_MAP + void main(int argc, char *argv[]) { map_t map; - fprintf(stderr, "wwww\n"); - //loadmap("data/test.map", &map); - fprintf(stderr, "wwww\n"); + short i; + loadmap("data/test.map", &map); + #ifdef DUMP + fprintf(stdout, "map.width= %d\n", map.width); + fprintf(stdout, "map.height= %d\n", map.height); + #ifdef DUMP_MAP + for(i=0; i<(map.width*map.height); i++) + { + fprintf(stdout, "%04d[%02d]", i, map.data[i]); + if(i && !(i%map.width)) fprintf(stdout, "\n"); + } + fprintf(stdout, "\n"); + #endif + fprintf(stdout, "&map==%Fp\n", &map); + fprintf(stdout, "&map.tiles==%Fp\n", map.tiles); + fprintf(stdout, "&map.width==%Fp\n", map.width); + fprintf(stdout, "&map.height==%Fp\n", map.height); + fprintf(stdout, "&map.data==%Fp\n", map.data); + #endif + fprintf(stdout, "okies~\n"); }