![]() |
Routines |
| Prev: 41082 | Up: Map | Next: 41123 |
|
The attribute routine for an entity which has moved right. Each row of cells under the entity is set to the attribute of the entity, and the cell just to the left of it (which the entity has left) is put back to the attribute of the room.
|
||||||||||||||
| AttrDrawMovingRight | 41101 | POP HL | Restore the attribute address from the stack. | |||||||||||
|
This entry point is used by the routine at AttrDrawMovingUpRight.
|
||||||||||||||
| AttrDrawMovingRight_Row | 41102 | PUSH BC | Stash the width and the number of rows on the stack. | |||||||||||
| 41103 | PUSH HL | Stash the attribute address on the stack. | ||||||||||||
| 41104 | DEC L | Move to the cell on the left. | ||||||||||||
| 41105 | LD (HL),E | Write the attribute of the room to the cell. | ||||||||||||
| 41106 | INC L | Move back to the first cell. | ||||||||||||
| AttrDrawMovingRight_Cell | 41107 | LD (HL),D | Write the attribute of the entity to the cell. | |||||||||||
| 41108 | INC L | Move to the next cell. | ||||||||||||
| 41109 | DJNZ AttrDrawMovingRight_Cell | Decrease the width by one and loop back to AttrDrawMovingRight_Cell until the row is done. | ||||||||||||
| 41111 | POP HL | Restore the attribute address from the stack. | ||||||||||||
| 41112 | LD BC,32 | BC=0032. | ||||||||||||
| 41115 | AND A | Move up a row. | ||||||||||||
| 41116 | SBC HL,BC | |||||||||||||
| 41118 | POP BC | Restore the width and the number of rows from the stack. | ||||||||||||
| 41119 | DEC C | Decrease the number of rows by one and loop back to AttrDrawMovingRight_Row until all of the rows have been set. | ||||||||||||
| 41120 | JR NZ,AttrDrawMovingRight_Row | |||||||||||||
| 41122 | RET | Return. | ||||||||||||
| Prev: 41082 | Up: Map | Next: 41123 |