diff options
| author | Simon Tatham <anakin@pobox.com> | 2004-05-12 18:28:11 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2004-05-12 18:28:11 +0000 |
| commit | 3f9e52dae2ec8638fc6e6c8d4a2da73fc9adca72 (patch) | |
| tree | 3bfda1a733d3b3d3aea3a865f3218687ac9fa783 /rect.c | |
| parent | 0579ca1005ba961cf0f1c38210d259edbb54a97b (diff) | |
| download | puzzles-3f9e52dae2ec8638fc6e6c8d4a2da73fc9adca72.zip puzzles-3f9e52dae2ec8638fc6e6c8d4a2da73fc9adca72.tar.gz puzzles-3f9e52dae2ec8638fc6e6c8d4a2da73fc9adca72.tar.bz2 puzzles-3f9e52dae2ec8638fc6e6c8d4a2da73fc9adca72.tar.xz | |
Remove vestigial code from the previous attempt at clever grid
generation. Grid generation should now be orders of magnitude faster
at large sizes.
[originally from svn r4220]
Diffstat (limited to 'rect.c')
| -rw-r--r-- | rect.c | 19 |
1 files changed, 0 insertions, 19 deletions
@@ -216,25 +216,6 @@ static struct rectlist *get_rectlist(game_params *params, int *grid) continue; for (x = 0; x <= params->w - rw; x++) for (y = 0; y <= params->h - rh; y++) { - /* - * We have a candidate rectangle placement. See - * if it's unobstructed. - */ - int xx, yy; - int ok; - - ok = TRUE; - for (xx = x; xx < x+rw; xx++) - for (yy = y; yy < y+rh; yy++) - if (index(params, grid, xx, yy) >= 0) { - ok = FALSE; - goto break1; /* break both loops at once */ - } - break1: - - if (!ok) - continue; - if (nrects >= rectsize) { rectsize = nrects + 256; rects = sresize(rects, rectsize, struct rect); |