From: sparky4 Date: Sun, 23 Nov 2014 23:56:18 +0000 (-0600) Subject: modified: README X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=229ef7b09c85ba1f985c432246ee4eb67e84d0ea;p=16.git modified: README modified: TODO modified: scroll.c modified: scroll.exe --- diff --git a/README b/README index 42e5dfe9..23a3a37c 100644 --- a/README +++ b/README @@ -4,9 +4,9 @@ Open watcom to compile the code of project 16 16/modex16/ = pngwen's code archived TODO not in particular order~: -almost done 1. SCROLLING!!!!!!! +DONE 1. SCROLLING!!!!!!! 2. Fix pngwen's pcx rendering code it dose not render large relolution pcx files well at all! -3. Erase player sprite when moving and tweak it +3. tweak animation frame perloop and make the dpad controls a case switch (look at commander keen code?) and vsync horizontal animation DONE 4. movement and player movement when reaching edge of map DONE 5. sprite rendering 6. text box rendering @@ -16,5 +16,5 @@ DONE 5. sprite rendering 10. map and item interation 11. item inventory~ -To compile: -You need Open Watcom stable to compile and just run wmake \ No newline at end of file +To compile: +You need Open Watcom stable to compile and just run wmake diff --git a/TODO b/TODO index 59a676b1..71a81b43 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,8 @@ 16/ is a working branch of project 16 What needs to be done -1. Map system and movement +1. Map/event system and movement Look at the game Pokemon Crystal and Ib for an example of what I mean -pngwen is making this part! - 2. sprite loading and rendering! properly 3. font and text box rendering and system 4. map rendering diff --git a/scroll.c b/scroll.c index 8f27cbb0..ff33e3f0 100644 --- a/scroll.c +++ b/scroll.c @@ -51,7 +51,7 @@ 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 animatePlayer(map_view_t *mv, map_view_t *src, short d1, short d2, int x, int y, int ls, bitmap_t *bmp); +void animatePlayer(map_view_t *src, map_view_t *dest, short d1, short d2, int x, int y, int ls, bitmap_t *bmp); #define TILEWH 16 #define QUADWH (TILEWH/4) @@ -121,7 +121,7 @@ void main() { { for(q=0; q<(TILEWH/SPEED); q++) { - animatePlayer(spri, bg, 1, 1, player.x, player.y, q, &ptmp); + animatePlayer(bg, spri, 1, 1, player.x, player.y, q, &ptmp); mapScrollRight(bg, SPEED); mapScrollRight(spri, SPEED); modexShowPage(spri->page); @@ -133,7 +133,7 @@ void main() { for(q=0; q<(TILEWH/SPEED); q++) { player.x+=SPEED; - animatePlayer(spri, bg, 1, 0, player.x, player.y, q, &ptmp); + animatePlayer(bg, spri, 1, 0, player.x, player.y, q, &ptmp); modexShowPage(spri->page); } player.tx++; @@ -147,7 +147,7 @@ void main() { for(q=0; q<(TILEWH/SPEED); q++) { - animatePlayer(spri, bg, 3, 1, player.x, player.y, q, &ptmp); + animatePlayer(bg, spri, 3, 1, player.x, player.y, q, &ptmp); mapScrollLeft(bg, SPEED); mapScrollLeft(spri, SPEED); modexShowPage(spri->page); @@ -159,7 +159,7 @@ void main() { for(q=0; q<(TILEWH/SPEED); q++) { player.x-=SPEED; - animatePlayer(spri, bg, 3, 0, player.x, player.y, q, &ptmp); + animatePlayer(bg, spri, 3, 0, player.x, player.y, q, &ptmp); modexShowPage(spri->page); } player.tx--; @@ -172,7 +172,7 @@ void main() { { for(q=0; q<(TILEWH/SPEED); q++) { - animatePlayer(spri, bg, 2, 1, player.x, player.y, q, &ptmp); + animatePlayer(bg, spri, 2, 1, player.x, player.y, q, &ptmp); mapScrollDown(bg, SPEED); mapScrollDown(spri, SPEED); modexShowPage(spri->page); @@ -184,7 +184,7 @@ void main() { for(q=0; q<(TILEWH/SPEED); q++) { player.y+=SPEED; - animatePlayer(spri, bg, 2, 0, player.x, player.y, q, &ptmp); + animatePlayer(bg, spri, 2, 0, player.x, player.y, q, &ptmp); modexShowPage(spri->page); } player.ty++; @@ -197,7 +197,7 @@ void main() { { for(q=0; q<(TILEWH/SPEED); q++) { - animatePlayer(spri, bg, 0, 1, player.x, player.y, q, &ptmp); + animatePlayer(bg, spri, 0, 1, player.x, player.y, q, &ptmp); mapScrollUp(bg, SPEED); mapScrollUp(spri, SPEED); modexShowPage(spri->page); @@ -209,7 +209,7 @@ void main() { for(q=0; q<(TILEWH/SPEED); q++) { player.y-=SPEED; - animatePlayer(spri, bg, 0, 0, player.x, player.y, q, &ptmp); + animatePlayer(bg, spri, 0, 0, player.x, player.y, q, &ptmp); modexShowPage(spri->page); } player.ty--; @@ -447,7 +447,8 @@ mapDrawCol(map_view_t *mv, int tx, int ty, word x) { } } -void animatePlayer(map_view_t *mv, map_view_t *src, short d1, short d2, int x, int y, int ls, bitmap_t *bmp) +void +animatePlayer(map_view_t *src, map_view_t *dest, short d1, short d2, int x, int y, int ls, bitmap_t *bmp) { short dire=32*d1; short qq; @@ -479,12 +480,12 @@ void animatePlayer(map_view_t *mv, map_view_t *src, short d1, short d2, int x, i y=y-TILEWH; break; } //TODO: make flexible animation thingy - if(ls<1) { modexCopyPageRegion(mv->page, src->page, x, y-2, x, y-2, 24, 36);// modexWaitBorder(); - modexDrawSpriteRegion(mv->page, x, y, 24, dire, 24, 32, bmp); }else - if(4>ls && ls>=1) { modexCopyPageRegion(mv->page, src->page, x, y-2, x, y-2, 24, 36);// modexWaitBorder(); - modexDrawSpriteRegion(mv->page, x, y, 48, dire, 24, 32, bmp); }else - if(7>ls && ls>=4) { modexCopyPageRegion(mv->page, src->page, x, y-2, x, y-2, 24, 36);// modexWaitBorder(); - modexDrawSpriteRegion(mv->page, x, y, 0, dire, 24, 32, bmp); }else - if(8>=ls && ls>=7) { modexCopyPageRegion(mv->page, src->page, x, y-2, x, y-2, 24, 36);// modexWaitBorder(); - modexDrawSpriteRegion(mv->page, x, y, 24, dire, 24, 32, bmp); }else ls-=ls; + if(ls<1) { modexCopyPageRegion(dest->page, src->page, x, y-2, x, y-2, 24, 36);// modexWaitBorder(); + modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); }else + if(4>ls && ls>=1) { modexCopyPageRegion(dest->page, src->page, x, y-2, x, y-2, 24, 36);// modexWaitBorder(); + modexDrawSpriteRegion(dest->page, x, y, 48, dire, 24, 32, bmp); }else + if(7>ls && ls>=4) { modexCopyPageRegion(dest->page, src->page, x, y-2, x, y-2, 24, 36);// modexWaitBorder(); + modexDrawSpriteRegion(dest->page, x, y, 0, dire, 24, 32, bmp); }else + if(8>=ls && ls>=7) { modexCopyPageRegion(dest->page, src->page, x, y-2, x, y-2, 24, 36);// modexWaitBorder(); + modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); }else ls-=ls; } diff --git a/scroll.exe b/scroll.exe index 93e386f9..ec9b1125 100644 Binary files a/scroll.exe and b/scroll.exe differ