]> 4ch.mooo.com Git - 16.git/commitdiff
^o^ cleaned~
authorsparky4 <sparky4@cock.li>
Tue, 2 Jun 2015 17:23:12 +0000 (12:23 -0500)
committersparky4 <sparky4@cock.li>
Tue, 2 Jun 2015 17:23:12 +0000 (12:23 -0500)
modified:   maptest.exe
modified:   maptest.out
modified:   scroll.exe
modified:   src/lib/mapread.c
modified:   src/maptest.c

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

index d02f257ca793dca39c3c484c80255707b462b3ab..9a11242130eccf6314bbfa5c4a71222c627343fe 100644 (file)
Binary files a/maptest.exe and b/maptest.exe differ
index c6fc8583fdc2b18092c123f19bc47d1ebf61b9e9..8b67a75ac5bed20a3268a22e625e080c1c394ea5 100644 (file)
@@ -1,9 +1,3 @@
-js=1ce1:6250\r
-*js=0ce0:007b\r
-buff=[0ce0:1664]\r
-(*buff)=[0ce0:000a]\r
-height\r
-width\r
 map.width=     40\r
 map.height=    30\r
 0000[01]0001[02]0002[03]0003[04]0004[00]0005[03]0006[03]0007[03]0008[03]0009[03]0010[03]0011[03]0012[03]0013[04]0014[01]0015[01]0016[01]0017[01]0018[01]0019[01]0020[01]0021[01]0022[01]0023[01]0024[01]0025[01]0026[01]0027[01]0028[01]0029[01]0030[01]0031[01]0032[01]0033[01]0034[01]0035[01]0036[01]0037[01]0038[01]0039[01]0040[05]\r
@@ -36,8 +30,9 @@ map.height=   30
 1081[01]1082[01]1083[01]1084[01]1085[01]1086[01]1087[01]1088[01]1089[01]1090[01]1091[01]1092[01]1093[01]1094[01]1095[01]1096[01]1097[01]1098[01]1099[01]1100[01]1101[01]1102[01]1103[01]1104[01]1105[01]1106[01]1107[00]1108[00]1109[00]1110[00]1111[00]1112[00]1113[00]1114[00]1115[01]1116[01]1117[01]1118[01]1119[01]1120[01]\r
 1121[01]1122[01]1123[01]1124[01]1125[01]1126[01]1127[01]1128[01]1129[01]1130[01]1131[01]1132[01]1133[01]1134[01]1135[01]1136[01]1137[01]1138[01]1139[01]1140[01]1141[01]1142[01]1143[01]1144[01]1145[01]1146[01]1147[01]1148[01]1149[01]1150[01]1151[01]1152[01]1153[01]1154[01]1155[01]1156[01]1157[01]1158[10]1159[10]1160[01]\r
 1161[01]1162[01]1163[01]1164[01]1165[01]1166[01]1167[01]1168[01]1169[01]1170[01]1171[01]1172[01]1173[01]1174[01]1175[01]1176[01]1177[01]1178[01]1179[01]1180[01]1181[01]1182[01]1183[01]1184[01]1185[01]1186[01]1187[01]1188[01]1189[01]1190[01]1191[01]1192[01]1193[01]1194[01]1195[01]1196[01]1197[01]1198[10]1199[10]\r
-&map==0ce0:1888\r
-&map.tiles==1ce1:002c\r
+&map==0cd9:1858\r
+&map.tiles==1cda:002c\r
 &map.width==0000:0028\r
 &map.height==0000:001e\r
-&map.data==2508:0000\r
+&map.data==2501:0000\r
+okies~\r
index 6e8faedee5cc6b01b7cf67fb0b9ec6f00f155eaa..a0f20084adab9139654edb0cdffe6c4476458865 100644 (file)
Binary files a/scroll.exe and b/scroll.exe differ
index 853b809ac964dadc2aff79bd0f6246f0b47e532b..f1e7c571dae2b4198ec9d028081412365221a0df 100644 (file)
@@ -87,12 +87,10 @@ int dump(const char huge *js, jsmntok_t huge *t, size_t count, int indent, char
                else
                if (jsoneq(js, t, "height") == 0 && indent<=1)
                {
-                       fprintf(stdout, "height\n");
                        _fstrcpy(js_sv, "height");//strdup(js+t->start);//, t->end - t->start);
                }else
                if(jsoneq(js, t, "width") == 0 && indent<=1)
                {
-                       fprintf(stdout, "width\n");
                        _fstrcpy(js_sv, "width");//strdup(js+t->start);//, t->end - t->start);
                }else _fstrcpy(js_sv, "\0");
                return 1;
@@ -126,11 +124,10 @@ int loadmap(char *mn, map_t *map)
        int r;
        static int incr=0;
        int eof_expected = 0;
-       //char *jz = NULL;
        char huge *js = NULL;
        size_t jslen = 0;
        char buf[BUFSIZ];
-       char huge *buff = &buf;//(char huge *)(MK_FP(FP_SEG(&buf), FP_OFF(&buf)));//
+       char huge *buff = &buf;
        static char js_ss[16];
 
        jsmn_parser p;
@@ -164,26 +161,16 @@ int loadmap(char *mn, map_t *map)
                                return 2;
                        }
                }
-               //buf[BUFSIZ]='\0';
                js = _frealloc(js, jslen + r + 1);
                if (js == NULL) {
                        fprintf(stderr, "*js=%Fp\n", *js);
                        fprintf(stderr, "realloc(): errno = %d\n", errno);
                        return 3;
                }
-               //printf("strncpy~\n");
-               //strncpy(jz + jslen, buf, r);
-               //if(
-               //_fstrncpy(js + jslen, &(*buff), r);
                _fstrncpy(js + jslen, &(*buff), r);
-               //strncpy((char *)js + jslen, buf, r);
-               // == NULL)
-//                     fprintf(stderr, "_fstrncpy(): errno = %d\n", errno);
-               //printf("strncpy okies~~\n");
                jslen = jslen + r;
 
 again:
-               //printf("(*js)=%Fp\n", (*js));
                r = jsmn_parse(&p, js, jslen, tok, tokcount);
                if (r < 0) {
                        if (r == JSMN_ERROR_NOMEM) {
@@ -196,16 +183,16 @@ again:
                                goto again;
                        }
                } else {
-                       printf("js=%Fp\n", (js));
-                       printf("*js=%Fp\n", (*(js)));
+                       //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=[\n%s\n]\n", buf);
-                       printf("buff=[%Fp]\n", buff);
-                       printf("(*buff)=[%Fp]\n", (*buff));
+                       //printf("buff=[%Fp]\n", buff);
+                       //printf("(*buff)=[%Fp]\n", (*buff));
                        //printf("&(*buff)=[\n%s\n]\n", &(*buff));
                        dump(js, tok, p.toknext, incr, &js_ss, map, 0);
                        eof_expected = 1;
index 0b045e36cb3b44df4160e8b316ca9e5bb8d9f005..ee033104774ebb4a01d9cc4c4176f2c096d32757 100644 (file)
@@ -26,4 +26,5 @@ main(int argc, char *argv[])
        fprintf(stdout, "&map.height==%Fp\n", map.height);\r
        fprintf(stdout, "&map.data==%Fp\n", map.data);
        #endif
+       fprintf(stdout, "okies~\n");
 }\r