GsInitFixBg16

Initializes high-speed BG work area

void GsInitFixBg16 (
        GsBG *bg,
        u_long *work
)

Arguments

bg Pointer to a background descriptor
work Pointer to the work area (primitive area)

Return Value

None.

Explanation

Initialises the work area used by the GsSortFixBg16() function.
The size of the work area varies with the screen resolution according to the following formula:
Work area size (in long units) = (((ScreenW/CellW+1)*(ScreenH/CellH+1+1)*6+4)*2+2)
where
    ScreenH = screen height in pixels (240/480)
    ScreenW = screen width in pixels (256/320/384/512/640)
    CellH = cell height (in pixels)
    CellW = cell width (in pixels)

GsInitFixBg16() should only be executed once. It does not need to be executed every frame.

See Also

GsSortFixBg16(), GsBG