Project

General

Profile

« Previous | Next » 

Revision 1eafa9c6

Added by Leszek Koltunski about 2 months ago

Fix the detection of the solved state.

View differences:

src/main/java/org/distorted/objectlib/main/TwistyObject.java
216 216
    mObjectQuats = getQuats();
217 217
    mNumQuats = mObjectQuats.length;
218 218
    mOrigPos = getCubitPositions(mNumLayers);
219
    mNumPuzzleFaces = getNumFaces();
219
    mNumPuzzleFaces = getNumPuzzleFaces();
220 220
    mRowOffsets = new float[mNumPuzzleFaces][3];
221 221
    mTmp = new float[4];
222 222
    mNumAxis = mAxis.length;
......
283 283
    int index = getSolvedFunctionIndex();
284 284
    mSolved = new TwistyObjectSolved(this,mOrigPos,index);
285 285
    mSolved.setupSolvedQuats(getSolvedQuats());
286
    mSolved.setPuzzleFaceColor(mColorTable);
286 287

  
287 288
    mEffects.apply(quatEffect);
288 289
    mEffects.apply(scaleEffect);
......
1278 1279
    }
1279 1280

  
1280 1281
///////////////////////////////////////////////////////////////////////////////////////////////////
1282
// this doesn't have to return the real, displayed color - but the default one (from Shape classes).
1283
// The real displayed color can be different because of the sticker color overrides in 'Config'.
1281 1284

  
1282 1285
  int getCubitFaceColor(int cubit, int face)
1283 1286
    {
......
1478 1481
      {
1479 1482
      createTexture(mTextureBorderMultiplier,mTextureCornerMultiplier);
1480 1483
      setTexture();
1484
      mSolved.setPuzzleFaceColor(mColorTable);
1481 1485
      }
1482 1486
    }
1483 1487

  
......
2177 2181
  // not only for JSON
2178 2182
  public abstract Static3D[] getRotationAxis();
2179 2183
  public abstract int[][] getBasicAngles();
2180
  public abstract int getNumFaces();
2184
  public abstract int getNumPuzzleFaces();
2181 2185
  public abstract int getFOV();
2182 2186
  public abstract String[][] getTutorials();
2183 2187
  }

Also available in: Unified diff