Prev: AF08 Up: Map Next: AF31
AF1E: Transform Item
Used by the routines at ECA2, EE35, F26C, F293 and F3AC.
Rather than use item properties, the game just has separate objects that don't exist until an action is performed.
An example is:
Item ID Item Name
27 "An armed warrior (You may not pass)"
28 "An armed warrior (Welcome Warlor)"
When the match is lit by the player; item 02 is destroyed and replaced with item 03.
Input
B From item ID
C To item ID
TransformItem AF1E LD A,B A=B.
AF1F CALL $AED1 Call AED1.
AF22 PUSH BC Stash BC and AF on the stack.
AF23 PUSH AF
AF24 LD C,$00 C=00.
AF26 CALL $AF08 Call AF08.
AF29 POP AF Restore AF and BC from the stack.
AF2A POP BC
AF2B LD B,C B=C.
AF2C LD C,A C=A.
AF2D CALL $AF08 Call AF08.
AF30 RET Return.
Prev: AF08 Up: Map Next: AF31