![]() |
Routines |
| Prev: 36434 | Up: Map | Next: 36543 |
|
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.
|
||||||||||||||
| 36499 | LD A,(IX+6) | Load current "ratio" value into A | ||||||||||||
| 36502 | ADD A,(IX+8) | Add smaller of x- and y-component magnitudes | ||||||||||||
| 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... | ||||||||||||
| 36535 | ADD A,H | ...to y-step... | ||||||||||||
| 36536 | LD B,A | ...in B | ||||||||||||
| 36537 | LD A,(IX+0) | Add previous x-coordinate... | ||||||||||||
| 36540 | ADD A,L | ...to x-step... | ||||||||||||
| 36541 | LD C,A | ...in C | ||||||||||||
| 36542 | RET | Return | ||||||||||||
| Prev: 36434 | Up: Map | Next: 36543 |