mirror of https://github.com/sm64pc/sm64pc.git
Fix missed collected stars after gameover
This commit is contained in:
parent
aff081080b
commit
ad92b93b39
|
@ -153,7 +153,7 @@ static s32 write_text_save(s32 fileIndex) {
|
|||
if (i == 0) {
|
||||
stars = save_file_get_star_flags(fileIndex, -1);
|
||||
} else {
|
||||
stars = save_file_get_star_flags(fileIndex, i+15);
|
||||
stars = save_file_get_star_flags(fileIndex, i+14);
|
||||
}
|
||||
starFlags = int_to_bin(stars);
|
||||
|
||||
|
@ -191,6 +191,10 @@ static s32 write_text_save(s32 fileIndex) {
|
|||
}
|
||||
fprintf(file, "area = %d\n", savedata->capArea);
|
||||
|
||||
/* Update a backup */
|
||||
bcopy(&gSaveBuffer.files[fileIndex][0], &gSaveBuffer.files[fileIndex][1],
|
||||
sizeof(gSaveBuffer.files[fileIndex][1]));
|
||||
|
||||
fclose(file);
|
||||
return 1;
|
||||
}
|
||||
|
@ -240,7 +244,6 @@ static s32 read_text_save(s32 fileIndex) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* Parse main flags */
|
||||
for (i = 1; i < NUM_FLAGS; i++) {
|
||||
value = ini_get(savedata, "flags", sav_flags[i]);
|
||||
|
|
Loading…
Reference in New Issue