1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00

(svn r2758) Add the AB() macro to add a value to a bit range and use it in a few places, also make use of GB and SB nearby

This commit is contained in:
tron
2005-07-30 09:29:20 +00:00
parent 79620db9be
commit 9b676d2cd9
3 changed files with 9 additions and 16 deletions

View File

@@ -485,11 +485,8 @@ static void TileLoop_Trees(TileIndex tile)
TileLoopClearHelper(tile);
/* increase counter */
{
uint16 m2 = _m[tile].m2;
_m[tile].m2 = m2 = (m2 & 0xF0) | ((m2 + 1) & 0xF);
if ((m2 & 0xF) != 0) return;
}
AB(_m[tile].m2, 0, 4, 1);
if (GB(_m[tile].m2, 0, 4) != 0) return;
m5 = _m[tile].m5;
if (GB(m5, 0, 3) == 3) {