shithub: choc

Download patch

ref: b064565cb4967b62d1ebedb9087a254bd5b3280a
parent: e9cfd0479438fa4447efd7de95afa6ccafb06f69
author: Simon Howard <fraggle@soulsphere.org>
date: Sun Aug 6 07:44:48 EDT 2017

doom: Fix "Screen Size" label with BFG IWADs.

In the BFG Edition IWADs, M_SCRNSZ has been changed to contain the
text "Gamepad:" instead, which means that the options menu has a
screen size control that nonsensically has that label. Instead, swap
in the M_DISP lump when using the BFG Edition IWADs, so that it says
"Display" instead.

--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -1482,7 +1482,6 @@
         // secret level (MAP33). In Vanilla Doom (meaning the DOS
         // version), MAP33 overflows into the Plutonia level names
         // array, so HUSTR_33 is actually PHUSTR_1.
-
         DEH_AddStringReplacement(HUSTR_31, "level 31: idkfa");
         DEH_AddStringReplacement(HUSTR_32, "level 32: keen");
         DEH_AddStringReplacement(PHUSTR_1, "level 33: betray");
@@ -1496,9 +1495,14 @@
         // The end result is that M_GDHIGH is too wide and causes the game
         // to crash. As a workaround to get a minimum level of support for
         // the BFG edition IWADs, use the "ON"/"OFF" graphics instead.
-
         DEH_AddStringReplacement("M_GDHIGH", "M_MSGON");
         DEH_AddStringReplacement("M_GDLOW", "M_MSGOFF");
+
+        // The BFG edition's "Screen Size:" graphic has also been changed
+        // to say "Gamepad:". Fortunately, it (along with the original
+        // Doom IWADs) has an unused graphic that says "Display". So we
+        // can swap this in instead, and it kind of makes sense.
+        DEH_AddStringReplacement("M_SCRNSZ", "M_DISP");
     }
 
     // Load Dehacked patches specified on the command line with -deh.