diff options
author | tron <tron@openttd.org> | 2005-01-28 15:31:04 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-28 15:31:04 +0000 |
commit | 3617d243189ec7076bec045d04e4a96ff55a8de8 (patch) | |
tree | efbaeb3426c01178731116a7fca722dc190ac78f /map.h | |
parent | 4e6d6578e4e4d17712acff4b0c1f749f405a815d (diff) | |
download | openttd-3617d243189ec7076bec045d04e4a96ff55a8de8.tar.xz |
(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.
Diffstat (limited to 'map.h')
-rw-r--r-- | map.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |