Revision a57e6870
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistySquare1.java | ||
---|---|---|
49 | 49 |
|
50 | 50 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
51 | 51 |
|
52 |
public TwistySquare1(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
52 |
public TwistySquare1(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
|
|
53 | 53 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth) |
54 | 54 |
{ |
55 |
super(size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
55 |
super(numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
56 | 56 |
} |
57 | 57 |
|
58 | 58 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
64 | 64 |
|
65 | 65 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
66 | 66 |
|
67 |
protected int getResource(int numLayers) |
|
67 |
protected int getResource(int[] numLayers)
|
|
68 | 68 |
{ |
69 | 69 |
return R.raw.squa1; |
70 | 70 |
} |
... | ... | |
78 | 78 |
|
79 | 79 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
80 | 80 |
|
81 |
protected int[] getSolvedQuats(int cubit, int numLayers) |
|
81 |
protected int[] getSolvedQuats(int cubit, int[] numLayers)
|
|
82 | 82 |
{ |
83 | 83 |
if( mQuats==null ) initializeQuats(); |
84 | 84 |
int status = retCubitSolvedStatus(cubit,numLayers); |
... | ... | |
87 | 87 |
|
88 | 88 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
89 | 89 |
|
90 |
protected ObjectShape getObjectShape(int cubit, int numLayers) |
|
90 |
protected ObjectShape getObjectShape(int cubit, int[] numLayers)
|
|
91 | 91 |
{ |
92 | 92 |
int variant = getCubitVariant(cubit,numLayers); |
93 | 93 |
|
... | ... | |
190 | 190 |
|
191 | 191 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
192 | 192 |
|
193 |
protected Static4D getQuat(int cubit, int numLayers) |
|
193 |
protected Static4D getQuat(int cubit, int[] numLayers)
|
|
194 | 194 |
{ |
195 | 195 |
if( mQuats==null ) initializeQuats(); |
196 | 196 |
if( mQuatNumber ==null ) |
... | ... | |
208 | 208 |
|
209 | 209 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
210 | 210 |
|
211 |
protected int getNumCubitVariants(int numLayers) |
|
211 |
protected int getNumCubitVariants(int[] numLayers)
|
|
212 | 212 |
{ |
213 | 213 |
return 3; |
214 | 214 |
} |
215 | 215 |
|
216 | 216 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
217 | 217 |
|
218 |
protected int getCubitVariant(int cubit, int numLayers) |
|
218 |
protected int getCubitVariant(int cubit, int[] numLayers)
|
|
219 | 219 |
{ |
220 | 220 |
return cubit<2 ? 0 : (cubit<10 ? 1:2); |
221 | 221 |
} |
... | ... | |
269 | 269 |
|
270 | 270 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
271 | 271 |
|
272 |
protected float[][] getCubitPositions(int numLayers) |
|
272 |
protected float[][] getCubitPositions(int[] numLayers)
|
|
273 | 273 |
{ |
274 | 274 |
if( mCenters==null ) |
275 | 275 |
{ |
... | ... | |
309 | 309 |
|
310 | 310 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
311 | 311 |
|
312 |
protected int getNumStickerTypes(int numLayers) |
|
312 |
protected int getNumStickerTypes(int[] numLayers)
|
|
313 | 313 |
{ |
314 | 314 |
return NUM_STICKERS; |
315 | 315 |
} |
316 | 316 |
|
317 | 317 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
318 | 318 |
|
319 |
protected int getFaceColor(int cubit, int cubitface, int numLayers) |
|
319 |
protected int getFaceColor(int cubit, int cubitface, int[] numLayers)
|
|
320 | 320 |
{ |
321 | 321 |
if( mStickerColor==null ) |
322 | 322 |
{ |
... | ... | |
363 | 363 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
364 | 364 |
// PUBLIC API |
365 | 365 |
|
366 |
public ObjectType intGetObjectType(int numLayers) |
|
366 |
public ObjectType intGetObjectType(int[] numLayers)
|
|
367 | 367 |
{ |
368 | 368 |
return ObjectType.SQU1_3; |
369 | 369 |
} |
370 | 370 |
|
371 | 371 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
372 | 372 |
|
373 |
public int getObjectName(int numLayers) |
|
373 |
public int getObjectName(int[] numLayers)
|
|
374 | 374 |
{ |
375 | 375 |
return R.string.squa1; |
376 | 376 |
} |
377 | 377 |
|
378 | 378 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
379 | 379 |
|
380 |
public int getInventor(int numLayers) |
|
380 |
public int getInventor(int[] numLayers)
|
|
381 | 381 |
{ |
382 | 382 |
return R.string.squa1_inventor; |
383 | 383 |
} |
384 | 384 |
|
385 | 385 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
386 | 386 |
|
387 |
public int getComplexity(int numLayers) |
|
387 |
public int getComplexity(int[] numLayers)
|
|
388 | 388 |
{ |
389 | 389 |
return 9; |
390 | 390 |
} |
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!