Revision a57e6870
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java | ||
---|---|---|
77 | 77 |
|
78 | 78 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
79 | 79 |
|
80 |
public TwistyHelicopter(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
80 |
public TwistyHelicopter(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
|
|
81 | 81 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth) |
82 | 82 |
{ |
83 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
83 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
84 | 84 |
} |
85 | 85 |
|
86 | 86 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
112 | 112 |
|
113 | 113 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
114 | 114 |
|
115 |
protected int getResource(int numLayers) |
|
115 |
protected int getResource(int[] numLayers)
|
|
116 | 116 |
{ |
117 | 117 |
return R.raw.heli; |
118 | 118 |
} |
... | ... | |
154 | 154 |
|
155 | 155 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
156 | 156 |
|
157 |
protected int[] getSolvedQuats(int cubit, int numLayers) |
|
157 |
protected int[] getSolvedQuats(int cubit, int[] numLayers)
|
|
158 | 158 |
{ |
159 | 159 |
if( mQuats==null ) initializeQuats(); |
160 | 160 |
int status = retCubitSolvedStatus(cubit,numLayers); |
... | ... | |
178 | 178 |
|
179 | 179 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
180 | 180 |
|
181 |
protected int getNumStickerTypes(int numLayers) |
|
181 |
protected int getNumStickerTypes(int[] numLayers)
|
|
182 | 182 |
{ |
183 | 183 |
return 1; |
184 | 184 |
} |
185 | 185 |
|
186 | 186 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
187 | 187 |
|
188 |
protected float[][] getCuts(int size)
|
|
188 |
protected float[][] getCuts(int[] numLayers)
|
|
189 | 189 |
{ |
190 | 190 |
if( mCuts==null ) |
191 | 191 |
{ |
... | ... | |
198 | 198 |
|
199 | 199 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
200 | 200 |
|
201 |
private void getLayerRotatable(int numLayers) |
|
201 |
private void getLayerRotatable(int[] numLayers)
|
|
202 | 202 |
{ |
203 | 203 |
if( mLayerRotatable==null ) |
204 | 204 |
{ |
... | ... | |
218 | 218 |
|
219 | 219 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
220 | 220 |
|
221 |
protected float[][] getCubitPositions(int size)
|
|
221 |
protected float[][] getCubitPositions(int[] numLayers)
|
|
222 | 222 |
{ |
223 | 223 |
if( mCenters==null ) |
224 | 224 |
{ |
... | ... | |
274 | 274 |
|
275 | 275 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
276 | 276 |
|
277 |
protected ObjectShape getObjectShape(int cubit, int numLayers) |
|
277 |
protected ObjectShape getObjectShape(int cubit, int[] numLayers)
|
|
278 | 278 |
{ |
279 | 279 |
int variant = getCubitVariant(cubit,numLayers); |
280 | 280 |
|
... | ... | |
337 | 337 |
|
338 | 338 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
339 | 339 |
|
340 |
protected Static4D getQuat(int cubit, int numLayers) |
|
340 |
protected Static4D getQuat(int cubit, int[] numLayers)
|
|
341 | 341 |
{ |
342 | 342 |
if( mQuats==null ) initializeQuats(); |
343 | 343 |
if( mQuatIndices==null ) mQuatIndices = new int[] { 0,13,14,1,12,2,3,7,20,6,13,17,7,23,18,12,22,10,8,16,11,21,19,9,3,15,14,0,5,2,1,4 }; |
... | ... | |
346 | 346 |
|
347 | 347 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
348 | 348 |
|
349 |
protected int getNumCubitVariants(int numLayers) |
|
349 |
protected int getNumCubitVariants(int[] numLayers)
|
|
350 | 350 |
{ |
351 | 351 |
return 2; |
352 | 352 |
} |
353 | 353 |
|
354 | 354 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
355 | 355 |
|
356 |
protected int getCubitVariant(int cubit, int numLayers) |
|
356 |
protected int getCubitVariant(int cubit, int[] numLayers)
|
|
357 | 357 |
{ |
358 | 358 |
return cubit<8 ? 0:1; |
359 | 359 |
} |
360 | 360 |
|
361 | 361 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
362 | 362 |
|
363 |
protected int getFaceColor(int cubit, int cubitface, int size)
|
|
363 |
protected int getFaceColor(int cubit, int cubitface, int[] numLayers)
|
|
364 | 364 |
{ |
365 | 365 |
if( mFaceMap==null ) |
366 | 366 |
{ |
... | ... | |
447 | 447 |
{ |
448 | 448 |
if( mMovement==null ) |
449 | 449 |
{ |
450 |
int numLayers = getNumLayers(); |
|
450 |
int[] numLayers = getNumLayers();
|
|
451 | 451 |
if( mCuts==null ) getCuts(numLayers); |
452 | 452 |
getLayerRotatable(numLayers); |
453 |
mMovement = new Movement6(ROT_AXIS,mCuts,mLayerRotatable,numLayers,TYPE_SPLIT_EDGE,ENABLED); |
|
453 |
mMovement = new Movement6(ROT_AXIS,mCuts,mLayerRotatable,numLayers[0],TYPE_SPLIT_EDGE,ENABLED);
|
|
454 | 454 |
} |
455 | 455 |
return mMovement; |
456 | 456 |
} |
... | ... | |
465 | 465 |
|
466 | 466 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
467 | 467 |
|
468 |
public ObjectType intGetObjectType(int numLayers) |
|
468 |
public ObjectType intGetObjectType(int[] numLayers)
|
|
469 | 469 |
{ |
470 | 470 |
return ObjectType.HELI_3; |
471 | 471 |
} |
472 | 472 |
|
473 | 473 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
474 | 474 |
|
475 |
public int getObjectName(int numLayers) |
|
475 |
public int getObjectName(int[] numLayers)
|
|
476 | 476 |
{ |
477 | 477 |
return R.string.heli3; |
478 | 478 |
} |
479 | 479 |
|
480 | 480 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
481 | 481 |
|
482 |
public int getInventor(int numLayers) |
|
482 |
public int getInventor(int[] numLayers)
|
|
483 | 483 |
{ |
484 | 484 |
return R.string.heli3_inventor; |
485 | 485 |
} |
486 | 486 |
|
487 | 487 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
488 | 488 |
|
489 |
public int getComplexity(int numLayers) |
|
489 |
public int getComplexity(int[] numLayers)
|
|
490 | 490 |
{ |
491 | 491 |
return 8; |
492 | 492 |
} |
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!