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/TwistyJing.java
29 29

  
30 30
import org.distorted.objectlib.helpers.ObjectFaceShape;
31 31
import org.distorted.objectlib.touchcontrol.TouchControlTetrahedron;
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;
......
59 58

  
60 59
///////////////////////////////////////////////////////////////////////////////////////////////////
61 60

  
62
  public TwistyJing(int[] numL, int meshState, Static4D quat, Static3D move, float scale, InputStream stream)
61
  public TwistyJing(int[] numL, int meshState, int iconMode, Static4D quat, Static3D move, float scale, InputStream stream)
63 62
    {
64
    super(numL, meshState, numL[0], quat, move, scale, stream);
63
    super(numL, meshState, iconMode, numL[0], quat, move, scale, stream);
65 64
    }
66 65

  
67 66
///////////////////////////////////////////////////////////////////////////////////////////////////
......
273 272

  
274 273
    if( variant==0 )
275 274
      {
276
      float[][] bands     = { {0.015f,35,0.25f*F,0.5f*F,5,1,1},{0.001f,35,0.25f*F,0.5f*F,5,1,1} };
275
      float height = isInIconMode() ? 0.001f : 0.015f;
276
      float[][] bands     = { {height,35,0.25f*F,0.5f*F,5,1,1},{0.001f,35,0.25f*F,0.5f*F,5,1,1} };
277 277
      int[] bandIndices   = { 0,0,0,1,1,1 };
278 278
      float[][] corners   = { {0.08f,0.20f*F},{0.07f,0.20f*F} };
279 279
      int[] cornerIndices = { 0,1,1,-1,1,-1,-1,-1 };
......
283 283
      }
284 284
    else if( variant==1 )
285 285
      {
286
      float[][] bands     = { {0.015f,35,0.5f*F,F,5,1,1},{0.001f,35,0.5f*F,F,5,1,1} };
286
      float height = isInIconMode() ? 0.001f : 0.015f;
287
      float[][] bands     = { {height,35,0.5f*F,F,5,1,1},{0.001f,35,0.5f*F,F,5,1,1} };
287 288
      int[] bandIndices   = { 0,0,1,1,1,1 };
288 289
      float[][] corners   = { {0.07f,0.20f*F} };
289 290
      int[] cornerIndices = { 0,0,-1,0,0,0,-1,0 };
......
293 294
      }
294 295
    else
295 296
      {
296
      float[][] bands     = { {0.020f,35,0.20f*L,0.6f*L,5,1,1}, {0.001f,35,0.05f*L,0.1f*L,5,1,1} };
297
      float height = isInIconMode() ? 0.001f : 0.020f;
298
      float[][] bands     = { {height,35,0.20f*L,0.6f*L,5,1,1}, {0.001f,35,0.05f*L,0.1f*L,5,1,1} };
297 299
      int[] bandIndices   = { 0,1,1,1,1,1 };
298 300
      float[][] corners   = { {0.04f,0.6f*F} };
299 301
      int[] cornerIndices = { 0,0,0,-1,-1,-1 };
......
328 330

  
329 331
  public float getStickerStroke()
330 332
    {
331
    return ObjectControl.isInIconMode() ? 0.08f : 0.04f;
333
    return isInIconMode() ? 0.08f : 0.04f;
332 334
    }
333 335

  
334 336
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff