2022-06-12 17:49:42 +00:00
|
|
|
/*
|
|
|
|
- Avoid ~ a game by Canneddonuts
|
|
|
|
- Filename ~ Gameplay.h
|
|
|
|
- Author ~ Return0ne
|
|
|
|
- 2022
|
|
|
|
- *no license*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GAMEPLAY_HEADER
|
|
|
|
#define GAMEPLAY_HEADER
|
|
|
|
|
2022-07-25 19:21:52 +00:00
|
|
|
typedef enum Levels { LEVEL1 = 0, LEVEL2, LEVEL3 } Levels;
|
|
|
|
|
2022-06-19 21:36:26 +00:00
|
|
|
#define MAX_FIREWORKS 10
|
2022-06-29 16:11:37 +00:00
|
|
|
#define PLAYER_HP 3
|
2022-07-08 20:00:38 +00:00
|
|
|
#define MAX_SHOOTS 3
|
2022-06-18 16:10:36 +00:00
|
|
|
|
2022-06-17 16:32:35 +00:00
|
|
|
struct Actor {
|
2022-06-12 17:49:42 +00:00
|
|
|
float speed;
|
|
|
|
int hp;
|
|
|
|
int currentframe;
|
|
|
|
Vector2 sprite_pos;
|
|
|
|
Rectangle frameRec;
|
|
|
|
Rectangle hitbox;
|
2022-06-26 23:43:39 +00:00
|
|
|
Color color;
|
2022-06-17 02:17:26 +00:00
|
|
|
};
|
2022-06-12 17:49:42 +00:00
|
|
|
|
2022-06-17 02:17:26 +00:00
|
|
|
struct Item {
|
2022-06-12 17:49:42 +00:00
|
|
|
Vector2 sprite_pos;
|
|
|
|
Rectangle hitbox;
|
|
|
|
bool active;
|
2022-07-08 20:00:38 +00:00
|
|
|
Color color;
|
|
|
|
int power;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Attack {
|
|
|
|
Vector2 sprite_pos;
|
|
|
|
Rectangle hitbox;
|
|
|
|
Vector2 speed;
|
|
|
|
int active;
|
|
|
|
Color color;
|
2022-06-17 02:17:26 +00:00
|
|
|
};
|
2022-06-12 17:49:42 +00:00
|
|
|
|
2022-06-17 16:32:35 +00:00
|
|
|
struct Actor player = { 0 };
|
|
|
|
struct Actor enemy = { 0 };
|
2022-07-08 20:00:38 +00:00
|
|
|
struct Attack fireworks[MAX_FIREWORKS] = { 0 };
|
|
|
|
struct Item feather = { 0 };
|
|
|
|
struct Attack shoot[MAX_SHOOTS] = { 0 };
|
2022-07-04 01:08:45 +00:00
|
|
|
Sound fxhit = { 0 };
|
|
|
|
Sound fxfeather = { 0 };
|
2022-07-08 20:00:38 +00:00
|
|
|
Sound fxboom = { 0 };
|
2022-06-12 17:49:42 +00:00
|
|
|
bool pause;
|
2022-06-26 23:43:39 +00:00
|
|
|
bool player_in;
|
2022-07-26 23:12:36 +00:00
|
|
|
bool DebugMode;
|
2022-07-15 16:59:37 +00:00
|
|
|
bool enemy_hurt;
|
2022-07-08 20:00:38 +00:00
|
|
|
int ammo = 0;
|
2022-07-15 16:59:37 +00:00
|
|
|
int GI_callcount = 0;
|
|
|
|
|
2022-06-12 17:49:42 +00:00
|
|
|
#endif
|