small cleanup in screen code
This commit is contained in:
1 parent
db2d887234
commit
d5d3a1c3b2
2 files changed
+13
-10
No files matched your search
@@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
screen_add_40_to_PNTR:
|
||||
|
||||
lda PNTR
|
||||
clc
|
||||
adc #40
|
||||
sta PNTR
|
||||
|
||||
rts
|
||||
@@ -14,13 +14,13 @@ screen_normalize_xy:
|
||||
lda #0
|
||||
sta TBLX
|
||||
|
||||
!: jsr add_40_to_screen_x
|
||||
!: jsr screen_add_40_to_PNTR
|
||||
|
||||
// Check if line is linked, if so, add 40 again
|
||||
ldy TBLX
|
||||
lda LDTBL,y
|
||||
bpl !+
|
||||
jsr add_40_to_screen_x
|
||||
jsr screen_add_40_to_PNTR
|
||||
!:
|
||||
|
||||
x_not_negative:
|
||||
@@ -29,7 +29,7 @@ x_not_negative:
|
||||
lda LDTBL,y
|
||||
bpl !+
|
||||
lda #79
|
||||
.byte $2C // BIT $nnnn, used to skip next instruction
|
||||
skip_2_bytes_trash_nvz
|
||||
!: lda #39
|
||||
cmp PNTR
|
||||
bcs x_not_too_big
|
||||
@@ -73,10 +73,3 @@ link_count_loop:
|
||||
sta TBLX
|
||||
y_ok:
|
||||
rts
|
||||
|
||||
add_40_to_screen_x:
|
||||
lda PNTR
|
||||
clc
|
||||
adc #40
|
||||
sta PNTR
|
||||
rts
|
||||
Reference in new issue
Block a user