diff options
| author | manuel <manuel@mausz.at> | 2011-04-06 15:15:03 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-06 15:15:03 +0200 |
| commit | cbc0da21f393dc7bf2a11beaf1314c9dcaeb0999 (patch) | |
| tree | 534fee860ef8f0064425f98bbbb1febb7335f820 /pacman-c++/constants.h | |
| parent | 2b3210e6d19e32b7746e0e1cdf22035ce508ca8a (diff) | |
| parent | dce91729ff119ce6e00340f67297ca9e3e72110c (diff) | |
| download | foop-cbc0da21f393dc7bf2a11beaf1314c9dcaeb0999.tar.gz foop-cbc0da21f393dc7bf2a11beaf1314c9dcaeb0999.tar.bz2 foop-cbc0da21f393dc7bf2a11beaf1314c9dcaeb0999.zip | |
Merge branch 'master' of ssh://manuel.mausz.at/foop
Conflicts:
pacman-c++/actor.cpp
pacman-c++/constants.h
pacman-c++/mainwidget.cpp
Diffstat (limited to 'pacman-c++/constants.h')
| -rw-r--r-- | pacman-c++/constants.h | 24 |
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 | 4 | namespace 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 }, | |
| 9 | const unsigned int map_size[2] = { 20, 20 }; | 9 | map_size = { 20, 20 }, |
| 10 | const 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 | ||
| 12 | namespace Color | 16 | namespace 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 |
| 24 | namespace transmission | 28 | namespace 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); |
