mirror of https://github.com/axmolengine/axmol.git
Merge pull request #12391 from CocosRobot/update_lua_bindings_1434523444
[ci skip][AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
commit
31eabf4294
|
@ -16255,6 +16255,200 @@ ProtectedNode : function (
|
|||
|
||||
};
|
||||
|
||||
/**
|
||||
* @class Image
|
||||
*/
|
||||
cc.Image = {
|
||||
|
||||
/**
|
||||
* @method hasPremultipliedAlpha
|
||||
* @return {bool}
|
||||
*/
|
||||
hasPremultipliedAlpha : function (
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getDataLen
|
||||
* @return {long}
|
||||
*/
|
||||
getDataLen : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method saveToFile
|
||||
* @param {String} arg0
|
||||
* @param {bool} arg1
|
||||
* @return {bool}
|
||||
*/
|
||||
saveToFile : function (
|
||||
str,
|
||||
bool
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method hasAlpha
|
||||
* @return {bool}
|
||||
*/
|
||||
hasAlpha : function (
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method isCompressed
|
||||
* @return {bool}
|
||||
*/
|
||||
isCompressed : function (
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getHeight
|
||||
* @return {int}
|
||||
*/
|
||||
getHeight : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initWithImageFile
|
||||
* @param {String} arg0
|
||||
* @return {bool}
|
||||
*/
|
||||
initWithImageFile : function (
|
||||
str
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getWidth
|
||||
* @return {int}
|
||||
*/
|
||||
getWidth : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getBitPerPixel
|
||||
* @return {int}
|
||||
*/
|
||||
getBitPerPixel : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getFileType
|
||||
* @return {cc.Image::Format}
|
||||
*/
|
||||
getFileType : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getNumberOfMipmaps
|
||||
* @return {int}
|
||||
*/
|
||||
getNumberOfMipmaps : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getRenderFormat
|
||||
* @return {cc.Texture2D::PixelFormat}
|
||||
*/
|
||||
getRenderFormat : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getData
|
||||
* @return {unsigned char}
|
||||
*/
|
||||
getData : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getMipmaps
|
||||
* @return {cc._MipmapInfo}
|
||||
*/
|
||||
getMipmaps : function (
|
||||
)
|
||||
{
|
||||
return cc._MipmapInfo;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initWithRawData
|
||||
* @param {unsigned char} arg0
|
||||
* @param {long} arg1
|
||||
* @param {int} arg2
|
||||
* @param {int} arg3
|
||||
* @param {int} arg4
|
||||
* @param {bool} arg5
|
||||
* @return {bool}
|
||||
*/
|
||||
initWithRawData : function (
|
||||
char,
|
||||
long,
|
||||
int,
|
||||
int,
|
||||
int,
|
||||
bool
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setPVRImagesHavePremultipliedAlpha
|
||||
* @param {bool} arg0
|
||||
*/
|
||||
setPVRImagesHavePremultipliedAlpha : function (
|
||||
bool
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method Image
|
||||
* @constructor
|
||||
*/
|
||||
Image : function (
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @class Sprite
|
||||
*/
|
||||
|
@ -16526,6 +16720,16 @@ getTextureRect : function (
|
|||
return cc.Rect;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method debugDraw
|
||||
* @param {bool} arg0
|
||||
*/
|
||||
debugDraw : function (
|
||||
bool
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initWithFile
|
||||
* @param {String|String} str
|
||||
|
@ -16602,60 +16806,6 @@ rect
|
|||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method create
|
||||
* @param {String|String} str
|
||||
* @param {rect_object} rect
|
||||
* @return {cc.Sprite|cc.Sprite|cc.Sprite}
|
||||
*/
|
||||
create : function(
|
||||
str,
|
||||
rect
|
||||
)
|
||||
{
|
||||
return cc.Sprite;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method createWithTexture
|
||||
* @param {cc.Texture2D|cc.Texture2D} texture2d
|
||||
* @param {rect_object} rect
|
||||
* @param {bool} bool
|
||||
* @return {cc.Sprite|cc.Sprite}
|
||||
*/
|
||||
createWithTexture : function(
|
||||
texture2d,
|
||||
rect,
|
||||
bool
|
||||
)
|
||||
{
|
||||
return cc.Sprite;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method createWithSpriteFrameName
|
||||
* @param {String} arg0
|
||||
* @return {cc.Sprite}
|
||||
*/
|
||||
createWithSpriteFrameName : function (
|
||||
str
|
||||
)
|
||||
{
|
||||
return cc.Sprite;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method createWithSpriteFrame
|
||||
* @param {cc.SpriteFrame} arg0
|
||||
* @return {cc.Sprite}
|
||||
*/
|
||||
createWithSpriteFrame : function (
|
||||
spriteframe
|
||||
)
|
||||
{
|
||||
return cc.Sprite;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method Sprite
|
||||
* @constructor
|
||||
|
@ -16667,200 +16817,6 @@ Sprite : function (
|
|||
|
||||
};
|
||||
|
||||
/**
|
||||
* @class Image
|
||||
*/
|
||||
cc.Image = {
|
||||
|
||||
/**
|
||||
* @method hasPremultipliedAlpha
|
||||
* @return {bool}
|
||||
*/
|
||||
hasPremultipliedAlpha : function (
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getDataLen
|
||||
* @return {long}
|
||||
*/
|
||||
getDataLen : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method saveToFile
|
||||
* @param {String} arg0
|
||||
* @param {bool} arg1
|
||||
* @return {bool}
|
||||
*/
|
||||
saveToFile : function (
|
||||
str,
|
||||
bool
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method hasAlpha
|
||||
* @return {bool}
|
||||
*/
|
||||
hasAlpha : function (
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method isCompressed
|
||||
* @return {bool}
|
||||
*/
|
||||
isCompressed : function (
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getHeight
|
||||
* @return {int}
|
||||
*/
|
||||
getHeight : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initWithImageFile
|
||||
* @param {String} arg0
|
||||
* @return {bool}
|
||||
*/
|
||||
initWithImageFile : function (
|
||||
str
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getWidth
|
||||
* @return {int}
|
||||
*/
|
||||
getWidth : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getBitPerPixel
|
||||
* @return {int}
|
||||
*/
|
||||
getBitPerPixel : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getFileType
|
||||
* @return {cc.Image::Format}
|
||||
*/
|
||||
getFileType : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getNumberOfMipmaps
|
||||
* @return {int}
|
||||
*/
|
||||
getNumberOfMipmaps : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getRenderFormat
|
||||
* @return {cc.Texture2D::PixelFormat}
|
||||
*/
|
||||
getRenderFormat : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getData
|
||||
* @return {unsigned char}
|
||||
*/
|
||||
getData : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getMipmaps
|
||||
* @return {cc._MipmapInfo}
|
||||
*/
|
||||
getMipmaps : function (
|
||||
)
|
||||
{
|
||||
return cc._MipmapInfo;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initWithRawData
|
||||
* @param {unsigned char} arg0
|
||||
* @param {long} arg1
|
||||
* @param {int} arg2
|
||||
* @param {int} arg3
|
||||
* @param {int} arg4
|
||||
* @param {bool} arg5
|
||||
* @return {bool}
|
||||
*/
|
||||
initWithRawData : function (
|
||||
char,
|
||||
long,
|
||||
int,
|
||||
int,
|
||||
int,
|
||||
bool
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setPVRImagesHavePremultipliedAlpha
|
||||
* @param {bool} arg0
|
||||
*/
|
||||
setPVRImagesHavePremultipliedAlpha : function (
|
||||
bool
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method Image
|
||||
* @constructor
|
||||
*/
|
||||
Image : function (
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @class RenderTexture
|
||||
*/
|
||||
|
@ -22651,72 +22607,3 @@ getInstance : function (
|
|||
},
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @class SpritePolygonCache
|
||||
*/
|
||||
cc.SpritePolygonCache = {
|
||||
|
||||
/**
|
||||
* @method isSpritePolygonCachExist
|
||||
* @param {String} arg0
|
||||
* @param {rect_object} arg1
|
||||
* @return {bool}
|
||||
*/
|
||||
isSpritePolygonCachExist : function (
|
||||
str,
|
||||
rect
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method removeAllSpritePolygonCache
|
||||
*/
|
||||
removeAllSpritePolygonCache : function (
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method removeSpritePolygonCache
|
||||
* @param {String} arg0
|
||||
* @param {rect_object} arg1
|
||||
*/
|
||||
removeSpritePolygonCache : function (
|
||||
str,
|
||||
rect
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method destroyInstance
|
||||
*/
|
||||
destroyInstance : function (
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method printInfo
|
||||
* @param {cc._SpritePolygonInfo} arg0
|
||||
*/
|
||||
printInfo : function (
|
||||
_spritepolygoninfo
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getInstance
|
||||
* @return {cc.SpritePolygonCache}
|
||||
*/
|
||||
getInstance : function (
|
||||
)
|
||||
{
|
||||
return cc.SpritePolygonCache;
|
||||
},
|
||||
|
||||
};
|
||||
|
|
|
@ -1,99 +0,0 @@
|
|||
/**
|
||||
* @module cocos2dx_experimental
|
||||
*/
|
||||
var ccexp = ccexp || {};
|
||||
|
||||
/**
|
||||
* @class SpritePolygon
|
||||
*/
|
||||
ccexp.SpritePolygon = {
|
||||
|
||||
/**
|
||||
* @method setTexture
|
||||
* @param {cc.Texture2D|String} texture2d
|
||||
*/
|
||||
setTexture : function(
|
||||
str
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initWithTexture
|
||||
* @param {cc.Texture2D} arg0
|
||||
* @return {bool}
|
||||
*/
|
||||
initWithTexture : function (
|
||||
texture2d
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method showDebug
|
||||
* @param {bool} arg0
|
||||
*/
|
||||
showDebug : function (
|
||||
bool
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getTexture
|
||||
* @return {cc.Texture2D}
|
||||
*/
|
||||
getTexture : function (
|
||||
)
|
||||
{
|
||||
return cc.Texture2D;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getArea
|
||||
* @return {float}
|
||||
*/
|
||||
getArea : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initWithMarching
|
||||
* @param {String} arg0
|
||||
* @param {rect_object} arg1
|
||||
* @param {float} arg2
|
||||
* @return {bool}
|
||||
*/
|
||||
initWithMarching : function (
|
||||
str,
|
||||
rect,
|
||||
float
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getVertCount
|
||||
* @return {long}
|
||||
*/
|
||||
getVertCount : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getTrianglesCount
|
||||
* @return {long}
|
||||
*/
|
||||
getTrianglesCount : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
};
|
File diff suppressed because it is too large
Load Diff
|
@ -2861,6 +2861,31 @@ bool js_cocos2dx_ProtectedNode_removeAllProtectedChildren(JSContext *cx, uint32_
|
|||
bool js_cocos2dx_ProtectedNode_create(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_ProtectedNode_ProtectedNode(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_cocos2d_Image_class;
|
||||
extern JSObject *jsb_cocos2d_Image_prototype;
|
||||
|
||||
bool js_cocos2dx_Image_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
void js_cocos2dx_Image_finalize(JSContext *cx, JSObject *obj);
|
||||
void js_register_cocos2dx_Image(JSContext *cx, JS::HandleObject global);
|
||||
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
|
||||
bool js_cocos2dx_Image_hasPremultipliedAlpha(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getDataLen(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_saveToFile(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_hasAlpha(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_isCompressed(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getHeight(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_initWithImageFile(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getWidth(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getBitPerPixel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getFileType(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getNumberOfMipmaps(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getRenderFormat(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getMipmaps(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_initWithRawData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_Image(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_cocos2d_Sprite_class;
|
||||
extern JSObject *jsb_cocos2d_Sprite_prototype;
|
||||
|
||||
|
@ -2893,6 +2918,7 @@ bool js_cocos2dx_Sprite_setAtlasIndex(JSContext *cx, uint32_t argc, jsval *vp);
|
|||
bool js_cocos2dx_Sprite_setDirty(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Sprite_isTextureRectRotated(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Sprite_getTextureRect(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Sprite_debugDraw(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Sprite_initWithFile(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Sprite_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Sprite_getTextureAtlas(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
@ -2900,37 +2926,8 @@ bool js_cocos2dx_Sprite_initWithSpriteFrame(JSContext *cx, uint32_t argc, jsval
|
|||
bool js_cocos2dx_Sprite_isFlippedX(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Sprite_isFlippedY(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Sprite_setVertexRect(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Sprite_create(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Sprite_createWithTexture(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Sprite_createWithSpriteFrameName(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Sprite_createWithSpriteFrame(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Sprite_Sprite(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_cocos2d_Image_class;
|
||||
extern JSObject *jsb_cocos2d_Image_prototype;
|
||||
|
||||
bool js_cocos2dx_Image_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
void js_cocos2dx_Image_finalize(JSContext *cx, JSObject *obj);
|
||||
void js_register_cocos2dx_Image(JSContext *cx, JS::HandleObject global);
|
||||
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
|
||||
bool js_cocos2dx_Image_hasPremultipliedAlpha(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getDataLen(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_saveToFile(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_hasAlpha(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_isCompressed(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getHeight(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_initWithImageFile(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getWidth(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getBitPerPixel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getFileType(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getNumberOfMipmaps(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getRenderFormat(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_getMipmaps(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_initWithRawData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Image_Image(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_cocos2d_RenderTexture_class;
|
||||
extern JSObject *jsb_cocos2d_RenderTexture_prototype;
|
||||
|
||||
|
@ -3983,18 +3980,4 @@ bool js_cocos2dx_SimpleAudioEngine_resumeEffect(JSContext *cx, uint32_t argc, js
|
|||
bool js_cocos2dx_SimpleAudioEngine_end(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_SimpleAudioEngine_getInstance(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_cocos2d_SpritePolygonCache_class;
|
||||
extern JSObject *jsb_cocos2d_SpritePolygonCache_prototype;
|
||||
|
||||
bool js_cocos2dx_SpritePolygonCache_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
void js_cocos2dx_SpritePolygonCache_finalize(JSContext *cx, JSObject *obj);
|
||||
void js_register_cocos2dx_SpritePolygonCache(JSContext *cx, JS::HandleObject global);
|
||||
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
|
||||
bool js_cocos2dx_SpritePolygonCache_isSpritePolygonCachExist(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_SpritePolygonCache_removeAllSpritePolygonCache(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_SpritePolygonCache_removeSpritePolygonCache(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_SpritePolygonCache_destroyInstance(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_SpritePolygonCache_printInfo(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_SpritePolygonCache_getInstance(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
#endif // __cocos2dx_h__
|
||||
|
|
|
@ -1,320 +0,0 @@
|
|||
#include "jsb_cocos2dx_experimental.hpp"
|
||||
#include "cocos2d_specifics.hpp"
|
||||
#include "SpritePolygon.h"
|
||||
|
||||
template<class T>
|
||||
static bool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedValue initializing(cx);
|
||||
bool isNewValid = true;
|
||||
JS::RootedObject global(cx, ScriptingCore::getInstance()->getGlobalObject());
|
||||
isNewValid = JS_GetProperty(cx, global, "initializing", &initializing) && initializing.toBoolean();
|
||||
if (isNewValid)
|
||||
{
|
||||
TypeTest<T> 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.");
|
||||
|
||||
JS::RootedObject proto(cx, typeClass->proto.get());
|
||||
JS::RootedObject parent(cx, typeClass->parentProto.get());
|
||||
JS::RootedObject _tmp(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent));
|
||||
|
||||
args.rval().set(OBJECT_TO_JSVAL(_tmp));
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "Constructor for the requested class is not available, please refer to the API reference.");
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool empty_constructor(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool js_is_native_obj(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
args.rval().setBoolean(true);
|
||||
return true;
|
||||
}
|
||||
JSClass *jsb_cocos2d_experimental_SpritePolygon_class;
|
||||
JSObject *jsb_cocos2d_experimental_SpritePolygon_prototype;
|
||||
|
||||
bool js_cocos2dx_experimental_SpritePolygon_setTexture(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
|
||||
JS::RootedObject obj(cx);
|
||||
cocos2d::experimental::SpritePolygon* cobj = NULL;
|
||||
obj = args.thisv().toObjectOrNull();
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_setTexture : Invalid Native Object");
|
||||
do {
|
||||
if (argc == 1) {
|
||||
cocos2d::Texture2D* arg0;
|
||||
do {
|
||||
if (args.get(0).isNull()) { arg0 = nullptr; break; }
|
||||
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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
|
||||
} while (0);
|
||||
if (!ok) { ok = true; break; }
|
||||
cobj->setTexture(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
} while(0);
|
||||
|
||||
do {
|
||||
if (argc == 1) {
|
||||
std::string arg0;
|
||||
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
||||
if (!ok) { ok = true; break; }
|
||||
cobj->setTexture(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
} while(0);
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_setTexture : wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_experimental_SpritePolygon_initWithTexture(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_initWithTexture : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::Texture2D* arg0;
|
||||
do {
|
||||
if (args.get(0).isNull()) { arg0 = nullptr; break; }
|
||||
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::Texture2D*)(jsProxy ? jsProxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
|
||||
} while (0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_SpritePolygon_initWithTexture : Error processing arguments");
|
||||
bool ret = cobj->initWithTexture(arg0);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = BOOLEAN_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_initWithTexture : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_experimental_SpritePolygon_showDebug(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_showDebug : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
bool arg0;
|
||||
arg0 = JS::ToBoolean(args.get(0));
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_SpritePolygon_showDebug : Error processing arguments");
|
||||
cobj->showDebug(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_showDebug : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_experimental_SpritePolygon_getTexture(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_getTexture : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
cocos2d::Texture2D* ret = cobj->getTexture();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
do {
|
||||
if (ret) {
|
||||
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Texture2D>(cx, (cocos2d::Texture2D*)ret);
|
||||
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
}
|
||||
} while (0);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_getTexture : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_experimental_SpritePolygon_getArea(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_getArea : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
const float ret = cobj->getArea();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = DOUBLE_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_getArea : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_experimental_SpritePolygon_initWithMarching(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_initWithMarching : Invalid Native Object");
|
||||
if (argc == 3) {
|
||||
std::string arg0;
|
||||
cocos2d::Rect arg1;
|
||||
double arg2;
|
||||
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
||||
ok &= jsval_to_ccrect(cx, args.get(1), &arg1);
|
||||
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_experimental_SpritePolygon_initWithMarching : Error processing arguments");
|
||||
bool ret = cobj->initWithMarching(arg0, arg1, arg2);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = BOOLEAN_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_initWithMarching : wrong number of arguments: %d, was expecting %d", argc, 3);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_experimental_SpritePolygon_getVertCount(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_getVertCount : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
const ssize_t ret = cobj->getVertCount();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = ssize_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_getVertCount : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_experimental_SpritePolygon_getTrianglesCount(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::SpritePolygon* cobj = (cocos2d::experimental::SpritePolygon *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_experimental_SpritePolygon_getTrianglesCount : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
const ssize_t ret = cobj->getTrianglesCount();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = ssize_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_experimental_SpritePolygon_getTrianglesCount : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
extern JSObject *jsb_cocos2d_Node_prototype;
|
||||
|
||||
void js_cocos2d_experimental_SpritePolygon_finalize(JSFreeOp *fop, JSObject *obj) {
|
||||
CCLOGINFO("jsbindings: finalizing JS object %p (SpritePolygon)", obj);
|
||||
}
|
||||
|
||||
void js_register_cocos2dx_experimental_SpritePolygon(JSContext *cx, JS::HandleObject global) {
|
||||
jsb_cocos2d_experimental_SpritePolygon_class = (JSClass *)calloc(1, sizeof(JSClass));
|
||||
jsb_cocos2d_experimental_SpritePolygon_class->name = "SpritePolygon";
|
||||
jsb_cocos2d_experimental_SpritePolygon_class->addProperty = JS_PropertyStub;
|
||||
jsb_cocos2d_experimental_SpritePolygon_class->delProperty = JS_DeletePropertyStub;
|
||||
jsb_cocos2d_experimental_SpritePolygon_class->getProperty = JS_PropertyStub;
|
||||
jsb_cocos2d_experimental_SpritePolygon_class->setProperty = JS_StrictPropertyStub;
|
||||
jsb_cocos2d_experimental_SpritePolygon_class->enumerate = JS_EnumerateStub;
|
||||
jsb_cocos2d_experimental_SpritePolygon_class->resolve = JS_ResolveStub;
|
||||
jsb_cocos2d_experimental_SpritePolygon_class->convert = JS_ConvertStub;
|
||||
jsb_cocos2d_experimental_SpritePolygon_class->finalize = js_cocos2d_experimental_SpritePolygon_finalize;
|
||||
jsb_cocos2d_experimental_SpritePolygon_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("setTexture", js_cocos2dx_experimental_SpritePolygon_setTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("initWithTexture", js_cocos2dx_experimental_SpritePolygon_initWithTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("showDebug", js_cocos2dx_experimental_SpritePolygon_showDebug, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getTexture", js_cocos2dx_experimental_SpritePolygon_getTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getArea", js_cocos2dx_experimental_SpritePolygon_getArea, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("initWithMarching", js_cocos2dx_experimental_SpritePolygon_initWithMarching, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getVertCount", js_cocos2dx_experimental_SpritePolygon_getVertCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getTrianglesCount", js_cocos2dx_experimental_SpritePolygon_getTrianglesCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
JSFunctionSpec *st_funcs = NULL;
|
||||
|
||||
jsb_cocos2d_experimental_SpritePolygon_prototype = JS_InitClass(
|
||||
cx, global,
|
||||
JS::RootedObject(cx, jsb_cocos2d_Node_prototype),
|
||||
jsb_cocos2d_experimental_SpritePolygon_class,
|
||||
dummy_constructor<cocos2d::experimental::SpritePolygon>, 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, "SpritePolygon", JSPROP_ENUMERATE | JSPROP_READONLY, &found);
|
||||
|
||||
// add the proto and JSClass to the type->js info hash table
|
||||
TypeTest<cocos2d::experimental::SpritePolygon> 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_SpritePolygon_class;
|
||||
p->proto = jsb_cocos2d_experimental_SpritePolygon_prototype;
|
||||
p->parentProto = jsb_cocos2d_Node_prototype;
|
||||
_js_global_type_map.insert(std::make_pair(typeName, p));
|
||||
}
|
||||
}
|
||||
|
||||
void register_all_cocos2dx_experimental(JSContext* cx, JS::HandleObject obj) {
|
||||
// Get the ns
|
||||
JS::RootedObject ns(cx);
|
||||
get_or_create_js_obj(cx, obj, "ccexp", &ns);
|
||||
|
||||
js_register_cocos2dx_experimental_SpritePolygon(cx, ns);
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
#include "base/ccConfig.h"
|
||||
#ifndef __cocos2dx_experimental_h__
|
||||
#define __cocos2dx_experimental_h__
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jsfriendapi.h"
|
||||
|
||||
|
||||
extern JSClass *jsb_cocos2d_experimental_SpritePolygon_class;
|
||||
extern JSObject *jsb_cocos2d_experimental_SpritePolygon_prototype;
|
||||
|
||||
bool js_cocos2dx_experimental_SpritePolygon_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
void js_cocos2dx_experimental_SpritePolygon_finalize(JSContext *cx, JSObject *obj);
|
||||
void js_register_cocos2dx_experimental_SpritePolygon(JSContext *cx, JS::HandleObject global);
|
||||
void register_all_cocos2dx_experimental(JSContext* cx, JS::HandleObject obj);
|
||||
bool js_cocos2dx_experimental_SpritePolygon_setTexture(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_experimental_SpritePolygon_initWithTexture(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_experimental_SpritePolygon_showDebug(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_experimental_SpritePolygon_getTexture(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_experimental_SpritePolygon_getArea(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_experimental_SpritePolygon_initWithMarching(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_experimental_SpritePolygon_getVertCount(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_experimental_SpritePolygon_getTrianglesCount(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
#endif // __cocos2dx_experimental_h__
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module AutoPolygon
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- create an AutoPolygon and initialize it with an image file<br>
|
||||
-- the image must be a 32bit PNG for current version 3.7<br>
|
||||
-- param filename a path to image file, e.g., "scene1/monster.png".<br>
|
||||
-- return an AutoPolygon object;
|
||||
-- @function [parent=#AutoPolygon] AutoPolygon
|
||||
-- @param self
|
||||
-- @param #string filename
|
||||
-- @return AutoPolygon#AutoPolygon self (return value: cc.AutoPolygon)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module PolygonInfo
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- get sum of all triangle area size<br>
|
||||
-- return sum of all triangle area size
|
||||
-- @function [parent=#PolygonInfo] getArea
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get triangles count<br>
|
||||
-- return number of triangles
|
||||
-- @function [parent=#PolygonInfo] getTriaglesCount
|
||||
-- @param self
|
||||
-- @return unsigned int#unsigned int ret (return value: unsigned int)
|
||||
|
||||
--------------------------------
|
||||
-- get vertex count<br>
|
||||
-- return number of vertices
|
||||
-- @function [parent=#PolygonInfo] getVertCount
|
||||
-- @param self
|
||||
-- @return unsigned int#unsigned int ret (return value: unsigned int)
|
||||
|
||||
--------------------------------
|
||||
-- set the data to be a pointer to a quad<br>
|
||||
-- the member verts will not be released when this PolygonInfo destructs<br>
|
||||
-- as the verts memory are managed by other objects<br>
|
||||
-- param quad a pointer to the V3F_C4B_T2F_Quad obje
|
||||
-- @function [parent=#PolygonInfo] setQuad
|
||||
-- @param self
|
||||
-- @param #cc.V3F_C4B_T2F_Quad quad
|
||||
-- @return PolygonInfo#PolygonInfo self (return value: cc.PolygonInfo)
|
||||
|
||||
--------------------------------
|
||||
-- / @name Creators/ @{<br>
|
||||
-- Creates an empty Polygon info<br>
|
||||
-- memberof PolygonInfo<br>
|
||||
-- return PolygonInfo object
|
||||
-- @function [parent=#PolygonInfo] PolygonInfo
|
||||
-- @param self
|
||||
-- @return PolygonInfo#PolygonInfo self (return value: cc.PolygonInfo)
|
||||
|
||||
return nil
|
|
@ -186,6 +186,13 @@
|
|||
-- @param self
|
||||
-- @return rect_table#rect_table ret (return value: rect_table)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Sprite] debugDraw
|
||||
-- @param self
|
||||
-- @param #bool on
|
||||
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, string, rect_table
|
||||
-- @overload self, string
|
||||
|
@ -254,46 +261,6 @@
|
|||
-- @param #rect_table rect
|
||||
-- @return Sprite#Sprite self (return value: cc.Sprite)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, string
|
||||
-- @overload self
|
||||
-- @overload self, string, rect_table
|
||||
-- @function [parent=#Sprite] create
|
||||
-- @param self
|
||||
-- @param #string filename
|
||||
-- @param #rect_table rect
|
||||
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, cc.Texture2D, rect_table, bool
|
||||
-- @overload self, cc.Texture2D
|
||||
-- @function [parent=#Sprite] createWithTexture
|
||||
-- @param self
|
||||
-- @param #cc.Texture2D texture
|
||||
-- @param #rect_table rect
|
||||
-- @param #bool rotated
|
||||
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
||||
|
||||
--------------------------------
|
||||
-- Creates a sprite with an sprite frame name.<br>
|
||||
-- A SpriteFrame will be fetched from the SpriteFrameCache by spriteFrameName param.<br>
|
||||
-- If the SpriteFrame doesn't exist it will raise an exception.<br>
|
||||
-- param spriteFrameName A null terminated string which indicates the sprite frame name.<br>
|
||||
-- return An autoreleased sprite object.
|
||||
-- @function [parent=#Sprite] createWithSpriteFrameName
|
||||
-- @param self
|
||||
-- @param #string spriteFrameName
|
||||
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
||||
|
||||
--------------------------------
|
||||
-- Creates a sprite with an sprite frame.<br>
|
||||
-- param spriteFrame A sprite frame which involves a texture and a rect.<br>
|
||||
-- return An autoreleased sprite object.
|
||||
-- @function [parent=#Sprite] createWithSpriteFrame
|
||||
-- @param self
|
||||
-- @param #cc.SpriteFrame spriteFrame
|
||||
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, cc.Node, int, string
|
||||
-- @overload self, cc.Node, int, int
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module SpritePolygon
|
||||
-- @extend Node
|
||||
-- @parent_module ccexp
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, cc.Texture2D
|
||||
-- @overload self, string
|
||||
-- @function [parent=#SpritePolygon] setTexture
|
||||
-- @param self
|
||||
-- @param #string filename
|
||||
-- @return experimental::SpritePolygon#experimental::SpritePolygon self (return value: cc.experimental::SpritePolygon)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygon] initWithTexture
|
||||
-- @param self
|
||||
-- @param #cc.Texture2D texture
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygon] showDebug
|
||||
-- @param self
|
||||
-- @param #bool val
|
||||
-- @return experimental::SpritePolygon#experimental::SpritePolygon self (return value: cc.experimental::SpritePolygon)
|
||||
|
||||
--------------------------------
|
||||
-- returns the Texture2D object used by the sprite
|
||||
-- @function [parent=#SpritePolygon] getTexture
|
||||
-- @param self
|
||||
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygon] getArea
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygon] initWithCache
|
||||
-- @param self
|
||||
-- @param #string file
|
||||
-- @param #cc._SpritePolygonInfo info
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygon] getVertCount
|
||||
-- @param self
|
||||
-- @return long#long ret (return value: long)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygon] getTrianglesCount
|
||||
-- @param self
|
||||
-- @return long#long ret (return value: long)
|
||||
|
||||
return nil
|
|
@ -1,48 +0,0 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module SpritePolygonCache
|
||||
-- @extend Ref
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygonCache] isSpritePolygonCachExist
|
||||
-- @param self
|
||||
-- @param #string filePath
|
||||
-- @param #rect_table rect
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygonCache] removeAllSpritePolygonCache
|
||||
-- @param self
|
||||
-- @return SpritePolygonCache#SpritePolygonCache self (return value: cc.SpritePolygonCache)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygonCache] removeSpritePolygonCache
|
||||
-- @param self
|
||||
-- @param #string filePath
|
||||
-- @param #rect_table rect
|
||||
-- @return SpritePolygonCache#SpritePolygonCache self (return value: cc.SpritePolygonCache)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygonCache] destroyInstance
|
||||
-- @param self
|
||||
-- @return SpritePolygonCache#SpritePolygonCache self (return value: cc.SpritePolygonCache)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygonCache] printInfo
|
||||
-- @param self
|
||||
-- @param #cc._SpritePolygonInfo info
|
||||
-- @return SpritePolygonCache#SpritePolygonCache self (return value: cc.SpritePolygonCache)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygonCache] getInstance
|
||||
-- @param self
|
||||
-- @return SpritePolygonCache#SpritePolygonCache ret (return value: cc.SpritePolygonCache)
|
||||
|
||||
return nil
|
|
@ -932,13 +932,23 @@
|
|||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Sprite
|
||||
-- @field [parent=#cc] Sprite#Sprite Sprite preloaded module
|
||||
-- the cc Image
|
||||
-- @field [parent=#cc] Image#Image Image preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Image
|
||||
-- @field [parent=#cc] Image#Image Image preloaded module
|
||||
-- the cc PolygonInfo
|
||||
-- @field [parent=#cc] PolygonInfo#PolygonInfo PolygonInfo preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc AutoPolygon
|
||||
-- @field [parent=#cc] AutoPolygon#AutoPolygon AutoPolygon preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Sprite
|
||||
-- @field [parent=#cc] Sprite#Sprite Sprite preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
|
@ -1281,9 +1291,4 @@
|
|||
-- @field [parent=#cc] Component#Component Component preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc SpritePolygonCache
|
||||
-- @field [parent=#cc] SpritePolygonCache#SpritePolygonCache SpritePolygonCache preloaded module
|
||||
|
||||
|
||||
return nil
|
||||
|
|
|
@ -11,9 +11,4 @@
|
|||
-- @field [parent=#ccexp] TMXTiledMap#TMXTiledMap TMXTiledMap preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the ccexp SpritePolygon
|
||||
-- @field [parent=#ccexp] SpritePolygon#SpritePolygon SpritePolygon preloaded module
|
||||
|
||||
|
||||
return nil
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2056,8 +2056,6 @@ int register_all_cocos2dx(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include "lua_cocos2dx_experimental_auto.hpp"
|
||||
#include "CCFastTMXLayer.h"
|
||||
#include "CCFastTMXTiledMap.h"
|
||||
#include "SpritePolygon.h"
|
||||
#include "tolua_fix.h"
|
||||
#include "LuaBasicConversions.h"
|
||||
|
||||
|
@ -1869,430 +1868,6 @@ int lua_register_cocos2dx_experimental_TMXTiledMap(lua_State* tolua_S)
|
|||
g_typeCast["TMXTiledMap"] = "ccexp.TMXTiledMap";
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_experimental_SpritePolygon_setTexture(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* 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.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_setTexture'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
do{
|
||||
if (argc == 1) {
|
||||
cocos2d::Texture2D* arg0;
|
||||
ok &= luaval_to_object<cocos2d::Texture2D>(tolua_S, 2, "cc.Texture2D",&arg0, "ccexp.SpritePolygon:setTexture");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->setTexture(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
do{
|
||||
if (argc == 1) {
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.SpritePolygon:setTexture");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->setTexture(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.SpritePolygon:setTexture",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_setTexture'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_initWithTexture(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* 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.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_initWithTexture'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Texture2D* arg0;
|
||||
|
||||
ok &= luaval_to_object<cocos2d::Texture2D>(tolua_S, 2, "cc.Texture2D",&arg0, "ccexp.SpritePolygon:initWithTexture");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_SpritePolygon_initWithTexture'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->initWithTexture(arg0);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.SpritePolygon:initWithTexture",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_initWithTexture'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_showDebug(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* 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.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_showDebug'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ccexp.SpritePolygon:showDebug");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_SpritePolygon_showDebug'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->showDebug(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.SpritePolygon:showDebug",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_showDebug'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_getTexture(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* 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.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_getTexture'", 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_experimental_SpritePolygon_getTexture'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Texture2D* ret = cobj->getTexture();
|
||||
object_to_luaval<cocos2d::Texture2D>(tolua_S, "cc.Texture2D",(cocos2d::Texture2D*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.SpritePolygon:getTexture",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_getTexture'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_getArea(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* 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.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_getArea'", 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_experimental_SpritePolygon_getArea'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
const float ret = cobj->getArea();
|
||||
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.SpritePolygon:getArea",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_getArea'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_initWithCache(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* 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.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_initWithCache'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 2)
|
||||
{
|
||||
std::string arg0;
|
||||
cocos2d::_SpritePolygonInfo* arg1;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.SpritePolygon:initWithCache");
|
||||
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR _SpritePolygonInfo*
|
||||
ok = false;
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_SpritePolygon_initWithCache'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->initWithCache(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", "ccexp.SpritePolygon:initWithCache",argc, 2);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_initWithCache'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_getVertCount(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* 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.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_getVertCount'", 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_experimental_SpritePolygon_getVertCount'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
const ssize_t ret = cobj->getVertCount();
|
||||
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.SpritePolygon:getVertCount",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_getVertCount'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_getTrianglesCount(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* 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.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_getTrianglesCount'", 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_experimental_SpritePolygon_getTrianglesCount'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
const ssize_t ret = cobj->getTrianglesCount();
|
||||
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.SpritePolygon:getTrianglesCount",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_getTrianglesCount'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int lua_cocos2dx_experimental_SpritePolygon_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (SpritePolygon)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_experimental_SpritePolygon(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"ccexp.SpritePolygon");
|
||||
tolua_cclass(tolua_S,"SpritePolygon","ccexp.SpritePolygon","cc.Node",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"SpritePolygon");
|
||||
tolua_function(tolua_S,"setTexture",lua_cocos2dx_experimental_SpritePolygon_setTexture);
|
||||
tolua_function(tolua_S,"initWithTexture",lua_cocos2dx_experimental_SpritePolygon_initWithTexture);
|
||||
tolua_function(tolua_S,"showDebug",lua_cocos2dx_experimental_SpritePolygon_showDebug);
|
||||
tolua_function(tolua_S,"getTexture",lua_cocos2dx_experimental_SpritePolygon_getTexture);
|
||||
tolua_function(tolua_S,"getArea",lua_cocos2dx_experimental_SpritePolygon_getArea);
|
||||
tolua_function(tolua_S,"initWithCache",lua_cocos2dx_experimental_SpritePolygon_initWithCache);
|
||||
tolua_function(tolua_S,"getVertCount",lua_cocos2dx_experimental_SpritePolygon_getVertCount);
|
||||
tolua_function(tolua_S,"getTrianglesCount",lua_cocos2dx_experimental_SpritePolygon_getTrianglesCount);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::experimental::SpritePolygon).name();
|
||||
g_luaType[typeName] = "ccexp.SpritePolygon";
|
||||
g_typeCast["SpritePolygon"] = "ccexp.SpritePolygon";
|
||||
return 1;
|
||||
}
|
||||
TOLUA_API int register_all_cocos2dx_experimental(lua_State* tolua_S)
|
||||
{
|
||||
tolua_open(tolua_S);
|
||||
|
@ -2301,7 +1876,6 @@ TOLUA_API int register_all_cocos2dx_experimental(lua_State* tolua_S)
|
|||
tolua_beginmodule(tolua_S,"ccexp");
|
||||
|
||||
lua_register_cocos2dx_experimental_TMXTiledMap(tolua_S);
|
||||
lua_register_cocos2dx_experimental_SpritePolygon(tolua_S);
|
||||
lua_register_cocos2dx_experimental_TMXLayer(tolua_S);
|
||||
|
||||
tolua_endmodule(tolua_S);
|
||||
|
|
|
@ -41,15 +41,6 @@ int register_all_cocos2dx_experimental(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue