Skip to content

Commit

Permalink
Use correct variables for H&H antialiasing
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictress committed Jan 7, 2025
1 parent d1d3120 commit 696c524
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/heretic/am_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions src/heretic/mn_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/hexen/am_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions src/hexen/mn_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/id_vars.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 696c524

Please sign in to comment.