fix line draw bug, that snaps the end to exry 8th pixel
This commit is contained in:
parent
2caf71d8fe
commit
54fa061342
5 changed files with 5 additions and 6 deletions
|
@ -77,7 +77,6 @@ end_selfmod:
|
||||||
STA byte_to_paint
|
STA byte_to_paint
|
||||||
;; X = X_end - X_pos
|
;; X = X_end - X_pos
|
||||||
LDX dx
|
LDX dx
|
||||||
LDY #$00
|
|
||||||
for_x:
|
for_x:
|
||||||
;; Paints A to address in |btp_mem_pos* + Y|
|
;; 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.
|
;; Y is pixel position in the chunk. Therefor it may be that Y = 0, 1, 2, 3, 4, ,5 ,6 ,7.
|
||||||
|
|
|
@ -51,7 +51,6 @@ selfmod:
|
||||||
end_selfmod:
|
end_selfmod:
|
||||||
JSR pixel_calc ;;only used first pixel. after this relative position is abused
|
JSR pixel_calc ;;only used first pixel. after this relative position is abused
|
||||||
STA byte_to_paint
|
STA byte_to_paint
|
||||||
LDY #$00
|
|
||||||
LDX dy
|
LDX dy
|
||||||
for_y:
|
for_y:
|
||||||
LDA byte_to_paint
|
LDA byte_to_paint
|
||||||
|
|
|
@ -68,11 +68,11 @@ clear_screen_:
|
||||||
long_line_test_b:
|
long_line_test_b:
|
||||||
LDA #$00
|
LDA #$00
|
||||||
STA X_pos_
|
STA X_pos_
|
||||||
LDA #$60
|
LDA #$00
|
||||||
STA Y_pos_
|
STA Y_pos_
|
||||||
LDA #$ff
|
LDA #$ff
|
||||||
STA X_end
|
STA X_end
|
||||||
LDA #$0
|
LDA #$60
|
||||||
STA Y_end
|
STA Y_end
|
||||||
@loop:
|
@loop:
|
||||||
LDA Y_pos_
|
LDA Y_pos_
|
||||||
|
|
|
@ -54,7 +54,8 @@ end_selfmod:
|
||||||
JSR pixel_calc ;;only used first pixel. after this relative position is abused
|
JSR pixel_calc ;;only used first pixel. after this relative position is abused
|
||||||
STA byte_to_paint
|
STA byte_to_paint
|
||||||
Sub_16 btp_mem_pos, btp_mem_pos + 1, #$01, #$00 ;; Y has always a offset of at least 1
|
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
|
LDX dx
|
||||||
for_x:
|
for_x:
|
||||||
LDA byte_to_paint
|
LDA byte_to_paint
|
||||||
|
|
|
@ -52,7 +52,7 @@ selfmod:
|
||||||
end_selfmod:
|
end_selfmod:
|
||||||
JSR pixel_calc ;;only used first pixel. after this relative position is abused
|
JSR pixel_calc ;;only used first pixel. after this relative position is abused
|
||||||
STA byte_to_paint
|
STA byte_to_paint
|
||||||
LDY #$00
|
;LDY #$00
|
||||||
LDX dy
|
LDX dy
|
||||||
for_y:
|
for_y:
|
||||||
LDA byte_to_paint
|
LDA byte_to_paint
|
||||||
|
|
Loading…
Add table
Reference in a new issue