Notes on Color Effects


Effect Handles

An effect_handle is the number of a color effect returned by NewColorEffect(). The first effect will have a value of 2. The next will have a value of 3 - and so on until 31 when you can have no more effects. Once an effect has been "freed," it's number can be used again for another effect.

The first effect_handle value is reserved for level tinting. You can free this default effect with FreeColorEffect() or ModifyColorEffect() if you wish. Once the default effect has been freed, it's number can be used for a new effect - this allows you to have 31 custom effects.

White Effects

An RGB tint of '1 1 1' is white. If you added this with AddDynamicTint(), you would see a yellowish tint. But, add this tint with group 1 or 2 of NewColorEffect() and you will not notice any change (this does not apply to effects which add to the screen).

Cumulative Effects

Color effects are cumulative. In other words, color effects are combined when more than one effect is used at the same time.

Adding Color to the Screen

The maximum integer amount of color that can be added to the screen (with AddDynamicAdd() or NewColorEffect()) is around 290. The real limit may be higher, but because 290 is opaque, you're not going to notice anything above that.