mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-14 00:53:07 -07:00
[Feature] Entrance Rando v2 (#2071)
This commit is contained in:
parent
598cac725e
commit
d9f3844b2d
36 changed files with 1599 additions and 536 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue