WIP unification and cleanup of rendering in editor
This commit is contained in:
BIN
core/assets-raw/sprites/blocks/environment/clear-editor.png
Normal file
BIN
core/assets-raw/sprites/blocks/environment/clear-editor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 91 B |
Binary file not shown.
|
Before Width: | Height: | Size: 146 B |
Binary file not shown.
|
Before Width: | Height: | Size: 68 B |
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
duplicatePadding: true,
|
|
||||||
combineSubdirectories: true,
|
|
||||||
flattenPaths: true,
|
|
||||||
maxWidth: 2048,
|
|
||||||
maxHeight: 2048,
|
|
||||||
fast: true,
|
|
||||||
stripWhitespaceCenter: true
|
|
||||||
}
|
|
||||||
@@ -40,7 +40,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
public @Nullable Bloom bloom;
|
public @Nullable Bloom bloom;
|
||||||
public @Nullable FrameBuffer backgroundBuffer;
|
public @Nullable FrameBuffer backgroundBuffer;
|
||||||
public FrameBuffer effectBuffer = new FrameBuffer();
|
public FrameBuffer effectBuffer = new FrameBuffer();
|
||||||
public boolean animateShields, drawWeather = true, drawStatus, enableEffects, drawDisplays = true, drawLight = true, pixelate = false;
|
public boolean animateShields, animateWater, drawWeather = true, drawStatus, enableEffects, drawDisplays = true, drawLight = true, pixelate = false;
|
||||||
public float weatherAlpha;
|
public float weatherAlpha;
|
||||||
/** minZoom = zooming out, maxZoom = zooming in, used by cutscenes */
|
/** minZoom = zooming out, maxZoom = zooming in, used by cutscenes */
|
||||||
public float minZoom = 1.5f, maxZoom = 6f;
|
public float minZoom = 1.5f, maxZoom = 6f;
|
||||||
@@ -167,6 +167,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
laserOpacity = settings.getInt("lasersopacity") / 100f;
|
laserOpacity = settings.getInt("lasersopacity") / 100f;
|
||||||
bridgeOpacity = settings.getInt("bridgeopacity") / 100f;
|
bridgeOpacity = settings.getInt("bridgeopacity") / 100f;
|
||||||
animateShields = settings.getBool("animatedshields");
|
animateShields = settings.getBool("animatedshields");
|
||||||
|
animateWater = settings.getBool("animatewater");
|
||||||
drawStatus = settings.getBool("blockstatus");
|
drawStatus = settings.getBool("blockstatus");
|
||||||
enableEffects = settings.getBool("effects");
|
enableEffects = settings.getBool("effects");
|
||||||
drawDisplays = !settings.getBool("hidedisplays");
|
drawDisplays = !settings.getBool("hidedisplays");
|
||||||
@@ -310,7 +311,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
graphics.clear(clearColor);
|
graphics.clear(clearColor);
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
|
|
||||||
if(settings.getBool("animatedwater") || animateShields){
|
if(animateWater || animateShields){
|
||||||
effectBuffer.resize(graphics.getWidth(), graphics.getHeight());
|
effectBuffer.resize(graphics.getWidth(), graphics.getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,10 +66,11 @@ public class EditorTile extends Tile{
|
|||||||
if(build != null) op(DrawOperation.opRotation, (byte)build.rotation);
|
if(build != null) op(DrawOperation.opRotation, (byte)build.rotation);
|
||||||
if(build != null) op(DrawOperation.opTeam, (byte)build.team.id);
|
if(build != null) op(DrawOperation.opTeam, (byte)build.team.id);
|
||||||
op(DrawOperation.opBlock, block.id);
|
op(DrawOperation.opBlock, block.id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
super.setBlock(type, team, rotation, entityprov);
|
super.setBlock(type, team, rotation, entityprov);
|
||||||
|
|
||||||
|
renderer.blocks.updateShadowTile(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -153,6 +154,11 @@ public class EditorTile extends Tile{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isDarkened(){
|
||||||
|
return skip() && super.isDarkened();
|
||||||
|
}
|
||||||
|
|
||||||
private void update(){
|
private void update(){
|
||||||
editor.renderer.updatePoint(x, y);
|
editor.renderer.updatePoint(x, y);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import arc.math.*;
|
|||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.game.*;
|
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.blocks.environment.*;
|
import mindustry.world.blocks.environment.*;
|
||||||
@@ -15,7 +14,7 @@ import mindustry.world.blocks.environment.*;
|
|||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public class MapRenderer implements Disposable{
|
public class MapRenderer implements Disposable{
|
||||||
private static final int chunkSize = 64;
|
private static final int chunkSize = 62;
|
||||||
private IndexedRenderer[][] chunks;
|
private IndexedRenderer[][] chunks;
|
||||||
private IntSet updates = new IntSet();
|
private IntSet updates = new IntSet();
|
||||||
private IntSet delayedUpdates = new IntSet();
|
private IntSet delayedUpdates = new IntSet();
|
||||||
@@ -43,10 +42,56 @@ public class MapRenderer implements Disposable{
|
|||||||
this.width = width;
|
this.width = width;
|
||||||
this.height = height;
|
this.height = height;
|
||||||
updateAll();
|
updateAll();
|
||||||
|
|
||||||
|
renderer.blocks.floor.clearTiles();
|
||||||
|
renderer.blocks.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(float tx, float ty, float tw, float th){
|
public void draw(float tx, float ty, float tw, float th, float zoom){
|
||||||
Draw.flush();
|
Draw.flush();
|
||||||
|
|
||||||
|
//TODO properly integrate this later
|
||||||
|
if(true){
|
||||||
|
updates.each(i -> renderer.blocks.floor.recacheTile(i % width, i / width));
|
||||||
|
updates.clear();
|
||||||
|
|
||||||
|
updates.addAll(delayedUpdates);
|
||||||
|
delayedUpdates.clear();
|
||||||
|
|
||||||
|
renderer.blocks.floor.checkChanges();
|
||||||
|
|
||||||
|
boolean prev = renderer.animateWater;
|
||||||
|
renderer.animateWater = false;
|
||||||
|
|
||||||
|
Core.camera.position.set(world.width()/2f * tilesize, world.height()/2f * tilesize);
|
||||||
|
Core.camera.width = 999999f;
|
||||||
|
Core.camera.height = 999999f;
|
||||||
|
Core.camera.mat.set(Draw.proj()).mul(Tmp.m3.setToTranslation(tx, ty).scale(tw / (width * tilesize), th / (height * tilesize)).translate(4f, 4f));
|
||||||
|
renderer.blocks.floor.drawFloor();
|
||||||
|
|
||||||
|
Tmp.m2.set(Draw.proj());
|
||||||
|
|
||||||
|
//this sure is awful!
|
||||||
|
Gl.disable(Gl.scissorTest);
|
||||||
|
|
||||||
|
renderer.blocks.processShadows();
|
||||||
|
|
||||||
|
Gl.enable(Gl.scissorTest);
|
||||||
|
|
||||||
|
Draw.proj(Core.camera.mat);
|
||||||
|
|
||||||
|
Draw.shader(Shaders.darkness);
|
||||||
|
Draw.rect(Draw.wrap(renderer.blocks.getShadowBuffer().getTexture()), world.width() * tilesize/2f - tilesize/2f, world.height() * tilesize/2f - tilesize/2f, world.width() * tilesize, -world.height() * tilesize);
|
||||||
|
Draw.shader();
|
||||||
|
|
||||||
|
Draw.proj(Tmp.m2);
|
||||||
|
|
||||||
|
renderer.blocks.floor.beginDraw();
|
||||||
|
renderer.blocks.floor.drawLayer(CacheLayer.walls);
|
||||||
|
renderer.animateWater = prev;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
clearEditor = Core.atlas.find("clear-editor");
|
clearEditor = Core.atlas.find("clear-editor");
|
||||||
|
|
||||||
updates.each(i -> render(i % width, i / width));
|
updates.each(i -> render(i % width, i / width));
|
||||||
@@ -60,7 +105,7 @@ public class MapRenderer implements Disposable{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var texture = Core.atlas.find("clear-editor").texture;
|
var texture = clearEditor.texture;
|
||||||
|
|
||||||
for(int x = 0; x < chunks.length; x++){
|
for(int x = 0; x < chunks.length; x++){
|
||||||
for(int y = 0; y < chunks[0].length; y++){
|
for(int y = 0; y < chunks[0].length; y++){
|
||||||
@@ -92,10 +137,10 @@ public class MapRenderer implements Disposable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private TextureRegion getIcon(Block wall, int index){
|
private TextureRegion getIcon(Block wall, int index){
|
||||||
return !wall.editorIcon().found() ?
|
return !wall.fullIcon.found() ?
|
||||||
clearEditor : wall.variants > 0 ?
|
clearEditor : wall.variants > 0 ?
|
||||||
wall.editorVariantRegions()[Mathf.randomSeed(index, 0, wall.editorVariantRegions().length - 1)] :
|
wall.variantRegions()[Mathf.randomSeed(index, 0, wall.variantRegions().length - 1)] :
|
||||||
wall.editorIcon();
|
wall.fullIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void render(int wx, int wy){
|
private void render(int wx, int wy){
|
||||||
@@ -104,7 +149,6 @@ public class MapRenderer implements Disposable{
|
|||||||
IndexedRenderer mesh = chunks[x][y];
|
IndexedRenderer mesh = chunks[x][y];
|
||||||
Tile tile = editor.tiles().getn(wx, wy);
|
Tile tile = editor.tiles().getn(wx, wy);
|
||||||
|
|
||||||
Team team = tile.team();
|
|
||||||
Floor floor = tile.floor();
|
Floor floor = tile.floor();
|
||||||
Floor overlay = tile.overlay();
|
Floor overlay = tile.overlay();
|
||||||
Block wall = tile.block();
|
Block wall = tile.block();
|
||||||
@@ -113,12 +157,11 @@ public class MapRenderer implements Disposable{
|
|||||||
|
|
||||||
int idxWall = (wx % chunkSize) + (wy % chunkSize) * chunkSize;
|
int idxWall = (wx % chunkSize) + (wy % chunkSize) * chunkSize;
|
||||||
int idxDecal = (wx % chunkSize) + (wy % chunkSize) * chunkSize + chunkSize * chunkSize;
|
int idxDecal = (wx % chunkSize) + (wy % chunkSize) * chunkSize + chunkSize * chunkSize;
|
||||||
boolean center = tile.isCenter();
|
boolean useSyntheticWall = overlay.wallOre;
|
||||||
boolean useSyntheticWall = wall.synthetic() || overlay.wallOre;
|
|
||||||
|
|
||||||
//draw synthetic wall or floor OR standard wall if wall ore
|
//draw synthetic wall or floor OR standard wall if wall ore
|
||||||
if(wall != Blocks.air && useSyntheticWall){
|
if(wall != Blocks.air && useSyntheticWall){
|
||||||
region = !center ? clearEditor : getIcon(wall, idxWall);
|
region = getIcon(wall, idxWall);
|
||||||
|
|
||||||
float width = region.width * region.scl(), height = region.height * region.scl(), ox = wall.offset + (tilesize - width) / 2f, oy = wall.offset + (tilesize - height) / 2f;
|
float width = region.width * region.scl(), height = region.height * region.scl(), ox = wall.offset + (tilesize - width) / 2f, oy = wall.offset + (tilesize - height) / 2f;
|
||||||
|
|
||||||
@@ -138,7 +181,7 @@ public class MapRenderer implements Disposable{
|
|||||||
mesh.setColor(Tmp.c1.set(tile.extraData | 0xff));
|
mesh.setColor(Tmp.c1.set(tile.extraData | 0xff));
|
||||||
}
|
}
|
||||||
|
|
||||||
region = floor.editorVariantRegions()[Mathf.randomSeed(idxWall, 0, floor.editorVariantRegions().length - 1)];
|
region = floor.variantRegions()[Mathf.randomSeed(idxWall, 0, floor.variantRegions().length - 1)];
|
||||||
|
|
||||||
mesh.draw(idxWall, region, wx * tilesize, wy * tilesize, 8, 8);
|
mesh.draw(idxWall, region, wx * tilesize, wy * tilesize, 8, 8);
|
||||||
}
|
}
|
||||||
@@ -146,14 +189,7 @@ public class MapRenderer implements Disposable{
|
|||||||
float offsetX = -((wall.size + 1) / 3) * tilesize, offsetY = -((wall.size + 1) / 3) * tilesize;
|
float offsetX = -((wall.size + 1) / 3) * tilesize, offsetY = -((wall.size + 1) / 3) * tilesize;
|
||||||
|
|
||||||
//draw non-synthetic wall or ore
|
//draw non-synthetic wall or ore
|
||||||
if((wall.update || wall.destructible) && center){
|
if(!(wall.update || wall.destructible) && !useSyntheticWall && wall != Blocks.air){
|
||||||
mesh.setColor(team.color);
|
|
||||||
region = Core.atlas.find("block-border-editor");
|
|
||||||
if(wall.size == 2){
|
|
||||||
offsetX += tilesize;
|
|
||||||
offsetY += tilesize;
|
|
||||||
}
|
|
||||||
}else if(!useSyntheticWall && wall != Blocks.air && center){
|
|
||||||
region = getIcon(wall, idxWall);
|
region = getIcon(wall, idxWall);
|
||||||
|
|
||||||
if(wall == Blocks.cliff){
|
if(wall == Blocks.cliff){
|
||||||
@@ -169,7 +205,7 @@ public class MapRenderer implements Disposable{
|
|||||||
if(floor.isLiquid){
|
if(floor.isLiquid){
|
||||||
mesh.setColor(Tmp.c1.set(1f, 1f, 1f, floor.overlayAlpha));
|
mesh.setColor(Tmp.c1.set(1f, 1f, 1f, floor.overlayAlpha));
|
||||||
}
|
}
|
||||||
region = overlay.editorVariantRegions()[Mathf.randomSeed(idxWall, 0, tile.overlay().editorVariantRegions().length - 1)];
|
region = overlay.variantRegions()[Mathf.randomSeed(idxWall, 0, tile.overlay().variantRegions().length - 1)];
|
||||||
}else{
|
}else{
|
||||||
region = clearEditor;
|
region = clearEditor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ public class MapView extends Element implements GestureListener{
|
|||||||
Draw.color(Pal.remove);
|
Draw.color(Pal.remove);
|
||||||
Lines.stroke(2f);
|
Lines.stroke(2f);
|
||||||
Lines.rect(centerx - sclwidth / 2 - 1, centery - sclheight / 2 - 1, sclwidth + 2, sclheight + 2);
|
Lines.rect(centerx - sclwidth / 2 - 1, centery - sclheight / 2 - 1, sclwidth + 2, sclheight + 2);
|
||||||
editor.renderer.draw(centerx - sclwidth / 2 + Core.scene.marginLeft, centery - sclheight / 2 + Core.scene.marginBottom, sclwidth, sclheight);
|
editor.renderer.draw(centerx - sclwidth / 2 + Core.scene.marginLeft, centery - sclheight / 2 + Core.scene.marginBottom, sclwidth, sclheight, zoom);
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
|
|
||||||
if(grid){
|
if(grid){
|
||||||
|
|||||||
@@ -64,48 +64,7 @@ public class BlockRenderer{
|
|||||||
});
|
});
|
||||||
|
|
||||||
Events.on(WorldLoadEvent.class, event -> {
|
Events.on(WorldLoadEvent.class, event -> {
|
||||||
blockTree = new BlockQuadtree(new Rect(0, 0, world.unitWidth(), world.unitHeight()));
|
reload();
|
||||||
blockLightTree = new BlockLightQuadtree(new Rect(0, 0, world.unitWidth(), world.unitHeight()));
|
|
||||||
floorTree = new FloorQuadtree(new Rect(0, 0, world.unitWidth(), world.unitHeight()));
|
|
||||||
|
|
||||||
shadowEvents.clear();
|
|
||||||
updateFloors.clear();
|
|
||||||
lastCamY = lastCamX = -99; //invalidate camera position so blocks get updated
|
|
||||||
hadMapLimit = state.rules.limitMapArea;
|
|
||||||
|
|
||||||
shadows.getTexture().setFilter(TextureFilter.linear, TextureFilter.linear);
|
|
||||||
shadows.resize(world.width(), world.height());
|
|
||||||
shadows.begin();
|
|
||||||
Core.graphics.clear(Color.white);
|
|
||||||
Draw.proj().setOrtho(0, 0, shadows.getWidth(), shadows.getHeight());
|
|
||||||
|
|
||||||
Draw.color(blendShadowColor);
|
|
||||||
|
|
||||||
for(Tile tile : world.tiles){
|
|
||||||
recordIndex(tile);
|
|
||||||
|
|
||||||
if(tile.floor().updateRender(tile)){
|
|
||||||
updateFloors.add(new UpdateRenderState(tile, tile.floor()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(tile.overlay().updateRender(tile)){
|
|
||||||
updateFloors.add(new UpdateRenderState(tile, tile.overlay()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(tile.build != null && (tile.team() == player.team() || !state.rules.fog || (tile.build.visibleFlags & (1L << player.team().id)) != 0)){
|
|
||||||
tile.build.wasVisible = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(tile.block().displayShadow(tile) && (tile.build == null || tile.build.wasVisible)){
|
|
||||||
Fill.rect(tile.x + 0.5f, tile.y + 0.5f, 1, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Draw.flush();
|
|
||||||
Draw.color();
|
|
||||||
shadows.end();
|
|
||||||
|
|
||||||
updateDarkness();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//sometimes darkness gets disabled.
|
//sometimes darkness gets disabled.
|
||||||
@@ -150,6 +109,51 @@ public class BlockRenderer{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void reload(){
|
||||||
|
blockTree = new BlockQuadtree(new Rect(0, 0, world.unitWidth(), world.unitHeight()));
|
||||||
|
blockLightTree = new BlockLightQuadtree(new Rect(0, 0, world.unitWidth(), world.unitHeight()));
|
||||||
|
floorTree = new FloorQuadtree(new Rect(0, 0, world.unitWidth(), world.unitHeight()));
|
||||||
|
|
||||||
|
shadowEvents.clear();
|
||||||
|
updateFloors.clear();
|
||||||
|
lastCamY = lastCamX = -99; //invalidate camera position so blocks get updated
|
||||||
|
hadMapLimit = state.rules.limitMapArea;
|
||||||
|
|
||||||
|
shadows.getTexture().setFilter(TextureFilter.linear, TextureFilter.linear);
|
||||||
|
shadows.resize(world.width(), world.height());
|
||||||
|
shadows.begin();
|
||||||
|
Core.graphics.clear(Color.white);
|
||||||
|
Draw.proj().setOrtho(0, 0, shadows.getWidth(), shadows.getHeight());
|
||||||
|
|
||||||
|
Draw.color(blendShadowColor);
|
||||||
|
|
||||||
|
for(Tile tile : world.tiles){
|
||||||
|
recordIndex(tile);
|
||||||
|
|
||||||
|
if(tile.floor().updateRender(tile)){
|
||||||
|
updateFloors.add(new UpdateRenderState(tile, tile.floor()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tile.overlay().updateRender(tile)){
|
||||||
|
updateFloors.add(new UpdateRenderState(tile, tile.overlay()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tile.build != null && (tile.team() == player.team() || !state.rules.fog || (tile.build.visibleFlags & (1L << player.team().id)) != 0)){
|
||||||
|
tile.build.wasVisible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tile.block().displayShadow(tile) && (tile.build == null || tile.build.wasVisible)){
|
||||||
|
Fill.rect(tile.x + 0.5f, tile.y + 0.5f, 1, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Draw.flush();
|
||||||
|
Draw.color();
|
||||||
|
shadows.end();
|
||||||
|
|
||||||
|
updateDarkness();
|
||||||
|
}
|
||||||
|
|
||||||
public void updateDarkness(){
|
public void updateDarkness(){
|
||||||
darkEvents.clear();
|
darkEvents.clear();
|
||||||
dark.getTexture().setFilter(TextureFilter.linear);
|
dark.getTexture().setFilter(TextureFilter.linear);
|
||||||
@@ -197,6 +201,10 @@ public class BlockRenderer{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FrameBuffer getShadowBuffer(){
|
||||||
|
return shadows;
|
||||||
|
}
|
||||||
|
|
||||||
public void removeFloorIndex(Tile tile){
|
public void removeFloorIndex(Tile tile){
|
||||||
if(indexFloor(tile)) floorTree.remove(tile);
|
if(indexFloor(tile)) floorTree.remove(tile);
|
||||||
}
|
}
|
||||||
@@ -294,7 +302,7 @@ public class BlockRenderer{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawShadows(){
|
public void processShadows(){
|
||||||
if(!shadowEvents.isEmpty()){
|
if(!shadowEvents.isEmpty()){
|
||||||
Draw.flush();
|
Draw.flush();
|
||||||
|
|
||||||
@@ -315,6 +323,10 @@ public class BlockRenderer{
|
|||||||
|
|
||||||
Draw.proj(camera);
|
Draw.proj(camera);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawShadows(){
|
||||||
|
processShadows();
|
||||||
|
|
||||||
float ww = world.width() * tilesize, wh = world.height() * tilesize;
|
float ww = world.width() * tilesize, wh = world.height() * tilesize;
|
||||||
float x = camera.position.x + tilesize / 2f, y = camera.position.y + tilesize / 2f;
|
float x = camera.position.x + tilesize / 2f, y = camera.position.y + tilesize / 2f;
|
||||||
@@ -511,6 +523,10 @@ public class BlockRenderer{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateShadowTile(Tile tile){
|
||||||
|
shadowEvents.add(tile);
|
||||||
|
}
|
||||||
|
|
||||||
static class BlockQuadtree extends QuadTree<Tile>{
|
static class BlockQuadtree extends QuadTree<Tile>{
|
||||||
|
|
||||||
public BlockQuadtree(Rect bounds){
|
public BlockQuadtree(Rect bounds){
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class CacheLayer{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void begin(){
|
public void begin(){
|
||||||
if(!Core.settings.getBool("animatedwater")) return;
|
if(!renderer.animateWater) return;
|
||||||
|
|
||||||
renderer.effectBuffer.begin();
|
renderer.effectBuffer.begin();
|
||||||
Core.graphics.clear(Color.clear);
|
Core.graphics.clear(Color.clear);
|
||||||
@@ -106,7 +106,7 @@ public class CacheLayer{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void end(){
|
public void end(){
|
||||||
if(!Core.settings.getBool("animatedwater")) return;
|
if(!renderer.animateWater) return;
|
||||||
|
|
||||||
renderer.effectBuffer.end();
|
renderer.effectBuffer.end();
|
||||||
renderer.effectBuffer.blit(shader);
|
renderer.effectBuffer.blit(shader);
|
||||||
|
|||||||
@@ -111,10 +111,17 @@ public class FloorRenderer{
|
|||||||
Events.on(WorldLoadEvent.class, event -> clearTiles());
|
Events.on(WorldLoadEvent.class, event -> clearTiles());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IndexData getIndexData(){
|
||||||
|
return indexData;
|
||||||
|
}
|
||||||
|
|
||||||
/** Queues up a cache change for a tile. Only runs in render loop. */
|
/** Queues up a cache change for a tile. Only runs in render loop. */
|
||||||
public void recacheTile(Tile tile){
|
public void recacheTile(Tile tile){
|
||||||
//recaching all layers may not be necessary
|
recacheTile(tile.x, tile.y);
|
||||||
recacheSet.add(Point2.pack(tile.x / chunksize, tile.y / chunksize));
|
}
|
||||||
|
|
||||||
|
public void recacheTile(int x, int y){
|
||||||
|
recacheSet.add(Point2.pack(x / chunksize, y / chunksize));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawFloor(){
|
public void drawFloor(){
|
||||||
@@ -127,10 +134,10 @@ public class FloorRenderer{
|
|||||||
float pad = tilesize/2f;
|
float pad = tilesize/2f;
|
||||||
|
|
||||||
int
|
int
|
||||||
minx = (int)((camera.position.x - camera.width/2f - pad) / chunkunits),
|
minx = Math.max((int)((camera.position.x - camera.width/2f - pad) / chunkunits), 0),
|
||||||
miny = (int)((camera.position.y - camera.height/2f - pad) / chunkunits),
|
miny = Math.max((int)((camera.position.y - camera.height/2f - pad) / chunkunits), 0),
|
||||||
maxx = Mathf.ceil((camera.position.x + camera.width/2f + pad) / chunkunits),
|
maxx = Math.min(Mathf.ceil((camera.position.x + camera.width/2f + pad) / chunkunits), cache.length),
|
||||||
maxy = Mathf.ceil((camera.position.y + camera.height/2f + pad) / chunkunits);
|
maxy = Math.min(Mathf.ceil((camera.position.y + camera.height/2f + pad) / chunkunits), cache[0].length);
|
||||||
|
|
||||||
int layers = CacheLayer.all.length;
|
int layers = CacheLayer.all.length;
|
||||||
|
|
||||||
@@ -221,10 +228,10 @@ public class FloorRenderer{
|
|||||||
Camera camera = Core.camera;
|
Camera camera = Core.camera;
|
||||||
|
|
||||||
int
|
int
|
||||||
minx = (int)((camera.position.x - camera.width/2f - pad) / chunkunits),
|
minx = Math.max((int)((camera.position.x - camera.width/2f - pad) / chunkunits), 0),
|
||||||
miny = (int)((camera.position.y - camera.height/2f - pad) / chunkunits),
|
miny = Math.max((int)((camera.position.y - camera.height/2f - pad) / chunkunits), 0),
|
||||||
maxx = Mathf.ceil((camera.position.x + camera.width/2f + pad) / chunkunits),
|
maxx = Math.min(Mathf.ceil((camera.position.x + camera.width/2f + pad) / chunkunits), cache.length),
|
||||||
maxy = Mathf.ceil((camera.position.y + camera.height/2f + pad) / chunkunits);
|
maxy = Math.min(Mathf.ceil((camera.position.y + camera.height/2f + pad) / chunkunits), cache[0].length);
|
||||||
|
|
||||||
layer.begin();
|
layer.begin();
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ import arc.graphics.g2d.*;
|
|||||||
import arc.graphics.gl.*;
|
import arc.graphics.gl.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
|
import mindustry.*;
|
||||||
|
|
||||||
|
import java.nio.*;
|
||||||
|
|
||||||
public class IndexedRenderer implements Disposable{
|
public class IndexedRenderer implements Disposable{
|
||||||
private static final int vsize = 5;
|
private static final int vsize = 5;
|
||||||
@@ -34,9 +37,10 @@ public class IndexedRenderer implements Disposable{
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
);
|
);
|
||||||
private static final float[] tmpVerts = new float[vsize * 6];
|
private static final float[] tmpVerts = new float[vsize * 4];
|
||||||
|
|
||||||
private Mesh mesh;
|
private Mesh mesh;
|
||||||
|
private FloatBuffer buffer;
|
||||||
|
|
||||||
private Mat projMatrix = new Mat();
|
private Mat projMatrix = new Mat();
|
||||||
private Mat transMatrix = new Mat();
|
private Mat transMatrix = new Mat();
|
||||||
@@ -57,7 +61,7 @@ public class IndexedRenderer implements Disposable{
|
|||||||
|
|
||||||
program.setUniformMatrix4("u_projTrans", combined);
|
program.setUniformMatrix4("u_projTrans", combined);
|
||||||
|
|
||||||
mesh.render(program, Gl.triangles, 0, mesh.getMaxVertices());
|
mesh.render(program, Gl.triangles, 0, mesh.getMaxVertices() * 6 / 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setColor(Color color){
|
public void setColor(Color color){
|
||||||
@@ -94,26 +98,19 @@ public class IndexedRenderer implements Disposable{
|
|||||||
vertices[idx++] = u2;
|
vertices[idx++] = u2;
|
||||||
vertices[idx++] = v2;
|
vertices[idx++] = v2;
|
||||||
|
|
||||||
//tri2
|
|
||||||
vertices[idx++] = fx2;
|
|
||||||
vertices[idx++] = fy2;
|
|
||||||
vertices[idx++] = color;
|
|
||||||
vertices[idx++] = u2;
|
|
||||||
vertices[idx++] = v2;
|
|
||||||
|
|
||||||
vertices[idx++] = fx2;
|
vertices[idx++] = fx2;
|
||||||
vertices[idx++] = y;
|
vertices[idx++] = y;
|
||||||
vertices[idx++] = color;
|
vertices[idx++] = color;
|
||||||
vertices[idx++] = u2;
|
vertices[idx++] = u2;
|
||||||
vertices[idx++] = v;
|
vertices[idx++] = v;
|
||||||
|
|
||||||
vertices[idx++] = x;
|
int dest = index * vsize * 4;
|
||||||
vertices[idx++] = y;
|
|
||||||
vertices[idx++] = color;
|
|
||||||
vertices[idx++] = u;
|
|
||||||
vertices[idx++] = v;
|
|
||||||
|
|
||||||
mesh.updateVertices(index * vsize * 6, vertices);
|
buffer.position(dest);
|
||||||
|
buffer.put(vertices);
|
||||||
|
|
||||||
|
//mark dirty
|
||||||
|
mesh.getVerticesBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(int index, TextureRegion region, float x, float y, float w, float h, float rotation){
|
public void draw(int index, TextureRegion region, float x, float y, float w, float h, float rotation){
|
||||||
@@ -166,26 +163,19 @@ public class IndexedRenderer implements Disposable{
|
|||||||
vertices[idx++] = u2;
|
vertices[idx++] = u2;
|
||||||
vertices[idx++] = v2;
|
vertices[idx++] = v2;
|
||||||
|
|
||||||
//tri2
|
|
||||||
vertices[idx++] = x3;
|
|
||||||
vertices[idx++] = y3;
|
|
||||||
vertices[idx++] = color;
|
|
||||||
vertices[idx++] = u2;
|
|
||||||
vertices[idx++] = v2;
|
|
||||||
|
|
||||||
vertices[idx++] = x4;
|
vertices[idx++] = x4;
|
||||||
vertices[idx++] = y4;
|
vertices[idx++] = y4;
|
||||||
vertices[idx++] = color;
|
vertices[idx++] = color;
|
||||||
vertices[idx++] = u2;
|
vertices[idx++] = u2;
|
||||||
vertices[idx++] = v;
|
vertices[idx++] = v;
|
||||||
|
|
||||||
vertices[idx++] = x1;
|
int dest = index * vsize * 4;
|
||||||
vertices[idx++] = y1;
|
|
||||||
vertices[idx++] = color;
|
|
||||||
vertices[idx++] = u;
|
|
||||||
vertices[idx++] = v;
|
|
||||||
|
|
||||||
mesh.updateVertices(index * vsize * 6, vertices);
|
buffer.position(dest);
|
||||||
|
buffer.put(vertices);
|
||||||
|
|
||||||
|
//mark dirty
|
||||||
|
mesh.getVerticesBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Mat getTransformMatrix(){
|
public Mat getTransformMatrix(){
|
||||||
@@ -199,13 +189,15 @@ public class IndexedRenderer implements Disposable{
|
|||||||
public void resize(int sprites){
|
public void resize(int sprites){
|
||||||
if(mesh != null) mesh.dispose();
|
if(mesh != null) mesh.dispose();
|
||||||
|
|
||||||
mesh = new Mesh(true, 6 * sprites, 0,
|
mesh = new Mesh(true, 4 * sprites, 0,
|
||||||
VertexAttribute.position,
|
VertexAttribute.position,
|
||||||
VertexAttribute.color,
|
VertexAttribute.color,
|
||||||
VertexAttribute.texCoords);
|
VertexAttribute.texCoords);
|
||||||
|
|
||||||
//TODO why is this the only way to get it working properly? it should not need an array
|
buffer = mesh.getVerticesBuffer();
|
||||||
mesh.setVertices(new float[6 * sprites * vsize]);
|
buffer.limit(buffer.capacity());
|
||||||
|
|
||||||
|
mesh.indices = Vars.renderer.blocks.floor.getIndexData();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateMatrix(){
|
private void updateMatrix(){
|
||||||
|
|||||||
@@ -118,8 +118,7 @@ public class MultiPacker implements Disposable{
|
|||||||
|
|
||||||
environment(4096),
|
environment(4096),
|
||||||
ui(4096),
|
ui(4096),
|
||||||
rubble(4096, 2048),
|
rubble(4096, 2048);
|
||||||
editor(4096, 2048);
|
|
||||||
|
|
||||||
public static final PageType[] all = values();
|
public static final PageType[] all = values();
|
||||||
|
|
||||||
|
|||||||
@@ -273,7 +273,6 @@ public class Mods implements Loadable{
|
|||||||
ObjectMap<Texture, PageType> pageTypes = ObjectMap.of(
|
ObjectMap<Texture, PageType> pageTypes = ObjectMap.of(
|
||||||
Core.atlas.find("white").texture, PageType.main,
|
Core.atlas.find("white").texture, PageType.main,
|
||||||
Core.atlas.find("stone1").texture, PageType.environment,
|
Core.atlas.find("stone1").texture, PageType.environment,
|
||||||
Core.atlas.find("clear-editor").texture, PageType.editor,
|
|
||||||
Core.atlas.find("whiteui").texture, PageType.ui,
|
Core.atlas.find("whiteui").texture, PageType.ui,
|
||||||
Core.atlas.find("rubble-1-0").texture, PageType.rubble
|
Core.atlas.find("rubble-1-0").texture, PageType.rubble
|
||||||
);
|
);
|
||||||
@@ -405,7 +404,6 @@ public class Mods implements Loadable{
|
|||||||
String path = file.path();
|
String path = file.path();
|
||||||
return
|
return
|
||||||
path.contains("sprites/blocks/environment") || path.contains("sprites-override/blocks/environment") ? PageType.environment :
|
path.contains("sprites/blocks/environment") || path.contains("sprites-override/blocks/environment") ? PageType.environment :
|
||||||
path.contains("sprites/editor") || path.contains("sprites-override/editor") ? PageType.editor :
|
|
||||||
path.contains("sprites/rubble") || path.contains("sprites-override/rubble") ? PageType.rubble :
|
path.contains("sprites/rubble") || path.contains("sprites-override/rubble") ? PageType.rubble :
|
||||||
path.contains("sprites/ui") || path.contains("sprites-override/ui") ? PageType.ui :
|
path.contains("sprites/ui") || path.contains("sprites-override/ui") ? PageType.ui :
|
||||||
PageType.main;
|
PageType.main;
|
||||||
|
|||||||
@@ -382,11 +382,10 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
protected Seq<Consume> consumeBuilder = new Seq<>();
|
protected Seq<Consume> consumeBuilder = new Seq<>();
|
||||||
|
|
||||||
protected TextureRegion[] generatedIcons;
|
protected TextureRegion[] generatedIcons;
|
||||||
protected TextureRegion[] editorVariantRegions;
|
|
||||||
|
|
||||||
/** Regions indexes from icons() that are rotated. If either of these is not -1, other regions won't be rotated in ConstructBlocks. */
|
/** Regions indexes from icons() that are rotated. If either of these is not -1, other regions won't be rotated in ConstructBlocks. */
|
||||||
public int regionRotated1 = -1, regionRotated2 = -1;
|
public int regionRotated1 = -1, regionRotated2 = -1;
|
||||||
public TextureRegion region, editorIcon;
|
public TextureRegion region;
|
||||||
public @Load("@-shadow") TextureRegion customShadowRegion;
|
public @Load("@-shadow") TextureRegion customShadowRegion;
|
||||||
public @Load("@-team") TextureRegion teamRegion;
|
public @Load("@-team") TextureRegion teamRegion;
|
||||||
public TextureRegion[] teamRegions, variantRegions, variantShadowRegions;
|
public TextureRegion[] teamRegions, variantRegions, variantShadowRegions;
|
||||||
@@ -864,24 +863,6 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Never use outside of the editor! */
|
|
||||||
public TextureRegion editorIcon(){
|
|
||||||
return editorIcon == null ? (editorIcon = Core.atlas.find(name + "-icon-editor")) : editorIcon;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Never use outside of the editor! */
|
|
||||||
public TextureRegion[] editorVariantRegions(){
|
|
||||||
if(editorVariantRegions == null){
|
|
||||||
variantRegions();
|
|
||||||
editorVariantRegions = new TextureRegion[variantRegions.length];
|
|
||||||
for(int i = 0; i < variantRegions.length; i++){
|
|
||||||
AtlasRegion region = (AtlasRegion)variantRegions[i];
|
|
||||||
editorVariantRegions[i] = Core.atlas.find("editor-" + region.name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return editorVariantRegions;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @return special icons to outline and save with an -outline variant. Vanilla only. */
|
/** @return special icons to outline and save with an -outline variant. Vanilla only. */
|
||||||
public TextureRegion[] makeIconRegions(){
|
public TextureRegion[] makeIconRegions(){
|
||||||
return new TextureRegion[0];
|
return new TextureRegion[0];
|
||||||
@@ -1388,13 +1369,6 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
mapColor.set(image.get(image.width/2, image.height/2));
|
mapColor.set(image.get(image.width/2, image.height/2));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(variants > 0){
|
|
||||||
for(int i = 0; i < variants; i++){
|
|
||||||
String rname = name + (i + 1);
|
|
||||||
packer.add(PageType.editor, "editor-" + rname, Core.atlas.getPixmap(rname));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Seq<Pixmap> toDispose = new Seq<>();
|
Seq<Pixmap> toDispose = new Seq<>();
|
||||||
|
|
||||||
//generate paletted team regions
|
//generate paletted team regions
|
||||||
@@ -1459,8 +1433,6 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PixmapRegion editorBase;
|
|
||||||
|
|
||||||
if(gen.length > 1){
|
if(gen.length > 1){
|
||||||
Pixmap base = Core.atlas.getPixmap(gen[0]).crop();
|
Pixmap base = Core.atlas.getPixmap(gen[0]).crop();
|
||||||
for(int i = 1; i < gen.length; i++){
|
for(int i = 1; i < gen.length; i++){
|
||||||
@@ -1472,15 +1444,11 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
}
|
}
|
||||||
packer.add(PageType.main, "block-" + name + "-full", base);
|
packer.add(PageType.main, "block-" + name + "-full", base);
|
||||||
|
|
||||||
editorBase = new PixmapRegion(base);
|
|
||||||
toDispose.add(base);
|
toDispose.add(base);
|
||||||
}else{
|
}else{
|
||||||
if(gen[0] != null) packer.add(PageType.main, "block-" + name + "-full", Core.atlas.getPixmap(gen[0]));
|
if(gen[0] != null) packer.add(PageType.main, "block-" + name + "-full", Core.atlas.getPixmap(gen[0]));
|
||||||
editorBase = gen[0] == null ? Core.atlas.getPixmap(fullIcon) : Core.atlas.getPixmap(gen[0]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
packer.add(PageType.editor, name + "-icon-editor", editorBase);
|
|
||||||
|
|
||||||
toDispose.each(Pixmap::dispose);
|
toDispose.each(Pixmap::dispose);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ public class Floor extends Block{
|
|||||||
@Override
|
@Override
|
||||||
public void createIcons(MultiPacker packer){
|
public void createIcons(MultiPacker packer){
|
||||||
super.createIcons(packer);
|
super.createIcons(packer);
|
||||||
packer.add(PageType.editor, "editor-" + name, Core.atlas.getPixmap(fullIcon));
|
|
||||||
|
|
||||||
if(blendGroup != this){
|
if(blendGroup != this){
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -63,10 +63,8 @@ public class OreBlock extends OverlayFloor{
|
|||||||
}
|
}
|
||||||
|
|
||||||
packer.add(PageType.environment, name + (i + 1), image);
|
packer.add(PageType.environment, name + (i + 1), image);
|
||||||
packer.add(PageType.editor, "editor-" + name + (i + 1), image);
|
|
||||||
|
|
||||||
if(i == 0){
|
if(i == 0){
|
||||||
packer.add(PageType.editor, "editor-block-" + name + "-full", image);
|
|
||||||
packer.add(PageType.main, "block-" + name + "-full", image);
|
packer.add(PageType.main, "block-" + name + "-full", image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,9 +47,8 @@ public class ShallowLiquid extends Floor{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String baseName = this.name + "" + (++index);
|
String baseName = this.name + (++index);
|
||||||
packer.add(PageType.environment, baseName, res);
|
packer.add(PageType.environment, baseName, res);
|
||||||
packer.add(PageType.editor, "editor-" + baseName, res);
|
|
||||||
|
|
||||||
res.dispose();
|
res.dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,6 @@ public class Generators{
|
|||||||
Pixmap out = new Pixmap(basePath);
|
Pixmap out = new Pixmap(basePath);
|
||||||
Pixmap cropped = out.crop(32, 32, 32, 32);
|
Pixmap cropped = out.crop(32, 32, 32, 32);
|
||||||
iconPath.writePng(cropped);
|
iconPath.writePng(cropped);
|
||||||
iconPath.parent().parent().parent().child("editor").child("editor-" + block.name + ".png").writePng(cropped);
|
|
||||||
out.dispose();
|
out.dispose();
|
||||||
gens.put(block, cropped);
|
gens.put(block, cropped);
|
||||||
}
|
}
|
||||||
@@ -262,7 +261,6 @@ public class Generators{
|
|||||||
|
|
||||||
Fi fi = Fi.get("../blocks/environment/cliffmask" + (val & 0xff) + ".png");
|
Fi fi = Fi.get("../blocks/environment/cliffmask" + (val & 0xff) + ".png");
|
||||||
fi.writePng(result);
|
fi.writePng(result);
|
||||||
fi.copyTo(Fi.get("../editor").child("editor-" + fi.name()));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,14 +322,6 @@ public class Generators{
|
|||||||
|
|
||||||
TextureRegion[] regions = block.getGeneratedIcons();
|
TextureRegion[] regions = block.getGeneratedIcons();
|
||||||
|
|
||||||
if(block.variants > 0 || block instanceof Floor){
|
|
||||||
for(TextureRegion region : block.variantRegions()){
|
|
||||||
GenRegion gen = (GenRegion)region;
|
|
||||||
if(gen.path == null) continue;
|
|
||||||
gen.path.copyTo(Fi.get("../editor/editor-" + gen.path.name()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(TextureRegion region : block.makeIconRegions()){
|
for(TextureRegion region : block.makeIconRegions()){
|
||||||
GenRegion gen = (GenRegion)region;
|
GenRegion gen = (GenRegion)region;
|
||||||
save(get(region).outline(block.outlineColor, block.outlineRadius), gen.name + "-outline");
|
save(get(region).outline(block.outlineColor, block.outlineRadius), gen.name + "-outline");
|
||||||
@@ -418,7 +408,6 @@ public class Generators{
|
|||||||
save(image, "block-" + block.name + "-full");
|
save(image, "block-" + block.name + "-full");
|
||||||
}
|
}
|
||||||
|
|
||||||
save(image, "../editor/" + block.name + "-icon-editor");
|
|
||||||
saveScaled(image, "../ui/block-" + block.name + "-ui", Math.min(image.width, maxUiIcon));
|
saveScaled(image, "../ui/block-" + block.name + "-ui", Math.min(image.width, maxUiIcon));
|
||||||
}else if(gens.containsKey(block)){
|
}else if(gens.containsKey(block)){
|
||||||
image = gens.get(block);
|
image = gens.get(block);
|
||||||
@@ -472,9 +461,8 @@ public class Generators{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String name = floor.name + "" + (++index);
|
String name = floor.name + (++index);
|
||||||
save(res, "../blocks/environment/" + name);
|
save(res, "../blocks/environment/" + name);
|
||||||
save(res, "../editor/editor-" + name);
|
|
||||||
|
|
||||||
gens.put(floor, res);
|
gens.put(floor, res);
|
||||||
}
|
}
|
||||||
@@ -828,7 +816,6 @@ public class Generators{
|
|||||||
replace(ore.variantRegions[i], image);
|
replace(ore.variantRegions[i], image);
|
||||||
|
|
||||||
save(image, "../blocks/environment/" + ore.name + (i + 1));
|
save(image, "../blocks/environment/" + ore.name + (i + 1));
|
||||||
save(image, "../editor/editor-" + ore.name + (i + 1));
|
|
||||||
|
|
||||||
save(image, "block-" + ore.name + "-full");
|
save(image, "block-" + ore.name + "-full");
|
||||||
save(image, "../ui/block-" + ore.name + "-ui");
|
save(image, "../ui/block-" + ore.name + "-ui");
|
||||||
|
|||||||
Reference in New Issue
Block a user