From: sparky4 Date: Wed, 29 Jul 2015 18:23:36 +0000 (-0500) Subject: ok wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=4e9c69f2b1452b68cd173340037c5036928840db;p=16.git ok wwww modified: 16.exe modified: 16.hed modified: maptest.exe modified: scroll.exe modified: src/lib/mapread.c modified: src/scroll.c --- diff --git a/16.exe b/16.exe index 9a8dee24..d569b88d 100644 Binary files a/16.exe and b/16.exe differ diff --git a/16.hed b/16.hed index b0e066a7..ae69cb9e 100644 Binary files a/16.hed and b/16.hed differ diff --git a/maptest.exe b/maptest.exe index 331c7147..68bb08b9 100644 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/scroll.exe b/scroll.exe index 9ed8aeca..2a0bc78e 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/mapread.c b/src/lib/mapread.c index e3f40b44..777de7da 100644 --- a/src/lib/mapread.c +++ b/src/lib/mapread.c @@ -69,8 +69,8 @@ word dump(const char *js, jsmntok_t *t, size_t count, word indent, char *js_sv, { // fprintf(stdout, "[[[[%d|%d]]]]\n", &(t+1)->size, (t+1)->size); // fprintf(stdout, "\n%.*s[xx[%d|%d]xx]\n", (t+1)->end - (t+1)->start, js+(t+1)->start, &(t+1)->size, (t+1)->size); - map->data = malloc(sizeof(byte) * (t+1)->size); - map->tiles = malloc(sizeof(tiles_t)); + map->data = _nmalloc(sizeof(byte) * (t+1)->size); + map->tiles = _nmalloc(sizeof(tiles_t)); //map->tiles->data = malloc(sizeof(bitmap_t)); //fix this to be far~ bp = bitmapLoadPcx("data/ed.pcx"); @@ -127,7 +127,6 @@ int loadmap(char *mn, map_t *map) char *js = NULL; size_t jslen = 0; char buf[BUFSIZ]; -//---- char *buff = &buf; static char js_ss[16]; jsmn_parser p; diff --git a/src/scroll.c b/src/scroll.c index d56ce36e..31cfed72 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -80,10 +80,13 @@ void main() }*/ /* create the map */ -//0000 printf("Total used @ before map load: %zu\n", oldfreemem-GetFreeSize()); -fprintf(stderr, "testing~\n"); + //printf("Total used @ before map load: %zu\n", oldfreemem-GetFreeSize()); + printf("Total free @ before map load: %zu\n", GetFreeSize()); + printf("Total far free @ before map load: %zu\n", GetFarFreeSize()); + getch(); + fprintf(stderr, "testing~\n"); loadmap("data/test.map", &map); -fprintf(stderr, "yay map loaded~~\n"); + fprintf(stderr, "yay map loaded~~\n"); //---- map = allocMap(map.width,map.height); //20x15 is the resolution of the screen you can make maps smaller than 20x15 but the null space needs to be drawn properly //if(isEMS()) printf("%d tesuto\n", coretotalEMS()); //---- initMap(&map);