Made all color names lowercase for consistent style

This commit is contained in:
Anuken
2019-09-09 16:22:29 -04:00
parent b867cdb8b9
commit 5a3fbf33df
73 changed files with 296 additions and 298 deletions

View File

@@ -44,7 +44,7 @@ public class BlockRenderer implements Disposable{
shadows.getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);
shadows.resize(world.width(), world.height());
shadows.begin();
Core.graphics.clear(Color.WHITE);
Core.graphics.clear(Color.white);
Draw.proj().setOrtho(0, 0, shadows.getWidth(), shadows.getHeight());
Draw.color(shadowColor);
@@ -65,7 +65,7 @@ public class BlockRenderer implements Disposable{
fog.getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);
fog.resize(world.width(), world.height());
fog.begin();
Core.graphics.clear(Color.WHITE);
Core.graphics.clear(Color.white);
Draw.proj().setOrtho(0, 0, fog.getWidth(), fog.getHeight());
for(int x = 0; x < world.width(); x++){
@@ -129,10 +129,10 @@ public class BlockRenderer implements Disposable{
for(Tile tile : shadowEvents){
//clear it first
Draw.color(Color.WHITE);
Draw.color(Color.white);
Fill.rect(tile.x + 0.5f, tile.y + 0.5f, 1, 1);
//then draw the shadow
Draw.color(!tile.block().hasShadow ? Color.WHITE : shadowColor);
Draw.color(!tile.block().hasShadow ? Color.white : shadowColor);
Fill.rect(tile.x + 0.5f, tile.y + 0.5f, 1, 1);
}

View File

@@ -47,7 +47,7 @@ public enum CacheLayer{
renderer.blocks.floor.endc();
renderer.shieldBuffer.begin();
Core.graphics.clear(Color.CLEAR);
Core.graphics.clear(Color.clear);
renderer.blocks.floor.beginc();
}

View File

@@ -53,7 +53,7 @@ public class IndexedRenderer implements Disposable{
private Matrix3 projMatrix = new Matrix3();
private Matrix3 transMatrix = new Matrix3();
private Matrix3 combined = new Matrix3();
private float color = Color.WHITE.toFloatBits();
private float color = Color.white.toFloatBits();
public IndexedRenderer(int sprites){
resize(sprites);

View File

@@ -8,7 +8,7 @@ import io.anuke.arc.graphics.Color;
import io.anuke.arc.graphics.g2d.*;
import io.anuke.arc.graphics.glutils.FrameBuffer;
import io.anuke.arc.math.*;
import io.anuke.arc.scene.ui.layout.UnitScl;
import io.anuke.arc.scene.ui.layout.Scl;
import io.anuke.arc.util.*;
import io.anuke.arc.util.noise.RidgedPerlin;
import io.anuke.arc.util.noise.Simplex;
@@ -168,8 +168,8 @@ public class MenuRenderer implements Disposable{
//draw shadows
Draw.proj().setOrtho(0, 0, shadows.getWidth(), shadows.getHeight());
shadows.beginDraw(Color.CLEAR);
Draw.color(Color.BLACK);
shadows.beginDraw(Color.clear);
Draw.color(Color.black);
for(int x = 0; x < width; x++){
for(int y = 0; y < height; y++){
if(world.rawTile(x, y).block() != Blocks.air){
@@ -220,7 +220,7 @@ public class MenuRenderer implements Disposable{
public void render(){
time += Time.delta();
float scaling = Math.max(UnitScl.dp.scl(4f), Math.max(Core.graphics.getWidth() / ((width - 1f) * tilesize), Core.graphics.getHeight() / ((height - 1f) * tilesize)));
float scaling = Math.max(Scl.scl(4f), Math.max(Core.graphics.getWidth() / ((width - 1f) * tilesize), Core.graphics.getHeight() / ((height - 1f) * tilesize)));
camera.position.set(width * tilesize / 2f, height * tilesize / 2f);
camera.resize(Core.graphics.getWidth() / scaling,
Core.graphics.getHeight() / scaling);
@@ -270,7 +270,7 @@ public class MenuRenderer implements Disposable{
Fill.circle(x + Angles.trnsx(rotation + 180, engineOffset), y + Angles.trnsy(rotation + 180, engineOffset),
engineSize + Mathf.absin(Time.time(), 2f, engineSize / 4f));
Draw.color(Color.WHITE);
Draw.color(Color.white);
Fill.circle(x + Angles.trnsx(rotation + 180, engineOffset - 1f), y + Angles.trnsy(rotation + 180, engineOffset - 1f),
(engineSize + Mathf.absin(Time.time(), 2f, engineSize / 4f)) / 2f);
Draw.color();

View File

@@ -82,7 +82,7 @@ public class MinimapRenderer implements Disposable{
for(Unit unit : units){
float rx = (unit.x - rect.x) / rect.width * w, ry = (unit.y - rect.y) / rect.width * h;
Draw.color(unit.getTeam().color);
Fill.rect(x + rx, y + ry, UnitScl.dp.scl(baseSize / 2f), UnitScl.dp.scl(baseSize / 2f));
Fill.rect(x + rx, y + ry, Scl.scl(baseSize / 2f), Scl.scl(baseSize / 2f));
}
Draw.color();

View File

@@ -84,7 +84,7 @@ public class OverlayRenderer{
for(Tile core : state.teams.get(enemy).cores){
float dst = Mathf.dst(player.x, player.y, core.drawx(), core.drawy());
if(dst < state.rules.enemyCoreBuildRadius * 1.5f){
Draw.color(Color.DARK_GRAY);
Draw.color(Color.darkGray);
Lines.circle(core.drawx(), core.drawy() - 2, state.rules.enemyCoreBuildRadius);
Draw.color(Pal.accent, enemy.color, 0.5f + Mathf.absin(Time.time(), 10f, 0.5f));
Lines.circle(core.drawx(), core.drawy(), state.rules.enemyCoreBuildRadius);
@@ -94,7 +94,7 @@ public class OverlayRenderer{
}
Lines.stroke(2f);
Draw.color(Color.GRAY, Color.LIGHT_GRAY, Mathf.absin(Time.time(), 8f, 1f));
Draw.color(Color.gray, Color.lightGray, Mathf.absin(Time.time(), 8f, 1f));
for(Tile tile : spawner.getGroundSpawns()){
if(tile.withinDst(player.x, player.y, state.rules.dropZoneRadius + spawnerMargin)){

View File

@@ -51,7 +51,7 @@ public class Pal{
health = Color.valueOf("ff341c"),
heal = Color.valueOf("98ffa9"),
bar = Color.SLATE,
bar = Color.slate,
accent = Color.valueOf("ffd37f"),
stat = Color.valueOf("ffd37f"),
gray = Color.valueOf("454545"),

View File

@@ -5,7 +5,7 @@ import io.anuke.arc.Core;
import io.anuke.arc.graphics.Color;
import io.anuke.arc.graphics.g2d.TextureRegion;
import io.anuke.arc.graphics.glutils.Shader;
import io.anuke.arc.scene.ui.layout.UnitScl;
import io.anuke.arc.scene.ui.layout.Scl;
import io.anuke.arc.util.Time;
public class Shaders{
@@ -48,7 +48,7 @@ public class Shaders{
setUniformf("u_resolution", Core.graphics.getWidth(), Core.graphics.getHeight());
setUniformi("u_time", (int)(time += Core.graphics.getDeltaTime() * 60f));
setUniformf("u_uv", Core.atlas.white().getU(), Core.atlas.white().getV());
setUniformf("u_scl", UnitScl.dp.scl(1f));
setUniformf("u_scl", Scl.scl(1f));
setUniformf("u_uv2", Core.atlas.white().getU2(), Core.atlas.white().getV2());
}
}
@@ -124,8 +124,8 @@ public class Shaders{
@Override
public void apply(){
setUniformf("u_dp", UnitScl.dp.scl(1f));
setUniformf("u_time", Time.time() / UnitScl.dp.scl(1f));
setUniformf("u_dp", Scl.scl(1f));
setUniformf("u_time", Time.time() / Scl.scl(1f));
setUniformf("u_offset",
Core.camera.position.x - Core.camera.width / 2,
Core.camera.position.y - Core.camera.height / 2);