Refactor HDMap configuration - add shaders, perspectives

This commit is contained in:
Mike Primm 2011-07-08 22:40:40 -05:00
parent 7e5865a899
commit 69baafe597
19 changed files with 1375 additions and 769 deletions

View file

@ -213,8 +213,7 @@ public class DefaultTileRenderer implements MapTileRenderer {
}
/* Hand encoding and writing file off to MapManager */
KzedZoomedMapTile zmtile = new KzedZoomedMapTile(tile.getDynmapWorld(),
(KzedMap) tile.getMap(), tile);
KzedZoomedMapTile zmtile = new KzedZoomedMapTile(tile.getDynmapWorld(), tile);
File zoomFile = MapManager.mapman.getTileFile(zmtile);
doFileWrites(outputFile, tile, im, im_day, zmtile, zoomFile, zim, zim_day, !isempty);

View file

@ -140,10 +140,6 @@ public class KzedMap extends MapType {
}
}
public void invalidateTile(MapTile tile) {
onTileInvalidated.trigger(tile);
}
/**
* Test if point x,z is inside rectangle with corner at r0x,r0z and with
* size vectors s1x,s1z and s2x,s2z

View file

@ -1,8 +1,14 @@
package org.dynmap.kzedmap;
import org.dynmap.DynmapChunk;
import org.dynmap.DynmapWorld;
import org.dynmap.MapManager;
import java.io.File;
import java.util.List;
import org.dynmap.MapTile;
import org.dynmap.utils.MapChunkCache;
public class KzedMapTile extends MapTile {
public KzedMap map;
@ -15,7 +21,7 @@ public class KzedMapTile extends MapTile {
public File file = null;
public KzedMapTile(DynmapWorld world, KzedMap map, MapTileRenderer renderer, int px, int py) {
super(world, map);
super(world);
this.map = map;
this.renderer = renderer;
this.px = px;
@ -68,4 +74,16 @@ public class KzedMapTile extends MapTile {
public String toString() {
return getWorld().getName() + ":" + getFilename();
}
public boolean render(MapChunkCache cache) {
return map.render(cache, this, MapManager.mapman.getTileFile(this));
}
public List<DynmapChunk> getRequiredChunks() {
return map.getRequiredChunks(this);
}
public MapTile[] getAdjecentTiles() {
return map.getAdjecentTiles(this);
}
}

View file

@ -1,7 +1,11 @@
package org.dynmap.kzedmap;
import java.util.List;
import org.dynmap.DynmapChunk;
import org.dynmap.DynmapWorld;
import org.dynmap.MapTile;
import org.dynmap.utils.MapChunkCache;
public class KzedZoomedMapTile extends MapTile {
private String fname;
@ -33,8 +37,8 @@ public class KzedZoomedMapTile extends MapTile {
public KzedMapTile originalTile;
public KzedZoomedMapTile(DynmapWorld world, KzedMap map, KzedMapTile original) {
super(world, map);
public KzedZoomedMapTile(DynmapWorld world, KzedMapTile original) {
super(world);
this.originalTile = original;
}
@ -79,4 +83,19 @@ public class KzedZoomedMapTile extends MapTile {
return getWorld().getName() + ".z" + originalTile.renderer.getName();
}
@Override
public boolean render(MapChunkCache cache) {
return false;
}
@Override
public List<DynmapChunk> getRequiredChunks() {
return null;
}
@Override
public MapTile[] getAdjecentTiles() {
return null;
}
}