initial LNMX calculation routine
This commit is contained in:
1 parent
98e7e633e8
commit
b498d4010b
5 files changed
+73
-35
No files matched your search
@@ -120,11 +120,12 @@ chrout_screen_literal:
|
||||
chrout_screen_calc_lptr_done:
|
||||
|
||||
jsr screen_calculate_PNT_USER
|
||||
jsr screen_fix_PNTR
|
||||
jsr screen_calculate_PNTR
|
||||
jsr screen_calculate_LNMX
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
chrout_screen_done:
|
||||
chrout_screen_done: // YYY review all the jumps here
|
||||
|
||||
// YYY should we update character under cursor here? or in cursor_show_if_enabled?
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
//
|
||||
// Sets LNMX to 39 or 79
|
||||
//
|
||||
|
||||
|
||||
// YYY value is improper shortly after linee growth!
|
||||
|
||||
|
||||
screen_calculate_LNMX: // YYY review all the code, mayybe some optimizations are possible using this value
|
||||
|
||||
ldy TBLX
|
||||
lda LDTBL, y
|
||||
bpl screen_calculate_lnmx_79 // this line is a continuation
|
||||
|
||||
cpy #24
|
||||
beq screen_calculate_lnmx_39 // this is the last line, which is not a continuation
|
||||
|
||||
iny
|
||||
lda LDTBL, y
|
||||
bpl screen_calculate_lnmx_79 // line is continued
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
screen_calculate_lnmx_39:
|
||||
|
||||
lda #39
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
screen_calculate_lnmx_79:
|
||||
|
||||
lda #79
|
||||
sta LNMX
|
||||
rts
|
||||
@@ -4,18 +4,18 @@
|
||||
//
|
||||
|
||||
|
||||
screen_fix_PNTR:
|
||||
screen_calculate_PNTR:
|
||||
|
||||
ldy TBLX
|
||||
lda LDTBL, y
|
||||
php
|
||||
jsr screen_get_clipped_PNTR
|
||||
plp
|
||||
bmi screen_fix_PNTR_0_39
|
||||
bmi screen_calculate_PNTR_0_39
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
screen_fix_PNTR_40_79:
|
||||
screen_calculate_PNTR_40_79:
|
||||
|
||||
tya
|
||||
clc
|
||||
@@ -24,7 +24,7 @@ screen_fix_PNTR_40_79:
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
screen_fix_PNTR_0_39:
|
||||
screen_calculate_PNTR_0_39:
|
||||
|
||||
sty PNTR
|
||||
rts
|
||||
Reference in new issue
Block a user