From: sparky4 Date: Sat, 30 May 2015 13:19:34 +0000 (-0500) Subject: hmmm why?? wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=3c748201faa153f88c2810a3766127b5dfe211e6;p=16.git hmmm why?? wwww modified: maptest.exe modified: maptest.out modified: src/lib/mapread.c --- diff --git a/maptest.exe b/maptest.exe index 92817777..b334ba09 100644 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/maptest.out b/maptest.out index 86f86e0d..8ae850f4 100644 --- a/maptest.out +++ b/maptest.out @@ -1,16 +1,50 @@ -*js=199e:007b -&buf=[199e:177a] -&buf_seg=[924] -&buf_off=[177a] -&buf_fp=[0924:177a] -buff=[0924:177a] -(*buff)=[199e:000a] -ƉVþFތÒ>è¼ ±Ž^þŠ„Àt1ˆÂˆÃ0ö¸@‰×€ãÓÿ0ÿŠSގ؊Ÿö…ÚuFëՋ^þ‰ò‰Ð‰Ú‰ì]_^Ë1Ò1ÛëðSQR‰Ã¸ +js=0ac4:603e +*js=197e:007b +*js=!¹@¸ -map.width= 4521 -map.height= 4530 -&map==36c1:199e -&map.tiles==36c1:0000 -&map.width==36c1:11a9 -&map.height==36c1:11b2 -&map.data==0924:36c1 +&buf=[197e:175a] +buff=[0922:175a] +(*buff)=[197e:000a] +&(*buff)=[ + + "imagewidth":64, + "margin":0, + "name":"wwww", + "properties": + { + + }, + "spacing":0, + "tileheight":16, + "tilewidth":16 + }], + "tilewidth":16, + "version":1, + "width":40 +}width":40, + "x":0, + "y":0 + }], + "orientation":"orthogonal", + "properties": + { + + }, + "renderorder":"right-down", + "tileheight":16, + "tilesets":[ + { + "firstgid":1, + "image":"ed.png", + "imageheight":64,ýïÿÿ> +] +!¹@¸ + + +map.width= 4489 +map.height= 4498 +&map==36a1:197e +&map.tiles==36a1:0000 +&map.width==36a1:1189 +&map.height==36a1:1192 +&map.data==0922:36a1 diff --git a/src/lib/mapread.c b/src/lib/mapread.c index 8b75a72c..3a6394e7 100644 --- a/src/lib/mapread.c +++ b/src/lib/mapread.c @@ -128,7 +128,7 @@ int loadmap(char *mn, map_t *map) char huge *js = NULL; size_t jslen = 0; char buf[BUFSIZ]; - char huge *buff = /*(char huge *)*/&buf;//(char huge *)(MK_FP(FP_SEG(&buf), FP_OFF(&buf)));// + char huge *buff = &buf;//(char huge *)(MK_FP(FP_SEG(&buf), FP_OFF(&buf)));// static char js_ss[16]; jsmn_parser p; @@ -147,7 +147,7 @@ int loadmap(char *mn, map_t *map) return 3; } - //buff = _fmalloc(sizeof(buf)); + //buff = _fmalloc(sizeof(buf[BUFSIZ])); for (;;) { /* Read another chunk */ @@ -164,17 +164,19 @@ int loadmap(char *mn, map_t *map) return 2; } } - buff = /*(char huge *)*/&buf; - js = _frealloc(js, jslen + r +1); + js = _frealloc(js, jslen + r + 1); if (js == NULL) { fprintf(stderr, "*js=%Fp\n", *js); fprintf(stderr, "realloc(): errno = %d\n", errno); return 3; } + //(*buff)=*buf; //printf("strncpy~\n"); //strncpy(jz + jslen, buf, r); - if(_fstrncpy(js + jslen, buff, r) == NULL) - fprintf(stderr, "_fstrncpy(): errno = %d\n", errno); + //if( + _fstrncpy(js + jslen, &(*buff), r); + // == NULL) +// fprintf(stderr, "_fstrncpy(): errno = %d\n", errno); //printf("strncpy okies~~\n"); jslen = jslen + r; @@ -192,15 +194,17 @@ again: goto again; } } else { + printf("js=%Fp\n", js); printf("*js=%Fp\n", (*js)); + printf("*js=%s\n", &(*js)); printf("&buf=[%Fp]\n", &buf); - printf("&buf_seg=[%x]\n", FP_SEG(&buf)); - printf("&buf_off=[%x]\n", FP_OFF(&buf)); - printf("&buf_fp=[%Fp]\n", MK_FP(FP_SEG(&buf), FP_OFF(&buf))); + //printf("&buf_seg=[%x]\n", FP_SEG(&buf)); + //printf("&buf_off=[%x]\n", FP_OFF(&buf)); + //printf("&buf_fp=[%Fp]\n", MK_FP(FP_SEG(&buf), FP_OFF(&buf))); //printf("buf=[\n%s\n]\n", buf); printf("buff=[%Fp]\n", buff); printf("(*buff)=[%Fp]\n", (*buff)); - //printf("&(*buff)=[\n%s\n]\n", &(*buff)); + printf("&(*buff)=[\n%s\n]\n", &(*buff)); dump(js, tok, p.toknext, incr, &js_ss, map, 0); eof_expected = 1; }