From 425decdf7e9284d15aa726e3ae96b9942fb0e3ea Mon Sep 17 00:00:00 2001 From: IronClawTrem Date: Sun, 16 Feb 2020 03:40:06 +0000 Subject: create tremded branch --- src/qcommon/q3_lauxlib.cpp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/qcommon/q3_lauxlib.cpp (limited to 'src/qcommon/q3_lauxlib.cpp') diff --git a/src/qcommon/q3_lauxlib.cpp b/src/qcommon/q3_lauxlib.cpp new file mode 100644 index 0000000..ee7efa2 --- /dev/null +++ b/src/qcommon/q3_lauxlib.cpp @@ -0,0 +1,46 @@ +#include "q3_lauxlib.h" + +#include + +#include +#include + +#include "sys/sys_shared.h" + +#include "cvar.h" +#include "msg.h" +#include "net.h" +#include "q_shared.h" +#include "qcommon.h" + +size_t qlua_writestring(const char* string, size_t n) +{ +#ifndef DEDICATED + CL_ConsolePrint( string ); +#endif + Q_StripIndentMarker( const_cast(string) ); + Sys_Print( string ); + + return n; +} + +int qlua_writeline(void) +{ +#ifndef DEDICATED + CL_ConsolePrint( "\n" ); +#endif + Sys_Print( "\n" ); + return 0; +} + +int qlua_writestringerror(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + char m[MAXPRINTMSG]; + Q_vsnprintf(m, sizeof(m), fmt, ap); + va_end (ap); + Com_Printf(S_COLOR_YELLOW "%s\n", m); + return 0; +} + -- cgit