root / proj / include / proj_func.h @ 197
History | View | Annotate | Download (1.08 KB)
1 |
#ifndef PROJ_FUNC_H_INCLUDED
|
---|---|
2 |
#define PROJ_FUNC_H_INCLUDED
|
3 |
|
4 |
#include "ent.h" |
5 |
|
6 |
/**
|
7 |
* @brief Cleans up all memory, unsubscribes interrupts.
|
8 |
* @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
|
9 |
* @see {_ERRORS_H_::errors}
|
10 |
*/
|
11 |
int cleanup(void); |
12 |
|
13 |
void update_key_presses(void); |
14 |
|
15 |
/**
|
16 |
* @brief Updates movement variables.
|
17 |
*/
|
18 |
void update_movement(ent_t *p);
|
19 |
|
20 |
void update_mouse_position(struct packet *p); |
21 |
|
22 |
int32_t get_mouse_X(void);
|
23 |
|
24 |
int32_t get_mouse_Y(void);
|
25 |
|
26 |
/**
|
27 |
* @brief
|
28 |
* @param
|
29 |
* @param
|
30 |
* @param
|
31 |
* @return Angle
|
32 |
*/
|
33 |
double get_mouse_angle(ent_t *p);
|
34 |
|
35 |
/**
|
36 |
* @brief Get horizontal movement direction.
|
37 |
* @return Horizontal movement direction (-1 -> heading LEFT; 0 -> not moving horizontally; 1 -> heading RIGHT)
|
38 |
*/
|
39 |
int get_hor_movement(void); |
40 |
|
41 |
/**
|
42 |
* @brief Get vertical movement direction.
|
43 |
* @return Vertical movement direction (-1 -> heading UP; 0 -> not moving vertically; 1 -> heading DOWN)
|
44 |
*/
|
45 |
int get_ver_movement(void); |
46 |
|
47 |
#endif /* end of include guard: PROJ_FUNC_H_INCLUDED */ |