dannycalleri/toast — pull request #3 by indigodarkwolf (2013-07-28 20:01:29+00:00)
Title: Implementing graphics::relative and TF::camera

Implementing references to graphics::relative and TF::camera to emulate
Flashpunk's behavior.

Various render functions now offset the instance's render position by
TF::camera's coordinates. This is what Flashpunk does.

Graphic::relative now switches whether the Graphic instance offsets its
rendered position by Graphic::point. This is similar to what Flashpunk
does. Flashpunk always adds the point member, regardless of the relative
member, but only updates the point member of graphics objects in
appropriate parent instances when the graphic's relative flag is set and
otherwise resets the graphic's point member to zeroes. In Toast, it is
up to the Graphic instance's parent to update Graphic::point in the
appropriate update(), as with Flashpunk.

Entity::update() has been updated to adjust Graphic::point instead of
Graphic::x and Graphic::y for Entity::graphic. This is what Flashpunk
does.

Fixed various places where a Graphic's active member was being checked
incorrectly, and places where that member wasn't being checked.

Changed the demo to enlarge the level Tilemap for camera testing, add
camera controls, and added a graphic showing controls. The demo can now
be exited with the Escape key.

Fixed several places that were producing type mismatch warnings.