commit b19a1d320a9fcaa68026535c73f0561eeac0997c
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Wed Oct 13 12:29:44 2021 +0200

    Cuboids: fully implement the first 3 cuboids (2x3x2, 3x2x3, 3x4x3)

diff --git a/src/main/java/org/distorted/objectlib/main/ObjectType.java b/src/main/java/org/distorted/objectlib/main/ObjectType.java
index 00cccec2..6a0504bd 100644
--- a/src/main/java/org/distorted/objectlib/main/ObjectType.java
+++ b/src/main/java/org/distorted/objectlib/main/ObjectType.java
@@ -66,14 +66,9 @@ public enum ObjectType
   SQU2_3 ( new int[] {3,2,3}      , 24, R.drawable.s_squ2_3, R.drawable.m_squ2_3, R.drawable.b_squ2_3, R.drawable.h_squ2_3),
   MIRR_2 ( new int[] {2,2,2}      , 12, R.drawable.s_mirr_2, R.drawable.m_mirr_2, R.drawable.b_mirr_2, R.drawable.h_mirr_2),
   MIRR_3 ( new int[] {3,3,3}      , 17, R.drawable.s_mirr_3, R.drawable.m_mirr_3, R.drawable.b_mirr_3, R.drawable.h_mirr_3),
-
-  CU_223 ( new int[] {2,3,2}      , 16, R.drawable.s_cube_2, R.drawable.m_cube_2, R.drawable.b_cube_2, R.drawable.h_cube_2),
-  CU_334 ( new int[] {3,4,3}      , 20, R.drawable.s_cube_3, R.drawable.m_cube_3, R.drawable.b_cube_3, R.drawable.h_cube_3),
-  CU_122 ( new int[] {1,2,2}      , 20, R.drawable.s_cube_3, R.drawable.m_cube_3, R.drawable.b_cube_3, R.drawable.h_cube_3),
-  CU_321 ( new int[] {3,2,1}      , 20, R.drawable.s_cube_3, R.drawable.m_cube_3, R.drawable.b_cube_3, R.drawable.h_cube_3),
-  CU_111 ( new int[] {1,1,1}      , 20, R.drawable.s_cube_3, R.drawable.m_cube_3, R.drawable.b_cube_3, R.drawable.h_cube_3),
-  CU_141 ( new int[] {1,4,1}      , 20, R.drawable.s_cube_3, R.drawable.m_cube_3, R.drawable.b_cube_3, R.drawable.h_cube_3),
-
+  CU_323 ( new int[] {3,2,3}      , 15, R.drawable.s_cu_323, R.drawable.m_cu_323, R.drawable.b_cu_323, R.drawable.h_cu_323),
+  CU_232 ( new int[] {2,3,2}      , 16, R.drawable.s_cu_232, R.drawable.m_cu_232, R.drawable.b_cu_232, R.drawable.h_cu_232),
+  CU_343 ( new int[] {3,4,3}      , 23, R.drawable.s_cu_343, R.drawable.m_cu_343, R.drawable.b_cu_343, R.drawable.h_cu_343),
   ;
 
   public static final int NUM_OBJECTS = values().length;
@@ -174,13 +169,6 @@ public enum ObjectType
 
     switch(ord)
       {
-      case 32:
-      case 33:
-      case 34:
-      case 35:
-      case 36:
-      case 37:
-
       case  0:
       case  1:
       case  2:
@@ -213,6 +201,9 @@ public enum ObjectType
       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, surfaceW, surfaceH);
