]> git.sur5r.net Git - cc65/commitdiff
New mouse show/hide routines
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 16 Mar 2004 19:27:48 +0000 (19:27 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 16 Mar 2004 19:27:48 +0000 (19:27 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2934 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/mouse/mouse_hide.s [new file with mode: 0644]
libsrc/mouse/mouse_show.s [new file with mode: 0644]

diff --git a/libsrc/mouse/mouse_hide.s b/libsrc/mouse/mouse_hide.s
new file mode 100644 (file)
index 0000000..f845db3
--- /dev/null
@@ -0,0 +1,23 @@
+;
+; Ullrich von Bassewitz, 2003-12-30
+;
+; void __fastcall__ mouse_hide (void);
+; /* Hide the mouse. The function manages a counter and may be called more than
+;  * once. For each call to mouse_hide there must be a call to mouse_show to make
+;  * the mouse visible again.
+;  */
+;
+
+        .include        "mouse-kernel.inc"
+
+.proc   _mouse_hide
+
+        lda            _mouse_hidden           ; Get the flag
+       bne     @L1                     ; Jump if already invisible
+               jsr     mouse_hide              ; Call the driver
+@L1:           inc     _mouse_hidden           ; Set the flag to invisible
+       rts
+
+.endproc
+
+
diff --git a/libsrc/mouse/mouse_show.s b/libsrc/mouse/mouse_show.s
new file mode 100644 (file)
index 0000000..5cb905a
--- /dev/null
@@ -0,0 +1,21 @@
+;
+; Ullrich von Bassewitz, 2003-12-30
+;
+; void __fastcall__ mouse_show (void);
+; /* Show the mouse. See mouse_hide for more information. */
+;
+
+        .include        "mouse-kernel.inc"
+
+.proc   _mouse_show
+
+        lda            _mouse_hidden           ; Mouse visible?
+       beq     @L1                     ; Jump if yes
+               dec     _mouse_hidden           ; Set the flag
+       bne     @L1                     ; Jump if still invisible
+        jmp     mouse_show              ; Call the driver
+@L1:   rts
+
+.endproc
+
+