Update to 12.0-beta1

This commit is contained in:
dP
2021-08-15 14:57:29 +03:00
parent ac7d3eba75
commit 9df4f2c4fc
666 changed files with 61302 additions and 20466 deletions

View File

@@ -138,7 +138,7 @@ void SaveToHighScore()
fwrite(hs->company, length, 1, fp) > 1 || // Yes... could be 0 bytes too
fwrite(&hs->score, sizeof(hs->score), 1, fp) != 1 ||
fwrite(" ", 2, 1, fp) != 1) { // XXX - placeholder for hs->title, not saved anymore; compatibility
DEBUG(misc, 1, "Could not save highscore.");
Debug(misc, 1, "Could not save highscore.");
i = SP_SAVED_HIGHSCORE_END;
break;
}
@@ -166,11 +166,11 @@ void LoadFromHighScore()
fread(hs->company, std::min<int>(lengthof(hs->company), length), 1, fp) > 1 || // Yes... could be 0 bytes too
fread(&hs->score, sizeof(hs->score), 1, fp) != 1 ||
fseek(fp, 2, SEEK_CUR) == -1) { // XXX - placeholder for hs->title, not saved anymore; compatibility
DEBUG(misc, 1, "Highscore corrupted");
Debug(misc, 1, "Highscore corrupted");
i = SP_SAVED_HIGHSCORE_END;
break;
}
str_validate(hs->company, lastof(hs->company), SVS_NONE);
StrMakeValidInPlace(hs->company, lastof(hs->company), SVS_NONE);
hs->title = EndGameGetPerformanceTitleFromValue(hs->score);
}
}