chiark / gitweb /
Rework the Loopy grid drawing algorithm so that it doesn't assume when
authorSimon Tatham <anakin@pobox.com>
Sat, 2 Apr 2011 15:19:29 +0000 (15:19 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 2 Apr 2011 15:19:29 +0000 (15:19 +0000)
commit00a313f2d6d96257fd634c743b609cb5b6465e3c
treedb8fc05e759c3ed1784f9f6671e270ef93eba0f8
parent3c26b651a690ae35879afeaae1a1ab831ddbfd63
Rework the Loopy grid drawing algorithm so that it doesn't assume when
it clears a clipping region that it knows what features will need
redrawing in that region. Instead, I've moved all the clip/unclip/draw
functionality out into a game_redraw_in_rect() function which checks
_everything_ on the grid to see if it lies in the region.

As far as I can tell the effect only shows up in grid types that
aren't checked in, but it makes the code look nicer too.

(It would be nicer still to avoid the brute-force loop over the whole
grid checking it against the bounding box, particularly when we're
drawing in multiple bounding boxes. But this will do for the moment.)

[originally from svn r9138]
loopy.c