2 #include "src/lib/fmapread.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";
15 fprintf(stderr, fmt, _memavl());
16 fprintf(stderr, fmt0, _memmax());
17 fprintf(stderr, "Size of map var = %u\n", _msize(&map));
18 fprintf(stderr, "program always crashes for some reason....");
21 fprintf(stderr, "loading~\n\n");
22 loadmap("data/tes0.map", &map);
23 fprintf(stderr, "\nokies~\n");
25 fprintf(stdout, "map.width= %d\n", map.width);
26 fprintf(stdout, "map.height= %d\n", map.height);
28 for(i=0; i<(map.width*map.height); i++)
30 fprintf(stdout, "%04d[%02d]", i, map.data[i]);
31 if(i && !(i%map.width)) fprintf(stdout, "\n");
33 fprintf(stdout, "\n");
35 fprintf(stdout, "&map==%Fp\n", &map);
36 fprintf(stdout, "&map.tiles==%Fp\n", map.tiles);
37 fprintf(stdout, "&map.width==%Fp\n", map.width);
38 fprintf(stdout, "&map.height==%Fp\n", map.height);
\r
39 fprintf(stdout, "&map.data==%Fp\n", map.data);
41 fprintf(stdout, "okies~\n");