Add dvar descriptions

This commit is contained in:
Federico Cecchetto 2022-03-13 00:56:15 +01:00
parent ef87904c8b
commit 1dfa31b23c
18 changed files with 2432 additions and 2598 deletions

View File

@ -1,16 +1,17 @@
#include <std_include.hpp> #include <std_include.hpp>
#include "loader/component_loader.hpp" #include "loader/component_loader.hpp"
#include "command.hpp" #include "command.hpp"
#include "console.hpp" #include "console.hpp"
#include "game_console.hpp" #include "game_console.hpp"
#include "game/game.hpp" #include "game/game.hpp"
#include "game/dvars.hpp"
#include <utils/hook.hpp> #include <utils/hook.hpp>
#include <utils/string.hpp> #include <utils/string.hpp>
#include <utils/memory.hpp> #include <utils/memory.hpp>
#include "utils/io.hpp" #include <utils/io.hpp>
#include <game/dvars.hpp>
namespace command namespace command
{ {
@ -112,9 +113,12 @@ namespace command
const auto current = game::Dvar_ValueToString(dvar, dvar->current); const auto current = game::Dvar_ValueToString(dvar, dvar->current);
const auto reset = game::Dvar_ValueToString(dvar, dvar->reset); const auto reset = game::Dvar_ValueToString(dvar, dvar->reset);
console::info("\"%s\" is: \"%s\" default: \"%s\" hash: 0x%08lX", console::info("\"%s\" is: \"%s\" default: \"%s\" hash: 0x%08lX\n",
args[0], current, reset, dvar->hash); args[0], current, reset, dvar->hash);
const auto dvar_info = dvars::dvar_get_description(args[0]);
console::info("%s\n", dvar_info.data());
console::info(" %s\n", dvars::dvar_get_domain(dvar->type, dvar->domain).data()); console::info(" %s\n", dvars::dvar_get_domain(dvar->type, dvar->domain).data());
} }
else else

View File

@ -185,10 +185,10 @@ namespace dedicated
#endif #endif
// Register dedicated dvar // Register dedicated dvar
dvars::register_bool("dedicated", true, game::DVAR_FLAG_READ); dvars::register_bool("dedicated", true, game::DVAR_FLAG_READ, "Dedicated server");
// Add lanonly mode // Add lanonly mode
dvars::register_bool("sv_lanOnly", false, game::DVAR_FLAG_NONE); dvars::register_bool("sv_lanOnly", false, game::DVAR_FLAG_NONE, "Don't send heartbeat");
// Disable VirtualLobby // Disable VirtualLobby
dvars::override::register_bool("virtualLobbyEnabled", false, game::DVAR_FLAG_READ); dvars::override::register_bool("virtualLobbyEnabled", false, game::DVAR_FLAG_READ);

View File

@ -253,7 +253,7 @@ namespace exception
void post_unpack() override void post_unpack() override
{ {
dvars::cg_legacyCrashHandling = dvars::register_bool("cg_legacyCrashHandling", dvars::cg_legacyCrashHandling = dvars::register_bool("cg_legacyCrashHandling",
false, game::DVAR_FLAG_SAVED, true); false, game::DVAR_FLAG_SAVED, "Disable new crash handling");
} }
}; };
} }

View File

