![]() |
Routines |
| Prev: 41214 | Up: Map | Next: 41255 |
|
The attribute routine for an entity which has moved down and left. Each row of cells under the entity is set to the attribute of the entity, and the cell to the right of it is put back to the attribute of the room. So is the row above the entity, with one more cell to the right.
|
||||||||||||||
| AttrDrawMovingDownLeft | 41232 | POP HL | Restore the attribute address from the stack. | |||||||||||
| AttrDrawMovingDownLeft_Row | 41233 | PUSH BC | Stash the width and the number of rows on the stack. | |||||||||||
| 41234 | PUSH HL | Stash the attribute address on the stack. | ||||||||||||
| AttrDrawMovingDownLeft_Cell | 41235 | LD (HL),D | Write the attribute of the entity to the cell. | |||||||||||
| 41236 | INC L | Move to the next cell. | ||||||||||||
| 41237 | DJNZ AttrDrawMovingDownLeft_Cell | Decrease the width by one and loop back to AttrDrawMovingDownLeft_Cell until the row is done. | ||||||||||||
| 41239 | LD (HL),E | Write the attribute of the room to the cell on the right. | ||||||||||||
| 41240 | POP HL | Restore the attribute address from the stack. | ||||||||||||
| 41241 | LD BC,32 | BC=0032. | ||||||||||||
| 41244 | AND A | Move up a row. | ||||||||||||
| 41245 | SBC HL,BC | |||||||||||||
| 41247 | POP BC | Restore the width and the number of rows from the stack. | ||||||||||||
| 41248 | DEC C | Decrease the number of rows by one and loop back to AttrDrawMovingDownLeft_Row until all of the rows have been set. | ||||||||||||
| 41249 | JR NZ,AttrDrawMovingDownLeft_Row | |||||||||||||
| 41251 | INC B | Add one more cell to the width. | ||||||||||||
| 41252 | JP AttrDrawMovingDown_Above | Jump to AttrDrawMovingDown_Above to put the row above back to the attribute of the room. | ||||||||||||
| Prev: 41214 | Up: Map | Next: 41255 |