]> git.sur5r.net Git - cc65/commitdiff
Disable the mouse sprite on exit
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 19 Sep 2001 09:53:04 +0000 (09:53 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 19 Sep 2001 09:53:04 +0000 (09:53 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@949 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/c128/mouse.s

index 50ebc54feeb9e92990b8d23b7b96207f575be42b..7f2dea918e3a500b3e8f0a0a10b9b61ee38c30e3 100644 (file)
@@ -14,7 +14,7 @@
 
        .import         _readjoy
                .import         popax, addysp1
-       .importzp       ptr1, sp, sreg
+       .importzp       ptr1, sp
 
        .include        "c128.inc"
 
@@ -107,8 +107,13 @@ AlreadyInitialized:
                sta     Initialized             ; Reset the initialized flag
        lda     OldInitStatus           ; Load the old BASIC int bit
        and     #$01                    ; Mask it
+       sei                             ; Disable interrupts
        ora     INIT_STATUS             ; Restore the old state
        sta     INIT_STATUS
+       lda     #$FE                    ; Clear bit for sprite #0
+       and     VIC_SPR_ENA
+       sta     VIC_SPR_ENA             ; Disable sprite
+       cli                             ; Enable interrupts
 @L1:   rts
 
 .endproc