quint64 qasGetReturnQWord( int contextHandle ) { contexthandle_t *ch = qasGetContextHandle( contextHandle ); if( !ch ) QAS_Error( "qasGetReturnQWord: invalid context\n" ); return ch->ctx->GetReturnQWord(); }
unsigned int qasGetReturnBool( int contextHandle ) { contexthandle_t *ch = qasGetContextHandle( contextHandle ); if( !ch ) QAS_Error( "qasGetReturnBool: invalid context\n" ); return (unsigned char)ch->ctx->GetReturnByte(); }
unsigned int qasGetReturnDWord( int contextHandle ) { contexthandle_t *ch = qasGetContextHandle( contextHandle ); if( !ch ) QAS_Error( "qasGetReturnDWord: invalid context\n" ); return (unsigned int)ch->ctx->GetReturnDWord(); }
size_t qasGetEngineProperty( int engineHandle, int property ) { enginehandle_t *eh; eh = qasGetEngineHandle( engineHandle ); if( !eh ) QAS_Error( "qasGetEngineProperty: invalid engine handle\n" ); return (size_t)eh->engine->GetEngineProperty( (asEEngineProp)property ); }
qas_argument_t *qasIScriptGeneric_GetArg( const void *gen, unsigned int arg, int type ) { static qas_argument_t argument; argument.type = -1; if( gen ) { switch( type ) { case QAS_ARG_UINT8: argument.type = type; argument.integer = (unsigned char)((asIScriptGeneric *)gen)->GetArgByte( arg ); break; case QAS_ARG_UINT16: argument.type = type; argument.integer = (unsigned short)((asIScriptGeneric *)gen)->GetArgWord( arg ); break; case QAS_ARG_UINT: argument.type = type; argument.integer = (unsigned int)((asIScriptGeneric *)gen)->GetArgDWord( arg ); break; case QAS_ARG_UINT64: argument.type = type; argument.integer64 = (quint64)((asIScriptGeneric *)gen)->GetArgQWord( arg ); break; case QAS_ARG_FLOAT: argument.type = type; argument.value = (float)((asIScriptGeneric *)gen)->GetArgFloat( arg ); break; case QAS_ARG_DOUBLE: argument.type = type; argument.dvalue = (double)((asIScriptGeneric *)gen)->GetArgDouble( arg ); break; case QAS_ARG_OBJECT: argument.type = type; argument.ptr = ((asIScriptGeneric *)gen)->GetArgObject( arg ); break; case QAS_ARG_ADDRESS: argument.type = type; argument.ptr = ((asIScriptGeneric *)gen)->GetArgAddress( arg ); break; case QAS_ARG_POINTER: argument.type = type; argument.ptr = ((asIScriptGeneric *)gen)->GetAddressOfArg( arg ); break; default: QAS_Error( "qasIScriptGeneric_GetArg: Invalid argument type\n" ); break; } } return &argument; }