mirror of https://github.com/ZDoom/qzdoom.git
Allow map markers to scale relative to automap zoom.
This commit is contained in:
parent
3fcb1cc847
commit
7c591cd0e9
|
@ -3130,11 +3130,20 @@ void DAutomap::drawAuthorMarkers ()
|
||||||
auto it = Level->GetActorIterator(mark->args[0]);
|
auto it = Level->GetActorIterator(mark->args[0]);
|
||||||
AActor *marked = mark->args[0] == 0 ? mark : it.Next();
|
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)
|
while (marked != nullptr)
|
||||||
{
|
{
|
||||||
if (mark->args[1] == 0 || (mark->args[1] == 1 && (marked->subsector->flags & SSECMF_DRAWN)))
|
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);
|
mark->Alpha, mark->fillcolor, mark->RenderStyle);
|
||||||
}
|
}
|
||||||
marked = mark->args[0] != 0 ? it.Next() : nullptr;
|
marked = mark->args[0] != 0 ? it.Next() : nullptr;
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
// args[1] == 0, show the sprite always
|
// args[1] == 0, show the sprite always
|
||||||
// == 1, show the sprite only after its sector has been drawn
|
// == 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,
|
// To enable display of the sprite, activate it. To turn off the sprite,
|
||||||
// deactivate it.
|
// deactivate it.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue