]> git.sur5r.net Git - cc65/blob - libsrc/mouse/mouse_box.s
e94feda4c9b61bc532a59556cf6fed214f0e9587
[cc65] / libsrc / mouse / mouse_box.s
1 ;
2 ; Ullrich von Bassewitz, 2004-03-23
3 ;
4 ; void __fastcall__ mouse_box (int minx, int miny, int maxx, int maxy);
5 ; /* Set the bounding box for the mouse pointer movement. The mouse X and Y
6 ;  * coordinates will never go outside the given box.
7 ;  * NOTE: The function does *not* check if the mouse is currently inside the
8 ;  * given margins. The proper way to use this function therefore is:
9 ;  *
10 ;  *    - Hide the mouse
11 ;  *    - Set the bounding box
12 ;  *    - Place the mouse at the desired position
13 ;  *    - Show the mouse again.
14 ;  *
15 ;  * NOTE2: When setting the box to something that is larger than the actual
16 ;  * screen, the positioning of the mouse cursor can fail. If such margins
17 ;  * are really what you want, you have to use your own cursor routines.
18 ;  */
19 ;
20
21         .import         incsp6
22
23         .include        "mouse-kernel.inc"
24
25 .proc   _mouse_box
26
27         jsr     mouse_box               ; Call the driver
28         jmp     incsp6                  ; Cleanup the stack
29
30 .endproc
31
32
33