Add last part to circle, still a bit buggy
This commit is contained in:
parent
6c962befa2
commit
7196992043
3 changed files with 28 additions and 11 deletions
|
@ -110,8 +110,9 @@ move_8px_left:
|
|||
;; Restores byte to paint
|
||||
LDX #%00000001
|
||||
STX byte_to_paint
|
||||
decrement_x_pos_end:
|
||||
|
||||
LDA t2
|
||||
decrement_x_pos_end:
|
||||
STA t1 ; t1 = t2
|
||||
endif:
|
||||
;; repeat if X > Y
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
calculate:
|
||||
;; qab = 2*center - qcb
|
||||
;; qca = 2*center - qaa
|
||||
;; qbq = 2*center - qda
|
||||
;; qba = 2*center - qda
|
||||
;; qbb = 2*center - qdb
|
||||
;; a = 2*center - b comes from that a = center -(b-center)
|
||||
|
||||
LDA btp_mem_pos_center_two
|
||||
|
@ -44,6 +45,13 @@ calculate:
|
|||
LDA btp_mem_pos_center_two + 1
|
||||
SBC btp_mem_pos_qda + 1
|
||||
STA btp_mem_pos_qba + 1
|
||||
|
||||
LDA btp_mem_pos_center_two
|
||||
SBC btp_mem_pos_qdb
|
||||
STA btp_mem_pos_qbb
|
||||
LDA btp_mem_pos_center_two + 1
|
||||
SBC btp_mem_pos_qdb + 1
|
||||
STA btp_mem_pos_qbb + 1
|
||||
end_calculation:
|
||||
|
||||
;; Lets draw all half-quatrons of the circle. This draws only 8 pixels per iteration.
|
||||
|
@ -87,16 +95,27 @@ draw_qdb:; xy swaped and y is inverted.
|
|||
TAX
|
||||
|
||||
;;Uses modifyed Y from above
|
||||
|
||||
ORA (btp_mem_pos_qdb), Y
|
||||
STA (btp_mem_pos_qdb), Y
|
||||
draw_qbb:;; the one not working
|
||||
STY temp_
|
||||
LDA #$07
|
||||
SBC temp_
|
||||
TAY
|
||||
|
||||
LDA inverse_factor_value, X;; (see END.s)
|
||||
|
||||
ORA (btp_mem_pos_qbb), Y
|
||||
STA (btp_mem_pos_qbb), Y
|
||||
|
||||
;LDY temp_
|
||||
|
||||
draw_qab:; xy swoped + mirroring
|
||||
|
||||
STY temp___
|
||||
LDA #$07
|
||||
SBC temp___
|
||||
TAY
|
||||
;STY temp_
|
||||
;LDA #$07
|
||||
;SBC temp_
|
||||
;TAY
|
||||
|
||||
TXA
|
||||
ORA (btp_mem_pos_qab), Y
|
||||
|
@ -129,14 +148,11 @@ draw_qca: ;;mirror technique
|
|||
LDY temp
|
||||
|
||||
draw_qba: ;;mirror_technique
|
||||
|
||||
TXA
|
||||
ORA (btp_mem_pos_qba), Y
|
||||
STA (btp_mem_pos_qba), Y
|
||||
|
||||
|
||||
|
||||
|
||||
increment_y_pos:
|
||||
INC Y_rel ; y++
|
||||
DEY
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
LDA #$50
|
||||
STA X_pos
|
||||
STA Y_pos
|
||||
LDA #$35
|
||||
LDA #$55
|
||||
STA radius
|
||||
JSR circle
|
||||
.endscope
|
||||
|
|
Loading…
Add table
Reference in a new issue