(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
These scale a number relative to the map size/circumference. Use them to scale the amount of map objects. Of course at the moment they return just the input, because there are no bigger/smaller maps yet.
This commit is contained in:
4
map.h
4
map.h
@@ -26,6 +26,10 @@ static inline uint MapMaxY(void) { return MapSizeY() - 1; }
|
||||
/* The number of tiles in the map */
|
||||
static inline uint MapSize(void) { return MapSizeX() * MapSizeY(); }
|
||||
|
||||
// Scale a number relative to the map size
|
||||
uint ScaleByMapSize(uint); // Scale relative to the number of tiles
|
||||
uint ScaleByMapSize1D(uint); // Scale relative to the circumference of the map
|
||||
|
||||
typedef uint32 TileIndex;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user