From 696c5246410ca3298eab30111e20bee4665dcbbc Mon Sep 17 00:00:00 2001 From: pvictress <185700473+pvictress@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:30:33 +0300 Subject: [PATCH] Use correct variables for H&H antialiasing --- src/heretic/am_map.c | 6 +++--- src/heretic/mn_menu.c | 8 ++++---- src/hexen/am_map.c | 6 +++--- src/hexen/mn_menu.c | 8 ++++---- src/id_vars.h | 1 + 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/heretic/am_map.c b/src/heretic/am_map.c index de059696..da44530e 100644 --- a/src/heretic/am_map.c +++ b/src/heretic/am_map.c @@ -1367,7 +1367,7 @@ static void AM_drawFline(fline_t * fl, int color) { int actual_color; - if (automap_smooth) + if (automap_smooth_hr) { // Use antialiasing if enabled switch (color) @@ -1436,7 +1436,7 @@ static void AM_drawFline(fline_t * fl, int color) int d = ay - ax / 2; while (1) { - PUTDOT_THICK(x, y, automap_smooth ? color : actual_color); + PUTDOT_THICK(x, y, automap_smooth_hr ? color : actual_color); if (x == fl->b.x) return; if (d >= 0) @@ -1453,7 +1453,7 @@ static void AM_drawFline(fline_t * fl, int color) int d = ax - ay / 2; while (1) { - PUTDOT_THICK(x, y, automap_smooth ? color : actual_color); + PUTDOT_THICK(x, y, automap_smooth_hr ? color : actual_color); if (y == fl->b.y) return; if (d >= 0) diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c index 34021493..7c0e8318 100644 --- a/src/heretic/mn_menu.c +++ b/src/heretic/mn_menu.c @@ -3142,9 +3142,9 @@ static void M_Draw_ID_Automap (void) MN_DrTextACentered("AUTOMAP", 10, cr[CR_YELLOW]); // Line smoothing - sprintf(str, automap_smooth ? "ON" : "OFF"); + sprintf(str, automap_smooth_hr ? "ON" : "OFF"); MN_DrTextA(str, M_ItemRightAlign(str), 20, - M_Item_Glow(0, automap_smooth ? GLOW_GREEN : GLOW_DARKRED)); + M_Item_Glow(0, automap_smooth_hr ? GLOW_GREEN : GLOW_DARKRED)); // Line thickness sprintf(str, "%s", thickness[automap_thick]); @@ -3182,7 +3182,7 @@ static void M_Draw_ID_Automap (void) static void M_ID_Automap_Smooth (int choice) { - automap_smooth ^= 1; + automap_smooth_hr ^= 1; } static void M_ID_Automap_Thick (int choice) @@ -4564,7 +4564,7 @@ static void M_ID_ApplyResetHook (void) widget_render = 0; widget_health = 0; // Automap - automap_smooth = 1; + automap_smooth_hr = 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 5adb324f..f21cfdcf 100644 --- a/src/hexen/am_map.c +++ b/src/hexen/am_map.c @@ -1239,7 +1239,7 @@ static void AM_drawFline(fline_t * fl, int color) { int actual_color; - if (automap_smooth) + if (automap_smooth_hr) { // Use antialiasing if enabled switch (color) @@ -1300,7 +1300,7 @@ static void AM_drawFline(fline_t * fl, int color) int d = ay - ax / 2; while (1) { - PUTDOT_THICK(x, y, automap_smooth ? color : actual_color); + PUTDOT_THICK(x, y, automap_smooth_hr ? color : actual_color); if (x == fl->b.x) return; if (d >= 0) @@ -1317,7 +1317,7 @@ static void AM_drawFline(fline_t * fl, int color) int d = ax - ay / 2; while (1) { - PUTDOT_THICK(x, y, automap_smooth ? color : actual_color); + PUTDOT_THICK(x, y, automap_smooth_hr ? color : actual_color); if (y == fl->b.y) return; if (d >= 0) diff --git a/src/hexen/mn_menu.c b/src/hexen/mn_menu.c index 382b0bad..c4c47725 100644 --- a/src/hexen/mn_menu.c +++ b/src/hexen/mn_menu.c @@ -3117,9 +3117,9 @@ static void M_Draw_ID_Automap (void) MN_DrTextACentered("AUTOMAP", 10, cr[CR_YELLOW]); // Line smoothing - sprintf(str, automap_smooth ? "ON" : "OFF"); + sprintf(str, automap_smooth_hr ? "ON" : "OFF"); MN_DrTextA(str, M_ItemRightAlign(str), 20, - M_Item_Glow(0, automap_smooth ? GLOW_GREEN : GLOW_DARKRED)); + M_Item_Glow(0, automap_smooth_hr ? GLOW_GREEN : GLOW_DARKRED)); // Line thickness sprintf(str, "%s", thickness[automap_thick]); @@ -3151,7 +3151,7 @@ static void M_Draw_ID_Automap (void) static void M_ID_Automap_Smooth (int choice) { - automap_smooth ^= 1; + automap_smooth_hr ^= 1; } static void M_ID_Automap_Thick (int choice) @@ -3869,7 +3869,7 @@ static void M_ID_ApplyResetHook (void) widget_render = 0; widget_health = 0; // Automap - automap_smooth = 1; + automap_smooth_hr = 1; automap_thick = 0; automap_square = 0; automap_rotate = 0; diff --git a/src/id_vars.h b/src/id_vars.h index 2a4edaa3..f9218c7f 100644 --- a/src/id_vars.h +++ b/src/id_vars.h @@ -88,6 +88,7 @@ extern int snd_remaster_ost; // Automap extern int automap_scheme; extern int automap_smooth; +extern int automap_smooth_hr; extern int automap_thick; extern int automap_square; extern int automap_secrets;