@ -127,7 +127,7 @@ namespace fps
game::dvar_t* cg_draw_fps_register_stub(const char* name, const char** _enum, const int value, unsigned int /*flags*/, game::dvar_t* cg_draw_fps_register_stub(const char* name, const char** _enum, const int value, unsigned int /*flags*/,
const char* desc) const char* desc)
{ {
cg_drawfps = dvars::register_int("cg_drawFps", 0, 0, 2, game::DVAR_FLAG_SAVED, false); cg_drawfps = dvars::register_int("cg_drawFps", 0, 0, 2, game::DVAR_FLAG_SAVED, "Draw frames per second");
return cg_drawfps; return cg_drawfps;
} }
} }
@ -160,7 +160,7 @@ namespace fps
if (game::environment::is_sp()) if (game::environment::is_sp())
{ {
cg_drawfps = dvars::register_int("cg_drawFps", 0, 0, 2, game::DVAR_FLAG_SAVED, false); cg_drawfps = dvars::register_int("cg_drawFps", 0, 0, 2, game::DVAR_FLAG_SAVED, "Draw frames per second");
} }
if (game::environment::is_mp()) if (game::environment::is_mp())
@ -168,13 +168,13 @@ namespace fps
// fix ping value // fix ping value
utils::hook::nop(0x14025AC41, 2); utils::hook::nop(0x14025AC41, 2);
cg_drawping = dvars::register_int("cg_drawPing", 0, 0, 1, game::DVAR_FLAG_SAVED, true); cg_drawping = dvars::register_int("cg_drawPing", 0, 0, 1, game::DVAR_FLAG_SAVED, "Choose to draw ping");
scheduler::loop(cg_draw_ping, scheduler::pipeline::renderer); scheduler::loop(cg_draw_ping, scheduler::pipeline::renderer);
} }
dvars::register_bool("cg_infobar_fps", false, game::DVAR_FLAG_SAVED, true); dvars::register_bool("cg_infobar_fps", false, game::DVAR_FLAG_SAVED, "Show server latency");
dvars::register_bool("cg_infobar_ping", false, game::DVAR_FLAG_SAVED, true); dvars::register_bool("cg_infobar_ping", false, game::DVAR_FLAG_SAVED, "Show FPS counter");
} }
}; };
} }

View File

