OSDN Git Service

wwww porting~
[proj16/16.git] / src / lib / scroll16.c
1 /* Project 16 Source Code~
2  * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
3  *
4  * This file is part of Project 16.
5  *
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.
10  *
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.
15  *
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.
20  *
21  */
22 /*
23         scroll16 library~
24 */
25 #include "src/lib/scroll16.h"
26
27 /*void animatePlayer(player_t *player,word playnum, short scrolloffsetswitch, int ls, bitmap_t *bmp)
28 {
29         sword dire=32; //direction
30         sword qq; //scroll offset
31
32         if(scrolloffsetswitch==0) qq = 0;
33         else qq = ((player[playnum]->p)*player[playnum]->speed);
34         switch (player[playnum]->dir)
35         {
36                 case 0:
37                         //up
38                         dire*=player[playnum]->dir;
39                         player[playnum]->x=player[playnum]->x-4;
40                         player[playnum]->y=player[playnum]->y-qq-TILEWH;
41                 break;
42                 case 1:
43                         // right
44                         dire*=(player[playnum]->dir-2);
45                         player[playnum]->x=player[playnum]->x+qq-4;
46                         player[playnum]->y=player[playnum]->y-TILEWH;
47                 break;
48                 case 2:
49                 break;
50                 case 3:
51                         //down
52                         dire*=(player[playnum]->dir-2)
53                         player[playnum]->x=player[playnum]->x-4;
54                         player[playnum]->y=player[playnum]->y+qq-TILEWH;
55                 break;
56                 case 4:
57                         //left
58                         dire*=(player[playnum]->dir+2)
59                         player[playnum]->x=player[playnum]->x-qq-4;
60                         player[playnum]->y=player[playnum]->y-TILEWH;
61                 break;
62         }
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);
71         //turn this off if XT
72         //XTif(detectcpu() > 0)
73 //      modexWaitBorder();
74 }*/