spColor (function)

Sets the color of a sprite.

Syntax

#include <sp.h>     /* sp.h */
void spColor(Sprite *sp, u8 red, u8 green, u8 blue, u8 alpha)

Arguments

*sp
Pointer to the sprite

red
The red tint of sprite

green
The green tint of sprite

blue
The blue tint of sprite

alpha
The transparency of sprite

Description

For Textured sprites, this function changes the texture's color components.

A color of (255,255,255,255) maintains 100% of all the original texture's color.

The alpha component can be used to produce a ghost image or blend between two sprites.

Using alpha for blending requires that the SP_TRANSPARENT attribute be set.

See Also

spSetAttribute

Revision History

1999/04/30 Changed Format