-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathgame.h
More file actions
38 lines (33 loc) · 698 Bytes
/
Copy pathgame.h
File metadata and controls
38 lines (33 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef GAME_H
#define GAME_H
/*Game*/
#define ROTSPEED 0.1
#define STEP_SIZE 0.2
#define SHOOT_BUTTON 12
#define SHOOT_BUTTON2 9
#define RIGHT 0
#define LEFT 1
#define NBR_OF_ENEMIES 6
typedef struct Player {
double x;
double y;
double dirX;
double dirY;
double planeX;
double planeY;
uint8_t shooting;
uint8_t points;
} Player;
typedef struct enemy {
int16_t xPos;
int16_t yPos;
uint8_t visible;
uint8_t destroyed;
} Enemy;
void rotatePlayer(Player *player, uint8_t right);
void movePlayer(Player *player);
void disp_player_posistion (Player *player);
void drawSprite(Player *player, Enemy *enemy);
void playerShoot(Player *player);
void theEnd();
#endif /* GAME_H */