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

Comparing deliantra/server/random_maps/wall.C (file contents):
Revision 1.42 by root, Fri Jul 2 17:41:24 2010 UTC vs.
Revision 1.43 by root, Fri Jul 2 17:43:16 2010 UTC

21 * 21 *
22 * The authors can be reached via e-mail to <support@deliantra.net> 22 * The authors can be reached via e-mail to <support@deliantra.net>
23 */ 23 */
24 24
25#include <global.h> 25#include <global.h>
26#include <util.h>
26#include <random_map.h> 27#include <random_map.h>
27#include <rproto.h> 28#include <rproto.h>
28 29
29/* Put in the walls and autojoin them. */ 30/* Put in the walls and autojoin them. */
30 31
162 for (int dy = -1; dy <= 1; ++dy) 163 for (int dy = -1; dy <= 1; ++dy)
163 { 164 {
164 int x = i + dx; 165 int x = i + dx;
165 int y = j + dy; 166 int y = j + dy;
166 167
167 if (x >= 0 && x < maze.w 168 if (IN_RANGE_EXC (x, 0, maze.w)
168 && y >= 0 && y < maze.h 169 && IN_RANGE_EXC (y, 0, maze.h)
169 && maze [x][y] != '#') 170 && maze [x][y] != '#')
170 return true; 171 return true;
171 } 172 }
172 173
173 return false; 174 return false;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines