PNTR handling fix, tweaked CTRL key scroll delay

This commit is contained in:
FeralChild64 committed 2020-01-05 18:32:54 +01:00
1 parent c80869b6ad
commit 9b70b8afb9
4 files changed
+20 -14

No files matched your search

+2 -8
View File
@@ -63,15 +63,9 @@ chrout_screen_literal:
tax // store screen code, we need .A for calculations
// First we need offset from PNT in .Y, we can take it from PNTR (0-79)
// First we need offset from PNT in .Y, we can take it from PNTR
lda PNTR
cmp #40
bcc !+
sec
sbc #40
!:
tay
jsr screen_get_clipped_PNTR
// Put the character on the screen
+2 -5
View File
@@ -28,10 +28,8 @@ cursor_blink:
// FALLTROUGH
cursor_draw:
jsr screen_calculate_PNT_USER // YYY try to make this call not needed
ldy PNTR
// XXX clip PNTR to 0-39
jsr screen_get_clipped_PNTR
lda (PNT),y
sta GDBLN
eor #$80
@@ -59,9 +57,8 @@ cursor_hide_if_visible:
cursor_undraw:
jsr screen_get_clipped_PNTR
lda GDBLN
ldy PNTR
// XXX clip PNTR to 0-39
sta (PNT),y
lda GDCOL
sta (USER),y
@@ -0,0 +1,15 @@
//
// Get PNTR value clipped to 0-39 range in .Y, can trash .A
//
screen_get_clipped_PNTR:
ldy PNTR
cpy #40
bcc !+
tya
sbc #40
tay
!:
rts
+1 -1
View File
@@ -28,7 +28,7 @@ screen_scroll_up:
and #KEY_FLAG_CTRL
beq screen_scroll_up_delay_done
ldy #$03
ldy #$09
!:
ldx #$FF
jsr wait_x_bars