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/TwistyDino.java
30 30
import org.distorted.objectlib.helpers.ObjectFaceShape;
31 31
import org.distorted.objectlib.helpers.ObjectShape;
32 32
import org.distorted.objectlib.scrambling.ScrambleState;
33
import org.distorted.objectlib.main.ObjectControl;
34 33
import org.distorted.objectlib.main.ShapeHexahedron;
35 34
import org.distorted.objectlib.touchcontrol.TouchControlHexahedron;
36 35

  
......
54 53

  
55 54
///////////////////////////////////////////////////////////////////////////////////////////////////
56 55

  
57
  TwistyDino(int[] numL, int meshState, Static4D quat, Static3D move, float scale, InputStream stream)
56
  TwistyDino(int[] numL, int meshState, int iconMode, Static4D quat, Static3D move, float scale, InputStream stream)
58 57
    {
59
    super(numL, meshState, numL[0], quat, move, scale, stream);
58
    super(numL, meshState, iconMode, numL[0], quat, move, scale, stream);
60 59
    }
61 60

  
62 61
///////////////////////////////////////////////////////////////////////////////////////////////////
......
174 173

  
175 174
  public ObjectFaceShape getObjectFaceShape(int variant)
176 175
    {
177
    float[][] bands     = { {0.035f,30,0.16f,0.8f,6,2,2}, {0.010f,30,0.16f,0.2f,6,2,2} };
176
    float h1 = isInIconMode() ? 0.001f : 0.035f;
177
    float h2 = isInIconMode() ? 0.001f : 0.010f;
178
    float[][] bands     = { {h1,30,0.16f,0.8f,6,2,2}, {h2,30,0.16f,0.2f,6,2,2} };
178 179
    int[] bandIndices   = { 0,0,1,1 };
179 180
    float[][] corners   = { {0.07f,0.40f}, {0.05f,0.30f} };
180 181
    int[] cornerIndices = { 0,0,1,1 };
......
208 209

  
209 210
  public float getStickerStroke()
210 211
    {
211
    return ObjectControl.isInIconMode() ? 0.22f : 0.15f;
212
    return isInIconMode() ? 0.22f : 0.15f;
212 213
    }
213 214

  
214 215
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff