root / proj / include / proj_func.h @ 180
History | View | Annotate | Download (1.04 KB)
1 | 156 | up20180655 | #ifndef PROJ_FUNC_H_INCLUDED
|
---|---|---|---|
2 | #define PROJ_FUNC_H_INCLUDED
|
||
3 | |||
4 | 167 | up20180655 | #include "sprite.h" |
5 | |||
6 | 156 | up20180655 | /**
|
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 | 167 | up20180655 | /**
|
14 | * @brief Updates movement variables.
|
||
15 | */
|
||
16 | void update_movement(void); |
||
17 | |||
18 | 171 | up20180655 | void update_mouse_position(struct packet *p); |
19 | |||
20 | int32_t get_mouse_X(void);
|
||
21 | |||
22 | int32_t get_mouse_Y(void);
|
||
23 | |||
24 | 167 | up20180655 | /**
|
25 | * @brief
|
||
26 | * @param
|
||
27 | * @param
|
||
28 | * @param
|
||
29 | * @return Angle
|
||
30 | */
|
||
31 | 171 | up20180655 | double get_mouse_angle(sprite_t *p);
|
32 | 167 | up20180655 | |
33 | /**
|
||
34 | * @brief Get horizontal movement direction.
|
||
35 | * @return Horizontal movement direction (-1 -> heading LEFT; 0 -> not moving horizontally; 1 -> heading RIGHT)
|
||
36 | */
|
||
37 | int get_hor_movement(void); |
||
38 | |||
39 | /**
|
||
40 | * @brief Get vertical movement direction.
|
||
41 | * @return Vertical movement direction (-1 -> heading UP; 0 -> not moving vertically; 1 -> heading DOWN)
|
||
42 | */
|
||
43 | int get_ver_movement(void); |
||
44 | |||
45 | 156 | up20180655 | #endif /* end of include guard: PROJ_FUNC_H_INCLUDED */ |