Support placefile icon modulate with "scwx-ModulateIcon:" statement

This commit is contained in:
Dan Paulat 2023-09-09 16:00:19 -05:00
parent 1a9e87ba07
commit 2f41993d7b
3 changed files with 34 additions and 17 deletions

View file

@ -488,11 +488,11 @@ void PlacefileIcons::Impl::UpdateBuffers()
units::angle::degrees<float> angle = di->angle_;
const float a = angle.value();
// Fixed modulate color
const float mc0 = 1.0f;
const float mc1 = 1.0f;
const float mc2 = 1.0f;
const float mc3 = 1.0f;
// Modulate color
const float mc0 = di->modulate_[0] / 255.0f;
const float mc1 = di->modulate_[1] / 255.0f;
const float mc2 = di->modulate_[2] / 255.0f;
const float mc3 = di->modulate_[3] / 255.0f;
newIconBuffer_.insert(newIconBuffer_.end(),
{