From 197708500f3adaaa50bc1a5a94aec0db8ea621e5 Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 14 Apr 2011 19:18:48 +0200 Subject: add dynamic player count for client. currently works only with 1 player as server doesn't send the initial map to the clients --- pacman-c++/constants.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'pacman-c++/constants.h') 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 { enum Color { - none = 0, - red = (1 << 0), - blue = (1 << 1), - green = (1 << 2), - max = (1 << 2), + none = 0, + red = (1 << 0), + blue = (1 << 1), + green = (1 << 2), + yellow = (1 << 3) }; /* colororder used in protocol and gui */ const Color order[] = - { Color::red, Color::blue, Color::green, Color::none }; + { Color::red, Color::blue, Color::green, Color::yellow, Color::none }; } // constants for data transmission to client @@ -53,17 +53,17 @@ namespace Transmission typedef unsigned int mask_t; const field_t none = 0; - const field_t block = (1 << 3); - const field_t point = (1 << 4); - const field_t bonuspoint = (1 << 5); - const field_t pacman = (1 << 6); - const field_t empty = (1 << 7); // explicit empty for update + const field_t block = (1 << 4); + const field_t point = (1 << 5); + const field_t bonuspoint = (1 << 6); + const field_t pacman = (1 << 7); + const field_t empty = (1 << 8); // explicit empty for update const field_t direction_none = 0; - const field_t direction_left = (1 << 8); - const field_t direction_right = (1 << 9); - const field_t direction_up = (1 << 10); - const field_t direction_down = (1 << 11); + const field_t direction_left = (1 << 9); + const field_t direction_right = (1 << 10); + const field_t direction_up = (1 << 11); + const field_t direction_down = (1 << 12); const mask_t color_mask = Color::none | Color::red | Color::blue | Color::green; const mask_t type_mask = block | bonuspoint; -- cgit v1.2.3