From 006f9fcd365031e3091ed11f480bf5007f1582e0 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Thu, 14 May 2015 02:30:32 +0000 Subject: [PATCH] [AUTO]: updating luabinding & jsbinding automatically --- .../auto/api/jsb_cocos2dx_auto_api.js | 247 ++-- .../js-bindings/auto/jsb_cocos2dx_auto.cpp | 972 ++++++++------- .../js-bindings/auto/jsb_cocos2dx_auto.hpp | 44 +- .../auto/api/lua_cocos2dx_auto_api.lua | 10 +- .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 1093 ++++++++++------- .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 4 + 6 files changed, 1377 insertions(+), 993 deletions(-) diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js index 568d185974..9d77773463 100644 --- a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js @@ -20069,6 +20069,78 @@ TextFieldTTF : function ( }; +/** + * @class ParallaxNode + */ +cc.ParallaxNode = { + +/** + * @method getParallaxArray +* @return {cc._ccArray|cc._ccArray} +*/ +getParallaxArray : function( +) +{ + return cc._ccArray; +}, + +/** + * @method addChild + * @param {cc.Node} arg0 + * @param {int} arg1 + * @param {vec2_object} arg2 + * @param {vec2_object} arg3 + */ +addChild : function ( +node, +int, +vec2, +vec2 +) +{ +}, + +/** + * @method removeAllChildrenWithCleanup + * @param {bool} arg0 + */ +removeAllChildrenWithCleanup : function ( +bool +) +{ +}, + +/** + * @method setParallaxArray + * @param {cc._ccArray} arg0 + */ +setParallaxArray : function ( +_ccarray +) +{ +}, + +/** + * @method create + * @return {cc.ParallaxNode} + */ +create : function ( +) +{ + return cc.ParallaxNode; +}, + +/** + * @method ParallaxNode + * @constructor + */ +ParallaxNode : function ( +) +{ +}, + +}; + /** * @class TMXObjectGroup */ @@ -20634,7 +20706,7 @@ cc.TMXLayer = { * @method getTileGIDAt * @param {vec2_object} arg0 * @param {cc.TMXTileFlags_} arg1 - * @return {int} + * @return {unsigned int} */ getTileGIDAt : function ( vec2, @@ -20666,6 +20738,14 @@ int { }, +/** + * @method releaseMap + */ +releaseMap : function ( +) +{ +}, + /** * @method setTiles * @param {unsigned int} arg0 @@ -20737,13 +20817,19 @@ vec2 }, /** - * @method getProperties -* @return {map_object|map_object} -*/ -getProperties : function( + * @method initWithTilesetInfo + * @param {cc.TMXTilesetInfo} arg0 + * @param {cc.TMXLayerInfo} arg1 + * @param {cc.TMXMapInfo} arg2 + * @return {bool} + */ +initWithTilesetInfo : function ( +tmxtilesetinfo, +tmxlayerinfo, +map ) { - return map_object; + return false; }, /** @@ -20754,23 +20840,9 @@ setupTiles : function ( { }, -/** - * @method setupTileSprite - * @param {cc.Sprite} arg0 - * @param {vec2_object} arg1 - * @param {int} arg2 - */ -setupTileSprite : function ( -sprite, -vec2, -int -) -{ -}, - /** * @method setTileGID -* @param {int|int} int +* @param {unsigned int|unsigned int} int * @param {vec2_object|vec2_object} vec2 * @param {cc.TMXTileFlags_} tmxtileflags_ */ @@ -20844,6 +20916,16 @@ getTileSet : function ( return cc.TMXTilesetInfo; }, +/** + * @method getProperties +* @return {map_object|map_object} +*/ +getProperties : function( +) +{ + return map_object; +}, + /** * @method getTileAt * @param {vec2_object} arg0 @@ -20861,7 +20943,7 @@ vec2 * @param {cc.TMXTilesetInfo} arg0 * @param {cc.TMXLayerInfo} arg1 * @param {cc.TMXMapInfo} arg2 - * @return {cc.experimental::TMXLayer} + * @return {cc.TMXLayer} */ create : function ( tmxtilesetinfo, @@ -20869,7 +20951,7 @@ tmxlayerinfo, map ) { - return cc.experimental::TMXLayer; + return cc.TMXLayer; }, /** @@ -20942,6 +21024,32 @@ getObjectGroups : function( return new Array(); }, +/** + * @method initWithXML + * @param {String} arg0 + * @param {String} arg1 + * @return {bool} + */ +initWithXML : function ( +str, +str +) +{ + return false; +}, + +/** + * @method initWithTMXFile + * @param {String} arg0 + * @return {bool} + */ +initWithTMXFile : function ( +str +) +{ + return false; +}, + /** * @method getTileSize * @return {size_object} @@ -20974,14 +21082,16 @@ getProperties : function ( /** * @method getPropertiesForGID - * @param {int} arg0 - * @return {cc.Value} - */ -getPropertiesForGID : function ( -int +* @param {int|int} int +* @param {cc.Value} value +* @return {bool|cc.Value} +*/ +getPropertiesForGID : function( +int, +value ) { - return cc.Value; + return false; }, /** @@ -21007,13 +21117,13 @@ map /** * @method getLayer * @param {String} arg0 - * @return {cc.experimental::TMXLayer} + * @return {cc.TMXLayer} */ getLayer : function ( str ) { - return cc.experimental::TMXLayer; + return cc.TMXLayer; }, /** @@ -21039,97 +21149,34 @@ int /** * @method create * @param {String} arg0 - * @return {cc.experimental::TMXTiledMap} + * @return {cc.TMXTiledMap} */ create : function ( str ) { - return cc.experimental::TMXTiledMap; + return cc.TMXTiledMap; }, /** * @method createWithXML * @param {String} arg0 * @param {String} arg1 - * @return {cc.experimental::TMXTiledMap} + * @return {cc.TMXTiledMap} */ createWithXML : function ( str, str ) { - return cc.experimental::TMXTiledMap; -}, - -}; - -/** - * @class ParallaxNode - */ -cc.ParallaxNode = { - -/** - * @method getParallaxArray -* @return {cc._ccArray|cc._ccArray} -*/ -getParallaxArray : function( -) -{ - return cc._ccArray; + return cc.TMXTiledMap; }, /** - * @method addChild - * @param {cc.Node} arg0 - * @param {int} arg1 - * @param {vec2_object} arg2 - * @param {vec2_object} arg3 - */ -addChild : function ( -node, -int, -vec2, -vec2 -) -{ -}, - -/** - * @method removeAllChildrenWithCleanup - * @param {bool} arg0 - */ -removeAllChildrenWithCleanup : function ( -bool -) -{ -}, - -/** - * @method setParallaxArray - * @param {cc._ccArray} arg0 - */ -setParallaxArray : function ( -_ccarray -) -{ -}, - -/** - * @method create - * @return {cc.ParallaxNode} - */ -create : function ( -) -{ - return cc.ParallaxNode; -}, - -/** - * @method ParallaxNode + * @method TMXTiledMap * @constructor */ -ParallaxNode : function ( +TMXTiledMap : function ( ) { }, diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp index 13e85106cc..c6ca7f4961 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp @@ -61711,6 +61711,250 @@ void js_register_cocos2dx_TextFieldTTF(JSContext *cx, JS::HandleObject global) { } } +JSClass *jsb_cocos2d_ParallaxNode_class; +JSObject *jsb_cocos2d_ParallaxNode_prototype; + +bool js_cocos2dx_ParallaxNode_getParallaxArray(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::ParallaxNode* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::ParallaxNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParallaxNode_getParallaxArray : Invalid Native Object"); + do { + if (argc == 0) { + const cocos2d::_ccArray* ret = cobj->getParallaxArray(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR _ccArray*; + args.rval().set(jsret); + return true; + } + } while(0); + + do { + if (argc == 0) { + cocos2d::_ccArray* ret = cobj->getParallaxArray(); + jsval jsret = JSVAL_NULL; + #pragma warning NO CONVERSION FROM NATIVE FOR _ccArray*; + args.rval().set(jsret); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_ParallaxNode_getParallaxArray : wrong number of arguments"); + return false; +} +bool js_cocos2dx_ParallaxNode_addChild(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ParallaxNode* cobj = (cocos2d::ParallaxNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParallaxNode_addChild : Invalid Native Object"); + if (argc == 4) { + cocos2d::Node* arg0; + int arg1; + cocos2d::Vec2 arg2; + cocos2d::Vec2 arg3; + do { + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::Node*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); + ok &= jsval_to_vector2(cx, args.get(2), &arg2); + ok &= jsval_to_vector2(cx, args.get(3), &arg3); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParallaxNode_addChild : Error processing arguments"); + cobj->addChild(arg0, arg1, arg2, arg3); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParallaxNode_addChild : wrong number of arguments: %d, was expecting %d", argc, 4); + return false; +} +bool js_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ParallaxNode* cobj = (cocos2d::ParallaxNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup : Invalid Native Object"); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup : Error processing arguments"); + cobj->removeAllChildrenWithCleanup(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParallaxNode_setParallaxArray(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::ParallaxNode* cobj = (cocos2d::ParallaxNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParallaxNode_setParallaxArray : Invalid Native Object"); + if (argc == 1) { + cocos2d::_ccArray* arg0; + #pragma warning NO CONVERSION TO NATIVE FOR _ccArray* + ok = false; + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParallaxNode_setParallaxArray : Error processing arguments"); + cobj->setParallaxArray(arg0); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_ParallaxNode_setParallaxArray : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} +bool js_cocos2dx_ParallaxNode_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + if (argc == 0) { + cocos2d::ParallaxNode* ret = cocos2d::ParallaxNode::create(); + jsval jsret = JSVAL_NULL; + do { + if (ret) { + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParallaxNode*)ret); + jsret = OBJECT_TO_JSVAL(jsProxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + args.rval().set(jsret); + return true; + } + JS_ReportError(cx, "js_cocos2dx_ParallaxNode_create : wrong number of arguments"); + return false; +} + +bool js_cocos2dx_ParallaxNode_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + cocos2d::ParallaxNode* cobj = new (std::nothrow) cocos2d::ParallaxNode(); + cocos2d::Ref *_ccobj = dynamic_cast(cobj); + if (_ccobj) { + _ccobj->autorelease(); + } + TypeTest t; + js_type_class_t *typeClass = nullptr; + std::string typeName = t.s_name(); + auto typeMapIter = _js_global_type_map.find(typeName); + CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!"); + typeClass = typeMapIter->second; + CCASSERT(typeClass, "The value is null."); + // JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); + JS::RootedObject proto(cx, typeClass->proto.get()); + JS::RootedObject parent(cx, typeClass->parentProto.get()); + JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent)); + args.rval().set(OBJECT_TO_JSVAL(obj)); + // link the native object with the javascript object + js_proxy_t* p = jsb_new_proxy(cobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::ParallaxNode"); + if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + return true; +} + + +extern JSObject *jsb_cocos2d_Node_prototype; + +void js_cocos2d_ParallaxNode_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (ParallaxNode)", obj); +} + +static bool js_cocos2d_ParallaxNode_ctor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + cocos2d::ParallaxNode *nobj = new (std::nothrow) cocos2d::ParallaxNode(); + if (nobj) { + nobj->autorelease(); + } + js_proxy_t* p = jsb_new_proxy(nobj, obj); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::ParallaxNode"); + bool isFound = false; + if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); + args.rval().setUndefined(); + return true; +} +void js_register_cocos2dx_ParallaxNode(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_ParallaxNode_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_ParallaxNode_class->name = "ParallaxNode"; + jsb_cocos2d_ParallaxNode_class->addProperty = JS_PropertyStub; + jsb_cocos2d_ParallaxNode_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_ParallaxNode_class->getProperty = JS_PropertyStub; + jsb_cocos2d_ParallaxNode_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_ParallaxNode_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_ParallaxNode_class->resolve = JS_ResolveStub; + jsb_cocos2d_ParallaxNode_class->convert = JS_ConvertStub; + jsb_cocos2d_ParallaxNode_class->finalize = js_cocos2d_ParallaxNode_finalize; + jsb_cocos2d_ParallaxNode_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + + static JSPropertySpec properties[] = { + JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_PS_END + }; + + static JSFunctionSpec funcs[] = { + JS_FN("getParallaxArray", js_cocos2dx_ParallaxNode_getParallaxArray, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("addChild", js_cocos2dx_ParallaxNode_addChild, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("removeAllChildrenWithCleanup", js_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setParallaxArray", js_cocos2dx_ParallaxNode_setParallaxArray, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_ParallaxNode_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + static JSFunctionSpec st_funcs[] = { + JS_FN("create", js_cocos2dx_ParallaxNode_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FS_END + }; + + jsb_cocos2d_ParallaxNode_prototype = JS_InitClass( + cx, global, + JS::RootedObject(cx, jsb_cocos2d_Node_prototype), + jsb_cocos2d_ParallaxNode_class, + js_cocos2dx_ParallaxNode_constructor, 0, // constructor + properties, + funcs, + NULL, // no static properties + st_funcs); + // make the class enumerable in the registered namespace +// bool found; +//FIXME: Removed in Firefox v27 +// JS_SetPropertyAttributes(cx, global, "ParallaxNode", JSPROP_ENUMERATE | JSPROP_READONLY, &found); + + // add the proto and JSClass to the type->js info hash table + TypeTest t; + js_type_class_t *p; + std::string typeName = t.s_name(); + if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) + { + p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); + p->jsclass = jsb_cocos2d_ParallaxNode_class; + p->proto = jsb_cocos2d_ParallaxNode_prototype; + p->parentProto = jsb_cocos2d_Node_prototype; + _js_global_type_map.insert(std::make_pair(typeName, p)); + } +} + JSClass *jsb_cocos2d_TMXObjectGroup_class; JSObject *jsb_cocos2d_TMXObjectGroup_prototype; @@ -63163,8 +63407,8 @@ void js_register_cocos2dx_TMXMapInfo(JSContext *cx, JS::HandleObject global) { } } -JSClass *jsb_cocos2d_experimental_TMXLayer_class; -JSObject *jsb_cocos2d_experimental_TMXLayer_prototype; +JSClass *jsb_cocos2d_TMXLayer_class; +JSObject *jsb_cocos2d_TMXLayer_prototype; bool js_cocos2dx_TMXLayer_getTileGIDAt(JSContext *cx, uint32_t argc, jsval *vp) { @@ -63172,15 +63416,15 @@ bool js_cocos2dx_TMXLayer_getTileGIDAt(JSContext *cx, uint32_t argc, jsval *vp) bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_getTileGIDAt : Invalid Native Object"); if (argc == 1) { cocos2d::Vec2 arg0; ok &= jsval_to_vector2(cx, args.get(0), &arg0); JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_TMXLayer_getTileGIDAt : Error processing arguments"); - int ret = cobj->getTileGIDAt(arg0); + unsigned int ret = cobj->getTileGIDAt(arg0); jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); + jsret = uint32_to_jsval(cx, ret); args.rval().set(jsret); return true; } @@ -63191,9 +63435,9 @@ bool js_cocos2dx_TMXLayer_getTileGIDAt(JSContext *cx, uint32_t argc, jsval *vp) #pragma warning NO CONVERSION TO NATIVE FOR TMXTileFlags_* ok = false; JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_TMXLayer_getTileGIDAt : Error processing arguments"); - int ret = cobj->getTileGIDAt(arg0, arg1); + unsigned int ret = cobj->getTileGIDAt(arg0, arg1); jsval jsret = JSVAL_NULL; - jsret = int32_to_jsval(cx, ret); + jsret = uint32_to_jsval(cx, ret); args.rval().set(jsret); return true; } @@ -63207,7 +63451,7 @@ bool js_cocos2dx_TMXLayer_getPositionAt(JSContext *cx, uint32_t argc, jsval *vp) bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_getPositionAt : Invalid Native Object"); if (argc == 1) { cocos2d::Vec2 arg0; @@ -63229,7 +63473,7 @@ bool js_cocos2dx_TMXLayer_setLayerOrientation(JSContext *cx, uint32_t argc, jsva bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_setLayerOrientation : Invalid Native Object"); if (argc == 1) { int arg0; @@ -63243,13 +63487,29 @@ bool js_cocos2dx_TMXLayer_setLayerOrientation(JSContext *cx, uint32_t argc, jsva JS_ReportError(cx, "js_cocos2dx_TMXLayer_setLayerOrientation : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } +bool js_cocos2dx_TMXLayer_releaseMap(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_releaseMap : Invalid Native Object"); + if (argc == 0) { + cobj->releaseMap(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_TMXLayer_releaseMap : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_TMXLayer_setTiles(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_setTiles : Invalid Native Object"); if (argc == 1) { unsigned int* arg0; @@ -63269,7 +63529,7 @@ bool js_cocos2dx_TMXLayer_getLayerSize(JSContext *cx, uint32_t argc, jsval *vp) JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_getLayerSize : Invalid Native Object"); if (argc == 0) { const cocos2d::Size& ret = cobj->getLayerSize(); @@ -63288,7 +63548,7 @@ bool js_cocos2dx_TMXLayer_setMapTileSize(JSContext *cx, uint32_t argc, jsval *vp bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_setMapTileSize : Invalid Native Object"); if (argc == 1) { cocos2d::Size arg0; @@ -63307,7 +63567,7 @@ bool js_cocos2dx_TMXLayer_getLayerOrientation(JSContext *cx, uint32_t argc, jsva JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_getLayerOrientation : Invalid Native Object"); if (argc == 0) { int ret = cobj->getLayerOrientation(); @@ -63326,7 +63586,7 @@ bool js_cocos2dx_TMXLayer_setProperties(JSContext *cx, uint32_t argc, jsval *vp) bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_setProperties : Invalid Native Object"); if (argc == 1) { cocos2d::ValueMap arg0; @@ -63346,7 +63606,7 @@ bool js_cocos2dx_TMXLayer_setLayerName(JSContext *cx, uint32_t argc, jsval *vp) bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_setLayerName : Invalid Native Object"); if (argc == 1) { std::string arg0; @@ -63366,7 +63626,7 @@ bool js_cocos2dx_TMXLayer_removeTileAt(JSContext *cx, uint32_t argc, jsval *vp) bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_removeTileAt : Invalid Native Object"); if (argc == 1) { cocos2d::Vec2 arg0; @@ -63380,38 +63640,51 @@ bool js_cocos2dx_TMXLayer_removeTileAt(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_TMXLayer_removeTileAt : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } -bool js_cocos2dx_TMXLayer_getProperties(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_TMXLayer_initWithTilesetInfo(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::experimental::TMXLayer* cobj = NULL; - obj = args.thisv().toObjectOrNull(); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_getProperties : Invalid Native Object"); - do { - if (argc == 0) { - cocos2d::ValueMap& ret = cobj->getProperties(); - jsval jsret = JSVAL_NULL; - jsret = ccvaluemap_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - } while(0); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_initWithTilesetInfo : Invalid Native Object"); + if (argc == 3) { + cocos2d::TMXTilesetInfo* arg0; + cocos2d::TMXLayerInfo* arg1; + cocos2d::TMXMapInfo* arg2; + do { + if (!args.get(0).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(0).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg0 = (cocos2d::TMXTilesetInfo*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); + } while (0); + do { + if (!args.get(1).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(1).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg1 = (cocos2d::TMXLayerInfo*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + do { + if (!args.get(2).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(2).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg2 = (cocos2d::TMXMapInfo*)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg2, cx, false, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_TMXLayer_initWithTilesetInfo : Error processing arguments"); + bool ret = cobj->initWithTilesetInfo(arg0, arg1, arg2); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } - do { - if (argc == 0) { - const cocos2d::ValueMap& ret = cobj->getProperties(); - jsval jsret = JSVAL_NULL; - jsret = ccvaluemap_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_TMXLayer_getProperties : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_TMXLayer_initWithTilesetInfo : wrong number of arguments: %d, was expecting %d", argc, 3); return false; } bool js_cocos2dx_TMXLayer_setupTiles(JSContext *cx, uint32_t argc, jsval *vp) @@ -63419,7 +63692,7 @@ bool js_cocos2dx_TMXLayer_setupTiles(JSContext *cx, uint32_t argc, jsval *vp) JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_setupTiles : Invalid Native Object"); if (argc == 0) { cobj->setupTiles(); @@ -63430,52 +63703,21 @@ bool js_cocos2dx_TMXLayer_setupTiles(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_TMXLayer_setupTiles : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } -bool js_cocos2dx_TMXLayer_setupTileSprite(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_setupTileSprite : Invalid Native Object"); - if (argc == 3) { - cocos2d::Sprite* arg0; - cocos2d::Vec2 arg1; - int arg2; - do { - if (!args.get(0).isObject()) { ok = false; break; } - js_proxy_t *jsProxy; - JSObject *tmpObj = args.get(0).toObjectOrNull(); - jsProxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::Sprite*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - ok &= jsval_to_vector2(cx, args.get(1), &arg1); - ok &= jsval_to_int32(cx, args.get(2), (int32_t *)&arg2); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_TMXLayer_setupTileSprite : Error processing arguments"); - cobj->setupTileSprite(arg0, arg1, arg2); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_TMXLayer_setupTileSprite : wrong number of arguments: %d, was expecting %d", argc, 3); - return false; -} bool js_cocos2dx_TMXLayer_setTileGID(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; JS::RootedObject obj(cx); - cocos2d::experimental::TMXLayer* cobj = NULL; + cocos2d::TMXLayer* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_setTileGID : Invalid Native Object"); do { if (argc == 3) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + unsigned int arg0; + ok &= jsval_to_uint32(cx, args.get(0), &arg0); if (!ok) { ok = true; break; } cocos2d::Vec2 arg1; ok &= jsval_to_vector2(cx, args.get(1), &arg1); @@ -63491,8 +63733,8 @@ bool js_cocos2dx_TMXLayer_setTileGID(JSContext *cx, uint32_t argc, jsval *vp) do { if (argc == 2) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + unsigned int arg0; + ok &= jsval_to_uint32(cx, args.get(0), &arg0); if (!ok) { ok = true; break; } cocos2d::Vec2 arg1; ok &= jsval_to_vector2(cx, args.get(1), &arg1); @@ -63511,7 +63753,7 @@ bool js_cocos2dx_TMXLayer_getMapTileSize(JSContext *cx, uint32_t argc, jsval *vp JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_getMapTileSize : Invalid Native Object"); if (argc == 0) { const cocos2d::Size& ret = cobj->getMapTileSize(); @@ -63530,7 +63772,7 @@ bool js_cocos2dx_TMXLayer_getProperty(JSContext *cx, uint32_t argc, jsval *vp) bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_getProperty : Invalid Native Object"); if (argc == 1) { std::string arg0; @@ -63552,7 +63794,7 @@ bool js_cocos2dx_TMXLayer_setLayerSize(JSContext *cx, uint32_t argc, jsval *vp) bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_setLayerSize : Invalid Native Object"); if (argc == 1) { cocos2d::Size arg0; @@ -63571,7 +63813,7 @@ bool js_cocos2dx_TMXLayer_getLayerName(JSContext *cx, uint32_t argc, jsval *vp) JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_getLayerName : Invalid Native Object"); if (argc == 0) { const std::string& ret = cobj->getLayerName(); @@ -63590,7 +63832,7 @@ bool js_cocos2dx_TMXLayer_setTileSet(JSContext *cx, uint32_t argc, jsval *vp) bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_setTileSet : Invalid Native Object"); if (argc == 1) { cocos2d::TMXTilesetInfo* arg0; @@ -63616,7 +63858,7 @@ bool js_cocos2dx_TMXLayer_getTileSet(JSContext *cx, uint32_t argc, jsval *vp) JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_getTileSet : Invalid Native Object"); if (argc == 0) { cocos2d::TMXTilesetInfo* ret = cobj->getTileSet(); @@ -63636,13 +63878,47 @@ bool js_cocos2dx_TMXLayer_getTileSet(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_TMXLayer_getTileSet : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } +bool js_cocos2dx_TMXLayer_getProperties(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + + JS::RootedObject obj(cx); + cocos2d::TMXLayer* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_getProperties : Invalid Native Object"); + do { + if (argc == 0) { + cocos2d::ValueMap& ret = cobj->getProperties(); + jsval jsret = JSVAL_NULL; + jsret = ccvaluemap_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + } while(0); + + do { + if (argc == 0) { + const cocos2d::ValueMap& ret = cobj->getProperties(); + jsval jsret = JSVAL_NULL; + jsret = ccvaluemap_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_TMXLayer_getProperties : wrong number of arguments"); + return false; +} bool js_cocos2dx_TMXLayer_getTileAt(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXLayer* cobj = (cocos2d::experimental::TMXLayer *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXLayer* cobj = (cocos2d::TMXLayer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXLayer_getTileAt : Invalid Native Object"); if (argc == 1) { cocos2d::Vec2 arg0; @@ -63698,11 +63974,11 @@ bool js_cocos2dx_TMXLayer_create(JSContext *cx, uint32_t argc, jsval *vp) JSB_PRECONDITION2( arg2, cx, false, "Invalid Native Object"); } while (0); JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_TMXLayer_create : Error processing arguments"); - cocos2d::experimental::TMXLayer* ret = cocos2d::experimental::TMXLayer::create(arg0, arg1, arg2); + cocos2d::TMXLayer* ret = cocos2d::TMXLayer::create(arg0, arg1, arg2); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::experimental::TMXLayer*)ret); + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::TMXLayer*)ret); jsret = OBJECT_TO_JSVAL(jsProxy->obj); } else { jsret = JSVAL_NULL; @@ -63719,12 +63995,12 @@ bool js_cocos2dx_TMXLayer_constructor(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; - cocos2d::experimental::TMXLayer* cobj = new (std::nothrow) cocos2d::experimental::TMXLayer(); + cocos2d::TMXLayer* cobj = new (std::nothrow) cocos2d::TMXLayer(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -63738,29 +64014,29 @@ bool js_cocos2dx_TMXLayer_constructor(JSContext *cx, uint32_t argc, jsval *vp) args.rval().set(OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::experimental::TMXLayer"); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::TMXLayer"); if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); return true; } -extern JSObject *jsb_cocos2d_Node_prototype; +extern JSObject *jsb_cocos2d_SpriteBatchNode_prototype; -void js_cocos2d_experimental_TMXLayer_finalize(JSFreeOp *fop, JSObject *obj) { +void js_cocos2d_TMXLayer_finalize(JSFreeOp *fop, JSObject *obj) { CCLOGINFO("jsbindings: finalizing JS object %p (TMXLayer)", obj); } -static bool js_cocos2d_experimental_TMXLayer_ctor(JSContext *cx, uint32_t argc, jsval *vp) +static bool js_cocos2d_TMXLayer_ctor(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::experimental::TMXLayer *nobj = new (std::nothrow) cocos2d::experimental::TMXLayer(); + cocos2d::TMXLayer *nobj = new (std::nothrow) cocos2d::TMXLayer(); if (nobj) { nobj->autorelease(); } js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::experimental::TMXLayer"); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::TMXLayer"); bool isFound = false; if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); @@ -63768,17 +64044,17 @@ static bool js_cocos2d_experimental_TMXLayer_ctor(JSContext *cx, uint32_t argc, return true; } void js_register_cocos2dx_TMXLayer(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_experimental_TMXLayer_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_experimental_TMXLayer_class->name = "TMXLayer"; - jsb_cocos2d_experimental_TMXLayer_class->addProperty = JS_PropertyStub; - jsb_cocos2d_experimental_TMXLayer_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_experimental_TMXLayer_class->getProperty = JS_PropertyStub; - jsb_cocos2d_experimental_TMXLayer_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_experimental_TMXLayer_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_experimental_TMXLayer_class->resolve = JS_ResolveStub; - jsb_cocos2d_experimental_TMXLayer_class->convert = JS_ConvertStub; - jsb_cocos2d_experimental_TMXLayer_class->finalize = js_cocos2d_experimental_TMXLayer_finalize; - jsb_cocos2d_experimental_TMXLayer_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); + jsb_cocos2d_TMXLayer_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_TMXLayer_class->name = "TMXLayer"; + jsb_cocos2d_TMXLayer_class->addProperty = JS_PropertyStub; + jsb_cocos2d_TMXLayer_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_TMXLayer_class->getProperty = JS_PropertyStub; + jsb_cocos2d_TMXLayer_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_TMXLayer_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_TMXLayer_class->resolve = JS_ResolveStub; + jsb_cocos2d_TMXLayer_class->convert = JS_ConvertStub; + jsb_cocos2d_TMXLayer_class->finalize = js_cocos2d_TMXLayer_finalize; + jsb_cocos2d_TMXLayer_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -63789,6 +64065,7 @@ void js_register_cocos2dx_TMXLayer(JSContext *cx, JS::HandleObject global) { JS_FN("getTileGIDAt", js_cocos2dx_TMXLayer_getTileGIDAt, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getPositionAt", js_cocos2dx_TMXLayer_getPositionAt, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setLayerOrientation", js_cocos2dx_TMXLayer_setLayerOrientation, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("releaseMap", js_cocos2dx_TMXLayer_releaseMap, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setTiles", js_cocos2dx_TMXLayer_setTiles, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getLayerSize", js_cocos2dx_TMXLayer_getLayerSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setMapTileSize", js_cocos2dx_TMXLayer_setMapTileSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -63796,9 +64073,8 @@ void js_register_cocos2dx_TMXLayer(JSContext *cx, JS::HandleObject global) { JS_FN("setProperties", js_cocos2dx_TMXLayer_setProperties, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setLayerName", js_cocos2dx_TMXLayer_setLayerName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("removeTileAt", js_cocos2dx_TMXLayer_removeTileAt, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getProperties", js_cocos2dx_TMXLayer_getProperties, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTilesetInfo", js_cocos2dx_TMXLayer_initWithTilesetInfo, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setupTiles", js_cocos2dx_TMXLayer_setupTiles, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setupTileSprite", js_cocos2dx_TMXLayer_setupTileSprite, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setTileGID", js_cocos2dx_TMXLayer_setTileGID, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getMapTileSize", js_cocos2dx_TMXLayer_getMapTileSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getProperty", js_cocos2dx_TMXLayer_getProperty, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -63806,8 +64082,9 @@ void js_register_cocos2dx_TMXLayer(JSContext *cx, JS::HandleObject global) { JS_FN("getLayerName", js_cocos2dx_TMXLayer_getLayerName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setTileSet", js_cocos2dx_TMXLayer_setTileSet, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getTileSet", js_cocos2dx_TMXLayer_getTileSet, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getProperties", js_cocos2dx_TMXLayer_getProperties, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getTileAt", js_cocos2dx_TMXLayer_getTileAt, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_experimental_TMXLayer_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_TMXLayer_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; @@ -63816,10 +64093,10 @@ void js_register_cocos2dx_TMXLayer(JSContext *cx, JS::HandleObject global) { JS_FS_END }; - jsb_cocos2d_experimental_TMXLayer_prototype = JS_InitClass( + jsb_cocos2d_TMXLayer_prototype = JS_InitClass( cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_experimental_TMXLayer_class, + JS::RootedObject(cx, jsb_cocos2d_SpriteBatchNode_prototype), + jsb_cocos2d_TMXLayer_class, js_cocos2dx_TMXLayer_constructor, 0, // constructor properties, funcs, @@ -63831,21 +64108,21 @@ void js_register_cocos2dx_TMXLayer(JSContext *cx, JS::HandleObject global) { // JS_SetPropertyAttributes(cx, global, "TMXLayer", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_experimental_TMXLayer_class; - p->proto = jsb_cocos2d_experimental_TMXLayer_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; + p->jsclass = jsb_cocos2d_TMXLayer_class; + p->proto = jsb_cocos2d_TMXLayer_prototype; + p->parentProto = jsb_cocos2d_SpriteBatchNode_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } } -JSClass *jsb_cocos2d_experimental_TMXTiledMap_class; -JSObject *jsb_cocos2d_experimental_TMXTiledMap_prototype; +JSClass *jsb_cocos2d_TMXTiledMap_class; +JSObject *jsb_cocos2d_TMXTiledMap_prototype; bool js_cocos2dx_TMXTiledMap_setObjectGroups(JSContext *cx, uint32_t argc, jsval *vp) { @@ -63853,7 +64130,7 @@ bool js_cocos2dx_TMXTiledMap_setObjectGroups(JSContext *cx, uint32_t argc, jsval bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXTiledMap* cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_setObjectGroups : Invalid Native Object"); if (argc == 1) { cocos2d::Vector arg0; @@ -63873,7 +64150,7 @@ bool js_cocos2dx_TMXTiledMap_getProperty(JSContext *cx, uint32_t argc, jsval *vp bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXTiledMap* cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_getProperty : Invalid Native Object"); if (argc == 1) { std::string arg0; @@ -63895,7 +64172,7 @@ bool js_cocos2dx_TMXTiledMap_setMapSize(JSContext *cx, uint32_t argc, jsval *vp) bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXTiledMap* cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_setMapSize : Invalid Native Object"); if (argc == 1) { cocos2d::Size arg0; @@ -63915,7 +64192,7 @@ bool js_cocos2dx_TMXTiledMap_getObjectGroup(JSContext *cx, uint32_t argc, jsval bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXTiledMap* cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_getObjectGroup : Invalid Native Object"); if (argc == 1) { std::string arg0; @@ -63944,10 +64221,10 @@ bool js_cocos2dx_TMXTiledMap_getObjectGroups(JSContext *cx, uint32_t argc, jsval bool ok = true; JS::RootedObject obj(cx); - cocos2d::experimental::TMXTiledMap* cobj = NULL; + cocos2d::TMXTiledMap* cobj = NULL; obj = args.thisv().toObjectOrNull(); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_getObjectGroups : Invalid Native Object"); do { if (argc == 0) { @@ -63972,12 +64249,58 @@ bool js_cocos2dx_TMXTiledMap_getObjectGroups(JSContext *cx, uint32_t argc, jsval JS_ReportError(cx, "js_cocos2dx_TMXTiledMap_getObjectGroups : wrong number of arguments"); return false; } +bool js_cocos2dx_TMXTiledMap_initWithXML(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_initWithXML : Invalid Native Object"); + if (argc == 2) { + std::string arg0; + std::string arg1; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + ok &= jsval_to_std_string(cx, args.get(1), &arg1); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_TMXTiledMap_initWithXML : Error processing arguments"); + bool ret = cobj->initWithXML(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_TMXTiledMap_initWithXML : wrong number of arguments: %d, was expecting %d", argc, 2); + return false; +} +bool js_cocos2dx_TMXTiledMap_initWithTMXFile(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_initWithTMXFile : Invalid Native Object"); + if (argc == 1) { + std::string arg0; + ok &= jsval_to_std_string(cx, args.get(0), &arg0); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_TMXTiledMap_initWithTMXFile : Error processing arguments"); + bool ret = cobj->initWithTMXFile(arg0); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_TMXTiledMap_initWithTMXFile : wrong number of arguments: %d, was expecting %d", argc, 1); + return false; +} bool js_cocos2dx_TMXTiledMap_getTileSize(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXTiledMap* cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_getTileSize : Invalid Native Object"); if (argc == 0) { const cocos2d::Size& ret = cobj->getTileSize(); @@ -63995,7 +64318,7 @@ bool js_cocos2dx_TMXTiledMap_getMapSize(JSContext *cx, uint32_t argc, jsval *vp) JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXTiledMap* cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_getMapSize : Invalid Native Object"); if (argc == 0) { const cocos2d::Size& ret = cobj->getMapSize(); @@ -64013,10 +64336,10 @@ bool js_cocos2dx_TMXTiledMap_getProperties(JSContext *cx, uint32_t argc, jsval * JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXTiledMap* cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_getProperties : Invalid Native Object"); if (argc == 0) { - const cocos2d::ValueMap& ret = cobj->getProperties(); + cocos2d::ValueMap& ret = cobj->getProperties(); jsval jsret = JSVAL_NULL; jsret = ccvaluemap_to_jsval(cx, ret); args.rval().set(jsret); @@ -64030,22 +64353,50 @@ bool js_cocos2dx_TMXTiledMap_getPropertiesForGID(JSContext *cx, uint32_t argc, j { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXTiledMap* cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_getPropertiesForGID : Invalid Native Object"); - if (argc == 1) { - int arg0; - ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_TMXTiledMap_getPropertiesForGID : Error processing arguments"); - cocos2d::Value ret = cobj->getPropertiesForGID(arg0); - jsval jsret = JSVAL_NULL; - jsret = ccvalue_to_jsval(cx, ret); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_TMXTiledMap_getPropertiesForGID : wrong number of arguments: %d, was expecting %d", argc, 1); + JS::RootedObject obj(cx); + cocos2d::TMXTiledMap* cobj = NULL; + obj = args.thisv().toObjectOrNull(); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_getPropertiesForGID : Invalid Native Object"); + do { + if (argc == 2) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + if (!ok) { ok = true; break; } + cocos2d::Value** arg1; + do { + if (!args.get(1).isObject()) { ok = false; break; } + js_proxy_t *jsProxy; + JSObject *tmpObj = args.get(1).toObjectOrNull(); + jsProxy = jsb_get_js_proxy(tmpObj); + arg1 = (cocos2d::Value**)(jsProxy ? jsProxy->ptr : NULL); + JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object"); + } while (0); + if (!ok) { ok = true; break; } + bool ret = cobj->getPropertiesForGID(arg0, arg1); + jsval jsret = JSVAL_NULL; + jsret = BOOLEAN_TO_JSVAL(ret); + args.rval().set(jsret); + return true; + } + } while(0); + + do { + if (argc == 1) { + int arg0; + ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0); + if (!ok) { ok = true; break; } + cocos2d::Value ret = cobj->getPropertiesForGID(arg0); + jsval jsret = JSVAL_NULL; + jsret = ccvalue_to_jsval(cx, ret); + args.rval().set(jsret); + return true; + } + } while(0); + + JS_ReportError(cx, "js_cocos2dx_TMXTiledMap_getPropertiesForGID : wrong number of arguments"); return false; } bool js_cocos2dx_TMXTiledMap_setTileSize(JSContext *cx, uint32_t argc, jsval *vp) @@ -64054,7 +64405,7 @@ bool js_cocos2dx_TMXTiledMap_setTileSize(JSContext *cx, uint32_t argc, jsval *vp bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXTiledMap* cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_setTileSize : Invalid Native Object"); if (argc == 1) { cocos2d::Size arg0; @@ -64074,7 +64425,7 @@ bool js_cocos2dx_TMXTiledMap_setProperties(JSContext *cx, uint32_t argc, jsval * bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXTiledMap* cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_setProperties : Invalid Native Object"); if (argc == 1) { cocos2d::ValueMap arg0; @@ -64094,17 +64445,17 @@ bool js_cocos2dx_TMXTiledMap_getLayer(JSContext *cx, uint32_t argc, jsval *vp) bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXTiledMap* cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_getLayer : Invalid Native Object"); if (argc == 1) { std::string arg0; ok &= jsval_to_std_string(cx, args.get(0), &arg0); JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_TMXTiledMap_getLayer : Error processing arguments"); - cocos2d::experimental::TMXLayer* ret = cobj->getLayer(arg0); + cocos2d::TMXLayer* ret = cobj->getLayer(arg0); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::experimental::TMXLayer*)ret); + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::TMXLayer*)ret); jsret = OBJECT_TO_JSVAL(jsProxy->obj); } else { jsret = JSVAL_NULL; @@ -64122,7 +64473,7 @@ bool js_cocos2dx_TMXTiledMap_getMapOrientation(JSContext *cx, uint32_t argc, jsv JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXTiledMap* cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_getMapOrientation : Invalid Native Object"); if (argc == 0) { int ret = cobj->getMapOrientation(); @@ -64141,7 +64492,7 @@ bool js_cocos2dx_TMXTiledMap_setMapOrientation(JSContext *cx, uint32_t argc, jsv bool ok = true; JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::experimental::TMXTiledMap* cobj = (cocos2d::experimental::TMXTiledMap *)(proxy ? proxy->ptr : NULL); + cocos2d::TMXTiledMap* cobj = (cocos2d::TMXTiledMap *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_TMXTiledMap_setMapOrientation : Invalid Native Object"); if (argc == 1) { int arg0; @@ -64163,11 +64514,11 @@ bool js_cocos2dx_TMXTiledMap_create(JSContext *cx, uint32_t argc, jsval *vp) std::string arg0; ok &= jsval_to_std_string(cx, args.get(0), &arg0); JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_TMXTiledMap_create : Error processing arguments"); - cocos2d::experimental::TMXTiledMap* ret = cocos2d::experimental::TMXTiledMap::create(arg0); + cocos2d::TMXTiledMap* ret = cocos2d::TMXTiledMap::create(arg0); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::experimental::TMXTiledMap*)ret); + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::TMXTiledMap*)ret); jsret = OBJECT_TO_JSVAL(jsProxy->obj); } else { jsret = JSVAL_NULL; @@ -64190,11 +64541,11 @@ bool js_cocos2dx_TMXTiledMap_createWithXML(JSContext *cx, uint32_t argc, jsval * ok &= jsval_to_std_string(cx, args.get(0), &arg0); ok &= jsval_to_std_string(cx, args.get(1), &arg1); JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_TMXTiledMap_createWithXML : Error processing arguments"); - cocos2d::experimental::TMXTiledMap* ret = cocos2d::experimental::TMXTiledMap::createWithXML(arg0, arg1); + cocos2d::TMXTiledMap* ret = cocos2d::TMXTiledMap::createWithXML(arg0, arg1); jsval jsret = JSVAL_NULL; do { if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::experimental::TMXTiledMap*)ret); + js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::TMXTiledMap*)ret); jsret = OBJECT_TO_JSVAL(jsProxy->obj); } else { jsret = JSVAL_NULL; @@ -64207,242 +64558,16 @@ bool js_cocos2dx_TMXTiledMap_createWithXML(JSContext *cx, uint32_t argc, jsval * return false; } - -extern JSObject *jsb_cocos2d_Node_prototype; - -void js_cocos2d_experimental_TMXTiledMap_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (TMXTiledMap)", obj); -} - -static bool js_cocos2d_experimental_TMXTiledMap_ctor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::experimental::TMXTiledMap *nobj = new (std::nothrow) cocos2d::experimental::TMXTiledMap(); - if (nobj) { - nobj->autorelease(); - } - js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::experimental::TMXTiledMap"); - bool isFound = false; - if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) - ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); - args.rval().setUndefined(); - return true; -} -void js_register_cocos2dx_TMXTiledMap(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_experimental_TMXTiledMap_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_experimental_TMXTiledMap_class->name = "TMXTiledMap"; - jsb_cocos2d_experimental_TMXTiledMap_class->addProperty = JS_PropertyStub; - jsb_cocos2d_experimental_TMXTiledMap_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_experimental_TMXTiledMap_class->getProperty = JS_PropertyStub; - jsb_cocos2d_experimental_TMXTiledMap_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_experimental_TMXTiledMap_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_experimental_TMXTiledMap_class->resolve = JS_ResolveStub; - jsb_cocos2d_experimental_TMXTiledMap_class->convert = JS_ConvertStub; - jsb_cocos2d_experimental_TMXTiledMap_class->finalize = js_cocos2d_experimental_TMXTiledMap_finalize; - jsb_cocos2d_experimental_TMXTiledMap_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); - - static JSPropertySpec properties[] = { - JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_PS_END - }; - - static JSFunctionSpec funcs[] = { - JS_FN("setObjectGroups", js_cocos2dx_TMXTiledMap_setObjectGroups, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getProperty", js_cocos2dx_TMXTiledMap_getProperty, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setMapSize", js_cocos2dx_TMXTiledMap_setMapSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getObjectGroup", js_cocos2dx_TMXTiledMap_getObjectGroup, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getObjectGroups", js_cocos2dx_TMXTiledMap_getObjectGroups, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getTileSize", js_cocos2dx_TMXTiledMap_getTileSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMapSize", js_cocos2dx_TMXTiledMap_getMapSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getProperties", js_cocos2dx_TMXTiledMap_getProperties, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getPropertiesForGID", js_cocos2dx_TMXTiledMap_getPropertiesForGID, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setTileSize", js_cocos2dx_TMXTiledMap_setTileSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setProperties", js_cocos2dx_TMXTiledMap_setProperties, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getLayer", js_cocos2dx_TMXTiledMap_getLayer, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("getMapOrientation", js_cocos2dx_TMXTiledMap_getMapOrientation, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setMapOrientation", js_cocos2dx_TMXTiledMap_setMapOrientation, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_experimental_TMXTiledMap_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_TMXTiledMap_create, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("createWithXML", js_cocos2dx_TMXTiledMap_createWithXML, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FS_END - }; - - jsb_cocos2d_experimental_TMXTiledMap_prototype = JS_InitClass( - cx, global, - JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_experimental_TMXTiledMap_class, - dummy_constructor, 0, // no constructor - properties, - funcs, - NULL, // no static properties - st_funcs); - // make the class enumerable in the registered namespace -// bool found; -//FIXME: Removed in Firefox v27 -// JS_SetPropertyAttributes(cx, global, "TMXTiledMap", JSPROP_ENUMERATE | JSPROP_READONLY, &found); - - // add the proto and JSClass to the type->js info hash table - TypeTest t; - js_type_class_t *p; - std::string typeName = t.s_name(); - if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) - { - p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_experimental_TMXTiledMap_class; - p->proto = jsb_cocos2d_experimental_TMXTiledMap_prototype; - p->parentProto = jsb_cocos2d_Node_prototype; - _js_global_type_map.insert(std::make_pair(typeName, p)); - } -} - -JSClass *jsb_cocos2d_ParallaxNode_class; -JSObject *jsb_cocos2d_ParallaxNode_prototype; - -bool js_cocos2dx_ParallaxNode_getParallaxArray(JSContext *cx, uint32_t argc, jsval *vp) +bool js_cocos2dx_TMXTiledMap_constructor(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); bool ok = true; - - JS::RootedObject obj(cx); - cocos2d::ParallaxNode* cobj = NULL; - obj = args.thisv().toObjectOrNull(); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ParallaxNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParallaxNode_getParallaxArray : Invalid Native Object"); - do { - if (argc == 0) { - const cocos2d::_ccArray* ret = cobj->getParallaxArray(); - jsval jsret = JSVAL_NULL; - #pragma warning NO CONVERSION FROM NATIVE FOR _ccArray*; - args.rval().set(jsret); - return true; - } - } while(0); - - do { - if (argc == 0) { - cocos2d::_ccArray* ret = cobj->getParallaxArray(); - jsval jsret = JSVAL_NULL; - #pragma warning NO CONVERSION FROM NATIVE FOR _ccArray*; - args.rval().set(jsret); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_ParallaxNode_getParallaxArray : wrong number of arguments"); - return false; -} -bool js_cocos2dx_ParallaxNode_addChild(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ParallaxNode* cobj = (cocos2d::ParallaxNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParallaxNode_addChild : Invalid Native Object"); - if (argc == 4) { - cocos2d::Node* arg0; - int arg1; - cocos2d::Vec2 arg2; - cocos2d::Vec2 arg3; - do { - if (!args.get(0).isObject()) { ok = false; break; } - js_proxy_t *jsProxy; - JSObject *tmpObj = args.get(0).toObjectOrNull(); - jsProxy = jsb_get_js_proxy(tmpObj); - arg0 = (cocos2d::Node*)(jsProxy ? jsProxy->ptr : NULL); - JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object"); - } while (0); - ok &= jsval_to_int32(cx, args.get(1), (int32_t *)&arg1); - ok &= jsval_to_vector2(cx, args.get(2), &arg2); - ok &= jsval_to_vector2(cx, args.get(3), &arg3); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParallaxNode_addChild : Error processing arguments"); - cobj->addChild(arg0, arg1, arg2, arg3); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParallaxNode_addChild : wrong number of arguments: %d, was expecting %d", argc, 4); - return false; -} -bool js_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ParallaxNode* cobj = (cocos2d::ParallaxNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup : Invalid Native Object"); - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup : Error processing arguments"); - cobj->removeAllChildrenWithCleanup(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParallaxNode_setParallaxArray(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - js_proxy_t *proxy = jsb_get_js_proxy(obj); - cocos2d::ParallaxNode* cobj = (cocos2d::ParallaxNode *)(proxy ? proxy->ptr : NULL); - JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ParallaxNode_setParallaxArray : Invalid Native Object"); - if (argc == 1) { - cocos2d::_ccArray* arg0; - #pragma warning NO CONVERSION TO NATIVE FOR _ccArray* - ok = false; - JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ParallaxNode_setParallaxArray : Error processing arguments"); - cobj->setParallaxArray(arg0); - args.rval().setUndefined(); - return true; - } - - JS_ReportError(cx, "js_cocos2dx_ParallaxNode_setParallaxArray : wrong number of arguments: %d, was expecting %d", argc, 1); - return false; -} -bool js_cocos2dx_ParallaxNode_create(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - if (argc == 0) { - cocos2d::ParallaxNode* ret = cocos2d::ParallaxNode::create(); - jsval jsret = JSVAL_NULL; - do { - if (ret) { - js_proxy_t *jsProxy = js_get_or_create_proxy(cx, (cocos2d::ParallaxNode*)ret); - jsret = OBJECT_TO_JSVAL(jsProxy->obj); - } else { - jsret = JSVAL_NULL; - } - } while (0); - args.rval().set(jsret); - return true; - } - JS_ReportError(cx, "js_cocos2dx_ParallaxNode_create : wrong number of arguments"); - return false; -} - -bool js_cocos2dx_ParallaxNode_constructor(JSContext *cx, uint32_t argc, jsval *vp) -{ - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - bool ok = true; - cocos2d::ParallaxNode* cobj = new (std::nothrow) cocos2d::ParallaxNode(); + cocos2d::TMXTiledMap* cobj = new (std::nothrow) cocos2d::TMXTiledMap(); cocos2d::Ref *_ccobj = dynamic_cast(cobj); if (_ccobj) { _ccobj->autorelease(); } - TypeTest t; + TypeTest t; js_type_class_t *typeClass = nullptr; std::string typeName = t.s_name(); auto typeMapIter = _js_global_type_map.find(typeName); @@ -64456,7 +64581,7 @@ bool js_cocos2dx_ParallaxNode_constructor(JSContext *cx, uint32_t argc, jsval *v args.rval().set(OBJECT_TO_JSVAL(obj)); // link the native object with the javascript object js_proxy_t* p = jsb_new_proxy(cobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::ParallaxNode"); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::TMXTiledMap"); if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok) ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); return true; @@ -64465,38 +64590,38 @@ bool js_cocos2dx_ParallaxNode_constructor(JSContext *cx, uint32_t argc, jsval *v extern JSObject *jsb_cocos2d_Node_prototype; -void js_cocos2d_ParallaxNode_finalize(JSFreeOp *fop, JSObject *obj) { - CCLOGINFO("jsbindings: finalizing JS object %p (ParallaxNode)", obj); +void js_cocos2d_TMXTiledMap_finalize(JSFreeOp *fop, JSObject *obj) { + CCLOGINFO("jsbindings: finalizing JS object %p (TMXTiledMap)", obj); } -static bool js_cocos2d_ParallaxNode_ctor(JSContext *cx, uint32_t argc, jsval *vp) +static bool js_cocos2d_TMXTiledMap_ctor(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); - cocos2d::ParallaxNode *nobj = new (std::nothrow) cocos2d::ParallaxNode(); + cocos2d::TMXTiledMap *nobj = new (std::nothrow) cocos2d::TMXTiledMap(); if (nobj) { nobj->autorelease(); } js_proxy_t* p = jsb_new_proxy(nobj, obj); - AddNamedObjectRoot(cx, &p->obj, "cocos2d::ParallaxNode"); + AddNamedObjectRoot(cx, &p->obj, "cocos2d::TMXTiledMap"); bool isFound = false; if (JS_HasProperty(cx, obj, "_ctor", &isFound) && isFound) ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args); args.rval().setUndefined(); return true; } -void js_register_cocos2dx_ParallaxNode(JSContext *cx, JS::HandleObject global) { - jsb_cocos2d_ParallaxNode_class = (JSClass *)calloc(1, sizeof(JSClass)); - jsb_cocos2d_ParallaxNode_class->name = "ParallaxNode"; - jsb_cocos2d_ParallaxNode_class->addProperty = JS_PropertyStub; - jsb_cocos2d_ParallaxNode_class->delProperty = JS_DeletePropertyStub; - jsb_cocos2d_ParallaxNode_class->getProperty = JS_PropertyStub; - jsb_cocos2d_ParallaxNode_class->setProperty = JS_StrictPropertyStub; - jsb_cocos2d_ParallaxNode_class->enumerate = JS_EnumerateStub; - jsb_cocos2d_ParallaxNode_class->resolve = JS_ResolveStub; - jsb_cocos2d_ParallaxNode_class->convert = JS_ConvertStub; - jsb_cocos2d_ParallaxNode_class->finalize = js_cocos2d_ParallaxNode_finalize; - jsb_cocos2d_ParallaxNode_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); +void js_register_cocos2dx_TMXTiledMap(JSContext *cx, JS::HandleObject global) { + jsb_cocos2d_TMXTiledMap_class = (JSClass *)calloc(1, sizeof(JSClass)); + jsb_cocos2d_TMXTiledMap_class->name = "TMXTiledMap"; + jsb_cocos2d_TMXTiledMap_class->addProperty = JS_PropertyStub; + jsb_cocos2d_TMXTiledMap_class->delProperty = JS_DeletePropertyStub; + jsb_cocos2d_TMXTiledMap_class->getProperty = JS_PropertyStub; + jsb_cocos2d_TMXTiledMap_class->setProperty = JS_StrictPropertyStub; + jsb_cocos2d_TMXTiledMap_class->enumerate = JS_EnumerateStub; + jsb_cocos2d_TMXTiledMap_class->resolve = JS_ResolveStub; + jsb_cocos2d_TMXTiledMap_class->convert = JS_ConvertStub; + jsb_cocos2d_TMXTiledMap_class->finalize = js_cocos2d_TMXTiledMap_finalize; + jsb_cocos2d_TMXTiledMap_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2); static JSPropertySpec properties[] = { JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE), @@ -64504,24 +64629,37 @@ void js_register_cocos2dx_ParallaxNode(JSContext *cx, JS::HandleObject global) { }; static JSFunctionSpec funcs[] = { - JS_FN("getParallaxArray", js_cocos2dx_ParallaxNode_getParallaxArray, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("addChild", js_cocos2dx_ParallaxNode_addChild, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("removeAllChildrenWithCleanup", js_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("setParallaxArray", js_cocos2dx_ParallaxNode_setParallaxArray, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), - JS_FN("ctor", js_cocos2d_ParallaxNode_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setObjectGroups", js_cocos2dx_TMXTiledMap_setObjectGroups, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getProperty", js_cocos2dx_TMXTiledMap_getProperty, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMapSize", js_cocos2dx_TMXTiledMap_setMapSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getObjectGroup", js_cocos2dx_TMXTiledMap_getObjectGroup, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getObjectGroups", js_cocos2dx_TMXTiledMap_getObjectGroups, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithXML", js_cocos2dx_TMXTiledMap_initWithXML, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("initWithTMXFile", js_cocos2dx_TMXTiledMap_initWithTMXFile, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getTileSize", js_cocos2dx_TMXTiledMap_getTileSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMapSize", js_cocos2dx_TMXTiledMap_getMapSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getProperties", js_cocos2dx_TMXTiledMap_getProperties, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getPropertiesForGID", js_cocos2dx_TMXTiledMap_getPropertiesForGID, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setTileSize", js_cocos2dx_TMXTiledMap_setTileSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setProperties", js_cocos2dx_TMXTiledMap_setProperties, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getLayer", js_cocos2dx_TMXTiledMap_getLayer, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("getMapOrientation", js_cocos2dx_TMXTiledMap_getMapOrientation, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setMapOrientation", js_cocos2dx_TMXTiledMap_setMapOrientation, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("ctor", js_cocos2d_TMXTiledMap_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; static JSFunctionSpec st_funcs[] = { - JS_FN("create", js_cocos2dx_ParallaxNode_create, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("create", js_cocos2dx_TMXTiledMap_create, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("createWithXML", js_cocos2dx_TMXTiledMap_createWithXML, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FS_END }; - jsb_cocos2d_ParallaxNode_prototype = JS_InitClass( + jsb_cocos2d_TMXTiledMap_prototype = JS_InitClass( cx, global, JS::RootedObject(cx, jsb_cocos2d_Node_prototype), - jsb_cocos2d_ParallaxNode_class, - js_cocos2dx_ParallaxNode_constructor, 0, // constructor + jsb_cocos2d_TMXTiledMap_class, + js_cocos2dx_TMXTiledMap_constructor, 0, // constructor properties, funcs, NULL, // no static properties @@ -64529,17 +64667,17 @@ void js_register_cocos2dx_ParallaxNode(JSContext *cx, JS::HandleObject global) { // make the class enumerable in the registered namespace // bool found; //FIXME: Removed in Firefox v27 -// JS_SetPropertyAttributes(cx, global, "ParallaxNode", JSPROP_ENUMERATE | JSPROP_READONLY, &found); +// JS_SetPropertyAttributes(cx, global, "TMXTiledMap", JSPROP_ENUMERATE | JSPROP_READONLY, &found); // add the proto and JSClass to the type->js info hash table - TypeTest t; + TypeTest t; js_type_class_t *p; std::string typeName = t.s_name(); if (_js_global_type_map.find(typeName) == _js_global_type_map.end()) { p = (js_type_class_t *)malloc(sizeof(js_type_class_t)); - p->jsclass = jsb_cocos2d_ParallaxNode_class; - p->proto = jsb_cocos2d_ParallaxNode_prototype; + p->jsclass = jsb_cocos2d_TMXTiledMap_class; + p->proto = jsb_cocos2d_TMXTiledMap_prototype; p->parentProto = jsb_cocos2d_Node_prototype; _js_global_type_map.insert(std::make_pair(typeName, p)); } diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp index 811a5ef1f9..a82ee08eaa 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp @@ -3624,6 +3624,20 @@ bool js_cocos2dx_TextFieldTTF_attachWithIME(JSContext *cx, uint32_t argc, jsval bool js_cocos2dx_TextFieldTTF_textFieldWithPlaceHolder(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TextFieldTTF_TextFieldTTF(JSContext *cx, uint32_t argc, jsval *vp); +extern JSClass *jsb_cocos2d_ParallaxNode_class; +extern JSObject *jsb_cocos2d_ParallaxNode_prototype; + +bool js_cocos2dx_ParallaxNode_constructor(JSContext *cx, uint32_t argc, jsval *vp); +void js_cocos2dx_ParallaxNode_finalize(JSContext *cx, JSObject *obj); +void js_register_cocos2dx_ParallaxNode(JSContext *cx, JS::HandleObject global); +void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); +bool js_cocos2dx_ParallaxNode_getParallaxArray(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParallaxNode_addChild(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParallaxNode_setParallaxArray(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParallaxNode_create(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_ParallaxNode_ParallaxNode(JSContext *cx, uint32_t argc, jsval *vp); + extern JSClass *jsb_cocos2d_TMXObjectGroup_class; extern JSObject *jsb_cocos2d_TMXObjectGroup_prototype; @@ -3707,8 +3721,8 @@ bool js_cocos2dx_TMXMapInfo_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXMapInfo_createWithXML(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXMapInfo_TMXMapInfo(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_experimental_TMXLayer_class; -extern JSObject *jsb_cocos2d_experimental_TMXLayer_prototype; +extern JSClass *jsb_cocos2d_TMXLayer_class; +extern JSObject *jsb_cocos2d_TMXLayer_prototype; bool js_cocos2dx_TMXLayer_constructor(JSContext *cx, uint32_t argc, jsval *vp); void js_cocos2dx_TMXLayer_finalize(JSContext *cx, JSObject *obj); @@ -3717,6 +3731,7 @@ void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); bool js_cocos2dx_TMXLayer_getTileGIDAt(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_getPositionAt(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_setLayerOrientation(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_TMXLayer_releaseMap(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_setTiles(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_getLayerSize(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_setMapTileSize(JSContext *cx, uint32_t argc, jsval *vp); @@ -3724,9 +3739,8 @@ bool js_cocos2dx_TMXLayer_getLayerOrientation(JSContext *cx, uint32_t argc, jsva bool js_cocos2dx_TMXLayer_setProperties(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_setLayerName(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_removeTileAt(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_TMXLayer_getProperties(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_TMXLayer_initWithTilesetInfo(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_setupTiles(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_TMXLayer_setupTileSprite(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_setTileGID(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_getMapTileSize(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_getProperty(JSContext *cx, uint32_t argc, jsval *vp); @@ -3734,12 +3748,13 @@ bool js_cocos2dx_TMXLayer_setLayerSize(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_getLayerName(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_setTileSet(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_getTileSet(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_TMXLayer_getProperties(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_getTileAt(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXLayer_TMXLayer(JSContext *cx, uint32_t argc, jsval *vp); -extern JSClass *jsb_cocos2d_experimental_TMXTiledMap_class; -extern JSObject *jsb_cocos2d_experimental_TMXTiledMap_prototype; +extern JSClass *jsb_cocos2d_TMXTiledMap_class; +extern JSObject *jsb_cocos2d_TMXTiledMap_prototype; bool js_cocos2dx_TMXTiledMap_constructor(JSContext *cx, uint32_t argc, jsval *vp); void js_cocos2dx_TMXTiledMap_finalize(JSContext *cx, JSObject *obj); @@ -3750,6 +3765,8 @@ bool js_cocos2dx_TMXTiledMap_getProperty(JSContext *cx, uint32_t argc, jsval *vp bool js_cocos2dx_TMXTiledMap_setMapSize(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXTiledMap_getObjectGroup(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXTiledMap_getObjectGroups(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_TMXTiledMap_initWithXML(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_TMXTiledMap_initWithTMXFile(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXTiledMap_getTileSize(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXTiledMap_getMapSize(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXTiledMap_getProperties(JSContext *cx, uint32_t argc, jsval *vp); @@ -3761,20 +3778,7 @@ bool js_cocos2dx_TMXTiledMap_getMapOrientation(JSContext *cx, uint32_t argc, jsv bool js_cocos2dx_TMXTiledMap_setMapOrientation(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXTiledMap_create(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_TMXTiledMap_createWithXML(JSContext *cx, uint32_t argc, jsval *vp); - -extern JSClass *jsb_cocos2d_ParallaxNode_class; -extern JSObject *jsb_cocos2d_ParallaxNode_prototype; - -bool js_cocos2dx_ParallaxNode_constructor(JSContext *cx, uint32_t argc, jsval *vp); -void js_cocos2dx_ParallaxNode_finalize(JSContext *cx, JSObject *obj); -void js_register_cocos2dx_ParallaxNode(JSContext *cx, JS::HandleObject global); -void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj); -bool js_cocos2dx_ParallaxNode_getParallaxArray(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParallaxNode_addChild(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParallaxNode_setParallaxArray(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParallaxNode_create(JSContext *cx, uint32_t argc, jsval *vp); -bool js_cocos2dx_ParallaxNode_ParallaxNode(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_TMXTiledMap_TMXTiledMap(JSContext *cx, uint32_t argc, jsval *vp); extern JSClass *jsb_cocos2d_TileMapAtlas_class; extern JSObject *jsb_cocos2d_TileMapAtlas_prototype; diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua index a6366b4213..ae55f75851 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua @@ -1211,6 +1211,11 @@ -- @field [parent=#cc] SpriteFrameCache#SpriteFrameCache SpriteFrameCache preloaded module +-------------------------------------------------------- +-- the cc ParallaxNode +-- @field [parent=#cc] ParallaxNode#ParallaxNode ParallaxNode preloaded module + + -------------------------------------------------------- -- the cc TMXObjectGroup -- @field [parent=#cc] TMXObjectGroup#TMXObjectGroup TMXObjectGroup preloaded module @@ -1241,11 +1246,6 @@ -- @field [parent=#cc] TMXTiledMap#TMXTiledMap TMXTiledMap preloaded module --------------------------------------------------------- --- the cc ParallaxNode --- @field [parent=#cc] ParallaxNode#ParallaxNode ParallaxNode preloaded module - - -------------------------------------------------------- -- the cc TileMapAtlas -- @field [parent=#cc] TileMapAtlas#TileMapAtlas TileMapAtlas preloaded module diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 6dbd0519fe..8ab9cfbee0 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -82176,6 +82176,209 @@ int lua_register_cocos2dx_SpriteFrameCache(lua_State* tolua_S) return 1; } +int lua_cocos2dx_ParallaxNode_addChild(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ParallaxNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ParallaxNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ParallaxNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ParallaxNode_addChild'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 4) + { + cocos2d::Node* arg0; + int arg1; + cocos2d::Vec2 arg2; + cocos2d::Vec2 arg3; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ParallaxNode:addChild"); + + ok &= luaval_to_vec2(tolua_S, 4, &arg2, "cc.ParallaxNode:addChild"); + + ok &= luaval_to_vec2(tolua_S, 5, &arg3, "cc.ParallaxNode:addChild"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParallaxNode_addChild'", nullptr); + return 0; + } + cobj->addChild(arg0, arg1, arg2, arg3); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ParallaxNode:addChild",argc, 4); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ParallaxNode_addChild'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ParallaxNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.ParallaxNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ParallaxNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ParallaxNode:removeAllChildrenWithCleanup"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup'", nullptr); + return 0; + } + cobj->removeAllChildrenWithCleanup(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ParallaxNode:removeAllChildrenWithCleanup",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ParallaxNode_create(lua_State* tolua_S) +{ + int argc = 0; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertable(tolua_S,1,"cc.ParallaxNode",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParallaxNode_create'", nullptr); + return 0; + } + cocos2d::ParallaxNode* ret = cocos2d::ParallaxNode::create(); + object_to_luaval(tolua_S, "cc.ParallaxNode",(cocos2d::ParallaxNode*)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.ParallaxNode:create",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ParallaxNode_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_ParallaxNode_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ParallaxNode* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParallaxNode_constructor'", nullptr); + return 0; + } + cobj = new cocos2d::ParallaxNode(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.ParallaxNode"); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ParallaxNode:ParallaxNode",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ParallaxNode_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_ParallaxNode_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (ParallaxNode)"); + return 0; +} + +int lua_register_cocos2dx_ParallaxNode(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.ParallaxNode"); + tolua_cclass(tolua_S,"ParallaxNode","cc.ParallaxNode","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"ParallaxNode"); + tolua_function(tolua_S,"new",lua_cocos2dx_ParallaxNode_constructor); + tolua_function(tolua_S,"addChild",lua_cocos2dx_ParallaxNode_addChild); + tolua_function(tolua_S,"removeAllChildrenWithCleanup",lua_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup); + tolua_function(tolua_S,"create", lua_cocos2dx_ParallaxNode_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::ParallaxNode).name(); + g_luaType[typeName] = "cc.ParallaxNode"; + g_typeCast["ParallaxNode"] = "cc.ParallaxNode"; + return 1; +} + int lua_cocos2dx_TMXObjectGroup_setPositionOffset(lua_State* tolua_S) { int argc = 0; @@ -84724,7 +84927,7 @@ int lua_register_cocos2dx_TMXMapInfo(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_getPositionAt(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -84733,10 +84936,10 @@ int lua_cocos2dx_TMXLayer_getPositionAt(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -84751,7 +84954,7 @@ int lua_cocos2dx_TMXLayer_getPositionAt(lua_State* tolua_S) { cocos2d::Vec2 arg0; - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "ccexp.TMXLayer:getPositionAt"); + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.TMXLayer:getPositionAt"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_getPositionAt'", nullptr); @@ -84761,7 +84964,7 @@ int lua_cocos2dx_TMXLayer_getPositionAt(lua_State* tolua_S) vec2_to_luaval(tolua_S, ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:getPositionAt",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:getPositionAt",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -84774,7 +84977,7 @@ int lua_cocos2dx_TMXLayer_getPositionAt(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_setLayerOrientation(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -84783,10 +84986,10 @@ int lua_cocos2dx_TMXLayer_setLayerOrientation(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -84801,7 +85004,7 @@ int lua_cocos2dx_TMXLayer_setLayerOrientation(lua_State* tolua_S) { int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.TMXLayer:setLayerOrientation"); + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.TMXLayer:setLayerOrientation"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_setLayerOrientation'", nullptr); @@ -84811,7 +85014,7 @@ int lua_cocos2dx_TMXLayer_setLayerOrientation(lua_State* tolua_S) lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:setLayerOrientation",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:setLayerOrientation",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -84821,10 +85024,10 @@ int lua_cocos2dx_TMXLayer_setLayerOrientation(lua_State* tolua_S) return 0; } -int lua_cocos2dx_TMXLayer_getLayerSize(lua_State* tolua_S) +int lua_cocos2dx_TMXLayer_releaseMap(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -84833,10 +85036,57 @@ int lua_cocos2dx_TMXLayer_getLayerSize(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TMXLayer_releaseMap'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_releaseMap'", nullptr); + return 0; + } + cobj->releaseMap(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:releaseMap",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TMXLayer_releaseMap'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TMXLayer_getLayerSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TMXLayer* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -84858,7 +85108,7 @@ int lua_cocos2dx_TMXLayer_getLayerSize(lua_State* tolua_S) size_to_luaval(tolua_S, ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:getLayerSize",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:getLayerSize",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 @@ -84871,7 +85121,7 @@ int lua_cocos2dx_TMXLayer_getLayerSize(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_setMapTileSize(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -84880,10 +85130,10 @@ int lua_cocos2dx_TMXLayer_setMapTileSize(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -84898,7 +85148,7 @@ int lua_cocos2dx_TMXLayer_setMapTileSize(lua_State* tolua_S) { cocos2d::Size arg0; - ok &= luaval_to_size(tolua_S, 2, &arg0, "ccexp.TMXLayer:setMapTileSize"); + ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.TMXLayer:setMapTileSize"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_setMapTileSize'", nullptr); @@ -84908,7 +85158,7 @@ int lua_cocos2dx_TMXLayer_setMapTileSize(lua_State* tolua_S) lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:setMapTileSize",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:setMapTileSize",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -84921,7 +85171,7 @@ int lua_cocos2dx_TMXLayer_setMapTileSize(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_getLayerOrientation(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -84930,10 +85180,10 @@ int lua_cocos2dx_TMXLayer_getLayerOrientation(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -84955,7 +85205,7 @@ int lua_cocos2dx_TMXLayer_getLayerOrientation(lua_State* tolua_S) tolua_pushnumber(tolua_S,(lua_Number)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:getLayerOrientation",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:getLayerOrientation",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 @@ -84968,7 +85218,7 @@ int lua_cocos2dx_TMXLayer_getLayerOrientation(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_setProperties(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -84977,10 +85227,10 @@ int lua_cocos2dx_TMXLayer_setProperties(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -84995,7 +85245,7 @@ int lua_cocos2dx_TMXLayer_setProperties(lua_State* tolua_S) { cocos2d::ValueMap arg0; - ok &= luaval_to_ccvaluemap(tolua_S, 2, &arg0, "ccexp.TMXLayer:setProperties"); + ok &= luaval_to_ccvaluemap(tolua_S, 2, &arg0, "cc.TMXLayer:setProperties"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_setProperties'", nullptr); @@ -85005,7 +85255,7 @@ int lua_cocos2dx_TMXLayer_setProperties(lua_State* tolua_S) lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:setProperties",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:setProperties",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -85018,7 +85268,7 @@ int lua_cocos2dx_TMXLayer_setProperties(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_setLayerName(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85027,10 +85277,10 @@ int lua_cocos2dx_TMXLayer_setLayerName(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85045,7 +85295,7 @@ int lua_cocos2dx_TMXLayer_setLayerName(lua_State* tolua_S) { std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.TMXLayer:setLayerName"); + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TMXLayer:setLayerName"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_setLayerName'", nullptr); @@ -85055,7 +85305,7 @@ int lua_cocos2dx_TMXLayer_setLayerName(lua_State* tolua_S) lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:setLayerName",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:setLayerName",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -85068,7 +85318,7 @@ int lua_cocos2dx_TMXLayer_setLayerName(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_removeTileAt(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85077,10 +85327,10 @@ int lua_cocos2dx_TMXLayer_removeTileAt(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85095,7 +85345,7 @@ int lua_cocos2dx_TMXLayer_removeTileAt(lua_State* tolua_S) { cocos2d::Vec2 arg0; - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "ccexp.TMXLayer:removeTileAt"); + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.TMXLayer:removeTileAt"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_removeTileAt'", nullptr); @@ -85105,7 +85355,7 @@ int lua_cocos2dx_TMXLayer_removeTileAt(lua_State* tolua_S) lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:removeTileAt",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:removeTileAt",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -85115,49 +85365,58 @@ int lua_cocos2dx_TMXLayer_removeTileAt(lua_State* tolua_S) return 0; } -int lua_cocos2dx_TMXLayer_getProperties(lua_State* tolua_S) +int lua_cocos2dx_TMXLayer_initWithTilesetInfo(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; + #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif + #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); + #if COCOS2D_DEBUG >= 1 - if (!cobj) + if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TMXLayer_getProperties'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TMXLayer_initWithTilesetInfo'", nullptr); return 0; } #endif + argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 0) { - cocos2d::ValueMap& ret = cobj->getProperties(); - ccvaluemap_to_luaval(tolua_S, ret); - return 1; + if (argc == 3) + { + cocos2d::TMXTilesetInfo* arg0; + cocos2d::TMXLayerInfo* arg1; + cocos2d::TMXMapInfo* arg2; + + ok &= luaval_to_object(tolua_S, 2, "cc.TMXTilesetInfo",&arg0); + + ok &= luaval_to_object(tolua_S, 3, "cc.TMXLayerInfo",&arg1); + + ok &= luaval_to_object(tolua_S, 4, "cc.TMXMapInfo",&arg2); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_initWithTilesetInfo'", nullptr); + return 0; } - }while(0); - ok = true; - do{ - if (argc == 0) { - const cocos2d::ValueMap& ret = cobj->getProperties(); - ccvaluemap_to_luaval(tolua_S, ret); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:getProperties",argc, 0); + bool ret = cobj->initWithTilesetInfo(arg0, arg1, arg2); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:initWithTilesetInfo",argc, 3); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TMXLayer_getProperties'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TMXLayer_initWithTilesetInfo'.",&tolua_err); #endif return 0; @@ -85165,7 +85424,7 @@ int lua_cocos2dx_TMXLayer_getProperties(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_setupTiles(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85174,10 +85433,10 @@ int lua_cocos2dx_TMXLayer_setupTiles(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85199,7 +85458,7 @@ int lua_cocos2dx_TMXLayer_setupTiles(lua_State* tolua_S) lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:setupTiles",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:setupTiles",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 @@ -85209,75 +85468,19 @@ int lua_cocos2dx_TMXLayer_setupTiles(lua_State* tolua_S) return 0; } -int lua_cocos2dx_TMXLayer_setupTileSprite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TMXLayer_setupTileSprite'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - cocos2d::Sprite* arg0; - cocos2d::Vec2 arg1; - int arg2; - - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); - - ok &= luaval_to_vec2(tolua_S, 3, &arg1, "ccexp.TMXLayer:setupTileSprite"); - - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "ccexp.TMXLayer:setupTileSprite"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_setupTileSprite'", nullptr); - return 0; - } - cobj->setupTileSprite(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:setupTileSprite",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TMXLayer_setupTileSprite'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_TMXLayer_setTileGID(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { @@ -85288,16 +85491,16 @@ int lua_cocos2dx_TMXLayer_setTileGID(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; do{ if (argc == 3) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.TMXLayer:setTileGID"); + unsigned int arg0; + ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.TMXLayer:setTileGID"); if (!ok) { break; } cocos2d::Vec2 arg1; - ok &= luaval_to_vec2(tolua_S, 3, &arg1, "ccexp.TMXLayer:setTileGID"); + ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.TMXLayer:setTileGID"); if (!ok) { break; } cocos2d::TMXTileFlags_ arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "ccexp.TMXLayer:setTileGID"); + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.TMXLayer:setTileGID"); if (!ok) { break; } cobj->setTileGID(arg0, arg1, arg2); @@ -85308,12 +85511,12 @@ int lua_cocos2dx_TMXLayer_setTileGID(lua_State* tolua_S) ok = true; do{ if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.TMXLayer:setTileGID"); + unsigned int arg0; + ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.TMXLayer:setTileGID"); if (!ok) { break; } cocos2d::Vec2 arg1; - ok &= luaval_to_vec2(tolua_S, 3, &arg1, "ccexp.TMXLayer:setTileGID"); + ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.TMXLayer:setTileGID"); if (!ok) { break; } cobj->setTileGID(arg0, arg1); @@ -85322,7 +85525,7 @@ int lua_cocos2dx_TMXLayer_setTileGID(lua_State* tolua_S) } }while(0); ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:setTileGID",argc, 2); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:setTileGID",argc, 2); return 0; #if COCOS2D_DEBUG >= 1 @@ -85335,7 +85538,7 @@ int lua_cocos2dx_TMXLayer_setTileGID(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_getMapTileSize(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85344,10 +85547,10 @@ int lua_cocos2dx_TMXLayer_getMapTileSize(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85369,7 +85572,7 @@ int lua_cocos2dx_TMXLayer_getMapTileSize(lua_State* tolua_S) size_to_luaval(tolua_S, ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:getMapTileSize",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:getMapTileSize",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 @@ -85382,7 +85585,7 @@ int lua_cocos2dx_TMXLayer_getMapTileSize(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_getProperty(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85391,10 +85594,10 @@ int lua_cocos2dx_TMXLayer_getProperty(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85409,7 +85612,7 @@ int lua_cocos2dx_TMXLayer_getProperty(lua_State* tolua_S) { std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.TMXLayer:getProperty"); + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TMXLayer:getProperty"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_getProperty'", nullptr); @@ -85419,7 +85622,7 @@ int lua_cocos2dx_TMXLayer_getProperty(lua_State* tolua_S) ccvalue_to_luaval(tolua_S, ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:getProperty",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:getProperty",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -85432,7 +85635,7 @@ int lua_cocos2dx_TMXLayer_getProperty(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_setLayerSize(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85441,10 +85644,10 @@ int lua_cocos2dx_TMXLayer_setLayerSize(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85459,7 +85662,7 @@ int lua_cocos2dx_TMXLayer_setLayerSize(lua_State* tolua_S) { cocos2d::Size arg0; - ok &= luaval_to_size(tolua_S, 2, &arg0, "ccexp.TMXLayer:setLayerSize"); + ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.TMXLayer:setLayerSize"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_setLayerSize'", nullptr); @@ -85469,7 +85672,7 @@ int lua_cocos2dx_TMXLayer_setLayerSize(lua_State* tolua_S) lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:setLayerSize",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:setLayerSize",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -85482,7 +85685,7 @@ int lua_cocos2dx_TMXLayer_setLayerSize(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_getLayerName(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85491,10 +85694,10 @@ int lua_cocos2dx_TMXLayer_getLayerName(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85516,7 +85719,7 @@ int lua_cocos2dx_TMXLayer_getLayerName(lua_State* tolua_S) tolua_pushcppstring(tolua_S,ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:getLayerName",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:getLayerName",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 @@ -85529,7 +85732,7 @@ int lua_cocos2dx_TMXLayer_getLayerName(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_setTileSet(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85538,10 +85741,10 @@ int lua_cocos2dx_TMXLayer_setTileSet(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85566,7 +85769,7 @@ int lua_cocos2dx_TMXLayer_setTileSet(lua_State* tolua_S) lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:setTileSet",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:setTileSet",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -85579,7 +85782,7 @@ int lua_cocos2dx_TMXLayer_setTileSet(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_getTileSet(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85588,10 +85791,10 @@ int lua_cocos2dx_TMXLayer_getTileSet(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85613,7 +85816,7 @@ int lua_cocos2dx_TMXLayer_getTileSet(lua_State* tolua_S) object_to_luaval(tolua_S, "cc.TMXTilesetInfo",(cocos2d::TMXTilesetInfo*)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:getTileSet",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:getTileSet",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 @@ -85623,10 +85826,57 @@ int lua_cocos2dx_TMXLayer_getTileSet(lua_State* tolua_S) return 0; } +int lua_cocos2dx_TMXLayer_getProperties(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TMXLayer* cobj = nullptr; + bool ok = true; +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TMXLayer_getProperties'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + cocos2d::ValueMap& ret = cobj->getProperties(); + ccvaluemap_to_luaval(tolua_S, ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + const cocos2d::ValueMap& ret = cobj->getProperties(); + ccvaluemap_to_luaval(tolua_S, ret); + return 1; + } + }while(0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:getProperties",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TMXLayer_getProperties'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_TMXLayer_getTileAt(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85635,10 +85885,10 @@ int lua_cocos2dx_TMXLayer_getTileAt(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXLayer*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85653,7 +85903,7 @@ int lua_cocos2dx_TMXLayer_getTileAt(lua_State* tolua_S) { cocos2d::Vec2 arg0; - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "ccexp.TMXLayer:getTileAt"); + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.TMXLayer:getTileAt"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_getTileAt'", nullptr); @@ -85663,7 +85913,7 @@ int lua_cocos2dx_TMXLayer_getTileAt(lua_State* tolua_S) object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:getTileAt",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:getTileAt",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -85683,7 +85933,7 @@ int lua_cocos2dx_TMXLayer_create(lua_State* tolua_S) #endif #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertable(tolua_S,1,"cc.TMXLayer",0,&tolua_err)) goto tolua_lerror; #endif argc = lua_gettop(tolua_S) - 1; @@ -85701,11 +85951,11 @@ int lua_cocos2dx_TMXLayer_create(lua_State* tolua_S) tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_create'", nullptr); return 0; } - cocos2d::experimental::TMXLayer* ret = cocos2d::experimental::TMXLayer::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "ccexp.TMXLayer",(cocos2d::experimental::TMXLayer*)ret); + cocos2d::TMXLayer* ret = cocos2d::TMXLayer::create(arg0, arg1, arg2); + object_to_luaval(tolua_S, "cc.TMXLayer",(cocos2d::TMXLayer*)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.TMXLayer:create",argc, 3); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TMXLayer:create",argc, 3); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: @@ -85716,7 +85966,7 @@ int lua_cocos2dx_TMXLayer_create(lua_State* tolua_S) int lua_cocos2dx_TMXLayer_constructor(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXLayer* cobj = nullptr; + cocos2d::TMXLayer* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85733,14 +85983,14 @@ int lua_cocos2dx_TMXLayer_constructor(lua_State* tolua_S) tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXLayer_constructor'", nullptr); return 0; } - cobj = new cocos2d::experimental::TMXLayer(); + cobj = new cocos2d::TMXLayer(); cobj->autorelease(); int ID = (int)cobj->_ID ; int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"ccexp.TMXLayer"); + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TMXLayer"); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:TMXLayer",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXLayer:TMXLayer",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 @@ -85758,22 +86008,22 @@ static int lua_cocos2dx_TMXLayer_finalize(lua_State* tolua_S) int lua_register_cocos2dx_TMXLayer(lua_State* tolua_S) { - tolua_usertype(tolua_S,"ccexp.TMXLayer"); - tolua_cclass(tolua_S,"TMXLayer","ccexp.TMXLayer","cc.Node",nullptr); + tolua_usertype(tolua_S,"cc.TMXLayer"); + tolua_cclass(tolua_S,"TMXLayer","cc.TMXLayer","cc.SpriteBatchNode",nullptr); tolua_beginmodule(tolua_S,"TMXLayer"); tolua_function(tolua_S,"new",lua_cocos2dx_TMXLayer_constructor); tolua_function(tolua_S,"getPositionAt",lua_cocos2dx_TMXLayer_getPositionAt); tolua_function(tolua_S,"setLayerOrientation",lua_cocos2dx_TMXLayer_setLayerOrientation); + tolua_function(tolua_S,"releaseMap",lua_cocos2dx_TMXLayer_releaseMap); tolua_function(tolua_S,"getLayerSize",lua_cocos2dx_TMXLayer_getLayerSize); tolua_function(tolua_S,"setMapTileSize",lua_cocos2dx_TMXLayer_setMapTileSize); tolua_function(tolua_S,"getLayerOrientation",lua_cocos2dx_TMXLayer_getLayerOrientation); tolua_function(tolua_S,"setProperties",lua_cocos2dx_TMXLayer_setProperties); tolua_function(tolua_S,"setLayerName",lua_cocos2dx_TMXLayer_setLayerName); tolua_function(tolua_S,"removeTileAt",lua_cocos2dx_TMXLayer_removeTileAt); - tolua_function(tolua_S,"getProperties",lua_cocos2dx_TMXLayer_getProperties); + tolua_function(tolua_S,"initWithTilesetInfo",lua_cocos2dx_TMXLayer_initWithTilesetInfo); tolua_function(tolua_S,"setupTiles",lua_cocos2dx_TMXLayer_setupTiles); - tolua_function(tolua_S,"setupTileSprite",lua_cocos2dx_TMXLayer_setupTileSprite); tolua_function(tolua_S,"setTileGID",lua_cocos2dx_TMXLayer_setTileGID); tolua_function(tolua_S,"getMapTileSize",lua_cocos2dx_TMXLayer_getMapTileSize); tolua_function(tolua_S,"getProperty",lua_cocos2dx_TMXLayer_getProperty); @@ -85781,19 +86031,20 @@ int lua_register_cocos2dx_TMXLayer(lua_State* tolua_S) tolua_function(tolua_S,"getLayerName",lua_cocos2dx_TMXLayer_getLayerName); tolua_function(tolua_S,"setTileSet",lua_cocos2dx_TMXLayer_setTileSet); tolua_function(tolua_S,"getTileSet",lua_cocos2dx_TMXLayer_getTileSet); + tolua_function(tolua_S,"getProperties",lua_cocos2dx_TMXLayer_getProperties); tolua_function(tolua_S,"getTileAt",lua_cocos2dx_TMXLayer_getTileAt); tolua_function(tolua_S,"create", lua_cocos2dx_TMXLayer_create); tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::experimental::TMXLayer).name(); - g_luaType[typeName] = "ccexp.TMXLayer"; - g_typeCast["TMXLayer"] = "ccexp.TMXLayer"; + std::string typeName = typeid(cocos2d::TMXLayer).name(); + g_luaType[typeName] = "cc.TMXLayer"; + g_typeCast["TMXLayer"] = "cc.TMXLayer"; return 1; } int lua_cocos2dx_TMXTiledMap_setObjectGroups(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXTiledMap* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85802,10 +86053,10 @@ int lua_cocos2dx_TMXTiledMap_setObjectGroups(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85820,7 +86071,7 @@ int lua_cocos2dx_TMXTiledMap_setObjectGroups(lua_State* tolua_S) { cocos2d::Vector arg0; - ok &= luaval_to_ccvector(tolua_S, 2, &arg0, "ccexp.TMXTiledMap:setObjectGroups"); + ok &= luaval_to_ccvector(tolua_S, 2, &arg0, "cc.TMXTiledMap:setObjectGroups"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_setObjectGroups'", nullptr); @@ -85830,7 +86081,7 @@ int lua_cocos2dx_TMXTiledMap_setObjectGroups(lua_State* tolua_S) lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXTiledMap:setObjectGroups",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:setObjectGroups",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -85843,7 +86094,7 @@ int lua_cocos2dx_TMXTiledMap_setObjectGroups(lua_State* tolua_S) int lua_cocos2dx_TMXTiledMap_getProperty(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXTiledMap* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85852,10 +86103,10 @@ int lua_cocos2dx_TMXTiledMap_getProperty(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85870,7 +86121,7 @@ int lua_cocos2dx_TMXTiledMap_getProperty(lua_State* tolua_S) { std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.TMXTiledMap:getProperty"); + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TMXTiledMap:getProperty"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_getProperty'", nullptr); @@ -85880,7 +86131,7 @@ int lua_cocos2dx_TMXTiledMap_getProperty(lua_State* tolua_S) ccvalue_to_luaval(tolua_S, ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXTiledMap:getProperty",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:getProperty",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -85893,7 +86144,7 @@ int lua_cocos2dx_TMXTiledMap_getProperty(lua_State* tolua_S) int lua_cocos2dx_TMXTiledMap_setMapSize(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXTiledMap* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85902,10 +86153,10 @@ int lua_cocos2dx_TMXTiledMap_setMapSize(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85920,7 +86171,7 @@ int lua_cocos2dx_TMXTiledMap_setMapSize(lua_State* tolua_S) { cocos2d::Size arg0; - ok &= luaval_to_size(tolua_S, 2, &arg0, "ccexp.TMXTiledMap:setMapSize"); + ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.TMXTiledMap:setMapSize"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_setMapSize'", nullptr); @@ -85930,7 +86181,7 @@ int lua_cocos2dx_TMXTiledMap_setMapSize(lua_State* tolua_S) lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXTiledMap:setMapSize",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:setMapSize",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -85943,7 +86194,7 @@ int lua_cocos2dx_TMXTiledMap_setMapSize(lua_State* tolua_S) int lua_cocos2dx_TMXTiledMap_getObjectGroup(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXTiledMap* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -85952,10 +86203,10 @@ int lua_cocos2dx_TMXTiledMap_getObjectGroup(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -85970,7 +86221,7 @@ int lua_cocos2dx_TMXTiledMap_getObjectGroup(lua_State* tolua_S) { std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.TMXTiledMap:getObjectGroup"); + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TMXTiledMap:getObjectGroup"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_getObjectGroup'", nullptr); @@ -85980,7 +86231,7 @@ int lua_cocos2dx_TMXTiledMap_getObjectGroup(lua_State* tolua_S) object_to_luaval(tolua_S, "cc.TMXObjectGroup",(cocos2d::TMXObjectGroup*)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXTiledMap:getObjectGroup",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:getObjectGroup",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -85993,16 +86244,16 @@ int lua_cocos2dx_TMXTiledMap_getObjectGroup(lua_State* tolua_S) int lua_cocos2dx_TMXTiledMap_getObjectGroups(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXTiledMap* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { @@ -86027,7 +86278,7 @@ int lua_cocos2dx_TMXTiledMap_getObjectGroups(lua_State* tolua_S) } }while(0); ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXTiledMap:getObjectGroups",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:getObjectGroups",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 @@ -86037,10 +86288,10 @@ int lua_cocos2dx_TMXTiledMap_getObjectGroups(lua_State* tolua_S) return 0; } -int lua_cocos2dx_TMXTiledMap_getTileSize(lua_State* tolua_S) +int lua_cocos2dx_TMXTiledMap_initWithXML(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXTiledMap* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -86049,10 +86300,113 @@ int lua_cocos2dx_TMXTiledMap_getTileSize(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TMXTiledMap_initWithXML'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + std::string arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TMXTiledMap:initWithXML"); + + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.TMXTiledMap:initWithXML"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_initWithXML'", nullptr); + return 0; + } + bool ret = cobj->initWithXML(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:initWithXML",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TMXTiledMap_initWithXML'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TMXTiledMap_initWithTMXFile(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TMXTiledMap* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_TMXTiledMap_initWithTMXFile'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TMXTiledMap:initWithTMXFile"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_initWithTMXFile'", nullptr); + return 0; + } + bool ret = cobj->initWithTMXFile(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:initWithTMXFile",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TMXTiledMap_initWithTMXFile'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_TMXTiledMap_getTileSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::TMXTiledMap* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -86074,7 +86428,7 @@ int lua_cocos2dx_TMXTiledMap_getTileSize(lua_State* tolua_S) size_to_luaval(tolua_S, ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXTiledMap:getTileSize",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:getTileSize",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 @@ -86087,7 +86441,7 @@ int lua_cocos2dx_TMXTiledMap_getTileSize(lua_State* tolua_S) int lua_cocos2dx_TMXTiledMap_getMapSize(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXTiledMap* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -86096,10 +86450,10 @@ int lua_cocos2dx_TMXTiledMap_getMapSize(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -86121,7 +86475,7 @@ int lua_cocos2dx_TMXTiledMap_getMapSize(lua_State* tolua_S) size_to_luaval(tolua_S, ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXTiledMap:getMapSize",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:getMapSize",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 @@ -86134,7 +86488,7 @@ int lua_cocos2dx_TMXTiledMap_getMapSize(lua_State* tolua_S) int lua_cocos2dx_TMXTiledMap_getProperties(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXTiledMap* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -86143,10 +86497,10 @@ int lua_cocos2dx_TMXTiledMap_getProperties(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -86164,11 +86518,11 @@ int lua_cocos2dx_TMXTiledMap_getProperties(lua_State* tolua_S) tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_getProperties'", nullptr); return 0; } - const cocos2d::ValueMap& ret = cobj->getProperties(); + cocos2d::ValueMap& ret = cobj->getProperties(); ccvaluemap_to_luaval(tolua_S, ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXTiledMap:getProperties",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:getProperties",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 @@ -86181,7 +86535,7 @@ int lua_cocos2dx_TMXTiledMap_getProperties(lua_State* tolua_S) int lua_cocos2dx_TMXTiledMap_setTileSize(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXTiledMap* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -86190,10 +86544,10 @@ int lua_cocos2dx_TMXTiledMap_setTileSize(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -86208,7 +86562,7 @@ int lua_cocos2dx_TMXTiledMap_setTileSize(lua_State* tolua_S) { cocos2d::Size arg0; - ok &= luaval_to_size(tolua_S, 2, &arg0, "ccexp.TMXTiledMap:setTileSize"); + ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.TMXTiledMap:setTileSize"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_setTileSize'", nullptr); @@ -86218,7 +86572,7 @@ int lua_cocos2dx_TMXTiledMap_setTileSize(lua_State* tolua_S) lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXTiledMap:setTileSize",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:setTileSize",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -86231,7 +86585,7 @@ int lua_cocos2dx_TMXTiledMap_setTileSize(lua_State* tolua_S) int lua_cocos2dx_TMXTiledMap_setProperties(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXTiledMap* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -86240,10 +86594,10 @@ int lua_cocos2dx_TMXTiledMap_setProperties(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -86258,7 +86612,7 @@ int lua_cocos2dx_TMXTiledMap_setProperties(lua_State* tolua_S) { cocos2d::ValueMap arg0; - ok &= luaval_to_ccvaluemap(tolua_S, 2, &arg0, "ccexp.TMXTiledMap:setProperties"); + ok &= luaval_to_ccvaluemap(tolua_S, 2, &arg0, "cc.TMXTiledMap:setProperties"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_setProperties'", nullptr); @@ -86268,7 +86622,7 @@ int lua_cocos2dx_TMXTiledMap_setProperties(lua_State* tolua_S) lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXTiledMap:setProperties",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:setProperties",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -86281,7 +86635,7 @@ int lua_cocos2dx_TMXTiledMap_setProperties(lua_State* tolua_S) int lua_cocos2dx_TMXTiledMap_getLayer(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXTiledMap* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -86290,10 +86644,10 @@ int lua_cocos2dx_TMXTiledMap_getLayer(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -86308,17 +86662,17 @@ int lua_cocos2dx_TMXTiledMap_getLayer(lua_State* tolua_S) { std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.TMXTiledMap:getLayer"); + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TMXTiledMap:getLayer"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_getLayer'", nullptr); return 0; } - cocos2d::experimental::TMXLayer* ret = cobj->getLayer(arg0); - object_to_luaval(tolua_S, "ccexp.TMXLayer",(cocos2d::experimental::TMXLayer*)ret); + cocos2d::TMXLayer* ret = cobj->getLayer(arg0); + object_to_luaval(tolua_S, "cc.TMXLayer",(cocos2d::TMXLayer*)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXTiledMap:getLayer",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:getLayer",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -86331,7 +86685,7 @@ int lua_cocos2dx_TMXTiledMap_getLayer(lua_State* tolua_S) int lua_cocos2dx_TMXTiledMap_getMapOrientation(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXTiledMap* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -86340,10 +86694,10 @@ int lua_cocos2dx_TMXTiledMap_getMapOrientation(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -86365,7 +86719,7 @@ int lua_cocos2dx_TMXTiledMap_getMapOrientation(lua_State* tolua_S) tolua_pushnumber(tolua_S,(lua_Number)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXTiledMap:getMapOrientation",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:getMapOrientation",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 @@ -86378,7 +86732,7 @@ int lua_cocos2dx_TMXTiledMap_getMapOrientation(lua_State* tolua_S) int lua_cocos2dx_TMXTiledMap_setMapOrientation(lua_State* tolua_S) { int argc = 0; - cocos2d::experimental::TMXTiledMap* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -86387,10 +86741,10 @@ int lua_cocos2dx_TMXTiledMap_setMapOrientation(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::experimental::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::TMXTiledMap*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) @@ -86405,7 +86759,7 @@ int lua_cocos2dx_TMXTiledMap_setMapOrientation(lua_State* tolua_S) { int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.TMXTiledMap:setMapOrientation"); + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.TMXTiledMap:setMapOrientation"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_setMapOrientation'", nullptr); @@ -86415,7 +86769,7 @@ int lua_cocos2dx_TMXTiledMap_setMapOrientation(lua_State* tolua_S) lua_settop(tolua_S, 1); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXTiledMap:setMapOrientation",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:setMapOrientation",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 @@ -86435,7 +86789,7 @@ int lua_cocos2dx_TMXTiledMap_create(lua_State* tolua_S) #endif #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertable(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif argc = lua_gettop(tolua_S) - 1; @@ -86443,17 +86797,17 @@ int lua_cocos2dx_TMXTiledMap_create(lua_State* tolua_S) if (argc == 1) { std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.TMXTiledMap:create"); + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TMXTiledMap:create"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_create'", nullptr); return 0; } - cocos2d::experimental::TMXTiledMap* ret = cocos2d::experimental::TMXTiledMap::create(arg0); - object_to_luaval(tolua_S, "ccexp.TMXTiledMap",(cocos2d::experimental::TMXTiledMap*)ret); + cocos2d::TMXTiledMap* ret = cocos2d::TMXTiledMap::create(arg0); + object_to_luaval(tolua_S, "cc.TMXTiledMap",(cocos2d::TMXTiledMap*)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.TMXTiledMap:create",argc, 1); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TMXTiledMap:create",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: @@ -86471,7 +86825,7 @@ int lua_cocos2dx_TMXTiledMap_createWithXML(lua_State* tolua_S) #endif #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"ccexp.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertable(tolua_S,1,"cc.TMXTiledMap",0,&tolua_err)) goto tolua_lerror; #endif argc = lua_gettop(tolua_S) - 1; @@ -86480,18 +86834,18 @@ int lua_cocos2dx_TMXTiledMap_createWithXML(lua_State* tolua_S) { std::string arg0; std::string arg1; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.TMXTiledMap:createWithXML"); - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccexp.TMXTiledMap:createWithXML"); + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TMXTiledMap:createWithXML"); + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.TMXTiledMap:createWithXML"); if(!ok) { tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_createWithXML'", nullptr); return 0; } - cocos2d::experimental::TMXTiledMap* ret = cocos2d::experimental::TMXTiledMap::createWithXML(arg0, arg1); - object_to_luaval(tolua_S, "ccexp.TMXTiledMap",(cocos2d::experimental::TMXTiledMap*)ret); + cocos2d::TMXTiledMap* ret = cocos2d::TMXTiledMap::createWithXML(arg0, arg1); + object_to_luaval(tolua_S, "cc.TMXTiledMap",(cocos2d::TMXTiledMap*)ret); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.TMXTiledMap:createWithXML",argc, 2); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TMXTiledMap:createWithXML",argc, 2); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: @@ -86499,187 +86853,10 @@ int lua_cocos2dx_TMXTiledMap_createWithXML(lua_State* tolua_S) #endif return 0; } -static int lua_cocos2dx_TMXTiledMap_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (TMXTiledMap)"); - return 0; -} - -int lua_register_cocos2dx_TMXTiledMap(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"ccexp.TMXTiledMap"); - tolua_cclass(tolua_S,"TMXTiledMap","ccexp.TMXTiledMap","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"TMXTiledMap"); - tolua_function(tolua_S,"setObjectGroups",lua_cocos2dx_TMXTiledMap_setObjectGroups); - tolua_function(tolua_S,"getProperty",lua_cocos2dx_TMXTiledMap_getProperty); - tolua_function(tolua_S,"setMapSize",lua_cocos2dx_TMXTiledMap_setMapSize); - tolua_function(tolua_S,"getObjectGroup",lua_cocos2dx_TMXTiledMap_getObjectGroup); - tolua_function(tolua_S,"getObjectGroups",lua_cocos2dx_TMXTiledMap_getObjectGroups); - tolua_function(tolua_S,"getTileSize",lua_cocos2dx_TMXTiledMap_getTileSize); - tolua_function(tolua_S,"getMapSize",lua_cocos2dx_TMXTiledMap_getMapSize); - tolua_function(tolua_S,"getProperties",lua_cocos2dx_TMXTiledMap_getProperties); - tolua_function(tolua_S,"setTileSize",lua_cocos2dx_TMXTiledMap_setTileSize); - tolua_function(tolua_S,"setProperties",lua_cocos2dx_TMXTiledMap_setProperties); - tolua_function(tolua_S,"getLayer",lua_cocos2dx_TMXTiledMap_getLayer); - tolua_function(tolua_S,"getMapOrientation",lua_cocos2dx_TMXTiledMap_getMapOrientation); - tolua_function(tolua_S,"setMapOrientation",lua_cocos2dx_TMXTiledMap_setMapOrientation); - tolua_function(tolua_S,"create", lua_cocos2dx_TMXTiledMap_create); - tolua_function(tolua_S,"createWithXML", lua_cocos2dx_TMXTiledMap_createWithXML); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::experimental::TMXTiledMap).name(); - g_luaType[typeName] = "ccexp.TMXTiledMap"; - g_typeCast["TMXTiledMap"] = "ccexp.TMXTiledMap"; - return 1; -} - -int lua_cocos2dx_ParallaxNode_addChild(lua_State* tolua_S) +int lua_cocos2dx_TMXTiledMap_constructor(lua_State* tolua_S) { int argc = 0; - cocos2d::ParallaxNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ParallaxNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ParallaxNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ParallaxNode_addChild'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 4) - { - cocos2d::Node* arg0; - int arg1; - cocos2d::Vec2 arg2; - cocos2d::Vec2 arg3; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ParallaxNode:addChild"); - - ok &= luaval_to_vec2(tolua_S, 4, &arg2, "cc.ParallaxNode:addChild"); - - ok &= luaval_to_vec2(tolua_S, 5, &arg3, "cc.ParallaxNode:addChild"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParallaxNode_addChild'", nullptr); - return 0; - } - cobj->addChild(arg0, arg1, arg2, arg3); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ParallaxNode:addChild",argc, 4); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ParallaxNode_addChild'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ParallaxNode* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.ParallaxNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ParallaxNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ParallaxNode:removeAllChildrenWithCleanup"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup'", nullptr); - return 0; - } - cobj->removeAllChildrenWithCleanup(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ParallaxNode:removeAllChildrenWithCleanup",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ParallaxNode_create(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.ParallaxNode",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParallaxNode_create'", nullptr); - return 0; - } - cocos2d::ParallaxNode* ret = cocos2d::ParallaxNode::create(); - object_to_luaval(tolua_S, "cc.ParallaxNode",(cocos2d::ParallaxNode*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.ParallaxNode:create",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ParallaxNode_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_ParallaxNode_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ParallaxNode* cobj = nullptr; + cocos2d::TMXTiledMap* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -86693,46 +86870,60 @@ int lua_cocos2dx_ParallaxNode_constructor(lua_State* tolua_S) { if(!ok) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ParallaxNode_constructor'", nullptr); + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TMXTiledMap_constructor'", nullptr); return 0; } - cobj = new cocos2d::ParallaxNode(); + cobj = new cocos2d::TMXTiledMap(); cobj->autorelease(); int ID = (int)cobj->_ID ; int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.ParallaxNode"); + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TMXTiledMap"); return 1; } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ParallaxNode:ParallaxNode",argc, 0); + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TMXTiledMap:TMXTiledMap",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ParallaxNode_constructor'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TMXTiledMap_constructor'.",&tolua_err); #endif return 0; } -static int lua_cocos2dx_ParallaxNode_finalize(lua_State* tolua_S) +static int lua_cocos2dx_TMXTiledMap_finalize(lua_State* tolua_S) { - printf("luabindings: finalizing LUA object (ParallaxNode)"); + printf("luabindings: finalizing LUA object (TMXTiledMap)"); return 0; } -int lua_register_cocos2dx_ParallaxNode(lua_State* tolua_S) +int lua_register_cocos2dx_TMXTiledMap(lua_State* tolua_S) { - tolua_usertype(tolua_S,"cc.ParallaxNode"); - tolua_cclass(tolua_S,"ParallaxNode","cc.ParallaxNode","cc.Node",nullptr); + tolua_usertype(tolua_S,"cc.TMXTiledMap"); + tolua_cclass(tolua_S,"TMXTiledMap","cc.TMXTiledMap","cc.Node",nullptr); - tolua_beginmodule(tolua_S,"ParallaxNode"); - tolua_function(tolua_S,"new",lua_cocos2dx_ParallaxNode_constructor); - tolua_function(tolua_S,"addChild",lua_cocos2dx_ParallaxNode_addChild); - tolua_function(tolua_S,"removeAllChildrenWithCleanup",lua_cocos2dx_ParallaxNode_removeAllChildrenWithCleanup); - tolua_function(tolua_S,"create", lua_cocos2dx_ParallaxNode_create); + tolua_beginmodule(tolua_S,"TMXTiledMap"); + tolua_function(tolua_S,"new",lua_cocos2dx_TMXTiledMap_constructor); + tolua_function(tolua_S,"setObjectGroups",lua_cocos2dx_TMXTiledMap_setObjectGroups); + tolua_function(tolua_S,"getProperty",lua_cocos2dx_TMXTiledMap_getProperty); + tolua_function(tolua_S,"setMapSize",lua_cocos2dx_TMXTiledMap_setMapSize); + tolua_function(tolua_S,"getObjectGroup",lua_cocos2dx_TMXTiledMap_getObjectGroup); + tolua_function(tolua_S,"getObjectGroups",lua_cocos2dx_TMXTiledMap_getObjectGroups); + tolua_function(tolua_S,"initWithXML",lua_cocos2dx_TMXTiledMap_initWithXML); + tolua_function(tolua_S,"initWithTMXFile",lua_cocos2dx_TMXTiledMap_initWithTMXFile); + tolua_function(tolua_S,"getTileSize",lua_cocos2dx_TMXTiledMap_getTileSize); + tolua_function(tolua_S,"getMapSize",lua_cocos2dx_TMXTiledMap_getMapSize); + tolua_function(tolua_S,"getProperties",lua_cocos2dx_TMXTiledMap_getProperties); + tolua_function(tolua_S,"setTileSize",lua_cocos2dx_TMXTiledMap_setTileSize); + tolua_function(tolua_S,"setProperties",lua_cocos2dx_TMXTiledMap_setProperties); + tolua_function(tolua_S,"getLayer",lua_cocos2dx_TMXTiledMap_getLayer); + tolua_function(tolua_S,"getMapOrientation",lua_cocos2dx_TMXTiledMap_getMapOrientation); + tolua_function(tolua_S,"setMapOrientation",lua_cocos2dx_TMXTiledMap_setMapOrientation); + tolua_function(tolua_S,"create", lua_cocos2dx_TMXTiledMap_create); + tolua_function(tolua_S,"createWithXML", lua_cocos2dx_TMXTiledMap_createWithXML); tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::ParallaxNode).name(); - g_luaType[typeName] = "cc.ParallaxNode"; - g_typeCast["ParallaxNode"] = "cc.ParallaxNode"; + std::string typeName = typeid(cocos2d::TMXTiledMap).name(); + g_luaType[typeName] = "cc.TMXTiledMap"; + g_typeCast["TMXTiledMap"] = "cc.TMXTiledMap"; return 1; } diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index d57f8ff5f9..ea1bdd252d 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1964,6 +1964,10 @@ int register_all_cocos2dx(lua_State* tolua_S); + + + +