From 26c524a0373746a05ba5c04171f94a1e4cf63920 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Wed, 15 Feb 2017 11:02:19 -0600 Subject: [PATCH] ohh OHHH WWWWWWWWWWW bloody pointer arrays wwww --- MAPTEST.L16 | 70 +++++++++++++++++++++++------------------------- src/lib/16_map.c | 2 +- src/maptest.c | 10 +++---- 3 files changed, 39 insertions(+), 43 deletions(-) diff --git a/MAPTEST.L16 b/MAPTEST.L16 index d427c34a..8d927558 100755 --- a/MAPTEST.L16 +++ b/MAPTEST.L16 @@ -1,41 +1,37 @@ Layer 0 data: [ --./0,////////07777777777777777777777-./01234,-,-__77777777777777777777777777123456780-,-__7777777777777777777777777756789:;<,---14777777777777777777777777779:;<,,0,,,,,44777/777777777777777777777777777777,,,,447777777777777777777777777777777777,,,,777777777777777777777777777777777777,,,,77777777/77777777777777777777777777777777S777777/777777777777777777777777777777777777777/777777777777777777777777777777777777777/77777777777777777777777777777777777////-./0/////77777777777777777777777777/7777123422222///777777777777777777777//77777567822222222///77777777777777777/77777779:;layerdata[k][j] = (byte)atoi(js + t[i+2+j].start); #ifdef DEBUG_MAPDATA //printf("[%d,%d]%d", k, j, map->MAPDATAPTK[j]); - printf("%c", map->layerdata[k][j]+44); + printf("%c", map->MAPDATAPTK[j]+44); //fprintf(stdout, "%c", map->data[j]+44); #endif } diff --git a/src/maptest.c b/src/maptest.c index c25fa516..2aa6bc3f 100755 --- a/src/maptest.c +++ b/src/maptest.c @@ -51,11 +51,11 @@ main(int argc, char *argv[]) fprintf(stderr, fmt0, _memmax()); fprintf(stderr, "Size of map var = %u\n", _msize(&(gvar.ca.camap.mapsegs))); //fprintf(stderr, "program always crashes for some reason....\n"); - getch(); + //getch(); //loadmap("data/test.map", &map); //newloadmap("data/test.map", &map); -#ifdef __NEWMAPTILEDATAVARS__ +#ifndef __NEWMAPTILEDATAVARS__ CA_loadmap("data/test.map", &map, &gvar); #else CA_loadmap("data/newtest.map", &map, &gvar); @@ -68,7 +68,7 @@ main(int argc, char *argv[]) #ifdef __NEWMAPTILEDATAVARS__ for(k=0;k