![]() |
Routines |
| Prev: 43597 | Up: Map | Next: 43657 |
|
The update routine for the remote control arrows (objects 122 and 123). Object 122 is west, or north when flipped; object 123 is east, or south when flipped, giving commands 2 to 5.
|
||||||||
|
Send a direction if something has landed.
|
||||||||
| HandleRemoteControlArrow | 43619 | CALL SetPixelAdjustments | Call SetPixelAdjustments. | |||||
| 43622 | LD A,(IX+11) | Fetch the vertical speed. | ||||||
| 43625 | AND A | Return if nothing has landed. | ||||||
| 43626 | RET Z | |||||||
| 43627 | XOR A | Write 0 to the vertical speed. | ||||||
| 43628 | LD (IX+11),A | |||||||
| 43631 | LD A,(IX+7) | Fetch the flags of the pad. | ||||||
| 43634 | RLCA | Move the flip into bit 7. | ||||||
| 43635 | AND %10000000 | Keep bit 7. | ||||||
| 43637 | LD C,A | Keep it in C. | ||||||
| 43638 | LD A,(IX+0) | Fetch the sprite number. | ||||||
| 43641 | AND %00000001 | Keep bit 0. | ||||||
| 43643 | OR C | Combine it with the flip. | ||||||
| 43644 | RLCA | Move the bits into a command. | ||||||
| 43645 | ADD A,2 | Add 2. | ||||||
| 43647 | LD C,A | Keep the command in C. | ||||||
| 43648 | LD HL,23362 | Point HL at RemoteControlCommand. | ||||||
| 43651 | LD A,(HL) | Fetch the command. | ||||||
| 43652 | AND %10000000 | Keep bit 7. | ||||||
| 43654 | OR C | Combine it with the new command. | ||||||
| 43655 | LD (HL),A | Set RemoteControlCommand. | ||||||
| 43656 | RET | Return. | ||||||
| Prev: 43597 | Up: Map | Next: 43657 |