Revision ce366b42
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/objects/TwistyBandagedAbstract.java | ||
---|---|---|
314 | 314 |
return reaches ? stickerIndex*NUM_FACES + face : NUM_STICKERS*NUM_FACES; |
315 | 315 |
} |
316 | 316 |
|
317 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
318 |
|
|
319 |
int computeBitmapFromRow(int rowBitmap, int axis) |
|
320 |
{ |
|
321 |
int bitmap, initBitmap=0; |
|
322 |
|
|
323 |
while( initBitmap!=rowBitmap ) |
|
324 |
{ |
|
325 |
initBitmap = rowBitmap; |
|
326 |
|
|
327 |
for(int cubit=0; cubit<NUM_CUBITS; cubit++) |
|
328 |
{ |
|
329 |
bitmap = CUBITS[cubit].mRotationRow[axis]; |
|
330 |
if( (rowBitmap & bitmap) != 0 ) rowBitmap |= bitmap; |
|
331 |
} |
|
332 |
} |
|
333 |
|
|
334 |
return rowBitmap; |
|
335 |
} |
|
336 |
|
|
317 | 337 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
318 | 338 |
|
319 | 339 |
float returnMultiplier() |
src/main/java/org/distorted/objects/TwistyObject.java | ||
---|---|---|
408 | 408 |
return (mNumTexRows-1-y)*NUM_STICKERS_IN_ROW + x; |
409 | 409 |
} |
410 | 410 |
|
411 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
412 |
// normal, not bandaged, object. |
|
413 |
|
|
414 |
int computeBitmapFromRow(int rowBitmap, int axis) |
|
415 |
{ |
|
416 |
return rowBitmap; |
|
417 |
} |
|
418 |
|
|
411 | 419 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
412 | 420 |
// Clamp all rotated positions to one of those original ones to avoid accumulating errors. |
413 | 421 |
|
... | ... | |
719 | 727 |
} |
720 | 728 |
|
721 | 729 |
mRotAxis = axis; |
722 |
mRotRowBitmap= (1<<row);
|
|
730 |
mRotRowBitmap= computeBitmapFromRow( (1<<row),axis );
|
|
723 | 731 |
mRotationAngleStatic.set0(0.0f); |
724 | 732 |
mRotationAxis.set( ROTATION_AXIS[axis] ); |
725 | 733 |
mRotationAngle.add(mRotationAngleStatic); |
... | ... | |
733 | 741 |
if( wasRotateApplied() ) |
734 | 742 |
{ |
735 | 743 |
mRotAxis = axis; |
736 |
mRotRowBitmap= rowBitmap;
|
|
744 |
mRotRowBitmap= computeBitmapFromRow( rowBitmap,axis );
|
|
737 | 745 |
|
738 | 746 |
mRotationAngleStatic.set0(0.0f); |
739 | 747 |
mRotationAxis.set( ROTATION_AXIS[axis] ); |
Also available in: Unified diff
Make manual scrambling work.