17std::shared_ptr<Ship::CVar>
CVarGet(
const char* name);
API export/import macros for cross-platform shared library symbol visibility.
#define API_EXPORT
Marks a symbol for export from (or import into) a shared library.
Definition Api.h:32
API_EXPORT void CVarLoad()
Loads all CVar values from the persisted config file into the runtime store.
API_EXPORT void CVarClear(const char *name)
Removes the named CVar from the runtime store (does not affect persisted config).
API_EXPORT void CVarRegisterFloat(const char *name, float defaultValue)
Registers a float CVar with a default value if it has not been set before.
API_EXPORT void CVarSetFloat(const char *name, float value)
Sets the named CVar to a float value (creates it if it does not exist).
API_EXPORT bool CVarExists(const char *name)
Returns true if the named CVar currently has a value in the runtime store.
API_EXPORT void CVarRegisterString(const char *name, const char *defaultValue)
Registers a string CVar with a default value if it has not been set before.
API_EXPORT void CVarRegisterInteger(const char *name, int32_t defaultValue)
Registers an integer CVar with a default value if it has not been set before.
API_EXPORT void CVarSetString(const char *name, const char *value)
Sets the named CVar to a string value (creates it if it does not exist).
API_EXPORT void CVarClearBlock(const char *name)
Removes all CVars whose names begin with the given prefix.
API_EXPORT float CVarGetFloat(const char *name, float defaultValue)
Returns the float value of the named CVar, or defaultValue if it is not set.
void CVarSetConsoleVariable(std::shared_ptr< Ship::ConsoleVariable > consoleVariable)
API_EXPORT void CVarSave()
Saves all runtime CVar values to the persisted config file.
API_EXPORT Color_RGBA8 CVarGetColor(const char *name, Color_RGBA8 defaultValue)
Returns the RGBA colour value of the named CVar, or defaultValue if it is not set.
std::shared_ptr< Ship::CVar > CVarGet(const char *name)
Returns a shared pointer to the CVar with the given name, or nullptr if it does not exist.
API_EXPORT void CVarRegisterColor(const char *name, Color_RGBA8 defaultValue)
Registers an RGBA colour CVar with a default value if it has not been set before.
API_EXPORT void CVarSetColor(const char *name, Color_RGBA8 value)
Sets the named CVar to an RGBA colour value (creates it if it does not exist).
std::shared_ptr< Ship::ConsoleVariable > CVarGetConsoleVariable()
API_EXPORT const char * CVarGetString(const char *name, const char *defaultValue)
Returns the string value of the named CVar, or defaultValue if it is not set.
API_EXPORT void CVarSetColor24(const char *name, Color_RGB8 value)
Sets the named CVar to an RGB colour value (creates it if it does not exist).
API_EXPORT void CVarSetInteger(const char *name, int32_t value)
Sets the named CVar to an integer value (creates it if it does not exist).
API_EXPORT void CVarRegisterColor24(const char *name, Color_RGB8 defaultValue)
Registers an RGB colour CVar with a default value if it has not been set before.
API_EXPORT int32_t CVarGetInteger(const char *name, int32_t defaultValue)
Returns the integer value of the named CVar, or defaultValue if it is not set.
API_EXPORT Color_RGB8 CVarGetColor24(const char *name, Color_RGB8 defaultValue)
Returns the RGB colour value of the named CVar, or defaultValue if it is not set.
API_EXPORT void CVarCopy(const char *from, const char *to)
Copies the value of the CVar named from to a new CVar named to.
8-bit RGB colour without an alpha channel.
Definition color.h:14
8-bit RGBA colour (red, green, blue, alpha).
Definition color.h:26