Project

General

Profile

« Previous | Next » 

Revision a1bcb301

Added by Leszek Koltunski over 2 years ago

Bugfixes for crashes from Firebase.

View differences:

src/main/java/org/distorted/objectlib/main/ObjectPreRender.java
478 478

  
479 479
  public void addRotation(MovesFinished listener, int axis, int rowBitmap, int bareAngle, int millPreDegree)
480 480
    {
481
    mAddRotation = true;
481
    int[] angles = mNewObject.getBasicAngle();
482 482

  
483
    int basicAngle= mNewObject.getBasicAngle()[axis];
484
    int angle     = bareAngle*(360/basicAngle);
485
    int duration  = Math.abs(angle)*millPreDegree;
483
    if( angles.length>axis )
484
      {
485
      mAddRotation = true;
486 486

  
487
    mAddActionListener    = listener;
488
    mAddRotationAxis      = axis;
489
    mAddRotationRowBitmap = rowBitmap;
490
    mAddRotationAngle     = angle;
491
    mAddRotationDuration  = duration;
487
      int basicAngle= angles[axis];
488
      int angle     = bareAngle*(360/basicAngle);
489
      int duration  = Math.abs(angle)*millPreDegree;
492 490

  
493
    if( listener instanceof ScrambleEffect )
494
      {
495
      mDebug += (" (a "+axis+" "+rowBitmap+" "+angle+" "+(System.currentTimeMillis()-mDebugStartTime)+")");
491
      mAddActionListener    = listener;
492
      mAddRotationAxis      = axis;
493
      mAddRotationRowBitmap = rowBitmap;
494
      mAddRotationAngle     = angle;
495
      mAddRotationDuration  = duration;
496

  
497
      if( listener instanceof ScrambleEffect )
498
        {
499
        mDebug += (" (a "+axis+" "+rowBitmap+" "+angle+" "+(System.currentTimeMillis()-mDebugStartTime)+")");
500
        }
496 501
      }
497 502
    }
498 503

  

Also available in: Unified diff