simon-svn: puzzles: simon

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Mon Apr 1 17:23:03 BST 2013


SVN root:       svn://svn.tartarus.org/sgt
Changes by:     simon
Revision:       9800
Date:           2013-04-01 17:23:03 +0100 (Mon, 01 Apr 2013)

Log message (9 lines):
Rewrite trim_rect() for robustness.

The previous version dealt adequately with rectangles _partially_
overlapping the edge of the canvas, but doesn't correctly handle a
rectangle that's completely out of bounds in one direction. Replace
with a complete rewrite which is more easily seen to be correct. Also,
while I'm at it, add a missing condition to draw_update() so that we
don't even bother calling the Javascript half of it on any rectangle
that's been trimmed into nonexistence.

Modified files:
U   puzzles/emcc.c

Links:
http://svn.tartarus.org/sgt/?rev=9800&view=rev
http://svn.tartarus.org/sgt/puzzles/emcc.c?rev=9800&r1=9799&r2=9800



More information about the tartarus-commits mailing list