Batch optimizations

This commit is contained in:
Anuken
2024-07-23 11:31:34 -04:00
parent 995014cbe4
commit a594d796ad
8 changed files with 12 additions and 10 deletions
@@ -238,13 +238,15 @@ public class ItemBridge extends Block{
Lines.stroke(2.5f);
Lines.line(tx + Tmp.v2.x, ty + Tmp.v2.y, ox - Tmp.v2.x, oy - Tmp.v2.y);
float color = (linked ? Pal.place : Pal.accent).toFloatBits();
//draw foreground colors
Draw.color(linked ? Pal.place : Pal.accent);
Draw.color(color);
Lines.stroke(1f);
Lines.line(tx + Tmp.v2.x, ty + Tmp.v2.y, ox - Tmp.v2.x, oy - Tmp.v2.y);
Lines.square(ox, oy, 2f, 45f);
Draw.mixcol(Draw.getColor(), 1f);
Draw.mixcol(color);
Draw.color();
Draw.rect(arrowRegion, x, y, rel * 90);
Draw.mixcol();
@@ -292,7 +292,7 @@ public class CoreBlock extends StorageBlock{
protected void drawLandingThrusters(float x, float y, float rotation, float frame){
float length = thrusterLength * (frame - 1f) - 1f/4f;
float alpha = Draw.getColor().a;
float alpha = Draw.getColorAlpha();
//two passes for consistent lighting
for(int j = 0; j < 2; j++){