AngelScript
|
The API definition for AngelScript. More...
Classes | |
struct | asSFuncPtr |
Represents a function or method pointer. More... | |
struct | asSMessageInfo |
Represents a compiler message. More... | |
class | asIScriptEngine |
The engine interface. More... | |
class | asIScriptModule |
The interface to the script modules. More... | |
class | asIScriptContext |
The interface to the virtual machine. More... | |
class | asIScriptGeneric |
The interface for the generic calling convention. More... | |
class | asIScriptObject |
The interface for an instance of a script object. More... | |
class | asIObjectType |
The interface for an object type. More... | |
class | asIScriptFunction |
The interface for a script function description. More... | |
class | asIBinaryStream |
A binary stream interface. More... | |
struct | asSVMRegisters |
A struct with registers from the VM sent to a JIT compiled function. More... | |
class | asIJITCompiler |
The interface that AS use to interact with the JIT compiler. More... | |
struct | asSBCInfo |
Information on a bytecode instruction. More... | |
Defines | |
#define | ANGELSCRIPT_VERSION 22202 |
#define | asOFFSET(s, m) ((size_t)(&reinterpret_cast<s*>(100000)->m)-100000) |
Returns the offset of an attribute in a struct. | |
#define | asFUNCTION(f) asFunctionPtr(f) |
Returns an asSFuncPtr representing the function specified by the name. | |
#define | asFUNCTIONPR(f, p, r) asFunctionPtr((void (*)())(static_cast<r (*)p>(f))) |
Returns an asSFuncPtr representing the function specified by the name, parameter list, and return type. | |
#define | asMETHOD(c, m) asSMethodPtr<sizeof(void (c::*)())>::Convert((void (c::*)())(&c::m)) |
Returns an asSFuncPtr representing the class method specified by class and method name. | |
#define | asMETHODPR(c, m, p, r) asSMethodPtr<sizeof(void (c::*)())>::Convert(AS_METHOD_AMBIGUITY_CAST(r (c::*)p)(&c::m)) |
Returns an asSFuncPtr representing the class method specified by class, method name, parameter list, return type. | |
#define | AS_API |
A define that specifies how the function should be imported. | |
#define | asBC_DWORDARG(x) (asDWORD(*(x+1))) |
Macro to access the first DWORD argument in the bytecode instruction. | |
#define | asBC_INTARG(x) (int(*(x+1))) |
Macro to access the first 32bit integer argument in the bytecode instruction. | |
#define | asBC_QWORDARG(x) (*(asQWORD*)(x+1)) |
Macro to access the first QWORD argument in the bytecode instruction. | |
#define | asBC_FLOATARG(x) (*(float*)(x+1)) |
Macro to access the first float argument in the bytecode instruction. | |
#define | asBC_PTRARG(x) (*(asPTRWORD*)(x+1)) |
Macro to access the first pointer argument in the bytecode instruction. | |
#define | asBC_WORDARG0(x) (*(((asWORD*)x)+1)) |
Macro to access the first WORD argument in the bytecode instruction. | |
#define | asBC_WORDARG1(x) (*(((asWORD*)x)+2)) |
Macro to access the second WORD argument in the bytecode instruction. | |
#define | asBC_SWORDARG0(x) (*(((short*)x)+1)) |
Macro to access the first signed WORD argument in the bytecode instruction. | |
#define | asBC_SWORDARG1(x) (*(((short*)x)+2)) |
Macro to access the second signed WORD argument in the bytecode instruction. | |
#define | asBC_SWORDARG2(x) (*(((short*)x)+3)) |
Macro to access the third signed WORD argument in the bytecode instruction. | |
Typedefs | |
typedef unsigned char | asBYTE |
8 bit unsigned integer | |
typedef unsigned short | asWORD |
16 bit unsigned integer | |
typedef unsigned int | asUINT |
32 bit unsigned integer | |
typedef size_t | asPWORD |
Unsigned integer with the size of a pointer. | |
typedef unsigned long | asDWORD |
32 bit unsigned integer | |
typedef unsigned __int64 | asQWORD |
64 bit unsigned integer | |
typedef __int64 | asINT64 |
64 bit integer | |
typedef void *(* | asALLOCFUNC_t )(size_t) |
The function signature for the custom memory allocation function. | |
typedef void(* | asFREEFUNC_t )(void *) |
The function signature for the custom memory deallocation function. | |
typedef void(* | asCLEANENGINEFUNC_t )(asIScriptEngine *) |
The function signature for the engine cleanup callback function. | |
typedef void(* | asCLEANMODULEFUNC_t )(asIScriptModule *) |
The function signature for the module cleanup callback function. | |
typedef void(* | asCLEANCONTEXTFUNC_t )(asIScriptContext *) |
The function signature for the context cleanup callback function. | |
typedef void(* | asCLEANFUNCTIONFUNC_t )(asIScriptFunction *) |
The function signature for the function cleanup callback function. | |
typedef void(* | asCLEANOBJECTTYPEFUNC_t )(asIObjectType *) |
The function signature for the object type cleanup callback function. | |
typedef void(* | asJITFunction )(asSVMRegisters *registers, asPWORD jitArg) |
The function signature of a JIT compiled function. | |
Enumerations | |
enum | asEEngineProp { asEP_ALLOW_UNSAFE_REFERENCES = 1, asEP_OPTIMIZE_BYTECODE = 2, asEP_COPY_SCRIPT_SECTIONS = 3, asEP_MAX_STACK_SIZE = 4, asEP_USE_CHARACTER_LITERALS = 5, asEP_ALLOW_MULTILINE_STRINGS = 6, asEP_ALLOW_IMPLICIT_HANDLE_TYPES = 7, asEP_BUILD_WITHOUT_LINE_CUES = 8, asEP_INIT_GLOBAL_VARS_AFTER_BUILD = 9, asEP_REQUIRE_ENUM_SCOPE = 10, asEP_SCRIPT_SCANNER = 11, asEP_INCLUDE_JIT_INSTRUCTIONS = 12, asEP_STRING_ENCODING = 13, asEP_PROPERTY_ACCESSOR_MODE = 14, asEP_EXPAND_DEF_ARRAY_TO_TMPL = 15, asEP_AUTO_GARBAGE_COLLECT = 16, asEP_DISALLOW_GLOBAL_VARS = 17, asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT = 18 } |
Engine properties. More... | |
enum | asECallConvTypes { asCALL_CDECL = 0, asCALL_STDCALL = 1, asCALL_THISCALL = 2, asCALL_CDECL_OBJLAST = 3, asCALL_CDECL_OBJFIRST = 4, asCALL_GENERIC = 5 } |
Calling conventions. More... | |
enum | asEObjTypeFlags { asOBJ_REF = 0x01, asOBJ_VALUE = 0x02, asOBJ_GC = 0x04, asOBJ_POD = 0x08, asOBJ_NOHANDLE = 0x10, asOBJ_SCOPED = 0x20, asOBJ_TEMPLATE = 0x40, asOBJ_ASHANDLE = 0x80, asOBJ_APP_CLASS = 0x100, asOBJ_APP_CLASS_CONSTRUCTOR = 0x200, asOBJ_APP_CLASS_DESTRUCTOR = 0x400, asOBJ_APP_CLASS_ASSIGNMENT = 0x800, asOBJ_APP_CLASS_COPY_CONSTRUCTOR = 0x1000, asOBJ_APP_CLASS_C = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR), asOBJ_APP_CLASS_CD = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_DESTRUCTOR), asOBJ_APP_CLASS_CA = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_ASSIGNMENT), asOBJ_APP_CLASS_CK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), asOBJ_APP_CLASS_CDA = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_DESTRUCTOR + asOBJ_APP_CLASS_ASSIGNMENT), asOBJ_APP_CLASS_CDK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_DESTRUCTOR + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), asOBJ_APP_CLASS_CAK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_ASSIGNMENT + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), asOBJ_APP_CLASS_CDAK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_CONSTRUCTOR + asOBJ_APP_CLASS_DESTRUCTOR + asOBJ_APP_CLASS_ASSIGNMENT + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), asOBJ_APP_CLASS_D = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_DESTRUCTOR), asOBJ_APP_CLASS_DA = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_DESTRUCTOR + asOBJ_APP_CLASS_ASSIGNMENT), asOBJ_APP_CLASS_DK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_DESTRUCTOR + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), asOBJ_APP_CLASS_DAK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_DESTRUCTOR + asOBJ_APP_CLASS_ASSIGNMENT + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), asOBJ_APP_CLASS_A = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_ASSIGNMENT), asOBJ_APP_CLASS_AK = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_ASSIGNMENT + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), asOBJ_APP_CLASS_K = (asOBJ_APP_CLASS + asOBJ_APP_CLASS_COPY_CONSTRUCTOR), asOBJ_APP_PRIMITIVE = 0x2000, asOBJ_APP_FLOAT = 0x4000, asOBJ_APP_CLASS_ALLINTS = 0x8000, asOBJ_APP_CLASS_ALLFLOATS = 0x10000 , asOBJ_SCRIPT_OBJECT = 0x80000, asOBJ_SHARED = 0x100000, asOBJ_NOINHERIT = 0x200000 } |
Object type flags. More... | |
enum | asEBehaviours { asBEHAVE_CONSTRUCT, asBEHAVE_DESTRUCT, asBEHAVE_FACTORY, asBEHAVE_LIST_FACTORY, asBEHAVE_ADDREF, asBEHAVE_RELEASE, asBEHAVE_VALUE_CAST, asBEHAVE_IMPLICIT_VALUE_CAST, asBEHAVE_REF_CAST, asBEHAVE_IMPLICIT_REF_CAST, asBEHAVE_TEMPLATE_CALLBACK , asBEHAVE_GETREFCOUNT = asBEHAVE_FIRST_GC, asBEHAVE_SETGCFLAG, asBEHAVE_GETGCFLAG, asBEHAVE_ENUMREFS, asBEHAVE_RELEASEREFS } |
Behaviours. More... | |
enum | asERetCodes { asSUCCESS = 0, asERROR = -1, asCONTEXT_ACTIVE = -2, asCONTEXT_NOT_FINISHED = -3, asCONTEXT_NOT_PREPARED = -4, asINVALID_ARG = -5, asNO_FUNCTION = -6, asNOT_SUPPORTED = -7, asINVALID_NAME = -8, asNAME_TAKEN = -9, asINVALID_DECLARATION = -10, asINVALID_OBJECT = -11, asINVALID_TYPE = -12, asALREADY_REGISTERED = -13, asMULTIPLE_FUNCTIONS = -14, asNO_MODULE = -15, asNO_GLOBAL_VAR = -16, asINVALID_CONFIGURATION = -17, asINVALID_INTERFACE = -18, asCANT_BIND_ALL_FUNCTIONS = -19, asLOWER_ARRAY_DIMENSION_NOT_REGISTERED = -20, asWRONG_CONFIG_GROUP = -21, asCONFIG_GROUP_IS_IN_USE = -22, asILLEGAL_BEHAVIOUR_FOR_TYPE = -23, asWRONG_CALLING_CONV = -24, asBUILD_IN_PROGRESS = -25, asINIT_GLOBAL_VARS_FAILED = -26 } |
Return codes. More... | |
enum | asEContextState { asEXECUTION_FINISHED = 0, asEXECUTION_SUSPENDED = 1, asEXECUTION_ABORTED = 2, asEXECUTION_EXCEPTION = 3, asEXECUTION_PREPARED = 4, asEXECUTION_UNINITIALIZED = 5, asEXECUTION_ACTIVE = 6, asEXECUTION_ERROR = 7 } |
Context states. More... | |
enum | asEMsgType { asMSGTYPE_ERROR = 0, asMSGTYPE_WARNING = 1, asMSGTYPE_INFORMATION = 2 } |
Compiler message types. More... | |
enum | asEGCFlags { asGC_FULL_CYCLE = 1, asGC_ONE_STEP = 2, asGC_DESTROY_GARBAGE = 4, asGC_DETECT_GARBAGE = 8 } |
Garbage collector flags. More... | |
enum | asETokenClass { asTC_UNKNOWN = 0, asTC_KEYWORD = 1, asTC_VALUE = 2, asTC_IDENTIFIER = 3, asTC_COMMENT = 4, asTC_WHITESPACE = 5 } |
Token classes. More... | |
enum | asETypeIdFlags { asTYPEID_VOID = 0, asTYPEID_BOOL = 1, asTYPEID_INT8 = 2, asTYPEID_INT16 = 3, asTYPEID_INT32 = 4, asTYPEID_INT64 = 5, asTYPEID_UINT8 = 6, asTYPEID_UINT16 = 7, asTYPEID_UINT32 = 8, asTYPEID_UINT64 = 9, asTYPEID_FLOAT = 10, asTYPEID_DOUBLE = 11, asTYPEID_OBJHANDLE = 0x40000000, asTYPEID_HANDLETOCONST = 0x20000000, asTYPEID_MASK_OBJECT = 0x1C000000, asTYPEID_APPOBJECT = 0x04000000, asTYPEID_SCRIPTOBJECT = 0x08000000, asTYPEID_TEMPLATE = 0x10000000, asTYPEID_MASK_SEQNBR = 0x03FFFFFF } |
Type id flags. More... | |
enum | asETypeModifiers { asTM_NONE = 0, asTM_INREF = 1, asTM_OUTREF = 2, asTM_INOUTREF = 3 } |
Type modifiers. More... | |
enum | asEGMFlags { asGM_ONLY_IF_EXISTS = 0, asGM_CREATE_IF_NOT_EXISTS = 1, asGM_ALWAYS_CREATE = 2 } |
Flags for GetModule. More... | |
enum | asECompileFlags { asCOMP_ADD_TO_MODULE = 1 } |
Flags for compilation. More... | |
enum | asEFuncType { , asFUNC_SYSTEM = 0, asFUNC_SCRIPT = 1, asFUNC_INTERFACE = 2, asFUNC_VIRTUAL = 3, asFUNC_FUNCDEF = 4, asFUNC_IMPORTED = 5 } |
Function types. More... | |
enum | asEBCInstr { asBC_POP = 0, asBC_PUSH = 1, asBC_PshC4 = 2, asBC_PshV4 = 3, asBC_PSF = 4, asBC_SwapPtr = 5, asBC_NOT = 6, asBC_PshG4 = 7, asBC_LdGRdR4 = 8, asBC_CALL = 9, asBC_RET = 10, asBC_JMP = 11, asBC_JZ = 12, asBC_JNZ = 13, asBC_JS = 14, asBC_JNS = 15, asBC_JP = 16, asBC_JNP = 17, asBC_TZ = 18, asBC_TNZ = 19, asBC_TS = 20, asBC_TNS = 21, asBC_TP = 22, asBC_TNP = 23, asBC_NEGi = 24, asBC_NEGf = 25, asBC_NEGd = 26, asBC_INCi16 = 27, asBC_INCi8 = 28, asBC_DECi16 = 29, asBC_DECi8 = 30, asBC_INCi = 31, asBC_DECi = 32, asBC_INCf = 33, asBC_DECf = 34, asBC_INCd = 35, asBC_DECd = 36, asBC_IncVi = 37, asBC_DecVi = 38, asBC_BNOT = 39, asBC_BAND = 40, asBC_BOR = 41, asBC_BXOR = 42, asBC_BSLL = 43, asBC_BSRL = 44, asBC_BSRA = 45, asBC_COPY = 46, asBC_PshC8 = 47, asBC_PshVPtr = 48, asBC_RDSPtr = 49, asBC_CMPd = 50, asBC_CMPu = 51, asBC_CMPf = 52, asBC_CMPi = 53, asBC_CMPIi = 54, asBC_CMPIf = 55, asBC_CMPIu = 56, asBC_JMPP = 57, asBC_PopRPtr = 58, asBC_PshRPtr = 59, asBC_STR = 60, asBC_CALLSYS = 61, asBC_CALLBND = 62, asBC_SUSPEND = 63, asBC_ALLOC = 64, asBC_FREE = 65, asBC_LOADOBJ = 66, asBC_STOREOBJ = 67, asBC_GETOBJ = 68, asBC_REFCPY = 69, asBC_CHKREF = 70, asBC_GETOBJREF = 71, asBC_GETREF = 72, asBC_PshNull = 73, asBC_ClrVPtr = 74, asBC_OBJTYPE = 75, asBC_TYPEID = 76, asBC_SetV4 = 77, asBC_SetV8 = 78, asBC_ADDSi = 79, asBC_CpyVtoV4 = 80, asBC_CpyVtoV8 = 81, asBC_CpyVtoR4 = 82, asBC_CpyVtoR8 = 83, asBC_CpyVtoG4 = 84, asBC_CpyRtoV4 = 85, asBC_CpyRtoV8 = 86, asBC_CpyGtoV4 = 87, asBC_WRTV1 = 88, asBC_WRTV2 = 89, asBC_WRTV4 = 90, asBC_WRTV8 = 91, asBC_RDR1 = 92, asBC_RDR2 = 93, asBC_RDR4 = 94, asBC_RDR8 = 95, asBC_LDG = 96, asBC_LDV = 97, asBC_PGA = 98, asBC_CmpPtr = 99, asBC_VAR = 100, asBC_iTOf = 101, asBC_fTOi = 102, asBC_uTOf = 103, asBC_fTOu = 104, asBC_sbTOi = 105, asBC_swTOi = 106, asBC_ubTOi = 107, asBC_uwTOi = 108, asBC_dTOi = 109, asBC_dTOu = 110, asBC_dTOf = 111, asBC_iTOd = 112, asBC_uTOd = 113, asBC_fTOd = 114, asBC_ADDi = 115, asBC_SUBi = 116, asBC_MULi = 117, asBC_DIVi = 118, asBC_MODi = 119, asBC_ADDf = 120, asBC_SUBf = 121, asBC_MULf = 122, asBC_DIVf = 123, asBC_MODf = 124, asBC_ADDd = 125, asBC_SUBd = 126, asBC_MULd = 127, asBC_DIVd = 128, asBC_MODd = 129, asBC_ADDIi = 130, asBC_SUBIi = 131, asBC_MULIi = 132, asBC_ADDIf = 133, asBC_SUBIf = 134, asBC_MULIf = 135, asBC_SetG4 = 136, asBC_ChkRefS = 137, asBC_ChkNullV = 138, asBC_CALLINTF = 139, asBC_iTOb = 140, asBC_iTOw = 141, asBC_SetV1 = 142, asBC_SetV2 = 143, asBC_Cast = 144, asBC_i64TOi = 145, asBC_uTOi64 = 146, asBC_iTOi64 = 147, asBC_fTOi64 = 148, asBC_dTOi64 = 149, asBC_fTOu64 = 150, asBC_dTOu64 = 151, asBC_i64TOf = 152, asBC_u64TOf = 153, asBC_i64TOd = 154, asBC_u64TOd = 155, asBC_NEGi64 = 156, asBC_INCi64 = 157, asBC_DECi64 = 158, asBC_BNOT64 = 159, asBC_ADDi64 = 160, asBC_SUBi64 = 161, asBC_MULi64 = 162, asBC_DIVi64 = 163, asBC_MODi64 = 164, asBC_BAND64 = 165, asBC_BOR64 = 166, asBC_BXOR64 = 167, asBC_BSLL64 = 168, asBC_BSRL64 = 169, asBC_BSRA64 = 170, asBC_CMPi64 = 171, asBC_CMPu64 = 172, asBC_ChkNullS = 173, asBC_ClrHi = 174, asBC_JitEntry = 175, asBC_CallPtr = 176, asBC_FuncPtr = 177, asBC_LoadThisR = 178, asBC_PshV8 = 179, asBC_DIVu = 180, asBC_MODu = 181, asBC_DIVu64 = 182, asBC_MODu64 = 183, asBC_LoadRObjR = 184, asBC_LoadVObjR = 185 } |
The bytecode instructions used by the VM. More... | |
enum | asEBCType { , asBCTYPE_NO_ARG = 1, asBCTYPE_W_ARG = 2, asBCTYPE_wW_ARG = 3, asBCTYPE_DW_ARG = 4, asBCTYPE_rW_DW_ARG = 5, asBCTYPE_QW_ARG = 6, asBCTYPE_DW_DW_ARG = 7, asBCTYPE_wW_rW_rW_ARG = 8, asBCTYPE_wW_QW_ARG = 9, asBCTYPE_wW_rW_ARG = 10, asBCTYPE_rW_ARG = 11, asBCTYPE_wW_DW_ARG = 12, asBCTYPE_wW_rW_DW_ARG = 13, asBCTYPE_rW_rW_ARG = 14, asBCTYPE_wW_W_ARG = 15, asBCTYPE_QW_DW_ARG = 16, asBCTYPE_rW_QW_ARG = 17, asBCTYPE_W_DW_ARG = 18, asBCTYPE_rW_W_DW_ARG = 19 } |
Describes the structure of a bytecode instruction. More... | |
Functions | |
AS_API asIScriptEngine * | asCreateScriptEngine (asDWORD version) |
Creates the script engine. | |
AS_API const char * | asGetLibraryVersion () |
Returns the version of the compiled library. | |
AS_API const char * | asGetLibraryOptions () |
Returns the options used to compile the library. | |
AS_API asIScriptContext * | asGetActiveContext () |
Returns the currently active context. | |
AS_API int | asThreadCleanup () |
Cleans up memory allocated for the current thread. | |
AS_API int | asSetGlobalMemoryFunctions (asALLOCFUNC_t allocFunc, asFREEFUNC_t freeFunc) |
Set the memory management functions that AngelScript should use. | |
AS_API int | asResetGlobalMemoryFunctions () |
Remove previously registered memory management functions. | |
Variables | |
const int | asBCTypeSize [20] |
Lookup table for determining the size of each type of bytecode instruction. | |
const asSBCInfo | asBCInfo [256] |
Information on each bytecode instruction. |
This header file describes the complete application programming interface for AngelScript.
#define ANGELSCRIPT_VERSION 22202 |
Version 2.22.2
typedef void(* asJITFunction)(asSVMRegisters *registers, asPWORD jitArg) |
[in] | registers | A pointer to the virtual machine's registers. |
[in] | jitArg | The value defined by the JIT compiler for the current entry point in the JIT function. |
A JIT function receives a pointer to the virtual machine's registers when called and an argument telling it where in the script function to continue the execution. The JIT function must make sure to update the VM's registers according to the actions performed before returning control to the VM.
enum asEBCInstr |
asBC_POP |
Decrease the stack with the amount in the argument. |
asBC_PUSH |
Increase the stack with the amount in the argument. |
asBC_PshC4 |
Push the 32bit value in the argument onto the stack. |
asBC_PshV4 |
Push the 32bit value from a variable onto the stack. |
asBC_PSF |
Push the address of the stack frame onto the stack. |
asBC_SwapPtr |
Swap the top two pointers on the stack. |
asBC_NOT |
Perform a boolean not on the value in a variable. |
asBC_PshG4 |
Push the 32bit value from a global variable onto the stack. |
asBC_LdGRdR4 | |
asBC_CALL |
Jump to a script function, indexed by the argument. |
asBC_RET |
Return to the instruction after the last executed call. |
asBC_JMP |
Unconditional jump to a relative position in this function. |
asBC_JZ |
If the value register is 0 jump to a relative position in this function. |
asBC_JNZ |
If the value register is not 0 jump to a relative position in this function. |
asBC_JS |
If the value register is less than 0 jump to a relative position in this function. |
asBC_JNS |
If the value register is greater than or equal to 0 jump to a relative position in this function. |
asBC_JP |
If the value register is greater than 0 jump to a relative position in this function. |
asBC_JNP |
If the value register is less than or equal to 0 jump to a relative position in this function. |
asBC_TZ |
If the value register is 0 set it to 1. |
asBC_TNZ |
If the value register is not 0 set it to 1. |
asBC_TS |
If the value register is less than 0 set it to 1. |
asBC_TNS |
If the value register is greater than or equal to 0 set it to 1. |
asBC_TP |
If the value register is greater than 0 set it to 1. |
asBC_TNP |
If the value register is less than or equal to 0 set it to 1. |
asBC_NEGi |
Negate the 32bit integer value in the variable. |
asBC_NEGf |
Negate the float value in the variable. |
asBC_NEGd |
Negate the double value in the variable. |
asBC_INCi16 |
Increment the 16bit integer value that is stored at the address pointed to by the reference in the value register. |
asBC_INCi8 |
Increment the 8bit integer value that is stored at the address pointed to by the reference in the value register. |
asBC_DECi16 |
Decrement the 16bit integer value that is stored at the address pointed to by the reference in the value register. |
asBC_DECi8 |
Increment the 8bit integer value that is stored at the address pointed to by the reference in the value register. |
asBC_INCi |
Increment the 32bit integer value that is stored at the address pointed to by the reference in the value register. |
asBC_DECi |
Decrement the 32bit integer value that is stored at the address pointed to by the reference in the value register. |
asBC_INCf |
Increment the float value that is stored at the address pointed to by the reference in the value register. |
asBC_DECf |
Decrement the float value that is stored at the address pointed to by the reference in the value register. |
asBC_INCd |
Increment the double value that is stored at the address pointed to by the reference in the value register. |
asBC_DECd |
Decrement the double value that is stored at the address pointed to by the reference in the value register. |
asBC_IncVi |
Increment the 32bit integer value in the variable. |
asBC_DecVi |
Decrement the 32bit integer value in the variable. |
asBC_BNOT |
Perform a bitwise complement on the 32bit value in the variable. |
asBC_BAND |
Perform a bitwise and of two 32bit values and store the result in a third variable. |
asBC_BOR |
Perform a bitwise or of two 32bit values and store the result in a third variable. |
asBC_BXOR |
Perform a bitwise exclusive or of two 32bit values and store the result in a third variable. |
asBC_BSLL |
Perform a logical left shift of a 32bit value and store the result in a third variable. |
asBC_BSRL |
Perform a logical right shift of a 32bit value and store the result in a third variable. |
asBC_BSRA |
Perform a arithmetical right shift of a 32bit value and store the result in a third variable. |
asBC_COPY |
Pop the destination and source addresses from the stack. Perform a bitwise copy of the referred object. Push the destination address on the stack. |
asBC_PshC8 |
Push a 64bit value on the stack. |
asBC_PshVPtr |
Push a pointer from the variable on the stack. |
asBC_RDSPtr |
Pop top address, read a pointer from it, and push the pointer onto the stack. |
asBC_CMPd |
Compare two double variables and store the result in the value register. |
asBC_CMPu |
Compare two unsigned 32bit integer variables and store the result in the value register. |
asBC_CMPf |
Compare two float variables and store the result in the value register. |
asBC_CMPi |
Compare two 32bit integer variables and store the result in the value register. |
asBC_CMPIi |
Compare 32bit integer variable with constant and store the result in value register. |
asBC_CMPIf |
Compare float variable with constant and store the result in value register. |
asBC_CMPIu |
Compare unsigned 32bit integer variable with constant and store the result in value register. |
asBC_JMPP |
Jump to relative position in the function where the offset is stored in a variable. |
asBC_PopRPtr |
Pop a pointer from the stack and store it in the value register. |
asBC_PshRPtr |
Push a pointer from the value register onto the stack. |
asBC_STR |
Push string address and length on the stack. |
asBC_CALLSYS |
Call registered function. Suspend further execution if requested. |
asBC_CALLBND |
Jump to an imported script function, indexed by the argument. |
asBC_SUSPEND |
Call line callback function if set. Suspend execution if requested. |
asBC_ALLOC |
Allocate the memory for the object. If the type is a script object then jump to the constructor, else call the registered constructor behaviour. Suspend further execution if requested. |
asBC_FREE |
Pop the address of the object variable from the stack. If ref type, call the release method, else call the destructor then free the memory. Clear the pointer in the variable. |
asBC_LOADOBJ |
Copy the object pointer from a variable to the object register. Clear the variable. |
asBC_STOREOBJ |
Copy the object pointer from the object register to the variable. Clear the object register. |
asBC_GETOBJ |
Move object pointer from variable onto stack location. |
asBC_REFCPY |
Pop destination handle reference. Perform a handle assignment, while updating the reference count for both previous and new objects. |
asBC_CHKREF |
Throw an exception if the pointer on the top of the stack is null. |
asBC_GETOBJREF |
Replace a variable index on the stack with the object handle stored in that variable. |
asBC_GETREF |
Replace a variable index on the stack with the address of the variable. |
asBC_PshNull |
Push a null pointer on the stack. |
asBC_ClrVPtr |
Clear pointer in a variable. |
asBC_OBJTYPE |
Push the pointer argument onto the stack. The pointer is a pointer to an object type structure. |
asBC_TYPEID |
Push the type id onto the stack. Equivalent to PshC4. |
asBC_SetV4 |
Initialize the variable with a DWORD. |
asBC_SetV8 |
Initialize the variable with a QWORD. |
asBC_ADDSi |
Add a value to the top pointer on the stack, thus updating the address itself. |
asBC_CpyVtoV4 |
Copy a DWORD from one variable to another. |
asBC_CpyVtoV8 |
Copy a QWORD from one variable to another. |
asBC_CpyVtoR4 |
Copy a DWORD from a variable into the value register. |
asBC_CpyVtoR8 |
Copy a QWORD from a variable into the value register. |
asBC_CpyVtoG4 |
Copy a DWORD from a local variable to a global variable. |
asBC_CpyRtoV4 |
Copy a DWORD from the value register into a variable. |
asBC_CpyRtoV8 |
Copy a QWORD from the value register into a variable. |
asBC_CpyGtoV4 |
Copy a DWORD from a global variable to a local variable. |
asBC_WRTV1 |
Copy a BYTE from a variable to the address held in the value register. |
asBC_WRTV2 |
Copy a WORD from a variable to the address held in the value register. |
asBC_WRTV4 |
Copy a DWORD from a variable to the address held in the value register. |
asBC_WRTV8 |
Copy a QWORD from a variable to the address held in the value register. |
asBC_RDR1 |
Copy a BYTE from address held in the value register to a variable. Clear the top bytes in the variable. |
asBC_RDR2 |
Copy a WORD from address held in the value register to a variable. Clear the top word in the variable. |
asBC_RDR4 |
Copy a DWORD from address held in the value register to a variable. |
asBC_RDR8 |
Copy a QWORD from address held in the value register to a variable. |
asBC_LDG |
Load the address of a global variable into the value register. |
asBC_LDV |
Load the address of a local variable into the value register. |
asBC_PGA |
Push the address of a global variable on the stack. |
asBC_CmpPtr |
Compare two pointers. |
asBC_VAR |
Push the index of the variable on the stack, with the size of a pointer. |
asBC_iTOf |
Convert the 32bit integer value to a float in the variable. |
asBC_fTOi |
Convert the float value to a 32bit integer in the variable. |
asBC_uTOf |
Convert the unsigned 32bit integer value to a float in the variable. |
asBC_fTOu |
Convert the float value to an unsigned 32bit integer in the variable. |
asBC_sbTOi |
Expand the low byte as a signed value to a full 32bit integer in the variable. |
asBC_swTOi |
Expand the low word as a signed value to a full 32bit integer in the variable. |
asBC_ubTOi |
Expand the low byte as an unsigned value to a full 32bit integer in the variable. |
asBC_uwTOi |
Expand the low word as an unsigned value to a full 32bit integer in the variable. |
asBC_dTOi |
Convert the double value in one variable to a 32bit integer in another variable. |
asBC_dTOu |
Convert the double value in one variable to a 32bit unsigned integer in another variable. |
asBC_dTOf |
Convert the double value in one variable to a float in another variable. |
asBC_iTOd |
Convert the 32bit integer value in one variable to a double in another variable. |
asBC_uTOd |
Convert the 32bit unsigned integer value in one variable to a double in another variable. |
asBC_fTOd |
Convert the float value in one variable to a double in another variable. |
asBC_ADDi |
Add the values of two 32bit integer variables and store in a third variable. |
asBC_SUBi |
Subtract the values of two 32bit integer variables and store in a third variable. |
asBC_MULi |
Multiply the values of two 32bit integer variables and store in a third variable. |
asBC_DIVi |
Divide the values of two 32bit integer variables and store in a third variable. |
asBC_MODi |
Calculate the modulo of values of two 32bit integer variables and store in a third variable. |
asBC_ADDf |
Add the values of two float variables and store in a third variable. |
asBC_SUBf |
Subtract the values of two float variables and store in a third variable. |
asBC_MULf |
Multiply the values of two float variables and store in a third variable. |
asBC_DIVf |
Divide the values of two float variables and store in a third variable. |
asBC_MODf |
Calculate the modulo of values of two float variables and store in a third variable. |
asBC_ADDd |
Add the values of two double variables and store in a third variable. |
asBC_SUBd |
Subtract the values of two double variables and store in a third variable. |
asBC_MULd |
Multiply the values of two double variables and store in a third variable. |
asBC_DIVd |
Divide the values of two double variables and store in a third variable. |
asBC_MODd |
Calculate the modulo of values of two double variables and store in a third variable. |
asBC_ADDIi |
Add a 32bit integer variable with a constant value and store the result in another variable. |
asBC_SUBIi |
Subtract a 32bit integer variable with a constant value and store the result in another variable. |
asBC_MULIi |
Multiply a 32bit integer variable with a constant value and store the result in another variable. |
asBC_ADDIf |
Add a float variable with a constant value and store the result in another variable. |
asBC_SUBIf |
Subtract a float variable with a constant value and store the result in another variable. |
asBC_MULIf |
Multiply a float variable with a constant value and store the result in another variable. |
asBC_SetG4 |
Set the value of global variable to a 32bit word. |
asBC_ChkRefS |
Throw an exception if the address stored on the stack points to a null pointer. |
asBC_ChkNullV |
Throw an exception if the variable is null. |
asBC_CALLINTF |
Jump to an interface method, indexed by the argument. |
asBC_iTOb |
Convert a 32bit integer in a variable to a byte, clearing the top bytes. |
asBC_iTOw |
Convert a 32bit integer in a variable to a word, clearing the top word. |
asBC_SetV1 |
Same as SetV4. |
asBC_SetV2 |
Same as SetV4. |
asBC_Cast |
Pop an object handle to a script class from the stack. Perform a dynamic cast on it and store the result in the object register. |
asBC_i64TOi |
Convert the 64bit integer value in one variable to a 32bit integer in another variable. |
asBC_uTOi64 |
Convert the 32bit unsigned integer value in one variable to a 64bit integer in another variable. |
asBC_iTOi64 |
Convert the 32bit integer value in one variable to a 64bit integer in another variable. |
asBC_fTOi64 |
Convert the float value in one variable to a 64bit integer in another variable. |
asBC_dTOi64 |
Convert the double value in the variable to a 64bit integer. |
asBC_fTOu64 |
Convert the float value in one variable to a 64bit unsigned integer in another variable. |
asBC_dTOu64 |
Convert the double value in the variable to a 64bit unsigned integer. |
asBC_i64TOf |
Convert the 64bit integer value in one variable to a float in another variable. |
asBC_u64TOf |
Convert the 64bit unsigned integer value in one variable to a float in another variable. |
asBC_i64TOd |
Convert the 32bit integer value in the variable to a double. |
asBC_u64TOd |
Convert the 32bit unsigned integer value in the variable to a double. |
asBC_NEGi64 |
Negate the 64bit integer value in the variable. |
asBC_INCi64 |
Increment the 64bit integer value that is stored at the address pointed to by the reference in the value register. |
asBC_DECi64 |
Decrement the 64bit integer value that is stored at the address pointed to by the reference in the value register. |
asBC_BNOT64 |
Perform a bitwise complement on the 64bit value in the variable. |
asBC_ADDi64 |
Perform an addition with two 64bit integer variables and store the result in a third variable. |
asBC_SUBi64 |
Perform a subtraction with two 64bit integer variables and store the result in a third variable. |
asBC_MULi64 |
Perform a multiplication with two 64bit integer variables and store the result in a third variable. |
asBC_DIVi64 |
Perform a division with two 64bit integer variables and store the result in a third variable. |
asBC_MODi64 |
Perform the modulo operation with two 64bit integer variables and store the result in a third variable. |
asBC_BAND64 |
Perform a bitwise and of two 64bit values and store the result in a third variable. |
asBC_BOR64 |
Perform a bitwise or of two 64bit values and store the result in a third variable. |
asBC_BXOR64 |
Perform a bitwise exclusive or of two 64bit values and store the result in a third variable. |
asBC_BSLL64 |
Perform a logical left shift of a 64bit value and store the result in a third variable. |
asBC_BSRL64 |
Perform a logical right shift of a 64bit value and store the result in a third variable. |
asBC_BSRA64 |
Perform a arithmetical right shift of a 64bit value and store the result in a third variable. |
asBC_CMPi64 |
Compare two 64bit integer variables and store the result in the value register. |
asBC_CMPu64 |
Compare two unsigned 64bit integer variables and store the result in the value register. |
asBC_ChkNullS |
Check if a pointer on the stack is null, and if it is throw an exception. The argument is relative to the top of the stack. |
asBC_ClrHi |
Clear the upper bytes of the value register so that only the value in the lowest byte is kept. |
asBC_JitEntry |
If a JIT function is available and the argument is not 0 then call the JIT function. |
asBC_CallPtr |
Call a function stored in a local function pointer. |
asBC_FuncPtr |
Push a function pointer on the stack. |
asBC_LoadThisR |
Load the address to a property of the local object into the stack. PshV4 0, ADDSi x, PopRPtr. |
asBC_PshV8 |
Push the 64bit value from a variable onto the stack. |
asBC_DIVu |
Divide the values of two 32bit unsigned integer variables and store in a third variable. |
asBC_MODu |
Calculate the modulo of values of two 32bit unsigned integer variables and store in a third variable. |
asBC_DIVu64 |
Divide the values of two 64bit unsigned integer variables and store in a third variable. |
asBC_MODu64 |
Calculate the modulo of values of two 64bit unsigned integer variables and store in a third variable. |
asBC_LoadRObjR |
Load address of member of reference object into register. |
asBC_LoadVObjR |
Load address of member of value object into register. |
enum asEBCType |
enum asEBehaviours |
enum asECallConvTypes |
enum asECompileFlags |
enum asEContextState |
enum asEEngineProp |
enum asEFuncType |
enum asEGCFlags |
enum asEGMFlags |
enum asEMsgType |
enum asEObjTypeFlags |
enum asERetCodes |
enum asETokenClass |
enum asETypeIdFlags |
enum asETypeModifiers |
AS_API asIScriptEngine* asCreateScriptEngine | ( | asDWORD | version | ) |
[in] | version | The library version. Should always be ANGELSCRIPT_VERSION. |
Call this function to create a new script engine. When you're done with the script engine, i.e. after you've executed all your scripts, you should call Release on the pointer to free the engine object.
AS_API asIScriptContext* asGetActiveContext | ( | ) |
This function is most useful for registered functions, as it will allow them to obtain a pointer to the context that is calling the function, and through that get the engine, or custom user data.
If the script library is compiled with multithread support, this function will return the context that is currently active in the thread that is being executed. It will thus work even if there are multiple threads executing scripts at the same time.
This function does not increase the reference count of the context.
AS_API const char* asGetLibraryOptions | ( | ) |
This can be used to identify at run-time different ways to configure the engine. For example, if the returned string contain the identifier AS_MAX_PORTABILITY then functions and methods must be registered with the asCALL_GENERIC calling convention.
AS_API const char* asGetLibraryVersion | ( | ) |
The returned string can be used for presenting the library version in a log file, or in the GUI.
AS_API int asResetGlobalMemoryFunctions | ( | ) |
Call this method to restore the default memory management functions.
AS_API int asSetGlobalMemoryFunctions | ( | asALLOCFUNC_t | allocFunc, |
asFREEFUNC_t | freeFunc | ||
) |
[in] | allocFunc | The function that will be used to allocate memory. |
[in] | freeFunc | The function that will be used to free the memory. |
Call this method to register the global memory allocation and deallocation functions that AngelScript should use for memory management. This function Should be called before asCreateScriptEngine.
If not called, AngelScript will use the malloc and free functions from the standard C library.
AS_API int asThreadCleanup | ( | ) |
asCONTEXT_ACTIVE | A context is still active. |
Call this method before terminating a thread that has accessed the engine to clean up memory allocated for that thread.
It's not necessary to call this if only a single thread accesses the engine.