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:
parent
906a0c4570
commit
9ff3e14eb5
1 changed files with 22 additions and 25 deletions
|
@ -62,36 +62,33 @@ class MapScanner
|
||||||
|
|
||||||
cchr9 = (char) (cchr & LOMASK);
|
cchr9 = (char) (cchr & LOMASK);
|
||||||
|
|
||||||
if (cchr9 >= FLOOD)
|
if (city.newPower && ((cchr & CONDBIT) != 0))
|
||||||
{
|
{
|
||||||
if (city.newPower && ((cchr & CONDBIT) != 0))
|
setZonePower();
|
||||||
{
|
}
|
||||||
setZonePower();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isRoad(cchr))
|
if (isRoad(cchr))
|
||||||
{
|
{
|
||||||
doRoad();
|
doRoad();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isZoneCenter(cchr))
|
if (isZoneCenter(cchr))
|
||||||
{
|
{
|
||||||
doZone();
|
doZone();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isRail(cchr))
|
if (isRail(cchr))
|
||||||
{
|
{
|
||||||
doRail();
|
doRail();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isTinyExplosion(cchr))
|
if (isTinyExplosion(cchr))
|
||||||
{
|
{
|
||||||
// clear AniRubble
|
// clear AniRubble
|
||||||
city.setTile(xpos, ypos, (char)(RUBBLE + PRNG.nextInt(4) + BULLBIT));
|
city.setTile(xpos, ypos, (char)(RUBBLE + PRNG.nextInt(4) + BULLBIT));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue