--- a/src/map.cpp Sun Apr 15 17:04:44 2007 +0000
+++ b/src/map.cpp Sat Apr 21 08:23:57 2007 +0000
@@ -48,12 +48,12 @@
free(_me);
_m = CallocT<Tile>(_map_size);
- _me = CallocT<TileExtended>(_map_size);
+ _me = CallocT<TileExtended>(_map_size);
- /* XXX @todo handle memory shortage more gracefully
- * Maybe some attemps could be made to try with smaller maps down to 64x64
- * Maybe check for available memory before doing the calls, after all, we know how big
- * the map is */
+ /* XXX @todo handle memory shortage more gracefully
+ * Maybe some attemps could be made to try with smaller maps down to 64x64
+ * Maybe check for available memory before doing the calls, after all, we know how big
+ * the map is */
if ((_m == NULL) || (_me == NULL)) error("Failed to allocate memory for the map");
}
@@ -86,9 +86,9 @@
#endif
}
- assert(TileXY(x,y) == TILE_MASK(tile + add));
+ assert(TileXY(x, y) == TILE_MASK(tile + add));
- return TileXY(x,y);
+ return TileXY(x, y);
}
#endif
@@ -98,7 +98,7 @@
/* First shift by 12 to prevent integer overflow for large values of n.
* >>12 is safe since the min mapsize is 64x64
* Add (1<<4)-1 to round upwards. */
- return (n * (MapSize() >> 12) + (1<<4) - 1) >> 4;
+ return (n * (MapSize() >> 12) + (1 << 4) - 1) >> 4;
}
@@ -109,7 +109,7 @@
* Note, not actually taking the full circumference into account,
* just half of it.
* (1<<9) - 1 is there to scale upwards. */
- return (n * (MapSizeX() + MapSizeY()) + (1<<9) - 1) >> 9;
+ return (n * (MapSizeX() + MapSizeY()) + (1 << 9) - 1) >> 9;
}