|
@@ -15,6 +15,7 @@
|
|
|
|
|
|
|
|
//macros
|
|
//macros
|
|
|
#define abs(x) x>0 ? x : -x
|
|
#define abs(x) x>0 ? x : -x
|
|
|
|
|
+
|
|
|
typedef enum {PATTERN} Pattern_Enum;
|
|
typedef enum {PATTERN} Pattern_Enum;
|
|
|
typedef struct Camera Camera;
|
|
typedef struct Camera Camera;
|
|
|
typedef struct Wall Wall;
|
|
typedef struct Wall Wall;
|
|
@@ -26,17 +27,18 @@ typedef enum {GAME, MENU, TITLE, GAME_OVER} State;
|
|
|
struct Level{
|
|
struct Level{
|
|
|
//for the level generation
|
|
//for the level generation
|
|
|
Pattern_Enum available_patterns[32][32];
|
|
Pattern_Enum available_patterns[32][32];
|
|
|
|
|
+
|
|
|
int nb_patterns;
|
|
int nb_patterns;
|
|
|
|
|
|
|
|
//for the camera rotation
|
|
//for the camera rotation
|
|
|
int change_interval; //5 seconds most of the time, but who knows...
|
|
int change_interval; //5 seconds most of the time, but who knows...
|
|
|
int change_precision; //to add a bit of randomness to the intervals
|
|
int change_precision; //to add a bit of randomness to the intervals
|
|
|
float change_probability; //sometimes, there can be no change at all
|
|
float change_probability; //sometimes, there can be no change at all
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
float max_speed;
|
|
float max_speed;
|
|
|
float min_speed;
|
|
float min_speed;
|
|
|
|
|
|
|
|
- float fast_spin_probability; //very low, sometimes there is a slightly faster spin for one second, then a normal spin. This is the number that allow us to generate it
|
|
|
|
|
|
|
+ float fast_spin_probability; //very low, there sometimes is a slightly faster spin for one second, then a normal spin. This is the number that allow us to generate it
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
//the camera is defined by its center
|
|
//the camera is defined by its center
|
|
@@ -46,6 +48,7 @@ struct Camera{
|
|
|
int cX;
|
|
int cX;
|
|
|
int cY;
|
|
int cY;
|
|
|
int angle;
|
|
int angle;
|
|
|
|
|
+ unsigned float zoom;
|
|
|
|
|
|
|
|
float speed;
|
|
float speed;
|
|
|
};
|
|
};
|