tiles.rc: rewrite isOverWater() to use the new "over water" attribute
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@885 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
0654013c3e
commit
685ccd22d5
1 changed files with 2 additions and 25 deletions
|
@ -300,31 +300,8 @@ public class TileConstants
|
|||
|
||||
public static boolean isOverWater(int tile)
|
||||
{
|
||||
// Note: BRWV will be converted to BRWH by the following
|
||||
// function.
|
||||
int tmp = neutralizeRoad(tile & LOMASK);
|
||||
switch (tmp)
|
||||
{
|
||||
case HBRIDGE:
|
||||
case VBRIDGE:
|
||||
case BRWV:
|
||||
case BRWH:
|
||||
case HBRDG0:
|
||||
case HBRDG1:
|
||||
case HBRDG2:
|
||||
case HBRDG3:
|
||||
case VBRDG0:
|
||||
case VBRDG1:
|
||||
case VBRDG2:
|
||||
case VBRDG3:
|
||||
case HPOWER:
|
||||
case VPOWER:
|
||||
case HRAIL:
|
||||
case VRAIL:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
TileSpec spec = Tiles.get(tile & LOMASK);
|
||||
return spec != null && spec.overWater;
|
||||
}
|
||||
|
||||
public static boolean isRubble(int cell)
|
||||
|
|
Reference in a new issue