OSDN Git Service

animation fixed and sprite rendering is more flexible with overdraww and overdrawh
authorsparky4 <sparky4@cock.li>
Tue, 24 Jan 2017 20:56:33 +0000 (14:56 -0600)
committersparky4 <sparky4@cock.li>
Tue, 24 Jan 2017 20:56:33 +0000 (14:56 -0600)
src/inputest.c
src/lib/16_enti.c
src/lib/16_sprit.c
src/lib/16_tdef.h
src/lib/scroll16.c
src/lib/scroll16.h
src/zcroll.c

index 07b3930..30cb859 100755 (executable)
@@ -43,7 +43,6 @@ main(int argc, char *argv[])
 \r
        player[0].enti.q=1;\r
        player[0].enti.d=2;\r
-       player[0].enti.persist_aniframe=0;\r
        player[0].enti.speed=4;\r
 \r
 //0000 nibbletest();\r
@@ -53,14 +52,12 @@ main(int argc, char *argv[])
        {\r
 //0000         shinkutxt(&gvar);\r
                IN_ReadControl(0, &player);\r
-               #define INC_PER_FRAME if(player[0].enti.q&1) player[0].enti.persist_aniframe++; if(player[0].enti.persist_aniframe>4) player[0].enti.persist_aniframe = 1;\r
                switch(player[0].enti.d)\r
                {\r
                //right movement\r
                case 3:\r
                        if(player[0].enti.q<=(TILEWH/(player[0].enti.speed)))\r
                        {\r
-                               INC_PER_FRAME;\r
                                player[0].enti.q++;\r
                        } else { player[0].enti.q = 1; player[0].enti.d = 2; }\r
                break;\r
@@ -69,7 +66,6 @@ main(int argc, char *argv[])
                case 1:\r
                        if(player[0].enti.q<=(TILEWH/(player[0].enti.speed)))\r
                        {\r
-                               INC_PER_FRAME;\r
                                player[0].enti.q++;\r
                        } else { player[0].enti.q = 1; player[0].enti.d = 2; }\r
                break;\r
@@ -78,7 +74,6 @@ main(int argc, char *argv[])
                case 4:\r
                        if(player[0].enti.q<=(TILEWH/(player[0].enti.speed)))\r
                        {\r
-                               INC_PER_FRAME;\r
                                player[0].enti.q++;\r
                        } else { player[0].enti.q = 1; player[0].enti.d = 2; }\r
                break;\r
@@ -87,7 +82,6 @@ main(int argc, char *argv[])
                case 0:\r
                        if(player[0].enti.q<=(TILEWH/(player[0].enti.speed)))\r
                        {\r
-                               INC_PER_FRAME;\r
                                player[0].enti.q++;\r
                        } else { player[0].enti.q = 1; player[0].enti.d = 2; }\r
                break;\r
index 96be5fd..a6b42b6 100755 (executable)
@@ -33,9 +33,8 @@ void EN_initentity(entity_t *enti)
        enti->d =2;\r
        enti->hp=4;\r
        enti->speed=4;\r
-       enti->persist_aniframe= enti->q;\r
+       enti->persist_aniframe = enti->q;\r
        enti->spt=(TILEWH/(enti->speed));       //speed per tile wwww\r
-       //enti->spri->delay=1;\r
        enti->invq=1;\r
        enti->pred = enti->d;\r
 }\r
index 0be4307..f797f23 100755 (executable)
@@ -103,7 +103,7 @@ void animate_spri(entity_t *enti, 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 = 0;//16;  // how many pixels to "overdraw" so that moving sprites with edge pixels don't leave streaks.\r
+       int overdraww = 0, overdrawh = 4;       // 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
@@ -159,12 +159,12 @@ void animate_spri(entity_t *enti, video_t *video)
 \r
        // render box bounds. y does not need modification, but x and width must be multiple of 4\r
        if(!GVARVIDEO->rss){\r
-       if (x >= overdraw) rx = (x - overdraw) & (~3);\r
+       if (x >= overdraww) rx = (x - overdraww) & (~3);\r
                else rx = -(GVARVIDEO->page[0].dx);\r
-       if (y >= overdraw) ry = (y - overdraw);\r
+       if (y >= overdrawh) ry = (y - overdrawh);\r
                else ry = -(GVARVIDEO->page[0].dy);\r
-       h = enti->spri->sprite_vrl_cont->vrl_header->height + overdraw + y - ry;\r
-       w = (x + enti->spri->sprite_vrl_cont->vrl_header->width + (overdraw*2) + 3 - rx) & (~3);//round up\r
+       h = enti->spri->sprite_vrl_cont->vrl_header->height + overdrawh + y - ry;\r
+       w = (x + enti->spri->sprite_vrl_cont->vrl_header->width + (overdraww*2) + 3 - rx) & (~3) - overdraww;//round up\r
        if ((rx+w) > GVARVIDEO->page[0].width) w = GVARVIDEO->page[0].width-rx;\r
        if ((ry+h) > GVARVIDEO->page[0].height) h = GVARVIDEO->page[0].height-ry;\r
 \r
index 77ef454..d45433a 100755 (executable)
@@ -146,7 +146,7 @@ typedef     struct
        word spt;               //speed per tile\r
        struct sprite *spri; // sprite used by entity\r
        sword hp; //hitpoints of the entity\r
-       int persist_aniframe;    /* gonna be increased to 1 before being used, so 0 is ok for default */\r
+       int persist_aniframe;    // gonna be increased to 1 before being used, so 0 is ok for default\r
 } entity_t;\r
 \r
 //TODO: MAKE THIS WWWW\r
index 2d9de4f..8d02cac 100755 (executable)
 */\r
 #include "src/lib/scroll16.h"\r
 \r
-#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
-//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
-#define PERSIST_ANIFRAME_INIT 1\r
-#define Q_INIT PERSIST_ANIFRAME_INIT\r
-#define INC_PER_FRAME if(player[pn].enti.q&1) player[pn].enti.persist_aniframe++; if(player[pn].enti.persist_aniframe>4) player[pn].enti.persist_aniframe = PERSIST_ANIFRAME_INIT;\r
+#define INC_PER_FRAME if(player[pn].enti.q&1) player[pn].enti.persist_aniframe++; if(player[pn].enti.persist_aniframe>4) player[pn].enti.persist_aniframe = 1;\r
 \r
 void ZC_walk(map_view_t *pip, player_t *player, word pn)\r
 {\r
@@ -58,7 +49,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                                        mapScrollRight(pip, player, (pip[0].video->p), pn);\r
                                        player[pn].enti.q++;\r
                                        //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;\r
-                               } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.tx++; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx++; }\r
                        }\r
                        else if(player[pn].enti.tx < pip[0].map->width && !(pip[0].map->data[(player[pn].enti.tx)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx+1 == TRIGGX && player[pn].enti.ty == TRIGGY))\r
                        {\r
@@ -69,7 +60,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                                        player[pn].enti.x+=(player[pn].enti.speed);\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
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx++; }\r
                        }\r
                        else\r
                        {\r
@@ -95,7 +86,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                                        mapScrollLeft(pip, player, (pip[0].video->p), pn);\r
                                        player[pn].enti.q++;\r
                                        //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;\r
-                               } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.tx--; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx--; }\r
                        }\r
                        else if(player[pn].enti.tx > 1 && !(pip[0].map->data[(player[pn].enti.tx-2)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx-1 == TRIGGX && player[pn].enti.ty == TRIGGY))\r
                        {\r
@@ -106,7 +97,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                                        player[pn].enti.x-=(player[pn].enti.speed);\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
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx--; }\r
                        }\r
                        else\r
                        {\r
@@ -132,7 +123,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                                        mapScrollDown(pip, player, (pip[0].video->p), pn);\r
                                        player[pn].enti.q++;\r
                                        //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;\r
-                               } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.ty++; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty++; }\r
                        }\r
                        else if(player[pn].enti.ty < pip[0].map->height && !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty))] == 0))//!(player[pn].enti.tx == TRIGGX && player[pn].enti.ty+1 == TRIGGY))\r
                        {\r
@@ -143,7 +134,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                                        player[pn].enti.y+=(player[pn].enti.speed);\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
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty++; }\r
                        }\r
                        else\r
                        {\r
@@ -169,7 +160,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                                        mapScrollUp(pip, player, (pip[0].video->p), pn);\r
                                        player[pn].enti.q++;\r
                                        //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;\r
-                               } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.ty--; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty--; }\r
                        }\r
                        else if(player[pn].enti.ty > 1 && !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty-2))] == 0))//!(player[pn].enti.tx == TRIGGX &&  player[pn].enti.ty-1 == TRIGGY))\r
                        {\r
@@ -180,7 +171,7 @@ void ZC_walk(map_view_t *pip, player_t *player, word pn)
                                        player[pn].enti.y-=(player[pn].enti.speed);\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
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty--; }\r
                        }\r
                        else\r
                        {\r
@@ -230,7 +221,7 @@ void oldwalk(map_view_t *pip, player_t *player, word pn)
                                        if(!pageflipflop) modexShowPage(pip[1].page);\r
                                        player[pn].enti.q++;\r
                                        //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;\r
-                               } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.tx++; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx++; }\r
                        }\r
                        else if(player[pn].enti.tx < pip[0].map->width && !(pip[0].map->data[(player[pn].enti.tx)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx+1 == TRIGGX && player[pn].enti.ty == TRIGGY))\r
                        {\r
@@ -241,7 +232,7 @@ void oldwalk(map_view_t *pip, player_t *player, word pn)
                                        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.tx++; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx++; }\r
                        }\r
                        else\r
                        {\r
@@ -274,7 +265,7 @@ void oldwalk(map_view_t *pip, player_t *player, word pn)
                                        if(!pageflipflop) modexShowPage(pip[1].page);\r
                                        player[pn].enti.q++;\r
                                        //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;\r
-                               } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.tx--; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx--; }\r
                        }\r
                        else if(player[pn].enti.tx > 1 && !(pip[0].map->data[(player[pn].enti.tx-2)+(pip[0].map->width*(player[pn].enti.ty-1))] == 0))//!(player[pn].enti.tx-1 == TRIGGX && player[pn].enti.ty == TRIGGY))\r
                        {\r
@@ -285,7 +276,7 @@ void oldwalk(map_view_t *pip, player_t *player, word pn)
                                        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.tx--; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx--; }\r
                        }\r
                        else\r
                        {\r
@@ -318,7 +309,7 @@ void oldwalk(map_view_t *pip, player_t *player, word pn)
                                        if(!pageflipflop) modexShowPage(pip[1].page);\r
                                        player[pn].enti.q++;\r
                                        //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;\r
-                               } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.ty++; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty++; }\r
                        }\r
                        else if(player[pn].enti.ty < pip[0].map->height && !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty))] == 0))//!(player[pn].enti.tx == TRIGGX && player[pn].enti.ty+1 == TRIGGY))\r
                        {\r
@@ -329,7 +320,7 @@ void oldwalk(map_view_t *pip, player_t *player, word pn)
                                        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
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty++; }\r
                        }\r
                        else\r
                        {\r
@@ -362,7 +353,7 @@ void oldwalk(map_view_t *pip, player_t *player, word pn)
                                        if(!pageflipflop) modexShowPage(pip[1].page);\r
                                        player[pn].enti.q++;\r
                                        //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;\r
-                               } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.ty--; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty--; }\r
                        }\r
                        else if(player[pn].enti.ty > 1 && !(pip[0].map->data[(player[pn].enti.tx-1)+(pip[0].map->width*(player[pn].enti.ty-2))] == 0))//!(player[pn].enti.tx == TRIGGX &&  player[pn].enti.ty-1 == TRIGGY))\r
                        {\r
@@ -373,7 +364,7 @@ void oldwalk(map_view_t *pip, player_t *player, word pn)
                                        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
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty--; }\r
                        }\r
                        else\r
                        {\r
@@ -407,7 +398,7 @@ void ZC_panPageManual(map_view_t *pip, player_t *player, word pn)
                                        pip[0].page->dx+=4;\r
                                        SHOWMVFUN_;\r
                                        player[pn].enti.q++;\r
-                               } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; pip[0].tx++; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; pip[0].tx++; }\r
                        }\r
                break;\r
 \r
