Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FreshWin (c) Fresh Technologies - <b>setattr() video function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  SETATTR()                                                   Video Function
 Purpose..: Change screen attribute without disturbing text
-------------------------------------------------------------------------------
 Syntax...: SetAttr( [<nTRow>], [<nLCol>], [<nBRow>],
                     [<nRCol>], <uColor> ) --> NIL

 Arguments: [<nTRow>]  = top row  -  default is the whole screen.
            [<nLCol>]  = left column.
            [<nBRow>]  = bottom row.
            [<nRCol>]  = right column.
            <uColor>   = integer or usual character string
                         representing a color attribute.
                         The integer formula is ...nFore + ( nBack * 16 ).

 Returns..: NIL

 Remark...: It is a high speed function to change the colors
            of a specified screen rectangle without disturbing
            any text on the screen.

 Source...: SETATTR.C
-------------------------------------------------------------------------------
 Example..: The example will change all the screens colors
            of the quadrant ( 12, 40 ) to ( MaxRow(), MaxCol() )
            to bright white on top of magenta without changing
            or overwriting any text that may be on the screen.
            If you use the function without co-ordinates but
            with commas, the whole screen, the default, will
            be changed to the colors of the integer.
            Like all of these functions, it uses direct video
            writes for speed.

              SetAttr( 12, 40, MaxRow(), MaxCol(), 95 )
              SetAttr( 12, 40, MaxRow(), MaxCol(), "W+/RB" )

See Also: RevAttr() ClrTable() wSetAttr() wSetColor()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson