]> 4ch.mooo.com Git - 16.git/blob - src/lib/scroll16.h
====scroll.exe coverted and bakapi.exe converted!! this is a major commit!
[16.git] / src / lib / scroll16.h
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 #ifndef __SCROLL16_H_
24 #define __SCROLL16_H_
25
26 #include "src/lib/16_head.h"
27 #include "src/lib/modex16.h"
28 #include "src/lib/16_in.h"
29 #include "src/lib/bitmap.h"
30 #include "src/lib/planar.h"
31 #include "src/lib/mapread.h"
32
33 typedef struct {
34         map_t *map;
35         page_t *page;
36         int tx; //appears to be the top left tile position on the viewable screen map
37         int ty; //appears to be the top left tile position on the viewable screen map
38         word dxThresh; //????
39         word dyThresh; //????
40 } map_view_t;
41
42 typedef struct
43 {
44         map_view_t *mv;
45 } map_view_db_t;
46
47 #define TILEWH 16
48 #define QUADWH                  TILEWH/2
49 //#define LOOPMAX (TILEWH/(player[0].speed))
50
51 //map_t allocMap(int w, int h);
52 //void initMap(map_t *map);
53 void walk(map_view_t *pip, player_t *player, word pn);
54 void mapScrollRight(map_view_t *mv, player_t *player, word id, word plid);
55 void mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid);
56 void mapScrollUp(map_view_t *mv, player_t *player, word id, word plid);
57 void mapScrollDown(map_view_t *mv, player_t *player, word id, word plid);
58 void mapGoTo(map_view_t *mv, int tx, int ty);
59 void mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y);
60 void mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *p, word poopoffset);
61 void mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *p, word poopoffset);
62 void mapDrawWRow(map_view_t *mv, int tx, int ty, word y);
63 void mapDrawWCol(map_view_t *mv, int tx, int ty, word x);
64 void pdump(page_t *pee);
65 void qclean();
66 void animatePlayer(map_view_t *pip, player_t *player, word playnum, sword scrollswitch);
67
68 #endif /*__SCROLL16_H_*/