@@ -420,7 +411,7 @@ void ZC_panPageManual(map_view_t *pip, player_t *player, word pn)
                                        pip[0].page->dx-=4;\r
                                        SHOWMVFUN_;\r
                                        player[pn].enti.q++;\r
-                               } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; pip[0].tx--; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; pip[0].tx--; }\r
                        }\r
                break;\r
 \r
@@ -433,7 +424,7 @@ void ZC_panPageManual(map_view_t *pip, player_t *player, word pn)
                                        pip[0].page->dy+=4;\r
                                        SHOWMVFUN_;\r
                                        player[pn].enti.q++;\r
-                               } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; pip[0].ty++; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; pip[0].ty++; }\r
                        }\r
                break;\r
 \r
@@ -446,7 +437,7 @@ void ZC_panPageManual(map_view_t *pip, player_t *player, word pn)
                                        pip[0].page->dy-=4;\r
                                        SHOWMVFUN_;\r
                                        player[pn].enti.q++;\r
-                               } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; pip[0].ty--; }\r
+                               } else { player[pn].enti.q = 1; player[pn].enti.d = 2; pip[0].ty--; }\r
                        }\r
                break;\r
        }\r
@@ -1129,14 +1120,14 @@ void near ZC_drawframe(map_view_t *pip, entity_t *enti, sword x, sword y)
 #define FRAME4 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, 1+player[pn].enti.dire);\r
 #endif\r
 \r
