1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 04:24:43 +00:00

Move Scene_SetTransitionForNextEntrance to z_scene.c (#1609)

This commit is contained in:
cadmic 2024-01-16 06:50:28 -08:00 committed by GitHub
parent 616d6d4e46
commit a5fbfdba01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 20 deletions

View File

@ -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

View File

@ -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);