Prevent writing to areas which are out of bounds.
Fix bugs in drawing. Restrict painting of tiles to those tiles actually
in the draw area.