From d1d3120aa3c944f5cc7f50efe00d2fa6820aaa05 Mon Sep 17 00:00:00 2001 From: pvictress <185700473+pvictress@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:19:45 +0300 Subject: [PATCH] Heretic & Hexen: add option to toggle automap lines antialiasing Thick automap lines don't look great with antialiasing applied. This change makes antialiasing optional, allowing users to toggle it as needed. Co-Authored-By: Julia Nechaevskaya --- src/heretic/am_map.c | 167 +++++++++++++++++++++++------------------- src/heretic/mn_menu.c | 39 ++++++---- src/hexen/am_map.c | 152 +++++++++++++++++++++----------------- src/hexen/mn_menu.c | 35 ++++++--- src/id_vars.c | 6 ++ 5 files changed, 229 insertions(+), 170 deletions(-) diff --git a/src/heretic/am_map.c b/src/heretic/am_map.c index ca515a08..de059696 100644 --- a/src/heretic/am_map.c +++ b/src/heretic/am_map.c @@ -1360,96 +1360,109 @@ static inline void PUTDOT_THICK(int x, int y, pixel_t color) // ----------------------------------------------------------------------------- // AM_drawFline // Classic Bresenham w/ whatever optimizations needed for speed. +// [PN] Refactored to handle both antialiased and non-antialiased line drawing. // ----------------------------------------------------------------------------- static void AM_drawFline(fline_t * fl, int color) { - register int x, y, dx, dy, sx, sy, ax, ay, d; - - switch (color) - { - case WALLCOLORS: DrawWuLine(fl, &(*antialias)[0][0]); break; - case FDWALLCOLORS: DrawWuLine(fl, &(*antialias)[1][0]); break; - case CDWALLCOLORS: DrawWuLine(fl, &(*antialias)[2][0]); break; - // [JN] Apply antialiasing for some extra lines as well: - case MLDONTDRAW1: DrawWuLine(fl, &(*antialias)[3][0]); break; - case MLDONTDRAW2: DrawWuLine(fl, &(*antialias)[4][0]); break; - case YELLOWKEY: DrawWuLine(fl, &(*antialias)[5][0]); break; - case GREENKEY: DrawWuLine(fl, &(*antialias)[6][0]); break; - case BLUEKEY: DrawWuLine(fl, &(*antialias)[7][0]); break; - case SECRETCOLORS: DrawWuLine(fl, &(*antialias)[8][0]); break; - case FSECRETCOLORS: DrawWuLine(fl, &(*antialias)[9][0]); break; - case EXITS: DrawWuLine(fl, &(*antialias)[10][0]); break; - // IDDT extended colors: - case IDDT_GREEN: DrawWuLine(fl, &(*antialias)[11][0]); break; - case IDDT_YELLOW: DrawWuLine(fl, &(*antialias)[12][0]); break; - case 150: DrawWuLine(fl, &(*antialias)[13][0]); break; - case 151: DrawWuLine(fl, &(*antialias)[14][0]); break; - case 152: DrawWuLine(fl, &(*antialias)[15][0]); break; - case 153: DrawWuLine(fl, &(*antialias)[16][0]); break; - case 154: DrawWuLine(fl, &(*antialias)[17][0]); break; - case 155: DrawWuLine(fl, &(*antialias)[18][0]); break; - case 156: DrawWuLine(fl, &(*antialias)[19][0]); break; // Used for TELEPORTERS as well - case 157: DrawWuLine(fl, &(*antialias)[20][0]); break; - case 158: DrawWuLine(fl, &(*antialias)[21][0]); break; - case 159: DrawWuLine(fl, &(*antialias)[22][0]); break; - - default: + int actual_color; + + if (automap_smooth) + { + // Use antialiasing if enabled + switch (color) + { + case WALLCOLORS: DrawWuLine(fl, &(*antialias)[0][0]); return; + case FDWALLCOLORS: DrawWuLine(fl, &(*antialias)[1][0]); return; + case CDWALLCOLORS: DrawWuLine(fl, &(*antialias)[2][0]); return; + // [JN] Apply antialiasing for some extra lines as well: + case MLDONTDRAW1: DrawWuLine(fl, &(*antialias)[3][0]); return; + case MLDONTDRAW2: DrawWuLine(fl, &(*antialias)[4][0]); return; + case YELLOWKEY: DrawWuLine(fl, &(*antialias)[5][0]); return; + case GREENKEY: DrawWuLine(fl, &(*antialias)[6][0]); return; + case BLUEKEY: DrawWuLine(fl, &(*antialias)[7][0]); return; + case SECRETCOLORS: DrawWuLine(fl, &(*antialias)[8][0]); return; + case FSECRETCOLORS: DrawWuLine(fl, &(*antialias)[9][0]); return; + case EXITS: DrawWuLine(fl, &(*antialias)[10][0]); return; + // IDDT extended colors: + case IDDT_GREEN: DrawWuLine(fl, &(*antialias)[11][0]); return; + case IDDT_YELLOW: DrawWuLine(fl, &(*antialias)[12][0]); return; + case 150: DrawWuLine(fl, &(*antialias)[13][0]); return; + case 151: DrawWuLine(fl, &(*antialias)[14][0]); return; + case 152: DrawWuLine(fl, &(*antialias)[15][0]); return; + case 153: DrawWuLine(fl, &(*antialias)[16][0]); return; + case 154: DrawWuLine(fl, &(*antialias)[17][0]); return; + case 155: DrawWuLine(fl, &(*antialias)[18][0]); return; + case 156: DrawWuLine(fl, &(*antialias)[19][0]); return; // Used for TELEPORTERS as well + case 157: DrawWuLine(fl, &(*antialias)[20][0]); return; + case 158: DrawWuLine(fl, &(*antialias)[21][0]); return; + case 159: DrawWuLine(fl, &(*antialias)[22][0]); return; + default: break; + } + } + else + { + // No antialiasing: map colors + switch (color) { - // For debugging only - if (fl->a.x < 0 || fl->a.x >= f_w - || fl->a.y < 0 || fl->a.y >= f_h - || fl->b.x < 0 || fl->b.x >= f_w - || fl->b.y < 0 || fl->b.y >= f_h) - { - return; - } + case WALLCOLORS: actual_color = automap_overlay ? 100 : 96; break; + case FDWALLCOLORS: actual_color = automap_overlay ? 106 : 110; break; + case CDWALLCOLORS: actual_color = 75; break; + default: actual_color = color; break; + } + } + + // Debugging: check bounds + if (fl->a.x < 0 || fl->a.x >= f_w || fl->a.y < 0 || fl->a.y >= f_h + || fl->b.x < 0 || fl->b.x >= f_w || fl->b.y < 0 || fl->b.y >= f_h) + { + return; + } - dx = fl->b.x - fl->a.x; - ax = 2 * (dx < 0 ? -dx : dx); - sx = dx < 0 ? -1 : 1; + // Bresenham's line algorithm + const int dx = fl->b.x - fl->a.x; + const int ax = 2 * (dx < 0 ? -dx : dx); + const int sx = dx < 0 ? -1 : 1; - dy = fl->b.y - fl->a.y; - ay = 2 * (dy < 0 ? -dy : dy); - sy = dy < 0 ? -1 : 1; + const int dy = fl->b.y - fl->a.y; + const int ay = 2 * (dy < 0 ? -dy : dy); + const int sy = dy < 0 ? -1 : 1; - x = fl->a.x; - y = fl->a.y; + int x = fl->a.x; + int y = fl->a.y; - if (ax > ay) + if (ax > ay) + { + int d = ay - ax / 2; + while (1) + { + PUTDOT_THICK(x, y, automap_smooth ? color : actual_color); + if (x == fl->b.x) + return; + if (d >= 0) { - d = ay - ax / 2; - while (1) - { - PUTDOT_THICK(x, y, color); - if (x == fl->b.x) - return; - if (d >= 0) - { - y += sy; - d -= ax; - } - x += sx; - d += ay; - } + y += sy; + d -= ax; } - else + x += sx; + d += ay; + } + } + else + { + int d = ax - ay / 2; + while (1) + { + PUTDOT_THICK(x, y, automap_smooth ? color : actual_color); + if (y == fl->b.y) + return; + if (d >= 0) { - d = ax - ay / 2; - while (1) - { - PUTDOT_THICK(x, y, color); - if (y == fl->b.y) - return; - if (d >= 0) - { - x += sx; - d -= ay; - } - y += sy; - d += ax; - } + x += sx; + d -= ay; } + y += sy; + d += ax; } } } diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c index b420c9d2..34021493 100644 --- a/src/heretic/mn_menu.c +++ b/src/heretic/mn_menu.c @@ -584,6 +584,7 @@ static void M_ID_Widget_LevelName (int choice); static void M_ID_Widget_Health (int choice); static void M_Draw_ID_Automap (void); +static void M_ID_Automap_Smooth (int choice); static void M_ID_Automap_Thick (int choice); static void M_ID_Automap_Square (int choice); static void M_ID_Automap_Secrets (int choice); @@ -3113,6 +3114,7 @@ static void M_ID_Widget_Health (int choice) // ----------------------------------------------------------------------------- static MenuItem_t ID_Menu_Automap[] = { + { ITT_LRFUNC, "LINE SMOOTHING", M_ID_Automap_Smooth, 0, MENU_NONE }, { ITT_LRFUNC, "LINE THICKNESS", M_ID_Automap_Thick, 0, MENU_NONE }, { ITT_LRFUNC, "SQUARE ASPECT RATIO", M_ID_Automap_Square, 0, MENU_NONE }, { ITT_LRFUNC, "MARK SECRET SECTORS", M_ID_Automap_Secrets, 0, MENU_NONE }, @@ -3124,7 +3126,7 @@ static MenuItem_t ID_Menu_Automap[] = { static Menu_t ID_Def_Automap = { ID_MENU_LEFTOFFSET, ID_MENU_TOPOFFSET, M_Draw_ID_Automap, - 6, ID_Menu_Automap, + 7, ID_Menu_Automap, 0, SmallFont, false, false, MENU_ID_MAIN @@ -3139,40 +3141,50 @@ static void M_Draw_ID_Automap (void) MN_DrTextACentered("AUTOMAP", 10, cr[CR_YELLOW]); + // Line smoothing + sprintf(str, automap_smooth ? "ON" : "OFF"); + MN_DrTextA(str, M_ItemRightAlign(str), 20, + M_Item_Glow(0, automap_smooth ? GLOW_GREEN : GLOW_DARKRED)); + // Line thickness sprintf(str, "%s", thickness[automap_thick]); - MN_DrTextA(str, M_ItemRightAlign(str), 20, - M_Item_Glow(0, automap_thick ? GLOW_GREEN : GLOW_DARKRED)); + MN_DrTextA(str, M_ItemRightAlign(str), 30, + M_Item_Glow(1, automap_thick ? GLOW_GREEN : GLOW_DARKRED)); // Square aspect ratio sprintf(str, automap_square ? "ON" : "OFF"); - MN_DrTextA(str, M_ItemRightAlign(str), 30, - M_Item_Glow(1, automap_square ? GLOW_GREEN : GLOW_DARKRED)); + MN_DrTextA(str, M_ItemRightAlign(str), 40, + M_Item_Glow(2, automap_square ? GLOW_GREEN : GLOW_DARKRED)); // Mark secret sectors sprintf(str, automap_secrets == 1 ? "REVEALED" : automap_secrets == 2 ? "ALWAYS" : "OFF"); - MN_DrTextA(str, M_ItemRightAlign(str), 40, - M_Item_Glow(2, automap_secrets ? GLOW_GREEN : GLOW_DARKRED)); + MN_DrTextA(str, M_ItemRightAlign(str), 50, + M_Item_Glow(3, automap_secrets ? GLOW_GREEN : GLOW_DARKRED)); // Rotate mode sprintf(str, automap_rotate ? "ON" : "OFF"); - MN_DrTextA(str, M_ItemRightAlign(str), 50, - M_Item_Glow(3, automap_rotate ? GLOW_GREEN : GLOW_DARKRED)); + MN_DrTextA(str, M_ItemRightAlign(str), 60, + M_Item_Glow(4, automap_rotate ? GLOW_GREEN : GLOW_DARKRED)); // Overlay mode sprintf(str, automap_overlay ? "ON" : "OFF"); - MN_DrTextA(str, M_ItemRightAlign(str), 60, - M_Item_Glow(4, automap_overlay ? GLOW_GREEN : GLOW_DARKRED)); + MN_DrTextA(str, M_ItemRightAlign(str), 70, + M_Item_Glow(5, automap_overlay ? GLOW_GREEN : GLOW_DARKRED)); // Overlay shading level sprintf(str,"%d", automap_shading); - MN_DrTextA(str, M_ItemRightAlign(str), 70, - M_Item_Glow(5, !automap_overlay ? GLOW_DARKRED : + MN_DrTextA(str, M_ItemRightAlign(str), 80, + M_Item_Glow(6, !automap_overlay ? GLOW_DARKRED : automap_shading == 0 ? GLOW_RED : automap_shading == 12 ? GLOW_YELLOW : GLOW_GREEN)); } +static void M_ID_Automap_Smooth (int choice) +{ + automap_smooth ^= 1; +} + static void M_ID_Automap_Thick (int choice) { automap_thick = M_INT_Slider(automap_thick, 0, 6, choice, false); @@ -4552,6 +4564,7 @@ static void M_ID_ApplyResetHook (void) widget_render = 0; widget_health = 0; // Automap + automap_smooth = 1; automap_thick = 0; automap_square = 0; automap_secrets = 0; diff --git a/src/hexen/am_map.c b/src/hexen/am_map.c index 12faa9f3..5adb324f 100644 --- a/src/hexen/am_map.c +++ b/src/hexen/am_map.c @@ -1232,87 +1232,101 @@ static inline void PUTDOT_THICK(int x, int y, pixel_t color) // ----------------------------------------------------------------------------- // AM_drawFline // Classic Bresenham w/ whatever optimizations needed for speed. +// [PN] Refactored to handle both antialiased and non-antialiased line drawing. // ----------------------------------------------------------------------------- static void AM_drawFline(fline_t * fl, int color) { - register int x, y, dx, dy, sx, sy, ax, ay, d; - - switch (color) - { - case WALLCOLORS: DrawWuLine(fl, &(*antialias)[0][0]); break; - case FDWALLCOLORS: DrawWuLine(fl, &(*antialias)[1][0]); break; - case CDWALLCOLORS: DrawWuLine(fl, &(*antialias)[2][0]); break; - case GREENKEY: DrawWuLine(fl, &(*antialias)[3][0]); break; - case BLUEKEY: DrawWuLine(fl, &(*antialias)[4][0]); break; - case BLOODRED: DrawWuLine(fl, &(*antialias)[5][0]); break; - case TSWALLCOLORS: DrawWuLine(fl, &(*antialias)[6][0]); break; - // [JN] IDDT extended colors - case IDDT_GREEN: DrawWuLine(fl, &(*antialias)[7][0]); break; - case 175: DrawWuLine(fl, &(*antialias)[8][0]); break; - case 176: DrawWuLine(fl, &(*antialias)[9][0]); break; - case 178: DrawWuLine(fl, &(*antialias)[10][0]); break; - case 179: DrawWuLine(fl, &(*antialias)[11][0]); break; - case 180: DrawWuLine(fl, &(*antialias)[12][0]); break; - case 181: DrawWuLine(fl, &(*antialias)[13][0]); break; - case 182: DrawWuLine(fl, &(*antialias)[14][0]); break; - case IDDT_GRAY: DrawWuLine(fl, &(*antialias)[15][0]); break; - default: - { - // For debugging only - if (fl->a.x < 0 || fl->a.x >= f_w - || fl->a.y < 0 || fl->a.y >= f_h - || fl->b.x < 0 || fl->b.x >= f_w - || fl->b.y < 0 || fl->b.y >= f_h) - { - return; - } + int actual_color; + + if (automap_smooth) + { + // Use antialiasing if enabled + switch (color) + { + case WALLCOLORS: DrawWuLine(fl, &(*antialias)[0][0]); return; + case FDWALLCOLORS: DrawWuLine(fl, &(*antialias)[1][0]); return; + case CDWALLCOLORS: DrawWuLine(fl, &(*antialias)[2][0]); return; + case GREENKEY: DrawWuLine(fl, &(*antialias)[3][0]); return; + case BLUEKEY: DrawWuLine(fl, &(*antialias)[4][0]); return; + case BLOODRED: DrawWuLine(fl, &(*antialias)[5][0]); return; + case TSWALLCOLORS: DrawWuLine(fl, &(*antialias)[6][0]); return; + // [JN] IDDT extended colors + case IDDT_GREEN: DrawWuLine(fl, &(*antialias)[7][0]); return; + case 175: DrawWuLine(fl, &(*antialias)[8][0]); return; + case 176: DrawWuLine(fl, &(*antialias)[9][0]); return; + case 178: DrawWuLine(fl, &(*antialias)[10][0]); return; + case 179: DrawWuLine(fl, &(*antialias)[11][0]); return; + case 180: DrawWuLine(fl, &(*antialias)[12][0]); return; + case 181: DrawWuLine(fl, &(*antialias)[13][0]); return; + case 182: DrawWuLine(fl, &(*antialias)[14][0]); return; + case IDDT_GRAY: DrawWuLine(fl, &(*antialias)[15][0]); return; + default: break; + } + } + else + { + // No antialiasing: map colors + switch (color) + { + case WALLCOLORS: actual_color = automap_overlay ? 86 : 83; break; + case FDWALLCOLORS: actual_color = automap_overlay ? 93 : 96; break; + case CDWALLCOLORS: actual_color = 107; break; + default: actual_color = color; break; + } + } - dx = fl->b.x - fl->a.x; - ax = 2 * (dx < 0 ? -dx : dx); - sx = dx < 0 ? -1 : 1; + // Debugging: check bounds + if (fl->a.x < 0 || fl->a.x >= f_w || fl->a.y < 0 || fl->a.y >= f_h + || fl->b.x < 0 || fl->b.x >= f_w || fl->b.y < 0 || fl->b.y >= f_h) + { + return; + } - dy = fl->b.y - fl->a.y; - ay = 2 * (dy < 0 ? -dy : dy); - sy = dy < 0 ? -1 : 1; + // Bresenham's line algorithm + const int dx = fl->b.x - fl->a.x; + const int ax = 2 * (dx < 0 ? -dx : dx); + const int sx = dx < 0 ? -1 : 1; - x = fl->a.x; - y = fl->a.y; + const int dy = fl->b.y - fl->a.y; + const int ay = 2 * (dy < 0 ? -dy : dy); + const int sy = dy < 0 ? -1 : 1; - if (ax > ay) + int x = fl->a.x; + int y = fl->a.y; + + if (ax > ay) + { + int d = ay - ax / 2; + while (1) + { + PUTDOT_THICK(x, y, automap_smooth ? color : actual_color); + if (x == fl->b.x) + return; + if (d >= 0) { - d = ay - ax / 2; - while (1) - { - PUTDOT_THICK(x, y, color); - if (x == fl->b.x) - return; - if (d >= 0) - { - y += sy; - d -= ax; - } - x += sx; - d += ay; - } + y += sy; + d -= ax; } - else + x += sx; + d += ay; + } + } + else + { + int d = ax - ay / 2; + while (1) + { + PUTDOT_THICK(x, y, automap_smooth ? color : actual_color); + if (y == fl->b.y) + return; + if (d >= 0) { - d = ax - ay / 2; - while (1) - { - PUTDOT_THICK(x, y, color); - if (y == fl->b.y) - return; - if (d >= 0) - { - x += sx; - d -= ay; - } - y += sy; - d += ax; - } + x += sx; + d -= ay; } + y += sy; + d += ax; } } } diff --git a/src/hexen/mn_menu.c b/src/hexen/mn_menu.c index 570ae8a6..382b0bad 100644 --- a/src/hexen/mn_menu.c +++ b/src/hexen/mn_menu.c @@ -595,6 +595,7 @@ static void M_ID_Widget_Render (int option); static void M_ID_Widget_Health (int option); static void M_Draw_ID_Automap (void); +static void M_ID_Automap_Smooth (int choice); static void M_ID_Automap_Thick (int choice); static void M_ID_Automap_Square (int choice); static void M_ID_Automap_Rotate (int option); @@ -3089,6 +3090,7 @@ static void M_ID_Widget_Health (int choice) // ----------------------------------------------------------------------------- static MenuItem_t ID_Menu_Automap[] = { + { ITT_LRFUNC, "LINE SMOOTHING", M_ID_Automap_Smooth, 0, MENU_NONE }, { ITT_LRFUNC, "LINE THICKNESS", M_ID_Automap_Thick, 0, MENU_NONE }, { ITT_LRFUNC, "SQUARE ASPECT RATIO", M_ID_Automap_Square, 0, MENU_NONE }, { ITT_LRFUNC, "ROTATE MODE", M_ID_Automap_Rotate, 0, MENU_NONE }, @@ -3099,7 +3101,7 @@ static MenuItem_t ID_Menu_Automap[] = { static Menu_t ID_Def_Automap = { ID_MENU_LEFTOFFSET_MID, ID_MENU_TOPOFFSET, M_Draw_ID_Automap, - 5, ID_Menu_Automap, + 6, ID_Menu_Automap, 0, SmallFont, false, false, MENU_ID_MAIN @@ -3114,34 +3116,44 @@ static void M_Draw_ID_Automap (void) MN_DrTextACentered("AUTOMAP", 10, cr[CR_YELLOW]); + // Line smoothing + sprintf(str, automap_smooth ? "ON" : "OFF"); + MN_DrTextA(str, M_ItemRightAlign(str), 20, + M_Item_Glow(0, automap_smooth ? GLOW_GREEN : GLOW_DARKRED)); + // Line thickness sprintf(str, "%s", thickness[automap_thick]); - MN_DrTextA(str, M_ItemRightAlign(str), 20, - M_Item_Glow(0, automap_thick ? GLOW_GREEN : GLOW_DARKRED)); + MN_DrTextA(str, M_ItemRightAlign(str), 30, + M_Item_Glow(1, automap_thick ? GLOW_GREEN : GLOW_DARKRED)); // Square aspect ratio sprintf(str, automap_square ? "ON" : "OFF"); - MN_DrTextA(str, M_ItemRightAlign(str), 30, - M_Item_Glow(1, automap_square ? GLOW_GREEN : GLOW_DARKRED)); + MN_DrTextA(str, M_ItemRightAlign(str), 40, + M_Item_Glow(2, automap_square ? GLOW_GREEN : GLOW_DARKRED)); // Rotate mode sprintf(str, automap_rotate ? "ON" : "OFF"); - MN_DrTextA(str, M_ItemRightAlign(str), 40, - M_Item_Glow(2, automap_rotate ? GLOW_GREEN : GLOW_DARKRED)); + MN_DrTextA(str, M_ItemRightAlign(str), 50, + M_Item_Glow(3, automap_rotate ? GLOW_GREEN : GLOW_DARKRED)); // Overlay mode sprintf(str, automap_overlay ? "ON" : "OFF"); - MN_DrTextA(str, M_ItemRightAlign(str), 50, - M_Item_Glow(3, automap_overlay ? GLOW_GREEN : GLOW_DARKRED)); + MN_DrTextA(str, M_ItemRightAlign(str), 60, + M_Item_Glow(4, automap_overlay ? GLOW_GREEN : GLOW_DARKRED)); // Overlay shading level sprintf(str,"%d", automap_shading); - MN_DrTextA(str, M_ItemRightAlign(str), 60, - M_Item_Glow(4, !automap_overlay ? GLOW_DARKRED : + MN_DrTextA(str, M_ItemRightAlign(str), 70, + M_Item_Glow(5, !automap_overlay ? GLOW_DARKRED : automap_shading == 0 ? GLOW_RED : automap_shading == 12 ? GLOW_YELLOW : GLOW_GREEN)); } +static void M_ID_Automap_Smooth (int choice) +{ + automap_smooth ^= 1; +} + static void M_ID_Automap_Thick (int choice) { automap_thick = M_INT_Slider(automap_thick, 0, 6, choice, false); @@ -3857,6 +3869,7 @@ static void M_ID_ApplyResetHook (void) widget_render = 0; widget_health = 0; // Automap + automap_smooth = 1; automap_thick = 0; automap_square = 0; automap_rotate = 0; diff --git a/src/id_vars.c b/src/id_vars.c index 36de5c2c..34db873e 100644 --- a/src/id_vars.c +++ b/src/id_vars.c @@ -105,6 +105,8 @@ int widget_health = 0; // Automap int automap_scheme = 0; int automap_smooth = 0; +// [JN] Heretic and Hexen are using antialiasing for automap drawing by default. +int automap_smooth_hr = 1; int automap_thick = 0; int automap_square = 0; int automap_secrets = 0; @@ -303,6 +305,10 @@ void ID_BindVariables (GameMission_t mission) M_BindIntVariable("automap_scheme", &automap_scheme); M_BindIntVariable("automap_smooth", &automap_smooth); } + if (mission == heretic || mission == hexen) + { + M_BindIntVariable("automap_smooth", &automap_smooth_hr); + } M_BindIntVariable("automap_thick", &automap_thick); M_BindIntVariable("automap_square", &automap_square); if (mission == doom || mission == heretic)