Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5.5.3 #5

Merged
merged 7 commits into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ android {
defaultConfig {
minSdkVersion 19 /*Dont change this unless you know why*/
targetSdkVersion 29 /*Dont change this unless you know why*/
versionCode 69
versionName "5.5.2"
versionCode 70
versionName "5.5.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/com/kamron/pogoiv/GoIVSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class GoIVSettings {
public static final String DOWNLOADED_MOVESET_INFO = "downloaded_moveset_info_goiv";

// Increment this value when you want to make all users recalibrate GoIV
public static int LATEST_SCREEN_CALIBRATION_VERSION = 1;
public static int LATEST_SCREEN_CALIBRATION_VERSION = 2;


private static GoIVSettings instance;
Expand Down Expand Up @@ -106,6 +106,8 @@ public String getCalibrationValue(String valueName) {
}

public void saveScreenCalibrationResults(ScanFieldResults results) {
results.finalAdjustments();

SharedPreferences.Editor editor = prefs.edit();
editor.putString(ScanFieldNames.POKEMON_NAME_AREA,
results.pokemonNameArea.toString());
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/kamron/pogoiv/ScreenGrabber.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void exit() {
Bitmap grabScreen() {
Image image = null;
Bitmap bmp = null;
Integer retries = 60; // Retry for an entire second (given the rendering speed of 60fps)
int retries = 60; // Retry for an entire second (given the rendering speed of 60fps)

while (retries > 0) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,7 @@ public ScanData scanPokemon(@NonNull GoIVSettings settings,
}
ensureCorrectLevelArcSettings(settings, trainerLevel); //todo, make it so it doesnt initiate on every scan?
int totalOffset = 0;
boolean is_lucky = false;
double offsetBase; // offsets are calculated off height of powerup candy cost field. Double to retain precision
// Since we only care about height, its fine that we don't know the proper offset yet
ScanArea powerUpCandyArea = ScanArea.calibratedFromSettings(POKEMON_POWER_UP_CANDY_COST, settings);
Expand Down Expand Up @@ -1132,6 +1133,7 @@ public ScanData scanPokemon(@NonNull GoIVSettings settings,
if (hp.isPresent()) {
// Found successfully; assume this is a lucky pokemon and offset all further scans below that line
totalOffset += luckyOffset;
is_lucky = true;
}
}

Expand Down Expand Up @@ -1197,7 +1199,7 @@ public ScanData scanPokemon(@NonNull GoIVSettings settings,
.toString() + powerUpStardustCost.toString() + powerUpCandyCost.toString();

return new ScanData(estimatedLevelRange, name, type, candyNames, gender, hp, cp, candyAmount, evolutionCost,
powerUpStardustCost, powerUpCandyCost, null, null, (totalOffset != 0), uniqueIdentifier);
powerUpStardustCost, powerUpCandyCost, null, null, is_lucky, uniqueIdentifier);
}

/**
Expand Down
Loading