This commit is contained in:
Anuken
2020-01-19 11:10:14 -05:00
parent f7c4ea3e58
commit c0844304a6
259 changed files with 7166 additions and 7198 deletions

View File

@@ -201,7 +201,7 @@ public class FloorRenderer implements Disposable{
int chunksx = Mathf.ceil((float)(world.width()) / chunksize),
chunksy = Mathf.ceil((float)(world.height()) / chunksize);
cache = new Chunk[chunksx][chunksy];
cbatch = new MultiCacheBatch(chunksize * chunksize * 4);
cbatch = new MultiCacheBatch(chunksize * chunksize * 5);
Time.mark();

View File

@@ -46,9 +46,9 @@ public class IndexedRenderer implements Disposable{
private float[] tmpVerts = new float[vsize * 6];
private float[] vertices;
private Matrix3 projMatrix = new Matrix3();
private Matrix3 transMatrix = new Matrix3();
private Matrix3 combined = new Matrix3();
private Mat projMatrix = new Mat();
private Mat transMatrix = new Mat();
private Mat combined = new Mat();
private float color = Color.white.toFloatBits();
public IndexedRenderer(int sprites){
@@ -210,11 +210,11 @@ public class IndexedRenderer implements Disposable{
mesh.updateVertices(index * vsize * 6, vertices);
}
public Matrix3 getTransformMatrix(){
public Mat getTransformMatrix(){
return transMatrix;
}
public void setProjectionMatrix(Matrix3 matrix){
public void setProjectionMatrix(Mat matrix){
projMatrix = matrix;
}

View File

@@ -27,7 +27,7 @@ public class MenuRenderer implements Disposable{
private int cacheFloor, cacheWall;
private Camera camera = new Camera();
private Matrix3 mat = new Matrix3();
private Mat mat = new Mat();
private FrameBuffer shadows;
private CacheBatch batch;
private float time = 0f;

View File

@@ -64,7 +64,7 @@ public class OverlayRenderer{
for(Tile mechpad : indexer.getAllied(player.getTeam(), BlockFlag.mechPad)){
if(!(mechpad.block() instanceof MechPad)) continue;
if(!rect.setSize(Core.camera.width * 0.9f, Core.camera.height * 0.9f)
.setCenter(Core.camera.position.x, Core.camera.position.y).contains(mechpad.x, mechpad.y)){
.setCenter(Core.camera.position.x, Core.camera.position.y).contains(mechpad.drawx(), mechpad.drawy())){
Tmp.v1.set(mechpad.drawx(), mechpad.drawy()).sub(Core.camera.position.x, Core.camera.position.y).setLength(indicatorLength);