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:
parent
6794888026
commit
906a0c4570
2 changed files with 7 additions and 1 deletions
|
@ -87,7 +87,7 @@ class MapScanner
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cchr9 >= SOMETINYEXP && cchr9 <= LASTTINYEXP)
|
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));
|
||||||
|
|
|
@ -341,6 +341,12 @@ public class TileConstants
|
||||||
((cell & LOMASK) <= LASTRUBBLE));
|
((cell & LOMASK) <= LASTRUBBLE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isTinyExplosion(int tile)
|
||||||
|
{
|
||||||
|
int tmp = tile & LOMASK;
|
||||||
|
return (tmp >= SOMETINYEXP && tmp <= LASTTINYEXP);
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isTree(char cell)
|
public static boolean isTree(char cell)
|
||||||
{
|
{
|
||||||
return (((cell & LOMASK) >= WOODS_LOW) &&
|
return (((cell & LOMASK) >= WOODS_LOW) &&
|
||||||
|
|
Reference in a new issue