diff options
author | Johannes E. Krause <j.k@eclipso.de> | 2019-01-13 20:52:04 +0100 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-01-24 21:17:17 +0100 |
commit | f0290d5de77176718153a2d078bee7dae57c16dc (patch) | |
tree | ac6a55827750a9937ab49bb328476df4e023a0a9 /src/landscape.h | |
parent | 43852baace470938c71147d9029b4679d62a05a8 (diff) | |
download | openttd-f0290d5de77176718153a2d078bee7dae57c16dc.tar.xz |
Codechange: Add InverseRemapCoords2 function for remapping viewport coordinates to underlying tile coordinates (Patch by adf88, #6583)
Diffstat (limited to 'src/landscape.h')
-rw-r--r-- | src/landscape.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/landscape.h b/src/landscape.h index cb08d9d9e..cf366e09c 100644 --- a/src/landscape.h +++ b/src/landscape.h @@ -108,6 +108,7 @@ static inline Point RemapCoords2(int x, int y) * @param y Y coordinate of the 2D coordinate. * @return X and Y components of equivalent world or tile coordinate. * @note Inverse of #RemapCoords function. Smaller values may get rounded. + * @see InverseRemapCoords2 */ static inline Point InverseRemapCoords(int x, int y) { @@ -115,6 +116,8 @@ static inline Point InverseRemapCoords(int x, int y) return pt; } +Point InverseRemapCoords2(int x, int y, bool clamp_to_map = false); + uint ApplyFoundationToSlope(Foundation f, Slope *s); /** * Applies a foundation to a slope. |