Working line iterator, and mostly working flood iterator that should be good enough for world gen.
This commit is contained in:
parent
1295e9631d
commit
d4b6c35120
5 changed files with 91 additions and 39 deletions
|
@ -20,7 +20,7 @@ namespace lighting {
|
|||
|
||||
const int wall_light = source.strength + WALL_LIGHT_LEVEL;
|
||||
for(auto point : has_light) {
|
||||
for(matrix::in_box it{$lightmap, point.x, point.y, 1}; it.next();) {
|
||||
for(matrix::compass it{$lightmap, point.x, point.y}; it.next();) {
|
||||
if($paths.$paths[it.y][it.x] == WALL_PATH_LIMIT) {
|
||||
$lightmap[it.y][it.x] = light_level(wall_light, point.x, point.y);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue