Revision 9d0d8530
Added by Leszek Koltunski over 8 years ago
| src/main/java/org/distorted/library/effect/Effect.java | ||
|---|---|---|
| 123 | 123 |
|
| 124 | 124 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 125 | 125 |
|
| 126 |
Effect(EffectType type, EffectName name, int dimension, boolean center, boolean region, float[] unity)
|
|
| 126 |
Effect(EffectName name)
|
|
| 127 | 127 |
{
|
| 128 |
mID = (mNextID++)<<EffectType.LENGTH + type.ordinal(); |
|
| 129 |
|
|
| 130 | 128 |
mName = name; |
| 131 |
mType = type;
|
|
| 132 |
mDimension = dimension;
|
|
| 133 |
mSupportsC = center;
|
|
| 134 |
mSupportsR = region;
|
|
| 129 |
mType = name.getType();
|
|
| 130 |
mDimension = name.getDimension();
|
|
| 131 |
mSupportsC = name.supportsCenter();
|
|
| 132 |
mSupportsR = name.supportsRegion();
|
|
| 135 | 133 |
|
| 136 | 134 |
int n = name.ordinal(); |
| 137 |
int l = unity.length; |
|
| 135 |
float[] u = name.getUnity(); |
|
| 136 |
int l = name.getUnity().length; |
|
| 138 | 137 |
|
| 139 | 138 |
for(int i=0; i<l; i++) |
| 140 | 139 |
{
|
| 141 |
mUnity[n*MAX_UNITY_DIM+i] = unity[i];
|
|
| 140 |
mUnity[n*MAX_UNITY_DIM+i] = u[i]; |
|
| 142 | 141 |
} |
| 143 | 142 |
|
| 144 | 143 |
mUnityDim[n] = l; |
| 144 |
|
|
| 145 |
mID = (mNextID++)<<EffectType.LENGTH + mType.ordinal(); |
|
| 145 | 146 |
} |
| 146 | 147 |
} |
Also available in: Unified diff
Progress with Effect classes - everything compiles now!