Project

General

Profile

« Previous | Next » 

Revision da9b3f07

Added by Leszek Koltunski almost 7 years ago

Progress with support for Effect classes.

The library compiles now!

View differences:

src/main/java/org/distorted/library/main/EffectQueue.java
20 20
package org.distorted.library.main;
21 21

  
22 22
import org.distorted.library.effect.Effect;
23
import org.distorted.library.effect.EffectName;
24
import org.distorted.library.effect.EffectType;
23 25
import org.distorted.library.message.EffectListener;
24 26
import org.distorted.library.message.EffectMessage;
25 27

  
......
35 37
  protected Effect[] mEffects;
36 38
  protected int[] mName;
37 39
  protected long mTime=0;
38
  protected static int[] mMax = new int[Effect.LENGTH];
40
  protected static int[] mMax = new int[EffectType.LENGTH];
39 41
  protected Vector<EffectListener> mListeners =null;
40 42
  protected int mNumListeners=0;  // ==mListeners.length(), but we only create mListeners if the first one gets added
41 43
  protected long mID;
......
132 134

  
133 135
  static void onDestroy()
134 136
    {
135
    Effect.reset(mMax);
137
    EffectType.reset(mMax);
136 138
    mCreated = false;  
137 139
    }
138 140

  
139 141
///////////////////////////////////////////////////////////////////////////////////////////////////
140 142

  
141
  synchronized int removeByName(int name)
143
  synchronized int removeByName(EffectName name)
142 144
    {
143 145
    int ret = 0;
144 146

  
......
231 233
      {
232 234
      mCurrentDuration[mNumEffects] = 0;
233 235
      mEffects[mNumEffects] = effect;
234
      mName[mNumEffects] = effect.getName();
236
      mName[mNumEffects] = effect.getName().ordinal();
235 237
      mNumEffects++;
236 238
      }
237 239
    }

Also available in: Unified diff