HomeLine-AHide mouseUndraw sprite

6.16 Transform mouse

Name: »Transform mouse«
Line-A number: $A00B
Syntax: See 'Bindings for transform_mouse'
Description: This Line-A function sets the mouse pointer to a new shape. The required parameters are passed via the intin field. Alternatively, the AES structure MFORM may be used instead. For the call of the Line-A function, the intin in the Line-A parameter block is set to this structure, and after the call the old value is restored again.
typedef struct mfstr
{
   int16_t mf_xhot;
   int16_t mf_yhot;
   int16_t mf_nplanes;
   int16_t mf_fg;
   int16_t mf_bg;
   int16_t mf_mask[16];
   int16_t mf_data[16];
} MFORM;
Variable Meaning
   
mf_xhot X-coordinate of the hot-spot of the mouse form; for actions performed by the mouse it is important where this point is positioned in the mouse form
mf_yhot Y-coordinate of the hot-spot of the mouse form; for actions performed by the mouse it is important where this point is positioned in the mouse form
mf_nplanes Must be set to 1, as the mouse form may only have one colour plane
mf_fg The colour of the mask
mf_bg The colour of the data
mf_mask The 16 * 16 pixel-sized mask. Each 1 in the mask clears the background at that point (or sets the background colour). This way one can prevent 'shine-through' of the background at places where no mouse data are drawn, and to provide the mouse pointer with a 'frame' to offset it from the background.
mf_data The 16 * 16 pixel-sized mouse form. Each 1 in the mouse form creates one dot in the colour mf_bg on the screen.
Return value: The function does not return a result.
Availability: All TOS versions.
See also: Binding   Undraw sprite   Draw sprite

6.16.1 Bindings for transform_mouse

Pure-C: void transform_mouse( MFORM *mform );
Assembler:
movem.l   D0-D2/A0-A2,-(A7)  ; Save registers
move.l    pParamblk,A0       ; Pointer parameter block LINEA
move.l    (8,A0),-(A7)       ; Save old value of the intin field
move.l    mform,(8,A0)       ; Field with mouse form in LINEA.intin
dc.w      $A00B              ; Line-A opcode
move.l    pParamblk,A0       ; Pointer parameter block LINEA
move.l    (A7)+,(8,A0)       ; Restore old value of the intin field
movem.l   (A7)+,D0-D2/A0-A2  ; Restore registers

HomeLine-AHide mouseUndraw sprite