screen editor is now easier to extend

This commit is contained in:
FeralChild64 committed 2019-10-30 18:12:04 +01:00
1 parent c3383b9e8f
commit ec98861613
17 files changed
+280 -174

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
//
// Cursor keys handling within CHROUT
//
chrout_screen_CRSR_UP:
lda PNTR
sec
sbc #40
sta PNTR
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_DOWN:
lda PNTR
clc
adc #40
sta PNTR
// We need to advance the pointer manually, as normalising
// now will break things. The pointer update is required
// so that we can tell if we really are on the bottom phys
// screen line or not
jsr screen_scroll_up_if_on_last_line
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_LEFT:
lda TBLX
ora PNTR
beq !+ // recalculating pointer is not really necessary, but this is a very rare case nevertheless
dec PNTR
!:
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_RIGHT:
inc PNTR
jmp chrout_screen_calc_lptr_done