Re: A86: ASM Converter from 85->86
[Prev][Next][Index][Thread]
Re: A86: ASM Converter from 85->86
On Sat, 2 Aug 1997, James Yopp wrote:
> Yeah. I'm working on Asteroids. My current problem is that when the
> ship moves so that the back half of it is off the screen, the dx and dy
> of the lines composing the ship get messed up. I'm using Stephanie
> Jantzen's line routine, based on Bresenham's algorithm, to do this,
> because it uses FindPixel for every pixel in the line, and that way I can
Does anyone know anything about _ILine? Does it call the system FindPixel
for every point on the line? That seems inefficient, since all the points
in a line are right next to each other. Does someone have Bresenham's
algorithm handy? I've experimented with it in the past, but I'm not a CG
major, so such things easily leak out of my mind.
> to adjust the coordinates without affecting line direction. To fix the
> problem, I'm going to have to move the viewable screen area to the middle
> of the coordinate system so that the routine can accurately calculate the
> distances. So, the screen system for the new game would go from (63, 127)
> to (191, 63). Anybody know of a better way to do this?
Have you thought about using signed comparisons? Rather than using "jr
nc" and "jr c" you use "jr p" and "jr m". Your 8-bit numbers range from
-128 to 127, which is just what you need for the LCD.
Have I answered your question? I have a nagging feeling that I'm missing
something important.
--------
Dan Eble (mailto:eble@cis.ohio-state.edu)
(http://www.cis.ohio-state.edu/~eble)
References: