summaryrefslogtreecommitdiff
path: root/src/code/z_scene.c
diff options
context:
space:
mode:
authorcadmic <cadmic24@gmail.com>2024-01-16 06:50:28 -0800
committerGitHub <noreply@github.com>2024-01-16 09:50:28 -0500
commita5fbfdba01fea1822fc63384c8a4bd5a96d137b6 (patch)
treedd551d449a04a8d505a3e25aa0da1bb84442ba62 /src/code/z_scene.c
parent616d6d4e46e7aa0c103e6b14ee8960e9a4f6dbda (diff)
Move Scene_SetTransitionForNextEntrance to z_scene.c (#1609)
Diffstat (limited to 'src/code/z_scene.c')
-rw-r--r--src/code/z_scene.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/code/z_scene.c b/src/code/z_scene.c
index ad1eb49bc..492df92a6 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