Crossfire JXClient, Trunk
|
Public Member Functions | |
CfMapPatch (@NotNull final CfMap map, final int x0, final int y0) | |
void | clearSquare (final int x, final int y) |
void | dirty (final int x, final int y) |
int | getColor (final int x, final int y) |
int | getDarkness (final int x, final int y) |
Face | getFace (final int x, final int y, final int layer) |
CfMapSquare | getHeadMapSquare (final int x, final int y, final int layer) |
int | getSmooth (final int x, final int y, final int layer) |
CfMapSquare | getSquare (final int x, final int y) |
boolean | isFogOfWar (final int x, final int y) |
boolean | resetFogOfWar (final int x, final int y) |
void | setColor (final int x, final int y, final int color) |
boolean | setDarkness (final int x, final int y, final int darkness) |
void | setHeadMapSquare (final int x, final int y, final int layer, @Nullable final CfMapSquare mapSquare, final boolean setAlways) |
int | setSmooth (final int x, final int y, final int layer, final int smooth) |
Static Public Attributes | |
static final int | SIZE = 1<<SIZE_LOG |
static final int | SIZE_LOG = 5 |
Private Attributes | |
final CfMapSquare[][] | square = new CfMapSquare[SIZE][SIZE] |
Represents a square area of CfMapSquares.
Definition at line 33 of file CfMapPatch.java.
com.realtime.crossfire.jxclient.map.CfMapPatch.CfMapPatch | ( | @NotNull final CfMap | map, |
final int | x0, | ||
final int | y0 | ||
) |
Creates a new (empty) patch.
map | the map this map patch is part of |
x0 | the absolute map x-coordinate of the top left corner of this patch |
y0 | the absolute map y-coordinate of the top left corner of this patch |
Definition at line 60 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapPatch.SIZE, and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
void com.realtime.crossfire.jxclient.map.CfMapPatch.clearSquare | ( | final int | x, |
final int | y | ||
) |
Clears the content of one square. Note: the old square content remains available until at least one value will be changed ("fog of war").
x | the x-coordinate of the square |
y | the y-coordinate of the square |
Definition at line 83 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.clear(), and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.clearSquare().
void com.realtime.crossfire.jxclient.map.CfMapPatch.dirty | ( | final int | x, |
final int | y | ||
) |
Marks a square as dirty.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
Definition at line 73 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.dirty(), and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.dirty().
int com.realtime.crossfire.jxclient.map.CfMapPatch.getColor | ( | final int | x, |
final int | y | ||
) |
Determines the magic map color value of one square.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
Definition at line 149 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.getColor(), and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.getColor().
int com.realtime.crossfire.jxclient.map.CfMapPatch.getDarkness | ( | final int | x, |
final int | y | ||
) |
Determines the darkness value of one square.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
Definition at line 105 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.getDarkness(), and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.getDarkness().
Face com.realtime.crossfire.jxclient.map.CfMapPatch.getFace | ( | final int | x, |
final int | y, | ||
final int | layer | ||
) |
Determines the face of one square.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
layer | the layer of the face |
Definition at line 161 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.getFace(), and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.clearSquare(), and com.realtime.crossfire.jxclient.map.CfMap.getFace().
CfMapSquare com.realtime.crossfire.jxclient.map.CfMapPatch.getHeadMapSquare | ( | final int | x, |
final int | y, | ||
final int | layer | ||
) |
Returns the map square of the head of a multi-square object.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
layer | the layer to return the head for |
Definition at line 189 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.getHeadMapSquare(), and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.getHeadMapSquare().
int com.realtime.crossfire.jxclient.map.CfMapPatch.getSmooth | ( | final int | x, |
final int | y, | ||
final int | layer | ||
) |
Determines the smooth value of one square.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
layer | the layer of the square |
Definition at line 129 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.getSmooth(), and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.getSmooth().
CfMapSquare com.realtime.crossfire.jxclient.map.CfMapPatch.getSquare | ( | final int | x, |
final int | y | ||
) |
Returns one map square.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
Definition at line 220 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapPatch.square.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.getMapSquare(), and com.realtime.crossfire.jxclient.map.CfMap.setFaceInternal().
boolean com.realtime.crossfire.jxclient.map.CfMapPatch.isFogOfWar | ( | final int | x, |
final int | y | ||
) |
Determines if a square is not up-to-date.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
Definition at line 199 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.isFogOfWar(), and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.isFogOfWar().
boolean com.realtime.crossfire.jxclient.map.CfMapPatch.resetFogOfWar | ( | final int | x, |
final int | y | ||
) |
Returns and reset the "fog-of-war" flag of a square.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
Definition at line 209 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.resetFogOfWar(), and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
void com.realtime.crossfire.jxclient.map.CfMapPatch.setColor | ( | final int | x, |
final int | y, | ||
final int | color | ||
) |
Sets the magic map color of one square.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
color | the color to set |
Definition at line 139 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.setColor(), and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.setMagicMap().
boolean com.realtime.crossfire.jxclient.map.CfMapPatch.setDarkness | ( | final int | x, |
final int | y, | ||
final int | darkness | ||
) |
Sets the darkness value of one square.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
darkness | the darkness value to set; 0=dark, 255=full bright |
Definition at line 94 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.setDarkness(), and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
void com.realtime.crossfire.jxclient.map.CfMapPatch.setHeadMapSquare | ( | final int | x, |
final int | y, | ||
final int | layer, | ||
@Nullable final CfMapSquare | mapSquare, | ||
final boolean | setAlways | ||
) |
Sets the map square containing the head face for a layer.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
layer | the layer for the new head face between 0
LAYERS-1
|
mapSquare | the map square containing the head face; may be null
|
setAlways | if set, always update the face; if unset, only update when fog-of-war |
Definition at line 176 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.setHeadMapSquare(), and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.setHeadMapSquare().
int com.realtime.crossfire.jxclient.map.CfMapPatch.setSmooth | ( | final int | x, |
final int | y, | ||
final int | layer, | ||
final int | smooth | ||
) |
Sets the smooth value of one square.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
layer | the layer to set |
smooth | the smooth value to set |
Definition at line 118 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.setSmooth(), and com.realtime.crossfire.jxclient.map.CfMapPatch.square.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.setSmooth().
|
static |
Size of patches in x- and y-direction.
Definition at line 43 of file CfMapPatch.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMapPatch.CfMapPatch(), and com.realtime.crossfire.jxclient.map.CfMap.getMapPatch().
|
static |
Log2 of SIZE.
Definition at line 38 of file CfMapPatch.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.map.CfMap.getMapPatch(), and com.realtime.crossfire.jxclient.map.CfMap.increase().
|
private |
The array of CfMapSquares. Elements are never
.
Definition at line 50 of file CfMapPatch.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMapPatch.CfMapPatch(), com.realtime.crossfire.jxclient.map.CfMapPatch.clearSquare(), com.realtime.crossfire.jxclient.map.CfMapPatch.dirty(), com.realtime.crossfire.jxclient.map.CfMapPatch.getColor(), com.realtime.crossfire.jxclient.map.CfMapPatch.getDarkness(), com.realtime.crossfire.jxclient.map.CfMapPatch.getFace(), com.realtime.crossfire.jxclient.map.CfMapPatch.getHeadMapSquare(), com.realtime.crossfire.jxclient.map.CfMapPatch.getSmooth(), com.realtime.crossfire.jxclient.map.CfMapPatch.getSquare(), com.realtime.crossfire.jxclient.map.CfMapPatch.isFogOfWar(), com.realtime.crossfire.jxclient.map.CfMapPatch.resetFogOfWar(), com.realtime.crossfire.jxclient.map.CfMapPatch.setColor(), com.realtime.crossfire.jxclient.map.CfMapPatch.setDarkness(), com.realtime.crossfire.jxclient.map.CfMapPatch.setHeadMapSquare(), and com.realtime.crossfire.jxclient.map.CfMapPatch.setSmooth().