1 |
#ifndef FLATLINE_PACKET_H |
2 |
#define FLATLINE_PACKET_H |
3 |
#include "stdint.h" |
4 |
|
5 |
|
6 |
uint16_t FLpData_PartSize( uint8_t e); |
7 |
void FLsSendPlayerData(); |
8 |
//void FLcReadPlayerData( flatline_packet* Packet, int16_t Size ); |
9 |
|
10 |
typedef struct |
11 |
{ |
12 |
uint16_t ID; |
13 |
uint16_t Size; |
14 |
uint16_t UpdateFlags; |
15 |
uint8_t data[255]; |
16 |
} PlayerData; |
17 |
|
18 |
|
19 |
typedef struct { |
20 |
uint32_t Actions1; |
21 |
uint32_t Actions2; |
22 |
float MouseDeltaX; |
23 |
float MouseDeltaY; |
24 |
} PlayerInput; |
25 |
|
26 |
typedef struct { |
27 |
float Facing; |
28 |
float DesiredFacing; |
29 |
} PlayerFacing; |
30 |
|
31 |
typedef struct { |
32 |
uint16_t Health; |
33 |
uint16_t MaxHealth; |
34 |
} PlayerHealth; |
35 |
|
36 |
typedef struct { |
37 |
uint16_t Score; |
38 |
uint16_t Deaths; |
39 |
} PlayerScore; |
40 |
|
41 |
//Change this later to be misc info |
42 |
typedef struct { |
43 |
uint16_t Frame; |
44 |
uint16_t Ping; |
45 |
} PlayerFP; |
46 |
|
47 |
typedef struct { |
48 |
uint8_t Ammo; |
49 |
uint8_t Cells; |
50 |
uint8_t Hypo; |
51 |
uint8_t pad; |
52 |
uint16_t Invis; |
53 |
uint16_t Shield; |
54 |
} PlayerInventory; |
55 |
|
56 |
typedef struct { |
57 |
uint16_t throwing; |
58 |
uint16_t throwFrame; |
59 |
char throwName[32]; |
60 |
} PlayerThrowData; |
61 |
|
62 |
enum |
63 |
{ |
64 |
PFlag_None, |
65 |
PFlag_Input, |
66 |
PFlag_Facing, |
67 |
PFlag_Health, |
68 |
PFlag_Score, //TODO |
69 |
PFlag_FramePing, |
70 |
PFlag_Inventory, //TODO |
71 |
PFlag_Class, |
72 |
PFlag_Position, |
73 |
PFlag_Animation, |
74 |
PFlag_Throws, |
75 |
PFlag_Max, |
76 |
PFlag_AnimationWait,//Clients only! |
77 |
}; |
78 |
|
79 |
|
80 |
|
81 |
#endif |