Merge pull request #8788 from samuele3hu/v3_new_spine

Update the deprecated Func and update bindings-generator
This commit is contained in:
minggo 2014-10-17 16:35:51 +08:00
commit d241e568b0
14 changed files with 201 additions and 200 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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);

View File

@ -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()

@ -1 +1 @@
Subproject commit a8496d540c174236bec0d5a33457340571699f19
Subproject commit 87efa95573ab18f1fd60a62c7a70744901d92142

View File

@ -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],