Prev: 25577 Up: Map Next: 25686
25656: Draw Room Rows
Used by the routine at Draw_Room_Tile.
Draws multiple character rows from the room buffer to the screen buffer. After all rows are drawn, prints the HUD header if it hasn't been drawn yet, and applies random colours to the bottom ground strip.
Input
B Number of rows to draw
HL Pointer to the room buffer
Draw_Room_Rows_Loop 25656 PUSH BC Stash the row counter and room buffer pointer on the stack.
25657 PUSH HL
25658 CALL Draw_Room_Row Call Draw_Room_Row to draw a single character row.
25661 POP HL Restore the room buffer pointer and row counter from the stack.
25662 POP BC
Advance the room buffer pointer to the next character row. Each row is 32 bytes wide; if adding 32 to L overflows, advance H by 8 to move into the next screen third.
25663 LD A,32 Add 32 to L.
25665 ADD A,L
25666 LD L,A
25667 OR A Jump to Draw_Room_Rows_Next if there was no overflow.
25668 JR NZ,Draw_Room_Rows_Next
25670 LD A,8 Add 8 to H.
25672 ADD A,H
25673 LD H,A
Draw_Room_Rows_Next 25674 DJNZ Draw_Room_Rows_Loop Decrease the row counter by one and loop back to Draw_Room_Rows_Loop until all rows have been drawn.
Print the HUD header if the screen hasn't been fully initialised yet.
25676 LD A,(24481) Call Print_HUD_Header if *Screen_Initialised_Flag is unset (HUD header not yet drawn).
25679 OR A
25680 CALL Z,Print_HUD_Header
25683 JP Colour_Ground_Strip Jump to Colour_Ground_Strip.
Prev: 25577 Up: Map Next: 25686