]> 4ch.mooo.com Git - 16.git/commitdiff
====animation mostly converted==== old bug resurfaced as animation is 12341234 instea...
authorsparky4 <sparky4@cock.li>
Tue, 24 Jan 2017 00:02:19 +0000 (18:02 -0600)
committersparky4 <sparky4@cock.li>
Tue, 24 Jan 2017 00:02:19 +0000 (18:02 -0600)
src/lib/16_sprit.c
src/lib/scroll16.c
src/zcroll.c

index c41994f98abf8b136a07965c9dafb51365e93224..d3705138856bea3ff60f19dce1f02ca8d691f013 100755 (executable)
@@ -165,7 +165,7 @@ void animate_spri(struct sprite *spri, video_t *video)
 #define VMEMPAGEDATA2  GVARVIDEO->page[2].data\r
        unsigned int i,o,o2; int j;\r
        int x,y,rx,ry,w,h;\r
-       int overdraw = 4;//16;  // how many pixels to "overdraw" so that moving sprites with edge pixels don't leave streaks.\r
+       int overdraw = 0;//16;  // how many pixels to "overdraw" so that moving sprites with edge pixels don't leave streaks.\r
                                                // if the sprite's edge pixels are clear anyway, you can set this to 0.\r
        VGA_RAM_PTR omemptr;\r
 \r
index 819e5290c3d2a41bdc4a197a3b2d0f27bfffcd3d..63a094a0676f90265e154280d8e2718fa87aba9f 100755 (executable)
@@ -27,7 +27,7 @@
 #define INC_PER_FRAME_PRINT    sprintf(global_temp_status_text, "%u", player[pn].enti.persist_aniframe);\\r
 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);\r
 \r
-#define WALKTYPE_FRAM_PRINT INC_PER_FRAME_PRINT\r
+//#define WALKTYPE_FRAM_PRINT INC_PER_FRAME_PRINT\r
 //walktypeinfo(player, pn);\r
 //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);\r
 \r
@@ -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)\r
                                {\r
                                        INC_PER_FRAME;\r
-                                       ANIMATESPRIFUN(pip, player, pn, 1);\r
+                                       ANIMATESPRIFUN(pip, player, pn, 2);\r
                                        ScrollRight(pip, player, 3, pn);\r
                                        ScrollRight(pip, player, 2, pn);\r
                                        mapScrollRight(pip, player, (pip[0].video->p), pn);\r
@@ -67,7 +67,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                                {\r
                                        INC_PER_FRAME;\r
                                        player[pn].enti.x+=(player[pn].enti.speed);\r
-                                       ANIMATESPRIFUN(pip, player, pn, 0);\r
+                                       ANIMATESPRIFUN(pip, player, pn, 1);\r
                                        player[pn].enti.q++;\r
                                } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.tx++; }\r
                        }\r
@@ -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)\r
                                {\r
                                        INC_PER_FRAME;\r
-                                       ANIMATESPRIFUN(pip, player, pn, 1);\r
+                                       ANIMATESPRIFUN(pip, player, pn, 2);\r
                                        ScrollLeft(pip, player, 3, pn);\r
                                        ScrollLeft(pip, player, 2, pn);\r
                                        mapScrollLeft(pip, player, (pip[0].video->p), pn);\r
@@ -110,7 +110,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                                {\r
                                        INC_PER_FRAME;\r
                                        player[pn].enti.x-=(player[pn].enti.speed);\r
-                                       ANIMATESPRIFUN(pip, player, pn, 0);\r
+                                       ANIMATESPRIFUN(pip, player, pn, 1);\r
                                        player[pn].enti.q++;\r
                                } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.tx--; }\r
                        }\r
@@ -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)\r
                                {\r
                                        INC_PER_FRAME;\r
-                                       ANIMATESPRIFUN(pip, player, pn, 1);\r
+                                       ANIMATESPRIFUN(pip, player, pn, 2);\r
                                        ScrollDown(pip, player, 3, pn);\r
                                        ScrollDown(pip, player, 2, pn);\r
                                        mapScrollDown(pip, player, (pip[0].video->p), pn);\r
@@ -153,7 +153,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                                {\r
                                        INC_PER_FRAME;\r
                                        player[pn].enti.y+=(player[pn].enti.speed);\r
-                                       ANIMATESPRIFUN(pip, player, pn, 0);\r
+                                       ANIMATESPRIFUN(pip, player, pn, 1);\r
                                        player[pn].enti.q++;\r
                                } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.ty++; }\r
                        }\r
@@ -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)\r
                                {\r
                                        INC_PER_FRAME;\r
-                                       ANIMATESPRIFUN(pip, player, pn, 1);\r
+                                       ANIMATESPRIFUN(pip, player, pn, 2);\r
                                        ScrollUp(pip, player, 3, pn);\r
                                        ScrollUp(pip, player, 2, pn);\r
                                        mapScrollUp(pip, player, (pip[0].video->p), pn);\r
@@ -196,7 +196,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                                {\r
                                        INC_PER_FRAME;\r
                                        player[pn].enti.y-=(player[pn].enti.speed);\r
-                                       ANIMATESPRIFUN(pip, player, 0, pn);\r
+                                       ANIMATESPRIFUN(pip, player, pn, 1);\r
                                        player[pn].enti.q++;\r
                                } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.ty--; }\r
                        }\r
@@ -396,7 +396,7 @@ void oldwalk(map_view_t *pip, player_t *player, word pn)
                                {\r
                                        INC_PER_FRAME;\r
                                        player[pn].enti.y-=(player[pn].enti.speed);\r
-                                       ANIMATESPRIFUN(pip, player, 0, pn);\r
+                                       ANIMATESPRIFUN(pip, player, pn, 0);\r
                                        if(!pageflipflop) modexShowPage(pip[1].page);\r
                                        player[pn].enti.q++;\r
                                } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.ty--; }\r
@@ -1246,16 +1246,22 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scr
 {\r
        sword x = player[pn].enti.x;\r
        sword y = player[pn].enti.y;\r
-       sword qq; //scroll offset\r
+       sword qq,dd; //scroll offset\r
        word ls = player[pn].enti.persist_aniframe;\r
        player[pn].enti.dire=10; //direction\r
 \r
        switch(scrollswitch)\r
        {\r
                case 0:\r
+                       dd = 0;\r
                        qq = 0;\r
                break;\r
-               default:\r
+               case 1:\r
+                       dd = 1;\r
+                       qq = 0;\r
+               break;\r
+               case 2:\r
+                       dd = 1;\r
                        qq = ((player[pn].enti.q)*(player[pn].enti.speed));\r
                break;\r
        }\r
@@ -1287,7 +1293,7 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scr
                        x-=qq;\r
                break;\r
        }\r
-       player[pn].enti.dire++;\r
+       player[pn].enti.dire+=dd;\r
        player[pn].ent->spri->delay=1;\r
        if(player[pn].enti.q==1)\r
                set_anim_by_id(player[pn].ent->spri, player[pn].enti.dire);\r
index e056fdec17d2c5fcac0a9b7a6344fc480bb5df29..71579363d415ee48038832010c0ad4a2c2a68c06 100755 (executable)
@@ -102,7 +102,7 @@ void main(int argc, char *argv[])
        ZC_MVSetup(&mv, &map, &gvar);\r
 \r
        //renderswitch\r
-       gvar.video.rs=1;\r
+       gvar.video.rs=0;\r
        //player[0].ent->spri->x = player[0].ent->spri->y = TILEWH;\r
 \r
        // set up paging\r