Project

General

Profile

« Previous | Next » 

Revision 3bf19410

Added by Leszek Koltunski about 2 years ago

Mode the 'iconMode' from static variable in ObjectControl to member varaible in TwistyObject (safer)

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java
29 29

  
30 30
import org.distorted.objectlib.helpers.ObjectFaceShape;
31 31
import org.distorted.objectlib.touchcontrol.TouchControlCuboids;
32
import org.distorted.objectlib.main.ObjectControl;
33 32
import org.distorted.objectlib.main.ObjectType;
34 33
import org.distorted.objectlib.helpers.ObjectShape;
35 34
import org.distorted.objectlib.scrambling.ScrambleState;
......
52 51

  
53 52
///////////////////////////////////////////////////////////////////////////////////////////////////
54 53

  
55
  public TwistyCuboid(int[] numL, int meshState, Static4D quat, Static3D move, float scale, InputStream stream)
54
  public TwistyCuboid(int[] numL, int meshState, int iconMode, Static4D quat, Static3D move, float scale, InputStream stream)
56 55
    {
57
    super(numL, meshState, (numL[0]+numL[1]+numL[2])/3.0f, quat, move, scale, stream);
56
    super(numL, meshState, iconMode, (numL[0]+numL[1]+numL[2])/3.0f, quat, move, scale, stream);
58 57
    }
59 58

  
60 59
///////////////////////////////////////////////////////////////////////////////////////////////////
......
238 237
    {
239 238
    int[] bandIndices;
240 239
    int extraI, extraV, num, numL = getNumLayers()[0];
241
    float height;
240
    float height = isInIconMode() ? 0.001f : 0.045f;
242 241

  
243 242
    switch(numL)
244 243
        {
245
        case 2 : num = 6; extraI = 2; extraV = 2; height = 0.045f; break;
246
        case 3 : num = 5; extraI = 2; extraV = 2; height = 0.045f; break;
247
        case 4 : num = 5; extraI = 1; extraV = 1; height = 0.045f; break;
248
        default: num = 5; extraI = 0; extraV = 0; height = 0.045f; break;
244
        case 2 : num = 6; extraI = 2; extraV = 2; break;
245
        case 3 : num = 5; extraI = 2; extraV = 2; break;
246
        case 4 : num = 5; extraI = 1; extraV = 1; break;
247
        default: num = 5; extraI = 0; extraV = 0; break;
249 248
        }
250 249

  
251 250
    float[][] corners= { {0.036f,0.12f} };
......
621 620
    {
622 621
    float stroke = 0.08f;
623 622

  
624
    if( ObjectControl.isInIconMode() )
623
    if( isInIconMode() )
625 624
      {
626 625
      int[] numLayers = getNumLayers();
627 626

  

Also available in: Unified diff