Routines |
Prev: 39016 | Up: Map | Next: 39125 |
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 38884.
|
||||||||||||||
39081 | LD A,(IX+6) | Load current "ratio" value into A | ||||||||||||
39084 | ADD A,(IX+8) | Add smaller of x- and y-component magnitudes | ||||||||||||
39087 | JR C,39094 | If result is crosses the 255-0 boundary then skip ahead to 39094 | ||||||||||||
39089 | CP (IX+7) | If result is less than larger of x- and y-component magnitudes... | ||||||||||||
39092 | JR C,39105 | ...then skip ahead to 39105 (move star only on axis with larger magnitude) | ||||||||||||
39094 | SUB (IX+7) | Subtract larger of x- and y-magnitudes | ||||||||||||
39097 | LD H,(IX+5) | Load y-step into H... | ||||||||||||
39100 | LD L,(IX+4) | ...and x-step into H (moving star on BOTH axes) | ||||||||||||
39103 | JR 39111 | Skip ahead to 39111 | ||||||||||||
39105 | LD H,(IX+3) | Load 0 / y-step into H | ||||||||||||
39108 | LD L,(IX+2) | Load 0 / x-step into H | ||||||||||||
39111 | LD (IX+6),A | Update "ratio" value | ||||||||||||
39114 | LD A,(IX+1) | Add previous y-coordinate... | ||||||||||||
39117 | ADD A,H | ...to y-step... | ||||||||||||
39118 | LD B,A | ...in B | ||||||||||||
39119 | LD A,(IX+0) | Add previous x-coordinate... | ||||||||||||
39122 | ADD A,L | ...to x-step... | ||||||||||||
39123 | LD C,A | ...in C | ||||||||||||
39124 | RET | Return |
Prev: 39016 | Up: Map | Next: 39125 |