Bitmap/Bresenham's line algorithm: Difference between revisions

Content added Content deleted
(Added Commodore BASIC solution)
m (Removed magic number)
Line 1,051: Line 1,051:
2010 rem p0 == plot point x
2010 rem p0 == plot point x
2020 rem p1 == plot point y
2020 rem p1 == plot point y
2030 sl=p0+(p1*40)
2030 sl=p0+(p1*sw)
2040 rem make sure we dont write beyond screen memory
2040 rem make sure we dont write beyond screen memory
2050 if sl<(sw*sh) then poke sc+sl,pc
2050 if sl<(sw*sh) then poke sc+sl,pc