Fix Starting Triforce Piece Count (#3797)

* Move zeroing of triforcePiecesCollected to the beginning of `Randomizer_InitSaveFile()` to fix starting TFP count issues.
This commit is contained in:
Malkierian 2024-01-05 18:53:18 -07:00 committed by GitHub
parent 37b2fc0745
commit 02938cfba2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,6 +207,9 @@ extern "C" void Randomizer_InitSaveFile() {
gSaveContext.randomizerInf[i] = 0; gSaveContext.randomizerInf[i] = 0;
} }
// Reset triforce pieces collected
gSaveContext.triforcePiecesCollected = 0;
gSaveContext.cutsceneIndex = 0; // no intro cutscene gSaveContext.cutsceneIndex = 0; // no intro cutscene
// Starts pending ice traps out at 0 before potentially incrementing them down the line. // Starts pending ice traps out at 0 before potentially incrementing them down the line.
gSaveContext.pendingIceTrapCount = 0; gSaveContext.pendingIceTrapCount = 0;
@ -442,8 +445,5 @@ extern "C" void Randomizer_InitSaveFile() {
gSaveContext.itemGetInf[3] |= 0x8000; // Obtained Mask of Truth gSaveContext.itemGetInf[3] |= 0x8000; // Obtained Mask of Truth
} }
// Reset triforce pieces collected
gSaveContext.triforcePiecesCollected = 0;
SetStartingItems(); SetStartingItems();
} }