fix line draw bug, that snaps the end to exry 8th pixel

This commit is contained in:
hugova 2025-07-17 13:47:12 +02:00
parent 2caf71d8fe
commit 54fa061342
5 changed files with 5 additions and 6 deletions

View file

@ -77,7 +77,6 @@ end_selfmod:
STA byte_to_paint
;; X = X_end - X_pos
LDX dx
LDY #$00
for_x:
;; Paints A to address in |btp_mem_pos* + Y|
;; Y is pixel position in the chunk. Therefor it may be that Y = 0, 1, 2, 3, 4, ,5 ,6 ,7.

View file

@ -51,7 +51,6 @@ selfmod:
end_selfmod:
JSR pixel_calc ;;only used first pixel. after this relative position is abused
STA byte_to_paint
LDY #$00
LDX dy
for_y:
LDA byte_to_paint

View file

@ -68,11 +68,11 @@ clear_screen_:
long_line_test_b:
LDA #$00
STA X_pos_
LDA #$60
LDA #$00
STA Y_pos_
LDA #$ff
STA X_end
LDA #$0
LDA #$60
STA Y_end
@loop:
LDA Y_pos_

View file

@ -54,7 +54,8 @@ end_selfmod:
JSR pixel_calc ;;only used first pixel. after this relative position is abused
STA byte_to_paint
Sub_16 btp_mem_pos, btp_mem_pos + 1, #$01, #$00 ;; Y has always a offset of at least 1
LDY #$01
;LDY #$01
INY
LDX dx
for_x:
LDA byte_to_paint

View file

@ -52,7 +52,7 @@ selfmod:
end_selfmod:
JSR pixel_calc ;;only used first pixel. after this relative position is abused
STA byte_to_paint
LDY #$00
;LDY #$00
LDX dy
for_y:
LDA byte_to_paint