diff options
author | celestar <celestar@openttd.org> | 2005-07-16 23:47:37 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2005-07-16 23:47:37 +0000 |
commit | 9ca761b06534ed191b0624a6c7049db296997a73 (patch) | |
tree | b32b3e56573203f32982f2fc2b3966529a6d1857 /main_gui.c | |
parent | 64f6839816221873b9a5327fe038533a7d3b8a98 (diff) | |
download | openttd-9ca761b06534ed191b0624a6c7049db296997a73.tar.xz |
(svn r2595) -Codechange: Introduced "IsSteepTileh" to find whether a tile is steep
(i.e. spans two height levels) and use it throughout the code.
-Codechange: Add CanBuildDepotByTileh to find if a tile is suitable to
build a depot on it. Wraps some bitmagic which seems quite unreadable at
first glance
Diffstat (limited to 'main_gui.c')
-rw-r--r-- | main_gui.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main_gui.c b/main_gui.c index 9a62ef065..337f2a128 100644 --- a/main_gui.c +++ b/main_gui.c @@ -1218,7 +1218,7 @@ static void PlaceProc_LightHouse(TileIndex tile) TileInfo ti; FindLandscapeHeightByTile(&ti, tile); - if (ti.type != MP_CLEAR || (ti.tileh & 0x10)) + if (IsTileType(tile, MP_CLEAR) || IsSteepTileh(ti.tileh)) return; ModifyTile(tile, MP_SETTYPE(MP_UNMOVABLE) | MP_MAP5, 1); @@ -1230,7 +1230,7 @@ static void PlaceProc_Transmitter(TileIndex tile) TileInfo ti; FindLandscapeHeightByTile(&ti, tile); - if (ti.type != MP_CLEAR || (ti.tileh & 0x10)) + if (IsTileType(tile, MP_CLEAR) || IsSteepTileh(ti.tileh)) return; ModifyTile(tile, MP_SETTYPE(MP_UNMOVABLE) | MP_MAP5, 0); |