From bb4fcffeb5dc382fce4c609897a2e82590d7d709 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Mon, 25 Aug 2025 09:26:07 +0200 Subject: [PATCH] port: fix #650 --- src/game/sight.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/game/sight.c b/src/game/sight.c index 10b595f40..9167af44f 100644 --- a/src/game/sight.c +++ b/src/game/sight.c @@ -1349,12 +1349,17 @@ Gfx *sightDrawZoom(Gfx *gdl, bool sighton, f32 crossx, f32 crossy) viewbottom += 1; viewtop += 1; } + // Align box correctly for widescreen + const f32 leftx = sightGetAdjustedX(viewleft + marginleft); + const f32 rightx = sightGetAdjustedX(viewright - marginright); + #define BOXLEFT leftx + #define BOXRIGHT rightx +#else + #define BOXLEFT (viewleft + marginleft) + #define BOXRIGHT (viewright - marginright) #endif - -#define BOXLEFT (viewleft + marginleft) -#define BOXRIGHT (viewright - marginright) -#define BOXBOTTOM (viewbottom - marginbottom) -#define BOXTOP (viewtop + margintop) + #define BOXBOTTOM (viewbottom - marginbottom) + #define BOXTOP (viewtop + margintop) if (cornerwidth > BOXRIGHT - BOXLEFT) { cornerwidth = BOXRIGHT - BOXLEFT;