mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 23:12:24 +00:00
- added forced automap style to linedef, UDMF only
https://forum.zdoom.org/viewtopic.php?t=59808
This commit is contained in:
parent
90cb0b3215
commit
c6f7d92c76
4 changed files with 57 additions and 0 deletions
|
@ -324,6 +324,30 @@ struct AMColorset
|
|||
}
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// automap colors forced by linedef
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
static const int AUTOMAP_LINE_COLORS[AMLS_COUNT] =
|
||||
{
|
||||
-1, // AMLS_Default (unused)
|
||||
AMColorset::WallColor, // AMLS_OneSided,
|
||||
AMColorset::TSWallColor, // AMLS_TwoSided
|
||||
AMColorset::FDWallColor, // AMLS_FloorDiff
|
||||
AMColorset::CDWallColor, // AMLS_CeilingDiff
|
||||
AMColorset::EFWallColor, // AMLS_ExtraFloor
|
||||
AMColorset::SpecialWallColor, // AMLS_Special
|
||||
AMColorset::SecretWallColor, // AMLS_Secret
|
||||
AMColorset::NotSeenColor, // AMLS_NotSeen
|
||||
AMColorset::LockedColor, // AMLS_Locked
|
||||
AMColorset::IntraTeleportColor, // AMLS_IntraTeleport
|
||||
AMColorset::InterTeleportColor, // AMLS_InterTeleport
|
||||
AMColorset::UnexploredSecretColor, // AMLS_UnexploredSecret
|
||||
AMColorset::PortalColor, // AMLS_Portal
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// predefined colorsets
|
||||
|
@ -2583,6 +2607,13 @@ void AM_drawWalls (bool allmap)
|
|||
}
|
||||
}
|
||||
|
||||
if (line.automapstyle > AMLS_Default && line.automapstyle < AMLS_COUNT
|
||||
&& (am_cheat == 0 || am_cheat >= 4))
|
||||
{
|
||||
AM_drawMline(&l, AUTOMAP_LINE_COLORS[line.automapstyle]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (portalmode)
|
||||
{
|
||||
AM_drawMline(&l, AMColors.PortalColor);
|
||||
|
|
|
@ -538,6 +538,7 @@ xx(Conversation)
|
|||
xx(Locknumber)
|
||||
xx(Midtex3dimpassible)
|
||||
xx(Revealed)
|
||||
xx(AutomapStyle)
|
||||
|
||||
xx(Playercross)
|
||||
xx(Playeruse)
|
||||
|
|
|
@ -1111,6 +1111,10 @@ public:
|
|||
Flag(ld->flags, ML_REVEALED, key);
|
||||
continue;
|
||||
|
||||
case NAME_AutomapStyle:
|
||||
ld->automapstyle = AutomapLineStyle(CheckInt(key));
|
||||
continue;
|
||||
|
||||
case NAME_MoreIds:
|
||||
// delay parsing of the tag string until parsing of the sector is complete
|
||||
// This ensures that the ID is always the first tag in the list.
|
||||
|
|
21
src/r_defs.h
21
src/r_defs.h
|
@ -1281,6 +1281,26 @@ struct side_t
|
|||
|
||||
};
|
||||
|
||||
enum AutomapLineStyle : int
|
||||
{
|
||||
AMLS_Default,
|
||||
AMLS_OneSided,
|
||||
AMLS_TwoSided,
|
||||
AMLS_FloorDiff,
|
||||
AMLS_CeilingDiff,
|
||||
AMLS_ExtraFloor,
|
||||
AMLS_Special,
|
||||
AMLS_Secret,
|
||||
AMLS_NotSeen,
|
||||
AMLS_Locked,
|
||||
AMLS_IntraTeleport,
|
||||
AMLS_InterTeleport,
|
||||
AMLS_UnexploredSecret,
|
||||
AMLS_Portal,
|
||||
|
||||
AMLS_COUNT
|
||||
};
|
||||
|
||||
struct line_t
|
||||
{
|
||||
vertex_t *v1, *v2; // vertices, from v1 to v2
|
||||
|
@ -1297,6 +1317,7 @@ struct line_t
|
|||
int locknumber; // [Dusk] lock number for special
|
||||
unsigned portalindex;
|
||||
unsigned portaltransferred;
|
||||
AutomapLineStyle automapstyle;
|
||||
|
||||
DVector2 Delta() const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue