Project

General

Profile

« Previous | Next » 

Revision c4175d85

Added by Leszek Koltunski about 3 years ago

Simplify TwistyObject's API.

View differences:

src/main/java/org/distorted/main/RubikActivity.java
468 468

  
469 469
        if( oldObject!=null )
470 470
          {
471
          ObjectType oldList = oldObject.getObjectList();
471
          ObjectType oldList = oldObject.getObjectType();
472 472
          float fps = view.getRenderer().getFPS();
473 473
          fps = (int)(fps+0.5f);
474 474
          StringBuilder name = new StringBuilder();
src/main/java/org/distorted/main/RubikPreRender.java
246 246
    {
247 247
    mChangeObject = false;
248 248

  
249
    if ( mNewObject==null || mNewObject.getObjectList()!=mNextObject )
249
    if ( mNewObject==null || mNewObject.getObjectType()!=mNextObject )
250 250
      {
251 251
      blockEverything(BlockController.RUBIK_PLACE_1);
252 252
      createObjectNow(mNextObject, null);
......
260 260
    {
261 261
    mSetupObject = false;
262 262

  
263
    if ( mNewObject==null || mNewObject.getObjectList()!=mNextObject)
263
    if ( mNewObject==null || mNewObject.getObjectType()!=mNextObject)
264 264
      {
265 265
      blockEverything(BlockController.RUBIK_PLACE_2);
266 266
      createObjectNow(mNextObject, mNextMoves);
......
322 322
  private void resetAllTextureMapsNow()
323 323
    {
324 324
    mResetAllTextureMaps = false;
325

  
326 325
    if( mNewObject!=null ) mNewObject.resetAllTextureMaps();
327 326
    }
328 327

  
src/main/java/org/distorted/main/RubikSurfaceView.java
257 257
              int color = solver.getCurrentColor();
258 258
              mLastCubit = object.getCubit(point);
259 259
              mPreRender.setTextureMap( mLastCubit, mLastCubitFace, color );
260
              mLastCubitColor = SolverMain.cubitIsLocked(object.getObjectList(), mLastCubit);
260
              mLastCubitColor = SolverMain.cubitIsLocked(object.getObjectType(), mLastCubit);
261 261
              }
262 262
            }
263 263
          }
src/main/java/org/distorted/solvers/SolverMain.java
248 248
    {
249 249
    RubikScreenSolver solver = (RubikScreenSolver) ScreenList.SVER.getScreenClass();
250 250

  
251
    if( mObject.getObjectList()== ObjectType.CUBE_3 )
251
    if( mObject.getObjectType()== ObjectType.CUBE_3 )
252 252
      {
253 253
      solveCube3(solver);
254 254
      }
src/main/java/org/distorted/tutorials/TutorialPreRender.java
39 39
  private final TutorialSurfaceView mView;
40 40
  private boolean mFinishRotation, mRemoveRotation, mAddRotation,
41 41
                  mSetQuat, mChangeObject, mSetupObject, mSolveObject, mScrambleObject,
42
                  mInitializeObject, mResetAllTextureMaps, mRemovePatternRotation, mSolve;
42
                  mInitializeObject, mRemovePatternRotation, mSolve;
43 43
  private boolean mUIBlocked, mTouchBlocked;
44 44
  private boolean mIsSolved;
45 45
  private ObjectType mNextObject;
......
187 187
    {
188 188
    mChangeObject = false;
189 189

  
190
    if ( mNewObject==null || mNewObject.getObjectList()!=mNextObject)
190
    if ( mNewObject==null || mNewObject.getObjectType()!=mNextObject)
191 191
      {
192 192
      blockEverything(BlockController.TUTORIAL_PLACE_1);
193 193
      createObjectNow(mNextObject);
......
201 201
    {
202 202
    mSetupObject = false;
203 203

  
204
    if ( mNewObject==null || mNewObject.getObjectList()!=mNextObject)
204
    if ( mNewObject==null || mNewObject.getObjectType()!=mNextObject)
205 205
      {
206 206
      blockEverything(BlockController.TUTORIAL_PLACE_2);
207 207
      createObjectNow(mNextObject);
......
248 248
    mNewObject.initializeObject(null);
249 249
    }
250 250

  
251
///////////////////////////////////////////////////////////////////////////////////////////////////
252

  
253
  private void resetAllTextureMapsNow()
254
    {
255
    mResetAllTextureMaps = false;
256

  
257
    if( mNewObject!=null ) mNewObject.resetAllTextureMaps();
258
    }
259

  
260 251
///////////////////////////////////////////////////////////////////////////////////////////////////
261 252

  
262 253
  private void setQuatNow()
......
312 303
    if( mScrambleObject        ) scrambleObjectNow();
313 304
    if( mAddRotation           ) addRotationNow();
314 305
    if( mInitializeObject      ) initializeObjectNow();
315
    if( mResetAllTextureMaps   ) resetAllTextureMapsNow();
316 306
    if( mRemovePatternRotation ) removePatternRotationNow();
317 307
    }
318 308

  

Also available in: Unified diff