tiles: transfer ZONEBIT knowledge to tiles.rc

and synthesize ZONEBIT when saving (for compatibility)

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@740 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
jason@long.name 2013-07-20 21:10:29 +00:00
parent 9bf2e91783
commit 91b3736886
8 changed files with 83 additions and 70 deletions

View file

@ -164,7 +164,7 @@ public class MicropolisDrawingArea extends JComponent
{
int cell = m.getTile(x,y);
if (blinkUnpoweredZones &&
(cell & ZONEBIT) != 0 &&
isZoneCenter(cell) &&
(cell & PWRBIT) == 0)
{
unpoweredZones.add(new Point(x,y));

View file

@ -256,7 +256,7 @@ public class OverlayMapView extends JComponent
if ((rawTile & LOMASK) <= 63) {
return rawTile & LOMASK;
}
else if ((rawTile & ZONEBIT) != 0) {
else if (isZoneCenter(rawTile)) {
// zone
pix = ((rawTile & PWRBIT) != 0) ? POWERED : UNPOWERED;
}