@ -56,7 +56,7 @@ namespace game_console
std::deque<std::string> history{}; std::deque<std::string> history{};
std::string fixed_input{}; std::string fixed_input{};
std::vector<std::string> matches{}; std::vector<dvars::dvar_info> matches{};
float color_white[4] = {1.0f, 1.0f, 1.0f, 1.0f}; float color_white[4] = {1.0f, 1.0f, 1.0f, 1.0f};
float color_title[4] = {0.25f, 0.62f, 0.3f, 1.0f}; float color_title[4] = {0.25f, 0.62f, 0.3f, 1.0f};
@ -159,21 +159,22 @@ namespace game_console
con.globals.x = game::R_TextWidth(str, 0, console_font) + con.globals.x + 6.0f; con.globals.x = game::R_TextWidth(str, 0, console_font) + con.globals.x + 6.0f;
} }
void draw_hint_box(const int lines, float* color, [[maybe_unused]] float offset_x = 0.0f, float draw_hint_box(const int lines, float* color, [[maybe_unused]] float offset_x = 0.0f,
[[maybe_unused]] float offset_y = 0.0f) [[maybe_unused]] float offset_y = 0.0f)
{ {
const auto _h = lines * con.globals.font_height + 12.0f; const auto _h = lines * con.globals.font_height + 12.0f;
const auto _y = con.globals.y - 3.0f + con.globals.font_height + 12.0f; const auto _y = con.globals.y - 3.0f + con.globals.font_height + 12.0f + offset_y;
const auto _w = (con.screen_max[0] - con.screen_min[0]) - ((con.globals.x - 6.0f) - con.screen_min[0]); const auto _w = (con.screen_max[0] - con.screen_min[0]) - ((con.globals.x - 6.0f) - con.screen_min[0]);
draw_box(con.globals.x - 6.0f, _y, _w, _h, color); draw_box(con.globals.x - 6.0f, _y, _w, _h, color);
return _h;
} }
void draw_hint_text(const int line, const char* text, float* color, const float offset = 0.0f) void draw_hint_text(const int line, const char* text, float* color, const float offset_x = 0.0f, const float offset_y = 0.0f)
{ {
const auto _y = con.globals.font_height + con.globals.y + (con.globals.font_height * (line + 1)) + 15.0f; const auto _y = con.globals.font_height + con.globals.y + (con.globals.font_height * (line + 1)) + 15.0f + offset_y;
game::R_AddCmdDrawText(text, 0x7FFFFFFF, console_font, con.globals.x + offset, _y, 1.0f, 1.0f, 0.0f, color, 0); game::R_AddCmdDrawText(text, 0x7FFFFFFF, console_font, con.globals.x + offset_x, _y, 1.0f, 1.0f, 0.0f, color, 0);
} }
bool match_compare(const std::string& input, const std::string& text, const bool exact) bool match_compare(const std::string& input, const std::string& text, const bool exact)
@ -183,13 +184,13 @@ namespace game_console
return false; return false;
} }
void find_matches(std::string input, std::vector<std::string>& suggestions, const bool exact) void find_matches(std::string input, std::vector<dvars::dvar_info>& suggestions, const bool exact)
{ {
input = utils::string::to_lower(input); input = utils::string::to_lower(input);
for (const auto& dvar : dvars::dvar_list) for (const auto& dvar : dvars::dvar_list)
{ {
auto name = utils::string::to_lower(dvar); auto name = utils::string::to_lower(dvar.name);
if (game::Dvar_FindVar(name.data()) && match_compare(input, name, exact)) if (game::Dvar_FindVar(name.data()) && match_compare(input, name, exact))
{ {
suggestions.push_back(dvar); suggestions.push_back(dvar);
@ -203,7 +204,7 @@ namespace game_console
if (suggestions.size() == 0 && game::Dvar_FindVar(input.data())) if (suggestions.size() == 0 && game::Dvar_FindVar(input.data()))
{ {
suggestions.push_back(input.data()); suggestions.push_back({input.data(), ""});
} }
game::cmd_function_s* cmd = (*game::cmd_functions); game::cmd_function_s* cmd = (*game::cmd_functions);
@ -215,7 +216,7 @@ namespace game_console
if (match_compare(input, name, exact)) if (match_compare(input, name, exact))
{ {
suggestions.push_back(cmd->name); suggestions.push_back({cmd->name, ""});
} }
if (exact && suggestions.size() > 1) if (exact && suggestions.size() > 1)
@ -280,39 +281,46 @@ namespace game_console
} }
else if (matches.size() == 1) else if (matches.size() == 1)
{ {
auto* const dvar = game::Dvar_FindVar(matches[0].data()); auto* const dvar = game::Dvar_FindVar(matches[0].name.data());
const auto line_count = dvar ? 2 : 1; const auto line_count = dvar ? 3 : 1;
draw_hint_box(line_count, dvars::con_inputHintBoxColor->current.vector); const auto height = draw_hint_box(line_count, dvars::con_inputHintBoxColor->current.vector);
draw_hint_text(0, matches[0].data(), dvar draw_hint_text(0, matches[0].name.data(), dvar
? dvars::con_inputDvarMatchColor->current.vector ? dvars::con_inputDvarMatchColor->current.vector
: dvars::con_inputCmdMatchColor->current.vector); : dvars::con_inputCmdMatchColor->current.vector);
if (dvar) if (dvar)
{ {
const auto offset = (con.screen_max[0] - con.globals.x) / 2.5f; const auto offset = (con.screen_max[0] - con.globals.x) / 4.f;
draw_hint_text(0, game::Dvar_ValueToString(dvar, dvar->current), draw_hint_text(0, game::Dvar_ValueToString(dvar, dvar->current),
dvars::con_inputDvarValueColor->current.vector, offset); dvars::con_inputDvarValueColor->current.vector, offset);
draw_hint_text(1, " default", dvars::con_inputDvarInactiveValueColor->current.vector); draw_hint_text(1, " default", dvars::con_inputDvarInactiveValueColor->current.vector);
draw_hint_text(1, game::Dvar_ValueToString(dvar, dvar->reset), draw_hint_text(1, game::Dvar_ValueToString(dvar, dvar->reset),
dvars::con_inputDvarInactiveValueColor->current.vector, offset); dvars::con_inputDvarInactiveValueColor->current.vector, offset);
draw_hint_text(2, matches[0].description.data(),
color_white, 0);
const auto offset_y = height + 3.f;
draw_hint_box(1, dvars::con_inputHintBoxColor->current.vector, 0, offset_y);
draw_hint_text(0, dvars::dvar_get_domain(dvar->type, dvar->domain).data(),
dvars::con_inputCmdMatchColor->current.vector, 0, offset_y);
} }
strncpy_s(con.globals.auto_complete_choice, matches[0].data(), 64); strncpy_s(con.globals.auto_complete_choice, matches[0].name.data(), 64);
con.globals.may_auto_complete = true; con.globals.may_auto_complete = true;
} }
else if (matches.size() > 1) else if (matches.size() > 1)
{ {
draw_hint_box(static_cast<int>(matches.size()), dvars::con_inputHintBoxColor->current.vector); draw_hint_box(static_cast<int>(matches.size()), dvars::con_inputHintBoxColor->current.vector);
const auto offset = (con.screen_max[0] - con.globals.x) / 2.5f; const auto offset = (con.screen_max[0] - con.globals.x) / 4.f;
for (size_t i = 0; i < matches.size(); i++) for (size_t i = 0; i < matches.size(); i++)
{ {
auto* const dvar = game::Dvar_FindVar(matches[i].data()); auto* const dvar = game::Dvar_FindVar(matches[i].name.data());
draw_hint_text(static_cast<int>(i), matches[i].data(), draw_hint_text(static_cast<int>(i), matches[i].name.data(),
dvar dvar
? dvars::con_inputDvarMatchColor->current.vector ? dvars::con_inputDvarMatchColor->current.vector
: dvars::con_inputCmdMatchColor->current.vector); : dvars::con_inputCmdMatchColor->current.vector);
@ -321,10 +329,13 @@ namespace game_console
{ {
draw_hint_text(static_cast<int>(i), game::Dvar_ValueToString(dvar, dvar->current), draw_hint_text(static_cast<int>(i), game::Dvar_ValueToString(dvar, dvar->current),
dvars::con_inputDvarValueColor->current.vector, offset); dvars::con_inputDvarValueColor->current.vector, offset);
draw_hint_text(static_cast<int>(i), matches[i].description.data(),
dvars::con_inputDvarValueColor->current.vector, offset * 1.5f);
} }
} }
strncpy_s(con.globals.auto_complete_choice, matches[0].data(), 64); strncpy_s(con.globals.auto_complete_choice, matches[0].name.data(), 64);
con.globals.may_auto_complete = true; con.globals.may_auto_complete = true;
} }
} }

View File

@ -45,10 +45,10 @@ namespace gameplay
} }
utils::hook::call(0x1401E8830, jump_apply_slowdown_stub); utils::hook::call(0x1401E8830, jump_apply_slowdown_stub);
jump_slowDownEnable = dvars::register_bool("jump_slowDownEnable", true, game::DVAR_FLAG_REPLICATED, true); jump_slowDownEnable = dvars::register_bool("jump_slowDownEnable", true, game::DVAR_FLAG_REPLICATED, "Slow player movement after jumping");
utils::hook::call(0x1401E490F, pm_crashland_stub); utils::hook::call(0x1401E490F, pm_crashland_stub);
jump_enableFallDamage = dvars::register_bool("jump_enableFallDamage", true, game::DVAR_FLAG_REPLICATED, true); jump_enableFallDamage = dvars::register_bool("jump_enableFallDamage", true, game::DVAR_FLAG_REPLICATED, "Enable fall damage");
} }
}; };
} }

