Prev: A0D2 Up: Map Next: A0FE
A0EC: Draw Attributes Moving Up
The attribute routine for an entity which has moved up. The row just below the entity (which the entity has left) is put back to the attribute of the room, then each row of cells under the entity is set to the attribute of the entity.
Input
B The width of the sprite in cells
C The number of rows of cells
D The attribute of the entity
E The attribute of the room
AttrDrawMovingUp A0EC POP HL Restore the attribute address from the stack.
A0ED PUSH BC Stash the width and the number of rows on the stack.
A0EE PUSH HL Stash the attribute address on the stack.
A0EF PUSH BC Stash the width and the number of rows on the stack again.
A0F0 LD BC,$0020 BC=0020.
A0F3 ADD HL,BC Move down a row.
A0F4 POP BC Restore the width.
AttrDrawMovingUp_Cell A0F5 LD (HL),E Write the attribute of the room to the cell.
A0F6 INC L Move to the next cell.
A0F7 DJNZ AttrDrawMovingUp_Cell Decrease the width by one and loop back to AttrDrawMovingUp_Cell until the row is done.
A0F9 POP HL Restore the attribute address from the stack.
A0FA POP BC Restore the width and the number of rows from the stack.
A0FB JP AttrDrawUnchanged_Row Jump to AttrDrawUnchanged_Row to set the cells under the entity.
Prev: A0D2 Up: Map Next: A0FE