22 package com.realtime.crossfire.jxclient.map;
25 import org.jetbrains.annotations.NotNull;
26 import org.jetbrains.annotations.Nullable;
60 for (
int y = 0; y <
SIZE; y++) {
61 for (
int x = 0; x <
SIZE; x++) {
72 public void dirty(
final int x,
final int y) {
93 public boolean setDarkness(
final int x,
final int y,
final int darkness) {
117 public int setSmooth(
final int x,
final int y,
final int layer,
final int smooth) {
118 return square[x][y].
setSmooth(layer, smooth);
128 public int getSmooth(
final int x,
final int y,
final int layer) {
139 public boolean setColor(
final int x,
final int y,
final int color) {
140 return square[x][y].
setColor(color);
162 return square[x][y].
getFace(layer);
CfMapSquare getHeadMapSquare(final int layer)
Returns the map square of the head of a multi-square object.
CfMapSquare getSquare(final int x, final int y)
Returns one map square.
Represents a square in a CfMap.
int getSmooth(final int layer)
Returns the smooth value of this square.
Represents a map (as seen by the client).
static final int SIZE
Size of patches in x- and y-direction.
void clearSquare(final int x, final int y)
Clears the content of one square.
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.
void dirty()
Marks this square as dirty, i.e., needing redraw.
int getDarkness()
Returns the darkness value of this square.
boolean resetFogOfWar(final int x, final int y)
Returns and reset the "fog-of-war" flag of a square.
void dirty(final int x, final int y)
Marks a square as dirty.
Face getFace(final int x, final int y, final int layer)
Determines the face of one square.
boolean setColor(final int x, final int y, final int color)
Sets the magic map color of one square.
Manages image information ("faces") needed to display the map view, items, and spell icons...
CfMapSquare getHeadMapSquare(final int x, final int y, final int layer)
Returns the map square of the head of a multi-square object.
int getColor(final int x, final int y)
Determines the magic map color value of one square.
int getDarkness(final int x, final int y)
Determines the darkness value of one square.
boolean setColor(final int color)
Sets the magic map color of this square.
boolean isFogOfWar(final int x, final int y)
Determines if a square is not up-to-date.
boolean isFogOfWar()
Determines if the square is not up-to-date.
boolean setDarkness(final int x, final int y, final int darkness)
Sets the darkness value of one square.
CfMapPatch(@NotNull final CfMap map, final int x0, final int y0)
Creates a new (empty) patch.
Represents a square area of CfMapSquares.
void clear()
Marks this square as 'fog-og-war'.
int setSmooth(final int layer, final int smooth)
Sets the smooth value of this square.
boolean setDarkness(final int darkness)
Sets the darkness value of this square.
Face getFace(final int layer)
Returns the face of a layer.
int getColor()
Returns the magic map color of this square.
final CfMapSquare [][] square
The array of CfMapSquares.
boolean resetFogOfWar()
Returns and resets the "fog-of-war" flag.
int setSmooth(final int x, final int y, final int layer, final int smooth)
Sets the smooth value of one square.
void setHeadMapSquare(final int layer, @Nullable final CfMapSquare mapSquare, final boolean setAlways)
Sets the map square containing the head face for a layer.
static final int SIZE_LOG
Log2 of SIZE.
int getSmooth(final int x, final int y, final int layer)
Determines the smooth value of one square.