From 5fdd69cbbb458f273c258d1c5143d642fa5e8b8d Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 2 Feb 2020 06:40:51 +0000 Subject: [PATCH] SW: Add Redux's workaround for glitchy fist HUD sprites in widescreen git-svn-id: https://svn.eduke32.com/eduke32@8589 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/sw/src/panel.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/source/sw/src/panel.cpp b/source/sw/src/panel.cpp index 1c63a315d..02adfe182 100644 --- a/source/sw/src/panel.cpp +++ b/source/sw/src/panel.cpp @@ -7592,6 +7592,36 @@ pDisplaySprites(PLAYERp pp) } #endif + // temporary hack to fix fist artifacts until a solution is found in the panel system itself + switch (picnum) + { + case FIST_SWING0: + case FIST_SWING1: + case FIST_SWING2: + case FIST2_SWING0: + case FIST2_SWING1: + case FIST2_SWING2: + case FIST3_SWING0: + case FIST3_SWING1: + case FIST3_SWING2: + case BLOODYFIST_SWING0: + case BLOODYFIST_SWING1: + case BLOODYFIST_SWING2: + case BLOODYFIST2_SWING0: + case BLOODYFIST2_SWING1: + case BLOODYFIST2_SWING2: + case BLOODYFIST3_SWING0: + case BLOODYFIST3_SWING1: + case BLOODYFIST3_SWING2: + if (TEST(flags, BIT(2)) && x > 160) + x = 65; + else if (!TEST(flags, BIT(2)) && x < 160) + x = 345; + break; + default: + break; + } + rotatesprite(x << 16, y << 16, psp->scale, ang, picnum, shade, pal,