Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Nanforum Toolkit v2.1 Reference Guide - <b>ft_mdefcrs()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FT_MDEFCRS()
 Define the mouse cursor
------------------------------------------------------------------------------

 Syntax

     FT_MDEFCRS( <nCrsType>, <nScrMask>, <nCrsMask> ) -> NIL

 Arguments

    <nCrsType> is the cursor type. A value of 0 indicates the software cursor
               (the default) and a value of 1 indicates the hardware cursor.

    <nScrMask> is the screen mask for the software cursor or the first scan
               line of the hardware cursor. See the description for more
               information.

    <nCrsMask> is the cursor mask for the software cursor of the last scan
               line of the hardware cursor. See the description for more
               information.

 Returns

    NIL

 Description

    In text mode the mouse cursor can either be a software generated or
    the actual hardware cursor. This routine allows one choose between them.
    The software cursor is the default and its effect on the character it
    covers is determined by the screen mask and the cursor mask. Both of
    these masks are 16 bit values (which in Clipper are passed as standard
    numerical values). The 16 bit masks are arranged in a manner identical
    to the way information is stored for each character cell on the screen.
    The low order 8 bits represent the actual character displayed while the
    high order bits represent the display atributes such as blinking,
    intensity and forground and background colors. The mask is represented in
    the diagram below:

    Bit:     |15    |14      12|11       |10       8|7       0|
    Function:|blink |background|intensity|foreground|character|

    Blinking and high intensity are on when the bit is 1. The background and
    foreground indicate which colors are used for each. The software mouse
    cursor uses these two values by taking the mask from the screen cell it
    is on and performing a logical AND on each bit with the screen mask
    value. The result is then logically XOR'ed with the cursor mask value.
    Thus to keep the character the same but invert the foreground and
    background colors the following values would be used:

    Bit:     |15    |14      12|11       |10       8|7       0|
    Function:|blink |background|intensity|foreground|character|
    screen:  |  0   |   111    |    0    |   111    |11111111 | =30719
    cursor:  |  0   |   111    |    0    |   111    |00000000 | =30464

    The hardware cursor is the text cursor provided by the video board. One
    specifies the range of scan lines which are on using <nScrMask> and
    <nCrsMask>. The range of values is dependant upon the type of monitor.
    The first scan line is 0.

 Source: MOUSE1.PRG

 Author: Leo Letendre

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