root / proj / include / proj_func.h @ 307
History | View | Annotate | Download (1.66 KB)
1 |
#ifndef PROJ_FUNC_H_INCLUDED
|
---|---|
2 |
#define PROJ_FUNC_H_INCLUDED
|
3 |
|
4 |
#include "ent.h" |
5 |
#include "font.h" |
6 |
|
7 |
#include <stdint.h> |
8 |
|
9 |
/**
|
10 |
* @brief Cleans up all memory, unsubscribes interrupts.
|
11 |
* @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
|
12 |
* @see {_ERRORS_H_::errors}
|
13 |
*/
|
14 |
int cleanup(void); |
15 |
|
16 |
typedef struct keys { |
17 |
uint8_t w_pressed : 1;
|
18 |
uint8_t a_pressed : 1;
|
19 |
uint8_t s_pressed : 1;
|
20 |
uint8_t d_pressed : 1;
|
21 |
uint8_t ctrl_pressed : 1;
|
22 |
uint8_t plus_pressed : 1;
|
23 |
uint8_t minus_pressed : 1;
|
24 |
uint8_t lb_pressed : 1;
|
25 |
} keys_t; |
26 |
|
27 |
void update_key_presses(void); |
28 |
|
29 |
/**
|
30 |
* @brief Updates movement variables.
|
31 |
*/
|
32 |
void update_movement(map_t *map, gunner_t *p, keys_t *keys, list_t *shooter_list);
|
33 |
|
34 |
void update_mouse(struct packet *p); |
35 |
|
36 |
keys_t* (get_key_presses)(void);
|
37 |
|
38 |
void (shoot_bullet)(const gunner_t *shooter, list_t *bullet_list, const basic_sprite_t *bsp_bullet); |
39 |
|
40 |
void (update_game_state)(const map_t *map, list_t *shooter_list, list_t *bullet_list); |
41 |
|
42 |
void (get_random_spawn)(const map_t *map, gunner_t *p, list_t *l); |
43 |
|
44 |
void update_scale(void); |
45 |
|
46 |
int32_t* get_mouse_X(void);
|
47 |
|
48 |
int32_t* get_mouse_Y(void);
|
49 |
|
50 |
/**
|
51 |
* @brief
|
52 |
* @param
|
53 |
* @param
|
54 |
* @param
|
55 |
* @return Angle
|
56 |
*/
|
57 |
double get_mouse_angle(gunner_t *p);
|
58 |
|
59 |
typedef struct timer { |
60 |
int time;
|
61 |
text_t *text; |
62 |
char *array;
|
63 |
} text_timer_t; |
64 |
|
65 |
text_timer_t* (timer_ctor)(const font_t *fnt);
|
66 |
|
67 |
void (timer_update)(text_timer_t *p);
|
68 |
|
69 |
void (timer_reset)(text_timer_t *p);
|
70 |
|
71 |
void (timer_dtor)(text_timer_t *p);
|
72 |
|
73 |
#endif /* end of include guard: PROJ_FUNC_H_INCLUDED */ |