1 /* Project 16 Source Code~
2 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
4 * This file is part of Project 16.
6 * Project 16 is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * Project 16 is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>, or
18 * write to the Free Software Foundation, Inc., 51 Franklin Street,
19 * Fifth Floor, Boston, MA 02110-1301 USA.
25 #include "src/lib/scroll16.h"
27 /*void animatePlayer(player_t *player,word playnum, short scrolloffsetswitch, int ls, bitmap_t *bmp)
29 sword dire=32; //direction
30 sword qq; //scroll offset
32 if(scrolloffsetswitch==0) qq = 0;
33 else qq = ((player[playnum]->p)*player[playnum]->speed);
34 switch (player[playnum]->dir)
38 dire*=player[playnum]->dir;
39 player[playnum]->x=player[playnum]->x-4;
40 player[playnum]->y=player[playnum]->y-qq-TILEWH;
44 dire*=(player[playnum]->dir-2);
45 player[playnum]->x=player[playnum]->x+qq-4;
46 player[playnum]->y=player[playnum]->y-TILEWH;
52 dire*=(player[playnum]->dir-2)
53 player[playnum]->x=player[playnum]->x-4;
54 player[playnum]->y=player[playnum]->y+qq-TILEWH;
58 dire*=(player[playnum]->dir+2)
59 player[playnum]->x=player[playnum]->x-qq-4;
60 player[playnum]->y=player[playnum]->y-TILEWH;
63 // modexCopyPageRegion(dest->page, src->page, x-4, y-4, x-4, y-4, 28, 40);
64 // if(2>ls && ls>=1) { modexDrawSpriteRegion(dest->page, x, y, 48, dire, 24, 32, bmp); }else
65 // if(3>ls && ls>=2) { modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); }else
66 // if(4>ls && ls>=3) { modexDrawSpriteRegion(dest->page, x, y, 0, dire, 24, 32, bmp); }else
67 // if(5>ls && ls>=4) { modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); }
68 //TODO: mask copy //modexCopyPageRegion(dest->page, src->page, x-4, y-4, x-4, y-4, 28, 40);
69 //modexClearRegion(top->page, 66, 66, 2, 40, 0);
70 //modexCopyPageRegion(dest->page, top->page, 66, 66, 66, 66, 2, 40);
72 //XTif(detectcpu() > 0)