2 Cantaveria - action adventure platform game
3 Copyright (C) 2009 Evan Rinehart
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to
18 The Free Software Foundation, Inc.
19 51 Franklin Street, Fifth Floor
20 Boston, MA 02110-1301, USA
27 unsigned char tiles
[20][15];
34 struct screen
** screens
;
36 char tileset_shapes
[256];
43 #define ZONE_LOOKUP(Z,I,J) (I >= Z->w || J >= Z->h || I < 0 || J < 0 ? NULL : *(Z->screens + (I) + (J)*Z->w))
45 struct box
{int x
,y
,w
,h
;};
48 struct box box
; /*absolute coords*/
49 int x
, y
; /*absolute coords*/
50 int vx
, vy
; /* pixels per ms / 256 */
51 int xoff
, yoff
; /* pixel coords*/
52 int bxoff
, byoff
; /* absolute coords */
53 enum {LEFT
, RIGHT
} facing
;
54 sprite
* spr
; /*pixel coords*/
73 struct player_motion
{
89 /*these track the location of the player*/
100 extern struct game game
;
111 void load_zone(char* filename
);
114 int stage_collision(mobile
* m
, zone
* z
, int si
, int sj
);
115 int box_collision(struct box
* B1
, struct box
* B2
);
117 void update_mobile_motion(mobile
* m
);