![]() |
Routines |
| Prev: 36554 | Up: Map | Next: 36692 |
|
Used by the routine at ApplyCollisionEffects.
Halves the speed of the player's ship in each direction, unless the speed of the object that was hit is in the opposite direction.
|
||||||||||
| SlowShip | 36638 | LD A,(36017) | Fetch the value from 36017. | |||||||
| 36641 | AND A | Test it. | ||||||||
| 36642 | RET NZ | Return if it is not zero. | ||||||||
| 36643 | LD D,(IY+25) | Fetch the horizontal speed of the player into DE. | ||||||||
| 36646 | LD E,(IY+26) | |||||||||
| 36649 | LD A,D | Compare its sign with that of the object. | ||||||||
| 36650 | XOR (IX+7) | |||||||||
| 36653 | BIT 7,A | Jump to SlowShip_Vertical if they are different. | ||||||||
| 36655 | JR NZ,SlowShip_Vertical | |||||||||
| 36657 | SRA D | Halve the horizontal speed... | ||||||||
| 36659 | RR E | |||||||||
| 36661 | LD (IY+25),D | ...and store it. | ||||||||
| 36664 | LD (IY+26),E | |||||||||
| SlowShip_Vertical | 36667 | LD D,(IY+27) | Fetch the vertical speed of the player into DE. | |||||||
| 36670 | LD E,(IY+28) | |||||||||
| 36673 | LD A,D | Compare its sign with that of the object. | ||||||||
| 36674 | XOR (IX+9) | |||||||||
| 36677 | BIT 7,A | Test bit 7. | ||||||||
| 36679 | RET NZ | Return if they are different. | ||||||||
| 36680 | SRA D | Halve the vertical speed... | ||||||||
| 36682 | RR E | |||||||||
| 36684 | LD (IY+27),D | ...and store it. | ||||||||
| 36687 | LD (IY+28),E | |||||||||
| 36690 | RET | Return. | ||||||||
| 36691 | DEFB 0 | |||||||||
| Prev: 36554 | Up: Map | Next: 36692 |