tileset: Refactored drawtiles for efficiency