diff --git a/lights.cpp b/lights.cpp index 1efa236..a2dd2cb 100644 --- a/lights.cpp +++ b/lights.cpp @@ -37,12 +37,12 @@ namespace lighting { } int LightRender::light_level(int strength, float distance, size_t x, size_t y) { - int new_level = distance <= 1.0f ? strength : strength / sqrt(distance); + int boosted = strength + BOOST; + int new_level = distance <= 1.0f ? boosted : boosted / sqrt(distance); int cur_level = $lightmap[y][x]; return cur_level < new_level ? new_level : cur_level; } - void LightRender::reset_light() { matrix::assign($lightmap, lighting::MIN); } diff --git a/lights.hpp b/lights.hpp index 3b5f3df..df7fb1f 100644 --- a/lights.hpp +++ b/lights.hpp @@ -10,8 +10,9 @@ namespace lighting { using components::LightSource; + // THESE ARE PERCENTAGES! const int MIN = 20; - const int MAX = 135; + const int BOOST = 10; class LightRender { public: