Methapolis  0.27
 All Classes Namespaces Files Functions Variables Enumerator
micropolisj.engine.TileConstants Class Reference

Static Public Member Functions

static boolean canAutoBulldozeRRW (int tileValue)
static boolean canAutoBulldozeZ (char tileValue)
static String getTileBehavior (int tile)
static int getDescriptionNumber (int tile)
static int getPollutionValue (int tile, Micropolis city)
static boolean isAnimated (int tile)
static boolean isArsonable (int tile)
static boolean isBridge (int tile)
static boolean isCombustible (int tile)
static boolean isConductive (int tile)
static boolean isIndestructible (int tile)
static boolean isIndestructible2 (int tile)
static boolean isOverWater (int tile)
static boolean isRubble (int tile)
static boolean isTree (char tile)
static boolean isVulnerable (int tile)
static boolean checkWet (int tile)
static CityDimension getZoneSizeFor (int tile)
static boolean isConstructed (int tile)
static boolean isDozeable (int tile)
static boolean isRoad (int tile)
static boolean isRoadAny (int tile)
static boolean isRoadDynamic (int tile)
static boolean roadConnectsEast (int tile)
static boolean roadConnectsNorth (int tile)
static boolean roadConnectsSouth (int tile)
static boolean roadConnectsWest (int tile)
static boolean isRail (int tile)
static boolean isRailAny (int tile)
static boolean isRailDynamic (int tile)
static boolean railConnectsEast (int tile)
static boolean railConnectsNorth (int tile)
static boolean railConnectsSouth (int tile)
static boolean railConnectsWest (int tile)
static boolean isWireDynamic (int tile)
static boolean wireConnectsEast (int tile)
static boolean wireConnectsNorth (int tile)
static boolean wireConnectsSouth (int tile)
static boolean wireConnectsWest (int tile)
static boolean isCommercialZone (int tile)
static boolean isHospitalOrChurch (int tile)
static boolean isIndustrialZone (int tile)
static boolean isResidentialClear (int tile)
static boolean isResidentialZone (int tile)
static boolean isResidentialZoneAny (int tile)
static boolean isZoneAny (int tile)
static boolean isZoneCenter (int tile)
static char neutralizeRoad (int tile)
static int residentialZonePop (int tile)
static int commercialZonePop (int tile)
static int industrialZonePop (int tile)

Static Public Attributes

static final short CLEAR = -1
static final char DIRT = 0
static final char LIGHTNINGBOLT = 827
static final char LAST_TILE = 1005
static final char PWRBIT = 32768
static final char ALLBITS = 64512
static final char LOMASK = 1023

Private Member Functions

 TileConstants ()

Static Private Attributes

static final char ROADS3 = 68
static final char ROADS4 = 69
static final char ROADS5 = 70
static final char ROADS6 = 71
static final char ROADS7 = 72
static final char ROADS8 = 73
static final char ROADS9 = 74
static final char ROADS10 = 75
static final char LASTROAD = 206
static final char LVPOWER3 = 213
static final char LVPOWER4 = 214
static final char LVPOWER5 = 215
static final char LVPOWER6 = 216
static final char LVPOWER7 = 217
static final char LVPOWER8 = 218
static final char LVPOWER9 = 219
static final char LVPOWER10 = 220
static final char LVRAIL3 = 229
static final char LVRAIL4 = 230
static final char LVRAIL5 = 231
static final char LVRAIL6 = 232
static final char LVRAIL7 = 233
static final char LVRAIL8 = 234
static final char LVRAIL9 = 235
static final char LVRAIL10 = 236
static final char LASTTINYEXP = 867

Detailed Description

Contains symbolic names of certain tile values, and helper functions to test tile attributes. Attributes of tiles that are interesting:

  • ZONE - the special tile for a zone
  • ANIM - the tile animates
  • BULL - is bulldozable
  • BURN - is combustible
  • COND - can conduct power
  • Road - traffic
  • Rail - railroad
  • Floodable - subject to floods
  • Wet
  • Rubble
  • Tree
  • OverWater
  • Arsonable
  • Vulnerable - vulnerable to earthquakes
  • Bridge
  • AutoDozeRRW - automatically bulldoze when placing Road/Rail/Wire
  • AutoDozeZ - automatically bulldoze when placing Zone

