LZ: Help on lines!
[Prev][Next][Index][Thread]
LZ: Help on lines!
I need help on how to draw a diagonal line. I got line.asm, which is a version of Bresenham's algorithm, and since I didn't want to figure out how to do his algorithm in assembler, I pasted the routine in my program. It draws a line, but for some reason when I tell it to draw a line from $3201(de) to $3F64(hl), it draws it up into tho top of the screen, then jumps down to the bottom and goes up to about 24(decimal). The X is right, however. Here's an illustration:
(very crude):
----------------------------------------------------------------------
___/ . ($3F64)
__ /
/
($3201)
($1864)
___/
____/
___/
_________ /_____________________________
Does anybody know what's going on, or what I'm doing wrong? Is there a better way to do it than this?
Thanks in advance.
Kevin Retzke
kretzke@enteract.com