Return to previous page | Return to menu | Go to next page


Transparent color bit

In Sega Saturn, when the palette format is selected for scrolling color data, the 0th color data in one palette can be made transparent regardless of the color data originally registered.
The transparent color is a color specification that gives priority to drawing, such as scrolling behind the scroll specified by the transparent color, as if literally the dot part specified by the transparent color is transparent. Say. The figure below illustrates this.

Figure 8-26 Transparent setting image model

To use the transparent color function in SGL, use the library function “slScrTransparent”.
Scrolling after using the function “slScrTransparent” is drawn according to the function specification.

[void slScrTransparent (Uint16 trns_flag);]
Scroll If the palette format is selected for color data, select whether or not to transparently process the 0th color data in the palette data.
For the parameter, substitute the values ​​in the table below that correspond to the scroll surface on which transparency processing is performed.
Also, by connecting multiple parameters with the or operator “|”, you can specify transparency for multiple scroll planes.

Table 8-21 “slScrTransparent” parameter substitution value (trns_flag)

Note) The above values ​​are defined in “sl_def.h” included with the system.

The following sample program (Listing 8-8) implements the scroll transparent color processing by actually using the SGL library function “slScrTransparent”.

List 8-8 sample_8_10_2: Transparent code control

Flow 8-10 sample_8_10_2: Transparent code control


Return to previous page | Return to menu | Go to next page