Shortening of a few classes

This commit is contained in:
Anuken 2020-01-10 15:13:34 -05:00
parent 6cf7651069
commit 677aa0d0bf
9 changed files with 14 additions and 14 deletions

View File

@ -513,7 +513,7 @@ public class NetClient implements ApplicationListener{
return Core.settings.getString("usid-" + ip, null);
}else{
byte[] bytes = new byte[8];
new RandomXS128().nextBytes(bytes);
new Rand().nextBytes(bytes);
String result = new String(Base64Coder.encode(bytes));
Core.settings.put("usid-" + ip, result);
Core.settings.save();

View File

@ -90,7 +90,7 @@ public interface Platform{
String uuid = Core.settings.getString("uuid", "");
if(uuid.isEmpty()){
byte[] result = new byte[8];
new RandomXS128().nextBytes(result);
new Rand().nextBytes(result);
uuid = new String(Base64Coder.encode(result));
Core.settings.put("uuid", uuid);
Core.settings.save();

View File

@ -27,7 +27,7 @@ import static mindustry.Vars.*;
public class Lightning extends TimedEntity implements DrawTrait, TimeTrait{
public static final float lifetime = 10f;
private static final RandomXS128 random = new RandomXS128();
private static final Rand random = new Rand();
private static final Rect rect = new Rect();
private static final Array<Unit> entities = new Array<>();
private static final IntSet hit = new IntSet();

View File

@ -35,7 +35,7 @@ public class Team implements Comparable<Team>{
for(int i = 6; i < all.length; i++){
new Team(i, "team#" + i, Color.HSVtoRGB(360f * Mathf.random(), 100f * Mathf.random(0.6f, 1f), 100f * Mathf.random(0.8f, 1f), 1f));
}
Mathf.random.setSeed(new RandomXS128().nextLong());
Mathf.random.setSeed(new Rand().nextLong());
}
public static Team get(int id){

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

@ -28,7 +28,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

@ -4,7 +4,7 @@ import arc.Core;
import arc.graphics.Color;
import arc.graphics.g2d.*;
import arc.math.Mathf;
import arc.math.RandomXS128;
import arc.math.Rand;
import arc.util.Time;
import mindustry.content.Fx;
import mindustry.entities.type.TileEntity;
@ -21,7 +21,7 @@ public class Cultivator extends GenericCrafter{
public Color bottomColor = Color.valueOf("474747");
public TextureRegion middleRegion, topRegion;
public RandomXS128 random = new RandomXS128(0);
public Rand random = new Rand(0);
public float recurrence = 6f;
public Attribute attribute = Attribute.spores;

View File

@ -280,7 +280,7 @@ public class DesktopLauncher extends ClientLauncher{
if(steam){
try{
byte[] result = new byte[8];
new RandomXS128(SVars.user.user.getSteamID().getAccountID()).nextBytes(result);
new Rand(SVars.user.user.getSteamID().getAccountID()).nextBytes(result);
return new String(Base64Coder.encode(result));
}catch(Exception e){
e.printStackTrace();

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=49849134b9321f44f0d7ee2e0bb533cc6c69d39a
archash=175a3f68bb887634add08339096a10a695608c16