TileConstants: isConstructed() returns true if tile >= ROADBASE
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@783 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
d60bbad2e1
commit
9c209fa6b2
2 changed files with 7 additions and 2 deletions
|
@ -1106,7 +1106,7 @@ public class Micropolis
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
plevel += getPollutionValue(tile);
|
plevel += getPollutionValue(tile);
|
||||||
if (tile >= ROADBASE)
|
if (isConstructed(tile))
|
||||||
lvflag++;
|
lvflag++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2342,7 +2342,7 @@ public class Micropolis
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int t = getTile(xtem, ytem);
|
int t = getTile(xtem, ytem);
|
||||||
if ((t & LOMASK) >= ROADBASE) {
|
if (isConstructed(t)) {
|
||||||
setTile(xtem, ytem, (char)(t | BULLBIT));
|
setTile(xtem, ytem, (char)(t | BULLBIT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -408,6 +408,11 @@ public class TileConstants
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isConstructed(int tile)
|
||||||
|
{
|
||||||
|
return tile >= 0 && (tile & LOMASK) >= ROADBASE;
|
||||||
|
}
|
||||||
|
|
||||||
static boolean isRiverEdge(int tile)
|
static boolean isRiverEdge(int tile)
|
||||||
{
|
{
|
||||||
return (tile & LOMASK) > 4 && (tile & LOMASK) < 21;
|
return (tile & LOMASK) > 4 && (tile & LOMASK) < 21;
|
||||||
|
|
Reference in a new issue