Revision e7daa161
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/main/ObjectPreRender.java | ||
---|---|---|
55 | 55 |
private boolean mUIBlocked, mTouchBlocked, mIsSolved; |
56 | 56 |
private long mRotationFinishedID; |
57 | 57 |
private final long[] mEffectID; |
58 |
private int mScreenWidth; |
|
58 |
private int mScreenWidth, mScreenHeight;
|
|
59 | 59 |
private int[][] mNextMoves; |
60 | 60 |
private int mScrambleObjectNum; |
61 | 61 |
private int mAddRotationAxis, mAddRotationRowBitmap, mAddRotationAngle; |
... | ... | |
89 | 89 |
|
90 | 90 |
mDebug = ""; |
91 | 91 |
|
92 |
mScreenWidth = 0; |
|
92 |
mScreenWidth = 0; |
|
93 |
mScreenHeight = 0; |
|
93 | 94 |
mScrambleObjectNum = 0; |
94 | 95 |
|
95 | 96 |
mEffectID = new long[BaseEffect.Type.LENGTH]; |
... | ... | |
108 | 109 |
mOldObject = mNewObject; |
109 | 110 |
Static3D move = new Static3D(mMoveX,mMoveY,0); |
110 | 111 |
|
111 |
mNewObject = object.create( mController.getQuat(), move, mAct.get().getResources(), mScreenWidth); |
|
112 |
mNewObject = object.create( mController.getQuat(), move, mAct.get().getResources(), mScreenWidth, mScreenHeight);
|
|
112 | 113 |
|
113 | 114 |
if( mNewObject!=null ) |
114 | 115 |
{ |
... | ... | |
373 | 374 |
// PUBLIC API |
374 | 375 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
375 | 376 |
|
376 |
public void setScreenSize(int width) |
|
377 |
public void setScreenSize(int width, int height)
|
|
377 | 378 |
{ |
378 | 379 |
if( mNewObject!=null ) |
379 | 380 |
{ |
380 | 381 |
mNewObject.createTexture(); |
381 |
mNewObject.recomputeScaleFactor(width); |
|
382 |
mNewObject.recomputeScaleFactor(width,height);
|
|
382 | 383 |
} |
383 | 384 |
mScreenWidth = width; |
385 |
mScreenHeight= height; |
|
384 | 386 |
} |
385 | 387 |
|
386 | 388 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
- remove the retarded NODE_RATIO from TwistyObject
- more correctly estimate Cuboid's 'realSize' as an average of their 3 sizes.