Revision 1bb09f88
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/main/TwistyObject.java | ||
---|---|---|
1134 | 1134 |
for(int col=0; col<mNumTexCols; col++) |
1135 | 1135 |
{ |
1136 | 1136 |
if( face>=NUM_TEXTURES ) break; |
1137 |
ObjectSticker sticker = retSticker(face); |
|
1137 |
int sIndex = getStickerIndex(face); |
|
1138 |
ObjectSticker sticker = retSticker(sIndex); |
|
1138 | 1139 |
factory.drawRoundedPolygon(canvas, paint, col*TEXTURE_HEIGHT, row*TEXTURE_HEIGHT, getColor(face%NUM_FACE_COLORS), sticker); |
1139 | 1140 |
face++; |
1140 | 1141 |
} |
... | ... | |
1381 | 1382 |
protected abstract int getNumFaceColors(); |
1382 | 1383 |
protected abstract int getColor(int face); |
1383 | 1384 |
protected abstract int getNumCubitFaces(); |
1384 |
protected abstract Static4D[] getQuats(); |
|
1385 | 1385 |
protected abstract float[][] getCubitPositions(int[] numLayers); |
1386 | 1386 |
protected abstract int getCubitVariant(int cubit, int[] numLayers); |
1387 | 1387 |
protected abstract int getNumCubitVariants(int[] numLayers); |
1388 | 1388 |
protected abstract Static4D getQuat(int cubit, int[] numLayers); |
1389 | 1389 |
protected abstract ObjectShape getObjectShape(int cubit, int[] numLayers); |
1390 | 1390 |
protected abstract int[] getSolvedQuats(int cubit, int[] numLayers); |
1391 |
protected abstract int getNumStickerTypes(int[] numLayers); |
|
1392 |
protected abstract ObjectSticker retSticker(int face); |
|
1393 | 1391 |
protected abstract int getFaceColor(int cubit, int cubitface, int[] numLayers); |
1394 | 1392 |
protected abstract int getResource(int[] numLayers); |
1395 | 1393 |
protected abstract ObjectType intGetObjectType(int[] numLayers); |
1394 |
protected abstract int getStickerIndex(int face); |
|
1396 | 1395 |
|
1397 | 1396 |
// for JSON only |
1398 | 1397 |
public abstract int getSolvedFunctionIndex(); |
... | ... | |
1403 | 1402 |
public abstract float[] getDist3D(int[] numLayers); |
1404 | 1403 |
public abstract ScrambleState[] getScrambleStates(); |
1405 | 1404 |
public abstract float[][] getCuts(int[] numLayers); |
1405 |
public abstract Static4D[] getQuats(); |
|
1406 |
public abstract int getNumStickerTypes(int[] numLayers); |
|
1407 |
public abstract ObjectSticker retSticker(int sticker); |
|
1406 | 1408 |
|
1407 | 1409 |
public abstract Static3D[] getRotationAxis(); |
1408 | 1410 |
public abstract int[] getBasicAngle(); |
src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java | ||
---|---|---|
260 | 260 |
|
261 | 261 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
262 | 262 |
|
263 |
protected ObjectSticker retSticker(int face)
|
|
263 |
public ObjectSticker retSticker(int sticker)
|
|
264 | 264 |
{ |
265 | 265 |
if( mStickers==null ) |
266 | 266 |
{ |
... | ... | |
296 | 296 |
} |
297 | 297 |
} |
298 | 298 |
|
299 |
return mStickers[face/NUM_FACE_COLORS]; |
|
299 |
return mStickers[sticker]; |
|
300 |
} |
|
301 |
|
|
302 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
303 |
|
|
304 |
protected int getStickerIndex(int face) |
|
305 |
{ |
|
306 |
return face/NUM_FACE_COLORS; |
|
300 | 307 |
} |
301 | 308 |
|
302 | 309 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
316 | 323 |
|
317 | 324 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
318 | 325 |
|
319 |
protected Static4D[] getQuats()
|
|
326 |
public Static4D[] getQuats()
|
|
320 | 327 |
{ |
321 | 328 |
if( mQuats==null ) initializeQuats(); |
322 | 329 |
return mQuats; |
... | ... | |
402 | 409 |
|
403 | 410 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
404 | 411 |
|
405 |
protected int getNumStickerTypes(int[] numLayers)
|
|
412 |
public int getNumStickerTypes(int[] numLayers)
|
|
406 | 413 |
{ |
407 | 414 |
return NUM_STICKERS; |
408 | 415 |
} |
src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java | ||
---|---|---|
494 | 494 |
|
495 | 495 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
496 | 496 |
|
497 |
protected ObjectSticker retSticker(int face)
|
|
497 |
public ObjectSticker retSticker(int sticker)
|
|
498 | 498 |
{ |
499 | 499 |
if( mStickers==null ) |
500 | 500 |
{ |
... | ... | |
520 | 520 |
mStickers[0] = new ObjectSticker(STICKERS[0],null,radii,stroke ); |
521 | 521 |
} |
522 | 522 |
|
523 |
return mStickers[face/NUM_FACE_COLORS];
|
|
523 |
return mStickers[sticker];
|
|
524 | 524 |
} |
525 | 525 |
|
526 | 526 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
527 | 527 |
|
528 |
protected Static4D[] getQuats() |
|
528 |
protected int getStickerIndex(int face) |
|
529 |
{ |
|
530 |
return face/NUM_FACE_COLORS; |
|
531 |
} |
|
532 |
|
|
533 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
534 |
|
|
535 |
public Static4D[] getQuats() |
|
529 | 536 |
{ |
530 | 537 |
if( mQuats ==null ) initializeQuats(); |
531 | 538 |
return mQuats; |
... | ... | |
621 | 628 |
|
622 | 629 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
623 | 630 |
|
624 |
protected int getNumStickerTypes(int[] numLayers)
|
|
631 |
public int getNumStickerTypes(int[] numLayers)
|
|
625 | 632 |
{ |
626 | 633 |
return 1; |
627 | 634 |
} |
src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java | ||
---|---|---|
142 | 142 |
|
143 | 143 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
144 | 144 |
|
145 |
protected Static4D[] getQuats()
|
|
145 |
public Static4D[] getQuats()
|
|
146 | 146 |
{ |
147 | 147 |
if( mQuats==null ) initializeQuats(); |
148 | 148 |
return mQuats; |
... | ... | |
157 | 157 |
|
158 | 158 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
159 | 159 |
|
160 |
protected int getNumStickerTypes(int[] numLayers)
|
|
160 |
public int getNumStickerTypes(int[] numLayers)
|
|
161 | 161 |
{ |
162 | 162 |
return 1; |
163 | 163 |
} |
... | ... | |
525 | 525 |
|
526 | 526 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
527 | 527 |
|
528 |
protected ObjectSticker retSticker(int face)
|
|
528 |
public ObjectSticker retSticker(int sticker)
|
|
529 | 529 |
{ |
530 | 530 |
if( mStickers==null ) |
531 | 531 |
{ |
... | ... | |
551 | 551 |
mStickers[0] = new ObjectSticker(STICKERS[0],null,radii,stroke); |
552 | 552 |
} |
553 | 553 |
|
554 |
return mStickers[face/NUM_FACE_COLORS]; |
|
554 |
return mStickers[sticker]; |
|
555 |
} |
|
556 |
|
|
557 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
558 |
|
|
559 |
protected int getStickerIndex(int face) |
|
560 |
{ |
|
561 |
return face/NUM_FACE_COLORS; |
|
555 | 562 |
} |
556 | 563 |
|
557 | 564 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyDino.java | ||
---|---|---|
95 | 95 |
|
96 | 96 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
97 | 97 |
|
98 |
protected Static4D[] getQuats()
|
|
98 |
public Static4D[] getQuats()
|
|
99 | 99 |
{ |
100 | 100 |
if( mQuats==null ) initializeQuats(); |
101 | 101 |
return mQuats; |
... | ... | |
164 | 164 |
|
165 | 165 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
166 | 166 |
|
167 |
protected int getNumStickerTypes(int[] numLayers)
|
|
167 |
public int getNumStickerTypes(int[] numLayers)
|
|
168 | 168 |
{ |
169 | 169 |
return 1; |
170 | 170 |
} |
... | ... | |
241 | 241 |
|
242 | 242 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
243 | 243 |
|
244 |
protected ObjectSticker retSticker(int face)
|
|
244 |
public ObjectSticker retSticker(int sticker)
|
|
245 | 245 |
{ |
246 | 246 |
if( mStickers==null ) |
247 | 247 |
{ |
... | ... | |
259 | 259 |
mStickers[0] = new ObjectSticker(STICKERS[0],null,radii,stroke); |
260 | 260 |
} |
261 | 261 |
|
262 |
return mStickers[face/NUM_FACE_COLORS]; |
|
262 |
return mStickers[sticker]; |
|
263 |
} |
|
264 |
|
|
265 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
266 |
|
|
267 |
protected int getStickerIndex(int face) |
|
268 |
{ |
|
269 |
return face/NUM_FACE_COLORS; |
|
263 | 270 |
} |
264 | 271 |
|
265 | 272 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java | ||
---|---|---|
151 | 151 |
|
152 | 152 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
153 | 153 |
|
154 |
protected Static4D[] getQuats()
|
|
154 |
public Static4D[] getQuats()
|
|
155 | 155 |
{ |
156 | 156 |
if( mQuats==null ) initializeQuats(); |
157 | 157 |
return mQuats; |
... | ... | |
166 | 166 |
|
167 | 167 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
168 | 168 |
|
169 |
protected int getNumStickerTypes(int[] numLayers)
|
|
169 |
public int getNumStickerTypes(int[] numLayers)
|
|
170 | 170 |
{ |
171 | 171 |
return 1; |
172 | 172 |
} |
... | ... | |
435 | 435 |
|
436 | 436 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
437 | 437 |
|
438 |
protected ObjectSticker retSticker(int face)
|
|
438 |
public ObjectSticker retSticker(int sticker)
|
|
439 | 439 |
{ |
440 | 440 |
if( mStickers==null ) |
441 | 441 |
{ |
... | ... | |
453 | 453 |
mStickers[0] = new ObjectSticker(STICKERS[0],null,radii,stroke); |
454 | 454 |
} |
455 | 455 |
|
456 |
return mStickers[face/NUM_FACE_COLORS]; |
|
456 |
return mStickers[sticker]; |
|
457 |
} |
|
458 |
|
|
459 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
460 |
|
|
461 |
protected int getStickerIndex(int face) |
|
462 |
{ |
|
463 |
return face/NUM_FACE_COLORS; |
|
457 | 464 |
} |
458 | 465 |
|
459 | 466 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyIvy.java | ||
---|---|---|
127 | 127 |
|
128 | 128 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
129 | 129 |
|
130 |
protected Static4D[] getQuats()
|
|
130 |
public Static4D[] getQuats()
|
|
131 | 131 |
{ |
132 | 132 |
if( mQuats==null ) initializeQuats(); |
133 | 133 |
return mQuats; |
... | ... | |
142 | 142 |
|
143 | 143 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
144 | 144 |
|
145 |
protected int getNumStickerTypes(int[] numLayers)
|
|
145 |
public int getNumStickerTypes(int[] numLayers)
|
|
146 | 146 |
{ |
147 | 147 |
return NUM_STICKERS; |
148 | 148 |
} |
... | ... | |
464 | 464 |
|
465 | 465 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
466 | 466 |
|
467 |
protected ObjectSticker retSticker(int face)
|
|
467 |
public ObjectSticker retSticker(int sticker)
|
|
468 | 468 |
{ |
469 | 469 |
if( mStickers==null ) |
470 | 470 |
{ |
... | ... | |
485 | 485 |
for(int s=0; s<NUM_STICKERS; s++) mStickers[s] = new ObjectSticker(STICKERS[s], angles[s],radii[s],strokes[s]); |
486 | 486 |
} |
487 | 487 |
|
488 |
return mStickers[face/NUM_FACE_COLORS]; |
|
488 |
return mStickers[sticker]; |
|
489 |
} |
|
490 |
|
|
491 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
492 |
|
|
493 |
protected int getStickerIndex(int face) |
|
494 |
{ |
|
495 |
return face/NUM_FACE_COLORS; |
|
489 | 496 |
} |
490 | 497 |
|
491 | 498 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyJing.java | ||
---|---|---|
158 | 158 |
|
159 | 159 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
160 | 160 |
|
161 |
protected Static4D[] getQuats()
|
|
161 |
public Static4D[] getQuats()
|
|
162 | 162 |
{ |
163 | 163 |
if( mQuats==null ) initializeQuats(); |
164 | 164 |
return mQuats; |
... | ... | |
173 | 173 |
|
174 | 174 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
175 | 175 |
|
176 |
protected int getNumStickerTypes(int[] numLayers)
|
|
176 |
public int getNumStickerTypes(int[] numLayers)
|
|
177 | 177 |
{ |
178 | 178 |
return 3; |
179 | 179 |
} |
... | ... | |
412 | 412 |
|
413 | 413 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
414 | 414 |
|
415 |
protected ObjectSticker retSticker(int face)
|
|
415 |
public ObjectSticker retSticker(int sticker)
|
|
416 | 416 |
{ |
417 | 417 |
if( mStickers==null ) |
418 | 418 |
{ |
... | ... | |
443 | 443 |
} |
444 | 444 |
} |
445 | 445 |
|
446 |
return mStickers[face/NUM_FACE_COLORS]; |
|
446 |
return mStickers[sticker]; |
|
447 |
} |
|
448 |
|
|
449 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
450 |
|
|
451 |
protected int getStickerIndex(int face) |
|
452 |
{ |
|
453 |
return face/NUM_FACE_COLORS; |
|
447 | 454 |
} |
448 | 455 |
|
449 | 456 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java | ||
---|---|---|
101 | 101 |
|
102 | 102 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
103 | 103 |
|
104 |
protected int getNumStickerTypes(int[] numLayers)
|
|
104 |
public int getNumStickerTypes(int[] numLayers)
|
|
105 | 105 |
{ |
106 | 106 |
int numL = numLayers[0]; |
107 | 107 |
return numL<5 ? 1 : numL/2 + 1; |
... | ... | |
650 | 650 |
|
651 | 651 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
652 | 652 |
|
653 |
protected ObjectSticker retSticker(int face)
|
|
653 |
public ObjectSticker retSticker(int sticker)
|
|
654 | 654 |
{ |
655 | 655 |
if( mStickers==null ) |
656 | 656 |
{ |
... | ... | |
698 | 698 |
} |
699 | 699 |
} |
700 | 700 |
|
701 |
return mStickers[getStickerIndex(face)];
|
|
701 |
return mStickers[sticker];
|
|
702 | 702 |
} |
703 | 703 |
|
704 | 704 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
705 | 705 |
|
706 |
private int getStickerIndex(int face)
|
|
706 |
protected int getStickerIndex(int face)
|
|
707 | 707 |
{ |
708 | 708 |
int variant = face/NUM_FACE_COLORS; |
709 | 709 |
int[] numLayers = getNumLayers(); |
src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java | ||
---|---|---|
88 | 88 |
|
89 | 89 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
90 | 90 |
|
91 |
protected int getNumStickerTypes(int[] numLayers)
|
|
91 |
public int getNumStickerTypes(int[] numLayers)
|
|
92 | 92 |
{ |
93 | 93 |
return (numLayers[0]+3)/2; |
94 | 94 |
} |
... | ... | |
554 | 554 |
|
555 | 555 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
556 | 556 |
|
557 |
protected ObjectSticker retSticker(int face)
|
|
557 |
public ObjectSticker retSticker(int sticker)
|
|
558 | 558 |
{ |
559 | 559 |
if( mStickers==null ) |
560 | 560 |
{ |
... | ... | |
595 | 595 |
} |
596 | 596 |
} |
597 | 597 |
|
598 |
return mStickers[getStickerIndex(face)];
|
|
598 |
return mStickers[sticker];
|
|
599 | 599 |
} |
600 | 600 |
|
601 | 601 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
602 | 602 |
|
603 |
private int getStickerIndex(int face)
|
|
603 |
protected int getStickerIndex(int face)
|
|
604 | 604 |
{ |
605 | 605 |
int variant = face/NUM_FACE_COLORS; |
606 | 606 |
|
src/main/java/org/distorted/objectlib/objects/TwistyMinx.java | ||
---|---|---|
503 | 503 |
|
504 | 504 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
505 | 505 |
|
506 |
protected Static4D[] getQuats()
|
|
506 |
public Static4D[] getQuats()
|
|
507 | 507 |
{ |
508 | 508 |
if( mQuats==null ) initializeQuats(); |
509 | 509 |
return mQuats; |
src/main/java/org/distorted/objectlib/objects/TwistyMirror.java | ||
---|---|---|
382 | 382 |
|
383 | 383 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
384 | 384 |
|
385 |
protected ObjectSticker retSticker(int face)
|
|
385 |
public ObjectSticker retSticker(int sticker)
|
|
386 | 386 |
{ |
387 | 387 |
if( mStickers==null ) |
388 | 388 |
{ |
... | ... | |
409 | 409 |
} |
410 | 410 |
} |
411 | 411 |
|
412 |
return mStickers[face/NUM_FACE_COLORS];
|
|
412 |
return mStickers[sticker];
|
|
413 | 413 |
} |
414 | 414 |
|
415 | 415 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
416 | 416 |
|
417 |
protected int getNumStickerTypes(int[] numLayers) |
|
417 |
protected int getStickerIndex(int face) |
|
418 |
{ |
|
419 |
return face/NUM_FACE_COLORS; |
|
420 |
} |
|
421 |
|
|
422 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
423 |
|
|
424 |
public int getNumStickerTypes(int[] numLayers) |
|
418 | 425 |
{ |
419 | 426 |
return numLayers[0]==2 ? SEQ2.length : SEQ3.length; |
420 | 427 |
} |
... | ... | |
542 | 549 |
|
543 | 550 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
544 | 551 |
|
545 |
protected Static4D[] getQuats()
|
|
552 |
public Static4D[] getQuats()
|
|
546 | 553 |
{ |
547 | 554 |
if( mQuats ==null ) initializeQuats(); |
548 | 555 |
return mQuats; |
src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java | ||
---|---|---|
213 | 213 |
|
214 | 214 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
215 | 215 |
|
216 |
protected Static4D[] getQuats()
|
|
216 |
public Static4D[] getQuats()
|
|
217 | 217 |
{ |
218 | 218 |
if( mQuats==null ) initializeQuats(); |
219 | 219 |
return mQuats; |
... | ... | |
228 | 228 |
|
229 | 229 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
230 | 230 |
|
231 |
protected int getNumStickerTypes(int[] numLayers)
|
|
231 |
public int getNumStickerTypes(int[] numLayers)
|
|
232 | 232 |
{ |
233 | 233 |
return 1; |
234 | 234 |
} |
... | ... | |
404 | 404 |
|
405 | 405 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
406 | 406 |
|
407 |
protected ObjectSticker retSticker(int face)
|
|
407 |
public ObjectSticker retSticker(int sticker)
|
|
408 | 408 |
{ |
409 | 409 |
if( mStickers==null ) |
410 | 410 |
{ |
... | ... | |
431 | 431 |
mStickers[0] = new ObjectSticker(STICKERS[0],null,radii,stroke); |
432 | 432 |
} |
433 | 433 |
|
434 |
return mStickers[face/NUM_FACE_COLORS]; |
|
434 |
return mStickers[sticker]; |
|
435 |
} |
|
436 |
|
|
437 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
438 |
|
|
439 |
protected int getStickerIndex(int face) |
|
440 |
{ |
|
441 |
return face/NUM_FACE_COLORS; |
|
435 | 442 |
} |
436 | 443 |
|
437 | 444 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyRedi.java | ||
---|---|---|
130 | 130 |
|
131 | 131 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
132 | 132 |
|
133 |
protected Static4D[] getQuats()
|
|
133 |
public Static4D[] getQuats()
|
|
134 | 134 |
{ |
135 | 135 |
if( mQuats==null ) initializeQuats(); |
136 | 136 |
return mQuats; |
... | ... | |
145 | 145 |
|
146 | 146 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
147 | 147 |
|
148 |
protected int getNumStickerTypes(int[] numLayers)
|
|
148 |
public int getNumStickerTypes(int[] numLayers)
|
|
149 | 149 |
{ |
150 | 150 |
return 2; |
151 | 151 |
} |
... | ... | |
421 | 421 |
|
422 | 422 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
423 | 423 |
|
424 |
protected ObjectSticker retSticker(int face)
|
|
424 |
public ObjectSticker retSticker(int sticker)
|
|
425 | 425 |
{ |
426 | 426 |
if( mStickers==null ) |
427 | 427 |
{ |
... | ... | |
451 | 451 |
} |
452 | 452 |
} |
453 | 453 |
|
454 |
return mStickers[face/NUM_FACE_COLORS]; |
|
454 |
return mStickers[sticker]; |
|
455 |
} |
|
456 |
|
|
457 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
458 |
|
|
459 |
protected int getStickerIndex(int face) |
|
460 |
{ |
|
461 |
return face/NUM_FACE_COLORS; |
|
455 | 462 |
} |
456 | 463 |
|
457 | 464 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyRex.java | ||
---|---|---|
125 | 125 |
|
126 | 126 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
127 | 127 |
|
128 |
protected Static4D[] getQuats()
|
|
128 |
public Static4D[] getQuats()
|
|
129 | 129 |
{ |
130 | 130 |
if( mQuats==null ) initializeQuats(); |
131 | 131 |
return mQuats; |
... | ... | |
140 | 140 |
|
141 | 141 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
142 | 142 |
|
143 |
protected int getNumStickerTypes(int[] numLayers)
|
|
143 |
public int getNumStickerTypes(int[] numLayers)
|
|
144 | 144 |
{ |
145 | 145 |
return 3; |
146 | 146 |
} |
... | ... | |
450 | 450 |
|
451 | 451 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
452 | 452 |
|
453 |
protected ObjectSticker retSticker(int face)
|
|
453 |
public ObjectSticker retSticker(int sticker)
|
|
454 | 454 |
{ |
455 | 455 |
if( mStickers==null ) |
456 | 456 |
{ |
... | ... | |
485 | 485 |
} |
486 | 486 |
} |
487 | 487 |
|
488 |
return mStickers[face/NUM_FACE_COLORS]; |
|
488 |
return mStickers[sticker]; |
|
489 |
} |
|
490 |
|
|
491 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
492 |
|
|
493 |
protected int getStickerIndex(int face) |
|
494 |
{ |
|
495 |
return face/NUM_FACE_COLORS; |
|
489 | 496 |
} |
490 | 497 |
|
491 | 498 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistySkewb.java | ||
---|---|---|
153 | 153 |
|
154 | 154 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
155 | 155 |
|
156 |
protected Static4D[] getQuats()
|
|
156 |
public Static4D[] getQuats()
|
|
157 | 157 |
{ |
158 | 158 |
if( mQuats==null ) initializeQuats(); |
159 | 159 |
return mQuats; |
... | ... | |
168 | 168 |
|
169 | 169 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
170 | 170 |
|
171 |
protected int getNumStickerTypes(int[] numLayers)
|
|
171 |
public int getNumStickerTypes(int[] numLayers)
|
|
172 | 172 |
{ |
173 | 173 |
return 3; |
174 | 174 |
} |
... | ... | |
568 | 568 |
|
569 | 569 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
570 | 570 |
|
571 |
protected ObjectSticker retSticker(int face)
|
|
571 |
public ObjectSticker retSticker(int sticker)
|
|
572 | 572 |
{ |
573 | 573 |
if( mStickers==null ) |
574 | 574 |
{ |
... | ... | |
602 | 602 |
} |
603 | 603 |
} |
604 | 604 |
|
605 |
return mStickers[face/NUM_FACE_COLORS]; |
|
605 |
return mStickers[sticker]; |
|
606 |
} |
|
607 |
|
|
608 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
609 |
|
|
610 |
protected int getStickerIndex(int face) |
|
611 |
{ |
|
612 |
return face/NUM_FACE_COLORS; |
|
606 | 613 |
} |
607 | 614 |
|
608 | 615 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistySquare.java | ||
---|---|---|
105 | 105 |
|
106 | 106 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
107 | 107 |
|
108 |
protected Static4D[] getQuats()
|
|
108 |
public Static4D[] getQuats()
|
|
109 | 109 |
{ |
110 | 110 |
if( mQuats==null ) initializeQuats(); |
111 | 111 |
return mQuats; |
src/main/java/org/distorted/objectlib/objects/TwistySquare1.java | ||
---|---|---|
222 | 222 |
|
223 | 223 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
224 | 224 |
|
225 |
protected ObjectSticker retSticker(int face)
|
|
225 |
public ObjectSticker retSticker(int sticker)
|
|
226 | 226 |
{ |
227 | 227 |
if( mStickers==null ) |
228 | 228 |
{ |
... | ... | |
264 | 264 |
} |
265 | 265 |
} |
266 | 266 |
|
267 |
return mStickers[face/NUM_FACE_COLORS]; |
|
267 |
return mStickers[sticker]; |
|
268 |
} |
|
269 |
|
|
270 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
271 |
|
|
272 |
protected int getStickerIndex(int face) |
|
273 |
{ |
|
274 |
return face/NUM_FACE_COLORS; |
|
268 | 275 |
} |
269 | 276 |
|
270 | 277 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
309 | 316 |
|
310 | 317 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
311 | 318 |
|
312 |
protected int getNumStickerTypes(int[] numLayers)
|
|
319 |
public int getNumStickerTypes(int[] numLayers)
|
|
313 | 320 |
{ |
314 | 321 |
return NUM_STICKERS; |
315 | 322 |
} |
src/main/java/org/distorted/objectlib/objects/TwistySquare2.java | ||
---|---|---|
227 | 227 |
|
228 | 228 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
229 | 229 |
|
230 |
protected ObjectSticker retSticker(int face)
|
|
230 |
public ObjectSticker retSticker(int sticker)
|
|
231 | 231 |
{ |
232 | 232 |
if( mStickers==null ) |
233 | 233 |
{ |
... | ... | |
269 | 269 |
} |
270 | 270 |
} |
271 | 271 |
|
272 |
return mStickers[face/NUM_FACE_COLORS]; |
|
272 |
return mStickers[sticker]; |
|
273 |
} |
|
274 |
|
|
275 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
276 |
|
|
277 |
protected int getStickerIndex(int face) |
|
278 |
{ |
|
279 |
return face/NUM_FACE_COLORS; |
|
273 | 280 |
} |
274 | 281 |
|
275 | 282 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
326 | 333 |
|
327 | 334 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
328 | 335 |
|
329 |
protected int getNumStickerTypes(int[] numLayers)
|
|
336 |
public int getNumStickerTypes(int[] numLayers)
|
|
330 | 337 |
{ |
331 | 338 |
return NUM_STICKERS; |
332 | 339 |
} |
src/main/java/org/distorted/objectlib/objects/TwistyUltimate.java | ||
---|---|---|
321 | 321 |
|
322 | 322 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
323 | 323 |
|
324 |
protected ObjectSticker retSticker(int face)
|
|
324 |
public ObjectSticker retSticker(int sticker)
|
|
325 | 325 |
{ |
326 | 326 |
if( mStickers==null ) |
327 | 327 |
{ |
... | ... | |
354 | 354 |
} |
355 | 355 |
} |
356 | 356 |
|
357 |
return mStickers[face/NUM_FACE_COLORS];
|
|
357 |
return mStickers[sticker];
|
|
358 | 358 |
} |
359 | 359 |
|
360 | 360 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
361 | 361 |
|
362 |
protected Static4D[] getQuats() |
|
362 |
protected int getStickerIndex(int face) |
|
363 |
{ |
|
364 |
return face/NUM_FACE_COLORS; |
|
365 |
} |
|
366 |
|
|
367 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
368 |
|
|
369 |
public Static4D[] getQuats() |
|
363 | 370 |
{ |
364 | 371 |
if( mQuats==null ) initializeQuats(); |
365 | 372 |
return mQuats; |
... | ... | |
434 | 441 |
|
435 | 442 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
436 | 443 |
|
437 |
protected int getNumStickerTypes(int[] numLayers)
|
|
444 |
public int getNumStickerTypes(int[] numLayers)
|
|
438 | 445 |
{ |
439 | 446 |
return 3; |
440 | 447 |
} |
Also available in: Unified diff
Progress with serializing object to JSON: stickers, quats.