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

◆ SetOpacity()

template<class ScreenType, int16_t Id, uint16_t On>
void SRL::VDP2::ScrollScreen< ScreenType, Id, On >::SetOpacity ( Math::Fxp opacity = 1.0)
inlinestatic

Set the opacity of a scroll screen.

This Function takes the opacity specified as a fixed point value and converts it to one of the 32 color calculation ratios that a scroll screen can use (value is floored to the nearest ratio). Color Calculation is turned on if Opacity < 1.0, or off if Opacity>= 1.0. Color calculation is unchanged if value is negative.

Note
Color ratios only apply to highest priority pixels in the frame
When VDP2 ColorCalcMode is set to UseColorAddition, all scrolls with opacity < 1.0 will use color addition in place of their specified ratios.
Parameters
opacityFxp decimal value between 0.0 and 1.0 representing pixel opacity for the scroll screen (Default 1.0)