Merge remote-tracking branch 'upstream/develop' into develop

This commit is contained in:
bmanGH 2013-10-24 17:10:12 +08:00
commit b7dcf51af3
213 changed files with 7897 additions and 4429 deletions

2
.gitmodules vendored
View File

@ -3,7 +3,7 @@
url = git://github.com/cocos2d/bindings-generator.git url = git://github.com/cocos2d/bindings-generator.git
[submodule "cocos/scripting/auto-generated"] [submodule "cocos/scripting/auto-generated"]
path = cocos/scripting/auto-generated path = cocos/scripting/auto-generated
url = git://github.com/folecr/cocos2dx-autogen-bindings.git url = git://github.com/cocos2d-x/bindings-auto-generated.git
[submodule "samples/Javascript/Shared"] [submodule "samples/Javascript/Shared"]
path = samples/Javascript/Shared path = samples/Javascript/Shared
url = git://github.com/cocos2d/cocos2d-js-tests.git url = git://github.com/cocos2d/cocos2d-js-tests.git

11
AUTHORS
View File

@ -618,8 +618,15 @@ Developers:
Fixed a bug that cc.Scheduler.schedule(target, func) without repeat argument couldn't repeat schedule forever on device. Fixed a bug that cc.Scheduler.schedule(target, func) without repeat argument couldn't repeat schedule forever on device.
XiaoLongHan (kpkhxlgy0) XiaoLongHan (kpkhxlgy0)
Fixed a bug that outside of keyboard can't be responded to close keyboard when using EditBox。 Fixed a bug that outside of keyboard can't be responded to close keyboard when using EditBox.
lettas
A fix for multi-platform template.
HoGarfield (garfield_ho)
Fixed a bug that CCBReader can't play sequence automatically in JSB.
Could not set next animation in CCBAnimationCompleted callback.
Retired Core Developers: Retired Core Developers:
WenSheng Yang WenSheng Yang
Author of windows port, CCTextField, Author of windows port, CCTextField,

View File

@ -6,6 +6,8 @@ cocos2d-x-3.0alpha1 @??? 2013
[FIX] fixed a memory leak in XMLHTTPRequest.cpp [FIX] fixed a memory leak in XMLHTTPRequest.cpp
[FIX] removeSpriteFramesFromFile() crashes if file doesn't exist. [FIX] removeSpriteFramesFromFile() crashes if file doesn't exist.
[FIX] Avoid unnecessary object duplication for Scale9Sprite. [FIX] Avoid unnecessary object duplication for Scale9Sprite.
[FIX] create_project.py does not rename/replace template projects completely.
[FIX] Could not set next animation in CCBAnimationCompleted callback.
[Android] [Android]
[FIX] Added EGL_RENDERABLE_TYPE to OpenGL attributes [FIX] Added EGL_RENDERABLE_TYPE to OpenGL attributes
[NEW] Added Cocos2dxHelper.runOnGLThread(Runnable) again [NEW] Added Cocos2dxHelper.runOnGLThread(Runnable) again
@ -18,6 +20,7 @@ cocos2d-x-3.0alpha1 @??? 2013
[FIX] Fixed a memory leak in ScriptingCore::runScript() [FIX] Fixed a memory leak in ScriptingCore::runScript()
[FIX] sys.localStorage.getItem() does not support non-ascii string. [FIX] sys.localStorage.getItem() does not support non-ascii string.
[FIX] cc.Scheduler.schedule(target, func) without repeat argument couldn't repeat schedule forever on device. [FIX] cc.Scheduler.schedule(target, func) without repeat argument couldn't repeat schedule forever on device.
[FIX] CCBReader can't play sequence automatically in JSB.
[Lua Binding] [Lua Binding]
[NEW] Added Armature lua binding and added test samples. [NEW] Added Armature lua binding and added test samples.

View File

@ -3,68 +3,89 @@ PLATFORM ?= linux
all: all:
chipmunk: chipmunk:
$(MAKE) -C external/chipmunk/proj.$(PLATFORM) $(MAKE) -C ../external/chipmunk/proj.$(PLATFORM)
chipmunk-clean: chipmunk-clean:
$(MAKE) -C external/chipmunk/proj.$(PLATFORM) clean $(MAKE) -C ../external/chipmunk/proj.$(PLATFORM) clean
box2d: box2d:
$(MAKE) -C external/Box2D/proj.$(PLATFORM) $(MAKE) -C ../external/Box2D/proj.$(PLATFORM)
box2d-clean: box2d-clean:
$(MAKE) -C external/Box2D/proj.$(PLATFORM) clean $(MAKE) -C ../external/Box2D/proj.$(PLATFORM) clean
libextensions: chipmunk cocosdenshion box2d cocos2dx: chipmunk
$(MAKE) -C extensions/proj.$(PLATFORM) $(MAKE) -C ../cocos/2d
libextensions-clean: cocos2dx-clean:
$(MAKE) -C extensions/proj.$(PLATFORM) clean $(MAKE) -C ../cocos/2d clean
libcocos2dx: libextensions audio: cocos2dx
$(MAKE) -C cocos2dx/proj.$(PLATFORM) $(MAKE) -C ../cocos/audio/proj.$(PLATFORM)
libcocos2dx-clean: audio-clean:
$(MAKE) -C cocos2dx/proj.$(PLATFORM) clean $(MAKE) -C ../cocos/audio/proj.$(PLATFORM) clean
cocosdenshion: libcocos2dx gui:
$(MAKE) -C audio/proj.$(PLATFORM) $(MAKE) -C ../cocos/gui
cocosdenshion-clean: gui-clean:
$(MAKE) -C audio/proj.$(PLATFORM) clean $(MAKE) -C ../cocos/gui clean
lua: libextensions network: cocos2dx
$(MAKE) -C scripting/lua/proj.$(PLATFORM) $(MAKE) -C ../cocos/network
network-clean:
$(MAKE) -C ../cocos/network clean
cocosbuilder:
$(MAKE) -C ../cocos/editor-support/cocosbuilder
cocosbuilder-clean:
$(MAKE) -C ../cocos/editor-support/cocosbuilder clean
spine:
$(MAKE) -C ../cocos/editor-support/spine
spine-clean:
$(MAKE) -C ../cocos/editor-support/spine clean
cocostudio:
$(MAKE) -C ../cocos/editor-support/cocostudio
cocostudio-clean:
$(MAKE) -C ../cocos/editor-support/cocostudio clean
extensions: chipmunk audio box2d
$(MAKE) -C ../extensions/proj.$(PLATFORM)
extensions-clean:
$(MAKE) -C ../extensions/proj.$(PLATFORM) clean
lua: extensions cocosbuilder cocostudio
$(MAKE) -C ../cocos/scripting/lua/bindings
lua-clean: lua-clean:
$(MAKE) -C scripting/lua/proj.$(PLATFORM) clean $(MAKE) -C ../cocos/scripting/lua/bindings clean
hellocpp: libcocos2dx hellocpp: cocos2dx
$(MAKE) -C samples/Cpp/HelloCpp/proj.$(PLATFORM) $(MAKE) -C ../samples/Cpp/HelloCpp/proj.$(PLATFORM)
hellocpp-clean: hellocpp-clean:
$(MAKE) -C samples/Cpp/HelloCpp/proj.$(PLATFORM) clean $(MAKE) -C ../samples/Cpp/HelloCpp/proj.$(PLATFORM) clean
testcpp: libcocos2dx libextensions testcpp: cocos2dx audio extensions cocostudio gui cocosbuilder spine network
$(MAKE) -C samples/Cpp/TestCpp/proj.$(PLATFORM) $(MAKE) -C ../samples/Cpp/TestCpp/proj.$(PLATFORM)
testcpp-clean: testcpp-clean:
$(MAKE) -C samples/Cpp/TestCpp/proj.$(PLATFORM) clean $(MAKE) -C ../samples/Cpp/TestCpp/proj.$(PLATFORM) clean
simplegame: libcocos2dx simplegame: cocos2dx audio
$(MAKE) -C samples/Cpp/SimpleGame/proj.$(PLATFORM) $(MAKE) -C ../samples/Cpp/SimpleGame/proj.$(PLATFORM)
simplegame-clean: simplegame-clean:
$(MAKE) -C samples/Cpp/SimpleGame/proj.$(PLATFORM) clean $(MAKE) -C ../samples/Cpp/SimpleGame/proj.$(PLATFORM) clean
all: chipmunk cocosdenshion libextensions libcocos2dx lua hellocpp testcpp simplegame all: chipmunk audio extensions cocos2dx lua hellocpp testcpp simplegame
clean: libcocos2dx-clean box2d-clean chipmunk-clean cocosdenshion-clean libextensions-clean lua-clean hellocpp-clean testcpp-clean simplegame-clean clean: cocos2dx-clean box2d-clean chipmunk-clean audio-clean extensions-clean lua-clean hellocpp-clean testcpp-clean simplegame-clean
# Haven't yet got the lua projects working with emscripten hellolua: cocos2dx lua
ifneq ($(PLATFORM),emscripten) $(MAKE) -C ../samples/Lua/HelloLua/proj.$(PLATFORM)
hellolua: libcocos2dx lua
$(MAKE) -C samples/Lua/HelloLua/proj.$(PLATFORM)
hellolua-clean: hellolua-clean:
$(MAKE) -C samples/Lua/HelloLua/proj.$(PLATFORM) clean $(MAKE) -C ../samples/Lua/HelloLua/proj.$(PLATFORM) clean
testlua: libcocos2dx lua testlua: cocos2dx lua
$(MAKE) -C samples/Lua/TestLua/proj.$(PLATFORM) $(MAKE) -C ../samples/Lua/TestLua/proj.$(PLATFORM)
testlua-clean: testlua-clean:
$(MAKE) -C samples/Lua/TestLua/proj.$(PLATFORM) clean $(MAKE) -C ../samples/Lua/TestLua/proj.$(PLATFORM) clean
all: hellolua testlua all: hellolua testlua
clean: hellolua-clean testlua-clean clean: hellolua-clean testlua-clean
endif
.PHONY: all clean .PHONY: all clean

View File