Definition at line 35 of file TileConstants.java.

Constructor & Destructor Documentation

micropolisj.engine.TileConstants.TileConstants ( )
private

Definition at line 190 of file TileConstants.java.

Member Function Documentation

static boolean micropolisj.engine.TileConstants.canAutoBulldozeRRW ( int  tileValue)
static

Checks whether the tile can be auto-bulldoz80,0 ed for placement of road, rail, or wire.

Definition at line 197 of file TileConstants.java.

References micropolisj.engine.TileConstants.LASTTINYEXP.

static boolean micropolisj.engine.TileConstants.canAutoBulldozeZ ( char  tileValue)
static

Checks whether the tile can be auto-bulldozed for placement of a zone.

Definition at line 205 of file TileConstants.java.

References micropolisj.engine.TileConstants.LASTTINYEXP.

static boolean micropolisj.engine.TileConstants.checkWet ( int  tile)
static

Definition at line 327 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

static int micropolisj.engine.TileConstants.commercialZonePop ( int  tile)
static

Determine the population level of a Commercial zone tile. The input tile MAY be an empty zone.

Returns
int between 0 and 5.

Definition at line 590 of file TileConstants.java.

References micropolisj.engine.Tiles.get(), micropolisj.engine.TileSpec.getPopulation(), and micropolisj.engine.TileConstants.LOMASK.

Here is the call graph for this function:

static int micropolisj.engine.TileConstants.getDescriptionNumber ( int  tile)
static

Definition at line 230 of file TileConstants.java.

References micropolisj.engine.Tiles.get(), micropolisj.engine.TileSpec.getDescriptionNumber(), and micropolisj.engine.TileConstants.LOMASK.

Here is the call graph for this function:

static int micropolisj.engine.TileConstants.getPollutionValue ( int  tile,
Micropolis  city 
)
static

Definition at line 242 of file TileConstants.java.

References micropolisj.engine.Tiles.get(), micropolisj.engine.TileSpec.getPollutionValue(), and micropolisj.engine.TileConstants.LOMASK.

Here is the call graph for this function:

static String micropolisj.engine.TileConstants.getTileBehavior ( int  tile)
static

Definition at line 222 of file TileConstants.java.

References micropolisj.engine.Tiles.get(), micropolisj.engine.TileSpec.getAttribute(), and micropolisj.engine.TileConstants.LOMASK.

Here is the call graph for this function:

static CityDimension micropolisj.engine.TileConstants.getZoneSizeFor ( int  tile)
static
static int micropolisj.engine.TileConstants.industrialZonePop ( int  tile)
static

Determine the population level of an Industrial zone tile. The input tile MAY be an empty zone.

Returns
int between 0 and 4.

Definition at line 603 of file TileConstants.java.

References micropolisj.engine.Tiles.get(), micropolisj.engine.TileSpec.getPopulation(), and micropolisj.engine.TileConstants.LOMASK.

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.isAnimated ( int  tile)
static

Definition at line 249 of file TileConstants.java.

References micropolisj.engine.Tiles.get(), and micropolisj.engine.TileConstants.LOMASK.

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.isArsonable ( int  tile)
static

Definition at line 257 of file TileConstants.java.

References micropolisj.engine.TileConstants.isZoneCenter(), and micropolisj.engine.TileConstants.LOMASK.

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.isBridge ( int  tile)
static

Definition at line 264 of file TileConstants.java.

References micropolisj.engine.TileConstants.isCombustible(), and micropolisj.engine.TileConstants.isRoad().

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.isCombustible ( int  tile)
static

Definition at line 268 of file TileConstants.java.

References micropolisj.engine.Tiles.get(), and micropolisj.engine.TileConstants.LOMASK.

