Project

General

Profile

Download (20.8 KB) Statistics
| Branch: | Tag: | Revision:

magiccube / src / main / java / org / distorted / objectlb / ObjectList.java @ bdbbb4c5

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2020 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// Magic Cube is free software: you can redistribute it and/or modify                            //
7
// it under the terms of the GNU General Public License as published by                          //
8
// the Free Software Foundation, either version 2 of the License, or                             //
9
// (at your option) any later version.                                                           //
10
//                                                                                               //
11
// Magic Cube is distributed in the hope that it will be useful,                                 //
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
14
// GNU General Public License for more details.                                                  //
15
//                                                                                               //
16
// You should have received a copy of the GNU General Public License                             //
17
// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19

    
20
package org.distorted.objectlb;
21

    
22
import android.content.res.Resources;
23

    
24
import org.distorted.objects.TwistyBandaged2Bar;
25
import org.distorted.objects.TwistyBandaged3Plate;
26
import org.distorted.objects.TwistyBandagedEvil;
27
import org.distorted.objects.TwistyBandagedFused;
28
import org.distorted.objects.TwistyCube;
29
import org.distorted.objects.TwistyDiamond;
30
import org.distorted.objects.TwistyDino4;
31
import org.distorted.objects.TwistyDino6;
32
import org.distorted.objects.TwistyHelicopter;
33
import org.distorted.objects.TwistyIvy;
34
import org.distorted.objects.TwistyJing;
35
import org.distorted.objects.TwistyKilominx;
36
import org.distorted.objects.TwistyMegaminx;
37
import org.distorted.objects.TwistyMirror;
38
import org.distorted.objects.TwistyPyraminx;
39
import org.distorted.objects.TwistyRedi;
40
import org.distorted.objects.TwistyRex;
41
import org.distorted.objects.TwistySkewb;
42
import org.distorted.objects.TwistySquare1;
43
import org.distorted.objects.TwistySquare2;
44
import org.distorted.objects.TwistyUltimate;
45
import org.distorted.library.main.DistortedEffects;
46
import org.distorted.library.main.DistortedTexture;
47
import org.distorted.library.mesh.MeshSquare;
48
import org.distorted.library.type.Static4D;
49
import org.distorted.main.R;
50
import org.distorted.main.RubikActivity;
51

    
52
///////////////////////////////////////////////////////////////////////////////////////////////////
53

    
54
public enum ObjectList
55
  {
56
  ///////////////////// Size // DB Level // NumScrambles // Mesh // small icon // medium icon // big icon // huge icon
57

    
58
  CUBE (
59
         new int[][] {
60
                       {2 , 12, 12, R.raw.cube2, R.drawable.ui_small_cube2, R.drawable.ui_medium_cube2, R.drawable.ui_big_cube2, R.drawable.ui_huge_cube2} ,
61
                       {3 , 16, 17, R.raw.cube3, R.drawable.ui_small_cube3, R.drawable.ui_medium_cube3, R.drawable.ui_big_cube3, R.drawable.ui_huge_cube3} ,
62
                       {4 , 20, 24, R.raw.cube4, R.drawable.ui_small_cube4, R.drawable.ui_medium_cube4, R.drawable.ui_big_cube4, R.drawable.ui_huge_cube4} ,
63
                       {5 , 24, 28, R.raw.cube5, R.drawable.ui_small_cube5, R.drawable.ui_medium_cube5, R.drawable.ui_big_cube5, R.drawable.ui_huge_cube5}
64
                     },
65
         0
66
       ),
67

    
68
  JING (
69
         new int[][] {
70
                       {2 , 11, 11, R.raw.jing, R.drawable.ui_small_jing2, R.drawable.ui_medium_jing2, R.drawable.ui_big_jing2, R.drawable.ui_huge_jing2} ,
71
                     },
72
         1
73
       ),
74

    
75
  PYRA (
76
         new int[][] {
77
                       {3 , 10, 10, R.raw.pyra3, R.drawable.ui_small_pyra3, R.drawable.ui_medium_pyra3, R.drawable.ui_big_pyra3, R.drawable.ui_huge_pyra3} ,
78
                       {4 , 15, 17, R.raw.pyra4, R.drawable.ui_small_pyra4, R.drawable.ui_medium_pyra4, R.drawable.ui_big_pyra4, R.drawable.ui_huge_pyra4} ,
79
                       {5 , 20, 23, R.raw.pyra5, R.drawable.ui_small_pyra5, R.drawable.ui_medium_pyra5, R.drawable.ui_big_pyra5, R.drawable.ui_huge_pyra5}
80
                     },
81
         1
82
       ),
83

    
84
  KILO (
85
         new int[][] {
86
                       {3 , 18, 18, R.raw.kilo3, R.drawable.ui_small_kilo3, R.drawable.ui_medium_kilo3, R.drawable.ui_big_kilo3, R.drawable.ui_huge_kilo3} ,
87
                       {5 , 33, 33, R.raw.kilo5, R.drawable.ui_small_kilo5, R.drawable.ui_medium_kilo5, R.drawable.ui_big_kilo5, R.drawable.ui_huge_kilo5} ,
88
                     },
89
         2
90
       ),
91

    
92
  MEGA (
93
         new int[][] {
94
                       {3 , 21, 21, R.raw.mega3, R.drawable.ui_small_mega3, R.drawable.ui_medium_mega3, R.drawable.ui_big_mega3, R.drawable.ui_huge_mega3} ,
95
                       {5 , 35, 37, R.raw.mega5, R.drawable.ui_small_mega5, R.drawable.ui_medium_mega5, R.drawable.ui_big_mega5, R.drawable.ui_huge_mega5} ,
96
                     },
97
         2
98
       ),
99

    
100
  ULTI (
101
         new int[][] {
102
                       {2 , 18, 18, R.raw.ulti, R.drawable.ui_small_ulti, R.drawable.ui_medium_ulti, R.drawable.ui_big_ulti, R.drawable.ui_huge_ulti} ,
103
                     },
104
         3
105
       ),
106

    
107
  DIAM (
108
         new int[][] {
109
                       {2 , 10, 12, R.raw.diam2, R.drawable.ui_small_diam2, R.drawable.ui_medium_diam2, R.drawable.ui_big_diam2, R.drawable.ui_huge_diam2} ,
110
                       {3 , 18, 24, R.raw.diam3, R.drawable.ui_small_diam3, R.drawable.ui_medium_diam3, R.drawable.ui_big_diam3, R.drawable.ui_huge_diam3} ,
111
                       {4 , 32, 32, R.raw.diam4, R.drawable.ui_small_diam4, R.drawable.ui_medium_diam4, R.drawable.ui_big_diam4, R.drawable.ui_huge_diam4} ,
112
                     },
113
         3
114
       ),
115

    
116
  DINO (
117
         new int[][] {
118
                       {3 , 10, 10, R.raw.dino, R.drawable.ui_small_dino, R.drawable.ui_medium_dino, R.drawable.ui_big_dino, R.drawable.ui_huge_dino} ,
119
                     },
120
         4
121
       ),
122

    
123
  DIN4 (
124
         new int[][] {
125
                       {3 , 7, 7, R.raw.dino, R.drawable.ui_small_din4, R.drawable.ui_medium_din4, R.drawable.ui_big_din4, R.drawable.ui_huge_din4} ,
126
                     },
127
         4
128
       ),
129

    
130
  REDI (
131
         new int[][] {
132
                       {3 , 14, 16, R.raw.redi, R.drawable.ui_small_redi, R.drawable.ui_medium_redi, R.drawable.ui_big_redi, R.drawable.ui_huge_redi} ,
133
                     },
134
         4
135
       ),
136

    
137
  HELI (
138
         new int[][] {
139
                       {3 , 18, 20, R.raw.heli, R.drawable.ui_small_heli, R.drawable.ui_medium_heli, R.drawable.ui_big_heli, R.drawable.ui_huge_heli} ,
140
                     },
141
         4
142
       ),
143

    
144
  SKEW (
145
         new int[][] {
146
                       {2 , 11, 11, R.raw.skew2, R.drawable.ui_small_skewb, R.drawable.ui_medium_skewb, R.drawable.ui_big_skewb, R.drawable.ui_huge_skewb} ,
147
                       {3 , 17, 21, R.raw.skew3, R.drawable.ui_small_skewm, R.drawable.ui_medium_skewm, R.drawable.ui_big_skewm, R.drawable.ui_huge_skewm} ,
148
                     },
149
         5
150
       ),
151

    
152
  IVY  (
153
         new int[][] {
154
                       {2 , 8, 8, R.raw.ivy, R.drawable.ui_small_ivy, R.drawable.ui_medium_ivy, R.drawable.ui_big_ivy, R.drawable.ui_huge_ivy} ,
155
                     },
156
         5
157
       ),
158

    
159
  REX  (
160
         new int[][] {
161
                       {3 , 16, 19, R.raw.rex, R.drawable.ui_small_rex, R.drawable.ui_medium_rex, R.drawable.ui_big_rex, R.drawable.ui_huge_rex} ,
162
                     },
163
         5
164
       ),
165

    
166
  BAN1 (
167
         new int[][] {
168
                       {3 , 16, 16, R.raw.ban1, R.drawable.ui_small_ban1, R.drawable.ui_medium_ban1, R.drawable.ui_big_ban1, R.drawable.ui_huge_ban1} ,
169
                     },
170
         6
171
       ),
172

    
173
  BAN2 (
174
         new int[][] {
175
                       {3 , 16, 16, R.raw.ban2, R.drawable.ui_small_ban2, R.drawable.ui_medium_ban2, R.drawable.ui_big_ban2, R.drawable.ui_huge_ban2} ,
176
                     },
177
         6
178
       ),
179

    
180
  BAN3 (
181
         new int[][] {
182
                       {3 , 16, 16, R.raw.ban3, R.drawable.ui_small_ban3, R.drawable.ui_medium_ban3, R.drawable.ui_big_ban3, R.drawable.ui_huge_ban3} ,
183
                     },
184
         6
185
       ),
186

    
187
  BAN4 (
188
         new int[][] {
189
                       {3 , 16, 16, R.raw.ban4, R.drawable.ui_small_ban4, R.drawable.ui_medium_ban4, R.drawable.ui_big_ban4, R.drawable.ui_huge_ban4} ,
190
                     },
191
         6
192
       ),
193

    
194
  SQU1 (
195
         new int[][] {
196
                       {3 , 24, 24, R.raw.square1, R.drawable.ui_small_square1, R.drawable.ui_medium_square1, R.drawable.ui_big_square1, R.drawable.ui_huge_square1} ,
197
                     },
198
         7
199
       ),
200

    
201
  SQU2 (
202
         new int[][] {
203
                       {3 , 24, 24, R.raw.square2, R.drawable.ui_small_square2, R.drawable.ui_medium_square2, R.drawable.ui_big_square2, R.drawable.ui_huge_square2} ,
204
                     },
205
         7
206
       ),
207

    
208
  MIRR (
209
         new int[][] {
210
                       {2 , 12, 12, R.raw.mirr2, R.drawable.ui_small_mirr2, R.drawable.ui_medium_mirr2, R.drawable.ui_big_mirr2, R.drawable.ui_huge_mirr2} ,
211
                       {3 , 16, 17, R.raw.mirr3, R.drawable.ui_small_mirr3, R.drawable.ui_medium_mirr3, R.drawable.ui_big_mirr3, R.drawable.ui_huge_mirr3} ,
212
                     },
213
         7
214
       ),
215
  ;
216

    
217
  public static final int NUM_OBJECTS = values().length;
218
  public static final int MAX_NUM_OBJECTS;
219
  public static final int MAX_LEVEL;
220
  public static final int MAX_SCRAMBLE;
221
  public static final int MAX_OBJECT_SIZE;
222

    
223
  private final int[] mObjectSizes, mDBLevels, mNumScrambles, mSmallIconIDs, mMediumIconIDs, mBigIconIDs, mHugeIconIDs, mResourceIDs;
224
  private final int mRow, mNumSizes;
225

    
226
  private static final ObjectList[] objects;
227
  private static int mNumAll;
228
  private static int[] mIndices;
229
  private static int mColCount, mRowCount;
230

    
231
  static
232
    {
233
    mNumAll = 0;
234
    int num, i = 0;
235
    objects = new ObjectList[NUM_OBJECTS];
236
    int maxNum     = Integer.MIN_VALUE;
237
    int maxLevel   = Integer.MIN_VALUE;
238
    int maxScramble= Integer.MIN_VALUE;
239
    int maxSize    = Integer.MIN_VALUE;
240

    
241
    for(ObjectList object: ObjectList.values())
242
      {
243
      objects[i] = object;
244
      i++;
245
      num = object.mObjectSizes.length;
246
      mNumAll += num;
247
      if( num> maxNum ) maxNum = num;
248

    
249
      for(int j=0; j<num; j++)
250
        {
251
        if( object.mNumScrambles[j]> maxScramble ) maxScramble= object.mNumScrambles[j];
252
        if( object.mDBLevels[j]    > maxLevel    ) maxLevel   = object.mDBLevels[j];
253
        if( object.mObjectSizes[j] > maxSize     ) maxSize    = object.mObjectSizes[j];
254
        }
255
      }
256

    
257
    MAX_NUM_OBJECTS = maxNum;
258
    MAX_LEVEL       = maxLevel;
259
    MAX_SCRAMBLE    = maxScramble;
260
    MAX_OBJECT_SIZE = maxSize;
261
    }
262

    
263
///////////////////////////////////////////////////////////////////////////////////////////////////
264

    
265
  private static void setUpColAndRow()
266
    {
267
    mIndices = new int[NUM_OBJECTS];
268
    mRowCount= 0;
269

    
270
    for(int obj=0; obj<NUM_OBJECTS; obj++)
271
      {
272
      mIndices[obj] = objects[obj].mRow;
273
      if( mIndices[obj]>=mRowCount ) mRowCount = mIndices[obj]+1;
274
      }
275

    
276
    mColCount = 0;
277

    
278
    for(int row=0; row<mRowCount; row++)
279
      {
280
      int numObjects = computeNumObjectsInRow(row);
281
      if( numObjects>mColCount ) mColCount = numObjects;
282
      }
283
    }
284

    
285
///////////////////////////////////////////////////////////////////////////////////////////////////
286

    
287
  private static int computeNumObjectsInRow(int row)
288
    {
289
    int num=0;
290

    
291
    for(int object=0; object<NUM_OBJECTS; object++)
292
      {
293
      if( objects[object].mRow == row )
294
        {
295
        num += objects[object].mNumSizes;
296
        }
297
      }
298

    
299
    return num;
300
    }
301

    
302
///////////////////////////////////////////////////////////////////////////////////////////////////
303

    
304
  public static int getColumnCount()
305
    {
306
    if( mIndices==null ) setUpColAndRow();
307

    
308
    return mColCount;
309
    }
310

    
311
///////////////////////////////////////////////////////////////////////////////////////////////////
312

    
313
  public static int getRowCount()
314
    {
315
    if( mIndices==null ) setUpColAndRow();
316

    
317
    return mRowCount;
318
    }
319

    
320
///////////////////////////////////////////////////////////////////////////////////////////////////
321

    
322
  public static int[] getIndices()
323
    {
324
    if( mIndices==null ) setUpColAndRow();
325

    
326
    return mIndices;
327
    }
328

    
329
///////////////////////////////////////////////////////////////////////////////////////////////////
330

    
331
  public static ObjectList getObject(int ordinal)
332
    {
333
    return ordinal>=0 && ordinal<NUM_OBJECTS ? objects[ordinal] : CUBE;
334
    }
335

    
336
///////////////////////////////////////////////////////////////////////////////////////////////////
337

    
338
  public static int pack(int object, int sizeIndex)
339
    {
340
    int ret = 0;
341
    for(int i=0; i<object; i++) ret += objects[i].mObjectSizes.length;
342

    
343
    return ret+sizeIndex;
344
    }
345

    
346
///////////////////////////////////////////////////////////////////////////////////////////////////
347

    
348
  public static int unpackSizeIndex(int number)
349
    {
350
    int num;
351

    
352
    for(int i=0; i<NUM_OBJECTS; i++)
353
      {
354
      num = objects[i].mObjectSizes.length;
355
      if( number<num ) return number;
356
      number -= num;
357
      }
358

    
359
    return -1;
360
    }
361

    
362
///////////////////////////////////////////////////////////////////////////////////////////////////
363

    
364
  public static int unpackObject(int number)
365
    {
366
    int num;
367

    
368
    for(int i=0; i<NUM_OBJECTS; i++)
369
      {
370
      num = objects[i].mObjectSizes.length;
371
      if( number<num ) return i;
372
      number -= num;
373
      }
374

    
375
    return -1;
376
    }
377

    
378
///////////////////////////////////////////////////////////////////////////////////////////////////
379

    
380
  public static int unpackObjectFromString(String obj)
381
    {
382
    int u = obj.indexOf('_');
383
    int l = obj.length();
384

    
385
    if( u>0 )
386
      {
387
      String name = obj.substring(0,u);
388
      int size = Integer.parseInt( obj.substring(u+1,l) );
389

    
390
      for(int i=0; i<NUM_OBJECTS; i++)
391
        {
392
        if( objects[i].name().equals(name) )
393
          {
394
          int sizeIndex = getSizeIndex(i,size);
395
          return pack(i,sizeIndex);
396
          }
397
        }
398
      }
399

    
400
    return -1;
401
    }
402

    
403
///////////////////////////////////////////////////////////////////////////////////////////////////
404

    
405
  public static String getObjectList()
406
    {
407
    String name;
408
    StringBuilder list = new StringBuilder();
409
    int len;
410
    int[] sizes;
411

    
412
    for(int i=0; i<NUM_OBJECTS; i++)
413
      {
414
      sizes = objects[i].mObjectSizes;
415
      len   = sizes.length;
416
      name  = objects[i].name();
417

    
418
      for(int j=0; j<len; j++)
419
        {
420
        if( i>0 || j>0 ) list.append(',');
421
        list.append(name);
422
        list.append('_');
423
        list.append(sizes[j]);
424
        }
425
      }
426

    
427
    return list.toString();
428
    }
429

    
430
///////////////////////////////////////////////////////////////////////////////////////////////////
431

    
432
  public static int getTotal()
433
    {
434
    return mNumAll;
435
    }
436

    
437
///////////////////////////////////////////////////////////////////////////////////////////////////
438

    
439
  public static int getDBLevel(int ordinal, int sizeIndex)
440
    {
441
    if( ordinal>=0 && ordinal<NUM_OBJECTS )
442
      {
443
      int num = objects[ordinal].mObjectSizes.length;
444
      return sizeIndex>=0 && sizeIndex<num ? objects[ordinal].mDBLevels[sizeIndex] : 0;
445
      }
446

    
447
    return 0;
448
    }
449

    
450
///////////////////////////////////////////////////////////////////////////////////////////////////
451

    
452
  public static int getNumScramble(int ordinal, int sizeIndex)
453
    {
454
    if( ordinal>=0 && ordinal<NUM_OBJECTS )
455
      {
456
      int num = objects[ordinal].mObjectSizes.length;
457
      return sizeIndex>=0 && sizeIndex<num ? objects[ordinal].mNumScrambles[sizeIndex] : 0;
458
      }
459

    
460
    return 0;
461
    }
462

    
463
///////////////////////////////////////////////////////////////////////////////////////////////////
464

    
465
  public static int getOrdinal(String name)
466
    {
467
    for(int i=0; i<NUM_OBJECTS; i++)
468
      {
469
      if(objects[i].name().equals(name)) return i;
470
      }
471

    
472
    return -1;
473
    }
474

    
475
///////////////////////////////////////////////////////////////////////////////////////////////////
476

    
477
  public static int getSizeIndex(int ordinal, int size)
478
    {
479
    if( ordinal>=0 && ordinal<NUM_OBJECTS )
480
      {
481
      int[] sizes = objects[ordinal].getSizes();
482
      int len = sizes.length;
483

    
484
      for(int i=0; i<len; i++)
485
        {
486
        if( sizes[i]==size ) return i;
487
        }
488
      }
489

    
490
    return -1;
491
    }
492

    
493
///////////////////////////////////////////////////////////////////////////////////////////////////
494

    
495
  ObjectList(int[][] info, int row)
496
    {
497
    mNumSizes = info.length;
498

    
499
    mObjectSizes  = new int[mNumSizes];
500
    mDBLevels     = new int[mNumSizes];
501
    mNumScrambles = new int[mNumSizes];
502
    mResourceIDs  = new int[mNumSizes];
503
    mSmallIconIDs = new int[mNumSizes];
504
    mMediumIconIDs= new int[mNumSizes];
505
    mBigIconIDs   = new int[mNumSizes];
506
    mHugeIconIDs  = new int[mNumSizes];
507

    
508
    for(int i=0; i<mNumSizes; i++)
509
      {
510
      mObjectSizes[i]  = info[i][0];
511
      mDBLevels[i]     = info[i][1];
512
      mNumScrambles[i] = info[i][2];
513
      mResourceIDs[i]  = info[i][3];
514
      mSmallIconIDs[i] = info[i][4];
515
      mMediumIconIDs[i]= info[i][5];
516
      mBigIconIDs[i]   = info[i][6];
517
      mHugeIconIDs[i]  = info[i][7];
518
      }
519

    
520
    mRow  = row;
521
    }
522

    
523
///////////////////////////////////////////////////////////////////////////////////////////////////
524

    
525
  public int[] getSizes()
526
    {
527
    return mObjectSizes;
528
    }
529

    
530
///////////////////////////////////////////////////////////////////////////////////////////////////
531

    
532
  public int[] getIconIDs()
533
    {
534
    int size = RubikActivity.getDrawableSize();
535

    
536
    switch(size)
537
      {
538
      case 0 : return mSmallIconIDs;
539
      case 1 : return mMediumIconIDs;
540
      case 2 : return mBigIconIDs;
541
      default: return mHugeIconIDs;
542
      }
543
    }
544

    
545
///////////////////////////////////////////////////////////////////////////////////////////////////
546

    
547
  public int[] getResourceIDs()
548
    {
549
    return mResourceIDs;
550
    }
551

    
552
///////////////////////////////////////////////////////////////////////////////////////////////////
553

    
554
  public TwistyObject create(int size, Static4D quat, int[][] moves, Resources res, int scrWidth)
555
    {
556
    DistortedTexture texture = new DistortedTexture();
557
    DistortedEffects effects = new DistortedEffects();
558
    MeshSquare mesh          = new MeshSquare(20,20);   // mesh of the node, not of the cubits
559

    
560
    switch(ordinal())
561
      {
562
      case  0: return new TwistyCube           (size, quat, texture, mesh, effects, moves, res, scrWidth);
563
      case  1: return new TwistyJing           (size, quat, texture, mesh, effects, moves, res, scrWidth);
564
      case  2: return new TwistyPyraminx       (size, quat, texture, mesh, effects, moves, res, scrWidth);
565
      case  3: return new TwistyKilominx       (size, quat, texture, mesh, effects, moves, res, scrWidth);
566
      case  4: return new TwistyMegaminx       (size, quat, texture, mesh, effects, moves, res, scrWidth);
567
      case  5: return new TwistyUltimate       (size, quat, texture, mesh, effects, moves, res, scrWidth);
568
      case  6: return new TwistyDiamond        (size, quat, texture, mesh, effects, moves, res, scrWidth);
569
      case  7: return new TwistyDino6          (size, quat, texture, mesh, effects, moves, res, scrWidth);
570
      case  8: return new TwistyDino4          (size, quat, texture, mesh, effects, moves, res, scrWidth);
571
      case  9: return new TwistyRedi           (size, quat, texture, mesh, effects, moves, res, scrWidth);
572
      case 10: return new TwistyHelicopter     (size, quat, texture, mesh, effects, moves, res, scrWidth);
573
      case 11: return new TwistySkewb          (size, quat, texture, mesh, effects, moves, res, scrWidth);
574
      case 12: return new TwistyIvy            (size, quat, texture, mesh, effects, moves, res, scrWidth);
575
      case 13: return new TwistyRex            (size, quat, texture, mesh, effects, moves, res, scrWidth);
576
      case 14: return new TwistyBandagedFused  (size, quat, texture, mesh, effects, moves, res, scrWidth);
577
      case 15: return new TwistyBandaged2Bar   (size, quat, texture, mesh, effects, moves, res, scrWidth);
578
      case 16: return new TwistyBandaged3Plate (size, quat, texture, mesh, effects, moves, res, scrWidth);
579
      case 17: return new TwistyBandagedEvil   (size, quat, texture, mesh, effects, moves, res, scrWidth);
580
      case 18: return new TwistySquare1        (size, quat, texture, mesh, effects, moves, res, scrWidth);
581
      case 19: return new TwistySquare2        (size, quat, texture, mesh, effects, moves, res, scrWidth);
582
      case 20: return new TwistyMirror         (size, quat, texture, mesh, effects, moves, res, scrWidth);
583
      }
584

    
585
    return null;
586
    }
587
  }
(9-9/21)