root / proj / include / proj_func.h @ 246
History | View | Annotate | Download (1.38 KB)
1 | 156 | up20180655 | #ifndef PROJ_FUNC_H_INCLUDED
|
---|---|---|---|
2 | #define PROJ_FUNC_H_INCLUDED
|
||
3 | |||
4 | 192 | up20180642 | #include "ent.h" |
5 | 167 | up20180655 | |
6 | 200 | up20180655 | #include <stdint.h> |
7 | |||
8 | 156 | up20180655 | /**
|
9 | * @brief Cleans up all memory, unsubscribes interrupts.
|
||
10 | * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
|
||
11 | * @see {_ERRORS_H_::errors}
|
||
12 | */
|
||
13 | int cleanup(void); |
||
14 | |||
15 | 200 | up20180655 | typedef struct keys { |
16 | uint8_t w_pressed : 1;
|
||
17 | uint8_t a_pressed : 1;
|
||
18 | uint8_t s_pressed : 1;
|
||
19 | uint8_t d_pressed : 1;
|
||
20 | uint8_t ctrl_pressed : 1;
|
||
21 | uint8_t plus_pressed : 1;
|
||
22 | uint8_t minus_pressed : 1;
|
||
23 | 231 | up20180655 | uint8_t lb_pressed : 1;
|
24 | 200 | up20180655 | } keys_t; |
25 | |||
26 | 240 | up20180655 | void update_key_presses(void); |
27 | |||
28 | /**
|
||
29 | * @brief Updates movement variables.
|
||
30 | */
|
||
31 | 246 | up20180655 | void update_movement(const map_t *map, gunner_t *p, keys_t *keys, list_t *shooter_list); |
32 | 240 | up20180655 | |
33 | 231 | up20180655 | void update_mouse(struct packet *p); |
34 | 171 | up20180655 | |
35 | 231 | up20180655 | keys_t* (get_key_presses)(void);
|
36 | |||
37 | 237 | up20180642 | void (shoot_bullet)(const gunner_t *shooter, list_t *bullet_list, const basic_sprite_t *bsp_bullet); |
38 | 231 | up20180655 | |
39 | 236 | up20180642 | void (update_game_state)(const map_t *map, list_t *shooter_list, list_t *bullet_list); |
40 | 231 | up20180655 | |
41 | 246 | up20180655 | void (get_random_spawn)(const map_t *map, gunner_t *p); |
42 | |||
43 | 200 | up20180655 | void update_scale(void); |
44 | |||
45 | 171 | up20180655 | int32_t get_mouse_X(void);
|
46 | |||
47 | int32_t get_mouse_Y(void);
|
||
48 | |||
49 | 167 | up20180655 | /**
|
50 | * @brief
|
||
51 | * @param
|
||
52 | * @param
|
||
53 | * @param
|
||
54 | * @return Angle
|
||
55 | */
|
||
56 | 201 | up20180642 | double get_mouse_angle(gunner_t *p);
|
57 | 167 | up20180655 | |
58 | 156 | up20180655 | #endif /* end of include guard: PROJ_FUNC_H_INCLUDED */ |