![]() |
Routines |
| Prev: 24178 | Up: Map | Next: 24234 |
|
Used by the routine at PopulateRoomBuffer.
Command 1: skip over a number of tile positions without drawing. The following byte specifies how many positions to skip.
|
||||||||||
| Command01_SkipTiles | 24210 | INC HL | Increment the room data pointer by one. | |||||||
| 24211 | LD A,(HL) | Fetch the skip count. | ||||||||
| 24212 | INC HL | Increment the room data pointer past the skip count byte. | ||||||||
| 24213 | LD B,A | Set the skip counter in B. | ||||||||
| SkipTiles_Loop | 24214 | PUSH HL | Stash the room data pointer, tile counter and skip counter on the stack. | |||||||
| 24215 | PUSH DE | |||||||||
| 24216 | PUSH BC | |||||||||
| 24217 | LD D,1 | D=1 (flag: advance position only, don't draw). | ||||||||
| 24219 | CALL Draw_Room_Tile | Call Draw_Room_Tile. | ||||||||
| 24222 | POP BC | Restore the skip counter, tile counter and room data pointer from the stack. | ||||||||
| 24223 | POP DE | |||||||||
| 24224 | POP HL | |||||||||
| 24225 | DEC DE | Decrease the tile counter by one. | ||||||||
| 24226 | LD A,E | Jump to PopulateRoomBuffer_Error if the tile counter is zero. | ||||||||
| 24227 | OR D | |||||||||
| 24228 | JR Z,PopulateRoomBuffer_Error | |||||||||
| 24230 | DJNZ SkipTiles_Loop | Decrease the skip counter by one and loop back to SkipTiles_Loop until all positions are skipped. | ||||||||
| 24232 | JR PopulateRoomBuffer_ParseByte | Jump to PopulateRoomBuffer_ParseByte to continue parsing. | ||||||||
| Prev: 24178 | Up: Map | Next: 24234 |