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
|
|
@ -1,17 +1,34 @@
|
|||
#ifndef SOUND_SI2_HPP
|
||||
#define SOUND_SI2_HPP
|
||||
|
||||
#include "sound/SI2Script.hpp"
|
||||
#include "ui/Types.hpp"
|
||||
#include <storm/Log.hpp>
|
||||
#include <cstdint>
|
||||
#include <cstdarg>
|
||||
#include <fmod.hpp>
|
||||
#include <fmod_errors.h>
|
||||
|
||||
|
||||
#define SI2_ERR(errcode, format, ...) SI2::Log_Write(__LINE__, __FILE__, errcode, format, ##__VA_ARGS__)
|
||||
#define SI2_LOG(format, ...) SI2::Log_Write(__LINE__, __FILE__, FMOD_OK, format, ##__VA_ARGS__)
|
||||
|
||||
class SI2 {
|
||||
public:
|
||||
// Static variables
|
||||
static FrameScript_Method s_ScriptFunctions[NUM_SCRIPT_FUNCTIONS_SI2];
|
||||
static FrameScript_Method s_ScriptFunctions[];
|
||||
static uint32_t sm_logFlags;
|
||||
static HSLOG sm_log;
|
||||
static FMOD::System* sm_pGameSystem;
|
||||
static FMOD::System* sm_pChatSystem;
|
||||
|
||||
// Static functions
|
||||
static void RegisterScriptFunctions();
|
||||
static int32_t Log_Init();
|
||||
static void Log_Write(const char* format, ...);
|
||||
static void Log_Write(uint32_t line, const char* filename, FMOD_RESULT errcode, const char* format, ...);
|
||||
static void RegisterCVars();
|
||||
static int32_t Init(int32_t flag);
|
||||
static void StartGlueMusic(const char* filename);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue