huge CVS merge, see ChangeLog for details.
[supertux.git] / src / gameloop.h
1 /*
2   gameloop.h
3   
4   Super Tux - Game Loop!
5   
6   by Bill Kendrick
7   bill@newbreedsoftware.com
8   http://www.newbreedsoftware.com/supertux/
9   
10   April 11, 2000 - Junuary 1st, 2004
11 */
12
13 #if !defined( SUPERTUX_GAMELOOP_H )
14 #define SUPERTUX_GAMELOOP_H 1
15
16 #include "sound.h"
17 #include "type.h"
18 #include "level.h"
19
20 /* Bounciness of distros: */
21
22 #define NO_BOUNCE 0
23 #define BOUNCE 1
24
25
26 /* One-ups... */
27
28 #define DISTROS_LIFEUP 100
29
30
31 /* Upgrade types: */
32
33 enum {
34   UPGRADE_MINTS,
35   UPGRADE_COFFEE,
36   UPGRADE_HERRING
37 };
38
39 extern st_level current_level;
40
41 /* Scores: */
42
43 #define SCORE_BRICK 5
44 #define SCORE_DISTRO 25
45
46 /* GameLoop modes */
47
48 #define ST_GL_PLAY 0
49 #define ST_GL_TEST 1
50
51 /* Function prototypes: */
52
53 int gameloop(char * subset, int levelnb, int mode);
54 void savegame(void);
55 void loadgame(char* filename);
56 int issolid(float x, float y);
57 int isbrick(float x, float y);
58 int isice(float x, float y);
59 int isfullbox(float x, float y);
60 int rectcollision(base_type* one, base_type* two);
61 void drawshape(float x, float y, unsigned char c);
62 unsigned char shape(float x, float y);
63 void bumpbrick(float x, float y);
64 void trygrabdistro(float x, float y, int bounciness);
65 void trybreakbrick(float x, float y);
66 void tryemptybox(float x, float y);
67 void trybumpbadguy(float x, float y);
68 void add_bouncy_distro(float x, float y);
69 void add_broken_brick(float x, float y);
70 void add_broken_brick_piece(float x, float y, float xm, float ym);
71 void add_bouncy_brick(float x, float y);
72 void add_bad_guy(float x, float y, int kind);
73 void add_upgrade(float x, float y, int kind);
74 void add_bullet(float x, float y, float xm, int dir);
75 #endif
76