break;
case 1:
//modexprintbig(page, x, y, 1, 15, 0, (t->debug_data));
- for(texty=0; texty<2; texty++)
+ /*for(texty=0; texty<2; texty++)
{
for(textx=0; textx<2; textx++)
- {
+ {*/
modexprint(page, x+(textx*8), y+(texty*8), 1, (word)(t->debug_data), 0, (t->debug_data));
- }
- }
+/* }
+ }*/
break;
}
}
void animatePlayer(map_view_t *pip, player_t *player, word playnum, sword scrollswitch)
{
+ sword x = player[playnum].x;
+ sword y = player[playnum].y;
sword dire=32; //direction
sword qq; //scroll offset
word ls = player[playnum].persist_aniframe;
if(scrollswitch==0) qq = 0;
- else qq = ((player[playnum].persist_aniframe)*player[playnum].speed);
+ else qq = ((ls)*player[playnum].speed);
switch (player[playnum].info.dir)
{
case 0:
//up
dire*=player[playnum].info.dir;
- player[playnum].x=player[playnum].x-4;
- player[playnum].y=player[playnum].y-qq-TILEWH;
+ x-=4;
+ y-=(qq-TILEWH);
break;
case 1:
// right
dire*=(player[playnum].info.dir-2);
- player[playnum].x=player[playnum].x+qq-4;
- player[playnum].y=player[playnum].y-TILEWH;
+ x+=qq-4;
+ y-=TILEWH;
break;
case 2:
break;
case 3:
//down
dire*=(player[playnum].info.dir-2);
- player[playnum].x=player[playnum].x-4;
- player[playnum].y=player[playnum].y+qq-TILEWH;
+ x-=4;
+ y+=(qq-TILEWH);
break;
case 4:
//left
dire*=(player[playnum].info.dir+2);
- player[playnum].x=player[playnum].x-qq-4;
- player[playnum].y=player[playnum].y-TILEWH;
+ x-=qq-4;
+ y-=TILEWH;
break;
}
- modexCopyPageRegion(pip[1].page, pip[0].page, player[playnum].x-4, player[playnum].y-4, player[playnum].x-4, player[playnum].y-4, 28, 40);
- if(2>ls && ls>=1) { modexDrawSpriteRegion(pip[1].page, player[playnum].x, player[playnum].y, 48, dire, 24, 32, &player[playnum].data); }else
- if(3>ls && ls>=2) { modexDrawSpriteRegion(pip[1].page, player[playnum].x, player[playnum].y, 24, dire, 24, 32, &player[playnum].data); }else
- if(4>ls && ls>=3) { modexDrawSpriteRegion(pip[1].page, player[playnum].x, player[playnum].y, 0, dire, 24, 32, &player[playnum].data); }else
- if(5>ls && ls>=4) { modexDrawSpriteRegion(pip[1].page, player[playnum].x, player[playnum].y, 24, dire, 24, 32, &player[playnum].data); }
+ modexCopyPageRegion(pip[1].page, pip[0].page, x-4, y-4, x-4, y-4, 28, 40);
+ if(2>ls && ls>=1) { modexDrawSpriteRegion(pip[1].page, x, y, 48, dire, 24, 32, &player[playnum].data); }else
+ if(3>ls && ls>=2) { modexDrawSpriteRegion(pip[1].page, x, y, 24, dire, 24, 32, &player[playnum].data); }else
+ if(4>ls && ls>=3) { modexDrawSpriteRegion(pip[1].page, x, y, 0, dire, 24, 32, &player[playnum].data); }else
+ if(5>ls && ls>=4) { modexDrawSpriteRegion(pip[1].page, x, y, 24, dire, 24, 32, &player[playnum].data); }
//TODO: mask copy //modexCopyPageRegion(dest->page, src->page, x-4, y-4, x-4, y-4, 28, 40);
//modexClearRegion(top->page, 66, 66, 2, 40, 0);
//modexCopyPageRegion(dest->page, top->page, 66, 66, 66, 66, 2, 40);