Referenced by micropolisj.engine.TileConstants.isBridge().

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.isCommercialZone ( int  tile)
static
static boolean micropolisj.engine.TileConstants.isConductive ( int  tile)
static
static boolean micropolisj.engine.TileConstants.isConstructed ( int  tile)
static

Definition at line 341 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

static boolean micropolisj.engine.TileConstants.isDozeable ( int  tile)
static

Definition at line 353 of file TileConstants.java.

References micropolisj.engine.Tiles.get(), and micropolisj.engine.TileConstants.LOMASK.

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.isHospitalOrChurch ( int  tile)
static

Definition at line 489 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

static boolean micropolisj.engine.TileConstants.isIndestructible ( int  tile)
static

Used in repairZone().

Definition at line 283 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

static boolean micropolisj.engine.TileConstants.isIndestructible2 ( int  tile)
static

Used in zonePlop().

Definition at line 290 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

static boolean micropolisj.engine.TileConstants.isIndustrialZone ( int  tile)
static

Checks whether the tile is defined with the "industrial-zone" attribute. Note: the old version of this function erroneously included the coal power plant smoke as an industrial zone.

Definition at line 500 of file TileConstants.java.

References micropolisj.engine.Tiles.get(), micropolisj.engine.TileSpec.getBooleanAttribute(), micropolisj.engine.TileConstants.LOMASK, and micropolisj.engine.TileSpec.owner.

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.isOverWater ( int  tile)
static

Definition at line 296 of file TileConstants.java.

References micropolisj.engine.Tiles.get(), and micropolisj.engine.TileConstants.LOMASK.

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.isRail ( int  tile)
static

Definition at line 412 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

static boolean micropolisj.engine.TileConstants.isRailAny ( int  tile)
static

Definition at line 418 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

static boolean micropolisj.engine.TileConstants.isRailDynamic ( int  tile)
static
static boolean micropolisj.engine.TileConstants.isResidentialClear ( int  tile)
static

Definition at line 513 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

static boolean micropolisj.engine.TileConstants.isResidentialZone ( int  tile)
static

Note: does not include hospital/church.

See Also
isHospitalOrChurch

Definition at line 524 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

static boolean micropolisj.engine.TileConstants.isResidentialZoneAny ( int  tile)
static
static boolean micropolisj.engine.TileConstants.isRoad ( int  tile)
static

Note: does not include rail/road tiles.

See Also
isRoadAny

Definition at line 371 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

Referenced by micropolisj.engine.TileConstants.isBridge().

static boolean micropolisj.engine.TileConstants.isRoadAny ( int  tile)
static

Definition at line 377 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

static boolean micropolisj.engine.TileConstants.isRoadDynamic ( int  tile)
static

Checks whether the tile is a road that will automatically change to connect to neighboring roads.

Definition at line 387 of file TileConstants.java.

References micropolisj.engine.TileConstants.neutralizeRoad().

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.isRubble ( int  tile)
static

Definition at line 303 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

static boolean micropolisj.engine.TileConstants.isTree ( char  tile)
static

Definition at line 309 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

static boolean micropolisj.engine.TileConstants.isVulnerable ( int  tile)
static

Definition at line 316 of file TileConstants.java.

References micropolisj.engine.TileConstants.isZoneCenter(), and micropolisj.engine.TileConstants.LOMASK.

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.isWireDynamic ( int  tile)
static
static boolean micropolisj.engine.TileConstants.isZoneAny ( int  tile)
static

Tile represents a part of any sort of building.

Definition at line 545 of file TileConstants.java.

References micropolisj.engine.TileConstants.LOMASK.

static boolean micropolisj.engine.TileConstants.isZoneCenter ( int  tile)
static
static boolean micropolisj.engine.TileConstants.railConnectsEast ( int  tile)
static

Definition at line 430 of file TileConstants.java.

References micropolisj.engine.TileConstants.neutralizeRoad().

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.railConnectsNorth ( int  tile)
static

Definition at line 435 of file TileConstants.java.

References micropolisj.engine.TileConstants.neutralizeRoad().

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.railConnectsSouth ( int  tile)
static

Definition at line 440 of file TileConstants.java.

References micropolisj.engine.TileConstants.neutralizeRoad().

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.railConnectsWest ( int  tile)
static

Definition at line 445 of file TileConstants.java.

References micropolisj.engine.TileConstants.neutralizeRoad().

Here is the call graph for this function:

static int micropolisj.engine.TileConstants.residentialZonePop ( int  tile)
static

Determine the population level of a Residential zone tile. Note: the input tile MUST be a full-size res zone, it cannot be an empty zone.

Returns
int multiple of 8 between 16 and 40.

Definition at line 577 of file TileConstants.java.

References micropolisj.engine.Tiles.get(), micropolisj.engine.TileSpec.getPopulation(), and micropolisj.engine.TileConstants.LOMASK.

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.roadConnectsEast ( int  tile)
static

Definition at line 392 of file TileConstants.java.

References micropolisj.engine.TileConstants.neutralizeRoad().

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.roadConnectsNorth ( int  tile)
static

Definition at line 397 of file TileConstants.java.

References micropolisj.engine.TileConstants.neutralizeRoad().

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.roadConnectsSouth ( int  tile)
static

Definition at line 402 of file TileConstants.java.

References micropolisj.engine.TileConstants.neutralizeRoad().

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.roadConnectsWest ( int  tile)
static

Definition at line 407 of file TileConstants.java.

References micropolisj.engine.TileConstants.neutralizeRoad().

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.wireConnectsEast ( int  tile)
static

Definition at line 456 of file TileConstants.java.

References micropolisj.engine.TileConstants.isConductive(), and micropolisj.engine.TileConstants.neutralizeRoad().

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.wireConnectsNorth ( int  tile)
static

Definition at line 461 of file TileConstants.java.

References micropolisj.engine.TileConstants.isConductive(), and micropolisj.engine.TileConstants.neutralizeRoad().

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.wireConnectsSouth ( int  tile)
static

Definition at line 466 of file TileConstants.java.

References micropolisj.engine.TileConstants.isConductive(), and micropolisj.engine.TileConstants.neutralizeRoad().

Here is the call graph for this function:

static boolean micropolisj.engine.TileConstants.wireConnectsWest ( int  tile)
static

Definition at line 471 of file TileConstants.java.

References micropolisj.engine.TileConstants.isConductive(), and micropolisj.engine.TileConstants.neutralizeRoad().

Here is the call graph for this function:

Member Data Documentation

final char micropolisj.engine.TileConstants.ALLBITS = 64512
static

Definition at line 187 of file TileConstants.java.

final short micropolisj.engine.TileConstants.CLEAR = -1
static

Definition at line 39 of file TileConstants.java.

final char micropolisj.engine.TileConstants.DIRT = 0
static

Definition at line 40 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LAST_TILE = 1005
static

Definition at line 159 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LASTROAD = 206
staticprivate

Definition at line 80 of file TileConstants.java.

Referenced by micropolisj.engine.TileConstants.neutralizeRoad().

final char micropolisj.engine.TileConstants.LASTTINYEXP = 867
staticprivate
final char micropolisj.engine.TileConstants.LIGHTNINGBOLT = 827
static

Definition at line 141 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LOMASK = 1023
static

Definition at line 188 of file TileConstants.java.

