mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-23 12:22:45 +00:00
- added a new showtriggerlines mode that doesn't exclude doors.
- use lambdas for the AM checker functions.
This commit is contained in:
parent
bb7e191208
commit
a6761463af
3 changed files with 50 additions and 45 deletions
|
@ -90,7 +90,7 @@ CVAR (Bool, am_customcolors, true, CVAR_ARCHIVE);
|
||||||
CVAR (Int, am_map_secrets, 1, CVAR_ARCHIVE);
|
CVAR (Int, am_map_secrets, 1, CVAR_ARCHIVE);
|
||||||
CVAR (Int, am_drawmapback, 1, CVAR_ARCHIVE);
|
CVAR (Int, am_drawmapback, 1, CVAR_ARCHIVE);
|
||||||
CVAR (Bool, am_showkeys, true, CVAR_ARCHIVE);
|
CVAR (Bool, am_showkeys, true, CVAR_ARCHIVE);
|
||||||
CVAR (Bool, am_showtriggerlines, false, CVAR_ARCHIVE);
|
CVAR (Int, am_showtriggerlines, 0, CVAR_ARCHIVE);
|
||||||
CVAR (Int, am_showthingsprites, 0, CVAR_ARCHIVE);
|
CVAR (Int, am_showthingsprites, 0, CVAR_ARCHIVE);
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -2281,33 +2281,31 @@ bool AM_checkSpecialBoundary (line_t &line, bool (*function)(int, int *), int *s
|
||||||
return (line.backsector && AM_checkSectorActions(line.backsector, function, specialptr, argsptr, false));
|
return (line.backsector && AM_checkSectorActions(line.backsector, function, specialptr, argsptr, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AM_isTeleportSpecial (int special, int *)
|
bool AM_isTeleportBoundary (line_t &line)
|
||||||
|
{
|
||||||
|
return AM_checkSpecialBoundary(line, [](int special, int *)
|
||||||
{
|
{
|
||||||
return (special == Teleport ||
|
return (special == Teleport ||
|
||||||
special == Teleport_NoFog ||
|
special == Teleport_NoFog ||
|
||||||
special == Teleport_ZombieChanger ||
|
special == Teleport_ZombieChanger ||
|
||||||
special == Teleport_Line);
|
special == Teleport_Line);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AM_isTeleportBoundary (line_t &line)
|
bool AM_isExitBoundary (line_t& line)
|
||||||
{
|
{
|
||||||
return AM_checkSpecialBoundary(line, &AM_isTeleportSpecial);
|
return AM_checkSpecialBoundary(line, [](int special, int *)
|
||||||
}
|
|
||||||
|
|
||||||
bool AM_isExitSpecial (int special, int *)
|
|
||||||
{
|
{
|
||||||
return (special == Teleport_NewMap ||
|
return (special == Teleport_NewMap ||
|
||||||
special == Teleport_EndGame ||
|
special == Teleport_EndGame ||
|
||||||
special == Exit_Normal ||
|
special == Exit_Normal ||
|
||||||
special == Exit_Secret);
|
special == Exit_Secret);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AM_isExitBoundary (line_t& line)
|
bool AM_isTriggerBoundary (line_t &line)
|
||||||
{
|
{
|
||||||
return AM_checkSpecialBoundary(line, &AM_isExitSpecial);
|
return am_showtriggerlines == 1? AM_checkSpecialBoundary(line, [](int special, int *)
|
||||||
}
|
|
||||||
|
|
||||||
bool AM_isTriggerSpecial (int special, int *)
|
|
||||||
{
|
{
|
||||||
FLineSpecial *spec = P_GetLineSpecialInfo(special);
|
FLineSpecial *spec = P_GetLineSpecialInfo(special);
|
||||||
return spec != NULL
|
return spec != NULL
|
||||||
|
@ -2318,21 +2316,12 @@ bool AM_isTriggerSpecial (int special, int *)
|
||||||
&& special != Door_Raise
|
&& special != Door_Raise
|
||||||
&& special != Door_Animated
|
&& special != Door_Animated
|
||||||
&& special != Generic_Door;
|
&& special != Generic_Door;
|
||||||
}
|
}) : AM_checkSpecialBoundary(line, [](int special, int *)
|
||||||
|
|
||||||
bool AM_isTriggerBoundary (line_t &line)
|
|
||||||
{
|
{
|
||||||
return AM_checkSpecialBoundary(line, &AM_isTriggerSpecial);
|
FLineSpecial *spec = P_GetLineSpecialInfo(special);
|
||||||
}
|
return spec != NULL
|
||||||
|
&& spec->max_args >= 0;
|
||||||
bool AM_isLockSpecial (int special, int* args)
|
});
|
||||||
{
|
|
||||||
return special == Door_LockedRaise
|
|
||||||
|| special == ACS_LockedExecute
|
|
||||||
|| special == ACS_LockedExecuteDoor
|
|
||||||
|| (special == Door_Animated && args[3] != 0)
|
|
||||||
|| (special == Generic_Door && args[4] != 0)
|
|
||||||
|| (special == FS_Execute && args[2] != 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AM_isLockBoundary (line_t &line, int *lockptr = NULL)
|
bool AM_isLockBoundary (line_t &line, int *lockptr = NULL)
|
||||||
|
@ -2351,7 +2340,15 @@ bool AM_isLockBoundary (line_t &line, int *lockptr = NULL)
|
||||||
|
|
||||||
int special;
|
int special;
|
||||||
int *args;
|
int *args;
|
||||||
bool result = AM_checkSpecialBoundary(line, &AM_isLockSpecial, &special, &args);
|
bool result = AM_checkSpecialBoundary(line, [](int special, int* args)
|
||||||
|
{
|
||||||
|
return special == Door_LockedRaise
|
||||||
|
|| special == ACS_LockedExecute
|
||||||
|
|| special == ACS_LockedExecuteDoor
|
||||||
|
|| (special == Door_Animated && args[3] != 0)
|
||||||
|
|| (special == Generic_Door && args[4] != 0)
|
||||||
|
|| (special == FS_Execute && args[2] != 0);
|
||||||
|
}, &special, &args);
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
|
|
|
@ -106,6 +106,7 @@ CMPTMNU_RENDERINGBEHAVIOR = "Rendering Behaviour";
|
||||||
CMPTMNU_SOUNDBEHAVIOR = "Sound Behaviour";
|
CMPTMNU_SOUNDBEHAVIOR = "Sound Behaviour";
|
||||||
CMPTMNU_SECTORSOUNDS = "Sector sounds use centre as source";
|
CMPTMNU_SECTORSOUNDS = "Sector sounds use centre as source";
|
||||||
OPTVAL_MAPDEFINEDCOLORSONLY = "Map defined colours only";
|
OPTVAL_MAPDEFINEDCOLORSONLY = "Map defined colours only";
|
||||||
|
OPTVAL_NODOORS = "All except doors";
|
||||||
C_GRAY = "\ccgrey";
|
C_GRAY = "\ccgrey";
|
||||||
C_DARKGRAY = "\cudark grey";
|
C_DARKGRAY = "\cudark grey";
|
||||||
|
|
||||||
|
|
|
@ -1008,6 +1008,13 @@ OptionValue MapBackTypes
|
||||||
2, "$OPTVAL_MAPDEFINEDCOLORSONLY"
|
2, "$OPTVAL_MAPDEFINEDCOLORSONLY"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OptionValue MapTriggers
|
||||||
|
{
|
||||||
|
0, "$OPTVAL_OFF"
|
||||||
|
1, "$OPTVAL_NO_DOORS"
|
||||||
|
2, "$OPTVAL_ON"
|
||||||
|
}
|
||||||
|
|
||||||
OptionMenu AutomapOptions
|
OptionMenu AutomapOptions
|
||||||
{
|
{
|
||||||
Title "$AUTOMAPMNU_TITLE"
|
Title "$AUTOMAPMNU_TITLE"
|
||||||
|
@ -1031,7 +1038,7 @@ OptionMenu AutomapOptions
|
||||||
Option "$AUTOMAPMNU_SHOWMAPLABEL", "am_showmaplabel", "MaplabelTypes"
|
Option "$AUTOMAPMNU_SHOWMAPLABEL", "am_showmaplabel", "MaplabelTypes"
|
||||||
Option "$AUTOMAPMNU_DRAWMAPBACK", "am_drawmapback", "MapBackTypes"
|
Option "$AUTOMAPMNU_DRAWMAPBACK", "am_drawmapback", "MapBackTypes"
|
||||||
Option "$AUTOMAPMNU_SHOWKEYS", "am_showkeys", "OnOff"
|
Option "$AUTOMAPMNU_SHOWKEYS", "am_showkeys", "OnOff"
|
||||||
Option "$AUTOMAPMNU_SHOWTRIGGERLINES", "am_showtriggerlines", "OnOff"
|
Option "$AUTOMAPMNU_SHOWTRIGGERLINES", "am_showtriggerlines", "MapTriggers"
|
||||||
Option "$AUTOMAPMNU_SHOWTHINGSPRITES", "am_showthingsprites", "STSTypes"
|
Option "$AUTOMAPMNU_SHOWTHINGSPRITES", "am_showthingsprites", "STSTypes"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue