[Feature] Entrance Rando v2 (#2071)

This commit is contained in:
Adam Bird 2022-12-06 18:37:50 -05:00 committed by GitHub
parent 598cac725e
commit d9f3844b2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 1599 additions and 536 deletions

View file

@ -200,14 +200,6 @@ void Sram_OpenSave() {
// Setup the modified entrance table and entrance shuffle table for rando
if (gSaveContext.n64ddFlag) {
Entrance_Init();
if (!CVar_GetS32("gRememberSaveLocation", 0) || gSaveContext.savedSceneNum == SCENE_YOUSEI_IZUMI_TATE ||
gSaveContext.savedSceneNum == SCENE_KAKUSIANA) {
Entrance_SetSavewarpEntrance();
}
} else {
// When going from a rando save to a vanilla save within the same game instance
// we need to reset the entrance table back to its vanilla state
Entrance_ResetEntranceTable();
}
osSyncPrintf("scene_no = %d\n", gSaveContext.entranceIndex);
@ -390,11 +382,18 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
break;
case RO_AGE_CHILD: //Child
gSaveContext.linkAge = 1;
gSaveContext.savedSceneNum = -1;
break;
default:
break;
}
if (Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_SPAWNS)) {
// Override the spawn entrance so entrance rando can take control,
// and to prevent remember save location from breaking inital spawn
gSaveContext.entranceIndex = -1;
}
int doorOfTime = Randomizer_GetSettingValue(RSK_DOOR_OF_TIME);
switch (doorOfTime) {
case RO_DOOROFTIME_OPEN:
@ -580,4 +579,8 @@ void Sram_InitSram(GameState* gameState) {
Save_Init();
func_800F6700(gSaveContext.audioSetting);
// When going from a rando save to a vanilla save within the same game instance
// we need to reset the entrance table back to its vanilla state
Entrance_ResetEntranceTable();
}