home *** CD-ROM | disk | FTP | other *** search
/ PC Action 1998 January / PCA0198.ISO / MENUE / POSTFACH / 98012027.TXT < prev    next >
Text File  |  1997-11-25  |  3KB  |  168 lines

  1. 0
  2. Maus - Prozeduren/Functionen en masse!!!!!!
  3. Der Zauberleerling
  4. Listings
  5. Procedure InitMouse; Assembler;
  6.   ASM
  7.     Mov AX, $00
  8.     Int $33
  9.     Mov MouseState, AX
  10.     Mov MouseFire, BX
  11.   End;
  12.  
  13. Procedure ShowMouse; Assembler;
  14.   ASM
  15.     Mov AX, $01
  16.     Int $33
  17.   End;
  18.  
  19. Procedure HideMouse; Assembler;
  20.   ASM
  21.     Mov AX, $02
  22.     Int $33
  23.   End;
  24.  
  25. Procedure GetMousePosition (Var XPos, YPos : 
  26. Integer); Assembler;
  27.   ASM
  28.     Mov AX, $03
  29.     Int $33
  30.     Les BX, XPos
  31.     Mov ES:[BX], CX
  32.     Les BX, YPos
  33.     Mov ES:[BX], DX
  34.   End;
  35.  
  36. Function ButtonInput: Integer; Assembler;
  37.   ASM
  38.     Mov AX, $03
  39.     Int $33
  40.     Mov AX, BX
  41.   End;
  42.  
  43. Procedure SetMousePosition (XPos, YPos : 
  44. Integer); Assembler;
  45.   ASM
  46.     Mov AX, $04
  47.     Mov CX, XPos
  48.     Mov DX, YPos
  49.     Int $33
  50.   End;
  51.  
  52. Procedure SetMouseWindow (Left, Top, Right, 
  53. Bottom : Integer); Assembler;
  54.   ASM
  55.     Mov AX, $07
  56.     Mov CX, Left
  57.     Mov DX, Right
  58.     Int $33
  59.     Mov AX, $08
  60.     Mov CX, Top
  61.     Mov DX, Bottom
  62.     Int $33
  63.   End;
  64.  
  65. Procedure SetMouseMask (Var Mask : 
  66. MouseMaskRecord);
  67.   Var Reg : Registers;
  68.   Begin
  69.     Reg.AX := $09;
  70.     Reg.BX := Mask.HotSpotX;
  71.     Reg.CX := Mask.HotSpotY;
  72.     Reg.DX := Ofs (Mask);
  73.     Reg.ES := Seg (Mask);
  74.     Intr ($33, Reg)
  75.   End;
  76.  
  77. Procedure GetMouseMotion (Var Horizontal, 
  78. Vertical : Integer); Assembler;
  79.   ASM
  80.     Mov AX, $0B
  81.     Int $33
  82.     Les BX, Horizontal
  83.     Mov ES:[BX], CX
  84.     Les BX, Vertical
  85.     Mov ES:[BX], DX
  86.   End;
  87.  
  88. Procedure ConditionalHideMouse (Left, Top, 
  89. Right, Bottom : Integer); Assembler;
  90.   ASM
  91.     Mov AX, $10
  92.     Mov CX, Right
  93.     Mov DX, Bottom
  94.     Mov SI, Left
  95.     Mov DI, Top
  96.     Int $33
  97.   End;
  98.  
  99. Procedure SetMickeyPixelRatio (RatioX, RatioY : 
  100. Integer); Assembler;
  101.   ASM
  102.     Mov AX, $0F
  103.     Mov CX, RatioX
  104.     Mov DX, RatioY
  105.     Int $33
  106.   End;
  107.  
  108. Procedure SetDoubleSpeedThreshold (Threshold : 
  109. Integer); Assembler;
  110.   ASM
  111.     Mov AX, $13
  112.     Mov DX, Threshold
  113.     Int $33
  114.   End;
  115.  
  116. Function BothButtonsDown (Button: Byte): 
  117. Boolean;
  118.   Begin
  119.     BothButtonsDown := Button And $03 = $03
  120.   End;
  121.  
  122. Function BothButtonsUp (Button: Byte): Boolean;
  123.   Begin
  124.     BothButtonsUp := Button And $03 = $00
  125.   End;
  126.  
  127. Function LeftButtonPressed (OldButton, 
  128. NewButton: Byte): Boolean;
  129.   Begin
  130.     LeftButtonPressed := (OldButton And $01 = 
  131. $00) And (NewButton And $01 = $01)
  132.   End;
  133.  
  134. Function LeftButtonReleased (OldButton, 
  135. NewButton: Byte): Boolean;
  136.   Begin
  137.     LeftButtonReleased := (OldButton And $01 = 
  138. $01) And (NewButton And $01 = $00)
  139.   End;
  140.  
  141. Function RightButtonPressed (OldButton, 
  142. NewButton: Byte): Boolean;
  143.   Begin
  144.     RightButtonPressed := (OldButton And $02 = 
  145. $00) And (NewButton And $02 = $02)
  146.   End;
  147.  
  148. Function RightButtonReleased (OldButton, 
  149. NewButton: Byte): Boolean;
  150.   Begin
  151.     RightButtonReleased := (OldButton And $02 = 
  152. $02) And (NewButton And $02 = $00)
  153.   End;
  154.  
  155. Function BothButtonsPressed (OldButton, 
  156. NewButton: Byte): Boolean;
  157.   Begin
  158.     BothButtonsPressed := (OldButton And $03 = 
  159. $00) And (NewButton And $03 = $03)
  160.   End;
  161.  
  162. Function BothButtonsReleased (OldButton, 
  163. NewButton: Byte): Boolean;
  164.   Begin
  165.     BothButtonsReleased := (OldButton And $03 = 
  166. $03) And (NewButton And $03 = $00)
  167.   End;
  168.