1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-04 13:29:35 +00:00

Always print the mouse cursor, even if coordinates haven't changed.

This makes sure that the cursor is always visible, even if the program
has written text to the screen (only valid for non-P/M mouse callbacks).
This commit is contained in:
Christian Groessler 2014-01-14 13:59:42 +01:00
parent 1fd7c2b318
commit 9e155eb096

View File

@ -118,12 +118,8 @@ INSTALL:
dex dex
bpl @L1 bpl @L1
; Be sure the mouse cursor is invisible and at the default location. We ; Be sure the mouse cursor is invisible and at the default location.
; need to do that here, because our mouse interrupt handler doesn't set the
; mouse position if it hasn't changed.
php
sei
jsr CHIDE jsr CHIDE
lda XPos lda XPos
ldx XPos+1 ldx XPos+1
@ -131,7 +127,6 @@ INSTALL:
lda YPos lda YPos
ldx YPos+1 ldx YPos+1
jsr CMOVEY jsr CMOVEY
plp
; Done, return zero (= MOUSE_ERR_OK) ; Done, return zero (= MOUSE_ERR_OK)
@ -352,15 +347,18 @@ IRQ:
@L02: lda PADDL0 @L02: lda PADDL0
cmp #228 cmp #228
beq @Dont beq @Cont ; CF set if equal
lda PADDL1 lda PADDL1
cmp #228 cmp #228 ; CF set if equal
bne @Do
@Dont: jmp @Done
@Do: lda visible @Cont: lda visible
beq @L03 beq @Go
php ; remember CF
jsr CHIDE jsr CHIDE
plp ; restore CF
@Go: bcc @L03
jmp @Show
@L03: ldx #0 @L03: ldx #0
stx XPos+1 stx XPos+1
@ -484,7 +482,7 @@ IRQ:
tya tya
jsr CMOVEY jsr CMOVEY
lda visible @Show: lda visible
beq @Done beq @Done
jsr CSHOW jsr CSHOW