equal
deleted
inserted
replaced
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); |