]> 4ch.mooo.com Git - 16.git/commitdiff
hmmm why?? wwww
authorsparky4 <sparky4@cock.li>
Sat, 30 May 2015 13:19:34 +0000 (08:19 -0500)
committersparky4 <sparky4@cock.li>
Sat, 30 May 2015 13:19:34 +0000 (08:19 -0500)
modified:   maptest.exe
modified:   maptest.out
modified:   src/lib/mapread.c

maptest.exe
maptest.out
src/lib/mapread.c

index 9281777757c32df453a4bc557716882929cb6ea7..b334ba094a297830517b25ccc7c83413e9746a9f 100644 (file)
Binary files a/maptest.exe and b/maptest.exe differ
index 86f86e0d91a9ddccb34a7121270102b4e9bb98ea..8ae850f48f2ae6bc0ab90818169975c115af0ddf 100644 (file)
@@ -1,16 +1,50 @@
-*js=199e:007b\r
-&buf=[199e:177a]\r
-&buf_seg=[924]\r
-&buf_off=[177a]\r
-&buf_fp=[0924:177a]\r
-buff=[0924:177a]\r
-(*buff)=[199e:000a]\r
\89\8d\8cÒ\ e>è¼ ±\ 3\8e\8a\ 4\84Àt1\88Â\88Ã0ö¸@\14\89×\80ã\aÓÿ0ÿ\8a\8eØ\8a\9fö\1d\85Úu\ 3FëÕ\8b\89ò\89Ð\89Ú\89ì]_^Ë1Ò1ÛëðSQR\89ø\r
+js=0ac4:603e\r
+*js=197e:007b\r
+*js=!¹@\14¸\r
 \r
-map.width=     4521\r
-map.height=    4530\r
-&map==36c1:199e\r
-&map.tiles==36c1:0000\r
-&map.width==36c1:11a9\r
-&map.height==36c1:11b2\r
-&map.data==0924:36c1\r
+&buf=[197e:175a]\r
+buff=[0922:175a]\r
+(*buff)=[197e:000a]\r
+&(*buff)=[\r
+\r
+         "imagewidth":64,\r
+         "margin":0,\r
+         "name":"wwww",\r
+         "properties":\r
+            {\r
+\r
+            },\r
+         "spacing":0,\r
+         "tileheight":16,\r
+         "tilewidth":16\r
+        }],\r
+ "tilewidth":16,\r
+ "version":1,\r
+ "width":40\r
+}width":40,\r
+         "x":0,\r
+         "y":0\r
+        }],\r
+ "orientation":"orthogonal",\r
+ "properties":\r
+    {\r
+\r
+    },\r
+ "renderorder":"right-down",\r
+ "tileheight":16,\r
+ "tilesets":[\r
+        {\r
+         "firstgid":1,\r
+         "image":"ed.png",\r
+         "imageheight":64,ý\10ï\ 4ÿÿ>\ 5\r
+]\r
+!¹@\14¸\r
+\r
+\r
+map.width=     4489\r
+map.height=    4498\r
+&map==36a1:197e\r
+&map.tiles==36a1:0000\r
+&map.width==36a1:1189\r
+&map.height==36a1:1192\r
+&map.data==0922:36a1\r
index 8b75a72cc0c605af79b5df3db0425daef057ba0d..3a6394e76dd547714425560159b3466a31914665 100644 (file)
@@ -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;
                }