r5sdk/r5dev/squirrel/sqtype.h
Kawe Mazidjatari 793fcd62f2 End of logger refactor
Changed all loggers to use the internal 'CoreMsg/CoreMsgV' functions. Significantly reduced duplicate code and CPU time. Code is also much more robust.

* Code now only acquires mutex lock when the actual logging part takes place.
* Code now only checks and strip ANSI rows if its enabled to begin with.
* Code now supports setting log levels, which ultimately could be tweaked with a cvar.
* Changed logger and file names to be more readable.

TODO:
* The RCON protocol has to be modified to accommodate these changes.
2023-03-26 16:09:05 +02:00

50 lines
832 B
C++

#ifndef SQTYPE_H
#define SQTYPE_H
#define SQ_OK (1)
#define SQ_ERROR (-1)
#define SQ_FAILED(res) (res<0)
#define SQ_SUCCEEDED(res) (res>=0)
#define SQ_SUSPEND_FLAG -666
#define SQ_TAILCALL_FLAG -777
#define DONT_FALL_BACK 666
//#define EXISTS_FALL_BACK -1
#define GET_FLAG_RAW 0x00000001
#define GET_FLAG_DO_NOT_RAISE_ERROR 0x00000002
typedef char SQChar;
typedef float SQFloat;
typedef long SQInteger;
typedef unsigned long SQUnsignedInteger;
typedef void* SQFunctor;
typedef SQUnsignedInteger SQBool;
typedef SQInteger SQRESULT;
enum class SQCONTEXT : SQInteger
{
SERVER = 0,
CLIENT,
UI,
NONE
};
constexpr const char* s_SqContext[4] =
{
"SERVER",
"CLIENT",
"UI",
"NONE"
};
constexpr const char* s_ScriptContext[4] =
{
"Script(S):",
"Script(C):",
"Script(U):",
"Script(X):"
};
#endif // SQTYPE_H