TileConstants: make isIndestructible()
continuing the trend of moving tile number logic to centralized location git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@798 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
8635eb2d4e
commit
aa40fc8760
2 changed files with 8 additions and 5 deletions
|
@ -746,13 +746,10 @@ class MapScanner
|
||||||
if (isAnimated(thCh))
|
if (isAnimated(thCh))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
thCh &= LOMASK;
|
if (!isIndestructible(thCh))
|
||||||
if (thCh < RUBBLE || thCh >= ROADBASE)
|
|
||||||
{ //not rubble, radiactive, on fire or flooded
|
{ //not rubble, radiactive, on fire or flooded
|
||||||
|
|
||||||
city.setTile(xx,yy,(char)
|
city.setTile(xx,yy,(char) zoneBase);
|
||||||
(zoneBase)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -336,6 +336,12 @@ public class TileConstants
|
||||||
return (tmp >= FIREBASE && tmp < ROADBASE);
|
return (tmp >= FIREBASE && tmp < ROADBASE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isIndestructible(int tile)
|
||||||
|
{
|
||||||
|
int tmp = tile & LOMASK;
|
||||||
|
return tmp >= RUBBLE && tmp < ROADBASE;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isRadioactive(int tile)
|
public static boolean isRadioactive(int tile)
|
||||||
{
|
{
|
||||||
int tmp = tile & LOMASK;
|
int tmp = tile & LOMASK;
|
||||||
|
|
Reference in a new issue