thunderbrew/src/util/CStatus.hpp
VDm 32cfe08d0b
feat(sound): Small script related improvements
* chore(build): rename src/util/Log.* to SysMessage.*

* chore(ui): implement SetNonSpaceWrap() for error messages

* chore(ui): move Video Script methods into CGVideoOptions class

* chore(script): temporary fix GetNumOutputDrivers to eliminate loading errors

* feat(sound): add SI2 Log methods

* chore(sound): add SI2 CVars

* chore(ui): implement Script_PlayGlueMusic

* chore(sound): update SI2::Init()

* fix: resolve compilation errors in variadic macros SI2_ERR and SI2_LOG

---------

Co-authored-by: Tristan Cormier <cormiert2@outlook.com>
2024-03-05 15:53:07 -05:00

42 lines
835 B
C++

#ifndef UTIL_C_STATUS_HPP
#define UTIL_C_STATUS_HPP
#include <storm/List.hpp>
#include <storm/Log.hpp>
enum STATUS_TYPE {
STATUS_INFO = 0x0,
STATUS_WARNING = 0x1,
STATUS_ERROR = 0x2,
STATUS_FATAL = 0x3,
STATUS_NUMTYPES = 0x4,
};
class CStatus {
public:
struct STATUSENTRY {
char* text;
STATUS_TYPE severity;
TSLink<CStatus::STATUSENTRY> link;
};
public:
// Static variables
static CStatus s_errorList;
// Member functions
void Add(const CStatus&);
void Add(STATUS_TYPE, const char*, ...);
public:
STORM_EXPLICIT_LIST(CStatus::STATUSENTRY, link) statusList;
};
class CWOWClientStatus : public CStatus {
public:
HSLOG m_logFile = nullptr;
};
CStatus& GetGlobalStatusObj(void);
#endif