View File

@ -93,7 +93,7 @@ namespace logger
void print_dev(const char* msg, ...) void print_dev(const char* msg, ...)
{ {
static auto* enabled = dvars::register_bool("logger_dev", false, game::DVAR_FLAG_SAVED, true); static auto* enabled = dvars::register_bool("logger_dev", false, game::DVAR_FLAG_SAVED, "Print dev stuff");
if (!enabled->current.enabled) if (!enabled->current.enabled)
{ {
return; return;

View File

@ -162,9 +162,9 @@ namespace map_rotation
scheduler::once([]() scheduler::once([]()
{ {
dvars::register_string("sv_mapRotation", "", game::DVAR_FLAG_NONE, true); dvars::register_string("sv_mapRotation", "", game::DVAR_FLAG_NONE, "");
dvars::register_string("sv_mapRotationCurrent", "", game::DVAR_FLAG_NONE, true); dvars::register_string("sv_mapRotationCurrent", "", game::DVAR_FLAG_NONE, "");
dvars::register_string("sv_autoPriority", "", game::DVAR_FLAG_NONE, true); dvars::register_string("sv_autoPriority", "", game::DVAR_FLAG_NONE, "Lowers the process priority during map changes to not cause lags on other servers.");
}, scheduler::pipeline::main); }, scheduler::pipeline::main);
command::add("map_rotate", &perform_map_rotation); command::add("map_rotate", &perform_map_rotation);

View File

@ -209,7 +209,7 @@ namespace network
const char* description) const char* description)
{ {
game::dvar_t* dvar; game::dvar_t* dvar;
dvar = dvars::register_int("net_port", 27016, 0, 0xFFFFu, game::DVAR_FLAG_LATCHED); dvar = dvars::register_int("net_port", 27016, 0, 0xFFFFu, game::DVAR_FLAG_LATCHED, "Network port");
// read net_port from command line // read net_port from command line
command::read_startup_variable("net_port"); command::read_startup_variable("net_port");

View File

@ -56,10 +56,10 @@ namespace patches
if (game::environment::is_mp()) if (game::environment::is_mp())
{ {
// Make name save // Make name save
dvars::register_string("name", get_login_username().data(), game::DVAR_FLAG_SAVED, true); dvars::register_string("name", get_login_username().data(), game::DVAR_FLAG_SAVED, "Player name.");
// Disable data validation error popup // Disable data validation error popup
dvars::register_int("data_validation_allow_drop", 0, 0, 0, game::DVAR_FLAG_NONE, true); dvars::register_int("data_validation_allow_drop", 0, 0, 0, game::DVAR_FLAG_NONE, "");
} }
return com_register_dvars_hook.invoke<void>(); return com_register_dvars_hook.invoke<void>();
@ -206,7 +206,7 @@ namespace patches
// client side aim assist dvar // client side aim assist dvar
dvars::aimassist_enabled = dvars::register_bool("aimassist_enabled", true, dvars::aimassist_enabled = dvars::register_bool("aimassist_enabled", true,
game::DvarFlags::DVAR_FLAG_SAVED, game::DvarFlags::DVAR_FLAG_SAVED,
true); "Enables aim assist for controllers");
utils::hook::call(0x14009EE9E, aim_assist_add_to_target_list); utils::hook::call(0x14009EE9E, aim_assist_add_to_target_list);
// isProfanity // isProfanity
@ -235,6 +235,9 @@ namespace patches
utils::hook::nop(0x140190C16, 5); utils::hook::nop(0x140190C16, 5);
utils::hook::set<uint8_t>(0x14021D22A, 0xEB); utils::hook::set<uint8_t>(0x14021D22A, 0xEB);
// some anti tamper thing that kills performance
dvars::override::register_int("dvl", 0, 0, 0, game::DVAR_FLAG_READ);
// unlock safeArea_* // unlock safeArea_*
utils::hook::jump(0x1402624F5, 0x140262503); utils::hook::jump(0x1402624F5, 0x140262503);
utils::hook::jump(0x14026251C, 0x140262547); utils::hook::jump(0x14026251C, 0x140262547);
@ -252,7 +255,7 @@ namespace patches
dvars::override::register_int("cl_connectTimeout", 120, 120, 1800, game::DVAR_FLAG_NONE); // Seems unused dvars::override::register_int("cl_connectTimeout", 120, 120, 1800, game::DVAR_FLAG_NONE); // Seems unused
dvars::override::register_int("sv_connectTimeout", 120, 120, 1800, game::DVAR_FLAG_NONE); // 60 - 0 - 1800 dvars::override::register_int("sv_connectTimeout", 120, 120, 1800, game::DVAR_FLAG_NONE); // 60 - 0 - 1800
dvars::register_int("scr_game_spectatetype", 1, 0, 99, game::DVAR_FLAG_REPLICATED); dvars::register_int("scr_game_spectatetype", 1, 0, 99, game::DVAR_FLAG_REPLICATED, "");
dvars::override::register_bool("ui_drawcrosshair", true, game::DVAR_FLAG_WRITE); dvars::override::register_bool("ui_drawcrosshair", true, game::DVAR_FLAG_WRITE);

View File

@ -32,7 +32,7 @@ namespace ranked
dvars::override::register_bool("xblive_privatematch", false, game::DVAR_FLAG_REPLICATED | game::DVAR_FLAG_WRITE); dvars::override::register_bool("xblive_privatematch", false, game::DVAR_FLAG_REPLICATED | game::DVAR_FLAG_WRITE);
// Skip some check in _menus.gsc // Skip some check in _menus.gsc
dvars::register_bool("force_ranking", true, game::DVAR_FLAG_WRITE); dvars::register_bool("force_ranking", true, game::DVAR_FLAG_WRITE, "");
} }
// Always run bots, even if xblive_privatematch is 0 // Always run bots, even if xblive_privatematch is 0

View File

@ -55,7 +55,7 @@ namespace renderer
return; return;
} }
dvars::r_fullbright = dvars::register_int("r_fullbright", 0, 0, 3, game::DVAR_FLAG_SAVED); dvars::r_fullbright = dvars::register_int("r_fullbright", 0, 0, 3, game::DVAR_FLAG_SAVED, "Toggles rendering without lighting");
r_init_draw_method_hook.create(SELECT_VALUE(0x1404BD140, 0x1405C46E0), &r_init_draw_method_stub); r_init_draw_method_hook.create(SELECT_VALUE(0x1404BD140, 0x1405C46E0), &r_init_draw_method_stub);
r_update_front_end_dvar_options_hook.create(SELECT_VALUE(0x1404F8870, 0x1405FF9E0), &r_update_front_end_dvar_options_stub); r_update_front_end_dvar_options_hook.create(SELECT_VALUE(0x1404F8870, 0x1405FF9E0), &r_update_front_end_dvar_options_stub);

