Prev: 36434 Up: Map Next: 36543
36499: Move a star depending upon the signs and magnitudes of its "direction"
Each time this routine runs, we add the smaller of the x- and y-magnitudes to the running "ratio" value in (IX+6).
If the larger of the x- and y-magnitudes is smaller than this, then we move the star in both x- and y-directions and subtract the larger magnitude from the running value in (IX+6).
If the larger of the x- and y-magnitudes is larger than this, then we move the star only in that direction with the larger magnitude and do not update (IX+6) further beyond adding the smaller magnitude (i.e. we do NOT subtract the larger one)
Used by the routine at 36321.
Input
IX Points to entry in star data table at 24832
Output
B New y-coordinate to plot
C New x-coordinate to plot
36499 LD A,(IX+6) Load current "ratio" value into A
36505 JR C,36512 If result is crosses the 255-0 boundary then skip ahead to 36512
36507 CP (IX+7) If result is less than larger of x- and y-component magnitudes...
36510 JR C,36523 ...then skip ahead to 36523 (move star only on axis with larger magnitude)
36512 SUB (IX+7) Subtract larger of x- and y-magnitudes
36515 LD H,(IX+5) Load y-step into H...
36518 LD L,(IX+4) ...and x-step into H (moving star on BOTH axes)
36521 JR 36529 Skip ahead to 36529
36523 LD H,(IX+3) Load 0 / y-step into H
36526 LD L,(IX+2) Load 0 / x-step into H
36529 LD (IX+6),A Update "ratio" value
36532 LD A,(IX+1) Add previous y-coordinate...