@ -1,98 +1,67 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012 # Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBox2D", "external\Box2D\proj.win32\Box2D.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "audio", "audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp", "..\samples\Cpp\HelloCpp\proj.win32\HelloCpp.vcxproj", "{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}"
ProjectSection(ProjectDependencies) = postProject
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "cocos2dx\proj.win32\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBox2D", "..\external\Box2D\proj.win32\Box2D.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "scripting\lua\proj.win32\liblua.vcxproj", "{DDC3E27F-004D-4DD4-9DD3-931A013D2159}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}"
ProjectSection(ProjectDependencies) = postProject
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28}
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}
EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}"
ProjectSection(ProjectDependencies) = postProject
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}
EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp", "samples\Cpp\HelloCpp\proj.win32\HelloCpp.vcxproj", "{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCpp", "..\samples\Cpp\TestCpp\proj.win32\TestCpp.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCpp", "samples\Cpp\TestCpp\proj.win32\TestCpp.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\cocos\editor-support\cocosbuilder\proj.win32\libCocosBuilder.vcxproj", "{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CocosDragonJS", "samples\Javascript\CocosDragonJS\proj.win32\CocosDragonJS.vcxproj", "{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj", "{B57CF53F-2E49-4031-9822-047CC0E6BDE2}"
ProjectSection(ProjectDependencies) = postProject
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28}
{39379840-825A-45A0-B363-C09FFEF864BD} = {39379840-825A-45A0-B363-C09FFEF864BD}
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
{929480E7-23C0-4DF6-8456-096D71547116} = {929480E7-23C0-4DF6-8456-096D71547116}
EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MoonWarriors", "samples\Javascript\MoonWarriors\proj.win32\MoonWarriors.vcxproj", "{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\cocos\gui\proj.win32\libGUI.vcxproj", "{7E06E92C-537A-442B-9E4A-4761C84F8A1A}"
ProjectSection(ProjectDependencies) = postProject
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28}
{39379840-825A-45A0-B363-C09FFEF864BD} = {39379840-825A-45A0-B363-C09FFEF864BD}
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
{929480E7-23C0-4DF6-8456-096D71547116} = {929480E7-23C0-4DF6-8456-096D71547116}
EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestJavascript", "samples\Javascript\TestJavascript\proj.win32\TestJavascript.vcxproj", "{D0F06A44-A245-4D13-A498-0120C203B539}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libNetwork", "..\cocos\network\proj.win32\libNetwork.vcxproj", "{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}"
ProjectSection(ProjectDependencies) = postProject
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28}
{39379840-825A-45A0-B363-C09FFEF864BD} = {39379840-825A-45A0-B363-C09FFEF864BD}
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
{929480E7-23C0-4DF6-8456-096D71547116} = {929480E7-23C0-4DF6-8456-096D71547116}
EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WatermelonWithMe", "samples\Javascript\WatermelonWithMe\proj.win32\WatermelonWithMe.vcxproj", "{BE092D9E-95AE-4F86-84CE-F4519E4F3F15}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}"
ProjectSection(ProjectDependencies) = postProject
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28}
{39379840-825A-45A0-B363-C09FFEF864BD} = {39379840-825A-45A0-B363-C09FFEF864BD}
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
{929480E7-23C0-4DF6-8456-096D71547116} = {929480E7-23C0-4DF6-8456-096D71547116}
EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloLua", "samples\Lua\HelloLua\proj.win32\HelloLua.vcxproj", "{13E55395-94A2-4CD9-BFC2-1A051F80C17D}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AssetsManagerTest", "..\samples\Cpp\AssetsManagerTest\proj.win32\AssetsManagerTest.vcxproj", "{6D37505F-A890-441D-BD3F-A61E2C0469CE}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLua", "samples\Lua\TestLua\proj.win32\TestLua.win32.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBinding", "..\cocos\scripting\javascript\bindings\proj.win32\libJSBinding.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}"
ProjectSection(ProjectDependencies) = postProject
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28}
{DDC3E27F-004D-4DD4-9DD3-931A013D2159} = {DDC3E27F-004D-4DD4-9DD3-931A013D2159}
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
{929480E7-23C0-4DF6-8456-096D71547116} = {929480E7-23C0-4DF6-8456-096D71547116}
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}
EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBinding", "scripting\javascript\bindings\proj.win32\libJSBinding.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestJavascript", "..\samples\Javascript\TestJavascript\proj.win32\TestJavascript.vcxproj", "{D0F06A44-A245-4D13-A498-0120C203B539}"
ProjectSection(ProjectDependencies) = postProject
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28}
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}
EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrystalCraze", "samples\Javascript\CrystalCraze\proj.win32\CrystalCraze.vcxproj", "{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libLocalStorage", "..\cocos\storage\local-storage\proj.win32\libLocalStorage.vcxproj", "{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}"
ProjectSection(ProjectDependencies) = postProject
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28}
{39379840-825A-45A0-B363-C09FFEF864BD} = {39379840-825A-45A0-B363-C09FFEF864BD}
EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AssetsManagerTest", "samples\Cpp\AssetsManagerTest\proj.win32\AssetsManagerTest.vcxproj", "{6D37505F-A890-441D-BD3F-A61E2C0469CE}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CocosDragonJS", "..\samples\Javascript\CocosDragonJS\proj.win32\CocosDragonJS.vcxproj", "{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}"
ProjectSection(ProjectDependencies) = postProject EndProject
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28} Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrystalCraze", "..\samples\Javascript\CrystalCraze\proj.win32\CrystalCraze.vcxproj", "{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}"
{39379840-825A-45A0-B363-C09FFEF864BD} = {39379840-825A-45A0-B363-C09FFEF864BD} EndProject
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MoonWarriors", "..\samples\Javascript\MoonWarriors\proj.win32\MoonWarriors.vcxproj", "{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}"
EndProjectSection EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WatermelonWithMe", "..\samples\Javascript\WatermelonWithMe\proj.win32\WatermelonWithMe.vcxproj", "{BE092D9E-95AE-4F86-84CE-F4519E4F3F15}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "..\cocos\scripting\lua\bindings\liblua.vcxproj", "{DDC3E27F-004D-4DD4-9DD3-931A013D2159}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloLua", "..\samples\Lua\HelloLua\proj.win32\HelloLua.vcxproj", "{13E55395-94A2-4CD9-BFC2-1A051F80C17D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLua", "..\samples\Lua\TestLua\proj.win32\TestLua.win32.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleGame", "..\samples\Cpp\SimpleGame\proj.win32\SimpleGame.vcxproj", "{E0E282F4-8487-452C-BFAB-CB960EB4D22F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForBuilder", "..\cocos\scripting\javascript\bindings\cocosbuilder\libJSBindingForBuilder.vcxproj", "{F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForStudio", "..\cocos\scripting\javascript\bindings\cocostudio\libJSBindingForStudio.vcxproj", "{79D34511-E54E-410A-8BBA-EF175AD6C695}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForNetwork", "..\cocos\scripting\javascript\bindings\network\libJSBindingForNetwork.vcxproj", "{3BEC13F5-E227-4D80-BC77-1C857F83BCFC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForExtension", "..\cocos\scripting\javascript\bindings\extension\libJSBindingForExtension.vcxproj", "{625F7391-9A91-48A1-8CFC-79508C822637}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libJSBinding", "libJSBinding", "{10F98A57-B9A1-47DA-9FBA-12D328E72ED1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForChipmunk", "..\cocos\scripting\javascript\bindings\chipmunk\libJSBindingForChipmunk.vcxproj", "{21070E58-EEC6-4E16-8B4F-6D083DF55790}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForLocalStorage", "..\cocos\scripting\javascript\bindings\localstorage\libJSBindingForLocalStorage.vcxproj", "{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -100,14 +69,6 @@ Global
Release|Win32 = Release|Win32 Release|Win32 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.ActiveCfg = Debug|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.Build.0 = Debug|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.ActiveCfg = Release|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.Build.0 = Release|Win32
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.ActiveCfg = Debug|Win32 {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.ActiveCfg = Debug|Win32
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.Build.0 = Debug|Win32 {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.Build.0 = Debug|Win32
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.ActiveCfg = Release|Win32 {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.ActiveCfg = Release|Win32
@ -116,38 +77,82 @@ Global
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32 {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32 {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32 {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.ActiveCfg = Debug|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.Build.0 = Debug|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Release|Win32.ActiveCfg = Release|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Release|Win32.Build.0 = Release|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.ActiveCfg = Debug|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.Build.0 = Debug|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.ActiveCfg = Release|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.Build.0 = Release|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.ActiveCfg = Debug|Win32 {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.ActiveCfg = Debug|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.Build.0 = Debug|Win32 {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.Build.0 = Debug|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.ActiveCfg = Release|Win32 {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.ActiveCfg = Release|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.Build.0 = Release|Win32 {B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.Build.0 = Release|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.ActiveCfg = Debug|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.Build.0 = Debug|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.ActiveCfg = Release|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.Build.0 = Release|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.ActiveCfg = Debug|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.Build.0 = Debug|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.ActiveCfg = Release|Win32
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.Build.0 = Release|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32 {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.Build.0 = Debug|Win32 {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.Build.0 = Debug|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.ActiveCfg = Release|Win32 {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.ActiveCfg = Release|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.Build.0 = Release|Win32 {76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.Build.0 = Release|Win32
{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Debug|Win32.ActiveCfg = Debug|Win32 {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.ActiveCfg = Debug|Win32
{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Debug|Win32.Build.0 = Debug|Win32 {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.Build.0 = Debug|Win32
{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Release|Win32.ActiveCfg = Release|Win32 {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.ActiveCfg = Release|Win32
{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Release|Win32.Build.0 = Release|Win32 {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.Build.0 = Release|Win32
{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Debug|Win32.ActiveCfg = Debug|Win32 {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Debug|Win32.ActiveCfg = Debug|Win32
{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Debug|Win32.Build.0 = Debug|Win32 {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Debug|Win32.Build.0 = Debug|Win32
{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Release|Win32.ActiveCfg = Release|Win32 {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Release|Win32.ActiveCfg = Release|Win32
{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Release|Win32.Build.0 = Release|Win32 {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Release|Win32.Build.0 = Release|Win32
{7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Debug|Win32.ActiveCfg = Debug|Win32
{7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Debug|Win32.Build.0 = Debug|Win32
{7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.ActiveCfg = Release|Win32
{7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.Build.0 = Release|Win32
{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Debug|Win32.ActiveCfg = Debug|Win32
{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Debug|Win32.Build.0 = Debug|Win32
{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Release|Win32.ActiveCfg = Release|Win32
{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Release|Win32.Build.0 = Release|Win32
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.Build.0 = Release|Win32
{6D37505F-A890-441D-BD3F-A61E2C0469CE}.Debug|Win32.ActiveCfg = Debug|Win32
{6D37505F-A890-441D-BD3F-A61E2C0469CE}.Debug|Win32.Build.0 = Debug|Win32
{6D37505F-A890-441D-BD3F-A61E2C0469CE}.Release|Win32.ActiveCfg = Release|Win32
{6D37505F-A890-441D-BD3F-A61E2C0469CE}.Release|Win32.Build.0 = Release|Win32
{39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.ActiveCfg = Debug|Win32
{39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.Build.0 = Debug|Win32
{39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.ActiveCfg = Release|Win32
{39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.Build.0 = Release|Win32
{D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.ActiveCfg = Debug|Win32 {D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.ActiveCfg = Debug|Win32
{D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.Build.0 = Debug|Win32 {D0F06A44-A245-4D13-A498-0120C203B539}.Debug|Win32.Build.0 = Debug|Win32
{D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.ActiveCfg = Release|Win32 {D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.ActiveCfg = Release|Win32
{D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.Build.0 = Release|Win32 {D0F06A44-A245-4D13-A498-0120C203B539}.Release|Win32.Build.0 = Release|Win32
{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Debug|Win32.ActiveCfg = Debug|Win32
{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Debug|Win32.Build.0 = Debug|Win32
{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Release|Win32.ActiveCfg = Release|Win32
{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Release|Win32.Build.0 = Release|Win32
{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Debug|Win32.ActiveCfg = Debug|Win32
{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Debug|Win32.Build.0 = Debug|Win32
{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Release|Win32.ActiveCfg = Release|Win32
{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7}.Release|Win32.Build.0 = Release|Win32
{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}.Debug|Win32.ActiveCfg = Debug|Win32
{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}.Debug|Win32.Build.0 = Debug|Win32
{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}.Release|Win32.ActiveCfg = Release|Win32
{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}.Release|Win32.Build.0 = Release|Win32
{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Debug|Win32.ActiveCfg = Debug|Win32
{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Debug|Win32.Build.0 = Debug|Win32
{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Release|Win32.ActiveCfg = Release|Win32
{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2}.Release|Win32.Build.0 = Release|Win32
{BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Debug|Win32.ActiveCfg = Debug|Win32 {BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Debug|Win32.ActiveCfg = Debug|Win32
{BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Debug|Win32.Build.0 = Debug|Win32 {BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Debug|Win32.Build.0 = Debug|Win32
{BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Release|Win32.ActiveCfg = Release|Win32 {BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Release|Win32.ActiveCfg = Release|Win32
{BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Release|Win32.Build.0 = Release|Win32 {BE092D9E-95AE-4F86-84CE-F4519E4F3F15}.Release|Win32.Build.0 = Release|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.ActiveCfg = Debug|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.Build.0 = Debug|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Release|Win32.ActiveCfg = Release|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Release|Win32.Build.0 = Release|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.ActiveCfg = Debug|Win32 {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.ActiveCfg = Debug|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.Build.0 = Debug|Win32 {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.Build.0 = Debug|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.ActiveCfg = Release|Win32 {13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.ActiveCfg = Release|Win32
@ -156,40 +161,46 @@ Global
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32 {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32 {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.Build.0 = Release|Win32 {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.Build.0 = Release|Win32
{39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.ActiveCfg = Debug|Win32 {E0E282F4-8487-452C-BFAB-CB960EB4D22F}.Debug|Win32.ActiveCfg = Debug|Win32
{39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.Build.0 = Debug|Win32 {E0E282F4-8487-452C-BFAB-CB960EB4D22F}.Debug|Win32.Build.0 = Debug|Win32
{39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.ActiveCfg = Release|Win32 {E0E282F4-8487-452C-BFAB-CB960EB4D22F}.Release|Win32.ActiveCfg = Release|Win32
{39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.Build.0 = Release|Win32 {E0E282F4-8487-452C-BFAB-CB960EB4D22F}.Release|Win32.Build.0 = Release|Win32
{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}.Debug|Win32.ActiveCfg = Debug|Win32 {F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}.Debug|Win32.ActiveCfg = Debug|Win32
{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}.Debug|Win32.Build.0 = Debug|Win32 {F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}.Debug|Win32.Build.0 = Debug|Win32
{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}.Release|Win32.ActiveCfg = Release|Win32 {F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}.Release|Win32.ActiveCfg = Release|Win32
{9A17D9A4-4B11-4E32-94F6-895FF4909EC5}.Release|Win32.Build.0 = Release|Win32 {F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}.Release|Win32.Build.0 = Release|Win32
{6D37505F-A890-441D-BD3F-A61E2C0469CE}.Debug|Win32.ActiveCfg = Debug|Win32 {79D34511-E54E-410A-8BBA-EF175AD6C695}.Debug|Win32.ActiveCfg = Debug|Win32
{6D37505F-A890-441D-BD3F-A61E2C0469CE}.Debug|Win32.Build.0 = Debug|Win32 {79D34511-E54E-410A-8BBA-EF175AD6C695}.Debug|Win32.Build.0 = Debug|Win32
{6D37505F-A890-441D-BD3F-A61E2C0469CE}.Release|Win32.ActiveCfg = Release|Win32 {79D34511-E54E-410A-8BBA-EF175AD6C695}.Release|Win32.ActiveCfg = Release|Win32
{6D37505F-A890-441D-BD3F-A61E2C0469CE}.Release|Win32.Build.0 = Release|Win32 {79D34511-E54E-410A-8BBA-EF175AD6C695}.Release|Win32.Build.0 = Release|Win32
{3BEC13F5-E227-4D80-BC77-1C857F83BCFC}.Debug|Win32.ActiveCfg = Debug|Win32
{3BEC13F5-E227-4D80-BC77-1C857F83BCFC}.Debug|Win32.Build.0 = Debug|Win32
{3BEC13F5-E227-4D80-BC77-1C857F83BCFC}.Release|Win32.ActiveCfg = Release|Win32
{3BEC13F5-E227-4D80-BC77-1C857F83BCFC}.Release|Win32.Build.0 = Release|Win32
{625F7391-9A91-48A1-8CFC-79508C822637}.Debug|Win32.ActiveCfg = Debug|Win32
{625F7391-9A91-48A1-8CFC-79508C822637}.Debug|Win32.Build.0 = Debug|Win32
{625F7391-9A91-48A1-8CFC-79508C822637}.Release|Win32.ActiveCfg = Release|Win32
{625F7391-9A91-48A1-8CFC-79508C822637}.Release|Win32.Build.0 = Release|Win32
{21070E58-EEC6-4E16-8B4F-6D083DF55790}.Debug|Win32.ActiveCfg = Debug|Win32
{21070E58-EEC6-4E16-8B4F-6D083DF55790}.Debug|Win32.Build.0 = Debug|Win32
{21070E58-EEC6-4E16-8B4F-6D083DF55790}.Release|Win32.ActiveCfg = Release|Win32
{21070E58-EEC6-4E16-8B4F-6D083DF55790}.Release|Win32.Build.0 = Release|Win32
{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Debug|Win32.ActiveCfg = Debug|Win32
{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Debug|Win32.Build.0 = Debug|Win32
{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Release|Win32.ActiveCfg = Release|Win32
{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {F51B8DCB-62CD-441F-B85D-43BD8EA432F1} {39379840-825A-45A0-B363-C09FFEF864BD} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F51B8DCB-62CD-441F-B85D-43BD8EA432F1} {F9DA0FC1-651B-457B-962E-A4D61CEBF5FD} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {F51B8DCB-62CD-441F-B85D-43BD8EA432F1} {625F7391-9A91-48A1-8CFC-79508C822637} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {F51B8DCB-62CD-441F-B85D-43BD8EA432F1} {3BEC13F5-E227-4D80-BC77-1C857F83BCFC} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
{929480E7-23C0-4DF6-8456-096D71547116} = {F51B8DCB-62CD-441F-B85D-43BD8EA432F1} {79D34511-E54E-410A-8BBA-EF175AD6C695} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
{13E55395-94A2-4CD9-BFC2-1A051F80C17D} = {69C8AC8E-8B5C-474C-950D-1DB7F367E22C} {21070E58-EEC6-4E16-8B4F-6D083DF55790} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED} = {69C8AC8E-8B5C-474C-950D-1DB7F367E22C} {68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE} = {10F98A57-B9A1-47DA-9FBA-12D328E72ED1}
{DDC3E27F-004D-4DD4-9DD3-931A013D2159} = {69C8AC8E-8B5C-474C-950D-1DB7F367E22C}
{76A39BB2-9B84-4C65-98A5-654D86B86F2A} = {8DFE8821-1A1A-4894-9EA1-2A211F8CEDEA}
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB} = {8DFE8821-1A1A-4894-9EA1-2A211F8CEDEA}
{6D37505F-A890-441D-BD3F-A61E2C0469CE} = {8DFE8821-1A1A-4894-9EA1-2A211F8CEDEA}
{1DB7C0FC-46FF-4A1B-82E0-C6244EEEC4C2} = {42FCBD79-852E-4A68-9C3F-51200BAF5732}
{D0F06A44-A245-4D13-A498-0120C203B539} = {42FCBD79-852E-4A68-9C3F-51200BAF5732}
{BE092D9E-95AE-4F86-84CE-F4519E4F3F15} = {42FCBD79-852E-4A68-9C3F-51200BAF5732}
{68ED0B4E-2BCA-45D2-9648-CEABEBD3B9D7} = {42FCBD79-852E-4A68-9C3F-51200BAF5732}
{39379840-825A-45A0-B363-C09FFEF864BD} = {42FCBD79-852E-4A68-9C3F-51200BAF5732}
{9A17D9A4-4B11-4E32-94F6-895FF4909EC5} = {42FCBD79-852E-4A68-9C3F-51200BAF5732}
EndGlobalSection EndGlobalSection
GlobalSection(DPCodeReviewSolutionGUID) = preSolution GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}

View File

@ -1 +1 @@
9fac2ba89faf5e6f3c870c02f5186641e6be1590 1c487d29bdc2d80516e86e2ee93b1664e9f7df2f

View File

@ -32,5 +32,5 @@ if [ -n "$MISSING" ]; then
fi fi
# install glfw # install glfw
tools/travis-scripts/install_glfw.sh ../tools/travis-scripts/install_glfw.sh

View File

@ -191,12 +191,7 @@ LOCAL_EXPORT_LDLIBS := -lGLESv2 \
-lz \ -lz \
-landroid -landroid
LOCAL_WHOLE_STATIC_LIBRARIES := cocos_libpng_static LOCAL_WHOLE_STATIC_LIBRARIES := cocos_freetype2_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_jpeg_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_libxml2_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_libtiff_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_libwebp_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_freetype2_static
LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dxandroid_static LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dxandroid_static
@ -208,10 +203,6 @@ LOCAL_EXPORT_CPPFLAGS := -Wno-literal-suffix
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)
$(call import-module,jpeg/prebuilt/android)
$(call import-module,png/prebuilt/android)
$(call import-module,tiff/prebuilt/android)
$(call import-module,webp/prebuilt/android)
$(call import-module,freetype2/prebuilt/android) $(call import-module,freetype2/prebuilt/android)
$(call import-module,chipmunk) $(call import-module,chipmunk)
$(call import-module,2d/platform/android) $(call import-module,2d/platform/android)

View File

@ -134,8 +134,6 @@ Node::Node(void)
, _oldEventPriority(0) , _oldEventPriority(0)
#ifdef CC_USE_PHYSICS #ifdef CC_USE_PHYSICS
, _physicsBody(nullptr) , _physicsBody(nullptr)
, _physicsPositionMark(true)
, _physicsRotationMark(true)
#endif #endif
{ {
// set default scheduler and actionManager // set default scheduler and actionManager
@ -272,12 +270,10 @@ void Node::setRotation(float newRotation)
_transformDirty = _inverseDirty = true; _transformDirty = _inverseDirty = true;
#ifdef CC_USE_PHYSICS #ifdef CC_USE_PHYSICS
if (_physicsBody && _physicsRotationMark) if (_physicsBody)
{ {
_physicsBody->setRotation(newRotation); _physicsBody->setRotation(newRotation);
} }
_physicsRotationMark = true;
#endif #endif
} }
@ -364,12 +360,10 @@ void Node::setPosition(const Point& newPosition)
_transformDirty = _inverseDirty = true; _transformDirty = _inverseDirty = true;
#ifdef CC_USE_PHYSICS #ifdef CC_USE_PHYSICS
if (_physicsBody && _physicsPositionMark) if (_physicsBody)
{ {
_physicsBody->setPosition(newPosition); _physicsBody->setPosition(newPosition);
} }
_physicsPositionMark = true;
#endif #endif
} }
@ -901,7 +895,11 @@ void Node::transformAncestors()
} }
void Node::transform() void Node::transform()
{ {
#ifdef CC_USE_PHYSICS
updatePhysicsTransform();
#endif
kmMat4 transfrom4x4; kmMat4 transfrom4x4;
// Convert 3x3 into 4x4 matrix // Convert 3x3 into 4x4 matrix
@ -1298,18 +1296,20 @@ Point Node::convertTouchToNodeSpaceAR(Touch *touch) const
return this->convertToNodeSpaceAR(point); return this->convertToNodeSpaceAR(point);
} }
void Node::updateTransform()
{
#ifdef CC_USE_PHYSICS #ifdef CC_USE_PHYSICS
void Node::updatePhysicsTransform()
{
if (_physicsBody) if (_physicsBody)
{ {
_physicsPositionMark = false; _position = _physicsBody->getPosition();
_physicsRotationMark = false; _rotationX = _rotationY = _physicsBody->getRotation();
setPosition(_physicsBody->getPosition()); _transformDirty = _inverseDirty = true;
setRotation(_physicsBody->getRotation());
} }
}
#endif #endif
void Node::updateTransform()
{
// Recursively iterate over children // Recursively iterate over children
arrayMakeObjectsPerformSelector(_children, updateTransform, Node*); arrayMakeObjectsPerformSelector(_children, updateTransform, Node*);
} }

View File

@ -1384,12 +1384,18 @@ public:
/** /**
* set the PhysicsBody that let the sprite effect with physics * set the PhysicsBody that let the sprite effect with physics
*/ */
virtual void setPhysicsBody(PhysicsBody* body); void setPhysicsBody(PhysicsBody* body);
/** /**
* get the PhysicsBody the sprite have * get the PhysicsBody the sprite have
*/ */
PhysicsBody* getPhysicsBody() const; PhysicsBody* getPhysicsBody() const;
/**
* update rotation and position from physics body
*/
virtual void updatePhysicsTransform();
#endif #endif
@ -1506,8 +1512,6 @@ protected:
#ifdef CC_USE_PHYSICS #ifdef CC_USE_PHYSICS
PhysicsBody* _physicsBody; ///< the physicsBody the node have PhysicsBody* _physicsBody; ///< the physicsBody the node have
bool _physicsPositionMark; ///< set this mark to false will skip the setRotation to physicsBody one time
bool _physicsRotationMark; ///< set this mark to false will skip the setPosition to physicsBody one time
#endif #endif
}; };

View File

@ -449,7 +449,12 @@ void Sprite::setTextureCoords(Rect rect)
void Sprite::updateTransform(void) void Sprite::updateTransform(void)
{ {
CCASSERT(_batchNode, "updateTransform is only valid when Sprite is being rendered using an SpriteBatchNode"); CCASSERT(_batchNode, "updateTransform is only valid when Sprite is being rendered using an SpriteBatchNode");
#ifdef CC_USE_PHYSICS
updatePhysicsTransform();
setDirty(true);
#endif
// recalculate matrix only if it is dirty // recalculate matrix only if it is dirty
if( isDirty() ) { if( isDirty() ) {

View File

@ -1,93 +1,83 @@
TARGET = libcocos2d.so TARGET = libcocos2d.so
INCLUDES += \ INCLUDES =
-I../platform/third_party/linux/libfreetype2 \
-I../platform/third_party/common/etc \
-I../platform/third_party/common/s3tc \
-I../platform/third_party/common/atitc \
-I../../extensions \
-I../../extensions/CCBReader \
-I../../extensions/GUI/CCControlExtension \
-I../../extensions/GUI/CCControlExtension \
-I../../external/chipmunk/include/chipmunk \
-I../../extensions/network \
-I../../extensions/Components
SOURCES = ../actions/CCAction.cpp \ SOURCES = \
../actions/CCActionCamera.cpp \ CCAction.cpp \
../actions/CCActionEase.cpp \ CCActionCamera.cpp \
../actions/CCActionGrid.cpp \ CCActionEase.cpp \
../actions/CCActionGrid3D.cpp \ CCActionGrid.cpp \
../actions/CCActionInstant.cpp \ CCActionGrid3D.cpp \
../actions/CCActionInterval.cpp \ CCActionInstant.cpp \
../actions/CCActionManager.cpp \ CCActionInterval.cpp \
../actions/CCActionPageTurn3D.cpp \ CCActionManager.cpp \
../actions/CCActionProgressTimer.cpp \ CCActionPageTurn3D.cpp \
../actions/CCActionTiledGrid.cpp \ CCActionProgressTimer.cpp \
../actions/CCActionCatmullRom.cpp \ CCActionTiledGrid.cpp \
../actions/CCActionTween.cpp \ CCActionCatmullRom.cpp \
../base_nodes/CCAtlasNode.cpp \ CCActionTween.cpp \
../base_nodes/CCNode.cpp \ CCAtlasNode.cpp \
../cocoa/CCAffineTransform.cpp \ CCNode.cpp \
../cocoa/CCAutoreleasePool.cpp \ ../base/CCAffineTransform.cpp \
../cocoa/CCGeometry.cpp \ ../base/CCAutoreleasePool.cpp \
../cocoa/CCNS.cpp \ ../base/CCGeometry.cpp \
../cocoa/CCObject.cpp \ ../base/CCNS.cpp \
../cocoa/CCSet.cpp \ ../base/CCObject.cpp \
../cocoa/CCArray.cpp \ ../base/CCSet.cpp \
../cocoa/CCDictionary.cpp \ ../base/CCArray.cpp \
../cocoa/CCString.cpp \ ../base/CCDictionary.cpp \
../cocoa/CCDataVisitor.cpp \ ../base/CCString.cpp \
../cocoa/CCData.cpp \ ../base/CCDataVisitor.cpp \
../event_dispatcher/CCEventAcceleration.cpp \ ../base/CCData.cpp \
../event_dispatcher/CCEventListenerAcceleration.cpp \ CCEventAcceleration.cpp \
../event_dispatcher/CCEvent.cpp \ CCEventListenerAcceleration.cpp \
../event_dispatcher/CCEventDispatcher.cpp \ CCEvent.cpp \
../event_dispatcher/CCEventListener.cpp \ CCEventDispatcher.cpp \
../event_dispatcher/CCEventKeyboard.cpp \ CCEventListener.cpp \
../event_dispatcher/CCEventListenerKeyboard.cpp \ CCEventKeyboard.cpp \
../event_dispatcher/CCTouch.cpp \ CCEventListenerKeyboard.cpp \
../event_dispatcher/CCEventTouch.cpp \ CCTouch.cpp \
../event_dispatcher/CCEventListenerTouch.cpp \ CCEventTouch.cpp \
../event_dispatcher/CCEventCustom.cpp \ CCEventListenerTouch.cpp \
../event_dispatcher/CCEventListenerCustom.cpp \ CCEventCustom.cpp \
../draw_nodes/CCDrawingPrimitives.cpp \ CCEventListenerCustom.cpp \
../draw_nodes/CCDrawNode.cpp \ CCDrawingPrimitives.cpp \
../effects/CCGrabber.cpp \ CCDrawNode.cpp \
../effects/CCGrid.cpp \ CCGrabber.cpp \
../label_nodes/CCFont.cpp \ CCGrid.cpp \
../label_nodes/CCFontAtlas.cpp \ CCFont.cpp \
../label_nodes/CCFontAtlasCache.cpp \ CCFontAtlas.cpp \
../label_nodes/CCFontAtlasFactory.cpp \ CCFontAtlasCache.cpp \
../label_nodes/CCFontDefinition.cpp \ CCFontAtlasFactory.cpp \
../label_nodes/CCFontFNT.cpp \ CCFontDefinition.cpp \
../label_nodes/CCFontFreeType.cpp \ CCFontFNT.cpp \
../label_nodes/CCLabel.cpp \ CCFontFreeType.cpp \
../label_nodes/CCLabelAtlas.cpp \ CCLabel.cpp \
../label_nodes/CCLabelBMFont.cpp \ CCLabelAtlas.cpp \
../label_nodes/CCLabelTTF.cpp \ CCLabelBMFont.cpp \
../label_nodes/CCLabelTextFormatter.cpp \ CCLabelTTF.cpp \
../label_nodes/CCTextImage.cpp \ CCLabelTextFormatter.cpp \
../layers_scenes_transitions_nodes/CCLayer.cpp \ CCTextImage.cpp \
../layers_scenes_transitions_nodes/CCScene.cpp \ CCLayer.cpp \
../layers_scenes_transitions_nodes/CCTransition.cpp \ CCScene.cpp \
../layers_scenes_transitions_nodes/CCTransitionPageTurn.cpp \ CCTransition.cpp \
../layers_scenes_transitions_nodes/CCTransitionProgress.cpp \ CCTransitionPageTurn.cpp \
../menu_nodes/CCMenu.cpp \ CCTransitionProgress.cpp \
../menu_nodes/CCMenuItem.cpp \ CCMenu.cpp \
../misc_nodes/CCMotionStreak.cpp \ CCMenuItem.cpp \
../misc_nodes/CCProgressTimer.cpp \ CCMotionStreak.cpp \
../misc_nodes/CCClippingNode.cpp \ CCProgressTimer.cpp \
../misc_nodes/CCRenderTexture.cpp \ CCClippingNode.cpp \
../particle_nodes/CCParticleExamples.cpp \ CCRenderTexture.cpp \
../particle_nodes/CCParticleSystem.cpp \ CCParticleExamples.cpp \
../particle_nodes/CCParticleSystemQuad.cpp \ CCParticleSystem.cpp \
../particle_nodes/CCParticleBatchNode.cpp \ CCParticleSystemQuad.cpp \
../physics/Box2D/CCPhysicsContactInfo.cpp \ CCParticleBatchNode.cpp \
../physics/Box2D/CCPhysicsJointInfo.cpp \ ../physics/box2d/CCPhysicsContactInfo.cpp \
../physics/Box2D/CCPhysicsShapeInfo.cpp \ ../physics/box2d/CCPhysicsJointInfo.cpp \
../physics/Box2D/CCPhysicsBodyInfo.cpp \ ../physics/box2d/CCPhysicsShapeInfo.cpp \
../physics/Box2D/CCPhysicsWorldInfo.cpp \ ../physics/box2d/CCPhysicsBodyInfo.cpp \
../physics/box2d/CCPhysicsWorldInfo.cpp \
../physics/chipmunk/CCPhysicsContactInfo.cpp \ ../physics/chipmunk/CCPhysicsContactInfo.cpp \
../physics/chipmunk/CCPhysicsJointInfo.cpp \ ../physics/chipmunk/CCPhysicsJointInfo.cpp \
../physics/chipmunk/CCPhysicsShapeInfo.cpp \ ../physics/chipmunk/CCPhysicsShapeInfo.cpp \
@ -109,68 +99,68 @@ SOURCES = ../actions/CCAction.cpp \
../platform/linux/CCEGLView.cpp \ ../platform/linux/CCEGLView.cpp \
../platform/linux/CCImage.cpp \ ../platform/linux/CCImage.cpp \
../platform/linux/CCDevice.cpp \ ../platform/linux/CCDevice.cpp \
../platform/third_party/common/etc/etc1.cpp \ ../base/etc1.cpp \
../platform/third_party/common/s3tc/s3tc.cpp \ ../base/s3tc.cpp \
../platform/third_party/common/atitc/atitc.cpp \ ../base/atitc.cpp \
../script_support/CCScriptSupport.cpp \ CCScriptSupport.cpp \
../sprite_nodes/CCAnimation.cpp \ CCAnimation.cpp \
../sprite_nodes/CCAnimationCache.cpp \ CCAnimationCache.cpp \
../sprite_nodes/CCSprite.cpp \ CCSprite.cpp \
../sprite_nodes/CCSpriteBatchNode.cpp \ CCSpriteBatchNode.cpp \
../sprite_nodes/CCSpriteFrame.cpp \ CCSpriteFrame.cpp \
../sprite_nodes/CCSpriteFrameCache.cpp \ CCSpriteFrameCache.cpp \
../support/ccUTF8.cpp \ ccUTF8.cpp \
../support/CCProfiling.cpp \ CCProfiling.cpp \
../support/user_default/CCUserDefault.cpp \ CCUserDefault.cpp \
../support/TransformUtils.cpp \ TransformUtils.cpp \
../support/base64.cpp \ base64.cpp \
../support/ccUtils.cpp \ ccUtils.cpp \
../support/CCVertex.cpp \ CCVertex.cpp \
../support/CCNotificationCenter.cpp \ CCNotificationCenter.cpp \
../support/image_support/TGAlib.cpp \ TGAlib.cpp \
../support/tinyxml2/tinyxml2.cpp \ ../../external/tinyxml2/tinyxml2.cpp \
../support/zip_support/ZipUtils.cpp \ ZipUtils.cpp \
../support/zip_support/ioapi.cpp \ ../../external/unzip/ioapi.cpp \
../support/zip_support/unzip.cpp \ ../../external/unzip/unzip.cpp \
../support/data_support/ccCArray.cpp \ ccCArray.cpp \
../support/component/CCComponent.cpp \ CCComponent.cpp \
../support/component/CCComponentContainer.cpp \ CCComponentContainer.cpp \
../text_input_node/CCIMEDispatcher.cpp \ CCIMEDispatcher.cpp \
../text_input_node/CCTextFieldTTF.cpp \ CCTextFieldTTF.cpp \
../textures/CCTexture2D.cpp \ CCTexture2D.cpp \
../textures/CCTextureAtlas.cpp \ CCTextureAtlas.cpp \
../textures/CCTextureCache.cpp \ CCTextureCache.cpp \
../tilemap_parallax_nodes/CCParallaxNode.cpp \ CCParallaxNode.cpp \
../tilemap_parallax_nodes/CCTMXLayer.cpp \ CCTMXLayer.cpp \
../tilemap_parallax_nodes/CCTMXObjectGroup.cpp \ CCTMXObjectGroup.cpp \
../tilemap_parallax_nodes/CCTMXTiledMap.cpp \ CCTMXTiledMap.cpp \
../tilemap_parallax_nodes/CCTMXXMLParser.cpp \ CCTMXXMLParser.cpp \
../tilemap_parallax_nodes/CCTileMapAtlas.cpp \ CCTileMapAtlas.cpp \
../shaders/CCGLProgram.cpp \ CCGLProgram.cpp \
../shaders/ccGLStateCache.cpp \ ccGLStateCache.cpp \
../shaders/CCShaderCache.cpp \ CCShaderCache.cpp \
../shaders/ccShaders.cpp \ ccShaders.cpp \
../kazmath/src/aabb.c \ ../math/kazmath/src/aabb.c \
../kazmath/src/plane.c \ ../math/kazmath/src/plane.c \
../kazmath/src/vec2.c \ ../math/kazmath/src/vec2.c \
../kazmath/src/mat3.c \ ../math/kazmath/src/mat3.c \
../kazmath/src/quaternion.c \ ../math/kazmath/src/quaternion.c \
../kazmath/src/vec3.c \ ../math/kazmath/src/vec3.c \
../kazmath/src/mat4.c \ ../math/kazmath/src/mat4.c \
../kazmath/src/ray2.c \ ../math/kazmath/src/ray2.c \
../kazmath/src/vec4.c \ ../math/kazmath/src/vec4.c \
../kazmath/src/neon_matrix_impl.c \ ../math/kazmath/src/neon_matrix_impl.c \
../kazmath/src/utility.c \ ../math/kazmath/src/utility.c \
../kazmath/src/GL/mat4stack.c \ ../math/kazmath/src/GL/mat4stack.c \
../kazmath/src/GL/matrix.c \ ../math/kazmath/src/GL/matrix.c \
../CCCamera.cpp \ CCCamera.cpp \
../CCConfiguration.cpp \ CCConfiguration.cpp \
../CCDirector.cpp \ CCDirector.cpp \
../CCScheduler.cpp \ CCScheduler.cpp \
../ccFPSImages.c \ ccFPSImages.c \
../ccTypes.cpp \ ccTypes.cpp \
../cocos2d.cpp \ cocos2d.cpp \
../CCDeprecated.cpp CCDeprecated.cpp
COCOS_ROOT = ../.. COCOS_ROOT = ../..
@ -189,10 +179,24 @@ $(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D) @mkdir -p $(@D)
$(LOG_LINK)$(CXX) $(CXXFLAGS) $(OBJECTS) -shared -o $@ $(SHAREDLIBS) $(STATICLIBS) $(LIBS) $(LOG_LINK)$(CXX) $(CXXFLAGS) $(OBJECTS) -shared -o $@ $(SHAREDLIBS) $(STATICLIBS) $(LIBS)
$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
$(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST) $(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D) @mkdir -p $(@D)
$(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
$(OBJ_DIR)/%.o: ../../%.cpp $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
$(OBJ_DIR)/%.o: %.c $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_CC)$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
$(OBJ_DIR)/%.o: ../%.c $(CORE_MAKEFILE_LIST) $(OBJ_DIR)/%.o: ../%.c $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D) @mkdir -p $(@D)
$(LOG_CC)$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ $(LOG_CC)$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@

View File

@ -36,9 +36,13 @@
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="cocos2dx.props" />
<Import Project="cocos2d_headers.props" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="cocos2dx.props" />
<Import Project="cocos2d_headers.props" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
@ -69,7 +73,7 @@
</PreBuildEvent> </PreBuildEvent>
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(ProjectDir)..;$(ProjectDir)..\platform\win32;$(ProjectDir)..\platform\third_party\win32\iconv;$(ProjectDir)..\platform\third_party\win32\zlib;$(ProjectDir)..\platform\third_party\win32\libpng;$(ProjectDir)..\platform\third_party\win32\libjpeg;$(ProjectDir)..\platform\third_party\win32\libtiff;$(ProjectDir)..\platform\third_party\win32\libwebp;$(ProjectDir)..\platform\third_party\win32\libfreetype2;$(ProjectDir)..\platform\third_party\win32\OGLES;..\include;$(ProjectDir)..\kazmath\include;$(ProjectDir)..\platform\third_party\common\etc;$(ProjectDir)..\..\external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -83,7 +87,16 @@
</ClCompile> </ClCompile>
<PreLinkEvent> <PreLinkEvent>
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)" <Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\platform\third_party\win32\libraries\*.*" "$(OutDir)" xcopy /Y /Q "$(ProjectDir)..\..\external\freetype2\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\glfw3\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\curl\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\jpeg\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\png\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\tiff\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\webp\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\zlib\prebuilt\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\icon\prebuilt\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(OutDir)"
</Command> </Command>
</PreLinkEvent> </PreLinkEvent>
<Link> <Link>
@ -107,7 +120,7 @@ xcopy /Y /Q "$(ProjectDir)..\platform\third_party\win32\libraries\*.*" "$(OutDir
</Command> </Command>
</PreBuildEvent> </PreBuildEvent>
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(ProjectDir)..;$(ProjectDir)..\platform\win32;$(ProjectDir)..\platform\third_party\win32\iconv;$(ProjectDir)..\platform\third_party\win32\zlib;$(ProjectDir)..\platform\third_party\win32\libpng;$(ProjectDir)..\platform\third_party\win32\libjpeg;$(ProjectDir)..\platform\third_party\win32\libtiff;$(ProjectDir)..\platform\third_party\win32\libwebp;$(ProjectDir)..\platform\third_party\win32\libfreetype2;$(ProjectDir)..\platform\third_party\win32\OGLES;..\include;$(ProjectDir)..\kazmath\include;$(ProjectDir)..\platform\third_party\common\etc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@ -119,7 +132,16 @@ xcopy /Y /Q "$(ProjectDir)..\platform\third_party\win32\libraries\*.*" "$(OutDir
</ClCompile> </ClCompile>
<PreLinkEvent> <PreLinkEvent>
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)" <Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\platform\third_party\win32\libraries\*.*" "$(OutDir)" xcopy /Y /Q "$(ProjectDir)..\..\external\freetype2\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\glfw3\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\curl\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\jpeg\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\png\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\tiff\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\webp\prebuilt\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\zlib\prebuilt\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\icon\prebuilt\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(OutDir)"
</Command> </Command>
</PreLinkEvent> </PreLinkEvent>
<Link> <Link>
@ -140,79 +162,36 @@ xcopy /Y /Q "$(ProjectDir)..\platform\third_party\win32\libraries\*.*" "$(OutDir
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\base_nodes\CCAtlasNode.cpp" /> <ClCompile Include="..\..\external\tinyxml2\tinyxml2.cpp" />
<ClCompile Include="..\base_nodes\CCNode.cpp" /> <ClCompile Include="..\..\external\unzip\ioapi.cpp" />
<ClCompile Include="..\CCDeprecated.cpp" /> <ClCompile Include="..\..\external\unzip\unzip.cpp" />
<ClCompile Include="..\ccFPSImages.c" /> <ClCompile Include="..\base\atitc.cpp" />
<ClCompile Include="..\ccTypes.cpp" /> <ClCompile Include="..\base\CCAffineTransform.cpp" />
<ClCompile Include="..\cocoa\CCAffineTransform.cpp" /> <ClCompile Include="..\base\CCArray.cpp" />
<ClCompile Include="..\cocoa\CCArray.cpp" /> <ClCompile Include="..\base\CCAutoreleasePool.cpp" />
<ClCompile Include="..\cocoa\CCAutoreleasePool.cpp" /> <ClCompile Include="..\base\CCData.cpp" />
<ClCompile Include="..\cocoa\CCDataVisitor.cpp" /> <ClCompile Include="..\base\CCDataVisitor.cpp" />
<ClCompile Include="..\cocoa\CCDictionary.cpp" /> <ClCompile Include="..\base\CCDictionary.cpp" />
<ClCompile Include="..\cocoa\CCGeometry.cpp" /> <ClCompile Include="..\base\CCGeometry.cpp" />
<ClCompile Include="..\cocoa\CCNS.cpp" /> <ClCompile Include="..\base\CCNS.cpp" />
<ClCompile Include="..\cocoa\CCObject.cpp" /> <ClCompile Include="..\base\CCObject.cpp" />
<ClCompile Include="..\cocoa\CCSet.cpp" /> <ClCompile Include="..\base\CCSet.cpp" />
<ClCompile Include="..\cocoa\CCString.cpp" /> <ClCompile Include="..\base\CCString.cpp" />
<ClCompile Include="..\cocoa\CCData.cpp" /> <ClCompile Include="..\base\etc1.cpp" />
<ClCompile Include="..\draw_nodes\CCDrawingPrimitives.cpp" /> <ClCompile Include="..\base\s3tc.cpp" />
<ClCompile Include="..\draw_nodes\CCDrawNode.cpp" /> <ClCompile Include="..\math\kazmath\src\aabb.c" />
<ClCompile Include="..\effects\CCGrabber.cpp" /> <ClCompile Include="..\math\kazmath\src\GL\mat4stack.c" />
<ClCompile Include="..\effects\CCGrid.cpp" /> <ClCompile Include="..\math\kazmath\src\GL\matrix.c" />
<ClCompile Include="..\actions\CCAction.cpp" /> <ClCompile Include="..\math\kazmath\src\mat3.c" />
<ClCompile Include="..\actions\CCActionCamera.cpp" /> <ClCompile Include="..\math\kazmath\src\mat4.c" />
<ClCompile Include="..\actions\CCActionCatmullRom.cpp" /> <ClCompile Include="..\math\kazmath\src\neon_matrix_impl.c" />
<ClCompile Include="..\actions\CCActionEase.cpp" /> <ClCompile Include="..\math\kazmath\src\plane.c" />
<ClCompile Include="..\actions\CCActionGrid.cpp" /> <ClCompile Include="..\math\kazmath\src\quaternion.c" />
<ClCompile Include="..\actions\CCActionGrid3D.cpp" /> <ClCompile Include="..\math\kazmath\src\ray2.c" />
<ClCompile Include="..\actions\CCActionInstant.cpp" /> <ClCompile Include="..\math\kazmath\src\utility.c" />
<ClCompile Include="..\actions\CCActionInterval.cpp" /> <ClCompile Include="..\math\kazmath\src\vec2.c" />
<ClCompile Include="..\actions\CCActionManager.cpp" /> <ClCompile Include="..\math\kazmath\src\vec3.c" />
<ClCompile Include="..\actions\CCActionPageTurn3D.cpp" /> <ClCompile Include="..\math\kazmath\src\vec4.c" />
<ClCompile Include="..\actions\CCActionProgressTimer.cpp" />
<ClCompile Include="..\actions\CCActionTiledGrid.cpp" />
<ClCompile Include="..\actions\CCActionTween.cpp" />
<ClCompile Include="..\event_dispatcher\CCEvent.cpp" />
<ClCompile Include="..\event_dispatcher\CCEventAcceleration.cpp" />
<ClCompile Include="..\event_dispatcher\CCEventCustom.cpp" />
<ClCompile Include="..\event_dispatcher\CCEventDispatcher.cpp" />
<ClCompile Include="..\event_dispatcher\CCEventKeyboard.cpp" />
<ClCompile Include="..\event_dispatcher\CCEventListener.cpp" />
<ClCompile Include="..\event_dispatcher\CCEventListenerAcceleration.cpp" />
<ClCompile Include="..\event_dispatcher\CCEventListenerCustom.cpp" />
<ClCompile Include="..\event_dispatcher\CCEventListenerKeyboard.cpp" />
<ClCompile Include="..\event_dispatcher\CCEventListenerTouch.cpp" />
<ClCompile Include="..\event_dispatcher\CCEventTouch.cpp" />
<ClCompile Include="..\event_dispatcher\CCTouch.cpp" />
<ClCompile Include="..\label_nodes\CCFont.cpp" />
<ClCompile Include="..\label_nodes\CCFontAtlas.cpp" />
<ClCompile Include="..\label_nodes\CCFontAtlasCache.cpp" />
<ClCompile Include="..\label_nodes\CCFontAtlasFactory.cpp" />
<ClCompile Include="..\label_nodes\CCFontDefinition.cpp" />
<ClCompile Include="..\label_nodes\CCFontFNT.cpp" />
<ClCompile Include="..\label_nodes\CCFontFreeType.cpp" />
<ClCompile Include="..\label_nodes\CCLabel.cpp" />
<ClCompile Include="..\label_nodes\CCLabelAtlas.cpp" />
<ClCompile Include="..\label_nodes\CCLabelBMFont.cpp" />
<ClCompile Include="..\label_nodes\CCLabelTextFormatter.cpp" />
<ClCompile Include="..\label_nodes\CCLabelTTF.cpp" />
<ClCompile Include="..\label_nodes\CCTextImage.cpp" />
<ClCompile Include="..\layers_scenes_transitions_nodes\CCLayer.cpp" />
<ClCompile Include="..\layers_scenes_transitions_nodes\CCScene.cpp" />
<ClCompile Include="..\layers_scenes_transitions_nodes\CCTransition.cpp" />
<ClCompile Include="..\layers_scenes_transitions_nodes\CCTransitionPageTurn.cpp" />
<ClCompile Include="..\layers_scenes_transitions_nodes\CCTransitionProgress.cpp" />
<ClCompile Include="..\menu_nodes\CCMenu.cpp" />
<ClCompile Include="..\menu_nodes\CCMenuItem.cpp" />
<ClCompile Include="..\misc_nodes\CCClippingNode.cpp" />
<ClCompile Include="..\misc_nodes\CCMotionStreak.cpp" />
<ClCompile Include="..\misc_nodes\CCProgressTimer.cpp" />
<ClCompile Include="..\misc_nodes\CCRenderTexture.cpp" />
<ClCompile Include="..\particle_nodes\CCParticleBatchNode.cpp" />
<ClCompile Include="..\particle_nodes\CCParticleExamples.cpp" />
<ClCompile Include="..\particle_nodes\CCParticleSystem.cpp" />
<ClCompile Include="..\particle_nodes\CCParticleSystemQuad.cpp" />
<ClCompile Include="..\physics\Box2D\CCPhysicsBodyInfo.cpp" /> <ClCompile Include="..\physics\Box2D\CCPhysicsBodyInfo.cpp" />
<ClCompile Include="..\physics\Box2D\CCPhysicsContactInfo.cpp" /> <ClCompile Include="..\physics\Box2D\CCPhysicsContactInfo.cpp" />
<ClCompile Include="..\physics\Box2D\CCPhysicsJointInfo.cpp" /> <ClCompile Include="..\physics\Box2D\CCPhysicsJointInfo.cpp" />
@ -228,162 +207,158 @@ xcopy /Y /Q "$(ProjectDir)..\platform\third_party\win32\libraries\*.*" "$(OutDir
<ClCompile Include="..\physics\chipmunk\CCPhysicsJointInfo.cpp" /> <ClCompile Include="..\physics\chipmunk\CCPhysicsJointInfo.cpp" />
<ClCompile Include="..\physics\chipmunk\CCPhysicsShapeInfo.cpp" /> <ClCompile Include="..\physics\chipmunk\CCPhysicsShapeInfo.cpp" />
<ClCompile Include="..\physics\chipmunk\CCPhysicsWorldInfo.cpp" /> <ClCompile Include="..\physics\chipmunk\CCPhysicsWorldInfo.cpp" />
<ClCompile Include="..\platform\CCEGLViewProtocol.cpp" /> <ClCompile Include="base64.cpp" />
<ClCompile Include="..\platform\CCFileUtils.cpp" /> <ClCompile Include="CCAction.cpp" />
<ClCompile Include="..\platform\CCSAXParser.cpp" /> <ClCompile Include="CCActionCamera.cpp" />
<ClCompile Include="..\platform\CCThread.cpp" /> <ClCompile Include="CCActionCatmullRom.cpp" />
<ClCompile Include="..\platform\third_party\common\atitc\atitc.cpp" /> <ClCompile Include="CCActionEase.cpp" />
<ClCompile Include="..\platform\third_party\common\etc\etc1.cpp" /> <ClCompile Include="CCActionGrid.cpp" />
<ClCompile Include="..\platform\third_party\common\s3tc\s3tc.cpp" /> <ClCompile Include="CCActionGrid3D.cpp" />
<ClCompile Include="..\platform\win32\CCApplication.cpp" /> <ClCompile Include="CCActionInstant.cpp" />
<ClCompile Include="..\platform\win32\CCCommon.cpp" /> <ClCompile Include="CCActionInterval.cpp" />
<ClCompile Include="..\platform\win32\CCDevice.cpp" /> <ClCompile Include="CCActionManager.cpp" />
<ClCompile Include="..\platform\win32\CCEGLView.cpp" /> <ClCompile Include="CCActionPageTurn3D.cpp" />
<ClCompile Include="..\platform\win32\CCFileUtilsWin32.cpp" /> <ClCompile Include="CCActionProgressTimer.cpp" />
<ClCompile Include="..\platform\win32\CCImage.cpp" /> <ClCompile Include="CCActionTiledGrid.cpp" />
<ClCompile Include="..\platform\win32\CCStdC.cpp" /> <ClCompile Include="CCActionTween.cpp" />
<ClCompile Include="..\shaders\CCGLProgram.cpp" /> <ClCompile Include="CCAnimation.cpp" />
<ClCompile Include="..\shaders\ccGLStateCache.cpp" /> <ClCompile Include="CCAnimationCache.cpp" />
<ClCompile Include="..\shaders\CCShaderCache.cpp" /> <ClCompile Include="CCAtlasNode.cpp" />
<ClCompile Include="..\shaders\ccShaders.cpp" /> <ClCompile Include="CCCamera.cpp" />
<ClCompile Include="..\sprite_nodes\CCAnimation.cpp" /> <ClCompile Include="ccCArray.cpp" />
<ClCompile Include="..\sprite_nodes\CCAnimationCache.cpp" /> <ClCompile Include="CCClippingNode.cpp" />
<ClCompile Include="..\sprite_nodes\CCSprite.cpp" /> <ClCompile Include="CCComponent.cpp" />
<ClCompile Include="..\sprite_nodes\CCSpriteBatchNode.cpp" /> <ClCompile Include="CCComponentContainer.cpp" />
<ClCompile Include="..\sprite_nodes\CCSpriteFrame.cpp" /> <ClCompile Include="CCConfiguration.cpp" />
<ClCompile Include="..\sprite_nodes\CCSpriteFrameCache.cpp" /> <ClCompile Include="CCDeprecated.cpp" />
<ClCompile Include="..\support\base64.cpp" /> <ClCompile Include="CCDirector.cpp" />
<ClCompile Include="..\support\CCNotificationCenter.cpp" /> <ClCompile Include="CCDrawingPrimitives.cpp" />
<ClCompile Include="..\support\CCProfiling.cpp" /> <ClCompile Include="CCDrawNode.cpp" />
<ClCompile Include="..\support\ccUTF8.cpp" /> <ClCompile Include="CCEvent.cpp" />
<ClCompile Include="..\support\ccUtils.cpp" /> <ClCompile Include="CCEventAcceleration.cpp" />
<ClCompile Include="..\support\CCVertex.cpp" /> <ClCompile Include="CCEventCustom.cpp" />
<ClCompile Include="..\support\component\CCComponent.cpp" /> <ClCompile Include="CCEventDispatcher.cpp" />
<ClCompile Include="..\support\component\CCComponentContainer.cpp" /> <ClCompile Include="CCEventKeyboard.cpp" />
<ClCompile Include="..\support\tinyxml2\tinyxml2.cpp" /> <ClCompile Include="CCEventListener.cpp" />
<ClCompile Include="..\support\TransformUtils.cpp" /> <ClCompile Include="CCEventListenerAcceleration.cpp" />
<ClCompile Include="..\support\data_support\ccCArray.cpp" /> <ClCompile Include="CCEventListenerCustom.cpp" />
<ClCompile Include="..\support\image_support\TGAlib.cpp" /> <ClCompile Include="CCEventListenerKeyboard.cpp" />
<ClCompile Include="..\support\user_default\CCUserDefault.cpp" /> <ClCompile Include="CCEventListenerTouch.cpp" />
<ClCompile Include="..\support\zip_support\ioapi.cpp" /> <ClCompile Include="CCEventTouch.cpp" />
<ClCompile Include="..\support\zip_support\unzip.cpp" /> <ClCompile Include="CCFont.cpp" />
<ClCompile Include="..\support\zip_support\ZipUtils.cpp" /> <ClCompile Include="CCFontAtlas.cpp" />
<ClCompile Include="..\textures\CCTexture2D.cpp" /> <ClCompile Include="CCFontAtlasCache.cpp" />
<ClCompile Include="..\textures\CCTextureAtlas.cpp" /> <ClCompile Include="CCFontAtlasFactory.cpp" />
<ClCompile Include="..\textures\CCTextureCache.cpp" /> <ClCompile Include="CCFontDefinition.cpp" />
<ClCompile Include="..\tileMap_parallax_nodes\CCParallaxNode.cpp" /> <ClCompile Include="CCFontFNT.cpp" />
<ClCompile Include="..\tileMap_parallax_nodes\CCTileMapAtlas.cpp" /> <ClCompile Include="CCFontFreeType.cpp" />
<ClCompile Include="..\tileMap_parallax_nodes\CCTMXLayer.cpp" /> <ClCompile Include="ccFPSImages.c" />
<ClCompile Include="..\tileMap_parallax_nodes\CCTMXObjectGroup.cpp" /> <ClCompile Include="CCGLProgram.cpp" />
<ClCompile Include="..\tileMap_parallax_nodes\CCTMXTiledMap.cpp" /> <ClCompile Include="ccGLStateCache.cpp" />
<ClCompile Include="..\tileMap_parallax_nodes\CCTMXXMLParser.cpp" /> <ClCompile Include="CCGrabber.cpp" />
<ClCompile Include="..\text_input_node\CCIMEDispatcher.cpp" /> <ClCompile Include="CCGrid.cpp" />
<ClCompile Include="..\text_input_node\CCTextFieldTTF.cpp" /> <ClCompile Include="CCIMEDispatcher.cpp" />
<ClCompile Include="..\script_support\CCScriptSupport.cpp" /> <ClCompile Include="CCLabel.cpp" />
<ClCompile Include="..\kazmath\src\aabb.c" /> <ClCompile Include="CCLabelAtlas.cpp" />
<ClCompile Include="..\kazmath\src\mat3.c" /> <ClCompile Include="CCLabelBMFont.cpp" />
<ClCompile Include="..\kazmath\src\mat4.c" /> <ClCompile Include="CCLabelTextFormatter.cpp" />
<ClCompile Include="..\kazmath\src\neon_matrix_impl.c" /> <ClCompile Include="CCLabelTTF.cpp" />
<ClCompile Include="..\kazmath\src\plane.c" /> <ClCompile Include="CCLayer.cpp" />
<ClCompile Include="..\kazmath\src\quaternion.c" /> <ClCompile Include="CCMenu.cpp" />
<ClCompile Include="..\kazmath\src\ray2.c" /> <ClCompile Include="CCMenuItem.cpp" />
<ClCompile Include="..\kazmath\src\utility.c" /> <ClCompile Include="CCMotionStreak.cpp" />
<ClCompile Include="..\kazmath\src\vec2.c" /> <ClCompile Include="CCNode.cpp" />
<ClCompile Include="..\kazmath\src\vec3.c" /> <ClCompile Include="CCNotificationCenter.cpp" />
<ClCompile Include="..\kazmath\src\vec4.c" /> <ClCompile Include="CCParallaxNode.cpp" />
<ClCompile Include="..\kazmath\src\GL\mat4stack.c" /> <ClCompile Include="CCParticleBatchNode.cpp" />
<ClCompile Include="..\kazmath\src\GL\matrix.c" /> <ClCompile Include="CCParticleExamples.cpp" />
<ClCompile Include="..\CCCamera.cpp" /> <ClCompile Include="CCParticleSystem.cpp" />
<ClCompile Include="..\CCConfiguration.cpp" /> <ClCompile Include="CCParticleSystemQuad.cpp" />
<ClCompile Include="..\CCDirector.cpp" /> <ClCompile Include="CCProfiling.cpp" />
<ClCompile Include="..\CCScheduler.cpp" /> <ClCompile Include="CCProgressTimer.cpp" />
<ClCompile Include="..\cocos2d.cpp" /> <ClCompile Include="CCRenderTexture.cpp" />
<ClCompile Include="CCScene.cpp" />
<ClCompile Include="CCScheduler.cpp" />
<ClCompile Include="CCScriptSupport.cpp" />
<ClCompile Include="CCShaderCache.cpp" />
<ClCompile Include="ccShaders.cpp" />
<ClCompile Include="CCSprite.cpp" />
<ClCompile Include="CCSpriteBatchNode.cpp" />
<ClCompile Include="CCSpriteFrame.cpp" />
<ClCompile Include="CCSpriteFrameCache.cpp" />
<ClCompile Include="CCTextFieldTTF.cpp" />
<ClCompile Include="CCTextImage.cpp" />
<ClCompile Include="CCTexture2D.cpp" />
<ClCompile Include="CCTextureAtlas.cpp" />
<ClCompile Include="CCTextureCache.cpp" />
<ClCompile Include="CCTileMapAtlas.cpp" />
<ClCompile Include="CCTMXLayer.cpp" />
<ClCompile Include="CCTMXObjectGroup.cpp" />
<ClCompile Include="CCTMXTiledMap.cpp" />
<ClCompile Include="CCTMXXMLParser.cpp" />
<ClCompile Include="CCTouch.cpp" />
<ClCompile Include="CCTransition.cpp" />
<ClCompile Include="CCTransitionPageTurn.cpp" />
<ClCompile Include="CCTransitionProgress.cpp" />
<ClCompile Include="ccTypes.cpp" />
<ClCompile Include="CCUserDefault.cpp" />
<ClCompile Include="ccUTF8.cpp" />
<ClCompile Include="ccUtils.cpp" />
<ClCompile Include="CCVertex.cpp" />
<ClCompile Include="cocos2d.cpp" />
<ClCompile Include="platform\CCEGLViewProtocol.cpp" />
<ClCompile Include="platform\CCFileUtils.cpp" />
<ClCompile Include="platform\CCSAXParser.cpp" />
<ClCompile Include="platform\CCThread.cpp" />
<ClCompile Include="platform\win32\CCApplication.cpp" />
<ClCompile Include="platform\win32\CCCommon.cpp" />
<ClCompile Include="platform\win32\CCDevice.cpp" />
<ClCompile Include="platform\win32\CCEGLView.cpp" />
<ClCompile Include="platform\win32\CCFileUtilsWin32.cpp" />
<ClCompile Include="platform\win32\CCImage.cpp" />
<ClCompile Include="platform\win32\CCStdC.cpp" />
<ClCompile Include="TGAlib.cpp" />
<ClCompile Include="TransformUtils.cpp" />
<ClCompile Include="ZipUtils.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\base_nodes\CCAtlasNode.h" /> <ClInclude Include="..\..\external\tinyxml2\tinyxml2.h" />
<ClInclude Include="..\base_nodes\CCNode.h" /> <ClInclude Include="..\..\external\unzip\ioapi.h" />
<ClInclude Include="..\ccFPSImages.h" /> <ClInclude Include="..\..\external\unzip\unzip.h" />
<ClInclude Include="..\cocoa\CCAffineTransform.h" /> <ClInclude Include="..\base\atitc.h" />
<ClInclude Include="..\cocoa\CCArray.h" /> <ClInclude Include="..\base\CCAffineTransform.h" />
<ClInclude Include="..\cocoa\CCAutoreleasePool.h" /> <ClInclude Include="..\base\CCArray.h" />
<ClInclude Include="..\cocoa\CCBool.h" /> <ClInclude Include="..\base\CCAutoreleasePool.h" />
<ClInclude Include="..\cocoa\CCDataVisitor.h" /> <ClInclude Include="..\base\CCBool.h" />
<ClInclude Include="..\cocoa\CCDictionary.h" /> <ClInclude Include="..\base\CCData.h" />
<ClInclude Include="..\cocoa\CCDouble.h" /> <ClInclude Include="..\base\CCDataVisitor.h" />
<ClInclude Include="..\cocoa\CCFloat.h" /> <ClInclude Include="..\base\CCDictionary.h" />
<ClInclude Include="..\cocoa\CCGeometry.h" /> <ClInclude Include="..\base\CCDouble.h" />
<ClInclude Include="..\cocoa\CCInteger.h" /> <ClInclude Include="..\base\CCFloat.h" />
<ClInclude Include="..\cocoa\CCNS.h" /> <ClInclude Include="..\base\CCGeometry.h" />
<ClInclude Include="..\cocoa\CCObject.h" /> <ClInclude Include="..\base\CCInteger.h" />
<ClInclude Include="..\cocoa\CCSet.h" /> <ClInclude Include="..\base\CCNS.h" />
<ClInclude Include="..\cocoa\CCString.h" /> <ClInclude Include="..\base\CCObject.h" />
<ClInclude Include="..\cocoa\CCData.h" /> <ClInclude Include="..\base\CCPlatformConfig.h" />
<ClInclude Include="..\draw_nodes\CCDrawingPrimitives.h" /> <ClInclude Include="..\base\CCPlatformMacros.h" />
<ClInclude Include="..\draw_nodes\CCDrawNode.h" /> <ClInclude Include="..\base\CCSet.h" />
<ClInclude Include="..\effects\CCGrabber.h" /> <ClInclude Include="..\base\CCString.h" />
<ClInclude Include="..\effects\CCGrid.h" /> <ClInclude Include="..\base\etc1.h" />
<ClInclude Include="..\actions\CCAction.h" /> <ClInclude Include="..\base\s3tc.h" />
<ClInclude Include="..\actions\CCActionCamera.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\aabb.h" />
<ClInclude Include="..\actions\CCActionCatmullRom.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\GL\mat4stack.h" />
<ClInclude Include="..\actions\CCActionEase.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\GL\matrix.h" />
<ClInclude Include="..\actions\CCActionGrid.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\kazmath.h" />
<ClInclude Include="..\actions\CCActionGrid3D.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\mat3.h" />
<ClInclude Include="..\actions\CCActionInstant.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\mat4.h" />
<ClInclude Include="..\actions\CCActionInterval.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\neon_matrix_impl.h" />
<ClInclude Include="..\actions\CCActionManager.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\plane.h" />
<ClInclude Include="..\actions\CCActionPageTurn3D.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\quaternion.h" />
<ClInclude Include="..\actions\CCActionProgressTimer.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\ray2.h" />
<ClInclude Include="..\actions\CCActionTiledGrid.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\utility.h" />
<ClInclude Include="..\actions\CCActionTween.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\vec2.h" />
<ClInclude Include="..\event_dispatcher\CCEvent.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\vec3.h" />
<ClInclude Include="..\event_dispatcher\CCEventAcceleration.h" /> <ClInclude Include="..\math\kazmath\include\kazmath\vec4.h" />
<ClInclude Include="..\event_dispatcher\CCEventCustom.h" />
<ClInclude Include="..\event_dispatcher\CCEventDispatcher.h" />
<ClInclude Include="..\event_dispatcher\CCEventKeyboard.h" />
<ClInclude Include="..\event_dispatcher\CCEventListener.h" />
<ClInclude Include="..\event_dispatcher\CCEventListenerAcceleration.h" />
<ClInclude Include="..\event_dispatcher\CCEventListenerCustom.h" />
<ClInclude Include="..\event_dispatcher\CCEventListenerKeyboard.h" />
<ClInclude Include="..\event_dispatcher\CCEventListenerTouch.h" />
<ClInclude Include="..\event_dispatcher\CCEventTouch.h" />
<ClInclude Include="..\event_dispatcher\CCTouch.h" />
<ClInclude Include="..\include\ccConfig.h" />
<ClInclude Include="..\include\CCDeprecated.h" />
<ClInclude Include="..\include\CCEventType.h" />
<ClInclude Include="..\include\ccMacros.h" />
<ClInclude Include="..\include\CCProtocols.h" />
<ClInclude Include="..\include\ccTypes.h" />
<ClInclude Include="..\include\cocos2d.h" />
<ClInclude Include="..\label_nodes\CCFont.h" />
<ClInclude Include="..\label_nodes\CCFontAtlas.h" />
<ClInclude Include="..\label_nodes\CCFontAtlasCache.h" />
<ClInclude Include="..\label_nodes\CCFontAtlasFactory.h" />
<ClInclude Include="..\label_nodes\CCFontCache.h" />
<ClInclude Include="..\label_nodes\CCFontDefinition.h" />
<ClInclude Include="..\label_nodes\CCFontFNT.h" />
<ClInclude Include="..\label_nodes\CCFontFreeType.h" />
<ClInclude Include="..\label_nodes\CCLabel.h" />
<ClInclude Include="..\label_nodes\CCLabelAtlas.h" />
<ClInclude Include="..\label_nodes\CCLabelBMFont.h" />
<ClInclude Include="..\label_nodes\CCLabelTextFormatProtocol.h" />
<ClInclude Include="..\label_nodes\CCLabelTextFormatter.h" />
<ClInclude Include="..\label_nodes\CCLabelTTF.h" />
<ClInclude Include="..\label_nodes\CCTextImage.h" />
<ClInclude Include="..\layers_scenes_transitions_nodes\CCLayer.h" />
<ClInclude Include="..\layers_scenes_transitions_nodes\CCScene.h" />
<ClInclude Include="..\layers_scenes_transitions_nodes\CCTransition.h" />
<ClInclude Include="..\layers_scenes_transitions_nodes\CCTransitionPageTurn.h" />
<ClInclude Include="..\layers_scenes_transitions_nodes\CCTransitionProgress.h" />
<ClInclude Include="..\menu_nodes\CCMenu.h" />
<ClInclude Include="..\menu_nodes\CCMenuItem.h" />
<ClInclude Include="..\misc_nodes\CCClippingNode.h" />
<ClInclude Include="..\misc_nodes\CCMotionStreak.h" />
<ClInclude Include="..\misc_nodes\CCProgressTimer.h" />
<ClInclude Include="..\misc_nodes\CCRenderTexture.h" />
<ClInclude Include="..\particle_nodes\CCParticleBatchNode.h" />
<ClInclude Include="..\particle_nodes\CCParticleExamples.h" />
<ClInclude Include="..\particle_nodes\CCParticleSystem.h" />
<ClInclude Include="..\particle_nodes\CCParticleSystemQuad.h" />
<ClInclude Include="..\physics\Box2D\CCPhysicsBodyInfo.h" /> <ClInclude Include="..\physics\Box2D\CCPhysicsBodyInfo.h" />
<ClInclude Include="..\physics\Box2D\CCPhysicsContactInfo.h" /> <ClInclude Include="..\physics\Box2D\CCPhysicsContactInfo.h" />
<ClInclude Include="..\physics\Box2D\CCPhysicsHelper.h" /> <ClInclude Include="..\physics\Box2D\CCPhysicsHelper.h" />
@ -402,101 +377,147 @@ xcopy /Y /Q "$(ProjectDir)..\platform\third_party\win32\libraries\*.*" "$(OutDir
<ClInclude Include="..\physics\chipmunk\CCPhysicsJointInfo.h" /> <ClInclude Include="..\physics\chipmunk\CCPhysicsJointInfo.h" />
<ClInclude Include="..\physics\chipmunk\CCPhysicsShapeInfo.h" /> <ClInclude Include="..\physics\chipmunk\CCPhysicsShapeInfo.h" />
<ClInclude Include="..\physics\chipmunk\CCPhysicsWorldInfo.h" /> <ClInclude Include="..\physics\chipmunk\CCPhysicsWorldInfo.h" />
<ClInclude Include="..\platform\CCApplicationProtocol.h" /> <ClInclude Include="base64.h" />
<ClInclude Include="..\platform\CCCommon.h" /> <ClInclude Include="CCAction.h" />
<ClInclude Include="..\platform\CCDevice.h" /> <ClInclude Include="CCActionCamera.h" />
<ClInclude Include="..\platform\CCEGLViewProtocol.h" /> <ClInclude Include="CCActionCatmullRom.h" />
<ClInclude Include="..\platform\CCFileUtils.h" /> <ClInclude Include="CCActionEase.h" />
<ClInclude Include="..\platform\CCImage.h" /> <ClInclude Include="CCActionGrid.h" />
<ClInclude Include="..\platform\CCImageCommon_cpp.h" /> <ClInclude Include="CCActionGrid3D.h" />
<ClInclude Include="..\platform\CCPlatformConfig.h" /> <ClInclude Include="CCActionInstant.h" />
<ClInclude Include="..\platform\CCPlatformMacros.h" /> <ClInclude Include="CCActionInterval.h" />
<ClInclude Include="..\platform\CCSAXParser.h" /> <ClInclude Include="CCActionManager.h" />
<ClInclude Include="..\platform\CCThread.h" /> <ClInclude Include="CCActionPageTurn3D.h" />
<ClInclude Include="..\platform\third_party\common\atitc\atitc.h" /> <ClInclude Include="CCActionProgressTimer.h" />
<ClInclude Include="..\platform\third_party\common\etc\etc1.h" /> <ClInclude Include="CCActionTiledGrid.h" />
<ClInclude Include="..\platform\third_party\common\s3tc\s3tc.h" /> <ClInclude Include="CCActionTween.h" />
<ClInclude Include="..\platform\win32\CCApplication.h" /> <ClInclude Include="CCAnimation.h" />
<ClInclude Include="..\platform\win32\CCEGLView.h" /> <ClInclude Include="CCAnimationCache.h" />
<ClInclude Include="..\platform\win32\CCFileUtilsWin32.h" /> <ClInclude Include="CCAtlasNode.h" />
<ClInclude Include="..\platform\win32\CCGL.h" /> <ClInclude Include="CCCamera.h" />
<ClInclude Include="..\platform\win32\CCPlatformDefine.h" /> <ClInclude Include="ccCArray.h" />
<ClInclude Include="..\platform\win32\CCStdC.h" /> <ClInclude Include="CCClippingNode.h" />
<ClInclude Include="..\shaders\CCGLProgram.h" /> <ClInclude Include="CCComponent.h" />
<ClInclude Include="..\shaders\ccGLStateCache.h" /> <ClInclude Include="CCComponentContainer.h" />
<ClInclude Include="..\shaders\CCShaderCache.h" /> <ClInclude Include="ccConfig.h" />
<ClInclude Include="..\shaders\ccShaderEx_SwitchMask_frag.h" /> <ClInclude Include="CCConfiguration.h" />
<ClInclude Include="..\shaders\ccShaders.h" /> <ClInclude Include="CCDeprecated.h" />
<ClInclude Include="..\shaders\ccShader_PositionColorLengthTexture_frag.h" /> <ClInclude Include="CCDirector.h" />
<ClInclude Include="..\shaders\ccShader_PositionColorLengthTexture_vert.h" /> <ClInclude Include="CCDrawingPrimitives.h" />
<ClInclude Include="..\shaders\ccShader_PositionColor_frag.h" /> <ClInclude Include="CCDrawNode.h" />
<ClInclude Include="..\shaders\ccShader_PositionColor_vert.h" /> <ClInclude Include="CCEvent.h" />
<ClInclude Include="..\shaders\ccShader_PositionTextureA8Color_frag.h" /> <ClInclude Include="CCEventAcceleration.h" />
<ClInclude Include="..\shaders\ccShader_PositionTextureA8Color_vert.h" /> <ClInclude Include="CCEventCustom.h" />
<ClInclude Include="..\shaders\ccShader_PositionTextureColorAlphaTest_frag.h" /> <ClInclude Include="CCEventDispatcher.h" />
<ClInclude Include="..\shaders\ccShader_PositionTextureColor_frag.h" /> <ClInclude Include="CCEventKeyboard.h" />
<ClInclude Include="..\shaders\ccShader_PositionTextureColor_vert.h" /> <ClInclude Include="CCEventListener.h" />
<ClInclude Include="..\shaders\ccShader_PositionTexture_frag.h" /> <ClInclude Include="CCEventListenerAcceleration.h" />
<ClInclude Include="..\shaders\ccShader_PositionTexture_uColor_frag.h" /> <ClInclude Include="CCEventListenerCustom.h" />
<ClInclude Include="..\shaders\ccShader_PositionTexture_uColor_vert.h" /> <ClInclude Include="CCEventListenerKeyboard.h" />
<ClInclude Include="..\shaders\ccShader_PositionTexture_vert.h" /> <ClInclude Include="CCEventListenerTouch.h" />
<ClInclude Include="..\shaders\ccShader_Position_uColor_frag.h" /> <ClInclude Include="CCEventTouch.h" />
<ClInclude Include="..\shaders\ccShader_Position_uColor_vert.h" /> <ClInclude Include="CCEventType.h" />
<ClInclude Include="..\sprite_nodes\CCAnimation.h" /> <ClInclude Include="CCFont.h" />
<ClInclude Include="..\sprite_nodes\CCAnimationCache.h" /> <ClInclude Include="CCFontAtlas.h" />
<ClInclude Include="..\sprite_nodes\CCSprite.h" /> <ClInclude Include="CCFontAtlasCache.h" />
<ClInclude Include="..\sprite_nodes\CCSpriteBatchNode.h" /> <ClInclude Include="CCFontAtlasFactory.h" />
<ClInclude Include="..\sprite_nodes\CCSpriteFrame.h" /> <ClInclude Include="CCFontDefinition.h" />
<ClInclude Include="..\sprite_nodes\CCSpriteFrameCache.h" /> <ClInclude Include="CCFontFNT.h" />
<ClInclude Include="..\support\base64.h" /> <ClInclude Include="CCFontFreeType.h" />
<ClInclude Include="..\support\CCNotificationCenter.h" /> <ClInclude Include="ccFPSImages.h" />
<ClInclude Include="..\support\CCProfiling.h" /> <ClInclude Include="CCGLProgram.h" />
<ClInclude Include="..\support\ccUTF8.h" /> <ClInclude Include="ccGLStateCache.h" />
<ClInclude Include="..\support\ccUtils.h" /> <ClInclude Include="CCGrabber.h" />
<ClInclude Include="..\support\CCVertex.h" /> <ClInclude Include="CCGrid.h" />
<ClInclude Include="..\support\component\CCComponent.h" /> <ClInclude Include="CCIMEDelegate.h" />
<ClInclude Include="..\support\component\CCComponentContainer.h" /> <ClInclude Include="CCIMEDispatcher.h" />
<ClInclude Include="..\support\tinyxml2\tinyxml2.h" /> <ClInclude Include="CCLabel.h" />
<ClInclude Include="..\support\TransformUtils.h" /> <ClInclude Include="CCLabelAtlas.h" />
<ClInclude Include="..\support\data_support\ccCArray.h" /> <ClInclude Include="CCLabelBMFont.h" />
<ClInclude Include="..\support\data_support\uthash.h" /> <ClInclude Include="CCLabelTextFormatProtocol.h" />
<ClInclude Include="..\support\data_support\utlist.h" /> <ClInclude Include="CCLabelTextFormatter.h" />
<ClInclude Include="..\support\image_support\TGAlib.h" /> <ClInclude Include="CCLabelTTF.h" />
<ClInclude Include="..\support\user_default\CCUserDefault.h" /> <ClInclude Include="CCLayer.h" />
<ClInclude Include="..\support\zip_support\ioapi.h" /> <ClInclude Include="ccMacros.h" />
<ClInclude Include="..\support\zip_support\unzip.h" /> <ClInclude Include="CCMenu.h" />
<ClInclude Include="..\support\zip_support\ZipUtils.h" /> <ClInclude Include="CCMenuItem.h" />
<ClInclude Include="..\textures\CCTexture2D.h" /> <ClInclude Include="CCMotionStreak.h" />
<ClInclude Include="..\textures\CCTextureAtlas.h" /> <ClInclude Include="CCNode.h" />
<ClInclude Include="..\textures\CCTextureCache.h" /> <ClInclude Include="CCNotificationCenter.h" />
<ClInclude Include="..\tileMap_parallax_nodes\CCParallaxNode.h" /> <ClInclude Include="CCParallaxNode.h" />
<ClInclude Include="..\tileMap_parallax_nodes\CCTileMapAtlas.h" /> <ClInclude Include="CCParticleBatchNode.h" />
<ClInclude Include="..\tileMap_parallax_nodes\CCTMXLayer.h" /> <ClInclude Include="CCParticleExamples.h" />
<ClInclude Include="..\tileMap_parallax_nodes\CCTMXObjectGroup.h" /> <ClInclude Include="CCParticleSystem.h" />
<ClInclude Include="..\tileMap_parallax_nodes\CCTMXTiledMap.h" /> <ClInclude Include="CCParticleSystemQuad.h" />
<ClInclude Include="..\tileMap_parallax_nodes\CCTMXXMLParser.h" /> <ClInclude Include="CCProfiling.h" />
<ClInclude Include="..\text_input_node\CCIMEDelegate.h" /> <ClInclude Include="CCProgressTimer.h" />
<ClInclude Include="..\text_input_node\CCIMEDispatcher.h" /> <ClInclude Include="CCProtocols.h" />
<ClInclude Include="..\text_input_node\CCTextFieldTTF.h" /> <ClInclude Include="CCRenderTexture.h" />
<ClInclude Include="..\script_support\CCScriptSupport.h" /> <ClInclude Include="CCScene.h" />
<ClInclude Include="..\kazmath\include\kazmath\aabb.h" /> <ClInclude Include="CCScheduler.h" />
<ClInclude Include="..\kazmath\include\kazmath\kazmath.h" /> <ClInclude Include="CCScriptSupport.h" />
<ClInclude Include="..\kazmath\include\kazmath\mat3.h" /> <ClInclude Include="CCShaderCache.h" />
<ClInclude Include="..\kazmath\include\kazmath\mat4.h" /> <ClInclude Include="ccShaderEx_SwitchMask_frag.h" />
<ClInclude Include="..\kazmath\include\kazmath\neon_matrix_impl.h" /> <ClInclude Include="ccShaders.h" />
<ClInclude Include="..\kazmath\include\kazmath\plane.h" /> <ClInclude Include="ccShader_PositionColorLengthTexture_frag.h" />
<ClInclude Include="..\kazmath\include\kazmath\quaternion.h" /> <ClInclude Include="ccShader_PositionColorLengthTexture_vert.h" />
<ClInclude Include="..\kazmath\include\kazmath\ray2.h" /> <ClInclude Include="ccShader_PositionColor_frag.h" />
<ClInclude Include="..\kazmath\include\kazmath\utility.h" /> <ClInclude Include="ccShader_PositionColor_vert.h" />
<ClInclude Include="..\kazmath\include\kazmath\vec2.h" /> <ClInclude Include="ccShader_PositionTextureA8Color_frag.h" />
<ClInclude Include="..\kazmath\include\kazmath\vec3.h" /> <ClInclude Include="ccShader_PositionTextureA8Color_vert.h" />
<ClInclude Include="..\kazmath\include\kazmath\vec4.h" /> <ClInclude Include="ccShader_PositionTextureColorAlphaTest_frag.h" />
<ClInclude Include="..\kazmath\include\kazmath\GL\mat4stack.h" /> <ClInclude Include="ccShader_PositionTextureColor_frag.h" />
<ClInclude Include="..\kazmath\include\kazmath\GL\matrix.h" /> <ClInclude Include="ccShader_PositionTextureColor_vert.h" />
<ClInclude Include="..\CCCamera.h" /> <ClInclude Include="ccShader_PositionTexture_frag.h" />
<ClInclude Include="..\CCConfiguration.h" /> <ClInclude Include="ccShader_PositionTexture_uColor_frag.h" />
<ClInclude Include="..\CCDirector.h" /> <ClInclude Include="ccShader_PositionTexture_uColor_vert.h" />
<ClInclude Include="..\CCScheduler.h" /> <ClInclude Include="ccShader_PositionTexture_vert.h" />
<ClInclude Include="ccShader_Position_uColor_frag.h" />
<ClInclude Include="ccShader_Position_uColor_vert.h" />
<ClInclude Include="CCSprite.h" />
<ClInclude Include="CCSpriteBatchNode.h" />
<ClInclude Include="CCSpriteFrame.h" />
<ClInclude Include="CCSpriteFrameCache.h" />
<ClInclude Include="CCTextFieldTTF.h" />
<ClInclude Include="CCTextImage.h" />
<ClInclude Include="CCTexture2D.h" />
<ClInclude Include="CCTextureAtlas.h" />
<ClInclude Include="CCTextureCache.h" />
<ClInclude Include="CCTileMapAtlas.h" />
<ClInclude Include="CCTMXLayer.h" />
<ClInclude Include="CCTMXObjectGroup.h" />
<ClInclude Include="CCTMXTiledMap.h" />
<ClInclude Include="CCTMXXMLParser.h" />
<ClInclude Include="CCTouch.h" />
<ClInclude Include="CCTransition.h" />
<ClInclude Include="CCTransitionPageTurn.h" />
<ClInclude Include="CCTransitionProgress.h" />
<ClInclude Include="ccTypes.h" />
<ClInclude Include="CCUserDefault.h" />
<ClInclude Include="ccUTF8.h" />
<ClInclude Include="ccUtils.h" />
<ClInclude Include="CCVertex.h" />
<ClInclude Include="cocos2d.h" />
<ClInclude Include="platform\CCApplicationProtocol.h" />
<ClInclude Include="platform\CCCommon.h" />
<ClInclude Include="platform\CCDevice.h" />
<ClInclude Include="platform\CCEGLViewProtocol.h" />
<ClInclude Include="platform\CCFileUtils.h" />
<ClInclude Include="platform\CCImage.h" />
<ClInclude Include="platform\CCImageCommon_cpp.h" />
<ClInclude Include="platform\CCSAXParser.h" />
<ClInclude Include="platform\CCThread.h" />
<ClInclude Include="platform\win32\CCApplication.h" />
<ClInclude Include="platform\win32\CCEGLView.h" />
<ClInclude Include="platform\win32\CCFileUtilsWin32.h" />
<ClInclude Include="platform\win32\CCGL.h" />
<ClInclude Include="platform\win32\CCPlatformDefine.h" />
<ClInclude Include="platform\win32\CCStdC.h" />
<ClInclude Include="TGAlib.h" />
<ClInclude Include="TransformUtils.h" />
<ClInclude Include="uthash.h" />
<ClInclude Include="utlist.h" />
<ClInclude Include="ZipUtils.h" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<EngineRoot>$(MSBuildThisFileDirectory)..\..\</EngineRoot>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(EngineRoot)cocos\2d;$(EngineRoot)cocos\base;$(EngineRoot)cocos\physics;$(EngineRoot)cocos\math\kazmath\include;$(EngineRoot)cocos\2d\platform\win32;$(EngineRoot)external\glfw3\include\win32;$(EngineRoot)external\win32-specific\gles\include\OGLES;</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_VARIADIC_MAX=10;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<BuildMacro Include="EngineRoot">
<Value>$(EngineRoot)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
</ItemGroup>
</Project>

View File

@ -45,28 +45,30 @@ THIS_MAKEFILE := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
ifndef COCOS_ROOT ifndef COCOS_ROOT
COCOS_ROOT := $(realpath $(dir $(THIS_MAKEFILE))/../..) COCOS_ROOT := $(realpath $(dir $(THIS_MAKEFILE))/../..)
endif endif
COCOS_SRC = $(COCOS_ROOT)/cocos2dx COCOS_SRC = $(COCOS_ROOT)/cocos/2d
OBJ_DIR ?= obj OBJ_DIR ?= obj
LIB_DIR = $(COCOS_ROOT)/lib/linux LIB_DIR = $(COCOS_ROOT)/lib/linux
BIN_DIR = bin BIN_DIR = bin
INCLUDES += \ INCLUDES += \
-I$(COCOS_SRC) \ -I$(COCOS_SRC)/ \
-I$(COCOS_SRC)/cocoa \ -I$(COCOS_SRC)/../math/kazmath/include \
-I$(COCOS_SRC)/include \
-I$(COCOS_SRC)/kazmath/include \
-I$(COCOS_SRC)/platform/linux \ -I$(COCOS_SRC)/platform/linux \
-I$(COCOS_SRC)/platform/third_party/linux/libjpeg \ -I$(COCOS_SRC)/../../external/jpeg/include/linux \
-I$(COCOS_SRC)/platform/third_party/linux/libtiff \ -I$(COCOS_SRC)/../../external/tiff/include/linux \
-I$(COCOS_SRC)/platform/third_party/linux/libwebp -I$(COCOS_SRC)/../../external/webp/include/linux \
-I$(COCOS_SRC)/../../external/tinyxml2 \
-I$(COCOS_SRC)/../../external/unzip \
-I$(COCOS_SRC)/../../external/glfw3/include/linux \
-I$(COCOS_SRC)/../physics \
-I$(COCOS_SRC)/../base \
-I$(COCOS_SRC)/../../external/chipmunk/include/chipmunk \
-I$(COCOS_SRC)/../../external/freetype2/include/linux \
-I$(COCOS_SRC)/../.. \
-I$(COCOS_SRC)/../audio/include
LBITS := $(shell getconf LONG_BIT) LBITS := $(shell getconf LONG_BIT)
ifeq ($(LBITS),64)
INCLUDES += -I$(COCOS_SRC)/platform/third_party/linux/include64
else
INCLUDES += -I$(COCOS_SRC)/platform/third_party/linux
endif
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
CCFLAGS += -g3 -O0 CCFLAGS += -g3 -O0
@ -100,22 +102,23 @@ DEPS = $(OBJECTS:.o=.d)
CORE_MAKEFILE_LIST := $(MAKEFILE_LIST) CORE_MAKEFILE_LIST := $(MAKEFILE_LIST)
-include $(DEPS) -include $(DEPS)
STATICLIBS_DIR = $(COCOS_ROOT)/external
ifeq ($(LBITS),64) ifeq ($(LBITS),64)
STATICLIBS_DIR = $(COCOS_SRC)/platform/third_party/linux/libraries/lib64 POSTFIX = 64-bit
else else
STATICLIBS_DIR = $(COCOS_SRC)/platform/third_party/linux/libraries POSTFIX = 32-bit
endif endif
STATICLIBS = $(STATICLIBS_DIR)/libfreetype.a \ STATICLIBS = $(STATICLIBS_DIR)/freetype2/prebuilt/linux/$(POSTFIX)/libfreetype.a \
$(STATICLIBS_DIR)/libjpeg.a \ $(STATICLIBS_DIR)/jpeg/prebuilt/linux/$(POSTFIX)/libjpeg.a \
$(STATICLIBS_DIR)/libtiff.a \ $(STATICLIBS_DIR)/tiff/prebuilt/linux/$(POSTFIX)/libtiff.a \
$(STATICLIBS_DIR)/libwebp.a $(STATICLIBS_DIR)/webp/prebuilt/linux/$(POSTFIX)/libwebp.a
ifneq ($(OPENAL),1) ifneq ($(OPENAL),1)
ifeq ($(LBITS),64) ifeq ($(LBITS),64)
FMOD_LIBDIR = $(COCOS_ROOT)/audio/third_party/fmod/lib64/api/lib FMOD_LIBDIR = $(COCOS_ROOT)/cocos/audio/third-party/fmod/lib64/api/lib
SHAREDLIBS += -lfmodex64 SHAREDLIBS += -lfmodex64
else else
FMOD_LIBDIR = $(COCOS_ROOT)/audio/third_party/fmod/api/lib FMOD_LIBDIR = $(COCOS_ROOT)/cocos/audio/third-party/fmod/api/lib
SHAREDLIBS += -lfmodex SHAREDLIBS += -lfmodex
endif endif
endif endif

View File

@ -42,7 +42,7 @@ LOCAL_EXPORT_LDLIBS := -lGLESv1_CM \
-lz \ -lz \
-landroid -landroid
LOCAL_WHOLE_STATIC_LIBRARIES := android_native_app_glue cocos_libpng_static cocos_jpeg_static cocos_libxml2_static cocos_libtiff_static cocos_libwebp_static LOCAL_WHOLE_STATIC_LIBRARIES := android_native_app_glue cocos_png_static cocos_jpeg_static cocos_tiff_static cocos_webp_static
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)

View File

@ -10,7 +10,7 @@
#include "ccMacros.h" #include "ccMacros.h"
#include "CCDirector.h" #include "CCDirector.h"
#include "CCTouch.h" #include "CCTouch.h"
#include "/CCIMEDispatcher.h" #include "CCIMEDispatcher.h"
#include "CCEventDispatcher.h" #include "CCEventDispatcher.h"
#include "CCEventKeyboard.h" #include "CCEventKeyboard.h"
#include <unistd.h> #include <unistd.h>

View File

@ -11,7 +11,7 @@
#include "platform/CCCommon.h" #include "platform/CCCommon.h"
#include "CCGeometry.h" #include "CCGeometry.h"
#include "platform/CCEGLViewProtocol.h" #include "platform/CCEGLViewProtocol.h"
#include "platform/third_party/linux/glfw/glfw3.h" #include "glfw3.h"
#include <set> #include <set>
bool initExtensions(); bool initExtensions();

View File

@ -26,7 +26,7 @@ THE SOFTWARE.
#include "CCSet.h" #include "CCSet.h"
#include "ccMacros.h" #include "ccMacros.h"
#include "CCDirector.h" #include "CCDirector.h"
#include "/CCIMEDispatcher.h" #include "CCIMEDispatcher.h"
#include "CCApplication.h" #include "CCApplication.h"
#include "CCTouch.h" #include "CCTouch.h"
#include "CCEventDispatcher.h" #include "CCEventDispatcher.h"

View File

@ -30,7 +30,7 @@ THE SOFTWARE.
#include "CCGeometry.h" #include "CCGeometry.h"
#include "platform/CCEGLViewProtocol.h" #include "platform/CCEGLViewProtocol.h"
#include "platform/third_party/win32/GLFW/glfw3.h" #include "glfw3.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -1,6 +1,6 @@
TARGET = libcocosdenshion.so TARGET = libcocosdenshion.so
INCLUDES += -I.. -I../include INCLUDES = -I.. -I../include
##Using OpenAL ##Using OpenAL
ifeq ($(OPENAL),1) ifeq ($(OPENAL),1)
@ -26,15 +26,15 @@ SOURCES = \
../linux/FmodAudioPlayer.cpp ../linux/FmodAudioPlayer.cpp
ifeq ($(LBITS),64) ifeq ($(LBITS),64)
INCLUDES += -I../third_party/fmod/lib64/api/inc INCLUDES += -I../third-party/fmod/lib64/api/inc
else else
INCLUDES += -I../third_party/fmod/api/inc INCLUDES += -I../third-party/fmod/api/inc
endif endif
endif endif
COCOS_ROOT = ../.. COCOS_ROOT = ../../..
include $(COCOS_ROOT)/cocos2dx/proj.linux/cocos2dx.mk include $(COCOS_ROOT)/cocos/2d/cocos2dx.mk
TARGET := $(LIB_DIR)/$(TARGET) TARGET := $(LIB_DIR)/$(TARGET)

View File

@ -11,7 +11,7 @@
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectName>libCocosDenshion</ProjectName> <ProjectName>libAudio</ProjectName>
<ProjectGuid>{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}</ProjectGuid> <ProjectGuid>{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}</ProjectGuid>
<RootNamespace>CocosDenshion.win32</RootNamespace> <RootNamespace>CocosDenshion.win32</RootNamespace>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
@ -36,9 +36,13 @@
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\2d\cocos2dx.props" />
<Import Project="..\..\2d\cocos2d_headers.props" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\2d\cocos2dx.props" />
<Import Project="..\..\2d\cocos2d_headers.props" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
@ -65,7 +69,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\Include;$(ProjectDir)..\..\cocos2dx;$(ProjectDir)..\..\cocos2dx\include;$(ProjectDir)..\..\cocos2dx\kazmath\include;$(ProjectDir)..\..\cocos2dx\platform\win32;$(ProjectDir)..\..\cocos2dx\platform\third_party\win32\OGLES;$(ProjectDir)..\..\external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -89,7 +93,7 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\Include;"$(ProjectDir)..\..\cocos2dx";"$(ProjectDir)..\..\cocos2dx\include";"$(ProjectDir)..\..\cocos2dx\kazmath\include";"$(ProjectDir)..\..\cocos2dx\platform\win32";"$(ProjectDir)..\..\cocos2dx\platform\third_party\win32\OGLES";%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>

View File

@ -62,16 +62,40 @@ Point Point::operator+(const Point& right) const
return Point(this->x + right.x, this->y + right.y); return Point(this->x + right.x, this->y + right.y);
} }
Point& Point::operator+=(const Point& right)
{
this->x += right.x;
this->y += right.y;
return *this;
}
Point Point::operator-(const Point& right) const Point Point::operator-(const Point& right) const
{ {
return Point(this->x - right.x, this->y - right.y); return Point(this->x - right.x, this->y - right.y);
} }
Point& Point::operator-=(const Point& right)
{
this->x -= right.x;
this->y -= right.y;
return *this;
}
Point Point::operator-() const Point Point::operator-() const
{ {
return Point(-x, -y); return Point(-x, -y);
} }
bool Point::operator==(const Point& right)
{
return this->x == right.x && this->y == right.y;
}
bool Point::operator!=(const Point& right)
{
return this->x != right.x || this->y != right.y;
}
Point Point::operator*(float a) const Point Point::operator*(float a) const
{ {
return Point(this->x * a, this->y * a); return Point(this->x * a, this->y * a);

View File

@ -93,16 +93,36 @@ public:
* @lua NA * @lua NA
*/ */
Point operator+(const Point& right) const; Point operator+(const Point& right) const;
/**
* @js NA
* @lua NA
*/
Point& operator+=(const Point& right);
/** /**
* @js NA * @js NA
* @lua NA * @lua NA
*/ */
Point operator-(const Point& right) const; Point operator-(const Point& right) const;
/**
* @js NA
* @lua NA
*/
Point& operator-=(const Point& right);
/** /**
* @js NA * @js NA
* @lua NA * @lua NA
*/ */
Point operator-() const; Point operator-() const;
/**
* @js NA
* @lua NA
*/
bool operator==(const Point& right);
/**
* @js NA
* @lua NA
*/
bool operator!=(const Point& right);
/** /**
* @js NA * @js NA
* @lua NA * @lua NA

View File

@ -39,10 +39,8 @@ $(LOCAL_PATH)/../../..
LOCAL_CFLAGS += -Wno-psabi LOCAL_CFLAGS += -Wno-psabi
LOCAL_EXPORT_CFLAGS += -Wno-psabi LOCAL_EXPORT_CFLAGS += -Wno-psabi
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static LOCAL_WHOLE_STATIC_LIBRARIES := cocos_extension_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)
$(call import-module,2d)
$(call import-module,extensions) $(call import-module,extensions)

View File

@ -910,6 +910,11 @@ void CCBAnimationManager::sequenceCompleted()
_lastCompletedSequenceName = runningSequenceName; _lastCompletedSequenceName = runningSequenceName;
} }
if (nextSeqId != -1)
{
runAnimationsForSequenceIdTweenDuration(nextSeqId, 0);
}
if (_delegate) if (_delegate)
{ {
// There may be another runAnimation() call in this delegate method // There may be another runAnimation() call in this delegate method
@ -920,11 +925,6 @@ void CCBAnimationManager::sequenceCompleted()
if (_target && _animationCompleteCallbackFunc) { if (_target && _animationCompleteCallbackFunc) {
(_target->*_animationCompleteCallbackFunc)(); (_target->*_animationCompleteCallbackFunc)();
} }
if (nextSeqId != -1)
{
runAnimationsForSequenceIdTweenDuration(nextSeqId, 0);
}
} }
// Custom actions // Custom actions

View File

@ -273,7 +273,7 @@ Node* CCBReader::readNodeGraphFromData(Data *pData, Object *pOwner, const Size &
Dictionary* animationManagers = Dictionary::create(); Dictionary* animationManagers = Dictionary::create();
Node *pNodeGraph = readFileWithCleanUp(true, animationManagers); Node *pNodeGraph = readFileWithCleanUp(true, animationManagers);
if (pNodeGraph && _actionManager->getAutoPlaySequenceId() != -1 && !_jsControlled) if (pNodeGraph && _actionManager->getAutoPlaySequenceId() != -1)
{ {
// Auto play animations // Auto play animations
_actionManager->runAnimationsForSequenceIdTweenDuration(_actionManager->getAutoPlaySequenceId(), 0); _actionManager->runAnimationsForSequenceIdTweenDuration(_actionManager->getAutoPlaySequenceId(), 0);

View File

@ -0,0 +1,44 @@
TARGET = libcocosbuilder.a
INCLUDES =
SOURCES = CCBFileLoader.cpp \
CCMenuItemImageLoader.cpp \
CCBReader.cpp \
CCMenuItemLoader.cpp \
CCControlButtonLoader.cpp \
CCNodeLoader.cpp \
CCControlLoader.cpp \
CCNodeLoaderLibrary.cpp \
CCLabelBMFontLoader.cpp \
CCParticleSystemQuadLoader.cpp \
CCLabelTTFLoader.cpp \
CCScale9SpriteLoader.cpp \
CCLayerColorLoader.cpp \
CCScrollViewLoader.cpp \
CCLayerGradientLoader.cpp \
CCSpriteLoader.cpp \
CCLayerLoader.cpp \
CCBAnimationManager.cpp \
CCBKeyframe.cpp \
CCBSequence.cpp \
CCBSequenceProperty.cpp \
CCBValue.cpp \
CCNode+CCBRelativePositioning.cpp
include ../../2d/cocos2dx.mk
CXXFLAGS += -Wno-multichar
TARGET := $(LIB_DIR)/$(TARGET)
all: $(TARGET)
$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_AR)$(AR) $(ARFLAGS) $@ $(OBJECTS)
$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@

View File

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}</ProjectGuid>
<RootNamespace>libCocosBuilder</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>
</SDLCheck>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)extensions;$(EngineRoot)cocos\audio\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)extensions;$(EngineRoot)cocos\audio\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\CCBAnimationManager.cpp" />
<ClCompile Include="..\CCBFileLoader.cpp" />
<ClCompile Include="..\CCBKeyframe.cpp" />
<ClCompile Include="..\CCBReader.cpp" />
<ClCompile Include="..\CCBSequence.cpp" />
<ClCompile Include="..\CCBSequenceProperty.cpp" />
<ClCompile Include="..\CCBValue.cpp" />
<ClCompile Include="..\CCControlButtonLoader.cpp" />
<ClCompile Include="..\CCControlLoader.cpp" />
<ClCompile Include="..\CCLabelBMFontLoader.cpp" />
<ClCompile Include="..\CCLabelTTFLoader.cpp" />
<ClCompile Include="..\CCLayerColorLoader.cpp" />
<ClCompile Include="..\CCLayerGradientLoader.cpp" />
<ClCompile Include="..\CCLayerLoader.cpp" />
<ClCompile Include="..\CCMenuItemImageLoader.cpp" />
<ClCompile Include="..\CCMenuItemLoader.cpp" />
<ClCompile Include="..\CCNode+CCBRelativePositioning.cpp" />
<ClCompile Include="..\CCNodeLoader.cpp" />
<ClCompile Include="..\CCNodeLoaderLibrary.cpp" />
<ClCompile Include="..\CCParticleSystemQuadLoader.cpp" />
<ClCompile Include="..\CCScale9SpriteLoader.cpp" />
<ClCompile Include="..\CCScrollViewLoader.cpp" />
<ClCompile Include="..\CCSpriteLoader.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\CCBAnimationManager.h" />
<ClInclude Include="..\CCBFileLoader.h" />
<ClInclude Include="..\CCBKeyframe.h" />
<ClInclude Include="..\CCBMemberVariableAssigner.h" />
<ClInclude Include="..\CCBReader.h" />
<ClInclude Include="..\CCBSelectorResolver.h" />
<ClInclude Include="..\CCBSequence.h" />
<ClInclude Include="..\CCBSequenceProperty.h" />
<ClInclude Include="..\CCBValue.h" />
<ClInclude Include="..\CCControlButtonLoader.h" />
<ClInclude Include="..\CCControlLoader.h" />
<ClInclude Include="..\CCLabelBMFontLoader.h" />
<ClInclude Include="..\CCLabelTTFLoader.h" />
<ClInclude Include="..\CCLayerColorLoader.h" />
<ClInclude Include="..\CCLayerGradientLoader.h" />
<ClInclude Include="..\CCLayerLoader.h" />
<ClInclude Include="..\CCMenuItemImageLoader.h" />
<ClInclude Include="..\CCMenuItemLoader.h" />
<ClInclude Include="..\CCMenuLoader.h" />
<ClInclude Include="..\CCNode+CCBRelativePositioning.h" />
<ClInclude Include="..\CCNodeLoader.h" />
<ClInclude Include="..\CCNodeLoaderLibrary.h" />
<ClInclude Include="..\CCNodeLoaderListener.h" />
<ClInclude Include="..\CCParticleSystemQuadLoader.h" />
<ClInclude Include="..\CCScale9SpriteLoader.h" />
<ClInclude Include="..\CCScrollViewLoader.h" />
<ClInclude Include="..\CCSpriteLoader.h" />
<ClInclude Include="..\CocosBuilder.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\CCBSequenceProperty.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCBValue.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCControlButtonLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCControlLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCLabelBMFontLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCLabelTTFLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCLayerColorLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCLayerGradientLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCLayerLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCMenuItemImageLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCMenuItemLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCNode+CCBRelativePositioning.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCNodeLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCNodeLoaderLibrary.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCParticleSystemQuadLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCScale9SpriteLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCScrollViewLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCSpriteLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCBAnimationManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCBFileLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCBKeyframe.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCBReader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCBSequence.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\CCParticleSystemQuadLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCScale9SpriteLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCScrollViewLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCSpriteLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CocosBuilder.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCBAnimationManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCBFileLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCBKeyframe.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCBMemberVariableAssigner.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCBReader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCBSelectorResolver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCBSequence.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCBSequenceProperty.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCBValue.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCControlButtonLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCControlLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCLabelBMFontLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCLabelTTFLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCLayerColorLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCLayerGradientLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCLayerLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCMenuItemImageLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCMenuItemLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCMenuLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCNode+CCBRelativePositioning.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCNodeLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCNodeLoaderLibrary.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCNodeLoaderListener.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -43,13 +43,12 @@ CCSSceneReader.cpp \
../../../external/json/json_writer.cpp ../../../external/json/json_writer.cpp
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \
$(LOCAL_PATH)/../../../external/json $(LOCAL_PATH)/../../../external
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../2d \ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../2d \
$(LOCAL_PATH)/../../../external/json \ $(LOCAL_PATH)/../../../external \
$(LOCAL_PATH)/.. \ $(LOCAL_PATH)/.. \
$(LOCAL_PATH)/../.. \ $(LOCAL_PATH)/../..
$(LOCAL_PATH)/../../../external
LOCAL_CFLAGS += -Wno-psabi -fexceptions LOCAL_CFLAGS += -Wno-psabi -fexceptions
LOCAL_EXPORT_CFLAGS += -Wno-psabi LOCAL_EXPORT_CFLAGS += -Wno-psabi

View File

@ -0,0 +1,69 @@
TARGET = libcocostudio.a
COCOS_ROOT=../../..
INCLUDES = -I../../2d \
-I../../../external \
-I.. \
-I../.. \
SOURCES = CCActionFrame.cpp \
CCActionFrameEasing.cpp \
CCActionManagerEx.cpp \
CCActionNode.cpp \
CCActionObject.cpp \
CCArmature.cpp \
CCBone.cpp \
CCArmatureAnimation.cpp \
CCProcessBase.cpp \
CCTween.cpp \
CCDatas.cpp \
CCBatchNode.cpp \
CCDecorativeDisplay.cpp \
CCDisplayFactory.cpp \
CCDisplayManager.cpp \
CCSkin.cpp \
CCColliderDetector.cpp \
CCArmatureDataManager.cpp \
CCArmatureDefine.cpp \
CCDataReaderHelper.cpp \
CCSpriteFrameCacheHelper.cpp \
CCTransformHelp.cpp \
CCTweenFunction.cpp \
CCUtilMath.cpp \
CCComAttribute.cpp \
CCComAudio.cpp \
CCComController.cpp \
CCComRender.cpp \
CCInputDelegate.cpp \
CSContentJsonDictionary.cpp \
DictionaryHelper.cpp \
CCSGUIReader.cpp \
CCSSceneReader.cpp \
../../../external/json/json_reader.cpp \
../../../external/json/json_value.cpp \
../../../external/json/json_writer.cpp
include ../../2d/cocos2dx.mk
CXXFLAGS += -Wno-multichar
TARGET := $(LIB_DIR)/$(TARGET)
all: $(TARGET)
$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_AR)$(AR) $(ARFLAGS) $@ $(OBJECTS)
$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
$(OBJ_DIR)/%.o: ../../../%.cpp $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
$(OBJ_DIR)/%.o: %.c $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_CC)$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@

View File

@ -0,0 +1,174 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\external\json\json_reader.cpp" />
<ClCompile Include="..\..\..\..\external\json\json_value.cpp" />
<ClCompile Include="..\..\..\..\external\json\json_writer.cpp" />
<ClCompile Include="..\CCActionFrame.cpp" />
<ClCompile Include="..\CCActionFrameEasing.cpp" />
<ClCompile Include="..\CCActionManagerEx.cpp" />
<ClCompile Include="..\CCActionNode.cpp" />
<ClCompile Include="..\CCActionObject.cpp" />
<ClCompile Include="..\CCArmature.cpp" />
<ClCompile Include="..\CCArmatureAnimation.cpp" />
<ClCompile Include="..\CCArmatureDataManager.cpp" />
<ClCompile Include="..\CCArmatureDefine.cpp" />
<ClCompile Include="..\CCBatchNode.cpp" />
<ClCompile Include="..\CCBone.cpp" />
<ClCompile Include="..\CCColliderDetector.cpp" />
<ClCompile Include="..\CCComAttribute.cpp" />
<ClCompile Include="..\CCComAudio.cpp" />
<ClCompile Include="..\CCComController.cpp" />
<ClCompile Include="..\CCComRender.cpp" />
<ClCompile Include="..\CCDataReaderHelper.cpp" />
<ClCompile Include="..\CCDatas.cpp" />
<ClCompile Include="..\CCDecorativeDisplay.cpp" />
<ClCompile Include="..\CCDisplayFactory.cpp" />
<ClCompile Include="..\CCDisplayManager.cpp" />
<ClCompile Include="..\CCInputDelegate.cpp" />
<ClCompile Include="..\CCProcessBase.cpp" />
<ClCompile Include="..\CCSGUIReader.cpp" />
<ClCompile Include="..\CCSkin.cpp" />
<ClCompile Include="..\CCSpriteFrameCacheHelper.cpp" />
<ClCompile Include="..\CCSSceneReader.cpp" />
<ClCompile Include="..\CCTransformHelp.cpp" />
<ClCompile Include="..\CCTween.cpp" />
<ClCompile Include="..\CCTweenFunction.cpp" />
<ClCompile Include="..\CCUtilMath.cpp" />
<ClCompile Include="..\CSContentJsonDictionary.cpp" />
<ClCompile Include="..\DictionaryHelper.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\external\json\autolink.h" />
<ClInclude Include="..\..\..\..\external\json\config.h" />
<ClInclude Include="..\..\..\..\external\json\features.h" />
<ClInclude Include="..\..\..\..\external\json\forwards.h" />
<ClInclude Include="..\..\..\..\external\json\json.h" />
<ClInclude Include="..\..\..\..\external\json\json_batchallocator.h" />
<ClInclude Include="..\..\..\..\external\json\reader.h" />
<ClInclude Include="..\..\..\..\external\json\value.h" />
<ClInclude Include="..\..\..\..\external\json\writer.h" />
<ClInclude Include="..\CCActionFrame.h" />
<ClInclude Include="..\CCActionFrameEasing.h" />
<ClInclude Include="..\CCActionManagerEx.h" />
<ClInclude Include="..\CCActionNode.h" />
<ClInclude Include="..\CCActionObject.h" />
<ClInclude Include="..\CCArmature.h" />
<ClInclude Include="..\CCArmatureAnimation.h" />
<ClInclude Include="..\CCArmatureDataManager.h" />
<ClInclude Include="..\CCArmatureDefine.h" />
<ClInclude Include="..\CCBatchNode.h" />
<ClInclude Include="..\CCBone.h" />
<ClInclude Include="..\CCColliderDetector.h" />
<ClInclude Include="..\CCComAttribute.h" />
<ClInclude Include="..\CCComAudio.h" />
<ClInclude Include="..\CCComController.h" />
<ClInclude Include="..\CCComRender.h" />
<ClInclude Include="..\CCDataReaderHelper.h" />
<ClInclude Include="..\CCDatas.h" />
<ClInclude Include="..\CCDecorativeDisplay.h" />
<ClInclude Include="..\CCDisplayFactory.h" />
<ClInclude Include="..\CCDisplayManager.h" />
<ClInclude Include="..\CCInputDelegate.h" />
<ClInclude Include="..\CCProcessBase.h" />
<ClInclude Include="..\CCSGUIReader.h" />
<ClInclude Include="..\CCSkin.h" />
<ClInclude Include="..\CCSpriteFrameCacheHelper.h" />
<ClInclude Include="..\CCSSceneReader.h" />
<ClInclude Include="..\CCTransformHelp.h" />
<ClInclude Include="..\CCTween.h" />
<ClInclude Include="..\CCTweenFunction.h" />
<ClInclude Include="..\CCUtilMath.h" />
<ClInclude Include="..\CSContentJsonDictionary.h" />
<ClInclude Include="..\DictionaryHelper.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\..\external\json\json_internalarray.inl" />
<None Include="..\..\..\..\external\json\json_internalmap.inl" />
<None Include="..\..\..\..\external\json\json_valueiterator.inl" />
<None Include="..\..\..\..\external\json\sconscript" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B57CF53F-2E49-4031-9822-047CC0E6BDE2}</ProjectGuid>
<RootNamespace>libCocosStudio</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>
</SDLCheck>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,290 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="action">
<UniqueIdentifier>{d793b86c-0905-4c9b-b6bc-161e351c9eb2}</UniqueIdentifier>
</Filter>
<Filter Include="armature">
<UniqueIdentifier>{855f2366-3429-4f77-a080-a41a39c99270}</UniqueIdentifier>
</Filter>
<Filter Include="components">
<UniqueIdentifier>{1a8c6b14-fb28-4485-8417-9b6838fbc4ef}</UniqueIdentifier>
</Filter>
<Filter Include="json">
<UniqueIdentifier>{42f1ce3f-46ab-4a16-a96e-9eb076c873f7}</UniqueIdentifier>
</Filter>
<Filter Include="reader">
<UniqueIdentifier>{f8271f80-1663-4425-91c8-7365ec3af017}</UniqueIdentifier>
</Filter>
<Filter Include="armature\animation">
<UniqueIdentifier>{48f28446-ffe4-4aa1-a34c-8968c3367ae6}</UniqueIdentifier>
</Filter>
<Filter Include="armature\datas">
<UniqueIdentifier>{ad9b4fd1-dc17-4704-9c60-7709eb916f13}</UniqueIdentifier>
</Filter>
<Filter Include="armature\display">
<UniqueIdentifier>{55c682b3-7a48-4fab-ad5a-eb979f3c305e}</UniqueIdentifier>
</Filter>
<Filter Include="armature\physics">
<UniqueIdentifier>{c6464479-e0ab-4afc-96fc-1ffc73e40232}</UniqueIdentifier>
</Filter>
<Filter Include="armature\utils">
<UniqueIdentifier>{023e3440-1259-4981-ba54-24390d1df447}</UniqueIdentifier>
</Filter>
<Filter Include="json\libjson">
<UniqueIdentifier>{e8d09ad5-8816-4724-a10b-04263868ed7c}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\CCActionFrameEasing.cpp">
<Filter>action</Filter>
</ClCompile>
<ClCompile Include="..\CCActionManagerEx.cpp">
<Filter>action</Filter>
</ClCompile>
<ClCompile Include="..\CCActionNode.cpp">
<Filter>action</Filter>
</ClCompile>
<ClCompile Include="..\CCActionObject.cpp">
<Filter>action</Filter>
</ClCompile>
<ClCompile Include="..\CCActionFrame.cpp">
<Filter>action</Filter>
</ClCompile>
<ClCompile Include="..\CCComAttribute.cpp">
<Filter>components</Filter>
</ClCompile>
<ClCompile Include="..\CCComAudio.cpp">
<Filter>components</Filter>
</ClCompile>
<ClCompile Include="..\CCComController.cpp">
<Filter>components</Filter>
</ClCompile>
<ClCompile Include="..\CCComRender.cpp">
<Filter>components</Filter>
</ClCompile>
<ClCompile Include="..\CCInputDelegate.cpp">
<Filter>components</Filter>
</ClCompile>
<ClCompile Include="..\DictionaryHelper.cpp">
<Filter>json</Filter>
</ClCompile>
<ClCompile Include="..\CSContentJsonDictionary.cpp">
<Filter>json</Filter>
</ClCompile>
<ClCompile Include="..\CCSSceneReader.cpp">
<Filter>reader</Filter>
</ClCompile>
<ClCompile Include="..\CCSGUIReader.cpp">
<Filter>reader</Filter>
</ClCompile>
<ClCompile Include="..\CCTween.cpp">
<Filter>armature\animation</Filter>
</ClCompile>
<ClCompile Include="..\CCProcessBase.cpp">
<Filter>armature\animation</Filter>
</ClCompile>
<ClCompile Include="..\CCArmatureAnimation.cpp">
<Filter>armature\animation</Filter>
</ClCompile>
<ClCompile Include="..\CCDatas.cpp">
<Filter>armature\datas</Filter>
</ClCompile>
<ClCompile Include="..\CCBatchNode.cpp">
<Filter>armature\display</Filter>
</ClCompile>
<ClCompile Include="..\CCDecorativeDisplay.cpp">
<Filter>armature\display</Filter>
</ClCompile>
<ClCompile Include="..\CCDisplayFactory.cpp">
<Filter>armature\display</Filter>
</ClCompile>
<ClCompile Include="..\CCDisplayManager.cpp">
<Filter>armature\display</Filter>
</ClCompile>
<ClCompile Include="..\CCSkin.cpp">
<Filter>armature\display</Filter>
</ClCompile>
<ClCompile Include="..\CCArmatureDataManager.cpp">
<Filter>armature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CCArmatureDefine.cpp">
<Filter>armature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CCDataReaderHelper.cpp">
<Filter>armature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CCSpriteFrameCacheHelper.cpp">
<Filter>armature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CCTransformHelp.cpp">
<Filter>armature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CCTweenFunction.cpp">
<Filter>armature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CCUtilMath.cpp">
<Filter>armature\utils</Filter>
</ClCompile>
<ClCompile Include="..\CCColliderDetector.cpp">
<Filter>armature\physics</Filter>
</ClCompile>
<ClCompile Include="..\CCArmature.cpp">
<Filter>armature</Filter>
</ClCompile>
<ClCompile Include="..\CCBone.cpp">
<Filter>armature</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\external\json\json_reader.cpp">
<Filter>json\libjson</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\external\json\json_value.cpp">
<Filter>json\libjson</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\external\json\json_writer.cpp">
<Filter>json\libjson</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\CCActionFrameEasing.h">
<Filter>action</Filter>
</ClInclude>
<ClInclude Include="..\CCActionManagerEx.h">
<Filter>action</Filter>
</ClInclude>
<ClInclude Include="..\CCActionNode.h">
<Filter>action</Filter>
</ClInclude>
<ClInclude Include="..\CCActionObject.h">
<Filter>action</Filter>
</ClInclude>
<ClInclude Include="..\CCActionFrame.h">
<Filter>action</Filter>
</ClInclude>
<ClInclude Include="..\CCComAttribute.h">
<Filter>components</Filter>
</ClInclude>
<ClInclude Include="..\CCComAudio.h">
<Filter>components</Filter>
</ClInclude>
<ClInclude Include="..\CCComController.h">
<Filter>components</Filter>
</ClInclude>
<ClInclude Include="..\CCComRender.h">
<Filter>components</Filter>
</ClInclude>
<ClInclude Include="..\CCInputDelegate.h">
<Filter>components</Filter>
</ClInclude>
<ClInclude Include="..\DictionaryHelper.h">
<Filter>json</Filter>
</ClInclude>
<ClInclude Include="..\CSContentJsonDictionary.h">
<Filter>json</Filter>
</ClInclude>
<ClInclude Include="..\CCSSceneReader.h">
<Filter>reader</Filter>
</ClInclude>
<ClInclude Include="..\CCSGUIReader.h">
<Filter>reader</Filter>
</ClInclude>
<ClInclude Include="..\CCTween.h">
<Filter>armature\animation</Filter>
</ClInclude>
<ClInclude Include="..\CCProcessBase.h">
<Filter>armature\animation</Filter>
</ClInclude>
<ClInclude Include="..\CCArmatureAnimation.h">
<Filter>armature\animation</Filter>
</ClInclude>
<ClInclude Include="..\CCDatas.h">
<Filter>armature\datas</Filter>
</ClInclude>
<ClInclude Include="..\CCBatchNode.h">
<Filter>armature\display</Filter>
</ClInclude>
<ClInclude Include="..\CCDecorativeDisplay.h">
<Filter>armature\display</Filter>
</ClInclude>
<ClInclude Include="..\CCDisplayFactory.h">
<Filter>armature\display</Filter>
</ClInclude>
<ClInclude Include="..\CCDisplayManager.h">
<Filter>armature\display</Filter>
</ClInclude>
<ClInclude Include="..\CCSkin.h">
<Filter>armature\display</Filter>
</ClInclude>
<ClInclude Include="..\CCArmatureDataManager.h">
<Filter>armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCArmatureDefine.h">
<Filter>armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCDataReaderHelper.h">
<Filter>armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCSpriteFrameCacheHelper.h">
<Filter>armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCTransformHelp.h">
<Filter>armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCTweenFunction.h">
<Filter>armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCUtilMath.h">
<Filter>armature\utils</Filter>
</ClInclude>
<ClInclude Include="..\CCColliderDetector.h">
<Filter>armature\physics</Filter>
</ClInclude>
<ClInclude Include="..\CCArmature.h">
<Filter>armature</Filter>
</ClInclude>
<ClInclude Include="..\CCBone.h">
<Filter>armature</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\external\json\forwards.h">
<Filter>json\libjson</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\external\json\json.h">
<Filter>json\libjson</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\external\json\json_batchallocator.h">
<Filter>json\libjson</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\external\json\reader.h">
<Filter>json\libjson</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\external\json\value.h">
<Filter>json\libjson</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\external\json\writer.h">
<Filter>json\libjson</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\external\json\autolink.h">
<Filter>json\libjson</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\external\json\config.h">
<Filter>json\libjson</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\external\json\features.h">
<Filter>json\libjson</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\..\external\json\json_internalarray.inl">
<Filter>json\libjson</Filter>
</None>
<None Include="..\..\..\..\external\json\json_internalmap.inl">
<Filter>json\libjson</Filter>
</None>
<None Include="..\..\..\..\external\json\json_valueiterator.inl">
<Filter>json\libjson</Filter>
</None>
<None Include="..\..\..\..\external\json\sconscript">
<Filter>json\libjson</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -0,0 +1,42 @@
TARGET = libspine.a
INCLUDES = -I..
SOURCES = Animation.cpp \
AnimationState.cpp \
AnimationStateData.cpp \
Atlas.cpp \
AtlasAttachmentLoader.cpp \
Attachment.cpp \
AttachmentLoader.cpp \
Bone.cpp \
BoneData.cpp \
Json.cpp \
RegionAttachment.cpp \
Skeleton.cpp \
SkeletonData.cpp \
SkeletonJson.cpp \
Skin.cpp \
Slot.cpp \
SlotData.cpp \
extension.cpp \
spine-cocos2dx.cpp \
CCSkeleton.cpp \
CCSkeletonAnimation.cpp
include ../../2d/cocos2dx.mk
CXXFLAGS += -Wno-multichar
TARGET := $(LIB_DIR)/$(TARGET)
all: $(TARGET)
$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_AR)$(AR) $(ARFLAGS) $@ $(OBJECTS)
$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@

View File

@ -0,0 +1,134 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\Animation.h" />
<ClInclude Include="..\AnimationState.h" />
<ClInclude Include="..\AnimationStateData.h" />
<ClInclude Include="..\Atlas.h" />
<ClInclude Include="..\AtlasAttachmentLoader.h" />
<ClInclude Include="..\Attachment.h" />
<ClInclude Include="..\AttachmentLoader.h" />
<ClInclude Include="..\Bone.h" />
<ClInclude Include="..\BoneData.h" />
<ClInclude Include="..\CCSkeleton.h" />
<ClInclude Include="..\CCSkeletonAnimation.h" />
<ClInclude Include="..\extension.h" />
<ClInclude Include="..\Json.h" />
<ClInclude Include="..\RegionAttachment.h" />
<ClInclude Include="..\Skeleton.h" />
<ClInclude Include="..\SkeletonData.h" />
<ClInclude Include="..\SkeletonJson.h" />
<ClInclude Include="..\Skin.h" />
<ClInclude Include="..\Slot.h" />
<ClInclude Include="..\SlotData.h" />
<ClInclude Include="..\spine-cocos2dx.h" />
<ClInclude Include="..\spine.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Animation.cpp" />
<ClCompile Include="..\AnimationState.cpp" />
<ClCompile Include="..\AnimationStateData.cpp" />
<ClCompile Include="..\Atlas.cpp" />
<ClCompile Include="..\AtlasAttachmentLoader.cpp" />
<ClCompile Include="..\Attachment.cpp" />
<ClCompile Include="..\AttachmentLoader.cpp" />
<ClCompile Include="..\Bone.cpp" />
<ClCompile Include="..\BoneData.cpp" />
<ClCompile Include="..\CCSkeleton.cpp" />
<ClCompile Include="..\CCSkeletonAnimation.cpp" />
<ClCompile Include="..\extension.cpp" />
<ClCompile Include="..\Json.cpp" />
<ClCompile Include="..\RegionAttachment.cpp" />
<ClCompile Include="..\Skeleton.cpp" />
<ClCompile Include="..\SkeletonData.cpp" />
<ClCompile Include="..\SkeletonJson.cpp" />
<ClCompile Include="..\Skin.cpp" />
<ClCompile Include="..\Slot.cpp" />
<ClCompile Include="..\SlotData.cpp" />
<ClCompile Include="..\spine-cocos2dx.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}</ProjectGuid>
<RootNamespace>libSpine</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>
</SDLCheck>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\SlotData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\spine.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\spine-cocos2dx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Animation.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\AnimationState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\AnimationStateData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Atlas.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\AtlasAttachmentLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Attachment.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\AttachmentLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Bone.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\BoneData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCSkeleton.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCSkeletonAnimation.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\extension.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Json.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\RegionAttachment.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Skeleton.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\SkeletonData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\SkeletonJson.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Skin.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Slot.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Skeleton.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\SkeletonData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\SkeletonJson.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Skin.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Slot.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\SlotData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\spine-cocos2dx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Animation.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\AnimationState.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\AnimationStateData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Atlas.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\AtlasAttachmentLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Attachment.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\AttachmentLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Bone.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\BoneData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCSkeleton.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCSkeletonAnimation.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\extension.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Json.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\RegionAttachment.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -29,21 +29,22 @@ UISlider.cpp \
UITextField.cpp UITextField.cpp
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \
$(LOCAL_PATH)/../editor-support
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../2d \ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../2d \
$(LOCAL_PATH)/.. $(LOCAL_PATH)/../../external \
$(LOCAL_PATH)/.. \
$(LOCAL_PATH)/../.. \
$(LOCAL_PATH)/../editor-support
LOCAL_CFLAGS += -Wno-psabi LOCAL_CFLAGS += -Wno-psabi
LOCAL_EXPORT_CFLAGS += -Wno-psabi LOCAL_EXPORT_CFLAGS += -Wno-psabi
LOCAL_WHOLE_STATIC_LIBRARIES := cocostudio_static LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dx_static
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)
$(call import-module,extensions) $(call import-module,extensions)
$(call import-module,editor-support/cocostudio)
$(call import-module,2d) $(call import-module,2d)

View File

@ -22,7 +22,7 @@
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#include "gui/layout.h" #include "gui/Layout.h"
#include "gui/UILayer.h" #include "gui/UILayer.h"
#include "gui/UIHelper.h" #include "gui/UIHelper.h"
#include "extensions/GUI/CCControlExtension/CCScale9Sprite.h" #include "extensions/GUI/CCControlExtension/CCScale9Sprite.h"
@ -782,4 +782,4 @@ bool RectClippingNode::isEnabled() const
return _enabled; return _enabled;
} }
} }

44
cocos/gui/Makefile Normal file
View File

@ -0,0 +1,44 @@
TARGET = libgui.a
INCLUDES = -I../ \
-I../editor-support \
-I../../external
SOURCES = UIRootWidget.cpp \
UIWidget.cpp \
Layout.cpp \
LayoutParameter.cpp \
UILayoutDefine.cpp \
CocosGUI.cpp \
UIHelper.cpp \
UIInputManager.cpp \
UILayer.cpp \
UIDragPanel.cpp \
UIListView.cpp \
UIPageView.cpp \
UIScrollView.cpp \
UIButton.cpp \
UICheckBox.cpp \
UIImageView.cpp \
UILabel.cpp \
UILabelAtlas.cpp \
UILabelBMFont.cpp \
UILoadingBar.cpp \
UISlider.cpp \
UITextField.cpp
include ../2d/cocos2dx.mk
CXXFLAGS += -Wno-multichar
TARGET := $(LIB_DIR)/$(TARGET)
all: $(TARGET)
$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_AR)$(AR) $(ARFLAGS) $@ $(OBJECTS)
$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@

View File

@ -0,0 +1,136 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\CocosGUI.h" />
<ClInclude Include="..\Layout.h" />
<ClInclude Include="..\LayoutParameter.h" />
<ClInclude Include="..\UIButton.h" />
<ClInclude Include="..\UICheckBox.h" />
<ClInclude Include="..\UIDragPanel.h" />
<ClInclude Include="..\UIHelper.h" />
<ClInclude Include="..\UIImageView.h" />
<ClInclude Include="..\UIInputManager.h" />
<ClInclude Include="..\UILabel.h" />
<ClInclude Include="..\UILabelAtlas.h" />
<ClInclude Include="..\UILabelBMFont.h" />
<ClInclude Include="..\UILayer.h" />
<ClInclude Include="..\UILayoutDefine.h" />
<ClInclude Include="..\UIListView.h" />
<ClInclude Include="..\UILoadingBar.h" />
<ClInclude Include="..\UIPageView.h" />
<ClInclude Include="..\UIRootWidget.h" />
<ClInclude Include="..\UIScrollInterface.h" />
<ClInclude Include="..\UIScrollView.h" />
<ClInclude Include="..\UISlider.h" />
<ClInclude Include="..\UITextField.h" />
<ClInclude Include="..\UIWidget.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\CocosGUI.cpp" />
<ClCompile Include="..\Layout.cpp" />
<ClCompile Include="..\LayoutParameter.cpp" />
<ClCompile Include="..\UIButton.cpp" />
<ClCompile Include="..\UICheckBox.cpp" />
<ClCompile Include="..\UIDragPanel.cpp" />
<ClCompile Include="..\UIHelper.cpp" />
<ClCompile Include="..\UIImageView.cpp" />
<ClCompile Include="..\UIInputManager.cpp" />
<ClCompile Include="..\UILabel.cpp" />
<ClCompile Include="..\UILabelAtlas.cpp" />
<ClCompile Include="..\UILabelBMFont.cpp" />
<ClCompile Include="..\UILayer.cpp" />
<ClCompile Include="..\UILayoutDefine.cpp" />
<ClCompile Include="..\UIListView.cpp" />
<ClCompile Include="..\UILoadingBar.cpp" />
<ClCompile Include="..\UIPageView.cpp" />
<ClCompile Include="..\UIRootWidget.cpp" />
<ClCompile Include="..\UIScrollView.cpp" />
<ClCompile Include="..\UISlider.cpp" />
<ClCompile Include="..\UITextField.cpp" />
<ClCompile Include="..\UIWidget.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7E06E92C-537A-442B-9E4A-4761C84F8A1A}</ProjectGuid>
<RootNamespace>libGUI</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>
</SDLCheck>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)external;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="BaseClasses">
<UniqueIdentifier>{e31ab7d3-b8b2-467f-9e08-fd5fe168b491}</UniqueIdentifier>
</Filter>
<Filter Include="Layouts">
<UniqueIdentifier>{f9d13563-9e5e-4b35-b0e7-d41f587efa42}</UniqueIdentifier>
</Filter>
<Filter Include="System">
<UniqueIdentifier>{ed8a2ae0-5690-4d0d-829b-7c07164c0597}</UniqueIdentifier>
</Filter>
<Filter Include="UIWidgets">
<UniqueIdentifier>{5f6e9e52-fbe7-4073-ac71-98632f9e6781}</UniqueIdentifier>
</Filter>
<Filter Include="UIWidgets\ScrollWidget">
<UniqueIdentifier>{b59b178a-b7e0-4826-ba07-44c46cd29a10}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\UIScrollInterface.h">
<Filter>UIWidgets\ScrollWidget</Filter>
</ClInclude>
<ClInclude Include="..\UIScrollView.h">
<Filter>UIWidgets\ScrollWidget</Filter>
</ClInclude>
<ClInclude Include="..\UIDragPanel.h">
<Filter>UIWidgets\ScrollWidget</Filter>
</ClInclude>
<ClInclude Include="..\UIListView.h">
<Filter>UIWidgets\ScrollWidget</Filter>
</ClInclude>
<ClInclude Include="..\UIPageView.h">
<Filter>UIWidgets\ScrollWidget</Filter>
</ClInclude>
<ClInclude Include="..\UIButton.h">
<Filter>UIWidgets</Filter>
</ClInclude>
<ClInclude Include="..\UICheckBox.h">
<Filter>UIWidgets</Filter>
</ClInclude>
<ClInclude Include="..\UIImageView.h">
<Filter>UIWidgets</Filter>
</ClInclude>
<ClInclude Include="..\UILabel.h">
<Filter>UIWidgets</Filter>
</ClInclude>
<ClInclude Include="..\UILabelAtlas.h">
<Filter>UIWidgets</Filter>
</ClInclude>
<ClInclude Include="..\UILabelBMFont.h">
<Filter>UIWidgets</Filter>
</ClInclude>
<ClInclude Include="..\UISlider.h">
<Filter>UIWidgets</Filter>
</ClInclude>
<ClInclude Include="..\UITextField.h">
<Filter>UIWidgets</Filter>
</ClInclude>
<ClInclude Include="..\UILoadingBar.h">
<Filter>UIWidgets</Filter>
</ClInclude>
<ClInclude Include="..\UIHelper.h">
<Filter>System</Filter>
</ClInclude>
<ClInclude Include="..\CocosGUI.h">
<Filter>System</Filter>
</ClInclude>
<ClInclude Include="..\UIInputManager.h">
<Filter>System</Filter>
</ClInclude>
<ClInclude Include="..\UILayer.h">
<Filter>System</Filter>
</ClInclude>
<ClInclude Include="..\Layout.h">
<Filter>Layouts</Filter>
</ClInclude>
<ClInclude Include="..\LayoutParameter.h">
<Filter>Layouts</Filter>
</ClInclude>
<ClInclude Include="..\UILayoutDefine.h">
<Filter>Layouts</Filter>
</ClInclude>
<ClInclude Include="..\UIRootWidget.h">
<Filter>BaseClasses</Filter>
</ClInclude>
<ClInclude Include="..\UIWidget.h">
<Filter>BaseClasses</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\UIScrollView.cpp">
<Filter>UIWidgets\ScrollWidget</Filter>
</ClCompile>
<ClCompile Include="..\UIDragPanel.cpp">
<Filter>UIWidgets\ScrollWidget</Filter>
</ClCompile>
<ClCompile Include="..\UIListView.cpp">
<Filter>UIWidgets\ScrollWidget</Filter>
</ClCompile>
<ClCompile Include="..\UIPageView.cpp">
<Filter>UIWidgets\ScrollWidget</Filter>
</ClCompile>
<ClCompile Include="..\UIButton.cpp">
<Filter>UIWidgets</Filter>
</ClCompile>
<ClCompile Include="..\UICheckBox.cpp">
<Filter>UIWidgets</Filter>
</ClCompile>
<ClCompile Include="..\UIImageView.cpp">
<Filter>UIWidgets</Filter>
</ClCompile>
<ClCompile Include="..\UILabel.cpp">
<Filter>UIWidgets</Filter>
</ClCompile>
<ClCompile Include="..\UILabelAtlas.cpp">
<Filter>UIWidgets</Filter>
</ClCompile>
<ClCompile Include="..\UILabelBMFont.cpp">
<Filter>UIWidgets</Filter>
</ClCompile>
<ClCompile Include="..\UISlider.cpp">
<Filter>UIWidgets</Filter>
</ClCompile>
<ClCompile Include="..\UITextField.cpp">
<Filter>UIWidgets</Filter>
</ClCompile>
<ClCompile Include="..\UILoadingBar.cpp">
<Filter>UIWidgets</Filter>
</ClCompile>
<ClCompile Include="..\UIHelper.cpp">
<Filter>System</Filter>
</ClCompile>
<ClCompile Include="..\CocosGUI.cpp">
<Filter>System</Filter>
</ClCompile>
<ClCompile Include="..\UIInputManager.cpp">
<Filter>System</Filter>
</ClCompile>
<ClCompile Include="..\UILayer.cpp">
<Filter>System</Filter>
</ClCompile>
<ClCompile Include="..\Layout.cpp">
<Filter>Layouts</Filter>
</ClCompile>
<ClCompile Include="..\LayoutParameter.cpp">
<Filter>Layouts</Filter>
</ClCompile>
<ClCompile Include="..\UILayoutDefine.cpp">
<Filter>Layouts</Filter>
</ClCompile>
<ClCompile Include="..\UIRootWidget.cpp">
<Filter>BaseClasses</Filter>
</ClCompile>
<ClCompile Include="..\UIWidget.cpp">
<Filter>BaseClasses</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

22
cocos/network/Makefile Normal file
View File

@ -0,0 +1,22 @@
TARGET = libnetwork.a
INCLUDES = -I..
SOURCES = HttpClient.cpp \
SocketIO.cpp
include ../2d/cocos2dx.mk
CXXFLAGS += -Wno-multichar
TARGET := $(LIB_DIR)/$(TARGET)
all: $(TARGET)
$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_AR)$(AR) $(ARFLAGS) $@ $(OBJECTS)
$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST)
@mkdir -p $(@D)
$(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@

View File

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\HttpClient.h" />
<ClInclude Include="..\HttpRequest.h" />
<ClInclude Include="..\HttpResponse.h" />
<ClInclude Include="..\SocketIO.h" />
<ClInclude Include="..\WebSocket.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\HttpClient.cpp" />
<ClCompile Include="..\SocketIO.cpp" />
<ClCompile Include="..\WebSocket.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>libNetwork</ProjectName>
<ProjectGuid>{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}</ProjectGuid>
<RootNamespace>network.win32</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration).win32\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration).win32\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LibraryPath>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LibraryPath>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\Include;$(EngineRoot)cocos;$(EngineRoot)external\websockets\include\win32;$(EngineRoot)external\curl\include\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>winmm.lib;libcocos2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;..\Include;$(EngineRoot)cocos;$(EngineRoot)external\websockets\include\win32;$(EngineRoot)external\curl\include\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4251</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>winmm.lib;libcocos2d.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\HttpClient.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\HttpRequest.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\HttpResponse.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\SocketIO.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\WebSocket.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\HttpClient.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\SocketIO.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\WebSocket.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@ -37,16 +37,16 @@
#include "CCPhysicsWorld.h" #include "CCPhysicsWorld.h"
#include "chipmunk/CCPhysicsBodyInfo.h" #include "chipmunk/CCPhysicsBodyInfo.h"
#include "Box2D/CCPhysicsBodyInfo.h" #include "box2d/CCPhysicsBodyInfo.h"
#include "chipmunk/CCPhysicsJointInfo.h" #include "chipmunk/CCPhysicsJointInfo.h"
#include "Box2D/CCPhysicsJointInfo.h" #include "box2d/CCPhysicsJointInfo.h"
#include "chipmunk/CCPhysicsWorldInfo.h" #include "chipmunk/CCPhysicsWorldInfo.h"
#include "Box2D/CCPhysicsWorldInfo.h" #include "box2d/CCPhysicsWorldInfo.h"
#include "chipmunk/CCPhysicsShapeInfo.h" #include "chipmunk/CCPhysicsShapeInfo.h"
#include "Box2D/CCPhysicsShapeInfo.h" #include "box2d/CCPhysicsShapeInfo.h"
#include "chipmunk/CCPhysicsHelper.h" #include "chipmunk/CCPhysicsHelper.h"
#include "Box2D/CCPhysicsHelper.h" #include "box2d/CCPhysicsHelper.h"
NS_CC_BEGIN NS_CC_BEGIN
@ -56,8 +56,8 @@ NS_CC_BEGIN
namespace namespace
{ {
static const float MASS_DEFAULT = 1.0; static const float MASS_DEFAULT = 1.0;
static const float DENSITY_DEFAULT = 1.0; static const float MOMENT_DEFAULT = 200;
static const float ANGULARDAMPING_DEFAULT = 200; static float GROUP_INDEX = 0;
} }
PhysicsBody::PhysicsBody() PhysicsBody::PhysicsBody()
@ -66,13 +66,20 @@ PhysicsBody::PhysicsBody()
, _info(nullptr) , _info(nullptr)
, _dynamic(true) , _dynamic(true)
, _enable(true) , _enable(true)
, _rotationEnable(true)
, _gravityEnable(true)
, _massDefault(true) , _massDefault(true)
, _angularDampingDefault(true) , _momentDefault(true)
, _mass(MASS_DEFAULT) , _mass(MASS_DEFAULT)
, _area(0.0) , _area(0.0f)
, _density(DENSITY_DEFAULT) , _density(0.0f)
, _angularDamping(ANGULARDAMPING_DEFAULT) , _moment(MOMENT_DEFAULT)
, _linearDamping(0.0f)
, _angularDamping(0.0f)
, _tag(0) , _tag(0)
, _categoryBitmask(UINT_MAX)
, _collisionBitmask(UINT_MAX)
, _contactTestBitmask(0)
{ {
} }
@ -217,7 +224,9 @@ bool PhysicsBody::init()
_info = new PhysicsBodyInfo(); _info = new PhysicsBodyInfo();
CC_BREAK_IF(_info == nullptr); CC_BREAK_IF(_info == nullptr);
_info->body = cpBodyNew(PhysicsHelper::float2cpfloat(_mass), PhysicsHelper::float2cpfloat(_angularDamping)); _info->body = cpBodyNew(PhysicsHelper::float2cpfloat(_mass), PhysicsHelper::float2cpfloat(_moment));
_info->group = ++GROUP_INDEX;
CC_BREAK_IF(_info->body == nullptr); CC_BREAK_IF(_info->body == nullptr);
return true; return true;
@ -230,17 +239,46 @@ void PhysicsBody::setDynamic(bool dynamic)
{ {
if (dynamic != _dynamic) if (dynamic != _dynamic)
{ {
if (dynamic) _dynamic = dynamic;
if (_world != nullptr)
{ {
cpBodySetMass(_info->body, PhysicsHelper::float2cpfloat(_mass)); if (dynamic)
cpBodySetMoment(_info->body, PhysicsHelper::float2cpfloat(_angularDamping)); {
}else cpSpaceAddBody(_world->_info->space, _info->body);
{ }else
cpBodySetMass(_info->body, PHYSICS_INFINITY); {
cpBodySetMoment(_info->body, PHYSICS_INFINITY); cpSpaceRemoveBody(_world->_info->space, _info->body);
}
} }
_dynamic = dynamic; }
}
void PhysicsBody::setRotationEnable(bool enable)
{
if (_rotationEnable != enable)
{
cpBodySetMoment(_info->body, enable ? _moment : PHYSICS_INFINITY);
_rotationEnable = enable;
}
}
void PhysicsBody::setGravityEnable(bool enable)
{
if (_gravityEnable != enable)
{
_gravityEnable = enable;
if (_world != nullptr)
{
if (enable)
{
applyForce(_world->getGravity());
}else
{
applyForce(-_world->getGravity());
}
}
} }
} }
@ -269,84 +307,30 @@ void PhysicsBody::addShape(PhysicsShape* shape)
{ {
if (shape == nullptr) return; if (shape == nullptr) return;
// already added
if (shape->getBody() == this)
{
return;
}
else if (shape->getBody() != nullptr)
{
shape->getBody()->removeShape(shape);
}
// reset the body
if (shape->_info->body != _info->body)
{
for (cpShape* subShape : shape->_info->shapes)
{
cpShapeSetBody(subShape, _info->body);
}
shape->_info->body = _info->body;
}
// add shape to body // add shape to body
if (std::find(_shapes.begin(), _shapes.end(), shape) == _shapes.end()) if (std::find(_shapes.begin(), _shapes.end(), shape) == _shapes.end())
{ {
shape->setBody(this); shape->setBody(this);
_shapes.push_back(shape); _shapes.push_back(shape);
// calculate the mass, area and desity // calculate the area, mass, and desity
// area must update before mass, because the density changes depend on it.
_area += shape->getArea(); _area += shape->getArea();
if (_mass == PHYSICS_INFINITY || shape->getMass() == PHYSICS_INFINITY) addMass(shape->getMass());
{ addMoment(shape->getMoment());
_mass = PHYSICS_INFINITY;
_massDefault = false;
}else
{
if (shape->getMass() > 0)
{
_mass = (_massDefault ? 0 : _mass) + shape->getMass();
_massDefault = false;
}
}
cpBodySetMass(_info->body, _mass);
if (!_massDefault) if (_world != nullptr)
{ {
if (_mass == PHYSICS_INFINITY) _world->addShape(shape);
{
_density = PHYSICS_INFINITY;
}else
{
_density = _mass / _area;
}
} }
if (shape->getAngularDumping() > 0)
{
if (shape->getAngularDumping() == INFINITY)
{
_angularDamping = INFINITY;
_angularDampingDefault = false;
cpBodySetMoment(_info->body, _angularDamping);
}
else if (_angularDamping != INFINITY)
{
_angularDamping = (_angularDampingDefault ? 0 : _angularDamping) + shape->getAngularDumping();
_angularDampingDefault = false;
cpBodySetMoment(_info->body, _angularDamping);
}
}
if (_world != nullptr) _world->addShape(shape);
shape->retain(); shape->retain();
} }
} }
void PhysicsBody::applyForce(Point force) void PhysicsBody::applyForce(Point force)
{ {
applyForce(force, Point()); applyForce(force, Point::ZERO);
} }
void PhysicsBody::applyForce(Point force, Point offset) void PhysicsBody::applyForce(Point force, Point offset)
@ -371,12 +355,117 @@ void PhysicsBody::applyTorque(float torque)
void PhysicsBody::setMass(float mass) void PhysicsBody::setMass(float mass)
{ {
if (mass <= 0)
{
return;
}
_mass = mass; _mass = mass;
_massDefault = false; _massDefault = false;
// update density
if (_mass == PHYSICS_INFINITY)
{
_density = PHYSICS_INFINITY;
}
else
{
if (_area > 0)
{
_density = _mass / _area;
}else
{
_density = 0;
}
}
cpBodySetMass(_info->body, PhysicsHelper::float2cpfloat(_mass)); cpBodySetMass(_info->body, PhysicsHelper::float2cpfloat(_mass));
} }
void PhysicsBody::addMass(float mass)
{
if (mass == PHYSICS_INFINITY)
{
_mass = PHYSICS_INFINITY;
_massDefault = false;
_density = PHYSICS_INFINITY;
}
else if (mass == -PHYSICS_INFINITY)
{
return;
}
else if (_mass != PHYSICS_INFINITY)
{
if (_massDefault)
{
_mass = 0;
_massDefault = false;
}
if (_mass + mass > 0)
{
_mass += mass;
}else
{
_mass = MASS_DEFAULT;
_massDefault = true;
}
if (_area > 0)
{
_density = _mass / _area;
}
else
{
_density = 0;
}
}
cpBodySetMass(_info->body, PhysicsHelper::float2cpfloat(_mass));
}
void PhysicsBody::addMoment(float moment)
{
if (moment == PHYSICS_INFINITY)
{
// if moment is INFINITY, the moment of the body will become INFINITY
_moment = PHYSICS_INFINITY;
_momentDefault = false;
}
else if (moment == -PHYSICS_INFINITY)
{
// if moment is -INFINITY, it won't change
return;
}
else
{
// if moment of the body is INFINITY is has no effect
if (_moment != PHYSICS_INFINITY)
{
if (_momentDefault)
{
_moment = 0;
_momentDefault = false;
}
if (_moment + moment > 0)
{
_moment += moment;
}
else
{
_moment = MOMENT_DEFAULT;
_momentDefault = true;
}
}
}
if (_rotationEnable)
{
cpBodySetMoment(_info->body, PhysicsHelper::float2cpfloat(_moment));
}
}
void PhysicsBody::setVelocity(Point velocity) void PhysicsBody::setVelocity(Point velocity)
{ {
cpBodySetVel(_info->body, PhysicsHelper::point2cpv(velocity)); cpBodySetVel(_info->body, PhysicsHelper::point2cpv(velocity));
@ -387,12 +476,45 @@ Point PhysicsBody::getVelocity()
return PhysicsHelper::cpv2point(cpBodyGetVel(_info->body)); return PhysicsHelper::cpv2point(cpBodyGetVel(_info->body));
} }
void PhysicsBody::setAngularDamping(float angularDamping) void PhysicsBody::setAngularVelocity(float velocity)
{ {
_angularDamping = angularDamping; cpBodySetAngVel(_info->body, PhysicsHelper::float2cpfloat(velocity));
_angularDampingDefault = false; }
float PhysicsBody::getAngularVelocity()
{
return PhysicsHelper::cpfloat2float(cpBodyGetAngVel(_info->body));
}
void PhysicsBody::setVelocityLimit(float limit)
{
cpBodySetVelLimit(_info->body, PhysicsHelper::float2cpfloat(limit));
}
float PhysicsBody::getVelocityLimit()
{
return PhysicsHelper::cpfloat2float(cpBodyGetVelLimit(_info->body));
}
void PhysicsBody::setAngularVelocityLimit(float limit)
{
cpBodySetVelLimit(_info->body, PhysicsHelper::float2cpfloat(limit));
}
float PhysicsBody::getAngularVelocityLimit()
{
return PhysicsHelper::cpfloat2float(cpBodyGetAngVelLimit(_info->body));
}
void PhysicsBody::setMoment(float moment)
{
_moment = moment;
_momentDefault = false;
cpBodySetMoment(_info->body, _angularDamping); if (_rotationEnable)
{
cpBodySetMoment(_info->body, PhysicsHelper::float2cpfloat(_moment));
}
} }
PhysicsShape* PhysicsBody::getShapeByTag(int tag) PhysicsShape* PhysicsBody::getShapeByTag(int tag)
@ -426,51 +548,19 @@ void PhysicsBody::removeShape(PhysicsShape* shape)
if (it != _shapes.end()) if (it != _shapes.end())
{ {
// deduce the area, mass and moment
// area must update before mass, because the density changes depend on it.
_area -= shape->getArea();
addMass(-shape->getMass());
addMoment(-shape->getMoment());
//remove
if (_world) if (_world)
{ {
_world->removeShape(shape); _world->removeShape(shape);
} }
_shapes.erase(it); _shapes.erase(it);
shape->setBody(nullptr);
// deduce the mass, area and angularDamping
if (_mass != PHYSICS_INFINITY && shape->getMass() != PHYSICS_INFINITY)
{
if (_mass - shape->getMass() <= 0)
{
_mass = MASS_DEFAULT;
_massDefault = true;
}else
{
_mass = _mass = shape->getMass();
}
_area -= shape->getArea();
if (_mass == PHYSICS_INFINITY)
{
_density = PHYSICS_INFINITY;
}
else if (_area > 0)
{
_density = _mass / _area;
}
else
{
_density = DENSITY_DEFAULT;
}
if (_angularDamping - shape->getAngularDumping() > 0)
{
_angularDamping -= shape->getAngularDumping();
}else
{
_angularDamping = ANGULARDAMPING_DEFAULT;
_angularDampingDefault = true;
}
}
shape->release(); shape->release();
} }
} }
@ -509,6 +599,22 @@ void PhysicsBody::setEnable(bool enable)
} }
} }
bool PhysicsBody::isResting()
{
return cpBodyIsSleeping(_info->body) == cpTrue;
}
void PhysicsBody::update(float delta)
{
// damping compute
if (_dynamic)
{
_info->body->v.x *= cpfclamp(1.0f - delta * _linearDamping, 0.0f, 1.0f);
_info->body->v.y *= cpfclamp(1.0f - delta * _linearDamping, 0.0f, 1.0f);
_info->body->w *= cpfclamp(1.0f - delta * _angularDamping, 0.0f, 1.0f);
}
}
//Clonable* PhysicsBody::clone() const //Clonable* PhysicsBody::clone() const
//{ //{
// PhysicsBody* body = new PhysicsBody(); // PhysicsBody* body = new PhysicsBody();

View File

@ -43,7 +43,7 @@ class PhysicsJoint;
class PhysicsBodyInfo; class PhysicsBodyInfo;
const PhysicsMaterial PHYSICSBODY_MATERIAL_DEFAULT(0.0f, 1.0f, 1.0f); const PhysicsMaterial PHYSICSBODY_MATERIAL_DEFAULT = {1.0f, 1.0f, 1.0f};
/** /**
* A body affect by physics. * A body affect by physics.
@ -109,6 +109,12 @@ public:
virtual void setVelocity(Point velocity); virtual void setVelocity(Point velocity);
virtual Point getVelocity(); virtual Point getVelocity();
virtual void setAngularVelocity(float velocity);
virtual float getAngularVelocity();
virtual void setVelocityLimit(float limit);
virtual float getVelocityLimit();
virtual void setAngularVelocityLimit(float limit);
virtual float getAngularVelocityLimit();
/* /*
* @brief get the body shapes. * @brief get the body shapes.
@ -143,11 +149,11 @@ public:
*/ */
inline Sprite* getOwner() const { return _owner; } inline Sprite* getOwner() const { return _owner; }
void setCategoryBitmask(int bitmask); inline void setCategoryBitmask(int bitmask) { _categoryBitmask = bitmask; }
inline int getCategoryBitmask() const { return _categoryBitmask; } inline int getCategoryBitmask() const { return _categoryBitmask; }
void setContactTestBitmask(int bitmask); inline void setContactTestBitmask(int bitmask) { _contactTestBitmask = bitmask; }
inline int getContactTestBitmask() const { return _contactTestBitmask; } inline int getContactTestBitmask() const { return _contactTestBitmask; }
void setCollisionBitmask(int bitmask); inline void setCollisionBitmask(int bitmask) { _collisionBitmask = bitmask; }
inline int getCollisionBitmask() const { return _collisionBitmask; } inline int getCollisionBitmask() const { return _collisionBitmask; }
/* /*
@ -172,30 +178,70 @@ public:
/* /*
* @brief set the body mass. * @brief set the body mass.
* @note if you need add/subtract mass to body, don't use setMass(getMass() +/- mass), because the mass of body may be equal to PHYSICS_INFINITY, it will cause some unexpected result, please use addMass() instead.
*/ */
void setMass(float mass); void setMass(float mass);
/* /*
* @brief get the body mass. * @brief get the body mass.
*/ */
inline float getMass() { return _mass; } inline float getMass() { return _mass; }
/*
* @brief add mass to body.
* if _mass(mass of the body) == PHYSICS_INFINITY, it remains.
* if mass == PHYSICS_INFINITY, _mass will be PHYSICS_INFINITY.
* if mass == -PHYSICS_INFINITY, _mass will not change.
* if mass + _mass <= 0, _mass will equal to MASS_DEFAULT(1.0)
* other wise, mass = mass + _mass;
*/
void addMass(float mass);
/*
* @brief set the body moment of inertia.
* @note if you need add/subtract moment to body, don't use setMoment(getMoment() +/- moment), because the moment of body may be equal to PHYSICS_INFINITY, it will cause some unexpected result, please use addMoment() instead.
*/
void setMoment(float moment);
/*
* @brief get the body moment of inertia.
*/
inline float getMoment(float moment) { return _moment; }
/*
* @brief add moment of inertia to body.
* if _moment(moment of the body) == PHYSICS_INFINITY, it remains.
* if moment == PHYSICS_INFINITY, _moment will be PHYSICS_INFINITY.
* if moment == -PHYSICS_INFINITY, _moment will not change.
* if moment + _moment <= 0, _moment will equal to MASS_DEFAULT(1.0)
* other wise, moment = moment + _moment;
*/
void addMoment(float moment);
/* /*
* @brief set angular damping. * @brief set angular damping.
*/ */
void setAngularDamping(float angularDamping); //void setAngularDamping(float angularDamping);
/* /*
* @brief get angular damping. * @brief get angular damping.
*/ */
inline float getLinearDamping() { return _linearDamping; }
inline void setLinearDamping(float damping) { _linearDamping = damping; }
inline float getAngularDamping() { return _angularDamping; } inline float getAngularDamping() { return _angularDamping; }
inline void setAngularDamping(float damping) { _angularDamping = damping; }
//virtual Clonable* clone() const override; //virtual Clonable* clone() const override;
bool isResting();
inline bool isEnable() { return _enable; } inline bool isEnable() { return _enable; }
void setEnable(bool enable); void setEnable(bool enable);
inline bool isRotationEnable() { return _rotationEnable; }
void setRotationEnable(bool enable);
inline bool isGravityEnable() { return _gravityEnable; }
void setGravityEnable(bool enable);
inline int getTag() { return _tag; } inline int getTag() { return _tag; }
inline void setTag(int tag) { _tag = tag; } inline void setTag(int tag) { _tag = tag; }
protected: protected:
bool init(); bool init();
@ -203,6 +249,8 @@ protected:
virtual void setPosition(Point position); virtual void setPosition(Point position);
virtual void setRotation(float rotation); virtual void setRotation(float rotation);
virtual void update(float delta) override;
protected: protected:
PhysicsBody(); PhysicsBody();
virtual ~PhysicsBody(); virtual ~PhysicsBody();
@ -215,17 +263,21 @@ protected:
PhysicsBodyInfo* _info; PhysicsBodyInfo* _info;
bool _dynamic; bool _dynamic;
bool _enable; bool _enable;
bool _rotationEnable;
bool _gravityEnable;
bool _massDefault; bool _massDefault;
bool _angularDampingDefault; bool _momentDefault;
float _mass; float _mass;
float _area; float _area;
float _density; float _density;
float _moment;
float _linearDamping;
float _angularDamping; float _angularDamping;
int _tag; int _tag;
int _categoryBitmask; int _categoryBitmask;
int _contactTestBitmask;
int _collisionBitmask; int _collisionBitmask;
int _contactTestBitmask;
friend class PhysicsWorld; friend class PhysicsWorld;
friend class PhysicsShape; friend class PhysicsShape;

View File

@ -31,7 +31,7 @@
#endif #endif
#include "chipmunk/CCPhysicsContactInfo.h" #include "chipmunk/CCPhysicsContactInfo.h"
#include "Box2D/CCPhysicsContactInfo.h" #include "box2d/CCPhysicsContactInfo.h"
NS_CC_BEGIN NS_CC_BEGIN

View File

@ -47,11 +47,11 @@ public:
/* /*
* @brief get contact shape A. * @brief get contact shape A.
*/ */
inline PhysicsShape* getShapeA() { return _shapeA; } inline PhysicsShape* getShapeA() const { return _shapeA; }
/* /*
* @brief get contact shape B. * @brief get contact shape B.
*/ */
inline PhysicsShape* getShapeB() { return _shapeB; } inline PhysicsShape* getShapeB() const { return _shapeB; }
/* /*
* @brief get data. * @brief get data.
*/ */
@ -65,6 +65,9 @@ private:
static PhysicsContact* create(PhysicsShape* a, PhysicsShape* b); static PhysicsContact* create(PhysicsShape* a, PhysicsShape* b);
bool init(PhysicsShape* a, PhysicsShape* b); bool init(PhysicsShape* a, PhysicsShape* b);
inline bool getNotify() { return _notify; }
inline void setNotify(bool notify) { _notify = notify; }
private: private:
PhysicsContact(); PhysicsContact();
~PhysicsContact(); ~PhysicsContact();
@ -74,8 +77,10 @@ private:
PhysicsShape* _shapeB; PhysicsShape* _shapeB;
PhysicsContactInfo* _info; PhysicsContactInfo* _info;
void* _data; void* _data;
bool _notify;
friend class PhysicsWorld; friend class PhysicsWorld;
friend class PhysicsWorldCallback;
}; };
/* /*
@ -90,7 +95,7 @@ private:
static PhysicsContactPreSolve* create(); static PhysicsContactPreSolve* create();
bool init(); bool init();
friend class PhysicsWorld; friend class PhysicsWorldCallback;
}; };
/* /*
@ -105,7 +110,7 @@ private:
static PhysicsContactPostSolve* create(); static PhysicsContactPostSolve* create();
bool init(); bool init();
friend class PhysicsWorld; friend class PhysicsWorldCallback;
}; };
/* /*
@ -121,20 +126,20 @@ public:
/* /*
* @brief it will called at two shapes start to contact, and only call it once. * @brief it will called at two shapes start to contact, and only call it once.
*/ */
std::function<bool(const PhysicsContact& contact)> onContactBegin; std::function<bool(PhysicsWorld& world, const PhysicsContact& contact)> onContactBegin;
/* /*
* @brief Two shapes are touching during this step. Return false from the callback to make world ignore the collision this step or true to process it normally. Additionally, you may override collision values, elasticity, or surface velocity values. * @brief Two shapes are touching during this step. Return false from the callback to make world ignore the collision this step or true to process it normally. Additionally, you may override collision values, elasticity, or surface velocity values.
*/ */
std::function<bool(const PhysicsContact& contact, const PhysicsContactPreSolve& solve)> onContactPreSolve; std::function<bool(PhysicsWorld& world, const PhysicsContact& contact, const PhysicsContactPreSolve& solve)> onContactPreSolve;
/* /*
* @brief Two shapes are touching and their collision response has been processed. You can retrieve the collision impulse or kinetic energy at this time if you want to use it to calculate sound volumes or damage amounts. See cpArbiter for more info * @brief Two shapes are touching and their collision response has been processed. You can retrieve the collision impulse or kinetic energy at this time if you want to use it to calculate sound volumes or damage amounts. See cpArbiter for more info
*/ */
std::function<void(const PhysicsContact& contact, const PhysicsContactPostSolve& solve)> onContactPostSolve; std::function<void(PhysicsWorld& world, const PhysicsContact& contact, const PhysicsContactPostSolve& solve)> onContactPostSolve;
/* /*
* @brief it will called at two shapes separated, and only call it once. * @brief it will called at two shapes separated, and only call it once.
* onContactBegin and onContactEnd will called in pairs. * onContactBegin and onContactEnd will called in pairs.
*/ */
std::function<void(const PhysicsContact& contact)> onContactEnd; std::function<void(PhysicsWorld& world, const PhysicsContact& contact)> onContactEnd;
}; };
NS_CC_END NS_CC_END

View File

@ -34,11 +34,13 @@
#include "CCPhysicsBody.h" #include "CCPhysicsBody.h"
#include "chipmunk/CCPhysicsJointInfo.h" #include "chipmunk/CCPhysicsJointInfo.h"
#include "Box2D/CCPhysicsJointInfo.h" #include "box2d/CCPhysicsJointInfo.h"
#include "chipmunk/CCPhysicsBodyInfo.h" #include "chipmunk/CCPhysicsBodyInfo.h"
#include "Box2D/CCPhysicsBodyInfo.h" #include "box2d/CCPhysicsBodyInfo.h"
#include "chipmunk/CCPhysicsShapeInfo.h"
#include "box2d/CCPhysicsShapeInfo.h"
#include "chipmunk/CCPhysicsHelper.h" #include "chipmunk/CCPhysicsHelper.h"
#include "Box2D/CCPhysicsHelper.h" #include "box2d/CCPhysicsHelper.h"
NS_CC_BEGIN NS_CC_BEGIN
@ -47,6 +49,7 @@ PhysicsJoint::PhysicsJoint()
, _bodyB(nullptr) , _bodyB(nullptr)
, _info(nullptr) , _info(nullptr)
, _enable(false) , _enable(false)
, _collisionEnable(true)
, _tag(0) , _tag(0)
{ {
@ -54,6 +57,9 @@ PhysicsJoint::PhysicsJoint()
PhysicsJoint::~PhysicsJoint() PhysicsJoint::~PhysicsJoint()
{ {
// reset the shapes collision group
setCollisionEnable(true);
CC_SAFE_DELETE(_info); CC_SAFE_DELETE(_info);
CC_SAFE_RELEASE(_bodyA); CC_SAFE_RELEASE(_bodyA);
@ -66,7 +72,7 @@ bool PhysicsJoint::init(cocos2d::PhysicsBody *a, cocos2d::PhysicsBody *b)
{ {
CC_BREAK_IF(a == nullptr || b == nullptr); CC_BREAK_IF(a == nullptr || b == nullptr);
CC_BREAK_IF(!(_info = new PhysicsJointInfo())); CC_BREAK_IF(!(_info = new PhysicsJointInfo(this)));
_bodyA = a; _bodyA = a;
_bodyA->retain(); _bodyA->retain();
@ -144,6 +150,18 @@ PhysicsBodyInfo* PhysicsJoint::bodyInfo(PhysicsBody* body) const
} }
void PhysicsJoint::setCollisionEnable(bool enable)
{
if (_collisionEnable != enable)
{
_collisionEnable = enable;
for (auto shape : _bodyB->_shapes)
{
shape->_info->setGroup(enable ? _bodyB->_info->group : _bodyA->_info->group);
}
}
}
PhysicsJointFixed* PhysicsJointFixed::create(PhysicsBody* a, PhysicsBody* b, const Point& anchr) PhysicsJointFixed* PhysicsJointFixed::create(PhysicsBody* a, PhysicsBody* b, const Point& anchr)
{ {
@ -165,8 +183,18 @@ bool PhysicsJointFixed::init(PhysicsBody* a, PhysicsBody* b, const Point& anchr)
{ {
CC_BREAK_IF(!PhysicsJoint::init(a, b)); CC_BREAK_IF(!PhysicsJoint::init(a, b));
_info->joint = cpPivotJointNew(bodyInfo(a)->body, bodyInfo(b)->body, // add a pivot joint to fixed two body together
cpConstraint* joint = cpPivotJointNew(bodyInfo(a)->body, bodyInfo(b)->body,
PhysicsHelper::point2cpv(anchr)); PhysicsHelper::point2cpv(anchr));
CC_BREAK_IF(joint);
_info->add(joint);
// add a gear joint to make two body have the same rotation.
joint = cpGearJointNew(bodyInfo(a)->body, bodyInfo(b)->body, 0, 1);
CC_BREAK_IF(joint);
_info->add(joint);
setCollisionEnable(false);
return true; return true;
} while (false); } while (false);
@ -174,11 +202,11 @@ bool PhysicsJointFixed::init(PhysicsBody* a, PhysicsBody* b, const Point& anchr)
return false; return false;
} }
PhysicsJointPin* PhysicsJointPin::create(PhysicsBody* a, PhysicsBody* b, const Point& anchr1, const Point& anchr2) PhysicsJointPin* PhysicsJointPin::create(PhysicsBody* a, PhysicsBody* b, const Point& anchr)
{ {
PhysicsJointPin* joint = new PhysicsJointPin(); PhysicsJointPin* joint = new PhysicsJointPin();
if (joint && joint->init(a, b, anchr1, anchr2)) if (joint && joint->init(a, b, anchr))
{ {
joint->autorelease(); joint->autorelease();
return joint; return joint;
@ -188,13 +216,20 @@ PhysicsJointPin* PhysicsJointPin::create(PhysicsBody* a, PhysicsBody* b, const P
return nullptr; return nullptr;
} }
bool PhysicsJointPin::init(PhysicsBody *a, PhysicsBody *b, const Point& anchr1, const Point& anchr2) bool PhysicsJointPin::init(PhysicsBody *a, PhysicsBody *b, const Point& anchr)
{ {
do do
{ {
CC_BREAK_IF(!PhysicsJoint::init(a, b)); CC_BREAK_IF(!PhysicsJoint::init(a, b));
_info->joint = cpPinJointNew(bodyInfo(a)->body, bodyInfo(b)->body, PhysicsHelper::point2cpv(anchr1), PhysicsHelper::point2cpv(anchr2)); cpConstraint* joint = cpPivotJointNew(bodyInfo(a)->body, bodyInfo(b)->body,
PhysicsHelper::point2cpv(anchr));
CC_BREAK_IF(joint);
_info->add(joint);
setCollisionEnable(false);
return true; return true;
} while (false); } while (false);
@ -221,11 +256,15 @@ bool PhysicsJointSliding::init(PhysicsBody* a, PhysicsBody* b, const Point& groo
{ {
CC_BREAK_IF(!PhysicsJoint::init(a, b)); CC_BREAK_IF(!PhysicsJoint::init(a, b));
_info->joint = cpGrooveJointNew(bodyInfo(a)->body, bodyInfo(b)->body, cpConstraint* joint = cpGrooveJointNew(bodyInfo(a)->body, bodyInfo(b)->body,
PhysicsHelper::point2cpv(grooveA), PhysicsHelper::point2cpv(grooveA),
PhysicsHelper::point2cpv(grooveB), PhysicsHelper::point2cpv(grooveB),
PhysicsHelper::point2cpv(anchr)); PhysicsHelper::point2cpv(anchr));
CC_BREAK_IF(joint);
_info->add(joint);
return true; return true;
} while (false); } while (false);
@ -233,11 +272,11 @@ bool PhysicsJointSliding::init(PhysicsBody* a, PhysicsBody* b, const Point& groo
} }
PhysicsJointLimit* PhysicsJointLimit::create(PhysicsBody* a, PhysicsBody* b, const Point& anchr1, const Point& anchr2, float min, float max) PhysicsJointLimit* PhysicsJointLimit::create(PhysicsBody* a, PhysicsBody* b, const Point& anchr1, const Point& anchr2)
{ {
PhysicsJointLimit* joint = new PhysicsJointLimit(); PhysicsJointLimit* joint = new PhysicsJointLimit();
if (joint && joint->init(a, b, anchr1, anchr2, min, max)) if (joint && joint->init(a, b, anchr1, anchr2))
{ {
return joint; return joint;
} }
@ -246,17 +285,21 @@ PhysicsJointLimit* PhysicsJointLimit::create(PhysicsBody* a, PhysicsBody* b, con
return nullptr; return nullptr;
} }
bool PhysicsJointLimit::init(PhysicsBody* a, PhysicsBody* b, const Point& anchr1, const Point& anchr2, float min, float max) bool PhysicsJointLimit::init(PhysicsBody* a, PhysicsBody* b, const Point& anchr1, const Point& anchr2)
{ {
do do
{ {
CC_BREAK_IF(!PhysicsJoint::init(a, b)); CC_BREAK_IF(!PhysicsJoint::init(a, b));
_info->joint = cpSlideJointNew(bodyInfo(a)->body, bodyInfo(b)->body, cpConstraint* joint = cpSlideJointNew(bodyInfo(a)->body, bodyInfo(b)->body,
PhysicsHelper::point2cpv(anchr1), PhysicsHelper::point2cpv(anchr1),
PhysicsHelper::point2cpv(anchr2), PhysicsHelper::point2cpv(anchr2),
PhysicsHelper::float2cpfloat(min), 0,
PhysicsHelper::float2cpfloat(max)); PhysicsHelper::float2cpfloat(anchr1.getDistance(anchr2)));
CC_BREAK_IF(joint);
_info->add(joint);
return true; return true;
} while (false); } while (false);
@ -264,6 +307,26 @@ bool PhysicsJointLimit::init(PhysicsBody* a, PhysicsBody* b, const Point& anchr1
return false; return false;
} }
float PhysicsJointLimit::getMin()
{
return PhysicsHelper::cpfloat2float(cpSlideJointGetMin(_info->joints.front()));
}
void PhysicsJointLimit::setMin(float min)
{
cpSlideJointSetMin(_info->joints.front(), PhysicsHelper::float2cpfloat(min));
}
float PhysicsJointLimit::getMax()
{
return PhysicsHelper::cpfloat2float(cpSlideJointGetMax(_info->joints.front()));
}
void PhysicsJointLimit::setMax(float max)
{
cpSlideJointSetMax(_info->joints.front(), PhysicsHelper::float2cpfloat(max));
}
#elif (CC_PHYSICS_ENGINE == CC_PHYSICS_BOX2D) #elif (CC_PHYSICS_ENGINE == CC_PHYSICS_BOX2D)
#endif #endif

View File

@ -53,6 +53,8 @@ public:
inline void setTag(int tag) { _tag = tag; } inline void setTag(int tag) { _tag = tag; }
inline bool isEnable() { return _enable; } inline bool isEnable() { return _enable; }
void setEnable(bool enable); void setEnable(bool enable);
inline bool isCollisionEnable() { return _collisionEnable; }
void setCollisionEnable(bool enable);
protected: protected:
bool init(PhysicsBody* a, PhysicsBody* b); bool init(PhysicsBody* a, PhysicsBody* b);
@ -67,6 +69,7 @@ protected:
PhysicsBody* _bodyB; PhysicsBody* _bodyB;
PhysicsJointInfo* _info; PhysicsJointInfo* _info;
bool _enable; bool _enable;
bool _collisionEnable;
int _tag; int _tag;
friend class PhysicsBody; friend class PhysicsBody;
@ -127,10 +130,15 @@ protected:
class PhysicsJointLimit : public PhysicsJoint class PhysicsJointLimit : public PhysicsJoint
{ {
public: public:
PhysicsJointLimit* create(PhysicsBody* a, PhysicsBody* b, const Point& anchr1, const Point& anchr2, float min, float max); PhysicsJointLimit* create(PhysicsBody* a, PhysicsBody* b, const Point& anchr1, const Point& anchr2);
float getMin();
void setMin(float min);
float getMax();
void setMax(float max);
protected: protected:
bool init(PhysicsBody* a, PhysicsBody* b, const Point& anchr1, const Point& anchr2, float min, float max); bool init(PhysicsBody* a, PhysicsBody* b, const Point& anchr1, const Point& anchr2);
protected: protected:
PhysicsJointLimit(); PhysicsJointLimit();
@ -143,10 +151,10 @@ protected:
class PhysicsJointPin : public PhysicsJoint class PhysicsJointPin : public PhysicsJoint
{ {
public: public:
static PhysicsJointPin* create(PhysicsBody* a, PhysicsBody* b, const Point& anchr1, const Point& anchr2); static PhysicsJointPin* create(PhysicsBody* a, PhysicsBody* b, const Point& anchr);
protected: protected:
bool init(PhysicsBody* a, PhysicsBody* b, const Point& anchr1, const Point& anchr2); bool init(PhysicsBody* a, PhysicsBody* b, const Point& anchr);
protected: protected:
PhysicsJointPin(); PhysicsJointPin();

View File

@ -35,9 +35,9 @@
#include "CCPhysicsWorld.h" #include "CCPhysicsWorld.h"
#include "chipmunk/CCPhysicsBodyInfo.h" #include "chipmunk/CCPhysicsBodyInfo.h"
#include "Box2D/CCPhysicsBodyInfo.h" #include "box2d/CCPhysicsBodyInfo.h"
#include "chipmunk/CCPhysicsShapeInfo.h" #include "chipmunk/CCPhysicsShapeInfo.h"
#include "Box2D/CCPhysicsShapeInfo.h" #include "box2d/CCPhysicsShapeInfo.h"
#include "chipmunk/CCPhysicsHelper.h" #include "chipmunk/CCPhysicsHelper.h"
NS_CC_BEGIN NS_CC_BEGIN
@ -48,9 +48,8 @@ PhysicsShape::PhysicsShape()
, _type(Type::UNKNOWN) , _type(Type::UNKNOWN)
, _area(0) , _area(0)
, _mass(0) , _mass(0)
, _angularDamping(0) , _moment(0)
, _tag(0) , _tag(0)
, _enable(true)
{ {
} }
@ -60,44 +59,53 @@ PhysicsShape::~PhysicsShape()
CC_SAFE_DELETE(_info); CC_SAFE_DELETE(_info);
} }
bool PhysicsShape::init(Type type, PhysicsMaterial material/* = MaterialDefault*/) bool PhysicsShape::init(Type type)
{ {
_info = new PhysicsShapeInfo(this); _info = new PhysicsShapeInfo(this);
if (_info == nullptr) return false; if (_info == nullptr) return false;
_type = type; _type = type;
_material = material;
return true; return true;
} }
void PhysicsShape::setMass(float mass) void PhysicsShape::setMass(float mass)
{ {
if (mass < 0)
}
void PhysicsShape::setEnable(bool enable)
{
if (_enable != enable)
{ {
_enable = enable; return;
if (_body->getWorld() && _body->isEnable())
{
if (enable)
{
_body->getWorld()->addShape(this);
}else
{
_body->getWorld()->removeShape(this);
}
}
} }
if (_body)
{
_body->addMass(-_mass);
_body->addMass(mass);
};
_mass = mass;
} }
void PhysicsShape::addToBody() void PhysicsShape::setMoment(float moment)
{ {
if(_body != nullptr) _body->addShape(this); if (moment < 0)
{
return;
}
if (_body)
{
_body->addMoment(-_moment);
_body->addMoment(moment);
};
_moment = moment;
}
void PhysicsShape::setMaterial(PhysicsMaterial material)
{
setDensity(material.density);
setRestitution(material.restitution);
setFriction(material.friction);
} }
PhysicsBodyInfo* PhysicsShape::bodyInfo() const PhysicsBodyInfo* PhysicsShape::bodyInfo() const
@ -182,32 +190,98 @@ PhysicsShapeEdgeSegment::~PhysicsShapeEdgeSegment()
} }
#if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK) #if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK)
void PhysicsShape::setDensity(float density)
void PhysicsShape::initEnd()
{ {
for (auto shape : _info->shapes) if (density < 0)
{ {
cpShapeSetElasticity(shape, _material.elasticity); return;
cpShapeSetFriction(shape, _material.friction); }
_material.density = density;
if (_material.density == PHYSICS_INFINITY)
{
setMass(PHYSICS_INFINITY);
}else if (_area > 0)
{
setMass(PhysicsHelper::float2cpfloat(_material.density * _area));
} }
} }
void PhysicsShape::setElasticity(float elasticity) void PhysicsShape::setRestitution(float restitution)
{ {
_material.restitution = restitution;
for (cpShape* shape : _info->shapes) for (cpShape* shape : _info->shapes)
{ {
cpShapeSetElasticity(shape, PhysicsHelper::float2cpfloat(elasticity)); cpShapeSetElasticity(shape, PhysicsHelper::float2cpfloat(restitution));
} }
} }
void PhysicsShape::setFriction(float friction) void PhysicsShape::setFriction(float friction)
{ {
_material.friction = friction;
for (cpShape* shape : _info->shapes) for (cpShape* shape : _info->shapes)
{ {
cpShapeSetFriction(shape, PhysicsHelper::float2cpfloat(friction)); cpShapeSetFriction(shape, PhysicsHelper::float2cpfloat(friction));
} }
} }
Point* PhysicsShape::recenterPoints(Point* points, int count, Point center)
{
cpVect* cpvs = new cpVect[count];
cpRecenterPoly(count, PhysicsHelper::points2cpvs(points, cpvs, count));
PhysicsHelper::cpvs2points(cpvs, points, count);
delete[] cpvs;
if (center != Point::ZERO)
{
for (int i = 0; i < count; ++i)
{
points[i] += center;
}
}
return points;
}
Point PhysicsShape::getPolyonCenter(Point* points, int count)
{
cpVect* cpvs = new cpVect[count];
cpVect center = cpCentroidForPoly(count, PhysicsHelper::points2cpvs(points, cpvs, count));
delete[] cpvs;
return PhysicsHelper::cpv2point(center);
}
void PhysicsShape::setBody(PhysicsBody *body)
{
// already added
if (_body == body)
{
return;
}
if (_body != nullptr)
{
_body->removeShape(this);
}
if (body == nullptr)
{
_info->setBody(nullptr);
_info->setGroup(CP_NO_GROUP);
_body = nullptr;
}else
{
_info->setBody(body->_info->body);
_info->setGroup(body->_info->group);
_body = body;
}
}
// PhysicsShapeCircle // PhysicsShapeCircle
PhysicsShapeCircle* PhysicsShapeCircle::create(float radius, PhysicsMaterial material/* = MaterialDefault*/, Point offset/* = Point(0, 0)*/) PhysicsShapeCircle* PhysicsShapeCircle::create(float radius, PhysicsMaterial material/* = MaterialDefault*/, Point offset/* = Point(0, 0)*/)
{ {
@ -226,25 +300,65 @@ bool PhysicsShapeCircle::init(float radius, PhysicsMaterial material/* = Materia
{ {
do do
{ {
CC_BREAK_IF(!PhysicsShape::init(Type::CIRCLE, material)); CC_BREAK_IF(!PhysicsShape::init(Type::CIRCLE));
cpShape* shape = cpCircleShapeNew(_info->shareBody, radius, PhysicsHelper::point2cpv(offset)); cpShape* shape = cpCircleShapeNew(_info->shareBody, radius, PhysicsHelper::point2cpv(offset));
CC_BREAK_IF(shape == nullptr); CC_BREAK_IF(shape == nullptr);
_area = PhysicsHelper::cpfloat2float(cpAreaForCircle(0, radius));
_mass = _material.density == PHYSICS_INFINITY ? PHYSICS_INFINITY : _material.density * _area;
_angularDamping = _mass == PHYSICS_INFINITY ? PHYSICS_INFINITY : cpMomentForCircle(_mass, 0, radius, PhysicsHelper::point2cpv(offset));
_info->add(shape); _info->add(shape);
initEnd(); _area = calculateDefaultArea();
_mass = material.density == PHYSICS_INFINITY ? PHYSICS_INFINITY : material.density * _area;
_moment = calculateDefaultMoment();
setMaterial(material);
return true; return true;
} while (false); } while (false);
return false; return false;
} }
float PhysicsShapeCircle::calculateArea(float radius)
{
return PhysicsHelper::cpfloat2float(cpAreaForCircle(0, radius));
}
float PhysicsShapeCircle::calculateMoment(float mass, float radius, Point offset)
{
return mass == PHYSICS_INFINITY ? PHYSICS_INFINITY
: PhysicsHelper::cpfloat2float(cpMomentForCircle(PhysicsHelper::float2cpfloat(mass),
0,
PhysicsHelper::float2cpfloat(radius),
PhysicsHelper::point2cpv(offset)));
}
float PhysicsShapeCircle::calculateDefaultArea()
{
return PhysicsHelper::cpfloat2float(cpAreaForCircle(0, cpCircleShapeGetRadius(_info->shapes.front())));
}
float PhysicsShapeCircle::calculateDefaultMoment()
{
cpShape* shape = _info->shapes.front();
return _mass == PHYSICS_INFINITY ? PHYSICS_INFINITY
: PhysicsHelper::cpfloat2float(cpMomentForCircle(PhysicsHelper::float2cpfloat(_mass),
0,
cpCircleShapeGetRadius(shape),
cpCircleShapeGetOffset(shape)));
}
float PhysicsShapeCircle::getRadius()
{
return PhysicsHelper::cpfloat2float(cpCircleShapeGetRadius(_info->shapes.front()));
}
Point PhysicsShapeCircle::getOffset()
{
return PhysicsHelper::cpv2point(cpCircleShapeGetOffset(_info->shapes.front()));
}
// PhysicsShapeEdgeSegment // PhysicsShapeEdgeSegment
PhysicsShapeEdgeSegment* PhysicsShapeEdgeSegment::create(Point a, Point b, PhysicsMaterial material/* = MaterialDefault*/, float border/* = 1*/) PhysicsShapeEdgeSegment* PhysicsShapeEdgeSegment::create(Point a, Point b, PhysicsMaterial material/* = MaterialDefault*/, float border/* = 1*/)
{ {
@ -263,7 +377,7 @@ bool PhysicsShapeEdgeSegment::init(Point a, Point b, PhysicsMaterial material/*
{ {
do do
{ {
CC_BREAK_IF(!PhysicsShape::init(Type::EDGESEGMENT, material)); CC_BREAK_IF(!PhysicsShape::init(Type::EDGESEGMENT));
cpShape* shape = cpSegmentShapeNew(_info->shareBody, cpShape* shape = cpSegmentShapeNew(_info->shareBody,
PhysicsHelper::point2cpv(a), PhysicsHelper::point2cpv(a),
@ -272,12 +386,14 @@ bool PhysicsShapeEdgeSegment::init(Point a, Point b, PhysicsMaterial material/*
CC_BREAK_IF(shape == nullptr); CC_BREAK_IF(shape == nullptr);
_mass = PHYSICS_INFINITY;
_angularDamping = PHYSICS_INFINITY;
_info->add(shape); _info->add(shape);
initEnd(); _mass = PHYSICS_INFINITY;
_moment = PHYSICS_INFINITY;
_center = a.getMidpoint(b);
setMaterial(material);
return true; return true;
} while (false); } while (false);
@ -285,6 +401,21 @@ bool PhysicsShapeEdgeSegment::init(Point a, Point b, PhysicsMaterial material/*
return false; return false;
} }
Point PhysicsShapeEdgeSegment::getPointA()
{
return PhysicsHelper::cpv2point(((cpSegmentShape*)(_info->shapes.front()))->ta);
}
Point PhysicsShapeEdgeSegment::getPointB()
{
return PhysicsHelper::cpv2point(((cpSegmentShape*)(_info->shapes.front()))->tb);
}
Point PhysicsShapeEdgeSegment::getCenter()
{
return _center;
}
// PhysicsShapeBox // PhysicsShapeBox
PhysicsShapeBox* PhysicsShapeBox::create(Size size, PhysicsMaterial material/* = MaterialDefault*/, Point offset/* = Point(0, 0)*/) PhysicsShapeBox* PhysicsShapeBox::create(Size size, PhysicsMaterial material/* = MaterialDefault*/, Point offset/* = Point(0, 0)*/)
{ {
@ -303,19 +434,26 @@ bool PhysicsShapeBox::init(Size size, PhysicsMaterial material/* = MaterialDefau
{ {
do do
{ {
CC_BREAK_IF(!PhysicsShape::init(Type::BOX, material)); CC_BREAK_IF(!PhysicsShape::init(Type::BOX));
cpShape* shape = cpBoxShapeNew(_info->shareBody, PhysicsHelper::float2cpfloat(size.width), PhysicsHelper::float2cpfloat(size.height)); cpVect wh = PhysicsHelper::size2cpv(size);
cpVect vec[4] =
{
{-wh.x/2.0f, -wh.y/2.0f}, {-wh.x/2.0f, wh.y/2.0f}, {wh.x/2.0f, wh.y/2.0f}, {wh.x/2.0f, -wh.y/2.0f}
};
cpShape* shape = cpPolyShapeNew(_info->shareBody, 4, vec, PhysicsHelper::point2cpv(offset));
CC_BREAK_IF(shape == nullptr); CC_BREAK_IF(shape == nullptr);
_area = PhysicsHelper::cpfloat2float(cpAreaForPoly(4, ((cpPolyShape*)shape)->verts));
_mass = _material.density == PHYSICS_INFINITY ? PHYSICS_INFINITY : _material.density * _area;
_angularDamping = _mass == PHYSICS_INFINITY ? PHYSICS_INFINITY : cpMomentForBox(_mass, PhysicsHelper::float2cpfloat(size.width), PhysicsHelper::float2cpfloat(size.height));
_info->add(shape); _info->add(shape);
initEnd(); _offset = offset;
_area = calculateDefaultArea();
_mass = material.density == PHYSICS_INFINITY ? PHYSICS_INFINITY : material.density * _area;
_moment = calculateDefaultMoment();
setMaterial(material);
return true; return true;
} while (false); } while (false);
@ -323,7 +461,60 @@ bool PhysicsShapeBox::init(Size size, PhysicsMaterial material/* = MaterialDefau
return false; return false;
} }
// PhysicsShapeCircle float PhysicsShapeBox::calculateArea(Size size)
{
cpVect wh = PhysicsHelper::size2cpv(size);
cpVect vec[4] =
{
{-wh.x/2.0f, -wh.y/2.0f}, {-wh.x/2.0f, wh.y/2.0f}, {wh.x/2.0f, wh.y/2.0f}, {wh.x/2.0f, -wh.y/2.0f}
};
return PhysicsHelper::cpfloat2float(cpAreaForPoly(4, vec));
}
float PhysicsShapeBox::calculateMoment(float mass, Size size, Point offset)
{
cpVect wh = PhysicsHelper::size2cpv(size);
cpVect vec[4] =
{
{-wh.x/2.0f, -wh.y/2.0f}, {-wh.x/2.0f, wh.y/2.0f}, {wh.x/2.0f, wh.y/2.0f}, {wh.x/2.0f, -wh.y/2.0f}
};
return mass == PHYSICS_INFINITY ? PHYSICS_INFINITY
: PhysicsHelper::cpfloat2float(cpMomentForPoly(PhysicsHelper::float2cpfloat(mass),
4,
vec,
PhysicsHelper::point2cpv(offset)));
}
float PhysicsShapeBox::calculateDefaultArea()
{
cpShape* shape = _info->shapes.front();
return PhysicsHelper::cpfloat2float(cpAreaForPoly(((cpPolyShape*)shape)->numVerts, ((cpPolyShape*)shape)->verts));
}
float PhysicsShapeBox::calculateDefaultMoment()
{
cpShape* shape = _info->shapes.front();
return _mass == PHYSICS_INFINITY ? PHYSICS_INFINITY
: PhysicsHelper::cpfloat2float(cpMomentForPoly(_mass, ((cpPolyShape*)shape)->numVerts, ((cpPolyShape*)shape)->verts, cpvzero));
}
Point* PhysicsShapeBox::getPoints(Point* points)
{
cpShape* shape = _info->shapes.front();
return PhysicsHelper::cpvs2points(((cpPolyShape*)shape)->verts, points, ((cpPolyShape*)shape)->numVerts);
return points;
}
Size PhysicsShapeBox::getSize()
{
cpShape* shape = _info->shapes.front();
return PhysicsHelper::cpv2size(cpv(cpvdist(cpPolyShapeGetVert(shape, 0), cpPolyShapeGetVert(shape, 1)),
cpvdist(cpPolyShapeGetVert(shape, 1), cpPolyShapeGetVert(shape, 2))));
}
// PhysicsShapePolygon
PhysicsShapePolygon* PhysicsShapePolygon::create(Point* points, int count, PhysicsMaterial material/* = MaterialDefault*/, Point offset/* = Point(0, 0)*/) PhysicsShapePolygon* PhysicsShapePolygon::create(Point* points, int count, PhysicsMaterial material/* = MaterialDefault*/, Point offset/* = Point(0, 0)*/)
{ {
PhysicsShapePolygon* shape = new PhysicsShapePolygon(); PhysicsShapePolygon* shape = new PhysicsShapePolygon();
@ -337,11 +528,11 @@ PhysicsShapePolygon* PhysicsShapePolygon::create(Point* points, int count, Physi
return nullptr; return nullptr;
} }
bool PhysicsShapePolygon::init(Point* points, int count, PhysicsMaterial material/* = MaterialDefault*/, Point offset /*= Point(0, 0)*/) bool PhysicsShapePolygon::init(Point* points, int count, PhysicsMaterial material/* = MaterialDefault*/, Point offset/* = Point(0, 0)*/)
{ {
do do
{ {
CC_BREAK_IF(!PhysicsShape::init(Type::POLYGEN, material)); CC_BREAK_IF(!PhysicsShape::init(Type::POLYGEN));
cpVect* vecs = new cpVect[count]; cpVect* vecs = new cpVect[count];
PhysicsHelper::points2cpvs(points, vecs, count); PhysicsHelper::points2cpvs(points, vecs, count);
@ -350,13 +541,14 @@ bool PhysicsShapePolygon::init(Point* points, int count, PhysicsMaterial materia
CC_BREAK_IF(shape == nullptr); CC_BREAK_IF(shape == nullptr);
_area = PhysicsHelper::cpfloat2float(cpAreaForPoly(((cpPolyShape*)shape)->numVerts, ((cpPolyShape*)shape)->verts));
_mass = _material.density == PHYSICS_INFINITY ? PHYSICS_INFINITY : _material.density * _area;
_angularDamping = _mass == PHYSICS_INFINITY ? PHYSICS_INFINITY : cpMomentForPoly(_mass, ((cpPolyShape*)shape)->numVerts, ((cpPolyShape*)shape)->verts, PhysicsHelper::point2cpv(offset));
_info->add(shape); _info->add(shape);
initEnd(); _area = calculateDefaultArea();
_mass = material.density == PHYSICS_INFINITY ? PHYSICS_INFINITY : material.density * _area;
_moment = calculateDefaultMoment();
_center = PhysicsHelper::cpv2point(cpCentroidForPoly(((cpPolyShape*)shape)->numVerts, ((cpPolyShape*)shape)->verts));
setMaterial(material);
return true; return true;
} while (false); } while (false);
@ -364,6 +556,56 @@ bool PhysicsShapePolygon::init(Point* points, int count, PhysicsMaterial materia
return false; return false;
} }
float PhysicsShapePolygon::calculateArea(Point* points, int count)
{
cpVect* vecs = new cpVect[count];
PhysicsHelper::points2cpvs(points, vecs, count);
float area = PhysicsHelper::cpfloat2float(cpAreaForPoly(count, vecs));
CC_SAFE_DELETE(vecs);
return area;
}
float PhysicsShapePolygon::calculateMoment(float mass, Point* points, int count, Point offset)
{
cpVect* vecs = new cpVect[count];
PhysicsHelper::points2cpvs(points, vecs, count);
float moment = mass == PHYSICS_INFINITY ? PHYSICS_INFINITY
: PhysicsHelper::cpfloat2float(cpMomentForPoly(mass, count, vecs, PhysicsHelper::point2cpv(offset)));
CC_SAFE_DELETE(vecs);
return moment;
}
float PhysicsShapePolygon::calculateDefaultArea()
{
cpShape* shape = _info->shapes.front();
return PhysicsHelper::cpfloat2float(cpAreaForPoly(((cpPolyShape*)shape)->numVerts, ((cpPolyShape*)shape)->verts));
}
float PhysicsShapePolygon::calculateDefaultMoment()
{
cpShape* shape = _info->shapes.front();
return _mass == PHYSICS_INFINITY ? PHYSICS_INFINITY
: PhysicsHelper::cpfloat2float(cpMomentForPoly(_mass, ((cpPolyShape*)shape)->numVerts, ((cpPolyShape*)shape)->verts, cpvzero));
}
Point* PhysicsShapePolygon::getPoints(Point* points)
{
cpShape* shape = _info->shapes.front();
return PhysicsHelper::cpvs2points(((cpPolyShape*)shape)->verts, points, ((cpPolyShape*)shape)->numVerts);
}
int PhysicsShapePolygon::getPointsCount()
{
return ((cpPolyShape*)_info->shapes.front())->numVerts;
}
Point PhysicsShapePolygon::getCenter()
{
return _center;
}
// PhysicsShapeEdgeBox // PhysicsShapeEdgeBox
PhysicsShapeEdgeBox* PhysicsShapeEdgeBox::create(Size size, PhysicsMaterial material/* = MaterialDefault*/, float border/* = 1*/, Point offset/* = Point(0, 0)*/) PhysicsShapeEdgeBox* PhysicsShapeEdgeBox::create(Size size, PhysicsMaterial material/* = MaterialDefault*/, float border/* = 1*/, Point offset/* = Point(0, 0)*/)
{ {
@ -382,7 +624,7 @@ bool PhysicsShapeEdgeBox::init(Size size, PhysicsMaterial material/* = MaterialD
{ {
do do
{ {
CC_BREAK_IF(!PhysicsShape::init(Type::EDGEBOX, material)); CC_BREAK_IF(!PhysicsShape::init(Type::EDGEBOX));
cpVect vec[4] = {}; cpVect vec[4] = {};
vec[0] = PhysicsHelper::point2cpv(Point(-size.width/2+offset.x, -size.height/2+offset.y)); vec[0] = PhysicsHelper::point2cpv(Point(-size.width/2+offset.x, -size.height/2+offset.y));
@ -400,10 +642,11 @@ bool PhysicsShapeEdgeBox::init(Size size, PhysicsMaterial material/* = MaterialD
} }
CC_BREAK_IF(i < 4); CC_BREAK_IF(i < 4);
_offset = offset;
_mass = PHYSICS_INFINITY; _mass = PHYSICS_INFINITY;
_angularDamping = PHYSICS_INFINITY; _moment = PHYSICS_INFINITY;
initEnd(); setMaterial(material);
return true; return true;
} while (false); } while (false);
@ -430,10 +673,11 @@ bool PhysicsShapeEdgePolygon::init(Point* points, int count, PhysicsMaterial mat
cpVect* vec = nullptr; cpVect* vec = nullptr;
do do
{ {
CC_BREAK_IF(!PhysicsShape::init(Type::EDGEPOLYGEN, material)); CC_BREAK_IF(!PhysicsShape::init(Type::EDGEPOLYGEN));
vec = new cpVect[count]; vec = new cpVect[count];
PhysicsHelper::points2cpvs(points, vec, count); PhysicsHelper::points2cpvs(points, vec, count);
_center = PhysicsHelper::cpv2point(cpCentroidForPoly(count, vec));
int i = 0; int i = 0;
for (; i < count; ++i) for (; i < count; ++i)
@ -445,23 +689,33 @@ bool PhysicsShapeEdgePolygon::init(Point* points, int count, PhysicsMaterial mat
cpShapeSetFriction(shape, 1.0f); cpShapeSetFriction(shape, 1.0f);
_info->add(shape); _info->add(shape);
} }
CC_SAFE_DELETE(vec); CC_SAFE_DELETE_ARRAY(vec);
CC_BREAK_IF(i < count); CC_BREAK_IF(i < count);
_mass = PHYSICS_INFINITY; _mass = PHYSICS_INFINITY;
_angularDamping = PHYSICS_INFINITY; _moment = PHYSICS_INFINITY;
initEnd(); setMaterial(material);
return true; return true;
} while (false); } while (false);
if (vec != nullptr) delete[] vec; CC_SAFE_DELETE_ARRAY(vec);
return false; return false;
} }
Point PhysicsShapeEdgePolygon::getCenter()
{
return _center;
}
int PhysicsShapeEdgePolygon::getPointsCount()
{
return _info->shapes.size() + 1;
}
// PhysicsShapeEdgeChain // PhysicsShapeEdgeChain
PhysicsShapeEdgeChain* PhysicsShapeEdgeChain::create(Point* points, int count, PhysicsMaterial material/* = MaterialDefault*/, float border/* = 1*/) PhysicsShapeEdgeChain* PhysicsShapeEdgeChain::create(Point* points, int count, PhysicsMaterial material/* = MaterialDefault*/, float border/* = 1*/)
{ {
@ -481,10 +735,11 @@ bool PhysicsShapeEdgeChain::init(Point* points, int count, PhysicsMaterial mater
cpVect* vec = nullptr; cpVect* vec = nullptr;
do do
{ {
CC_BREAK_IF(!PhysicsShape::init(Type::EDGECHAIN, material)); CC_BREAK_IF(!PhysicsShape::init(Type::EDGECHAIN));
vec = new cpVect[count]; vec = new cpVect[count];
PhysicsHelper::points2cpvs(points, vec, count); PhysicsHelper::points2cpvs(points, vec, count);
_center = PhysicsHelper::cpv2point(cpCentroidForPoly(count, vec));
int i = 0; int i = 0;
for (; i < count - 1; ++i) for (; i < count - 1; ++i)
@ -496,26 +751,36 @@ bool PhysicsShapeEdgeChain::init(Point* points, int count, PhysicsMaterial mater
cpShapeSetFriction(shape, 1.0f); cpShapeSetFriction(shape, 1.0f);
_info->add(shape); _info->add(shape);
} }
if (vec != nullptr) delete[] vec; CC_SAFE_DELETE_ARRAY(vec);
CC_BREAK_IF(i < count); CC_BREAK_IF(i < count);
_mass = PHYSICS_INFINITY; _mass = PHYSICS_INFINITY;
_angularDamping = PHYSICS_INFINITY; _moment = PHYSICS_INFINITY;
initEnd(); setMaterial(material);
return true; return true;
} while (false); } while (false);
if (vec != nullptr) delete[] vec; CC_SAFE_DELETE_ARRAY(vec);
return false; return false;
} }
Point PhysicsShapeEdgeChain::getCenter()
{
return _center;
}
int PhysicsShapeEdgeChain::getPointsCount()
{
return _info->shapes.size() + 1;
}
#elif (CC_PHYSICS_ENGINE == CC_PHYSICS_BOX2D) #elif (CC_PHYSICS_ENGINE == CC_PHYSICS_BOX2D)
#endif #endif
NS_CC_END NS_CC_END
#endif // CC_USE_PHYSICS #endif // CC_USE_PHYSICS

View File

@ -41,21 +41,17 @@ class PhysicsBodyInfo;
typedef struct PhysicsMaterial typedef struct PhysicsMaterial
{ {
float density; float density;
float elasticity; float restitution;
float friction; float friction;
PhysicsMaterial() static PhysicsMaterial make(float density, float restitution, float friction)
: density(0.0f) {
, elasticity(0.0f) PhysicsMaterial var = {density, restitution, friction};
, friction(0.0f){} return var;
}
PhysicsMaterial(float density, float elasticity, float friction)
: density(density)
, elasticity(elasticity)
, friction(friction){}
}PhysicsMaterial; }PhysicsMaterial;
const PhysicsMaterial PHYSICSSHAPE_MATERIAL_DEFAULT(0.0f, 1.0f, 1.0f); const PhysicsMaterial PHYSICSSHAPE_MATERIAL_DEFAULT = {0.0f, 1.0f, 1.0f};
/** /**
* @brief A shape for body. You do not create PhysicsWorld objects directly, instead, you can view PhysicsBody to see how to create it. * @brief A shape for body. You do not create PhysicsWorld objects directly, instead, you can view PhysicsBody to see how to create it.
@ -76,34 +72,39 @@ public:
}; };
public: public:
inline PhysicsBody* getBody(){ return _body; } inline PhysicsBody* getBody() const { return _body; }
inline Type getType() { return _type; } inline Type getType() const { return _type; }
inline float getArea() { return _area; } inline float getArea() const { return _area; }
inline float getAngularDumping() { return _angularDamping; } inline float getMoment() const { return _moment; }
void setAngularDumping(float angularDumping); void setMoment(float moment);
inline void setTag(int tag) { _tag = tag; } inline void setTag(int tag) { _tag = tag; }
inline int getTag() { return _tag; } inline int getTag() const { return _tag; }
void setEnable(bool enable);
inline bool isEnable() { return _enable; }
void addToBody();
inline float getMass() { return _mass; } inline float getMass() const { return _mass; }
void setMass(float mass); void setMass(float mass);
inline float getDensity() { return _material.density; } inline float getDensity() const { return _material.density; }
void setDensity(float density); void setDensity(float density);
void setElasticity(float elasticity); void setRestitution(float restitution);
void setFriction(float friction); void setFriction(float friction);
void setMaterial(PhysicsMaterial material);
virtual float calculateDefaultMoment() { return 0; }
virtual float calculateDefaultArea() { return 0; }
virtual Point getOffset() { return Point::ZERO; }
virtual Point getCenter() { return getOffset(); }
static Point* recenterPoints(Point* points, int count, Point center = Point::ZERO);
static Point getPolyonCenter(Point* points, int count);
protected: protected:
bool init(Type type, PhysicsMaterial material); bool init(Type type);
void initEnd();
/** /**
* @brief PhysicsShape is PhysicsBody's friend class, but all the subclasses isn't. so this method is use for subclasses to catch the bodyInfo from PhysicsBody. * @brief PhysicsShape is PhysicsBody's friend class, but all the subclasses isn't. so this method is use for subclasses to catch the bodyInfo from PhysicsBody.
*/ */
PhysicsBodyInfo* bodyInfo() const; PhysicsBodyInfo* bodyInfo() const;
inline void setBody(PhysicsBody* body) { _body = body; } void setBody(PhysicsBody* body);
protected: protected:
PhysicsShape(); PhysicsShape();
@ -115,13 +116,13 @@ protected:
Type _type; Type _type;
float _area; float _area;
float _mass; float _mass;
float _angularDamping; float _moment;
PhysicsMaterial _material; PhysicsMaterial _material;
int _tag; int _tag;
bool _enable;
friend class PhysicsWorld; friend class PhysicsWorld;
friend class PhysicsBody; friend class PhysicsBody;
friend class PhysicsJoint;
}; };
/** A circle shape */ /** A circle shape */
@ -129,15 +130,20 @@ class PhysicsShapeCircle : public PhysicsShape
{ {
public: public:
static PhysicsShapeCircle* create(float radius, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, Point offset = Point(0, 0)); static PhysicsShapeCircle* create(float radius, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, Point offset = Point(0, 0));
static float calculateArea(float radius);
static float calculateMoment(float mass, float radius, Point offset = Point(0, 0));
float calculateDefaultArea() override;
float calculateDefaultMoment() override;
float getRadius();
Point getOffset();
protected: protected:
bool init(float radius, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, Point offset = Point(0, 0)); bool init(float radius, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, Point offset = Point(0, 0));
protected: protected:
PhysicsShapeCircle(); PhysicsShapeCircle();
virtual ~PhysicsShapeCircle(); ~PhysicsShapeCircle();
friend class PhysicsBody;
}; };
/** A box shape */ /** A box shape */
@ -145,6 +151,15 @@ class PhysicsShapeBox : public PhysicsShape
{ {
public: public:
static PhysicsShapeBox* create(Size size, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, Point offset = Point(0, 0)); static PhysicsShapeBox* create(Size size, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, Point offset = Point(0, 0));
static float calculateArea(Size size);
static float calculateMoment(float mass, Size size, Point offset = Point(0, 0));
float calculateDefaultArea() override;
float calculateDefaultMoment() override;
Point* getPoints(Point* points);
Size getSize();
Point getOffset() override { return _offset; }
protected: protected:
bool init(Size size, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, Point offset = Point(0, 0)); bool init(Size size, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, Point offset = Point(0, 0));
@ -153,7 +168,8 @@ protected:
PhysicsShapeBox(); PhysicsShapeBox();
virtual ~PhysicsShapeBox(); virtual ~PhysicsShapeBox();
friend class PhysicsBody; protected:
Point _offset;
}; };
/** A polygon shape */ /** A polygon shape */
@ -161,7 +177,15 @@ class PhysicsShapePolygon : public PhysicsShape
{ {
public: public:
static PhysicsShapePolygon* create(Point* points, int count, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, Point offset = Point(0, 0)); static PhysicsShapePolygon* create(Point* points, int count, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, Point offset = Point(0, 0));
static float calculateArea(Point* points, int count);
static float calculateMoment(float mass, Point* points, int count, Point offset = Point(0, 0));
float calculateDefaultArea() override;
float calculateDefaultMoment() override;
Point* getPoints(Point* points);
int getPointsCount();
Point getCenter() override;
protected: protected:
bool init(Point* points, int count, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, Point offset = Point(0, 0)); bool init(Point* points, int count, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, Point offset = Point(0, 0));
@ -169,7 +193,8 @@ protected:
PhysicsShapePolygon(); PhysicsShapePolygon();
virtual ~PhysicsShapePolygon(); virtual ~PhysicsShapePolygon();
friend class PhysicsBody; protected:
Point _center;
}; };
/** A segment shape */ /** A segment shape */
@ -178,6 +203,10 @@ class PhysicsShapeEdgeSegment : public PhysicsShape
public: public:
static PhysicsShapeEdgeSegment* create(Point a, Point b, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1); static PhysicsShapeEdgeSegment* create(Point a, Point b, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1);
Point getPointA();
Point getPointB();
Point getCenter() override;
protected: protected:
bool init(Point a, Point b, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1); bool init(Point a, Point b, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1);
@ -185,6 +214,9 @@ protected:
PhysicsShapeEdgeSegment(); PhysicsShapeEdgeSegment();
virtual ~PhysicsShapeEdgeSegment(); virtual ~PhysicsShapeEdgeSegment();
protected:
Point _center;
friend class PhysicsBody; friend class PhysicsBody;
}; };
@ -193,6 +225,9 @@ class PhysicsShapeEdgeBox : public PhysicsShape
{ {
public: public:
static PhysicsShapeEdgeBox* create(Size size, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 0, Point offset = Point(0, 0)); static PhysicsShapeEdgeBox* create(Size size, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 0, Point offset = Point(0, 0));
Point getOffset() override { return _offset; }
Point* getPoints(Point* points);
int getPointsCount();
protected: protected:
bool init(Size size, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1, Point offset = Point(0, 0)); bool init(Size size, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1, Point offset = Point(0, 0));
@ -201,6 +236,9 @@ protected:
PhysicsShapeEdgeBox(); PhysicsShapeEdgeBox();
virtual ~PhysicsShapeEdgeBox(); virtual ~PhysicsShapeEdgeBox();
protected:
Point _offset;
friend class PhysicsBody; friend class PhysicsBody;
}; };
@ -209,6 +247,9 @@ class PhysicsShapeEdgePolygon : public PhysicsShape
{ {
public: public:
static PhysicsShapeEdgePolygon* create(Point* points, int count, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1); static PhysicsShapeEdgePolygon* create(Point* points, int count, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1);
Point getCenter() override;
Point* getPoints(Point* points);
int getPointsCount();
protected: protected:
bool init(Point* points, int count, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1); bool init(Point* points, int count, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1);
@ -218,6 +259,9 @@ protected:
virtual ~PhysicsShapeEdgePolygon(); virtual ~PhysicsShapeEdgePolygon();
friend class PhysicsBody; friend class PhysicsBody;
protected:
Point _center;
}; };
/** a chain shape */ /** a chain shape */
@ -225,6 +269,9 @@ class PhysicsShapeEdgeChain : public PhysicsShape
{ {
public: public:
static PhysicsShapeEdgeChain* create(Point* points, int count, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1); static PhysicsShapeEdgeChain* create(Point* points, int count, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1);
Point getCenter() override;
Point* getPoints(Point* points);
int getPointsCount();
protected: protected:
bool init(Point* points, int count, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1); bool init(Point* points, int count, PhysicsMaterial material = PHYSICSSHAPE_MATERIAL_DEFAULT, float border = 1);
@ -233,6 +280,9 @@ protected:
PhysicsShapeEdgeChain(); PhysicsShapeEdgeChain();
virtual ~PhysicsShapeEdgeChain(); virtual ~PhysicsShapeEdgeChain();
protected:
Point _center;
friend class PhysicsBody; friend class PhysicsBody;
}; };

View File

@ -35,17 +35,18 @@
#include "CCPhysicsShape.h" #include "CCPhysicsShape.h"
#include "CCPhysicsContact.h" #include "CCPhysicsContact.h"
#include "CCPhysicsJoint.h" #include "CCPhysicsJoint.h"
#include "CCPhysicsContact.h"
#include "chipmunk/CCPhysicsWorldInfo.h" #include "chipmunk/CCPhysicsWorldInfo.h"
#include "Box2D/CCPhysicsWorldInfo.h" #include "box2d/CCPhysicsWorldInfo.h"
#include "chipmunk/CCPhysicsBodyInfo.h" #include "chipmunk/CCPhysicsBodyInfo.h"
#include "Box2D/CCPhysicsBodyInfo.h" #include "box2d/CCPhysicsBodyInfo.h"
#include "chipmunk/CCPhysicsShapeInfo.h" #include "chipmunk/CCPhysicsShapeInfo.h"
#include "Box2D/CCPhysicsShapeInfo.h" #include "box2d/CCPhysicsShapeInfo.h"
#include "chipmunk/CCPhysicsContactInfo.h" #include "chipmunk/CCPhysicsContactInfo.h"
#include "Box2D/CCPhysicsContactInfo.h" #include "box2d/CCPhysicsContactInfo.h"
#include "chipmunk/CCPhysicsJointInfo.h" #include "chipmunk/CCPhysicsJointInfo.h"
#include "Box2D/CCPhysicsJointInfo.h" #include "box2d/CCPhysicsJointInfo.h"
#include "chipmunk/CCPhysicsHelper.h" #include "chipmunk/CCPhysicsHelper.h"
#include "CCDrawNode.h" #include "CCDrawNode.h"
@ -59,12 +60,45 @@ NS_CC_BEGIN
#if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK) #if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK)
namespace
{
typedef struct RayCastCallbackInfo
{
PhysicsWorld* world;
PhysicsRayCastCallback* callback;
Point p1;
Point p2;
void* data;
}RayCastCallbackInfo;
typedef struct RectQueryCallbackInfo
{
PhysicsWorld* world;
PhysicsRectQueryCallback* callback;
void* data;
}RectQueryCallbackInfo;
}
class PhysicsWorldCallback
{
public:
static int collisionBeginCallbackFunc(cpArbiter *arb, struct cpSpace *space, PhysicsWorld *world);
static int collisionPreSolveCallbackFunc(cpArbiter *arb, cpSpace *space, PhysicsWorld *world);
static void collisionPostSolveCallbackFunc(cpArbiter *arb, cpSpace *space, PhysicsWorld *world);
static void collisionSeparateCallbackFunc(cpArbiter *arb, cpSpace *space, PhysicsWorld *world);
static void rayCastCallbackFunc(cpShape *shape, cpFloat t, cpVect n, RayCastCallbackInfo *info);
static void rectQueryCallbackFunc(cpShape *shape, RectQueryCallbackInfo *info);
public:
static bool continues;
};
bool PhysicsWorldCallback::continues = true;
const float PHYSICS_INFINITY = INFINITY; const float PHYSICS_INFINITY = INFINITY;
int PhysicsWorld::collisionBeginCallbackFunc(cpArbiter *arb, struct cpSpace *space, void *data) int PhysicsWorldCallback::collisionBeginCallbackFunc(cpArbiter *arb, struct cpSpace *space, PhysicsWorld *world)
{ {
PhysicsWorld* world = static_cast<PhysicsWorld*>(data);
CP_ARBITER_GET_SHAPES(arb, a, b); CP_ARBITER_GET_SHAPES(arb, a, b);
auto ita = PhysicsShapeInfo::map.find(a); auto ita = PhysicsShapeInfo::map.find(a);
@ -77,23 +111,20 @@ int PhysicsWorld::collisionBeginCallbackFunc(cpArbiter *arb, struct cpSpace *spa
return world->collisionBeginCallback(*static_cast<PhysicsContact*>(arb->data)); return world->collisionBeginCallback(*static_cast<PhysicsContact*>(arb->data));
} }
int PhysicsWorld::collisionPreSolveCallbackFunc(cpArbiter *arb, cpSpace *space, void *data) int PhysicsWorldCallback::collisionPreSolveCallbackFunc(cpArbiter *arb, cpSpace *space, PhysicsWorld *world)
{ {
PhysicsWorld* world = static_cast<PhysicsWorld*>(data);
return world->collisionPreSolveCallback(*static_cast<PhysicsContact*>(arb->data), return world->collisionPreSolveCallback(*static_cast<PhysicsContact*>(arb->data),
PhysicsContactPreSolve()); PhysicsContactPreSolve());
} }
void PhysicsWorld::collisionPostSolveCallbackFunc(cpArbiter *arb, cpSpace *space, void *data) void PhysicsWorldCallback::collisionPostSolveCallbackFunc(cpArbiter *arb, cpSpace *space, PhysicsWorld *world)
{ {
PhysicsWorld* world = static_cast<PhysicsWorld*>(data);
world->collisionPostSolveCallback(*static_cast<PhysicsContact*>(arb->data), world->collisionPostSolveCallback(*static_cast<PhysicsContact*>(arb->data),
PhysicsContactPostSolve()); PhysicsContactPostSolve());
} }
void PhysicsWorld::collisionSeparateCallbackFunc(cpArbiter *arb, cpSpace *space, void *data) void PhysicsWorldCallback::collisionSeparateCallbackFunc(cpArbiter *arb, cpSpace *space, PhysicsWorld *world)
{ {
PhysicsWorld* world = static_cast<PhysicsWorld*>(data);
PhysicsContact* contact = static_cast<PhysicsContact*>(arb->data); PhysicsContact* contact = static_cast<PhysicsContact*>(arb->data);
world->collisionSeparateCallback(*contact); world->collisionSeparateCallback(*contact);
@ -101,6 +132,40 @@ void PhysicsWorld::collisionSeparateCallbackFunc(cpArbiter *arb, cpSpace *space,
delete contact; delete contact;
} }
void PhysicsWorldCallback::rayCastCallbackFunc(cpShape *shape, cpFloat t, cpVect n, RayCastCallbackInfo *info)
{
if (!PhysicsWorldCallback::continues)
{
return;
}
auto it = PhysicsShapeInfo::map.find(shape);
CC_ASSERT(it != PhysicsShapeInfo::map.end());
PhysicsWorldCallback::continues = info->callback->report(*info->world,
*it->second->shape,
Point(info->p1.x+(info->p2.x-info->p1.x)*t, info->p1.y+(info->p2.y-info->p1.y)*t),
Point(n.x, n.y),
(float)t,
info->data);
}
void PhysicsWorldCallback::rectQueryCallbackFunc(cpShape *shape, RectQueryCallbackInfo *info)
{
auto it = PhysicsShapeInfo::map.find(shape);
CC_ASSERT(it != PhysicsShapeInfo::map.end());
if (!PhysicsWorldCallback::continues)
{
return;
}
PhysicsWorldCallback::continues = info->callback->report(*info->world,
*it->second->shape,
info->data);
}
bool PhysicsWorld::init() bool PhysicsWorld::init()
{ {
_info = new PhysicsWorldInfo(); _info = new PhysicsWorldInfo();
@ -108,10 +173,10 @@ bool PhysicsWorld::init()
cpSpaceSetGravity(_info->space, PhysicsHelper::point2cpv(_gravity)); cpSpaceSetGravity(_info->space, PhysicsHelper::point2cpv(_gravity));
cpSpaceSetDefaultCollisionHandler(_info->space, cpSpaceSetDefaultCollisionHandler(_info->space,
PhysicsWorld::collisionBeginCallbackFunc, (cpCollisionBeginFunc)PhysicsWorldCallback::collisionBeginCallbackFunc,
PhysicsWorld::collisionPreSolveCallbackFunc, (cpCollisionPreSolveFunc)PhysicsWorldCallback::collisionPreSolveCallbackFunc,
PhysicsWorld::collisionPostSolveCallbackFunc, (cpCollisionPostSolveFunc)PhysicsWorldCallback::collisionPostSolveCallbackFunc,
PhysicsWorld::collisionSeparateCallbackFunc, (cpCollisionSeparateFunc)PhysicsWorldCallback::collisionSeparateCallbackFunc,
this); this);
return true; return true;
@ -125,9 +190,12 @@ void PhysicsWorld::addJoint(PhysicsJoint* joint)
{ {
_joints.push_back(joint); _joints.push_back(joint);
if (!cpSpaceContainsConstraint(_info->space, joint->_info->joint)) for (auto subjoint : joint->_info->joints)
{ {
cpSpaceAddConstraint(_info->space, joint->_info->joint); if (!cpSpaceContainsConstraint(_info->space, subjoint))
{
cpSpaceAddConstraint(_info->space, subjoint);
}
} }
} }
@ -164,8 +232,16 @@ void PhysicsWorld::addShape(PhysicsShape* shape)
void PhysicsWorld::addBody(PhysicsBody* body) void PhysicsWorld::addBody(PhysicsBody* body)
{ {
CCASSERT(body != nullptr, "the body can not be nullptr");
if (body->isEnable()) if (body->isEnable())
{ {
//is gravity enable
if (!body->isGravityEnable())
{
body->applyForce(-_gravity);
}
// add body to space // add body to space
if (body->isDynamic()) if (body->isDynamic())
{ {
@ -175,10 +251,7 @@ void PhysicsWorld::addBody(PhysicsBody* body)
// add shapes to space // add shapes to space
for (auto shape : body->getShapes()) for (auto shape : body->getShapes())
{ {
if (shape->isEnable()) addShape(shape);
{
addShape(shape);
}
} }
} }
@ -194,6 +267,18 @@ void PhysicsWorld::addBody(PhysicsBody* body)
void PhysicsWorld::removeBody(PhysicsBody* body) void PhysicsWorld::removeBody(PhysicsBody* body)
{ {
CCASSERT(body != nullptr, "the body can not be nullptr");
if (body->getWorld() == this)
{
// reset the gravity
if (!body->isGravityEnable())
{
body->applyForce(-_gravity);
}
}
// remove shaps
for (auto shape : body->getShapes()) for (auto shape : body->getShapes())
{ {
for (auto cps : shape->_info->shapes) for (auto cps : shape->_info->shapes)
@ -205,6 +290,7 @@ void PhysicsWorld::removeBody(PhysicsBody* body)
} }
} }
// remove body
if (cpSpaceContainsBody(_info->space, body->_info->body)) if (cpSpaceContainsBody(_info->space, body->_info->body))
{ {
cpSpaceRemoveBody(_info->space, body->_info->body); cpSpaceRemoveBody(_info->space, body->_info->body);
@ -242,6 +328,11 @@ void PhysicsWorld::removeShape(PhysicsShape* shape)
void PhysicsWorld::update(float delta) void PhysicsWorld::update(float delta)
{ {
for (auto body : *_bodys)
{
body->update(delta);
}
cpSpaceStep(_info->space, delta); cpSpaceStep(_info->space, delta);
if (_drawNode) if (_drawNode)
@ -300,12 +391,16 @@ void PhysicsWorld::drawWithShape(DrawNode* node, PhysicsShape* shape)
Point centre = PhysicsHelper::cpv2point(cpBodyGetPos(cpShapeGetBody(shape))) Point centre = PhysicsHelper::cpv2point(cpBodyGetPos(cpShapeGetBody(shape)))
+ PhysicsHelper::cpv2point(cpCircleShapeGetOffset(shape)); + PhysicsHelper::cpv2point(cpCircleShapeGetOffset(shape));
Point seg[4] = {}; static const int CIRCLE_SEG_NUM = 12;
seg[0] = Point(centre.x - radius, centre.y - radius); Point seg[CIRCLE_SEG_NUM] = {};
seg[1] = Point(centre.x - radius, centre.y + radius);
seg[2] = Point(centre.x + radius, centre.y + radius); for (int i = 0; i < CIRCLE_SEG_NUM; ++i)
seg[3] = Point(centre.x + radius, centre.y - radius); {
node->drawPolygon(seg, 4, Color4F(), 1, Color4F(1, 0, 0, 1)); float angle = (float)i * M_PI / (float)CIRCLE_SEG_NUM * 2.0f;
Point d(radius * cosf(angle), radius * sinf(angle));
seg[i] = centre + d;
}
node->drawPolygon(seg, CIRCLE_SEG_NUM, Color4F(1.0f, 0.0f, 0.0f, 0.3f), 1, Color4F(1, 0, 0, 1));
break; break;
} }
case CP_SEGMENT_SHAPE: case CP_SEGMENT_SHAPE:
@ -335,46 +430,145 @@ void PhysicsWorld::drawWithShape(DrawNode* node, PhysicsShape* shape)
} }
} }
int PhysicsWorld::collisionBeginCallback(const PhysicsContact& contact) int PhysicsWorld::collisionBeginCallback(PhysicsContact& contact)
{ {
if (_listener && _listener->onContactBegin) bool ret = true;
PhysicsBody* bodyA = contact.getShapeA()->getBody();
PhysicsBody* bodyB = contact.getShapeB()->getBody();
if ((bodyA->getCategoryBitmask() & bodyB->getContactTestBitmask()) == 0
|| (bodyB->getContactTestBitmask() & bodyA->getCategoryBitmask()) == 0)
{ {
return _listener->onContactBegin(contact); contact.setNotify(false);
}
if ((bodyA->getCategoryBitmask() & bodyB->getCollisionBitmask()) == 0
|| (bodyB->getCategoryBitmask() & bodyA->getCollisionBitmask()) == 0)
{
ret = false;
}
if (contact.getNotify() && _listener && _listener->onContactBegin)
{
// the mask has high priority than _listener->onContactBegin.
// so if the mask test is false, the two bodies won't have collision.
if (ret)
{
ret = _listener->onContactBegin(*this, contact);
}else
{
_listener->onContactBegin(*this, contact);
}
}
return ret;
}
int PhysicsWorld::collisionPreSolveCallback(PhysicsContact& contact, const PhysicsContactPreSolve& solve)
{
if (!contact.getNotify())
{
return true;
}
if (_listener && _listener->onContactPreSolve)
{
return _listener->onContactPreSolve(*this, contact, solve);
} }
return true; return true;
} }
int PhysicsWorld::collisionPreSolveCallback(const PhysicsContact& contact, const PhysicsContactPreSolve& solve) void PhysicsWorld::collisionPostSolveCallback(PhysicsContact& contact, const PhysicsContactPostSolve& solve)
{ {
if (_listener && _listener->onContactPreSolve) if (!contact.getNotify())
{ {
return _listener->onContactPreSolve(contact, solve); return;
} }
return true;
}
void PhysicsWorld::collisionPostSolveCallback(const PhysicsContact& contact, const PhysicsContactPostSolve& solve)
{
if (_listener && _listener->onContactPreSolve) if (_listener && _listener->onContactPreSolve)
{ {
_listener->onContactPostSolve(contact, solve); _listener->onContactPostSolve(*this, contact, solve);
} }
} }
void PhysicsWorld::collisionSeparateCallback(const PhysicsContact& contact) void PhysicsWorld::collisionSeparateCallback(PhysicsContact& contact)
{ {
if (!contact.getNotify())
{
return;
}
if (_listener && _listener->onContactEnd) if (_listener && _listener->onContactEnd)
{ {
_listener->onContactEnd(contact); _listener->onContactEnd(*this, contact);
} }
} }
void PhysicsWorld::setGravity(Point gravity) void PhysicsWorld::setGravity(Point gravity)
{ {
if (_bodys != nullptr)
{
for (auto child : *_bodys)
{
PhysicsBody* body = dynamic_cast<PhysicsBody*>(child);
// reset gravity for body
if (!body->isGravityEnable())
{
body->applyForce(-_gravity);
body->applyForce(gravity);
}
}
}
_gravity = gravity; _gravity = gravity;
cpSpaceSetGravity(_info->space, PhysicsHelper::point2cpv(_gravity)); cpSpaceSetGravity(_info->space, PhysicsHelper::point2cpv(gravity));
}
void PhysicsWorld::rayCast(PhysicsRayCastCallback& callback, Point point1, Point point2, void* data)
{
if (callback.report != nullptr)
{
RayCastCallbackInfo info = {this, &callback, point1, point2, data};
PhysicsWorldCallback::continues = true;
cpSpaceSegmentQuery(this->_info->space,
PhysicsHelper::point2cpv(point1),
PhysicsHelper::point2cpv(point2),
CP_ALL_LAYERS,
CP_NO_GROUP,
(cpSpaceSegmentQueryFunc)PhysicsWorldCallback::rayCastCallbackFunc,
&info);
}
}
void PhysicsWorld::rectQuery(PhysicsRectQueryCallback& callback, Rect rect, void* data)
{
if (callback.report != nullptr)
{
RectQueryCallbackInfo info = {this, &callback, data};
PhysicsWorldCallback::continues = true;
cpSpaceBBQuery(this->_info->space,
PhysicsHelper::rect2cpbb(rect),
CP_ALL_LAYERS,
CP_NO_GROUP,
(cpSpaceBBQueryFunc)PhysicsWorldCallback::rectQueryCallbackFunc,
&info);
}
}
Array* getShapesAtPoint(Point point)
{
}
Array* PhysicsWorld::getAllBody() const
{
return _bodys;
} }
#elif (CC_PHYSICS_ENGINE == CC_PHYSICS_BOX2D) #elif (CC_PHYSICS_ENGINE == CC_PHYSICS_BOX2D)

View File

@ -33,12 +33,6 @@
#include "CCObject.h" #include "CCObject.h"
#include "CCGeometry.h" #include "CCGeometry.h"
#if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK)
typedef struct cpArbiter cpArbiter;
typedef struct cpSpace cpSpace;
#endif
NS_CC_BEGIN NS_CC_BEGIN
class PhysicsBody; class PhysicsBody;
@ -55,6 +49,39 @@ class Sprite;
class Scene; class Scene;
class DrawNode; class DrawNode;
class PhysicsWorld;
class PhysicsRayCastCallback
{
public:
PhysicsRayCastCallback()
: report(nullptr)
{}
virtual ~PhysicsRayCastCallback(){}
/**
* @brief Called for each fixture found in the query. You control how the ray cast
* proceeds by returning a float:
* return true: continue
* return false: terminate the ray cast
* @param fixture the fixture hit by the ray
* @param point the point of initial intersection
* @param normal the normal vector at the point of intersection
* @return true to continue, false to terminate
*/
std::function<bool(PhysicsWorld&, PhysicsShape&, Point, Point, float, void*)> report;
};
class PhysicsRectQueryCallback
{
public:
PhysicsRectQueryCallback()
: report(nullptr)
{}
virtual ~PhysicsRectQueryCallback(){}
public:
std::function<bool(PhysicsWorld&, PhysicsShape&, void*)> report;
};
/** /**
* @brief An PhysicsWorld object simulates collisions and other physical properties. You do not create PhysicsWorld objects directly; instead, you can get it from an Scene object. * @brief An PhysicsWorld object simulates collisions and other physical properties. You do not create PhysicsWorld objects directly; instead, you can get it from an Scene object.
*/ */
@ -68,9 +95,9 @@ public:
/** Remove all joints from the physics world.*/ /** Remove all joints from the physics world.*/
void removeAllJoints(); void removeAllJoints();
Array* getBodysAlongRay(Point start, Point end) const; void rayCast(PhysicsRayCastCallback& callback, Point point1, Point point2, void* data);
Array* getBodysAtPoint(Point point) const; void rectQuery(PhysicsRectQueryCallback& callback, Rect rect, void* data);
Array* getBodysInRect(Rect rect) const; Array* getShapesAtPoint(Point point);
Array* getAllBody() const; Array* getAllBody() const;
/** Register a listener to receive contact callbacks*/ /** Register a listener to receive contact callbacks*/
@ -106,17 +133,10 @@ protected:
virtual void drawWithShape(DrawNode* node, PhysicsShape* shape); virtual void drawWithShape(DrawNode* node, PhysicsShape* shape);
virtual int collisionBeginCallback(const PhysicsContact& contact); virtual int collisionBeginCallback(PhysicsContact& contact);
virtual int collisionPreSolveCallback(const PhysicsContact& contact, const PhysicsContactPreSolve& solve); virtual int collisionPreSolveCallback(PhysicsContact& contact, const PhysicsContactPreSolve& solve);
virtual void collisionPostSolveCallback(const PhysicsContact& contact, const PhysicsContactPostSolve& solve); virtual void collisionPostSolveCallback(PhysicsContact& contact, const PhysicsContactPostSolve& solve);
virtual void collisionSeparateCallback(const PhysicsContact& contact); virtual void collisionSeparateCallback(PhysicsContact& contact);
#if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK)
static int collisionBeginCallbackFunc(cpArbiter *arb, struct cpSpace *space, void *data);
static int collisionPreSolveCallbackFunc(cpArbiter *arb, cpSpace *space, void *data);
static void collisionPostSolveCallbackFunc(cpArbiter *arb, cpSpace *space, void *data);
static void collisionSeparateCallbackFunc(cpArbiter *arb, cpSpace *space, void *data);
#endif
protected: protected:
Point _gravity; Point _gravity;
@ -140,6 +160,7 @@ protected:
friend class Scene; friend class Scene;
friend class PhysicsBody; friend class PhysicsBody;
friend class PhysicsShape; friend class PhysicsShape;
friend class PhysicsWorldCallback;
}; };
NS_CC_END NS_CC_END

View File

@ -28,6 +28,7 @@ NS_CC_BEGIN
PhysicsBodyInfo::PhysicsBodyInfo() PhysicsBodyInfo::PhysicsBodyInfo()
: body(nullptr) : body(nullptr)
, group(CP_NO_GROUP)
{ {
} }

View File

@ -37,6 +37,7 @@ class PhysicsBodyInfo : public Clonable
{ {
public: public:
cpBody* body; cpBody* body;
cpGroup group;
private: private:
PhysicsBodyInfo(); PhysicsBodyInfo();

View File

@ -43,13 +43,17 @@ public:
static cpVect size2cpv(const Size& size) { return cpv(size.width, size.height); } static cpVect size2cpv(const Size& size) { return cpv(size.width, size.height); }
static float cpfloat2float(cpFloat f) { return f; } static float cpfloat2float(cpFloat f) { return f; }
static cpFloat float2cpfloat(float f) { return f; } static cpFloat float2cpfloat(float f) { return f; }
static cpBB rect2cpbb(const Rect& rect) { return cpBBNew(rect.origin.x, rect.origin.y, rect.origin.x + rect.size.width, rect.origin.y + rect.size.height); }
static Rect cpbb2rect(const cpBB& bb) { return Rect(bb.l, bb.b, bb.r, bb.t); }
static void cpvs2points(const cpVect* cpvs, Point* points, int count) static Point* cpvs2points(const cpVect* cpvs, Point* points, int count)
{ {
for (int i = 0; i < count; ++i) for (int i = 0; i < count; ++i)
{ {
points[i] = cpv2point(cpvs[i]); points[i] = cpv2point(cpvs[i]);
} }
return points;
} }
static cpVect* points2cpvs(const Point* points, cpVect* cpvs, int count) static cpVect* points2cpvs(const Point* points, cpVect* cpvs, int count)

View File

@ -24,20 +24,59 @@
#include "CCPhysicsJointInfo.h" #include "CCPhysicsJointInfo.h"
#if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK) #if (CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK)
#include <algorithm>
NS_CC_BEGIN NS_CC_BEGIN
PhysicsJointInfo::PhysicsJointInfo() std::map<cpConstraint*, PhysicsJointInfo*> PhysicsJointInfo::map;
: joint(nullptr)
PhysicsJointInfo::PhysicsJointInfo(PhysicsJoint* joint)
: joint(joint)
{ {
} }
PhysicsJointInfo::~PhysicsJointInfo() PhysicsJointInfo::~PhysicsJointInfo()
{ {
if (joint) for (cpConstraint* joint : joints)
{ {
cpConstraintFree(joint); cpConstraintFree(joint);
} }
} }
void PhysicsJointInfo::add(cpConstraint* joint)
{
if (joint == nullptr) return;
joints.push_back(joint);
map.insert(std::pair<cpConstraint*, PhysicsJointInfo*>(joint, this));
}
void PhysicsJointInfo::remove(cpConstraint* joint)
{
if (joint == nullptr) return;
auto it = std::find(joints.begin(), joints.end(), joint);
if (it != joints.end())
{
joints.erase(it);
auto mit = map.find(joint);
if (mit != map.end()) map.erase(mit);
cpConstraintFree(joint);
}
}
void PhysicsJointInfo::removeAll()
{
for (cpConstraint* joint : joints)
{
auto mit = map.find(joint);
if (mit != map.end()) map.erase(mit);
cpConstraintFree(joint);
}
joints.clear();
}
NS_CC_END NS_CC_END
#endif // CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK #endif // CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK

View File

@ -29,15 +29,26 @@
#define __CCPHYSICS_JOINT_INFO_H__ #define __CCPHYSICS_JOINT_INFO_H__
#include "chipmunk.h" #include "chipmunk.h"
#include "CCPlatformMacros.h" #include "CCPlatformMacros.h"
#include <vector>
#include <map>
NS_CC_BEGIN NS_CC_BEGIN
class PhysicsJoint;
class PhysicsJointInfo class PhysicsJointInfo
{ {
public: public:
cpConstraint* joint; void add(cpConstraint* shape);
void remove(cpConstraint* shape);
void removeAll();
public:
std::vector<cpConstraint*> joints;
PhysicsJoint* joint;
static std::map<cpConstraint*, PhysicsJointInfo*> map;
private: private:
PhysicsJointInfo(); PhysicsJointInfo(PhysicsJoint* joint);
~PhysicsJointInfo(); ~PhysicsJointInfo();
friend class PhysicsJoint; friend class PhysicsJoint;

View File

@ -32,6 +32,7 @@ cpBody* PhysicsShapeInfo::shareBody = nullptr;
PhysicsShapeInfo::PhysicsShapeInfo(PhysicsShape* shape) PhysicsShapeInfo::PhysicsShapeInfo(PhysicsShape* shape)
: shape(shape) : shape(shape)
, group(CP_NO_GROUP)
{ {
if (shareBody == nullptr) if (shareBody == nullptr)
{ {
@ -52,10 +53,33 @@ PhysicsShapeInfo::~PhysicsShapeInfo()
} }
} }
void PhysicsShapeInfo::setGroup(cpGroup group)
{
this->group = group;
for (cpShape* shape : shapes)
{
cpShapeSetGroup(shape, group);
}
}
void PhysicsShapeInfo::setBody(cpBody* body)
{
if (this->body != body)
{
this->body = body;
for (cpShape* shape : shapes)
{
cpShapeSetBody(shape, body == nullptr ? shareBody : body);
}
}
}
void PhysicsShapeInfo::add(cpShape* shape) void PhysicsShapeInfo::add(cpShape* shape)
{ {
if (shape == nullptr) return; if (shape == nullptr) return;
cpShapeSetGroup(shape, group);
shapes.push_back(shape); shapes.push_back(shape);
map.insert(std::pair<cpShape*, PhysicsShapeInfo*>(shape, this)); map.insert(std::pair<cpShape*, PhysicsShapeInfo*>(shape, this));
} }
@ -71,8 +95,22 @@ void PhysicsShapeInfo::remove(cpShape* shape)
auto mit = map.find(shape); auto mit = map.find(shape);
if (mit != map.end()) map.erase(mit); if (mit != map.end()) map.erase(mit);
cpShapeFree(shape);
} }
} }
void PhysicsShapeInfo::removeAll()
{
for (cpShape* shape : shapes)
{
auto mit = map.find(shape);
if (mit != map.end()) map.erase(mit);
cpShapeFree(shape);
}
shapes.clear();
}
NS_CC_END NS_CC_END
#endif // CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK #endif // CC_PHYSICS_ENGINE == CC_PHYSICS_CHIPMUNK

View File

@ -42,12 +42,15 @@ class PhysicsShapeInfo
public: public:
void add(cpShape* shape); void add(cpShape* shape);
void remove(cpShape* shape); void remove(cpShape* shape);
void removeall(); void removeAll();
void setGroup(cpGroup group);
void setBody(cpBody* body);
public: public:
std::vector<cpShape*> shapes; std::vector<cpShape*> shapes;
PhysicsShape* shape; PhysicsShape* shape;
cpBody* body; cpBody* body;
cpGroup group;
static std::map<cpShape*, PhysicsShapeInfo*> map; static std::map<cpShape*, PhysicsShapeInfo*> map;
static cpBody* shareBody; static cpBody* shareBody;

@ -1 +1 @@
Subproject commit 73aebd082ae63561cc1ca769f28e302820da7e39 Subproject commit 893da8ccfb4ed7fa754c483a90dc4e5248c36e03

View File

@ -36,7 +36,8 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/../../../CocosDenshion/include \ $(LOCAL_PATH)/../../../CocosDenshion/include \
$(LOCAL_PATH)/../../auto-generated/js-bindings \ $(LOCAL_PATH)/../../auto-generated/js-bindings \
$(LOCAL_PATH)/../../../../extensions \ $(LOCAL_PATH)/../../../../extensions \
$(LOCAL_PATH)/../../../editor-support/cocostudio $(LOCAL_PATH)/../../../editor-support/cocostudio \
$(LOCAL_PATH)/../../../editor-support/cocosbuilder
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/../../auto-generated/js-bindings $(LOCAL_PATH)/../../auto-generated/js-bindings

View File

@ -0,0 +1,121 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="js_bindings_chipmunk_auto_classes.h" />
<ClInclude Include="js_bindings_chipmunk_auto_classes_registration.h" />
<ClInclude Include="js_bindings_chipmunk_functions.h" />
<ClInclude Include="js_bindings_chipmunk_functions_registration.h" />
<ClInclude Include="js_bindings_chipmunk_manual.h" />
<ClInclude Include="js_bindings_chipmunk_registration.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="js_bindings_chipmunk_auto_classes.cpp" />
<ClCompile Include="js_bindings_chipmunk_functions.cpp" />
<ClCompile Include="js_bindings_chipmunk_manual.cpp" />
<ClCompile Include="js_bindings_chipmunk_registration.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{21070E58-EEC6-4E16-8B4F-6D083DF55790}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>libJSBindingForChipmunk</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_LIB;DEBUG;COCOS2D_DEBUG=1;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\auto-generated\js-bindings;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4068;4101;4800;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\..\..\..\external\sqlite3\libraries\win32\*.*" "$(OutDir)"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_LIB;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\auto-generated\js-bindings;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4068;4101;4800;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="generated">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="manual">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="js_bindings_chipmunk_auto_classes_registration.h">
<Filter>manual</Filter>
</ClInclude>
<ClInclude Include="js_bindings_chipmunk_functions.h">
<Filter>manual</Filter>
</ClInclude>
<ClInclude Include="js_bindings_chipmunk_functions_registration.h">
<Filter>manual</Filter>
</ClInclude>
<ClInclude Include="js_bindings_chipmunk_manual.h">
<Filter>manual</Filter>
</ClInclude>
<ClInclude Include="js_bindings_chipmunk_registration.h">
<Filter>manual</Filter>
</ClInclude>
<ClInclude Include="js_bindings_chipmunk_auto_classes.h">
<Filter>manual</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="js_bindings_chipmunk_functions.cpp">
<Filter>manual</Filter>
</ClCompile>
<ClCompile Include="js_bindings_chipmunk_manual.cpp">
<Filter>manual</Filter>
</ClCompile>
<ClCompile Include="js_bindings_chipmunk_registration.cpp">
<Filter>manual</Filter>
</ClCompile>
<ClCompile Include="js_bindings_chipmunk_auto_classes.cpp">
<Filter>manual</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>false</ShowAllFiles>
</PropertyGroup>
</Project>

View File

@ -1 +1 @@
bf994ad1fc8ac1044957d83708f7848e99ca59e6 33fef8c7bc7006ad55c27fd0ed9c9dd2c8064079

View File

@ -101,25 +101,6 @@ protected:
jsval _extraData; jsval _extraData;
}; };
class JSCCBAnimationWrapper: public JSCallbackWrapper {
public:
JSCCBAnimationWrapper() {}
virtual ~JSCCBAnimationWrapper() {}
void animationCompleteCallback() {
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
jsval retval = JSVAL_NULL;
if(!JSVAL_IS_VOID(_jsCallback) && !JSVAL_IS_VOID(_jsThisObj)) {
JS_CallFunctionValue(cx, JSVAL_TO_OBJECT(_jsThisObj), _jsCallback, 0, NULL, &retval);
}
}
};
class JSCallFuncWrapper: public JSCallbackWrapper { class JSCallFuncWrapper: public JSCallbackWrapper {
public: public:
JSCallFuncWrapper() {} JSCallFuncWrapper() {}

View File

@ -0,0 +1,23 @@
#ifndef __JS_COCOSBUILDER_SPECIFICS_H__
#define __JS_COCOSBUILDER_SPECIFICS_H__
#include "../cocos2d_specifics.hpp"
class JSCCBAnimationWrapper: public JSCallbackWrapper {
public:
JSCCBAnimationWrapper() {}
virtual ~JSCCBAnimationWrapper() {}
void animationCompleteCallback() {
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
jsval retval = JSVAL_NULL;
if(!JSVAL_IS_VOID(_jsCallback) && !JSVAL_IS_VOID(_jsThisObj)) {
JS_CallFunctionValue(cx, JSVAL_TO_OBJECT(_jsThisObj), _jsCallback, 0, NULL, &retval);
}
}
};
#endif

View File

@ -9,7 +9,7 @@
#define __JS_BINDINGS_CCBREADER_H__ #define __JS_BINDINGS_CCBREADER_H__
#include "jsapi.h" #include "jsapi.h"
#include "cocos2d_specifics.hpp" #include "cocosbuilder_specifics.hpp"
#include "cocosbuilder/CocosBuilder.h" #include "cocosbuilder/CocosBuilder.h"
class CCBScriptCallbackProxy: public cocos2d::Layer class CCBScriptCallbackProxy: public cocos2d::Layer

View File

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_builder_auto.cpp" />
<ClCompile Include="js_bindings_ccbreader.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_builder_auto.hpp" />
<ClInclude Include="cocosbuilder_specifics.hpp" />
<ClInclude Include="js_bindings_ccbreader.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_builder_auto_api.js" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>libJSBindingForBuilder</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_LIB;DEBUG;COCOS2D_DEBUG=1;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\auto-generated\js-bindings;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4068;4101;4800;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\..\..\..\external\sqlite3\libraries\win32\*.*" "$(OutDir)"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_LIB;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\editor-support\cocosbuilder;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\auto-generated\js-bindings;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4068;4101;4800;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="generated">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="manual">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_builder_auto.cpp">
<Filter>generated</Filter>
</ClCompile>
<ClCompile Include="js_bindings_ccbreader.cpp">
<Filter>manual</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_builder_auto.hpp">
<Filter>generated</Filter>
</ClInclude>
<ClInclude Include="cocosbuilder_specifics.hpp">
<Filter>manual</Filter>
</ClInclude>
<ClInclude Include="js_bindings_ccbreader.h">
<Filter>manual</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_builder_auto_api.js">
<Filter>generated</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>false</ShowAllFiles>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,229 @@
//
// jsb_cocos2dx_studio_manual.h
//
// Created by LinWenhai on 20/10/13.
//
//
#include "jsb_cocos2dx_studio_manual.h"
#include "ScriptingCore.h"
#include "cocos2d_specifics.hpp"
#include "cocostudio/CocoStudio.h"
class JSArmatureWrapper: public JSCallbackWrapper {
public:
JSArmatureWrapper();
virtual ~JSArmatureWrapper();
virtual void setJSCallbackThis(jsval thisObj);
void movementCallbackFunc(cocostudio::Armature * pArmature, cocostudio::MovementEventType pMovementEventType, const char *pMovementId);
void frameCallbackFunc(cocostudio::Bone *pBone, const char *frameEventName, int originFrameIndex, int currentFrameIndex);
void addArmatureFileInfoAsyncCallbackFunc(float percent);
private:
bool m_bNeedUnroot;
};
JSArmatureWrapper::JSArmatureWrapper()
: m_bNeedUnroot(false)
{
}
JSArmatureWrapper::~JSArmatureWrapper()
{
if (m_bNeedUnroot)
{
JSObject *thisObj = JSVAL_TO_OBJECT(_jsThisObj);
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
JS_RemoveObjectRoot(cx, &thisObj);
}
}
void JSArmatureWrapper::setJSCallbackThis(jsval _jsThisObj)
{
JSCallbackWrapper::setJSCallbackThis(_jsThisObj);
JSObject *thisObj = JSVAL_TO_OBJECT(_jsThisObj);
js_proxy *p = jsb_get_js_proxy(thisObj);
if (!p)
{
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
JS_AddObjectRoot(cx, &thisObj);
m_bNeedUnroot = true;
}
}
void JSArmatureWrapper::movementCallbackFunc(cocostudio::Armature *pArmature, cocostudio::MovementEventType pMovementEventType, const char *pMovementId)
{
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
JSObject *thisObj = JSVAL_IS_VOID(_jsThisObj) ? NULL : JSVAL_TO_OBJECT(_jsThisObj);
js_proxy_t *proxy = js_get_or_create_proxy(cx, pArmature);
jsval retval;
if (_jsCallback != JSVAL_VOID)
{
int movementEventType = (int)pMovementEventType;
jsval movementVal = INT_TO_JSVAL(movementEventType);
jsval idVal = c_string_to_jsval(cx, pMovementId);
jsval valArr[3];
valArr[0] = OBJECT_TO_JSVAL(proxy->obj);
valArr[1] = movementVal;
valArr[2] = idVal;
JS_AddValueRoot(cx, valArr);
JS_CallFunctionValue(cx, thisObj, _jsCallback, 3, valArr, &retval);
JS_RemoveValueRoot(cx, valArr);
}
}
void JSArmatureWrapper::addArmatureFileInfoAsyncCallbackFunc(float percent)
{
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
JSObject *thisObj = JSVAL_IS_VOID(_jsThisObj) ? NULL : JSVAL_TO_OBJECT(_jsThisObj);
jsval retval;
if (_jsCallback != JSVAL_VOID)
{
jsval percentVal = DOUBLE_TO_JSVAL(percent);
JS_AddValueRoot(cx, &percentVal);
JS_CallFunctionValue(cx, thisObj, _jsCallback, 1, &percentVal, &retval);
JS_RemoveValueRoot(cx, &percentVal);
}
}
void JSArmatureWrapper::frameCallbackFunc(cocostudio::Bone *pBone, const char *frameEventName, int originFrameIndex, int currentFrameIndex)
{
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
JSObject *thisObj = JSVAL_IS_VOID(_jsThisObj) ? NULL : JSVAL_TO_OBJECT(_jsThisObj);
js_proxy_t *proxy = js_get_or_create_proxy(cx, pBone);
jsval retval;
if (_jsCallback != JSVAL_VOID)
{
jsval nameVal = c_string_to_jsval(cx, frameEventName);
jsval originIndexVal = INT_TO_JSVAL(originFrameIndex);
jsval currentIndexVal = INT_TO_JSVAL(currentFrameIndex);
jsval valArr[4];
valArr[0] = OBJECT_TO_JSVAL(proxy->obj);
valArr[1] = nameVal;
valArr[2] = originIndexVal;
valArr[3] = currentIndexVal;
JS_AddValueRoot(cx, valArr);
JS_CallFunctionValue(cx, thisObj, _jsCallback, 4, valArr, &retval);
JS_RemoveValueRoot(cx, valArr);
}
}
static JSBool js_cocos2dx_ArmatureAnimation_setMovementEventCallFunc(JSContext *cx, uint32_t argc, jsval *vp)
{
JSObject *obj = JS_THIS_OBJECT(cx, vp);
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocostudio::ArmatureAnimation* cobj = (cocostudio::ArmatureAnimation *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object");
if (argc == 2) {
jsval *argv = JS_ARGV(cx, vp);
JSArmatureWrapper *tmpObj = new JSArmatureWrapper();
tmpObj->autorelease();
tmpObj->setJSCallbackFunc(argv[0]);
tmpObj->setJSCallbackThis(argv[1]);
cobj->setMovementEventCallFunc(tmpObj, movementEvent_selector(JSArmatureWrapper::movementCallbackFunc));
return JS_TRUE;
}
JS_ReportError(cx, "Invalid number of arguments");
return JS_FALSE;
}
static JSBool js_cocos2dx_ArmatureAnimation_setFrameEventCallFunc(JSContext *cx, uint32_t argc, jsval *vp)
{
JSObject *obj = JS_THIS_OBJECT(cx, vp);
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocostudio::ArmatureAnimation* cobj = (cocostudio::ArmatureAnimation *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object");
if (argc == 2) {
jsval *argv = JS_ARGV(cx, vp);
JSArmatureWrapper *tmpObj = new JSArmatureWrapper();
tmpObj->autorelease();
tmpObj->setJSCallbackFunc(argv[0]);
tmpObj->setJSCallbackThis(argv[1]);
cobj->setFrameEventCallFunc(tmpObj, frameEvent_selector(JSArmatureWrapper::frameCallbackFunc));
return JS_TRUE;
}
JS_ReportError(cx, "Invalid number of arguments");
return JS_FALSE;
}
static JSBool jsb_Animation_addArmatureFileInfoAsyncCallFunc(JSContext *cx, uint32_t argc, jsval *vp)
{
JSObject *obj = JS_THIS_OBJECT(cx, vp);
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocostudio::ArmatureDataManager* cobj = (cocostudio::ArmatureDataManager *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object");
if (argc == 3) {
jsval *argv = JS_ARGV(cx, vp);
JSArmatureWrapper *tmpObj = new JSArmatureWrapper();
tmpObj->autorelease();
tmpObj->setJSCallbackFunc(argv[2]);
tmpObj->setJSCallbackThis(argv[1]);
std::string ret;
jsval_to_std_string(cx, argv[0], &ret);
cobj->addArmatureFileInfoAsync(ret.c_str(), tmpObj, schedule_selector(JSArmatureWrapper::addArmatureFileInfoAsyncCallbackFunc));
return JS_TRUE;
}
if(argc == 5){
jsval *argv = JS_ARGV(cx, vp);
JSArmatureWrapper *tmpObj = new JSArmatureWrapper();
tmpObj->autorelease();
tmpObj->setJSCallbackFunc(argv[4]);
tmpObj->setJSCallbackThis(argv[3]);
std::string imagePath;
jsval_to_std_string(cx ,argv[0] , &imagePath);
std::string plistPath;
jsval_to_std_string(cx ,argv[1] , &plistPath);
std::string configFilePath;
jsval_to_std_string(cx ,argv[2] , &configFilePath);
cobj->addArmatureFileInfoAsync(imagePath.c_str(), plistPath.c_str(), configFilePath.c_str(), tmpObj, schedule_selector(JSArmatureWrapper::addArmatureFileInfoAsyncCallbackFunc));
return JS_TRUE;
}
JS_ReportError(cx, "Invalid number of arguments");
return JS_FALSE;
}
extern JSObject* jsb_ArmatureAnimation_prototype;
extern JSObject* jsb_ArmatureDataManager_prototype;
void register_all_cocos2dx_studio_manual(JSContext* cx, JSObject* global)
{
JS_DefineFunction(cx, jsb_ArmatureAnimation_prototype, "setMovementEventCallFunc", js_cocos2dx_ArmatureAnimation_setMovementEventCallFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT);
JS_DefineFunction(cx, jsb_ArmatureAnimation_prototype, "setFrameEventCallFunc", js_cocos2dx_ArmatureAnimation_setFrameEventCallFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT);
JS_DefineFunction(cx, jsb_ArmatureDataManager_prototype, "addArmatureFileInfoAsync", jsb_Animation_addArmatureFileInfoAsyncCallFunc, 3, JSPROP_READONLY | JSPROP_PERMANENT);
}

View File

@ -0,0 +1,16 @@
//
// jsb_cocos2dx_studio_manual.h
//
// Created by LinWenhai on 20/10/13.
//
//
#ifndef __jsb_cocos2dx_studio_manual__
#define __jsb_cocos2dx_studio_manual__
#include "jsapi.h"
#include "jsfriendapi.h"
void register_all_cocos2dx_studio_manual(JSContext* cx, JSObject* global);
#endif /* defined(__jsb_cocos2dx_studio_manual__) */

View File

@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_studio_auto.cpp" />
<ClCompile Include="jsb_cocos2dx_studio_manual.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_studio_auto.hpp" />
<ClInclude Include="jsb_cocos2dx_studio_manual.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_studio_auto_api.js" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{79D34511-E54E-410A-8BBA-EF175AD6C695}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>libJSBindingForStudio</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_LIB;DEBUG;COCOS2D_DEBUG=1;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\auto-generated\js-bindings;$(EngineRoot)external;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4068;4101;4800;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\..\..\..\external\sqlite3\libraries\win32\*.*" "$(OutDir)"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_LIB;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\editor-support\cocostudio;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\auto-generated\js-bindings;$(EngineRoot)external;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4068;4101;4800;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="generated">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="manual">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_studio_auto.cpp">
<Filter>generated</Filter>
</ClCompile>
<ClCompile Include="jsb_cocos2dx_studio_manual.cpp">
<Filter>manual</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_studio_auto.hpp">
<Filter>generated</Filter>
</ClInclude>
<ClInclude Include="jsb_cocos2dx_studio_manual.h">
<Filter>manual</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_studio_auto_api.js">
<Filter>generated</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>false</ShowAllFiles>
</PropertyGroup>
</Project>

View File

@ -9,7 +9,6 @@
#include "extensions/cocos-ext.h" #include "extensions/cocos-ext.h"
#include "ScriptingCore.h" #include "ScriptingCore.h"
#include "cocos2d_specifics.hpp" #include "cocos2d_specifics.hpp"
#include "cocostudio/CocoStudio.h"
USING_NS_CC; USING_NS_CC;
USING_NS_CC_EXT; USING_NS_CC_EXT;
@ -781,218 +780,9 @@ static JSBool js_cocos2dx_CCControl_removeTargetWithActionForControlEvents(JSCon
return JS_FALSE; return JS_FALSE;
} }
class JSArmatureWrapper: public JSCallbackWrapper {
public:
JSArmatureWrapper();
virtual ~JSArmatureWrapper();
virtual void setJSCallbackThis(jsval thisObj);
void movementCallbackFunc(cocostudio::Armature * pArmature, cocostudio::MovementEventType pMovementEventType, const char *pMovementId);
void frameCallbackFunc(cocostudio::Bone *pBone, const char *frameEventName, int originFrameIndex, int currentFrameIndex);
void addArmatureFileInfoAsyncCallbackFunc(float percent);
private:
bool m_bNeedUnroot;
};
JSArmatureWrapper::JSArmatureWrapper()
: m_bNeedUnroot(false)
{
}
JSArmatureWrapper::~JSArmatureWrapper()
{
if (m_bNeedUnroot)
{
JSObject *thisObj = JSVAL_TO_OBJECT(_jsThisObj);
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
JS_RemoveObjectRoot(cx, &thisObj);
}
}
void JSArmatureWrapper::setJSCallbackThis(jsval _jsThisObj)
{
JSCallbackWrapper::setJSCallbackThis(_jsThisObj);
JSObject *thisObj = JSVAL_TO_OBJECT(_jsThisObj);
js_proxy *p = jsb_get_js_proxy(thisObj);
if (!p)
{
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
JS_AddObjectRoot(cx, &thisObj);
m_bNeedUnroot = true;
}
}
void JSArmatureWrapper::movementCallbackFunc(cocostudio::Armature *pArmature, cocostudio::MovementEventType pMovementEventType, const char *pMovementId)
{
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
JSObject *thisObj = JSVAL_IS_VOID(_jsThisObj) ? NULL : JSVAL_TO_OBJECT(_jsThisObj);
js_proxy_t *proxy = js_get_or_create_proxy(cx, pArmature);
jsval retval;
if (_jsCallback != JSVAL_VOID)
{
int movementEventType = (int)pMovementEventType;
jsval movementVal = INT_TO_JSVAL(movementEventType);
jsval idVal = c_string_to_jsval(cx, pMovementId);
jsval valArr[3];
valArr[0] = OBJECT_TO_JSVAL(proxy->obj);
valArr[1] = movementVal;
valArr[2] = idVal;
JS_AddValueRoot(cx, valArr);
JS_CallFunctionValue(cx, thisObj, _jsCallback, 3, valArr, &retval);
JS_RemoveValueRoot(cx, valArr);
}
}
void JSArmatureWrapper::addArmatureFileInfoAsyncCallbackFunc(float percent)
{
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
JSObject *thisObj = JSVAL_IS_VOID(_jsThisObj) ? NULL : JSVAL_TO_OBJECT(_jsThisObj);
jsval retval;
if (_jsCallback != JSVAL_VOID)
{
jsval percentVal = DOUBLE_TO_JSVAL(percent);
JS_AddValueRoot(cx, &percentVal);
JS_CallFunctionValue(cx, thisObj, _jsCallback, 1, &percentVal, &retval);
JS_RemoveValueRoot(cx, &percentVal);
}
}
void JSArmatureWrapper::frameCallbackFunc(cocostudio::Bone *pBone, const char *frameEventName, int originFrameIndex, int currentFrameIndex)
{
JSContext *cx = ScriptingCore::getInstance()->getGlobalContext();
JSObject *thisObj = JSVAL_IS_VOID(_jsThisObj) ? NULL : JSVAL_TO_OBJECT(_jsThisObj);
js_proxy_t *proxy = js_get_or_create_proxy(cx, pBone);
jsval retval;
if (_jsCallback != JSVAL_VOID)
{
jsval nameVal = c_string_to_jsval(cx, frameEventName);
jsval originIndexVal = INT_TO_JSVAL(originFrameIndex);
jsval currentIndexVal = INT_TO_JSVAL(currentFrameIndex);
jsval valArr[4];
valArr[0] = OBJECT_TO_JSVAL(proxy->obj);
valArr[1] = nameVal;
valArr[2] = originIndexVal;
valArr[3] = currentIndexVal;
JS_AddValueRoot(cx, valArr);
JS_CallFunctionValue(cx, thisObj, _jsCallback, 4, valArr, &retval);
JS_RemoveValueRoot(cx, valArr);
}
}
static JSBool js_cocos2dx_ArmatureAnimation_setMovementEventCallFunc(JSContext *cx, uint32_t argc, jsval *vp)
{
JSObject *obj = JS_THIS_OBJECT(cx, vp);
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocostudio::ArmatureAnimation* cobj = (cocostudio::ArmatureAnimation *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object");
if (argc == 2) {
jsval *argv = JS_ARGV(cx, vp);
JSArmatureWrapper *tmpObj = new JSArmatureWrapper();
tmpObj->autorelease();
tmpObj->setJSCallbackFunc(argv[0]);
tmpObj->setJSCallbackThis(argv[1]);
cobj->setMovementEventCallFunc(tmpObj, movementEvent_selector(JSArmatureWrapper::movementCallbackFunc));
return JS_TRUE;
}
JS_ReportError(cx, "Invalid number of arguments");
return JS_FALSE;
}
static JSBool js_cocos2dx_ArmatureAnimation_setFrameEventCallFunc(JSContext *cx, uint32_t argc, jsval *vp)
{
JSObject *obj = JS_THIS_OBJECT(cx, vp);
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocostudio::ArmatureAnimation* cobj = (cocostudio::ArmatureAnimation *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object");
if (argc == 2) {
jsval *argv = JS_ARGV(cx, vp);
JSArmatureWrapper *tmpObj = new JSArmatureWrapper();
tmpObj->autorelease();
tmpObj->setJSCallbackFunc(argv[0]);
tmpObj->setJSCallbackThis(argv[1]);
cobj->setFrameEventCallFunc(tmpObj, frameEvent_selector(JSArmatureWrapper::frameCallbackFunc));
return JS_TRUE;
}
JS_ReportError(cx, "Invalid number of arguments");
return JS_FALSE;
}
static JSBool jsb_Animation_addArmatureFileInfoAsyncCallFunc(JSContext *cx, uint32_t argc, jsval *vp)
{
JSObject *obj = JS_THIS_OBJECT(cx, vp);
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocostudio::ArmatureDataManager* cobj = (cocostudio::ArmatureDataManager *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object");
if (argc == 3) {
jsval *argv = JS_ARGV(cx, vp);
JSArmatureWrapper *tmpObj = new JSArmatureWrapper();
tmpObj->autorelease();
tmpObj->setJSCallbackFunc(argv[2]);
tmpObj->setJSCallbackThis(argv[1]);
std::string ret;
jsval_to_std_string(cx, argv[0], &ret);
cobj->addArmatureFileInfoAsync(ret.c_str(), tmpObj, schedule_selector(JSArmatureWrapper::addArmatureFileInfoAsyncCallbackFunc));
return JS_TRUE;
}
if(argc == 5){
jsval *argv = JS_ARGV(cx, vp);
JSArmatureWrapper *tmpObj = new JSArmatureWrapper();
tmpObj->autorelease();
tmpObj->setJSCallbackFunc(argv[4]);
tmpObj->setJSCallbackThis(argv[3]);
std::string imagePath;
jsval_to_std_string(cx ,argv[0] , &imagePath);
std::string plistPath;
jsval_to_std_string(cx ,argv[1] , &plistPath);
std::string configFilePath;
jsval_to_std_string(cx ,argv[2] , &configFilePath);
cobj->addArmatureFileInfoAsync(imagePath.c_str(), plistPath.c_str(), configFilePath.c_str(), tmpObj, schedule_selector(JSArmatureWrapper::addArmatureFileInfoAsyncCallbackFunc));
return JS_TRUE;
}
JS_ReportError(cx, "Invalid number of arguments");
return JS_FALSE;
}
extern JSObject* jsb_ScrollView_prototype; extern JSObject* jsb_ScrollView_prototype;
extern JSObject* jsb_TableView_prototype; extern JSObject* jsb_TableView_prototype;
extern JSObject* jsb_EditBox_prototype; extern JSObject* jsb_EditBox_prototype;
extern JSObject* jsb_ArmatureAnimation_prototype;
extern JSObject* jsb_ArmatureDataManager_prototype;
extern JSObject* jsb_Control_prototype; extern JSObject* jsb_Control_prototype;
void register_all_cocos2dx_extension_manual(JSContext* cx, JSObject* global) void register_all_cocos2dx_extension_manual(JSContext* cx, JSObject* global)
@ -1004,12 +794,6 @@ void register_all_cocos2dx_extension_manual(JSContext* cx, JSObject* global)
JS_DefineFunction(cx, jsb_Control_prototype, "addTargetWithActionForControlEvents", js_cocos2dx_CCControl_addTargetWithActionForControlEvents, 3, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, jsb_Control_prototype, "addTargetWithActionForControlEvents", js_cocos2dx_CCControl_addTargetWithActionForControlEvents, 3, JSPROP_READONLY | JSPROP_PERMANENT);
JS_DefineFunction(cx, jsb_Control_prototype, "removeTargetWithActionForControlEvents", js_cocos2dx_CCControl_removeTargetWithActionForControlEvents, 3, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, jsb_Control_prototype, "removeTargetWithActionForControlEvents", js_cocos2dx_CCControl_removeTargetWithActionForControlEvents, 3, JSPROP_READONLY | JSPROP_PERMANENT);
JS_DefineFunction(cx, jsb_ArmatureAnimation_prototype, "setMovementEventCallFunc", js_cocos2dx_ArmatureAnimation_setMovementEventCallFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT);
JS_DefineFunction(cx, jsb_ArmatureAnimation_prototype, "setFrameEventCallFunc", js_cocos2dx_ArmatureAnimation_setFrameEventCallFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT);
JS_DefineFunction(cx, jsb_ArmatureDataManager_prototype, "addArmatureFileInfoAsync", jsb_Animation_addArmatureFileInfoAsyncCallFunc, 3, JSPROP_READONLY | JSPROP_PERMANENT);
JSObject *tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.TableView; })()")); JSObject *tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.TableView; })()"));
JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCTableView_create, 3, JSPROP_READONLY | JSPROP_PERMANENT); JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCTableView_create, 3, JSPROP_READONLY | JSPROP_PERMANENT);
} }

View File

@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_extension_auto.cpp" />
<ClCompile Include="jsb_cocos2dx_extension_manual.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_extension_auto.hpp" />
<ClInclude Include="jsb_cocos2dx_extension_manual.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_extension_auto_api.js" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{625F7391-9A91-48A1-8CFC-79508C822637}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>libJSBindingForExtension</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_LIB;DEBUG;COCOS2D_DEBUG=1;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\network;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\auto-generated\js-bindings;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4068;4101;4800;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\..\..\..\external\sqlite3\libraries\win32\*.*" "$(OutDir)"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_LIB;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\network;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\auto-generated\js-bindings;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4068;4101;4800;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="generated">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="manual">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_extension_auto.cpp">
<Filter>generated</Filter>
</ClCompile>
<ClCompile Include="jsb_cocos2dx_extension_manual.cpp">
<Filter>manual</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_extension_auto.hpp">
<Filter>generated</Filter>
</ClInclude>
<ClInclude Include="jsb_cocos2dx_extension_manual.h">
<Filter>manual</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\auto-generated\js-bindings\jsb_cocos2dx_extension_auto_api.js">
<Filter>generated</Filter>
</None>
</ItemGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show More