From 4e3fcec239fd3d600d4ebd3c5c732a25acfe1f3a Mon Sep 17 00:00:00 2001 From: cuz Date: Sat, 8 Sep 2001 15:51:05 +0000 Subject: [PATCH] Fixed an error in mouse_pos git-svn-id: svn://svn.cc65.org/cc65/trunk@873 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/c128/mouse.s | 2 +- libsrc/c64/mouse.s | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libsrc/c128/mouse.s b/libsrc/c128/mouse.s index bef73a6f2..64e8a8076 100644 --- a/libsrc/c128/mouse.s +++ b/libsrc/c128/mouse.s @@ -204,7 +204,7 @@ _mouse_pos: lda YPos iny sta (ptr1),y - lda YPos + lda YPos+1 iny sta (ptr1),y diff --git a/libsrc/c64/mouse.s b/libsrc/c64/mouse.s index aeed9b911..1f823e655 100644 --- a/libsrc/c64/mouse.s +++ b/libsrc/c64/mouse.s @@ -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 -- 2.39.5