Prev: F6AA Up: Map Next: F6E1
F6C6: Write Tile
Used by the routines at JumpTable_WriteTile, Draw_Box, Print_Clipped and Print_Sprite.
Writes one tile and its attribute into the room buffers.
Write_Tile F6C6 PUSH AF Stash the tile, DE and HL on the stack.
F6C7 PUSH DE
F6C8 PUSH HL
F6C9 LD HL,($6412) Increase *Print_BufferOffset by one.
F6CC INC HL
F6CD LD ($6412),HL
F6D0 LD DE,$5DCD Point HL at that Buffer_RoomTiles cell.
F6D3 ADD HL,DE
F6D4 LD (HL),A
F6D5 LD DE,$0320 Point HL at the matching Buffer_RoomAttributes cell.
F6D8 ADD HL,DE
F6D9 LD A,($5C8F) Write *ATTR_T there.
F6DC LD (HL),A
F6DD POP HL Restore the stashed registers from the stack.
F6DE POP DE
F6DF POP AF
F6E0 RET Return.
Prev: F6AA Up: Map Next: F6E1