Crossfire JXClient, Trunk
|
Public Member Functions | |
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) |
Set< CfMapSquare > | getDirtyMapSquares () |
Face | getFace (final int x, final int y, final int layer) |
CfMapSquare | getHeadMapSquare (final int x, final int y, final int layer) |
CfMapSquare | getMapSquare (final int x, final int y) |
CfMapSquare | getMapSquareUnlessDirty (final int x, final int y) |
int | getOffsetX () |
int | getOffsetY () |
int | getSmooth (final int x, final int y, final int layer) |
boolean | isFogOfWar (final int x, final int y) |
boolean | processMapScroll (final int dx, final int dy, final int width, final int height) |
void | reset (final int mapWidth, final int mapHeight) |
void | setDarkness (final int x, final int y, final int darkness) |
void | setFace (final int x, final int y, final int layer, @Nullable final Face face) |
void | setMagicMap (final int x0, final int y0, final byte @NotNull[] @NotNull[] data) |
void | setSmooth (final int x, final int y, final int layer, final int smooth) |
void | squareModified (@NotNull final CfMapSquare mapSquare) |
void | squarePendingFace (final int x, final int y, final int faceNum) |
void | updateFace (final int faceNum, final int width, final int height) |
Private Member Functions | |
CfMapPatch[][] | copyPatches (final int newWidth, final int newHeight, final int offsetX, final int offsetY, final int height, final int width) |
void | dirtyFace (final int x, final int y, final int layer, @NotNull final Face face) |
void | expandFace (final int x, final int y, final int layer, @NotNull final Face face, @NotNull final CfMapSquare oldMapSquare, @Nullable final CfMapSquare newMapSquare) |
CfMapPatch | expandTo (final int x, final int y) |
CfMapPatch | getMapPatch (final int x, final int y) |
void | increase (final int dx, final int dy) |
void | scroll (final int dx, final int dy) |
void | setFaceInternal (final int x, final int y, final int layer, @Nullable final Face face) |
void | setHeadMapSquare (final int x, final int y, final int layer, @Nullable final CfMapSquare mapSquare, final boolean setAlways) |
Static Private Member Functions | |
static int | size (final int min, final int max) |
Private Attributes | |
final Set< CfMapSquare > | dirtyMapSquares = new HashSet<>() |
int | maxPx = -1 |
int | maxPy = -1 |
int | maxX = -1 |
int | maxY = -1 |
int | minPx |
int | minPy |
int | minX |
int | minY |
int | ox |
int | oy |
CfMapPatch[][] | patch |
int | patchX |
int | patchY |
final Map< Integer, Collection< CfMapSquare > > | pendingFaceSquares = new HashMap<>() |
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 46 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 386 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(), com.realtime.crossfire.jxclient.protocol.Map2.NUM_LAYERS, com.realtime.crossfire.jxclient.map.CfMap.ox, and com.realtime.crossfire.jxclient.map.CfMap.oy.
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 713 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.patch.
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 403 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapPatch.dirty(), com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.map.CfMap.ox, and com.realtime.crossfire.jxclient.map.CfMap.oy.
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 320 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 296 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 487 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.maxPx, com.realtime.crossfire.jxclient.map.CfMap.maxPy, com.realtime.crossfire.jxclient.map.CfMap.maxX, com.realtime.crossfire.jxclient.map.CfMap.maxY, com.realtime.crossfire.jxclient.map.CfMap.minPx, com.realtime.crossfire.jxclient.map.CfMap.minPy, com.realtime.crossfire.jxclient.map.CfMap.minX, com.realtime.crossfire.jxclient.map.CfMap.minY, com.realtime.crossfire.jxclient.map.CfMap.patch, com.realtime.crossfire.jxclient.map.CfMap.patchX, com.realtime.crossfire.jxclient.map.CfMap.patchY, 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 239 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.DEFAULT_COLOR, com.realtime.crossfire.jxclient.map.CfMapPatch.getColor(), com.realtime.crossfire.jxclient.map.CfMap.getMapPatch(), com.realtime.crossfire.jxclient.map.CfMap.ox, and com.realtime.crossfire.jxclient.map.CfMap.oy.
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 176 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.DEFAULT_DARKNESS, com.realtime.crossfire.jxclient.map.CfMapPatch.getDarkness(), com.realtime.crossfire.jxclient.map.CfMap.getMapPatch(), com.realtime.crossfire.jxclient.map.CfMap.ox, and com.realtime.crossfire.jxclient.map.CfMap.oy.
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 749 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 344 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.DEFAULT_FACE, com.realtime.crossfire.jxclient.map.CfMapPatch.getFace(), com.realtime.crossfire.jxclient.map.CfMap.getMapPatch(), com.realtime.crossfire.jxclient.map.CfMap.ox, and com.realtime.crossfire.jxclient.map.CfMap.oy.
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 374 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapPatch.getHeadMapSquare(), com.realtime.crossfire.jxclient.map.CfMap.getMapPatch(), com.realtime.crossfire.jxclient.map.CfMap.ox, and com.realtime.crossfire.jxclient.map.CfMap.oy.
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 429 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.maxPx, com.realtime.crossfire.jxclient.map.CfMap.maxPy, com.realtime.crossfire.jxclient.map.CfMap.maxX, com.realtime.crossfire.jxclient.map.CfMap.maxY, com.realtime.crossfire.jxclient.map.CfMap.minPx, com.realtime.crossfire.jxclient.map.CfMap.minPy, com.realtime.crossfire.jxclient.map.CfMap.ox, com.realtime.crossfire.jxclient.map.CfMap.oy, com.realtime.crossfire.jxclient.map.CfMap.patch, 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 664 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.map.CfMapPatch.getSquare(), com.realtime.crossfire.jxclient.map.CfMap.ox, and com.realtime.crossfire.jxclient.map.CfMap.oy.
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 676 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.dirtyMapSquares, and 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 687 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 697 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 212 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMapSquare.DEFAULT_SMOOTH, com.realtime.crossfire.jxclient.map.CfMap.getMapPatch(), com.realtime.crossfire.jxclient.map.CfMapPatch.getSmooth(), com.realtime.crossfire.jxclient.map.CfMap.ox, and com.realtime.crossfire.jxclient.map.CfMap.oy.
|
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 528 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.copyPatches(), com.realtime.crossfire.jxclient.map.CfMap.maxPx, com.realtime.crossfire.jxclient.map.CfMap.maxPy, com.realtime.crossfire.jxclient.map.CfMap.maxX, com.realtime.crossfire.jxclient.map.CfMap.maxY, com.realtime.crossfire.jxclient.map.CfMap.minPx, com.realtime.crossfire.jxclient.map.CfMap.minPy, com.realtime.crossfire.jxclient.map.CfMap.minX, com.realtime.crossfire.jxclient.map.CfMap.minY, com.realtime.crossfire.jxclient.map.CfMap.patch, 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 414 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.getMapPatch(), com.realtime.crossfire.jxclient.map.CfMapPatch.isFogOfWar(), com.realtime.crossfire.jxclient.map.CfMap.ox, and com.realtime.crossfire.jxclient.map.CfMap.oy.
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 789 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 134 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.clearSquare(), com.realtime.crossfire.jxclient.map.CfMap.dirtyMapSquares, com.realtime.crossfire.jxclient.map.CfMap.maxPx, com.realtime.crossfire.jxclient.map.CfMap.maxPy, com.realtime.crossfire.jxclient.map.CfMap.maxX, com.realtime.crossfire.jxclient.map.CfMap.maxY, com.realtime.crossfire.jxclient.map.CfMap.minPx, com.realtime.crossfire.jxclient.map.CfMap.minPy, com.realtime.crossfire.jxclient.map.CfMap.minX, com.realtime.crossfire.jxclient.map.CfMap.minY, com.realtime.crossfire.jxclient.map.CfMap.patch, com.realtime.crossfire.jxclient.map.CfMap.patchX, com.realtime.crossfire.jxclient.map.CfMap.patchY, and com.realtime.crossfire.jxclient.map.CfMap.pendingFaceSquares.
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 465 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.maxX, com.realtime.crossfire.jxclient.map.CfMap.maxY, com.realtime.crossfire.jxclient.map.CfMap.minX, com.realtime.crossfire.jxclient.map.CfMap.minY, com.realtime.crossfire.jxclient.map.CfMap.patchX, and com.realtime.crossfire.jxclient.map.CfMap.patchY.
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 160 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, com.realtime.crossfire.jxclient.map.CfMap.ox, com.realtime.crossfire.jxclient.map.CfMap.oy, 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 253 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.ox, com.realtime.crossfire.jxclient.map.CfMap.oy, 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 273 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(), com.realtime.crossfire.jxclient.map.CfMap.ox, com.realtime.crossfire.jxclient.map.CfMap.oy, and com.realtime.crossfire.jxclient.map.CfMapSquare.setFace().
Referenced by com.realtime.crossfire.jxclient.map.CfMap.setDarkness(), com.realtime.crossfire.jxclient.map.CfMap.setFace(), 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 361 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.map.CfMap.ox, com.realtime.crossfire.jxclient.map.CfMap.oy, 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 @NotNull @[]NotNull[] | 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.CfMap.expandTo(), com.realtime.crossfire.jxclient.protocol.MagicMap.FACE_COLOR_MASK, com.realtime.crossfire.jxclient.map.CfMap.ox, com.realtime.crossfire.jxclient.map.CfMap.oy, and com.realtime.crossfire.jxclient.map.CfMapPatch.setColor().
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 189 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.ox, com.realtime.crossfire.jxclient.map.CfMap.oy, 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 653 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 728 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.dirtyMapSquares.
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 739 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.getMapSquare(), and com.realtime.crossfire.jxclient.map.CfMap.pendingFaceSquares.
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 762 of file CfMap.java.
References com.realtime.crossfire.jxclient.map.CfMap.dirty(), com.realtime.crossfire.jxclient.map.CfMap.dirtyMapSquares, com.realtime.crossfire.jxclient.map.CfMap.getFace(), com.realtime.crossfire.jxclient.faces.Face.getFaceNum(), com.realtime.crossfire.jxclient.protocol.Map2.NUM_LAYERS, com.realtime.crossfire.jxclient.map.CfMap.pendingFaceSquares, 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 120 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.getDirtyMapSquares(), com.realtime.crossfire.jxclient.map.CfMap.getMapSquareUnlessDirty(), com.realtime.crossfire.jxclient.map.CfMap.reset(), com.realtime.crossfire.jxclient.map.CfMap.squareModified(), and com.realtime.crossfire.jxclient.map.CfMap.updateFace().
|
private |
The right edge of the defined patches in patch.
Definition at line 76 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.increase(), and com.realtime.crossfire.jxclient.map.CfMap.reset().
|
private |
The bottom edge of the defined patches in patch.
Definition at line 86 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.increase(), and com.realtime.crossfire.jxclient.map.CfMap.reset().
|
private |
The right edge of the defined tiles.
Definition at line 56 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.increase(), com.realtime.crossfire.jxclient.map.CfMap.reset(), and com.realtime.crossfire.jxclient.map.CfMap.scroll().
|
private |
The bottom edge of the defined tiles.
Definition at line 66 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.increase(), com.realtime.crossfire.jxclient.map.CfMap.reset(), and com.realtime.crossfire.jxclient.map.CfMap.scroll().
|
private |
The left edge of the defined patches in patch.
Definition at line 71 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.increase(), and com.realtime.crossfire.jxclient.map.CfMap.reset().
|
private |
The top edge of the defined patches in patch.
Definition at line 81 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.increase(), and com.realtime.crossfire.jxclient.map.CfMap.reset().
|
private |
The left edge of the defined tiles.
Definition at line 51 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.map.CfMap.increase(), com.realtime.crossfire.jxclient.map.CfMap.reset(), and com.realtime.crossfire.jxclient.map.CfMap.scroll().
|
private |
The top edge of the defined tiles.
Definition at line 61 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.map.CfMap.increase(), com.realtime.crossfire.jxclient.map.CfMap.reset(), and com.realtime.crossfire.jxclient.map.CfMap.scroll().
|
private |
Result values for getMapPatch(int, int) and expandTo(int, int).
Definition at line 92 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.clearSquare(), com.realtime.crossfire.jxclient.map.CfMap.dirty(), 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.getMapPatch(), com.realtime.crossfire.jxclient.map.CfMap.getMapSquare(), com.realtime.crossfire.jxclient.map.CfMap.getSmooth(), com.realtime.crossfire.jxclient.map.CfMap.isFogOfWar(), 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().
|
private |
Result values for getMapPatch(int, int) and expandTo(int, int).
Definition at line 98 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.clearSquare(), com.realtime.crossfire.jxclient.map.CfMap.dirty(), 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.getMapPatch(), com.realtime.crossfire.jxclient.map.CfMap.getMapSquare(), com.realtime.crossfire.jxclient.map.CfMap.getSmooth(), com.realtime.crossfire.jxclient.map.CfMap.isFogOfWar(), 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().
|
private |
Array of (possibly) defined squares.
Definition at line 114 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.copyPatches(), com.realtime.crossfire.jxclient.map.CfMap.expandTo(), com.realtime.crossfire.jxclient.map.CfMap.getMapPatch(), com.realtime.crossfire.jxclient.map.CfMap.increase(), and com.realtime.crossfire.jxclient.map.CfMap.reset().
|
private |
Left edge of viewable area.
Definition at line 103 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(), com.realtime.crossfire.jxclient.map.CfMap.increase(), com.realtime.crossfire.jxclient.map.CfMap.reset(), and com.realtime.crossfire.jxclient.map.CfMap.scroll().
|
private |
Top edge of viewable area.
Definition at line 108 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.getOffsetY(), com.realtime.crossfire.jxclient.map.CfMap.increase(), com.realtime.crossfire.jxclient.map.CfMap.reset(), and com.realtime.crossfire.jxclient.map.CfMap.scroll().
|
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 127 of file CfMap.java.
Referenced by com.realtime.crossfire.jxclient.map.CfMap.reset(), com.realtime.crossfire.jxclient.map.CfMap.squarePendingFace(), and com.realtime.crossfire.jxclient.map.CfMap.updateFace().