Project

General

Profile

« Previous | Next » 

Revision 39b4dcfd

Added by Leszek Koltunski over 2 years ago

Remove ObjectType from a few moree places.

View differences:

src/main/java/org/distorted/objectlib/helpers/ObjectLibInterface.java
19 19

  
20 20
package org.distorted.objectlib.helpers;
21 21

  
22
import org.distorted.objectlib.main.ObjectType;
23

  
24 22
///////////////////////////////////////////////////////////////////////////////////////////////////
25 23

  
26 24
public interface ObjectLibInterface
......
38 36

  
39 37
  // objectlib calls those to figure out app's state
40 38
  int getCurrentColor();
41
  int cubitIsLocked(ObjectType type, int cubit);
39
  int cubitIsLocked(int cubit);
42 40
  }
src/main/java/org/distorted/objectlib/main/ObjectControl.java
196 196
              int color = mInterface.getCurrentColor();
197 197
              float[] point = mMovement.getTouchedPoint3D();
198 198
              mLastCubit = object.getCubit(point);
199
              mLastCubitColor = mInterface.cubitIsLocked(object.getObjectType(),mLastCubit);
199
              mLastCubitColor = mInterface.cubitIsLocked(mLastCubit);
200 200
              mPreRender.setTextureMap( mLastCubit, mLastCubitColor>=0 ? 4 : mMovement.getTouchedFace(), color );
201 201
              }
202 202
            }
src/main/java/org/distorted/objectlib/main/TwistyObject.java
866 866
      }
867 867
    }
868 868

  
869
///////////////////////////////////////////////////////////////////////////////////////////////////
870

  
871
  private void recordQuatsState(String message)
872
    {
873
    StringBuilder quats = new StringBuilder();
874

  
875
    for(int j=0; j<NUM_CUBITS; j++)
876
      {
877
      quats.append(mQuatDebug[j]);
878
      quats.append(" ");
879
      }
880

  
881
    String name = intGetObjectType(mNumLayers).name();
882
    mInterface.reportProblem("obj: "+name+" quats: "+quats.toString());
883
    }
884

  
885 869
///////////////////////////////////////////////////////////////////////////////////////////////////
886 870

  
887 871
  void setLibInterface(ObjectLibInterface inter)
......
1084 1068
        CUBITS[i].solve();
1085 1069
        mMesh.setEffectAssociation(i, CUBITS[i].computeAssociation(),0);
1086 1070
        }
1087
      recordQuatsState("Failed to restorePreferences");
1088 1071
      }
1089 1072
    }
1090 1073

  

Also available in: Unified diff