Prev: 5E72 Up: Map Next: 5EAA
5E92: Command 01: Skip Tiles
Used by the routine at PopulateRoomBuffer.
Command 01: skip over a number of tile positions without drawing. The following byte specifies how many positions to skip.
Input
DE Tile counter
HL The room data pointer
Command01_SkipTiles 5E92 INC HL Increment the room data pointer by one.
5E93 LD A,(HL) Fetch the skip count.
5E94 INC HL Increment the room data pointer past the skip count byte.
5E95 LD B,A Set the skip counter in B.
SkipTiles_Loop 5E96 PUSH HL Stash the room data pointer, tile counter and skip counter on the stack.
5E97 PUSH DE
5E98 PUSH BC
5E99 LD D,$01 D=01 (flag: advance position only, don't draw).
5E9B CALL Draw_Room_Tile Call Draw_Room_Tile.
5E9E POP BC Restore the skip counter, tile counter and room data pointer from the stack.
5E9F POP DE
5EA0 POP HL
5EA1 DEC DE Decrease the tile counter by one.
5EA2 LD A,E Jump to PopulateRoomBuffer_Error if the tile counter is zero.
5EA3 OR D
5EA4 JR Z,PopulateRoomBuffer_Error
5EA6 DJNZ SkipTiles_Loop Decrease the skip counter by one and loop back to SkipTiles_Loop until all positions are skipped.
5EA8 JR PopulateRoomBuffer_ParseByte Jump to PopulateRoomBuffer_ParseByte to continue parsing.
Prev: 5E72 Up: Map Next: 5EAA