- //bgdata[q] = (byte)strtol(js+t->start, (char **)js+t->end, 10);
- if(strtol(js+t->start, (char **)js+t->end, 10)==0){ fprintf(stderr, "FACK! %d\n", errno); exit(-1); }
- map->tiles->data->data[q] = (byte)strtol(js+t->start, (char **)js+t->end, 10);
- printf("%d[%d]", q, map->tiles->data->data[q]);
- //printf("%d[%d]", q, bgdata[q]);
- }else if(js_sv == "height")
+ /*
+ here we should recursivly call dump again here to skip over the array until we get the facking width of the map.
+ so we can initiate the map which allocates the facking map->tiles->data->data properly and THEN we can return
+ here to read the data.... That is my design for this... wwww
+
+ FUCK well i am stuck.... wwww
+ */
+ //bgdata[q] = strtol(js+t->start, (char **)js+t->end, 10);
+ //if(strtol(js+t->start, (char **)js+t->end, 10)==0){ /*printf("%d\n", sizeof(map->tiles->data->data));*/ fprintf(stderr, "\nFACK! %d\n", errno); exit(-1); }
+ //printf("%.*s", (t-1)->end - (t-1)->start, js+(t-1)->start);
+ map->tiles->data->data[q] = (byte)strtol(js+t->start, &(char *)t->end, 0);
+ printf("[%d]", map->tiles->data->data[q]);
+ }
+ else
+ if(js_sv == "height")