 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file. 1 package com.realtime.crossfire.jxclient.server.crossfire;
4 import org.jetbrains.annotations.NotNull;
15 private final StringBuilder
sb =
new StringBuilder();
21 private final Object
sync =
new Object();
24 public void newMap(
final int mapWidth,
final int mapHeight) {
25 sb.append(
"new_map ").append(mapWidth).append(
" ").append(mapHeight).append(
"\n");
31 sb.append(
"map_begin\n");
36 public void mapClear(
final int x,
final int y) {
37 sb.append(
"map_clear ").append(x).append(
" ").append(y).append(
"\n");
41 public void mapDarkness(
final int x,
final int y,
final int darkness) {
42 sb.append(
"map_darkness ").append(x).append(
" ").append(y).append(
" ").append(darkness).append(
"\n");
47 sb.append(
"map_face ").append(location).append(
" ").append(faceNum).append(
"\n");
51 public void mapAnimation(@NotNull
final Location location,
final int animationNum,
final int animationType) {
52 sb.append(
"map_animation ").append(location).append(
" ").append(animationNum).append(
" ").append(animationType).append(
"\n");
57 sb.append(
"map_animation_speed ").append(location).append(
" ").append(animationSpeed).append(
"\n");
62 sb.append(
"map_smooth ").append(location).append(
" ").append(smooth).append(
"\n");
67 sb.append(
"map_scroll ").append(dx).append(
" ").append(dy).append(
"\n");
71 public void magicMap(
final int x,
final int y,
final byte @NotNull [] @NotNull [] data) {
72 sb.append(
"magic_map ").append(x).append(
" ").append(y).append(
" ").append(data.length).append(
"\n");
77 sb.append(
"map_end\n");
void mapAnimationSpeed(@NotNull final Location location, final int animationSpeed)
Part of "map2" parsing: set the animation speed.
final StringBuilder sb
Records all callback functions.
void mapFace(@NotNull final Location location, final int faceNum)
Part of "map2" parsing: set the face of a cell.
Implements the map model which is shown in the map and magic map views.
void mapClear(final int x, final int y)
Part of "map2" parsing: clear a cell.
Object mapBegin()
Parsing of a "map2" command has been started.
Records all callback functions.
void mapSmooth(@NotNull final Location location, final int smooth)
Part of "map2" parsing: set the smooth level.
void mapEnd()
Parsing of "map2" has been finished.
void mapAnimation(@NotNull final Location location, final int animationNum, final int animationType)
Part of "map2" parsing: set the animation of a cell.
void mapScroll(final int dx, final int dy)
Part of "map2" parsing: scroll the map view.
Interface for listeners interested in map related commands.
void newMap(final int mapWidth, final int mapHeight)
A "newmap" command has been received.
void mapDarkness(final int x, final int y, final int darkness)
Part of "map2" parsing: change the darkness of a cell.
void magicMap(final int x, final int y, final byte @NotNull[] @NotNull[] data)
Part of "magicmap" parsing: set the magic map color.
final Object sync
The synchronization object.