mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-13 09:17:28 +07:00
Messed up many things
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
#Autogenerated file. Do not modify.
|
||||
#Tue Apr 17 18:52:07 EDT 2018
|
||||
#Tue Apr 17 19:48:06 EDT 2018
|
||||
version=release
|
||||
androidBuildCode=933
|
||||
androidBuildCode=947
|
||||
name=Mindustry
|
||||
code=3.5
|
||||
build=custom build
|
||||
|
@ -184,8 +184,6 @@ public class Renderer extends RendererModule{
|
||||
draw();
|
||||
|
||||
camera.position.set(lastx - deltax, lasty - deltay, 0);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.WorldGenerator;
|
||||
import io.anuke.ucore.entities.Entities;
|
||||
import io.anuke.ucore.modules.Module;
|
||||
import io.anuke.ucore.util.Log;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
import io.anuke.ucore.util.Tmp;
|
||||
|
||||
@ -156,6 +157,7 @@ public class World extends Module{
|
||||
}
|
||||
|
||||
public void loadMap(Map map, int seed){
|
||||
Log.info("--BEGIN LOAD MAP--");
|
||||
this.currentMap = map;
|
||||
this.seed = seed;
|
||||
|
||||
@ -191,8 +193,7 @@ public class World extends Module{
|
||||
Mathf.scl2(x2, tilesize), Mathf.scl2(y2, tilesize));
|
||||
}
|
||||
|
||||
/**
|
||||
* Input is in block coordinates, not world coordinates.
|
||||
/**Input is in block coordinates, not world coordinates.
|
||||
* @return null if no collisions found, block position otherwise.*/
|
||||
public GridPoint2 raycast(int x0f, int y0f, int x1, int y1){
|
||||
int x0 = x0f;
|
||||
|
@ -5,16 +5,18 @@ import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.GL20;
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.content.blocks.Blocks;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.content.blocks.Blocks;
|
||||
import io.anuke.mindustry.world.blocks.types.StaticBlock;
|
||||
import io.anuke.ucore.core.Core;
|
||||
import io.anuke.ucore.core.Graphics;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.graphics.CacheBatch;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.graphics.Lines;
|
||||
import io.anuke.ucore.util.Log;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
import java.util.Arrays;
|
||||
@ -204,6 +206,8 @@ public class BlockRenderer{
|
||||
if(cache == null || cache.length != chunksx || cache[0].length != chunksy){
|
||||
cache = new int[chunksx][chunksy][DrawLayer.values().length];
|
||||
|
||||
Timers.markNs();
|
||||
|
||||
for(DrawLayer layer : DrawLayer.values()){
|
||||
for(int x = 0; x < chunksx; x++){
|
||||
for(int y = 0; y < chunksy; y++){
|
||||
@ -211,6 +215,8 @@ public class BlockRenderer{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Log.info("CACHING ELAPSED: {0}", Timers.elapsedNs());
|
||||
}
|
||||
|
||||
OrthographicCamera camera = Core.camera;
|
||||
|
@ -110,7 +110,7 @@ public class MapIO {
|
||||
InputStream stream;
|
||||
|
||||
if (!map.custom) {
|
||||
stream = Gdx.files.local("maps/" + map.name + "." + mapExtension).read();
|
||||
stream = Gdx.files.internal("maps/" + map.name + "." + mapExtension).read();
|
||||
} else {
|
||||
stream = customMapDirectory.child(map.name + "." + mapExtension).read();
|
||||
}
|
||||
|
Reference in New Issue
Block a user