Re: LZ: Programming question


[Prev][Next][Index][Thread]

Re: LZ: Programming question



> What is the easiest way to make a routine to make a pointer follow across an 
> arc... (for instance the pointer in BUST A MOVE) ? i know it cant move at 
> constant x and y increments so how else could you do it?


  Two options I can see:


1. Use bitmapped graphics.  In this case, large, pointless.


2. Use the sine & cosine functions.  I assume you haven't had trig, so 
here's how it works:
  At ticalc.org, you will find under zshell/source/routines the file
"cosintan.asm", which contains trig functions (they're notoriously 
difficult to write).
  The sine of the angle (in radians, not degrees) is equal to the Y 
coordinate, and the cosine of the angle is the X coordinate.  (I might 
have gotten it backward.)
  If your pointer is longer than 1 pixel, multiply those values by the 
length to get the actual coordinate (cosintan.asm does this automatically
- the length of your pointer goes into "multiplier").


  If you want to do an arrow, for each line coming off, you should start 
it at the end of the pointer and end it a little ways off, at an angle.  
Then again, this might be too slow.


  HTH,
  Dan Knapp


                     /***********************************
                     *           Daniel Knapp           *
                     *       FeatherWate Software       *
                     *     email: dankna@bergen.org     *
                     *                                  *
                     *      Whose account this is,      *
                     *         I think I know.          *
                     * The sysop is in Berkely, though. *
                     * She will not see me typing here, *
                     *        To watch this Mac         *
                     *          Refuse to go.           *
                     ***********************************/


References: