Revision 8c069e23
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/main/ObjectPreRender.java | ||
---|---|---|
64 | 64 |
private int mNearestAngle; |
65 | 65 |
private long mDebugStartTime; |
66 | 66 |
|
67 |
// debugging only |
|
68 |
private long mAddRotationTime; |
|
69 |
|
|
67 | 70 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
68 | 71 |
|
69 | 72 |
public ObjectPreRender(Activity act, ObjectControl controller, ObjectLibInterface actioner) |
... | ... | |
191 | 194 |
private void addRotationNow() |
192 | 195 |
{ |
193 | 196 |
mAddRotation = false; |
194 |
mAddRotationID = mNewObject.addNewRotation( mAddRotationAxis, mAddRotationRowBitmap, |
|
195 |
mAddRotationAngle, mAddRotationDuration, this); |
|
196 | 197 |
|
197 |
if( mAddRotationID==0 ) // failed to add effect - should never happen |
|
198 |
if( mNewObject.NUM_AXIS>mAddRotationAxis ) |
|
199 |
{ |
|
200 |
mAddRotationID = mNewObject.addNewRotation( mAddRotationAxis, mAddRotationRowBitmap, |
|
201 |
mAddRotationAngle, mAddRotationDuration, this); |
|
202 |
|
|
203 |
if( mAddRotationID==0 ) // failed to add effect - should never happen |
|
204 |
{ |
|
205 |
unblockEverything(); |
|
206 |
} |
|
207 |
} |
|
208 |
else // should never happen but Firebase says it sometimes does |
|
198 | 209 |
{ |
210 |
long timeNow = System.currentTimeMillis(); |
|
211 |
Class<? extends MovesFinished> clazz = mAddActionListener.getClass(); |
|
212 |
String name = clazz.getSimpleName(); |
|
213 |
|
|
214 |
String error = "time now: "+timeNow+" add time: "+mAddRotationTime+" axis="+mAddRotationAxis+ |
|
215 |
"object: "+mNewObject.getShortName()+" "+name; |
|
216 |
|
|
217 |
mInterface.reportProblem(error); |
|
199 | 218 |
unblockEverything(); |
200 | 219 |
} |
201 | 220 |
} |
... | ... | |
493 | 512 |
mAddRotationRowBitmap = rowBitmap; |
494 | 513 |
mAddRotationAngle = angle; |
495 | 514 |
mAddRotationDuration = duration; |
515 |
mAddRotationTime = System.currentTimeMillis(); |
|
496 | 516 |
|
497 | 517 |
if( listener instanceof ScrambleEffect ) |
498 | 518 |
{ |
Also available in: Unified diff
Bugfix & debugging for a crash from Firebase.