1b31fd2b47496fad8eb0e6fbab51dc4979fc9d1c
[supertux.git] / src / level.h
1 //
2 // C Interface: level
3 //
4 // Description: 
5 //
6 //
7 // Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2003
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12
13 #ifndef SUPERTUX_LEVEL_H
14 #define SUPERTUX_LEVEL_H
15
16 #include "texture.h"
17
18 #define LEVEL_NAME_MAX 20
19
20 typedef struct st_level /*It is easier to read the sources IMHO, if we don't write something like int a,b,c; */
21   {
22     char name[LEVEL_NAME_MAX];
23     char theme[100];
24     char song_title[100];
25     char bkgd_image[100];   
26     unsigned char* tiles[15];
27     int time_left;
28     int bkgd_red;
29     int bkgd_green;
30     int bkgd_blue;
31     int width;
32   } st_level;
33
34 texture_type img_bkgd, img_bkgd_tile[2][4], img_solid[4], img_brick[2];
35   
36 void loadlevel(st_level* plevel, char * subset, int level);
37 void unloadlevel(st_level* plevel);
38 void loadlevelgfx(st_level* plevel);
39 void unloadlevelgfx();
40 void load_level_image(texture_type* ptexture, char* theme, char * file, int use_alpha);
41 void level_change(st_level* plevel, float x, float y, unsigned char c);
42
43 #endif /*SUPERTUX_LEVEL_H*/