Crossfire JXClient, Trunk
R20561
|
Represents a map (as seen by the client). More...
Public Member Functions | |
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 single square as dirty. More... | |
int | getColor (final int x, final int y) |
Returns the magic map color value of one square. More... | |
int | getDarkness (final int x, final int y) |
Returns the darkness value of one square. More... | |
Set< CfMapSquare > | getDirtyMapSquares () |
Returns the dirty map squares. 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... | |
CfMapSquare | getMapSquare (final int x, final int y) |
Returns a map square. More... | |
CfMapSquare | getMapSquareUnlessDirty (final int x, final int y) |
Returns a map square. More... | |
int | getOffsetX () |
Returns the offset to convert an absolute x-coordinate of a map square (CfMapSquare#getX() to a relative x-coordinate. More... | |
int | getOffsetY () |
Returns the offset to convert an absolute y-coordinate of a map square (CfMapSquare#getY() to a relative y-coordinate. More... | |
int | getSmooth (final int x, final int y, final int layer) |
Returns the smooth value of one square. More... | |
boolean | isFogOfWar (final int x, final int y) |
Determines if the tile is not up-to-date. More... | |
boolean | processMapScroll (final int dx, final int dy, final int width, final int height) |
Processes a map scroll command. More... | |
void | reset (final int mapWidth, final int mapHeight) |
Clears the map contents. More... | |
void | setDarkness (final int x, final int y, final int darkness) |
Sets the darkness value of one square. More... | |
void | setFace (final int x, final int y, final int layer, @Nullable final Face face) |
Sets the face of one square. More... | |
void | setMagicMap (final int x0, final int y0, final byte[][] data) |
Sets the magic map color of one square. More... | |
void | setSmooth (final int x, final int y, final int layer, final int smooth) |
Sets the smooth value of one square. More... | |
void | squareModified (@NotNull final CfMapSquare mapSquare) |
Marks a CfMapSquare as dirty. More... | |
void | squarePendingFace (final int x, final int y, final int faceNum) |
Marks a CfMapSquare as containing a pending face. More... | |
void | updateFace (final int faceNum, final int width, final int height) |
Processes an updated face image. More... | |
Private Member Functions | |
CfMapPatch [][] | copyPatches (final int newWidth, final int newHeight, final int offsetX, final int offsetY, final int height, final int width) |
Returns a copy of a rectangular area of patch. More... | |
void | dirtyFace (final int x, final int y, final int layer, @NotNull final Face face) |
Marks one face as "dirty". More... | |
void | expandFace (final int x, final int y, final int layer, @NotNull final Face face, @NotNull final CfMapSquare oldMapSquare, @Nullable final CfMapSquare newMapSquare) |
Adds or removes "head" pointer to/from tail-parts of a face. More... | |
CfMapPatch | expandTo (final int x, final int y) |
(Possibly) expands the defined area of the map to a given position. More... | |
CfMapPatch | getMapPatch (final int x, final int y) |
Checks if a given position is within the defined map area. More... | |
void | increase (final int dx, final int dy) |
Increases the defined area of the map. More... | |
void | scroll (final int dx, final int dy) |
Scrolls the map. More... | |
void | setFaceInternal (final int x, final int y, final int layer, @Nullable final Face face) |
Sets the face 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... | |
Static Private Member Functions | |
static int | size (final int min, final int max) |
Calculates the number of patches needed to hold tiles between two patch coordinates. More... | |
Private Attributes | |
final Set< CfMapSquare > | dirtyMapSquares = new HashSet<>() |
The "dirty" map squares that have been modified. More... | |
int | maxPx = -1 |
The right edge of the defined patches in patch. More... | |
int | maxPy = -1 |
The bottom edge of the defined patches in patch. More... | |
int | maxX = -1 |
The right edge of the defined tiles. More... | |
int | maxY = -1 |
The bottom edge of the defined tiles. More... | |
int | minPx |
The left edge of the defined patches in patch. More... | |
int | minPy |
The top edge of the defined patches in patch. More... | |
int | minX |
The left edge of the defined tiles. More... | |
int | minY |
The top edge of the defined tiles. More... | |
int | ox |
Result values for getMapPatch(int, int) and expandTo(int, int). More... | |
int | oy |
Result values for getMapPatch(int, int) and expandTo(int, int). More... | |
CfMapPatch [][] | patch |
Array of (possibly) defined squares. More... | |
int | patchX |
Left edge of viewable area. More... | |
int | patchY |
Top edge of viewable area. More... | |
final Map< Integer, Collection< CfMapSquare > > | pendingFaceSquares = new HashMap<>() |
The map squares containing pending faces. More... | |
Represents a map (as seen by the client).
A map is a grid in which CfMapSquares can be stored.
The map will be automatically enlarged by accesses to new squares. Not yet set squares are considered dark.
All accesses must be synchronized on the map instance.
Definition at line 45 of file CfMap.java.
void com.realtime.crossfire.jxclient.map.CfMap.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 390 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapPatch.clearSquare(), com.realtime.crossfire.jxclient.map.CfMap.dirtyFace(), com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.map.CfMapPatch.getFace(), and com.realtime.crossfire.jxclient.protocol.Map2.NUM_LAYERS.
Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterState.mapClear(), com.realtime.crossfire.jxclient.map.CfMap.processMapScroll(), and com.realtime.crossfire.jxclient.map.CfMap.reset().
|
private |
Returns a copy of a rectangular area of patch.
newWidth | the width of the new area |
newHeight | the height of the new area |
offsetX | the x-offset into the new area |
offsetY | the y-offset into the new area |
height | the height of the area to copy |
width | the width of the area to copy |
Definition at line 717 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.increase().
void com.realtime.crossfire.jxclient.map.CfMap.dirty | ( | final int | x, |
final int | y | ||
) |
Marks a single square as dirty.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
Definition at line 407 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapPatch.dirty(), and com.realtime.crossfire.jxclient.map.CfMap.expandTo().
Referenced by com.realtime.crossfire.jxclient.map.CfMap.dirtyFace(), com.realtime.crossfire.jxclient.map.CfMap.setFace(), and com.realtime.crossfire.jxclient.map.CfMap.updateFace().
|
private |
Marks one face as "dirty".
This function is called when the head part becomes a fog-of-war tile. This means the face has to be redrawn.
x | the x-coordinate of the tail part of the face |
y | the y-coordinate of the tail part of the face |
layer | the layer of the face |
face | the face to mark dirty |
Definition at line 324 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.dirty(), com.realtime.crossfire.jxclient.map.CfMap.isFogOfWar(), and com.realtime.crossfire.jxclient.map.CfMap.setHeadMapSquare().
Referenced by com.realtime.crossfire.jxclient.map.CfMap.clearSquare().
|
private |
Adds or removes "head" pointer to/from tail-parts of a face.
x | the x-coordinate of the tail part to expand |
y | the y-coordinate of the tail part to expand |
layer | the layer to expand |
face | the face to expand |
oldMapSquare | the map square of the tail part |
newMapSquare | the map square of the tail part to add pointers, or null |
Definition at line 300 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.getHeadMapSquare(), and com.realtime.crossfire.jxclient.map.CfMap.setHeadMapSquare().
Referenced by com.realtime.crossfire.jxclient.map.CfMap.setFaceInternal().
|
private |
(Possibly) expands the defined area of the map to a given position.
x | the x-coordinate to expand the defined area to |
y | the y-coordinate to expand the defined area to |
Definition at line 491 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.getMapPatch(), com.realtime.crossfire.jxclient.map.CfMap.increase(), com.realtime.crossfire.jxclient.map.CfMap.minPy, com.realtime.crossfire.jxclient.map.CfMap.patchX, and com.realtime.crossfire.jxclient.map.CfMapPatch.SIZE_LOG.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.clearSquare(), com.realtime.crossfire.jxclient.map.CfMap.dirty(), com.realtime.crossfire.jxclient.map.CfMap.getMapSquare(), com.realtime.crossfire.jxclient.map.CfMap.setDarkness(), com.realtime.crossfire.jxclient.map.CfMap.setFace(), com.realtime.crossfire.jxclient.map.CfMap.setFaceInternal(), com.realtime.crossfire.jxclient.map.CfMap.setHeadMapSquare(), com.realtime.crossfire.jxclient.map.CfMap.setMagicMap(), and com.realtime.crossfire.jxclient.map.CfMap.setSmooth().
int com.realtime.crossfire.jxclient.map.CfMap.getColor | ( | final int | x, |
final int | y | ||
) |
Returns 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 243 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.DEFAULT_COLOR, com.realtime.crossfire.jxclient.map.CfMapPatch.getColor(), and com.realtime.crossfire.jxclient.map.CfMap.getMapPatch().
int com.realtime.crossfire.jxclient.map.CfMap.getDarkness | ( | final int | x, |
final int | y | ||
) |
Returns the darkness value of one square.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
Definition at line 175 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.DEFAULT_DARKNESS, com.realtime.crossfire.jxclient.map.CfMapPatch.getDarkness(), and com.realtime.crossfire.jxclient.map.CfMap.getMapPatch().
Set<CfMapSquare> com.realtime.crossfire.jxclient.map.CfMap.getDirtyMapSquares | ( | ) |
Returns the dirty map squares.
The result may be modified by the caller.
Definition at line 759 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.dirtyMapSquares.
Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterState.mapEnd().
Face com.realtime.crossfire.jxclient.map.CfMap.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 348 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.DEFAULT_FACE, com.realtime.crossfire.jxclient.map.CfMapPatch.getFace(), and com.realtime.crossfire.jxclient.map.CfMap.getMapPatch().
Referenced by com.realtime.crossfire.jxclient.map.CfMap.updateFace().
CfMapSquare com.realtime.crossfire.jxclient.map.CfMap.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 378 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapPatch.getHeadMapSquare(), and com.realtime.crossfire.jxclient.map.CfMap.getMapPatch().
Referenced by com.realtime.crossfire.jxclient.map.CfMap.expandFace().
|
private |
Checks if a given position is within the defined map area.
Returns additional information in ox and oy.
x | the x-coordinate to check |
y | the y-coordinate to check |
Definition at line 433 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.minPx, com.realtime.crossfire.jxclient.map.CfMap.minPy, com.realtime.crossfire.jxclient.map.CfMap.patchX, com.realtime.crossfire.jxclient.map.CfMap.patchY, com.realtime.crossfire.jxclient.map.CfMapPatch.SIZE, and com.realtime.crossfire.jxclient.map.CfMapPatch.SIZE_LOG.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.map.CfMap.getColor(), com.realtime.crossfire.jxclient.map.CfMap.getDarkness(), com.realtime.crossfire.jxclient.map.CfMap.getFace(), com.realtime.crossfire.jxclient.map.CfMap.getHeadMapSquare(), com.realtime.crossfire.jxclient.map.CfMap.getSmooth(), and com.realtime.crossfire.jxclient.map.CfMap.isFogOfWar().
CfMapSquare com.realtime.crossfire.jxclient.map.CfMap.getMapSquare | ( | final int | x, |
final int | y | ||
) |
Returns a map square.
x | the x-coordinate |
y | the y-coordinate |
Definition at line 668 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.expandTo(), and com.realtime.crossfire.jxclient.map.CfMapPatch.getSquare().
Referenced by com.realtime.crossfire.jxclient.map.CfMap.getMapSquareUnlessDirty(), com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.markPlayer(), com.realtime.crossfire.jxclient.map.CfMap.setSmooth(), and com.realtime.crossfire.jxclient.map.CfMap.squarePendingFace().
CfMapSquare com.realtime.crossfire.jxclient.map.CfMap.getMapSquareUnlessDirty | ( | final int | x, |
final int | y | ||
) |
Returns a map square.
x | the x-coordinate |
y | the y-coordinate |
Definition at line 680 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.getMapSquare().
int com.realtime.crossfire.jxclient.map.CfMap.getOffsetX | ( | ) |
Returns the offset to convert an absolute x-coordinate of a map square (CfMapSquare#getX() to a relative x-coordinate.
Definition at line 691 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.patchX.
int com.realtime.crossfire.jxclient.map.CfMap.getOffsetY | ( | ) |
Returns the offset to convert an absolute y-coordinate of a map square (CfMapSquare#getY() to a relative y-coordinate.
Definition at line 701 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.patchY.
int com.realtime.crossfire.jxclient.map.CfMap.getSmooth | ( | final int | x, |
final int | y, | ||
final int | layer | ||
) |
Returns 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 211 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.DEFAULT_SMOOTH, com.realtime.crossfire.jxclient.map.CfMap.getMapPatch(), and com.realtime.crossfire.jxclient.map.CfMapPatch.getSmooth().
|
private |
Increases the defined area of the map.
dx | the increase in x-direction; dx<0 means "expand (-dx) tiles to the left", dx>0 means "expand (dx) tiles to the right" |
dy | the increase in y-direction; dy<0 means "expand (-dy) tiles to the top", dy>0 means "expand (dy) tiles to the bottom" |
Definition at line 532 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.copyPatches(), com.realtime.crossfire.jxclient.map.CfMap.patchX, com.realtime.crossfire.jxclient.map.CfMap.patchY, com.realtime.crossfire.jxclient.map.CfMap.size(), and com.realtime.crossfire.jxclient.map.CfMapPatch.SIZE_LOG.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.expandTo().
boolean com.realtime.crossfire.jxclient.map.CfMap.isFogOfWar | ( | final int | x, |
final int | y | ||
) |
Determines if the tile is not up-to-date.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
Definition at line 418 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.getMapPatch(), and com.realtime.crossfire.jxclient.map.CfMapPatch.isFogOfWar().
Referenced by com.realtime.crossfire.jxclient.map.CfMap.dirtyFace().
boolean com.realtime.crossfire.jxclient.map.CfMap.processMapScroll | ( | final int | dx, |
final int | dy, | ||
final int | width, | ||
final int | height | ||
) |
Processes a map scroll command.
dx | the distance to scroll in x-direction in squares |
dy | the distance to scroll in y-direction in squares |
width | the width of the visible map area in map squares |
height | the height of the visible map area in map squares |
Definition at line 799 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.clearSquare(), and com.realtime.crossfire.jxclient.map.CfMap.scroll().
Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterState.mapScroll().
void com.realtime.crossfire.jxclient.map.CfMap.reset | ( | final int | mapWidth, |
final int | mapHeight | ||
) |
Clears the map contents.
mapWidth | the width of the visible map area |
mapHeight | the height of the visible map area |
Definition at line 133 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.clearSquare().
Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterState.newMap().
|
private |
Scrolls the map.
dx | the x-difference to scroll |
dy | the y-difference to scroll |
Definition at line 469 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.processMapScroll().
void com.realtime.crossfire.jxclient.map.CfMap.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 159 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.DEFAULT_FACE, com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.protocol.Map2.NUM_LAYERS, and com.realtime.crossfire.jxclient.map.CfMap.setFaceInternal().
Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterState.mapDarkness(), and com.realtime.crossfire.jxclient.map.CfMap.setFace().
void com.realtime.crossfire.jxclient.map.CfMap.setFace | ( | final int | x, |
final int | y, | ||
final int | layer, | ||
@Nullable final Face | face | ||
) |
Sets the face of one square.
This function clears fog-of-war state if necessary.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
layer | the layer to set |
face | the face to set; may be null |
Definition at line 257 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.DEFAULT_DARKNESS, com.realtime.crossfire.jxclient.map.CfMapSquare.DEFAULT_FACE, com.realtime.crossfire.jxclient.map.CfMap.dirty(), com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.protocol.Map2.NUM_LAYERS, com.realtime.crossfire.jxclient.map.CfMap.setDarkness(), and com.realtime.crossfire.jxclient.map.CfMap.setFaceInternal().
Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterState.mapAnimation(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapFace(), com.realtime.crossfire.jxclient.map.MapUpdaterState.mapScroll(), and com.realtime.crossfire.jxclient.map.CfMap.updateFace().
|
private |
Sets the face of one square.
x | the x-coordinate of the square |
y | the y-coordinate of the square |
layer | the layer to set |
face | the face to set; may be null |
Definition at line 277 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.expandFace(), com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.map.CfMapSquare.getFace(), com.realtime.crossfire.jxclient.map.CfMapPatch.getSquare(), and com.realtime.crossfire.jxclient.map.CfMapSquare.setFace().
Referenced by com.realtime.crossfire.jxclient.map.CfMap.setDarkness(), com.realtime.crossfire.jxclient.map.CfMap.setFace(), com.realtime.crossfire.jxclient.map.CfMap.setMagicMap(), and com.realtime.crossfire.jxclient.map.CfMap.setSmooth().
|
private |
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 365 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.expandTo(), and com.realtime.crossfire.jxclient.map.CfMapPatch.setHeadMapSquare().
Referenced by com.realtime.crossfire.jxclient.map.CfMap.dirtyFace(), and com.realtime.crossfire.jxclient.map.CfMap.expandFace().
void com.realtime.crossfire.jxclient.map.CfMap.setMagicMap | ( | final int | x0, |
final int | y0, | ||
final byte | data[][] | ||
) |
Sets the magic map color of one square.
x0 | the x-coordinate of the square |
y0 | the y-coordinate of the square |
data | the magic map data (y, x); will not be changed |
Definition at line 223 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.DEFAULT_FACE, com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.protocol.MagicMap.FACE_COLOR_MASK, com.realtime.crossfire.jxclient.protocol.Map2.NUM_LAYERS, and com.realtime.crossfire.jxclient.map.CfMap.setFaceInternal().
Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterState.magicMap().
void com.realtime.crossfire.jxclient.map.CfMap.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 188 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.DEFAULT_FACE, com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.map.CfMap.getMapSquare(), com.realtime.crossfire.jxclient.protocol.Map2.NUM_LAYERS, com.realtime.crossfire.jxclient.map.CfMap.setFaceInternal(), com.realtime.crossfire.jxclient.map.CfMapPatch.setSmooth(), and com.realtime.crossfire.jxclient.map.CfMap.squareModified().
Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterState.mapSmooth().
|
staticprivate |
Calculates the number of patches needed to hold tiles between two patch coordinates.
min | the minimum coordinate |
max | the maximum coordinate |
Definition at line 657 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.increase().
void com.realtime.crossfire.jxclient.map.CfMap.squareModified | ( | @NotNull final CfMapSquare | mapSquare | ) |
Marks a CfMapSquare as dirty.
mapSquare | the map square |
Definition at line 732 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMapSquare.dirty(), and com.realtime.crossfire.jxclient.map.CfMap.setSmooth().
void com.realtime.crossfire.jxclient.map.CfMap.squarePendingFace | ( | final int | x, |
final int | y, | ||
final int | faceNum | ||
) |
Marks a CfMapSquare as containing a pending face.
x | the x coordinate of the map square |
y | the y coordinate of the map square |
faceNum | the pending face |
Definition at line 743 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.getMapSquare().
void com.realtime.crossfire.jxclient.map.CfMap.updateFace | ( | final int | faceNum, |
final int | width, | ||
final int | height | ||
) |
Processes an updated face image.
faceNum | the face that has changed |
width | the width of the visible map area |
height | the height of the visible map area |
Definition at line 772 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.dirty(), com.realtime.crossfire.jxclient.map.CfMap.getFace(), com.realtime.crossfire.jxclient.faces.Face.getFaceNum(), com.realtime.crossfire.jxclient.protocol.Map2.NUM_LAYERS, and com.realtime.crossfire.jxclient.map.CfMap.setFace().
Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterState.faceUpdated().
|
private |
The "dirty" map squares that have been modified.
Definition at line 119 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.getDirtyMapSquares().
|
private |
The right edge of the defined patches in patch.
Definition at line 75 of file CfMap.java.
|
private |
The bottom edge of the defined patches in patch.
Definition at line 85 of file CfMap.java.
|
private |
The right edge of the defined tiles.
Definition at line 55 of file CfMap.java.
|
private |
The bottom edge of the defined tiles.
Definition at line 65 of file CfMap.java.
|
private |
The left edge of the defined patches in patch.
Definition at line 70 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.getMapPatch().
|
private |
The top edge of the defined patches in patch.
Definition at line 80 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.expandTo(), and com.realtime.crossfire.jxclient.map.CfMap.getMapPatch().
|
private |
The left edge of the defined tiles.
Definition at line 50 of file CfMap.java.
|
private |
The top edge of the defined tiles.
Definition at line 60 of file CfMap.java.
|
private |
Result values for getMapPatch(int, int) and expandTo(int, int).
Definition at line 91 of file CfMap.java.
|
private |
Result values for getMapPatch(int, int) and expandTo(int, int).
Definition at line 97 of file CfMap.java.
|
private |
Array of (possibly) defined squares.
Definition at line 113 of file CfMap.java.
|
private |
Left edge of viewable area.
Definition at line 102 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.map.CfMap.getMapPatch(), com.realtime.crossfire.jxclient.map.CfMap.getOffsetX(), and com.realtime.crossfire.jxclient.map.CfMap.increase().
|
private |
Top edge of viewable area.
Definition at line 107 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.getMapPatch(), com.realtime.crossfire.jxclient.map.CfMap.getOffsetY(), and com.realtime.crossfire.jxclient.map.CfMap.increase().
|
private |
The map squares containing pending faces.
Maps face number to map squares that need to be repainted when the face becomes available.
Definition at line 126 of file CfMap.java.