diff --git a/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dFunc.lua b/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dFunc.lua index 18e3fa684f..2c83429b4b 100644 --- a/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dFunc.lua +++ b/cocos/scripting/lua-bindings/script/cocos2d/DeprecatedCocos2dFunc.lua @@ -10,7 +10,7 @@ function CCDirectorDeprecated.sharedDirector() deprecatedTip("CCDirector:sharedDirector","cc.Director:getInstance") return cc.Director:getInstance() end -rawset(CCDirector,"sharedDirector",CCDirectorDeprecated.sharedDirector) +CCDirector.sharedDirector = CCDirectorDeprecated.sharedDirector --functions of CCDirector will be deprecated,end @@ -20,19 +20,19 @@ function TextureCacheDeprecated.getInstance(self) deprecatedTip("cc.TextureCache:getInstance","cc.Director:getInstance():getTextureCache") return cc.Director:getInstance():getTextureCache() end -rawset(cc.TextureCache,"getInstance",TextureCacheDeprecated.getInstance) +cc.TextureCache.getInstance = TextureCacheDeprecated.getInstance function TextureCacheDeprecated.destroyInstance(self) deprecatedTip("cc.TextureCache:destroyInstance","cc.Director:getInstance():destroyTextureCache") return cc.Director:getInstance():destroyTextureCache() end -rawset(cc.TextureCache,"destroyInstance",TextureCacheDeprecated.destroyInstance) +cc.TextureCache.destroyInstance = TextureCacheDeprecated.destroyInstance function TextureCacheDeprecated.dumpCachedTextureInfo(self) deprecatedTip("self:dumpCachedTextureInfo","self:getCachedTextureInfo") return print(self:getCachedTextureInfo()) end -rawset(cc.TextureCache,"dumpCachedTextureInfo",TextureCacheDeprecated.dumpCachedTextureInfo) +cc.TextureCache.dumpCachedTextureInfo = TextureCacheDeprecated.dumpCachedTextureInfo local CCTextureCacheDeprecated = { } function CCTextureCacheDeprecated.sharedTextureCache() @@ -51,7 +51,7 @@ function CCTextureCacheDeprecated.addUIImage(self, image, key) deprecatedTip("CCTextureCache:addUIImage","CCTextureCache:addImage") return self:addImage(image,key) end -rawset(CCTextureCache,"addUIImage",CCTextureCacheDeprecated.addUIImage) +CCTextureCache.addUIImage = CCTextureCacheDeprecated.addUIImage --functions of CCTextureCache will be deprecated end --functions of CCAnimation will be deprecated begin @@ -60,7 +60,7 @@ function CCAnimationDeprecated.addSpriteFrameWithFileName(self,...) deprecatedTip("CCAnimationDeprecated:addSpriteFrameWithFileName","cc.Animation:addSpriteFrameWithFile") return self:addSpriteFrameWithFile(...) end -rawset(CCAnimation,"addSpriteFrameWithFileName",CCAnimationDeprecated.addSpriteFrameWithFileName) +CCAnimation.addSpriteFrameWithFileName = CCAnimationDeprecated.addSpriteFrameWithFileName --functions of CCAnimation will be deprecated end @@ -70,31 +70,31 @@ function CCAnimationCacheDeprecated.sharedAnimationCache() deprecatedTip("CCAnimationCache:sharedAnimationCache","CCAnimationCache:getInstance") return CCAnimationCache:getInstance() end -rawset(CCAnimationCache,"sharedAnimationCache",CCAnimationCacheDeprecated.sharedAnimationCache) +CCAnimationCache.sharedAnimationCache = CCAnimationCacheDeprecated.sharedAnimationCache function CCAnimationCacheDeprecated.purgeSharedAnimationCache() deprecatedTip("CCAnimationCache:purgeSharedAnimationCache","CCAnimationCache:destroyInstance") return CCAnimationCache:destroyInstance() end -rawset(CCAnimationCache,"purgeSharedAnimationCache",CCAnimationCacheDeprecated.purgeSharedAnimationCache) +CCAnimationCache.purgeSharedAnimationCache = CCAnimationCacheDeprecated.purgeSharedAnimationCache function CCAnimationCacheDeprecated.addAnimationsWithFile(self,...) deprecatedTip("CCAnimationCache:addAnimationsWithFile","cc.AnimationCache:addAnimations") return self:addAnimations(...) end -rawset(CCAnimationCache,"addAnimationsWithFile",CCAnimationCacheDeprecated.addAnimationsWithFile) +CCAnimationCache.addAnimationsWithFile = CCAnimationCacheDeprecated.addAnimationsWithFile function CCAnimationCacheDeprecated.animationByName(self,...) deprecatedTip("CCAnimationCache:animationByName","cc.AnimationCache:getAnimation") return self:getAnimation(...) end -rawset(CCAnimationCache,"animationByName",CCAnimationCacheDeprecated.animationByName) +CCAnimationCache.animationByName = CCAnimationCacheDeprecated.animationByName function CCAnimationCacheDeprecated.removeAnimationByName(self) deprecatedTip("CCAnimationCache:removeAnimationByName","cc.AnimationCache:removeAnimation") return self:removeAnimation() end -rawset(CCAnimationCache,"removeAnimationByName",CCAnimationCacheDeprecated.removeAnimationByName) +CCAnimationCache.removeAnimationByName = CCAnimationCacheDeprecated.removeAnimationByName --functions of CCAnimationCache will be deprecated end --functions of CCFileUtils will be deprecated end @@ -103,13 +103,13 @@ function CCFileUtilsDeprecated.sharedFileUtils() deprecatedTip("CCFileUtils:sharedFileUtils","CCFileUtils:getInstance") return cc.FileUtils:getInstance() end -rawset(CCFileUtils,"sharedFileUtils",CCFileUtilsDeprecated.sharedFileUtils) +CCFileUtils.sharedFileUtils = CCFileUtilsDeprecated.sharedFileUtils function CCFileUtilsDeprecated.purgeFileUtils() deprecatedTip("CCFileUtils:purgeFileUtils","CCFileUtils:destroyInstance") return cc.FileUtils:destroyInstance() end -rawset(CCFileUtils,"purgeFileUtils",CCFileUtilsDeprecated.purgeFileUtils) +CCFileUtils.purgeFileUtils = CCFileUtilsDeprecated.purgeFileUtils --functions of CCFileUtils will be deprecated end --functions of CCMenu will be deprecated begin @@ -118,12 +118,12 @@ function CCMenuDeprecated.createWithItem(self,...) deprecatedTip("CCMenuDeprecated:createWithItem","cc.Menu:createWithItem") return self:create(...) end -rawset(CCMenu,"createWithItem",CCMenuDeprecated.createWithItem) +CCMenu.createWithItem = CCMenuDeprecated.createWithItem function CCMenuDeprecated.setHandlerPriority(self) print("\n********** \n".."setHandlerPriority was deprecated in 3.0. \n**********") end -rawset(CCMenu,"setHandlerPriority",CCMenuDeprecated.setHandlerPriority) +CCMenu.setHandlerPriority = CCMenuDeprecated.setHandlerPriority --functions of CCMenu will be deprecated end --functions of CCNode will be deprecated begin @@ -133,21 +133,21 @@ function CCNodeDeprecated.boundingBox(self) deprecatedTip("CCNode:boundingBox","cc.Node:getBoundingBox") return self:getBoundingBox() end -rawset(CCNode,"boundingBox",CCNodeDeprecated.boundingBox) +CCNode.boundingBox = CCNodeDeprecated.boundingBox function CCNodeDeprecated.numberOfRunningActions(self) deprecatedTip("CCNode:numberOfRunningActions","cc.Node:getNumberOfRunningActions") return self:getNumberOfRunningActions() end -rawset(CCNode,"numberOfRunningActions",CCNodeDeprecated.numberOfRunningActions) +CCNode.numberOfRunningActions = CCNodeDeprecated.numberOfRunningActions function CCNodeDeprecated.removeFromParentAndCleanup(self,...) deprecatedTip("CCNode:removeFromParentAndCleanup","cc.Node:removeFromParent") return self:removeFromParent(...) end -rawset(CCNode,"removeFromParentAndCleanup",CCNodeDeprecated.removeFromParentAndCleanup) +CCNode.removeFromParentAndCleanup = CCNodeDeprecated.removeFromParentAndCleanup --functions of CCNode will be deprecated end --CCDrawPrimitives will be deprecated begin @@ -155,88 +155,88 @@ local function CCDrawPrimitivesClassDeprecated() deprecatedTip("CCDrawPrimitives","cc.DrawPrimitives") return cc.DrawPrimitives end -_G["CCDrawPrimitives"] = CCDrawPrimitivesClassDeprecated() +_G.CCDrawPrimitives = CCDrawPrimitivesClassDeprecated() --functions of CCDrawPrimitives will be deprecated begin local CCDrawPrimitivesDeprecated = { } function CCDrawPrimitivesDeprecated.ccDrawPoint(pt) deprecatedTip("ccDrawPoint","cc.DrawPrimitives.drawPoint") return cc.DrawPrimitives.drawPoint(pt) end -rawset(_G, "ccDrawPoint", CCDrawPrimitivesDeprecated.ccDrawPoint) +_G.ccDrawPoint = CCDrawPrimitivesDeprecated.ccDrawPoint function CCDrawPrimitivesDeprecated.ccDrawLine(origin,destination) deprecatedTip("ccDrawLine","cc.DrawPrimitives.drawLine") return cc.DrawPrimitives.drawLine(origin,destination) end -rawset(_G, "ccDrawLine", CCDrawPrimitivesDeprecated.ccDrawLine) +_G.ccDrawLine = CCDrawPrimitivesDeprecated.ccDrawLine function CCDrawPrimitivesDeprecated.ccDrawRect(origin,destination) deprecatedTip("ccDrawRect","cc.DrawPrimitives.drawRect") return cc.DrawPrimitives.drawRect(origin,destination) end -rawset(_G, "ccDrawRect", CCDrawPrimitivesDeprecated.ccDrawRect) +_G.ccDrawRect = CCDrawPrimitivesDeprecated.ccDrawRect function CCDrawPrimitivesDeprecated.ccDrawSolidRect(origin,destination,color) deprecatedTip("ccDrawSolidRect","cc.DrawPrimitives.drawSolidRect") return cc.DrawPrimitives.drawSolidRect(origin,destination,color) end -rawset(_G, "ccDrawSolidRect", CCDrawPrimitivesDeprecated.ccDrawSolidRect) +_G.ccDrawSolidRect = CCDrawPrimitivesDeprecated.ccDrawSolidRect -- params:... may represent two param(xScale,yScale) or nil function CCDrawPrimitivesDeprecated.ccDrawCircle(center,radius,angle,segments,drawLineToCenter,...) deprecatedTip("ccDrawCircle","cc.DrawPrimitives.drawCircle") return cc.DrawPrimitives.drawCircle(center,radius,angle,segments,drawLineToCenter,...) end -rawset(_G, "ccDrawCircle", CCDrawPrimitivesDeprecated.ccDrawCircle) +_G.ccDrawCircle = CCDrawPrimitivesDeprecated.ccDrawCircle -- params:... may represent two param(xScale,yScale) or nil function CCDrawPrimitivesDeprecated.ccDrawSolidCircle(center,radius,angle,segments,...) deprecatedTip("ccDrawSolidCircle","cc.DrawPrimitives.drawSolidCircle") return cc.DrawPrimitives.drawSolidCircle(center,radius,angle,segments,...) end -rawset(_G, "ccDrawSolidCircle", CCDrawPrimitivesDeprecated.ccDrawSolidCircle) +_G.ccDrawSolidCircle = CCDrawPrimitivesDeprecated.ccDrawSolidCircle function CCDrawPrimitivesDeprecated.ccDrawQuadBezier(origin,control,destination,segments) deprecatedTip("ccDrawQuadBezier","cc.DrawPrimitives.drawQuadBezier") return cc.DrawPrimitives.drawQuadBezier(origin,control,destination,segments) end -rawset(_G, "ccDrawQuadBezier", CCDrawPrimitivesDeprecated.ccDrawQuadBezier) +_G.ccDrawQuadBezier = CCDrawPrimitivesDeprecated.ccDrawQuadBezier function CCDrawPrimitivesDeprecated.ccDrawCubicBezier(origin,control1,control2,destination,segments) deprecatedTip("ccDrawCubicBezier","cc.DrawPrimitives.drawCubicBezier") return cc.DrawPrimitives.drawCubicBezier(origin,control1,control2,destination,segments) end -rawset(_G, "ccDrawCubicBezier", CCDrawPrimitivesDeprecated.ccDrawCubicBezier) +_G.ccDrawCubicBezier = CCDrawPrimitivesDeprecated.ccDrawCubicBezier function CCDrawPrimitivesDeprecated.ccDrawCatmullRom(arrayOfControlPoints,segments) deprecatedTip("ccDrawCatmullRom","cc.DrawPrimitives.drawCatmullRom") return cc.DrawPrimitives.drawCatmullRom(arrayOfControlPoints,segments) end -rawset(_G, "ccDrawCatmullRom", CCDrawPrimitivesDeprecated.ccDrawCatmullRom) +_G.ccDrawCatmullRom = CCDrawPrimitivesDeprecated.ccDrawCatmullRom function CCDrawPrimitivesDeprecated.ccDrawCardinalSpline(config,tension,segments) deprecatedTip("ccDrawCardinalSpline","cc.DrawPrimitives.drawCardinalSpline") return cc.DrawPrimitives.drawCardinalSpline(config,tension,segments) end -rawset(_G, "ccDrawCardinalSpline", CCDrawPrimitivesDeprecated.ccDrawCardinalSpline) +_G.ccDrawCardinalSpline = CCDrawPrimitivesDeprecated.ccDrawCardinalSpline function CCDrawPrimitivesDeprecated.ccDrawColor4B(r,g,b,a) deprecatedTip("ccDrawColor4B","cc.DrawPrimitives.drawColor4B") return cc.DrawPrimitives.drawColor4B(r,g,b,a) end -rawset(_G, "ccDrawColor4B", CCDrawPrimitivesDeprecated.ccDrawColor4B) +_G.ccDrawColor4B = CCDrawPrimitivesDeprecated.ccDrawColor4B function CCDrawPrimitivesDeprecated.ccDrawColor4F(r,g,b,a) deprecatedTip("ccDrawColor4F","cc.DrawPrimitives.drawColor4F") return cc.DrawPrimitives.drawColor4F(r,g,b,a) end -rawset(_G, "ccDrawColor4F", CCDrawPrimitivesDeprecated.ccDrawColor4F) +_G.ccDrawColor4F = CCDrawPrimitivesDeprecated.ccDrawColor4F function CCDrawPrimitivesDeprecated.ccPointSize(pointSize) deprecatedTip("ccPointSize","cc.DrawPrimitives.setPointSize") return cc.DrawPrimitives.setPointSize(pointSize) end -rawset(_G, "ccPointSize", CCDrawPrimitivesDeprecated.ccPointSize) +_G.ccPointSize = CCDrawPrimitivesDeprecated.ccPointSize --functions of CCDrawPrimitives will be deprecated end --CCDrawPrimitives will be deprecated end @@ -245,7 +245,7 @@ function CCProgressTimerDeprecated.setReverseProgress(self,...) deprecatedTip("CCProgressTimer","CCProgressTimer:setReverseDirection") return self:setReverseDirection(...) end -rawset(CCProgressTimer,"setReverseProgress",CCProgressTimerDeprecated.setReverseProgress) +CCProgressTimer.setReverseProgress = CCProgressTimerDeprecated.setReverseProgress --functions of CCSpriteFrameCache will be deprecated begin local CCSpriteFrameCacheDeprecated = { } @@ -253,19 +253,19 @@ function CCSpriteFrameCacheDeprecated.spriteFrameByName(self,szName) deprecatedTip("CCSpriteFrameCache:spriteFrameByName","CCSpriteFrameCache:getSpriteFrameByName") return self:getSpriteFrameByName(szName) end -rawset(CCSpriteFrameCache,"spriteFrameByName",CCSpriteFrameCacheDeprecated.spriteFrameByName) +CCSpriteFrameCache.spriteFrameByName = CCSpriteFrameCacheDeprecated.spriteFrameByName function CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache() deprecatedTip("CCSpriteFrameCache:sharedSpriteFrameCache","CCSpriteFrameCache:getInstance") return CCSpriteFrameCache:getInstance() end -rawset(CCSpriteFrameCache,"sharedSpriteFrameCache",CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache) +CCSpriteFrameCache.sharedSpriteFrameCache = CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache function CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache() deprecatedTip("CCSpriteFrameCache:purgeSharedSpriteFrameCache","CCSpriteFrameCache:destroyInstance") return CCSpriteFrameCache:destroyInstance() end -rawset(CCSpriteFrameCache,"purgeSharedSpriteFrameCache",CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache) +CCSpriteFrameCache.purgeSharedSpriteFrameCache = CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache function CCSpriteFrameCacheDeprecated.addSpriteFramesWithFile(self,...) deprecatedTip("CCSpriteFrameCache:addSpriteFramesWithFile","CCSpriteFrameCache:addSpriteFrames") @@ -277,7 +277,7 @@ function CCSpriteFrameCacheDeprecated.getSpriteFrameByName(self,...) deprecatedTip("CCSpriteFrameCache:getSpriteFrameByName","CCSpriteFrameCache:getSpriteFrame") return self:getSpriteFrame(...) end -rawset(CCSpriteFrameCache,"getSpriteFrameByName",CCSpriteFrameCacheDeprecated.getSpriteFrameByName) +CCSpriteFrameCache.getSpriteFrameByName = CCSpriteFrameCacheDeprecated.getSpriteFrameByName --functions of CCSpriteFrameCache will be deprecated end --functions of CCLabelAtlas will be deprecated begin @@ -286,7 +286,7 @@ function CCLabelAtlasDeprecated.create(self,...) deprecatedTip("CCLabelAtlas:create","CCLabelAtlas:_create") return self:_create(...) end -rawset(CCLabelAtlas,"create",CCLabelAtlasDeprecated.create) +CCLabelAtlas.create = CCLabelAtlasDeprecated.create --functions of CCLabelAtlas will be deprecated end @@ -296,55 +296,55 @@ local function CCRectMake(x,y,width,height) deprecatedTip("CCRectMake(x,y,width,height)","cc.rect(x,y,width,height) in lua") return cc.rect(x,y,width,height) end -rawset(_G,"CCRectMake",CCRectMake) +_G.CCRectMake = CCRectMake local function ccc3(r,g,b) deprecatedTip("ccc3(r,g,b)","cc.c3b(r,g,b)") return cc.c3b(r,g,b) end -rawset(_G,"ccc3",ccc3) +_G.ccc3 = ccc3 local function ccp(x,y) deprecatedTip("ccp(x,y)","cc.p(x,y)") return cc.p(x,y) end -rawset(_G,"ccp",ccp) +_G.ccp = ccp local function CCSizeMake(width,height) deprecatedTip("CCSizeMake(width,height)","cc.size(width,height)") return cc.size(width,height) end -rawset(_G,"CCSizeMake",CCSizeMake) +_G.CCSizeMake = CCSizeMake local function ccc4(r,g,b,a) deprecatedTip("ccc4(r,g,b,a)","cc.c4b(r,g,b,a)") return cc.c4b(r,g,b,a) end -rawset(_G,"ccc4",ccc4) +_G.ccc4 = ccc4 local function ccc4FFromccc3B(color3B) deprecatedTip("ccc4FFromccc3B(color3B)","cc.c4f(color3B.r / 255.0,color3B.g / 255.0,color3B.b / 255.0,1.0)") return cc.c4f(color3B.r/255.0, color3B.g/255.0, color3B.b/255.0, 1.0) end -rawset(_G,"ccc4FFromccc3B",ccc4FFromccc3B) +_G.ccc4FFromccc3B = ccc4FFromccc3B local function ccc4f(r,g,b,a) deprecatedTip("ccc4f(r,g,b,a)","cc.c4f(r,g,b,a)") return cc.c4f(r,g,b,a) end -rawset(_G,"ccc4f",ccc4f) +_G.ccc4f = ccc4f local function ccc4FFromccc4B(color4B) deprecatedTip("ccc4FFromccc4B(color4B)","cc.c4f(color4B.r/255.0, color4B.g/255.0, color4B.b/255.0, color4B.a/255.0)") return cc.c4f(color4B.r/255.0, color4B.g/255.0, color4B.b/255.0, color4B.a/255.0) end -rawset(_G,"ccc4FFromccc4B",ccc4FFromccc4B) +_G.ccc4FFromccc4B = ccc4FFromccc4B local function ccc4FEqual(a,b) deprecatedTip("ccc4FEqual(a,b)","a:equals(b)") return a:equals(b) end -rawset(_G,"ccc4FEqual",ccc4FEqual) +_G.ccc4FEqual = ccc4FEqual --global functions wil be deprecated, end @@ -353,14 +353,14 @@ local function ccpLineIntersect(a,b,c,d,s,t) deprecatedTip("ccpLineIntersect","cc.pIsLineIntersect") return cc.pIsLineIntersect(a,b,c,d,s,t) end -rawset(_G,"ccpLineIntersect",ccpLineIntersect) +_G.ccpLineIntersect = ccpLineIntersect local function CCPointMake(x,y) deprecatedTip("CCPointMake(x,y)","cc.p(x,y)") return cc.p(x,y) end -rawset(_G,"CCPointMake",CCPointMake) +_G.CCPointMake = CCPointMake @@ -368,304 +368,304 @@ local function ccpNeg(pt) deprecatedTip("ccpNeg","cc.pSub") return cc.pSub({x = 0,y = 0}, pt) end -rawset(_G,"ccpNeg",ccpNeg) +_G.ccpNeg = ccpNeg local function ccpAdd(pt1,pt2) deprecatedTip("ccpAdd","cc.pAdd") return cc.pAdd(pt1,pt2) end -rawset(_G,"ccpAdd",ccpAdd) +_G.ccpAdd = ccpAdd local function ccpSub(pt1,pt2) deprecatedTip("ccpSub","cc.pSub") return cc.pSub(pt1,pt2) end -rawset(_G,"ccpSub",ccpSub) +_G.ccpSub = ccpSub local function ccpMult(pt,factor) deprecatedTip("ccpMult","cc.pMul") return cc.pMul(pt,factor) end -rawset(_G,"ccpMult",ccpMult) +_G.ccpMult = ccpMult local function ccpMidpoint(pt1,pt2) deprecatedTip("ccpMidpoint","cc.pMidpoint") return cc.pMidpoint(pt1,pt2) end -rawset(_G,"ccpMidpoint",ccpMidpoint) +_G.ccpMidpoint = ccpMidpoint local function ccpDot(pt1,pt2) deprecatedTip("ccpDot","cc.pDot") return cc.pDot(pt1,pt2) end -rawset(_G,"ccpDot",ccpDot) +_G.ccpDot = ccpDot local function ccpCross(pt1,pt2) deprecatedTip("ccpCross","cc.pCross") return cc.pCross(pt1, pt2) end -rawset(_G,"ccpCross",ccpCross) +_G.ccpCross = ccpCross local function ccpPerp(pt) deprecatedTip("ccpPerp","cc.pPerp") return cc.pPerp(pt) end -rawset(_G,"ccpPerp",ccpPerp) +_G.ccpPerp = ccpPerp local function ccpRPerp(pt) deprecatedTip("ccpRPerp","cc.RPerp") return cc.RPerp(pt) end -rawset(_G,"ccpRPerp",ccpRPerp) +_G.ccpRPerp = ccpRPerp local function ccpProject(pt1,pt2) deprecatedTip("ccpProject","cc.pProject") return cc.pProject(pt1,pt2) end -rawset(_G,"ccpProject",ccpProject) +_G.ccpProject = ccpProject local function ccpRotate(pt1,pt2) deprecatedTip("ccpRotate","cc.pRotate") return cc.pRotate(pt1,pt2) end -rawset(_G,"ccpRotate",ccpRotate) +_G.ccpRotate = ccpRotate local function ccpUnrotate(pt1,pt2) deprecatedTip("ccpUnrotate","cc.pUnrotate") return cc.pUnrotate(pt1,pt2) end -rawset(_G,"ccpUnrotate",ccpUnrotate) +_G.ccpUnrotate = ccpUnrotate local function ccpLengthSQ(pt) deprecatedTip("ccpLengthSQ","cc.pLengthSQ") return cc.pLengthSQ(pt) end -rawset(_G,"ccpLengthSQ",ccpLengthSQ) +_G.ccpLengthSQ = ccpLengthSQ local function ccpDistanceSQ(pt1,pt2) deprecatedTip("ccpDistanceSQ","cc.pDistanceSQ") return cc.pDistanceSQ(pt1,pt2) end -rawset(_G,"ccpDistanceSQ",ccpDistanceSQ) +_G.ccpDistanceSQ = ccpDistanceSQ local function ccpLength(pt) deprecatedTip("ccpLength","cc.pGetLength") return cc.pGetLength(pt) end -rawset(_G,"ccpLength",ccpLength) +_G.ccpLength = ccpLength local function ccpDistance(pt1,pt2) deprecatedTip("ccpDistance","cc.pGetDistance") return cc.pGetDistance(pt1, pt2) end -rawset(_G,"ccpDistance",ccpDistance) +_G.ccpDistance = ccpDistance local function ccpNormalize(pt) deprecatedTip("ccpNormalize","cc.pNormalize") return cc.pNormalize(pt) end -rawset(_G,"ccpNormalize",ccpNormalize) +_G.ccpNormalize = ccpNormalize local function ccpForAngle(angle) deprecatedTip("ccpForAngle","cc.pForAngle") return cc.pForAngle(angle) end -rawset(_G,"ccpForAngle",ccpForAngle) +_G.ccpForAngle = ccpForAngle local function ccpToAngle(pt) deprecatedTip("ccpToAngle","cc.pToAngleSelf") return cc.pToAngleSelf(pt) end -rawset(_G,"ccpToAngle",ccpToAngle) +_G.ccpToAngle = ccpToAngle local function ccpClamp(pt1,pt2,pt3) deprecatedTip("ccpClamp","cc.pGetClampPoint") return cc.pGetClampPoint(pt1,pt2,pt3) end -rawset(_G,"ccpClamp",ccpClamp) +_G.ccpClamp = ccpClamp local function ccpFromSize(sz) deprecatedTip("ccpFromSize(sz)","cc.pFromSize") return cc.pFromSize(sz) end -rawset(_G,"ccpFromSize",ccpFromSize) +_G.ccpFromSize = ccpFromSize local function ccpLerp(pt1,pt2,alpha) deprecatedTip("ccpLerp","cc.pLerp") return cc.pLerp(pt1,pt2,alpha) end -rawset(_G,"ccpLerp",ccpLerp) +_G.ccpLerp = ccpLerp local function ccpFuzzyEqual(pt1,pt2,variance) deprecatedTip("ccpFuzzyEqual","cc.pFuzzyEqual") return cc.pFuzzyEqual(pt1,pt2,variance) end -rawset(_G,"ccpFuzzyEqual",ccpFuzzyEqual) +_G.ccpFuzzyEqual = ccpFuzzyEqual local function ccpCompMult(pt1,pt2) deprecatedTip("ccpCompMult","cc.p") return cc.p(pt1.x * pt2.x , pt1.y * pt2.y) end -rawset(_G,"ccpCompMult",ccpCompMult) +_G.ccpCompMult = ccpCompMult local function ccpAngleSigned(pt1,pt2) deprecatedTip("ccpAngleSigned","cc.pGetAngle") return cc.pGetAngle(pt1, pt2) end -rawset(_G,"ccpAngleSigned",ccpAngleSigned) +_G.ccpAngleSigned = ccpAngleSigned local function ccpAngle(pt1,pt2) deprecatedTip("ccpAngle","cc.pGetAngle") return cc.pGetAngle(pt1,ptw) end -rawset(_G,"ccpAngle",ccpAngle) +_G.ccpAngle = ccpAngle local function ccpRotateByAngle(pt1,pt2,angle) deprecatedTip("ccpRotateByAngle","cc.pRotateByAngle") return cc.pRotateByAngle(pt1, pt2, angle) end -rawset(_G,"ccpRotateByAngle",ccpRotateByAngle) +_G.ccpRotateByAngle = ccpRotateByAngle local function ccpSegmentIntersect(pt1,pt2,pt3,pt4) deprecatedTip("ccpSegmentIntersect","cc.pIsSegmentIntersect") return cc.pIsSegmentIntersect(pt1,pt2,pt3,pt4) end -rawset(_G,"ccpSegmentIntersect",ccpSegmentIntersect) +_G.ccpSegmentIntersect = ccpSegmentIntersect local function ccpIntersectPoint(pt1,pt2,pt3,pt4) deprecatedTip("ccpIntersectPoint","cc.pGetIntersectPoint") return cc.pGetIntersectPoint(pt1,pt2,pt3,pt4) end -rawset(_G,"ccpIntersectPoint",ccpIntersectPoint) +_G.ccpIntersectPoint = ccpIntersectPoint local function vertex2(x,y) deprecatedTip("vertex2(x,y)","cc.vertex2F(x,y)") return cc.vertex2F(x,y) end -rawset(_G,"vertex2",vertex2) +_G.vertex2 = vertex2 local function vertex3(x,y,z) deprecatedTip("vertex3(x,y,z)","cc.Vertex3F(x,y,z)") return cc.Vertex3F(x,y,z) end -rawset(_G,"vertex3",vertex3) +_G.vertex3 = vertex3 local function tex2(u,v) deprecatedTip("tex2(u,v)","cc.tex2f(u,v)") return cc.tex2f(u,v) end -rawset(_G,"tex2",tex2) +_G.tex2 = tex2 local function ccc4BFromccc4F(color4F) deprecatedTip("ccc4BFromccc4F(color4F)","Color4B(color4F.r * 255.0, color4F.g * 255.0, color4F.b * 255.0, color4B.a * 255.0)") return Color4B(color4F.r * 255.0, color4F.g * 255.0, color4F.b * 255.0, color4B.a * 255.0) end -rawset(_G,"ccc4BFromccc4F",ccc4BFromccc4F) +_G.ccc4BFromccc4F = ccc4BFromccc4F local function ccColor3BDeprecated() deprecatedTip("ccColor3B","cc.c3b(0,0,0)") return cc.c3b(0,0,0) end -_G["ccColor3B"] = ccColor3BDeprecated +_G.ccColor3B = ccColor3BDeprecated local function ccColor4BDeprecated() deprecatedTip("ccColor4B","cc.c4b(0,0,0,0)") return cc.c4b(0,0,0,0) end -_G["ccColor4B"] = ccColor4BDeprecated +_G.ccColor4B = ccColor4BDeprecated local function ccColor4FDeprecated() deprecatedTip("ccColor4F","cc.c4f(0.0,0.0,0.0,0.0)") return cc.c4f(0.0,0.0,0.0,0.0) end -_G["ccColor4F"] = ccColor4FDeprecated +_G.ccColor4F = ccColor4FDeprecated local function ccVertex2FDeprecated() deprecatedTip("ccVertex2F","cc.vertex2F(0.0,0.0)") return cc.vertex2F(0.0,0.0) end -_G["ccVertex2F"] = ccVertex2FDeprecated +_G.ccVertex2F = ccVertex2FDeprecated local function ccVertex3FDeprecated() deprecatedTip("ccVertex3F","cc.Vertex3F(0.0, 0.0, 0.0)") return cc.Vertex3F(0.0, 0.0, 0.0) end -_G["ccVertex3F"] = ccVertex3FDeprecated +_G.ccVertex3F = ccVertex3FDeprecated local function ccTex2FDeprecated() deprecatedTip("ccTex2F","cc.tex2F(0.0, 0.0)") return cc.tex2F(0.0, 0.0) end -_G["ccTex2F"] = ccTex2FDeprecated +_G.ccTex2F = ccTex2FDeprecated local function ccPointSpriteDeprecated() deprecatedTip("ccPointSprite","cc.PointSprite(cc.vertex2F(0.0, 0.0),cc.c4b(0.0, 0.0, 0.0),0)") return cc.PointSprite(cc.vertex2F(0.0, 0.0),cc.c4b(0.0, 0.0, 0.0),0) end -_G["ccPointSprite"] = ccPointSpriteDeprecated +_G.ccPointSprite = ccPointSpriteDeprecated local function ccQuad2Deprecated() deprecatedTip("ccQuad2","cc.Quad2(cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0))") return cc.Quad2(cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0)) end -_G["ccQuad2"] = ccQuad2Deprecated +_G.ccQuad2 = ccQuad2Deprecated local function ccQuad3Deprecated() deprecatedTip("ccQuad3","cc.Quad3(cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0))") return cc.Quad3(cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0)) end -_G["ccQuad3"] = ccQuad3Deprecated +_G.ccQuad3 = ccQuad3Deprecated local function ccV2FC4BT2FDeprecated() deprecatedTip("ccV2F_C4B_T2F","cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0))") return cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)) end -_G["ccV2F_C4B_T2F"] = ccV2FC4BT2FDeprecated +_G.ccV2F_C4B_T2F = ccV2FC4BT2FDeprecated local function ccV2FC4FT2FDeprecated() deprecatedTip("ccV2F_C4F_T2F","cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0 , 0.0 , 0.0 ), cc.tex2F(0.0, 0.0))") return cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0 , 0.0 , 0.0), cc.tex2F(0.0, 0.0)) end -_G["ccV2F_C4F_T2F"] = ccV2FC4FT2FDeprecated +_G.ccV2F_C4F_T2F = ccV2FC4FT2FDeprecated local function ccV3FC4BT2FDeprecated() deprecatedTip("ccV3F_C4B_T2F","cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0 , 0, 0 ), cc.tex2F(0.0, 0.0))") return cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0 , 0, 0 ), cc.tex2F(0.0, 0.0)) end -_G["ccV3F_C4B_T2F"] = ccV3FC4BT2FDeprecated +_G.ccV3F_C4B_T2F = ccV3FC4BT2FDeprecated local function ccV2FC4BT2FQuadDeprecated() deprecatedTip("ccV2F_C4B_T2F_Quad","cc.V2F_C4B_T2F_Quad(cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)))") return cc.V2F_C4B_T2F_Quad(cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0))) end -_G["ccV2F_C4B_T2F_Quad"] = ccV2FC4BT2FQuadDeprecated +_G.ccV2F_C4B_T2F_Quad = ccV2FC4BT2FQuadDeprecated local function ccV3FC4BT2FQuadDeprecated() deprecatedTip("ccV3F_C4B_T2F_Quad","cc.V3F_C4B_T2F_Quad(_tl, _bl, _tr, _br)") return cc.V3F_C4B_T2F_Quad(cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0))) end -_G["ccV3F_C4B_T2F_Quad"] = ccV3FC4BT2FQuadDeprecated +_G.ccV3F_C4B_T2F_Quad = ccV3FC4BT2FQuadDeprecated local function ccV2FC4FT2FQuadDeprecated() deprecatedTip("ccV2F_C4F_T2F_Quad","cc.V2F_C4F_T2F_Quad(_bl, _br, _tl, _tr)") return cc.V2F_C4F_T2F_Quad(cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0))) end -_G["ccV2F_C4F_T2F_Quad"] = ccV2FC4FT2FQuadDeprecated +_G.ccV2F_C4F_T2F_Quad = ccV2FC4FT2FQuadDeprecated local function ccT2FQuadDeprecated() deprecatedTip("ccT2F_Quad","cc.T2F_Quad(_bl, _br, _tl, _tr)") return cc.T2F_Quad(cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0)) end -_G["ccT2F_Quad"] = ccT2FQuadDeprecated +_G.ccT2F_Quad = ccT2FQuadDeprecated local function ccAnimationFrameDataDeprecated() deprecatedTip("ccAnimationFrameData","cc.AnimationFrameData( _texCoords, _delay, _size)") return cc.AnimationFrameData(cc.T2F_Quad(cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0)), 0, cc.size(0,0)) end -_G["ccAnimationFrameData"] = ccAnimationFrameDataDeprecated +_G.ccAnimationFrameData = ccAnimationFrameDataDeprecated @@ -673,7 +673,7 @@ local function tex2(u,v) deprecatedTip("tex2(u,v)","cc.tex2f(u,v)") return cc.tex2f(u,v) end -rawset(_G,"tex2",tex2) +_G.tex2 = tex2 --functions of CCApplication will be deprecated end @@ -682,7 +682,7 @@ function CCApplicationDeprecated.sharedApplication() deprecatedTip("CCApplication:sharedApplication","CCApplication:getInstance") return CCApplication:getInstance() end -rawset(CCApplication,"sharedApplication",CCApplicationDeprecated.sharedApplication) +CCApplication.sharedApplication = CCApplicationDeprecated.sharedApplication --functions of CCApplication will be deprecated end @@ -692,7 +692,7 @@ function CCDirectorDeprecated.sharedDirector() deprecatedTip("CCDirector:sharedDirector","CCDirector:getInstance") return CCDirector:getInstance() end -rawset(CCDirector,"sharedDirector",CCDirectorDeprecated.sharedDirector) +CCDirector.sharedDirector = CCDirectorDeprecated.sharedDirector --functions of CCDirector will be deprecated end @@ -702,13 +702,13 @@ function CCUserDefaultDeprecated.sharedUserDefault() deprecatedTip("CCUserDefault:sharedUserDefault","CCUserDefault:getInstance") return CCUserDefault:getInstance() end -rawset(CCUserDefault,"sharedUserDefault",CCUserDefaultDeprecated.sharedUserDefault) +CCUserDefault.sharedUserDefault = CCUserDefaultDeprecated.sharedUserDefault function CCUserDefaultDeprecated.purgeSharedUserDefault() deprecatedTip("CCUserDefault:purgeSharedUserDefault","CCUserDefault:destroyInstance") return CCUserDefault:destroyInstance() end -rawset(CCUserDefault,"purgeSharedUserDefault",CCUserDefaultDeprecated.purgeSharedUserDefault) +CCUserDefault.purgeSharedUserDefault = CCUserDefaultDeprecated.purgeSharedUserDefault --functions of CCUserDefault will be deprecated end --functions of CCGrid3DAction will be deprecated begin @@ -717,13 +717,13 @@ function CCGrid3DActionDeprecated.vertex(self,pt) deprecatedTip("vertex","CCGrid3DAction:getVertex") return self:getVertex(pt) end -rawset(CCGrid3DAction,"vertex",CCGrid3DActionDeprecated.vertex) +CCGrid3DAction.vertex = CCGrid3DActionDeprecated.vertex function CCGrid3DActionDeprecated.originalVertex(self,pt) deprecatedTip("originalVertex","CCGrid3DAction:getOriginalVertex") return self:getOriginalVertex(pt) end -rawset(CCGrid3DAction,"originalVertex",CCGrid3DActionDeprecated.originalVertex) +CCGrid3DAction.originalVertex = CCGrid3DActionDeprecated.originalVertex --functions of CCGrid3DAction will be deprecated end @@ -733,13 +733,13 @@ function CCTiledGrid3DActionDeprecated.tile(self,pt) deprecatedTip("tile","CCTiledGrid3DAction:getTile") return self:getTile(pt) end -rawset(CCTiledGrid3DAction,"tile",CCTiledGrid3DActionDeprecated.tile) +CCTiledGrid3DAction.tile = CCTiledGrid3DActionDeprecated.tile function CCTiledGrid3DActionDeprecated.originalTile(self,pt) deprecatedTip("originalTile","CCTiledGrid3DAction:getOriginalTile") return self:getOriginalTile(pt) end -rawset(CCTiledGrid3DAction,"originalTile",CCTiledGrid3DActionDeprecated.originalTile) +CCTiledGrid3DAction.originalTile = CCTiledGrid3DActionDeprecated.originalTile --functions of CCTiledGrid3DAction will be deprecated end @@ -749,25 +749,25 @@ function CCTexture2DDeprecated.stringForFormat(self) deprecatedTip("Texture2D:stringForFormat","Texture2D:getStringForFormat") return self:getStringForFormat() end -rawset(CCTexture2D,"stringForFormat",CCTexture2DDeprecated.stringForFormat) +CCTexture2D.stringForFormat = CCTexture2DDeprecated.stringForFormat function CCTexture2DDeprecated.bitsPerPixelForFormat(self) deprecatedTip("Texture2D:bitsPerPixelForFormat","Texture2D:getBitsPerPixelForFormat") return self:getBitsPerPixelForFormat() end -rawset(CCTexture2D,"bitsPerPixelForFormat",CCTexture2DDeprecated.bitsPerPixelForFormat) +CCTexture2D.bitsPerPixelForFormat = CCTexture2DDeprecated.bitsPerPixelForFormat function CCTexture2DDeprecated.bitsPerPixelForFormat(self,pixelFormat) deprecatedTip("Texture2D:bitsPerPixelForFormat","Texture2D:getBitsPerPixelForFormat") return self:getBitsPerPixelForFormat(pixelFormat) end -rawset(CCTexture2D,"bitsPerPixelForFormat",CCTexture2DDeprecated.bitsPerPixelForFormat) +CCTexture2D.bitsPerPixelForFormat = CCTexture2DDeprecated.bitsPerPixelForFormat function CCTexture2DDeprecated.defaultAlphaPixelFormat(self) deprecatedTip("Texture2D:defaultAlphaPixelFormat","Texture2D:getDefaultAlphaPixelFormat") return self:getDefaultAlphaPixelFormat() end -rawset(CCTexture2D,"defaultAlphaPixelFormat",CCTexture2DDeprecated.defaultAlphaPixelFormat) +CCTexture2D.defaultAlphaPixelFormat = CCTexture2DDeprecated.defaultAlphaPixelFormat --functions of CCTexture2D will be deprecated end @@ -777,13 +777,13 @@ function CCTimerDeprecated.timerWithScriptHandler(handler,seconds) deprecatedTip("CCTimer:timerWithScriptHandler","CCTimer:createWithScriptHandler") return CCTimer:createWithScriptHandler(handler,seconds) end -rawset(CCTimer,"timerWithScriptHandler",CCTimerDeprecated.timerWithScriptHandler) +CCTimer.timerWithScriptHandler = CCTimerDeprecated.timerWithScriptHandler function CCTimerDeprecated.numberOfRunningActionsInTarget(self,target) deprecatedTip("CCActionManager:numberOfRunningActionsInTarget","CCActionManager:getNumberOfRunningActionsInTarget") return self:getNumberOfRunningActionsInTarget(target) end -rawset(CCTimer,"numberOfRunningActionsInTarget",CCTimerDeprecated.numberOfRunningActionsInTarget) +CCTimer.numberOfRunningActionsInTarget = CCTimerDeprecated.numberOfRunningActionsInTarget --functions of CCTimer will be deprecated end @@ -793,25 +793,25 @@ function CCMenuItemFontDeprecated.fontSize() deprecatedTip("CCMenuItemFont:fontSize","CCMenuItemFont:getFontSize") return CCMenuItemFont:getFontSize() end -rawset(CCMenuItemFont,"fontSize",CCMenuItemFontDeprecated.fontSize) +CCMenuItemFont.fontSize = CCMenuItemFontDeprecated.fontSize function CCMenuItemFontDeprecated.fontName() deprecatedTip("CCMenuItemFont:fontName","CCMenuItemFont:getFontName") return CCMenuItemFont:getFontName() end -rawset(CCMenuItemFont,"fontName",CCMenuItemFontDeprecated.fontName) +CCMenuItemFont.fontName = CCMenuItemFontDeprecated.fontName function CCMenuItemFontDeprecated.fontSizeObj(self) deprecatedTip("CCMenuItemFont:fontSizeObj","CCMenuItemFont:getFontSizeObj") return self:getFontSizeObj() end -rawset(CCMenuItemFont,"fontSizeObj",CCMenuItemFontDeprecated.fontSizeObj) +CCMenuItemFont.fontSizeObj = CCMenuItemFontDeprecated.fontSizeObj function CCMenuItemFontDeprecated.fontNameObj(self) deprecatedTip("CCMenuItemFont:fontNameObj","CCMenuItemFont:getFontNameObj") return self:getFontNameObj() end -rawset(CCMenuItemFont,"fontNameObj",CCMenuItemFontDeprecated.fontNameObj) +CCMenuItemFont.fontNameObj = CCMenuItemFontDeprecated.fontNameObj --functions of CCMenuItemFont will be deprecated end @@ -821,7 +821,7 @@ function CCMenuItemToggleDeprecated.selectedItem(self) deprecatedTip("CCMenuItemToggle:selectedItem","CCMenuItemToggle:getSelectedItem") return self:getSelectedItem() end -rawset(CCMenuItemToggle,"selectedItem",CCMenuItemToggleDeprecated.selectedItem) +CCMenuItemToggle.selectedItem = CCMenuItemToggleDeprecated.selectedItem --functions of CCMenuItemToggle will be deprecated end @@ -831,7 +831,7 @@ function CCTileMapAtlasDeprecated.tileAt(self,pos) deprecatedTip("CCTileMapAtlas:tileAt","CCTileMapAtlas:getTileAt") return self:getTileAt(pos) end -rawset(CCTileMapAtlas,"tileAt",CCTileMapAtlasDeprecated.tileAt) +CCTileMapAtlas.tileAt = CCTileMapAtlasDeprecated.tileAt --functions of CCTileMapAtlas will be deprecated end @@ -841,25 +841,25 @@ function CCTMXLayerDeprecated.tileAt(self,tileCoordinate) deprecatedTip("CCTMXLayer:tileAt","CCTMXLayer:getTileAt") return self:getTileAt(tileCoordinate) end -rawset(CCTMXLayer,"tileAt",CCTMXLayerDeprecated.tileAt) +CCTMXLayer.tileAt = CCTMXLayerDeprecated.tileAt function CCTMXLayerDeprecated.tileGIDAt(self,tileCoordinate) deprecatedTip("CCTMXLayer:tileGIDAt","CCTMXLayer:getTileGIDAt") return self:getTileGIDAt(tileCoordinate) end -rawset(CCTMXLayer,"tileGIDAt",CCTMXLayerDeprecated.tileGIDAt) +CCTMXLayer.tileGIDAt = CCTMXLayerDeprecated.tileGIDAt function CCTMXLayerDeprecated.positionAt(self,tileCoordinate) deprecatedTip("CCTMXLayer:positionAt","CCTMXLayer:getPositionAt") return self:getPositionAt(tileCoordinate) end -rawset(CCTMXLayer,"positionAt",CCTMXLayerDeprecated.positionAt) +CCTMXLayer.positionAt = CCTMXLayerDeprecated.positionAt function CCTMXLayerDeprecated.propertyNamed(self,propertyName) deprecatedTip("CCTMXLayer:propertyNamed","CCTMXLayer:getProperty") return self:getProperty(propertyName) end -rawset(CCTMXLayer,"propertyNamed",CCTMXLayerDeprecated.propertyNamed) +CCTMXLayer.propertyNamed = CCTMXLayerDeprecated.propertyNamed --functions of CCTMXLayer will be deprecated end --functions of CCTMXTiledMap will be deprecated begin @@ -868,25 +868,25 @@ function CCTMXTiledMapDeprecated.layerNamed(self,layerName) deprecatedTip("CCTMXTiledMap:layerNamed","CCTMXTiledMap:getLayer") return self:getLayer(layerName) end -rawset(CCTMXTiledMap,"layerNamed", CCTMXTiledMapDeprecated.layerNamed) +CCTMXTiledMap.layerNamed = CCTMXTiledMapDeprecated.layerNamed function CCTMXTiledMapDeprecated.propertyNamed(self,propertyName) deprecatedTip("CCTMXTiledMap:propertyNamed","CCTMXTiledMap:getProperty") return self:getProperty(propertyName) end -rawset(CCTMXTiledMap,"propertyNamed", CCTMXTiledMapDeprecated.propertyNamed ) +CCTMXTiledMap.propertyNamed = CCTMXTiledMapDeprecated.propertyNamed function CCTMXTiledMapDeprecated.propertiesForGID(self,GID) deprecatedTip("CCTMXTiledMap:propertiesForGID","CCTMXTiledMap:getPropertiesForGID") return self:getPropertiesForGID(GID) end -rawset(CCTMXTiledMap,"propertiesForGID", CCTMXTiledMapDeprecated.propertiesForGID) +CCTMXTiledMap.propertiesForGID = CCTMXTiledMapDeprecated.propertiesForGID function CCTMXTiledMapDeprecated.objectGroupNamed(self,groupName) deprecatedTip("CCTMXTiledMap:objectGroupNamed","CCTMXTiledMap:getObjectGroup") return self:getObjectGroup(groupName) end -rawset(CCTMXTiledMap,"objectGroupNamed", CCTMXTiledMapDeprecated.objectGroupNamed) +CCTMXTiledMap.objectGroupNamed = CCTMXTiledMapDeprecated.objectGroupNamed --functions of CCTMXTiledMap will be deprecated end @@ -896,19 +896,19 @@ function CCTMXMapInfoDeprecated.getStoringCharacters(self) deprecatedTip("CCTMXMapInfo:getStoringCharacters","CCTMXMapInfo:isStoringCharacters") return self:isStoringCharacters() end -rawset(CCTMXMapInfo,"getStoringCharacters", CCTMXMapInfoDeprecated.getStoringCharacters) +CCTMXMapInfo.getStoringCharacters = CCTMXMapInfoDeprecated.getStoringCharacters function CCTMXMapInfoDeprecated.formatWithTMXFile(infoTable,tmxFile) deprecatedTip("CCTMXMapInfo:formatWithTMXFile","CCTMXMapInfo:create") return CCTMXMapInfo:create(tmxFile) end -rawset(CCTMXMapInfo,"formatWithTMXFile", CCTMXMapInfoDeprecated.formatWithTMXFile) +CCTMXMapInfo.formatWithTMXFile = CCTMXMapInfoDeprecated.formatWithTMXFile function CCTMXMapInfoDeprecated.formatWithXML(infoTable,tmxString,resourcePath) deprecatedTip("CCTMXMapInfo:formatWithXML","TMXMapInfo:createWithXML") return CCTMXMapInfo:createWithXML(tmxString,resourcePath) end -rawset(CCTMXMapInfo,"formatWithXML", CCTMXMapInfoDeprecated.formatWithXML) +CCTMXMapInfo.formatWithXML = CCTMXMapInfoDeprecated.formatWithXML --functions of CCTMXMapInfo will be deprecated end @@ -918,13 +918,13 @@ function CCTMXObjectGroupDeprecated.propertyNamed(self,propertyName) deprecatedTip("CCTMXObjectGroup:propertyNamed","CCTMXObjectGroup:getProperty") return self:getProperty(propertyName) end -rawset(CCTMXObjectGroup,"propertyNamed", CCTMXObjectGroupDeprecated.propertyNamed) +CCTMXObjectGroup.propertyNamed = CCTMXObjectGroupDeprecated.propertyNamed function CCTMXObjectGroupDeprecated.objectNamed(self, objectName) deprecatedTip("CCTMXObjectGroup:objectNamed","CCTMXObjectGroup:getObject") return self:getObject(objectName) end -rawset(CCTMXObjectGroup,"objectNamed", CCTMXObjectGroupDeprecated.objectNamed) +CCTMXObjectGroup.objectNamed = CCTMXObjectGroupDeprecated.objectNamed --functions of CCTMXObject will be deprecated end --functions of CCRenderTexture will be deprecated begin @@ -933,7 +933,7 @@ function CCRenderTextureDeprecated.newCCImage(self) deprecatedTip("CCRenderTexture:newCCImage","CCRenderTexture:newImage") return self:newImage() end -rawset(CCRenderTexture, "newCCImage", CCRenderTextureDeprecated.newCCImage) +CCRenderTexture.newCCImage = CCRenderTextureDeprecated.newCCImage --functions of CCRenderTexture will be deprecated end --functions of Sprite will be deprecated begin @@ -942,13 +942,13 @@ function CCSpriteDeprecated.setFlipX(self,flag) deprecatedTip("CCSpriteDeprecated:setFlipX","CCSpriteDeprecated:setFlippedX") return self:setFlippedX(flag) end -rawset(cc.Sprite, "setFlipX", CCSpriteDeprecated.setFlipX) +cc.Sprite.setFlipX = CCSpriteDeprecated.setFlipX function CCSpriteDeprecated.setFlipY(self,flag) deprecatedTip("CCSpriteDeprecated:setFlipY","CCSpriteDeprecated:setFlippedY") return self:setFlippedY(flag) end -rawset(cc.Sprite, "setFlipY", CCSpriteDeprecated.setFlipY) +cc.Sprite.setFlipY = CCSpriteDeprecated.setFlipY --functions of Sprite will be deprecated end @@ -957,12 +957,12 @@ local CCLayerDeprecated = {} function CCLayerDeprecated.setKeypadEnabled( self, enabled) return self:setKeyboardEnabled(enabled) end -rawset(cc.Layer, "setKeypadEnabled", CCLayerDeprecated.setKeypadEnabled ) +cc.Layer.setKeypadEnabled = CCLayerDeprecated.setKeypadEnabled function CCLayerDeprecated.isKeypadEnabled(self) return self:isKeyboardEnabled() end -rawset(cc.Layer, "isKeypadEnabled", CCLayerDeprecated.isKeypadEnabled ) +cc.Layer.isKeypadEnabled = CCLayerDeprecated.isKeypadEnabled --functions of Layer will be deprecated end --functions of cc.Node will be deprecated begin @@ -971,25 +971,25 @@ function NodeDeprecated.setZOrder(self,zOrder) deprecatedTip("cc.Node:setZOrder","cc.Node:setLocalZOrder") return self:setLocalZOrder(zOrder) end -rawset(cc.Node,"setZOrder",NodeDeprecated.setZOrder) +cc.Node.setZOrder = NodeDeprecated.setZOrder function NodeDeprecated.getZOrder(self) deprecatedTip("cc.Node:getZOrder","cc.Node:getLocalZOrder") return self:getLocalZOrder() end -rawset(cc.Node,"getZOrder",NodeDeprecated.getZOrder) +cc.Node.getZOrder = NodeDeprecated.getZOrder function NodeDeprecated.setVertexZ(self,vertexZ) deprecatedTip("cc.Node:setVertexZ", "cc.Node:setPositionZ") return self:setPositionZ(vertexZ) end -rawset(cc.Node,"setVertexZ",NodeDeprecated.setVertexZ) +cc.Node.setVertexZ = NodeDeprecated.setVertexZ function NodeDeprecated.getVertexZ(self) deprecatedTip("cc.Node:getVertexZ", "cc.Node:getPositionZ") return self:getPositionZ() end -rawset(cc.Node, "getVertexZ", NodeDeprecated.getVertexZ) +cc.Node.getVertexZ = NodeDeprecated.getVertexZ --functions of cc.Node will be deprecated end --functions of cc.GLProgram will be deprecated begin @@ -998,17 +998,17 @@ function GLProgram.initWithVertexShaderByteArray(self,vShaderByteArray, fShaderB deprecatedTip("cc.GLProgram:initWithVertexShaderByteArray","cc.GLProgram:initWithByteArrays") return self:initWithByteArrays(vShaderByteArray, fShaderByteArray) end -rawset(cc.GLProgram,"initWithVertexShaderByteArray", GLProgram.initWithVertexShaderByteArray) +cc.GLProgram.initWithVertexShaderByteArray = GLProgram.initWithVertexShaderByteArray function GLProgram.initWithVertexShaderFilename(self,vShaderByteArray, fShaderByteArray) deprecatedTip("cc.GLProgram:initWithVertexShaderFilename","cc.GLProgram:initWithFilenames") return self:initWithFilenames(vShaderByteArray, fShaderByteArray) end -rawset(cc.GLProgram,"initWithVertexShaderFilename", GLProgram.initWithVertexShaderFilename) +cc.GLProgram.initWithVertexShaderFilename = GLProgram.initWithVertexShaderFilename function GLProgram.addAttribute(self, attributeName, index) deprecatedTip("cc.GLProgram:addAttribute","cc.GLProgram:bindAttribLocation") return self:bindAttribLocation(attributeName, index) end -rawset(cc.GLProgram,"addAttribute", GLProgram.addAttribute) +cc.GLProgram.addAttribute = GLProgram.addAttribute --functions of cc.GLProgram will be deprecated end diff --git a/cocos/scripting/lua-bindings/script/cocosdenshion/DeprecatedCocosDenshionFunc.lua b/cocos/scripting/lua-bindings/script/cocosdenshion/DeprecatedCocosDenshionFunc.lua index f6a5401ed2..932962e505 100644 --- a/cocos/scripting/lua-bindings/script/cocosdenshion/DeprecatedCocosDenshionFunc.lua +++ b/cocos/scripting/lua-bindings/script/cocosdenshion/DeprecatedCocosDenshionFunc.lua @@ -9,11 +9,11 @@ function SimpleAudioEngineDeprecated.sharedEngine() deprecatedTip("SimpleAudioEngine:sharedEngine","SimpleAudioEngine:getInstance") return cc.SimpleAudioEngine:getInstance() end -rawset(SimpleAudioEngine,"sharedEngine",SimpleAudioEngineDeprecated.sharedEngine) +SimpleAudioEngine.sharedEngine = SimpleAudioEngineDeprecated.sharedEngine function SimpleAudioEngineDeprecated.playBackgroundMusic(self,...) deprecatedTip("SimpleAudioEngine:playBackgroundMusic","SimpleAudioEngine:playMusic") return self:playMusic(...) end -rawset(SimpleAudioEngine,"playBackgroundMusic",SimpleAudioEngineDeprecated.playBackgroundMusic) +SimpleAudioEngine.playBackgroundMusic = SimpleAudioEngineDeprecated.playBackgroundMusic --functions of SimpleAudioEngine will be deprecated end diff --git a/cocos/scripting/lua-bindings/script/cocostudio/DeprecatedCocoStudioFunc.lua b/cocos/scripting/lua-bindings/script/cocostudio/DeprecatedCocoStudioFunc.lua index 72331f1b09..0c8952690f 100644 --- a/cocos/scripting/lua-bindings/script/cocostudio/DeprecatedCocoStudioFunc.lua +++ b/cocos/scripting/lua-bindings/script/cocostudio/DeprecatedCocoStudioFunc.lua @@ -9,13 +9,13 @@ function GUIReaderDeprecated.shareReader() deprecatedTip("GUIReader:shareReader","ccs.GUIReader:getInstance") return ccs.GUIReader:getInstance() end -rawset(GUIReader,"shareReader",GUIReaderDeprecated.shareReader) +GUIReader.shareReader = GUIReaderDeprecated.shareReader function GUIReaderDeprecated.purgeGUIReader() deprecatedTip("GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance") return ccs.GUIReader:destroyInstance() end -rawset(GUIReader,"purgeGUIReader",GUIReaderDeprecated.purgeGUIReader) +GUIReader.purgeGUIReader = GUIReaderDeprecated.purgeGUIReader --functions of GUIReader will be deprecated end --functions of SceneReader will be deprecated begin @@ -24,13 +24,13 @@ function SceneReaderDeprecated.sharedSceneReader() deprecatedTip("SceneReader:sharedSceneReader","ccs.SceneReader:getInstance") return ccs.SceneReader:getInstance() end -rawset(SceneReader,"sharedSceneReader",SceneReaderDeprecated.sharedSceneReader) +SceneReader.sharedSceneReader = SceneReaderDeprecated.sharedSceneReader function SceneReaderDeprecated.purgeSceneReader(self) deprecatedTip("SceneReader:purgeSceneReader","ccs.SceneReader:destroyInstance") return self:destroyInstance() end -rawset(SceneReader,"purgeSceneReader",SceneReaderDeprecated.purgeSceneReader) +SceneReader.purgeSceneReader = SceneReaderDeprecated.purgeSceneReader --functions of SceneReader will be deprecated end @@ -40,7 +40,7 @@ function CCSGUIReaderDeprecated.purgeGUIReader() deprecatedTip("ccs.GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance") return ccs.GUIReader:destroyInstance() end -rawset(ccs.GUIReader,"purgeGUIReader",CCSGUIReaderDeprecated.purgeGUIReader) +ccs.GUIReader.purgeGUIReader = CCSGUIReaderDeprecated.purgeGUIReader --functions of ccs.GUIReader will be deprecated end --functions of ccs.ActionManagerEx will be deprecated begin @@ -49,7 +49,7 @@ function CCSActionManagerExDeprecated.destroyActionManager() deprecatedTip("ccs.ActionManagerEx:destroyActionManager","ccs.ActionManagerEx:destroyInstance") return ccs.ActionManagerEx:destroyInstance() end -rawset(ccs.ActionManagerEx,"destroyActionManager",CCSActionManagerExDeprecated.destroyActionManager) +ccs.ActionManagerEx.destroyActionManager = CCSActionManagerExDeprecated.destroyActionManager --functions of ccs.ActionManagerEx will be deprecated end --functions of ccs.SceneReader will be deprecated begin @@ -58,7 +58,7 @@ function CCSSceneReaderDeprecated.destroySceneReader(self) deprecatedTip("ccs.SceneReader:destroySceneReader","ccs.SceneReader:destroyInstance") return self:destroyInstance() end -rawset(ccs.SceneReader,"destroySceneReader",CCSSceneReaderDeprecated.destroySceneReader) +ccs.SceneReader.destroySceneReader = CCSSceneReaderDeprecated.destroySceneReader --functions of ccs.SceneReader will be deprecated end --functions of CCArmatureDataManager will be deprecated begin @@ -67,11 +67,11 @@ function CCArmatureDataManagerDeprecated.sharedArmatureDataManager() deprecatedTip("CCArmatureDataManager:sharedArmatureDataManager","ccs.ArmatureDataManager:getInstance") return ccs.ArmatureDataManager:getInstance() end -rawset(CCArmatureDataManager,"sharedArmatureDataManager",CCArmatureDataManagerDeprecated.sharedArmatureDataManager) +CCArmatureDataManager.sharedArmatureDataManager = CCArmatureDataManagerDeprecated.sharedArmatureDataManager function CCArmatureDataManagerDeprecated.purge() deprecatedTip("CCArmatureDataManager:purge","ccs.ArmatureDataManager:destoryInstance") return ccs.ArmatureDataManager:destoryInstance() end -rawset(CCArmatureDataManager,"purge",CCArmatureDataManagerDeprecated.purge) +CCArmatureDataManager.purge = CCArmatureDataManagerDeprecated.purge --functions of CCArmatureDataManager will be deprecated end diff --git a/cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionFunc.lua b/cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionFunc.lua index 513c2cbf85..282c0118b5 100644 --- a/cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionFunc.lua +++ b/cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionFunc.lua @@ -10,19 +10,19 @@ function CCControlDeprecated.addHandleOfControlEvent(self,func,controlEvent) print("come in addHandleOfControlEvent") self:registerControlEventHandler(func,controlEvent) end -rawset(CCControl,"addHandleOfControlEvent",CCControlDeprecated.addHandleOfControlEvent) +CCControl.addHandleOfControlEvent = CCControlDeprecated.addHandleOfControlEvent --functions of CCControl will be deprecated end --Enums of CCTableView will be deprecated begin -rawset(CCTableView, "kTableViewScroll",cc.SCROLLVIEW_SCRIPT_SCROLL) -rawset(CCTableView,"kTableViewZoom",cc.SCROLLVIEW_SCRIPT_ZOOM) -rawset(CCTableView,"kTableCellTouched",cc.TABLECELL_TOUCHED) -rawset(CCTableView,"kTableCellSizeForIndex",cc.TABLECELL_SIZE_FOR_INDEX) -rawset(CCTableView,"kTableCellSizeAtIndex",cc.TABLECELL_SIZE_AT_INDEX) -rawset(CCTableView,"kNumberOfCellsInTableView",cc.NUMBER_OF_CELLS_IN_TABLEVIEW) +CCTableView.kTableViewScroll = cc.SCROLLVIEW_SCRIPT_SCROLL +CCTableView.kTableViewZoom = cc.SCROLLVIEW_SCRIPT_ZOOM +CCTableView.kTableCellTouched = cc.TABLECELL_TOUCHED +CCTableView.kTableCellSizeForIndex = cc.TABLECELL_SIZE_FOR_INDEX +CCTableView.kTableCellSizeAtIndex = cc.TABLECELL_SIZE_AT_INDEX +CCTableView.kNumberOfCellsInTableView = cc.NUMBER_OF_CELLS_IN_TABLEVIEW --Enums of CCTableView will be deprecated end --Enums of CCScrollView will be deprecated begin -rawset(CCScrollView, "kScrollViewScroll",cc.SCROLLVIEW_SCRIPT_SCROLL) -rawset(CCScrollView,"kScrollViewZoom",cc.SCROLLVIEW_SCRIPT_ZOOM) +CCScrollView.kScrollViewScroll = cc.SCROLLVIEW_SCRIPT_SCROLL +CCScrollView.kScrollViewZoom = cc.SCROLLVIEW_SCRIPT_ZOOM --Enums of CCScrollView will be deprecated end diff --git a/cocos/scripting/lua-bindings/script/init.lua b/cocos/scripting/lua-bindings/script/init.lua index c31e436578..4e2621b0dd 100644 --- a/cocos/scripting/lua-bindings/script/init.lua +++ b/cocos/scripting/lua-bindings/script/init.lua @@ -2,6 +2,7 @@ require "cocos.cocos2d.Cocos2d" require "cocos.cocos2d.Cocos2dConstants" require "cocos.cocos2d.extern" +require "cocos.cocos2d.bitExtend" -- opengl require "cocos.cocos2d.Opengl" diff --git a/cocos/scripting/lua-bindings/script/network/DeprecatedNetworkFunc.lua b/cocos/scripting/lua-bindings/script/network/DeprecatedNetworkFunc.lua index 83869f7775..6ea3cfac9b 100644 --- a/cocos/scripting/lua-bindings/script/network/DeprecatedNetworkFunc.lua +++ b/cocos/scripting/lua-bindings/script/network/DeprecatedNetworkFunc.lua @@ -11,13 +11,13 @@ if (kTargetIphone == targetPlatform) or (kTargetIpad == targetPlatform) or (kTar deprecatedTip("WebSocket:sendTextMsg","WebSocket:sendString") return self:sendString(string) end - rawset(WebSocket,"sendTextMsg", WebSocketDeprecated.sendTextMsg) + WebSocket.sendTextMsg = WebSocketDeprecated.sendTextMsg function WebSocketDeprecated.sendBinaryMsg(self, table,tablesize) deprecatedTip("WebSocket:sendBinaryMsg","WebSocket:sendString") string.char(unpack(table)) return self:sendString(string.char(unpack(table))) end - rawset(WebSocket,"sendBinaryMsg", WebSocketDeprecated.sendBinaryMsg) + WebSocket.sendBinaryMsg = WebSocketDeprecated.sendBinaryMsg end --functions of WebSocket will be deprecated end diff --git a/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua b/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua index 203f417d6d..8427740119 100644 --- a/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua +++ b/cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua @@ -9,13 +9,13 @@ function TextDeprecated.setText(self, str) deprecatedTip("ccui.Text:setText","ccui.Text:setString") return self:setString(str) end -rawset(ccui.Text,"setText", TextDeprecated.setText) +ccui.Text.setText = TextDeprecated.setText function TextDeprecated.getStringValue(self) deprecatedTip("ccui.Text:getStringValue","ccui.Text:getString") return self:getString() end -rawset(ccui.Text,"getStringValue", TextDeprecated.getStringValue) +ccui.Text.getStringValue = TextDeprecated.getStringValue --functions of ccui.Text will be deprecated begin @@ -25,13 +25,13 @@ function TextAtlasDeprecated.setStringValue(self, str) deprecatedTip("ccui.TextAtlas:setStringValue","ccui.TextAtlas:setString") return self:setString(str) end -rawset(ccui.TextAtlas,"setStringValue", TextAtlasDeprecated.setStringValue) +ccui.TextAtlas.setStringValue = TextAtlasDeprecated.setStringValue function TextAtlasDeprecated.getStringValue(self) deprecatedTip("ccui.TextAtlas:getStringValue","ccui.TextAtlas:getString") return self:getString() end -rawset(ccui.TextAtlas,"getStringValue", TextAtlasDeprecated.getStringValue) +ccui.TextAtlas.getStringValue = TextAtlasDeprecated.getStringValue --functions of ccui.TextAtlas will be deprecated begin @@ -41,13 +41,13 @@ function TextBMFontDeprecated.setText(self, str) deprecatedTip("ccui.TextBMFont:setText","ccui.TextBMFont:setString") return self:setString(str) end -rawset(ccui.TextBMFont,"setText", TextBMFontDeprecated.setText) +ccui.TextBMFont.setText = TextBMFontDeprecated.setText function TextBMFontDeprecated.getStringValue(self) deprecatedTip("ccui.Text:getStringValue","ccui.TextBMFont:getString") return self:getString() end -rawset(ccui.Text,"getStringValue", TextBMFontDeprecated.getStringValue) +ccui.Text.getStringValue = TextBMFontDeprecated.getStringValue --functions of ccui.TextBMFont will be deprecated begin --functions of cc.ShaderCache will be deprecated begin @@ -56,7 +56,7 @@ function ShaderCacheDeprecated.getProgram(self,strShader) deprecatedTip("cc.ShaderCache:getProgram","cc.ShaderCache:getGLProgram") return self:getGLProgram(strShader) end -rawset(cc.ShaderCache,"getProgram", ShaderCacheDeprecated.getProgram) +cc.ShaderCache.getProgram = ShaderCacheDeprecated.getProgram --functions of ccui.TextBMFont will be deprecated begin --functions of ccui.Widget will be deprecated begin @@ -65,37 +65,37 @@ function UIWidgetDeprecated.getLeftInParent(self) deprecatedTip("ccui.Widget:getLeftInParent","ccui.Widget:getLeftBoundary") return self:getLeftBoundary() end -rawset(ccui.Widget,"getLeftInParent", UIWidgetDeprecated.getLeftInParent) +ccui.Widget.getLeftInParent = UIWidgetDeprecated.getLeftInParent function UIWidgetDeprecated.getBottomInParent(self) deprecatedTip("ccui.Widget:getBottomInParent","ccui.Widget:getBottomBoundary") return self:getBottomBoundary() end -rawset(ccui.Widget,"getBottomInParent", UIWidgetDeprecated.getBottomInParent) +ccui.Widget.getBottomInParent = UIWidgetDeprecated.getBottomInParent function UIWidgetDeprecated.getRightInParent(self) deprecatedTip("ccui.Widget:getRightInParent","ccui.Widget:getRightBoundary") return self:getRightBoundary() end -rawset(ccui.Widget,"getRightInParent", UIWidgetDeprecated.getRightInParent) +ccui.Widget.getRightInParent = UIWidgetDeprecated.getRightInParent function UIWidgetDeprecated.getTopInParent(self) deprecatedTip("ccui.Widget:getTopInParent","ccui.Widget:getTopBoundary") return self:getTopBoundary() end -rawset(ccui.Widget,"getTopInParent", UIWidgetDeprecated.getTopInParent) +ccui.Widget.getTopInParent = UIWidgetDeprecated.getTopInParent function UIWidgetDeprecated.getSize(self) deprecatedTip("ccui.Widget:getSize","ccui.Widget:getContentSize") return self:getContentSize() end -rawset(ccui.Widget,"getSize", UIWidgetDeprecated.getSize) +ccui.Widget.getSize = UIWidgetDeprecated.getSize function UIWidgetDeprecated.setSize(self, ...) deprecatedTip("ccui.Widget:setSize","ccui.Widget:setContentSize") return self:setContentSize(...) end -rawset(ccui.Widget,"setSize", UIWidgetDeprecated.setSize) +ccui.Widget.setSize = UIWidgetDeprecated.setSize --functions of ccui.Widget will be deprecated end @@ -105,19 +105,19 @@ function UICheckBoxDeprecated.addEventListenerCheckBox(self,handler) deprecatedTip("ccui.CheckBox:addEventListenerCheckBox","ccui.CheckBox:addEventListener") return self:addEventListener(handler) end -rawset(ccui.CheckBox,"addEventListenerCheckBox", UICheckBoxDeprecated.addEventListenerCheckBox) +ccui.CheckBox.addEventListenerCheckBox = UICheckBoxDeprecated.addEventListenerCheckBox function UICheckBoxDeprecated.setSelectedState(self,flag) deprecatedTip("ccui.CheckBox:setSelectedState", "ccui.CheckBox:setSelected") return self:setSelected(flag) end -rawset(ccui.CheckBox, "setSelectedState", UICheckBoxDeprecated.setSelectedState) +ccui.CheckBox.setSelectedState = UICheckBoxDeprecated.setSelectedState function UICheckBoxDeprecated.getSelectedState(self) deprecatedTip("ccui.CheckBox:getSelectedState", "ccui.CheckBox:getSelected") return self:getSelected() end -rawset(ccui.CheckBox, "getSelectedState", UICheckBoxDeprecated.setSelectedState) +ccui.CheckBox.getSelectedState = UICheckBoxDeprecated.setSelectedState --functions of ccui.CheckBox will be deprecated end @@ -127,7 +127,7 @@ function UISliderDeprecated.addEventListenerSlider(self,handler) deprecatedTip("ccui.Slider:addEventListenerSlider","ccui.Slider:addEventListener") return self:addEventListener(handler) end -rawset(ccui.Slider,"addEventListenerSlider", UISliderDeprecated.addEventListenerSlider) +ccui.Slider.addEventListenerSlider = UISliderDeprecated.addEventListenerSlider --functions of ccui.Slider will be deprecated end --functions of ccui.TextField will be deprecated begin @@ -136,19 +136,19 @@ function UITextFieldDeprecated.addEventListenerTextField(self,handler) deprecatedTip("ccui.TextField:addEventListenerTextField","ccui.TextField:addEventListener") return self:addEventListener(handler) end -rawset(ccui.TextField,"addEventListenerTextField", UITextFieldDeprecated.addEventListenerTextField) +ccui.TextField.addEventListenerTextField = UITextFieldDeprecated.addEventListenerTextField function UITextFieldDeprecated.setText(self, str) deprecatedTip("ccui.TextField:setText","ccui.TextField:setString") return self:setString(str) end -rawset(ccui.TextField,"setText", UITextFieldDeprecated.setText) +ccui.TextField.setText = UITextFieldDeprecated.setText function UITextFieldDeprecated.getStringValue(self) deprecatedTip("ccui.TextField:getStringValue","ccui.TextField:getString") return self:getString() end -rawset(ccui.TextField,"getStringValue", UITextFieldDeprecated.getStringValue) +ccui.TextField.getStringValue = UITextFieldDeprecated.getStringValue --functions of ccui.TextField will be deprecated end --functions of ccui.PageView will be deprecated begin @@ -157,7 +157,7 @@ function UIPageViewDeprecated.addEventListenerPageView(self,handler) deprecatedTip("ccui.PageView:addEventListenerPageView","ccui.PageView:addEventListener") return self:addEventListener(handler) end -rawset(ccui.PageView,"addEventListenerPageView", UIPageViewDeprecated.addEventListenerPageView) +ccui.PageView.addEventListenerPageView = UIPageViewDeprecated.addEventListenerPageView --functions of ccui.PageView will be deprecated end --functions of ccui.ScrollView will be deprecated begin @@ -166,7 +166,7 @@ function UIScrollViewDeprecated.addEventListenerScrollView(self,handler) deprecatedTip("ccui.ScrollView:addEventListenerScrollView","ccui.ScrollView:addEventListener") return self:addEventListener(handler) end -rawset(ccui.ScrollView,"addEventListenerScrollView", UIScrollViewDeprecated.addEventListenerScrollView) +ccui.ScrollView.addEventListenerScrollView = UIScrollViewDeprecated.addEventListenerScrollView --functions of ccui.ScrollView will be deprecated end --functions of ccui.ListView will be deprecated begin @@ -175,5 +175,5 @@ function UIListViewDeprecated.addEventListenerListView(self,handler) deprecatedTip("ccui.ListView:addEventListenerListView","ccui.ListView:addEventListener") return self:addEventListener(handler) end -rawset(ccui.ListView,"addEventListenerListView", UIListViewDeprecated.addEventListenerListView) +ccui.ListView.addEventListenerListView = UIListViewDeprecated.addEventListenerListView --functions of ccui.ListView will be deprecated end diff --git a/tests/cpp-tests/Resources/Manifests/AMTestScene1/project.manifest b/tests/cpp-tests/Resources/Manifests/AMTestScene1/project.manifest index 43780bcece..06a0da1f85 100644 --- a/tests/cpp-tests/Resources/Manifests/AMTestScene1/project.manifest +++ b/tests/cpp-tests/Resources/Manifests/AMTestScene1/project.manifest @@ -1,7 +1,7 @@ { "packageUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene1/", - "remoteManifestUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene1/project.manifest", - "remoteVersionUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene1/version.manifest", + "remoteManifestUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene1/project_dev.manifest", + "remoteVersionUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene1/version_dev.manifest", "version" : "1.0.0", "engineVersion" : "3.0 beta", diff --git a/tests/cpp-tests/Resources/Manifests/AMTestScene2/project.manifest b/tests/cpp-tests/Resources/Manifests/AMTestScene2/project.manifest index 5d6bbfeedd..ad698e4d19 100644 --- a/tests/cpp-tests/Resources/Manifests/AMTestScene2/project.manifest +++ b/tests/cpp-tests/Resources/Manifests/AMTestScene2/project.manifest @@ -1,6 +1,6 @@ { "packageUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene2/", - "remoteManifestUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene2/project.manifest", + "remoteManifestUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene2/project_dev.manifest", "version" : "1.0.0", "engineVersion" : "3.0 beta", diff --git a/tests/cpp-tests/Resources/Manifests/AMTestScene3/project.manifest b/tests/cpp-tests/Resources/Manifests/AMTestScene3/project.manifest index b074d0e46f..bea34649b0 100644 --- a/tests/cpp-tests/Resources/Manifests/AMTestScene3/project.manifest +++ b/tests/cpp-tests/Resources/Manifests/AMTestScene3/project.manifest @@ -1,7 +1,7 @@ { "packageUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene3/", - "remoteManifestUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene3/project.manifest", - "remoteVersionUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene3/version.manifest", + "remoteManifestUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene3/project_dev.manifest", + "remoteVersionUrl" : "http://tools.itharbors.com/assets_manager/AMTestScene3/version_dev.manifest", "version" : "1.0.0", "engineVersion" : "3.0 beta", diff --git a/tests/lua-tests/project/Classes/lua_test_bindings.cpp b/tests/lua-tests/project/Classes/lua_test_bindings.cpp index ca41685d13..723af93e4d 100644 --- a/tests/lua-tests/project/Classes/lua_test_bindings.cpp +++ b/tests/lua-tests/project/Classes/lua_test_bindings.cpp @@ -521,7 +521,7 @@ int lua_cocos2dx_DrawNode3D_drawCube(lua_State* L) { lua_pushnumber(L, i + 1); lua_gettable(L, 2); -#ifndef TOLUA_RELEASE +#if COCOS2D_DEBUG >= 1 if (!tolua_istable(L, -1, 0, &tolua_err)) { lua_pop(L, 1); @@ -530,7 +530,7 @@ int lua_cocos2dx_DrawNode3D_drawCube(lua_State* L) #endif ok &= luaval_to_vec3(L, lua_gettop(L), &vec3); -#ifndef TOLUA_RELEASE +#if COCOS2D_DEBUG >= 1 if (!ok) { lua_pop(L, 1); diff --git a/tests/lua-tests/src/controller.lua b/tests/lua-tests/src/controller.lua index aaec7837ff..7bb0d8cfa5 100644 --- a/tests/lua-tests/src/controller.lua +++ b/tests/lua-tests/src/controller.lua @@ -6,7 +6,7 @@ collectgarbage("setstepmul", 5000) ---------------- -- run cc.FileUtils:getInstance():addSearchPath("src") --- CC_USE_DEPRECATED_API = true +CC_USE_DEPRECATED_API = true require "cocos.init" local director = cc.Director:getInstance() diff --git a/tools/bindings-generator b/tools/bindings-generator index a8496d540c..87efa95573 160000 --- a/tools/bindings-generator +++ b/tools/bindings-generator @@ -1 +1 @@ -Subproject commit a8496d540c174236bec0d5a33457340571699f19 +Subproject commit 87efa95573ab18f1fd60a62c7a70744901d92142 diff --git a/tools/tolua/cocos2dx.ini b/tools/tolua/cocos2dx.ini index 1a6a14f651..5c4f65805d 100644 --- a/tools/tolua/cocos2dx.ini +++ b/tools/tolua/cocos2dx.ini @@ -147,7 +147,7 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS AmbientLight3D::[*], CSLoader::[nodeFromXML nodeFromProtocolBuffers createTimeline] -rename_functions = SpriteFrameCache::[getSpriteFrameByName=getSpriteFrame], +rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame], ProgressTimer::[setReverseProgress=setReverseDirection], AnimationCache::[addAnimationsWithFile=addAnimations], LayerGradient::[initWithColor=init],