From 9cde18309ac742da3be2d60c1b427b7a19003d5f Mon Sep 17 00:00:00 2001 From: Snesrev Date: Wed, 28 Sep 2022 12:22:48 +0200 Subject: [PATCH] Duplicate cone of light appeared in 16:9 mode (Fixes #116) --- zelda_rtl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/zelda_rtl.c b/zelda_rtl.c index 2643038..1828bcf 100644 --- a/zelda_rtl.c +++ b/zelda_rtl.c @@ -174,10 +174,12 @@ void ConfigurePpuSideSpace() { extra_right = ow_scroll_vars0.xend - BG2HOFS_copy2; extra_bottom = ow_scroll_vars0.yend - BG2VOFS_copy2; } else if (mod == 7) { - // indoors - int qm = quadrant_fullsize_x >> 1; - extra_left = IntMax(BG2HOFS_copy2 - room_bounds_x.v[qm], 0); - extra_right = IntMax(room_bounds_x.v[qm + 2] - BG2HOFS_copy2, 0); + // indoors, except when the light cone is in use + if (!(hdr_dungeon_dark_with_lantern && TS_copy != 0)) { + int qm = quadrant_fullsize_x >> 1; + extra_left = IntMax(BG2HOFS_copy2 - room_bounds_x.v[qm], 0); + extra_right = IntMax(room_bounds_x.v[qm + 2] - BG2HOFS_copy2, 0); + } int qy = quadrant_fullsize_y >> 1; extra_bottom = IntMax(room_bounds_y.v[qy + 2] - BG2VOFS_copy2, 0);