;
;                 ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
;                 ²            COREMUS.DEF             ²Û
;                 ² mouse driver for CoreWar Plus V2.0 ²Û
;                 ²    (c) March 1991 Stefan Strack    ²Û
;                 ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²Û
;                  ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
;
;       Load this driver if you want mouse support for CORE.EXE.
;       This driver works with Logitech- and MS-compatible mice;
;       use the appropriate "begin" line below.
;
;       To compile this .DEF file into a loadable .MNU driver type:
;               NEWMENU COREMUS
;       Load the driver from the DOS command line or from a batch
;       file that starts CORE.EXE with:
;               MENU COREMUS
;       (MENU.COM and NEWMENU.COM are utilities that come with most mice)
;
;       What the driver does:
;
;       þ it lets you use the mouse to move the selection bar or to
;         scroll through the Core listing
;       þ it maps the <Enter> and <Esc> keys to the left and right
;         button, so you can select from and cancel menus without
;         touching the keyboard
;       þ clicking both buttons (or the middle button on a 3-button
;         mouse) lets you choose from a context-dependent menu
;       þ you can also adjust the mouse sensitivity after clicking
;         both buttons
;
;----------------------------------------------------------------------------

; use the "begin" line that's right for your mouse
        begin leftb,bothb,rightb,leftm,rightm,upm,downm  ; Logitech
;       begin leftb,rightb,bothb,leftm,rightm,upm,downm  ; Microsoft

; left button is <PgDn> in "Core listing", otherwise <Enter>
leftb:  match 25,2,,"",pgdn,enter

; both buttons (or middle button) display appropriate menu
bothb:  match 25,2,,"F1=Load",mfkeys,bothb2
bothb2: match 25,2,,"",mlist,mstd

; right button is <PgUp> in "Core listing", otherwise <Esc>
rightb: match 25,2,,"",pgup,escape

; ignore horizontal mouse movement in most cases
leftm:  match 25,2,,"F1=Load",nop,leftm2
leftm2: match 25,2,,"",nop,leftm3
leftm3: match 25,2,,"Work",nop,leftm4
leftm4: match 25,2,,"Prompt",nop,leftm5
leftm5: match 25,2,,"Press",nop,left
rightm: match 25,2,,"F1=Load",nop,rightm2
rightm2:match 25,2,,"",nop,rightm3
rightm3:match 25,2,,"Work",nop,rightm4
rightm4:match 25,2,,"Prompt",nop,rightm5
rightm5:match 25,2,,"Press",nop,right

; ignore vertical mouse movement if waiting for input or monitoring
; key-presses
upm:    match 25,2,,"Work",nop,upm2
upm2:   match 25,2,,"Prompt",nop,upm3
upm3:   match 25,2,,"Press",nop,up
downm:  match 25,2,,"Work",nop,downm2
downm2: match 25,2,,"Prompt",nop,downm3
downm3: match 25,2,,"Press",nop,down

; main menu
mfkeys: menu "CoreWar Mouse Driver", 5, 10, 120
        option "Left Button: <Enter>          ", enter
        option "Right Button: <Esc>           ", escape
        option "Load and install programs <F1>", f1
        option "Run in visual mode <F2>       ", f2
        option "Run in single-step mode <F3>  ", f3
        option "Run in watch mode <F4>        ", f4
        option "Reset Core and programs <F5>  ", f5
        option "Edit Core <F6>                ", f6
        option "Clear window <F7>             ", f7
        option "Horizontal Mouse Sensitivity  ", hms
        option "Vertical Mouse Sensitivity    ", vms
        mend

; menu available while in "Core listing"
mlist:  menu "CoreWar Mouse Driver", 5, 10, 120
        option "Left Button: <PgDn>         ", pgdn
        option "Right Button: <PgUp>        ", pgup
        option "Jump ahead 1000 <^PgDn>     ", cpgdn
        option "Jump back 1000 <^PgUp>      ", cpgup
        option "Goto address <Home>         ", home
        option "Edit current address <F1>   ", f1
        option "Find instruction <F2>       ", f2
        option "Search and Replace <F3>     ", f3
        option "Protect current address <F4>", f4
        option "Toggle breakpoint <F5>      ", f5
        option "Toggle watchpoint <F6>      ", f6
        option "<Esc>                       ", escape
        option "Horizontal Mouse Sensitivity", hms
        option "Vertical Mouse Sensitivity  ", vms
        mend

; menu available anywhere else
mstd:   menu "CoreWar Mouse Driver", 5, 10, 120
        option "Left Button: <Enter>        ", enter
        option "Right Button: <Esc>         ", escape
        option "Horizontal Mouse Sensitivity", hms
        option "Vertical Mouse Sensitivity  ", vms
        mend

hms:    menu   "Horizontal", 5, 10, 120
        option "1 °°(Fast)", hm1
        option "2 °°±±²²ÛÛ", hm2
        option "5 °°±±²²ÛÛ", hm5
        option "10°°±±²²ÛÛ", hm10
        option "20°°±±²²ÛÛ", hm20
        option "50°°±±²²ÛÛ", hm50
        option "100°±±²²ÛÛ", hm100
        option "200°±±²²ÛÛ", hm200
        option "S00°(Slow)", hm500
        mend

vms:    menu   "Vertical", 5, 10, 120
        option "1   (Fast)", vm1
        option "2°°°°°°°°°", vm2
        option "5°°°°°°°°°", vm5
        option "10±±±±±±±±", vm10
        option "20±±±±±±±±", vm20
        option "50²²²²²²²²", vm50
        option "100²²²²²²²", vm100
        option "200ÛÛÛÛÛÛÛ", vm200
        option "500Û(Slow)", vm500
        mend

hm1: assign ,,,,,,,1,
hm2: assign ,,,,,,,2,
hm5: assign ,,,,,,,5,
hm10: assign ,,,,,,,10,
hm20: assign ,,,,,,,20,
hm50: assign ,,,,,,,50,
hm100: assign ,,,,,,,100,
hm200: assign ,,,,,,,200,
hm500: assign ,,,,,,,500,
vm1: assign ,,,,,,,,1
vm2: assign ,,,,,,,,2
vm5: assign ,,,,,,,,5
vm10: assign ,,,,,,,,10
vm20: assign ,,,,,,,,20
vm50: assign ,,,,,,,,50
vm100: assign ,,,,,,,,100
vm200: assign ,,,,,,,,200
vm500: assign ,,,,,,,,500


enter:  type ENTER
escape: type ESC
left:   type 0,75
right:  type 0,77
up:     type 0,72
down:   type 0,80
pgup:   type 0,73
pgdn:   type 0,81
cpgup:  type 0,132
cpgdn:  type 0,118
home:   type 0,71
f1:     type 0,59
f2:     type 0,60
f3:     type 0,61
f4:     type 0,62
f5:     type 0,63
f6:     type 0,64
f7:     type 0,65
nop:    NOTHING
