|
From: Crossfire C. r. messages.
<cro...@li...> - 2011-06-30 19:27:46
|
Revision: 14738
http://crossfire.svn.sourceforge.net/crossfire/?rev=14738&view=rev
Author: akirschbaum
Date: 2011-06-30 19:27:35 +0000 (Thu, 30 Jun 2011)
Log Message:
-----------
Rename identifiers.
Modified Paths:
--------------
jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/gui/map/AbstractGUIMap.java
jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/map/AnimationState.java
jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/map/CfMapAnimations.java
jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/mapupdater/CfMapUpdater.java
jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/mapupdater/MapUpdaterState.java
jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/scripts/DefaultScriptProcess.java
jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/server/crossfire/CrossfireUpdateMapListener.java
jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/server/crossfire/DefaultCrossfireServerConnection.java
jxclient/trunk/src/test/com/realtime/crossfire/jxclient/mapupdater/MapUpdaterStateTest.java
Modified: jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/gui/map/AbstractGUIMap.java
===================================================================
--- jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/gui/map/AbstractGUIMap.java 2011-06-30 18:59:04 UTC (rev 14737)
+++ jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/gui/map/AbstractGUIMap.java 2011-06-30 19:27:35 UTC (rev 14738)
@@ -313,7 +313,7 @@
this.mapUpdaterState.addCrossfireMapListener(mapListener);
this.mapUpdaterState.addCrossfireNewmapListener(newmapListener);
this.mapUpdaterState.addCrossfireMapScrollListener(mapscrollListener);
- setMapSize(this.mapUpdaterState.getWidth(), this.mapUpdaterState.getHeight());
+ setMapSize(this.mapUpdaterState.getMapWidth(), this.mapUpdaterState.getMapHeight());
}
/**
Modified: jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/map/AnimationState.java
===================================================================
--- jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/map/AnimationState.java 2011-06-30 18:59:04 UTC (rev 14737)
+++ jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/map/AnimationState.java 2011-06-30 19:27:35 UTC (rev 14738)
@@ -136,7 +136,7 @@
}
lastFace = face;
for (final Location location : locations) {
- mapUpdaterState.processMapFace(location, face, false);
+ mapUpdaterState.mapFace(location, face, false);
}
}
@@ -149,7 +149,7 @@
throw new IllegalArgumentException();
}
if (lastFace != -1) {
- mapUpdaterState.processMapFace(location, lastFace, false);
+ mapUpdaterState.mapFace(location, lastFace, false);
}
}
Modified: jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/map/CfMapAnimations.java
===================================================================
--- jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/map/CfMapAnimations.java 2011-06-30 18:59:04 UTC (rev 14737)
+++ jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/map/CfMapAnimations.java 2011-06-30 19:27:35 UTC (rev 14738)
@@ -219,11 +219,11 @@
pendingTickUpdates.clear();
animationStatesToUpdate = new ArrayList<AnimationState>(animationStates.keySet());
}
- mapUpdaterState.processMapBegin();
+ mapUpdaterState.mapBegin();
for (final AnimationState animationState : animationStatesToUpdate) {
animationState.updateTickNo(tickNo);
}
- mapUpdaterState.processMapEnd(false);
+ mapUpdaterState.mapEnd(false);
}
/**
Modified: jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/mapupdater/CfMapUpdater.java
===================================================================
--- jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/mapupdater/CfMapUpdater.java 2011-06-30 18:59:04 UTC (rev 14737)
+++ jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/mapupdater/CfMapUpdater.java 2011-06-30 19:27:35 UTC (rev 14738)
@@ -67,60 +67,60 @@
@Override
public void newMap(final int mapWidth, final int mapHeight) {
- mapUpdaterState.processNewMap(mapWidth, mapHeight);
+ mapUpdaterState.newMap(mapWidth, mapHeight);
}
@Override
public void mapBegin() {
- mapUpdaterState.processMapBegin();
+ mapUpdaterState.mapBegin();
}
@Override
public void mapClear(final int x, final int y) {
- mapUpdaterState.processMapClear(x, y);
+ mapUpdaterState.mapClear(x, y);
}
@Override
public void mapDarkness(final int x, final int y, final int darkness) {
- mapUpdaterState.processMapDarkness(x, y, darkness);
+ mapUpdaterState.mapDarkness(x, y, darkness);
}
@Override
public void mapFace(final int x, final int y, final int layer, final int faceNum) {
- mapUpdaterState.processMapFace(new Location(x, y, layer), faceNum, true);
+ mapUpdaterState.mapFace(new Location(x, y, layer), faceNum, true);
}
@Override
public void mapAnimation(final int x, final int y, final int layer, final int animationNum, final int animationType) {
- mapUpdaterState.processMapAnimation(x, y, layer, animationNum, animationType);
+ mapUpdaterState.mapAnimation(x, y, layer, animationNum, animationType);
}
@Override
- public void mapAnimationSpeed(final int x, final int y, final int layer, final int animSpeed) {
- mapUpdaterState.processMapAnimationSpeed(x, y, layer, animSpeed);
+ public void mapAnimationSpeed(final int x, final int y, final int layer, final int animationSpeed) {
+ mapUpdaterState.mapAnimationSpeed(x, y, layer, animationSpeed);
}
@Override
public void mapSmooth(final int x, final int y, final int layer, final int smooth) {
- mapUpdaterState.processMapSmooth(x, y, layer, smooth);
+ mapUpdaterState.mapSmooth(x, y, layer, smooth);
}
/**
* {@inheritDoc}
*/
@Override
- public void scroll(final int dx, final int dy) {
- mapUpdaterState.processMapScroll(dx, dy);
+ public void mapScroll(final int dx, final int dy) {
+ mapUpdaterState.mapScroll(dx, dy);
}
@Override
public void mapMagicMap(final int x, final int y, final byte[][] data) {
- mapUpdaterState.processMagicMap(x, y, data);
+ mapUpdaterState.magicMap(x, y, data);
}
@Override
public void mapEnd() {
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapEnd(true);
}
@Override
Modified: jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/mapupdater/MapUpdaterState.java
===================================================================
--- jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/mapupdater/MapUpdaterState.java 2011-06-30 18:59:04 UTC (rev 14737)
+++ jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/mapupdater/MapUpdaterState.java 2011-06-30 19:27:35 UTC (rev 14738)
@@ -71,12 +71,12 @@
/**
* The width of the visible map area.
*/
- private int width = 0;
+ private int mapWidth = 0;
/**
* The height of the visible map area.
*/
- private int height = 0;
+ private int mapHeight = 0;
/**
* The current {@link CfMap} instance.
@@ -202,14 +202,14 @@
*/
public void reset() {
synchronized (sync) {
- processNewMap(width, height);
+ newMap(mapWidth, mapHeight);
}
}
/**
* Starts processing of a set of map square changes.
*/
- public void processMapBegin() {
+ public void mapBegin() {
}
/**
@@ -217,7 +217,7 @@
* @param x the x-coordinate of the square
* @param y the y-coordinate of the square
*/
- public void processMapClear(final int x, final int y) {
+ public void mapClear(final int x, final int y) {
synchronized (sync) {
visibleAnimations.remove(x, y);
outOfViewMultiFaces.clear();
@@ -234,7 +234,7 @@
* @param faceNum the face to set; <code>0</code> clears the square
* @param clearAnimation whether an animation should be cleared
*/
- public void processMapFace(@NotNull final Location location, final int faceNum, final boolean clearAnimation) {
+ public void mapFace(@NotNull final Location location, final int faceNum, final boolean clearAnimation) {
synchronized (sync) {
//noinspection NestedSynchronizedStatement,SynchronizeOnNonFinalField
synchronized (map) {
@@ -244,7 +244,7 @@
final Face face = facesManager.getFace2(faceNum);
final int x = location.getX();
final int y = location.getY();
- if (x >= width || y >= height) {
+ if (x >= mapWidth || y >= mapHeight) {
if (face == null) {
outOfViewMultiFaces.remove(location);
} else if (face.getTileWidth() > 1 || face.getTileHeight() > 1) {
@@ -262,9 +262,9 @@
* @param y the y-coordinate of the square
* @param layer the layer to update
* @param animationNum the animation number to set
- * @param type the animation type
+ * @param animationType the animation type
*/
- public void processMapAnimation(final int x, final int y, final int layer, final int animationNum, final int type) {
+ public void mapAnimation(final int x, final int y, final int layer, final int animationNum, final int animationType) {
final Animation animation = animations.get(animationNum);
if (animation == null) {
System.err.println("unknown animation id "+animationNum+", ignoring");
@@ -276,7 +276,7 @@
synchronized (map) {
map.setFace(x, y, layer, null);
final Location location = new Location(x, y, layer);
- visibleAnimations.add(location, animation, type);
+ visibleAnimations.add(location, animation, animationType);
}
}
}
@@ -288,7 +288,7 @@
* @param layer the layer to update
* @param animationSpeed the animation speed to set
*/
- public void processMapAnimationSpeed(final int x, final int y, final int layer, final int animationSpeed) {
+ public void mapAnimationSpeed(final int x, final int y, final int layer, final int animationSpeed) {
synchronized (sync) {
final Location location = new Location(x, y, layer);
visibleAnimations.updateSpeed(location, animationSpeed);
@@ -302,7 +302,7 @@
* @param layer the layer to update
* @param smooth the smooth value to set
*/
- public void processMapSmooth(final int x, final int y, final int layer, final int smooth) {
+ public void mapSmooth(final int x, final int y, final int layer, final int smooth) {
synchronized (sync) {
//noinspection NestedSynchronizedStatement,SynchronizeOnNonFinalField
synchronized (map) {
@@ -317,7 +317,7 @@
* @param y the y-coordinate of the square
* @param darkness the darkness value to set
*/
- public void processMapDarkness(final int x, final int y, final int darkness) {
+ public void mapDarkness(final int x, final int y, final int darkness) {
synchronized (sync) {
//noinspection NestedSynchronizedStatement,SynchronizeOnNonFinalField
synchronized (map) {
@@ -333,7 +333,7 @@
* @param y the y-coordinate of the square
* @param data the magic map data (y, x); will not be changed
*/
- public void processMagicMap(final int x, final int y, final byte[][] data) {
+ public void magicMap(final int x, final int y, final byte[][] data) {
synchronized (sync) {
//noinspection NestedSynchronizedStatement,SynchronizeOnNonFinalField
synchronized (map) {
@@ -348,7 +348,7 @@
* @param alwaysProcess if set, notify listeners even if no changes are
* present
*/
- public void processMapEnd(final boolean alwaysProcess) {
+ public void mapEnd(final boolean alwaysProcess) {
synchronized (sync) {
final Set<CfMapSquare> squares;
//noinspection NestedSynchronizedStatement,SynchronizeOnNonFinalField
@@ -370,9 +370,9 @@
* @param dx the distance to scroll in x-direction in squares
* @param dy the distance to scroll in y-direction in squares
*/
- public void processMapScroll(final int dx, final int dy) {
+ public void mapScroll(final int dx, final int dy) {
synchronized (sync) {
- processMapBegin();
+ mapBegin();
//noinspection NestedSynchronizedStatement,SynchronizeOnNonFinalField
synchronized (map) {
@@ -382,7 +382,7 @@
}
outOfViewMultiFaces.clear();
- if (map.processMapScroll(dx, dy, width, height)) {
+ if (map.processMapScroll(dx, dy, mapWidth, mapHeight)) {
visibleAnimations.clear();
} else {
visibleAnimations.scroll(dx, dy);
@@ -393,7 +393,7 @@
mapscrollListener.mapScrolled(dx, dy);
}
- processMapEnd(false);
+ mapEnd(false);
}
}
@@ -403,41 +403,41 @@
*/
public void updateFace(final int faceNum) {
synchronized (sync) {
- processMapBegin();
+ mapBegin();
//noinspection NestedSynchronizedStatement,SynchronizeOnNonFinalField
synchronized (map) {
- map.updateFace(faceNum, width, height);
+ map.updateFace(faceNum, mapWidth, mapHeight);
}
- processMapEnd(false);
+ mapEnd(false);
}
}
/**
* Processes a newmap command. This clears the map state.
- * @param width the width of the visible map area
- * @param height the height of the visible map area
+ * @param mapWidth the width of the visible map area
+ * @param mapHeight the height of the visible map area
*/
- public void processNewMap(final int width, final int height) {
+ public void newMap(final int mapWidth, final int mapHeight) {
synchronized (sync) {
- final boolean changed = this.width != width || this.height != height;
- this.width = width;
- this.height = height;
+ final boolean changed = this.mapWidth != mapWidth || this.mapHeight != mapHeight;
+ this.mapWidth = mapWidth;
+ this.mapHeight = mapHeight;
final CfMap tmp = new CfMap();
//noinspection NestedSynchronizedStatement,SynchronizationOnLocalVariableOrMethodParameter
synchronized (tmp) {
// force dirty flags to be set for the visible map region
tmp.clearSquare(0, 0);
- tmp.clearSquare(width-1, height-1);
+ tmp.clearSquare(mapWidth-1, mapHeight-1);
}
map = tmp;
- visibleAnimations.setMapSize(width, height);
+ visibleAnimations.setMapSize(mapWidth, mapHeight);
if (changed) {
for (final MapSizeListener listener : mapSizeListeners.getListeners()) {
- listener.mapSizeChanged(width, height);
+ listener.mapSizeChanged(mapWidth, mapHeight);
}
}
@@ -460,16 +460,16 @@
* Returns the width of the visible map area.
* @return the width of the visible map area
*/
- public int getWidth() {
- return width;
+ public int getMapWidth() {
+ return mapWidth;
}
/**
* Returns the height of the visible map area.
* @return the height of the visible map area
*/
- public int getHeight() {
- return height;
+ public int getMapHeight() {
+ return mapHeight;
}
/**
Modified: jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/scripts/DefaultScriptProcess.java
===================================================================
--- jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/scripts/DefaultScriptProcess.java 2011-06-30 18:59:04 UTC (rev 14737)
+++ jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/scripts/DefaultScriptProcess.java 2011-06-30 19:27:35 UTC (rev 14738)
@@ -476,11 +476,11 @@
}
commandSent("request items cont end");
} else if (params.equals("map pos")) {
- commandSent("request map pos "+mapUpdaterState.getWidth()/2+" "+mapUpdaterState.getHeight()/2);
+ commandSent("request map pos "+mapUpdaterState.getMapWidth()/2+" "+mapUpdaterState.getMapHeight()/2);
} else if (params.equals("map near")) {
final CfMap map = mapUpdaterState.getMap();
- final int centerX = mapUpdaterState.getWidth()/2;
- final int centerY = mapUpdaterState.getHeight()/2;
+ final int centerX = mapUpdaterState.getMapWidth()/2;
+ final int centerY = mapUpdaterState.getMapHeight()/2;
for (int y = -1; y <= +1; y++) {
for (int x = -1; x <= +1; x++) {
commandSentMap(map, centerX+x, centerY+y);
@@ -488,8 +488,8 @@
}
} else if (params.equals("map all")) {
final CfMap map = mapUpdaterState.getMap();
- final int width = mapUpdaterState.getWidth()/2;
- final int height = mapUpdaterState.getHeight()/2;
+ final int width = mapUpdaterState.getMapWidth()/2;
+ final int height = mapUpdaterState.getMapHeight()/2;
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
commandSentMap(map, x, y);
Modified: jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/server/crossfire/CrossfireUpdateMapListener.java
===================================================================
--- jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/server/crossfire/CrossfireUpdateMapListener.java 2011-06-30 18:59:04 UTC (rev 14737)
+++ jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/server/crossfire/CrossfireUpdateMapListener.java 2011-06-30 19:27:35 UTC (rev 14738)
@@ -21,6 +21,7 @@
package com.realtime.crossfire.jxclient.server.crossfire;
+import com.realtime.crossfire.jxclient.map.Location;
import java.util.EventListener;
import org.jetbrains.annotations.NotNull;
@@ -97,9 +98,9 @@
* @param x the x-coordinate
* @param y the y-coordinate
* @param layer the layer
- * @param animSpeed the animation speed
+ * @param animationSpeed the animation speed
*/
- void mapAnimationSpeed(int x, int y, int layer, int animSpeed);
+ void mapAnimationSpeed(int x, int y, int layer, int animationSpeed);
/**
* Part of "map2" parsing: set the smooth level.
@@ -115,7 +116,7 @@
* @param dx the x-distance
* @param dy the y-distance
*/
- void scroll(int dx, int dy);
+ void mapScroll(int dx, int dy);
/**
* Part of "magicmap" parsing: set the magic map color.
Modified: jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/server/crossfire/DefaultCrossfireServerConnection.java
===================================================================
--- jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/server/crossfire/DefaultCrossfireServerConnection.java 2011-06-30 18:59:04 UTC (rev 14737)
+++ jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/server/crossfire/DefaultCrossfireServerConnection.java 2011-06-30 19:27:35 UTC (rev 14738)
@@ -2051,7 +2051,7 @@
debugProtocol.debugProtocolWrite("recv map2 "+x+"/"+y+"/"+layer+" smooth="+smooth);
}
if (crossfireUpdateMapListener != null) {
- crossfireUpdateMapListener.mapSmooth(x, y, layer, smooth);
+ crossfireUpdateMapListener.mapSmooth(x, y, layer, smooth);
}
} else {
final int animSpeed = getInt1(packet);
@@ -2059,7 +2059,7 @@
debugProtocol.debugProtocolWrite("recv map2 "+x+"/"+y+"/"+layer+" anim_speed="+animSpeed);
}
if (crossfireUpdateMapListener != null) {
- crossfireUpdateMapListener.mapAnimationSpeed(x, y, layer, animSpeed);
+ crossfireUpdateMapListener.mapAnimationSpeed(x, y, layer, animSpeed);
}
}
}
@@ -2926,7 +2926,7 @@
final int args = packet.position();
synchronized (redrawSemaphore) {
if (crossfireUpdateMapListener != null) {
- crossfireUpdateMapListener.mapBegin();
+ crossfireUpdateMapListener.mapBegin();
}
if (debugProtocol != null) {
debugProtocol.debugProtocolWrite("recv map2 begin");
@@ -2947,7 +2947,7 @@
debugProtocol.debugProtocolWrite("recv map2 "+x+"/"+y+" scroll");
}
if (crossfireUpdateMapListener != null) {
- crossfireUpdateMapListener.scroll(x, y);
+ crossfireUpdateMapListener.mapScroll(x, y);
}
break;
@@ -2962,7 +2962,7 @@
debugProtocol.debugProtocolWrite("recv map2 end");
}
if (crossfireUpdateMapListener != null) {
- crossfireUpdateMapListener.mapEnd();
+ crossfireUpdateMapListener.mapEnd();
}
}
notifyPacketWatcherListenersShortArray(packet, args);
Modified: jxclient/trunk/src/test/com/realtime/crossfire/jxclient/mapupdater/MapUpdaterStateTest.java
===================================================================
--- jxclient/trunk/src/test/com/realtime/crossfire/jxclient/mapupdater/MapUpdaterStateTest.java 2011-06-30 18:59:04 UTC (rev 14737)
+++ jxclient/trunk/src/test/com/realtime/crossfire/jxclient/mapupdater/MapUpdaterStateTest.java 2011-06-30 19:27:35 UTC (rev 14738)
@@ -503,24 +503,24 @@
final MapUpdaterState mapUpdaterState = new MapUpdaterState(facesManager, null);
- mapUpdaterState.processNewMap(5, 5);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapFace(new Location(0, 0, 0), 2, true);
- mapUpdaterState.processMapFace(new Location(1, 0, 0), 2, true);
- mapUpdaterState.processMapFace(new Location(0, 1, 0), 2, true);
- mapUpdaterState.processMapFace(new Location(1, 1, 0), 2, true);
- mapUpdaterState.processMapFace(new Location(1, 1, 6), 1, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.newMap(5, 5);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapFace(new Location(0, 0, 0), 2, true);
+ mapUpdaterState.mapFace(new Location(1, 0, 0), 2, true);
+ mapUpdaterState.mapFace(new Location(0, 1, 0), 2, true);
+ mapUpdaterState.mapFace(new Location(1, 1, 0), 2, true);
+ mapUpdaterState.mapFace(new Location(1, 1, 6), 1, true);
+ mapUpdaterState.mapEnd(true);
Assert.assertEquals(""+"[H0=_,T6=M][H0=_,T6=M]\n"+"[H0=_,T6=M][H0=_,H6=M]\n", toString(mapUpdaterState.getMap(), 0, 0, 2, 2));
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapClear(1, 0);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapClear(1, 0);
+ mapUpdaterState.mapEnd(true);
Assert.assertEquals(""+"[H0=_,T6=M][#,H0=_,T6=M]\n"+"[H0=_,T6=M][H0=_,H6=M]\n", toString(mapUpdaterState.getMap(), 0, 0, 2, 2));
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapClear(1, 1);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapClear(1, 1);
+ mapUpdaterState.mapEnd(true);
Assert.assertEquals(""+"[H0=_][#,H0=_,T6=M]\n"+"[H0=_][#,H0=_,H6=M]\n", toString(mapUpdaterState.getMap(), 0, 0, 2, 2));
}
@@ -542,65 +542,65 @@
final MapUpdaterState mapUpdaterState = new MapUpdaterState(facesManager, null);
- mapUpdaterState.processNewMap(10, 10);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapFace(new Location(7, 8, 0), 4607, true);
- mapUpdaterState.processMapFace(new Location(8, 8, 0), 4607, true);
- mapUpdaterState.processMapFace(new Location(9, 8, 0), 4607, true);
- mapUpdaterState.processMapFace(new Location(7, 9, 0), 4607, true);
- mapUpdaterState.processMapFace(new Location(8, 9, 0), 4607, true);
- mapUpdaterState.processMapFace(new Location(9, 9, 0), 4607, true);
- mapUpdaterState.processMapFace(new Location(9, 9, 6), 312, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.newMap(10, 10);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapFace(new Location(7, 8, 0), 4607, true);
+ mapUpdaterState.mapFace(new Location(8, 8, 0), 4607, true);
+ mapUpdaterState.mapFace(new Location(9, 8, 0), 4607, true);
+ mapUpdaterState.mapFace(new Location(7, 9, 0), 4607, true);
+ mapUpdaterState.mapFace(new Location(8, 9, 0), 4607, true);
+ mapUpdaterState.mapFace(new Location(9, 9, 0), 4607, true);
+ mapUpdaterState.mapFace(new Location(9, 9, 6), 312, true);
+ mapUpdaterState.mapEnd(true);
mapUpdaterState.getMapAnimations().tick(26);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapFace(new Location(9, 9, 6), 307, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapFace(new Location(9, 9, 6), 307, true);
+ mapUpdaterState.mapEnd(true);
mapUpdaterState.getMapAnimations().tick(27);
mapUpdaterState.getMapAnimations().tick(28);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapFace(new Location(9, 9, 6), 308, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapFace(new Location(9, 9, 6), 308, true);
+ mapUpdaterState.mapEnd(true);
mapUpdaterState.getMapAnimations().tick(29);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapFace(new Location(0, 5, 6), 0, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapFace(new Location(0, 5, 6), 0, true);
+ mapUpdaterState.mapEnd(true);
mapUpdaterState.getMapAnimations().tick(30);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapFace(new Location(9, 9, 6), 309, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapFace(new Location(9, 9, 6), 309, true);
+ mapUpdaterState.mapEnd(true);
mapUpdaterState.getMapAnimations().tick(31);
mapUpdaterState.getMapAnimations().tick(32);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapFace(new Location(9, 9, 6), 308, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapFace(new Location(9, 9, 6), 308, true);
+ mapUpdaterState.mapEnd(true);
mapUpdaterState.getMapAnimations().tick(33);
mapUpdaterState.getMapAnimations().tick(34);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapFace(new Location(9, 9, 6), 0, true);
- mapUpdaterState.processMapFace(new Location(10, 9, 6), 307, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapFace(new Location(9, 9, 6), 0, true);
+ mapUpdaterState.mapFace(new Location(10, 9, 6), 307, true);
+ mapUpdaterState.mapEnd(true);
mapUpdaterState.getMapAnimations().tick(35);
mapUpdaterState.getMapAnimations().tick(36);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapFace(new Location(0, 6, 6), 932, true);
- mapUpdaterState.processMapFace(new Location(9, 9, 6), 312, true);
- mapUpdaterState.processMapClear(10, 9);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapFace(new Location(0, 6, 6), 932, true);
+ mapUpdaterState.mapFace(new Location(9, 9, 6), 312, true);
+ mapUpdaterState.mapClear(10, 9);
+ mapUpdaterState.mapEnd(true);
mapUpdaterState.getMapAnimations().tick(37);
mapUpdaterState.getMapAnimations().tick(38);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapFace(new Location(8, 9, 6), 310, true);
- mapUpdaterState.processMapFace(new Location(9, 9, 6), 0, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapFace(new Location(8, 9, 6), 310, true);
+ mapUpdaterState.mapFace(new Location(9, 9, 6), 0, true);
+ mapUpdaterState.mapEnd(true);
mapUpdaterState.getMapAnimations().tick(39);
@@ -620,15 +620,15 @@
final MapUpdaterState mapUpdaterState = new MapUpdaterState(facesManager, null);
- mapUpdaterState.processNewMap(10, 10);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapFace(new Location(5, 10, 6), 7, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.newMap(10, 10);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapFace(new Location(5, 10, 6), 7, true);
+ mapUpdaterState.mapEnd(true);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapFace(new Location(4, 10, 6), 8, true);
- mapUpdaterState.processMapClear(5, 10);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapFace(new Location(4, 10, 6), 8, true);
+ mapUpdaterState.mapClear(5, 10);
+ mapUpdaterState.mapEnd(true);
Assert.assertEquals(""+"[T6=b.x12][T6=b.x12][]\n"+"[T6=b.x12][H6=b.x12][#,H6=a.x11]\n", toString(mapUpdaterState.getMap(), 3, 9, 3, 2));
}
@@ -643,42 +643,42 @@
final FacesManager facesManager = new TestFacesManager(faceCache);
final MapUpdaterState mapUpdaterState = new MapUpdaterState(facesManager, null);
- mapUpdaterState.processNewMap(23, 16);
+ mapUpdaterState.newMap(23, 16);
defineFace(faceCache, 1316, "demon_lord.x11", PNG128X256);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapFace(new Location(4, 17, 6), 1316, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapFace(new Location(4, 17, 6), 1316, true);
+ mapUpdaterState.mapEnd(true);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapScroll(-1, 0);
- mapUpdaterState.processMapFace(new Location(5, 17, 6), 1316, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapScroll(-1, 0);
+ mapUpdaterState.mapFace(new Location(5, 17, 6), 1316, true);
+ mapUpdaterState.mapEnd(true);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapClear(5, 17);
- mapUpdaterState.processMapFace(new Location(6, 17, 6), 1316, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapClear(5, 17);
+ mapUpdaterState.mapFace(new Location(6, 17, 6), 1316, true);
+ mapUpdaterState.mapEnd(true);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapScroll(-1, 0);
- mapUpdaterState.processMapFace(new Location(7, 17, 6), 1316, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapScroll(-1, 0);
+ mapUpdaterState.mapFace(new Location(7, 17, 6), 1316, true);
+ mapUpdaterState.mapEnd(true);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapScroll(-1, 0);
- mapUpdaterState.processMapFace(new Location(8, 17, 6), 1316, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapScroll(-1, 0);
+ mapUpdaterState.mapFace(new Location(8, 17, 6), 1316, true);
+ mapUpdaterState.mapEnd(true);
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapScroll(-1, 0);
- mapUpdaterState.processMapFace(new Location(9, 17, 6), 1316, true);
- mapUpdaterState.processMapEnd(true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapScroll(-1, 0);
+ mapUpdaterState.mapFace(new Location(9, 17, 6), 1316, true);
+ mapUpdaterState.mapEnd(true);
Assert.assertEquals(""+"[][T6=demon_lord.x11][T6=demon_lord.x11][T6=demon_lord.x11][T6=demon_lord.x11][][][][]\n", toString(mapUpdaterState.getMap(), 5, 10, 9, 1));
- mapUpdaterState.processMapBegin();
- mapUpdaterState.processMapScroll(-1, 0);
- mapUpdaterState.processMapFace(new Location(11, 17, 6), 1316, true);
+ mapUpdaterState.mapBegin();
+ mapUpdaterState.mapScroll(-1, 0);
+ mapUpdaterState.mapFace(new Location(11, 17, 6), 1316, true);
Assert.assertEquals(""+"[][][][T6=demon_lord.x11][T6=demon_lord.x11][T6=demon_lord.x11][T6=demon_lord.x11][][]\n", toString(mapUpdaterState.getMap(), 5, 10, 9, 1));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|