Prev: 48982 Up: Map Next: 49017
48998: Test Pickup Drop Key
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.
Output
F Zero flag clear if the key is being pressed
Use a different bit when the control method has bit 3 set.
TestPickupDropKey 48998 LD HL,42761 Take the control method, ControlMethod.
49001 LD A,(HL) Fetch the control method.
49002 AND %00000110 Keep only the bits that choose a joystick.
49004 LD A,(42807) Fetch the controls from ControlsPressed.
49007 JR Z,TestPickupDropKey_Mask Jump to TestPickupDropKey_Mask if the keyboard is being used.
49009 BIT 3,(HL) Jump to TestPickupDropKey_Mask if bit 3 of the control method is not set.
49011 JR Z,TestPickupDropKey_Mask
49013 RRCA Shift the bits of the controls down by one place.
Keep only the pick-up and drop bit.
TestPickupDropKey_Mask 49014 AND %00010000 Keep only the bit for picking up and dropping.
49016 RET Return.
View the equivalent code in;
Prev: 48982 Up: Map Next: 49017