Revision beee90ab
Added by Leszek Koltunski about 2 years ago
src/main/java/org/distorted/objectlib/main/ObjectControl.java | ||
---|---|---|
235 | 235 |
private void finishRotation() |
236 | 236 |
{ |
237 | 237 |
TwistyObject object = mPreRender.getObject(); |
238 |
int[] angles = object.getBasicAngles(); |
|
238 |
int[][] angles = object.getBasicAngles();
|
|
239 | 239 |
|
240 | 240 |
if( mCurrentAxis<angles.length ) |
241 | 241 |
{ |
242 | 242 |
computeCurrentSpeedInInchesPerSecond(); |
243 |
|
|
244 |
int angle = object.computeNearestAngle(mCurrentAxis,mCurrentAngle, mCurrRotSpeed);
|
|
243 |
int basic = angles[mCurrentAxis][mCurrentRow]; |
|
244 |
int angle = object.computeNearestAngle(basic,mCurrentAngle, mCurrRotSpeed);
|
|
245 | 245 |
mPreRender.finishRotation(angle); |
246 | 246 |
mPreRender.rememberMove(mCurrentAxis,mCurrentRow,angle); |
247 | 247 |
|
248 | 248 |
if( angle!=0 ) |
249 | 249 |
{ |
250 |
int basicAngle= angles[mCurrentAxis]; |
|
251 |
int realAngle = (angle*basicAngle)/360; |
|
250 |
int realAngle = (angle*basic)/360; |
|
252 | 251 |
mInterface.onFinishRotation(mCurrentAxis,mCurrentRow,realAngle); |
253 | 252 |
} |
254 | 253 |
|
Also available in: Unified diff
Preparation for Mixup Cube: take advantage of the recent bump in MAJOR_VERSION number and change the format of basicAngles to int[][] 'per-axis-per-layer' [ Mixup Cube has different basicAngle in its middle layers (8) - and different in its edge layers (4) ]