Prev: 45434 Up: Map Next: 45466
45450: Point IX at current inventory of character A
Used by the routines at 41924, 42036, 42157 and 42257.
Input
A Index of a character
Output
IX Points to current inventory of character A
45450 PUSH DE Store DE
45451 LD E,A Multiply character index by five (as each character has five inventory slots)...
45452 ADD A,A ...
45453 ADD A,A ...
45454 ADD A,E ...
45455 LD E,A ...and load into DE...
45456 LD D,0 ...
45458 LD IX,24858 Point IX at Off-White Knight's entry in characters' current inventories table (i.e. first entry for non-player characters)
45462 ADD IX,DE Add five times character index to this as offset
45464 POP DE Restore DE
45465 RET Return
Prev: 45434 Up: Map Next: 45466