Skip to content

Commit

Permalink
FF7: Fix the time and lighting init logic
Browse files Browse the repository at this point in the history
Sometimes they were not triggered as expected
  • Loading branch information
julianxhokaxhiu committed Jan 21, 2023
1 parent a7a8c18 commit ccae6b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 7 additions & 0 deletions src/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ int common_create_window(HINSTANCE hInstance, struct game_obj* game_object)
music_init();
sfx_init();
voice_init();

if (enable_ffmpeg_videos)
{
movie_init();
Expand All @@ -857,6 +858,12 @@ int common_create_window(HINSTANCE hInstance, struct game_obj* game_object)
vibration_init();
}

// Init Day Night Cycle
if (!ff8 && enable_time_cycle) ff7::time.init();

// Init Lighting
if (!ff8 && enable_lighting) lighting.init();

if(aspect_ratio == AR_WIDESCREEN) widescreen.init();

// enable verbose logging for FFMpeg
Expand Down
6 changes: 0 additions & 6 deletions src/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,12 +788,6 @@ void Renderer::init()
overlay.init(backendProgramHandles[RendererProgram::OVERLAY], window_size_x, window_size_y);
}

// Init Lighting
lighting.init();

// Init Day Night Cycle
if (enable_time_cycle) ff7::time.init();

// Set defaults
show();
};
Expand Down

0 comments on commit ccae6b2

Please sign in to comment.