Revision 1e672c1d
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/library/effectqueue/EffectQueue.java | ||
---|---|---|
51 | 51 |
long[] mCurrentDuration; |
52 | 52 |
Effect[] mEffects; |
53 | 53 |
int[] mName; |
54 |
int[] mTag;
|
|
54 |
int[] mAssociation;
|
|
55 | 55 |
long mTime; |
56 | 56 |
|
57 | 57 |
private static int[] mMax = new int[EffectType.LENGTH]; |
... | ... | |
142 | 142 |
mCurrentDuration = new long[max]; |
143 | 143 |
mEffects = new Effect[max]; |
144 | 144 |
mName = new int[max]; |
145 |
mTag = new int[max];
|
|
145 |
mAssociation = new int[max];
|
|
146 | 146 |
} |
147 | 147 |
|
148 | 148 |
for(int i=0; i<mNumEffects; i++ ) |
... | ... | |
150 | 150 |
mEffects[i] = source.mEffects[i]; |
151 | 151 |
mCurrentDuration[i] = source.mCurrentDuration[i]; |
152 | 152 |
mName[i] = source.mName[i]; |
153 |
mTag[i] = source.mTag[i];
|
|
153 |
mAssociation[i] = source.mAssociation[i];
|
|
154 | 154 |
} |
155 | 155 |
} |
156 | 156 |
} |
... | ... | |
279 | 279 |
mEffects[j] = mEffects[j+1]; |
280 | 280 |
mCurrentDuration[j] = mCurrentDuration[j+1]; |
281 | 281 |
mName[j] = mName[j+1]; |
282 |
mTag[j] = mTag[j+1];
|
|
282 |
mAssociation[j] = mAssociation[j+1];
|
|
283 | 283 |
} |
284 | 284 |
|
285 | 285 |
mEffects[mNumEffects] = null; |
... | ... | |
430 | 430 |
mCurrentDuration = new long[max]; |
431 | 431 |
mEffects = new Effect[max]; |
432 | 432 |
mName = new int[max]; |
433 |
mTag = new int[max];
|
|
433 |
mAssociation = new int[max];
|
|
434 | 434 |
} |
435 | 435 |
mCreated = true; |
436 | 436 |
|
... | ... | |
442 | 442 |
if( position==-1 ) |
443 | 443 |
{ |
444 | 444 |
mCurrentDuration[mNumEffects] = 0; |
445 |
mEffects[mNumEffects] = job.effect; |
|
446 |
mName[mNumEffects] = job.effect.getName().ordinal(); |
|
447 |
mTag[mNumEffects] = job.effect.getTag();
|
|
445 |
mEffects[mNumEffects] = job.effect;
|
|
446 |
mName[mNumEffects] = job.effect.getName().ordinal();
|
|
447 |
mAssociation[mNumEffects]= job.effect.getAssociation();
|
|
448 | 448 |
|
449 | 449 |
mNumEffects++; |
450 | 450 |
changed = true; |
... | ... | |
456 | 456 |
mCurrentDuration[j] = mCurrentDuration[j-1]; |
457 | 457 |
mEffects[j] = mEffects[j-1]; |
458 | 458 |
mName[j] = mName[j-1]; |
459 |
mTag[j] = mTag[j-1];
|
|
459 |
mAssociation[j] = mAssociation[j-1];
|
|
460 | 460 |
} |
461 | 461 |
|
462 | 462 |
mCurrentDuration[position] = 0; |
463 |
mEffects[position] = job.effect; |
|
464 |
mName[position] = job.effect.getName().ordinal(); |
|
465 |
mTag[position] = job.effect.getTag();
|
|
463 |
mEffects[position] = job.effect;
|
|
464 |
mName[position] = job.effect.getName().ordinal();
|
|
465 |
mAssociation[position]= job.effect.getAssociation();
|
|
466 | 466 |
|
467 | 467 |
mNumEffects++; |
468 | 468 |
changed = true; |
Also available in: Unified diff
Change 'tag' to a more appropriate name - 'association'.