Project

General

Profile

« Previous | Next » 

Revision 30094332

Added by Leszek Koltunski over 3 years ago

More support for using the library from more than one activity. Should be working now!

View differences:

src/main/java/org/distorted/library/main/InternalStackFrame.java
19 19

  
20 20
package org.distorted.library.main;
21 21

  
22
import org.distorted.library.effect.EffectType;
23

  
22 24
import java.util.HashMap;
23 25
import java.util.LinkedList;
24 26

  
......
49 51
  private long mNextSystemID;                   //
50 52
  private long mTaskId;                         //
51 53

  
52
  private static boolean mInitialized;          // DistortedLibrary
54
  private boolean mInitialized;                 // DistortedLibrary
55

  
56
  private int[] mMax;                           // EffectQueue
53 57

  
54 58
///////////////////////////////////////////////////////////////////////////////////////////////////
55 59

  
......
60 64
    mNextClientID = 0;
61 65
    mNextSystemID = 0;
62 66
    mTaskId       = taskID;
67
    mMax          = new int[EffectType.LENGTH];
68

  
69
    EffectType.reset(mMax);
63 70
    }
64 71

  
65 72
///////////////////////////////////////////////////////////////////////////////////////////////////
......
227 234
    mInitialized = init;
228 235
    }
229 236

  
237
///////////////////////////////////////////////////////////////////////////////////////////////////
238

  
239
  int getMax(int index)
240
    {
241
    return mMax[index];
242
    }
243

  
244
///////////////////////////////////////////////////////////////////////////////////////////////////
245

  
246
  boolean setMax(int index, int max)
247
    {
248
    if( !mInitialized || max<mMax[index] )
249
      {
250
      mMax[index] = max;
251
      return true;
252
      }
253

  
254
    return false;
255
    }
256

  
230 257
///////////////////////////////////////////////////////////////////////////////////////////////////
231 258

  
232 259
  void debugLists(String frameMarker)

Also available in: Unified diff