r5sdk/r5dev/squirrel/sqtype.h
Kawe Mazidjatari 2cdc6b0962 Change template parameter in squirrel structure
Should be 'ScriptDataType_t'; this structure is pending a refactor.
2023-05-01 23:44:51 +02:00

52 lines
863 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;
typedef int ScriptDataType_t;
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