Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document "Normal" Skybox #1955

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions include/z64environment.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,27 @@ typedef enum {
/* 5 */ WEATHER_MODE_HEAVY_RAIN // scene must define settings for light config 4
} WeatherMode;

typedef enum {
// Clear Sky
SKYBOX_INDEX_CLEAR_SUNRISE,
SKYBOX_INDEX_CLEAR_DAY,
SKYBOX_INDEX_CLEAR_SUNSET,
SKYBOX_INDEX_CLEAR_NIGHT,
// Cloudy Sky
SKYBOX_INDEX_CLOUDY_SUNRISE,
SKYBOX_INDEX_CLOUDY_DAY,
SKYBOX_INDEX_CLOUDY_SUNSET,
SKYBOX_INDEX_CLOUDY_NIGHT,
Comment on lines +73 to +83
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we have a better descriptor than just "index" for this concept in general. Ill take a closer look at this and try to think about it more, but it makes reading all of the code pretty clunky to me.
Dont think "type" works cause this isnt necessarily the skybox type. But looking for something along those lines

// Holy (not implemented correctly)
SKYBOX_INDEX_HOLY0,
SKYBOX_INDEX_HOLY_RESERVED_9,
SKYBOX_INDEX_HOLY_RESERVED_10,
SKYBOX_INDEX_HOLY_RESERVED_11,
// Error checking
SKYBOX_INDEX_INIT_MAGIC = 99, // Magic number used to detect a fault during initialization, value unused.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: IMO SKYBOX_INDEX_INIT_MAGIC -> SKYBOX_INDEX_INIT ("magic" makes me think of in-game magic, and really aren't all enum values magic numbers?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me what makes it magic is that the assigned value of 99 is set but never used by the program; it'd only show up when looking at a memory viewer.

SKYBOX_INDEX_UNDEFINED = 0xFF
} SkyboxIndex;

typedef enum {
/* 0 */ CHANGE_SKYBOX_INACTIVE,
/* 1 */ CHANGE_SKYBOX_REQUESTED,
Expand Down
4 changes: 4 additions & 0 deletions include/z64skybox.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ typedef struct {

extern SkyboxFile gNormalSkyFiles[];

// Tests if the skybox palette for the given skybox should be written to color index 0-127.
// If false, it should be written to color index 128-255
#define IS_NORMAL_SKY_PALETTE_ALLOC_FRONT(skyboxIndex) ((skyboxIndex & 1) ^ ((skyboxIndex & 4) >> 2))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the name IS_NORMAL_SKY_PALETTE_ALLOC_FRONT is mostly gibberish to me tbh but I don't really have any better ideas

Copy link
Contributor Author

@mzxrules mzxrules Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it should be something more direct, like IS_NORMAL_SKYBOX_COLOR_INDEX_0/IS_NORMAL_SKYBOX_IMAGE_COLOR_INDEX_0?


void Skybox_Init(struct GameState* state, SkyboxContext* skyboxCtx, s16 skyboxId);
Mtx* Skybox_UpdateMatrix(SkyboxContext* skyboxCtx, f32 x, f32 y, f32 z);
void Skybox_Draw(SkyboxContext* skyboxCtx, struct GraphicsContext* gfxCtx, s16 skyboxId, s16 blend, f32 x, f32 y,
Expand Down
125 changes: 73 additions & 52 deletions src/code/z_kankyo.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,86 +98,103 @@ TimeBasedLightEntry sTimeBasedLightConfigs[][7] = {

TimeBasedSkyboxEntry gTimeBasedSkyboxConfigs[][9] = {
{
{ CLOCK_TIME(0, 0), CLOCK_TIME(4, 0) + 1, false, 3, 3 },
{ CLOCK_TIME(4, 0) + 1, CLOCK_TIME(5, 0) + 1, true, 3, 0 },
{ CLOCK_TIME(5, 0) + 1, CLOCK_TIME(6, 0), false, 0, 0 },
{ CLOCK_TIME(6, 0), CLOCK_TIME(8, 0) + 1, true, 0, 1 },
{ CLOCK_TIME(8, 0) + 1, CLOCK_TIME(16, 0), false, 1, 1 },
{ CLOCK_TIME(16, 0), CLOCK_TIME(17, 0) + 1, true, 1, 2 },
{ CLOCK_TIME(17, 0) + 1, CLOCK_TIME(18, 0) + 1, false, 2, 2 },
{ CLOCK_TIME(18, 0) + 1, CLOCK_TIME(19, 0) + 1, true, 2, 3 },
{ CLOCK_TIME(19, 0) + 1, CLOCK_TIME(24, 0) - 1, false, 3, 3 },
{ CLOCK_TIME(0, 0), CLOCK_TIME(4, 0) + 1, false, SKYBOX_INDEX_CLEAR_NIGHT, SKYBOX_INDEX_CLEAR_NIGHT },
{ CLOCK_TIME(4, 0) + 1, CLOCK_TIME(5, 0) + 1, true, SKYBOX_INDEX_CLEAR_NIGHT, SKYBOX_INDEX_CLEAR_SUNRISE },
{ CLOCK_TIME(5, 0) + 1, CLOCK_TIME(6, 0), false, SKYBOX_INDEX_CLEAR_SUNRISE, SKYBOX_INDEX_CLEAR_SUNRISE },
{ CLOCK_TIME(6, 0), CLOCK_TIME(8, 0) + 1, true, SKYBOX_INDEX_CLEAR_SUNRISE, SKYBOX_INDEX_CLEAR_DAY },
{ CLOCK_TIME(8, 0) + 1, CLOCK_TIME(16, 0), false, SKYBOX_INDEX_CLEAR_DAY, SKYBOX_INDEX_CLEAR_DAY },
{ CLOCK_TIME(16, 0), CLOCK_TIME(17, 0) + 1, true, SKYBOX_INDEX_CLEAR_DAY, SKYBOX_INDEX_CLEAR_SUNSET },
{ CLOCK_TIME(17, 0) + 1, CLOCK_TIME(18, 0) + 1, false, SKYBOX_INDEX_CLEAR_SUNSET, SKYBOX_INDEX_CLEAR_SUNSET },
{ CLOCK_TIME(18, 0) + 1, CLOCK_TIME(19, 0) + 1, true, SKYBOX_INDEX_CLEAR_SUNSET, SKYBOX_INDEX_CLEAR_NIGHT },
{ CLOCK_TIME(19, 0) + 1, CLOCK_TIME(24, 0) - 1, false, SKYBOX_INDEX_CLEAR_NIGHT, SKYBOX_INDEX_CLEAR_NIGHT },
},
{
{ CLOCK_TIME(0, 0), CLOCK_TIME(4, 0) + 1, false, 7, 7 },
{ CLOCK_TIME(4, 0) + 1, CLOCK_TIME(5, 0) + 1, true, 7, 4 },
{ CLOCK_TIME(5, 0) + 1, CLOCK_TIME(6, 0), false, 4, 4 },
{ CLOCK_TIME(6, 0), CLOCK_TIME(8, 0) + 1, true, 4, 5 },
{ CLOCK_TIME(8, 0) + 1, CLOCK_TIME(16, 0), false, 5, 5 },
{ CLOCK_TIME(16, 0), CLOCK_TIME(17, 0) + 1, true, 5, 6 },
{ CLOCK_TIME(17, 0) + 1, CLOCK_TIME(18, 0) + 1, false, 6, 6 },
{ CLOCK_TIME(18, 0) + 1, CLOCK_TIME(19, 0) + 1, true, 6, 7 },
{ CLOCK_TIME(19, 0) + 1, CLOCK_TIME(24, 0) - 1, false, 7, 7 },
{ CLOCK_TIME(0, 0), CLOCK_TIME(4, 0) + 1, false, SKYBOX_INDEX_CLOUDY_NIGHT, SKYBOX_INDEX_CLOUDY_NIGHT },
{ CLOCK_TIME(4, 0) + 1, CLOCK_TIME(5, 0) + 1, true, SKYBOX_INDEX_CLOUDY_NIGHT, SKYBOX_INDEX_CLOUDY_SUNRISE },
{ CLOCK_TIME(5, 0) + 1, CLOCK_TIME(6, 0), false, SKYBOX_INDEX_CLOUDY_SUNRISE, SKYBOX_INDEX_CLOUDY_SUNRISE },
{ CLOCK_TIME(6, 0), CLOCK_TIME(8, 0) + 1, true, SKYBOX_INDEX_CLOUDY_SUNRISE, SKYBOX_INDEX_CLOUDY_DAY },
{ CLOCK_TIME(8, 0) + 1, CLOCK_TIME(16, 0), false, SKYBOX_INDEX_CLOUDY_DAY, SKYBOX_INDEX_CLOUDY_DAY },
{ CLOCK_TIME(16, 0), CLOCK_TIME(17, 0) + 1, true, SKYBOX_INDEX_CLOUDY_DAY, SKYBOX_INDEX_CLOUDY_SUNSET },
{ CLOCK_TIME(17, 0) + 1, CLOCK_TIME(18, 0) + 1, false, SKYBOX_INDEX_CLOUDY_SUNSET, SKYBOX_INDEX_CLOUDY_SUNSET },
{ CLOCK_TIME(18, 0) + 1, CLOCK_TIME(19, 0) + 1, true, SKYBOX_INDEX_CLOUDY_SUNSET, SKYBOX_INDEX_CLOUDY_NIGHT },
{ CLOCK_TIME(19, 0) + 1, CLOCK_TIME(24, 0) - 1, false, SKYBOX_INDEX_CLOUDY_NIGHT, SKYBOX_INDEX_CLOUDY_NIGHT },
},
{
{ CLOCK_TIME(0, 0), CLOCK_TIME(2, 0) + 1, false, 3, 3 },
{ CLOCK_TIME(2, 0) + 1, CLOCK_TIME(4, 0) + 1, true, 3, 0 },
{ CLOCK_TIME(4, 0) + 1, CLOCK_TIME(8, 0) + 1, false, 0, 0 },
{ CLOCK_TIME(8, 0) + 1, CLOCK_TIME(10, 0), true, 0, 1 },
{ CLOCK_TIME(10, 0), CLOCK_TIME(14, 0) + 1, false, 1, 1 },
{ CLOCK_TIME(14, 0) + 1, CLOCK_TIME(16, 0), true, 1, 2 },
{ CLOCK_TIME(16, 0), CLOCK_TIME(20, 0) + 1, false, 2, 2 },
{ CLOCK_TIME(20, 0) + 1, CLOCK_TIME(22, 0), true, 2, 3 },
{ CLOCK_TIME(22, 0), CLOCK_TIME(24, 0) - 1, false, 3, 3 },
{ CLOCK_TIME(0, 0), CLOCK_TIME(2, 0) + 1, false, SKYBOX_INDEX_CLEAR_NIGHT, SKYBOX_INDEX_CLEAR_NIGHT },
{ CLOCK_TIME(2, 0) + 1, CLOCK_TIME(4, 0) + 1, true, SKYBOX_INDEX_CLEAR_NIGHT, SKYBOX_INDEX_CLEAR_SUNRISE },
{ CLOCK_TIME(4, 0) + 1, CLOCK_TIME(8, 0) + 1, false, SKYBOX_INDEX_CLEAR_SUNRISE, SKYBOX_INDEX_CLEAR_SUNRISE },
{ CLOCK_TIME(8, 0) + 1, CLOCK_TIME(10, 0), true, SKYBOX_INDEX_CLEAR_SUNRISE, SKYBOX_INDEX_CLEAR_DAY },
{ CLOCK_TIME(10, 0), CLOCK_TIME(14, 0) + 1, false, SKYBOX_INDEX_CLEAR_DAY, SKYBOX_INDEX_CLEAR_DAY },
{ CLOCK_TIME(14, 0) + 1, CLOCK_TIME(16, 0), true, SKYBOX_INDEX_CLEAR_DAY, SKYBOX_INDEX_CLEAR_SUNSET },
{ CLOCK_TIME(16, 0), CLOCK_TIME(20, 0) + 1, false, SKYBOX_INDEX_CLEAR_SUNSET, SKYBOX_INDEX_CLEAR_SUNSET },
{ CLOCK_TIME(20, 0) + 1, CLOCK_TIME(22, 0), true, SKYBOX_INDEX_CLEAR_SUNSET, SKYBOX_INDEX_CLEAR_NIGHT },
{ CLOCK_TIME(22, 0), CLOCK_TIME(24, 0) - 1, false, SKYBOX_INDEX_CLEAR_NIGHT, SKYBOX_INDEX_CLEAR_NIGHT },
},
{
{ CLOCK_TIME(0, 0), CLOCK_TIME(5, 0) + 1, false, 11, 11 },
{ CLOCK_TIME(5, 0) + 1, CLOCK_TIME(6, 0), true, 11, 8 },
{ CLOCK_TIME(6, 0), CLOCK_TIME(7, 0), false, 8, 8 },
{ CLOCK_TIME(7, 0), CLOCK_TIME(8, 0) + 1, true, 8, 9 },
{ CLOCK_TIME(8, 0) + 1, CLOCK_TIME(16, 0), false, 9, 9 },
{ CLOCK_TIME(16, 0), CLOCK_TIME(17, 0) + 1, true, 9, 10 },
{ CLOCK_TIME(17, 0) + 1, CLOCK_TIME(18, 0) + 1, false, 10, 10 },
{ CLOCK_TIME(18, 0) + 1, CLOCK_TIME(19, 0) + 1, true, 10, 11 },
{ CLOCK_TIME(19, 0) + 1, CLOCK_TIME(24, 0) - 1, false, 11, 11 },
{ CLOCK_TIME(0, 0), CLOCK_TIME(5, 0) + 1, false, SKYBOX_INDEX_HOLY_RESERVED_11, SKYBOX_INDEX_HOLY_RESERVED_11 },
{ CLOCK_TIME(5, 0) + 1, CLOCK_TIME(6, 0), true, SKYBOX_INDEX_HOLY_RESERVED_11, SKYBOX_INDEX_HOLY0 },
{ CLOCK_TIME(6, 0), CLOCK_TIME(7, 0), false, SKYBOX_INDEX_HOLY0, SKYBOX_INDEX_HOLY0 },
{ CLOCK_TIME(7, 0), CLOCK_TIME(8, 0) + 1, true, SKYBOX_INDEX_HOLY0, SKYBOX_INDEX_HOLY_RESERVED_9 },
{ CLOCK_TIME(8, 0) + 1, CLOCK_TIME(16, 0), false, SKYBOX_INDEX_HOLY_RESERVED_9, SKYBOX_INDEX_HOLY_RESERVED_9 },
{ CLOCK_TIME(16, 0), CLOCK_TIME(17, 0) + 1, true, SKYBOX_INDEX_HOLY_RESERVED_9, SKYBOX_INDEX_HOLY_RESERVED_10 },
{ CLOCK_TIME(17, 0) + 1, CLOCK_TIME(18, 0) + 1, false, SKYBOX_INDEX_HOLY_RESERVED_10,
SKYBOX_INDEX_HOLY_RESERVED_10 },
{ CLOCK_TIME(18, 0) + 1, CLOCK_TIME(19, 0) + 1, true, SKYBOX_INDEX_HOLY_RESERVED_10,
SKYBOX_INDEX_HOLY_RESERVED_11 },
{ CLOCK_TIME(19, 0) + 1, CLOCK_TIME(24, 0) - 1, false, SKYBOX_INDEX_HOLY_RESERVED_11,
SKYBOX_INDEX_HOLY_RESERVED_11 },
},
};

//! @brief File data for the "normal" skybox used in the overworld.
//! Up to two different skyboxes can loaded at once for the purpose of blending. Skyboxes can only
//! transition either to the next step in the day night cycle (e.g clear day to clear sunset),
//! or the opposing weather condition in the same step of the day/night cycle (e.g. cloudy night to clear night).
//
//! The skybox image data is color indexed, capped to a maximum 128 colors to allow the palette data for two different
//! skyboxes to fit in one 256 color tlut. This means the image data for the skyboxes is required to alternate between
//! starting at color index 0 and color index 128.
//
//! IS_NORMAL_SKY_PALETTE_ALLOC_FRONT depends on the order of this table to determine where to write palette data.
SkyboxFile gNormalSkyFiles[] = {
// Clear Sky
{
ROM_FILE(vr_fine0_static),
ROM_FILE(vr_fine0_static), // color index start 128
ROM_FILE(vr_fine0_pal_static),
},
{
ROM_FILE(vr_fine1_static),
ROM_FILE(vr_fine1_static), // color index start 0
ROM_FILE(vr_fine1_pal_static),
},
{
ROM_FILE(vr_fine2_static),
ROM_FILE(vr_fine2_static), // color index start 128
ROM_FILE(vr_fine2_pal_static),
},
{
ROM_FILE(vr_fine3_static),
ROM_FILE(vr_fine3_static), // color index start 0
ROM_FILE(vr_fine3_pal_static),
},
// Cloudy Sky
{
ROM_FILE(vr_cloud0_static),
ROM_FILE(vr_cloud0_static), // color index start 0
ROM_FILE(vr_cloud0_pal_static),
},
{
ROM_FILE(vr_cloud1_static),
ROM_FILE(vr_cloud1_static), // color index start 128
ROM_FILE(vr_cloud1_pal_static),
},
{
ROM_FILE(vr_cloud2_static),
ROM_FILE(vr_cloud2_static), // color index start 0
ROM_FILE(vr_cloud2_pal_static),
},
{
ROM_FILE(vr_cloud3_static),
ROM_FILE(vr_cloud3_static), // color index start 128
ROM_FILE(vr_cloud3_pal_static),
},
// Holy Sky
// Will appear incorrect due to IS_NORMAL_SKY_PALETTE_ALLOC_FRONT putting the palette at color index 128
{
ROM_FILE(vr_holy0_static),
ROM_FILE(vr_holy0_static), // color index start 0
ROM_FILE(vr_holy0_pal_static),
},
};
Expand Down Expand Up @@ -279,8 +296,8 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused)
Lights_DirectionalSetInfo(&envCtx->dirLight2, 80, 80, 80, 80, 80, 80);
LightContext_InsertLight(play, &play->lightCtx, &envCtx->dirLight2);

envCtx->skybox1Index = 99;
envCtx->skybox2Index = 99;
envCtx->skybox1Index = SKYBOX_INDEX_INIT_MAGIC;
envCtx->skybox2Index = SKYBOX_INDEX_INIT_MAGIC;

envCtx->changeSkyboxState = CHANGE_SKYBOX_INACTIVE;
envCtx->changeSkyboxTimer = 0;
Expand Down Expand Up @@ -648,8 +665,8 @@ void Environment_UpdateStorm(EnvironmentContext* envCtx, u8 unused) {
void Environment_UpdateSkybox(u8 skyboxId, EnvironmentContext* envCtx, SkyboxContext* skyboxCtx) {
u32 size;
u8 i;
u8 newSkybox1Index = 0xFF;
u8 newSkybox2Index = 0xFF;
u8 newSkybox1Index = SKYBOX_INDEX_UNDEFINED;
u8 newSkybox2Index = SKYBOX_INDEX_UNDEFINED;
u8 skyboxBlend = 0;

if (skyboxId == SKYBOX_CUTSCENE_MAP) {
Expand Down Expand Up @@ -719,7 +736,7 @@ void Environment_UpdateSkybox(u8 skyboxId, EnvironmentContext* envCtx, SkyboxCon
}

#if OOT_DEBUG
if (newSkybox1Index == 0xFF) {
if (newSkybox1Index == SKYBOX_INDEX_UNDEFINED) {
// "Environment VR data acquisition failed! Report to Sasaki!"
PRINTF(VT_COL(RED, WHITE) "\n環境VRデータ取得失敗! ささきまでご報告を!" VT_RST);
}
Expand Down Expand Up @@ -750,7 +767,8 @@ void Environment_UpdateSkybox(u8 skyboxId, EnvironmentContext* envCtx, SkyboxCon
if (envCtx->skyboxDmaState == SKYBOX_DMA_TEXTURE1_DONE) {
envCtx->skyboxDmaState = SKYBOX_DMA_TLUT1_START;

if ((newSkybox1Index & 1) ^ ((newSkybox1Index & 4) >> 2)) {
if (IS_NORMAL_SKY_PALETTE_ALLOC_FRONT(newSkybox1Index)) {
// Reserve palette at the front
size = gNormalSkyFiles[newSkybox1Index].palette.vromEnd -
gNormalSkyFiles[newSkybox1Index].palette.vromStart;

Expand All @@ -759,6 +777,7 @@ void Environment_UpdateSkybox(u8 skyboxId, EnvironmentContext* envCtx, SkyboxCon
gNormalSkyFiles[newSkybox1Index].palette.vromStart, size, 0, &envCtx->loadQueue, NULL,
"../z_kankyo.c", 1307);
} else {
// Reserve palette at the back
size = gNormalSkyFiles[newSkybox1Index].palette.vromEnd -
gNormalSkyFiles[newSkybox1Index].palette.vromStart;
osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1);
Expand All @@ -771,7 +790,8 @@ void Environment_UpdateSkybox(u8 skyboxId, EnvironmentContext* envCtx, SkyboxCon
if (envCtx->skyboxDmaState == SKYBOX_DMA_TEXTURE2_DONE) {
envCtx->skyboxDmaState = SKYBOX_DMA_TLUT2_START;

if ((newSkybox2Index & 1) ^ ((newSkybox2Index & 4) >> 2)) {
if (IS_NORMAL_SKY_PALETTE_ALLOC_FRONT(newSkybox2Index)) {
// Reserve palette at the front
size = gNormalSkyFiles[newSkybox2Index].palette.vromEnd -
gNormalSkyFiles[newSkybox2Index].palette.vromStart;

Expand All @@ -780,6 +800,7 @@ void Environment_UpdateSkybox(u8 skyboxId, EnvironmentContext* envCtx, SkyboxCon
gNormalSkyFiles[newSkybox2Index].palette.vromStart, size, 0, &envCtx->loadQueue, NULL,
"../z_kankyo.c", 1342);
} else {
// Reserve palette at the back
size = gNormalSkyFiles[newSkybox2Index].palette.vromEnd -
gNormalSkyFiles[newSkybox2Index].palette.vromStart;
osCreateMesgQueue(&envCtx->loadQueue, &envCtx->loadMsg, 1);
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_vr_box.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ void Skybox_Setup(PlayState* play, SkyboxContext* skyboxCtx, s16 skyboxId) {
DMA_REQUEST_SYNC(skyboxCtx->staticSegments[1], gNormalSkyFiles[skybox2Index].file.vromStart, size,
"../z_vr_box.c", 1064);

if ((skybox1Index & 1) ^ ((skybox1Index & 4) >> 2)) {
if (IS_NORMAL_SKY_PALETTE_ALLOC_FRONT(skybox1Index)) {
size = gNormalSkyFiles[skybox1Index].palette.vromEnd - gNormalSkyFiles[skybox1Index].palette.vromStart;

skyboxCtx->palettes = GAME_STATE_ALLOC(&play->state, size * 2, "../z_vr_box.c", 1072);
Expand Down
4 changes: 2 additions & 2 deletions src/overlays/gamestates/ovl_file_choose/z_file_choose.c
Original file line number Diff line number Diff line change
Expand Up @@ -1846,8 +1846,8 @@ void FileSelect_InitContext(GameState* thisx) {
envCtx->changeLightEnabled = false;
envCtx->changeLightTimer = 0;
envCtx->skyboxDmaState = SKYBOX_DMA_INACTIVE;
envCtx->skybox1Index = 99;
envCtx->skybox2Index = 99;
envCtx->skybox1Index = SKYBOX_INDEX_INIT_MAGIC;
envCtx->skybox2Index = SKYBOX_INDEX_INIT_MAGIC;
envCtx->lightConfig = 0;
envCtx->changeLightNextConfig = 0;
envCtx->lightSetting = 0;
Expand Down