Separate sprite code