Prev: A08D Up: Map Next: A0B7
A0A3: Draw Attributes Moving Left
The attribute routine for an entity which has moved left. Each row of cells under the entity is set to the attribute of the entity, and the cell just to the right of it (which the entity has left) is put back to the attribute of the room.
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
AttrDrawMovingLeft A0A3 POP HL Restore the attribute address from the stack.
This entry point is used by the routine at AttrDrawMovingUpLeft.
AttrDrawMovingLeft_Row A0A4 PUSH BC Stash the width and the number of rows on the stack.
A0A5 PUSH HL Stash the attribute address on the stack.
AttrDrawMovingLeft_Cell A0A6 LD (HL),D Write the attribute of the entity to the cell.
A0A7 INC L Move to the next cell.
A0A8 DJNZ AttrDrawMovingLeft_Cell Decrease the width by one and loop back to AttrDrawMovingLeft_Cell until the row is done.
A0AA LD (HL),E Write the attribute of the room to the cell on the right.
A0AB POP HL Restore the attribute address from the stack.
A0AC LD BC,$0020 BC=0020.
A0AF AND A Move up a row.
A0B0 SBC HL,BC
A0B2 POP BC Restore the width and the number of rows from the stack.
A0B3 DEC C Decrease the number of rows by one and loop back to AttrDrawMovingLeft_Row until all of the rows have been set.
A0B4 JR NZ,AttrDrawMovingLeft_Row
A0B6 RET Return.
Prev: A08D Up: Map Next: A0B7