mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 11:12:29 +00:00
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>
This commit is contained in:
parent
8596860120
commit
32cfe08d0b
21 changed files with 366 additions and 73 deletions
|
|
@ -4,8 +4,14 @@
|
|||
|
||||
CStatus CStatus::s_errorList;
|
||||
|
||||
void CStatus::Add(const CStatus& status) {
|
||||
void CStatus::Add(const CStatus& source) {
|
||||
// TODO
|
||||
// Remove const_cast<> workaround
|
||||
CStatus& src = const_cast<CStatus&>(source);
|
||||
|
||||
for (auto i = src.statusList.Head(); i; i = src.statusList.Next(i)) {
|
||||
this->Add(i->severity, i->text);
|
||||
}
|
||||
}
|
||||
|
||||
void CStatus::Add(STATUS_TYPE severity, const char* format, ...) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#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,
|
||||
|
|
@ -10,6 +13,13 @@ enum STATUS_TYPE {
|
|||
};
|
||||
|
||||
class CStatus {
|
||||
public:
|
||||
struct STATUSENTRY {
|
||||
char* text;
|
||||
STATUS_TYPE severity;
|
||||
TSLink<CStatus::STATUSENTRY> link;
|
||||
};
|
||||
|
||||
public:
|
||||
// Static variables
|
||||
static CStatus s_errorList;
|
||||
|
|
@ -17,11 +27,14 @@ class CStatus {
|
|||
// 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:
|
||||
void* m_logFile = nullptr;
|
||||
HSLOG m_logFile = nullptr;
|
||||
};
|
||||
|
||||
CStatus& GetGlobalStatusObj(void);
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
#include "util/Log.hpp"
|
||||
|
||||
bool SLogCreate(const char* filename, uint32_t flags, void* log) {
|
||||
// TODO
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void SysMsgPrintf(SYSMSG_TYPE severity, const char* format, ...) {
|
||||
// TODO
|
||||
}
|
||||
5
src/util/SysMessage.cpp
Normal file
5
src/util/SysMessage.cpp
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#include "util/SysMessage.hpp"
|
||||
|
||||
void SysMsgPrintf(SYSMSG_TYPE severity, const char* format, ...) {
|
||||
// TODO
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef UTIL_LOG_HPP
|
||||
#define UTIL_LOG_HPP
|
||||
#ifndef UTIL_SYSMESSAGE_HPP
|
||||
#define UTIL_SYSMESSAGE_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
|
|
@ -11,8 +11,6 @@ enum SYSMSG_TYPE {
|
|||
SYSMSG_NUMTYPES = 0x4
|
||||
};
|
||||
|
||||
bool SLogCreate(const char*, uint32_t, void*);
|
||||
|
||||
void SysMsgPrintf(SYSMSG_TYPE, const char*, ...);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue