From 19682a58fa931323a0aca9d816d86aa75e1b489e Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 13 Sep 2020 13:43:15 -0700 Subject: [PATCH] Add CVar for displaying random calls --- hecl/include/hecl/CVarCommons.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hecl/include/hecl/CVarCommons.hpp b/hecl/include/hecl/CVarCommons.hpp index 490c59631..3c9a66d9e 100644 --- a/hecl/include/hecl/CVarCommons.hpp +++ b/hecl/include/hecl/CVarCommons.hpp @@ -35,6 +35,7 @@ struct CVarCommons { CVar* m_debugOverlayShowFrameCounter = nullptr; CVar* m_debugOverlayShowInGameTime = nullptr; CVar* m_debugOverlayShowResourceStats = nullptr; + CVar* m_debugOverlayShowRandomStats = nullptr; CVar* m_logFile = nullptr; CVarCommons(CVarManager& manager) : m_mgr(manager) { @@ -74,9 +75,12 @@ struct CVarCommons { m_debugOverlayShowResourceStats = m_mgr.findOrMakeCVar( "debugOverlay.showResourceStats"sv, "Displays the current live resource object and token counts"sv, false, hecl::CVar::EFlags::Game | hecl::CVar::EFlags::Archive | hecl::CVar::EFlags::ReadOnly); + m_debugOverlayShowRandomStats = m_mgr.findOrMakeCVar( + "debugOverlay.showRandomStats", "Displays the current number of random calls per frame"sv, false, + hecl::CVar::EFlags::Game | hecl::CVar::EFlags::Archive | hecl::CVar::EFlags::ReadOnly); m_logFile = m_mgr.findOrMakeCVar("logFile"sv, "Any log prints will be stored to this file upon exit"sv, "app.log"sv, hecl::CVar::EFlags::System | hecl::CVar::EFlags::Archive | - hecl::CVar::EFlags::ModifyRestart); + hecl::CVar::EFlags::ModifyRestart); } std::string getGraphicsApi() const { return m_graphicsApi->toLiteral(); } @@ -99,7 +103,6 @@ struct CVarCommons { void setLogFile(std::string_view log) { m_logFile->fromLiteral(log); } - void serialize() { m_mgr.serialize(); } };