|
|
|
@ -293,6 +293,10 @@ void Map::set_target(const Point &at, int value) { |
|
|
|
|
$input_map[at.y][at.x] = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Map::clear_light_target(const Point &at) { |
|
|
|
|
$input_map[at.y][at.x] = 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Map::clear_target(const Point &at) { |
|
|
|
|
$input_map[at.y][at.x] = 1; |
|
|
|
|
} |
|
|
|
@ -407,6 +411,7 @@ int Map::light_level(int level, size_t x, size_t y) { |
|
|
|
|
void Map::render_light(LightSource source, Point at) { |
|
|
|
|
Point min, max; |
|
|
|
|
light_box(source, at, min, max); |
|
|
|
|
clear_light_target(at); |
|
|
|
|
|
|
|
|
|
for(size_t x = min.x; x <= max.x; ++x) { |
|
|
|
|
for(size_t y = min.y; y <= max.y; ++y) { |
|
|
|
|