added master drawing function for sprites