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

  
30 30
import org.distorted.objectlib.helpers.ObjectFaceShape;
31 31
import org.distorted.objectlib.touchcontrol.TouchControlOctahedron;
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;
......
55 54

  
56 55
///////////////////////////////////////////////////////////////////////////////////////////////////
57 56

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

  
63 62
///////////////////////////////////////////////////////////////////////////////////////////////////
......
389 388
    int numL = getNumLayers()[0];
390 389
    int N = numL>3 ? 5:6;
391 390
    int E = numL>2 ? (numL>3 ? 0:1) : 2;
391
    float height = isInIconMode() ? 0.001f : 0.05f;
392 392

  
393 393
    if( variant==0 )
394 394
      {
395
      float[][] bands     = { {0.05f,20,0.5f,0.8f,N,E,E} };
395
      float[][] bands     = { {height,20,0.5f,0.8f,N,E,E} };
396 396
      int[] bandIndices   = { 0,0,0,0,0,0,0,0 };
397 397
      float[][] corners   = { {0.04f,0.20f} };
398 398
      int[] cornerIndices = { 0,0,0,0,0,0 };
......
402 402
      }
403 403
    else
404 404
      {
405
      float[][] bands     = { {0.05f,35,0.5f,0.8f,N,E,E} };
405
      float[][] bands     = { {height,35,0.5f,0.8f,N,E,E} };
406 406
      int[] bandIndices   = { 0,0,0,0 };
407 407
      float[][] corners   = { {0.08f,0.15f} };
408 408
      int[] cornerIndices = { 0,0,0,0 };
......
439 439
    {
440 440
    float stroke = 0.08f;
441 441

  
442
    if( ObjectControl.isInIconMode() )
442
    if( isInIconMode() )
443 443
      {
444 444
      int[] numLayers = getNumLayers();
445 445

  

Also available in: Unified diff