tiles: helper function- isTinyExplosion

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@680 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
jason@long.name 2013-05-28 01:52:36 +00:00
parent 6794888026
commit 906a0c4570
2 changed files with 7 additions and 1 deletions

View file

@ -87,7 +87,7 @@ class MapScanner
return;
}
if (cchr9 >= SOMETINYEXP && cchr9 <= LASTTINYEXP)
if (isTinyExplosion(cchr))
{
// clear AniRubble
city.setTile(xpos, ypos, (char)(RUBBLE + PRNG.nextInt(4) + BULLBIT));

View file

@ -341,6 +341,12 @@ public class TileConstants
((cell & LOMASK) <= LASTRUBBLE));
}
public static boolean isTinyExplosion(int tile)
{
int tmp = tile & LOMASK;
return (tmp >= SOMETINYEXP && tmp <= LASTTINYEXP);
}
public static boolean isTree(char cell)
{
return (((cell & LOMASK) >= WOODS_LOW) &&