![]() |
Routines |
| Prev: 8E2D | Up: Map | Next: 8F53 |
|
Used by the routine at ship_contact.
A cloud's effect ($80). Halves each component of the ship's velocity (the words at +$19 and +$1B of its record) that has the same sign as the object's velocity in that axis, so flying through a cloud is slow. Not done in a pass after the carried thing was pushed by a cloud (last_pass_contact).
|
||||||||||
| contact_slow_ship | 8F1E | LD A,(last_pass_contact) | Not after a push last pass | |||||||
| 8F21 | AND A | |||||||||
| 8F22 | RET NZ | |||||||||
| 8F23 | LD D,(IY+$19) | X: halve it when the signs agree | ||||||||
| 8F26 | LD E,(IY+$1A) | |||||||||
| 8F29 | LD A,D | |||||||||
| 8F2A | XOR (IX+$07) | |||||||||
| 8F2D | BIT 7,A | |||||||||
| 8F2F | JR NZ,contact_slow_ship_0 | |||||||||
| 8F31 | SRA D | |||||||||
| 8F33 | RR E | |||||||||
| 8F35 | LD (IY+$19),D | |||||||||
| 8F38 | LD (IY+$1A),E | |||||||||
| contact_slow_ship_0 | 8F3B | LD D,(IY+$1B) | Y: the same | |||||||
| 8F3E | LD E,(IY+$1C) | |||||||||
| 8F41 | LD A,D | |||||||||
| 8F42 | XOR (IX+$09) | |||||||||
| 8F45 | BIT 7,A | |||||||||
| 8F47 | RET NZ | |||||||||
| 8F48 | SRA D | |||||||||
| 8F4A | RR E | |||||||||
| 8F4C | LD (IY+$1B),D | |||||||||
| 8F4F | LD (IY+$1C),E | |||||||||
| 8F52 | RET | |||||||||
| Prev: 8E2D | Up: Map | Next: 8F53 |