(svn r16603) -Codechange: enumify map size limits (based on a patch by Bilbo)
This commit is contained in:
@@ -34,9 +34,9 @@ TileExtended *_me = NULL; ///< Extended Tiles of the map
|
||||
void AllocateMap(uint size_x, uint size_y)
|
||||
{
|
||||
/* Make sure that the map size is within the limits and that
|
||||
* the x axis size is a power of 2. */
|
||||
if (size_x < 64 || size_x > 2048 ||
|
||||
size_y < 64 || size_y > 2048 ||
|
||||
* size of both axes is a power of 2. */
|
||||
if (!IsInsideMM(size_x, MIN_MAP_SIZE, MAX_MAP_SIZE + 1) ||
|
||||
!IsInsideMM(size_y, MIN_MAP_SIZE, MAX_MAP_SIZE + 1) ||
|
||||
(size_x & (size_x - 1)) != 0 ||
|
||||
(size_y & (size_y - 1)) != 0)
|
||||
error("Invalid map size");
|
||||
|
Reference in New Issue
Block a user