Prev: A59C Up: Map Next: A5BF
A5A3: Item to escapeitem
This returns a bitmask indicating the presence of the items required for escape.
Used by the routine at join_item_to_escapeitem.
Input
A Item.
Output
A Bitfield.
item_to_escapeitem A5A3 CP $0F Is it item_COMPASS?
A5A5 JR NZ,item_to_escapeitem_0 No - try the next interesting item
A5A7 LD A,$01 Otherwise return flag escapeitem_COMPASS
A5A9 RET
item_to_escapeitem_0 A5AA CP $03 Is it item_PAPERS?
A5AC JR NZ,item_to_escapeitem_1 No - try the next interesting item
A5AE LD A,$02 Otherwise return flag escapeitem_PAPERS
A5B0 RET
item_to_escapeitem_1 A5B1 CP $0E Is it item_PURSE?
A5B3 JR NZ,item_to_escapeitem_2 No - try the next interesting item
A5B5 LD A,$04 Otherwise return flag escapeitem_PURSE
A5B7 RET
item_to_escapeitem_2 A5B8 CP $06 Is it item_UNIFORM?
A5BA LD A,$08 Return escapeitem_UNIFORM if so
A5BC RET Z
A5BD XOR A Otherwise return zero
A5BE RET
Prev: A59C Up: Map Next: A5BF