1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-10-18 07:24:16 +00:00

in-line simple line routine

This commit is contained in:
David Schmenk 2019-12-19 19:38:26 -08:00
parent 44c8bf9a13
commit af90f40f32

View File

@ -190,14 +190,14 @@ def simpleline(x1, y1, x2, y2)#0
sy = -sy; x1, x2 = x2, x1
fin
err = dy2 - dx2 / 2
ofst, pixofst = divmod7(x1)
ofst, pixofst = divmod(x1, 7)
pptr = (hgrscan[y1] | hgr1) + ofst
clr = curhclr.[ofst & 1]
clr = curhclr.[ofst & 1]
for x = x1 to x2
pmask = hbmask[pixofst]
^pptr = (^pptr & ~pmask) | (clr & pmask)
pixofst++
if pixofst > 7
if pixofst > 6
pixofst = 0
pptr++
ofst++
@ -215,7 +215,7 @@ def simpleline(x1, y1, x2, y2)#0
sx = -sx; y1, y2 = y2, y1
fin
err = dx2 - dy2 / 2
ofst, pixofst = divmod7(x1)
ofst, pixofst = divmod(x1, 7)
clr = curhclr.[ofst & 1]
pmask = hbmask[pixofst]
for y = y1 to y2
@ -225,14 +225,14 @@ def simpleline(x1, y1, x2, y2)#0
err = err - dy2
if sx > 0
pixofst++
if pixofst > 7
if pixofst > 6
pixofst = 0
ofst++
clr = curhclr.[ofst & 1]
fin
else
if pixofst == 0
pixofst = 7
pixofst = 6
ofst--
clr = curhclr.[ofst & 1]
else