TIB: xyLine - fast, efficeint, few ppl know it
[Prev][Next][Index][Thread]
TIB: xyLine - fast, efficeint, few ppl know it
xyLine has got to be the most helpful funtion that I know of! It allows you
to consolidate multiple "Line(x1,y1,x2,y2)" commands (up to 255 of them) into
one "xyLine listx,listy"!! Unfortunately, it is a little known funciton, and
I have NEVER seen it in ANYone's programs except mine. Let's change that.
Help me spread the word about this function!!
Instead of having a set of Line() functions, use the xyline {},{} function to
consolidate them all into one!
For example:
Line(-10,-10,10,-10)
Line(10,-10,10,10)
Line(10,10,-10,10)
Line(-10,10,-10,-10)
Can be made into:
xyLine {-10,10,10,-10,-10},{-10,-10,10,10,-10}
All this does is draws a box that outlines the screen (as long as xMin=-10,
yMin=-10, xMax=10, and yMax=10).
xyLine takes the first list (started by a { and ending with a } ) and sets
those as x coordinates. Then it takes the second list, and plots those as y
coordinates, then it draws the lines in like connect-the-dots! I uses less
code, and it is about 80% faster than using Line()'s!!
-Dave W.
<A HREF="mailto:BIOSERRORS@aol.com">BIOSERRORS@aol.com</A>
P.S. - Look for my games: Command & Conquer 85 (the ASM version will be ready
for release by the end of next week!), Archery, and ScRaMbLeR! Also, look for
my graphical progs: Macro (an EXCELLENT example of the xyLine function!!),
Invert Bounce (sux, cuz itz one of my first progs), and MountainScape Drawer!
In addition to my TI-BASIC programming, I have made the following ASM programs
as examples for beginners: DrawSprite, pt_on test, and Name Bounce v2.
Current Projects: Command & Conquer ASM, Ultima BomberMan85 BASIC, and Ultima
BomberMan86 ASM