![]() |
Routines |
| Prev: 48440 | Up: Map | Next: 48491 |
|
Used by the routine at HandlePickupAndDrop.
Tests whether the control for picking up or dropping an object is pressed. If a joystick is used with directional control then the other of the two bits for this is used.
|
||||||||
|
Use the directional bit when a joystick has directional control.
|
||||||||
| TestPickupDropKey | 48472 | LD HL,23300 | Point HL at ControlMethod. | |||||
| 48475 | LD A,(HL) | Fetch it. | ||||||
| 48476 | AND %00000110 | Keep only bits 1 and 2. | ||||||
| 48478 | LD A,(23317) | Fetch ControlsPressed. | ||||||
| 48481 | JR Z,TestPickupDropKey_Test | Jump to TestPickupDropKey_Test if the keyboard is in use. | ||||||
| 48483 | BIT 3,(HL) | Jump to TestPickupDropKey_Test if directional control is off. | ||||||
| 48485 | JR Z,TestPickupDropKey_Test | |||||||
| 48487 | RRCA | Move the bit for directional control into place. | ||||||
| TestPickupDropKey_Test | 48488 | AND %00010000 | Keep only bit 4. | |||||
| 48490 | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: 48440 | Up: Map | Next: 48491 |