SaturnRingLibrary 0.9
SGL wrapper
 
Loading...
Searching...
No Matches

◆ SpriteEffect

List of all available sprite effects.

Enumerator
Gouraud 

Gouraud shading.

Enables/disables gouraud shading for sprites.
Expected parameter is zero based index (uint16_t) to a gouraud shading table to enable shading, or negative or no value to disable it.

// Disable shading
// or
// Enable shading, use 16th entry in the table
static void SetEffect(const SpriteEffect effect, const int32_t data=-1)
Set sprite effect.
Definition srl_scene2d.hpp:467
@ Gouraud
Gouraud shading.
Definition srl_scene2d.hpp:203
ScreenDoors 

Screen doors effect.

Enables/disables screen door effect.
Expects boolean value as parameter.

HalfTransparency 

Half transparency effect.

Enables/disables half transparency effect.
Expects boolean value as parameter.

Clipping 

Sprite clipping effect.

Enables/disables clipping effect.
Expects SRL::Scene2D::ClippingEffect enum.
Use SRL::Scene2D::SetClippingRectangle() function to set the clipping rectangle.

// Disable flip
// or
// Enable flip
@ Clipping
Sprite clipping effect.
Definition srl_scene2d.hpp:245
@ NoClipping
Disable sprite clipping.
Definition srl_scene2d.hpp:157
@ ClipInside
Display sprite only on the outside of the clipping rectangle.
Definition srl_scene2d.hpp:165
Flip 

Flip sprite effect.

Allows to set sprite texture read direction (making sprite flipped)

// Disable flipping
// or
// Enable clipping
// Enable flip in both directions
@ Flip
Flip sprite effect.
Definition srl_scene2d.hpp:262
@ NoFlip
Do not flip sprite.
Definition srl_scene2d.hpp:174
@ HorizontalFlip
Flip sprite horizontally.
Definition srl_scene2d.hpp:178
@ VerticalFlip
Flip sprite vertically.
Definition srl_scene2d.hpp:182
OpacityBank 

VDP2 color calculation effect.

Set sprites Color Calculation Ratio to one of 8 stored opacities (Banks 0-7)

//Set sprite to use ratio stored in opacity bank 1:
@ OpacityBank
VDP2 color calculation effect.
Definition srl_scene2d.hpp:272
Note
Only applies to palette color modes