2 Cantaveria - action adventure platform game
3 Copyright (C) 2009 2010 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
26 unsigned char tiles
[20][15];
33 struct screen
** screens
;
35 char tileset_shapes
[256];
42 #define ZONE_LOOKUP(Z,I,J) (I >= Z->w || J >= Z->h || I < 0 || J < 0 ? NULL : *(Z->screens + (I) + (J)*Z->w))
44 struct box
{int x
,y
,w
,h
;};
47 struct box box
; /*absolute coords*/
48 int x
, y
; /*absolute coords*/
49 int vx
, vy
; /* pixels per ms / 256 */
50 int xoff
, yoff
; /* pixel coords*/
51 int bxoff
, byoff
; /* absolute coords */
52 enum {LEFT
, RIGHT
} facing
;
53 sprite
* spr
; /*pixel coords*/
72 struct player_motion
{
83 /*these track the location of the player*/
94 extern struct game game
;
105 /* what is the stuff below doing here */
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
);