A bit of sprite rendering logic