issue #3309:Modify some deprecated cpp files and lua files

This commit is contained in:
samuele3 2013-12-04 15:15:55 +08:00
parent 367799da0d
commit c1a226686f
7 changed files with 2326 additions and 24 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
e70a68a07977b12b3f233641ac8d558e48c5517c

View File

@ -112,3 +112,10 @@ function CCBReaderLoad(strFilePath,proxy,owner)
return node
end
local function CCBuilderReaderLoad(strFilePath,proxy,owner)
print("\n********** \n".."CCBuilderReaderLoad(strFilePath,proxy,owner)".." was deprecated please use ".. "CCBReaderLoad(strFilePath,proxy,owner)" .. " instead.\n**********")
return CCBReaderLoad(strFilePath,proxy,owner)
end
rawset(_G,"CCBuilderReaderLoad",CCBuilderReaderLoad)

View File

@ -725,24 +725,6 @@ local function tex2(u,v)
end
rawset(_G,"tex2",tex2)
local function CCPoint( x, y)
deprecatedTip("CCPoint(x,y)","cc.p(x,y)")
return cc.p(x,y)
end
rawset(_G,"CCPoint",CCPoint)
local function CCSize( width, height)
deprecatedTip("CCSize(width,height)","cc.size(width,height)")
return cc.size(width,height)
end
rawset(_G,"CCSize",CCSize)
local function CCRect( x,y, width, height)
deprecatedTip("CCRect(x,y,width,height)","cc.rect(x,y,width,height)")
return cc.rect(x,y,width,height)
end
rawset(_G,"CCRect",CCRect)
--functions of CCControl will be deprecated end
local CCControlDeprecated = { }
function CCControlDeprecated.addHandleOfControlEvent(self,func,controlEvent)
@ -1160,4 +1142,26 @@ end
rawset(ActionManager,"purgeActionManager",ActionManagerDeprecated.purgeActionManager)
--functions of ActionManager will be deprecated end
--functions of CCEGLView will be deprecated begin
local CCEGLViewDeprecated = { }
function CCEGLViewDeprecated.sharedOpenGLView()
deprecatedTip("CCEGLView:sharedOpenGLView","cc.EGLView:getInstance")
return cc.EGLView:getInstance()
end
rawset(CCEGLView,"sharedOpenGLView",CCEGLViewDeprecated.sharedOpenGLView)
--functions of CCEGLView 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)
--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)
--Enums of CCScrollView will be deprecated end

View File

@ -2110,3 +2110,29 @@ function DeprecatedClass.ActionObject()
end
_G["ActionObject"] = DeprecatedClass.ActionObject()
--ActionObject class will be Deprecated,end
--CCEGLViewProtocol class will be Deprecated,begin
function DeprecatedClass.CCEGLViewProtocol()
deprecatedTip("CCEGLViewProtocol","cc.EGLViewProtocol")
return cc.EGLViewProtocol
end
_G["CCEGLViewProtocol"] = DeprecatedClass.CCEGLViewProtocol()
--CCEGLViewProtocol class will be Deprecated,end
--CCEGLView class will be Deprecated,begin
function DeprecatedClass.CCEGLView()
deprecatedTip("CCEGLView","cc.EGLView")
return cc.EGLView
end
_G["CCEGLView"] = DeprecatedClass.CCEGLView()
--CCEGLView class will be Deprecated,end
--CCBProxy class will be Deprecated,begin
function DeprecatedClass.CCBProxy()
deprecatedTip("CCBProxy","cc.CCBProxy")
return cc.CCBProxy
end
_G["CCBProxy"] = DeprecatedClass.CCBProxy()
--CCBProxy class will be Deprecated,end

View File

@ -1,5 +1,6 @@
require "Cocos2dConstants.lua"
require "OpenglConstants.lua"
require "StudioConstants.lua"
--Enums will be deprecated,begin
_G.kCCTextAlignmentLeft = cc.TEXT_ALIGNMENT_LEFT
_G.kCCTextAlignmentRight = cc.TEXT_ALIGNMENT_RIGHT
@ -479,3 +480,7 @@ _G.LAYOUT_PARAMETER_NONE = ccs.UILayoutParameterType.none
_G.LAYOUT_PARAMETER_LINEAR = ccs.UILayoutParameterType.linear
_G.LAYOUT_PARAMETER_RELATIVE = ccs.UILayoutParameterType.relative
_G.kCCScrollViewDirectionHorizontal = cc.SCROLLVIEW_DIRECTION_HORIZONTAL
_G.kCCScrollViewDirectionVertical = cc.SCROLLVIEW_DIRECTION_VERTICAL
_G.kCCTableViewFillTopDown = cc.TABLEVIEW_FILL_TOPDOWN
_G.kCCTableViewFillBottomUp = cc.TABLEVIEW_FILL_BOTTOMUP

View File

@ -26,7 +26,7 @@ headers = %(cocosdir)s/cocos/2d/cocos2d.h %(cocosdir)s/cocos/audio/include/Simpl
# what classes to produce code for. You can use regular expressions here. When testing the regular
# expression, it will be enclosed in "^$", like this: "^Menu*$".
classes = Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set Data SimpleAudioEngine Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode MotionStreak ^Object$ UserDefault Image
classes = Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set Data SimpleAudioEngine Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode MotionStreak ^Object$ UserDefault EGLViewProtocol EGLView Image
# what should we skip? in the format ClassName::[function function]
# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also
@ -50,7 +50,8 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS
MenuItem.*::[create setCallback initWithCallback],
Label::[getLettersInfo],
Copying::[*],
.*Protocol::[*],
LabelProtocol::[*],
LabelTextFormatProtocol::[*],
.*Delegate::[*],
PoolManager::[*],
Texture2D::[initWithPVRTCData addPVRTCImage releaseData setTexParameters initWithData keepData],
@ -68,7 +69,6 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS
ScriptEngineManager::[*],
KeypadHandler::[*],
Invocation::[*],
EGLView::[*],
SchedulerScriptHandlerEntry::[*],
Size::[*],
Point::[*],
@ -105,7 +105,9 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS
ccFontDefinition::[*],
Object::[autorelease isEqual acceptVisitor update],
UserDefault::[getInstance (s|g)etDataForKey],
Label::[getLettersInfo]
Label::[getLettersInfo],
EGLViewProtocol::[setTouchDelegate],
EGLView::[end swapBuffers]
rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame],
ProgressTimer::[setReverseProgress=setReverseDirection],
@ -136,7 +138,7 @@ base_classes_to_skip = Clonable
# classes that create no constructor
# Set is special and we will use a hand-written constructor
abstract_classes = Action FiniteTimeAction ActionInterval ActionEase EaseRateAction EaseElastic EaseBounce ActionInstant GridAction Grid3DAction TiledGrid3DAction Director SpriteFrameCache TransitionEaseScene Set SimpleAudioEngine FileUtils Application ClippingNode Label
abstract_classes = Action FiniteTimeAction ActionInterval ActionEase EaseRateAction EaseElastic EaseBounce ActionInstant GridAction Grid3DAction TiledGrid3DAction Director SpriteFrameCache TransitionEaseScene Set SimpleAudioEngine FileUtils Application ClippingNode Label EGLViewProtocol EGLView
# Determining whether to use script object(js object) to control the lifecycle of native(cpp) object or the other way around. Supported values are 'yes' or 'no'.
script_control_cpp = no