Prev: 24234 Up: Map Next: 24283
24264: Command 8 (Or Higher): Single Tile
Used by the routine at PopulateRoomBuffer.
Command 8+: 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 24264 LD A,(HL) Fetch the tile ID from *HL.
24265 INC HL Increment the room data pointer past the tile ID byte.
24266 PUSH HL Stash the room data pointer and tile counter on the stack.
24267 PUSH DE
24268 LD D,0 D=0 (flag: draw tile to room buffer).
24270 CALL Draw_Room_Tile Call Draw_Room_Tile.
24273 POP DE Restore the tile counter and room data pointer from the stack.
24274 POP HL
24275 DEC DE Decrease the tile counter by one.
24276 LD A,D Jump to PopulateRoomBuffer_Error if the tile counter is zero.
24277 OR E
24278 JR Z,PopulateRoomBuffer_Error
24280 JP PopulateRoomBuffer_ParseByte Jump to PopulateRoomBuffer_ParseByte to continue parsing.
Prev: 24234 Up: Map Next: 24283