Project

General

Profile

Revision 320

multiplayer almost working, serial data not being transmitted?

View differences:

proj_structures.h
2 2
#define PROJ_STRUCTURES_H_INCLUDED
3 3

  
4 4
#include <stdint.h>
5
#include "ent.h"
5 6

  
6 7
typedef struct keys {
7 8
    uint8_t w_pressed       : 1;
......
18 19
    // host
19 20
    double  host_x;
20 21
    double  host_y;
22
    double  host_angle;
21 23
    double  host_health;
22 24
    double  host_current_health;
23 25

  
24 26
    // remote
25 27
    double  remote_x;
26 28
    double  remote_y;
29
    double  remote_angle;
27 30
    double  remote_health;
28 31
    double  remote_current_health;
29 32

  
......
38 41

  
39 42
typedef struct __attribute__((packed)) {
40 43
    keys_t  remote_keys_pressed;
41
    int32_t remote_mouse_x;
42
    int32_t remote_mouse_y;
43
    size_t  bullets_shot;
44
    double *bullets_x;
45
    double *bullets_y;
46
    double *bullets_angle;
44
    double  remote_angle;
47 45
} remote_info_t;
48 46

  
47
typedef struct __attribute__((packed)) {
48
    bool   new_bullet;
49
} bullet_info_t;
50

  
51
host_info_t* host_info_ctor(gunner_t *host, gunner_t *remote);
52

  
49 53
void host_info_dtor(host_info_t *p);
50 54

  
55
remote_info_t* remote_info_ctor();
56

  
51 57
void remote_info_dtor(remote_info_t *p);
52 58

  
59
bullet_info_t* bullet_info_ctor();
60

  
61
void bullet_info_dtor(bullet_info_t *p);
62

  
53 63
#endif /* end of include guard: PROJ_STRUCTURES_H_INCLUDED */

Also available in: Unified diff