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];
41 #define ZONE_LOOKUP(Z,I,J) (I >= Z->w || J >= Z->h || I < 0 || J < 0 ? NULL : *(Z->screens + I + J*Z->w))
43 struct box
{int x
,y
,w
,h
;};
46 struct box box
; /*absolute coords*/
47 int x
, y
; /*absolute coords*/
48 int vx
, vy
; /* pixels per ms / 256 */
49 int xoff
, yoff
; /* pixel coords*/
50 int bxoff
, byoff
; /* absolute coords */
51 sprite
* spr
; /*pixel coords*/
68 struct player_motion
{
84 /*these track the location of the player*/
95 extern struct game game
;
108 void load_zone(char* filename
);
111 int stage_collision(mobile
* m
, zone
* z
, int si
, int sj
);
112 int box_collision(struct box
* B1
, struct box
* B2
);
114 void update_mobile_motion(mobile
* m
);