![]() |
Routines |
| Prev: 49115 | Up: Map | Next: 49166 |
|
Used by the routine at HandlePickupAndDrop.
Tests whether the control for picking up or dropping an object is pressed. If the joystick is used with the directional control, the other of the two bits for this is used.
|
||||||||
|
Choose the pickup bit, then test whether it is pressed.
|
||||||||
| TestPickupDropKey | 49147 | LD HL,23460 | Point HL at the control method, ControlMethod. | |||||
| 49150 | LD A,(HL) | Fetch it. | ||||||
| 49151 | AND %00000110 | Keep the choice of joystick. | ||||||
| 49153 | LD A,(23477) | Fetch the controls that are pressed from ControlsPressed. | ||||||
| 49156 | JR Z,TestPickupDropKey_Test | Jump to TestPickupDropKey_Test if the keyboard is in use. | ||||||
| 49158 | BIT 3,(HL) | Jump to TestPickupDropKey_Test if the directional control is not on. | ||||||
| 49160 | JR Z,TestPickupDropKey_Test | |||||||
| 49162 | RRCA | Move the bit for the directional control into place. | ||||||
| TestPickupDropKey_Test | 49163 | AND %00010000 | Keep the bit for picking up and dropping. | |||||
| 49165 | RET | Return. | ||||||
| Prev: 49115 | Up: Map | Next: 49166 |