Prev: AF11 Up: Map Next: AF31
AF1E: Transform Item
Input
B From item ID
C To item ID
TransformItem AF1E LD A,B Call ItemLocator with the source item ID.
AF1F CALL ItemLocator
A now contains the location of the source ID.
AF22 PUSH BC Stash the item IDs and source item room ID on the stack.
AF23 PUSH AF
AF24 LD C,$00 Call Handler_UpdateItemLocation and disable the source item.
AF26 CALL Handler_UpdateItemLocation
AF29 POP AF Restore the source item room ID and item IDs from the stack.
AF2A POP BC
Activate the destination item in the same room.
AF2B LD B,C Load the destination item ID into B.
AF2C LD C,A Load the source room ID into C.
AF2D CALL Handler_UpdateItemLocation Call Handler_UpdateItemLocation.
AF30 RET Return.
View the equivalent code in The Jewels Of Babylon.
Prev: AF11 Up: Map Next: AF31