From: sparky4 Date: Wed, 25 Mar 2015 19:56:05 +0000 (-0500) Subject: modified: makefile X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=58947b239b0c268e8eecf88906e4d742e877956b;p=16.git modified: makefile deleted: maptest.exe modified: scroll.exe modified: src/lib/mapread.c modified: src/scroll.c --- diff --git a/makefile b/makefile index 44cb0d39..f65afd21 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,7 @@ FLAGS=-0 -d2 SRC=src\ SRCLIB=$(SRC)lib\ -all: test.exe pcxtest.exe test2.exe maptest.exe scroll.exe +all: test.exe pcxtest.exe test2.exe scroll.exe scroll.exe: scroll.obj modex16.obj dos_kb.obj bitmap.obj mapread.obj jsmn.obj wcl $(FLAGS) scroll.obj modex16.obj dos_kb.obj bitmap.obj mapread.obj jsmn.obj 16\lib\x\modex.lib @@ -16,8 +16,8 @@ test2.exe: test2.obj modex16.obj bitmap.obj planar.obj pcxtest.exe: pcxtest.obj modex16.obj bitmap.obj wcl $(FLAGS) pcxtest.obj modex16.obj bitmap.obj -maptest.exe: maptest.obj mapread.obj jsmn.obj - wcl $(FLAGS) maptest.obj jsmn.obj +#maptest.exe: maptest.obj mapread.obj jsmn.obj +# wcl $(FLAGS) maptest.obj jsmn.obj test.obj: $(SRC)test.c $(SRCLIB)modex16.h wcl $(FLAGS) -c $(SRC)test.c @@ -28,8 +28,8 @@ test2.obj: $(SRC)test2.c $(SRCLIB)modex16.h pcxtest.obj: $(SRC)pcxtest.c $(SRCLIB)modex16.h wcl $(FLAGS) -c $(SRC)pcxtest.c -maptest.obj: $(SRC)maptest.c $(SRCLIB)mapread.h - wcl $(FLAGS) -c $(SRC)maptest.c +#maptest.obj: $(SRC)maptest.c $(SRCLIB)mapread.h +# wcl $(FLAGS) -c $(SRC)maptest.c modex16.obj: $(SRCLIB)modex16.h $(SRCLIB)modex16.c wcl $(FLAGS) -c $(SRCLIB)modex16.c diff --git a/maptest.exe b/maptest.exe deleted file mode 100644 index fc112955..00000000 Binary files a/maptest.exe and /dev/null differ diff --git a/scroll.exe b/scroll.exe index df07e17a..e44f8420 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/mapread.c b/src/lib/mapread.c index eee0fd00..86dc10af 100644 --- a/src/lib/mapread.c +++ b/src/lib/mapread.c @@ -49,7 +49,14 @@ static int dump(const char *js, jsmntok_t *t, size_t count, int indent, /*char * map->data = malloc(sizeof(byte) * (t+1)->size); map->tiles = malloc(sizeof(tiles_t)); map->tiles->data = malloc(sizeof(bitmap_t)); + //map->tiles->data = bitmapLoadPcx("data/chikyuu.pcx"); map->tiles->data->data = malloc((16/**2*/)*16); + map->tiles->data->width = (16/**2*/); + map->tiles->data->height= 16; + map->tiles->tileHeight = 16; + map->tiles->tileWidth = 16; + map->tiles->rows = 1; + map->tiles->cols = 1; js_sv="data";//strdup(js+t->start);//, t->end - t->start); } else diff --git a/src/scroll.c b/src/scroll.c index 315ea9f0..dd66f556 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -121,7 +121,7 @@ void main() { loadmap("data/test.map", &map/*, 0*/); // 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); +// initMap(&map); mv.map = ↦ mv2.map = ↦ mv3.map = ↦ @@ -129,7 +129,7 @@ void main() { /* draw the tiles */ ptr = map.data; /* data */ - ptmp = bitmapLoadPcx("ptmp.pcx"); // load sprite + ptmp = bitmapLoadPcx("data/ptmp.pcx"); // load sprite //npctmp = bitmapLoadPcx("ptmp1.pcx"); // load sprite /* create the planar buffer */ p = planar_buf_from_bitmap(&ptmp); @@ -616,16 +616,16 @@ initMap(map_t *map) { // map->tiles->data = malloc(sizeof(bitmap_t)); //else // map->tiles->data = (bitmap_t *)alloc_emem(sizeof(bitmap_t)); - map->tiles->data->width = (TILEWH/**2*/); - map->tiles->data->height= TILEWH; +// map->tiles->data->width = (TILEWH/**2*/); +// map->tiles->data->height= TILEWH; //if(!isEMS() || !checkEMS()) // map->tiles->data->data = malloc((TILEWH*2)*TILEWH); //else // map->tiles->data->data = (byte *)alloc_emem((TILEWH*2)*TILEWH); - map->tiles->tileHeight = TILEWH; - map->tiles->tileWidth =TILEWH; - map->tiles->rows = 1; - map->tiles->cols = 1;//2; +// map->tiles->tileHeight = TILEWH; +// map->tiles->tileWidth =TILEWH; +// map->tiles->rows = 1; +// map->tiles->cols = 1;//2; /*q=0; //for(y=0; yheight; y++) {