View File

@ -35,7 +35,8 @@ namespace shaders
const auto has_flag = utils::flags::has_flag("noshadercaching"); const auto has_flag = utils::flags::has_flag("noshadercaching");
disable_shader_caching = dvars::register_bool("disable_shader_caching", has_flag, game::DVAR_FLAG_SAVED, true); disable_shader_caching = dvars::register_bool("disable_shader_caching", has_flag,
game::DVAR_FLAG_SAVED, "Disable shader caching");
if (has_flag) if (has_flag)
{ {
dvars::override::set_bool("disable_shader_caching", 1); dvars::override::set_bool("disable_shader_caching", 1);

View File

@ -62,8 +62,10 @@ namespace stats
return; return;
} }
cg_unlock_all_items = dvars::register_bool("cg_unlockall_items", false, game::DVAR_FLAG_SAVED, true); cg_unlock_all_items = dvars::register_bool("cg_unlockall_items", false, game::DVAR_FLAG_SAVED,
dvars::register_bool("cg_unlockall_classes", false, game::DVAR_FLAG_SAVED, true); "Whether items should be locked based on the player's stats or always unlocked.");
dvars::register_bool("cg_unlockall_classes", false, game::DVAR_FLAG_SAVED,
"Whether classes should be locked based on the player's stats or always unlocked.");
is_item_unlocked_hook.create(0x140413E60, is_item_unlocked_stub); is_item_unlocked_hook.create(0x140413E60, is_item_unlocked_stub);
is_item_unlocked_hook2.create(0x140413860, is_item_unlocked_stub2); is_item_unlocked_hook2.create(0x140413860, is_item_unlocked_stub2);

