-
Notifications
You must be signed in to change notification settings - Fork 0
/
shared_enums.h
159 lines (143 loc) · 2.16 KB
/
shared_enums.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#pragma once
#ifndef _SHARED_ENUMS_
#define _SHARED_ENUMS_
enum class UNIT_COLOUR : char {
DEFAULT_COLOUR = -1,
RED = 1,
GREEN,
BLUE,
YELLOW,
BROWN,
ORANGE
};
enum class HERO_CLASS : char {
UNDEFINED_CLASS = -1,
MAGE = 1,
WARRIOR,
MONK,
ROGUE
};
enum class UNIT_TYPE : char {
UNDEFINED_TYPE = -1,
ROBOT = 1,
//HERO,
HUMAN,
DWARF,
GNOME,
HALFLING,
ELF,
OGRE,
ORC,
GOBLIN
};
enum class MAP_SYMBOL : char {
BLANK = -1,
WALL = -2,
CLOSED_DOOR = -3,
OPENED_DOOR = -4,
UNIT = -5
};
enum class LIGHT_MAP_SYMBOL : char {
UNVISIBLE = -1,
ALREADY_SEEN,
VISIBLE
};
enum class MAP_OBJECT_INDEX : char {
BlankObject = 127,
OgreHead = 126,
Wall_X = 125,
Wall_Z = 124
};
enum class REQUEST_TYPE : char {
DENIED = -128,
MOVE = 1,
CREATE_UNIT,
REQ_SHOOT,
ANS_SHOOT,
OPEN_DOOR,
CLOSE_DOOR,
OPEN_CHEST,
CLOSE_CHEST,
CREATE_UNION,
END_MESSAGE,
BLOCK,
UNBLOCK,
SET,
TURN_END,
TURN_BEGIN,
NEW_PLAYER,
GAME_STARTED,
GAME_ENDED,
LOGIN,
PING,
LOAD_MAP,
CREATE_LOBBY,
DROP_FROM_LOBBY,
WANT_TO_DISCONNECT,
LOBBY_NEW_PLAYER,
REQ_NAME,
PLAYER_NAME,
JOIN_LOBBY,
LOBBY_LIST,
PLAYER_LIST,
PLAYERS_IN_LOBBY,
DROP_PLAYER,
DROP_LOBBY,
CHANGE_MAP,
CHOOSE_MERK,
CHANGE_WEAPON,
MERK_LIST,
CREATE_MERK,
DELETE_MERK,
EXIT_GAME,
PLAYER_IN_GAME
};
enum class SERVER_ANSWER : char {
LOGIN_OK = 1,
LOGIN_FAILED,
LOGIN_ALREADY
};
enum class PING_ANSWER : char {
PING_HIGH = -1
};
enum class PROPERTY : char {
HP = 1,
AP,
WEAPON,
ARMOR
};
enum class WEAPON : char {
UNDEFINED_WEAPON = -1,
WEAPON_NONE = 1,
SWORD,
BOW,
CROSSBOW
};
enum class WEAPON_TYPE : char {
UNDEFINED_WEAPON_TYPE = -1,
MELEE = 1,
RIFFLE
};
enum class ARMOR : char {
UNDEFINED_ARMOR = -1,
ARMOR_NONE = 1,
CHAIN_MAIL,
CLOAK,
};
enum class ARMOR_TYPE : char {
UNDEFINED_ARMOR_TYPE = -1,
SKIN = 1,
LIGHT,
HEAVY
};
const float HUMAN_DEFAULT_SCALE = 1.3f;
const float HUMAN_DEFAULT_SPEED = 85;
const short DEFAULT_HP = 25;
const char DEFAULT_AP = 15;
const char DEFAULT_VIEW_RANGE = 8;
//const int HERO_SIZE = 13 + sizeof(short);
//const int UNIT_SIZE = 11 + sizeof(short);
const int MAX_NICK_LENGTH = 16;
const int MAX_MERK_COUNT = 5;
const int MAX_PLAYERS_IN_TEAM = 4;
#endif