mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-15 08:35:11 +01:00
(svn r16551) -Codechange: use shift instead of multiplication in TileXY()
This commit is contained in:
parent
ec78a39f9e
commit
d6996c110a
@ -161,7 +161,7 @@ typedef int32 TileIndexDiff;
|
|||||||
*/
|
*/
|
||||||
static inline TileIndex TileXY(uint x, uint y)
|
static inline TileIndex TileXY(uint x, uint y)
|
||||||
{
|
{
|
||||||
return (y * MapSizeX()) + x;
|
return (y << MapLogX()) + x;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user