foxygit / doom Log in
commit b064565cb4967b62d1ebedb9087a254bd5b3280a
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Sun Aug 6 11:44:48 2017 -0400
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Sun Aug 6 11:44:48 2017 -0400

    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.
---
 src/doom/d_main.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/doom/d_main.c b/src/doom/d_main.c
index 55dd275a..8c122bcd 100644
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -1482,7 +1482,6 @@ void D_DoomMain (void)
         // 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 @@ void D_DoomMain (void)
         // 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.