From: sparky4 Date: Tue, 24 Jan 2017 00:02:19 +0000 (-0600) Subject: ====animation mostly converted==== old bug resurfaced as animation is 12341234 instea... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=7137453318b4dabf7de61e85c04d03129c2e556a;p=16.git ====animation mostly converted==== old bug resurfaced as animation is 12341234 instead of the proper 11223344 --- diff --git a/src/lib/16_sprit.c b/src/lib/16_sprit.c index c41994f9..d3705138 100755 --- a/src/lib/16_sprit.c +++ b/src/lib/16_sprit.c @@ -165,7 +165,7 @@ void animate_spri(struct sprite *spri, video_t *video) #define VMEMPAGEDATA2 GVARVIDEO->page[2].data unsigned int i,o,o2; int j; int x,y,rx,ry,w,h; - int overdraw = 4;//16; // how many pixels to "overdraw" so that moving sprites with edge pixels don't leave streaks. + int overdraw = 0;//16; // how many pixels to "overdraw" so that moving sprites with edge pixels don't leave streaks. // if the sprite's edge pixels are clear anyway, you can set this to 0. VGA_RAM_PTR omemptr; diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 819e5290..63a094a0 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -27,7 +27,7 @@ #define INC_PER_FRAME_PRINT sprintf(global_temp_status_text, "%u", player[pn].enti.persist_aniframe);\ modexprint(&(pip->video->page[0]), player[pn].enti.x-(8*player[pn].enti.persist_aniframe), player[pn].enti.y-TILEWH-(8*player[pn].enti.persist_aniframe), 1, 20, 1, global_temp_status_text); -#define WALKTYPE_FRAM_PRINT INC_PER_FRAME_PRINT +//#define WALKTYPE_FRAM_PRINT INC_PER_FRAME_PRINT //walktypeinfo(player, pn); //modexprint(&(pip->video->page[0]), player[pn].enti.x-(8*player[pn].enti.persist_aniframe)+8, player[pn].enti.y-TILEWH-(8*player[pn].enti.persist_aniframe), 1, 20, 1, global_temp_status_text); @@ -52,7 +52,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) if(player[pn].enti.q<=player[pn].enti.spt) { INC_PER_FRAME; - ANIMATESPRIFUN(pip, player, pn, 1); + ANIMATESPRIFUN(pip, player, pn, 2); ScrollRight(pip, player, 3, pn); ScrollRight(pip, player, 2, pn); mapScrollRight(pip, player, (pip[0].video->p), pn); @@ -67,7 +67,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) { INC_PER_FRAME; player[pn].enti.x+=(player[pn].enti.speed); - ANIMATESPRIFUN(pip, player, pn, 0); + ANIMATESPRIFUN(pip, player, pn, 1); player[pn].enti.q++; } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.tx++; } } @@ -95,7 +95,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) if(player[pn].enti.q<=player[pn].enti.spt) { INC_PER_FRAME; - ANIMATESPRIFUN(pip, player, pn, 1); + ANIMATESPRIFUN(pip, player, pn, 2); ScrollLeft(pip, player, 3, pn); ScrollLeft(pip, player, 2, pn); mapScrollLeft(pip, player, (pip[0].video->p), pn); @@ -110,7 +110,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) { INC_PER_FRAME; player[pn].enti.x-=(player[pn].enti.speed); - ANIMATESPRIFUN(pip, player, pn, 0); + ANIMATESPRIFUN(pip, player, pn, 1); player[pn].enti.q++; } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.tx--; } } @@ -138,7 +138,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) if(player[pn].enti.q<=player[pn].enti.spt) { INC_PER_FRAME; - ANIMATESPRIFUN(pip, player, pn, 1); + ANIMATESPRIFUN(pip, player, pn, 2); ScrollDown(pip, player, 3, pn); ScrollDown(pip, player, 2, pn); mapScrollDown(pip, player, (pip[0].video->p), pn); @@ -153,7 +153,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) { INC_PER_FRAME; player[pn].enti.y+=(player[pn].enti.speed); - ANIMATESPRIFUN(pip, player, pn, 0); + ANIMATESPRIFUN(pip, player, pn, 1); player[pn].enti.q++; } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.ty++; } } @@ -181,7 +181,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) if(player[pn].enti.q<=player[pn].enti.spt) { INC_PER_FRAME; - ANIMATESPRIFUN(pip, player, pn, 1); + ANIMATESPRIFUN(pip, player, pn, 2); ScrollUp(pip, player, 3, pn); ScrollUp(pip, player, 2, pn); mapScrollUp(pip, player, (pip[0].video->p), pn); @@ -196,7 +196,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn) { INC_PER_FRAME; player[pn].enti.y-=(player[pn].enti.speed); - ANIMATESPRIFUN(pip, player, 0, pn); + ANIMATESPRIFUN(pip, player, pn, 1); player[pn].enti.q++; } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.ty--; } } @@ -396,7 +396,7 @@ void oldwalk(map_view_t *pip, player_t *player, word pn) { INC_PER_FRAME; player[pn].enti.y-=(player[pn].enti.speed); - ANIMATESPRIFUN(pip, player, 0, pn); + ANIMATESPRIFUN(pip, player, pn, 0); if(!pageflipflop) modexShowPage(pip[1].page); player[pn].enti.q++; } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.ty--; } @@ -1246,16 +1246,22 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scr { sword x = player[pn].enti.x; sword y = player[pn].enti.y; - sword qq; //scroll offset + sword qq,dd; //scroll offset word ls = player[pn].enti.persist_aniframe; player[pn].enti.dire=10; //direction switch(scrollswitch) { case 0: + dd = 0; qq = 0; break; - default: + case 1: + dd = 1; + qq = 0; + break; + case 2: + dd = 1; qq = ((player[pn].enti.q)*(player[pn].enti.speed)); break; } @@ -1287,7 +1293,7 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scr x-=qq; break; } - player[pn].enti.dire++; + player[pn].enti.dire+=dd; player[pn].ent->spri->delay=1; if(player[pn].enti.q==1) set_anim_by_id(player[pn].ent->spri, player[pn].enti.dire); diff --git a/src/zcroll.c b/src/zcroll.c index e056fdec..71579363 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -102,7 +102,7 @@ void main(int argc, char *argv[]) ZC_MVSetup(&mv, &map, &gvar); //renderswitch - gvar.video.rs=1; + gvar.video.rs=0; //player[0].ent->spri->x = player[0].ent->spri->y = TILEWH; // set up paging