Revision 0c768d69
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/external/RubikNetwork.java | ||
---|---|---|
505 | 505 |
String reclist = scores.getRecordList("&o=","&l=","&t="); |
506 | 506 |
String country = scores.getCountry(); |
507 | 507 |
long epoch = System.currentTimeMillis(); |
508 |
String salt = "cuboid";
|
|
508 |
String salt = "cubold";
|
|
509 | 509 |
|
510 | 510 |
String renderer = DistortedLibrary.getDriverRenderer(); |
511 | 511 |
String version = DistortedLibrary.getDriverVersion(); |
... | ... | |
517 | 517 |
String url1=SERVER+"submit.cgi"; |
518 | 518 |
String url2 = "n="+name+"&v="+veri+"&r="+numRuns+"&p="+numPlay+"&i="+deviceID+"&e="+mVersion; |
519 | 519 |
url2 += "&d="+renderer+"&s="+version+reclist+"&c="+country+"&f="+epoch; |
520 |
String hash = computeHash( url2, salt.getBytes() ); |
|
520 |
String hash = computeHash( url2+"d", salt.getBytes() );
|
|
521 | 521 |
|
522 | 522 |
return url1 + "?" + url2 + "&h=" + hash; |
523 | 523 |
} |
src/main/java/org/distorted/screens/RubikScreenPlay.java | ||
---|---|---|
333 | 333 |
@Override |
334 | 334 |
public void onClick(View v) |
335 | 335 |
{ |
336 |
mShouldReactToEndOfScrambling = false; |
|
337 | 336 |
int duration = BaseEffect.Type.FAST_SCRAMBLE.getDuration(); |
338 |
act.getControl().fastScrambleObject(duration,RubikObject.FAST_SCRAMBLES); |
|
337 |
boolean success = act.getControl().fastScrambleObject(duration,RubikObject.FAST_SCRAMBLES); |
|
338 |
if( success ) mShouldReactToEndOfScrambling = false; |
|
339 | 339 |
} |
340 | 340 |
}); |
341 | 341 |
} |
... | ... | |
506 | 506 |
int currObject = RubikObjectList.getCurrObject(); |
507 | 507 |
RubikObject object = RubikObjectList.getObject(currObject); |
508 | 508 |
final int scrambles = ii<LEVELS_SHOWN ? ii+1 : (object==null ? 0 : object.getNumScramble()); |
509 |
mLevelValue = ii+1; |
|
510 |
mShouldReactToEndOfScrambling = true; |
|
511 |
control.scrambleObject(scrambles); |
|
509 |
|
|
510 |
boolean success = control.scrambleObject(scrambles); |
|
511 |
if( success ) |
|
512 |
{ |
|
513 |
mLevelValue = ii+1; |
|
514 |
mShouldReactToEndOfScrambling = true; |
|
515 |
} |
|
512 | 516 |
} |
513 | 517 |
} |
514 | 518 |
}); |
Also available in: Unified diff
calls to FastScramble and SlowScramble might fail (preRender is blocked). Return false then and if so, do not do anything in the app.