Prev: 41170 Up: Map Next: 41214
41196: 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 41196 POP HL Restore the attribute address from the stack.
41197 PUSH BC Stash the width and the number of rows on the stack.
41198 PUSH HL Stash the attribute address on the stack.
41199 PUSH BC Stash the width and the number of rows on the stack again.
41200 LD BC,32 BC=0032.
41203 ADD HL,BC Move down a row.
41204 POP BC Restore the width.
AttrDrawMovingUp_Cell 41205 LD (HL),E Write the attribute of the room to the cell.
41206 INC L Move to the next cell.
41207 DJNZ AttrDrawMovingUp_Cell Decrease the width by one and loop back to AttrDrawMovingUp_Cell until the row is done.
41209 POP HL Restore the attribute address from the stack.
41210 POP BC Restore the width and the number of rows from the stack.
41211 JP AttrDrawUnchanged_Row Jump to AttrDrawUnchanged_Row to set the cells under the entity.
Prev: 41170 Up: Map Next: 41214