View File

@ -462,7 +462,8 @@ namespace updater
void post_unpack() override void post_unpack() override
{ {
delete_old_file(); delete_old_file();
cl_auto_update = dvars::register_bool("cg_auto_update", true, game::DVAR_FLAG_SAVED, true); cl_auto_update = dvars::register_bool("cg_auto_update", true, game::DVAR_FLAG_SAVED,
"Automatically check for updates");
} }
}; };
} }

View File

@ -52,7 +52,8 @@ namespace virtuallobby
return; return;
} }
virtualLobby_fovscale = dvars::register_float("virtualLobby_fovScale", 0.7f, 0.0f, 2.0f, game::DVAR_FLAG_SAVED); virtualLobby_fovscale = dvars::register_float("virtualLobby_fovScale", 0.7f, 0.0f, 2.0f,
game::DVAR_FLAG_SAVED, "Field of view scaled for the virtual lobby");
utils::hook::nop(0x1400B555C, 14); utils::hook::nop(0x1400B555C, 14);
utils::hook::jump(0x1400B555C, get_fovscale_stub, true); utils::hook::jump(0x1400B555C, get_fovscale_stub, true);

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,12 @@
namespace dvars namespace dvars
{ {
struct dvar_info
{
std::string name;
std::string description;
};
extern game::dvar_t* aimassist_enabled; extern game::dvar_t* aimassist_enabled;
extern game::dvar_t* con_inputBoxColor; extern game::dvar_t* con_inputBoxColor;
@ -25,14 +31,20 @@ namespace dvars
extern game::dvar_t* cg_legacyCrashHandling; extern game::dvar_t* cg_legacyCrashHandling;
extern std::vector<std::string> dvar_list; extern std::vector<dvar_info> dvar_list;
std::string dvar_get_vector_domain(const int components, const game::dvar_limits& domain); std::string dvar_get_vector_domain(const int components, const game::dvar_limits& domain);
std::string dvar_get_domain(const game::dvar_type type, const game::dvar_limits& domain); std::string dvar_get_domain(const game::dvar_type type, const game::dvar_limits& domain);
std::string dvar_get_description(const std::string& name);
game::dvar_t* register_int(const std::string& name, int value, int min, int max, game::DvarFlags flags, bool add_to_list = true); game::dvar_t* register_int(const std::string& name, int value, int min, int max,
game::dvar_t* register_bool(const std::string& name, bool value, game::DvarFlags flags, bool add_to_list = true); game::DvarFlags flags, const std::string& description);
game::dvar_t* register_string(const std::string& name, const char* value, game::DvarFlags flags, bool add_to_list = true); game::dvar_t* register_bool(const std::string& name, bool value,
game::dvar_t* register_float(const std::string& name, float value, float min, float max, game::DvarFlags flags, bool add_to_list = true); game::DvarFlags flags, const std::string& description);
game::dvar_t* register_vec4(const std::string& name, float x, float y, float z, float w, float min, float max, game::DvarFlags flags, bool add_to_list = true); game::dvar_t* register_string(const std::string& name, const char* value,
game::DvarFlags flags, const std::string& description);
game::dvar_t* register_float(const std::string& name, float value, float min, float max,
game::DvarFlags flags, const std::string& description);
game::dvar_t* register_vec4(const std::string& name, float x, float y, float z, float w, float min,
float max, game::DvarFlags flags, const std::string& description);
} }