#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; INC_PER_FRAME_PRINT\r
+#define WALKTYPE_FRAM_PRINT 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
+INC_PER_FRAME_PRINT\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
\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
}\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
}\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
}\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
}\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
}\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
}\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
}\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
}\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) delay(500);\r
+ if(player[pn].enti.d!=2 && pip[0].video->rs)\r
+ {\r
+ IN_UserInput(1,1);\r
+ delay(500);\r
+ }\r
}\r
\r
\r