Crossfire JXClient, Trunk
R20561
|
Represents a square area of CfMapSquares. More...
Public Member Functions | |
CfMapPatch (@NotNull final CfMap map, final int x0, final int y0) | |
Creates a new (empty) patch. More... | |
void | clearSquare (final int x, final int y) |
Clears the content of one square. More... | |
void | dirty (final int x, final int y) |
Marks a square as dirty. More... | |
int | getColor (final int x, final int y) |
Determines the magic map color value of one square. More... | |
int | getDarkness (final int x, final int y) |
Determines the darkness value of one square. More... | |
Face | getFace (final int x, final int y, final int layer) |
Determines the face of one square. More... | |
CfMapSquare | getHeadMapSquare (final int x, final int y, final int layer) |
Returns the map square of the head of a multi-square object. More... | |
int | getSmooth (final int x, final int y, final int layer) |
Determines the smooth value of one square. More... | |
CfMapSquare | getSquare (final int x, final int y) |
Returns one map square. More... | |
boolean | isFogOfWar (final int x, final int y) |
Determines if a square is not up-to-date. More... | |
boolean | resetFogOfWar (final int x, final int y) |
Returns and reset the "fog-of-war" flag of a square. More... | |
boolean | setColor (final int x, final int y, final int color) |
Sets the magic map color of one square. More... | |
boolean | setDarkness (final int x, final int y, final int darkness) |
Sets the darkness value of one square. More... | |
void | 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. More... | |
int | setSmooth (final int x, final int y, final int layer, final int smooth) |
Sets the smooth value of one square. More... | |
Static Public Attributes | |
static final int | SIZE = 1<<SIZE_LOG |
Size of patches in x- and y-direction. More... | |
static final int | SIZE_LOG = 5 |
Log2 of SIZE. More... | |
Private Attributes | |
final CfMapSquare [][] | square = new CfMapSquare[SIZE][SIZE] |
The array of CfMapSquares. More... | |
Represents a square area of CfMapSquares.
Definition at line 32 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 59 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapPatch.SIZE.
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 82 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.clear().
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 72 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.dirty().
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().
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 104 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.getDarkness().
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().
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().
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 128 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.getSmooth().
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.
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().
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().
boolean 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().
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 93 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.setDarkness().
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().
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 117 of file CfMapPatch.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.setSmooth().
Referenced by com.realtime.crossfire.jxclient.map.CfMap.setSmooth().
|
static |
Size of patches in x- and y-direction.
Definition at line 42 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 37 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 |