This commit is contained in:
Anuken
2020-03-25 00:18:40 -04:00
parent 7d5ceafff2
commit 4fb74d1e39
5 changed files with 30 additions and 29 deletions
+4 -4
View File
@@ -191,7 +191,7 @@ public class Schematics implements Loadable{
Tmp.m2.set(Draw.trans()); Tmp.m2.set(Draw.trans());
FrameBuffer buffer = new FrameBuffer((schematic.width + padding) * resolution, (schematic.height + padding) * resolution); FrameBuffer buffer = new FrameBuffer((schematic.width + padding) * resolution, (schematic.height + padding) * resolution);
shadowBuffer.beginDraw(Color.clear); shadowBuffer.begin(Color.clear);
Draw.trans().idt(); Draw.trans().idt();
Draw.proj().setOrtho(0, 0, shadowBuffer.getWidth(), shadowBuffer.getHeight()); Draw.proj().setOrtho(0, 0, shadowBuffer.getWidth(), shadowBuffer.getHeight());
@@ -210,9 +210,9 @@ public class Schematics implements Loadable{
} }
}); });
shadowBuffer.endDraw(); shadowBuffer.end();
buffer.beginDraw(Color.clear); buffer.begin(Color.clear);
Draw.proj().setOrtho(0, buffer.getHeight(), buffer.getWidth(), -buffer.getHeight()); Draw.proj().setOrtho(0, buffer.getHeight(), buffer.getWidth(), -buffer.getHeight());
@@ -239,7 +239,7 @@ public class Schematics implements Loadable{
Draw.flush(); Draw.flush();
Draw.trans().idt(); Draw.trans().idt();
buffer.endDraw(); buffer.end();
Draw.proj(Tmp.m1); Draw.proj(Tmp.m1);
Draw.trans(Tmp.m2); Draw.trans(Tmp.m2);
@@ -183,14 +183,14 @@ public class LightRenderer{
} }
Draw.color(); Draw.color();
buffer.beginDraw(Color.clear); buffer.begin(Color.clear);
Gl.blendEquationSeparate(Gl.funcAdd, Gl.max); Gl.blendEquationSeparate(Gl.funcAdd, Gl.max);
for(Runnable run : lights){ for(Runnable run : lights){
run.run(); run.run();
} }
Draw.reset(); Draw.reset();
buffer.endDraw(); buffer.end();
Gl.blendEquationSeparate(Gl.funcAdd, Gl.funcAdd); Gl.blendEquationSeparate(Gl.funcAdd, Gl.funcAdd);
Draw.color(); Draw.color();
@@ -168,7 +168,7 @@ public class MenuRenderer implements Disposable{
//draw shadows //draw shadows
Draw.proj().setOrtho(0, 0, shadows.getWidth(), shadows.getHeight()); Draw.proj().setOrtho(0, 0, shadows.getWidth(), shadows.getHeight());
shadows.beginDraw(Color.clear); shadows.begin(Color.clear);
Draw.color(Color.black); Draw.color(Color.black);
for(Tile tile : world.tiles){ for(Tile tile : world.tiles){
@@ -178,7 +178,7 @@ public class MenuRenderer implements Disposable{
} }
Draw.color(); Draw.color();
shadows.endDraw(); shadows.end();
SpriteBatch prev = Core.batch; SpriteBatch prev = Core.batch;
@@ -119,10 +119,7 @@ public abstract class Turret extends Block{
public class TurretEntity extends TileEntity{ public class TurretEntity extends TileEntity{
public Array<AmmoEntry> ammo = new Array<>(); public Array<AmmoEntry> ammo = new Array<>();
public int totalAmmo; public int totalAmmo;
public float reload; public float reload, rotation = 90, recoil, heat;
public float rotation = 90;
public float recoil = 0f;
public float heat;
public int shotCounter; public int shotCounter;
public Posc target; public Posc target;
+21 -17
View File
@@ -1,8 +1,10 @@
include 'desktop', 'core', 'server', 'ios', 'annotations', 'tools', 'tests' include 'desktop', 'core', 'server', 'ios', 'annotations', 'tools', 'tests'
def use = { String name -> def use = { ... names ->
include(name) for(String name : names){
project(name).projectDir = new File(settingsDir, "../${name.substring(1).replace(":", "/")}") include(name)
project(name).projectDir = new File(settingsDir, "../${name.substring(1).replace(":", "/")}")
}
} }
def properties = new Properties() def properties = new Properties()
@@ -21,20 +23,22 @@ if(new File(settingsDir, 'local.properties').exists() && System.getenv("JITPACK"
if(!hasProperty("release")){ if(!hasProperty("release")){
if(new File(settingsDir, '../Arc').exists()){ if(new File(settingsDir, '../Arc').exists()){
use(':Arc') use(
use(':Arc:arc-core') ':Arc',
use(':Arc:extensions') ':Arc:arc-core',
use(':Arc:extensions:freetype') ':Arc:extensions',
use(':Arc:extensions:recorder') ':Arc:extensions:freetype',
use(':Arc:extensions:arcnet') ':Arc:extensions:recorder',
use(':Arc:extensions:packer') ':Arc:extensions:arcnet',
use(':Arc:extensions:g3d') ':Arc:extensions:packer',
use(':Arc:extensions:fx') ':Arc:extensions:g3d',
use(':Arc:backends') ':Arc:extensions:fx',
use(':Arc:backends:backend-sdl') ':Arc:backends',
use(':Arc:backends:backend-android') ':Arc:backends:backend-sdl',
use(':Arc:backends:backend-robovm') ':Arc:backends:backend-android',
use(':Arc:backends:backend-headless') ':Arc:backends:backend-robovm',
':Arc:backends:backend-headless'
)
} }
if(new File(settingsDir, '../Mindustry-Debug').exists()){ if(new File(settingsDir, '../Mindustry-Debug').exists()){