Project

General

Profile

« Previous | Next » 

Revision de4a7e02

Added by Leszek Koltunski over 2 years ago

Remove ObjectType and info it held (icons, mesh file, num of scrambles, shortname) from the JSON file.

View differences:

src/main/java/org/distorted/objectlib/json/JsonReader.java
64 64
  private ObjectSticker[] mObjectSticker;
65 65
  private Static3D[] mAxis;
66 66
  private int[] mBasicAngle;
67
  private String mLongName, mShortName, mInventor;
68
  private String mSmallIcon, mMediumIcon, mBigIcon, mHugeIcon, mMeshFile;
67
  private String mLongName, mInventor;
69 68
  private int mYearOfInvention, mComplexity;
70 69
  private int[] mNumLayers;
71 70
  private float mSize;
72
  private int mNumScrambles, mScrambleType;
71
  private int mScrambleType;
73 72
  private int[] mColor;
74 73

  
75 74
///////////////////////////////////////////////////////////////////////////////////////////////////
......
92 91
  private void parseMetadata(JSONObject object) throws JSONException
93 92
    {
94 93
    mLongName        = object.getString("longname");
95
    mShortName       = object.getString("shortname");
96 94
    mInventor        = object.getString("inventor");
97 95
    mYearOfInvention = object.getInt("year");
98 96
    mComplexity      = object.getInt("complexity");
99
    mSmallIcon       = object.getString("icon_small");
100
    mMediumIcon      = object.getString("icon_medium");
101
    mBigIcon         = object.getString("icon_big");
102
    mHugeIcon        = object.getString("icon_huge");
103
    mMeshFile        = object.getString("mesh");
104
    mNumScrambles    = object.getInt("num_scrambles");
105 97
    mSize            = (float)object.getDouble("size");
106 98
    mSolvedFuncIndex = object.getInt("solved_func");
107 99
    }
......
691 683
    return null;
692 684
    }
693 685

  
694
///////////////////////////////////////////////////////////////////////////////////////////////////
695

  
696
  public String getShortName()
697
    {
698
    return mShortName;
699
    }
700

  
701 686
///////////////////////////////////////////////////////////////////////////////////////////////////
702 687

  
703 688
  public String getObjectName()
......
754 739
    return mSize;
755 740
    }
756 741

  
757
///////////////////////////////////////////////////////////////////////////////////////////////////
758

  
759
  public int getNumScrambles()
760
    {
761
    return mNumScrambles;
762
    }
763

  
764 742
///////////////////////////////////////////////////////////////////////////////////////////////////
765 743

  
766 744
  public int getScrambleType()

Also available in: Unified diff