From: sparky4 Date: Mon, 24 Nov 2014 06:32:32 +0000 (-0600) Subject: modified: Project 16.bfproject X-Git-Url: http://4ch.mooo.com/gitweb/?p=16.git;a=commitdiff_plain;h=a10cc880280d32a4a5754d31a4d4450be03af319 modified: Project 16.bfproject modified: scroll.c modified: scroll.exe --- diff --git a/Project 16.bfproject b/Project 16.bfproject index 07c68206..5e39df7f 100644 --- a/Project 16.bfproject +++ b/Project 16.bfproject @@ -1,13 +1,13 @@ c2e.convert_special: 0 e2c.convert_num: 0 openfiles: /dos/z/16/doc/project.txt:102:0:0: -openfiles: /dos/z/16/scroll.c:2377:1837:1: +openfiles: /dos/z/16/scroll.c:12991:12348:1: openfiles: /dos/z/16/modex16.c:9475:0:0: openfiles: /dos/z/16/modex16.h:1512:344:0: openfiles: /dos/z/16/pcxtest.c:1339:442:0: -openfiles: /dos/z/16/dos_kb.c:3759:3388:0: +openfiles: /dos/z/16/dos_kb.c:3759:2934:0: openfiles: /dos/z/16/dos_kb.h:464:0:0: -openfiles: /dos/z/16/lib/lib_head.h:2319:1809:0: +openfiles: /dos/z/16/lib/lib_head.h:2319:1512:0: snr_recursion_level: 0 convertcolumn_horizontally: 0 adv_open_matchname: 0 @@ -97,13 +97,13 @@ recent_files: file:///dos/z/16/16/modex16/dos_kb.h recent_files: file:///dos/z/16/doc/16.16 recent_files: file:///dos/z/16/doc/16story.txt recent_files: file:///dos/z/16/scroll.c -recent_files: file:///dos/z/16/modex16.h recent_files: file:///dos/z/16/doc/project.txt +recent_files: file:///dos/z/16/lib/lib_head.h +recent_files: file:///dos/z/16/dos_kb.c +recent_files: file:///dos/z/16/dos_kb.h +recent_files: file:///dos/z/16/modex16.h recent_files: file:///dos/z/16/pcxtest.c recent_files: file:///dos/z/16/modex16.c -recent_files: file:///dos/z/16/dos_kb.h -recent_files: file:///dos/z/16/dos_kb.c -recent_files: file:///dos/z/16/lib/lib_head.h snr_replacetype: 0 savedir: file:///dos/z/16 spell_check_default: 1 diff --git a/scroll.c b/scroll.c index fdfd4e9f..2e27dbc3 100644 --- a/scroll.c +++ b/scroll.c @@ -72,7 +72,7 @@ void main() { setkb(1); /* 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 bgn properly + 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 = ↦ @@ -238,7 +238,7 @@ void main() { modexShowPage(spri->page); } } - + } modexLeave(); @@ -308,7 +308,7 @@ initMap(map_t *map) { void mapScrollRight(map_view_t *mv, byte offset) { - word x, y; /* coordinate for bging */ + word x, y; /* coordinate for drawing */ /* increment the pixel position and update the page */ mv->page->dx += offset; @@ -322,7 +322,7 @@ mapScrollRight(map_view_t *mv, byte offset) { mv->page->dx = mv->map->tiles->tileWidth; - /* bg the next column */ + /* draw the next column */ x= SCREEN_WIDTH + mv->map->tiles->tileWidth; mapDrawCol(mv, mv->tx + 20 , mv->ty-1, x); } @@ -331,7 +331,7 @@ mapScrollRight(map_view_t *mv, byte offset) { void mapScrollLeft(map_view_t *mv, byte offset) { - word x, y; /* coordinate for bging */ + word x, y; /* coordinate for drawing */ /* increment the pixel position and update the page */ mv->page->dx -= offset; @@ -345,7 +345,7 @@ mapScrollLeft(map_view_t *mv, byte offset) { mv->page->data -= 4; mv->page->dx = mv->map->tiles->tileWidth; - /* bg the next column */ + /* draw the next column */ mapDrawCol(mv, mv->tx-1, mv->ty-1, 0); } } @@ -353,7 +353,7 @@ mapScrollLeft(map_view_t *mv, byte offset) { void mapScrollUp(map_view_t *mv, byte offset) { - word x, y; /* coordinate for bging */ + word x, y; /* coordinate for drawing */ /* increment the pixel position and update the page */ mv->page->dy -= offset; @@ -367,7 +367,7 @@ mapScrollUp(map_view_t *mv, byte offset) { mv->page->dy = mv->map->tiles->tileHeight; - /* bg the next row */ + /* draw the next row */ y= 0; mapDrawRow(mv, mv->tx-1 , mv->ty-1, y); } @@ -376,7 +376,7 @@ mapScrollUp(map_view_t *mv, byte offset) { void mapScrollDown(map_view_t *mv, byte offset) { - word x, y; /* coordinate for bging */ + word x, y; /* coordinate for drawing */ /* increment the pixel position and update the page */ mv->page->dy += offset; @@ -390,7 +390,7 @@ mapScrollDown(map_view_t *mv, byte offset) { mv->page->dy = mv->map->tiles->tileHeight; - /* bg the next row */ + /* draw the next row */ y= SCREEN_HEIGHT + mv->map->tiles->tileHeight; mapDrawRow(mv, mv->tx-1 , mv->ty+15, y); } @@ -413,7 +413,7 @@ mapGoTo(map_view_t *mv, int tx, int ty) { mv->dxThresh = mv->map->tiles->tileWidth * 2; mv->dyThresh = mv->map->tiles->tileHeight * 2; - /* bg the tiles */ + /* draw the tiles */ modexClearRegion(mv->page, 0, 0, mv->page->width, mv->page->height, 0); py=0; i=mv->ty * mv->map->width + mv->tx; @@ -502,13 +502,15 @@ animatePlayer(map_view_t *src, map_view_t *dest, short d1, short d2, int x, int x=x-qq-4; y=y-TILEWH; break; - } //TODO: make flexible animation thingy - if(2>ls && ls>=0) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40); - modexDrawSpriteRegion(dest->page, x, y, 48, dire, 24, 32, bmp); modexWaitBorder(); }else - if(4>ls && ls>=2) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40); - modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); modexWaitBorder(); }else - if(6>ls && ls>4) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40); - modexDrawSpriteRegion(dest->page, x, y, 0, dire, 24, 32, bmp); modexWaitBorder(); }else - if(8>ls && ls>6) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40); - modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); modexWaitBorder(); }else ls-=ls; + } + //TODO: make flexible animation thingy + if(2>ls && ls>=0) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40); + modexDrawSpriteRegion(dest->page, x, y, 48, dire, 24, 32, bmp); }else + if(4>ls && ls>=2) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40); + modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); }else + if(6>ls && ls>=4) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40); + modexDrawSpriteRegion(dest->page, x, y, 0, dire, 24, 32, bmp); }else + if(8>ls && ls>=6) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40); + modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); }else ls-=ls; + modexWaitBorder(); } diff --git a/scroll.exe b/scroll.exe index f8d42a1a..28987bc3 100644 Binary files a/scroll.exe and b/scroll.exe differ