Some optimisations on the sprite drawing.