![]() |
Routines |
Prev: 43183 | Up: Map | Next: 43264 |
Used by the routine at DrawRoom.
|
||||
First off, blank the screen.
|
||||
ClearRoomBuffer | 43224 | LD B,24 | Clear the bottom 24 lines using CL_LINE. | |
43226 | CALL 3652 | |||
Clear the room buffer.
|
||||
43229 | LD BC,800 | Set a counter in BC with the length of the room buffer (800 bytes). | ||
43232 | LD HL,41412 | HL=BufferRoom. | ||
ClearRoomBuffer_Loop | 43235 | LD A,0 | Write 0 to *HL. | |
43237 | LD (HL),A | |||
43238 | INC HL | Increment the room buffer pointer by one. | ||
43239 | DEC BC | Decrease the room buffer counter by one. | ||
43240 | LD A,B | Jump to ClearRoomBuffer_Loop until the room buffer counter is zero. | ||
43241 | OR C | |||
43242 | JR NZ,ClearRoomBuffer_Loop | |||
Clear the room attribute buffer. Setting each value to the INK value of the PAPER colour (?)
|
||||
43244 | LD BC,800 | BC=Counter; the length of the room attribute buffer (800). | ||
ClearRoomAttributeBuffer_Loop | 43247 | LD A,(23505) | A=*ActiveRoom_PaperColour. | |
43250 | SLA A | Convert a PAPER value (using bits 3, 4 and 5) to an INK value (shifted left to bits 0, 1 and 2). | ||
43252 | SLA A | |||
43254 | SLA A | |||
43256 | LD (HL),A | Write A to *HL. | ||
43257 | INC HL | Increment the room attribute buffer pointer by one. | ||
43258 | DEC BC | Decrease the room attribute buffer counter by one. | ||
43259 | LD A,B | Jump to ClearRoomAttributeBuffer_Loop until the room attribute buffer counter is zero. | ||
43260 | OR C | |||
43261 | JR NZ,ClearRoomAttributeBuffer_Loop | |||
43263 | RET | Return. |
Prev: 43183 | Up: Map | Next: 43264 |