本文整理汇总了C++中AS3_Release函数的典型用法代码示例。如果您正苦于以下问题:C++ AS3_Release函数的具体用法?C++ AS3_Release怎么用?C++ AS3_Release使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AS3_Release函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: get_class
/*
* Get an actionscript class with the given namespace and class name
* in the format: package::ClassName
*/
AS3_Val get_class(const char * as_namespaceclass_path)
{
/* TODO: Merge with get_class2()? */
AS3_Val as_namespace;
AS3_Val as_class;
AS3_Val ret;
char * class_ptr = NULL;
/* TODO might want to store classes in a table to save loading again */
class_ptr = strstr(as_namespaceclass_path, "::");
if (class_ptr > as_namespaceclass_path)
{
as_namespace = AS3_StringN(
as_namespaceclass_path, (class_ptr - as_namespaceclass_path) / sizeof(char)
);
as_class = AS3_String(class_ptr + 2);
}
else
{
as_namespace = AS3_Undefined();
as_class = AS3_String(as_namespaceclass_path);
}
ret = AS3_NSGet(as_namespace, as_class);
/* TODO check for failure getting class */
AS3_Release(as_namespace);
AS3_Release(as_class);
return ret;
}
开发者ID:Tmdean,项目名称:lua-alchemy,代码行数:39,代码来源:bridge_as3_c.c
示例2: qspCallIsPlayingFile
QSP_BOOL qspCallIsPlayingFile(QSP_CHAR *file)
{
/* Здесь проверяем, проигрывается ли файл */
QSPCallState state;
QSP_BOOL isPlaying;
AS3_Val args;
char *strUTF8;
if (qspCallBacks[QSP_CALL_ISPLAYINGFILE].IsSet)
{
qspSaveCallState(&state, QSP_TRUE, QSP_FALSE);
if (file)
{
strUTF8 = qspW2C(file);
args = AS3_Array("StrType", strUTF8);
free(strUTF8);
}
else
args = AS3_Array("StrType", 0);
AS3_Call(qspCallBacks[QSP_CALL_ISPLAYINGFILE].FuncVal, qspCallBacks[QSP_CALL_ISPLAYINGFILE].ThisVal, args);
AS3_Release(args);
flyield();
isPlaying = (QSP_BOOL)AS3_IntValue(result);
AS3_Release(result);
qspRestoreCallState(&state);
return isPlaying;
}
return QSP_FALSE;
}
开发者ID:fylfot,项目名称:QSP-iPhone,代码行数:28,代码来源:callbacks.c
示例3: qspSaveCallState
QSP_CHAR *qspCallInputBox(QSP_CHAR *text)
{
/* Здесь вводим текст */
QSPCallState state;
QSP_CHAR *buffer;
AS3_Val args;
char *strUTF8;
char *resText;
int maxLen = 511;
if (qspCallBacks[QSP_CALL_INPUTBOX].IsSet)
{
qspSaveCallState(&state, QSP_TRUE, QSP_FALSE);
if (text)
{
strUTF8 = qspW2C(text);
args = AS3_Array("StrType", strUTF8);
free(strUTF8);
}
else
args = AS3_Array("StrType", 0);
AS3_Call(qspCallBacks[QSP_CALL_INPUTBOX].FuncVal, qspCallBacks[QSP_CALL_INPUTBOX].ThisVal, args);
AS3_Release(args);
flyield();
resText = AS3_StringValue(result);
AS3_Release(result);
buffer = qspC2W(resText);
free(resText);
qspRestoreCallState(&state);
}
else
buffer = qspGetNewText(QSP_FMT(""), 0);
return buffer;
}
开发者ID:fylfot,项目名称:QSP-iPhone,代码行数:33,代码来源:callbacks.c
示例4: get_class2
/*
* Get an actionscript class with the given namespace and class name
* in the format: package (may be NULL), ClassName
*/
AS3_Val get_class2(const char * as_namespace_path, const char * as_class_path)
{
AS3_Val as_namespace;
AS3_Val as_class;
AS3_Val ret;
/* TODO might want to store classes in a table to save loading again */
if (as_namespace_path)
{
as_namespace = AS3_String(as_namespace_path);
}
else
{
as_namespace = AS3_Undefined();
}
as_class = AS3_String(as_class_path);
ret = AS3_NSGet(as_namespace, as_class);
/* TODO check for failure getting class */
AS3_Release(as_namespace);
AS3_Release(as_class);
return ret;
}
开发者ID:Tmdean,项目名称:lua-alchemy,代码行数:32,代码来源:bridge_as3_c.c
示例5: main
int main(int argc, char **argv)
{
AS3_Val ilbc_lib = AS3_Object("");
AS3_Val encodeMethod = AS3_FunctionAsync( NULL, (AS3_ThunkProc) encodeForFlash);
AS3_Val decodeMethod = AS3_FunctionAsync( NULL, (AS3_ThunkProc) decodeForFlash);
AS3_SetS(ilbc_lib, "encode", encodeMethod);
AS3_SetS(ilbc_lib, "decode", decodeMethod);
AS3_Release( encodeMethod );
AS3_Release( decodeMethod );
//No code below here. AS3_LibInit does not return
AS3_LibInit( ilbc_lib );
return 0;
}
开发者ID:hxzpily2,项目名称:iLBC-as3-wrapper,代码行数:14,代码来源:iLBC_as3_wrapper.c
示例6: is_null
/*
TODO: Ugly workaround. Remove.
See http://tinyurl.com/a9djb2
*/
BOOL is_null(AS3_Val val)
{
BOOL result = FALSE;
AS3_Val argsVal = AS3_Array("AS3ValType", val);
AS3_Val classNameVal = AS3_Call(getQualifiedClassName_method, NULL, argsVal);
AS3_Malloced_Str className = AS3_StringValue(classNameVal);
AS3_Release(argsVal);
AS3_Release(classNameVal);
result = (strncmp(className, "null", 4) == 0);
free(className);
return result;
}
开发者ID:Tmdean,项目名称:lua-alchemy,代码行数:19,代码来源:bridge_as3_c.c
示例7: main
int main() {
AS3_Val initparamMethod = AS3_Function( NULL, initparam );
AS3_Val choosemodelMethod = AS3_Function( NULL, choosemodel );
AS3_Val predictionMethod = AS3_FunctionAsync( NULL, prediction );
AS3_Val result = AS3_Object( "initparam: AS3ValType, choosemodel: AS3ValType, prediction: AS3ValType", initparamMethod, choosemodelMethod, predictionMethod );
AS3_Release( initparamMethod );
AS3_Release( choosemodelMethod );
AS3_Release( predictionMethod );
AS3_LibInit( result );
return 0;
}
开发者ID:sauravbiswasiupr,项目名称:image_transformations,代码行数:15,代码来源:mlp_conv.c
示例8: thunk_InitBlockMap
static AS3_Val thunk_InitBlockMap(void *gg_clientData, AS3_Val gg_args) {
AS3_Val map;
AS3_Val bytes;
AS3_ArrayValue(gg_args, "AS3ValType, AS3ValType", &map, &bytes);
AS3_Val blockCountVal = AS3_CallTS("readUnsignedInt", bytes, "");
AS3_Val bitset = AS3_GetS(map, "bitset");
AS3_SetS(map, "blockCount", blockCountVal);
AS3_Release(AS3_CallTS("readBytes", bytes, "AS3ValType, IntType, IntType", bitset, 0, (int)((AS3_IntValue(blockCountVal) + 7) / 8)));
AS3_Release(blockCountVal);
AS3_Release(bitset);
AS3_Release(map);
AS3_Release(bytes);
return NULL;
}
开发者ID:huangyt,项目名称:MyProjects,代码行数:16,代码来源:glue.c
示例9: qspCallSaveGame
void qspCallSaveGame(QSP_CHAR *file)
{
/* Здесь позволяем пользователю выбрать файл */
/* для сохранения состояния игры и сохраняем */
/* в нем текущее состояние */
QSPCallState state;
AS3_Val args;
char *strUTF8;
if (qspCallBacks[QSP_CALL_SAVEGAMESTATUS].IsSet)
{
qspSaveCallState(&state, QSP_FALSE, QSP_TRUE);
if (file)
{
strUTF8 = qspW2C(file);
args = AS3_Array("StrType", strUTF8);
free(strUTF8);
}
else
args = AS3_Array("StrType", 0);
AS3_Call(qspCallBacks[QSP_CALL_SAVEGAMESTATUS].FuncVal, qspCallBacks[QSP_CALL_SAVEGAMESTATUS].ThisVal, args);
AS3_Release(args);
flyield();
qspRestoreCallState(&state);
}
}
开发者ID:fylfot,项目名称:QSP-iPhone,代码行数:25,代码来源:callbacks.c
示例10: resetPositionByteArray
int resetPositionByteArray(AS3_Val byteArray)
{
AS3_Val zero = AS3_Int(0);
/* just reset the position */
AS3_SetS((AS3_Val)byteArray, "position", zero);
AS3_Release(zero);
return 0;
}
开发者ID:hxzpily2,项目名称:iLBC-as3-wrapper,代码行数:8,代码来源:iLBC_as3_wrapper.c
示例11: main
int main()
{
AS3_Val method = AS3_Function(NULL, call);
AS3_Val result = AS3_Object("call: AS3ValType", method);
AS3_Release(method);
AS3_LibInit(result);
return 0;
}
开发者ID:KosBeg,项目名称:webp-plugin,代码行数:8,代码来源:main.c
示例12: thunk_InitSubPiecePacket
static AS3_Val thunk_InitSubPiecePacket(void *gg_clientData, AS3_Val gg_args) {
AS3_Val packet;
AS3_Val bytes;
AS3_ArrayValue(gg_args, "AS3ValType, AS3ValType", &packet, &bytes);
AS3_Val subpiece = AS3_GetS(packet, "subpiece");
AS3_Val blockIndexVal = AS3_CallTS("readUnsignedShort", bytes, "");
AS3_Val subPieceIndexVal = AS3_CallTS("readUnsignedShort", bytes, "");
AS3_SetS(subpiece, "blockIndex", blockIndexVal);
AS3_SetS(subpiece, "subPieceIndex", subPieceIndexVal);
AS3_Release(subpiece);
AS3_Release(blockIndexVal);
AS3_Release(subPieceIndexVal);
AS3_Release(packet);
AS3_Release(bytes);
return NULL;
}
开发者ID:huangyt,项目名称:MyProjects,代码行数:18,代码来源:glue.c
示例13: closeByteArray
int closeByteArray(void * cookie)
{
AS3_Val zero = AS3_Int(0);
/* just reset the position */
AS3_SetS((AS3_Val)cookie, "position", zero);
AS3_Release(zero);
return 0;
}
开发者ID:Glideh,项目名称:jfrec,代码行数:9,代码来源:main.c
示例14: initializeMaterial
AS3_Val initializeMaterial( void* self, AS3_Val args )
{
Material * material;
AS3_Val ambient, diffuse, specular, emissive;
double a_a, a_r, a_g, a_b, d_a, d_r, d_g, d_b, s_a, s_r, s_g, s_b, e_a, e_r, e_g, e_b, power;
AS3_ArrayValue( args, "AS3ValType, AS3ValType, AS3ValType, AS3ValType, DoubleType", &ambient, &diffuse, &specular, &emissive, &power );
a_r = AS3_NumberValue( AS3_GetS( ambient, "redMultiplier" ) );
a_g = AS3_NumberValue( AS3_GetS( ambient, "greenMultiplier" ) );
a_b = AS3_NumberValue( AS3_GetS( ambient, "blueMultiplier" ) );
a_a = AS3_NumberValue( AS3_GetS( ambient, "alphaMultiplier" ) );
d_r = AS3_NumberValue( AS3_GetS( diffuse, "redMultiplier" ) );
d_g = AS3_NumberValue( AS3_GetS( diffuse, "greenMultiplier" ) );
d_b = AS3_NumberValue( AS3_GetS( diffuse, "blueMultiplier" ) );
d_a = AS3_NumberValue( AS3_GetS( diffuse, "alphaMultiplier" ) );
s_r = AS3_NumberValue( AS3_GetS( specular, "redMultiplier" ) );
s_g = AS3_NumberValue( AS3_GetS( specular, "greenMultiplier" ) );
s_b = AS3_NumberValue( AS3_GetS( specular, "blueMultiplier" ) );
s_a = AS3_NumberValue( AS3_GetS( specular, "alphaMultiplier" ) );
e_r = AS3_NumberValue( AS3_GetS( emissive, "redMultiplier" ) );
e_g = AS3_NumberValue( AS3_GetS( emissive, "greenMultiplier" ) );
e_b = AS3_NumberValue( AS3_GetS( emissive, "blueMultiplier" ) );
e_a = AS3_NumberValue( AS3_GetS( emissive, "alphaMultiplier" ) );
material = newMaterial( newColor888( (BYTE)(a_r * 255), (BYTE)(a_g * 255), (BYTE)(a_b * 255), (BYTE)(a_a * 255) ),
newColor888( (BYTE)(d_r * 255), (BYTE)(d_g * 255), (BYTE)(d_b * 255), (BYTE)(d_a * 255) ),
newColor888( (BYTE)(s_r * 255), (BYTE)(s_g * 255), (BYTE)(s_b * 255), (BYTE)(s_a * 255) ),
newColor888( (BYTE)(e_r * 255), (BYTE)(e_g * 255), (BYTE)(e_b * 255), (BYTE)(e_a * 255) ),
power );
AS3_Release( ambient );
AS3_Release( diffuse );
AS3_Release( specular );
AS3_Release( emissive );
return AS3_Array( "PtrType, PtrType, PtrType, PtrType, PtrType, PtrType, PtrType", material, material->ambient, material->diffuse, material->specular, material->emissive, &material->power, &material->doubleSide );
}
开发者ID:dreamsxin,项目名称:zero3d,代码行数:43,代码来源:alchemy3d.c
示例15: main
int main (int argc, char **argv) {
AS3_Val initMethod = AS3_Function(NULL, flash_init);
AS3_Val tickMethod = AS3_Function(NULL, flash_tick);
AS3_Val resetMethod = AS3_Function(NULL, flash_reset);
AS3_Val vecxemu = AS3_Object(
"init:AS3ValType, tick:AS3ValType, reset:AS3ValType",
initMethod, tickMethod, resetMethod
);
AS3_Release( initMethod );
AS3_Release( tickMethod );
AS3_Release( resetMethod );
AS3_LibInit(vecxemu);
return 0;
}
开发者ID:zhuowei,项目名称:vecx,代码行数:19,代码来源:osint.c
示例16: main
int main(int argc, char **argv)
{
print_header();
// set convert & update methods visible to flash
AS3_Val convertMethod = AS3_Function( NULL, init );
AS3_Val updateMethod = AS3_Function( NULL, update );
AS3_Val result = AS3_Object( "init:AS3ValType, update: AS3ValType", convertMethod, updateMethod );
AS3_Release( convertMethod );
AS3_Release( updateMethod );
// notify that we initialized -- THIS DOES NOT RETURN!
AS3_LibInit( result );
return 0;
}
开发者ID:Glideh,项目名称:jfrec,代码行数:19,代码来源:main.c
示例17: qspCallShowMenu
int qspCallShowMenu()
{
/* «десь показываем меню */
QSPCallState state;
int index;
AS3_Val args;
if (qspCallBacks[QSP_CALL_SHOWMENU].IsSet)
{
qspSaveCallState(&state, QSP_FALSE, QSP_TRUE);
args = AS3_Array("");
AS3_Call(qspCallBacks[QSP_CALL_SHOWMENU].FuncVal, qspCallBacks[QSP_CALL_SHOWMENU].ThisVal, args);
AS3_Release(args);
flyield();
index = AS3_IntValue(result);
AS3_Release(result);
qspRestoreCallState(&state);
return index;
}
return -1;
}
开发者ID:ktoto1,项目名称:QtQSP,代码行数:20,代码来源:flash_callbacks.c
示例18: qspCallGetMSCount
int qspCallGetMSCount()
{
/* Здесь получаем количество миллисекунд, прошедших с момента последнего вызова функции */
QSPCallState state;
int count;
AS3_Val args;
if (qspCallBacks[QSP_CALL_GETMSCOUNT].IsSet)
{
qspSaveCallState(&state, QSP_TRUE, QSP_FALSE);
args = AS3_Array("");
AS3_Call(qspCallBacks[QSP_CALL_GETMSCOUNT].FuncVal, qspCallBacks[QSP_CALL_GETMSCOUNT].ThisVal, args);
AS3_Release(args);
flyield();
count = AS3_IntValue(result);
AS3_Release(result);
qspRestoreCallState(&state);
return count;
}
return 0;
}
开发者ID:fylfot,项目名称:QSP-iPhone,代码行数:20,代码来源:callbacks.c
示例19: main
int main(int argc, char **argv)
{
// Create callbacks
AS3_Val setupMethod = AS3_Function(NULL, f_setup);
AS3_Val tickMethod = AS3_Function(NULL, f_tick);
AS3_Val quitApplicationMethod = AS3_Function(NULL, f_teardown);
AS3_Val libPDF = AS3_Object(
"setup:AS3ValType, tick:AS3ValType, quit:AS3ValType",
setupMethod, tickMethod, quitApplicationMethod
);
AS3_Release( setupMethod );
AS3_Release( tickMethod );
AS3_Release( quitApplicationMethod );
AS3_LibInit(libPDF);
return (0);
}
开发者ID:emcmanus,项目名称:WebPDF,代码行数:20,代码来源:webpdf.c
示例20: thunk_InitPeerDownloadInfo
static AS3_Val thunk_InitPeerDownloadInfo(void *gg_clientData, AS3_Val gg_args) {
AS3_Val info;
AS3_Val bytes;
AS3_ArrayValue(gg_args, "AS3ValType, AS3ValType", &info, &bytes);
AS3_Val isDownloadingVal = AS3_CallTS("readUnsignedByte", bytes, "");
if (AS3_IntValue(isDownloadingVal) == 1)
{
AS3_Val true = AS3_True();
AS3_SetS(info, "isDownloading", true);
AS3_Release(true);
}
else
{
AS3_Val false = AS3_False();
AS3_SetS(info, "isDownloading", false);
AS3_Release(false);
}
AS3_Val onLineTimeVal = AS3_CallTS("readUnsignedInt", bytes, "");
AS3_Val avgDownloadVal = AS3_CallTS("readUnsignedShort", bytes, "");
AS3_Val nowDownloadVal = AS3_CallTS("readUnsignedShort", bytes, "");
AS3_Val avgUploadVal = AS3_CallTS("readUnsignedShort", bytes, "");
AS3_Val nowUploadVal = AS3_CallTS("readUnsignedShort", bytes, "");
AS3_SetS(info, "onLineTime", onLineTimeVal);
AS3_SetS(info, "avgDownload", avgDownloadVal);
AS3_SetS(info, "nowDownload", nowDownloadVal);
AS3_SetS(info, "avgUpload", avgUploadVal);
AS3_SetS(info, "nowUpload", nowUploadVal);
AS3_ByteArray_seek(bytes, 3, 1); // ignore 3 byte reserved bytes
AS3_Release(isDownloadingVal);
AS3_Release(onLineTimeVal);
AS3_Release(avgDownloadVal);
AS3_Release(nowDownloadVal);
AS3_Release(avgUploadVal);
AS3_Release(nowUploadVal);
AS3_Release(bytes);
AS3_Release(info);
return NULL;
}
开发者ID:huangyt,项目名称:MyProjects,代码行数:41,代码来源:glue.c
注:本文中的AS3_Release函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论