diff options
| author | manuel <manuel@mausz.at> | 2011-04-14 19:18:48 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-14 19:18:48 +0200 |
| commit | 197708500f3adaaa50bc1a5a94aec0db8ea621e5 (patch) | |
| tree | 9fd6c9de8aef4f62e34e2d28fd485eaf52a5c909 /pacman-c++/constants.h | |
| parent | 3fd1334e6d5339cad07ac4e4e23991a73d960a8e (diff) | |
| download | foop-197708500f3adaaa50bc1a5a94aec0db8ea621e5.tar.gz foop-197708500f3adaaa50bc1a5a94aec0db8ea621e5.tar.bz2 foop-197708500f3adaaa50bc1a5a94aec0db8ea621e5.zip | |
add dynamic player count for client. currently works only with 1 player as server doesn't send the initial map to the clients
Diffstat (limited to 'pacman-c++/constants.h')
| -rw-r--r-- | pacman-c++/constants.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/pacman-c++/constants.h b/pacman-c++/constants.h index 15eba86..7ce26ad 100644 --- a/pacman-c++/constants.h +++ b/pacman-c++/constants.h | |||
| @@ -34,16 +34,16 @@ namespace Color | |||
| 34 | { | 34 | { |
| 35 | enum Color | 35 | enum Color |
| 36 | { | 36 | { |
| 37 | none = 0, | 37 | none = 0, |
| 38 | red = (1 << 0), | 38 | red = (1 << 0), |
| 39 | blue = (1 << 1), | 39 | blue = (1 << 1), |
| 40 | green = (1 << 2), | 40 | green = (1 << 2), |
| 41 | max = (1 << 2), | 41 | yellow = (1 << 3) |
| 42 | }; | 42 | }; |
| 43 | 43 | ||
| 44 | /* colororder used in protocol and gui */ | 44 | /* colororder used in protocol and gui */ |
| 45 | const Color order[] = | 45 | const Color order[] = |
| 46 | { Color::red, Color::blue, Color::green, Color::none }; | 46 | { Color::red, Color::blue, Color::green, Color::yellow, Color::none }; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | // constants for data transmission to client | 49 | // constants for data transmission to client |
| @@ -53,17 +53,17 @@ namespace Transmission | |||
| 53 | typedef unsigned int mask_t; | 53 | typedef unsigned int mask_t; |
| 54 | 54 | ||
| 55 | const field_t none = 0; | 55 | const field_t none = 0; |
| 56 | const field_t block = (1 << 3); | 56 | const field_t block = (1 << 4); |
| 57 | const field_t point = (1 << 4); | 57 | const field_t point = (1 << 5); |
| 58 | const field_t bonuspoint = (1 << 5); | 58 | const field_t bonuspoint = (1 << 6); |
| 59 | const field_t pacman = (1 << 6); | 59 | const field_t pacman = (1 << 7); |
| 60 | const field_t empty = (1 << 7); // explicit empty for update | 60 | const field_t empty = (1 << 8); // explicit empty for update |
| 61 | 61 | ||
| 62 | const field_t direction_none = 0; | 62 | const field_t direction_none = 0; |
| 63 | const field_t direction_left = (1 << 8); | 63 | const field_t direction_left = (1 << 9); |
| 64 | const field_t direction_right = (1 << 9); | 64 | const field_t direction_right = (1 << 10); |
| 65 | const field_t direction_up = (1 << 10); | 65 | const field_t direction_up = (1 << 11); |
| 66 | const field_t direction_down = (1 << 11); | 66 | const field_t direction_down = (1 << 12); |
| 67 | 67 | ||
| 68 | const mask_t color_mask = Color::none | Color::red | Color::blue | Color::green; | 68 | const mask_t color_mask = Color::none | Color::red | Color::blue | Color::green; |
| 69 | const mask_t type_mask = block | bonuspoint; | 69 | const mask_t type_mask = block | bonuspoint; |
