Re: Mouse cursor - Reply

new topic     » topic index » view thread      » older message » newer message

At 15:19 97-06-11 +1200, you wrote:
>---------------------- Information from the mail header -----------------------
>Sender:       Euphoria Programming for MS-DOS <EUPHORIA at
>MIAMIU.ACS.MUOHIO.EDU>
>Poster:       "BABOR, JIRI" <J.Babor at GNS.CRI.NZ>
>Subject:      Re: Mouse cursor - Reply
>-------------------------------------------------------------------------------
>
>I thought Jacques' explanation of mouse cursor masks was quite nice, but I
would
>like to add a warning, if you are planning to make your own pointer shapes: the
>byte pairs to the right of Jacques' diagrams have to be poked into the low
>memory each in REVERSE order (16 16-bit numbers per mask, Intel convention). I
>hope I am right. Jiri
>

Partly right Jiri,

  Right concerning the Intel convention but concerning the hot spot
coordinates they
are not poke in memory with the screen and cursor mask they are passed in
registers
when call is made to the mouse interrupt to change the cursor shape.

Here is sligthly modified Change_cursor() function written by  Viktor
Milankovics.
I changed it to accept a sequence instead of a cursor number.  It make it
more flexible as one can load cursor from a file instead of using only those
include in mousecur.e

atom Mouse_Cursor_Store
Mouse_Cursor_Store = allocate_low(64)

global procedure Change_cursor(sequence new_cursor)
-- new_cursor is a sequence build like those in mousecur.e
sequence reg_list

  reg_list=repeat(0,10)
  poke(Mouse_Cursor_Store, new_cursor[1])
  reg_list[REG_AX]=#0009  -- mouse function 9 change cursor
  reg_list[REG_BX]=new_cursor[2]  -- hot spot x coordinate
  reg_list[REG_CX]=new_cursor[3]  -- hot spot y coordinate
  reg_list[REG_ES]=floor(Mouse_Cursor_Store /16) -- address of cursor bitmap
segment
  reg_list[REG_DX]=remainder(Mouse_Cursor_Store,16) -- address offset
  reg_list=dos_interrupt(#33, reg_list) -- call mouse interrupt

end procedure


   Someone ask if it is possible to change the size of the cursor.  As far
as I know,
mouse driver always work with 16X16 bits cursors.  To have bigger cursor one
will have to hide the cursor used by the mouse driver and design it's own
procedure to control
it's own bigger cursor. (my reference is 6 years old maybe new drivers
accept bigger cursor) Ref. Microsoft Mouse programmer's reference, Sec ed.,
Microsoft press., 1991



Regards,

Jacques Deschenes
Baie-Comeau, Quebec
Canada
desja at quebectel.com

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu