![]() |
Routines |
| Prev: 24480 | Up: Map | Next: 24536 |
|
Used by the routine at LevelNew.
Draws the contents of all ten cubby holes: first the five down the left-hand side (X position 8) and then the five down the right-hand side (X position 232). Each hole is drawn by DrawCubbyHoleItem.
|
||||||||
| DrawCubbyHoleItems | 24496 | LD C,1 | Start with the first row of shelves by setting the row counter in C to 1. | |||||
| 24498 | LD DE,24099 | Point DE at the first cubby hole (CubbyHoles). | ||||||
|
Draw the left-hand side.
|
||||||||
| DrawCubbyHoleItems_Left | 24501 | LD L,8 | Set the X position in L to 8 (the left-hand side). | |||||
| 24503 | PUSH DE | Stash DE and BC on the stack. | ||||||
| 24504 | PUSH BC | |||||||
| 24505 | CALL DrawCubbyHoleItem | Call DrawCubbyHoleItem. | ||||||
| 24508 | POP BC | Restore BC and DE from the stack. | ||||||
| 24509 | POP DE | |||||||
| 24510 | INC DE | Move onto the next cubby hole. | ||||||
| 24511 | INC C | Increment the row counter by one. | ||||||
| 24512 | 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 6). | ||||||
| 24513 | CP 6 | |||||||
| 24515 | JR NZ,DrawCubbyHoleItems_Left | |||||||
|
Draw the right-hand side.
|
||||||||
| 24517 | LD C,1 | Reset the row counter in C to 1 for the right-hand side. | ||||||
| DrawCubbyHoleItems_Right | 24519 | LD L,232 | Set the X position in L to 232 (the right-hand side). | |||||
| 24521 | PUSH DE | Stash DE and BC on the stack. | ||||||
| 24522 | PUSH BC | |||||||
| 24523 | CALL DrawCubbyHoleItem | Call DrawCubbyHoleItem. | ||||||
| 24526 | POP BC | Restore BC and DE from the stack. | ||||||
| 24527 | POP DE | |||||||
| 24528 | INC DE | Move onto the next cubby hole. | ||||||
| 24529 | INC C | Increment the row counter by one. | ||||||
| 24530 | 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 6). | ||||||
| 24531 | CP 6 | |||||||
| 24533 | JR NZ,DrawCubbyHoleItems_Right | |||||||
| 24535 | RET | Return. | ||||||
| Prev: 24480 | Up: Map | Next: 24536 |