![]() |
Routines |
| Prev: 34489 | Up: Map | Next: 34564 |
|
Used by the routine at ReadMenuKeys.
Moves on to the next control method for a player if the key for that player is pressed and the icon has finished sliding into place.
|
||||||||||
| ChangeControlMethod | 34532 | LD A,(IX+2) | Fetch the selected control method. | |||||||
| 34535 | LD HL,34564 | Use the table of icon positions at ControlIconPositions. | ||||||||
| 34538 | CALL AddAToHL | Add the control method to the address. | ||||||||
| 34541 | LD A,(HL) | Fetch the target position of the icon. | ||||||||
| 34542 | SUB (IX+1) | Subtract the current position of the icon. | ||||||||
| 34545 | RET NZ | Return if the icon is still moving. | ||||||||
| 34546 | LD A,247 | Read the keyboard row "1" to "5". | ||||||||
| 34548 | OUT (253),A | |||||||||
| 34550 | IN A,(254) | Read the keyboard. | ||||||||
| 34552 | AND B | Test the key. | ||||||||
| 34553 | RET NZ | Return if it is not pressed. | ||||||||
| 34554 | LD A,(IX+2) | Fetch the selected control method. | ||||||||
| 34557 | INC A | Move on to the next one... | ||||||||
| 34558 | AND %00000011 | ...wrapping round after the fourth. | ||||||||
| 34560 | LD (IX+2),A | Store the new control method. | ||||||||
| 34563 | RET | Return. | ||||||||
| Prev: 34489 | Up: Map | Next: 34564 |