Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
|
|
@ -3,36 +3,36 @@
|
|||
|
||||
:DRAW_LINE:
|
||||
Num_Push(31,35)
|
||||
#31 = abs(#3-#1) // x distance
|
||||
#32 = abs(#4-#2) // y distance
|
||||
#31 = abs(#3-#1) // x distance
|
||||
#32 = abs(#4-#2) // y distance
|
||||
if (#4-#2 < -#31 || #3-#1 <= -#32) {
|
||||
#99=#1; #1=#3; #3=#99 // swap start and end points
|
||||
#99=#1; #1=#3; #3=#99 // swap start and end points
|
||||
#99=#2; #2=#4; #4=#99
|
||||
}
|
||||
if (#1 < #3) { #34=1 } else { #34=-1 } // x step
|
||||
if (#2 < #4) { #35=1 } else { #35=-1 } // y step
|
||||
if (#1 < #3) { #34=1 } else { #34=-1 } // x step
|
||||
if (#2 < #4) { #35=1 } else { #35=-1 } // y step
|
||||
|
||||
if (#32 > #31) { // steep angle, step by Y
|
||||
#33 = #32 / 2 // error distance
|
||||
if (#32 > #31) { // steep angle, step by Y
|
||||
#33 = #32 / 2 // error distance
|
||||
while (#2 <= #4) {
|
||||
Call("DRAW_PIXEL")
|
||||
#33 -= #31
|
||||
if (#33 < 0) {
|
||||
#1 += #34 // move right
|
||||
#33 += #32
|
||||
}
|
||||
#2++ // move up
|
||||
Call("DRAW_PIXEL")
|
||||
#33 -= #31
|
||||
if (#33 < 0) {
|
||||
#1 += #34 // move right
|
||||
#33 += #32
|
||||
}
|
||||
#2++ // move up
|
||||
}
|
||||
} else { // not steep, step by X
|
||||
} else { // not steep, step by X
|
||||
#33 = #31 / 2
|
||||
while (#1 <= #3) {
|
||||
Call("DRAW_PIXEL")
|
||||
#33 -= #32
|
||||
if (#33 < 0) {
|
||||
#2 += #35 // move up
|
||||
#33 += #31
|
||||
}
|
||||
#1++ // move right
|
||||
Call("DRAW_PIXEL")
|
||||
#33 -= #32
|
||||
if (#33 < 0) {
|
||||
#2 += #35 // move up
|
||||
#33 += #31
|
||||
}
|
||||
#1++ // move right
|
||||
}
|
||||
}
|
||||
Num_Pop(31,35)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue