Handle bigger tiles in zoom out tiles

This commit is contained in:
Mike Primm 2022-02-17 11:33:55 -06:00
parent 474c5ecca9
commit 8eb69514f2
4 changed files with 6 additions and 1 deletions

View File

@ -136,7 +136,7 @@ public abstract class DynmapWorld {
long mostRecentTimestamp = 0;
int step = 1 << tile.zoom;
MapStorageTile ztile = tile.getZoomOutTile();
int width = 128, height = 128;
int width = mts.tileSize, height = mts.tileSize;
BufferedImage zIm = null;
DynmapBufferedImage kzIm = null;
boolean blank = true;

View File

@ -115,6 +115,8 @@ public abstract class MapType {
public abstract List<DynmapChunk> getRequiredChunks(MapTile tile);
public abstract int getTileSize();
public void buildClientConfiguration(JSONObject worldObject, DynmapWorld w) {
}

View File

@ -22,6 +22,7 @@ public class MapTypeState {
private TileFlags.Iterator zoomOutInvIter = null;
private int zoomOutInvIterLevel = -1;
private final int zoomOutLevels;
public final int tileSize;
public MapTypeState(DynmapWorld world, MapType mt) {
type = mt;
@ -32,6 +33,7 @@ public class MapTypeState {
zoomOutInv.add(null);
zoomOutInvAccum.add(null);
}
tileSize = mt.getTileSize();
}
public void setInvalidatePeriod(long inv_per_in_secs) {
invTSPeriod = inv_per_in_secs * NANOS_PER_SECOND;

View File

@ -190,6 +190,7 @@ public class HDMap extends MapType {
public final HDPerspective getPerspective() { return perspective; }
public final HDLighting getLighting() { return lighting; }
public final int getBoostZoom() { return boostzoom; }
@Override
public final int getTileSize() { return 128 << tilescale; }
public final int getTileScale() { return tilescale; }