Revision a57e6870
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyRex.java | ||
---|---|---|
74 | 74 |
|
75 | 75 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
76 | 76 |
|
77 |
public TwistyRex(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
77 |
public TwistyRex(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
|
|
78 | 78 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth) |
79 | 79 |
{ |
80 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
80 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
81 | 81 |
} |
82 | 82 |
|
83 | 83 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
99 | 99 |
|
100 | 100 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
101 | 101 |
|
102 |
protected int getResource(int numLayers) |
|
102 |
protected int getResource(int[] numLayers)
|
|
103 | 103 |
{ |
104 | 104 |
return R.raw.rex; |
105 | 105 |
} |
... | ... | |
128 | 128 |
|
129 | 129 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
130 | 130 |
|
131 |
protected int[] getSolvedQuats(int cubit, int numLayers) |
|
131 |
protected int[] getSolvedQuats(int cubit, int[] numLayers)
|
|
132 | 132 |
{ |
133 | 133 |
if( mQuats==null ) initializeQuats(); |
134 | 134 |
int status = retCubitSolvedStatus(cubit,numLayers); |
... | ... | |
152 | 152 |
|
153 | 153 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
154 | 154 |
|
155 |
protected int getNumStickerTypes(int numLayers) |
|
155 |
protected int getNumStickerTypes(int[] numLayers)
|
|
156 | 156 |
{ |
157 | 157 |
return 3; |
158 | 158 |
} |
159 | 159 |
|
160 | 160 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
161 | 161 |
|
162 |
protected float[][] getCuts(int numLayers) |
|
162 |
protected float[][] getCuts(int[] numLayers)
|
|
163 | 163 |
{ |
164 | 164 |
if( mCuts==null ) |
165 | 165 |
{ |
... | ... | |
173 | 173 |
|
174 | 174 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
175 | 175 |
|
176 |
private void getLayerRotatable(int numLayers) |
|
176 |
private void getLayerRotatable(int[] numLayers)
|
|
177 | 177 |
{ |
178 | 178 |
if( mLayerRotatable==null ) |
179 | 179 |
{ |
... | ... | |
193 | 193 |
|
194 | 194 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
195 | 195 |
|
196 |
protected float[][] getCubitPositions(int numLayers) |
|
196 |
protected float[][] getCubitPositions(int[] numLayers)
|
|
197 | 197 |
{ |
198 | 198 |
final float DIST1= 1.50f; |
199 | 199 |
final float DIST2= (1+2*REX_D)/2; |
... | ... | |
251 | 251 |
|
252 | 252 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
253 | 253 |
|
254 |
protected ObjectShape getObjectShape(int cubit, int numLayers) |
|
254 |
protected ObjectShape getObjectShape(int cubit, int[] numLayers)
|
|
255 | 255 |
{ |
256 | 256 |
int variant = getCubitVariant(cubit,numLayers); |
257 | 257 |
|
... | ... | |
298 | 298 |
|
299 | 299 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
300 | 300 |
|
301 |
protected Static4D getQuat(int cubit, int numLayers) |
|
301 |
protected Static4D getQuat(int cubit, int[] numLayers)
|
|
302 | 302 |
{ |
303 | 303 |
if( mQuats==null ) initializeQuats(); |
304 | 304 |
|
... | ... | |
355 | 355 |
|
356 | 356 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
357 | 357 |
|
358 |
protected int getNumCubitVariants(int numLayers) |
|
358 |
protected int getNumCubitVariants(int[] numLayers)
|
|
359 | 359 |
{ |
360 | 360 |
return 3; |
361 | 361 |
} |
362 | 362 |
|
363 | 363 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
364 | 364 |
|
365 |
protected int getCubitVariant(int cubit, int numLayers) |
|
365 |
protected int getCubitVariant(int cubit, int[] numLayers)
|
|
366 | 366 |
{ |
367 | 367 |
return cubit<24 ? 0 : (cubit<30?1:2); |
368 | 368 |
} |
369 | 369 |
|
370 | 370 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
371 | 371 |
|
372 |
protected int getFaceColor(int cubit, int cubitface, int numLayers) |
|
372 |
protected int getFaceColor(int cubit, int cubitface, int[] numLayers)
|
|
373 | 373 |
{ |
374 | 374 |
if( mFaceMap==null ) |
375 | 375 |
{ |
... | ... | |
479 | 479 |
{ |
480 | 480 |
if( mMovement==null ) |
481 | 481 |
{ |
482 |
int numLayers = getNumLayers(); |
|
482 |
int[] numLayers = getNumLayers();
|
|
483 | 483 |
if( mCuts==null ) getCuts(numLayers); |
484 | 484 |
getLayerRotatable(numLayers); |
485 |
mMovement = new Movement6(ROT_AXIS,mCuts,mLayerRotatable,numLayers,TYPE_SPLIT_CORNER,ENABLED); |
|
485 |
mMovement = new Movement6(ROT_AXIS,mCuts,mLayerRotatable,numLayers[0],TYPE_SPLIT_CORNER,ENABLED);
|
|
486 | 486 |
} |
487 | 487 |
return mMovement; |
488 | 488 |
} |
... | ... | |
497 | 497 |
|
498 | 498 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
499 | 499 |
|
500 |
public ObjectType intGetObjectType(int numLayers) |
|
500 |
public ObjectType intGetObjectType(int[] numLayers)
|
|
501 | 501 |
{ |
502 | 502 |
return ObjectType.REX_3; |
503 | 503 |
} |
504 | 504 |
|
505 | 505 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
506 | 506 |
|
507 |
public int getObjectName(int numLayers) |
|
507 |
public int getObjectName(int[] numLayers)
|
|
508 | 508 |
{ |
509 | 509 |
return R.string.rex3; |
510 | 510 |
} |
511 | 511 |
|
512 | 512 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
513 | 513 |
|
514 |
public int getInventor(int numLayers) |
|
514 |
public int getInventor(int[] numLayers)
|
|
515 | 515 |
{ |
516 | 516 |
return R.string.rex3_inventor; |
517 | 517 |
} |
518 | 518 |
|
519 | 519 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
520 | 520 |
|
521 |
public int getComplexity(int numLayers) |
|
521 |
public int getComplexity(int[] numLayers)
|
|
522 | 522 |
{ |
523 | 523 |
return 3; |
524 | 524 |
} |
Also available in: Unified diff
make numLayers into an int[] (preparation for Cuboids)
Caution: because of previous changes to cubit order in cube, the Solver is broken!