![]() |
Routines |
| Prev: 86B9 | Up: Map | Next: 8704 |
|
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 | 86E4 | LD A,(IX+$02) | Fetch the selected control method. | |||||||
| 86E7 | LD HL,$8704 | Use the table of icon positions at ControlIconPositions. | ||||||||
| 86EA | CALL AddAToHL | Add the control method to the address. | ||||||||
| 86ED | LD A,(HL) | Fetch the target position of the icon. | ||||||||
| 86EE | SUB (IX+$01) | Subtract the current position of the icon. | ||||||||
| 86F1 | RET NZ | Return if the icon is still moving. | ||||||||
| 86F2 | LD A,$F7 | Read the keyboard row "1" to "5". | ||||||||
| 86F4 | OUT ($FD),A | |||||||||
| 86F6 | IN A,($FE) | Read the keyboard. | ||||||||
| 86F8 | AND B | Test the key. | ||||||||
| 86F9 | RET NZ | Return if it is not pressed. | ||||||||
| 86FA | LD A,(IX+$02) | Fetch the selected control method. | ||||||||
| 86FD | INC A | Move on to the next one... | ||||||||
| 86FE | AND %00000011 | ...wrapping round after the fourth. | ||||||||
| 8700 | LD (IX+$02),A | Store the new control method. | ||||||||
| 8703 | RET | Return. | ||||||||
| Prev: 86B9 | Up: Map | Next: 8704 |