[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
fx_AttrAll()

Gets/sets the RGB values of all attributes for all palettes.

Syntax:
     fx_AttrAll( [<cRGBString>] )   ->   cRGBString

Arguments:
     <cRGBString> is a 768-byte character string with each byte
     containing an ASCII value representing the RGB values for each
     attribute for all palettes.  The first forty-eight bytes represent
     the RED/GREEN/BLUE (RGB) values for attribute 0 for all palettes,
     the next 48 bytes represent the next attribute, and so forth.  In
     chart form:

                               Palette 0                   Palette 15
                            Red  Green  Blue            Red  Green  Blue
          Attribute  0  ->    1     2     3    .....     46    47    48
                ...     ->  ...   ...   ...    .....    ...   ...   ...
          Attribute 15  ->  721   722   723    .....    766   767   768
                Byte # -----------------------------------------

Returns:
     Returns the current RGB settings for all attributes in a 768-byte
     character string where each byte of the string is an ASCII value
     representing the RGB values of each attribute foe each of the 16
     palettes.  The string is in attribute order.  If the string is not
     exactly 768 bytes in length (when specified) or an error occurs, an
     empty string is returned.

Description:
     fx_AttrAll() is a function that allows you to get or set the RGB
     values of all attributes for all palettes.  When <cRGBString> is
     specified, it sets the new RGB values contained in the character
     string for <cBaseAttr>.  If the ASCII value is outside the range 0
     to 63, that particular RGB value is skipped.

Examples:
     // Prints the RGB values of all attributes in attribute order.
     cAttr := fx_AttrAll()
     ? "Attribute  Pal_0  Pal_1  Pal_2  ...  Pal_15"
     FOR nLoop = 1 to 768
        IF nLoop % 48 == 1
           ?? CHR(13) + CHR(10)
           ?? STR( nLoop, 3 ) + SPACE( 8 )
        ENDIF
        ?? STR( ASC( SUBSTR( cAttr, nLoop, 1 ) ), 2 ) + SPACE ( 5 )
     NEXT

     // Saves and restores the RGB values in attribute order.
     cSaveAttr := fx_AttrAll()
     ...     // (your code)
     fx_AttrAll( cSaveAttr )

See Also: fx_Attr() fx_PalAll() fx_Palette()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson