Prev: 34137 Up: Map Next: 34160
34151: Load an object into the first empty inventory slot of a character
Used by the routines at 30222, 30602 and 33883.
Input
HL Points to inventory slots of a character
B Number of inventory slots to process
C Index of object to add to this character's inventory
34151 LD A,(HL) Load A with index of object at character's current inventory slot...
34152 OR A ...and if this is zero (i.e. empty)...
34153 JR Z,34158 ...skip ahead to 34158
34155 INC HL Advance to next inventory slot
34156 DJNZ 34151 Repeat for next slot
34158 LD (HL),C Load object into this (i.e. first empty) slot
34159 RET Return
Prev: 34137 Up: Map Next: 34160