mirror of
https://github.com/irmen/prog8.git
synced 2024-12-25 08:29:25 +00:00
optimized disc (filled circle) drawing on c64, fixed off by 1 disc width in cx16 version
This commit is contained in:
parent
6902834568
commit
00071d53d5
@ -158,21 +158,17 @@ graphics {
|
||||
ubyte ycenter_plus_xx = ycenter + xx
|
||||
ubyte ycenter_min_xx = ycenter - xx
|
||||
|
||||
for internal_plotx in xcenter to xcenter+xx {
|
||||
internal_plotx = xcenter-xx
|
||||
repeat xx*2+1 {
|
||||
internal_plot(ycenter_plus_yy)
|
||||
internal_plot(ycenter_min_yy)
|
||||
internal_plotx++
|
||||
}
|
||||
for internal_plotx in xcenter-xx to xcenter-1 {
|
||||
internal_plot(ycenter_plus_yy)
|
||||
internal_plot(ycenter_min_yy)
|
||||
}
|
||||
for internal_plotx in xcenter to xcenter+yy {
|
||||
internal_plot(ycenter_plus_xx)
|
||||
internal_plot(ycenter_min_xx)
|
||||
}
|
||||
for internal_plotx in xcenter-yy to xcenter {
|
||||
internal_plotx = xcenter-yy
|
||||
repeat yy*2+1 {
|
||||
internal_plot(ycenter_plus_xx)
|
||||
internal_plot(ycenter_min_xx)
|
||||
internal_plotx++
|
||||
}
|
||||
yy++
|
||||
if decisionOver2<=0
|
||||
|
@ -110,25 +110,25 @@ graphics {
|
||||
cx16.r0 = xcenter-xx
|
||||
cx16.r1 = ycenter_plus_yy
|
||||
cx16.FB_cursor_position()
|
||||
repeat xx*2
|
||||
repeat xx*2+1
|
||||
cx16.FB_set_pixel(1)
|
||||
|
||||
cx16.r0 = xcenter-xx
|
||||
cx16.r1 = ycenter_min_yy
|
||||
cx16.FB_cursor_position()
|
||||
repeat xx*2
|
||||
repeat xx*2+1
|
||||
cx16.FB_set_pixel(1)
|
||||
|
||||
cx16.r0 = xcenter-yy
|
||||
cx16.r1 = ycenter_plus_xx
|
||||
cx16.FB_cursor_position()
|
||||
repeat yy*2
|
||||
repeat yy*2+1
|
||||
cx16.FB_set_pixel(1)
|
||||
|
||||
cx16.r0 = xcenter-yy
|
||||
cx16.r1 = ycenter_min_xx
|
||||
cx16.FB_cursor_position()
|
||||
repeat yy*2
|
||||
repeat yy*2+1
|
||||
cx16.FB_set_pixel(1)
|
||||
|
||||
yy++
|
||||
|
Loading…
Reference in New Issue
Block a user