From: sparky4 Date: Tue, 9 Dec 2014 20:18:43 +0000 (-0600) Subject: modified: pcxtest.exe X-Git-Url: http://4ch.mooo.com/gitweb/?p=16.git;a=commitdiff_plain;h=4360c006377406334d10a4b34d543a4d4d5943b3 modified: pcxtest.exe modified: scroll.exe modified: src/scroll.c modified: test.exe modified: test2.exe --- diff --git a/pcxtest.exe b/pcxtest.exe index 3da4c5e9..1a99ead2 100644 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/scroll.exe b/scroll.exe index 697c964b..cb6e3697 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/scroll.c b/src/scroll.c index 2240325b..e67fe514 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -90,9 +90,9 @@ void main() { modexFadeOff(4, pal); modexPalBlack(); - /* create the map */ - map = allocMap(MAPX,MAPY); //20x15 is the resolution of the screen you can make maps smaller than 20x15 but the null space needs to be drawn properly - initMap(&map); + /* create the map */ + map = allocMap(MAPX,MAPY); //20x15 is the resolution of the screen you can make maps smaller than 20x15 but the null space needs to be drawn properly + initMap(&map); mv.map = ↦ mv2.map = ↦ mv3.map = ↦ @@ -495,10 +495,10 @@ allocMap(int w, int h) { map_t result; result.width =w; - result.height=h; - //if(initxms()) + result.height=h; + if(initxms()>0) result.data = malloc(sizeof(byte) * w * h); - //else result.data = xmsmalloc(sizeof(byte) * w * h); + else result.data = xmsmalloc(sizeof(byte) * w * h); return result; } @@ -510,19 +510,19 @@ initMap(map_t *map) { int x, y; int i; int tile = 1; - //if(initxms()) - map->tiles = malloc(sizeof(tiles_t)); - //else map->tiles = xmsmalloc(sizeof(tiles_t)); - - /* create the tile set */ - //if(initxms()) + if(initxms()>0) map->tiles = malloc(sizeof(tiles_t)); - //else map->tiles->data = xmsmalloc(sizeof(bitmap_t)); + else map->tiles = xmsmalloc(sizeof(tiles_t)); + + /* create the tile set */ + if(initxms()>0) + map->tiles->data = malloc(sizeof(bitmap_t)); + else map->tiles->data = xmsmalloc(sizeof(bitmap_t)); map->tiles->data->width = (TILEWH*2); map->tiles->data->height= TILEWH; - //if(initxms()) - map->tiles->data->data = malloc((TILEWH*2)*TILEWH); - //else map->tiles->data->data = xmsmalloc((TILEWH*2)*TILEWH); + if(initxms()>0) + map->tiles->data->data = malloc((TILEWH*2)*TILEWH); + else map->tiles->data->data = xmsmalloc((TILEWH*2)*TILEWH); map->tiles->tileHeight = TILEWH; map->tiles->tileWidth =TILEWH; map->tiles->rows = 1; diff --git a/test.exe b/test.exe index 70d01767..fcccbf07 100644 Binary files a/test.exe and b/test.exe differ diff --git a/test2.exe b/test2.exe index ecbbf0e5..ca41644c 100644 Binary files a/test2.exe and b/test2.exe differ