Skip to content

Commit

Permalink
FF7: Enable day/time code to trigger only if enable_time_cycle=true
Browse files Browse the repository at this point in the history
Additionally improve a bit the readability of the code in common.cpp
  • Loading branch information
julianxhokaxhiu committed Jan 18, 2023
1 parent 1a10f62 commit 2029414
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion misc/FFNx.frag
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void main()
}
}

if(isTimeFilterEnabled) color.rgb *= TimeColor.rgb;
if (isTimeFilterEnabled) color.rgb *= TimeColor.rgb;

if (!(isHDR)) {
// SDR screens require the Gamma output to properly render light scenes
Expand Down
3 changes: 2 additions & 1 deletion src/ff7_opengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ void ff7_init_hooks(struct game_obj *_game_object)
if(aspect_ratio == AR_WIDESCREEN)
ff7_widescreen_hook_init();

ff7::time_hook_init();
if (enable_time_cycle)
ff7::time_hook_init();

// #####################
// new timer calibration
Expand Down
2 changes: 1 addition & 1 deletion src/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ void Renderer::init()
lighting.init();

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

// Set defaults
show();
Expand Down

0 comments on commit 2029414

Please sign in to comment.