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);
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue