]> git.sur5r.net Git - cc65/commitdiff
Fixed an error in mouse_pos
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 8 Sep 2001 15:51:05 +0000 (15:51 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 8 Sep 2001 15:51:05 +0000 (15:51 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@873 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/c128/mouse.s
libsrc/c64/mouse.s

index bef73a6f2b05d24cb6090a11fa67e6b036c1cbf6..64e8a8076753c2744ba420a09f282a5050c2b829 100644 (file)
@@ -204,7 +204,7 @@ _mouse_pos:
        lda     YPos
        iny
        sta     (ptr1),y
-       lda     YPos
+       lda     YPos+1
        iny
        sta     (ptr1),y
 
index aeed9b911360190e37d0d2346757bd4a818f3e30..1f823e655f402dde9eabe9eec3ba5dfcd68d5d85 100644 (file)
@@ -115,7 +115,7 @@ _mouse_hide:
        sei                             ; Disable interrupts
        and     VIC_SPR_ENA
        sta     VIC_SPR_ENA             ; Disable sprite
-       cli                             ; Enable interrupts
+       cli                             ; Enable interrupts
 
 @L1:   inc     Invisible               ; Set the flag to invisible
        rts
@@ -158,7 +158,7 @@ _mouse_box:
        sta     YMax
        stx     YMax+1                  ; maxy
 
-       lda     (sp),y
+       lda     (sp),y
        sta     XMax
        iny
        lda     (sp),y
@@ -201,10 +201,10 @@ _mouse_pos:
        lda     XPos+1
        iny
        sta     (ptr1),y
-       lda     YPos
-       iny
-       sta     (ptr1),y
-       lda     YPos
+       lda     YPos
+       iny
+       sta     (ptr1),y
+       lda     YPos+1
        iny
        sta     (ptr1),y
 
@@ -244,7 +244,7 @@ _mouse_move:
        jsr     popsreg                 ; Get X
        sei                             ; Disable interrupts
 
-       sta     YPos
+       sta     YPos
        stx     YPos+1
        lda     sreg
        ldx     sreg+1