-void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch)\r
+void /*near*/ animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch)\r
 {\r
        sword x = player[pn].enti.x;\r
        sword y = player[pn].enti.y;\r
        sword bx = x+16;        //buffer's x\r
        sword by = y+16;        //buffer's y\r
        sword qq; //scroll offset\r
-       word ls = player[pn].enti.persist_aniframe;\r
+       word ls = 0;//player[pn].enti.persist_aniframe;\r
        player[pn].enti.dire=32; //direction\r
 \r
        switch(scrollswitch)\r
@@ -1281,7 +1272,6 @@ void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scr
        ZC_drawframe(pip, &player[pn].enti, x, y);\r
 //if(player[pn].enti.q<4) delay(500);\r
        pip->video->r=1;\r
-       //WALKTYPE_FRAM_PRINT;\r
 }\r
 \r
 /*\r
@@ -1340,7 +1330,7 @@ void player_walk(player_t *player, map_view_t *map_v){
        }\r
 }\r
 \r
-void near mapScroll(map_view_t *mv, player_t *player)\r
+void /*near*/ mapScroll(map_view_t *mv, player_t *player)\r
 {\r
        //word x, y;  /* coordinate for drawing */\r
        int c = 1;\r
index a66cb89..75f8eda 100755 (executable)
@@ -95,6 +95,7 @@ typedef struct {
 //printf("map.width=%d map.height=%d   map.data[0]=%d\n", mv[0].map->width, mv[0].map->height, mv[0].map->data[0]);\r
 //printf("&global_temp_status_text = %Fp\n", &global_temp_status_text);\r
 //print_anim_ids(player[0].ent->spri);\r
+//printf("     aniframe=%u", player[0].enti.persist_aniframe);\r
 #define SCROLLEXITMESG         printf("tx: %d  ", mv[0].tx);\\r
        printf("ty: %d\n", mv[0].ty);\\r
        printf("\n");\\r
@@ -104,7 +105,7 @@ typedef struct {
        printf("        tx: %d", player[0].enti.tx); printf("   ty: %d\n", player[0].enti.ty);\\r
        printf("        triggx: %d", player[0].enti.triggerx); printf(" triggy: %d", player[0].enti.triggery); printf(" value: %d\n", mv[0].map->data[(player[0].enti.triggerx-1)+(map.width*(player[0].enti.triggery-1))]);\\r
        printf("        hp: %d", (player[0].enti.hp));  printf("        q: %d", player[0].enti.q);      printf("        player.info.dir: %d", player[0].info.dir);      printf("        player.d: %d ", player[0].enti.d);\\r
-               printf("        pdir=%d\n", player[0].pdir); printf("   aniframe=%u", player[0].enti.persist_aniframe); printf("        delay=%u", player[0].enti.spri->delay);\\r
+               printf("        pdir=%d\n", player[0].pdir); printf("   delay=%u", player[0].enti.spri->delay);\\r
 printf("\n\n");\\r
        printf("Virtual Screen: %dx", gvar.video.page[0].width);        printf("%d      ", gvar.video.page[0].height);\\r
        printf("Screen: %dx", gvar.video.page[0].sw);   printf("%d\n", gvar.video.page[0].sh);\\r
@@ -158,7 +159,7 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x);
 //void qclean();\r
 void shinku(global_game_variables_t *gv);\r
 void near ZC_drawframe(map_view_t *pip, entity_t *enti, sword x, sword y);\r
-void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch);\r
+void /*near*/ animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch);\r
 void near ZC_animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch);\r
 \r
 // Move an entity around. Should actually be in 16_entity\r
