![]() |
Routines |
| Prev: BF56 | Up: Map | Next: BF79 |
|
Used by the routines at HandlePickupAndDrop and CheckActionKeyReleased.
Tests if the key for picking up and dropping objects is being pressed. There is a way to read it from a different bit when the control method has bit 3 set, but nothing ever sets that bit.
|
||||||||
|
Use a different bit when the control method has bit 3 set.
|
||||||||
| TestPickupDropKey | BF66 | LD HL,$A709 | Take the control method, ControlMethod. | |||||
| BF69 | LD A,(HL) | Fetch the control method. | ||||||
| BF6A | AND %00000110 | Keep only the bits that choose a joystick. | ||||||
| BF6C | LD A,($A737) | Fetch the controls from ControlsPressed. | ||||||
| BF6F | JR Z,TestPickupDropKey_Mask | Jump to TestPickupDropKey_Mask if the keyboard is being used. | ||||||
| BF71 | BIT 3,(HL) | Jump to TestPickupDropKey_Mask if bit 3 of the control method is not set. | ||||||
| BF73 | JR Z,TestPickupDropKey_Mask | |||||||
| BF75 | RRCA | Shift the bits of the controls down by one place. | ||||||
|
Keep only the pick-up and drop bit.
|
||||||||
| TestPickupDropKey_Mask | BF76 | AND %00010000 | Keep only the bit for picking up and dropping. | |||||
| BF78 | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: BF56 | Up: Map | Next: BF79 |