another set of changes from cc2d-xna.