1 /* Tower Toppler - Nebulus
2  * Copyright (C) 2000-2012  Andreas R�ver
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13 
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17  */
18 
19 #ifndef ROBOTS_H
20 #define ROBOTS_H
21 
22 /* this module handles the movement of up to 4 robots */
23 
24 
25 /* values for kinds of robots */
26 typedef enum {
27   OBJ_KIND_NOTHING,
28   OBJ_KIND_JUMPBALL,
29   OBJ_KIND_FREEZEBALL,
30   OBJ_KIND_FREEZEBALL_FALLING,
31   OBJ_KIND_DISAPPEAR,
32   OBJ_KIND_FREEZEBALL_FROZEN,
33   OBJ_KIND_APPEAR,
34   OBJ_KIND_CROSS,
35   OBJ_KIND_ROBOT_VERT,
36   OBJ_KIND_ROBOT_HORIZ
37 } rob_kinds;
38 
39 /* initialize all fields, call this when you start a new towergame */
40 void rob_initialize(void);
41 
42 /* return the position and state of one robot */
43 rob_kinds rob_kind(int nr);
44 int rob_time(int nr);
45 int rob_angle(int nr);
46 int rob_vertical(int nr);
47 
48 /* returns the object the snowball or animal collides with or -1 */
49 int rob_topplercollision(int angle, int vertical);
50 int rob_snowballcollision(int angle, int vertical);
51 
52 /* creates new robots, depending on the current vertical position and
53  the actual number of robots existing */
54 void rob_new(int verticalpos);
55 
56 /* move all the robots */
57 void rob_update(void);
58 
59 /* call this if a robot got hit by the snowball, the function
60  returns the number of points the player gets */
61 int rob_gothit(int nr);
62 
63 /* makes all the robots disappear */
64 void rob_disappearall(void);
65 
66 #endif
67