*/\r
#include "src/lib/scroll16.h"\r
\r
-#define ANIMATESPRIFUN ZC_animatePlayer\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 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
+#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
\r
void ZC_walk(map_view_t *pip, player_t *player, word pn)\r
{\r
if(pip[0].tx >= 0 && pip[0].tx+pip[0].page->tw < pip[0].map->width && player[pn].enti.tx == pip[0].tx+pip[0].page->tilemidposscreenx &&\r
!(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)) //collision detection!\r
{\r
+ player[pn].walktype=2;\r
if(player[pn].enti.q<=player[pn].enti.spt)\r
{\r
INC_PER_FRAME;\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
- sprintf(global_temp_status_text, "%u", player[pn].enti.persist_aniframe);\r
- modexprint(&(pip[0].video->page[0]), player[pn].enti.x+(8*player[pn].enti.persist_aniframe), player[pn].enti.y-TILEWH-8, 1, 8, 1, global_temp_status_text);\r
- sleep(1);\r
- } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx++; }\r
+ } else { player[pn].enti.q = Q_INIT; 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].walktype=1;\r
if(player[pn].enti.q<=player[pn].enti.spt)\r
{\r
INC_PER_FRAME;\r
player[pn].enti.x+=(player[pn].enti.speed);\r
ANIMATESPRIFUN(pip, player, pn, 0);\r
player[pn].enti.q++;\r
- sleep(1);\r
- } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx++; }\r
+ } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.tx++; }\r
}\r
else\r
{\r
+ player[pn].walktype=0;\r
//#ifdef SPRITE\r
//modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 32, 24, 32, PLAYERBMPDATAPTR);\r
ANIMATESPRIFUN(pip, player, pn, 0);\r
}\r
player[pn].enti.triggerx = player[pn].enti.tx+1;\r
player[pn].enti.triggery = player[pn].enti.ty;\r
+ //WALKTYPE_FRAM_PRINT\r
break;\r
//left movement\r
case 1:\r
if(pip[0].tx > 0 && pip[0].tx+pip[0].page->tw <= pip[0].map->width && player[pn].enti.tx == pip[0].tx+pip[0].page->tilemidposscreenx &&\r
!(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)) //collision detection!\r
{\r
+ player[pn].walktype=2;\r
if(player[pn].enti.q<=player[pn].enti.spt)\r
{\r
INC_PER_FRAME;\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 = 1; player[pn].enti.d = 2; player[pn].enti.tx--; }\r
+ } else { player[pn].enti.q = Q_INIT; 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].walktype=1;\r
if(player[pn].enti.q<=player[pn].enti.spt)\r
{\r
INC_PER_FRAME;\r
player[pn].enti.x-=(player[pn].enti.speed);\r
ANIMATESPRIFUN(pip, player, pn, 0);\r
player[pn].enti.q++;\r
- } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.tx--; }\r
+ } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.tx--; }\r
}\r
else\r
{\r
+ player[pn].walktype=0;\r
//#ifdef SPRITE\r
//modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 96, 24, 32, PLAYERBMPDATAPTR);\r
ANIMATESPRIFUN(pip, player, pn, 0);\r
}\r
player[pn].enti.triggerx = player[pn].enti.tx-1;\r
player[pn].enti.triggery = player[pn].enti.ty;\r
+ //WALKTYPE_FRAM_PRINT\r
break;\r
//down movement\r
case 4:\r
if(pip[0].ty >= 0 && pip[0].ty+pip[0].page->th < pip[0].map->height && player[pn].enti.ty == pip[0].ty+pip[0].page->tilemidposscreeny &&\r
!(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)) //collision detection!\r
{\r
+ player[pn].walktype=2;\r
if(player[pn].enti.q<=player[pn].enti.spt)\r
{\r
INC_PER_FRAME;\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 = 1; player[pn].enti.d = 2; player[pn].enti.ty++; }\r
+ } else { player[pn].enti.q = Q_INIT; 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].walktype=1;\r
if(player[pn].enti.q<=player[pn].enti.spt)\r
{\r
INC_PER_FRAME;\r
player[pn].enti.y+=(player[pn].enti.speed);\r
ANIMATESPRIFUN(pip, player, pn, 0);\r
player[pn].enti.q++;\r
- } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty++; }\r
+ } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.ty++; }\r
}\r
else\r
{\r
+ player[pn].walktype=0;\r
//#ifdef SPRITE\r
//modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATAPTR);\r
ANIMATESPRIFUN(pip, player, pn, 0);\r
}\r
player[pn].enti.triggerx = player[pn].enti.tx;\r
player[pn].enti.triggery = player[pn].enti.ty+1;\r
+ //WALKTYPE_FRAM_PRINT\r
break;\r
//up movement\r
case 0:\r
if(pip[0].ty > 0 && pip[0].ty+pip[0].page->th <= pip[0].map->height && player[pn].enti.ty == pip[0].ty+pip[0].page->tilemidposscreeny &&\r
!(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)) //collision detection!\r
{\r
+ player[pn].walktype=2;\r
if(player[pn].enti.q<=player[pn].enti.spt)\r
{\r
INC_PER_FRAME;\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 = 1; player[pn].enti.d = 2; player[pn].enti.ty--; }\r
+ } else { player[pn].enti.q = Q_INIT; 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].walktype=1;\r
if(player[pn].enti.q<=player[pn].enti.spt)\r
{\r
INC_PER_FRAME;\r
player[pn].enti.y-=(player[pn].enti.speed);\r
ANIMATESPRIFUN(pip, player, 0, pn);\r
player[pn].enti.q++;\r
- } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty--; }\r
+ } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; player[pn].enti.ty--; }\r
}\r
else\r
{\r
+ player[pn].walktype=0;\r
//#ifdef SPRITE\r
//modexDrawSpriteRegion(pip[0].page, player[pn].enti.x, player[pn].enti.y-TILEWH, 24, 0, 24, 32, PLAYERBMPDATAPTR);\r
ANIMATESPRIFUN(pip, player, pn, 0);\r
}\r
player[pn].enti.triggerx = player[pn].enti.tx;\r
player[pn].enti.triggery = player[pn].enti.ty-1;\r
+ //WALKTYPE_FRAM_PRINT\r
break;\r
}\r
+ //if(player[pn].enti.d!=2 && pip[0].video->rs) IN_UserInput(1,1);\r
+ //else if(!pip[0].video->rs) delay(500);\r
}\r
\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 = 1; player[pn].enti.d = 2; player[pn].enti.tx++; }\r
+ } else { player[pn].enti.q = Q_INIT; 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 = 1; player[pn].enti.d = 2; player[pn].enti.tx++; }\r
+ } else { player[pn].enti.q = Q_INIT; 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 = 1; player[pn].enti.d = 2; player[pn].enti.tx--; }\r
+ } else { player[pn].enti.q = Q_INIT; 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 = 1; player[pn].enti.d = 2; player[pn].enti.tx--; }\r
+ } else { player[pn].enti.q = Q_INIT; 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 = 1; player[pn].enti.d = 2; player[pn].enti.ty++; }\r
+ } else { player[pn].enti.q = Q_INIT; 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 = 1; player[pn].enti.d = 2; player[pn].enti.ty++; }\r
+ } else { player[pn].enti.q = Q_INIT; 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 = 1; player[pn].enti.d = 2; player[pn].enti.ty--; }\r
+ } else { player[pn].enti.q = Q_INIT; 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, 0, pn);\r
if(!pageflipflop) modexShowPage(pip[1].page);\r
player[pn].enti.q++;\r
- } else { player[pn].enti.q = 1; player[pn].enti.d = 2; player[pn].enti.ty--; }\r
+ } else { player[pn].enti.q = Q_INIT; 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 = 1; player[pn].enti.d = 2; pip[0].tx++; }\r
+ } else { player[pn].enti.q = Q_INIT; 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 = 1; player[pn].enti.d = 2; pip[0].tx--; }\r
+ } else { player[pn].enti.q = Q_INIT; 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 = 1; player[pn].enti.d = 2; pip[0].ty++; }\r
+ } else { player[pn].enti.q = Q_INIT; 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 = 1; player[pn].enti.d = 2; pip[0].ty--; }\r
+ } else { player[pn].enti.q = Q_INIT; player[pn].enti.d = 2; pip[0].ty--; }\r
}\r
break;\r
}\r
}\r
}\r
\r
+void near ZC_drawframe(map_view_t *pip, player_t *player, word pn, sword x, sword y, word sw)\r
+{\r
+ switch(pip[0].video->rs)\r
+ {\r
+ case 0:\r
+ animate_spri(player[pn].ent->spri, pip->video);\r
+ break;\r
+ case 1:\r
+ oldanimate_spri(player[pn].ent->spri, pip->video);\r
+ break;\r
+ case 2:\r
+ modexClearRegion(&(pip[0].page[0]), x, y, 16, 32, player[pn].enti.dire);\r
+ break;\r
+ }\r
+}\r
+\r
#ifdef SPRITE\r
-#define FRAME1 modexDrawSpriteRegion(pip[/*!*/(pip->video->p)].page, x, y, 48, dire, 24, 32, PLAYERBMPDATAPTR);\r
-#define FRAME2 modexDrawSpriteRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, dire, 24, 32, PLAYERBMPDATAPTR);\r
-#define FRAME3 modexDrawSpriteRegion(pip[/*!*/(pip->video->p)].page, x, y, 0, dire, 24, 32, PLAYERBMPDATAPTR);\r
-#define FRAME4 modexDrawSpriteRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, dire, 24, 32, PLAYERBMPDATAPTR);\r
+#define FRAME1 modexDrawSpriteRegion(pip[/*!*/(pip->video->p)].page, x, y, 48, player[pn].enti.dire, 24, 32, PLAYERBMPDATAPTR);\r
+#define FRAME2 modexDrawSpriteRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, player[pn].enti.dire, 24, 32, PLAYERBMPDATAPTR);\r
+#define FRAME3 modexDrawSpriteRegion(pip[/*!*/(pip->video->p)].page, x, y, 0, player[pn].enti.dire, 24, 32, PLAYERBMPDATAPTR);\r
+#define FRAME4 modexDrawSpriteRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, player[pn].enti.dire, 24, 32, PLAYERBMPDATAPTR);\r
#else\r
-#define FRAME1 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, 2+dire);\r
-#define FRAME2 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, 1+dire);\r
-#define FRAME3 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, dire);\r
-#define FRAME4 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, 1+dire);\r
+#define FRAME1 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, 2+player[pn].enti.dire);\r
+#define FRAME2 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, 1+player[pn].enti.dire);\r
+#define FRAME3 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, player[pn].enti.dire);\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
sword y = player[pn].enti.y;\r
sword bx = x+16; //buffer's x\r
sword by = y+16; //buffer's y\r
- word dire=32; //direction\r
sword qq; //scroll offset\r
word ls = player[pn].enti.persist_aniframe;\r
+ player[pn].enti.dire=32; //direction\r
\r
switch(scrollswitch)\r
{\r
{\r
case 0:\r
//up\r
- dire*=player[pn].enti.d;\r
+ player[pn].enti.dire*=player[pn].enti.d;\r
y-=qq;\r
by-=4;\r
break;\r
case 3:\r
// right\r
- dire*=(player[pn].enti.d-2);\r
+ player[pn].enti.dire*=(player[pn].enti.d-2);\r
x+=qq;\r
bx+=4;\r
break;\r
break;\r
case 4:\r
//down\r
- dire*=(player[pn].enti.d-2);\r
+ player[pn].enti.dire*=(player[pn].enti.d-2);\r
y+=qq;\r
by+=4;\r
break;\r
case 1:\r
//left\r
- dire*=(player[pn].enti.d+2);\r
+ player[pn].enti.dire*=(player[pn].enti.d+2);\r
x-=qq;\r
bx-=4;\r
break;\r
pip->video->r=1;\r
}\r
\r
-\r
void near ZC_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
- word dire=10; //direction\r
sword qq; //scroll offset\r
word ls = player[pn].enti.persist_aniframe;\r
-#ifndef SPRITO\r
- int i=0;\r
-#endif\r
+ player[pn].enti.dire=10; //direction\r
+\r
switch(scrollswitch)\r
{\r
case 0:\r
qq = ((player[pn].enti.q)*(player[pn].enti.speed));\r
break;\r
}\r
-#ifdef SPRITE\r
- x-=4;\r
-#endif\r
+ if(pip[0].video->rs<2)\r
+ x-=4;\r
y-=pip[0].map->tiles->tileHeight;\r
switch (player[pn].enti.d)\r
{\r
case 0:\r
//up\r
- dire*=player[pn].enti.d+1;\r
+ player[pn].enti.dire*=player[pn].enti.d+1;\r
y-=qq;\r
break;\r
case 3:\r
// right\r
- dire*=(player[pn].enti.d-1);\r
+ player[pn].enti.dire*=(player[pn].enti.d-1);\r
x+=qq;\r
break;\r
case 2:\r
break;\r
case 4:\r
//down\r
- dire*=(player[pn].enti.d-1);\r
+ player[pn].enti.dire*=(player[pn].enti.d-1);\r
y+=qq;\r
break;\r
case 1:\r
//left\r
- dire*=(player[pn].enti.d+3);\r
+ player[pn].enti.dire*=(player[pn].enti.d+3);\r
x-=qq;\r
break;\r
}\r
+ player[pn].enti.dire++;\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
+ //pip->video->sprifilei = set_anim_by_id(player[pn].ent->spri, player[pn].enti.dire); if(pip->video->sprifilei == -1){ printf("ERROR! %u\n", player[pn].enti.dire); return; }\r
\r
//setting xy position\r
player[pn].ent->spri->x = x;\r
player[pn].ent->spri->y = y;\r
\r
-//#define FRAME1 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, 32, 2+dire);\r
-//#define FRAME2 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, 32, 1+dire);\r
-//#define FRAME3 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, 32, dire);\r
-//#define FRAME4 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 24, 32, 1+dire);\r
-#ifndef SPRITO\r
-//#define DRAWFRAME if (i == -1) return; oldanimate_spri(player[pn].ent->spri, pip->video)\r
-#define DRAWFRAME if (i == -1) return; animate_spri(player[pn].ent->spri, pip->video)\r
-#define NFRAME1 i = set_anim_by_id(player[pn].ent->spri, 2+dire); DRAWFRAME;\r
-#define NFRAME2 i = set_anim_by_id(player[pn].ent->spri, 1+dire); DRAWFRAME;\r
-#define NFRAME3 i = set_anim_by_id(player[pn].ent->spri, dire); DRAWFRAME;\r
-#define NFRAME4 i = set_anim_by_id(player[pn].ent->spri, 2+dire); DRAWFRAME;\r
-#else\r
-#define NFRAME1 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, 2+dire);\r
-#define NFRAME2 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, 1+dire);\r
-#define NFRAME3 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, dire);\r
-#define NFRAME4 modexClearRegion(pip[/*!*/(pip->video->p)].page, x, y, 16, 32, 1+dire);\r
-#endif\r
-\r
switch(ls)\r
{\r
case 1:\r
- NFRAME1\r
+ ZC_drawframe(pip, player, pn, x, y, ls);\r
break;\r
case 2:\r
- NFRAME2\r
+ ZC_drawframe(pip, player, pn, x, y, ls);\r
break;\r
case 3:\r
- NFRAME3\r
+ ZC_drawframe(pip, player, pn, x, y, ls);\r
break;\r
case 4:\r
- NFRAME4\r
+ ZC_drawframe(pip, player, pn, x, y, ls);\r
break;\r
}\r
pip->video->r=1;\r
+ //WALKTYPE_FRAM_PRINT;\r
+ //sprintf(global_temp_status_text, " %u", player[pn].enti.dire);\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
\r
/*\r