buildings: remove obsolete zonePlop()
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@809 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
889b1d968e
commit
f2069794a8
1 changed files with 0 additions and 42 deletions
|
@ -527,48 +527,6 @@ class MapScanner
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Place a 3x3 zone on to the map, centered on the current location.
|
||||
* Note: nothing is done if part of this zone is off the edge
|
||||
* of the map or is being flooded or radioactive.
|
||||
*
|
||||
* @param base The first/north-western tile value for this zone.
|
||||
* @return true iff the zone was actually placed.
|
||||
*/
|
||||
boolean zonePlop(int base)
|
||||
{
|
||||
//FIXME- does this function have a caller that actually
|
||||
//pays attention to the return value?
|
||||
|
||||
if (!city.testBounds(xpos-1, ypos-1))
|
||||
return false;
|
||||
if (!city.testBounds(xpos+1, ypos+1))
|
||||
return false;
|
||||
|
||||
for (int y = ypos-1; y <= ypos+1; y++)
|
||||
{
|
||||
for (int x = xpos-1; x <= xpos+1; x++)
|
||||
{
|
||||
if (isIndestructible2(city.getTile(x,y))) {
|
||||
// radioactive, on fire, or flooded
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int y = ypos-1; y <= ypos+1; y++)
|
||||
{
|
||||
for (int x = xpos-1; x <= xpos+1; x++)
|
||||
{
|
||||
city.setTile(x, y, (char)(base | (x == xpos && y == ypos ? BULLBIT : 0)));
|
||||
base++;
|
||||
}
|
||||
}
|
||||
|
||||
setZonePower();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the current tile is the key tile of a "special" zone.
|
||||
* @param powerOn indicates whether the building has power
|
||||
|
|
Reference in a new issue