From: sparky4 Date: Fri, 13 Feb 2015 16:21:36 +0000 (-0600) Subject: remove glitches X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=42b33efa37195a4774e37509b353c33b553f7f61;p=16.git remove glitches modified: scroll.exe modified: src/scroll.c --- diff --git a/scroll.exe b/scroll.exe index c529d4f9..b9c3e643 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/scroll.c b/src/scroll.c index 1f84af18..d45d784b 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -1,10 +1,10 @@ #include "src\lib\modex16.h" #include -#include +#include #include #include "src\lib\dos_kb.h" #include "16\lib\x\modex.h" -#include "src\lib\wtest\wtest.c" +#include "src\lib\wtest\wtest.c" #include "src\lib\planar.c" #include "src\lib\ems.c" @@ -60,7 +60,7 @@ void mapScrollDown(map_view_t *mv, byte offset); void mapGoTo(map_view_t *mv, int tx, int ty); void mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y); void mapDrawRow(map_view_t *mv, int tx, int ty, word y); -void mapDrawCol(map_view_t *mv, int tx, int ty, word x); +void mapDrawCol(map_view_t *mv, int tx, int ty, word x); void qclean(); void animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */sword d, short scrolloffsetswitch, int x, int y, int ls, int lp, bitmap_t *bmp); @@ -75,12 +75,12 @@ void animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */sword #define TRIGGX 10 #define TRIGGY 9 -void main() { +void main() { long emmhandle; long emsavail; char teststr[80]; int i; - bitmap_t ptmp;//, npctmp; // player sprite + bitmap_t ptmp;//, npctmp; // player sprite planar_buf_t *p; const char *cpus; static int persist_aniframe = 0; /* gonna be increased to 1 before being used, so 0 is ok for default */ @@ -92,7 +92,7 @@ void main() { byte *ptr; actor_t player; //actor_t npc0; - + // atexit(qclean()); /*if(!emmtest()) { @@ -112,13 +112,13 @@ void main() { printf("Expanded memory manager error\n"); exit(0); } - printf("There are %ld pages available\n",emsavail); - + printf("There are %ld pages available\n",emsavail); + if((emmhandle = emmalloc(emsavail)) < 0) { printf("Insufficient pages available\n"); exit(0); - }*/ + }*/ /* 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 @@ -133,9 +133,9 @@ void main() { /* data */ ptmp = bitmapLoadPcx("ptmp.pcx"); // load sprite //npctmp = bitmapLoadPcx("ptmp1.pcx"); // load sprite - + /* create the planar buffer */ - p = planar_buf_from_bitmap(&ptmp); + p = planar_buf_from_bitmap(&ptmp); /*if(isEMS()) { @@ -226,8 +226,8 @@ void main() { modexClearRegion(spri->page, 5*16, 5*16, 16, 16, 255); modexClearRegion(bg->page, 5*16, 5*16, 16, 16, 255); - modexShowPage(spri->page); - memcpy ( &mv2, p, (p->pwidth*(p->height))+1 ); + modexShowPage(spri->page); + //memcpy ( &mv2, p, (p->pwidth*(p->height))+1 ); while(!keyp(1) && player.hp>0) { //top left corner & bottem right corner of map veiw be set as map edge trigger since maps are actually square @@ -805,13 +805,13 @@ mapDrawCol(map_view_t *mv, int tx, int ty, word x) { } i += mv->map->width; } -} - -void qclean() -{ +} + +void qclean() +{ modexLeave(); - setkb(0); -} + setkb(0); +} void animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */sword d, short scrolloffsetswitch, int x, int y, int ls, int lp, bitmap_t *bmp)