Working line iterator, and mostly working flood iterator that should be good enough for world gen.

This commit is contained in:
Zed A. Shaw 2024-12-18 19:22:22 -05:00
parent 1295e9631d
commit d4b6c35120
5 changed files with 91 additions and 39 deletions

View file

@ -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);
}