src/map.cpp
changeset 10438 51bff16a04c9
parent 9592 835ccfd13653
equal deleted inserted replaced
10437:6d64230b9fb9 10438:51bff16a04c9
    33  */
    33  */
    34 void AllocateMap(uint size_x, uint size_y)
    34 void AllocateMap(uint size_x, uint size_y)
    35 {
    35 {
    36 	/* Make sure that the map size is within the limits and that
    36 	/* Make sure that the map size is within the limits and that
    37 	 * the x axis size is a power of 2. */
    37 	 * the x axis size is a power of 2. */
    38 	if (size_x < 64 || size_x > 2048 ||
    38 	if (size_x < 4 || size_x > 2048 ||
    39 			size_y < 64 || size_y > 2048 ||
    39 			size_y < 4 || size_y > 2048 ||
    40 			(size_x & (size_x - 1)) != 0 ||
    40 			(size_x & (size_x - 1)) != 0 ||
    41 			(size_y & (size_y - 1)) != 0)
    41 			(size_y & (size_y - 1)) != 0)
    42 		error("Invalid map size");
    42 		error("Invalid map size");
    43 
    43 
    44 	DEBUG(map, 1, "Allocating map of size %dx%d", size_x, size_y);
    44 	DEBUG(map, 1, "Allocating map of size %dx%d", size_x, size_y);