commit 668423be57a89c767cf64f0ce9d7ed05d876302d
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Tue Aug 24 12:32:00 2021 +0200

    Add flag of Madagascar.

diff --git a/src/main/java/org/distorted/objects/TwistyDiamond.java b/src/main/java/org/distorted/objects/TwistyDiamond.java
index 9ad1449c..7d1f0eae 100644
--- a/src/main/java/org/distorted/objects/TwistyDiamond.java
+++ b/src/main/java/org/distorted/objects/TwistyDiamond.java
@@ -544,13 +544,10 @@ public class TwistyDiamond extends TwistyObject
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // The Diamond is solved if and only if:
 //
-// 1) all octahedrons are rotated with the same quat
-// 2) all tetrahedrons might be also optionally rotated by a 'face neutral' pair of quats
-//    (indexes of those are kept in the 'mFaceNeutralQuattIndex' table)
-//
-// Note: this works for any size, because even if layers>3 - and then there are 'face-internal'
-// octahedrons which, it would seem, can be rotated by those 'face neutral' pairs of quats - but
-// in reality no, because if they were, the octahedrons would then not fit in the lattice...
+// - all cubits are rotated by the same quat
+// - those which are internal to the side, i.e. those which have only one 'non-black' face, might
+//   also be optionally rotated by one of the two quats whose axis is perpendicular to the face.
+//   (including some octahedrons if numLayers>=4)
 
   public boolean isSolved()
     {
@@ -572,7 +569,7 @@ public class TwistyDiamond extends TwistyObject
       q2Index = mFaceNeutralQuatIndex[face][1];
       qI      = CUBITS[i].mQuatIndex;
 
-      if(  qI != q && qI != mulQuat(q,q1Index) && qI != mulQuat(q,q2Index) ) return false;
+      if( qI != q && qI != mulQuat(q,q1Index) && qI != mulQuat(q,q2Index) ) return false;
       }
 
     return true;
diff --git a/src/main/java/org/distorted/objects/TwistyJing.java b/src/main/java/org/distorted/objects/TwistyJing.java
index fb4917aa..db65f312 100644
--- a/src/main/java/org/distorted/objects/TwistyJing.java
+++ b/src/main/java/org/distorted/objects/TwistyJing.java
@@ -315,8 +315,7 @@ public class TwistyJing extends TwistyObject
       }
     else
       {
-      float[][] bands     = new float[][] { {0.020f,35,0.20f*(1-3*F),0.6f*(1-3*F),5,1,1},
-                                              {0.001f,35,0.05f*(1-3*F),0.1f*(1-3*F),5,1,1} };
+      float[][] bands     = new float[][] { {0.020f,35,0.20f*(1-3*F),0.6f*(1-3*F),5,1,1}, {0.001f,35,0.05f*(1-3*F),0.1f*(1-3*F),5,1,1} };
       int[] bandIndices   = new int[] { 0,1,1,1,1,1 };
       float[][] corners   = new float[][] { {0.04f,0.15f} };
       int[] cornerIndices = new int[] { 0,0,0,-1,-1,-1 };
diff --git a/src/main/java/org/distorted/objects/TwistyRedi.java b/src/main/java/org/distorted/objects/TwistyRedi.java
index f9b5bf18..293c85c9 100644
--- a/src/main/java/org/distorted/objects/TwistyRedi.java
+++ b/src/main/java/org/distorted/objects/TwistyRedi.java
@@ -252,7 +252,8 @@ public class TwistyRedi extends TwistyObject
 
   float[][] getCuts(int size)
     {
-    float[] cut = new float[] { -SQ3/3 -0.05f, +SQ3/3 +0.05f };
+    float C = +SQ3/3 +0.05f;
+    float[] cut = new float[] {-C,+C};
     return new float[][] { cut,cut,cut,cut };
     }
 
@@ -278,33 +279,22 @@ public class TwistyRedi extends TwistyObject
 
     if( variant==0 )
       {
-      float[][] bands= new float[][]
-          {
-            {0.06f,35,0.5f,0.7f,5,2,2},
-            {0.01f,35,0.2f,0.4f,5,2,2}
-          };
+      float[][] bands     = new float[][] { {0.06f,35,0.5f,0.7f,5,2,2}, {0.01f,35,0.2f,0.4f,5,2,2} };
       int[] bandIndices   = new int[] { 0,0,0,1,1,1,1,1,1 };
       float[][] corners   = new float[][] { {0.06f,0.12f} };
       int[] cornerIndices = new int[]  { -1,0,-1,0,0,0,-1,-1 };
       float[][] centers   = new float[][] { { 0.0f, 0.0f, 0.0f} };
       int[] centerIndices = new int[] { -1,0,-1,0,0,0,-1,-1 };
-
       return new ObjectShape(VERTICES_CORNER,VERT_INDEXES_CORNER,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
       }
     else
       {
-      float[][] bands= new float[][]
-          {
-            {0.038f,35,0.250f,0.7f, 7,2,2},
-            {0.020f,35,0.125f,0.2f, 3,1,2},
-            {0.020f,35,0.125f,0.2f, 3,1,1}
-          };
+      float[][] bands     = new float[][] { {0.038f,35,0.250f,0.7f,7,2,2}, {0.020f,35,0.125f,0.2f,3,1,2}, {0.020f,35,0.125f,0.2f,3,1,1} };
       int[] bandIndices   = new int[] { 0,0,1,1,2,2 };
       float[][] corners   = new float[][] { {0.06f,0.20f} };
       int[] cornerIndices = new int[] { 0,0,-1,-1,-1,-1,-1,-1 };
       float[][] centers   = new float[][] { { 0.0f,-0.75f,-0.75f} };
       int[] centerIndices = new int[] { 0,0,-1,-1,-1,-1,-1,-1 };
-
       return new ObjectShape(VERTICES_EDGE,VERT_INDEXES_EDGE,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
       }
     }
diff --git a/src/main/java/org/distorted/objects/TwistySkewb.java b/src/main/java/org/distorted/objects/TwistySkewb.java
index 0b71b84a..b5ffb0e3 100644
--- a/src/main/java/org/distorted/objects/TwistySkewb.java
+++ b/src/main/java/org/distorted/objects/TwistySkewb.java
@@ -21,13 +21,10 @@ package org.distorted.objects;
 
 import android.content.res.Resources;
 
-import org.distorted.helpers.FactoryCubit;
 import org.distorted.helpers.ObjectShape;
 import org.distorted.helpers.ObjectSticker;
-import org.distorted.library.effect.MatrixEffectQuaternion;
 import org.distorted.library.main.DistortedEffects;
 import org.distorted.library.main.DistortedTexture;
-import org.distorted.library.mesh.MeshBase;
 import org.distorted.library.mesh.MeshSquare;
 import org.distorted.library.type.Static3D;
 import org.distorted.library.type.Static4D;
diff --git a/src/main/res/drawable-nodpi/mg.png b/src/main/res/drawable-nodpi/mg.png
new file mode 100644
index 00000000..df73f85c
Binary files /dev/null and b/src/main/res/drawable-nodpi/mg.png differ
