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/DistortedEffectsPostprocess.java
20 20
package org.distorted.library.main;
21 21

  
22 22
import org.distorted.library.effect.Effect;
23
import org.distorted.library.effect.EffectType;
23 24
import org.distorted.library.message.EffectListener;
24 25

  
25 26
import java.util.ArrayList;
......
240 241
/**
241 242
 * Aborts all Effects of a given type, for example all POSTPROCESS Effects.
242 243
 *
243
 * @param type one of the constants defined in {@link Effect}
244
 * @param type one of the constants defined in {@link EffectType}
244 245
 * @return Number of effects aborted.
245 246
 */
246
  public int abortByType(int type)
247
  public int abortByType(EffectType type)
247 248
    {
248 249
    switch(type)
249 250
      {
250
      case Effect.POSTPROCESS: return mP.abortAll(true);
251
      default                : return 0;
251
      case POSTPROCESS: return mP.abortAll(true);
252
      default         : return 0;
252 253
      }
253 254
    }
254 255

  
......
263 264
    {
264 265
    switch(effect.getType())
265 266
      {
266
      case Effect.POSTPROCESS: return mP.removeEffect(effect);
267
      default                : return 0;
267
      case POSTPROCESS: return mP.removeEffect(effect);
268
      default         : return 0;
268 269
      }
269 270
    }
270 271

  
......
277 278
  @SuppressWarnings("unused")
278 279
  public static int getMaxPostprocess()
279 280
    {
280
    return EffectQueue.getMax(Effect.POSTPROCESS);
281
    return EffectQueue.getMax(EffectType.POSTPROCESS.ordinal());
281 282
    }
282 283

  
283 284
///////////////////////////////////////////////////////////////////////////////////////////////////
......
299 300
  @SuppressWarnings("unused")
300 301
  public static boolean setMaxPostprocess(int max)
301 302
    {
302
    return EffectQueue.setMax(Effect.POSTPROCESS,max);
303
    return EffectQueue.setMax(EffectType.POSTPROCESS.ordinal(),max);
303 304
    }
304 305

  
305 306
///////////////////////////////////////////////////////////////////////////////////////////////////
......
328 329
    {
329 330
    switch(effect.getType())
330 331
      {
331
      case Effect.POSTPROCESS : mP.add(effect); break;
332
      case POSTPROCESS : mP.add(effect); break;
332 333
      }
333 334
    }
334 335
  }

Also available in: Unified diff