diff options
Diffstat (limited to 'source/base')
-rw-r--r-- | source/base/StarCellularLighting.cpp | 9 | ||||
-rw-r--r-- | source/base/StarCellularLighting.hpp | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/source/base/StarCellularLighting.cpp b/source/base/StarCellularLighting.cpp index 49c5676..e4fe8dd 100644 --- a/source/base/StarCellularLighting.cpp +++ b/source/base/StarCellularLighting.cpp @@ -2,8 +2,13 @@ namespace Star { -CellularLightingCalculator::CellularLightingCalculator(bool monochrome) { - setMonochrome(monochrome); +CellularLightingCalculator::CellularLightingCalculator(bool monochrome) + : m_monochrome(monochrome) +{ + if (monochrome) + m_lightArray.setRight(ScalarCellularLightArray()); + else + m_lightArray.setLeft(ColoredCellularLightArray()); } void CellularLightingCalculator::setMonochrome(bool monochrome) { diff --git a/source/base/StarCellularLighting.hpp b/source/base/StarCellularLighting.hpp index 30aa489..c82032c 100644 --- a/source/base/StarCellularLighting.hpp +++ b/source/base/StarCellularLighting.hpp @@ -17,7 +17,7 @@ namespace Star { // individually. class CellularLightingCalculator { public: - CellularLightingCalculator(bool monochrome = false); + explicit CellularLightingCalculator(bool monochrome = false); typedef ColoredCellularLightArray::Cell Cell; |