Project

General

Profile

« Previous | Next » 

Revision a595ee16

Added by Leszek Koltunski almost 8 years ago

New API tested.

View differences:

src/main/java/org/distorted/library/EffectQueueMatrix.java
105 105
   
106 106
    for(int i=0; i<mNumEffects; i++)
107 107
      {
108
      if( mInter[0][i]==null ) continue;
109
           
110
      if( mInter[1][i]!=null )
108
      if( mInter[0][i]!=null && mInter[0][i].interpolateMain(mUniforms ,NUM_UNIFORMS*i+3, mCurrentDuration[i], step) )
111 109
        {
112
        mInter[1][i].interpolateMain(mUniforms, NUM_UNIFORMS*i, mCurrentDuration[i]);
113
        }
114
        
115
      if( mInter[0][i].interpolateMain(mUniforms ,NUM_UNIFORMS*i+3, mCurrentDuration[i], step) )
116
        {   
117
        for(int j=0; j<mNumListeners; j++)   
110
        for(int j=0; j<mNumListeners; j++)
118 111
          EffectMessageSender.newMessage( mListeners.elementAt(j),
119 112
                                          EffectMessage.EFFECT_FINISHED,
120 113
                                         (mID[i]<<EffectTypes.LENGTH)+EffectTypes.MATRIX.type,
121
                                          mType[i], 
114
                                          mType[i],
122 115
                                          mBitmapID,
123 116
                                          null);
124
       
117

  
125 118
        if( EffectNames.isUnity(mType[i], mUniforms, NUM_UNIFORMS*i+3) )
126
          {  
119
          {
127 120
          remove(i);
128 121
          i--;
129 122
          continue;
130 123
          }
131 124
        }
132
    
125

  
126
      if( mInter[1][i]!=null )
127
        {
128
        mInter[1][i].interpolateMain(mUniforms, NUM_UNIFORMS*i, mCurrentDuration[i]);
129
        }
130

  
133 131
      mCurrentDuration[i] += step;
134 132
      }
135 133
     
......
157 155
    Matrix.setIdentityM(viewMatrix, 0);
158 156
    Matrix.translateM(viewMatrix, 0, -dp.width/2, dp.height/2, -dp.distance);
159 157
    
160
    float x,y,z, sx,sy,sz=1.0f;
158
    float x,y,z, sx,sy,sz;
161 159
   
162 160
    for(int i=0; i<mNumEffects; i++)
163 161
      {

Also available in: Unified diff