Update audio cvars from legacy to AZ_CVARs (#2182)
* Upgrade s_AudioLoggingOptions to AZ_CVAR Removes this legacy CVar and reimplements it as an AZ_CVAR with similar functionality of setting flags using alpha characters. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> * Upgrade s_DrawAudioDebug to AZ_CVAR Removes the legacy CVar and reimplements it as an AZ_CVAR with similar functionality and options. Additional updates to the logging options CVar to fix up flag enums. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> * Upgrade s_FileCacheManagerDebugFilter to AZ_CVAR Removes the legacy CVar and reimplements it as an AZ_CVAR with similar functionality. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> * Removal of legacy IConsole dependencies from Audio Moves a g_languageAudio cvar from CrySystem to AudioSystem. Convert all cvar commands to AZ_CONSOLEFREEFUNC's. Remove IConsole.h includes from source files. Removes the CSoundCVars class. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> * Minor update to cvar comments etc. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <IRenderer.h>
|
||||
#include <IRenderAuxGeom.h>
|
||||
#include <IConsole.h>
|
||||
|
||||
namespace Audio
|
||||
{
|
||||
@@ -850,7 +849,7 @@ namespace Audio
|
||||
{
|
||||
const float fDist = vPos.GetDistance(vListenerPos);
|
||||
|
||||
if ((g_audioCVars.m_nDrawAudioDebug & eADDF_DRAW_SPHERES) != 0)
|
||||
if (CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::DrawObjects))
|
||||
{
|
||||
const SAuxGeomRenderFlags nPreviousRenderFlags = auxGeom.GetRenderFlags();
|
||||
SAuxGeomRenderFlags nNewRenderFlags(e_Def3DPublicRenderflags | e_AlphaBlended);
|
||||
@@ -865,7 +864,7 @@ namespace Audio
|
||||
const float fFontSize = 1.3f;
|
||||
const float fLineHeight = 12.0f;
|
||||
|
||||
if ((g_audioCVars.m_nDrawAudioDebug & eADDF_SHOW_OBJECT_STATES) != 0)
|
||||
if (CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::ObjectStates))
|
||||
{
|
||||
AZ::Vector3 vSwitchPos(vScreenPos);
|
||||
|
||||
@@ -901,7 +900,7 @@ namespace Audio
|
||||
const AZ::Color normalTextColor(0.75f, 0.75f, 0.75f, 1.f);
|
||||
const AZ::Color dimmedTextColor(0.5f, 0.5f, 0.5f, 1.f);
|
||||
|
||||
if ((g_audioCVars.m_nDrawAudioDebug & eADDF_SHOW_OBJECT_LABEL) != 0)
|
||||
if (CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::ObjectLabels))
|
||||
{
|
||||
const TAudioObjectID nObjectID = GetID();
|
||||
auxGeom.Draw2dLabel(
|
||||
@@ -931,7 +930,7 @@ namespace Audio
|
||||
);
|
||||
}
|
||||
|
||||
if ((g_audioCVars.m_nDrawAudioDebug & eADDF_SHOW_OBJECT_TRIGGERS) != 0)
|
||||
if (CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::ObjectTriggers))
|
||||
{
|
||||
AZStd::string triggerStringFormatted;
|
||||
|
||||
@@ -963,7 +962,7 @@ namespace Audio
|
||||
triggerStringFormatted.c_str());
|
||||
}
|
||||
|
||||
if ((g_audioCVars.m_nDrawAudioDebug & eADDF_SHOW_OBJECT_RTPCS) != 0)
|
||||
if (CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::ObjectRtpcs))
|
||||
{
|
||||
AZ::Vector3 vRtpcPos(vScreenPos);
|
||||
|
||||
@@ -990,7 +989,7 @@ namespace Audio
|
||||
}
|
||||
}
|
||||
|
||||
if ((g_audioCVars.m_nDrawAudioDebug & eADDF_SHOW_OBJECT_ENVIRONMENTS) != 0)
|
||||
if (CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::ObjectEnvironments))
|
||||
{
|
||||
AZ::Vector3 vEnvPos(vScreenPos);
|
||||
|
||||
@@ -1041,8 +1040,8 @@ namespace Audio
|
||||
newRenderFlags.SetCullMode(e_CullModeNone);
|
||||
auxGeom.SetRenderFlags(newRenderFlags);
|
||||
|
||||
const bool drawRays = ((g_audioCVars.m_nDrawAudioDebug & eADDF_DRAW_OBSTRUCTION_RAYS) != 0);
|
||||
const bool drawLabels = ((g_audioCVars.m_nDrawAudioDebug & eADDF_SHOW_OBSTRUCTION_RAY_LABELS) != 0);
|
||||
const bool drawRays = CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::DrawRays);
|
||||
const bool drawLabels = CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::RayLabels);
|
||||
|
||||
size_t numRays = m_obstOccType == eAOOCT_SINGLE_RAY ? 1 : s_maxRaysPerObject;
|
||||
for (size_t rayIndex = 0; rayIndex < numRays; ++rayIndex)
|
||||
|
||||
Reference in New Issue
Block a user