Project

General

Profile

« Previous | Next » 

Revision 71887484

Added by Leszek Koltunski almost 8 years ago

abstract setMax and getMax to EffectQueue.

View differences:

src/main/java/org/distorted/library/EffectQueueMatrix.java
53 53
    Matrix.multiplyMM(mMVPMatrix, 0, matrix, 0, mTmpMatrix, 0);  
54 54
    for(int j=0; j<16; j++) matrix[j] = mMVPMatrix[j];   
55 55
    }
56
  
57
///////////////////////////////////////////////////////////////////////////////////////////////////
58
// Only max Byte.MAX_VALUE concurrent effects per bitmap.
59
// If you want more, change type of the mNumEffects, mIDIndex and mFreeIndexes variables to shorts.
60
  
61
  static boolean setMax(int m)
62
    {
63
    if( (mCreated==false && !Distorted.isInitialized()) || m<=mMax[INDEX] )
64
      {
65
           if( m<0              ) m = 0;
66
      else if( m>Byte.MAX_VALUE ) m = Byte.MAX_VALUE;
67
      
68
      mMax[INDEX] = m;
69
      return true;
70
      }
71
   
72
    return false;
73
    }
74
 
75
///////////////////////////////////////////////////////////////////////////////////////////////////
76

  
77
  static int getMax()
78
    {
79
    return mMax[INDEX];
80
    }
81 56

  
82 57
///////////////////////////////////////////////////////////////////////////////////////////////////
83 58

  

Also available in: Unified diff