From 3fcb1cc8477f92ae9dfb1d7ce24b8e16dc3f4643 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Fri, 8 Oct 2021 09:58:35 -0400 Subject: [PATCH 1/3] - update widepix --- wadsrc_widescreen/static | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc_widescreen/static b/wadsrc_widescreen/static index f3c2f72dc5..4eb419d9ca 160000 --- a/wadsrc_widescreen/static +++ b/wadsrc_widescreen/static @@ -1 +1 @@ -Subproject commit f3c2f72dc54729e00216798c13475ba83586263b +Subproject commit 4eb419d9ca7c8487d45585f7545f23d25165ce13 From 7c591cd0e9155c0264c516cc7de0ea0d01d7e4ef Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Thu, 7 Oct 2021 13:35:58 +0200 Subject: [PATCH 2/3] Allow map markers to scale relative to automap zoom. --- src/am_map.cpp | 11 ++++++++++- wadsrc/static/zscript/actors/shared/mapmarker.zs | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/am_map.cpp b/src/am_map.cpp index d2b225f4bc..2e269f7aaa 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -3130,11 +3130,20 @@ void DAutomap::drawAuthorMarkers () auto it = Level->GetActorIterator(mark->args[0]); AActor *marked = mark->args[0] == 0 ? mark : it.Next(); + double xscale = mark->Scale.X; + double yscale = mark->Scale.Y; + // [MK] scale with automap zoom if args[2] is 1, otherwise keep a constant scale + if (mark->args[2] == 1) + { + xscale = MTOF(xscale); + yscale = MTOF(yscale); + } + while (marked != nullptr) { if (mark->args[1] == 0 || (mark->args[1] == 1 && (marked->subsector->flags & SSECMF_DRAWN))) { - DrawMarker (tex, marked->X(), marked->Y(), 0, flip, mark->Scale.X, mark->Scale.Y, mark->Translation, + DrawMarker (tex, marked->X(), marked->Y(), 0, flip, xscale, yscale, mark->Translation, mark->Alpha, mark->fillcolor, mark->RenderStyle); } marked = mark->args[0] != 0 ? it.Next() : nullptr; diff --git a/wadsrc/static/zscript/actors/shared/mapmarker.zs b/wadsrc/static/zscript/actors/shared/mapmarker.zs index 25e1973077..bc372ae708 100644 --- a/wadsrc/static/zscript/actors/shared/mapmarker.zs +++ b/wadsrc/static/zscript/actors/shared/mapmarker.zs @@ -7,6 +7,9 @@ // args[1] == 0, show the sprite always // == 1, show the sprite only after its sector has been drawn // +// args[2] == 0, show the sprite with a constant scale +// == 1, show the sprite with a scale relative to automap zoom +// // To enable display of the sprite, activate it. To turn off the sprite, // deactivate it. // From d0975467f5994cb75e2467f2454d94604fefc514 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 9 Jul 2021 12:09:41 +0200 Subject: [PATCH 3/3] Add cvars to control automap line alpha and thickness This can be used to improve automap readability on high-resolution displays. Some automap options in the menu were reordered to follow a more logical order. --- src/am_map.cpp | 13 ++++++++++++- wadsrc/static/menudef.txt | 4 +++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/am_map.cpp b/src/am_map.cpp index 2e269f7aaa..148648ae8c 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -131,6 +131,8 @@ struct islope_t //============================================================================= CVAR(Bool, am_textured, false, CVAR_ARCHIVE) +CVAR(Float, am_linealpha, 1.0f, CVAR_ARCHIVE) +CVAR(Int, am_linethickness, 1, CVAR_ARCHIVE) CVAR(Bool, am_thingrenderstyles, true, CVAR_ARCHIVE) CVAR(Int, am_showsubsector, -1, 0); @@ -1735,7 +1737,16 @@ void DAutomap::drawMline (mline_t *ml, const AMColor &color) if (clipMline (ml, &fl)) { - twod->AddLine (f_x + fl.a.x, f_y + fl.a.y, f_x + fl.b.x, f_y + fl.b.y, -1, -1, INT_MAX, INT_MAX, color.RGB); + const int x1 = f_x + fl.a.x; + const int y1 = f_y + fl.a.y; + const int x2 = f_x + fl.b.x; + const int y2 = f_y + fl.b.y; + if (am_linethickness >= 2) { + twod->AddThickLine(x1, y1, x2, y2, am_linethickness, color.RGB, uint8_t(am_linealpha * 255)); + } else { + // Use more efficient thin line drawing routine. + twod->AddLine(x1, y1, x2, y2, -1, -1, INT_MAX, INT_MAX, color.RGB, uint8_t(am_linealpha * 255)); + } } } diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index a5878a3c68..19f109ac39 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1339,9 +1339,11 @@ OptionMenu AutomapOptions protected StaticText "" Option "$AUTOMAPMNU_ROTATE", "am_rotate", "RotateTypes" + Option "$AUTOMAPMNU_FOLLOW", "am_followplayer", "OnOff" Option "$AUTOMAPMNU_OVERLAY", "am_overlay", "OverlayTypes" Option "$AUTOMAPMNU_TEXTURED", "am_textured", "OnOff" - Option "$AUTOMAPMNU_FOLLOW", "am_followplayer", "OnOff" + Slider "$AUTOMAPMNU_LINEALPHA", "am_linealpha", 0.1, 1.0, 0.1, 1 + Slider "$AUTOMAPMNU_LINETHICKNESS", "am_linethickness", 1, 8, 1, 0 StaticText "" Option "$AUTOMAPMNU_SHOWITEMS", "am_showitems", "OnOff"