mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
feat(console): load console variables from WTF files
This commit is contained in:
parent
b2a7a3d4ca
commit
1219279a2d
5 changed files with 170 additions and 2 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <cstdint>
|
||||
#include <common/String.hpp>
|
||||
#include <storm/Hash.hpp>
|
||||
#include <bc/os/File.hpp>
|
||||
|
||||
class CVar : public TSHashObject<CVar, HASHKEY_STRI> {
|
||||
public:
|
||||
|
|
@ -14,6 +15,7 @@ class CVar : public TSHashObject<CVar, HASHKEY_STRI> {
|
|||
// Static functions
|
||||
static CVar* Lookup(const char* name);
|
||||
static CVar* Register(const char*, const char*, uint32_t, const char*, bool (*)(CVar*, const char*, const char*, void*), uint32_t, bool, void*, bool);
|
||||
static void Initialize(const char* filename);
|
||||
|
||||
// Member variables
|
||||
uint32_t m_category = 0;
|
||||
|
|
@ -33,6 +35,8 @@ class CVar : public TSHashObject<CVar, HASHKEY_STRI> {
|
|||
CVar();
|
||||
int32_t GetInt();
|
||||
const char* GetString(void);
|
||||
int32_t Load(const char* filename);
|
||||
int32_t Load(HOSFILE fileHandle);
|
||||
void InternalSet(const char*, bool, bool, bool, bool);
|
||||
bool Set(const char*, bool, bool, bool, bool);
|
||||
int32_t Update();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue