Skip to navigation

Version analysis of PIX1

This code appears in the following versions (click to see it in the source code):

Code variations between these versions are shown below.

Name: PIX1 Type: Subroutine Category: Maths (Arithmetic) Summary: Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle
Calculate the following: (YY+1 SYL+Y) = (A P) + (S R) and draw a stardust particle at (X1,Y1) with distance ZZ.
Arguments: (A P) A is the angle ALPHA or BETA, P is always 0 (S R) YY(1 0) or YY(1 0) + Q * A Y Stardust particle number X1 The x-coordinate offset Y1 The y-coordinate offset ZZ The distance of the point (further away = smaller point)

Code variation 1 of 1A variation in the labels only

Tap on a block to expand it, and tap it again to revert.

JSR ADD \ Set (A X) = (A P) + (S R)
JSR ADDK \ Set (A X) = (A P) + (S R)
 STA YY+1               \ Set YY+1 to A, the high byte of the result

 TXA                    \ Set SYL+Y to X, the low byte of the result

                        \ Fall through into PIX1 to draw the stardust particle
                        \ at (X1,Y1)