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


Character pattern

A character pattern is a square pattern composed of 1x1 cells or 2x2 cells, and stores information in dot units (information such as the drawing color of dots). In SGL, the character pattern information cluster (data table) is stored in the VRAM as character pattern data for access and use.
At this stage, SGL specifies the number of character colors for each scroll plane.
When one character consists of 4 cells, the cell data used for the same character pattern must be stored continuously in the character pattern table.

Figure 8-9 Character pattern image

Table 8-7 Character color count

Note) In color RAM mode 0 and 2, 1024 colors will be 1024 colors.

Use the library functions “slCharNbg0 to 3” and “slCharRbg0” to determine the number of character colors and character size in SGL.

[void slCharNbg0 ~ 3 (Uint16 color_type, Uint16 char_size);]
[void slCharRbg0 (Uint16 color_type, Uint16 char_size);]
Specify the number of character colors and the character size for each scroll screen (for the scroll screen name at the end of slChar). For the parameter, substitute the #define value from the table below corresponding to the number of colors and character size.
However, the number of colors that can be used is limited depending on the scroll screen (see “Table 8-6 List of scroll functions”).

Table 8-8 “slCharNbg0-3”, “slCharRbg0” parameter substitution values ​​

Note 1) When color RAM mode is 0 or 2, 2048 colors will be 1024 colors.
Note 2) The values ​​in the above table are defined in “sl_def.h” included with the system.


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