Merge branch 'rando-next' into tokensanity-bgs-fix

This commit is contained in:
aMannus
2022-08-25 19:27:55 +02:00
24 changed files with 213 additions and 166 deletions
+14
View File
@@ -4705,6 +4705,20 @@ void Flags_SetInfTable(s32 flag) {
gSaveContext.infTable[flag >> 4] |= (1 << (flag & 0xF));
}
/**
* Tests if "randomizerInf" flag is set.
*/
s32 Flags_GetRandomizerInf(RandomizerInf flag) {
return gSaveContext.randomizerInf[flag >> 4] & (1 << (flag & 0xF));
}
/**
* Sets "randomizerInf" flag.
*/
void Flags_SetRandomizerInf(RandomizerInf flag) {
gSaveContext.randomizerInf[flag >> 4] |= (1 << (flag & 0xF));
}
u32 func_80035BFC(GlobalContext* globalCtx, s16 arg1) {
u16 retTextId = 0;
+4 -13
View File
@@ -3,6 +3,7 @@
#include <string.h>
#include <soh/Enhancements/randomizer/randomizerTypes.h>
#include <soh/Enhancements/randomizer/randomizer_inf.h>
#define NUM_DUNGEONS 8
#define NUM_TRIALS 6
@@ -702,19 +703,9 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
fileChooseCtx->n64ddFlag = 1;
gSaveContext.n64ddFlag = 1;
// Sets all the dungeons to incomplete when generating a rando save. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/82
for (u8 i = 0; i < NUM_DUNGEONS; i++) {
gSaveContext.dungeonsDone[i] = 0;
}
// Sets all Ganon's Trials to incomplete when generating a rando save. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131
for (u8 i = 0; i < NUM_TRIALS; i++) {
gSaveContext.trialsDone[i] = 0;
}
// Sets all cows to unmilked when generating a rando save.
for (u8 i = 0; i < NUM_COWS; i++) {
gSaveContext.cowsMilked[i] = 0;
// Sets all rando flags to false
for (s32 i = 0; i < ARRAY_COUNT(gSaveContext.randomizerInf); i++) {
gSaveContext.randomizerInf[i] = 0;
}
// Set Cutscene flags to skip them