Project

General

Profile

Revision 336

even more docs

View differences:

proj_structures.h
5 5
#include "ent.h"
6 6

  
7 7
typedef struct keys {
8
    /// @brief W is pressed when 1
8 9
    uint8_t w_pressed       : 1;
10
    /// @brief A is pressed when 1
9 11
    uint8_t a_pressed       : 1;
12
    /// @brief S is pressed when 1
10 13
    uint8_t s_pressed       : 1;
14
    /// @brief D is pressed when 1
11 15
    uint8_t d_pressed       : 1;
16
    /// @brief Ctrl is pressed when 1
12 17
    uint8_t ctrl_pressed    : 1;
18
    /// @brief Plus (+) is pressed when 1
13 19
    uint8_t plus_pressed    : 1;
20
    /// @brief Minus (-) is pressed when 1
14 21
    uint8_t minus_pressed   : 1;
22
    /// @brief Mouse left button is pressed when 1
15 23
    uint8_t lb_pressed      : 1;
16 24
} keys_t;
17 25

  
18 26
typedef struct {
19 27
    // host
28
    /// @brief Host player X-position
20 29
    int16_t    host_x;
30
    /// @brief Host player Y-postition
21 31
    int16_t    host_y;
32
    /// @brief Host player angle
22 33
    int16_t    host_angle;
34
    /// @brief Host player health
23 35
    int16_t    host_health;
36
    /// @brief Host player current health
24 37
    int16_t    host_current_health;
25 38

  
26 39
    // remote
40
    /// @brief Remote player X-position
27 41
    int16_t    remote_x;
42
    /// @brief Remote player Y-postition
28 43
    int16_t    remote_y;
44
    /// @brief Remote player angle
29 45
    int16_t    remote_angle;
46
    /// @brief Remote player health
30 47
    int16_t    remote_health;
48
    /// @brief Remote player current health
31 49
    int16_t    remote_current_health;
32 50

  
33 51
    // bullets
......
40 58
} host_info_t;
41 59

  
42 60
typedef struct {
61
    /// @brief Remote keys that are pressed
43 62
    keys_t  remote_keys_pressed;
63
    /// @brief Remote player angle
44 64
    double  remote_angle;
45 65
} remote_info_t;
46 66

  
47 67
typedef struct {
68
    /// @brief New bullet signal from remote
48 69
    bool   new_bullet;
49 70
} bullet_info_t;
50 71

  

Also available in: Unified diff