mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-08 18:36:00 +03:00
* 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>
36 lines
969 B
C++
36 lines
969 B
C++
#include "ui/ScriptFunctions.hpp"
|
|
#include "ui/Types.hpp"
|
|
#include "util/Lua.hpp"
|
|
#include "util/Unimplemented.hpp"
|
|
#include <common/Time.hpp>
|
|
#include <cstdint>
|
|
|
|
int32_t Script_GetTime(lua_State* L) {
|
|
uint64_t ms = OsGetAsyncTimeMs();
|
|
lua_pushnumber(L, static_cast<double>(ms) / 1000.0);
|
|
|
|
return 1;
|
|
}
|
|
|
|
int32_t Script_GetGameTime(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_ConsoleExec(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_AccessDenied(lua_State* L) {
|
|
return luaL_error(L, "Access Denied");
|
|
}
|
|
|
|
FrameScript_Method FrameScript::s_ScriptFunctions_System[NUM_SCRIPT_FUNCTIONS_SYSTEM] = {
|
|
{ "GetTime", &Script_GetTime },
|
|
{ "GetGameTime", &Script_GetGameTime },
|
|
{ "ConsoleExec", &Script_ConsoleExec },
|
|
{ "ReadFile", &Script_AccessDenied },
|
|
{ "DeleteFile", &Script_AccessDenied },
|
|
{ "AppendToFile", &Script_AccessDenied },
|
|
{ "GetAccountExpansionLevel", &Script_GetAccountExpansionLevel }
|
|
};
|