Prev: 86B9 Up: Map Next: 8704
86E4: Step a player's control method
Used by the routine at menu_keys.
Called and fallen into by menu_keys: IX the pointer record, B the key's bit in row $F7. Only once the pointer has reached the line of the method it has, and only while the key is pressed, the method goes on by one, 0-3.
Input
IX The player's pointer record
B The key's bit in row $F7
cycle_method 86E4 LD A,(IX+$02) Not while the pointer is still moving
86E7 LD HL,method_lines
86EA CALL add_a_to_hl
86ED LD A,(HL)
86EE SUB (IX+$01)
86F1 RET NZ
86F2 LD A,$F7 The key not pressed: nothing
86F4 OUT ($FD),A
86F6 IN A,($FE)
86F8 AND B
86F9 RET NZ
86FA LD A,(IX+$02) Next method, 0-3
86FD INC A
86FE AND $03
8700 LD (IX+$02),A
8703 RET
Prev: 86B9 Up: Map Next: 8704