1. Change cursor in EUPHORIA

Hello World!

I have made a new procedure within the mouse.e  file and I can
choose cursor image from 27 different cursors.

Try it if you want.

The cahnged mouse.e file:

--------------------------------------------------------------------------------

                --------------------
                -- Mouse Routines --
                --------------------
-- You need DOS mouse support for these routines.

global integer Mouse_Cursor_Store              -- M.V.

-- Mouse Event Numbers:

global constant MOVE = 1,       -- track every movement of the mouse
                LEFT_DOWN = 2,  -- the rest are button pressing/releasing
                LEFT_UP = 4,
                RIGHT_DOWN = 8,
                RIGHT_UP = 16,
                MIDDLE_DOWN = 32,
                MIDDLE_UP = 64

constant M_GET_MOUSE = 14,
         M_MOUSE_EVENTS = 15,
         M_MOUSE_POINTER = 24

global function get_mouse()
-- report mouse events,
-- returns -1 if no mouse event,
-- otherwise returns {event#, x-coord, y-coord}
    return machine_func(M_GET_MOUSE, 0)
end function

global procedure mouse_events(integer events)
-- select the mouse events to be reported by get_mouse()
-- e.g. mouse_events(LEFT_UP + LEFT_DOWN + RIGHT_DOWN)
    machine_proc(M_MOUSE_EVENTS, events)
end procedure

global procedure mouse_pointer(integer show_it)
-- show (1) or hide (0) the mouse pointer
    machine_proc(M_MOUSE_POINTER, show_it)
end procedure

-- --------------------------------------------------------
-- Cursor change procedure from M.V
--
-- Calling:
--
--        Change_cursor(8)   -- (Finger)
--
global procedure Change_cursor(integer CursorNo)

integer code_space1
sequence Cursors, reg_list

reg_list=repeat(0,10)

Cursors =

-- BBALL       -  1

   {{
        #FF,#FF,#FF,#FF,#FF,#FF,#FF,#FE,#37,#D9,#0F,#E0,#0F,#E0,#07,#C0,
        #0B,#A1,#07,#C0,#0F,#E0,#0F,#E0,#37,#D9,#FF,#FE,#FF,#FF,#FF,#FF,
        #00,#00,#00,#00,#00,#00,#00,#01,#08,#21,#D0,#17,#20,#08,#10,#10,
        #1C,#71,#10,#10,#20,#08,#D0,#17,#08,#21,#00,#01,#00,#00,#00,#00}, 7, 8,

-- CLOCK       -  2
    {
        #1F,#E0,#1F,#E0,#1F,#E0,#0F,#C0,#07,#80,#03,#00,#03,#00,#01,#00,
        #03,#00,#03,#00,#07,#80,#0F,#C0,#1F,#E0,#1F,#E0,#1F,#E0,#FF,#FF,
        #00,#00,#C0,#0F,#C0,#0F,#20,#10,#10,#21,#08,#41,#08,#41,#0C,#41,
        #08,#42,#08,#44,#10,#20,#20,#10,#C0,#0F,#C0,#0F,#00,#00,#00,#00}, 7, 7,

-- CRAYON      -  3
    {
        #FF,#0F,#FF,#07,#FF,#03,#FF,#01,#FF,#80,#7F,#C0,#3F,#E0,#1F,#F0,
        #0F,#F8,#07,#FC,#03,#FE,#01,#FF,#83,#FF,#C7,#FF,#EF,#FF,#FF,#FF,
        #00,#00,#00,#70,#00,#68,#00,#54,#00,#22,#00,#11,#80,#08,#40,#04,
        #20,#02,#10,#01,#88,#00,#54,#00,#28,#00,#10,#00,#00,#00,#00,#00}, 1, 1,

-- CROSHAIR    -  4
    {
        #7F,#FF,#3F,#FE,#3F,#FE,#3F,#FE,#3F,#FE,#7F,#FF,#E1,#C3,#C0,#81,
        #E1,#C3,#7F,#FF,#3F,#FE,#3F,#FE,#3F,#FE,#3F,#FE,#7F,#FF,#FF,#FF,
        #00,#00,#80,#00,#80,#00,#80,#00,#80,#00,#00,#00,#00,#00,#1E,#3C,
        #00,#00,#00,#00,#80,#00,#80,#00,#80,#00,#80,#00,#00,#00,#00,#00}, 8, 7,

-- CROSS       -  5
    {
        #FF,#FF,#1F,#F0,#1F,#F0,#1F,#F0,#1F,#F0,#01,#00,#01,#00,#01,#00,
        #01,#00,#01,#00,#01,#00,#01,#00,#1F,#F0,#1F,#F0,#1F,#F0,#1F,#F0,
        #00,#00,#E0,#0F,#20,#08,#A0,#0B,#A0,#0B,#BE,#FB,#82,#83,#FA,#BF,
        #FA,#BF,#FA,#BF,#82,#83,#BE,#FB,#A0,#0B,#A0,#0B,#20,#08,#E0,#0F}, 7, 8,

-- DISK        -  6
    {
        #03,#00,#03,#00,#03,#00,#03,#00,#03,#00,#03,#00,#03,#00,#03,#00,
        #03,#00,#03,#00,#03,#00,#03,#00,#03,#00,#03,#00,#03,#00,#03,#00,
        #00,#00,#F8,#7F,#08,#40,#08,#40,#08,#40,#08,#40,#08,#43,#88,#47,
        #08,#43,#08,#40,#08,#43,#08,#43,#08,#43,#08,#40,#F8,#7F,#00,#00}, 7, 14,

-- FACEIT      -  7
    {
        #FF,#FF,#FF,#FF,#7F,#FE,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,
        #FF,#FF,#FF,#FF,#FF,#FF,#FD,#BF,#FB,#DF,#FF,#FF,#FB,#DF,#FD,#BF,
        #00,#00,#7C,#3E,#80,#01,#3C,#3C,#4A,#4A,#3C,#3C,#80,#00,#80,#00,
        #80,#00,#40,#00,#20,#00,#C0,#01,#00,#00,#F8,#1F,#04,#20,#02,#40}, 8, 13,

-- FINGER      -  8
    {
        #FF,#FF,#FF,#F3,#FF,#E1,#FF,#E1,#FF,#E1,#FF,#E1,#07,#E0,#00,#E0,
        #00,#80,#00,#00,#00,#00,#00,#00,#00,#00,#00,#00,#01,#80,#03,#C0,
        #00,#00,#00,#0C,#00,#12,#00,#12,#00,#12,#B0,#13,#4E,#12,#49,#12,
        #49,#72,#49,#92,#01,#90,#01,#80,#01,#80,#01,#80,#02,#40,#FC,#3F}, 5, 0,

-- GUNSIGHT    -  9
    {
        #FF,#FF,#FF,#FF,#9F,#FC,#0F,#F8,#07,#F0,#03,#E0,#03,#E0,#07,#F0,
        #03,#E0,#03,#E0,#07,#F0,#0F,#F8,#9F,#FC,#FF,#FF,#FF,#FF,#FF,#FF,
        #80,#00,#80,#00,#E0,#03,#90,#04,#88,#08,#84,#10,#04,#10,#9F,#7C,
        #04,#10,#84,#10,#88,#08,#90,#04,#E0,#03,#80,#00,#80,#00,#00,#00}, 8, 7,

-- HAIRS       -  10
    {
        #FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,
        #FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,
        #00,#00,#00,#00,#E0,#0F,#10,#11,#08,#21,#04,#41,#04,#40,#7C,#7C,
        #04,#40,#04,#41,#08,#21,#10,#11,#E0,#0F,#00,#00,#00,#00,#00,#00}, 7, 7,

-- HOURGLASS   -  11
    {
        #01,#80,#01,#80,#01,#80,#01,#80,#03,#C0,#07,#E0,#0F,#F0,#1F,#F8,
        #1F,#F8,#0F,#F0,#07,#E0,#03,#C0,#01,#80,#01,#80,#01,#80,#01,#80,
        #00,#00,#FC,#3F,#FC,#3F,#04,#20,#08,#10,#10,#08,#20,#04,#40,#02,
        #40,#02,#20,#04,#D0,#09,#E8,#17,#F4,#2F,#FC,#3F,#FC,#3F,#00,#00}, 8, 8,

-- HUMAN       -  12
    {
        #FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,
        #FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,
        #00,#00,#80,#03,#C0,#07,#C0,#07,#80,#03,#00,#01,#C0,#07,#40,#05,
        #20,#09,#18,#31,#00,#01,#80,#02,#60,#04,#18,#04,#00,#0C,#00,#00}, 7, 6,

-- IBAR        -  13
    {
        #FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,
        #FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,
        #00,#00,#70,#1C,#80,#02,#00,#01,#00,#01,#00,#01,#00,#01,#00,#01,
        #00,#01,#00,#01,#00,#01,#C0,#07,#00,#01,#80,#02,#70,#1C,#00,#00}, 7, 11,

-- LASSO       -  14
    {
        #FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,
        #FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,
        #00,#00,#00,#1F,#80,#20,#40,#40,#40,#40,#20,#80,#20,#80,#C0,#80,
        #40,#41,#40,#41,#80,#20,#40,#1F,#20,#00,#10,#00,#08,#00,#07,#00}, 5, 6,

-- LLPOINT     -  15
    {
        #03,#FC,#01,#F0,#00,#E0,#00,#C0,#00,#80,#01,#80,#01,#C0,#01,#C0,
        #21,#E0,#61,#F0,#F0,#F0,#F9,#E1,#FF,#C3,#FF,#87,#FF,#0F,#FF,#9F,
        #FC,#03,#02,#0C,#01,#10,#01,#24,#01,#49,#42,#52,#82,#24,#22,#29,
        #52,#12,#92,#0C,#09,#09,#06,#12,#00,#24,#00,#48,#00,#90,#00,#60}, 0, 15,

-- LRPOINT     -  16
    {
        #3F,#C0,#0F,#80,#07,#00,#03,#00,#01,#00,#01,#80,#03,#80,#03,#80,
        #07,#84,#0F,#86,#0F,#0F,#87,#9F,#C3,#FF,#E1,#FF,#F0,#FF,#F9,#FF,
        #C0,#3F,#30,#40,#08,#80,#24,#80,#92,#80,#4A,#42,#24,#41,#94,#44,
        #48,#4A,#30,#49,#90,#90,#48,#60,#24,#00,#12,#00,#09,#00,#06,#00}, 15,15,

-- MOVE        -  17
    {
        #FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,
        #FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,
        #00,#00,#00,#01,#80,#03,#40,#05,#00,#01,#10,#11,#08,#20,#7C,#7C,
        #08,#20,#10,#11,#00,#01,#40,#05,#80,#03,#00,#01,#00,#00,#00,#00}, 7, 7,

-- PAINTCAN    -  18
    {
        #FF,#FE,#7F,#FC,#3F,#F8,#1F,#F0,#07,#E0,#03,#C0,#01,#80,#01,#00,
        #01,#80,#01,#C0,#21,#E0,#61,#F0,#E1,#F8,#E1,#FD,#F1,#FF,#FB,#FF,
        #00,#00,#00,#01,#80,#02,#40,#04,#20,#08,#18,#10,#FC,#3F,#FC,#7F,
        #EC,#3F,#CC,#1F,#8C,#0F,#0C,#07,#0C,#02,#0C,#00,#04,#00,#00,#00}, 13,14,

-- PENCIL      -  19
    {
        #3F,#F8,#1F,#F0,#1F,#F0,#1F,#F0,#1F,#F0,#1F,#F0,#1F,#F0,#1F,#F0,
        #1F,#F0,#1F,#F0,#1F,#F0,#1F,#F0,#1F,#F0,#3F,#F8,#7F,#FC,#FF,#FE,
        #00,#00,#C0,#07,#40,#04,#40,#04,#C0,#07,#40,#04,#40,#04,#40,#04,
        #40,#04,#40,#04,#40,#04,#C0,#07,#C0,#07,#80,#03,#00,#01,#00,#00}, 7, 14,

-- PENCIL2     -  20
    {
        #FF,#EF,#FF,#C7,#FF,#83,#FF,#01,#FF,#80,#7F,#C0,#3F,#E0,#1F,#F0,
        #0F,#F8,#07,#FC,#03,#FE,#01,#FF,#80,#FF,#C0,#FF,#E0,#FF,#F0,#FF,
        #00,#00,#00,#10,#00,#38,#00,#7C,#00,#3A,#00,#11,#80,#08,#40,#04,
        #20,#02,#10,#01,#88,#00,#44,#00,#22,#00,#16,#00,#0E,#00,#00,#00}, 14,14,

-- SELECT      -  21
    {
        #FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,
        #FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,#FF,
        #00,#00,#00,#00,#7C,#7D,#04,#41,#04,#41,#04,#41,#04,#41,#00,#00,
        #7C,#7C,#00,#00,#04,#41,#04,#41,#04,#41,#04,#41,#7C,#7D,#00,#00}, 7, 8,

-- SPERM       -  22
    {
        #3F,#FE,#1F,#FC,#0F,#F8,#07,#F0,#07,#F0,#07,#F0,#07,#F0,#0F,#F8,
        #1F,#FC,#3F,#FE,#FF,#FF,#FF,#FF,#BF,#FE,#C3,#F1,#FD,#CF,#FE,#BF,
        #C0,#01,#20,#02,#10,#04,#48,#09,#08,#08,#08,#08,#08,#08,#10,#04,
        #20,#02,#40,#01,#80,#00,#80,#00,#40,#00,#3C,#00,#02,#00,#01,#00}, 8, 0,

-- SPERM2      -  23
    {
        #FF,#FF,#FF,#7F,#FF,#BF,#FF,#BF,#87,#DF,#03,#DF,#01,#DE,#00,#EC,
        #00,#FC,#00,#EC,#01,#DE,#03,#DF,#87,#DF,#FF,#DF,#FF,#BF,#FF,#7F,
        #00,#00,#00,#00,#00,#00,#00,#00,#78,#00,#84,#00,#02,#01,#09,#02,
        #01,#0C,#09,#12,#02,#21,#84,#20,#78,#20,#00,#20,#00,#40,#00,#80}, 15,8,

-- SWORD       -  24
    {
        #FF,#FE,#7F,#FC,#3F,#F8,#2F,#F8,#07,#F0,#0F,#E0,#1F,#C0,#3F,#E8,
        #3F,#F8,#3F,#F8,#3F,#F8,#3F,#F8,#3F,#F8,#3F,#F8,#7F,#FC,#FF,#FE,
        #00,#00,#00,#01,#80,#03,#80,#03,#90,#03,#E0,#0F,#80,#13,#80,#03,
        #80,#03,#80,#03,#80,#03,#80,#03,#80,#03,#80,#03,#00,#01,#00,#00}, 7, 14,

-- ULPOINT     -  25
    {
        #FF,#9F,#FF,#0F,#FF,#87,#FF,#C3,#F9,#E1,#F0,#F0,#61,#F0,#21,#E0,
        #01,#C0,#01,#C0,#01,#80,#00,#80,#00,#C0,#00,#E0,#01,#F0,#03,#FC,
        #00,#60,#00,#90,#00,#48,#00,#24,#06,#12,#09,#09,#92,#0C,#52,#12,
        #22,#29,#82,#24,#42,#52,#01,#49,#01,#24,#01,#10,#02,#0C,#FC,#03}, 0, 0,

-- URPOINT     -  26
    {
        #F9,#FF,#F0,#FF,#E1,#FF,#C3,#FF,#87,#9F,#0F,#0F,#0F,#86,#07,#84,
        #03,#80,#03,#80,#01,#80,#01,#00,#03,#00,#07,#00,#0F,#80,#3F,#C0,
        #06,#00,#09,#00,#12,#00,#24,#00,#48,#60,#90,#90,#30,#49,#48,#4A,
        #94,#44,#24,#41,#4A,#42,#92,#80,#24,#80,#08,#80,#30,#40,#C0,#3F}, 15,0,

-- ARROW       -  27
    {
        #FF,#3F,#FF,#1F,#FF,#0F,#FF,#07,#FF,#03,#FF,#01,#FF,#00,#7F,#00,
        #3F,#00,#1F,#00,#0F,#00,#07,#00,#47,#18,#7F,#38,#3F,#FC,#7F,#FE,
        #00,#00,#00,#40,#00,#60,#00,#70,#00,#78,#00,#7C,#00,#7E,#00,#7F,
        #80,#7F,#C0,#7F,#E0,#7F,#30,#67,#00,#43,#00,#03,#80,#01,#00,#00}, 1, 0}

  Mouse_Cursor_Store=allocate_low(64)
  poke(Mouse_Cursor_Store, Cursors[(CursorNo-1)*3+1])
  reg_list[REG_AX]=#0009
  reg_list[REG_BX]=Cursors[(CursorNo-1)*3+2]
  reg_list[REG_CX]=Cursors[(CursorNo-1)*3+3]
  reg_list[REG_ES]=floor(Mouse_Cursor_Store /16)
  reg_list[REG_DX]=remainder(Mouse_Cursor_Store,16)
  reg_list=dos_interrupt(#33, reg_list)

-- Note:
--      If you want to change the cursor several times in your program
--      you have to "free_low" the Mouse_Cursor_Store before you call
--      this routine again.

end procedure

--------------------------------------------------------------------------------

Good luck!                                    Viktor.

new topic     » topic index » view message » categorize

2. Re: Change cursor in EUPHORIA

At 03:19 PM 9/2/96 +0200, you wrote:
>---------------------- Information from the mail header -----------------------
>Sender:       Euphoria Programming for MS-DOS <EUPHORIA at
>MIAMIU.ACS.MUOHIO.EDU>
>Poster:       =?iso-8859-1?Q?Mil=E1nkovics?= Viktor <viktor at SYRIUS.ELTE.HU>
>Subject:      Change cursor in EUPHORIA
>-------------------------------------------------------------------------------
>
>Hello World!
>
>I have made a new procedure within the mouse.e  file and I can
>choose cursor image from 27 different cursors.
>
>Try it if you want.
>
-
>
>Good luck!                                    Viktor.
>
>Thanks Viktorm,
Monty King      Springfield, Oregon, USA

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu