home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Action 1998 January
/
PCA0198.ISO
/
MENUE
/
POSTFACH
/
98012027.TXT
< prev
next >
Wrap
Text File
|
1997-11-25
|
3KB
|
168 lines
0
Maus - Prozeduren/Functionen en masse!!!!!!
Der Zauberleerling
Listings
Procedure InitMouse; Assembler;
ASM
Mov AX, $00
Int $33
Mov MouseState, AX
Mov MouseFire, BX
End;
Procedure ShowMouse; Assembler;
ASM
Mov AX, $01
Int $33
End;
Procedure HideMouse; Assembler;
ASM
Mov AX, $02
Int $33
End;
Procedure GetMousePosition (Var XPos, YPos :
Integer); Assembler;
ASM
Mov AX, $03
Int $33
Les BX, XPos
Mov ES:[BX], CX
Les BX, YPos
Mov ES:[BX], DX
End;
Function ButtonInput: Integer; Assembler;
ASM
Mov AX, $03
Int $33
Mov AX, BX
End;
Procedure SetMousePosition (XPos, YPos :
Integer); Assembler;
ASM
Mov AX, $04
Mov CX, XPos
Mov DX, YPos
Int $33
End;
Procedure SetMouseWindow (Left, Top, Right,
Bottom : Integer); Assembler;
ASM
Mov AX, $07
Mov CX, Left
Mov DX, Right
Int $33
Mov AX, $08
Mov CX, Top
Mov DX, Bottom
Int $33
End;
Procedure SetMouseMask (Var Mask :
MouseMaskRecord);
Var Reg : Registers;
Begin
Reg.AX := $09;
Reg.BX := Mask.HotSpotX;
Reg.CX := Mask.HotSpotY;
Reg.DX := Ofs (Mask);
Reg.ES := Seg (Mask);
Intr ($33, Reg)
End;
Procedure GetMouseMotion (Var Horizontal,
Vertical : Integer); Assembler;
ASM
Mov AX, $0B
Int $33
Les BX, Horizontal
Mov ES:[BX], CX
Les BX, Vertical
Mov ES:[BX], DX
End;
Procedure ConditionalHideMouse (Left, Top,
Right, Bottom : Integer); Assembler;
ASM
Mov AX, $10
Mov CX, Right
Mov DX, Bottom
Mov SI, Left
Mov DI, Top
Int $33
End;
Procedure SetMickeyPixelRatio (RatioX, RatioY :
Integer); Assembler;
ASM
Mov AX, $0F
Mov CX, RatioX
Mov DX, RatioY
Int $33
End;
Procedure SetDoubleSpeedThreshold (Threshold :
Integer); Assembler;
ASM
Mov AX, $13
Mov DX, Threshold
Int $33
End;
Function BothButtonsDown (Button: Byte):
Boolean;
Begin
BothButtonsDown := Button And $03 = $03
End;
Function BothButtonsUp (Button: Byte): Boolean;
Begin
BothButtonsUp := Button And $03 = $00
End;
Function LeftButtonPressed (OldButton,
NewButton: Byte): Boolean;
Begin
LeftButtonPressed := (OldButton And $01 =
$00) And (NewButton And $01 = $01)
End;
Function LeftButtonReleased (OldButton,
NewButton: Byte): Boolean;
Begin
LeftButtonReleased := (OldButton And $01 =
$01) And (NewButton And $01 = $00)
End;
Function RightButtonPressed (OldButton,
NewButton: Byte): Boolean;
Begin
RightButtonPressed := (OldButton And $02 =
$00) And (NewButton And $02 = $02)
End;
Function RightButtonReleased (OldButton,
NewButton: Byte): Boolean;
Begin
RightButtonReleased := (OldButton And $02 =
$02) And (NewButton And $02 = $00)
End;
Function BothButtonsPressed (OldButton,
NewButton: Byte): Boolean;
Begin
BothButtonsPressed := (OldButton And $03 =
$00) And (NewButton And $03 = $03)
End;
Function BothButtonsReleased (OldButton,
NewButton: Byte): Boolean;
Begin
BothButtonsReleased := (OldButton And $03 =
$03) And (NewButton And $03 = $00)
End;