Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>cur_define()</b> c_exam10 http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
CUR_DEFINE()                                                        C_EXAM10
   Redefines the mouse cursor to a custom design.

   Syntax
         CUR_DEFINE(nXHot,nYHot,nAScrnMask[16],nACursMask[16])

   Arguments
         nXHot           Sets the X coordinate of mouse cursor hot point.
         nYHot           Sets the Y coordinate of mouse cursor hot point.
         nAScrnMask[16]  Sets a 16 by 16 bit screen mask for the mousecursor.
         nACursMask[16]  Sets a 16 by 16 bit cursor mask for mouse cursor.

   Returns
         None

   Description
         Redefines mouse cursor number 9 to A custom design. The mouse cursor
         uses an X,Y coordinate for its hot point and two 16 by 16 bit
         array masks for its design.

         The hot point is the position on the cursor that is used to
         determine the cursor's exact location.

         The first array is a screen mask to define the background display
         for the cursor. Each of the array's 16 elements is set to a 16 bit
         integer, whose bit pattern is used to define the cursor's
         background. If an array element's bit is set to 0, the
         corresponding pixel is forced to black. A 1 in the bit will
         keep the underlying color of the background pixel, making the
         cursor pixel transparent.

         The second array is the cursor mask, used to define the shape of
         the cursor. Each of the array's 16 elements is set to a 16 bit
         integer, whose bit pattern is used to define the cursor's shape. An
         element's bit set to 0 will leave the pixel alone, while a 1 in the
         bit will turn the pixel to white.

   Examples

      Define a clock shaped cursor as a wait symbol:

         PRIVATE x_hot, y_hot, screen_mask[16], cursor_mask[16]
         x_hot = 7                     && Horz hot point
         y_hot = 7                     && Vert hot point
         screen_mask[01] = 63551       && 1111100000111111
         screen_mask[02] = 57359       && 1110000000001111
         screen_mask[03] = 49159       && 1100000000000111
         screen_mask[04] = 32771       && 1000000000000011
         screen_mask[05] = 32771       && 1000000000000011
         screen_mask[06] = 1           && 0000000000000001
         screen_mask[07] = 1           && 0000000000000001
         screen_mask[08] = 1           && 0000000000000001
         screen_mask[09] = 1           && 0000000000000001
         screen_mask[10] = 1           && 0000000000000001
         screen_mask[11] = 32771       && 1000000000000011
         screen_mask[12] = 32771       && 1000000000000011
         screen_mask[13] = 49159       && 1100000000000111
         screen_mask[14] = 57359       && 1110000000001111
         screen_mask[15] = 63551       && 1111100000111111
         screen_mask[16] = 65535       && 1111111111111111
         cursor_mask[01] = 1984        && 0000011111000000
         cursor_mask[02] = 7280        && 0001110001110000
         cursor_mask[03] = 13208       && 0011001110011000
         cursor_mask[04] = 28396       && 0110111011101100
         cursor_mask[05] = 24308       && 0101111011110100
         cursor_mask[06] = 57078       && 1101111011110110
         cursor_mask[07] = 48890       && 1011111011111010
         cursor_mask[08] = 48890       && 1011111011111010
         cursor_mask[09] = 49018       && 1011111101111010
         cursor_mask[10] = 57270       && 1101111110110110
         cursor_mask[11] = 24564       && 0101111111110100
         cursor_mask[12] = 28652       && 0110111111101100
         cursor_mask[13] = 13208       && 0011001110011000
         cursor_mask[14] = 7280        && 0001110001110000
         cursor_mask[15] = 1984        && 0000011111000000
         cursor_mask[16] = 0           && 0000000000000000
         CUR_DEFINE(x_hot,y_hot,screen_mask,cursor_mask)
         MS_CURSOR(9)                  && Set cursor to new design

See Also: MS_CUROFF() MS_CURON() MS_CURR_X() MS_CURR_Y() MS_CURSOR()

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