diff options
author | tron <tron@openttd.org> | 2005-07-21 06:31:02 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-07-21 06:31:02 +0000 |
commit | d71788c40206fa35b792d34769fde7768b4456c1 (patch) | |
tree | dc5c9c74cec9bfa29f94932a20193cd902a80f15 /landscape.c | |
parent | 5c5840417e2f03514c51098f4786c6c1d6030b59 (diff) | |
download | openttd-d71788c40206fa35b792d34769fde7768b4456c1.tar.xz |
(svn r2660) Get rid of some more shifting/anding/casting
Diffstat (limited to 'landscape.c')
-rw-r--r-- | landscape.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/landscape.c b/landscape.c index 2d6b772e8..b1de88086 100644 --- a/landscape.c +++ b/landscape.c @@ -685,8 +685,8 @@ TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng) uint32 r = Random(); return TILE_MASK(TileXY( - TileX(a) + ((byte)r * rn * 2 >> 8) - rn, - TileY(a) + ((byte)(r >> 8) * rn * 2 >> 8) - rn + TileX(a) + (GB(r, 0, 8) * rn * 2 >> 8) - rn, + TileY(a) + (GB(r, 8, 8) * rn * 2 >> 8) - rn )); } |