mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
Entrance Rando (#1760)
This commit is contained in:
parent
8be2c4ddd7
commit
15a9975200
36 changed files with 1341 additions and 142 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <ImGuiImpl.h>
|
||||
#include "soh/frame_interpolation.h"
|
||||
#include "soh/Enhancements/debugconsole.h"
|
||||
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
|
||||
#include <overlays/actors/ovl_En_Niw/z_en_niw.h>
|
||||
|
||||
#include <time.h>
|
||||
|
@ -158,6 +159,11 @@ void Play_Destroy(GameState* thisx) {
|
|||
PlayState* play = (PlayState*)thisx;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
// In ER, remove link from epona when entering somewhere that doesn't support epona
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) {
|
||||
Entrance_HandleEponaState();
|
||||
}
|
||||
|
||||
play->state.gfxCtx->callback = NULL;
|
||||
play->state.gfxCtx->callbackParam = 0;
|
||||
SREG(91) = 0;
|
||||
|
@ -512,6 +518,7 @@ void Play_Init(GameState* thisx) {
|
|||
play,
|
||||
gEntranceTable[((void)0, gSaveContext.entranceIndex) + ((void)0, gSaveContext.sceneSetupIndex)].scene,
|
||||
gEntranceTable[((void)0, gSaveContext.sceneSetupIndex) + ((void)0, gSaveContext.entranceIndex)].spawn);
|
||||
|
||||
osSyncPrintf("\nSCENE_NO=%d COUNTER=%d\n", ((void)0, gSaveContext.entranceIndex), gSaveContext.sceneSetupIndex);
|
||||
|
||||
Cutscene_HandleEntranceTriggers(play);
|
||||
|
@ -1754,6 +1761,10 @@ void* Play_LoadFile(PlayState* play, RomFile* file) {
|
|||
}
|
||||
|
||||
void Play_InitEnvironment(PlayState* play, s16 skyboxId) {
|
||||
// For entrance rando, ensure the correct weather state and sky mode is applied
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
|
||||
Entrance_OverrideWeatherState();
|
||||
}
|
||||
Skybox_Init(&play->state, &play->skyboxCtx, skyboxId);
|
||||
Environment_Init(play, &play->envCtx, 0);
|
||||
}
|
||||
|
@ -1781,6 +1792,10 @@ void Play_InitScene(PlayState* play, s32 spawn)
|
|||
void Play_SpawnScene(PlayState* play, s32 sceneNum, s32 spawn) {
|
||||
|
||||
OTRPlay_SpawnScene(play, sceneNum, spawn);
|
||||
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
|
||||
Entrance_OverrideSpawnScene(sceneNum, spawn);
|
||||
}
|
||||
}
|
||||
|
||||
void func_800C016C(PlayState* play, Vec3f* src, Vec3f* dest) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue