commit 5cc61ae40bdf1960e0665ec9d11d48ba3fc70941
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Thu Oct 28 22:45:32 2021 +0200

    Further simplify ObjectType

diff --git a/src/main/java/org/distorted/objectlib/effects/scramble/ScrambleEffect.java b/src/main/java/org/distorted/objectlib/effects/scramble/ScrambleEffect.java
index e6356d04..81c45dc4 100644
--- a/src/main/java/org/distorted/objectlib/effects/scramble/ScrambleEffect.java
+++ b/src/main/java/org/distorted/objectlib/effects/scramble/ScrambleEffect.java
@@ -24,11 +24,9 @@ import java.util.Random;
 
 import org.distorted.library.effect.Effect;
 import org.distorted.library.main.DistortedEffects;
-import org.distorted.library.main.DistortedFramebuffer;
 import org.distorted.library.message.EffectListener;
 
 import org.distorted.objectlib.main.ObjectPreRender;
-import org.distorted.objectlib.main.ObjectType;
 import org.distorted.objectlib.main.TwistyObject;
 import org.distorted.objectlib.effects.BaseEffect;
 import org.distorted.objectlib.helpers.MovesFinished;
@@ -67,7 +65,6 @@ public abstract class ScrambleEffect extends BaseEffect implements EffectListene
       }
     }
 
-
   private int mEffectReturned;
   private int mNumScramblesLeft;
   private int mDurationPerDegree;
@@ -91,7 +88,6 @@ public abstract class ScrambleEffect extends BaseEffect implements EffectListene
   ScrambleEffect()
     {
     mRnd = new Random( System.currentTimeMillis() );
-    mScrambles = new int[ObjectType.MAX_SCRAMBLE][3];
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -216,7 +212,7 @@ public abstract class ScrambleEffect extends BaseEffect implements EffectListene
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private void effectFinishedAction(final long effectID, final long id)
+  private void effectFinishedAction(final long effectID)
     {
     mEffectReturned++;
     effectFinishedPlugin(effectID);
@@ -240,7 +236,7 @@ public abstract class ScrambleEffect extends BaseEffect implements EffectListene
 
       if( effectID == id )
         {
-        effectFinishedAction(effectID,id);
+        effectFinishedAction(effectID);
         return;
         }
       }
@@ -251,7 +247,7 @@ public abstract class ScrambleEffect extends BaseEffect implements EffectListene
 
       if( effectID == id )
         {
-        effectFinishedAction(effectID,id);
+        effectFinishedAction(effectID);
         return;
         }
       }
@@ -275,6 +271,7 @@ public abstract class ScrambleEffect extends BaseEffect implements EffectListene
     mBasicAngle = mObject.getBasicAngle();
 
     int numScrambles = pre.getNumScrambles();
+    mScrambles = new int[numScrambles][3];
     int dura = (int)(duration*Math.pow(numScrambles,0.66f));
     createBaseEffects(dura,numScrambles);
     createEffects    (dura,numScrambles);
diff --git a/src/main/java/org/distorted/objectlib/main/ObjectType.java b/src/main/java/org/distorted/objectlib/main/ObjectType.java
index 50a34c83..9e644401 100644
--- a/src/main/java/org/distorted/objectlib/main/ObjectType.java
+++ b/src/main/java/org/distorted/objectlib/main/ObjectType.java
@@ -70,7 +70,6 @@ public enum ObjectType
   ;
 
   public static final int NUM_OBJECTS = values().length;
-  public static final int MAX_SCRAMBLE,MAX_OBJECT_SIZE;
 
   private final int[] mNumLayers;
   private final int mNumScrambles;
@@ -83,23 +82,7 @@ public enum ObjectType
     {
     int i = 0;
     objects = new ObjectType[NUM_OBJECTS];
-    int maxScramble= Integer.MIN_VALUE;
-    int maxSize    = Integer.MIN_VALUE;
-
-    for(ObjectType object: ObjectType.values())
-      {
-      objects[i++] = object;
-
-      if( object.mNumScrambles> maxScramble ) maxScramble= object.mNumScrambles;
-
-      int len = object.mNumLayers.length;
-
-      for(int j=0; j<len; j++)
-        if( object.mNumLayers[j]>maxSize ) maxSize = object.mNumLayers[j];
-      }
-
-    MAX_SCRAMBLE    = maxScramble;
-    MAX_OBJECT_SIZE = maxSize;
+    for(ObjectType object: ObjectType.values()) objects[i++] = object;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
