Prev: 5FA0 Up: Map Next: 5FD8
5FB0: Draw Cubby Hole Items
Used by the routine at LevelNew.
Draws the contents of all ten cubby holes: first the five down the left-hand side (X position 08) and then the five down the right-hand side (X position E8). Each hole is drawn by DrawCubbyHoleItem.
Before After
cubby-items-before cubby-items-after
DrawCubbyHoleItems 5FB0 LD C,$01 Start with the first row of shelves by setting the row counter in C to 01.
5FB2 LD DE,$5E23 Point DE at the first cubby hole (CubbyHoles).
Draw the left-hand side.
DrawCubbyHoleItems_Left 5FB5 LD L,$08 Set the X position in L to 08 (the left-hand side).
5FB7 PUSH DE Stash DE and BC on the stack.
5FB8 PUSH BC
5FB9 CALL DrawCubbyHoleItem Call DrawCubbyHoleItem.
5FBC POP BC Restore BC and DE from the stack.
5FBD POP DE
5FBE INC DE Move onto the next cubby hole.
5FBF INC C Increment the row counter by one.
5FC0 LD A,C Loop back to DrawCubbyHoleItems_Left until all five cubby holes down the left-hand side have been drawn (the row counter reaches 06).
5FC1 CP $06
5FC3 JR NZ,DrawCubbyHoleItems_Left
Draw the right-hand side.
5FC5 LD C,$01 Reset the row counter in C to 01 for the right-hand side.
DrawCubbyHoleItems_Right 5FC7 LD L,$E8 Set the X position in L to E8 (the right-hand side).
5FC9 PUSH DE Stash DE and BC on the stack.
5FCA PUSH BC
5FCB CALL DrawCubbyHoleItem Call DrawCubbyHoleItem.
5FCE POP BC Restore BC and DE from the stack.
5FCF POP DE
5FD0 INC DE Move onto the next cubby hole.
5FD1 INC C Increment the row counter by one.
5FD2 LD A,C Loop back to DrawCubbyHoleItems_Right until all five cubby holes down the right-hand side have been drawn (the row counter reaches 06).
5FD3 CP $06
5FD5 JR NZ,DrawCubbyHoleItems_Right
5FD7 RET Return.
Prev: 5FA0 Up: Map Next: 5FD8