Revision 05cb5de6
Added by Leszek Koltunski almost 4 years ago
| src/main/java/org/distorted/objectlib/main/ObjectConstants.java | ||
|---|---|---|
| 31 | 31 |
public static final int CUBE_7 = ObjectType.CUBE_7.ordinal(); |
| 32 | 32 |
public static final int MIRR_2 = ObjectType.MIRR_2.ordinal(); |
| 33 | 33 |
public static final int MIRR_3 = ObjectType.MIRR_3.ordinal(); |
| 34 |
public static final int MIRR_4 = ObjectType.MIRR_4.ordinal(); |
|
| 34 | 35 |
public static final int CU_323 = ObjectType.CU_323.ordinal(); |
| 35 | 36 |
public static final int CU_232 = ObjectType.CU_232.ordinal(); |
| 36 | 37 |
public static final int CU_343 = ObjectType.CU_343.ordinal(); |
| src/main/java/org/distorted/objectlib/main/ObjectType.java | ||
|---|---|---|
| 45 | 45 |
BAN4_3 ( TwistyBandagedEvil.class , new int[] {3,3,3} , 16, R.drawable.ban4_3),
|
| 46 | 46 |
MIRR_2 ( TwistyMirror.class , new int[] {2,2,2} , 12, R.drawable.mirr_2),
|
| 47 | 47 |
MIRR_3 ( TwistyMirror.class , new int[] {3,3,3} , 17, R.drawable.mirr_3),
|
| 48 |
MIRR_4 ( TwistyMirror.class , new int[] {4,4,4} , 24, R.drawable.mirr_4),
|
|
| 48 | 49 |
CU_323 ( TwistyCuboid.class , new int[] {3,2,3} , 15, R.drawable.cu_323),
|
| 49 | 50 |
CU_232 ( TwistyCuboid.class , new int[] {2,3,2} , 16, R.drawable.cu_232),
|
| 50 | 51 |
CU_343 ( TwistyCuboid.class , new int[] {3,4,3} , 23, R.drawable.cu_343),
|
| src/main/java/org/distorted/objectlib/objects/TwistyMirror.java | ||
|---|---|---|
| 149 | 149 |
if( mPositions==null ) |
| 150 | 150 |
{
|
| 151 | 151 |
int numL = numLayers[0]; |
| 152 |
int numCubits = numL>1 ? 6*numL*numL - 12*numL + 8 : 1;
|
|
| 152 |
int numCubits = getNumCubitVariants(numLayers);
|
|
| 153 | 153 |
mPositions = new float[numCubits][]; |
| 154 | 154 |
|
| 155 | 155 |
float diff = 0.5f*(numL-1); |
| ... | ... | |
| 245 | 245 |
public int getNumCubitVariants(int[] numLayers) |
| 246 | 246 |
{
|
| 247 | 247 |
int numL = numLayers[0]; |
| 248 |
return 6*numL*numL - 12*numL + 8;
|
|
| 248 |
return numL>1 ? 6*numL*numL - 12*numL + 8 : 1;
|
|
| 249 | 249 |
} |
| 250 | 250 |
|
| 251 | 251 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| ... | ... | |
| 280 | 280 |
|
| 281 | 281 |
public boolean[][] getLayerRotatable(int[] numLayers) |
| 282 | 282 |
{
|
| 283 |
int numAxis = ROT_AXIS.length; |
|
| 284 |
boolean[][] layerRotatable = new boolean[numAxis][]; |
|
| 285 |
|
|
| 286 |
for(int i=0; i<numAxis; i++) |
|
| 287 |
{
|
|
| 288 |
layerRotatable[i] = new boolean[numLayers[i]]; |
|
| 289 |
for(int j=0; j<numLayers[i]; j++) layerRotatable[i][j] = true; |
|
| 290 |
} |
|
| 291 |
|
|
| 292 |
return layerRotatable; |
|
| 283 |
int num = numLayers[0]; |
|
| 284 |
boolean[] tmp = new boolean[num]; |
|
| 285 |
for(int i=0; i<num; i++) tmp[i] = true; |
|
| 286 |
return new boolean[][] { tmp,tmp,tmp };
|
|
| 293 | 287 |
} |
| 294 | 288 |
|
| 295 | 289 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| ... | ... | |
| 381 | 375 |
{
|
| 382 | 376 |
case 2: return ObjectType.MIRR_2; |
| 383 | 377 |
case 3: return ObjectType.MIRR_3; |
| 378 |
case 4: return ObjectType.MIRR_4; |
|
| 384 | 379 |
} |
| 385 | 380 |
|
| 386 | 381 |
return ObjectType.MIRR_2; |
| ... | ... | |
| 394 | 389 |
{
|
| 395 | 390 |
case 2: return "Pocket Mirror"; |
| 396 | 391 |
case 3: return "Mirror Cube"; |
| 392 |
case 4: return "Master Mirror Blocks"; |
|
| 397 | 393 |
} |
| 398 | 394 |
return "Pocket Mirror"; |
| 399 | 395 |
} |
| ... | ... | |
| 406 | 402 |
{
|
| 407 | 403 |
case 2: return "Thomas de Bruin"; |
| 408 | 404 |
case 3: return "Hidetoshi Takeji"; |
| 405 |
case 4: return "Traiphum Prungtaengkit"; |
|
| 409 | 406 |
} |
| 410 | 407 |
return "Hidetoshi Takeji"; |
| 411 | 408 |
} |
| ... | ... | |
| 418 | 415 |
{
|
| 419 | 416 |
case 2: return 2007; |
| 420 | 417 |
case 3: return 2006; |
| 418 |
case 4: return 2014; |
|
| 421 | 419 |
} |
| 422 | 420 |
return 2006; |
| 423 | 421 |
} |
| ... | ... | |
| 430 | 428 |
{
|
| 431 | 429 |
case 2: return 1; |
| 432 | 430 |
case 3: return 2; |
| 431 |
case 4: return 3; |
|
| 433 | 432 |
} |
| 434 |
return 7;
|
|
| 433 |
return 2;
|
|
| 435 | 434 |
} |
| 436 | 435 |
} |
Also available in: Unified diff
Add 4x4 Mirror Blocks.