Handle bigmap versus bigworld, allows HDMap to be big-map-style independent of bigworld setting. Add bigmap setting on KzedMap and FlatMap too.

This commit is contained in:
Mike Primm 2011-07-09 15:51:32 -05:00
parent 02fa9384ac
commit 898f4a6740
11 changed files with 51 additions and 24 deletions

View file

@ -47,6 +47,7 @@ public class KzedMap extends MapType {
public static final int anchorz = 0;
MapTileRenderer[] renderers;
private boolean isbigmap;
/* BufferedImage with direct access to its ARGB-formatted data buffer */
public static class KzedBufferedImage {
@ -68,6 +69,7 @@ public class KzedMap extends MapType {
this.renderers = new MapTileRenderer[renderers.size()];
renderers.toArray(this.renderers);
Log.verboseinfo("Loaded " + renderers.size() + " renderers for map '" + getClass().toString() + "'.");
isbigmap = configuration.getBoolean("isbigmap", false);
}
@Override
@ -342,14 +344,20 @@ public class KzedMap extends MapType {
/* How many bits of coordinate are shifted off to make big world directory name */
public int getBigWorldShift() { return 12; }
/* Returns true if big world file structure is in effect for this map */
@Override
public boolean isBigWorldMap(DynmapWorld w) {
return w.bigworld || isbigmap;
}
public String getName() {
return "KzedMap";
}
@Override
public void buildClientConfiguration(JSONObject worldObject) {
public void buildClientConfiguration(JSONObject worldObject, DynmapWorld world) {
for(MapTileRenderer renderer : renderers) {
renderer.buildClientConfiguration(worldObject);
renderer.buildClientConfiguration(worldObject, world, this);
}
}