r5sdk/r5dev/squirrel/sqtype.h

73 lines
1.5 KiB
C
Raw Normal View History

2022-03-29 22:27:56 +02:00
#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 SQUnsignedInteger SQBool;
typedef SQInteger SQRESULT;
enum class SQCONTEXT : SQInteger
2022-03-29 22:27:56 +02:00
{
SERVER = 0,
CLIENT,
2022-03-31 02:26:05 +02:00
UI,
NONE
2022-03-29 22:27:56 +02:00
};
2022-06-12 17:41:26 +02:00
const static string SQVM_TYPE_T[4] =
2022-03-29 22:27:56 +02:00
{
"SERVER",
"CLIENT",
"UI",
2022-03-31 02:26:05 +02:00
"NONE"
2022-03-29 22:27:56 +02:00
};
2022-06-12 17:41:26 +02:00
const static string SQVM_LOG_T[4] =
2022-03-29 22:27:56 +02:00
{
"Script(S):",
"Script(C):",
"Script(U):",
"Script(X):"
};
2022-06-12 17:41:26 +02:00
const static string SQVM_ANSI_LOG_T[4] =
2022-03-29 22:27:56 +02:00
{
"\033[38;2;151;149;187mScript(S):",
"\033[38;2;151;149;163mScript(C):",
"\033[38;2;151;123;136mScript(U):",
"\033[38;2;151;149;163mScript(X):"
};
2022-06-12 17:41:26 +02:00
const static string SQVM_WARNING_ANSI_LOG_T[4] =
2022-03-29 22:27:56 +02:00
{
"\033[38;2;151;149;187mScript(S):\033[38;2;255;255;000m",
"\033[38;2;151;149;163mScript(C):\033[38;2;255;255;000m",
"\033[38;2;151;123;136mScript(U):\033[38;2;255;255;000m",
"\033[38;2;151;149;163mScript(X):\033[38;2;255;255;000m"
};
2022-06-12 17:41:26 +02:00
const static string SQVM_ERROR_ANSI_LOG_T[4] =
{
"\033[38;2;151;149;187mScript(S):\033[38;2;255;000;000m",
"\033[38;2;151;149;163mScript(C):\033[38;2;255;000;000m",
"\033[38;2;151;123;136mScript(U):\033[38;2;255;000;000m",
"\033[38;2;151;149;163mScript(X):\033[38;2;255;000;000m"
2022-03-29 22:27:56 +02:00
};
#endif // SQTYPE_H