mirror of
https://github.com/irmen/prog8.git
synced 2024-09-08 10:55:08 +00:00
optimized disc()
This commit is contained in:
parent
64c89f1c8f
commit
c3b82f2cfa
@ -114,29 +114,10 @@ graphics {
|
|||||||
word decisionOver2 = (1 as word)-radius
|
word decisionOver2 = (1 as word)-radius
|
||||||
|
|
||||||
while radius>=yy {
|
while radius>=yy {
|
||||||
ubyte ycenter_plus_yy = ycenter + yy
|
horizontal_line(xcenter-radius, ycenter+yy, radius*2+1)
|
||||||
ubyte ycenter_min_yy = ycenter - yy
|
horizontal_line(xcenter-radius, ycenter-yy, radius*2+1)
|
||||||
ubyte ycenter_plus_radius = ycenter + radius
|
horizontal_line(xcenter-yy, ycenter+radius, yy*2+1)
|
||||||
ubyte ycenter_min_radius = ycenter - radius
|
horizontal_line(xcenter-yy, ycenter-radius, yy*2+1)
|
||||||
uword @zp plotx
|
|
||||||
|
|
||||||
; cx16.GRAPH_draw_line(xcenter-radius, )
|
|
||||||
cx16.FB_cursor_position(xcenter-radius, ycenter_plus_yy)
|
|
||||||
repeat radius*2+1
|
|
||||||
cx16.FB_set_pixel(1)
|
|
||||||
|
|
||||||
cx16.FB_cursor_position(xcenter-radius, ycenter_min_yy)
|
|
||||||
repeat radius*2+1
|
|
||||||
cx16.FB_set_pixel(1)
|
|
||||||
|
|
||||||
cx16.FB_cursor_position(xcenter-yy, ycenter_plus_radius)
|
|
||||||
repeat yy*2+1
|
|
||||||
cx16.FB_set_pixel(1)
|
|
||||||
|
|
||||||
cx16.FB_cursor_position(xcenter-yy, ycenter_min_radius)
|
|
||||||
repeat yy*2+1
|
|
||||||
cx16.FB_set_pixel(1)
|
|
||||||
|
|
||||||
yy++
|
yy++
|
||||||
if decisionOver2<=0
|
if decisionOver2<=0
|
||||||
decisionOver2 += (yy as word)*2+1
|
decisionOver2 += (yy as word)*2+1
|
||||||
|
Loading…
Reference in New Issue
Block a user