Revision 7d574482
Added by Leszek Koltunski 9 months ago
| src/main/java/org/distorted/config/ConfigObjectLibInterface.java | ||
|---|---|---|
| 38 | 38 |
public void onBeginRotation() { }
|
| 39 | 39 |
public void onSolved() { }
|
| 40 | 40 |
public void onObjectCreated(long time) { }
|
| 41 |
public void onRemoveRotation(int axis, int rowBitmap, int angle) { }
|
|
| 41 |
public void onRemoveRotation(int axis, int rowBitmap, int degrees) { }
|
|
| 42 | 42 |
public void failedToDrag() { }
|
| 43 | 43 |
public void reportJSONError(String error, int ordinal) { }
|
| 44 | 44 |
|
| src/main/java/org/distorted/helpers/MovesController.java | ||
|---|---|---|
| 96 | 96 |
|
| 97 | 97 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 98 | 98 |
|
| 99 |
public void addMove(Activity act, int axis, int rowBitmap, int angle)
|
|
| 99 |
public void addMove(Activity act, int axis, int rowBitmap, int degrees)
|
|
| 100 | 100 |
{
|
| 101 | 101 |
if( mMoves.isEmpty() ) changeBackMove(act,true); |
| 102 |
mMoves.add(new ObjectMove(axis,rowBitmap,angle));
|
|
| 102 |
mMoves.add(new ObjectMove(axis,rowBitmap,degrees));
|
|
| 103 | 103 |
} |
| 104 | 104 |
|
| 105 | 105 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| ... | ... | |
| 159 | 159 |
moves.append(' ');
|
| 160 | 160 |
moves.append(move.getRowBitmap()); |
| 161 | 161 |
moves.append(' ');
|
| 162 |
moves.append(move.getAngle());
|
|
| 162 |
moves.append(move.getDegrees());
|
|
| 163 | 163 |
} |
| 164 | 164 |
|
| 165 | 165 |
editor.putString( key, moves.toString() ); |
| ... | ... | |
| 181 | 181 |
{
|
| 182 | 182 |
String axis = tokens[3*m ]; |
| 183 | 183 |
String rowB = tokens[3*m+1]; |
| 184 |
String angle = tokens[3*m+2];
|
|
| 184 |
String degre = tokens[3*m+2];
|
|
| 185 | 185 |
|
| 186 | 186 |
try |
| 187 | 187 |
{
|
| 188 | 188 |
int axisI = Integer.parseInt(axis); |
| 189 | 189 |
int rowBI = Integer.parseInt(rowB); |
| 190 |
int angleI= Integer.parseInt(angle);
|
|
| 190 |
int degreI= Integer.parseInt(degre);
|
|
| 191 | 191 |
|
| 192 |
addMove(act,axisI,rowBI,angleI);
|
|
| 192 |
addMove(act,axisI,rowBI,degreI);
|
|
| 193 | 193 |
} |
| 194 | 194 |
catch(NumberFormatException ex) |
| 195 | 195 |
{
|
| src/main/java/org/distorted/info/InfoObjectLibInterface.java | ||
|---|---|---|
| 27 | 27 |
public void onObjectCreated(long time) { }
|
| 28 | 28 |
public void onStickerTouched(int cubit, int face) { }
|
| 29 | 29 |
public void onStickerUntouched() { }
|
| 30 |
public void onRemoveRotation(int axis, int rowBitmap, int angle) { }
|
|
| 30 |
public void onRemoveRotation(int axis, int rowBitmap, int degrees) { }
|
|
| 31 | 31 |
public void failedToDrag() { }
|
| 32 | 32 |
public void reportJSONError(String error, int ordinal) { }
|
| 33 | 33 |
|
| src/main/java/org/distorted/patterns/PatternObjectLibInterface.java | ||
|---|---|---|
| 24 | 24 |
{
|
| 25 | 25 |
PatternObjectLibInterface(PatternActivity act) { }
|
| 26 | 26 |
public void onScrambleEffectFinished() { }
|
| 27 |
public void onRemoveRotation(int axis, int rowBitmap, int angle) { }
|
|
| 27 |
public void onRemoveRotation(int axis, int rowBitmap, int degrees) { }
|
|
| 28 | 28 |
public void onBeginRotation() { }
|
| 29 | 29 |
public void failedToDrag() { }
|
| 30 | 30 |
public void onSolved() { }
|
| src/main/java/org/distorted/play/PlayLibInterface.java | ||
|---|---|---|
| 219 | 219 |
|
| 220 | 220 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 221 | 221 |
|
| 222 |
public void onRemoveRotation(int axis, int rowBitmap, int angle)
|
|
| 222 |
public void onRemoveRotation(int axis, int rowBitmap, int degrees)
|
|
| 223 | 223 |
{
|
| 224 | 224 |
mNumRotations++; |
| 225 | 225 |
PlayActivity act = mAct.get(); |
| ... | ... | |
| 229 | 229 |
ScreenList screen = ScreenList.getCurrentScreen(); |
| 230 | 230 |
|
| 231 | 231 |
if( screen==ScreenList.FREE || |
| 232 |
screen==ScreenList.SOLV ) ((ScreenBase)screen.getScreenClass()).addMove(act,axis,rowBitmap,angle);
|
|
| 232 |
screen==ScreenList.SOLV ) ((ScreenBase)screen.getScreenClass()).addMove(act,axis,rowBitmap,degrees);
|
|
| 233 | 233 |
} |
| 234 | 234 |
|
| 235 | 235 |
if( mNumRotations==40 && !mReviewAsked ) |
| src/main/java/org/distorted/play/ScreenBase.java | ||
|---|---|---|
| 75 | 75 |
|
| 76 | 76 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 77 | 77 |
|
| 78 |
public void addMove(PlayActivity act, int axis, int rowBitmap, int angle)
|
|
| 78 |
public void addMove(PlayActivity act, int axis, int rowBitmap, int degrees)
|
|
| 79 | 79 |
{
|
| 80 |
mMovesController.addMove(act,axis,rowBitmap,angle);
|
|
| 80 |
mMovesController.addMove(act,axis,rowBitmap,degrees);
|
|
| 81 | 81 |
} |
| 82 | 82 |
|
| 83 | 83 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| src/main/java/org/distorted/solvers/SolverObjectLibInterface.java | ||
|---|---|---|
| 40 | 40 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 41 | 41 |
|
| 42 | 42 |
public void onScrambleEffectFinished() { }
|
| 43 |
public void onRemoveRotation(int axis, int rowBitmap, int angle) { }
|
|
| 43 |
public void onRemoveRotation(int axis, int rowBitmap, int degrees) { }
|
|
| 44 | 44 |
public void onBeginRotation() { }
|
| 45 | 45 |
public void failedToDrag() { }
|
| 46 | 46 |
public void onSolved() { }
|
| src/main/java/org/distorted/tutorials/TutorialObjectLibInterface.java | ||
|---|---|---|
| 141 | 141 |
|
| 142 | 142 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 143 | 143 |
|
| 144 |
public void onRemoveRotation(int axis, int rowBitmap, int angle)
|
|
| 144 |
public void onRemoveRotation(int axis, int rowBitmap, int degrees)
|
|
| 145 | 145 |
{
|
| 146 | 146 |
TutorialActivity act = mAct.get(); |
| 147 | 147 |
TutorialScreen state = act.getState(); |
| 148 |
if( state!=null ) state.addMove(act, axis, rowBitmap, angle);
|
|
| 148 |
if( state!=null ) state.addMove(act, axis, rowBitmap, degrees);
|
|
| 149 | 149 |
} |
| 150 | 150 |
|
| 151 | 151 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| src/main/java/org/distorted/tutorials/TutorialScreen.java | ||
|---|---|---|
| 183 | 183 |
|
| 184 | 184 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 185 | 185 |
|
| 186 |
void addMove(Activity act, int axis, int rowBitmap, int angle)
|
|
| 186 |
void addMove(Activity act, int axis, int rowBitmap, int degrees)
|
|
| 187 | 187 |
{
|
| 188 |
mMovesController.addMove(act, axis,rowBitmap,angle);
|
|
| 188 |
mMovesController.addMove(act, axis,rowBitmap,degrees);
|
|
| 189 | 189 |
} |
| 190 | 190 |
|
| 191 | 191 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
change format of ObjectMove from (axis,rowBitmap,bareAngle) to (axis,rowBitmap,angleInDegrees)