/* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
+ * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
*\r
* This file is part of Project 16.\r
*\r
* Fifth Floor, Boston, MA 02110-1301 USA.\r
*\r
*/\r
-\r
-#include "src/lib/mapread.h"\r
+//TODO: ADD MEMORY MANAGER! WWWW\r
+#include "src/lib/16_map.h"\r
\r
#define DUMP\r
-//#define DUMP_MAP\r
+#define DUMP_MAP\r
\r
void\r
main(int argc, char *argv[])\r
{\r
map_t map;\r
short i;\r
+ char *fmt = "Memory available = %u\n";\r
+ char *fmt0 = "Largest Contiguous Block of Memory available = %u\n";\r
+\r
+ fprintf(stderr, fmt, _memavl());\r
+ fprintf(stderr, fmt0, _memmax());\r
+ fprintf(stderr, "Size of map var = %u\n", _msize(&map));\r
+ //fprintf(stderr, "program always crashes for some reason....\n");\r
+ getch();\r
+\r
loadmap("data/test.map", &map);\r
#ifdef DUMP\r
fprintf(stdout, "map.width= %d\n", map.width);\r
fprintf(stdout, "map.height= %d\n", map.height);\r
#ifdef DUMP_MAP\r
+ if(map.width*map.height != 1200) exit(-3);\r
for(i=0; i<(map.width*map.height); i++)\r
{\r
fprintf(stdout, "%04d[%02d]", i, map.data[i]);\r