A bit of late night work designing the little iterators.
This commit is contained in:
parent
da0b941dfd
commit
8e470df554
11 changed files with 115 additions and 235 deletions
|
@ -131,12 +131,8 @@ void WorldBuilder::generate() {
|
|||
$map.$walls[hole.y][hole.x] = INV_SPACE;
|
||||
}
|
||||
|
||||
// invert the whole map to finish it
|
||||
for(size_t y = 0; y < $map.$height; ++y) {
|
||||
for(size_t x = 0; x < $map.$width; ++x) {
|
||||
// invert the map
|
||||
$map.$walls[y][x] = !$map.$walls[y][x];
|
||||
}
|
||||
for(matrix::each_cell it{$map.$walls}; it.next();) {
|
||||
$map.$walls[it.y][it.x] = !$map.$walls[it.y][it.x];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue