2013-07-25 19:58:59 +08:00
|
|
|
--tip
|
2013-07-19 14:57:02 +08:00
|
|
|
local function deprecatedTip(old_name,new_name)
|
|
|
|
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
|
2013-07-18 23:27:07 +08:00
|
|
|
end
|
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
--functions of _G will be deprecated begin
|
2013-07-18 23:27:07 +08:00
|
|
|
local function ccpLineIntersect(a,b,c,d,s,t)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpLineIntersect","CCPoint:isLineIntersect")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCPoint:isLineIntersect(a,b,c,d,s,t)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpLineIntersect",ccpLineIntersect)
|
|
|
|
|
|
|
|
|
|
|
|
local function CCPointMake(x,y)
|
2013-07-24 10:15:16 +08:00
|
|
|
deprecatedTip("CCPointMake(x,y)","CCPoint(x,y)")
|
|
|
|
return CCPoint(x,y)
|
2013-07-18 23:27:07 +08:00
|
|
|
end
|
|
|
|
rawset(_G,"CCPointMake",CCPointMake)
|
|
|
|
|
|
|
|
local function ccp(x,y)
|
2013-07-24 10:15:16 +08:00
|
|
|
deprecatedTip("ccp(x,y)","CCPoint(x,y)")
|
|
|
|
return CCPoint(x,y)
|
2013-07-18 23:27:07 +08:00
|
|
|
end
|
|
|
|
rawset(_G,"ccp",ccp)
|
|
|
|
|
|
|
|
local function CCSizeMake(width,height)
|
2013-07-24 10:15:16 +08:00
|
|
|
deprecatedTip("CCSizeMake(width,height)","CCSize(width,height)")
|
|
|
|
return CCSize(width,height)
|
2013-07-18 23:27:07 +08:00
|
|
|
end
|
|
|
|
rawset(_G,"CCSizeMake",CCSizeMake)
|
|
|
|
|
|
|
|
local function CCRectMake(x,y,width,height)
|
2013-07-24 10:15:16 +08:00
|
|
|
deprecatedTip("CCRectMake(x,y,width,height)","CCRect(x,y,width,height)")
|
|
|
|
return CCRect(x,y,width,height)
|
2013-07-18 23:27:07 +08:00
|
|
|
end
|
|
|
|
rawset(_G,"CCRectMake",CCRectMake)
|
|
|
|
|
|
|
|
local function ccpNeg(pt)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpNeg","CCPoint.__sub")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCPoint.__sub(CCPoint:new_local(0,0),pt)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpNeg",ccpNeg)
|
|
|
|
|
|
|
|
local function ccpAdd(pt1,pt2)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpAdd","CCPoint.__add")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCPoint.__add(pt1,pt2)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpAdd",ccpAdd)
|
|
|
|
|
|
|
|
local function ccpSub(pt1,pt2)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpSub","CCPoint.__sub")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCPoint.__sub(pt1,pt2)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpSub",ccpSub)
|
|
|
|
|
|
|
|
local function ccpMult(pt,factor)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpMult","CCPoint.__mul")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCPoint.__mul(pt,factor)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpMult",ccpMult)
|
|
|
|
|
|
|
|
local function ccpMidpoint(pt1,pt2)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpMidpoint","CCPoint:getMidpoint")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt1:getMidpoint(pt2)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpMidpoint",ccpMidpoint)
|
|
|
|
|
|
|
|
local function ccpDot(pt1,pt2)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpDot","CCPoint:dot")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt1:dot(pt2)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpDot",ccpDot)
|
|
|
|
|
|
|
|
local function ccpCross(pt1,pt2)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpCross","CCPoint:cross")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt1:cross(pt2)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpCross",ccpCross)
|
|
|
|
|
|
|
|
local function ccpPerp(pt)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpPerp","CCPoint:getPerp")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt:getPerp()
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpPerp",ccpPerp)
|
|
|
|
|
|
|
|
local function ccpRPerp(pt)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpRPerp","CCPoint:getRPerp")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt:getRPerp()
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpRPerp",ccpRPerp)
|
|
|
|
|
|
|
|
local function ccpProject(pt1,pt2)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpProject","CCPoint:project")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt1:project(pt2)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpProject",ccpProject)
|
|
|
|
|
|
|
|
local function ccpRotate(pt1,pt2)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpRotate","CCPoint:rotate")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt1:rotate(pt2)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpRotate",ccpRotate)
|
|
|
|
|
|
|
|
local function ccpUnrotate(pt1,pt2)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpUnrotate","CCPoint:unrotate")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt1:unrotate(pt2)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpUnrotate",ccpUnrotate)
|
|
|
|
|
|
|
|
local function ccpLengthSQ(pt)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpLengthSQ","CCPoint:getLengthSq")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt:getLengthSq(pt)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpLengthSQ",ccpLengthSQ)
|
|
|
|
|
|
|
|
local function ccpDistanceSQ(pt1,pt2)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpDistanceSQ","CCPoint:__sub(pt1,pt2):getLengthSq")
|
2013-07-18 23:27:07 +08:00
|
|
|
return (CCPoint.__sub(pt1,pt2)):getLengthSq()
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpDistanceSQ",ccpDistanceSQ)
|
|
|
|
|
|
|
|
local function ccpLength(pt)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpLength","CCPoint:getLength")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt:getLength()
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpLength",ccpLength)
|
|
|
|
|
|
|
|
local function ccpDistance(pt1,pt2)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpDistance","CCPoint:getDistance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt1:getDistance(pt2)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpDistance",ccpDistance)
|
|
|
|
|
|
|
|
local function ccpNormalize(pt)
|
2013-07-26 13:43:28 +08:00
|
|
|
deprecatedTip("ccpNormalize","CCPoint:normalize")
|
|
|
|
return pt:normalize()
|
2013-07-18 23:27:07 +08:00
|
|
|
end
|
|
|
|
rawset(_G,"ccpNormalize",ccpNormalize)
|
|
|
|
|
|
|
|
local function ccpForAngle(angle)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpForAngle","CCPoint:forAngle")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCPoint:forAngle(angle)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpForAngle",ccpForAngle)
|
|
|
|
|
|
|
|
local function ccpToAngle(pt)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpToAngle","CCPoint:getAngle")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt:getAngle()
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpToAngle",ccpToAngle)
|
|
|
|
|
|
|
|
local function ccpClamp(pt1,pt2,pt3)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpClamp","CCPoint:getClampPoint")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt1:getClampPoint(pt2, pt3)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpClamp",ccpClamp)
|
|
|
|
|
|
|
|
|
|
|
|
local function ccpFromSize(sz)
|
2013-07-24 10:15:16 +08:00
|
|
|
deprecatedTip("ccpFromSize(sz)","CCPoint(sz)")
|
|
|
|
return CCPoint(sz)
|
2013-07-18 23:27:07 +08:00
|
|
|
end
|
|
|
|
rawset(_G,"ccpFromSize",ccpFromSize)
|
|
|
|
|
|
|
|
local function ccpLerp(pt1,pt2,alpha)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpLerp","CCPoint:lerp")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt1:lerp(pt2,alpha)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpLerp",ccpLerp)
|
|
|
|
|
|
|
|
local function ccpFuzzyEqual(pt1,pt2,variance)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpFuzzyEqual","CCPoint:fuzzyEquals")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt1:fuzzyEquals(pt2,variance)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpFuzzyEqual",ccpFuzzyEqual)
|
|
|
|
|
|
|
|
local function ccpCompMult(pt1,pt2)
|
2013-07-24 10:15:16 +08:00
|
|
|
deprecatedTip("ccpCompMult","CCPoint")
|
|
|
|
return CCPoint(pt1.x * pt2.x , pt1.y * pt2.y)
|
2013-07-18 23:27:07 +08:00
|
|
|
end
|
|
|
|
rawset(_G,"ccpCompMult",ccpCompMult)
|
|
|
|
|
|
|
|
local function ccpAngleSigned(pt1,pt2)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpAngleSigned","CCPoint:getAngle")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt1:getAngle(pt2)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpAngleSigned",ccpAngleSigned)
|
|
|
|
|
|
|
|
local function ccpAngle(pt1,pt2)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpAngle","CCPoint:getAngle")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt1:getAngle(pt2)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpAngle",ccpAngle)
|
|
|
|
|
|
|
|
local function ccpRotateByAngle(pt1,pt2,angle)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpRotateByAngle","CCPoint:rotateByAngle")
|
2013-07-18 23:27:07 +08:00
|
|
|
return pt1:rotateByAngle(pt2, angle)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpRotateByAngle",ccpRotateByAngle)
|
|
|
|
|
|
|
|
local function ccpSegmentIntersect(pt1,pt2,pt3,pt4)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpSegmentIntersect","CCPoint:isSegmentIntersect")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCPoint:isSegmentIntersect(pt1,pt2,pt3,pt4)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpSegmentIntersect",ccpSegmentIntersect)
|
|
|
|
|
|
|
|
local function ccpIntersectPoint(pt1,pt2,pt3,pt4)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("ccpIntersectPoint","CCPoint:getIntersectPoint")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCPoint:getIntersectPoint(pt1,pt2,pt3,pt4)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccpIntersectPoint",ccpIntersectPoint)
|
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
local function ccc3(r,g,b)
|
|
|
|
deprecatedTip("ccc3(r,g,b)","ccColor3B(r,g,b)")
|
|
|
|
return ccColor3B(r,g,b)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccc3",ccc3)
|
|
|
|
|
|
|
|
local function ccc4(r,g,b,a)
|
|
|
|
deprecatedTip("ccc4(r,g,b,a)","Color4B(r,g,b,a)")
|
|
|
|
return Color4B(r,g,b,a)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccc4",ccc4)
|
|
|
|
|
|
|
|
local function ccc4FFromccc3B(color3B)
|
|
|
|
deprecatedTip("ccc4FFromccc3B(color3B)","Color4F(color3B.r / 255.0,color3B.g / 255.0,color3B.b / 255.0,1.0)")
|
|
|
|
return Color4F(color3B.r/255.0, color3B.g/255.0, color3B.b/255.0, 1.0)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccc4FFromccc3B",ccc4FFromccc3B)
|
|
|
|
|
|
|
|
local function ccc4f(r,g,b,a)
|
|
|
|
deprecatedTip("ccc4f(r,g,b,a)","Color4F(r,g,b,a)")
|
|
|
|
return Color4F(r,g,b,a)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccc4f",ccc4f)
|
|
|
|
|
|
|
|
local function ccc4FFromccc4B(color4B)
|
|
|
|
deprecatedTip("ccc4FFromccc4B(color4B)","Color4F(color4B.r/255.0, color4B.g/255.0, color4B.b/255.0, color4B.a/255.0)")
|
|
|
|
return Color4F(color4B.r/255.0, color4B.g/255.0, color4B.b/255.0, color4B.a/255.0)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccc4FFromccc4B",ccc4FFromccc4B)
|
|
|
|
|
|
|
|
local function ccc4FEqual(a,b)
|
|
|
|
deprecatedTip("ccc4FEqual(a,b)","a:equals(b)")
|
|
|
|
return a:equals(b)
|
|
|
|
end
|
|
|
|
rawset(_G,"ccc4FEqual",ccc4FEqual)
|
|
|
|
|
|
|
|
local function vertex2(x,y)
|
|
|
|
deprecatedTip("vertex2(x,y)","Vertex2F(x,y)")
|
|
|
|
return Vertex2F(x,y)
|
|
|
|
end
|
|
|
|
rawset(_G,"vertex2",vertex2)
|
|
|
|
|
|
|
|
local function vertex3(x,y,z)
|
|
|
|
deprecatedTip("vertex3(x,y,z)","Vertex3F(x,y,z)")
|
|
|
|
return Vertex3F(x,y,z)
|
|
|
|
end
|
|
|
|
rawset(_G,"vertex3",vertex3)
|
|
|
|
|
|
|
|
local function tex2(u,v)
|
|
|
|
deprecatedTip("tex2(u,v)","Tex2F(u,v)")
|
|
|
|
return Tex2F(u,v)
|
|
|
|
end
|
|
|
|
rawset(_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)
|
|
|
|
|
|
|
|
local function ccColor3BDeprecated()
|
|
|
|
deprecatedTip("ccColor3B","Color3B")
|
|
|
|
return Color3B
|
|
|
|
end
|
|
|
|
_G["ccColor3B"] = ccColor3BDeprecated()
|
|
|
|
|
|
|
|
local function ccColor4BDeprecated()
|
|
|
|
deprecatedTip("ccColor4B","Color4B")
|
|
|
|
return Color4B
|
|
|
|
end
|
|
|
|
_G["ccColor4B"] = ccColor4BDeprecated()
|
|
|
|
|
|
|
|
local function ccColor4FDeprecated()
|
|
|
|
deprecatedTip("ccColor4F","Color4F")
|
|
|
|
return Color4F
|
|
|
|
end
|
|
|
|
_G["ccColor4F"] = ccColor4FDeprecated()
|
|
|
|
|
|
|
|
local function ccVertex2FDeprecated()
|
|
|
|
deprecatedTip("ccVertex2F","Vertex2F")
|
|
|
|
return Vertex2F
|
|
|
|
end
|
|
|
|
_G["ccVertex2F"] = ccVertex2FDeprecated()
|
|
|
|
|
|
|
|
local function ccVertex3FDeprecated()
|
|
|
|
deprecatedTip("ccVertex3F","Vertex3F")
|
|
|
|
return Vertex3F
|
|
|
|
end
|
|
|
|
_G["ccVertex3F"] = ccVertex3FDeprecated()
|
|
|
|
|
|
|
|
local function ccTex2FDeprecated()
|
|
|
|
deprecatedTip("ccTex2F","Tex2F")
|
|
|
|
return Tex2F
|
|
|
|
end
|
|
|
|
_G["ccTex2F"] = ccTex2FDeprecated()
|
|
|
|
|
|
|
|
local function ccPointSpriteDeprecated()
|
|
|
|
deprecatedTip("ccPointSprite","PointSprite")
|
|
|
|
return PointSprite
|
|
|
|
end
|
|
|
|
_G["ccPointSprite"] = ccPointSpriteDeprecated()
|
|
|
|
|
|
|
|
local function ccQuad2Deprecated()
|
|
|
|
deprecatedTip("ccQuad2","Quad2")
|
|
|
|
return Quad2
|
|
|
|
end
|
|
|
|
_G["ccQuad2"] = ccQuad2Deprecated()
|
|
|
|
|
|
|
|
local function ccQuad3Deprecated()
|
|
|
|
deprecatedTip("ccQuad3","Quad3")
|
|
|
|
return Quad3
|
|
|
|
end
|
|
|
|
_G["ccQuad3"] = ccQuad3Deprecated()
|
|
|
|
|
|
|
|
local function ccV2FC4BT2FDeprecated()
|
|
|
|
deprecatedTip("ccV2F_C4B_T2F","V2F_C4B_T2F")
|
|
|
|
return V2F_C4B_T2F
|
|
|
|
end
|
|
|
|
_G["ccV2F_C4B_T2F"] = ccV2FC4BT2FDeprecated()
|
|
|
|
|
|
|
|
|
|
|
|
local function ccV2FC4FT2FDeprecated()
|
|
|
|
deprecatedTip("ccV2F_C4F_T2F","V2F_C4F_T2F")
|
|
|
|
return V2F_C4F_T2F
|
|
|
|
end
|
|
|
|
_G["ccV2F_C4F_T2F"] = ccV2FC4FT2FDeprecated()
|
|
|
|
|
|
|
|
local function ccV3FC4BT2FDeprecated()
|
|
|
|
deprecatedTip("ccV3F_C4B_T2F","V3F_C4B_T2F")
|
|
|
|
return V3F_C4B_T2F
|
|
|
|
end
|
|
|
|
_G["ccV3F_C4B_T2F"] = ccV3FC4BT2FDeprecated()
|
|
|
|
|
|
|
|
local function ccV2FC4BT2FQuadDeprecated()
|
|
|
|
deprecatedTip("ccV2F_C4B_T2F_Quad","V2F_C4B_T2F_Quad")
|
|
|
|
return V2F_C4B_T2F_Quad
|
|
|
|
end
|
|
|
|
_G["ccV2F_C4B_T2F_Quad"] = ccV2FC4BT2FQuadDeprecated()
|
|
|
|
|
|
|
|
local function ccV3FC4BT2FQuadDeprecated()
|
|
|
|
deprecatedTip("ccV3F_C4B_T2F_Quad","V3F_C4B_T2F_Quad")
|
|
|
|
return V3F_C4B_T2F_Quad
|
|
|
|
end
|
|
|
|
_G["ccV3F_C4B_T2F_Quad"] = ccV3FC4BT2FQuadDeprecated()
|
|
|
|
|
|
|
|
local function ccV2FC4FT2FQuadDeprecated()
|
|
|
|
deprecatedTip("ccV2F_C4F_T2F_Quad","V2F_C4F_T2F_Quad")
|
|
|
|
return V2F_C4F_T2F_Quad
|
|
|
|
end
|
|
|
|
_G["ccV2F_C4F_T2F_Quad"] = ccV2FC4FT2FQuadDeprecated()
|
|
|
|
|
|
|
|
local function ccBlendFuncDeprecated()
|
|
|
|
deprecatedTip("ccBlendFunc","BlendFunc")
|
|
|
|
return BlendFunc
|
|
|
|
end
|
|
|
|
_G["ccBlendFunc"] = ccBlendFuncDeprecated()
|
|
|
|
|
|
|
|
local function ccT2FQuadDeprecated()
|
|
|
|
deprecatedTip("ccT2F_Quad","T2F_Quad")
|
|
|
|
return T2F_Quad
|
|
|
|
end
|
|
|
|
_G["ccT2F_Quad"] = ccT2FQuadDeprecated()
|
|
|
|
|
|
|
|
local function ccAnimationFrameDataDeprecated()
|
|
|
|
deprecatedTip("ccAnimationFrameData","AnimationFrameData")
|
|
|
|
return AnimationFrameData
|
|
|
|
end
|
|
|
|
_G["ccAnimationFrameData"] = ccAnimationFrameDataDeprecated()
|
|
|
|
|
|
|
|
local function CCCallFuncNDeprecated( )
|
|
|
|
deprecatedTip("CCCallFuncN","CCCallFunc")
|
|
|
|
return CCCallFunc
|
|
|
|
end
|
|
|
|
_G["CCCallFuncN"] = CCCallFuncNDeprecated()
|
|
|
|
--functions of _G will be deprecated end
|
2013-07-26 13:43:28 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
|
|
|
|
--functions of CCControl will be deprecated end
|
|
|
|
local CCControlDeprecated = { }
|
|
|
|
function CCControlDeprecated.addHandleOfControlEvent(self,func,controlEvent)
|
|
|
|
deprecatedTip("addHandleOfControlEvent","registerControlEventHandler")
|
|
|
|
print("come in addHandleOfControlEvent")
|
|
|
|
self:registerControlEventHandler(func,controlEvent)
|
|
|
|
end
|
|
|
|
rawset(CCControl,"addHandleOfControlEvent",CCControlDeprecated.addHandleOfControlEvent)
|
|
|
|
--functions of CCControl will be deprecated end
|
|
|
|
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
--functions of CCEGLView will be deprecated end
|
|
|
|
local CCEGLViewDeprecated = { }
|
|
|
|
function CCEGLViewDeprecated.sharedOpenGLView()
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCEGLView:sharedOpenGLView","CCEGLView:getInstance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCEGLView:getInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCEGLView,"sharedOpenGLView",CCEGLViewDeprecated.sharedOpenGLView)
|
|
|
|
--functions of CCFileUtils will be deprecated end
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
|
|
|
|
--functions of CCFileUtils will be deprecated end
|
|
|
|
local CCFileUtilsDeprecated = { }
|
|
|
|
function CCFileUtilsDeprecated.sharedFileUtils()
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCFileUtils:sharedFileUtils","CCFileUtils:getInstance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCFileUtils:getInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCFileUtils,"sharedFileUtils",CCFileUtilsDeprecated.sharedFileUtils)
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCFileUtilsDeprecated.purgeFileUtils()
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCFileUtils:purgeFileUtils","CCFileUtils:destroyInstance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCFileUtils:destroyInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCFileUtils,"purgeFileUtils",CCFileUtilsDeprecated.purgeFileUtils)
|
|
|
|
--functions of CCFileUtils will be deprecated end
|
|
|
|
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
--functions of CCApplication will be deprecated end
|
|
|
|
local CCApplicationDeprecated = { }
|
|
|
|
function CCApplicationDeprecated.sharedApplication()
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCApplication:sharedApplication","CCApplication:getInstance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCApplication:getInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCApplication,"sharedApplication",CCApplicationDeprecated.sharedApplication)
|
|
|
|
--functions of CCApplication will be deprecated end
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
|
|
|
|
--functions of CCDirector will be deprecated end
|
|
|
|
local CCDirectorDeprecated = { }
|
|
|
|
function CCDirectorDeprecated.sharedDirector()
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCDirector:sharedDirector","CCDirector:getInstance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCDirector:getInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCDirector,"sharedDirector",CCDirectorDeprecated.sharedDirector)
|
|
|
|
--functions of CCDirector will be deprecated end
|
|
|
|
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
--functions of CCUserDefault will be deprecated end
|
|
|
|
local CCUserDefaultDeprecated = { }
|
|
|
|
function CCUserDefaultDeprecated.sharedUserDefault()
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCUserDefault:sharedUserDefault","CCUserDefault:getInstance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCUserDefault:getInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCUserDefault,"sharedUserDefault",CCUserDefaultDeprecated.sharedUserDefault)
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCUserDefaultDeprecated.purgeSharedUserDefault()
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCUserDefault:purgeSharedUserDefault","CCUserDefault:destroyInstance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCUserDefault:destroyInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCUserDefault,"purgeSharedUserDefault",CCUserDefaultDeprecated.purgeSharedUserDefault)
|
|
|
|
--functions of CCUserDefault will be deprecated end
|
2013-07-18 23:27:07 +08:00
|
|
|
|
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
--functions of CCNotificationCenter will be deprecated end
|
|
|
|
local CCNotificationCenterDeprecated = { }
|
|
|
|
function CCNotificationCenterDeprecated.sharedNotificationCenter()
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCNotificationCenter:sharedNotificationCenter","CCNotificationCenter:getInstance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCNotificationCenter:getInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCNotificationCenter,"sharedNotificationCenter",CCNotificationCenterDeprecated.sharedNotificationCenter)
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCNotificationCenterDeprecated.purgeNotificationCenter()
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCNotificationCenter:purgeNotificationCenter","CCNotificationCenter:destroyInstance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCNotificationCenter:destroyInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCNotificationCenter,"purgeNotificationCenter",CCNotificationCenterDeprecated.purgeNotificationCenter)
|
|
|
|
--functions of CCNotificationCenter will be deprecated end
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
|
|
|
|
--functions of CCTextureCache will be deprecated begin
|
|
|
|
local CCTextureCacheDeprecated = { }
|
|
|
|
function CCTextureCacheDeprecated.sharedTextureCache()
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCTextureCache:sharedTextureCache","CCTextureCache:getInstance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCTextureCache:getInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTextureCache,"sharedTextureCache",CCTextureCacheDeprecated.sharedTextureCache)
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCTextureCacheDeprecated.purgeSharedTextureCache()
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCTextureCache:purgeSharedTextureCache","CCTextureCache:destroyInstance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCTextureCache:destroyInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTextureCache,"purgeSharedTextureCache",CCTextureCacheDeprecated.purgeSharedTextureCache)
|
|
|
|
--functions of CCTextureCache will be deprecated end
|
2013-07-18 23:27:07 +08:00
|
|
|
|
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
--functions of CCGrid3DAction will be deprecated begin
|
|
|
|
local CCGrid3DActionDeprecated = { }
|
|
|
|
function CCGrid3DActionDeprecated.vertex(self,pt)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("vertex","CCGrid3DAction:getVertex")
|
2013-07-18 23:27:07 +08:00
|
|
|
return self:getVertex(pt)
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCGrid3DAction,"vertex",CCGrid3DActionDeprecated.vertex)
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCGrid3DActionDeprecated.originalVertex(self,pt)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("originalVertex","CCGrid3DAction:getOriginalVertex")
|
2013-07-18 23:27:07 +08:00
|
|
|
return self:getOriginalVertex(pt)
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCGrid3DAction,"originalVertex",CCGrid3DActionDeprecated.originalVertex)
|
|
|
|
--functions of CCGrid3DAction will be deprecated end
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
|
|
|
|
--functions of CCTiledGrid3DAction will be deprecated begin
|
|
|
|
local CCTiledGrid3DActionDeprecated = { }
|
|
|
|
function CCTiledGrid3DActionDeprecated.tile(self,pt)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("tile","CCTiledGrid3DAction:getTile")
|
2013-07-18 23:27:07 +08:00
|
|
|
return self:getTile(pt)
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTiledGrid3DAction,"tile",CCTiledGrid3DActionDeprecated.tile)
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCTiledGrid3DActionDeprecated.originalTile(self,pt)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("originalTile","CCTiledGrid3DAction:getOriginalTile")
|
2013-07-18 23:27:07 +08:00
|
|
|
return self:getOriginalTile(pt)
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTiledGrid3DAction,"originalTile",CCTiledGrid3DActionDeprecated.originalTile)
|
|
|
|
--functions of CCTiledGrid3DAction will be deprecated end
|
|
|
|
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
--functions of CCAnimationCache will be deprecated begin
|
|
|
|
local CCAnimationCacheDeprecated = { }
|
|
|
|
function CCAnimationCacheDeprecated.sharedAnimationCache()
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCAnimationCache:sharedAnimationCache","CCAnimationCache:getInstance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCAnimationCache:getInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCAnimationCache,"sharedAnimationCache",CCAnimationCacheDeprecated.sharedAnimationCache)
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCAnimationCacheDeprecated.purgeSharedAnimationCache()
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCAnimationCache:purgeSharedAnimationCache","CCAnimationCache:destroyInstance")
|
2013-07-18 23:27:07 +08:00
|
|
|
return CCAnimationCache:destroyInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCAnimationCache,"purgeSharedAnimationCache",CCAnimationCacheDeprecated.purgeSharedAnimationCache)
|
|
|
|
--functions of CCAnimationCache will be deprecated end
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
|
|
|
|
--functions of CCNode will be deprecated begin
|
|
|
|
local CCNodeDeprecated = { }
|
|
|
|
function CCNodeDeprecated.boundingBox(self)
|
2013-07-19 14:57:02 +08:00
|
|
|
deprecatedTip("CCNode:boundingBox","CCNode:getBoundingBox")
|
|
|
|
return self:getBoundingBox()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCNode,"boundingBox",CCNodeDeprecated.boundingBox)
|
2013-07-19 14:57:02 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCNodeDeprecated.numberOfRunningActions(self)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("CCNode:numberOfRunningActions","CCNode:getNumberOfRunningActions")
|
|
|
|
return self:getNumberOfRunningActions()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCNode,"numberOfRunningActions",CCNodeDeprecated.numberOfRunningActions)
|
|
|
|
--functions of CCNode will be deprecated end
|
|
|
|
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
--functions of CCTexture2D will be deprecated begin
|
|
|
|
local CCTexture2DDeprecated = { }
|
|
|
|
function CCTexture2DDeprecated.stringForFormat(self)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("Texture2D:stringForFormat","Texture2D:getStringForFormat")
|
|
|
|
return self:getStringForFormat()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTexture2D,"stringForFormat",CCTexture2DDeprecated.stringForFormat)
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCTexture2DDeprecated.bitsPerPixelForFormat(self)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("Texture2D:bitsPerPixelForFormat","Texture2D:getBitsPerPixelForFormat")
|
|
|
|
return self:getBitsPerPixelForFormat()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTexture2D,"bitsPerPixelForFormat",CCTexture2DDeprecated.bitsPerPixelForFormat)
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCTexture2DDeprecated.bitsPerPixelForFormat(self,pixelFormat)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("Texture2D:bitsPerPixelForFormat","Texture2D:getBitsPerPixelForFormat")
|
|
|
|
return self:getBitsPerPixelForFormat(pixelFormat)
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTexture2D,"bitsPerPixelForFormat",CCTexture2DDeprecated.bitsPerPixelForFormat)
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCTexture2DDeprecated.defaultAlphaPixelFormat(self)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("Texture2D:defaultAlphaPixelFormat","Texture2D:getDefaultAlphaPixelFormat")
|
|
|
|
return self:getDefaultAlphaPixelFormat()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTexture2D,"defaultAlphaPixelFormat",CCTexture2DDeprecated.defaultAlphaPixelFormat)
|
|
|
|
--functions of CCTexture2D will be deprecated end
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
|
|
|
|
--functions of CCSpriteFrameCache will be deprecated begin
|
|
|
|
local CCSpriteFrameCacheDeprecated = { }
|
|
|
|
function CCSpriteFrameCacheDeprecated.spriteFrameByName(self,szName)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("CCSpriteFrameCache:spriteFrameByName","CCSpriteFrameCache:getSpriteFrameByName")
|
|
|
|
return self:getSpriteFrameByName(szName)
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCSpriteFrameCache,"spriteFrameByName",CCSpriteFrameCacheDeprecated.spriteFrameByName)
|
|
|
|
|
|
|
|
function CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache()
|
|
|
|
deprecatedTip("CCSpriteFrameCache:sharedSpriteFrameCache","CCSpriteFrameCache:getInstance")
|
|
|
|
return CCSpriteFrameCache:getInstance()
|
|
|
|
end
|
|
|
|
rawset(CCSpriteFrameCache,"sharedSpriteFrameCache",CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache)
|
|
|
|
|
|
|
|
function CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache()
|
|
|
|
deprecatedTip("CCSpriteFrameCache:purgeSharedSpriteFrameCache","CCSpriteFrameCache:destroyInstance")
|
|
|
|
return CCSpriteFrameCache:destroyInstance()
|
|
|
|
end
|
|
|
|
rawset(CCSpriteFrameCache,"purgeSharedSpriteFrameCache",CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache)
|
|
|
|
--functions of CCSpriteFrameCache will be deprecated end
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
|
|
|
|
--functions of CCTimer will be deprecated begin
|
|
|
|
local CCTimerDeprecated = { }
|
|
|
|
function CCTimerDeprecated.timerWithScriptHandler(handler,seconds)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("CCTimer:timerWithScriptHandler","CCTimer:createWithScriptHandler")
|
|
|
|
return CCTimer:createWithScriptHandler(handler,seconds)
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTimer,"timerWithScriptHandler",CCTimerDeprecated.timerWithScriptHandler)
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCTimerDeprecated.numberOfRunningActionsInTarget(self,target)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("CCActionManager:numberOfRunningActionsInTarget","CCActionManager:getNumberOfRunningActionsInTarget")
|
|
|
|
return self:getNumberOfRunningActionsInTarget(target)
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTimer,"numberOfRunningActionsInTarget",CCTimerDeprecated.numberOfRunningActionsInTarget)
|
|
|
|
--functions of CCTimer will be deprecated end
|
|
|
|
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
--functions of CCMenuItemFont will be deprecated begin
|
|
|
|
local CCMenuItemFontDeprecated = { }
|
|
|
|
function CCMenuItemFontDeprecated.fontSize()
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("CCMenuItemFont:fontSize","CCMenuItemFont:getFontSize")
|
|
|
|
return CCMenuItemFont:getFontSize()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCMenuItemFont,"fontSize",CCMenuItemFontDeprecated.fontSize)
|
2013-07-19 14:57:02 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCMenuItemFontDeprecated.fontName()
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("CCMenuItemFont:fontName","CCMenuItemFont:getFontName")
|
|
|
|
return CCMenuItemFont:getFontName()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCMenuItemFont,"fontName",CCMenuItemFontDeprecated.fontName)
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCMenuItemFontDeprecated.fontSizeObj(self)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("CCMenuItemFont:fontSizeObj","CCMenuItemFont:getFontSizeObj")
|
|
|
|
return self:getFontSizeObj()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCMenuItemFont,"fontSizeObj",CCMenuItemFontDeprecated.fontSizeObj)
|
2013-07-18 23:27:07 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCMenuItemFontDeprecated.fontNameObj(self)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("CCMenuItemFont:fontNameObj","CCMenuItemFont:getFontNameObj")
|
|
|
|
return self:getFontNameObj()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCMenuItemFont,"fontNameObj",CCMenuItemFontDeprecated.fontNameObj)
|
|
|
|
--functions of CCMenuItemFont will be deprecated end
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
|
|
|
|
--functions of CCMenuItemToggle will be deprecated begin
|
|
|
|
local CCMenuItemToggleDeprecated = { }
|
|
|
|
function CCMenuItemToggleDeprecated.selectedItem(self)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("CCMenuItemToggle:selectedItem","CCMenuItemToggle:getSelectedItem")
|
|
|
|
return self:getSelectedItem()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCMenuItemToggle,"selectedItem",CCMenuItemToggleDeprecated.selectedItem)
|
|
|
|
--functions of CCMenuItemToggle will be deprecated end
|
|
|
|
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
--functions of CCTileMapAtlas will be deprecated begin
|
|
|
|
local CCTileMapAtlasDeprecated = { }
|
|
|
|
function CCTileMapAtlasDeprecated.tileAt(self,pos)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("CCTileMapAtlas:tileAt","CCTileMapAtlas:getTileAt")
|
|
|
|
return self:getTileAt(pos)
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTileMapAtlas,"tileAt",CCTileMapAtlasDeprecated.tileAt)
|
|
|
|
--functions of CCTileMapAtlas will be deprecated end
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
|
|
|
|
--functions of CCTMXLayer will be deprecated begin
|
|
|
|
local CCTMXLayerDeprecated = { }
|
|
|
|
function CCTMXLayerDeprecated.tileAt(self,tileCoordinate)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("CCTMXLayer:tileAt","CCTMXLayer:getTileAt")
|
|
|
|
return self:getTileAt(tileCoordinate)
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTMXLayer,"tileAt",CCTMXLayerDeprecated.tileAt)
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCTMXLayerDeprecated.tileGIDAt(self,tileCoordinate)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("CCTMXLayer:tileGIDAt","CCTMXLayer:getTileGIDAt")
|
|
|
|
return self:getTileGIDAt(tileCoordinate)
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTMXLayer,"tileGIDAt",CCTMXLayerDeprecated.tileGIDAt)
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCTMXLayerDeprecated.positionAt(self,tileCoordinate)
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("CCTMXLayer:positionAt","CCTMXLayer:getPositionAt")
|
|
|
|
return self:getPositionAt(tileCoordinate)
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTMXLayer,"positionAt",CCTMXLayerDeprecated.positionAt)
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
function CCTMXLayerDeprecated.propertyNamed(self,propertyName)
|
|
|
|
deprecatedTip("CCTMXLayer:propertyNamed","CCTMXLayer:getProperty")
|
|
|
|
return self:getProperty(propertyName)
|
2013-07-22 13:42:58 +08:00
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(CCTMXLayer,"propertyNamed",CCTMXLayerDeprecated.propertyNamed)
|
|
|
|
--functions of CCTMXLayer will be deprecated end
|
|
|
|
|
2013-07-22 13:42:58 +08:00
|
|
|
|
2013-07-25 19:58:59 +08:00
|
|
|
--functions of SimpleAudioEngine will be deprecated begin
|
|
|
|
local SimpleAudioEngineDeprecated = { }
|
|
|
|
function SimpleAudioEngineDeprecated.sharedEngine()
|
2013-07-22 13:42:58 +08:00
|
|
|
deprecatedTip("SimpleAudioEngine:sharedEngine","SimpleAudioEngine:getInstance")
|
|
|
|
return SimpleAudioEngine:getInstance()
|
|
|
|
end
|
2013-07-25 19:58:59 +08:00
|
|
|
rawset(SimpleAudioEngine,"sharedEngine",SimpleAudioEngineDeprecated.sharedEngine)
|
|
|
|
--functions of SimpleAudioEngine will be deprecated end
|
|
|
|
|
|
|
|
|
|
|
|
--functions of CCTMXTiledMap will be deprecated begin
|
|
|
|
local CCTMXTiledMapDeprecated = { }
|
|
|
|
function CCTMXTiledMapDeprecated.layerNamed(self,layerName)
|
|
|
|
deprecatedTip("CCTMXTiledMap:layerNamed","CCTMXTiledMap:getLayer")
|
|
|
|
return self:getLayer(layerName)
|
|
|
|
end
|
|
|
|
rawset(CCTMXTiledMap,"layerNamed", CCTMXTiledMapDeprecated.layerNamed)
|
|
|
|
|
|
|
|
function CCTMXTiledMapDeprecated.propertyNamed(self,propertyName)
|
|
|
|
deprecatedTip("CCTMXTiledMap:propertyNamed","CCTMXTiledMap:getProperty")
|
|
|
|
return self:getProperty(propertyName)
|
|
|
|
end
|
|
|
|
rawset(CCTMXTiledMap,"propertyNamed", CCTMXTiledMapDeprecated.propertyNamed )
|
|
|
|
|
|
|
|
function CCTMXTiledMapDeprecated.propertiesForGID(self,GID)
|
|
|
|
deprecatedTip("CCTMXTiledMap:propertiesForGID","CCTMXTiledMap:getPropertiesForGID")
|
|
|
|
return self:getPropertiesForGID(GID)
|
|
|
|
end
|
|
|
|
rawset(CCTMXTiledMap,"propertiesForGID", CCTMXTiledMapDeprecated.propertiesForGID)
|
|
|
|
|
|
|
|
function CCTMXTiledMapDeprecated.objectGroupNamed(self,groupName)
|
|
|
|
deprecatedTip("CCTMXTiledMap:objectGroupNamed","CCTMXTiledMap:getObjectGroup")
|
|
|
|
return self:getObjectGroup(groupName)
|
|
|
|
end
|
|
|
|
rawset(CCTMXTiledMap,"objectGroupNamed", CCTMXTiledMapDeprecated.objectGroupNamed)
|
|
|
|
--functions of CCTMXTiledMap will be deprecated end
|
|
|
|
|
|
|
|
|
|
|
|
--functions of CCTMXMapInfo will be deprecated begin
|
|
|
|
local CCTMXMapInfoDeprecated = { }
|
|
|
|
function CCTMXMapInfoDeprecated.getStoringCharacters(self)
|
|
|
|
deprecatedTip("CCTMXMapInfo:getStoringCharacters","CCTMXMapInfo:isStoringCharacters")
|
|
|
|
return self:isStoringCharacters()
|
|
|
|
end
|
|
|
|
rawset(CCTMXMapInfo,"getStoringCharacters", CCTMXMapInfoDeprecated.getStoringCharacters)
|
|
|
|
|
|
|
|
function CCTMXMapInfoDeprecated.formatWithTMXFile(infoTable,tmxFile)
|
|
|
|
deprecatedTip("CCTMXMapInfo:formatWithTMXFile","CCTMXMapInfo:create")
|
|
|
|
return CCTMXMapInfo:create(tmxFile)
|
|
|
|
end
|
|
|
|
rawset(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)
|
|
|
|
--functions of CCTMXMapInfo will be deprecated end
|
|
|
|
|
|
|
|
|
|
|
|
--functions of CCTMXObject will be deprecated begin
|
|
|
|
local CCTMXObjectGroupDeprecated = { }
|
|
|
|
function CCTMXObjectGroupDeprecated.propertyNamed(self,propertyName)
|
|
|
|
deprecatedTip("CCTMXObjectGroup:propertyNamed","CCTMXObjectGroup:getProperty")
|
|
|
|
return self:getProperty(propertyName)
|
|
|
|
end
|
|
|
|
rawset(CCTMXObjectGroup,"propertyNamed", CCTMXObjectGroupDeprecated.propertyNamed)
|
|
|
|
|
|
|
|
function CCTMXObjectGroupDeprecated.objectNamed(self, objectName)
|
2013-07-26 13:43:28 +08:00
|
|
|
deprecatedTip("CCTMXObjectGroup:objectNamed","CCTMXObjectGroup:getObject")
|
|
|
|
return self:getObject(objectName)
|
2013-07-25 19:58:59 +08:00
|
|
|
end
|
|
|
|
rawset(CCTMXObjectGroup,"objectNamed", CCTMXObjectGroupDeprecated.objectNamed)
|
|
|
|
--functions of CCTMXObject will be deprecated end
|
|
|
|
|
2013-07-26 22:50:45 +08:00
|
|
|
|
|
|
|
--functions of WebSocket will be deprecated begin
|
|
|
|
local WebSocketDeprecated = { }
|
|
|
|
function WebSocketDeprecated.sendTextMsg(self, string)
|
|
|
|
deprecatedTip("WebSocket:sendTextMsg","WebSocket:sendString")
|
|
|
|
return self:sendString(string)
|
|
|
|
end
|
|
|
|
rawset(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)
|
|
|
|
--functions of WebSocket will be deprecated end
|
|
|
|
|