Spritemap logic. Only theory, untested.