do some code cleanup (still ugly) in circle drawing code
This commit is contained in:
parent
55ab7e367d
commit
fd587ea440
1 changed files with 18 additions and 15 deletions
|
@ -24,10 +24,10 @@ draw_qaa:
|
|||
;; something is wrong | well isue for another time
|
||||
draw_qcb:; xy swaped
|
||||
STY temp
|
||||
STX temp_
|
||||
LDA byte_to_paint
|
||||
STA temp__
|
||||
|
||||
;;modify Y_pos
|
||||
LDY #$00
|
||||
jmp goto_loop
|
||||
loop:
|
||||
|
@ -36,8 +36,11 @@ goto_loop:
|
|||
ASL byte_to_paint; lsr asl
|
||||
BCC loop
|
||||
STY temp___
|
||||
revert_byte_to_paint:
|
||||
LDA temp__
|
||||
STA byte_to_paint
|
||||
|
||||
|
||||
;;modify X_pos
|
||||
LDX temp
|
||||
LDA binary_factor, X; (see END.s)
|
||||
|
||||
|
@ -46,23 +49,25 @@ goto_loop:
|
|||
ORA (btp_mem_pos_swop), Y
|
||||
STA (btp_mem_pos_swop), Y;
|
||||
|
||||
;; this one is buggy
|
||||
draw_qdb:; xy swaped and y is inverted.
|
||||
|
||||
|
||||
;;modify X
|
||||
LDX temp
|
||||
LDA binary_factor, X; (see END.s)
|
||||
TAX
|
||||
LDA inverse_factor_value, X;; (see END.s)
|
||||
|
||||
;;Uses modifyed Y from above
|
||||
|
||||
ORA (btp_mem_pos_swop_inv_y), Y
|
||||
STA (btp_mem_pos_swop_inv_y), Y;
|
||||
|
||||
SEC
|
||||
LDA #$07
|
||||
SBC temp___
|
||||
TAY
|
||||
draw_qab:; xy swoped + mirroring
|
||||
LDY temp
|
||||
LDA temp__
|
||||
STA byte_to_paint
|
||||
|
||||
draw_qab:; xy swoped + mirroring
|
||||
LDA btp_mem_pos_center_two
|
||||
SBC btp_mem_pos_swop
|
||||
STA btp_mem_pos_inv
|
||||
|
@ -70,6 +75,11 @@ draw_qab:; xy swoped + mirroring
|
|||
SBC btp_mem_pos_swop + 1
|
||||
STA btp_mem_pos_inv + 1
|
||||
|
||||
SEC
|
||||
LDA #$07
|
||||
SBC temp___
|
||||
TAY
|
||||
|
||||
LDA #$07
|
||||
SBC temp
|
||||
TAX
|
||||
|
@ -80,14 +90,10 @@ draw_qab:; xy swoped + mirroring
|
|||
|
||||
|
||||
LDY temp
|
||||
; LDX temp_
|
||||
LDA temp__
|
||||
STA byte_to_paint
|
||||
draw_qda:; y is inverted
|
||||
;; invert Y, this is shared with qca
|
||||
STY temp
|
||||
LDA #$07
|
||||
;SEC
|
||||
SBC temp
|
||||
TAY
|
||||
|
||||
|
@ -128,9 +134,6 @@ draw_qba: ;;mirror_technique
|
|||
STA btp_mem_pos_inv + 1
|
||||
|
||||
TXA
|
||||
LDX temp_
|
||||
|
||||
; A = byte_to_paint_inv
|
||||
ORA (btp_mem_pos_inv), Y
|
||||
STA (btp_mem_pos_inv), Y
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue