]> 4ch.mooo.com Git - 16.git/commitdiff
maptest~~~~
authorsparky4 <sparky4@cock.li>
Tue, 26 May 2015 19:43:21 +0000 (14:43 -0500)
committersparky4 <sparky4@cock.li>
Tue, 26 May 2015 19:43:21 +0000 (14:43 -0500)
modified:   makefile
modified:   maptest.exe
modified:   src/lib/mapread.c
modified:   src/lib/mapread.h
modified:   src/maptest.c

makefile
maptest.exe
src/lib/mapread.c
src/lib/mapread.h
src/maptest.c

index 4f3ab84a72324f051cbbc44b5ae0fa0bbec0f499..3cf99e4f6af0c4bf0a46f9305f71fe0789e5a689 100644 (file)
--- a/makefile
+++ b/makefile
@@ -2,7 +2,7 @@
 #-zk0 = kanji support~
 #-zkl = current codepage
 
-CFLAGS=-zkl -zm -mh -wo -x# -zdp# -zp16 -zq
+CFLAGS=-zkl -zm -wo -x# -mh# -zdp# -zp16 -zq
 OFLAGS=-ot -ox -ob -oh -or# -om -ol -ol+
 FLAGS=-0 -d2 $(OFLAGS) $(CFLAGS)
 REMOVECOMMAND=del
index 507078f93e719d24e4174b156dccff1d7537f5d5..85028f5fd00970ed51736b4026bd3e61b966c73a 100644 (file)
Binary files a/maptest.exe and b/maptest.exe differ
index aa9761ec623d25ce7c35cd46604c96eef6dc4ddb..36169f951ecfb0acfff4cfe1fdf7733d7cf337dc 100644 (file)
@@ -68,7 +68,7 @@ int dump(const char /*far*/ *js, jsmntok_t /*far*/ *t, size_t count, int indent,
                {
 //                     fprintf(stdout, "[[[[%d|%d]]]]\n", &(t+1)->size, (t+1)->size);
 //                     fprintf(stdout, "\n%.*s[xx[%d|%d]xx]\n", (t+1)->end - (t+1)->start, js+(t+1)->start, &(t+1)->size, (t+1)->size);
-                       map->data = /*_f*/malloc(sizeof(byte) * (t+1)->size);
+                       map->data = _fmalloc(sizeof(byte) * (t+1)->size);
                        map->tiles = /*_f*/malloc(sizeof(tiles_t));
                        //map->tiles->data = malloc(sizeof(bitmap_t));
                        //fix this
@@ -87,7 +87,8 @@ int dump(const char /*far*/ *js, jsmntok_t /*far*/ *t, size_t count, int indent,
                if (jsoneq(js, t, "height") == 0 && indent<=1)
                {
                        strcpy(js_sv, "height");//strdup(js+t->start);//, t->end - t->start);
-               }else if(jsoneq(js, t, "width") == 0 && indent<=1)
+               }else
+               if(jsoneq(js, t, "width") == 0 && indent<=1)
                {
                        strcpy(js_sv, "width");//strdup(js+t->start);//, t->end - t->start);
                }else strcpy(js_sv, "\0");
index f0e07cc8c6493f8ff2d019204d5ccc110b06c1a3..ceef6bb96c12d8a72791cad1ad33a20f8226c035 100644 (file)
@@ -13,7 +13,7 @@
 //#define DEBUG_MAPDATA
 #define DEBUG_MAPVAR
 //#define DEBUG_DUMPVARS
-#define DEBUG_JS
+//#define DEBUG_JS
 
 typedef struct {\r
        bitmap_t *data;
@@ -24,7 +24,7 @@ typedef struct {
 } tiles_t;\r
 \r
 typedef struct {\r
-       byte *data;\r
+       byte far *data;\r
        tiles_t *tiles;\r
        unsigned int width;\r
        unsigned int height;\r
index 1f7e03fc232864ddf8fe779a7c661bbca32caa35..09a7202466f54a9d4462ce1def0a4f81e4ee9d88 100644 (file)
@@ -1,7 +1,7 @@
 #include "src/lib/mapread.h"\r
 
 #define DUMP
-#define DUMP_MAP
+//#define DUMP_MAP
 
 void
 main(int argc, char *argv[])\r
@@ -20,6 +20,12 @@ main(int argc, char *argv[])
                fprintf(stdout, "%04d[%02d]", i, map.data[i]);
                if(i && !(i%map.width)) fprintf(stdout, "\n");
        }
+       fprintf(stdout, "\n");
        #endif
+       fprintf(stdout, "&map==%Fp\n", &map);
+       fprintf(stdout, "&map.tiles==%Fp\n", map.tiles);
+       fprintf(stdout, "&map.width==%Fp\n", map.width);
+       fprintf(stdout, "&map.height==%Fp\n", map.height);\r
+       fprintf(stdout, "&map.data==%Fp\n", map.data);
        #endif
 }\r