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
|
;; Restores byte to paint
|
||||||
LDX #%00000001
|
LDX #%00000001
|
||||||
STX byte_to_paint
|
STX byte_to_paint
|
||||||
decrement_x_pos_end:
|
|
||||||
LDA t2
|
LDA t2
|
||||||
|
decrement_x_pos_end:
|
||||||
STA t1 ; t1 = t2
|
STA t1 ; t1 = t2
|
||||||
endif:
|
endif:
|
||||||
;; repeat if X > Y
|
;; repeat if X > Y
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
calculate:
|
calculate:
|
||||||
;; qab = 2*center - qcb
|
;; qab = 2*center - qcb
|
||||||
;; qca = 2*center - qaa
|
;; 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)
|
;; a = 2*center - b comes from that a = center -(b-center)
|
||||||
|
|
||||||
LDA btp_mem_pos_center_two
|
LDA btp_mem_pos_center_two
|
||||||
|
@ -44,6 +45,13 @@ calculate:
|
||||||
LDA btp_mem_pos_center_two + 1
|
LDA btp_mem_pos_center_two + 1
|
||||||
SBC btp_mem_pos_qda + 1
|
SBC btp_mem_pos_qda + 1
|
||||||
STA btp_mem_pos_qba + 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:
|
end_calculation:
|
||||||
|
|
||||||
;; Lets draw all half-quatrons of the circle. This draws only 8 pixels per iteration.
|
;; 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
|
TAX
|
||||||
|
|
||||||
;;Uses modifyed Y from above
|
;;Uses modifyed Y from above
|
||||||
|
|
||||||
ORA (btp_mem_pos_qdb), Y
|
ORA (btp_mem_pos_qdb), Y
|
||||||
STA (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
|
draw_qab:; xy swoped + mirroring
|
||||||
|
|
||||||
STY temp___
|
;STY temp_
|
||||||
LDA #$07
|
;LDA #$07
|
||||||
SBC temp___
|
;SBC temp_
|
||||||
TAY
|
;TAY
|
||||||
|
|
||||||
TXA
|
TXA
|
||||||
ORA (btp_mem_pos_qab), Y
|
ORA (btp_mem_pos_qab), Y
|
||||||
|
@ -129,14 +148,11 @@ draw_qca: ;;mirror technique
|
||||||
LDY temp
|
LDY temp
|
||||||
|
|
||||||
draw_qba: ;;mirror_technique
|
draw_qba: ;;mirror_technique
|
||||||
|
|
||||||
TXA
|
TXA
|
||||||
ORA (btp_mem_pos_qba), Y
|
ORA (btp_mem_pos_qba), Y
|
||||||
STA (btp_mem_pos_qba), Y
|
STA (btp_mem_pos_qba), Y
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
increment_y_pos:
|
increment_y_pos:
|
||||||
INC Y_rel ; y++
|
INC Y_rel ; y++
|
||||||
DEY
|
DEY
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
LDA #$50
|
LDA #$50
|
||||||
STA X_pos
|
STA X_pos
|
||||||
STA Y_pos
|
STA Y_pos
|
||||||
LDA #$35
|
LDA #$55
|
||||||
STA radius
|
STA radius
|
||||||
JSR circle
|
JSR circle
|
||||||
.endscope
|
.endscope
|
||||||
|
|
Loading…
Add table
Reference in a new issue