spClearAttribute (function)
spSetAttribute, spClearAttribute
Sets or clears the specified attributes.
Syntax
#include <sp.h> /* sp.h */
void spSetAttribute (Sprite *sp, u32 attributes)
void spClearAttribute (Sprite *sp, u32 attributes)
Arguments
- *sp
- Pointer to the sprite
Attributes
bit-wise OR of the sprite attributes to be changed.
Explanation
It modifies the sprite's current attributes.
Attributes control how the sprite is to be drawn.
- SP_TRANSPARENT
- Use Alpha to blend the sprite with the frame buffer.
- SP_CUTOUT
- Use AlphaCompare to ensure that pixels are not to drawn in alpha < blendcolor.alpha (automatically set to 1).
- This can also be used in COPYMODE to disable writing (disable interruption) 16-bit RGBA texels with the alpha bit off.
- SP_HIDDEN
- Don't draw this sprite.
- SP_Z
- Use Z-Buffering to determine sprite visibility.
- SP_SCALE
- Use sprite scaling factors.
- SP_FASTCOPY
- Use COPY mode to draw the sprite into the frame buffer.
- This runs the fastest, but it does not allow resizing or high quality transparency.
- SP_TEXSHIFT
- Shift texture exactly 1/2 texel in both s and t before drawing it.
- This creates a better anti-aliased edge along transparent texture boundaries when in CUTOUT mode.
- SP_FRACPOS
- Use frac_s and frac_t fields of the sprite structure to fine-position the texture into the drawn pixels.
- This allows the texture to be moved as little as 1/32 of a texel.
- SP_TEXSHUF
- Indicates that the specified tile textures have their odd lines pre-shuffled to work around a LoadTextureBlock problem.
- SP_EXTERN
- Force sprite drawing to use existing drawing modes instead of explicitly setting them. The application must be sure to get all of the details exactly correct. The next drawn sprite will assume nothing about the current drawing modes.
See Also
spDraw
Revision History
1999/04/30 Changed Format