Added support for sprite wrapping.