Skip to content

Commit

Permalink
Change: Scalaria: acrylic light intensity.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bloodbat committed Feb 27, 2025
1 parent 33ad532 commit 562689e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/scalaria.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,18 @@ struct Scalaria : SanguineModule {

bool bHaveInternalOscillator = !scalariaParameters[0]->oscillatorShape == 0;

lights[LIGHT_INTERNAL_OSCILLATOR_OFF + 2].setBrightnessSmooth(bHaveInternalOscillator ? 0.f : 1.f, sampleTime);
lights[LIGHT_INTERNAL_OSCILLATOR_OFF + 2].setBrightnessSmooth(bHaveInternalOscillator ? 0.f : 0.75f, sampleTime);

lights[LIGHT_INTERNAL_OSCILLATOR_TRIANGLE + 1].setBrightnessSmooth(scalariaParameters[0]->oscillatorShape == 1 ? 1.f : 0.f, sampleTime);
lights[LIGHT_INTERNAL_OSCILLATOR_TRIANGLE + 1].setBrightnessSmooth(scalariaParameters[0]->oscillatorShape == 1 ? 0.75f : 0.f, sampleTime);

lights[LIGHT_INTERNAL_OSCILLATOR_SAW + 0].setBrightnessSmooth(scalariaParameters[0]->oscillatorShape == 2 ? 1.f : 0.f, sampleTime);
lights[LIGHT_INTERNAL_OSCILLATOR_SAW + 1].setBrightnessSmooth(scalariaParameters[0]->oscillatorShape == 2 ? 1.f : 0.f, sampleTime);
lights[LIGHT_INTERNAL_OSCILLATOR_SAW + 0].setBrightnessSmooth(scalariaParameters[0]->oscillatorShape == 2 ? 0.75f : 0.f, sampleTime);
lights[LIGHT_INTERNAL_OSCILLATOR_SAW + 1].setBrightnessSmooth(scalariaParameters[0]->oscillatorShape == 2 ? 0.75f : 0.f, sampleTime);

lights[LIGHT_INTERNAL_OSCILLATOR_SQUARE + 0].setBrightnessSmooth(scalariaParameters[0]->oscillatorShape == 3 ? 1.f : 0.f, sampleTime);
lights[LIGHT_INTERNAL_OSCILLATOR_SQUARE + 0].setBrightnessSmooth(scalariaParameters[0]->oscillatorShape == 3 ? 0.75f : 0.f, sampleTime);

lights[LIGHT_CHANNEL_1_FREQUENCY + 1].setBrightnessSmooth(bHaveInternalOscillator ? 1.f : 0.f, sampleTime);
lights[LIGHT_CHANNEL_1_FREQUENCY + 1].setBrightnessSmooth(bHaveInternalOscillator ? 0.75f : 0.f, sampleTime);

lights[LIGHT_CHANNEL_1_LEVEL + 1].setBrightnessSmooth(bHaveInternalOscillator ? 0.f : 1.f, sampleTime);
lights[LIGHT_CHANNEL_1_LEVEL + 1].setBrightnessSmooth(bHaveInternalOscillator ? 0.f : 0.75f, sampleTime);

for (int channel = 0; channel < PORT_MAX_CHANNELS; ++channel) {
const int currentLight = LIGHT_CHANNEL_1 + channel * 3;
Expand All @@ -212,7 +212,7 @@ struct Scalaria : SanguineModule {
int a = palette[zone_integral][rgbComponent];
int b = palette[zone_integral + 1][rgbComponent];
const float lightValue = static_cast<float>(a + ((b - a) * zone_fractional_i >> 8)) / 255.f;
lights[currentLight + rgbComponent].setBrightness(lightValue);
lights[currentLight + rgbComponent].setBrightness(rescale(lightValue, 0.f, 1.f, 0.f, 0.75f));
}
} else {
for (int rgbComponent = 0; rgbComponent < 3; ++rgbComponent) {
Expand Down

0 comments on commit 562689e

Please sign in to comment.