Prev: 41060 Up: Map Next: 41101
41082: Draw Attributes Unchanged
The attribute routine for an entity which has not moved. Every cell under the entity is set to the attribute of the entity, a row at a time working up from the bottom row.
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
AttrDrawUnchanged 41082 POP HL Restore the attribute address from the stack.
This entry point is used by the routine at AttrDrawMovingUp.
AttrDrawUnchanged_Row 41083 PUSH BC Stash the width and the number of rows on the stack.
41084 PUSH HL Stash the attribute address on the stack.
AttrDrawUnchanged_Cell 41085 LD (HL),D Write the attribute of the entity to the cell.
41086 INC L Move to the next cell.
41087 DJNZ AttrDrawUnchanged_Cell Decrease the width by one and loop back to AttrDrawUnchanged_Cell until the row is done.
41089 POP HL Restore the attribute address from the stack.
41090 LD BC,32 BC=0032.
41093 AND A Move up a row.
41094 SBC HL,BC
41096 POP BC Restore the width and the number of rows from the stack.
41097 DEC C Decrease the number of rows by one and loop back to AttrDrawUnchanged_Row until all of the rows have been set.
41098 JR NZ,AttrDrawUnchanged_Row
41100 RET Return.
Prev: 41060 Up: Map Next: 41101