commit e7daa161b8ff6899c1908566f623fa0867122a29
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Tue Oct 12 13:59:53 2021 +0200

    - remove the retarded NODE_RATIO from TwistyObject
    - more correctly estimate Cuboid's 'realSize' as an average of their 3 sizes.

diff --git a/src/main/java/org/distorted/objectlib/effects/objectchange/ObjectChangeEffectRound.java b/src/main/java/org/distorted/objectlib/effects/objectchange/ObjectChangeEffectRound.java
index af8749ed..b82fe766 100644
--- a/src/main/java/org/distorted/objectlib/effects/objectchange/ObjectChangeEffectRound.java
+++ b/src/main/java/org/distorted/objectlib/effects/objectchange/ObjectChangeEffectRound.java
@@ -32,7 +32,7 @@ class ObjectChangeEffectRound extends ObjectChangeEffect
   {
   public int createEffectsPhase0(int duration)
     {
-    float X = mObject[0].getNodeSize()/3.0f;
+    float X = mObject[0].getNodeWidth()/3.0f;
 
     mCubeEffectPosition[0] = new int[] {2,3};
     mCubeEffects[0]        = new Effect[mCubeEffectPosition[0].length];
@@ -56,7 +56,7 @@ class ObjectChangeEffectRound extends ObjectChangeEffect
 
   public int createEffectsPhase1(int duration)
     {
-    float X = mObject[0].getNodeSize()/3.0f;
+    float X = mObject[0].getNodeWidth()/3.0f;
 
     mCubeEffectPosition[1] = new int[] {2,3};
     mCubeEffects[1]        = new Effect[mCubeEffectPosition[1].length];
diff --git a/src/main/java/org/distorted/objectlib/effects/scramble/ScrambleEffectRotations.java b/src/main/java/org/distorted/objectlib/effects/scramble/ScrambleEffectRotations.java
index 2add0e04..5c9e85ab 100644
--- a/src/main/java/org/distorted/objectlib/effects/scramble/ScrambleEffectRotations.java
+++ b/src/main/java/org/distorted/objectlib/effects/scramble/ScrambleEffectRotations.java
@@ -76,7 +76,7 @@ public class ScrambleEffectRotations extends ScrambleEffect
 
     mCubeEffects[0] = new MatrixEffectQuaternion(dq, new Static3D(0,0,0));
 
-    float Z = mObject.getNodeSize()/3.0f;
+    float Z = mObject.getNodeWidth()/3.0f;
 
     Dynamic3D d0 = new Dynamic3D(duration, 0.5f);
     d0.setMode(Dynamic.MODE_PATH);
diff --git a/src/main/java/org/distorted/objectlib/main/ObjectControl.java b/src/main/java/org/distorted/objectlib/main/ObjectControl.java
index 42458e0f..f094affe 100644
--- a/src/main/java/org/distorted/objectlib/main/ObjectControl.java
+++ b/src/main/java/org/distorted/objectlib/main/ObjectControl.java
@@ -565,8 +565,8 @@ public class ObjectControl
       {
       mScreenWidth = width;
       mScreenHeight= height;
-      mScreenMin = Math.min(width, height);
-      mPreRender.setScreenSize(width);
+      mScreenMin = Math.min(width,height);
+      mPreRender.setScreenSize(width,height);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/main/ObjectPreRender.java b/src/main/java/org/distorted/objectlib/main/ObjectPreRender.java
index 07ebf8d9..9f7df5cd 100644
--- a/src/main/java/org/distorted/objectlib/main/ObjectPreRender.java
+++ b/src/main/java/org/distorted/objectlib/main/ObjectPreRender.java
@@ -55,7 +55,7 @@ public class ObjectPreRender implements EffectListener
   private boolean mUIBlocked, mTouchBlocked, mIsSolved;
   private long mRotationFinishedID;
   private final long[] mEffectID;
-  private int mScreenWidth;
+  private int mScreenWidth, mScreenHeight;
   private int[][] mNextMoves;
   private int mScrambleObjectNum;
   private int mAddRotationAxis, mAddRotationRowBitmap, mAddRotationAngle;
@@ -89,7 +89,8 @@ public class ObjectPreRender implements EffectListener
 
     mDebug = "";
 
-    mScreenWidth = 0;
+    mScreenWidth  = 0;
+    mScreenHeight = 0;
     mScrambleObjectNum = 0;
 
     mEffectID = new long[BaseEffect.Type.LENGTH];
@@ -108,7 +109,7 @@ public class ObjectPreRender implements EffectListener
     mOldObject = mNewObject;
     Static3D move = new Static3D(mMoveX,mMoveY,0);
 
-    mNewObject = object.create( mController.getQuat(), move, mAct.get().getResources(), mScreenWidth);
+    mNewObject = object.create( mController.getQuat(), move, mAct.get().getResources(), mScreenWidth, mScreenHeight);
 
     if( mNewObject!=null )
       {
@@ -373,14 +374,15 @@ public class ObjectPreRender implements EffectListener
 // PUBLIC API
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public void setScreenSize(int width)
+  public void setScreenSize(int width, int height)
     {
     if( mNewObject!=null )
       {
       mNewObject.createTexture();
-      mNewObject.recomputeScaleFactor(width);
+      mNewObject.recomputeScaleFactor(width,height);
       }
     mScreenWidth = width;
+    mScreenHeight= height;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/main/ObjectType.java b/src/main/java/org/distorted/objectlib/main/ObjectType.java
index de6cc036..8348a7b0 100644
--- a/src/main/java/org/distorted/objectlib/main/ObjectType.java
+++ b/src/main/java/org/distorted/objectlib/main/ObjectType.java
@@ -163,7 +163,7 @@ public enum ObjectType
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public TwistyObject create(Static4D quat, Static3D move, Resources res, int scrWidth)
+  public TwistyObject create(Static4D quat, Static3D move, Resources res, int surfaceW, int surfaceH)
     {
     DistortedTexture texture = new DistortedTexture();
     DistortedEffects effects = new DistortedEffects();
@@ -184,35 +184,35 @@ public enum ObjectType
       case  0:
       case  1:
       case  2:
-      case  3: return new TwistyCube          (numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case  4: return new TwistyJing          (numL, quat, move, texture, mesh, effects, res, scrWidth);
+      case  3: return new TwistyCube          (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case  4: return new TwistyJing          (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
       case  5:
       case  6:
-      case  7: return new TwistyPyraminx      (numL, quat, move, texture, mesh, effects, res, scrWidth);
+      case  7: return new TwistyPyraminx      (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
       case  8:
-      case  9: return new TwistyKilominx      (numL, quat, move, texture, mesh, effects, res, scrWidth);
+      case  9: return new TwistyKilominx      (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
       case 10:
-      case 11: return new TwistyMegaminx      (numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case 12: return new TwistyUltimate      (numL, quat, move, texture, mesh, effects, res, scrWidth);
+      case 11: return new TwistyMegaminx      (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case 12: return new TwistyUltimate      (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
       case 13:
       case 14:
-      case 15: return new TwistyDiamond       (numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case 16: return new TwistyDino6         (numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case 17: return new TwistyDino4         (numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case 18: return new TwistyRedi          (numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case 19: return new TwistyHelicopter    (numL, quat, move, texture, mesh, effects, res, scrWidth);
+      case 15: return new TwistyDiamond       (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case 16: return new TwistyDino6         (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case 17: return new TwistyDino4         (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case 18: return new TwistyRedi          (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case 19: return new TwistyHelicopter    (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
       case 20:
-      case 21: return new TwistySkewb         (numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case 22: return new TwistyIvy           (numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case 23: return new TwistyRex           (numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case 24: return new TwistyBandagedFused (numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case 25: return new TwistyBandaged2Bar  (numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case 26: return new TwistyBandaged3Plate(numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case 27: return new TwistyBandagedEvil  (numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case 28: return new TwistySquare1       (numL, quat, move, texture, mesh, effects, res, scrWidth);
-      case 29: return new TwistySquare2       (numL, quat, move, texture, mesh, effects, res, scrWidth);
+      case 21: return new TwistySkewb         (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case 22: return new TwistyIvy           (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case 23: return new TwistyRex           (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case 24: return new TwistyBandagedFused (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case 25: return new TwistyBandaged2Bar  (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case 26: return new TwistyBandaged3Plate(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case 27: return new TwistyBandagedEvil  (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case 28: return new TwistySquare1       (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
+      case 29: return new TwistySquare2       (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
       case 30:
-      case 31: return new TwistyMirror        (numL, quat, move, texture, mesh, effects, res, scrWidth);
+      case 31: return new TwistyMirror        (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
       }
 
     return null;
diff --git a/src/main/java/org/distorted/objectlib/main/Twisty12.java b/src/main/java/org/distorted/objectlib/main/Twisty12.java
index f8fbe7b6..431d73a5 100644
--- a/src/main/java/org/distorted/objectlib/main/Twisty12.java
+++ b/src/main/java/org/distorted/objectlib/main/Twisty12.java
@@ -53,10 +53,10 @@ public abstract class Twisty12 extends TwistyObject
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public Twisty12(int[] numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
-                  MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+  public Twisty12(int[] numLayers, float realSize, Static4D quat, Static3D move, DistortedTexture texture,
+                  MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numLayers, realSize, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/main/Twisty4.java b/src/main/java/org/distorted/objectlib/main/Twisty4.java
index 8e74cd70..a7770508 100644
--- a/src/main/java/org/distorted/objectlib/main/Twisty4.java
+++ b/src/main/java/org/distorted/objectlib/main/Twisty4.java
@@ -39,10 +39,10 @@ public abstract class Twisty4 extends TwistyObject
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public Twisty4(int[] numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
-                 MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+  public Twisty4(int[] numLayers, float realSize, Static4D quat, Static3D move, DistortedTexture texture,
+                 MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numLayers, realSize, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/main/Twisty6.java b/src/main/java/org/distorted/objectlib/main/Twisty6.java
index f8903fc6..df9a6fdd 100644
--- a/src/main/java/org/distorted/objectlib/main/Twisty6.java
+++ b/src/main/java/org/distorted/objectlib/main/Twisty6.java
@@ -40,10 +40,10 @@ public abstract class Twisty6 extends TwistyObject
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public Twisty6(int[] numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
-                 MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+  public Twisty6(int[] numLayers, float realSize, Static4D quat, Static3D move, DistortedTexture texture,
+                 MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numLayers, realSize, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/main/Twisty8.java b/src/main/java/org/distorted/objectlib/main/Twisty8.java
index c653682d..9958a897 100644
--- a/src/main/java/org/distorted/objectlib/main/Twisty8.java
+++ b/src/main/java/org/distorted/objectlib/main/Twisty8.java
@@ -41,10 +41,10 @@ public abstract class Twisty8 extends TwistyObject
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public Twisty8(int[] numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
-                 MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+  public Twisty8(int[] numLayers, float realSize, Static4D quat, Static3D move, DistortedTexture texture,
+                 MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numLayers, realSize, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/main/TwistyObject.java b/src/main/java/org/distorted/objectlib/main/TwistyObject.java
index db76b8e1..8545e7ea 100644
--- a/src/main/java/org/distorted/objectlib/main/TwistyObject.java
+++ b/src/main/java/org/distorted/objectlib/main/TwistyObject.java
@@ -82,7 +82,6 @@ public abstract class TwistyObject extends DistortedNode
   public static final float SQ5 = (float)Math.sqrt(5);
   public static final float SQ6 = (float)Math.sqrt(6);
 
-  private static final float NODE_RATIO = 1.60f;
   private static final float MAX_SIZE_CHANGE = 1.35f;
   private static final float MIN_SIZE_CHANGE = 0.75f;
 
@@ -103,12 +102,12 @@ public abstract class TwistyObject extends DistortedNode
   private final Static3D[] mAxis;
   private final float[][] mCuts;
   private final int[] mNumCuts;
-  private final int mNodeSize;
+  private final int mNodeW, mNodeH;
   private final float[][] mOrigPos;
   private final Static3D mNodeScale;
   private final Static4D mQuat;
   private final int[] mNumLayers;
-  private final int mRealSize;
+  private final float mRealSize;
   private final DistortedEffects mEffects;
   private final VertexEffectRotate mRotateEffect;
   private final Dynamic1D mRotationAngle;
@@ -139,21 +138,21 @@ public abstract class TwistyObject extends DistortedNode
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  TwistyObject(int[] numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture nodeTexture,
-               MeshSquare nodeMesh, DistortedEffects nodeEffects, Resources res, int screenWidth)
+  TwistyObject(int[] numLayers, float realSize, Static4D quat, Static3D move, DistortedTexture nodeTexture,
+               MeshSquare nodeMesh, DistortedEffects nodeEffects, Resources res, int surfaceW, int surfaceH)
     {
     super(nodeTexture,nodeEffects,nodeMesh);
 
-    mNodeSize = screenWidth;
+    mNodeW = surfaceW;
+    mNodeH = surfaceH;
 
-    resizeFBO(mNodeSize, (int)(NODE_RATIO*mNodeSize));
+    resizeFBO(mNodeW,mNodeH);
 
     mNumLayers = numLayers;
     mRealSize = realSize;
     mOrigPos = getCubitPositions(mNumLayers);
     mAxis = getRotationAxis();
     mInitScreenRatio = getScreenRatio();
-    mObjectScreenRatio = 1.0f;
     mNumCubitFaces = getNumCubitFaces();
     mSolvedFunctionIndex = getSolvedFunctionIndex();
 
@@ -190,10 +189,7 @@ public abstract class TwistyObject extends DistortedNode
 
     mQuatDebug = new int[NUM_CUBITS];
 
-    if( mObjectScreenRatio>MAX_SIZE_CHANGE) mObjectScreenRatio = MAX_SIZE_CHANGE;
-    if( mObjectScreenRatio<MIN_SIZE_CHANGE) mObjectScreenRatio = MIN_SIZE_CHANGE;
-
-    mNodeScale= new Static3D(screenWidth,NODE_RATIO*screenWidth,screenWidth);
+    mNodeScale= new Static3D(surfaceW,surfaceH,surfaceW);
     mQuat = quat;
 
     mRotationAngle= new Dynamic1D();
@@ -204,8 +200,9 @@ public abstract class TwistyObject extends DistortedNode
     mRotationAngleMiddle = new Static1D(0);
     mRotationAngleFinal  = new Static1D(0);
 
-    float scale  = mObjectScreenRatio*mInitScreenRatio*mNodeSize/mRealSize;
-    mObjectScale = new Static3D(scale,scale,scale);
+    mObjectScale = new Static3D(1,1,1);
+    setObjectRatioNow(1.0f);
+
     MatrixEffectScale scaleEffect = new MatrixEffectScale(mObjectScale);
     MatrixEffectQuaternion quatEffect  = new MatrixEffectQuaternion(quat, CENTER);
     MatrixEffectMove moveEffect = new MatrixEffectMove(move);
@@ -247,7 +244,7 @@ public abstract class TwistyObject extends DistortedNode
 
     float fov = getFOV();
     double halfFOV = fov * (Math.PI/360);
-    mCameraDist = 0.5f*NODE_RATIO / (float)Math.tan(halfFOV);
+    mCameraDist = (0.5f*mNodeH) / ((float)Math.tan(halfFOV)*mNodeW);
 
     setProjection( fov, 0.1f);
     }
@@ -1098,9 +1095,9 @@ public abstract class TwistyObject extends DistortedNode
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  void recomputeScaleFactor(int scrWidth)
+  void recomputeScaleFactor(int surfaceW, int surfaceH)
     {
-    mNodeScale.set(scrWidth,NODE_RATIO*scrWidth,scrWidth);
+    mNodeScale.set(surfaceW,surfaceH,surfaceW);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1146,7 +1143,8 @@ public abstract class TwistyObject extends DistortedNode
   void setObjectRatioNow(float sc)
     {
     mObjectScreenRatio = sc;
-    float scale = mObjectScreenRatio*mInitScreenRatio*mNodeSize/mRealSize;
+    int nodeMinSize = Math.min(mNodeW,mNodeH);
+    float scale = mObjectScreenRatio*mInitScreenRatio*nodeMinSize/mRealSize;
     mObjectScale.set(scale,scale,scale);
     }
 
@@ -1159,8 +1157,7 @@ public abstract class TwistyObject extends DistortedNode
     if( mObjectScreenRatio>MAX_SIZE_CHANGE) mObjectScreenRatio = MAX_SIZE_CHANGE;
     if( mObjectScreenRatio<MIN_SIZE_CHANGE) mObjectScreenRatio = MIN_SIZE_CHANGE;
 
-    float scale = mObjectScreenRatio*mInitScreenRatio*mNodeSize/mRealSize;
-    mObjectScale.set(scale,scale,scale);
+    setObjectRatioNow(mObjectScreenRatio);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1250,9 +1247,9 @@ public abstract class TwistyObject extends DistortedNode
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public int getNodeSize()
+  public int getNodeWidth()
     {
-    return mNodeSize;
+    return mNodeW;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyBandaged2Bar.java b/src/main/java/org/distorted/objectlib/objects/TwistyBandaged2Bar.java
index 3bda9549..fa905bf1 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyBandaged2Bar.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyBandaged2Bar.java
@@ -36,9 +36,9 @@ import org.distorted.objectlib.helpers.ScrambleState;
 public class TwistyBandaged2Bar extends TwistyBandagedAbstract
 {
   public TwistyBandaged2Bar(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                            MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                            MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyBandaged3Plate.java b/src/main/java/org/distorted/objectlib/objects/TwistyBandaged3Plate.java
index f8c9b990..db7b3c0c 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyBandaged3Plate.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyBandaged3Plate.java
@@ -36,9 +36,9 @@ import org.distorted.objectlib.helpers.ScrambleState;
 public class TwistyBandaged3Plate extends TwistyBandagedAbstract
 {
   public TwistyBandaged3Plate(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                              MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                              MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java b/src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java
index 9af25f61..cb7d1b05 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java
@@ -81,9 +81,9 @@ abstract class TwistyBandagedAbstract extends Twisty6
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   TwistyBandagedAbstract(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                         MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                         MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyBandagedEvil.java b/src/main/java/org/distorted/objectlib/objects/TwistyBandagedEvil.java
index c73d236c..edce1b45 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyBandagedEvil.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyBandagedEvil.java
@@ -36,9 +36,9 @@ import org.distorted.objectlib.helpers.ScrambleState;
 public class TwistyBandagedEvil extends TwistyBandagedAbstract
 {
   public TwistyBandagedEvil(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, MeshSquare mesh,
-                            DistortedEffects effects, Resources res, int scrWidth)
+                            DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyBandagedFused.java b/src/main/java/org/distorted/objectlib/objects/TwistyBandagedFused.java
index ab940178..e0db70ba 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyBandagedFused.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyBandagedFused.java
@@ -36,9 +36,9 @@ import org.distorted.objectlib.helpers.ScrambleState;
 public class TwistyBandagedFused extends TwistyBandagedAbstract
 {
   public TwistyBandagedFused(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                             MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                             MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyCube.java b/src/main/java/org/distorted/objectlib/objects/TwistyCube.java
index 1894ab4a..07cb87f9 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyCube.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyCube.java
@@ -66,9 +66,9 @@ public class TwistyCube extends Twisty6
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyCube(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                    MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                    MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, (numL[0]+numL[1]+numL[2])/3.0f, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java b/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java
index 315340c6..db2bb8b4 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java
@@ -70,9 +70,9 @@ public class TwistyDiamond extends Twisty8
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyDiamond(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                       MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                       MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyDino.java b/src/main/java/org/distorted/objectlib/objects/TwistyDino.java
index 0ba24bb5..a642850e 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyDino.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyDino.java
@@ -73,9 +73,9 @@ abstract class TwistyDino extends Twisty6
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   TwistyDino(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-             MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+             MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyDino4.java b/src/main/java/org/distorted/objectlib/objects/TwistyDino4.java
index 22560d08..c94d026c 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyDino4.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyDino4.java
@@ -40,9 +40,9 @@ public class TwistyDino4 extends TwistyDino
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyDino4(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                     MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                     MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyDino6.java b/src/main/java/org/distorted/objectlib/objects/TwistyDino6.java
index 27e9cb9a..d5a3cce0 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyDino6.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyDino6.java
@@ -40,9 +40,9 @@ public class TwistyDino6 extends TwistyDino
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyDino6(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                     MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                     MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java b/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java
index 36bf2352..db3e7d75 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java
@@ -78,9 +78,9 @@ public class TwistyHelicopter extends Twisty6
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyHelicopter(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                          MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                          MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyIvy.java b/src/main/java/org/distorted/objectlib/objects/TwistyIvy.java
index 088f0a21..d5e15f06 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyIvy.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyIvy.java
@@ -77,9 +77,9 @@ public class TwistyIvy extends Twisty6
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyIvy(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                   MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                   MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyJing.java b/src/main/java/org/distorted/objectlib/objects/TwistyJing.java
index 5f9642d6..5069b41c 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyJing.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyJing.java
@@ -74,9 +74,9 @@ public class TwistyJing extends Twisty4
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyJing(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                    MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                    MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java b/src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java
index 8a4faf66..e226128e 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java
@@ -46,9 +46,9 @@ public class TwistyKilominx extends TwistyMinx
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyKilominx(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                        MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                        MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java b/src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java
index c281745c..e7e4c08a 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java
@@ -47,9 +47,9 @@ public class TwistyMegaminx extends TwistyMinx
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyMegaminx(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                        MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                        MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyMinx.java b/src/main/java/org/distorted/objectlib/objects/TwistyMinx.java
index 2dcf9cd1..9bc5bbce 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyMinx.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyMinx.java
@@ -97,9 +97,9 @@ abstract class TwistyMinx extends Twisty12
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   TwistyMinx(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-             MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+             MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyMirror.java b/src/main/java/org/distorted/objectlib/objects/TwistyMirror.java
index 8cb5ef98..3380a90c 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyMirror.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyMirror.java
@@ -88,9 +88,9 @@ public class TwistyMirror extends Twisty6
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyMirror(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                      MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                      MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java b/src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java
index e10a4879..7d30a728 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java
@@ -67,9 +67,9 @@ public class TwistyPyraminx extends Twisty4
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyPyraminx(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                        MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                        MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyRedi.java b/src/main/java/org/distorted/objectlib/objects/TwistyRedi.java
index 0e3268b2..9e51d1da 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyRedi.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyRedi.java
@@ -74,9 +74,9 @@ public class TwistyRedi extends Twisty6
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyRedi(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                    MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                    MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyRex.java b/src/main/java/org/distorted/objectlib/objects/TwistyRex.java
index 99e4f573..2f3911a4 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyRex.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyRex.java
@@ -75,9 +75,9 @@ public class TwistyRex extends Twisty6
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyRex(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                   MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                   MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistySkewb.java b/src/main/java/org/distorted/objectlib/objects/TwistySkewb.java
index 4edec182..c47e1900 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistySkewb.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistySkewb.java
@@ -73,9 +73,9 @@ public class TwistySkewb extends Twisty6
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistySkewb(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                     MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                     MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, 2*numL[0]-2, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, 2*numL[0]-2, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistySquare.java b/src/main/java/org/distorted/objectlib/objects/TwistySquare.java
index 94f5e741..2e9f082c 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistySquare.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistySquare.java
@@ -65,9 +65,9 @@ abstract class TwistySquare extends Twisty6
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   TwistySquare(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-               MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+               MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistySquare1.java b/src/main/java/org/distorted/objectlib/objects/TwistySquare1.java
index 1430c8cf..70f93668 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistySquare1.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistySquare1.java
@@ -50,9 +50,9 @@ public class TwistySquare1 extends TwistySquare
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistySquare1(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                       MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                       MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistySquare2.java b/src/main/java/org/distorted/objectlib/objects/TwistySquare2.java
index e8a534ba..c3596920 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistySquare2.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistySquare2.java
@@ -50,9 +50,9 @@ public class TwistySquare2 extends TwistySquare
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistySquare2(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                       MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                       MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyUltimate.java b/src/main/java/org/distorted/objectlib/objects/TwistyUltimate.java
index d7e7e9df..7573c544 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyUltimate.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyUltimate.java
@@ -78,9 +78,9 @@ public class TwistyUltimate extends Twisty12
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public TwistyUltimate(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
-                        MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
+                        MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
     {
-    super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
+    super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