Referenced by micropolisj.engine.TileConstants.checkWet(), micropolisj.util.Utilities.codePlayerID(), micropolisj.engine.TileConstants.commercialZonePop(), micropolisj.engine.TileConstants.getDescriptionNumber(), micropolisj.engine.TileConstants.getPollutionValue(), micropolisj.engine.TileConstants.getTileBehavior(), micropolisj.engine.TileConstants.getZoneSizeFor(), micropolisj.engine.TileConstants.industrialZonePop(), micropolisj.engine.TileConstants.isAnimated(), micropolisj.engine.TileConstants.isArsonable(), micropolisj.engine.TileConstants.isCombustible(), micropolisj.engine.TileConstants.isCommercialZone(), micropolisj.engine.TileConstants.isConductive(), micropolisj.engine.TileConstants.isConstructed(), micropolisj.engine.TileConstants.isDozeable(), micropolisj.engine.TileConstants.isHospitalOrChurch(), micropolisj.engine.TileConstants.isIndestructible(), micropolisj.engine.TileConstants.isIndestructible2(), micropolisj.engine.TileConstants.isIndustrialZone(), micropolisj.engine.TileConstants.isOverWater(), micropolisj.engine.TileConstants.isRail(), micropolisj.engine.TileConstants.isRailAny(), micropolisj.engine.TileConstants.isRailDynamic(), micropolisj.engine.TileConstants.isResidentialClear(), micropolisj.engine.TileConstants.isResidentialZone(), micropolisj.engine.TileConstants.isResidentialZoneAny(), micropolisj.engine.TileConstants.isRoad(), micropolisj.engine.TileConstants.isRoadAny(), micropolisj.engine.TileConstants.isRubble(), micropolisj.engine.TileConstants.isTree(), micropolisj.engine.TileConstants.isVulnerable(), micropolisj.engine.TileConstants.isWireDynamic(), micropolisj.engine.TileConstants.isZoneAny(), micropolisj.engine.TileConstants.isZoneCenter(), micropolisj.engine.TileConstants.neutralizeRoad(), and micropolisj.engine.TileConstants.residentialZonePop().

final char micropolisj.engine.TileConstants.LVPOWER10 = 220
staticprivate

Definition at line 95 of file TileConstants.java.

Referenced by micropolisj.engine.TileConstants.isWireDynamic().

final char micropolisj.engine.TileConstants.LVPOWER3 = 213
staticprivate

Definition at line 88 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LVPOWER4 = 214
staticprivate

Definition at line 89 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LVPOWER5 = 215
staticprivate

Definition at line 90 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LVPOWER6 = 216
staticprivate

Definition at line 91 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LVPOWER7 = 217
staticprivate

Definition at line 92 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LVPOWER8 = 218
staticprivate

Definition at line 93 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LVPOWER9 = 219
staticprivate

Definition at line 94 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LVRAIL10 = 236
staticprivate

Definition at line 113 of file TileConstants.java.

Referenced by micropolisj.engine.TileConstants.isRailDynamic().

final char micropolisj.engine.TileConstants.LVRAIL3 = 229
staticprivate

Definition at line 106 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LVRAIL4 = 230
staticprivate

Definition at line 107 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LVRAIL5 = 231
staticprivate

Definition at line 108 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LVRAIL6 = 232
staticprivate

Definition at line 109 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LVRAIL7 = 233
staticprivate

Definition at line 110 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LVRAIL8 = 234
staticprivate

Definition at line 111 of file TileConstants.java.

final char micropolisj.engine.TileConstants.LVRAIL9 = 235
staticprivate

Definition at line 112 of file TileConstants.java.

final char micropolisj.engine.TileConstants.PWRBIT = 32768
static

Definition at line 180 of file TileConstants.java.

Referenced by micropolisj.util.Utilities.getPlayerID().

final char micropolisj.engine.TileConstants.ROADS10 = 75
staticprivate

Definition at line 72 of file TileConstants.java.

final char micropolisj.engine.TileConstants.ROADS3 = 68
staticprivate

Definition at line 65 of file TileConstants.java.

final char micropolisj.engine.TileConstants.ROADS4 = 69
staticprivate

Definition at line 66 of file TileConstants.java.

final char micropolisj.engine.TileConstants.ROADS5 = 70
staticprivate

Definition at line 67 of file TileConstants.java.

final char micropolisj.engine.TileConstants.ROADS6 = 71
staticprivate

Definition at line 68 of file TileConstants.java.

final char micropolisj.engine.TileConstants.ROADS7 = 72
staticprivate

Definition at line 69 of file TileConstants.java.

final char micropolisj.engine.TileConstants.ROADS8 = 73
staticprivate

Definition at line 70 of file TileConstants.java.

final char micropolisj.engine.TileConstants.ROADS9 = 74
staticprivate

Definition at line 71 of file TileConstants.java.


The documentation for this class was generated from the following file: