1. Re: Mouse cursor - Reply - Reply

At 15:11 97-06-12 +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 - Reply
>-------------------------------------------------------------------------------
>
>Jacques,
>
>I was not talking about hot spot coordinates, I said quite clearly "byte pairs
>to the right of Jacques' diagrams". Please, run the fragment below, you
will see
>what I meant. The mask sequence is directly copied from YOUR DIAGRAMS, and when
>you apply Viktor's routine, the new cursor's left and right hand halves are
>transposed. Jiri
>

  You are perfectly right Jiri, thanks for notifying my error.

  This error escaped me at first now it's quite obvious.

  I also noticed (now that I have tested it) that the cursor shape is not update
until the cursor is moved.  So I modified Change_cursor() so the new cursor
will be displayed immedialely.

global procedure Change_cursor(sequence new_cursor)
-- new_cursor is a sequence build like those in mousecur.e
sequence reg_list
  mouse_pointer(0)
  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 segment
  reg_list[REG_DX]=remainder(Mouse_Cursor_Store,16) -- address offset
  reg_list=dos_interrupt(#33, reg_list) -- call mouse interrupt
  mouse_pointer(1)
end procedure


Regards,

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

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu