From 261db2c3e1b7075dc4bdfcc207512a3604dc3885 Mon Sep 17 00:00:00 2001 From: Adam Bird Date: Fri, 20 Jan 2023 01:00:12 -0500 Subject: Rando: Boss Entrance Shuffle (#2194) * sync 3ds upstream logic changes for boss rooms * add boss shuffle settings and handling to 3ds code * add boss shuffle handling to game code * repair authentically bugged entrances for boss shuffle * add boss entrances to the entrance tracker * unset hint area for boss rooms to fix altar hint * update boss reward hints to not mention dungeons * one more boss heart container hint fix * reorder entrance rando funcs * support closed forest with boss shuffle and simple boss room entrance pairs in shuffle table * fix death warp in boss rooms without saving; fix KD boss room in tracker * remove boss shuffle check from dungeon open checks and some cleanups * add boss shuffle to preset clear * remove dungeon entry exit connection from boss rooms * another no hint fix for boss shuffle * undo change for exact location hints * clarify comments --- soh/src/code/z_room.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'soh/src/code') diff --git a/soh/src/code/z_room.c b/soh/src/code/z_room.c index c135123f8..23fb6a4d7 100644 --- a/soh/src/code/z_room.c +++ b/soh/src/code/z_room.c @@ -1,5 +1,6 @@ #include "global.h" #include "vt.h" +#include "soh/Enhancements/randomizer/randomizer_entrance.h" void func_80095AB4(PlayState* play, Room* room, u32 flags); void func_80095D04(PlayState* play, Room* room, u32 flags); @@ -575,6 +576,12 @@ u32 func_80096FE8(PlayState* play, RoomContext* roomCtx) { s32 func_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomNum) { size_t size; + // In ER, override roomNum to load based on scene and spawn + if (gSaveContext.n64ddFlag && gSaveContext.respawnFlag <= 0 && + Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) { + roomNum = Entrance_OverrideSpawnSceneRoom(play->sceneNum, play->curSpawn, roomNum); + } + return OTRfunc_8009728C(play, roomCtx, roomNum); if (roomCtx->status == 0) { -- cgit v1.2.3