*/\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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
#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
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
}\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