cleanup: avoid comparisons with tile constants

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@681 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
jason@long.name 2013-05-28 01:55:00 +00:00
parent 906a0c4570
commit 9ff3e14eb5

View file

@ -62,36 +62,33 @@ class MapScanner
cchr9 = (char) (cchr & LOMASK);
if (cchr9 >= FLOOD)
if (city.newPower && ((cchr & CONDBIT) != 0))
{
if (city.newPower && ((cchr & CONDBIT) != 0))
{
setZonePower();
}
setZonePower();
}
if (isRoad(cchr))
{
doRoad();
return;
}
if (isRoad(cchr))
{
doRoad();
return;
}
if (isZoneCenter(cchr))
{
doZone();
return;
}
if (isZoneCenter(cchr))
{
doZone();
return;
}
if (isRail(cchr))
{
doRail();
return;
}
if (isRail(cchr))
{
doRail();
return;
}
if (isTinyExplosion(cchr))
{
// clear AniRubble
city.setTile(xpos, ypos, (char)(RUBBLE + PRNG.nextInt(4) + BULLBIT));
}
if (isTinyExplosion(cchr))
{
// clear AniRubble
city.setTile(xpos, ypos, (char)(RUBBLE + PRNG.nextInt(4) + BULLBIT));
}
}