Prev: 45364 Up: Map Next: 45390
45380: Wait for interrupt then load object C into the first empty inventory slot of a character
Used by the routines at 41578, 42036, 42157, 44635 and 45149.
Input
B Number of inventory slots to process
C Index of an object to load into a character's inventory
HL Points to (usually the start of) a record in the characters' current inventories table at 24848
45380 HALT Wait for interrupt
This entry point is used by the routine at 62443.
45381 LD A,(HL) If current inventory slot is empty...
45382 OR A ...
45383 JR Z,45388 ...then skip ahead to 45388
45385 INC HL Advance to next inventory slot
45386 DJNZ 45381 If there are still slots to process then loop back to 45381
45388 LD (HL),C Load item into current inventory slot
45389 RET Return
Prev: 45364 Up: Map Next: 45390