Prev: 5EAA Up: Map Next: 5EDB
5EC8: Command 08 (Or Higher): Single Tile
Used by the routine at PopulateRoomBuffer.
Command 08+: draw a single tile. The command byte itself is the tile ID to draw.
Input
DE Tile counter
HL Pointer to the room data
Command08Plus_SingleTile 5EC8 LD A,(HL) Fetch the tile ID from *HL.
5EC9 INC HL Increment the room data pointer past the tile ID byte.
5ECA PUSH HL Stash the room data pointer and tile counter on the stack.
5ECB PUSH DE
5ECC LD D,$00 D=00 (flag: draw tile to room buffer).
5ECE CALL Draw_Room_Tile Call Draw_Room_Tile.
5ED1 POP DE Restore the tile counter and room data pointer from the stack.
5ED2 POP HL
5ED3 DEC DE Decrease the tile counter by one.
5ED4 LD A,D Jump to PopulateRoomBuffer_Error if the tile counter is zero.
5ED5 OR E
5ED6 JR Z,PopulateRoomBuffer_Error
5ED8 JP PopulateRoomBuffer_ParseByte Jump to PopulateRoomBuffer_ParseByte to continue parsing.
Prev: 5EAA Up: Map Next: 5EDB