diff options
| author | totycro <totycro@unknown-horizons.org> | 2011-04-09 19:20:13 +0200 |
|---|---|---|
| committer | totycro <totycro@unknown-horizons.org> | 2011-04-09 19:20:13 +0200 |
| commit | 4f88849caf6533d965849952c9ea153fd8c518c5 (patch) | |
| tree | 809d22c6a8fab16dc32eaf0c22fb65d57640f72f /pacman-c++/util.cpp | |
| parent | 4e3c33632e811d5b57c9b61ec7f219fa06856fd2 (diff) | |
| download | foop-4f88849caf6533d965849952c9ea153fd8c518c5.tar.gz foop-4f88849caf6533d965849952c9ea153fd8c518c5.tar.bz2 foop-4f88849caf6533d965849952c9ea153fd8c518c5.zip | |
first version of multiplayer
Diffstat (limited to 'pacman-c++/util.cpp')
| -rw-r--r-- | pacman-c++/util.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pacman-c++/util.cpp b/pacman-c++/util.cpp index 99a643e..6b9780b 100644 --- a/pacman-c++/util.cpp +++ b/pacman-c++/util.cpp | |||
| @@ -2,12 +2,16 @@ | |||
| 2 | 2 | ||
| 3 | namespace Util { | 3 | namespace Util { |
| 4 | 4 | ||
| 5 | Transmission::map_t createEmptyMap() { | 5 | Transmission::map_t createUninitialisedMap() { |
| 6 | Transmission::map_t map; | 6 | Transmission::map_t map; |
| 7 | map = new Transmission::field_t*[Constants::map_size.width]; | 7 | map = new Transmission::field_t*[Constants::map_size.width]; |
| 8 | for (unsigned int i = 0; i < Constants::map_size.width; ++i) | 8 | for (unsigned int i = 0; i < Constants::map_size.width; ++i) |
| 9 | map[i] = new Transmission::field_t[Constants::map_size.height]; | 9 | map[i] = new Transmission::field_t[Constants::map_size.height]; |
| 10 | return map; | ||
| 11 | } | ||
| 10 | 12 | ||
| 13 | Transmission::map_t createEmptyMap() { | ||
| 14 | Transmission::map_t map = createUninitialisedMap(); | ||
| 11 | for (unsigned int x = 0; x < Constants::map_size.width; ++x) | 15 | for (unsigned int x = 0; x < Constants::map_size.width; ++x) |
| 12 | { | 16 | { |
| 13 | for (unsigned int y = 0; y < Constants::map_size.height; ++y) | 17 | for (unsigned int y = 0; y < Constants::map_size.height; ++y) |
