Project

General

Profile

Statistics
| Revision:

root / proj / include / proj_func.h @ 198

History | View | Annotate | Download (1.08 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 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 184 up20180655
void update_key_presses(void);
14
15 167 up20180655
/**
16
 * @brief Updates movement variables.
17
 */
18 192 up20180642
void update_movement(ent_t *p);
19 167 up20180655
20 171 up20180655
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 167 up20180655
/**
27
 * @brief
28
 * @param
29
 * @param
30
 * @param
31
 * @return Angle
32
 */
33 192 up20180642
double get_mouse_angle(ent_t *p);
34 167 up20180655
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 156 up20180655
#endif /* end of include guard: PROJ_FUNC_H_INCLUDED */