- if( command->default_auto->mode == MASK_MULTIPLY_ALPHA ) {
- glClearColor(0.0, 0.0, 0.0, 0.0);
- glColor4f((float)command->keyframe->value / 100,
- (float)command->keyframe->value / 100,
- (float)command->keyframe->value / 100,
- 1.0);
+ float value = command->keyframe->value / 100.f;
+ if( value >= 0 ) {
+ if( command->default_auto->mode == MASK_MULTIPLY_ALPHA ) {
+ glClearColor(0.f, 0.f, 0.f, 0.f);
+ glColor4f(value, value, value, 1.f);
+ }
+ else {
+ glClearColor(1.f, 1.f, 1.f, 1.f);
+ value = 1.f - value;
+ glColor4f(value, value, value, 1.f);
+ }