+      case 32:
+      case 33:
+      case 34: return new TwistyCuboid        (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
       }
 
     return null;
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java b/src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java
index e430919a..8505c53d 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java
@@ -187,17 +187,18 @@ public class TwistyCuboid extends Twisty6
     {
     int x = numLayers[0];
     int y = numLayers[1];
-    int z = numLayers[2];
 
-    if( x==y && x==z )
+    switch(x)
       {
-      switch(x)
-        {
-        case 2: return R.raw.cube2;
-        case 3: return R.raw.cube3;
-        case 4: return R.raw.cube4;
-        case 5: return R.raw.cube5;
-        }
+      case 2: return y==2 ? R.raw.cube2 : R.raw.cu_232;
+      case 3: switch(y)
+                {
+                case 2: return R.raw.cu_323;
+                case 3: return R.raw.cube3;
+                case 4: return R.raw.cu_343;
+                }
+      case 4: return R.raw.cube4;
+      case 5: return R.raw.cube5;
       }
 
     return 0;
@@ -650,14 +651,25 @@ public class TwistyCuboid extends Twisty6
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-// TODO
 
   public ObjectType intGetObjectType(int[] numLayers)
     {
-    switch(numLayers[0])
+    int x = numLayers[0];
+    int y = numLayers[1];
+
+    switch(x)
       {
-      case 2: return ObjectType.CUBE_2;
-      case 3: return ObjectType.CUBE_3;
+      case 2: switch(y)
+                {
+                case 2: return ObjectType.CUBE_2;
+                case 3: return ObjectType.CU_232;
+                }
+      case 3: switch(y)
+                {
+                case 2: return ObjectType.CU_323;
+                case 3: return ObjectType.CUBE_3;
+                case 4: return ObjectType.CU_343;
+                }
       case 4: return ObjectType.CUBE_4;
       case 5: return ObjectType.CUBE_5;
       }
diff --git a/src/main/res/drawable-nodpi/b_cu_232.png b/src/main/res/drawable-nodpi/b_cu_232.png
new file mode 100644
index 00000000..88683e60
Binary files /dev/null and b/src/main/res/drawable-nodpi/b_cu_232.png differ
diff --git a/src/main/res/drawable-nodpi/b_cu_323.png b/src/main/res/drawable-nodpi/b_cu_323.png
new file mode 100644
index 00000000..bd136f54
Binary files /dev/null and b/src/main/res/drawable-nodpi/b_cu_323.png differ
diff --git a/src/main/res/drawable-nodpi/b_cu_343.png b/src/main/res/drawable-nodpi/b_cu_343.png
new file mode 100644
index 00000000..dceb358a
Binary files /dev/null and b/src/main/res/drawable-nodpi/b_cu_343.png differ
diff --git a/src/main/res/drawable-nodpi/h_cu_232.png b/src/main/res/drawable-nodpi/h_cu_232.png
new file mode 100644
index 00000000..10d347f0
Binary files /dev/null and b/src/main/res/drawable-nodpi/h_cu_232.png differ
diff --git a/src/main/res/drawable-nodpi/h_cu_323.png b/src/main/res/drawable-nodpi/h_cu_323.png
new file mode 100644
index 00000000..90d970b5
Binary files /dev/null and b/src/main/res/drawable-nodpi/h_cu_323.png differ
diff --git a/src/main/res/drawable-nodpi/h_cu_343.png b/src/main/res/drawable-nodpi/h_cu_343.png
new file mode 100644
index 00000000..9f2f8fce
Binary files /dev/null and b/src/main/res/drawable-nodpi/h_cu_343.png differ
diff --git a/src/main/res/drawable-nodpi/m_cu_232.png b/src/main/res/drawable-nodpi/m_cu_232.png
new file mode 100644
index 00000000..c48109bd
Binary files /dev/null and b/src/main/res/drawable-nodpi/m_cu_232.png differ
diff --git a/src/main/res/drawable-nodpi/m_cu_323.png b/src/main/res/drawable-nodpi/m_cu_323.png
new file mode 100644
index 00000000..2f53d0cb
Binary files /dev/null and b/src/main/res/drawable-nodpi/m_cu_323.png differ
diff --git a/src/main/res/drawable-nodpi/m_cu_343.png b/src/main/res/drawable-nodpi/m_cu_343.png
new file mode 100644
index 00000000..39ad48ff
Binary files /dev/null and b/src/main/res/drawable-nodpi/m_cu_343.png differ
diff --git a/src/main/res/drawable-nodpi/s_cu_232.png b/src/main/res/drawable-nodpi/s_cu_232.png
new file mode 100644
index 00000000..f6514152
Binary files /dev/null and b/src/main/res/drawable-nodpi/s_cu_232.png differ
diff --git a/src/main/res/drawable-nodpi/s_cu_323.png b/src/main/res/drawable-nodpi/s_cu_323.png
new file mode 100644
index 00000000..3c5cb1c4
Binary files /dev/null and b/src/main/res/drawable-nodpi/s_cu_323.png differ
diff --git a/src/main/res/drawable-nodpi/s_cu_343.png b/src/main/res/drawable-nodpi/s_cu_343.png
new file mode 100644
index 00000000..b4de4265
Binary files /dev/null and b/src/main/res/drawable-nodpi/s_cu_343.png differ
diff --git a/src/main/res/raw/cu_232.dmesh b/src/main/res/raw/cu_232.dmesh
new file mode 100644
index 00000000..5cf3b284
Binary files /dev/null and b/src/main/res/raw/cu_232.dmesh differ
diff --git a/src/main/res/raw/cu_323.dmesh b/src/main/res/raw/cu_323.dmesh
new file mode 100644
index 00000000..24a3122b
Binary files /dev/null and b/src/main/res/raw/cu_323.dmesh differ
diff --git a/src/main/res/raw/cu_343.dmesh b/src/main/res/raw/cu_343.dmesh
new file mode 100644
index 00000000..6716a7b2
Binary files /dev/null and b/src/main/res/raw/cu_343.dmesh differ
