From a5fbfdba01fea1822fc63384c8a4bd5a96d137b6 Mon Sep 17 00:00:00 2001 From: cadmic Date: Tue, 16 Jan 2024 06:50:28 -0800 Subject: [PATCH] Move Scene_SetTransitionForNextEntrance to z_scene.c (#1609) --- src/code/z_scene.c | 20 ++++++++++++++++++++ src/code/z_scene_table.c | 20 -------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/code/z_scene.c b/src/code/z_scene.c index ad1eb49bc0..492df92a69 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -483,6 +483,26 @@ void Scene_CommandMiscSettings(PlayState* play, SceneCmd* cmd) { } } +void Scene_SetTransitionForNextEntrance(PlayState* play) { + s16 entranceIndex; + + if (!IS_DAY) { + if (!LINK_IS_ADULT) { + entranceIndex = play->nextEntranceIndex + 1; + } else { + entranceIndex = play->nextEntranceIndex + 3; + } + } else { + if (!LINK_IS_ADULT) { + entranceIndex = play->nextEntranceIndex; + } else { + entranceIndex = play->nextEntranceIndex + 2; + } + } + + play->transitionType = ENTRANCE_INFO_START_TRANS_TYPE(gEntranceTable[entranceIndex].field); +} + void (*gSceneCmdHandlers[SCENE_CMD_ID_MAX])(PlayState*, SceneCmd*) = { Scene_CommandPlayerEntryList, // SCENE_CMD_ID_SPAWN_LIST Scene_CommandActorEntryList, // SCENE_CMD_ID_ACTOR_LIST diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index 334880e06e..5171562721 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -77,26 +77,6 @@ Gfx sDefaultDisplayList[] = { gsSPEndDisplayList(), }; -void Scene_SetTransitionForNextEntrance(PlayState* play) { - s16 entranceIndex; - - if (!IS_DAY) { - if (!LINK_IS_ADULT) { - entranceIndex = play->nextEntranceIndex + 1; - } else { - entranceIndex = play->nextEntranceIndex + 3; - } - } else { - if (!LINK_IS_ADULT) { - entranceIndex = play->nextEntranceIndex; - } else { - entranceIndex = play->nextEntranceIndex + 2; - } - } - - play->transitionType = ENTRANCE_INFO_START_TRANS_TYPE(gEntranceTable[entranceIndex].field); -} - void Scene_DrawConfigDefault(PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 4725);