From: sparky4 Date: Wed, 10 Dec 2014 18:04:44 +0000 (-0600) Subject: EMS system needs to be worked on X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=78178ef37b962442df24553ac4d55bb4e92b532d;p=16.git EMS system needs to be worked on modified: scroll.exe modified: src/scroll.c --- diff --git a/scroll.exe b/scroll.exe index 1bb70ab2..ef36b5ca 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/scroll.c b/src/scroll.c index 4e13f5d7..94ad6183 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -96,6 +96,8 @@ void main() { /* data */ ptmp = bitmapLoadPcx("ptmp.pcx"); // load sprite //npctmp = bitmapLoadPcx("ptmp1.pcx"); // load sprite + + if(isEMS()) printf("%d\n", coretotalEMS()); /* save the palette */ pal = modexNewPal(); @@ -501,9 +503,10 @@ allocMap(int w, int h) { result.width =w; result.height=h; - if(!isEMS()) - result.data = malloc(sizeof(byte) * w * h); - else result.data = (byte *)alloc_emem(sizeof(byte) * w * h); + //if(!isEMS() || !checkEMS()) + result.data = malloc(sizeof(byte) * w * h); + //else + // result.data = (byte *)alloc_emem(sizeof(byte) * w * h); return result; } @@ -515,19 +518,22 @@ initMap(map_t *map) { int x, y; int i; int tile = 1; - if(!isEMS()) - map->tiles = malloc(sizeof(tiles_t)); - else map->tiles = (tiles_t *)alloc_emem(sizeof(tiles_t)); + //if(!isEMS() || !checkEMS()) + map->tiles = malloc(sizeof(tiles_t)); + //else + // map->tiles = (tiles_t *)alloc_emem(sizeof(tiles_t)); /* create the tile set */ - if(!isEMS()) - map->tiles->data = malloc(sizeof(bitmap_t)); - else map->tiles->data = (bitmap_t *)alloc_emem(sizeof(bitmap_t)); + //if(!isEMS() || !checkEMS()) + 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; - if(!isEMS()) - map->tiles->data->data = malloc((TILEWH*2)*TILEWH); - else map->tiles->data->data = (byte *)alloc_emem((TILEWH*2)*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;