summaryrefslogtreecommitdiffstats
path: root/pacman-c++/constants.h
diff options
context:
space:
mode:
Diffstat (limited to 'pacman-c++/constants.h')
-rw-r--r--pacman-c++/constants.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/pacman-c++/constants.h b/pacman-c++/constants.h
index 33f235a..46791be 100644
--- a/pacman-c++/constants.h
+++ b/pacman-c++/constants.h
@@ -1,13 +1,17 @@
1#ifndef CONSTANTS_H 1#ifndef CONSTANTS_H
2#define CONSTANTS_H 2#define CONSTANTS_H
3 3
4#define SPRITE_MARGIN 2 4namespace Constants {
5#define SPRITE_WIDTH 16 5 const struct
6#define SPRITE_HEIGHT 16 6 {
7#define SPRITE_OFFSET 20 7 const unsigned int width, height;
8 8 } field_size = { 16, 16 },
9const unsigned int map_size[2] = { 20, 20 }; 9 map_size = { 20, 20 },
10const unsigned int field_size[2] = { 16, 16 }; 10 map_size_pixel = { field_size.width * map_size.width,
11 field_size.height * map_size.height};
12 const unsigned int sprite_margin = 2;
13 const unsigned int sprite_offset = 20;
14}
11 15
12namespace Color 16namespace Color
13{ 17{
@@ -19,13 +23,13 @@ namespace Color
19 green = (1 << 2), 23 green = (1 << 2),
20 }; 24 };
21} 25}
22 26
23// constants for data transmission to client 27// constants for data transmission to client
24namespace transmission 28namespace Transmission
25{ 29{
26 typedef unsigned int field_t; 30 typedef unsigned int field_t;
27 typedef unsigned int mask_t; 31 typedef unsigned int mask_t;
28 32
29 const field_t block = (1 << 3); 33 const field_t block = (1 << 3);
30 const field_t bonuspoint = (1 << 4); 34 const field_t bonuspoint = (1 << 4);
31 const field_t pacman = (1 << 5); 35 const field_t pacman = (1 << 5);