![]()  | 
Routines | 
| Prev: AF11 | Up: Map | Next: AF31 | 
| 
 
Used by the routines at Process_PreEnterCauseway, Process_GetCloak, Process_DropTorc, Process_DropHelmet, Process_DropCloak, Process_BuyMeatFromTraderWithIron, Process_GiveRomanToDruid, Process_TakeSwordFromSlab, Process_GiveHelmetToTrader, Process_GiveHelmetToGuardOrDruid, Process_FreeOx, Process_FreeRoman, Process_WearTorc, Process_WearHelmet, Process_WearAmulet, Process_DropAmulet, Process_ThrowUrnIntoFire, Process_WearCloak, Process_CaptureRoman, Process_PlaceSwordOnSlab, Process_KillRomanWithSword, Process_KillFomorian, Process_KillHareWithSword, Process_KillBear, Process_KillPigWithSword and Process_KillOxWithSword.
 
Rather than use item properties, the game just has separate objects that don't exist until an action is performed.
 
An example is:  
 
  | 
||||||||||||||||
| 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 |