03-14-2006, 10:16 PM
HyperBASIC? looks like fb to me ;P
for qb 4.5:
yeah, take that all n00bs who said i push fb on people, i can still go at it in qb with the best of em. =p
for qb 4.5:
Code:
Declare Sub DrawLine( colour As Integer, x1 As Integer, y1 As Integer, x2 As Integer, y2 As Integer )
Screen 13
DrawLine 15, 1, 1, 7, 7
Sub DrawLine( colour As Integer, x1 As Integer, y1 As Integer, x2 As Integer, y2 As Integer)
Dim slope As Double,x As Double,y As Double
slope = (y2 - y1) / (x2 - x1)
x = x1+0.5
y = y1+0.5
If (Abs(slope) > 1) Then
slope = (x2 - x1) / (y2 - y1)
If (y1 < y2) Then
While (Int(y) <= y2)
PSet (Int(x),Int(y)),colour
y = y + 1
x = x + slope
Wend
Else
While (Int(y) >= y2)
PSet (Int(x),Int(y)),colour
y = y - 1
x = x - slope
Wend
End If
ElseIf(x1 < x2) Then
While(Int(x) <= x2)
PSet (Int(x),Int(y)),colour
x = x + 1
y = y + slope
Wend
Else
While(Int(x) >= x2)
PSet (Int(x),Int(y)),colour
x = x - 1
y = y - slope
Wend
End If
End Sub
yeah, take that all n00bs who said i push fb on people, i can still go at it in qb with the best of em. =p