Prev: 41255 Up: Map Next: 41293
41275: Draw Inventory
Used by the routines at EnterRoom, HandlerPickupItem and HandlerBlank.
Draws the three items that the player is carrying in the side panel, one for each slot of the inventory at Inventory_Slot1. The slots are drawn 16 pixels apart.
Before After
inventory-before inventory-after
DrawInventory 41275 LD DE,11464 D=44 (the Y position) and E=200 (the X position) of the first slot.
41278 LD HL,24112 Point HL at the first slot of the inventory at Inventory_Slot1.
41281 LD B,3 B=3 (the number of slots).
DrawInventory_Loop 41283 CALL DrawInventoryItem Draw the item in the slot with DrawInventoryItem.
41286 LD A,E Fetch the X position of the slot.
41287 ADD A,16 Add 16 to move on to the X position of the next slot.
41289 LD E,A Keep the X position of the next slot in E.
41290 DJNZ DrawInventory_Loop Decrease the slot counter by one and loop back to DrawInventory_Loop until all of the slots are drawn.
41292 RET Return.
Prev: 41255 Up: Map Next: 41293