![]() |
Routines |
| Prev: 46598 | Up: Map | Next: 46630 |
|
Used by the routines at Handler_ChangeRoom and Handler_ReportTheKill.
Transform Item.
|
||||||||||
|
Get the location of the "from" item so the "to" item can be created in the same place.
|
||||||||||
| TransformItem | 46611 | LD A,B | Copy the "from" item ID into A. | |||||||
| 46612 | CALL GetItemRoom | Call GetItemRoom to get the room ID where the "from" item is located (returns in A). | ||||||||
| 46615 | PUSH BC | Remember the items and the room while the first is removed. | ||||||||
| 46616 | PUSH AF | |||||||||
|
Destroy the "from" item by setting its location to 0 (inactive).
|
||||||||||
| 46617 | LD C,0 | Set the room ID to 0 to deactivate the "from" item. | ||||||||
| 46619 | CALL SetItemRoom | Call SetItemRoom to update the "from" item's location to 0. | ||||||||
| 46622 | POP AF | Restore AF, BC from the stack. | ||||||||
| 46623 | POP BC | |||||||||
|
Create the "to" item at the same location where the "from" item was.
|
||||||||||
| 46624 | LD B,C | Copy the "to" item ID into B. | ||||||||
| 46625 | LD C,A | Copy the location (from A) into C. | ||||||||
| 46626 | CALL SetItemRoom | Call SetItemRoom to create the "to" item at the stored location. | ||||||||
| 46629 | RET | Return. | ||||||||
|
View the equivalent code in;
|
||||||||||
| Prev: 46598 | Up: Map | Next: 46630 |