ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/random_maps/layout.C
(Generate patch)

Comparing deliantra/server/random_maps/layout.C (file contents):
Revision 1.19 by root, Sat Jul 3 19:22:21 2010 UTC vs.
Revision 1.20 by root, Sun Jul 4 00:27:14 2010 UTC

812 for (int n = w * h / 30 + 1; n--; ) 812 for (int n = w * h / 30 + 1; n--; )
813 { 813 {
814 int rw = rmg_rndm (6, 10); 814 int rw = rmg_rndm (6, 10);
815 int rh = rmg_rndm (6, 10); 815 int rh = rmg_rndm (6, 10);
816 816
817 if (rw > w || rh > h)
818 continue;
819
817 int rx = rmg_rndm (0, w - rw); 820 int rx = rmg_rndm (0, w - rw);
818 int ry = rmg_rndm (0, h - rh); 821 int ry = rmg_rndm (0, h - rh);
819 822
820 rect (rx, ry, rx + rw, ry + rh, '#'); 823 rect (rx, ry, rx + rw, ry + rh, '#');
821 fill_rect (rx + 1, ry + 1, rx + rw - 1, ry + rh - 1, 0); 824 fill_rect (rx + 1, ry + 1, rx + rw - 1, ry + rh - 1, 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines