2 #include "src/lib/mapread.h"
\r
8 main(int argc, char *argv[])
\r
12 char *fmt = "Memory available = %u\n";
13 char *fmt0 = "Largest Contiguous Block of Memory available = %u\n";
14 fprintf(stderr, fmt, _memavl());
15 fprintf(stderr, fmt0, _memmax());
17 fprintf(stderr, "loading~\n");
18 loadmap("data/tes0.map", &map);
19 fprintf(stderr, "okies~\n");
21 fprintf(stdout, "map.width= %d\n", map.width);
22 fprintf(stdout, "map.height= %d\n", map.height);
24 for(i=0; i<(map.width*map.height); i++)
26 fprintf(stdout, "%04d[%02d]", i, map.data[i]);
27 if(i && !(i%map.width)) fprintf(stdout, "\n");
29 fprintf(stdout, "\n");
31 fprintf(stdout, "&map==%Fp\n", &map);
32 fprintf(stdout, "&map.tiles==%Fp\n", map.tiles);
33 fprintf(stdout, "&map.width==%Fp\n", map.width);
34 fprintf(stdout, "&map.height==%Fp\n", map.height);
\r
35 fprintf(stdout, "&map.data==%Fp\n", map.data);
37 fprintf(stdout, "okies~\n");