Prev: 34224 Up: Map Next: 34268
34256: Check whether Magic Knight is carrying an object
Used by the routines at 28092, 29800, 32258, 32764, 32823, 32982, 33036, 33129, 36215 and 36275.
Input
A Index of an object
HL (Entry at 34259) Pointer to start of a character's inventory
Output
F Zero flag set if object is present in inventory, reset otherwise
34256 LD HL,25395 Point HL at start of Magic Knight's current inventory
This entry point is used by the routines at 32764 and 33883.
34259 LD B,5 Load B with 5 (as characters have five inventory slots)
34261 CP (HL) If object at current inventory slot is the object of interest...
34262 RET Z ...then return with zero flag set
34263 INC HL Advance HL to next inventory slot
34264 DJNZ 34261 Decrease B (remaining number of inventory slots to check) and loop back to 34261
34266 OR A Reset zero flag, as object is not present
34267 RET Return
Prev: 34224 Up: Map Next: 34268