summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-10 13:44:37 +0000
committersmatz <smatz@openttd.org>2009-06-10 13:44:37 +0000
commitd6996c110add9e1619162405f899c528294f5893 (patch)
tree04db3a60bfd7a4cae571b8872eb36b272c9d9d87 /src
parentec78a39f9e242930f3f83a3cb44858d392b3786f (diff)
downloadopenttd-d6996c110add9e1619162405f899c528294f5893.tar.xz
(svn r16551) -Codechange: use shift instead of multiplication in TileXY()
Diffstat (limited to 'src')
-rw-r--r--src/map_func.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map_func.h b/src/map_func.h
index 265b88741..537b1f9a7 100644
--- a/src/map_func.h
+++ b/src/map_func.h
@@ -161,7 +161,7 @@ typedef int32 TileIndexDiff;
*/
static inline TileIndex TileXY(uint x, uint y)
{
- return (y * MapSizeX()) + x;
+ return (y << MapLogX()) + x;
}
/**