Routines

29178: Collect offset from keypress table


Used by routines at 29278, 29462, 62483 and 64316. Return with the zero flag set if no game keys were pressed. Otherwise return with A holding the offset from the keypress table corresponding to the last key pressed.

29178 CDBE71 CALL 29118 Collect the code of the last key pressed in A
29181 C8 RET Z Return if no key was pressed
29182 D630 SUB 48 We're only interested in keys with codes 48 onwards
29184 38F6 JR C,29176 Jump if none of these was pressed
29186 6F LD L,A Point HL to the relevant entry in the keypress table
29187 26E5 LD H,229
29189 7E LD A,(HL) Pick up the offset from that table
29190 A7 AND A Set the zero flag if the offset is 0 (i.e. not a game key)
29191 C9 RET