From: sparky4 Date: Tue, 2 Jun 2015 17:34:24 +0000 (-0500) Subject: scroll.exe test.... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=12b9ee8122e4842aeb56d94a206e6b2b2e1e8bd4;p=16.git scroll.exe test.... modified: maptest.exe modified: scroll.exe new file: scroll.out modified: src/lib/mapread.c modified: src/lib/mapread.h modified: src/scroll.c --- diff --git a/maptest.exe b/maptest.exe index 9a112421..d7b3cc80 100644 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/scroll.exe b/scroll.exe index 98ca00f7..1d3e92e7 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/scroll.out b/scroll.out new file mode 100644 index 00000000..1868af8c --- /dev/null +++ b/scroll.out @@ -0,0 +1,132 @@ +{ "backgroundcolor":"#000000", + "height":30, + "layers":[ + { + "data":[1, 2, 3, 4, 0, 3, 3, 3, 3, 3, 3, 3, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 6, 7, 8, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 10, 11, 12, 4, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 14, 15, 16, 0, 1, 1, 1, 5, 8, 1, 11, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 4, 0, 0, 0, 0, 0, 8, 8, 1, 11, 11, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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ation":"orthogonal", + "properties": + { + + }, + "renderorder":"right-down", + "tileheight":16, + "tilesets":[ + { + "firstgid":1, + "image":"ed.png", + "imageheight":64, + "imagewidth":64, + "margin":0, + "name":"wwww", + "properties": + { + + }, + "spacing":0, + "tileheight":16, + "tilewidth":16 + }], + "tilewidth":16, + "version":1, + "width":40 +}lŒ† + +indent= [0] js_sv= [] +indent= [1] js_sv= [] +indent= [1] js_sv= [] +indent= [1] js_sv= [] +indent= [1] js_sv= [height] +indent= [1] h:[30] +indent= [1] js_sv= [height] +indent= [1] js_sv= [] +indent= [2] js_sv= [] +indent= [3] js_sv= [] +indent= [3] js_sv= [data] +indent= [4] js_sv= [data] +0[1]indent= [4] js_sv= [data] +1[2]indent= [4] js_sv= [data] +2[3]indent= [4] js_sv= [data] +3[4]indent= [4] js_sv= [data] +4[0]indent= [4] js_sv= [data] +5[3]indent= [4] js_sv= [data] +6[3]indent= [4] js_sv= [data] +7[3]indent= [4] js_sv= [data] +8[3]indent= [4] js_sv= [data] +9[3]indent= [4] js_sv= [data] +10[3]indent= [4] js_sv= [data] +11[3]indent= [4] js_sv= [data] +12[3]indent= [4] js_sv= [data] +13[4]indent= [4] js_sv= [data] +14[1]indent= [4] js_sv= [data] +15[1]indent= [4] js_sv= [data] +16[1]indent= [4] js_sv= [data] +17[1]indent= [4] js_sv= [data] +18[1]indent= [4] js_sv= [data] +19[1]indent= [4] js_sv= [data] +20[1]indent= [4] js_sv= [data] +21[1]indent= [4] js_sv= [data] +22[1]indent= [4] js_sv= [data] +23[1]indent= [4] js_sv= [data] +24[1]indent= [4] js_sv= [data] +25[1]indent= [4] js_sv= [data] +26[1]indent= [4] js_sv= [data] +27[1]indent= [4] js_sv= [data] +28[1]indent= [4] js_sv= [data] +29[1]indent= [4] js_sv= [data] +30[1]indent= [4] js_sv= [data] +31[1]indent= [4] js_sv= [data] +32[1]indent= [4] js_sv= [data] +33[1]indent= [4] js_sv= [data] +34[1]indent= [4] js_sv= [data] +35[1]indent= [4] js_sv= [data] +36[1]indent= [4] js_sv= [data] +37[1]indent= [4] js_sv= [data] +38[1]indent= [4] js_sv= [data] +39[1]indent= [4] js_sv= [data] +40[5]indent= [4] js_sv= [data] +41[6]indent= [4] js_sv= [data] +42[7]indent= [4] js_sv= [data] +43[8]indent= [4] js_sv= [data] +44[0]indent= [4] js_sv= [data] +45[1]indent= [4] js_sv= [data] +46[0]indent= [4] js_sv= [data] +47[1]indent= [4] js_sv= [data] +48[0]indent= [4] js_sv= [data] +49[0]indent= [4] js_sv= [data] +50[1]indent= [4] js_sv= [data] +51[1]indent= [4] js_sv= [data] +52[1]indent= [4] js_sv= [data] +53[1]indent= [4] js_sv= [data] +54[1]indent= [4] js_sv= [data] +55[1]indent= [4] js_sv= [data] +56[1]indent= [4] js_sv= [data] +57[1]indent= [4] js_sv= [data] +58[1]indent= [4] js_sv= [data] +59[1]indent= [4] js_sv= [data] +60[1]indent= [4] js_sv= [data] +61[1]indent= [4] js_sv= [data] +62[1]indent= [4] js_sv= [data] +63[1]indent= [4] js_sv= [data] +64[1]indent= [4] js_sv= [data] +65[1]indent= [4] js_sv= [data] +66[1]indent= [4] js_sv= [data] +67[1]indent= [4] js_sv= [data] +68[1]indent= [4] js_sv= [data] +69[1]indent= [4] js_sv= [data] +70[1]indent= [4] js_sv= [data] +71[1]indent= [4] js_sv= [data] +72[1]indent= [4] js_sv= [data] +73[1]indent= [4] js_sv= [data] +74[1]indent= [4] js_sv= [data] +75[1]indent= [4] js_sv= [data] +76[1]indent= [4] js_sv= [data] +77[1]indent= [4] js_sv \ No newline at end of file diff --git a/src/lib/mapread.c b/src/lib/mapread.c index f1e7c571..ee054dbd 100644 --- a/src/lib/mapread.c +++ b/src/lib/mapread.c @@ -72,8 +72,8 @@ int dump(const char huge *js, jsmntok_t huge *t, size_t count, int indent, char //map->data = malloc(sizeof(byte) * (t+1)->size); map->tiles = /*_f*/malloc(sizeof(tiles_t)); //map->tiles->data = malloc(sizeof(bitmap_t)); - //fix this - bp = bitmapLoadPcx("data/ed.pcx"); + //fix this to be far~ +//0000 bp = bitmapLoadPcx("data/ed.pcx"); map->tiles->data = &bp; //map->tiles->data->data = malloc((16/**2*/)*16); //map->tiles->data->width = (16/**2*/); diff --git a/src/lib/mapread.h b/src/lib/mapread.h index fbc8e213..58769d5d 100644 --- a/src/lib/mapread.h +++ b/src/lib/mapread.h @@ -10,10 +10,10 @@ #include "src/lib/modex16.h" #include "src/lib/lib_head.h" -//#define DEBUG_MAPDATA -//#define DEBUG_MAPVAR -//#define DEBUG_DUMPVARS -//#define DEBUG_JS +#define DEBUG_MAPDATA +#define DEBUG_MAPVAR +#define DEBUG_DUMPVARS +#define DEBUG_JS typedef struct { bitmap_t *data; diff --git a/src/scroll.c b/src/scroll.c index 0b5fc6b1..872afeab 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -126,11 +126,11 @@ void main() { /* create the map */ //0000 printf("Total used @ before map load: %zu\n", oldfreemem-GetFreeSize()); +//0000 #ifdef LOADDATA fprintf(stderr, "testing~\n"); -//#ifdef LOADDATA loadmap("data/test.map", &map); -//#endif - fprintf(stderr, "yay map loaded~~\n"); + fprintf(stderr, "yay map loaded~~\n"); +//0000 #endif //---- map = allocMap(map.width,map.height); //20x15 is the resolution of the screen you can make maps smaller than 20x15 but the null space needs to be drawn properly //if(isEMS()) printf("%d tesuto\n", coretotalEMS()); //---- initMap(&map);