@@ -168,7 +169,7 @@ boolean ZC_walk2(entity_t *ent, map_view_t *map_v);
 void walk_player(player_t *player, map_view_t *map_v);\r
 \r
 // Scroll map in one direction (assumed from player's movement)\r
-void near mapScroll(map_view_t *mv, player_t *player);\r
+void /*near*/ mapScroll(map_view_t *mv, player_t *player);\r
 \r
 #endif /*__SCROLL16_H_*/\r
 //older zc_animate\r
index a02ae0d..1f5200d 100755 (executable)
@@ -135,7 +135,7 @@ void main(int argc, char *argv[])
        /*strcpy(global_temp_status_text, "press enter for the loop of zcroll\nescape to quit");\r
        modexprint(&gvar.video.page[0], 144, 72, 1, 7, 0, global_temp_status_text);\r
        while(!IN_KeyDown(sc_Enter)){ if(IN_KeyDown(sc_Escape)) goto quit; } IN_UserInput(1,1);*///wwww\r
-       while(!IN_KeyDown(sc_Escape))// && player[0].enti.hp>0)\r
+       while(!IN_KeyDown(sc_Escape) && player[0].enti.hp>0)\r
        {\r
                shinku(&gvar);\r
                //top left corner & bottem right corner of map veiw be set as map edge trigger since maps are actually square\r
@@ -210,7 +210,6 @@ void main(int argc, char *argv[])
                if(IN_KeyDown(sc_R)){ modexPalOverscan(rand()%56); } //r\r
 \r
                if((player[0].enti.q==1) && !(player[0].enti.x%TILEWH==0 && player[0].enti.y%TILEWH==0)) break; //incase things go out of sync!\r
-               player[0].enti.hp = 0;\r
        }\r
 \r
        /* fade back to text mode */\r